decocms 4.596.1 → 4.597.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CMkbvoeN.js → AlertCircle-CYAsQRdT.js} +1 -1
- package/dist/client/assets/{AreaChart-DrvGk31z.js → AreaChart-WJ2lLKy4.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BSDOW4A2.js → ArrowLeft-zHVY_XX0.js} +1 -1
- package/dist/client/assets/{ArrowRight-DHHBvkVn.js → ArrowRight-B6vgPWbg.js} +1 -1
- package/dist/client/assets/{ArrowUp-DHOdNryJ.js → ArrowUp-CsFg9VL2.js} +1 -1
- package/dist/client/assets/{BookOpen01-iWPgFcA1.js → BookOpen01-AamEOlRO.js} +1 -1
- package/dist/client/assets/{CartesianChart-uFA7HvYm.js → CartesianChart-BxFiyXVM.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CQBAXeYw.js → CategoricalChart-DfjY1woJ.js} +1 -1
- package/dist/client/assets/{CheckCircle-DS6DtxbV.js → CheckCircle-BB00e9u8.js} +1 -1
- package/dist/client/assets/{ChevronDown-DS_2vV9U.js → ChevronDown-CD0tZl8C.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-D0NBoFQ0.js → ChevronSelectorVertical-CmQsMnAL.js} +1 -1
- package/dist/client/assets/{ChevronUp-BsIT1i00.js → ChevronUp-DGDvzrMe.js} +1 -1
- package/dist/client/assets/{CreditCard01-CtAjK1Nq.js → CreditCard01-W8t7hmzJ.js} +1 -1
- package/dist/client/assets/{Eye-C17dMApd.js → Eye-nqlQ004P.js} +1 -1
- package/dist/client/assets/{File02-CbFOjoUb.js → File02-o8s5093L.js} +1 -1
- package/dist/client/assets/{Fingerprint04-8iB0ZMj1.js → Fingerprint04-DY8McBak.js} +1 -1
- package/dist/client/assets/{Globe04-Bltr8gRw.js → Globe04-OZ9xS3Lx.js} +1 -1
- package/dist/client/assets/{Image01-DO626aWy.js → Image01-DZmu7hyy.js} +1 -1
- package/dist/client/assets/{Key01-Cr-iYwx2.js → Key01-CSQOqmIz.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DtCpgUXM.js → LayoutLeft-BSo5LCFE.js} +1 -1
- package/dist/client/assets/{LinkBroken01-fV6kVrlJ.js → LinkBroken01-BxVMIk5A.js} +1 -1
- package/dist/client/assets/{MessageCircle01-B_IjbkrY.js → MessageCircle01-D1dT92x6.js} +1 -1
- package/dist/client/assets/{Minus-C5_j5JBE.js → Minus-D2jrgo3d.js} +1 -1
- package/dist/client/assets/{Monitor01-DHsrHXin.js → Monitor01-COmDHQ1j.js} +1 -1
- package/dist/client/assets/{Play-nU4UoQKz.js → Play-JVQd8C8L.js} +1 -1
- package/dist/client/assets/{Plus-Bu8dYjTf.js → Plus-CF8KlFVc.js} +1 -1
- package/dist/client/assets/{ReferenceLine-C5nRukFs.js → ReferenceLine-8082t01S.js} +1 -1
- package/dist/client/assets/{SearchMd-CSnYUdRx.js → SearchMd-Cw05gj7E.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DVZF7bHI.js → ShoppingBag01-Cc2EJvA-.js} +1 -1
- package/dist/client/assets/{Sun-BywYlyt4.js → Sun-Bji8LMRX.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-j9pFk8iK.js → SwitchHorizontal01-BSGnkDXI.js} +1 -1
- package/dist/client/assets/{Tool01-DAQSjGNg.js → Tool01-BpBS8dw-.js} +1 -1
- package/dist/client/assets/{Tooltip-Dp5L1NZc.js → Tooltip-DvEW-S9l.js} +1 -1
- package/dist/client/assets/{Trash01-CGA1V9gl.js → Trash01-DXQWI50A.js} +1 -1
- package/dist/client/assets/{TrendUp01-BGKW0mh6.js → TrendUp01-CdeGaAD9.js} +1 -1
- package/dist/client/assets/{Upload01-Ce7d9Uy2.js → Upload01-BXiTGuBV.js} +1 -1
- package/dist/client/assets/{UserCheck01-Bm_tmvVG.js → UserCheck01-DLUgjW3m.js} +1 -1
- package/dist/client/assets/{UserSquare-kWKevgdv.js → UserSquare-a_XazovD.js} +1 -1
- package/dist/client/assets/{Users01-BYfFhtdK.js → Users01-BpOXj9ap.js} +1 -1
- package/dist/client/assets/{XClose-aj1J9clf.js → XClose-DxbjiApV.js} +1 -1
- package/dist/client/assets/{Zap-BVwxluJ4.js → Zap-QnlW2BG3.js} +1 -1
- package/dist/client/assets/{access-gate-DScvaiQI.js → access-gate-BvopvGmx.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CVmMnTnu.js → add-connection-dialog-DaxWAHW0.js} +1 -1
- package/dist/client/assets/agent-app-zt9yWAWY.js +1 -0
- package/dist/client/assets/{agent-assets-C1M-73B4.js → agent-assets-B4BoOCbn.js} +1 -1
- package/dist/client/assets/{agent-automation-CJuNRjPE.js → agent-automation-D8HHkTDn.js} +1 -1
- package/dist/client/assets/{agent-automations-M45BokQz.js → agent-automations-CR47ElS_.js} +1 -1
- package/dist/client/assets/{agent-blog-CDbFysVC.js → agent-blog-kn7H8WW9.js} +2 -2
- package/dist/client/assets/{agent-blog-post-BtgU5FUJ.js → agent-blog-post-CWEMwEqA.js} +2 -2
- package/dist/client/assets/{agent-calendar-Ysm77UBw.js → agent-calendar-DER04lJC.js} +1 -1
- package/dist/client/assets/{agent-capabilities-r-GJhT_0.js → agent-capabilities-CPNkpGBe.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CIWMETy6.js → agent-connect-sources-BBjozm2U.js} +1 -1
- package/dist/client/assets/agent-deck-DD0U8VAD.js +1 -0
- package/dist/client/assets/{agent-e2e-r7rAxMD7.js → agent-e2e-CQFRJ0Om.js} +1 -1
- package/dist/client/assets/agent-experiments-Dz3AvJ4-.js +1 -0
- package/dist/client/assets/agent-file-CpVkBu0J.js +1 -0
- package/dist/client/assets/{agent-hosting-DMdWeVwT.js → agent-hosting-BFGfgXWM.js} +1 -1
- package/dist/client/assets/{agent-icon-DFdDsb4O.js → agent-icon-SasBmPrY.js} +1 -1
- package/dist/client/assets/agent-library-Cn9MXoTF.js +1 -0
- package/dist/client/assets/agent-library-file-CafoXKvT.js +1 -0
- package/dist/client/assets/agent-overview-9j5_NkHV.js +1 -0
- package/dist/client/assets/{agent-releases-D34D3Svq.js → agent-releases-CctvTAm_.js} +1 -1
- package/dist/client/assets/agent-settings-e6iND6rW.js +1 -0
- package/dist/client/assets/agent-site-editor-code-Detw-R2f.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BeFIR9Nd.js +1 -0
- package/dist/client/assets/{agent-site-editor-DgdfDIJG.js → agent-site-editor-jPhFhiaS.js} +1 -1
- package/dist/client/assets/agent-site-editor-preview-B4G1bvsT.js +1 -0
- package/dist/client/assets/agent-view-CHrkfSe7.js +1 -0
- package/dist/client/assets/{agent-view-guard-DH3M23m7.js → agent-view-guard-DDiVN0Sq.js} +1 -1
- package/dist/client/assets/{ai-providers-cFUS4tVR.js → ai-providers-OuekM_ro.js} +1 -1
- package/dist/client/assets/{alert-pc1Ms3qG.js → alert-PbrLNRQ0.js} +1 -1
- package/dist/client/assets/{analytics-sections-CRlYKtI9.js → analytics-sections-DWAL7IVe.js} +1 -1
- package/dist/client/assets/{api-keys-uQL0a6MN.js → api-keys-CKMEwhf6.js} +1 -1
- package/dist/client/assets/api-keys-CtDwFEqi.js +1 -0
- package/dist/client/assets/{app-editor-Bggv50md.js → app-editor-aGklcq_V.js} +1 -1
- package/dist/client/assets/{asset-utils-DmKXdm_k.js → asset-utils-CJa90ZGO.js} +1 -1
- package/dist/client/assets/{auth-Dee7m2i5.js → auth-C---Zkvq.js} +1 -1
- package/dist/client/assets/{auth-catchall-Lp4En3zi.js → auth-catchall-DgTfFPJA.js} +1 -1
- package/dist/client/assets/{auth-entry-Blex_eHm.js → auth-entry-Bdlo1esb.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DqNZIMLg.js → auth-split-layout-C7aM0bmC.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-fbN8kdQr.js → authenticate-and-persist-oauth-D1SCK9qV.js} +1 -1
- package/dist/client/assets/{automation-list-row-CY66jOSh.js → automation-list-row-CmL2MF72.js} +1 -1
- package/dist/client/assets/{automation-runs-C8XowsOe.js → automation-runs-BabYNmi9.js} +1 -1
- package/dist/client/assets/{automations-Dfb_nph_.js → automations-CJM7s6OS.js} +1 -1
- package/dist/client/assets/{badge-BwjML1Ui.js → badge-BcMIPtVj.js} +1 -1
- package/dist/client/assets/{block-document-CLqA1OpC.js → block-document-BBR-lAQh.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-7Y5QFm9x.js → blocks-preview-workspace-context-D-FzlGyh.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-DZtXlWh1.js → blocks-tab-states-CmsgKSWv.js} +1 -1
- package/dist/client/assets/{blog-preview-url-oQXPBhGk.js → blog-preview-url-DZyvHdU6.js} +1 -1
- package/dist/client/assets/{blog-schema-D3xxOZZL.js → blog-schema-DbGoS5dM.js} +1 -1
- package/dist/client/assets/{blog-source-gate-CFH7RVI2.js → blog-source-gate-BYUxeuY-.js} +1 -1
- package/dist/client/assets/{blog-view-gate-DigHm4N8.js → blog-view-gate-D1VDGt0q.js} +1 -1
- package/dist/client/assets/{buckets-DlSaMEkI.js → buckets-CpBc4NBs.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-C1NaZMTH.js → build-improve-prompt-doc-DsNhI5c0.js} +1 -1
- package/dist/client/assets/{calendar-khB6XOc2.js → calendar-oyktWjjy.js} +1 -1
- package/dist/client/assets/{capability-load-error-BrEArsQc.js → capability-load-error-CZr_hpNK.js} +1 -1
- package/dist/client/assets/{category-editor-BViKDLmy.js → category-editor-Btv0sSPl.js} +1 -1
- package/dist/client/assets/{category-tree-BTRq8RL0.js → category-tree-CUP3rQKK.js} +1 -1
- package/dist/client/assets/{chart-BcpbpcAf.js → chart-L_rdD8Fy.js} +1 -1
- package/dist/client/assets/chat-context-BXxmldjV.js +44 -0
- package/dist/client/assets/{chat-draft-DOnB1tr0.js → chat-draft-Bu5orWL5.js} +1 -1
- package/dist/client/assets/{checkbox-CmBHLZcQ.js → checkbox-DcLJM3uK.js} +1 -1
- package/dist/client/assets/{choose-editor-B67urVk8.js → choose-editor-DQyXDHRD.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Bz6r5Ycn.js → cli-auth-success-CmXNeNAR.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-DcveNiDE.js → cms-settings-editor-CHvYFO6g.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-DW5tpjoC.js → cms-store-drafts-B3P79s_J.js} +1 -1
- package/dist/client/assets/{collapsible-qzwMsYPq.js → collapsible-B8lX7LSm.js} +1 -1
- package/dist/client/assets/{collection-detail-2IToM1X7.js → collection-detail-GsM61XEt.js} +1 -1
- package/dist/client/assets/{collection-display-button-D9tNnAgw.js → collection-display-button-CIMd2CCY.js} +1 -1
- package/dist/client/assets/{collection-search-CTpFl_1Y.js → collection-search-ioGjJlri.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Cpcu8Oij.js → collection-table-wrapper-d2v3Inn9.js} +1 -1
- package/dist/client/assets/{collection-tabs-DK7LWBZc.js → collection-tabs-CpA2E5BB.js} +1 -1
- package/dist/client/assets/{combobox-A6NsJcol.js → combobox-3XSCcZHm.js} +1 -1
- package/dist/client/assets/{command-Bpokkr7D.js → command-CjjWneJ9.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Cj31-W6E.js → companion-mcps-section-BfugnMSL.js} +1 -1
- package/dist/client/assets/{config-9LzB-TfV.js → config-DMRaGUqI.js} +1 -1
- package/dist/client/assets/{connect-Dzf2XXqW.js → connect-DPlH2AuB.js} +1 -1
- package/dist/client/assets/{connect-key-DqVRKu6e.js → connect-key-DXsdNQDg.js} +1 -1
- package/dist/client/assets/{connect-layout-DO1tbYx8.js → connect-layout-BOatW4CZ.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-D-UsGI30.js → connect-source-dialog-CXL8Ll8J.js} +1 -1
- package/dist/client/assets/{connection-B8_wyLe4.js → connection-DMyObHFk.js} +1 -1
- package/dist/client/assets/{connection-card-pnI2WwJL.js → connection-card-CIdpI2wF.js} +1 -1
- package/dist/client/assets/{connection-detail-yMVuGCv9.js → connection-detail-CQX5UnUU.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DEbbcr0Y.js → connection-form-helpers-CI-MD64a.js} +1 -1
- package/dist/client/assets/{connection-slug-C1Xw24XJ.js → connection-slug-CoQLu_eQ.js} +1 -1
- package/dist/client/assets/{connections-csdBnjiM.js → connections-CUnudfuh.js} +1 -1
- package/dist/client/assets/{content-tab-C5yeDMy3.js → content-tab-D0dI2BbM.js} +3 -3
- package/dist/client/assets/{context-BJDCzssE.js → context-BzsV0hxX.js} +1 -1
- package/dist/client/assets/{context-menu-BLPuVblK.js → context-menu-B1dAG0Wr.js} +1 -1
- package/dist/client/assets/{context-shell-Dzy86D3N.js → context-shell-547AgBrw.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-sRuhJ8o6.js → create-organization-dialog-BKxedScB.js} +1 -1
- package/dist/client/assets/{daily-pulse-DKB2mThR.js → daily-pulse-aiJY3gnz.js} +1 -1
- package/dist/client/assets/{delete-copy-D60ZiQf5.js → delete-copy-CGGKQ10f.js} +1 -1
- package/dist/client/assets/{device-hint-BanhTiD8.js → device-hint-QYtktsO0.js} +1 -1
- package/dist/client/assets/{discover-DNzddiNs.js → discover-BZAuq37N.js} +1 -1
- package/dist/client/assets/{domain-settings-YxR2DIWq.js → domain-settings-BuaKW4Rw.js} +1 -1
- package/dist/client/assets/{drawer-D3M4u1JQ.js → drawer-JbzUShND.js} +1 -1
- package/dist/client/assets/{editor-BCeMKV5f.js → editor-BR1a7qGD.js} +1 -1
- package/dist/client/assets/{editor-classes-BHlQ8lta.js → editor-classes-D4G_DIGw.js} +1 -1
- package/dist/client/assets/{empty-state-DMyh10sW.js → empty-state-BnFVKQvv.js} +1 -1
- package/dist/client/assets/{empty-state-n7kVRkSm.js → empty-state-C0MDzZBx.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-B3hGOZ0k.js → experiments-tab-choice-DIRzwSia.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DCWqImZT.js → extract-connection-data-DtWfSA7r.js} +1 -1
- package/dist/client/assets/{feature-gate-DS4JY_b4.js → feature-gate-BfrcuviK.js} +1 -1
- package/dist/client/assets/{feature-paywall-C_Np7j9C.js → feature-paywall-DNnv958-.js} +1 -1
- package/dist/client/assets/{file-explorer-rktoDXiw.js → file-explorer-D_6SsDXA.js} +1 -1
- package/dist/client/assets/{file-preview-Dxg_on-h.js → file-preview-CC2pttDX.js} +1 -1
- package/dist/client/assets/{file-share-button-CkE_dkdb.js → file-share-button-dJsfWtiJ.js} +1 -1
- package/dist/client/assets/{file-type-icon-B-mU4K6I.js → file-type-icon-nU6c9OQr.js} +1 -1
- package/dist/client/assets/{folder-icon-CgXz01Aa.js → folder-icon-Wp7wbxIQ.js} +1 -1
- package/dist/client/assets/{form-D-KzaCY4.js → form-Dx1EBvxh.js} +1 -1
- package/dist/client/assets/{frame-navigation-CAcIAUua.js → frame-navigation-aPmo2U0P.js} +1 -1
- package/dist/client/assets/{gateway-client-CZaZgqJJ.js → gateway-client-BQlD2psO.js} +1 -1
- package/dist/client/assets/{general-G-7imp3B.js → general-CAva67lN.js} +1 -1
- package/dist/client/assets/{github-icon-DW5OWwA4.js → github-icon-hFwcbgKP.js} +1 -1
- package/dist/client/assets/{held-block-view-CZOwIXZa.js → held-block-view-ByNmqPhe.js} +1 -1
- package/dist/client/assets/{home-DTJxJIJs.js → home-5ZWRmhLp.js} +1 -1
- package/dist/client/assets/{home-overview-DP1NpjZb.js → home-overview-BJLt3O6I.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-ChvoCrzB.js → hosted-reconcile-CgC-Mb3M.js} +1 -1
- package/dist/client/assets/{icon-button-BNUEa7I2.js → icon-button-8qhGM4eg.js} +1 -1
- package/dist/client/assets/{index-BursVqgA.js → index-B5WGiIKx.js} +1 -1
- package/dist/client/assets/{index-Dhko18B8.js → index-B7i_xJl4.js} +1 -1
- package/dist/client/assets/{index-B25IM95s.js → index-BPvQqOSy.js} +1 -1
- package/dist/client/assets/{index-C0QYe6xy.js → index-BR0U8TgB.js} +1 -1
- package/dist/client/assets/{index-Cgox-ACE.js → index-BU3n1igW.js} +1 -1
- package/dist/client/assets/{index-CKjUtQ_A.js → index-B_eoP-Gi.js} +1 -1
- package/dist/client/assets/{index-DItyK843.js → index-ByOLAuLS.js} +1 -1
- package/dist/client/assets/index-C4wvi2v7.css +1 -0
- package/dist/client/assets/{index-C0zcxte6.js → index-C6-0Ff1m.js} +3 -3
- package/dist/client/assets/{index-DnJw5_hQ.js → index-CMjqNIsi.js} +1 -1
- package/dist/client/assets/{index-DDPTx6IX.js → index-CqirF9LN.js} +1 -1
- package/dist/client/assets/{index-B-HkEC7t.js → index-D-cQHZ9D.js} +1 -1
- package/dist/client/assets/{index-Bbk5iS1Z.js → index-DHE6Gmv8.js} +13 -13
- package/dist/client/assets/{index-Dpk7pb5D.js → index-DWqgNqna.js} +1 -1
- package/dist/client/assets/{index-Bhd9nKcZ.js → index-MxNSCTK9.js} +1 -1
- package/dist/client/assets/{index-CNh1ag3h.js → index-ZdVMGNX_.js} +1 -1
- package/dist/client/assets/{index-QPY6UhxV.js → index-bfIJKw2l.js} +1 -1
- package/dist/client/assets/{index-xplT9JhY.js → index-l6F0wrxq.js} +1 -1
- package/dist/client/assets/{index-redirect-DTcApHr6.js → index-redirect-D-0BmEsE.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BQQ9hnSz.js → infiniteQueryObserver-CiZgrwb3.js} +1 -1
- package/dist/client/assets/{infra-billing-Cibcdv6G.js → infra-billing-DMYQXPE8.js} +1 -1
- package/dist/client/assets/{input-DgB3lXqG.js → input-BvykudC_.js} +3 -3
- package/dist/client/assets/input-_oxlM42n.js +1 -0
- package/dist/client/assets/{integration-icon-BW2tUSAw.js → integration-icon-BIQ_3p0x.js} +1 -1
- package/dist/client/assets/{item-actions-BhKgwiA_.js → item-actions-BoAVVq18.js} +1 -1
- package/dist/client/assets/{jira-icon-BBEhB000.js → jira-icon-BYAb-E8q.js} +1 -1
- package/dist/client/assets/{label-CBiNPa0x.js → label-Cq7ohFeR.js} +1 -1
- package/dist/client/assets/{layout-qzIHBMki.js → layout-DKgi2pWo.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-CWsFtMRD.js → legacy-admin-welcome-dialog-Cdla_zr3.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BiV45Zde.js → legacy-agents-deep-C4yyRVHA.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DEtLBi-B.js → legacy-main-redirect-CUxGG29A.js} +1 -1
- package/dist/client/assets/library-D6WcKfwU.js +1 -0
- package/dist/client/assets/{library-tab-C9yzEvtN.js → library-tab-DnuxDKa_.js} +1 -1
- package/dist/client/assets/{login-ByzMeE8E.js → login-21wHOzeO.js} +1 -1
- package/dist/client/assets/{markdown-CfexGEwm.js → markdown-5RMcvWqV.js} +29 -29
- package/dist/client/assets/{mcp-app-renderer-HLyo74Ho.js → mcp-app-renderer-BV5sVhom.js} +1 -1
- package/dist/client/assets/{mcp-oauth-_kccjx1r.js → mcp-oauth-BU0x_iDk.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CutBZZPD.js → mcp-oauth-CeIVSnSu.js} +1 -1
- package/dist/client/assets/{members-J3uF-Kwg.js → members-BNWyDABE.js} +1 -1
- package/dist/client/assets/{memory-CEi93eGU.js → memory-d-IFBAud.js} +1 -1
- package/dist/client/assets/{mock-board-CqS4kEHW.js → mock-board-Y-hiGSHf.js} +3 -3
- package/dist/client/assets/{monaco-editor-CWn-gktX.js → monaco-editor-d8C00Vbh.js} +1 -1
- package/dist/client/assets/{monitoring-87cYWoHO.js → monitoring-3bxUWuJM.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Crp3zY71.js → monitoring-stats-row-BdeLiDjT.js} +1 -1
- package/dist/client/assets/{multi-select-C6jEIwqf.js → multi-select-D6S763-B.js} +1 -1
- package/dist/client/assets/{mustache-cZl45dTs.js → mustache-CH8IdNgC.js} +1 -1
- package/dist/client/assets/{named-rule-step-CtJSae2g.js → named-rule-step-ISshG07e.js} +1 -1
- package/dist/client/assets/{named-rule-view-BH1w8o3C.js → named-rule-view-CXMDYxKO.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BlvriG-i.js → new-project-dialog-Ch6wUMKc.js} +1 -1
- package/dist/client/assets/{new-project-store-1bwM_bJw.js → new-project-store-BJVEZe7t.js} +1 -1
- package/dist/client/assets/{oauth-callback-C2wxDzvG.js → oauth-callback-DF-qannK.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-3k9SJAqE.js → oauth-callback-ai-provider-BPFWE8hJ.js} +1 -1
- package/dist/client/assets/{oauth-consent-BgalQs6s.js → oauth-consent-DEVHlJrJ.js} +1 -1
- package/dist/client/assets/{onboarding-C00xt4jO.js → onboarding-BBiIM9eH.js} +1 -1
- package/dist/client/assets/{openai-conversation-BBe7gxWi.js → openai-conversation-Cc0ggxu_.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DW5MYqhg.js → optimistic-project-sidebar-views-DoJ93lgL.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DgOUhpEv.js → order-monitor-day-C4bwqh_Q.js} +1 -1
- package/dist/client/assets/{organization-choice-CqbEtrRk.js → organization-choice-CAc73DMC.js} +1 -1
- package/dist/client/assets/{orgs-BjJvbxSQ.js → orgs-DlLRdIR1.js} +1 -1
- package/dist/client/assets/{own-accounts-section-B_9BZnKc.js → own-accounts-section-L5xwUYxF.js} +1 -1
- package/dist/client/assets/pair-BKCcX4sy.js +48 -0
- package/dist/client/assets/{parse-sections-BEt4sL30.js → parse-sections-CBJ8clfr.js} +2 -2
- package/dist/client/assets/{plan-DzqKwbY3.js → plan-Basau5px.js} +1 -1
- package/dist/client/assets/{plan-ladder-UyXrpMPX.js → plan-ladder-DDAcm-ji.js} +1 -1
- package/dist/client/assets/{plan-usage-card-D7PtQ-Mg.js → plan-usage-card-BwiinbGT.js} +1 -1
- package/dist/client/assets/{popover-D1tBNoFL.js → popover-DTBVeUtG.js} +1 -1
- package/dist/client/assets/{post-calendar-DPse-vQn.js → post-calendar-CkZvvgA_.js} +1 -1
- package/dist/client/assets/{post-editor-CmRLNap2.js → post-editor-CaTAhhxB.js} +1 -1
- package/dist/client/assets/{preview-content-Bst4Vj1S.js → preview-content-BGfL4iXO.js} +1 -1
- package/dist/client/assets/{preview-dialog-CK8jTtFE.js → preview-dialog-BHh0s5Ms.js} +1 -1
- package/dist/client/assets/{preview-panel-2ktfpQ0K.js → preview-panel-HHRrVU4R.js} +1 -1
- package/dist/client/assets/{preview-tab-De34UvpX.js → preview-tab-S2hZUwsX.js} +3 -3
- package/dist/client/assets/{primitives-Cm0irN0s.js → primitives-K9ug68v7.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-Cj_-kR4f.js → product-picker-dialog-ujfDfMoL.js} +1 -1
- package/dist/client/assets/{profile-B4bspmYv.js → profile-Dc_w4Cyx.js} +1 -1
- package/dist/client/assets/{project-app-view-rSEufAu3.js → project-app-view-mLEnCg4s.js} +1 -1
- package/dist/client/assets/{project-apps-COpRDLe9.js → project-apps-C4vT9LXH.js} +1 -1
- package/dist/client/assets/{project-icon-BhM8uTps.js → project-icon-CGc9ojaV.js} +1 -1
- package/dist/client/assets/{project-index-DzyLTscG.js → project-index-I2IwZ_L4.js} +1 -1
- package/dist/client/assets/project-reports-BlDDRtjQ.js +1 -0
- package/dist/client/assets/project-tasks-DpoEijNI.js +1 -0
- package/dist/client/assets/{projects-MePgIa0t.js → projects-BQZSr4gE.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BBKSmo_-.js → projects-empty-state-B5Z0ROP0.js} +1 -1
- package/dist/client/assets/{prompts-CxnVjjNi.js → prompts-DQItNyVW.js} +1 -1
- package/dist/client/assets/record-editor-BOQ2W0wP.js +1 -0
- package/dist/client/assets/{redirect-editor-DC7_swj1.js → redirect-editor-BrgJRHSk.js} +1 -1
- package/dist/client/assets/{reports-Dr22Z_GR.js → reports-B3-NqRd1.js} +1 -1
- package/dist/client/assets/reports-Bsc_XwTm.js +1 -0
- package/dist/client/assets/{reports-onboarding-CRwOaNzn.js → reports-onboarding-Beggk42B.js} +1 -1
- package/dist/client/assets/{reports-tab-B78-CTws.js → reports-tab-CQP_rzUZ.js} +2 -2
- package/dist/client/assets/{repositories-B1GBYlk4.js → repositories-Cf9nYfd0.js} +1 -1
- package/dist/client/assets/repositories-CfgaBNdf.js +1 -0
- package/dist/client/assets/{repository-binding-BSsS-pLT.js → repository-binding-Do6sAdct.js} +1 -1
- package/dist/client/assets/{repository-picker-DRoPGieR.js → repository-picker-B9qWS0uH.js} +1 -1
- package/dist/client/assets/{require-capability-De-meIBX.js → require-capability-DdgYI50p.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C3iaEEmL.js → required-auth-layout-BwuuU3bJ.js} +1 -1
- package/dist/client/assets/{reset-password-CgYLlNff.js → reset-password-CFvEOHUE.js} +1 -1
- package/dist/client/assets/{resizable-Cli16m3H.js → resizable-DbjoRAK-.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BTWqiqFe.js → resolve-tab-icon-zc5Xnngt.js} +1 -1
- package/dist/client/assets/{review-settings-BbBTVgei.js → review-settings-C_jx0NLX.js} +1 -1
- package/dist/client/assets/{role-color-Bk9jClz7.js → role-color-AmMn6ZIX.js} +1 -1
- package/dist/client/assets/{roles-C1ujMDqv.js → roles-b_L0oOYd.js} +1 -1
- package/dist/client/assets/{route-DmaKuvUr.js → route-Bahv9n22.js} +1 -1
- package/dist/client/assets/{route-D0TrVFPx.js → route-D2bkX53_.js} +1 -1
- package/dist/client/assets/route-Da-mMBjf.js +1 -0
- package/dist/client/assets/{route-page-header-BoSpaJ2l.js → route-page-header-D8CuFczr.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-BQA0ksZA.js → sandbox-git-api-B3EnJ01P.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DCPdrlj7.js → sandbox-lifecycle-context-BiHehEOC.js} +1 -1
- package/dist/client/assets/{save-status-D-AS_GN9.js → save-status-DEylj8_h.js} +1 -1
- package/dist/client/assets/{schema-ByWYIGUp.js → schema-C9B5bAQC.js} +1 -1
- package/dist/client/assets/{schema-CjjCZ6bx.js → schema-DiSJ8SEc.js} +1 -1
- package/dist/client/assets/{scroll-area-BUivyrPu.js → scroll-area-BSx_oSJx.js} +1 -1
- package/dist/client/assets/{search-input-3Sn0Ox5l.js → search-input-DE_voviB.js} +1 -1
- package/dist/client/assets/{search-toggle-BgCwR4FW.js → search-toggle-DeMaHCKK.js} +1 -1
- package/dist/client/assets/{secret-picker-D8jf7FIH.js → secret-picker-Dslhp0Eb.js} +1 -1
- package/dist/client/assets/{secrets-C0836Wwg.js → secrets-BFU0jWBM.js} +1 -1
- package/dist/client/assets/{section-array-field-CnIV-ruK.js → section-array-field-dPI_sYd7.js} +1 -1
- package/dist/client/assets/{sections-vcSyxSdo.js → sections-BCyCfgtK.js} +1 -1
- package/dist/client/assets/{sections-editor-DQxa09Jb.js → sections-editor-CD9jVbGW.js} +1 -1
- package/dist/client/assets/{select-De2MKx8C.js → select-Chdk1xe9.js} +1 -1
- package/dist/client/assets/{select-model-BJhpOCBC.js → select-model-DNsDO7Yn.js} +1 -1
- package/dist/client/assets/{seo-editor-Dhccj0TW.js → seo-editor-ByqHZOIr.js} +1 -1
- package/dist/client/assets/{separator-KNm6D8Nt.js → separator-CnEC83tf.js} +1 -1
- package/dist/client/assets/{session-runtime-CEhQCN_A.js → session-runtime-fXa5psFL.js} +1 -1
- package/dist/client/assets/settings-tab-DG4z8CKo.js +1 -0
- package/dist/client/assets/{sheet-C0xCH2mH.js → sheet-XJvcudCi.js} +1 -1
- package/dist/client/assets/{shell-layout-KldWhDuy.js → shell-layout-CuBXiCpv.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DSBacDkM.js → site-draft-actions-BJiaSwYy.js} +1 -1
- package/dist/client/assets/{site-draft-view-DE-vflKe.js → site-draft-view-9aqy4RF0.js} +1 -1
- package/dist/client/assets/site-editor-BSb_9CNK.js +1 -0
- package/dist/client/assets/{site-editor-toast-CvNOL4ms.js → site-editor-toast-C2OaHizl.js} +1 -1
- package/dist/client/assets/{skills-Bobugav3.js → skills-DQnklyjk.js} +1 -1
- package/dist/client/assets/{slider-D6wd7ZjA.js → slider-DaeRBQVD.js} +1 -1
- package/dist/client/assets/{sortable.esm-nvXi4p48.js → sortable.esm-BulVoRsH.js} +1 -1
- package/dist/client/assets/{sso-DeJx7UXD.js → sso-ptIJoXni.js} +1 -1
- package/dist/client/assets/{suggestion-DqNLuB6A.js → suggestion-DoHjrPPW.js} +1 -1
- package/dist/client/assets/{super-agent-icon-Bshs6T-m.js → super-agent-icon-VandTz-0.js} +1 -1
- package/dist/client/assets/{switch-B00BnZbl.js → switch-6JKp3FKO.js} +1 -1
- package/dist/client/assets/{synced-repos-DizABgb9.js → synced-repos-DJpcOxmB.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CfPfvQNB.js → tab-icon-glyph-BMUkOrax.js} +1 -1
- package/dist/client/assets/{table-Uzyje8VX.js → table-Dqj9d5ax.js} +1 -1
- package/dist/client/assets/{tabs-DP2FyQoi.js → tabs-CT50lxBB.js} +1 -1
- package/dist/client/assets/{task-board-VFa9eWCt.js → task-board-DNboqZMy.js} +1 -1
- package/dist/client/assets/{task-key-Bw-0Xagt.js → task-key-DgbGUF2j.js} +1 -1
- package/dist/client/assets/{task-route-CAa-BRsr.js → task-route-DUKKS-kP.js} +1 -1
- package/dist/client/assets/{task-status-CJ3X0NFO.js → task-status-BadjzsyY.js} +1 -1
- package/dist/client/assets/{taskboard-analytics--TWvNVte.js → taskboard-analytics-PY56GOP9.js} +1 -1
- package/dist/client/assets/tasks-74JzN4W9.js +1 -0
- package/dist/client/assets/{tasks-BclVV5A-.js → tasks-BXwt_hky.js} +1 -1
- package/dist/client/assets/{textarea-BcZLPwQm.js → textarea-C3LFFo0w.js} +1 -1
- package/dist/client/assets/{thread-analytics-DfE_3PWw.js → thread-analytics-BmSAMduA.js} +1 -1
- package/dist/client/assets/{thread-button-Czo95-P_.js → thread-button-CrjY15ns.js} +1 -1
- package/dist/client/assets/{thread-intent-BmXJHmce.js → thread-intent-j3i3V7mR.js} +1 -1
- package/dist/client/assets/{thread-route-DqTdmfFp.js → thread-route-DGrdxDp1.js} +1 -1
- package/dist/client/assets/{thread-route-DiGqiNZD.js → thread-route-DY_UV0gu.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DqQKksps.js → thread-sheet-body-DE05uWNv.js} +1 -1
- package/dist/client/assets/{time-range-picker-C_oftj3R.js → time-range-picker-Bbk_8gb1.js} +1 -1
- package/dist/client/assets/{toggle-group-B-toNLb_.js → toggle-group-CbJrGPYf.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DYhntVmY.js → tool-set-selector-z6gFzWDr.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-luClWvkN.js → toolbar-icon-button-CEZ74wIz.js} +1 -1
- package/dist/client/assets/{tooltip-W9aneKod.js → tooltip-BnL5r8Gv.js} +1 -1
- package/dist/client/assets/{tooltipContext-BKEerq2t.js → tooltipContext-DvsqpzJf.js} +1 -1
- package/dist/client/assets/{track-DfNsDtcS.js → track-PLvkvo8B.js} +1 -1
- package/dist/client/assets/{types-D29IqQQn.js → types-9tZ4hN1z.js} +1 -1
- package/dist/client/assets/{url-slug-C2dy5cTg.js → url-slug-C2KUvR2X.js} +1 -1
- package/dist/client/assets/{usage-stats-C4Ju4qoC.js → usage-stats-DX8XXFQ9.js} +21 -21
- package/dist/client/assets/{use-ai-providers-DU-S8Ovj.js → use-ai-providers-pXYGEzkI.js} +1 -1
- package/dist/client/assets/{use-api-keys-DI_FBRt6.js → use-api-keys-B03kdPI3.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DLAoQ7ZW.js → use-apply-named-rule-Cc4ACfQP.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-B6pTgaei.js +1 -0
- package/dist/client/assets/{use-automations-DJu_bQMu.js → use-automations-D6sS4b2K.js} +1 -1
- package/dist/client/assets/{use-autosave-UPILzOGr.js → use-autosave-ONtBLfOU.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-z5uA6d0S.js +1 -0
- package/dist/client/assets/use-blog-view-BHifDign.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DK2Bd_b8.js → use-chat-layout-state-BNCeIaIM.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-6W6G1H2l.js → use-cms-publish-actions-DMDZLoe0.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DF6vPT8j.js → use-connect-companion-Ez7z63oH.js} +1 -1
- package/dist/client/assets/{use-connection-BHZBfHKD.js → use-connection-D5_bE1jX.js} +1 -1
- package/dist/client/assets/{use-content-sync-hHSueAd9.js → use-content-sync-D4PlAahX.js} +1 -1
- package/dist/client/assets/{use-copy-CtLHXaYX.js → use-copy-BRwsGSGM.js} +1 -1
- package/dist/client/assets/{use-current-view-cqZFu632.js → use-current-view-0HWp9lHl.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Ca4x-hdx.js → use-date-fns-locale-DiJmvXQv.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-egUuvpyg.js → use-debounced-autosave-BmZISibb.js} +1 -1
- package/dist/client/assets/{use-debounced-value-C8Gcgh9P.js → use-debounced-value-Dw3dFt4C.js} +1 -1
- package/dist/client/assets/{use-deco-credits-NqK3j6Uy.js → use-deco-credits-r1_nX8wr.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BdOsPUXO.js → use-decopilot-events-B1JmbrrX.js} +1 -1
- package/dist/client/assets/{use-delete-block-Ck_v-_xs.js → use-delete-block-DDUTXhNF.js} +1 -1
- package/dist/client/assets/{use-delete-connection-PQXZSLGQ.js → use-delete-connection-C3dK-V2D.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-06_aP6Ns.js → use-deployment-admin-KnQTKRss.js} +1 -1
- package/dist/client/assets/{use-entitlements-BUF4fpoq.js → use-entitlements-DIoZnc_q.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-C0yd3ccI.js → use-fast-preview-draft-url-D9LB_eIt.js} +1 -1
- package/dist/client/assets/{use-file-configs-BrcDDIBZ.js → use-file-configs-I6vvS9gB.js} +1 -1
- package/dist/client/assets/{use-id-selection-vLaYBEH-.js → use-id-selection-BAv2DcG7.js} +1 -1
- package/dist/client/assets/{use-in-settings-DfZIpmwh.js → use-in-settings-DxzX6GVb.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-DhlbBV5u.js → use-inbox-feed-BwP3VnzE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BqVS1RSu.js → use-infinite-scroll-DZHKJp2V.js} +1 -1
- package/dist/client/assets/{use-join-requests-LMl79WAM.js → use-join-requests-DqFzxVX_.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BypHuYN5.js → use-main-panel-tabs-D2eQ46eC.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Da9KRHgH.js → use-mcp-auth-status-C6_TAde2.js} +1 -1
- package/dist/client/assets/{use-mcp-client-mPNZ5wA-.js → use-mcp-client-Bg8mQo9f.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BgJv8IRF.js → use-mcp-prompts-DPiL3LQv.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BcOrFpuk.js → use-mcp-tools-C5OR9KZ9.js} +1 -1
- package/dist/client/assets/{use-mobile-Dq5jf2f0.js → use-mobile-IMVhNYT_.js} +1 -1
- package/dist/client/assets/{use-move-blocks-DnHSHuof.js → use-move-blocks-BVaiu02r.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C6kz2tf-.js → use-navigate-to-agent-WJ7w-8ZZ.js} +1 -1
- package/dist/client/assets/{use-never-published-BmwZStnO.js → use-never-published-DpnSCkDS.js} +1 -1
- package/dist/client/assets/{use-org-fs-s_0LIrDS.js → use-org-fs-C4V7-QNj.js} +1 -1
- package/dist/client/assets/{use-org-notice-nG8SqftY.js → use-org-notice-DOVWyuaL.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BxGtCYGM.js → use-org-repo-syncs-BukrXch8.js} +1 -1
- package/dist/client/assets/{use-org-sso-Bz1_bfif.js → use-org-sso-D7w6nhfD.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BMe7yDwK.js → use-organization-settings-BmAIEgEL.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-Cw8nqOIV.js → use-panel-navigate-CkYTugDF.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CAidgxjk.js → use-project-native-view-presence-CkqC328s.js} +1 -1
- package/dist/client/assets/{use-project-scope-XjTsfNgl.js → use-project-scope-DwQViH2f.js} +1 -1
- package/dist/client/assets/{use-recent-apps-nWo-QZz2.js → use-recent-apps-4wYjA0CX.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CMKEMOUj.js → use-reports-diagnostic-DKW88lIw.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-B_nCM-ka.js → use-sandbox-events-DwjSc3R2.js} +1 -1
- package/dist/client/assets/{use-secrets-By8cnQ4b.js → use-secrets-BW5HFrjP.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DEe57kJn.js → use-section-preview-base-D61lHpgT.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-BWxWuz83.js → use-sidebar-collapsed-CvPku1YI.js} +1 -1
- package/dist/client/assets/{use-tags-DsDJUFVu.js → use-tags-B-VIOJFl.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CoIz9pQ4.js → use-task-board-analytics-pNXfpx7q.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BjXAaoNm.js → use-task-board-item-prs-CXo3bcGf.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BueQ5HqT.js → use-task-board-items-CygST8NV.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-D-OUTo_-.js → use-task-board-prompts-DYeH1UKB.js} +1 -1
- package/dist/client/assets/{use-task-metadata-B11DnfPk.js → use-task-metadata-BKyg4fwU.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BwRllZjy.js → use-thread-outputs-U0o_TC58.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-CT4UyCBZ.js → use-view-draft-kind-DrDbO3-P.js} +1 -1
- package/dist/client/assets/{use-voice-input-fsQibllg.js → use-voice-input-ChVzBkTC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B5jgBAwp.js +1 -0
- package/dist/client/assets/{useQueries-Cif9aKm8.js → useQueries-Cmvk9UMI.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D3Nn_2Nf.js +1 -0
- package/dist/client/assets/{users-DvVhyJaa.js → users-S8nniBNq.js} +1 -1
- package/dist/client/assets/{utils-P6Og2u3N.js → utils-CalvUBc1.js} +1 -1
- package/dist/client/assets/{variant-calendar-LeGKEzjI.js → variant-calendar-C-1HVzQo.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BB2HbnUa.js → variant-matcher-override-DY5ZfO62.js} +1 -1
- package/dist/client/assets/{view-header-aiCGECzR.js → view-header-Dlc9W8Ql.js} +1 -1
- package/dist/client/assets/{virtual-mcp-q_VEw2Ce.js → virtual-mcp-BYga37_3.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-9O-TJMef.js → watch-sse-pool-DdE7kwP2.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +350 -350
- package/package.json +1 -1
- package/dist/client/assets/agent-app-DlIXYYf9.js +0 -1
- package/dist/client/assets/agent-deck-DqIBoJAu.js +0 -1
- package/dist/client/assets/agent-experiments-BiGIVIia.js +0 -1
- package/dist/client/assets/agent-file-DsMol7Mm.js +0 -1
- package/dist/client/assets/agent-library-Bt1mJaIH.js +0 -1
- package/dist/client/assets/agent-library-file-Z3ccrEES.js +0 -1
- package/dist/client/assets/agent-overview-DarftbDZ.js +0 -1
- package/dist/client/assets/agent-settings-DQjOsh1q.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Z3qPYcJC.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Djuy4ohp.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DuuRb2k-.js +0 -1
- package/dist/client/assets/agent-view-CxcXZ1ps.js +0 -1
- package/dist/client/assets/api-keys-qGxl2Ulg.js +0 -1
- package/dist/client/assets/chat-context-CWdOGDBM.js +0 -43
- package/dist/client/assets/index-yFD0_BNc.css +0 -1
- package/dist/client/assets/input-DS9Lcdr7.js +0 -1
- package/dist/client/assets/library-73cgD91W.js +0 -1
- package/dist/client/assets/pair-COA93ohg.js +0 -48
- package/dist/client/assets/project-reports-BIv6b5kg.js +0 -1
- package/dist/client/assets/project-tasks-BIO-MOsF.js +0 -1
- package/dist/client/assets/record-editor-Cf1AplRD.js +0 -1
- package/dist/client/assets/reports-CoJ1Nfwl.js +0 -1
- package/dist/client/assets/repositories-CwxbDZ4K.js +0 -1
- package/dist/client/assets/route-Cxo8JseM.js +0 -1
- package/dist/client/assets/settings-tab-CSqS3qrR.js +0 -1
- package/dist/client/assets/site-editor-BT7_G9Vn.js +0 -1
- package/dist/client/assets/tasks-B4i5niLh.js +0 -1
- package/dist/client/assets/use-ask-in-chat-s9WvcD2m.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-DD1up-u3.js +0 -1
- package/dist/client/assets/use-blog-view-qeD-Zbnz.js +0 -1
- package/dist/client/assets/useInfiniteQuery-kEKcQUWO.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BpVcZwyx.js +0 -1
package/dist/client/assets/{use-never-published-BmwZStnO.js → use-never-published-DpnSCkDS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fL as $,q as ke,b as V,r as H,e as Fe,K as Q,fM as ae,ee as ze,fN as Le,fO as ce,fP as fe,fQ as Re,fR as He,fS as Ue,fT as $e,c as U,fU as Be,fV as Ie,j as o,x as Qe,aU as Ve,w as qe,e0 as we,R as Ge,v as Ye,D as We,m as Je,B as je,h as Ze,t as Pe,X as Xe,aY as ue,Y as ie,a9 as _e,Z as Ke,_ as et}from"./index-C0zcxte6.js";import{u as tt}from"./use-voice-input-fsQibllg.js";import{x as it,c as rt,u as be,v as nt,aq as st,ar as Ce,as as ot,at as Y,au as ee,aj as lt,av as at,aw as de,ax as re,ay as me,Z as ct,X as ft,Y as ut,az as dt,aA as he,aB as mt,ac as ht,aC as gt,aD as pt,y as yt,$ as xt,aE as vt,a1 as St}from"./site-editor-toast-CvNOL4ms.js";import{b as kt,h as wt,a as jt,d as ge,e as pe,f as Pt,c as bt,g as Ct}from"./hosted-reconcile-ChvoCrzB.js";import{A as Et,z as Nt}from"./blocks-tab-states-DZtXlWh1.js";import{s as Dt}from"./sandbox-git-api-BQA0ksZA.js";import{u as Tt}from"./chat-context-CWdOGDBM.js";import{b as At}from"./sandbox-url-D3mC8qhT.js";import{d as Mt}from"./utils-P6Og2u3N.js";import{d as Ot}from"./delay-CnY5UFtP.js";import{i as Ft}from"./AlertCircle-CMkbvoeN.js";import{e as zt}from"./agent-icon-DFdDsb4O.js";import{a as Lt}from"./SwitchHorizontal01-j9pFk8iK.js";import{i as Rt}from"./File02-CbFOjoUb.js";import{a as te}from"./Image01-DO626aWy.js";import{i as Ee}from"./Upload01-Ce7d9Uy2.js";import{S as Ht}from"./search-input-3Sn0Ox5l.js";import{T as Ut,a as $t,c as Bt,b as It}from"./tabs-DP2FyQoi.js";import{u as Qt}from"./use-debounced-value-C8Gcgh9P.js";import{a as Vt}from"./use-file-configs-BrcDDIBZ.js";import{a as qt,u as Gt,i as Ne,B as Yt,e as Wt,b as ye,f as Jt}from"./asset-utils-DmKXdm_k.js";import{f as q,M as Zt,c as Xt,g as K}from"./usage-stats-C4Ju4qoC.js";function _t(t,e,i,n={}){return De("",t,e,i,n)}function De(t,e,i,n,r){if(W(i,n)||W(e,n))return i;if(W(e,i))return n;if(ne(i)&&ne(n)){const s=ne(e)?e:{},a={},c=[...Object.keys(i),...Object.keys(n).filter(p=>!(p in i))];for(const p of c){const g=De(`${t}/${Kt(p)}`,s[p],i[p],n[p],r);g!==void 0&&(a[p]=g)}return a}if(Array.isArray(e)&&Array.isArray(i)&&Array.isArray(n)&&i.length===e.length&&n.length===e.length){const s=[];for(const[a,c]of e.entries()){const p=!W(c,i[a]),g=!W(c,n[a]);if(p&&g&&!W(i[a],n[a]))return xe(t,i,n,r);s.push(p?i[a]:n[a])}return s}return xe(t,i,n,r)}function xe(t,e,i,n){return n.conflicts?.push(t),n.prefer==="theirs"?i:e}function Kt(t){return t.replaceAll("~","~0").replaceAll("/","~1")}function W(t,e){return $(t)===$(e)}function ne(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function ei(t){return t?1e3:700}const X=new Map;function _(t,e){return`${t}\0${e}`}function ve(t,e){return X.has(t)?X.get(t)!==e?!0:(X.delete(t),!1):!1}function se(t){return!!t&&typeof t=="object"&&t.keptTheirs===!0}const J=new Map,ti=20,ii=200,ri=1500;function Te(t){const e=J.get(t);J.delete(t);const i=e??[];if(J.set(t,i),J.size>ii){const n=J.keys().next().value;n!==void 0&&J.delete(n)}return i}function ni(t,e){const i=Te(t);i.push($(e)),i.length>ti&&i.shift()}function si(t,e){return Te(t).includes($(e))}async function oi(t,e){if(e){if(e.value===void 0)return{[t]:null};try{return{[t]:await Ie(e.value)}}catch{return}}}function li({orgSlug:t,virtualMcpId:e,branch:i},n){const r=ke(),s=Tt()?.taskId??null,a=it(e),c=tt(e).runtime==="cms",{url:p}=rt(e),g=be(e,i),v=g.kind==="protocol"?g:null,d=nt({orgSlug:t,virtualMcpId:e,branch:i}),S=V(),k=v?.source==="github",[P]=H.useState(()=>n?.holdsCopy?new Ct(()=>gt(r,d)):null);P?.settle();const h=k?P:null,j=async(l,f,u,x)=>{if(p)return{blockKey:l,data:f};if(c){const F=async(L,M)=>{const B=await oi(l,M);return vt({orgSlug:t,virtualMcpId:e,branch:i},{set:{[l]:L},...B?{expect:B}:{}})},R=`${d}:${l}`,m=(L,M=[])=>new Y(L,M.length>0?S("sectionsEditor.sectionsEditor.blockFieldsChangedElsewhere",{fields:Be(M)}):S("sectionsEditor.sectionsEditor.blockChangedElsewhere"),M),w=async L=>{await r.invalidateQueries({queryKey:Q.decofile(d)});const M=r.getQueryData(Q.decofile(d))?.[l];if(u&&si(R,M)&&$(M)!==$(u.value))return await Ot(ri),{draft:await F(f,u),written:f};const B=[],G=x&&u?.fromCache?_t(u.value,f,M,{prefer:"theirs",conflicts:B}):void 0;if(G===void 0||B.length>0)throw m(L.blocks,B);const I=ae(G);return{draft:await F(I,{value:M}),written:I}};let z=f,A;try{A=await F(f,u)}catch(L){if(!(L instanceof Y))throw L;try{({draft:A,written:z}=await w(L))}catch(M){throw!(M instanceof Y)||M.fields.length>0?M:(await r.invalidateQueries({queryKey:Q.decofile(d)}),m(M.blocks))}}return ni(R,z),pt(r,{orgSlug:t,virtualMcpId:e,branch:i},A),await r.invalidateQueries({queryKey:Dt({orgSlug:t,virtualMcpId:e,branch:i,threadId:s})}),{...A,written:z}}const y=yt(a,Mt(l)),N=JSON.stringify(f,null,2),E=await fetch(At({orgSlug:t,virtualMcpId:e,branch:i,threadId:s},"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:y,content:N})});return E.ok?E.json():xt(E,"Write")},b=async(l,f,u,x,y,N)=>{const E=v,F={queryClient:r,backend:E,params:l,cacheKey:d};let R=u,m=y?void 0:N?N.value:x?.value,w=y?{[f]:null}:N?{[f]:await wt(N,Le(r,d,f))}:await jt(F,[f],x?{[f]:x.value}:void 0);for(let z=0;;z++)try{return{...await re(r,E,l,d,{set:{[f]:R}},w),written:R}}catch(A){if(!ee(A))throw A;const L=await me(r,E,l,d,f,A),M=r.getQueryData(Q.decofile(d))?.[f],B=he(r,d,f,E),G=R;if(z+1>=ge||!ce()||B===void 0||!Z(G)||M!==void 0&&!Z(M))throw new Y([f],z+1>=ge?S("siteEditor.save.keptChanging"):S("siteEditor.save.conflict"),[],L);if(w={[f]:B},!Z(M)){if(!Z(m))continue;if(await fe({kind:"theyDeleted",label:pe(f,m,G)})==="theirs")return{keptTheirs:!0,deleted:!0};m=void 0;continue}const I=Re({ancestor:Z(m)?m:{},mine:G,theirs:M}),le=I.pointers.length===0?{}:await He(I,Ue(I,C(l,M),!0),{block:Et(f,M),author:{draft:l,blockKey:f}});if(R=I.pointers.length===0?I.merged:$e(I,le),Pt(le)&&$(R)===$(M))return{keptTheirs:!0,deleted:!1};m=M}},C=(l,f)=>{const u=f.__resolveType,x=r.getQueryData(ht(l,v));if(typeof u!="string"||!x?.manifest)return null;try{return Nt(u,x)}catch{return null}},D=async(l,f,u,x,y)=>{const N=v,E=r.getQueryData(Q.decofile(d));if(E&&Object.hasOwn(E,f)||!ce()||!Z(u))return;if(await fe({kind:"theyDeleted",label:pe(f,y?.value,u)})==="theirs")return{keptTheirs:!0,deleted:!0};const R=he(r,d,f,N);if(R===void 0)return;const m=await re(r,N,l,d,{set:{[f]:u}},{[f]:R});return x.onApplied?.(m.versions),{...m,written:u}},T=Fe({mutationKey:ut(t,e,i),scope:ft(t,e,i),mutationFn:async({blockKey:l,data:f,base:u,rebaseOnConflict:x=!0,guard:y,create:N=!1,edit:E})=>{if(g.kind==="pending"||g.kind==="unavailable")throw lt("CMS storage");if(v?.source!=="github"&&(f=ae(f)),v){const F={orgSlug:t,virtualMcpId:e,branch:i},R=w=>{!h||se(w)||$(w.written)===$(f)&&w.versions[l]&&h.saved(l,f)};if(k&&!y){const w=await b(F,l,f,u,N,N?void 0:h?.guardOf(l,E));return R(w),w}if(k&&y&&!y.reloadOnConflict){const w=await y.ifMatch(l),z=N||!!w&&w[l]===null;try{const A=await b(F,l,f,u,z,z?void 0:h?.guardOf(l,E));return R(A),y.onApplied?.(se(A)?{}:A.versions),A}catch(A){throw y.onRejected?.(A),A}}let m=await y?.ifMatch(l);if(y&&!m&&k&&(await at(r,v,F,d).catch(()=>{throw new de}),m=await y.ifMatch(l),!m))throw new de;try{const w=await re(r,v,F,d,{set:{[l]:f}},m);return m&&y?.onApplied?.(w.versions),w}catch(w){if(m&&y?.onRejected?.(w),m&&y?.reloadOnConflict&&ee(w)){const z=await me(r,v,F,d,l,w);if(k)try{const A=await D(F,l,f,y,u);if(A)return A}catch(A){if(!ee(A))throw A}throw new Y([l],S("sectionsEditor.sectionsEditor.blockChangedElsewhere"),[],z)}throw w}}return ct({queryClient:r,orgSlug:t,virtualMcpId:e,branch:i,backend:g,cacheKey:d},{kind:"edit",write:()=>j(l,f,u,x)})},onMutate:async({blockKey:l,data:f})=>{const u=Q.decofile(d);await r.cancelQueries({queryKey:u});const x=r.getQueryData(u),y=!!x&&l in x,N=x?.[l];return r.setQueryData(u,E=>({...E??{},[l]:f})),X.set(_(d,l),f),{queryKey:u,blockKey:l,hadKey:y,previousValue:N}},onError:(l,{blockKey:f,data:u},x)=>{ot(S,l),!ve(_(d,f),u)&&(!x||l instanceof Y||(ee(l)&&r.invalidateQueries({queryKey:x.queryKey}),r.setQueryData(x.queryKey,y=>{if(!y)return y;if(!x.hadKey){const{[x.blockKey]:N,...E}=y;return E}return{...y,[x.blockKey]:x.previousValue}})))},onSuccess:(l,{blockKey:f,data:u})=>{const x=ve(_(d,f),u),y=()=>{if(!h)return;const E=bt({orgSlug:t,virtualMcpId:e,branch:i});ze.schedule(()=>kt(E,f))};if(se(l)){st(S,l.deleted,l.deleted&&Ce(r,d,f)),y();return}if(x)return;const N=l&&typeof l=="object"&&"written"in l?l.written:u;r.setQueryData(Q.decofile(d),E=>({...E??{},[f]:N})),$(N)!==$(u)&&y()}}),O=l=>{if(l.base)return l;const f=r.getQueryData(Q.decofile(d));return f?{...l,base:{value:f[l.blockKey],fromCache:!0}}:l};return{...T,v8:g.kind!=="legacy",mutate:(l,f)=>T.mutate(O(l),f),mutateAsync:(l,f)=>T.mutateAsync(O(l),f),reportError:l=>dt(S,l,v?.source??null),hold:l=>P?.hold(l),holdsCopy:h!==null,autosaveDelay:ei(v!==null),showEdit:(l,f)=>{r.setQueryData(Q.decofile(d),u=>({...u??{},[l]:f})),X.set(_(d,l),f)},forgetShownEdit:l=>{X.delete(_(d,l))},edited:l=>h?.edited(l),shown:l=>h?.get(l)}}function or(t,e){const i=U.c(35),n=e?.holdsCopy;let r;i[0]!==n?(r={holdsCopy:n},i[0]=n,i[1]=r):r=i[1];const s=li(t,r);let a;i[2]===Symbol.for("react.memo_cache_sentinel")?(a=new Map,i[2]=a):a=i[2];const c=H.useRef(a);let p;i[3]===Symbol.for("react.memo_cache_sentinel")?(p=new Map,i[3]=p):p=i[3];const g=H.useRef(p);let v;i[4]===Symbol.for("react.memo_cache_sentinel")?(v=new Map,i[4]=v):v=i[4];const d=H.useRef(v);let S;i[5]===Symbol.for("react.memo_cache_sentinel")?(S=new Map,i[5]=S):S=i[5];const k=H.useRef(S);let P;i[6]===Symbol.for("react.memo_cache_sentinel")?(P=new Set,i[6]=P):P=i[6];const h=H.useRef(P);let j;i[7]===Symbol.for("react.memo_cache_sentinel")?(j=new Set,i[7]=j):j=i[7];const b=H.useRef(j);let C,D;i[8]!==e||i[9]!==s?(C=m=>{if(h.current.has(m)){b.current.add(m);return}const w=c.current.get(m);if(!w)return;const z=typeof w=="function"?w():w;c.current.delete(m);const A=g.current.get(m);if(g.current.delete(m),!z)return;h.current.add(m);const L=d.current.get(m);L&&d.current.set(m,{base:{value:z,fromCache:!0}});const M=()=>c.current.has(m)||b.current.has(m);s.mutateAsync({blockKey:m,data:z,guard:e?.guard,edit:A,...L?{base:L.base,...L.create?{create:!0}:{}}:{}}).then(()=>{M()||d.current.delete(m),e?.onSaved?.()},B=>{L&&d.current.set(m,L),s.reportError(B)}).finally(()=>{h.current.delete(m),b.current.delete(m)&&C(m)})},D=()=>{for(const m of k.current.values())clearTimeout(m);k.current.clear();for(const m of[...c.current.keys()])C(m)},i[8]=e,i[9]=s,i[10]=C,i[11]=D):(C=i[10],D=i[11]);const T=D;let O;i[12]!==e?.showEdits||i[13]!==s?(O=m=>{for(const w of m){const z=k.current.get(w);z&&clearTimeout(z),k.current.delete(w),c.current.delete(w),g.current.delete(w),b.current.delete(w),d.current.delete(w),e?.showEdits&&s.forgetShownEdit(w)}},i[12]=e?.showEdits,i[13]=s,i[14]=O):O=i[14],mt(t.orgSlug,t.virtualMcpId,O);let l,f;i[15]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{const m=w=>{(c.current.size>0||h.current.size>0)&&w.preventDefault()};return window.addEventListener("beforeunload",m),()=>window.removeEventListener("beforeunload",m)},f=[],i[15]=l,i[16]=f):(l=i[15],f=i[16]),H.useEffect(l,f);let u;i[17]!==T||i[18]!==e?.showEdits||i[19]!==s.holdsCopy?(u=()=>{const m=s.holdsCopy||!!e?.showEdits;return m&&T(),m},i[17]=T,i[18]=e?.showEdits,i[19]=s.holdsCopy,i[20]=u):u=i[20];const x=H.useEffectEvent(u);let y;i[21]!==x?(y=()=>{const m=k.current;return()=>{if(!x())for(const w of m.values())clearTimeout(w)}},i[21]=x,i[22]=y):y=i[22];let N;i[23]===Symbol.for("react.memo_cache_sentinel")?(N=[],i[23]=N):N=i[23],H.useEffect(y,N);let E;i[24]!==e?.showEdits||i[25]!==C||i[26]!==s?(E=(m,w,z)=>{if(!g.current.has(m)){const L=s.edited(m);L&&g.current.set(m,L)}z&&!d.current.has(m)&&d.current.set(m,z),e?.showEdits&&typeof w!="function"&&s.showEdit(m,w),c.current.set(m,w);const A=k.current.get(m);A&&clearTimeout(A),k.current.set(m,setTimeout(()=>{k.current.delete(m),C(m)},s.autosaveDelay))},i[24]=e?.showEdits,i[25]=C,i[26]=s,i[27]=E):E=i[27];const F=E;let R;return i[28]!==T||i[29]!==F||i[30]!==s.hold||i[31]!==s.isError||i[32]!==s.isPending||i[33]!==s.v8?(R={save:F,flush:T,isPending:s.isPending,isError:s.isError,hold:s.hold,v8:s.v8},i[28]=T,i[29]=F,i[30]=s.hold,i[31]=s.isError,i[32]=s.isPending,i[33]=s.v8,i[34]=R):R=i[34],R}function Z(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}const Ae="file-picker:last-config-id";function lr(t){const e=U.c(31),i=V(),n=t.open,r=t.onOpenChange;let s;e[0]!==t.mode||e[1]!==i?(s=t.mode==="image"?i("filePicker.filePickerDialog.pickAnImage"):i("filePicker.filePickerDialog.pickAFile"),e[0]=t.mode,e[1]=i,e[2]=s):s=e[2];let a;e[3]!==s?(a=o.jsx(Qe,{children:s}),e[3]=s,e[4]=a):a=e[4];let c;e[5]!==i?(c=i("filePicker.filePickerDialog.description"),e[5]=i,e[6]=c):c=e[6];let p;e[7]!==c?(p=o.jsx(Ve,{children:c}),e[7]=c,e[8]=p):p=e[8];let g;e[9]!==a||e[10]!==p?(g=o.jsxs(qe,{children:[a,p]}),e[9]=a,e[10]=p,e[11]=g):g=e[11];let v;e[12]!==i?(v=b=>{const{error:C}=b;return o.jsx(ai,{error:C??new Error(i("filePicker.filePickerDialog.failedToLoadBuckets"))})},e[12]=i,e[13]=v):v=e[13];let d;e[14]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(we,{className:"h-64 w-full"}),e[14]=d):d=e[14];let S;e[15]!==t?(S=b=>{t.onSelect(b),t.onOpenChange(!1)},e[15]=t,e[16]=S):S=e[16];let k;e[17]!==t.lockedConfigId||e[18]!==t.mode||e[19]!==S?(k=o.jsx(H.Suspense,{fallback:d,children:o.jsx(ci,{mode:t.mode,lockedConfigId:t.lockedConfigId,onSelect:S})}),e[17]=t.lockedConfigId,e[18]=t.mode,e[19]=S,e[20]=k):k=e[20];let P;e[21]!==k||e[22]!==v?(P=o.jsx(Ge,{fallback:v,children:k}),e[21]=k,e[22]=v,e[23]=P):P=e[23];let h;e[24]!==P||e[25]!==g?(h=o.jsxs(Ye,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[g,P]}),e[24]=P,e[25]=g,e[26]=h):h=e[26];let j;return e[27]!==t.onOpenChange||e[28]!==t.open||e[29]!==h?(j=o.jsx(We,{open:n,onOpenChange:r,children:h}),e[27]=t.onOpenChange,e[28]=t.open,e[29]=h,e[30]=j):j=e[30],j}function ai(t){const e=U.c(3),{error:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(Ft,{size:16}),e[0]=n):n=e[0];let r;return e[1]!==i.message?(r=o.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,o.jsx("span",{className:"text-sm font-medium",children:i.message})]}),e[1]=i.message,e[2]=r):r=e[2],r}function ci(t){const e=U.c(36),{mode:i,lockedConfigId:n,onSelect:r}=t,s=Vt(),a=V();if(s.length===0){let h;return e[0]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(di,{}),e[0]=h):h=e[0],h}if(n){let h;if(e[1]!==s||e[2]!==n){let D;e[4]!==n?(D=T=>T.id===n,e[4]=n,e[5]=D):D=e[5],h=s.find(D),e[1]=s,e[2]=n,e[3]=h}else h=e[3];const j=h;if(j){let D;return e[6]!==j||e[7]!==i||e[8]!==r?(D=o.jsx(oe,{config:j,mode:i,onSelect:r}),e[6]=j,e[7]=i,e[8]=r,e[9]=D):D=e[9],D}let b;e[10]!==a?(b=a("virtualMcp.settings.assetStorage.missing"),e[10]=a,e[11]=b):b=e[11];let C;return e[12]!==b?(C=o.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:b}),e[12]=b,e[13]=C):C=e[13],C}if(s.length===1){const h=s[0];let j;return e[14]!==h||e[15]!==i||e[16]!==r?(j=o.jsx(oe,{config:h,mode:i,onSelect:r}),e[14]=h,e[15]=i,e[16]=r,e[17]=j):j=e[17],j}let c;e[18]===Symbol.for("react.memo_cache_sentinel")?(c=typeof window<"u"?window.localStorage.getItem(Ae):null,e[18]=c):c=e[18];const p=c;let g;e[19]!==s?(g=s.find(h=>h.id===p)?.id??s[0].id,e[19]=s,e[20]=g):g=e[20];const v=g;let d;e[21]!==s?(d=s.map(fi),e[21]=s,e[22]=d):d=e[22];let S;e[23]!==d?(S=o.jsx($t,{className:"self-start",children:d}),e[23]=d,e[24]=S):S=e[24];let k;if(e[25]!==s||e[26]!==i||e[27]!==r){let h;e[29]!==i||e[30]!==r?(h=j=>o.jsx(Bt,{value:j.id,className:"min-h-0 flex-1 overflow-hidden flex flex-col",children:o.jsx(oe,{config:j,mode:i,onSelect:r})},j.id),e[29]=i,e[30]=r,e[31]=h):h=e[31],k=s.map(h),e[25]=s,e[26]=i,e[27]=r,e[28]=k}else k=e[28];let P;return e[32]!==v||e[33]!==S||e[34]!==k?(P=o.jsxs(It,{defaultValue:v,onValueChange:ui,className:"min-h-0 flex-1 flex flex-col",children:[S,k]}),e[32]=v,e[33]=S,e[34]=k,e[35]=P):P=e[35],P}function fi(t){return o.jsx(Ut,{value:t.id,children:t.name},t.id)}function ui(t){typeof window<"u"&&window.localStorage.setItem(Ae,t)}function di(){const t=U.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:o.jsx(Ee,{size:20,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noBucketConfigured"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"font-medium text-sm",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noBucketDescription"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[i,o.jsxs("div",{children:[r,a]})]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function oe({config:t,mode:e,onSelect:i}){const n=V(),[r,s]=H.useState(""),a=Qt(r,300),c=qt({configId:t.id,search:a,imageOnly:e==="image"}),p=Gt(),[g,v]=H.useState(!1),d=H.useRef(null),S=e==="image"?"image/*":void 0;async function k(u){if(!u)return;const x=Array.from(u);if(x.length===0)return;let y=null;const N=[];for(const E of x)try{const F=await p.mutateAsync({configId:t.id,file:E});y??=F.publicUrl}catch(F){N.push(`${E.name} (${F instanceof Error?F.message:"upload failed"})`)}c.data?.pages.some(E=>E.listingError)||c.refetch(),N.length>0&&Pe.error(N.length===x.length?n("filePicker.filePickerDialog.uploadFailedAll",{errors:N.join("; ")}):n("filePicker.filePickerDialog.uploadFailedSome",{errors:N.join("; ")})),y&&i(y)}function P(u){u.preventDefault(),v(!0)}function h(){v(!1)}function j(u){u.preventDefault(),u.stopPropagation(),v(!1),k(u.dataTransfer.files)}const b=c.data?.pages??[],C=b.some(u=>u.listingError==="access_denied"),D=b.flatMap(u=>u.items),T=D.filter(u=>e==="image"?Ne(u.key):!0),O=a.trim(),l=D.length>0||r.trim().length>0,f=r!==a||c.isFetching&&!c.isFetchingNextPage;return o.jsxs("div",{className:"flex flex-col gap-3 min-h-0 flex-1",children:[o.jsxs("button",{type:"button",onClick:()=>d.current?.click(),onDragOver:P,onDragLeave:h,onDrop:j,className:Je("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",g&&"border-primary bg-primary/5",p.isPending&&"opacity-60 pointer-events-none"),children:[o.jsx(Ee,{size:18,className:"text-muted-foreground"}),o.jsx("p",{className:"text-sm font-medium",children:p.isPending?n("filePicker.filePickerDialog.uploading"):n("filePicker.filePickerDialog.dropFilesOrClick")}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[n("filePicker.filePickerDialog.uploadSizeLimit")," ",n(e==="image"?"filePicker.filePickerDialog.imagesOnlyTypes":"filePicker.filePickerDialog.commonMediaTypes")]}),o.jsx("input",{ref:d,type:"file",accept:S,multiple:!0,className:"hidden",onChange:u=>{const x=Array.from(u.target.files??[]);u.target.value="",k(x)}})]}),l?o.jsx(Ht,{value:r,onChange:s,isSearching:f,placeholder:n(e==="image"?"filePicker.filePickerDialog.searchImagesPlaceholder":"filePicker.filePickerDialog.searchFilesPlaceholder"),className:"shrink-0"}):null,o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[C||c.isError?o.jsx(Yt,{denied:C,retrying:c.isFetching,onRetry:()=>{c.refetch()}}):c.isPending?o.jsx(we,{className:"h-32 w-full"}):T.length===0?O?o.jsx(gi,{query:O}):e==="image"&&D.length>0?o.jsx(hi,{}):o.jsx(mi,{}):e==="image"?o.jsx(pi,{items:T,onSelect:i}):o.jsx(yi,{items:T,onSelect:i}),c.hasNextPage&&o.jsx("div",{className:"flex justify-center py-4",children:o.jsx(je,{type:"button",variant:"outline",size:"sm",disabled:c.isFetchingNextPage,onClick:()=>c.fetchNextPage(),children:c.isFetchingNextPage?o.jsxs(o.Fragment,{children:[o.jsx(Ze,{className:"size-3.5"}),n("filePicker.filePickerDialog.loading")]}):n("filePicker.filePickerDialog.loadMore")})})]})]})}function mi(){const t=U.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noFilesYet"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"text-sm font-medium",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.dropFileToGetStarted"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,r,a]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function hi(){const t=U.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noImagesYet"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"text-sm font-medium",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noImagesFormatDesc"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,r,a]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function gi(t){const e=U.c(13),{query:i}=t,n=V();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),e[0]=r):r=e[0];let s;e[1]!==i||e[2]!==n?(s=n("filePicker.filePickerDialog.noMatches",{query:i}),e[1]=i,e[2]=n,e[3]=s):s=e[3];let a;e[4]!==s?(a=o.jsx("p",{className:"text-sm font-medium",children:s}),e[4]=s,e[5]=a):a=e[5];let c;e[6]!==n?(c=n("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore"),e[6]=n,e[7]=c):c=e[7];let p;e[8]!==c?(p=o.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[8]=c,e[9]=p):p=e[9];let g;return e[10]!==a||e[11]!==p?(g=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[r,a,p]}),e[10]=a,e[11]=p,e[12]=g):g=e[12],g}function pi(t){const e=U.c(7),{items:i,onSelect:n}=t;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==n?(a=c=>o.jsx(Me,{item:c,variant:"image",onSelect:n},c.key),e[3]=n,e[4]=a):a=e[4],r=i.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let s;return e[5]!==r?(s=o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:r}),e[5]=r,e[6]=s):s=e[6],s}function yi(t){const e=U.c(7),{items:i,onSelect:n}=t;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==n?(a=c=>o.jsx("li",{children:o.jsx(Me,{item:c,variant:"row",onSelect:n})},c.key),e[3]=n,e[4]=a):a=e[4],r=i.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let s;return e[5]!==r?(s=o.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:r}),e[5]=r,e[6]=s):s=e[6],s}function Me(t){const e=U.c(58),{item:i,variant:n,onSelect:r}=t;let s;e[0]!==i.key?(s=Wt(i.key),e[0]=i.key,e[1]=s):s=e[1];const a=s;if(n==="image"){let D;e[2]!==i.publicUrl||e[3]!==r?(D=()=>r(i.publicUrl),e[2]=i.publicUrl,e[3]=r,e[4]=D):D=e[4];let T;e[5]!==i.key||e[6]!==i.publicUrl?(T=o.jsx("img",{src:i.publicUrl,alt:i.key,loading:"lazy",className:"h-full w-full object-cover",onError:xi}),e[5]=i.key,e[6]=i.publicUrl,e[7]=T):T=e[7];let O;e[8]!==i.key||e[9]!==D||e[10]!==T?(O=o.jsx("button",{type:"button",onClick:D,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:i.key,children:T}),e[8]=i.key,e[9]=D,e[10]=T,e[11]=O):O=e[11];let l;e[12]!==a?(l=o.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-2xs font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:a}),e[12]=a,e[13]=l):l=e[13];let f;e[14]!==i||e[15]!==r?(f=o.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx(Se,{item:i,onSelect:r})}),e[14]=i,e[15]=r,e[16]=f):f=e[16];let u;e[17]!==i.key?(u=ye(i.key),e[17]=i.key,e[18]=u):u=e[18];let x;e[19]!==u?(x=o.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx("p",{className:"truncate text-xs text-white",children:u})}),e[19]=u,e[20]=x):x=e[20];let y;return e[21]!==O||e[22]!==l||e[23]!==f||e[24]!==x?(y=o.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[O,l,f,x]}),e[21]=O,e[22]=l,e[23]=f,e[24]=x,e[25]=y):y=e[25],y}let c;e[26]!==i.publicUrl||e[27]!==r?(c=()=>r(i.publicUrl),e[26]=i.publicUrl,e[27]=r,e[28]=c):c=e[28];let p;e[29]!==i.key?(p=o.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:Ne(i.key)?o.jsx(te,{size:16,className:"text-muted-foreground"}):o.jsx(Rt,{size:16,className:"text-muted-foreground"})}),e[29]=i.key,e[30]=p):p=e[30];let g;e[31]!==i.key?(g=ye(i.key),e[31]=i.key,e[32]=g):g=e[32];let v;e[33]!==g?(v=o.jsx("p",{className:"truncate text-sm font-medium",children:g}),e[33]=g,e[34]=v):v=e[34];let d;e[35]!==i.key?(d=o.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:i.key}),e[35]=i.key,e[36]=d):d=e[36];let S;e[37]!==v||e[38]!==d?(S=o.jsxs("div",{className:"min-w-0 flex-1",children:[v,d]}),e[37]=v,e[38]=d,e[39]=S):S=e[39];let k;e[40]!==a?(k=o.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:a}),e[40]=a,e[41]=k):k=e[41];let P;e[42]!==i.size?(P=Jt(i.size),e[42]=i.size,e[43]=P):P=e[43];let h;e[44]!==P?(h=o.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:P}),e[44]=P,e[45]=h):h=e[45];let j;e[46]!==h||e[47]!==c||e[48]!==p||e[49]!==S||e[50]!==k?(j=o.jsxs("button",{type:"button",onClick:c,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[p,S,k,h]}),e[46]=h,e[47]=c,e[48]=p,e[49]=S,e[50]=k,e[51]=j):j=e[51];let b;e[52]!==i||e[53]!==r?(b=o.jsx(Se,{item:i,onSelect:r}),e[52]=i,e[53]=r,e[54]=b):b=e[54];let C;return e[55]!==j||e[56]!==b?(C=o.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-accent",children:[j,b]}),e[55]=j,e[56]=b,e[57]=C):C=e[57],C}function xi(t){t.target.style.display="none"}function Se(t){const e=U.c(39),{item:i,onSelect:n}=t,r=V(),[s,a]=H.useState(!1);let c;e[0]!==i.publicUrl||e[1]!==r?(c=async function(y){y.preventDefault(),y.stopPropagation();try{await navigator.clipboard.writeText(i.publicUrl),a(!0),window.setTimeout(()=>a(!1),1500)}catch{Pe.error(r("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=i.publicUrl,e[1]=r,e[2]=c):c=e[2];const p=c;let g;e[3]!==r?(g=r("filePicker.filePickerDialog.assetActions"),e[3]=r,e[4]=g):g=e[4];let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(Lt,{size:14}),e[5]=v):v=e[5];let d;e[6]!==g?(d=o.jsx(Xe,{asChild:!0,children:o.jsx(je,{type:"button",variant:"ghost",size:"icon-sm",className:"bg-background/80 backdrop-blur-sm",onClick:ki,"aria-label":g,children:v})}),e[6]=g,e[7]=d):d=e[7];let S;e[8]!==i.publicUrl||e[9]!==n?(S=()=>n(i.publicUrl),e[8]=i.publicUrl,e[9]=n,e[10]=S):S=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(ue,{size:14}),e[11]=k):k=e[11];let P;e[12]!==r?(P=r("filePicker.filePickerDialog.useThis"),e[12]=r,e[13]=P):P=e[13];let h;e[14]!==S||e[15]!==P?(h=o.jsxs(ie,{onClick:S,children:[k,P]}),e[14]=S,e[15]=P,e[16]=h):h=e[16];let j;e[17]!==s?(j=s?o.jsx(ue,{size:14}):o.jsx(zt,{size:14}),e[17]=s,e[18]=j):j=e[18];let b;e[19]!==s||e[20]!==r?(b=r(s?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[19]=s,e[20]=r,e[21]=b):b=e[21];let C;e[22]!==p||e[23]!==b||e[24]!==j?(C=o.jsxs(ie,{onClick:p,children:[j,b]}),e[22]=p,e[23]=b,e[24]=j,e[25]=C):C=e[25];const D=i.publicUrl;let T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(_e,{size:14}),e[26]=T):T=e[26];let O;e[27]!==r?(O=r("filePicker.filePickerDialog.openInNewTab"),e[27]=r,e[28]=O):O=e[28];let l;e[29]!==i.publicUrl||e[30]!==O?(l=o.jsx(ie,{asChild:!0,children:o.jsxs("a",{href:D,target:"_blank",rel:"noreferrer",onClick:vi,children:[T,O]})}),e[29]=i.publicUrl,e[30]=O,e[31]=l):l=e[31];let f;e[32]!==C||e[33]!==l||e[34]!==h?(f=o.jsxs(Ke,{align:"end",onClick:Si,children:[h,C,l]}),e[32]=C,e[33]=l,e[34]=h,e[35]=f):f=e[35];let u;return e[36]!==f||e[37]!==d?(u=o.jsxs(et,{children:[d,f]}),e[36]=f,e[37]=d,e[38]=u):u=e[38],u}function vi(t){return t.stopPropagation()}function Si(t){return t.stopPropagation()}function ki(t){return t.stopPropagation()}function ar(t,e,i){return e||(t.length===1?t[0].id:t.length===0?null:t.some(n=>n.id===i)?i:null)}const wi=new Set(["http:","https:"]),ji=/[\u0000-\u001F\u007F]/g;function Pi(t){return t.replace(ji,"").trim()}const bi=/^[a-zA-Z][a-zA-Z0-9+.-]*:/;function cr(t){return Ci(t)!==""}function Ci(t){const e=Pi(t);if(!e)return"";if(!bi.test(e))try{return encodeURI(e)}catch{return""}try{const i=new URL(e);return wi.has(i.protocol)||i.protocol==="data:"&&/^data:image\//i.test(i.href)?i.href:""}catch{return""}}const Ei=q.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(i=>e.updateAttributes(i,{textAlign:t})).some(i=>i):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:i})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?i.unsetTextAlign():i.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var fr=Ei;const Ni=20,Oe=(t,e=0)=>{const i=[];return!t.children.length||e>Ni||Array.from(t.children).forEach(n=>{n.tagName==="SPAN"?i.push(n):n.children.length&&i.push(...Oe(n,e+1))}),i},Di=t=>{if(!t.children.length)return;const e=Oe(t);e&&e.forEach(i=>{var n;const r=i.getAttribute("style"),s=(n=i.parentElement)===null||n===void 0||(n=n.closest("span"))===null||n===void 0?void 0:n.getAttribute("style");i.setAttribute("style",`${s};${r}`)})},Ti=Zt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Di(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Xt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(i,n)=>{if(!i.isInline)return!0;i.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(s=>!!s))||t.removeMark(n,n+i.nodeSize,this.type)}),!0}}}}),Ai=q.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const i=(e=K(t,"background-color"))!==null&&e!==void 0?e:t.style.backgroundColor;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),Mi=q.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const i=(e=K(t,"color"))!==null&&e!==void 0?e:t.style.color;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),Oi=q.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{var e;return(e=K(t,"font-family"))!==null&&e!==void 0?e:t.style.fontFamily},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Fi=q.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{var e;return(e=K(t,"font-size"))!==null&&e!==void 0?e:t.style.fontSize},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),zi=q.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>{var e;return(e=K(t,"line-height"))!==null&&e!==void 0?e:t.style.lineHeight},renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});q.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(Ai.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(Mi.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(Oi.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(Fi.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(zi.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(Ti.configure(this.options.textStyle)),t}});function ur(t){const e=U.c(6),i=ke(),n=be(t.virtualMcpId,t.branch);if(n.kind!=="protocol"||n.source!=="github")return Li;let r;e[0]!==n||e[1]!==t?(r=St(t,n),e[0]=n,e[1]=t,e[2]=r):r=e[2];const s=r;let a;return e[3]!==s||e[4]!==i?(a=c=>Ce(i,s,c),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function Li(){return!1}export{Mi as C,lr as F,Ae as L,Ti as T,ur as a,or as b,Fi as c,fr as d,ei as e,cr as i,se as k,ar as r,Ci as s,li as u};
|
|
1
|
+
import{fL as $,q as ke,b as V,r as H,e as Fe,K as Q,fM as ae,ee as ze,fN as Le,fO as ce,fP as fe,fQ as Re,fR as He,fS as Ue,fT as $e,c as U,fU as Be,fV as Ie,j as o,x as Qe,aU as Ve,w as qe,e0 as we,R as Ge,v as Ye,D as We,m as Je,B as je,h as Ze,t as Pe,X as Xe,aY as ue,Y as ie,a9 as _e,Z as Ke,_ as et}from"./index-C6-0Ff1m.js";import{u as tt}from"./use-voice-input-ChVzBkTC.js";import{x as it,c as rt,u as be,v as nt,aq as st,ar as Ce,as as ot,at as Y,au as ee,aj as lt,av as at,aw as de,ax as re,ay as me,Z as ct,X as ft,Y as ut,az as dt,aA as he,aB as mt,ac as ht,aC as gt,aD as pt,y as yt,$ as xt,aE as vt,a1 as St}from"./site-editor-toast-C2OaHizl.js";import{b as kt,h as wt,a as jt,d as ge,e as pe,f as Pt,c as bt,g as Ct}from"./hosted-reconcile-CgC-Mb3M.js";import{A as Et,z as Nt}from"./blocks-tab-states-CmsgKSWv.js";import{s as Dt}from"./sandbox-git-api-B3EnJ01P.js";import{u as Tt}from"./chat-context-BXxmldjV.js";import{b as At}from"./sandbox-url-D3mC8qhT.js";import{d as Mt}from"./utils-CalvUBc1.js";import{d as Ot}from"./delay-CnY5UFtP.js";import{i as Ft}from"./AlertCircle-CYAsQRdT.js";import{e as zt}from"./agent-icon-SasBmPrY.js";import{a as Lt}from"./SwitchHorizontal01-BSGnkDXI.js";import{i as Rt}from"./File02-o8s5093L.js";import{a as te}from"./Image01-DZmu7hyy.js";import{i as Ee}from"./Upload01-BXiTGuBV.js";import{S as Ht}from"./search-input-DE_voviB.js";import{T as Ut,a as $t,c as Bt,b as It}from"./tabs-CT50lxBB.js";import{u as Qt}from"./use-debounced-value-Dw3dFt4C.js";import{a as Vt}from"./use-file-configs-I6vvS9gB.js";import{a as qt,u as Gt,i as Ne,B as Yt,e as Wt,b as ye,f as Jt}from"./asset-utils-CJa90ZGO.js";import{f as q,M as Zt,c as Xt,g as K}from"./usage-stats-DX8XXFQ9.js";function _t(t,e,i,n={}){return De("",t,e,i,n)}function De(t,e,i,n,r){if(W(i,n)||W(e,n))return i;if(W(e,i))return n;if(ne(i)&&ne(n)){const s=ne(e)?e:{},a={},c=[...Object.keys(i),...Object.keys(n).filter(p=>!(p in i))];for(const p of c){const g=De(`${t}/${Kt(p)}`,s[p],i[p],n[p],r);g!==void 0&&(a[p]=g)}return a}if(Array.isArray(e)&&Array.isArray(i)&&Array.isArray(n)&&i.length===e.length&&n.length===e.length){const s=[];for(const[a,c]of e.entries()){const p=!W(c,i[a]),g=!W(c,n[a]);if(p&&g&&!W(i[a],n[a]))return xe(t,i,n,r);s.push(p?i[a]:n[a])}return s}return xe(t,i,n,r)}function xe(t,e,i,n){return n.conflicts?.push(t),n.prefer==="theirs"?i:e}function Kt(t){return t.replaceAll("~","~0").replaceAll("/","~1")}function W(t,e){return $(t)===$(e)}function ne(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function ei(t){return t?1e3:700}const X=new Map;function _(t,e){return`${t}\0${e}`}function ve(t,e){return X.has(t)?X.get(t)!==e?!0:(X.delete(t),!1):!1}function se(t){return!!t&&typeof t=="object"&&t.keptTheirs===!0}const J=new Map,ti=20,ii=200,ri=1500;function Te(t){const e=J.get(t);J.delete(t);const i=e??[];if(J.set(t,i),J.size>ii){const n=J.keys().next().value;n!==void 0&&J.delete(n)}return i}function ni(t,e){const i=Te(t);i.push($(e)),i.length>ti&&i.shift()}function si(t,e){return Te(t).includes($(e))}async function oi(t,e){if(e){if(e.value===void 0)return{[t]:null};try{return{[t]:await Ie(e.value)}}catch{return}}}function li({orgSlug:t,virtualMcpId:e,branch:i},n){const r=ke(),s=Tt()?.taskId??null,a=it(e),c=tt(e).runtime==="cms",{url:p}=rt(e),g=be(e,i),v=g.kind==="protocol"?g:null,d=nt({orgSlug:t,virtualMcpId:e,branch:i}),S=V(),k=v?.source==="github",[P]=H.useState(()=>n?.holdsCopy?new Ct(()=>gt(r,d)):null);P?.settle();const h=k?P:null,j=async(l,f,u,x)=>{if(p)return{blockKey:l,data:f};if(c){const F=async(L,M)=>{const B=await oi(l,M);return vt({orgSlug:t,virtualMcpId:e,branch:i},{set:{[l]:L},...B?{expect:B}:{}})},R=`${d}:${l}`,m=(L,M=[])=>new Y(L,M.length>0?S("sectionsEditor.sectionsEditor.blockFieldsChangedElsewhere",{fields:Be(M)}):S("sectionsEditor.sectionsEditor.blockChangedElsewhere"),M),w=async L=>{await r.invalidateQueries({queryKey:Q.decofile(d)});const M=r.getQueryData(Q.decofile(d))?.[l];if(u&&si(R,M)&&$(M)!==$(u.value))return await Ot(ri),{draft:await F(f,u),written:f};const B=[],G=x&&u?.fromCache?_t(u.value,f,M,{prefer:"theirs",conflicts:B}):void 0;if(G===void 0||B.length>0)throw m(L.blocks,B);const I=ae(G);return{draft:await F(I,{value:M}),written:I}};let z=f,A;try{A=await F(f,u)}catch(L){if(!(L instanceof Y))throw L;try{({draft:A,written:z}=await w(L))}catch(M){throw!(M instanceof Y)||M.fields.length>0?M:(await r.invalidateQueries({queryKey:Q.decofile(d)}),m(M.blocks))}}return ni(R,z),pt(r,{orgSlug:t,virtualMcpId:e,branch:i},A),await r.invalidateQueries({queryKey:Dt({orgSlug:t,virtualMcpId:e,branch:i,threadId:s})}),{...A,written:z}}const y=yt(a,Mt(l)),N=JSON.stringify(f,null,2),E=await fetch(At({orgSlug:t,virtualMcpId:e,branch:i,threadId:s},"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:y,content:N})});return E.ok?E.json():xt(E,"Write")},b=async(l,f,u,x,y,N)=>{const E=v,F={queryClient:r,backend:E,params:l,cacheKey:d};let R=u,m=y?void 0:N?N.value:x?.value,w=y?{[f]:null}:N?{[f]:await wt(N,Le(r,d,f))}:await jt(F,[f],x?{[f]:x.value}:void 0);for(let z=0;;z++)try{return{...await re(r,E,l,d,{set:{[f]:R}},w),written:R}}catch(A){if(!ee(A))throw A;const L=await me(r,E,l,d,f,A),M=r.getQueryData(Q.decofile(d))?.[f],B=he(r,d,f,E),G=R;if(z+1>=ge||!ce()||B===void 0||!Z(G)||M!==void 0&&!Z(M))throw new Y([f],z+1>=ge?S("siteEditor.save.keptChanging"):S("siteEditor.save.conflict"),[],L);if(w={[f]:B},!Z(M)){if(!Z(m))continue;if(await fe({kind:"theyDeleted",label:pe(f,m,G)})==="theirs")return{keptTheirs:!0,deleted:!0};m=void 0;continue}const I=Re({ancestor:Z(m)?m:{},mine:G,theirs:M}),le=I.pointers.length===0?{}:await He(I,Ue(I,C(l,M),!0),{block:Et(f,M),author:{draft:l,blockKey:f}});if(R=I.pointers.length===0?I.merged:$e(I,le),Pt(le)&&$(R)===$(M))return{keptTheirs:!0,deleted:!1};m=M}},C=(l,f)=>{const u=f.__resolveType,x=r.getQueryData(ht(l,v));if(typeof u!="string"||!x?.manifest)return null;try{return Nt(u,x)}catch{return null}},D=async(l,f,u,x,y)=>{const N=v,E=r.getQueryData(Q.decofile(d));if(E&&Object.hasOwn(E,f)||!ce()||!Z(u))return;if(await fe({kind:"theyDeleted",label:pe(f,y?.value,u)})==="theirs")return{keptTheirs:!0,deleted:!0};const R=he(r,d,f,N);if(R===void 0)return;const m=await re(r,N,l,d,{set:{[f]:u}},{[f]:R});return x.onApplied?.(m.versions),{...m,written:u}},T=Fe({mutationKey:ut(t,e,i),scope:ft(t,e,i),mutationFn:async({blockKey:l,data:f,base:u,rebaseOnConflict:x=!0,guard:y,create:N=!1,edit:E})=>{if(g.kind==="pending"||g.kind==="unavailable")throw lt("CMS storage");if(v?.source!=="github"&&(f=ae(f)),v){const F={orgSlug:t,virtualMcpId:e,branch:i},R=w=>{!h||se(w)||$(w.written)===$(f)&&w.versions[l]&&h.saved(l,f)};if(k&&!y){const w=await b(F,l,f,u,N,N?void 0:h?.guardOf(l,E));return R(w),w}if(k&&y&&!y.reloadOnConflict){const w=await y.ifMatch(l),z=N||!!w&&w[l]===null;try{const A=await b(F,l,f,u,z,z?void 0:h?.guardOf(l,E));return R(A),y.onApplied?.(se(A)?{}:A.versions),A}catch(A){throw y.onRejected?.(A),A}}let m=await y?.ifMatch(l);if(y&&!m&&k&&(await at(r,v,F,d).catch(()=>{throw new de}),m=await y.ifMatch(l),!m))throw new de;try{const w=await re(r,v,F,d,{set:{[l]:f}},m);return m&&y?.onApplied?.(w.versions),w}catch(w){if(m&&y?.onRejected?.(w),m&&y?.reloadOnConflict&&ee(w)){const z=await me(r,v,F,d,l,w);if(k)try{const A=await D(F,l,f,y,u);if(A)return A}catch(A){if(!ee(A))throw A}throw new Y([l],S("sectionsEditor.sectionsEditor.blockChangedElsewhere"),[],z)}throw w}}return ct({queryClient:r,orgSlug:t,virtualMcpId:e,branch:i,backend:g,cacheKey:d},{kind:"edit",write:()=>j(l,f,u,x)})},onMutate:async({blockKey:l,data:f})=>{const u=Q.decofile(d);await r.cancelQueries({queryKey:u});const x=r.getQueryData(u),y=!!x&&l in x,N=x?.[l];return r.setQueryData(u,E=>({...E??{},[l]:f})),X.set(_(d,l),f),{queryKey:u,blockKey:l,hadKey:y,previousValue:N}},onError:(l,{blockKey:f,data:u},x)=>{ot(S,l),!ve(_(d,f),u)&&(!x||l instanceof Y||(ee(l)&&r.invalidateQueries({queryKey:x.queryKey}),r.setQueryData(x.queryKey,y=>{if(!y)return y;if(!x.hadKey){const{[x.blockKey]:N,...E}=y;return E}return{...y,[x.blockKey]:x.previousValue}})))},onSuccess:(l,{blockKey:f,data:u})=>{const x=ve(_(d,f),u),y=()=>{if(!h)return;const E=bt({orgSlug:t,virtualMcpId:e,branch:i});ze.schedule(()=>kt(E,f))};if(se(l)){st(S,l.deleted,l.deleted&&Ce(r,d,f)),y();return}if(x)return;const N=l&&typeof l=="object"&&"written"in l?l.written:u;r.setQueryData(Q.decofile(d),E=>({...E??{},[f]:N})),$(N)!==$(u)&&y()}}),O=l=>{if(l.base)return l;const f=r.getQueryData(Q.decofile(d));return f?{...l,base:{value:f[l.blockKey],fromCache:!0}}:l};return{...T,v8:g.kind!=="legacy",mutate:(l,f)=>T.mutate(O(l),f),mutateAsync:(l,f)=>T.mutateAsync(O(l),f),reportError:l=>dt(S,l,v?.source??null),hold:l=>P?.hold(l),holdsCopy:h!==null,autosaveDelay:ei(v!==null),showEdit:(l,f)=>{r.setQueryData(Q.decofile(d),u=>({...u??{},[l]:f})),X.set(_(d,l),f)},forgetShownEdit:l=>{X.delete(_(d,l))},edited:l=>h?.edited(l),shown:l=>h?.get(l)}}function or(t,e){const i=U.c(35),n=e?.holdsCopy;let r;i[0]!==n?(r={holdsCopy:n},i[0]=n,i[1]=r):r=i[1];const s=li(t,r);let a;i[2]===Symbol.for("react.memo_cache_sentinel")?(a=new Map,i[2]=a):a=i[2];const c=H.useRef(a);let p;i[3]===Symbol.for("react.memo_cache_sentinel")?(p=new Map,i[3]=p):p=i[3];const g=H.useRef(p);let v;i[4]===Symbol.for("react.memo_cache_sentinel")?(v=new Map,i[4]=v):v=i[4];const d=H.useRef(v);let S;i[5]===Symbol.for("react.memo_cache_sentinel")?(S=new Map,i[5]=S):S=i[5];const k=H.useRef(S);let P;i[6]===Symbol.for("react.memo_cache_sentinel")?(P=new Set,i[6]=P):P=i[6];const h=H.useRef(P);let j;i[7]===Symbol.for("react.memo_cache_sentinel")?(j=new Set,i[7]=j):j=i[7];const b=H.useRef(j);let C,D;i[8]!==e||i[9]!==s?(C=m=>{if(h.current.has(m)){b.current.add(m);return}const w=c.current.get(m);if(!w)return;const z=typeof w=="function"?w():w;c.current.delete(m);const A=g.current.get(m);if(g.current.delete(m),!z)return;h.current.add(m);const L=d.current.get(m);L&&d.current.set(m,{base:{value:z,fromCache:!0}});const M=()=>c.current.has(m)||b.current.has(m);s.mutateAsync({blockKey:m,data:z,guard:e?.guard,edit:A,...L?{base:L.base,...L.create?{create:!0}:{}}:{}}).then(()=>{M()||d.current.delete(m),e?.onSaved?.()},B=>{L&&d.current.set(m,L),s.reportError(B)}).finally(()=>{h.current.delete(m),b.current.delete(m)&&C(m)})},D=()=>{for(const m of k.current.values())clearTimeout(m);k.current.clear();for(const m of[...c.current.keys()])C(m)},i[8]=e,i[9]=s,i[10]=C,i[11]=D):(C=i[10],D=i[11]);const T=D;let O;i[12]!==e?.showEdits||i[13]!==s?(O=m=>{for(const w of m){const z=k.current.get(w);z&&clearTimeout(z),k.current.delete(w),c.current.delete(w),g.current.delete(w),b.current.delete(w),d.current.delete(w),e?.showEdits&&s.forgetShownEdit(w)}},i[12]=e?.showEdits,i[13]=s,i[14]=O):O=i[14],mt(t.orgSlug,t.virtualMcpId,O);let l,f;i[15]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{const m=w=>{(c.current.size>0||h.current.size>0)&&w.preventDefault()};return window.addEventListener("beforeunload",m),()=>window.removeEventListener("beforeunload",m)},f=[],i[15]=l,i[16]=f):(l=i[15],f=i[16]),H.useEffect(l,f);let u;i[17]!==T||i[18]!==e?.showEdits||i[19]!==s.holdsCopy?(u=()=>{const m=s.holdsCopy||!!e?.showEdits;return m&&T(),m},i[17]=T,i[18]=e?.showEdits,i[19]=s.holdsCopy,i[20]=u):u=i[20];const x=H.useEffectEvent(u);let y;i[21]!==x?(y=()=>{const m=k.current;return()=>{if(!x())for(const w of m.values())clearTimeout(w)}},i[21]=x,i[22]=y):y=i[22];let N;i[23]===Symbol.for("react.memo_cache_sentinel")?(N=[],i[23]=N):N=i[23],H.useEffect(y,N);let E;i[24]!==e?.showEdits||i[25]!==C||i[26]!==s?(E=(m,w,z)=>{if(!g.current.has(m)){const L=s.edited(m);L&&g.current.set(m,L)}z&&!d.current.has(m)&&d.current.set(m,z),e?.showEdits&&typeof w!="function"&&s.showEdit(m,w),c.current.set(m,w);const A=k.current.get(m);A&&clearTimeout(A),k.current.set(m,setTimeout(()=>{k.current.delete(m),C(m)},s.autosaveDelay))},i[24]=e?.showEdits,i[25]=C,i[26]=s,i[27]=E):E=i[27];const F=E;let R;return i[28]!==T||i[29]!==F||i[30]!==s.hold||i[31]!==s.isError||i[32]!==s.isPending||i[33]!==s.v8?(R={save:F,flush:T,isPending:s.isPending,isError:s.isError,hold:s.hold,v8:s.v8},i[28]=T,i[29]=F,i[30]=s.hold,i[31]=s.isError,i[32]=s.isPending,i[33]=s.v8,i[34]=R):R=i[34],R}function Z(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}const Ae="file-picker:last-config-id";function lr(t){const e=U.c(31),i=V(),n=t.open,r=t.onOpenChange;let s;e[0]!==t.mode||e[1]!==i?(s=t.mode==="image"?i("filePicker.filePickerDialog.pickAnImage"):i("filePicker.filePickerDialog.pickAFile"),e[0]=t.mode,e[1]=i,e[2]=s):s=e[2];let a;e[3]!==s?(a=o.jsx(Qe,{children:s}),e[3]=s,e[4]=a):a=e[4];let c;e[5]!==i?(c=i("filePicker.filePickerDialog.description"),e[5]=i,e[6]=c):c=e[6];let p;e[7]!==c?(p=o.jsx(Ve,{children:c}),e[7]=c,e[8]=p):p=e[8];let g;e[9]!==a||e[10]!==p?(g=o.jsxs(qe,{children:[a,p]}),e[9]=a,e[10]=p,e[11]=g):g=e[11];let v;e[12]!==i?(v=b=>{const{error:C}=b;return o.jsx(ai,{error:C??new Error(i("filePicker.filePickerDialog.failedToLoadBuckets"))})},e[12]=i,e[13]=v):v=e[13];let d;e[14]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(we,{className:"h-64 w-full"}),e[14]=d):d=e[14];let S;e[15]!==t?(S=b=>{t.onSelect(b),t.onOpenChange(!1)},e[15]=t,e[16]=S):S=e[16];let k;e[17]!==t.lockedConfigId||e[18]!==t.mode||e[19]!==S?(k=o.jsx(H.Suspense,{fallback:d,children:o.jsx(ci,{mode:t.mode,lockedConfigId:t.lockedConfigId,onSelect:S})}),e[17]=t.lockedConfigId,e[18]=t.mode,e[19]=S,e[20]=k):k=e[20];let P;e[21]!==k||e[22]!==v?(P=o.jsx(Ge,{fallback:v,children:k}),e[21]=k,e[22]=v,e[23]=P):P=e[23];let h;e[24]!==P||e[25]!==g?(h=o.jsxs(Ye,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[g,P]}),e[24]=P,e[25]=g,e[26]=h):h=e[26];let j;return e[27]!==t.onOpenChange||e[28]!==t.open||e[29]!==h?(j=o.jsx(We,{open:n,onOpenChange:r,children:h}),e[27]=t.onOpenChange,e[28]=t.open,e[29]=h,e[30]=j):j=e[30],j}function ai(t){const e=U.c(3),{error:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(Ft,{size:16}),e[0]=n):n=e[0];let r;return e[1]!==i.message?(r=o.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,o.jsx("span",{className:"text-sm font-medium",children:i.message})]}),e[1]=i.message,e[2]=r):r=e[2],r}function ci(t){const e=U.c(36),{mode:i,lockedConfigId:n,onSelect:r}=t,s=Vt(),a=V();if(s.length===0){let h;return e[0]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(di,{}),e[0]=h):h=e[0],h}if(n){let h;if(e[1]!==s||e[2]!==n){let D;e[4]!==n?(D=T=>T.id===n,e[4]=n,e[5]=D):D=e[5],h=s.find(D),e[1]=s,e[2]=n,e[3]=h}else h=e[3];const j=h;if(j){let D;return e[6]!==j||e[7]!==i||e[8]!==r?(D=o.jsx(oe,{config:j,mode:i,onSelect:r}),e[6]=j,e[7]=i,e[8]=r,e[9]=D):D=e[9],D}let b;e[10]!==a?(b=a("virtualMcp.settings.assetStorage.missing"),e[10]=a,e[11]=b):b=e[11];let C;return e[12]!==b?(C=o.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:b}),e[12]=b,e[13]=C):C=e[13],C}if(s.length===1){const h=s[0];let j;return e[14]!==h||e[15]!==i||e[16]!==r?(j=o.jsx(oe,{config:h,mode:i,onSelect:r}),e[14]=h,e[15]=i,e[16]=r,e[17]=j):j=e[17],j}let c;e[18]===Symbol.for("react.memo_cache_sentinel")?(c=typeof window<"u"?window.localStorage.getItem(Ae):null,e[18]=c):c=e[18];const p=c;let g;e[19]!==s?(g=s.find(h=>h.id===p)?.id??s[0].id,e[19]=s,e[20]=g):g=e[20];const v=g;let d;e[21]!==s?(d=s.map(fi),e[21]=s,e[22]=d):d=e[22];let S;e[23]!==d?(S=o.jsx($t,{className:"self-start",children:d}),e[23]=d,e[24]=S):S=e[24];let k;if(e[25]!==s||e[26]!==i||e[27]!==r){let h;e[29]!==i||e[30]!==r?(h=j=>o.jsx(Bt,{value:j.id,className:"min-h-0 flex-1 overflow-hidden flex flex-col",children:o.jsx(oe,{config:j,mode:i,onSelect:r})},j.id),e[29]=i,e[30]=r,e[31]=h):h=e[31],k=s.map(h),e[25]=s,e[26]=i,e[27]=r,e[28]=k}else k=e[28];let P;return e[32]!==v||e[33]!==S||e[34]!==k?(P=o.jsxs(It,{defaultValue:v,onValueChange:ui,className:"min-h-0 flex-1 flex flex-col",children:[S,k]}),e[32]=v,e[33]=S,e[34]=k,e[35]=P):P=e[35],P}function fi(t){return o.jsx(Ut,{value:t.id,children:t.name},t.id)}function ui(t){typeof window<"u"&&window.localStorage.setItem(Ae,t)}function di(){const t=U.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:o.jsx(Ee,{size:20,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noBucketConfigured"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"font-medium text-sm",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noBucketDescription"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[i,o.jsxs("div",{children:[r,a]})]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function oe({config:t,mode:e,onSelect:i}){const n=V(),[r,s]=H.useState(""),a=Qt(r,300),c=qt({configId:t.id,search:a,imageOnly:e==="image"}),p=Gt(),[g,v]=H.useState(!1),d=H.useRef(null),S=e==="image"?"image/*":void 0;async function k(u){if(!u)return;const x=Array.from(u);if(x.length===0)return;let y=null;const N=[];for(const E of x)try{const F=await p.mutateAsync({configId:t.id,file:E});y??=F.publicUrl}catch(F){N.push(`${E.name} (${F instanceof Error?F.message:"upload failed"})`)}c.data?.pages.some(E=>E.listingError)||c.refetch(),N.length>0&&Pe.error(N.length===x.length?n("filePicker.filePickerDialog.uploadFailedAll",{errors:N.join("; ")}):n("filePicker.filePickerDialog.uploadFailedSome",{errors:N.join("; ")})),y&&i(y)}function P(u){u.preventDefault(),v(!0)}function h(){v(!1)}function j(u){u.preventDefault(),u.stopPropagation(),v(!1),k(u.dataTransfer.files)}const b=c.data?.pages??[],C=b.some(u=>u.listingError==="access_denied"),D=b.flatMap(u=>u.items),T=D.filter(u=>e==="image"?Ne(u.key):!0),O=a.trim(),l=D.length>0||r.trim().length>0,f=r!==a||c.isFetching&&!c.isFetchingNextPage;return o.jsxs("div",{className:"flex flex-col gap-3 min-h-0 flex-1",children:[o.jsxs("button",{type:"button",onClick:()=>d.current?.click(),onDragOver:P,onDragLeave:h,onDrop:j,className:Je("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",g&&"border-primary bg-primary/5",p.isPending&&"opacity-60 pointer-events-none"),children:[o.jsx(Ee,{size:18,className:"text-muted-foreground"}),o.jsx("p",{className:"text-sm font-medium",children:p.isPending?n("filePicker.filePickerDialog.uploading"):n("filePicker.filePickerDialog.dropFilesOrClick")}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[n("filePicker.filePickerDialog.uploadSizeLimit")," ",n(e==="image"?"filePicker.filePickerDialog.imagesOnlyTypes":"filePicker.filePickerDialog.commonMediaTypes")]}),o.jsx("input",{ref:d,type:"file",accept:S,multiple:!0,className:"hidden",onChange:u=>{const x=Array.from(u.target.files??[]);u.target.value="",k(x)}})]}),l?o.jsx(Ht,{value:r,onChange:s,isSearching:f,placeholder:n(e==="image"?"filePicker.filePickerDialog.searchImagesPlaceholder":"filePicker.filePickerDialog.searchFilesPlaceholder"),className:"shrink-0"}):null,o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[C||c.isError?o.jsx(Yt,{denied:C,retrying:c.isFetching,onRetry:()=>{c.refetch()}}):c.isPending?o.jsx(we,{className:"h-32 w-full"}):T.length===0?O?o.jsx(gi,{query:O}):e==="image"&&D.length>0?o.jsx(hi,{}):o.jsx(mi,{}):e==="image"?o.jsx(pi,{items:T,onSelect:i}):o.jsx(yi,{items:T,onSelect:i}),c.hasNextPage&&o.jsx("div",{className:"flex justify-center py-4",children:o.jsx(je,{type:"button",variant:"outline",size:"sm",disabled:c.isFetchingNextPage,onClick:()=>c.fetchNextPage(),children:c.isFetchingNextPage?o.jsxs(o.Fragment,{children:[o.jsx(Ze,{className:"size-3.5"}),n("filePicker.filePickerDialog.loading")]}):n("filePicker.filePickerDialog.loadMore")})})]})]})}function mi(){const t=U.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noFilesYet"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"text-sm font-medium",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.dropFileToGetStarted"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,r,a]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function hi(){const t=U.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let n;t[1]!==e?(n=e("filePicker.filePickerDialog.noImagesYet"),t[1]=e,t[2]=n):n=t[2];let r;t[3]!==n?(r=o.jsx("p",{className:"text-sm font-medium",children:n}),t[3]=n,t[4]=r):r=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noImagesFormatDesc"),t[5]=e,t[6]=s):s=t[6];let a;t[7]!==s?(a=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=a):a=t[8];let c;return t[9]!==r||t[10]!==a?(c=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,r,a]}),t[9]=r,t[10]=a,t[11]=c):c=t[11],c}function gi(t){const e=U.c(13),{query:i}=t,n=V();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(te,{size:18,className:"text-muted-foreground"})}),e[0]=r):r=e[0];let s;e[1]!==i||e[2]!==n?(s=n("filePicker.filePickerDialog.noMatches",{query:i}),e[1]=i,e[2]=n,e[3]=s):s=e[3];let a;e[4]!==s?(a=o.jsx("p",{className:"text-sm font-medium",children:s}),e[4]=s,e[5]=a):a=e[5];let c;e[6]!==n?(c=n("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore"),e[6]=n,e[7]=c):c=e[7];let p;e[8]!==c?(p=o.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[8]=c,e[9]=p):p=e[9];let g;return e[10]!==a||e[11]!==p?(g=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[r,a,p]}),e[10]=a,e[11]=p,e[12]=g):g=e[12],g}function pi(t){const e=U.c(7),{items:i,onSelect:n}=t;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==n?(a=c=>o.jsx(Me,{item:c,variant:"image",onSelect:n},c.key),e[3]=n,e[4]=a):a=e[4],r=i.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let s;return e[5]!==r?(s=o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:r}),e[5]=r,e[6]=s):s=e[6],s}function yi(t){const e=U.c(7),{items:i,onSelect:n}=t;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==n?(a=c=>o.jsx("li",{children:o.jsx(Me,{item:c,variant:"row",onSelect:n})},c.key),e[3]=n,e[4]=a):a=e[4],r=i.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let s;return e[5]!==r?(s=o.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:r}),e[5]=r,e[6]=s):s=e[6],s}function Me(t){const e=U.c(58),{item:i,variant:n,onSelect:r}=t;let s;e[0]!==i.key?(s=Wt(i.key),e[0]=i.key,e[1]=s):s=e[1];const a=s;if(n==="image"){let D;e[2]!==i.publicUrl||e[3]!==r?(D=()=>r(i.publicUrl),e[2]=i.publicUrl,e[3]=r,e[4]=D):D=e[4];let T;e[5]!==i.key||e[6]!==i.publicUrl?(T=o.jsx("img",{src:i.publicUrl,alt:i.key,loading:"lazy",className:"h-full w-full object-cover",onError:xi}),e[5]=i.key,e[6]=i.publicUrl,e[7]=T):T=e[7];let O;e[8]!==i.key||e[9]!==D||e[10]!==T?(O=o.jsx("button",{type:"button",onClick:D,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:i.key,children:T}),e[8]=i.key,e[9]=D,e[10]=T,e[11]=O):O=e[11];let l;e[12]!==a?(l=o.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-2xs font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:a}),e[12]=a,e[13]=l):l=e[13];let f;e[14]!==i||e[15]!==r?(f=o.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx(Se,{item:i,onSelect:r})}),e[14]=i,e[15]=r,e[16]=f):f=e[16];let u;e[17]!==i.key?(u=ye(i.key),e[17]=i.key,e[18]=u):u=e[18];let x;e[19]!==u?(x=o.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx("p",{className:"truncate text-xs text-white",children:u})}),e[19]=u,e[20]=x):x=e[20];let y;return e[21]!==O||e[22]!==l||e[23]!==f||e[24]!==x?(y=o.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[O,l,f,x]}),e[21]=O,e[22]=l,e[23]=f,e[24]=x,e[25]=y):y=e[25],y}let c;e[26]!==i.publicUrl||e[27]!==r?(c=()=>r(i.publicUrl),e[26]=i.publicUrl,e[27]=r,e[28]=c):c=e[28];let p;e[29]!==i.key?(p=o.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:Ne(i.key)?o.jsx(te,{size:16,className:"text-muted-foreground"}):o.jsx(Rt,{size:16,className:"text-muted-foreground"})}),e[29]=i.key,e[30]=p):p=e[30];let g;e[31]!==i.key?(g=ye(i.key),e[31]=i.key,e[32]=g):g=e[32];let v;e[33]!==g?(v=o.jsx("p",{className:"truncate text-sm font-medium",children:g}),e[33]=g,e[34]=v):v=e[34];let d;e[35]!==i.key?(d=o.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:i.key}),e[35]=i.key,e[36]=d):d=e[36];let S;e[37]!==v||e[38]!==d?(S=o.jsxs("div",{className:"min-w-0 flex-1",children:[v,d]}),e[37]=v,e[38]=d,e[39]=S):S=e[39];let k;e[40]!==a?(k=o.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:a}),e[40]=a,e[41]=k):k=e[41];let P;e[42]!==i.size?(P=Jt(i.size),e[42]=i.size,e[43]=P):P=e[43];let h;e[44]!==P?(h=o.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:P}),e[44]=P,e[45]=h):h=e[45];let j;e[46]!==h||e[47]!==c||e[48]!==p||e[49]!==S||e[50]!==k?(j=o.jsxs("button",{type:"button",onClick:c,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[p,S,k,h]}),e[46]=h,e[47]=c,e[48]=p,e[49]=S,e[50]=k,e[51]=j):j=e[51];let b;e[52]!==i||e[53]!==r?(b=o.jsx(Se,{item:i,onSelect:r}),e[52]=i,e[53]=r,e[54]=b):b=e[54];let C;return e[55]!==j||e[56]!==b?(C=o.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-accent",children:[j,b]}),e[55]=j,e[56]=b,e[57]=C):C=e[57],C}function xi(t){t.target.style.display="none"}function Se(t){const e=U.c(39),{item:i,onSelect:n}=t,r=V(),[s,a]=H.useState(!1);let c;e[0]!==i.publicUrl||e[1]!==r?(c=async function(y){y.preventDefault(),y.stopPropagation();try{await navigator.clipboard.writeText(i.publicUrl),a(!0),window.setTimeout(()=>a(!1),1500)}catch{Pe.error(r("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=i.publicUrl,e[1]=r,e[2]=c):c=e[2];const p=c;let g;e[3]!==r?(g=r("filePicker.filePickerDialog.assetActions"),e[3]=r,e[4]=g):g=e[4];let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(Lt,{size:14}),e[5]=v):v=e[5];let d;e[6]!==g?(d=o.jsx(Xe,{asChild:!0,children:o.jsx(je,{type:"button",variant:"ghost",size:"icon-sm",className:"bg-background/80 backdrop-blur-sm",onClick:ki,"aria-label":g,children:v})}),e[6]=g,e[7]=d):d=e[7];let S;e[8]!==i.publicUrl||e[9]!==n?(S=()=>n(i.publicUrl),e[8]=i.publicUrl,e[9]=n,e[10]=S):S=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(ue,{size:14}),e[11]=k):k=e[11];let P;e[12]!==r?(P=r("filePicker.filePickerDialog.useThis"),e[12]=r,e[13]=P):P=e[13];let h;e[14]!==S||e[15]!==P?(h=o.jsxs(ie,{onClick:S,children:[k,P]}),e[14]=S,e[15]=P,e[16]=h):h=e[16];let j;e[17]!==s?(j=s?o.jsx(ue,{size:14}):o.jsx(zt,{size:14}),e[17]=s,e[18]=j):j=e[18];let b;e[19]!==s||e[20]!==r?(b=r(s?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[19]=s,e[20]=r,e[21]=b):b=e[21];let C;e[22]!==p||e[23]!==b||e[24]!==j?(C=o.jsxs(ie,{onClick:p,children:[j,b]}),e[22]=p,e[23]=b,e[24]=j,e[25]=C):C=e[25];const D=i.publicUrl;let T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(_e,{size:14}),e[26]=T):T=e[26];let O;e[27]!==r?(O=r("filePicker.filePickerDialog.openInNewTab"),e[27]=r,e[28]=O):O=e[28];let l;e[29]!==i.publicUrl||e[30]!==O?(l=o.jsx(ie,{asChild:!0,children:o.jsxs("a",{href:D,target:"_blank",rel:"noreferrer",onClick:vi,children:[T,O]})}),e[29]=i.publicUrl,e[30]=O,e[31]=l):l=e[31];let f;e[32]!==C||e[33]!==l||e[34]!==h?(f=o.jsxs(Ke,{align:"end",onClick:Si,children:[h,C,l]}),e[32]=C,e[33]=l,e[34]=h,e[35]=f):f=e[35];let u;return e[36]!==f||e[37]!==d?(u=o.jsxs(et,{children:[d,f]}),e[36]=f,e[37]=d,e[38]=u):u=e[38],u}function vi(t){return t.stopPropagation()}function Si(t){return t.stopPropagation()}function ki(t){return t.stopPropagation()}function ar(t,e,i){return e||(t.length===1?t[0].id:t.length===0?null:t.some(n=>n.id===i)?i:null)}const wi=new Set(["http:","https:"]),ji=/[\u0000-\u001F\u007F]/g;function Pi(t){return t.replace(ji,"").trim()}const bi=/^[a-zA-Z][a-zA-Z0-9+.-]*:/;function cr(t){return Ci(t)!==""}function Ci(t){const e=Pi(t);if(!e)return"";if(!bi.test(e))try{return encodeURI(e)}catch{return""}try{const i=new URL(e);return wi.has(i.protocol)||i.protocol==="data:"&&/^data:image\//i.test(i.href)?i.href:""}catch{return""}}const Ei=q.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(i=>e.updateAttributes(i,{textAlign:t})).some(i=>i):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:i})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?i.unsetTextAlign():i.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var fr=Ei;const Ni=20,Oe=(t,e=0)=>{const i=[];return!t.children.length||e>Ni||Array.from(t.children).forEach(n=>{n.tagName==="SPAN"?i.push(n):n.children.length&&i.push(...Oe(n,e+1))}),i},Di=t=>{if(!t.children.length)return;const e=Oe(t);e&&e.forEach(i=>{var n;const r=i.getAttribute("style"),s=(n=i.parentElement)===null||n===void 0||(n=n.closest("span"))===null||n===void 0?void 0:n.getAttribute("style");i.setAttribute("style",`${s};${r}`)})},Ti=Zt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Di(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Xt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(i,n)=>{if(!i.isInline)return!0;i.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(s=>!!s))||t.removeMark(n,n+i.nodeSize,this.type)}),!0}}}}),Ai=q.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const i=(e=K(t,"background-color"))!==null&&e!==void 0?e:t.style.backgroundColor;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),Mi=q.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const i=(e=K(t,"color"))!==null&&e!==void 0?e:t.style.color;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),Oi=q.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{var e;return(e=K(t,"font-family"))!==null&&e!==void 0?e:t.style.fontFamily},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Fi=q.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{var e;return(e=K(t,"font-size"))!==null&&e!==void 0?e:t.style.fontSize},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),zi=q.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>{var e;return(e=K(t,"line-height"))!==null&&e!==void 0?e:t.style.lineHeight},renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});q.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(Ai.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(Mi.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(Oi.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(Fi.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(zi.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(Ti.configure(this.options.textStyle)),t}});function ur(t){const e=U.c(6),i=ke(),n=be(t.virtualMcpId,t.branch);if(n.kind!=="protocol"||n.source!=="github")return Li;let r;e[0]!==n||e[1]!==t?(r=St(t,n),e[0]=n,e[1]=t,e[2]=r):r=e[2];const s=r;let a;return e[3]!==s||e[4]!==i?(a=c=>Ce(i,s,c),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}function Li(){return!1}export{Mi as C,lr as F,Ae as L,Ti as T,ur as a,or as b,Fi as c,fr as d,ei as e,cr as i,se as k,ar as r,Ci as s,li as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as F,a6 as w,K as y,i as $,q as k,e as P}from"./index-C0zcxte6.js";import{u as x}from"./useInfiniteQuery-kEKcQUWO.js";function G(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function p(n,e,t,s){const i=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${i?`?${i}`:""}`}async function h(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let i="";try{i=(await s.json()).error??""}catch{}throw new Error(i||`HTTP ${s.status}`)}async function E(n,e,t){return(await(await h(p(n,e,"list",{path:t}))).json()).entries.toSorted((r,a)=>r.kind!==a.kind?r.kind==="dir"?-1:1:r.path.localeCompare(a.path))}function Z(n,e,t){const s=F.c(16),{org:i}=w(),r=t?.enabled??!0;let a;s[0]!==i.id||s[1]!==e||s[2]!==n?(a=y.orgFsList(i.id,n,e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=a):a=s[3];let o;s[4]!==i.id||s[5]!==n?(o=(f,u)=>u?.queryKey[1]===i.id&&u.queryKey[2]===n?f:void 0,s[4]=i.id,s[5]=n,s[6]=o):o=s[6];let c;s[7]!==i.slug||s[8]!==e||s[9]!==n?(c=()=>E(i.slug,n,e),s[7]=i.slug,s[8]=e,s[9]=n,s[10]=c):c=s[10];let l;return s[11]!==r||s[12]!==a||s[13]!==o||s[14]!==c?(l={enabled:r,queryKey:a,placeholderData:o,queryFn:c},s[11]=r,s[12]=a,s[13]=o,s[14]=c,s[15]=l):l=s[15],$(l)}async function _(n,e,t){const s=await h(p(n,e,"stat",{path:t}),void 0,{allow404:!0});return s.status===404?null:(await s.json()).entry}function v(n,e,t){const s=F.c(16),{org:i}=w();let r;s[0]!==i.id||s[1]!==e||s[2]!==n?(r=y.orgFsStat(i.id,n??"",e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=r):r=s[3];const a=n!==null,o=t?.staleTime;let c;s[4]!==t?(c=t?.refetchIntervalWhenAbsent?u=>u.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=c):c=s[5];let l;s[6]!==i.slug||s[7]!==e||s[8]!==n?(l=()=>_(i.slug,n??"",e),s[6]=i.slug,s[7]=e,s[8]=n,s[9]=l):l=s[9];let f;return s[10]!==r||s[11]!==a||s[12]!==o||s[13]!==c||s[14]!==l?(f={queryKey:r,enabled:a,staleTime:o,refetchInterval:c,queryFn:l},s[10]=r,s[11]=a,s[12]=o,s[13]=c,s[14]=l,s[15]=f):f=s[15],$(f)}function ee(n,e){const t=F.c(9),s=n===void 0?60:n,{org:i}=w();let r;t[0]!==i.id?(r=y.orgFsRecent(i.id),t[0]=i.id,t[1]=r):r=t[1];const a=e?.enabled;let o;t[2]!==s||t[3]!==i.slug?(o=async()=>(await(await h(`/api/${encodeURIComponent(i.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=i.slug,t[4]=o):o=t[4];let c;return t[5]!==r||t[6]!==a||t[7]!==o?(c={queryKey:r,enabled:a,queryFn:o},t[5]=r,t[6]=a,t[7]=o,t[8]=c):c=t[8],$(c)}const R=200;function te(n){const e=F.c(9),{org:t}=w();let s;e[0]!==t.id||e[1]!==n?(s=y.orgFsVolumeFiles(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let i;e[3]!==t.slug||e[4]!==n?(i=async a=>{const{pageParam:o}=a,c=new URLSearchParams({limit:String(R)});return o&&c.set("before",o),await(await h(`/api/${encodeURIComponent(t.slug)}/fs/${encodeURIComponent(n)}/files?${c}`)).json()},e[3]=t.slug,e[4]=n,e[5]=i):i=e[5];let r;return e[6]!==s||e[7]!==i?(r={queryKey:s,initialPageParam:null,queryFn:i,getNextPageParam:C},e[6]=s,e[7]=i,e[8]=r):r=e[8],x(r)}function C(n){return n.next??void 0}const U=50;function se(n,e){const t=F.c(16),{org:s}=w();let i;t[0]!==s.id||t[1]!==n||t[2]!==e?.prefix||t[3]!==e?.volume?(i=y.orgFsSearch(s.id,n,e?.volume??"",e?.prefix??""),t[0]=s.id,t[1]=n,t[2]=e?.prefix,t[3]=e?.volume,t[4]=i):i=t[4];const r=n.length>0;let a;t[5]!==s.id?(a=(l,f)=>f?.queryKey[1]===s.id?l:void 0,t[5]=s.id,t[6]=a):a=t[6];let o;t[7]!==s.slug||t[8]!==n||t[9]!==e?(o=async()=>{const l=new URLSearchParams({q:n,limit:String(U)});return e&&(l.set("volume",e.volume),e.prefix&&l.set("prefix",e.prefix)),(await(await h(`/api/${encodeURIComponent(s.slug)}/fs/search?${l}`)).json()).entries},t[7]=s.slug,t[8]=n,t[9]=e,t[10]=o):o=t[10];let c;return t[11]!==i||t[12]!==r||t[13]!==a||t[14]!==o?(c={queryKey:i,enabled:r,placeholderData:a,queryFn:o},t[11]=i,t[12]=r,t[13]=a,t[14]=o,t[15]=c):c=t[15],$(c)}function ne(n){const e=F.c(8),{org:t}=w();let s;e[0]!==t.id?(s=y.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const i=n?.enabled;let r;e[2]!==t.slug?(r=async()=>{const o=await h(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(j)},e[2]=t.slug,e[3]=r):r=e[3];let a;return e[4]!==s||e[5]!==i||e[6]!==r?(a={queryKey:s,enabled:i,queryFn:r},e[4]=s,e[5]=i,e[6]=r,e[7]=a):a=e[7],$(a)}function j(n){return{volume:n.volume,path:n.path}}async function Q(n){const e=await h(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}function ie(){const n=F.c(7),{org:e}=w();let t;n[0]!==e.id?(t=y.slashSkills(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=()=>Q(e.slug),n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,queryFn:s,staleTime:6e4},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}async function M(n,e,t){return(await h(p(n,e,"read",{path:t}))).text()}function re(n,e){const t=F.c(8);let s;t[0]!==n?(s=y.fileText(n),t[0]=n,t[1]=s):s=t[1];const i=e?.enabled!==!1&&n!=="";let r;t[2]!==n?(r=async()=>{const o=await fetch(n,{credentials:"include"});return o.ok?await o.text():null},t[2]=n,t[3]=r):r=t[3];let a;return t[4]!==s||t[5]!==i||t[6]!==r?(a={queryKey:s,enabled:i,staleTime:6e4,retry:!1,queryFn:r},t[4]=s,t[5]=i,t[6]=r,t[7]=a):a=t[7],$(a)}const A=new Set(["md","mdx","markdown","txt","text"]),D=25,N=64*1024,H=256*1024,V=4;function W(n){const e=n.lastIndexOf(".");return e===-1?!1:A.has(n.slice(e+1).toLowerCase())}async function ae(n,e,t){const s=t?`${t}/`:"",i=u=>u.startsWith(s)?u.slice(s.length):u,r=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const u=o.shift();if(!u)break;let g;try{g=(await(await h(p(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const d of[...g].sort((b,m)=>b.path.localeCompare(m.path))){if(d.kind==="dir"){u.depth<V&&o.push({path:d.path,depth:u.depth+1});continue}W(d.path)&&d.size<=N&&r.length<D?r.push(d.path):a.push(i(d.path))}}const c=await Promise.all(r.map(u=>M(n,e,u).catch(()=>null))),l=[];let f=0;return r.forEach((u,g)=>{const d=c[g];if(d==null||f+d.length>H){a.push(i(u));return}f+=d.length,l.push({relPath:i(u),content:d})}),l.sort((u,g)=>u.relPath==="SKILL.md"?-1:g.relPath==="SKILL.md"?1:u.relPath.localeCompare(g.relPath)),a.sort(),{files:l,omittedPaths:a}}function oe(){const n=F.c(7),{org:e}=w();let t;n[0]!==e.id?(t=y.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await h(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}function le(n){const e=F.c(3),{org:t}=w();let s;return e[0]!==t.slug||e[1]!==n?(s=i=>p(t.slug,n,"read",{path:i}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function ce(){const n=F.c(2),{org:e}=w();let t;return n[0]!==e.slug?(t=(s,i)=>p(e.slug,s,"read",{path:i}),n[0]=e.slug,n[1]=t):t=n[1],t}function ue(n){const e=F.c(3),{org:t}=w();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async i=>(await(await h(p(t.slug,n,"file",{path:i.path}),{method:"PUT",headers:{"content-type":i.contentType??"text/html; charset=utf-8"},body:i.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],P(s)}async function fe(n,e,t,s,i,r="text/markdown; charset=utf-8"){const a={"content-type":r};i&&"absent"in i?a["if-none-match"]="*":i&&(a["if-match"]=`"${i.contentHash}"`);const o=await fetch(p(n,e,"file",{path:t}),{method:"PUT",headers:a,body:s});if(o.status===412)return{ok:!1,reason:"conflict"};if(o.status===403)return{ok:!1,reason:"forbidden"};if(!o.ok)throw new Error(`HTTP ${o.status}`);return{ok:!0,entry:(await o.json()).entry}}function de(n){const e=F.c(18),{org:t}=w(),s=k();let i;e[0]!==t||e[1]!==n?(i=async l=>(await(await h(p(t.slug,n,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=i):i=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==n?(r=async l=>{const f=y.orgFsStat(t.id,n,l.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),g=l.mode!=="private";return s.setQueryData(f,d=>d&&{...d,readPublic:g,effectivePublic:g,shareMode:l.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=r):r=e[6];let a;e[7]!==s?(a=(l,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==s||e[11]!==n?(o=(l,f,u)=>{s.invalidateQueries({queryKey:y.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=o):o=e[12];let c;return e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==o?(c={mutationFn:i,onMutate:r,onError:a,onSettled:o},e[13]=i,e[14]=r,e[15]=a,e[16]=o,e[17]=c):c=e[17],P(c)}function X(n,e,t){n.invalidateQueries({queryKey:y.orgFsVolume(e,t)}),n.invalidateQueries({queryKey:y.orgFsRecent(e)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e)})}function ge(n){const e=F.c(33),{org:t}=w(),s=k();let i;e[0]!==t||e[1]!==s||e[2]!==n?(i=()=>X(s,t.id,n),e[0]=t,e[1]=s,e[2]=n,e[3]=i):i=e[3];const r=i;let a;e[4]!==t||e[5]!==n?(a=async S=>{const T=(await Promise.allSettled(S.files.map(L=>{const q=S.dir?`${S.dir}/${L.name}`:L.name;return h(p(t.slug,n,"file",{path:q}),{method:"PUT",headers:{"content-type":L.type||"application/octet-stream"},body:L})}))).find(Y);if(T)throw T.reason},e[4]=t,e[5]=n,e[6]=a):a=e[6];let o;e[7]!==r||e[8]!==a?(o={mutationFn:a,onSettled:r},e[7]=r,e[8]=a,e[9]=o):o=e[9];const c=P(o);let l;e[10]!==t||e[11]!==n?(l=async S=>{await h(p(t.slug,n,"dir",{path:S}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=l):l=e[12];let f;e[13]!==r||e[14]!==l?(f={mutationFn:l,onSuccess:r},e[13]=r,e[14]=l,e[15]=f):f=e[15];const u=P(f);let g;e[16]!==t||e[17]!==n?(g=async S=>{await h(p(t.slug,n,"file",{path:S}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=g):g=e[18];let d;e[19]!==r||e[20]!==g?(d={mutationFn:g,onSuccess:r},e[19]=r,e[20]=g,e[21]=d):d=e[21];const b=P(d);let m;e[22]!==t||e[23]!==n?(m=async S=>{await h(p(t.slug,n,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(S)})},e[22]=t,e[23]=n,e[24]=m):m=e[24];let I;e[25]!==r||e[26]!==m?(I={mutationFn:m,onSuccess:r},e[25]=r,e[26]=m,e[27]=I):I=e[27];const O=P(I);let K;return e[28]!==u||e[29]!==O||e[30]!==b||e[31]!==c?(K={upload:c,mkdir:u,remove:b,move:O},e[28]=u,e[29]=O,e[30]=b,e[31]=c,e[32]=K):K=e[32],K}function Y(n){return n.status==="rejected"}export{le as a,Q as b,v as c,ue as d,G as e,ae as f,de as g,re as h,E as i,ie as j,ge as k,ce as l,X as m,_ as n,M as o,ee as p,ne as q,oe as r,se as s,te as t,Z as u,fe as w};
|
|
1
|
+
import{c as F,a6 as w,K as y,i as $,q as k,e as P}from"./index-C6-0Ff1m.js";import{u as x}from"./useInfiniteQuery-B5jgBAwp.js";function G(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function p(n,e,t,s){const i=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${i?`?${i}`:""}`}async function h(n,e,t){const s=await fetch(n,e);if(s.ok||t?.allow404&&s.status===404)return s;let i="";try{i=(await s.json()).error??""}catch{}throw new Error(i||`HTTP ${s.status}`)}async function E(n,e,t){return(await(await h(p(n,e,"list",{path:t}))).json()).entries.toSorted((r,a)=>r.kind!==a.kind?r.kind==="dir"?-1:1:r.path.localeCompare(a.path))}function Z(n,e,t){const s=F.c(16),{org:i}=w(),r=t?.enabled??!0;let a;s[0]!==i.id||s[1]!==e||s[2]!==n?(a=y.orgFsList(i.id,n,e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=a):a=s[3];let o;s[4]!==i.id||s[5]!==n?(o=(f,u)=>u?.queryKey[1]===i.id&&u.queryKey[2]===n?f:void 0,s[4]=i.id,s[5]=n,s[6]=o):o=s[6];let c;s[7]!==i.slug||s[8]!==e||s[9]!==n?(c=()=>E(i.slug,n,e),s[7]=i.slug,s[8]=e,s[9]=n,s[10]=c):c=s[10];let l;return s[11]!==r||s[12]!==a||s[13]!==o||s[14]!==c?(l={enabled:r,queryKey:a,placeholderData:o,queryFn:c},s[11]=r,s[12]=a,s[13]=o,s[14]=c,s[15]=l):l=s[15],$(l)}async function _(n,e,t){const s=await h(p(n,e,"stat",{path:t}),void 0,{allow404:!0});return s.status===404?null:(await s.json()).entry}function v(n,e,t){const s=F.c(16),{org:i}=w();let r;s[0]!==i.id||s[1]!==e||s[2]!==n?(r=y.orgFsStat(i.id,n??"",e),s[0]=i.id,s[1]=e,s[2]=n,s[3]=r):r=s[3];const a=n!==null,o=t?.staleTime;let c;s[4]!==t?(c=t?.refetchIntervalWhenAbsent?u=>u.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=c):c=s[5];let l;s[6]!==i.slug||s[7]!==e||s[8]!==n?(l=()=>_(i.slug,n??"",e),s[6]=i.slug,s[7]=e,s[8]=n,s[9]=l):l=s[9];let f;return s[10]!==r||s[11]!==a||s[12]!==o||s[13]!==c||s[14]!==l?(f={queryKey:r,enabled:a,staleTime:o,refetchInterval:c,queryFn:l},s[10]=r,s[11]=a,s[12]=o,s[13]=c,s[14]=l,s[15]=f):f=s[15],$(f)}function ee(n,e){const t=F.c(9),s=n===void 0?60:n,{org:i}=w();let r;t[0]!==i.id?(r=y.orgFsRecent(i.id),t[0]=i.id,t[1]=r):r=t[1];const a=e?.enabled;let o;t[2]!==s||t[3]!==i.slug?(o=async()=>(await(await h(`/api/${encodeURIComponent(i.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=i.slug,t[4]=o):o=t[4];let c;return t[5]!==r||t[6]!==a||t[7]!==o?(c={queryKey:r,enabled:a,queryFn:o},t[5]=r,t[6]=a,t[7]=o,t[8]=c):c=t[8],$(c)}const R=200;function te(n){const e=F.c(9),{org:t}=w();let s;e[0]!==t.id||e[1]!==n?(s=y.orgFsVolumeFiles(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let i;e[3]!==t.slug||e[4]!==n?(i=async a=>{const{pageParam:o}=a,c=new URLSearchParams({limit:String(R)});return o&&c.set("before",o),await(await h(`/api/${encodeURIComponent(t.slug)}/fs/${encodeURIComponent(n)}/files?${c}`)).json()},e[3]=t.slug,e[4]=n,e[5]=i):i=e[5];let r;return e[6]!==s||e[7]!==i?(r={queryKey:s,initialPageParam:null,queryFn:i,getNextPageParam:C},e[6]=s,e[7]=i,e[8]=r):r=e[8],x(r)}function C(n){return n.next??void 0}const U=50;function se(n,e){const t=F.c(16),{org:s}=w();let i;t[0]!==s.id||t[1]!==n||t[2]!==e?.prefix||t[3]!==e?.volume?(i=y.orgFsSearch(s.id,n,e?.volume??"",e?.prefix??""),t[0]=s.id,t[1]=n,t[2]=e?.prefix,t[3]=e?.volume,t[4]=i):i=t[4];const r=n.length>0;let a;t[5]!==s.id?(a=(l,f)=>f?.queryKey[1]===s.id?l:void 0,t[5]=s.id,t[6]=a):a=t[6];let o;t[7]!==s.slug||t[8]!==n||t[9]!==e?(o=async()=>{const l=new URLSearchParams({q:n,limit:String(U)});return e&&(l.set("volume",e.volume),e.prefix&&l.set("prefix",e.prefix)),(await(await h(`/api/${encodeURIComponent(s.slug)}/fs/search?${l}`)).json()).entries},t[7]=s.slug,t[8]=n,t[9]=e,t[10]=o):o=t[10];let c;return t[11]!==i||t[12]!==r||t[13]!==a||t[14]!==o?(c={queryKey:i,enabled:r,placeholderData:a,queryFn:o},t[11]=i,t[12]=r,t[13]=a,t[14]=o,t[15]=c):c=t[15],$(c)}function ne(n){const e=F.c(8),{org:t}=w();let s;e[0]!==t.id?(s=y.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const i=n?.enabled;let r;e[2]!==t.slug?(r=async()=>{const o=await h(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await o.json();return c.map(j)},e[2]=t.slug,e[3]=r):r=e[3];let a;return e[4]!==s||e[5]!==i||e[6]!==r?(a={queryKey:s,enabled:i,queryFn:r},e[4]=s,e[5]=i,e[6]=r,e[7]=a):a=e[7],$(a)}function j(n){return{volume:n.volume,path:n.path}}async function Q(n){const e=await h(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}function ie(){const n=F.c(7),{org:e}=w();let t;n[0]!==e.id?(t=y.slashSkills(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=()=>Q(e.slug),n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,queryFn:s,staleTime:6e4},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}async function M(n,e,t){return(await h(p(n,e,"read",{path:t}))).text()}function re(n,e){const t=F.c(8);let s;t[0]!==n?(s=y.fileText(n),t[0]=n,t[1]=s):s=t[1];const i=e?.enabled!==!1&&n!=="";let r;t[2]!==n?(r=async()=>{const o=await fetch(n,{credentials:"include"});return o.ok?await o.text():null},t[2]=n,t[3]=r):r=t[3];let a;return t[4]!==s||t[5]!==i||t[6]!==r?(a={queryKey:s,enabled:i,staleTime:6e4,retry:!1,queryFn:r},t[4]=s,t[5]=i,t[6]=r,t[7]=a):a=t[7],$(a)}const A=new Set(["md","mdx","markdown","txt","text"]),D=25,N=64*1024,H=256*1024,V=4;function W(n){const e=n.lastIndexOf(".");return e===-1?!1:A.has(n.slice(e+1).toLowerCase())}async function ae(n,e,t){const s=t?`${t}/`:"",i=u=>u.startsWith(s)?u.slice(s.length):u,r=[],a=[],o=[{path:t,depth:0}];for(;o.length>0;){const u=o.shift();if(!u)break;let g;try{g=(await(await h(p(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const d of[...g].sort((b,m)=>b.path.localeCompare(m.path))){if(d.kind==="dir"){u.depth<V&&o.push({path:d.path,depth:u.depth+1});continue}W(d.path)&&d.size<=N&&r.length<D?r.push(d.path):a.push(i(d.path))}}const c=await Promise.all(r.map(u=>M(n,e,u).catch(()=>null))),l=[];let f=0;return r.forEach((u,g)=>{const d=c[g];if(d==null||f+d.length>H){a.push(i(u));return}f+=d.length,l.push({relPath:i(u),content:d})}),l.sort((u,g)=>u.relPath==="SKILL.md"?-1:g.relPath==="SKILL.md"?1:u.relPath.localeCompare(g.relPath)),a.sort(),{files:l,omittedPaths:a}}function oe(){const n=F.c(7),{org:e}=w();let t;n[0]!==e.id?(t=y.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await h(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let i;return n[4]!==t||n[5]!==s?(i={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=i):i=n[6],$(i)}function le(n){const e=F.c(3),{org:t}=w();let s;return e[0]!==t.slug||e[1]!==n?(s=i=>p(t.slug,n,"read",{path:i}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function ce(){const n=F.c(2),{org:e}=w();let t;return n[0]!==e.slug?(t=(s,i)=>p(e.slug,s,"read",{path:i}),n[0]=e.slug,n[1]=t):t=n[1],t}function ue(n){const e=F.c(3),{org:t}=w();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async i=>(await(await h(p(t.slug,n,"file",{path:i.path}),{method:"PUT",headers:{"content-type":i.contentType??"text/html; charset=utf-8"},body:i.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],P(s)}async function fe(n,e,t,s,i,r="text/markdown; charset=utf-8"){const a={"content-type":r};i&&"absent"in i?a["if-none-match"]="*":i&&(a["if-match"]=`"${i.contentHash}"`);const o=await fetch(p(n,e,"file",{path:t}),{method:"PUT",headers:a,body:s});if(o.status===412)return{ok:!1,reason:"conflict"};if(o.status===403)return{ok:!1,reason:"forbidden"};if(!o.ok)throw new Error(`HTTP ${o.status}`);return{ok:!0,entry:(await o.json()).entry}}function de(n){const e=F.c(18),{org:t}=w(),s=k();let i;e[0]!==t||e[1]!==n?(i=async l=>(await(await h(p(t.slug,n,"public",{path:l.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:l.mode,password:l.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=i):i=e[2];let r;e[3]!==t||e[4]!==s||e[5]!==n?(r=async l=>{const f=y.orgFsStat(t.id,n,l.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),g=l.mode!=="private";return s.setQueryData(f,d=>d&&{...d,readPublic:g,effectivePublic:g,shareMode:l.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=r):r=e[6];let a;e[7]!==s?(a=(l,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=a):a=e[8];let o;e[9]!==t||e[10]!==s||e[11]!==n?(o=(l,f,u)=>{s.invalidateQueries({queryKey:y.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:y.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=o):o=e[12];let c;return e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==o?(c={mutationFn:i,onMutate:r,onError:a,onSettled:o},e[13]=i,e[14]=r,e[15]=a,e[16]=o,e[17]=c):c=e[17],P(c)}function X(n,e,t){n.invalidateQueries({queryKey:y.orgFsVolume(e,t)}),n.invalidateQueries({queryKey:y.orgFsRecent(e)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(e)})}function ge(n){const e=F.c(33),{org:t}=w(),s=k();let i;e[0]!==t||e[1]!==s||e[2]!==n?(i=()=>X(s,t.id,n),e[0]=t,e[1]=s,e[2]=n,e[3]=i):i=e[3];const r=i;let a;e[4]!==t||e[5]!==n?(a=async S=>{const T=(await Promise.allSettled(S.files.map(L=>{const q=S.dir?`${S.dir}/${L.name}`:L.name;return h(p(t.slug,n,"file",{path:q}),{method:"PUT",headers:{"content-type":L.type||"application/octet-stream"},body:L})}))).find(Y);if(T)throw T.reason},e[4]=t,e[5]=n,e[6]=a):a=e[6];let o;e[7]!==r||e[8]!==a?(o={mutationFn:a,onSettled:r},e[7]=r,e[8]=a,e[9]=o):o=e[9];const c=P(o);let l;e[10]!==t||e[11]!==n?(l=async S=>{await h(p(t.slug,n,"dir",{path:S}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=l):l=e[12];let f;e[13]!==r||e[14]!==l?(f={mutationFn:l,onSuccess:r},e[13]=r,e[14]=l,e[15]=f):f=e[15];const u=P(f);let g;e[16]!==t||e[17]!==n?(g=async S=>{await h(p(t.slug,n,"file",{path:S}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=g):g=e[18];let d;e[19]!==r||e[20]!==g?(d={mutationFn:g,onSuccess:r},e[19]=r,e[20]=g,e[21]=d):d=e[21];const b=P(d);let m;e[22]!==t||e[23]!==n?(m=async S=>{await h(p(t.slug,n,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(S)})},e[22]=t,e[23]=n,e[24]=m):m=e[24];let I;e[25]!==r||e[26]!==m?(I={mutationFn:m,onSuccess:r},e[25]=r,e[26]=m,e[27]=I):I=e[27];const O=P(I);let K;return e[28]!==u||e[29]!==O||e[30]!==b||e[31]!==c?(K={upload:c,mkdir:u,remove:b,move:O},e[28]=u,e[29]=O,e[30]=b,e[31]=c,e[32]=K):K=e[32],K}function Y(n){return n.status==="rejected"}export{le as a,Q as b,v as c,ue as d,G as e,ae as f,de as g,re as h,E as i,ie as j,ge as k,ce as l,X as m,_ as n,M as o,ee as p,ne as q,oe as r,se as s,te as t,Z as u,fe as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as h,j as u,o as C,b as $,r as A,B as S,a as p,t as f,M,i as _,K as z,cJ as D,at as E,av as I,d as G}from"./index-
|
|
1
|
+
import{c as h,j as u,o as C,b as $,r as A,B as S,a as p,t as f,M,i as _,K as z,cJ as D,at as E,av as I,d as G}from"./index-C6-0Ff1m.js";import{s as q}from"./XClose-DxbjiApV.js";import{S as F}from"./thread-intent-j3i3V7mR.js";const K={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function oe(e){return`[data-tour="${K[e]}"]`}function Y(e){return e!=="off"}function ie(e){if(!e.hasSource)return[];const t=["site-editor"];return Y(e.cmsMode)&&t.push("content"),e.runtime==="sandbox"&&t.push("code"),t}function X(e){return e==="site-editor"||e==="content"||e==="code"||e.startsWith("code:")}function ae(e){return e.reportsOnly&&!e.onReportAgent&&X(e.tabId)}const B={xs:"xs",sm:"xs",lg:"md"};function U(e){const t=h.c(4),{org:n,size:o}=e,s=o===void 0?"sm":o,r=n.logo??void 0,i=B[s];let a;return t[0]!==n.name||t[1]!==r||t[2]!==i?(a=u.jsx(C,{url:r,fallback:n.name,size:i,tone:"solid"}),t[0]=n.name,t[1]=r,t[2]=i,t[3]=a):a=t[3],a}function ce({invitation:e,onChanged:t}){const n=$(),[o,s]=A.useState(!1),r=e.organizationName??n("header.orgSwitcher.unknownOrganization"),i=async()=>{s(!0);try{const d=await p.organization.acceptInvitation({invitationId:e.id});if(d.error){f.error(d.error.message),s(!1);return}}catch{f.error(n("header.orgSwitcher.failedToAcceptInvitation")),s(!1);return}f.success(n("header.orgSwitcher.joined",{name:r})),M();let c;try{c=(await p.organization.getFullOrganization({query:{organizationId:e.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{s(!0);try{const c=await p.organization.rejectInvitation({invitationId:e.id});if(c.error){f.error(c.error.message),s(!1);return}f.success(n("header.orgSwitcher.invitationDeclined")),s(!1),t()}catch{f.error(n("header.orgSwitcher.failedToDeclineInvitation")),s(!1)}};return u.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[u.jsx(U,{org:{name:r},size:"sm"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"truncate text-sm font-medium",children:r}),u.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n("header.orgSwitcher.invitedToJoin")})]}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[u.jsx(S,{size:"sm",variant:"default",onClick:i,disabled:o,children:n("header.orgSwitcher.accept")}),u.jsx(S,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground",onClick:a,disabled:o,"aria-label":n("header.orgSwitcher.declineInvitationTo",{name:r}),children:u.jsx(q,{size:14})})]})]})}function J(e){return typeof e=="object"&&e!==null&&Array.isArray(e.items)}function de(e){const t=h.c(13),n=e.trim(),{data:o}=p.useSession(),s=o?.user?.id??"",r=n.length>0&&!!s,i=z.organizationSearch(s,n);let a;t[0]!==n?(a=async P=>{const{signal:L}=P,w=await fetch(`/api/_me/organizations/search?q=${encodeURIComponent(n)}`,{signal:L});if(!w.ok)throw new Error(`Organization search failed: ${w.status}`);const R=await w.json();if(!J(R))throw new Error("Invalid organization search response");return R},t[0]=n,t[1]=a):a=t[1];let c;t[2]!==r||t[3]!==i||t[4]!==a?(c={queryKey:i,queryFn:a,enabled:r,placeholderData:D,staleTime:3e4,retry:!1},t[2]=r,t[3]=i,t[4]=a,t[5]=c):c=t[5];const{data:d,isFetching:k,isPlaceholderData:N,isError:O}=_(c);let l;t[6]!==d?.items?(l=d?.items??[],t[6]=d?.items,t[7]=l):l=t[7];const b=r&&k,x=r&&N;let y;return t[8]!==O||t[9]!==l||t[10]!==b||t[11]!==x?(y={hits:l,isSearching:b,isStale:x,isError:O},t[8]=O,t[9]=l,t[10]=b,t[11]=x,t[12]=y):y=t[12],y}const H=3,T=10,Q=440,V=55;function ue(e){const t=Math.floor((e-Q)/V);return Math.min(T,Math.max(H,t))}function W(e,t,n=T*3,o=[]){return[...new Set([t,...o,...e])].slice(0,n)}function le(e,t){return!t.id||e.some(n=>n.slug===t.slug)?[...e]:[...e,t]}function fe(e,t,n,o,s=[]){if(e.length<=o)return{shown:[...e],hidden:[]};const r=new Map(e.map(a=>[a.slug,a])),i=new Set;n&&r.has(n)&&i.add(n);for(const a of s)r.has(a)&&i.add(a);for(const a of t){if(i.size>=o)break;r.has(a)&&i.add(a)}for(const a of e){if(i.size>=o)break;i.add(a.slug)}return{shown:e.filter(a=>i.has(a.slug)),hidden:e.filter(a=>!i.has(a.slug))}}const v=[];function Z(){const e=h.c(6);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=I.recentOrgs(),e[0]=t):t=e[0];const[n,o]=E(t,v),s=Array.isArray(n)?n:v;let r;e[1]!==o?(r=(a,c)=>o(d=>W(Array.isArray(d)?d:[],a,void 0,c)),e[1]=o,e[2]=r):r=e[2];let i;return e[3]!==s||e[4]!==r?(i={recent:s,remember:r},e[3]=s,e[4]=r,e[5]=i):i=e[5],i}const j={hidden:[],pinned:[],order:[]},g=(e,t)=>e.filter(n=>n!==t);function ee(e){if(typeof e!="object"||e===null)return j;const t=o=>Array.isArray(o)?o.filter(s=>typeof s=="string"):[],n=e;return{hidden:t(n.hidden),pinned:t(n.pinned),order:t(n.order)}}function he(e,t){return{...e,hidden:[...g(e.hidden,t),t],pinned:g(e.pinned,t)}}function te(e,t){return{...e,hidden:g(e.hidden,t)}}function me(e,t){return e.pinned.includes(t)?{...e,pinned:g(e.pinned,t)}:{...e,hidden:g(e.hidden,t),pinned:[...e.pinned,t]}}function ge(e,t,n){const o=s=>{const r=t.order.indexOf(s);return r===-1?Number.MAX_SAFE_INTEGER:r};return e.filter(s=>s.slug===n||!t.hidden.includes(s.slug)).map((s,r)=>({org:s,index:r})).sort((s,r)=>Number(t.pinned.includes(r.org.slug))-Number(t.pinned.includes(s.org.slug))||o(s.org.slug)-o(r.org.slug)||s.index-r.index).map(({org:s})=>s)}function ye(e,t,n,o){const s=t.indexOf(n),r=t.indexOf(o);if(s===-1||r===-1||s===r||e.pinned.includes(n)!==e.pinned.includes(o))return e;const i=[...t];return i.splice(s,1),i.splice(r,0,n),{...e,order:[...i,...e.order.filter(a=>!i.includes(a))]}}function pe(){const e=h.c(5),t=G(),{remember:n}=Z();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=I.railOrgPrefs(),e[0]=o):o=e[0];const[,s]=E(o,j);let r;return e[1]!==t||e[2]!==n||e[3]!==s?(r=(i,a)=>{const c=a?.includes(i)??!1;s(d=>te(ee(d),i)),n(i,c?a:void 0),t({to:"/$org/home",params:{org:i},search:{thread:void 0},viewTransition:!0})},e[1]=t,e[2]=n,e[3]=s,e[4]=r):r=e[4],r}const m=new F(!1);function Oe(){m.set(!0)}function be(){m.set(!1)}function xe(){const e=h.c(2),t=A.useSyncExternalStore(m.subscribe,m.get);let n;return e[0]!==t?(n=[t,m.set],e[0]=t,e[1]=n):n=e[1],n}function we(e){const t=h.c(8);let n;t[0]!==e?(n=z.orgNotice(e??""),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==e?(o=async()=>{const i=await fetch(`/api/${e}/notice`,{credentials:"include"});return i.ok?(await i.json()).notice??null:null},t[2]=e,t[3]=o):o=t[3];const s=!!e;let r;return t[4]!==n||t[5]!==o||t[6]!==s?(r={queryKey:n,queryFn:o,enabled:s,staleTime:6e4},t[4]=n,t[5]=o,t[6]=s,t[7]=r):r=t[7],_(r)}export{j as E,ce as I,K as L,U as O,de as a,Z as b,pe as c,fe as d,ge as e,ue as f,Y as g,he as h,X as i,xe as j,be as k,oe as l,ye as m,ie as n,Oe as o,ee as r,ae as s,me as t,we as u,le as w};
|
package/dist/client/assets/{use-org-repo-syncs-BxGtCYGM.js → use-org-repo-syncs-BukrXch8.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,a6 as f,am as y,K as S,i as _,q as d,e as R}from"./index-
|
|
1
|
+
import{c as r,a6 as f,am as y,K as S,i as _,q as d,e as R}from"./index-C6-0Ff1m.js";const m=5e3;function p(e){return(e??[]).some(n=>!n.lastSyncedAt&&!n.lastSyncError)}function g(){const e=r.c(7),{org:n}=f(),t=y();let i;e[0]!==n.id?(i=S.orgRepoSyncs(n.id),e[0]=n.id,e[1]=i):i=e[1];let s;e[2]!==t?(s=async()=>(await t.call("ORG_REPO_SYNC_LIST",{})).configs,e[2]=t,e[3]=s):s=e[3];let o;return e[4]!==i||e[5]!==s?(o={queryKey:i,staleTime:6e4,refetchInterval:E,queryFn:s},e[4]=i,e[5]=s,e[6]=o):o=e[6],_(o)}function E(e){return p(e.state.data)?m:!1}function P(){const e=r.c(2),n=g();let t;return e[0]!==n.data?(t=new Set((n.data??[]).map(O)),e[0]=n.data,e[1]=t):t=e[1],t}function O(e){return e.volume}function q(){const e=r.c(12),{org:n}=f(),t=y(),i=d();let s;e[0]!==n||e[1]!==i?(s=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[0]=n,e[1]=i,e[2]=s):s=e[2];const o=s;let c;e[3]!==t?(c=async u=>(await t.call("ORG_REPO_SYNC_CREATE",u)).config,e[3]=t,e[4]=c):c=e[4];let a;e[5]!==o||e[6]!==t?(a=u=>{t.call("ORG_REPO_SYNC_RUN",{id:u.id}).catch(C).then(o)},e[5]=o,e[6]=t,e[7]=a):a=e[7];let l;return e[8]!==o||e[9]!==c||e[10]!==a?(l={mutationFn:c,onSuccess:a,onSettled:o},e[8]=o,e[9]=c,e[10]=a,e[11]=l):l=e[11],R(l)}function C(){return null}function T(){const e=r.c(8),{org:n}=f(),t=y(),i=d();let s;e[0]!==t?(s=a=>t.call("ORG_REPO_SYNC_DELETE",{id:a}),e[0]=t,e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==i?(o=()=>i.invalidateQueries({queryKey:S.orgRepoSyncs(n.id)}),e[2]=n,e[3]=i,e[4]=o):o=e[4];let c;return e[5]!==s||e[6]!==o?(c={mutationFn:s,onSettled:o},e[5]=s,e[6]=o,e[7]=c):c=e[7],R(c)}export{P as a,q as b,T as c,g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,i as S,q as r,e as y,K as c}from"./index-
|
|
1
|
+
import{c as u,i as S,q as r,e as y,K as c}from"./index-C6-0Ff1m.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function m(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{C as a,O as b,m as c,h as d,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a as w,dW as b,a6 as E,i as F,an as M,K as y,am as T,q as A,e as O}from"./index-
|
|
1
|
+
import{c as u,a as w,dW as b,a6 as E,i as F,an as M,K as y,am as T,q as A,e as O}from"./index-C6-0Ff1m.js";import{D as C,o as G,a as $}from"./schema-DiSJ8SEc.js";import{r as z}from"./task-board-DNboqZMy.js";const I={organizationId:"",sidebar_items:null,coding_agent_mcp_excluded:null,simple_mode:null,default_home_agents:null,flags:null,submodule_credentials:null},x={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function P(t,e){return{queryKey:y.organizationSettings(e),queryFn:async()=>{try{return await M(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...I,organizationId:e}}},staleTime:6e4}}function c(t){const e=u.c(7),{org:n}=E();let s;e[0]!==n.id||e[1]!==n.slug?(s=P(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t,a=!!n.id;let i;return e[3]!==s||e[4]!==o||e[5]!==a?(i={...s,select:o,enabled:a},e[3]=s,e[4]=o,e[5]=a,e[6]=i):i=e[6],F(i)}function _(){const t=u.c(9),{org:e}=E(),n=T(),s=A();let o;t[0]!==e||t[1]!==n?(o=async l=>{const r=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!r)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return r},t[0]=e,t[1]=n,t[2]=o):o=t[2];let a;t[3]!==e||t[4]!==s?(a=l=>{s.setQueryData(y.organizationSettings(e.id),r=>({...r??I,...l}))},t[3]=e,t[4]=s,t[5]=a):a=t[5];let i;return t[6]!==o||t[7]!==a?(i={mutationFn:o,onSuccess:a},t[6]=o,t[7]=a,t[8]=i):i=t[8],O(i)}function R(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:x}function Y(){const{data:t}=c(D);return t??x}function D(t){return R(t.simple_mode)}function j(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i)=>e.mutate({simple_mode:a},i),s=(a,i)=>e.mutateAsync({simple_mode:a},i),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function B(){return d("reports_only")}function d(t){const e=u.c(5);let n;e[0]!==t?(n=a=>G(a.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=c(n);let o;return e[2]!==s||e[3]!==t?(o=s??C.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function W(t){const e=u.c(6);let n;e[0]!==t?(n=i=>G(i.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s,isError:o}=c(n);let a;return e[2]!==s||e[3]!==t||e[4]!==o?(a=s??(o?C.has(t):void 0),e[2]=s,e[3]=t,e[4]=o,e[5]=a):a=e[5],a}function V(){const t=d("chat_harness_sandbox_only");return b().runtime.agentSandbox&&t}function H(){const t=u.c(8),{org:e}=E(),n=T(),s=A();let o;t[0]!==n?(o=l=>n.call("ORGANIZATION_BLOCKS_EDITOR_SET",{enabled:l}),t[0]=n,t[1]=o):o=t[1];let a;t[2]!==e||t[3]!==s?(a=l=>{const{enabled:r}=l;s.setQueryData(y.organizationSettings(e.id),m=>m&&{...m,flags:{...m.flags,new_blocks_editor:r}})},t[2]=e,t[3]=s,t[4]=a):a=t[4];let i;return t[5]!==o||t[6]!==a?(i={mutationFn:o,onSuccess:a},t[5]=o,t[6]=a,t[7]=i):i=t[7],O(i)}function k(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function J(){const t=u.c(8),{data:e}=w.useSession(),n=b();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||k(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,a=n.hostingControlPlaneGa===!0,i=n.monitorGa===!0,l=d("hosting_enabled"),r=d("e2e_enabled"),m=d("monitor_enabled"),N=d("experiments_enabled"),g=o||a||l,S=o||a||r,p=o||i||m,h=o||a||N;let f;return t[3]!==g||t[4]!==S||t[5]!==p||t[6]!==h?(f={hosting:g,e2e:S,monitor:p,experiments:h},t[3]=g,t[4]=S,t[5]=p,t[6]=h,t[7]=f):f=t[7],f}function X(){const{data:t}=c(L);return t??!1}function L(t){return $(t.flags)}function tt(){const{data:t}=c(q);return t??!0}function q(t){return z(t.flags)}function et(){const t=u.c(7),e=_();let n,s;t[0]!==e?(n=(a,i,l)=>e.mutate({flags:{[a]:i}},l),s=(a,i,l)=>e.mutateAsync({flags:{[a]:i}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function nt(){const t=u.c(2),{data:e}=c(Q);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function Q(t){return t.coding_agent_mcp_excluded}function st(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutate({coding_agent_mcp_excluded:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function ot(){const t=u.c(2),{data:e}=c(U);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function U(t){return t.submodule_credentials}function at(){const t=u.c(5),e=_();let n;t[0]!==e?(n=(o,a)=>e.mutateAsync({submodule_credentials:o},a),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutateAsync:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}export{d as a,V as b,W as c,Y as d,J as e,tt as f,H as g,X as h,et as i,nt as j,st as k,j as l,ot as m,at as n,B as u};
|
package/dist/client/assets/{use-panel-navigate-Cw8nqOIV.js → use-panel-navigate-CkYTugDF.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,f as g,u as S,dJ as _,d as k,l as b,cK as P,dK as E}from"./index-
|
|
1
|
+
import{c as p,f as g,u as S,dJ as _,d as k,l as b,cK as P,dK as E}from"./index-C6-0Ff1m.js";import{c as I}from"./thread-route-DY_UV0gu.js";import{u as R}from"./use-project-scope-DwQViH2f.js";function x(e){const t=e.destination==="agent",a={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(a):a,mainpanel:void 0}}function K(){const e=p.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:T},e[0]=t):t=e[0],b(t)}function T(e){for(let t=e.matches.length-1;t>=0;t--){const a=e.matches[t]?.staticData;if(a?.mainView||a?.siteEditorView)return{mainView:a.mainView,siteEditorView:a.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function $(){const e=p.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const a=g(t);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const i=S(o),s={file:"file"in i&&typeof i.file=="string"?i.file:void 0,key:"key"in i&&typeof i.key=="string"?i.key:void 0,path:"path"in i&&typeof i.path=="string"?i.path:void 0},{mainView:r,siteEditorView:n}=K();return _({mainView:r,siteEditorView:n,params:a,search:s})}function A(){const e=p.c(11),t=k();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const o=g(a),i=I(),s=R(),r=o.org??"";let n;e[1]!==t||e[2]!==r||e[3]!==i||e[4]!==s?(n=(d,c)=>{const h=P(d),v=c?.virtualmcpid!==void 0||s!==null?"project":"organization",y=h.kind==="org-destination"||h.kind==="project-destination"&&v==="organization",V=w=>x({previous:w,destination:y?"organization":"agent",update:c?.search});E(t,{org:r,agentId:c?.virtualmcpid??i,tabId:d,destinationScope:v,taskKey:c?.taskKey,search:V,replace:c?.replace??!0})},e[1]=t,e[2]=r,e[3]=i,e[4]=s,e[5]=n):n=e[5];const m=n;let l;e[6]!==t?(l=d=>t({to:".",search:j,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const f=l;let u;return e[8]!==f||e[9]!==m?(u={openPanel:m,closePanel:f},e[8]=f,e[9]=m,e[10]=u):u=e[10],u}function j(e){return{...e,mainpanel:!1,sidepanel:!0}}export{A as a,x as r,$ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,a6 as C,dW as y,bu as B,i as N,K as F}from"./index-
|
|
1
|
+
import{c as O,a6 as C,dW as y,bu as B,i as N,K as F}from"./index-C6-0Ff1m.js";import{m as J}from"./match-site-slug-config-B47_xZCi.js";import{u as K}from"./use-file-configs-I6vvS9gB.js";import{a as U}from"./use-blog-view-BHifDign.js";import{e as $}from"./use-organization-settings-BmAIEgEL.js";import{b as k}from"./use-blocks-v8-project-z5uA6d0S.js";const u=["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","automations"],q=["overview","reports","board","site-editor","blog"],T=1,D=["overview","context","monitor","plan","board"],L=["blog"],Q=["calendar","experiments"],H=["hosting"],Y={calendar:!1,hosting:!1,"site-editor":!1,blog:!1};function W(t){return[...D,...t.calendar?Q:[],...t.hosting&&t["site-editor"]?H:[],...t.blog?L:[]]}function z(t,e){const n=new Set(t??[]);return W(e).filter(s=>!n.has(s))}function le(t,e,n){const s=new Set([...t??[],...W({...e,"site-editor":e["site-editor"]&&n.includes("site-editor")})]);return u.filter(r=>s.has(r))}function fe(t,e){if(!t&&e===void 0)return new Set(D);const n=new Set(e!==void 0?V(e,T):V(X(t),t?.sidebarViewsVersion,z(t?.sidebarViewsSeen,Y)));return new Set(D.filter(s=>n.has(s)))}const G=["calendar","experiments","assets","releases","hosting","e2e"];function ue(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const s=e?.id===t?e:n?.id===t?n:null;return{project:s,resolvedScopeId:s?t:null}}function X(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function V(t,e,n=[]){const s=new Set(t??[]);if(e!==T)for(const r of q)s.add(r);for(const r of n)r==="hosting"&&!s.has("site-editor")||s.add(r);return u.filter(r=>s.has(r))}function Z(t){return u.some(e=>e===t)}function M(t){return G.some(e=>e===t)}function ee(t,e){return{overview:t,context:!0,monitor:!0,plan:!0,reports:t,board:t,"site-editor":t,blog:t&&e.blog===!0,assets:e.assets,releases:t&&e.releases,hosting:e.hosting,e2e:e.e2e,calendar:t&&e.calendar,experiments:t&&e.experiments,automations:!0}}function de(t,e,n){const s=ee(e,n);return t?s:{...s,overview:!0,reports:!0,board:!0}}function Se(t,e,n,s=[]){const r=new Set(V(t,n,s));return u.filter(o=>e[o]&&r.has(o))}function be(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function ge(t){return u.filter(e=>t[e])}function te(t,e,n){return!Z(t)||e[t]?!1:t==="blog"?n.blog!==!0:!M(t)||t==="releases"||t==="calendar"||t==="experiments"?!0:!(t==="assets"?n.assets:n.siteAccess)}function Ve(t,e,n,s,r){return te(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!s.includes("content")||t==="code"&&r&&!s.includes("code")}function we(t,e,n,s){const r=new Set(V(t,s));return n?r.add(e):r.delete(e),u.filter(o=>r.has(o))}function Pe(t){const e=O.c(22),{org:n}=C(),s=y(),r=$(),o=U(),i=K();let c;e[0]!==t?(c=k(t),e[0]=t,e[1]=c):c=e[1];const d=c;let S;e[2]!==t?(S=B(t),e[2]=t,e[3]=S):S=e[3];const a=S,w=s.hostingEnabled===!0,R=w&&!!a,j=se(n.slug,a,R),v=j.data?.owned===!0;let l;e[4]!==i.data?.configs?(l=i.data?.configs??[],e[4]=i.data?.configs,e[5]=l):l=e[5];const P=t?.metadata?.assetStorageConfigId;let b;e[6]!==a||e[7]!==l||e[8]!==P?(b=J(l,a,P),e[6]=a,e[7]=l,e[8]=P,e[9]=b):b=e[9];const E=!!b,m=d&&!!t?.metadata?.siteSlug,_=w&&v&&r.hosting,p=w&&v&&r.e2e,I=o===!0;let f;e[10]!==E||e[11]!==m||e[12]!==_||e[13]!==p||e[14]!==I||e[15]!==d?(f={assets:E,releases:m,hosting:_,e2e:p,calendar:d,experiments:d,blog:I},e[10]=E,e[11]=m,e[12]=_,e[13]=p,e[14]=I,e[15]=d,e[16]=f):f=e[16];const A=!!(a||t?.metadata?.assetStorageConfigId)&&i.isPending,h=R&&j.isPending,x=o===void 0;let g;return e[17]!==f||e[18]!==A||e[19]!==h||e[20]!==x?(g={presence:f,assetsPending:A,siteAccessPending:h,blogPending:x},e[17]=f,e[18]=A,e[19]=h,e[20]=x,e[21]=g):g=e[21],g}function se(t,e,n){const s=O.c(10);let r;s[0]!==t||s[1]!==e?(r=F.hostingAccess(t,e??""),s[0]=t,s[1]=e,s[2]=r):r=s[2];let o;s[3]!==t||s[4]!==e?(o=async()=>{const c=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return c.ok?await c.json():{owned:!1,canWrite:!1}},s[3]=t,s[4]=e,s[5]=o):o=s[5];let i;return s[6]!==n||s[7]!==r||s[8]!==o?(i={queryKey:r,queryFn:o,enabled:n,staleTime:6e4},s[6]=n,s[7]=r,s[8]=o,s[9]=i):i=s[9],N(i)}export{u as P,Se as a,T as b,ue as c,de as d,Ve as e,te as f,V as g,ge as h,M as i,D as j,le as k,be as l,z as o,ee as p,X as r,fe as s,we as t,Pe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,f as P,u as T,d as N,cL as R,dL as E,dK as k,ag as l}from"./index-
|
|
1
|
+
import{c as I,f as P,u as T,d as N,cL as R,dL as E,dK as k,ag as l}from"./index-C6-0Ff1m.js";import{d as C,a as O,p as w}from"./repository-binding-Do6sAdct.js";const x=1;function b(e){return(e??[]).filter(E)}function L(){const e=I.c(4);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const r=P(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const t=T(n);if(r.agentId)return r.agentId;let a;return e[2]!==t?(a="virtualmcpid"in t&&typeof t.virtualmcpid=="string"?t.virtualmcpid.trim():void 0,e[2]=t,e[3]=a):a=e[3],a||null}function B(){const e=I.c(16),o=N();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const n=P(r),t=R(),a=C(),c=b(a),s=L(),y=c.find(i=>i.id===s)??null;let p;e[1]!==a||e[2]!==s?(p=s&&a.length>0&&!a.some(i=>i.id===s)?s:null,e[1]=a,e[2]=s,e[3]=p):p=e[3];const _=O(p),u=y??b(_?[_]:[])[0]??null;let m;e[4]!==t||e[5]!==o||e[6]!==n||e[7]!==s?(m=i=>{if(i===s&&t!==void 0)return;const h=n.org??"",S=M;if(i){k(o,{org:h,agentId:i,tabId:t==="board"||t==="reports"?t:"overview",search:S,replace:!1});return}if(t==="board"){o({to:l.tasks,params:{org:h,taskKey:void 0},search:S});return}const j=t==="files"?l.library:t==="monitoring"?l.monitoring:t==="plan"?l.plan:l.home;o({to:j,params:{org:h},search:S})},e[4]=t,e[5]=o,e[6]=n,e[7]=s,e[8]=m):m=e[8];const f=m,v=w(u),g=c.length>=x;let d;return e[9]!==u||e[10]!==c||e[11]!==s||e[12]!==f||e[13]!==v||e[14]!==g?(d={scopeId:s,project:u,repo:v,projects:c,hasProjects:g,setScope:f},e[9]=u,e[10]=c,e[11]=s,e[12]=f,e[13]=v,e[14]=g,e[15]=d):d=e[15],d}function M(e){return{...e,virtualmcpid:void 0,thread:void 0,mainpanel:void 0,path:void 0,preview:void 0,expanded:void 0}}export{B as a,b as s,L as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as A,c as m,l as j,at as y,av as b,ai as N}from"./index-
|
|
1
|
+
import{r as A,c as m,l as j,at as y,av as b,ai as N}from"./index-C6-0Ff1m.js";import{u as w}from"./use-blog-view-BHifDign.js";import{P as E}from"./project-apps-C4vT9LXH.js";import{a as P}from"./repository-binding-Do6sAdct.js";function D(n,e){const t=new Set(e);return t.size===0?n:n.filter(c=>t.has(c.connectionId))}function R(n){const e=n.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(t=>!!t&&typeof t=="object"&&typeof t.connectionId=="string"&&typeof t.toolName=="string"&&["undefined","string"].includes(typeof t.label)&&(t.icon==null||typeof t.icon=="string")):[]}const V=4;function I(n,e){return n.app===e.app&&n.projectId===e.projectId}function h(n,e,t=V){return[e,...n.filter(c=>!I(c,e))].slice(0,t)}function _(n,e){return n.filter(t=>!I(t,e))}function O(n,e,t){const c=n.findLast(l=>l.staticData.mainView);if(!c)return null;const{mainView:i,siteEditorView:p,local:r}=c.staticData;if(!i)return null;const o=c.params,a=o?.agentId;if(a&&i==="app"&&o.connectionId&&o.toolName)return{app:t(o.connectionId,o.toolName),projectId:a,connection:{id:o.connectionId,toolName:o.toolName}};const s=p?"site-editor":i;return e(s)?a?{app:s,projectId:a}:r?{app:s,projectId:null}:null:null}const d=[];function S(n){const e=m.c(12);let t;e[0]!==n?(t=b.recentApps(n),e[0]=n,e[1]=t):t=e[1];const[c,i]=y(t,d),p=w(),r=Array.isArray(c)?c:d;let o;e[2]!==p||e[3]!==r?(o=p?r:r.filter(T),e[2]=p,e[3]=r,e[4]=o):o=e[4];let a,s;e[5]!==i?(a=f=>i(u=>h(Array.isArray(u)?u:[],f)),s=f=>i(u=>_(Array.isArray(u)?u:[],f)),e[5]=i,e[6]=a,e[7]=s):(a=e[6],s=e[7]);let l;return e[8]!==o||e[9]!==a||e[10]!==s?(l={recent:o,remember:a,forget:s},e[8]=o,e[9]=a,e[10]=s,e[11]=l):l=e[11],l}function T(n){return n.app!=="blog"}function g(){const n=m.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:L,structuralSharing:!0},n[0]=e):e=n[0],j(e)}function L(n){return O(n.matches,C,N)}function C(n){return n in E}function Y(n){const{remember:e}=S(n),t=g(),c=P(t?.projectId),i=t?.projectId&&c?.id===t.projectId?c.title:null,p=t?.connection&&c?R(c).find(o=>o.connectionId===t.connection?.id&&o.toolName===t.connection.toolName):void 0,r=t?.connection&&{id:t.connection.id,toolName:t.connection.toolName,label:p?.label||t.connection.toolName,icon:p?.icon};A.useEffect(()=>{!t?.projectId||!i||e({app:t.app,projectId:t.projectId,projectTitle:i,...r&&{connection:r}})},[n,t?.app,t?.projectId,i,r?.label,r?.icon])}export{g as a,S as b,D as k,R as p,Y as u};
|
package/dist/client/assets/{use-reports-diagnostic-CMKEMOUj.js → use-reports-diagnostic-DKW88lIw.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as N,a6 as Q,W as F,T as A,i as f,K as R,h0 as L,$ as K,U}from"./index-
|
|
1
|
+
import{c as N,a6 as Q,W as F,T as A,i as f,K as R,h0 as L,$ as K,U}from"./index-C6-0Ff1m.js";import{m as O}from"./use-mcp-client-Bg8mQo9f.js";import{u as h}from"./companions-core-DhUD88pR.js";function D(n){return n?n.scanned_at?"ready":n.run_in_progress?"generating":"none":"none"}function M(n){return n.connectionQueryPending?!0:!n.hasConnection||n.cdClientFailed?!1:n.diagnosticQueryPending}const b=2e4;function q(n){if(typeof n!="string"||!n)return null;try{return new URL(n).hostname||null}catch{return null}}function j(){const n=N.c(24),{org:e}=Q(),t=F.REPORTS(e.id);let l;n[0]!==e.id||n[1]!==e.slug?(l=O({connectionId:A,orgId:e.id,orgSlug:e.slug}),n[0]=e.id,n[1]=e.slug,n[2]=l):l=n[2];const{data:p}=f(l),u=f({queryKey:R.reportsConnection(e.id,t),enabled:!!p,retry:!1,staleTime:6e4,queryFn:async()=>{if(!p)throw new Error("selfClient not ready");const _=await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(_)}}),m=u.data?.item??null,{data:s,isError:y}=f({...O({connectionId:t,orgId:e.id,orgSlug:e.slug}),enabled:!!m}),C=R.reportsDiagnostic(e.id,t),E=!!s;let i;n[3]!==s?(i=async()=>{if(!s)throw new Error("cdClient not ready");const _=await s.callTool({name:L,arguments:{}});return h(_).diagnostic??null},n[3]=s,n[4]=i):i=n[4];let d;n[5]!==C||n[6]!==E||n[7]!==i?(d={queryKey:C,enabled:E,retry:1,refetchInterval:v,queryFn:i},n[5]=C,n[6]=E,n[7]=i,n[8]=d):d=n[8];const r=f(d),o=m?.metadata?.siteUrl,P=r.data??null,w=r.isSuccess,I=!!m;let a;n[9]!==y||n[10]!==u.isPending||n[11]!==r.isPending||n[12]!==I?(a=M({connectionQueryPending:u.isPending,hasConnection:I,cdClientFailed:y,diagnosticQueryPending:r.isPending}),n[9]=y,n[10]=u.isPending,n[11]=r.isPending,n[12]=I,n[13]=a):a=n[13];const S=typeof o=="string"&&o?o:null;let c;n[14]!==o?(c=q(o),n[14]=o,n[15]=c):c=n[15];const T=s??null;let g;return n[16]!==t||n[17]!==r.isSuccess||n[18]!==c||n[19]!==T||n[20]!==P||n[21]!==a||n[22]!==S?(g={diagnostic:P,isSuccess:w,isLoading:a,siteUrl:S,host:c,connectionId:t,cdClient:T},n[16]=t,n[17]=r.isSuccess,n[18]=c,n[19]=T,n[20]=P,n[21]=a,n[22]=S,n[23]=g):g=n[23],g}function v(n){return n.state.status!=="error"&&D(n.state.data)==="generating"?b:!1}function B(n,e){return{to:K.app,params:{org:n.slug,agentId:U(n.id),connectionId:e,toolName:L},search:{}}}export{D as d,B as r,j as u};
|
package/dist/client/assets/{use-sandbox-events-B_nCM-ka.js → use-sandbox-events-DwjSc3R2.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as B,q as be,i as X,K as T,eK as Z,cJ as je,r as m,j as ce,a6 as xe,cI as ue}from"./index-C0zcxte6.js";import{h as Pe,u as Ae}from"./chat-context-CWdOGDBM.js";import{b as Ie}from"./sandbox-url-D3mC8qhT.js";import{b as Ue}from"./repository-binding-BSsS-pLT.js";import{e as Me}from"./backoff-CrEUbyZT.js";const w={MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,NotFound:-32001,Conflict:-32002,InvalidBlock:-32003,ReadOnly:-32005,Unsupported:-32006,LimitExceeded:-32007,Unavailable:-32008,Unauthorized:-32010};class y extends Error{code;data;constructor(n,s,e){super(s),this.name="ContentProtocolError",this.code=n,this.data=e}toJSON(){return this.data===void 0?{code:this.code,message:this.message}:{code:this.code,message:this.message,data:this.data}}static from(n){return new y(n.code,n.message,n.data)}}const $="deco-content",K={major:1},ye=1;async function $e(t){let n=new Uint8Array(await t.arrayBuffer());if(n[0]===31&&n[1]===139){const s=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip"));n=new Uint8Array(await new Response(s).arrayBuffer())}return JSON.parse(new TextDecoder().decode(n))}const z={major:K.major,minor:ye},Se=`the endpoint speaks an older ${$} than this client needs (${z.major}.${z.minor} or newer): update @decocms/blocks in the site (8.2.0 or newer) and start deco serve again`;function F(t,n,s){const e={reason:n,required:{...z}};if(s){e.actual={protocol:s.protocol,major:s.version?.major,minor:s.version?.minor};const o=s.server;typeof o?.name=="string"&&typeof o.version=="string"&&(e.server={name:o.name,version:o.version})}return new y(w.Unsupported,t,e)}function Fe(t){const n=t??{},{protocol:s,version:e}=n;if(s!==$)throw F(`the endpoint speaks ${JSON.stringify(s)}, not ${$}`,"protocol",n);if(e?.major!==K.major)throw F(`the endpoint speaks ${$} ${String(e?.major)}.x; this client speaks ${K.major}.x`,"major",n);if(typeof e.minor!="number"||e.minor<ye)throw F(Se,"outdated",n);return t}function le(t,n){return n.code===w.MethodNotFound&&t.startsWith("changes.")?F(Se,"outdated"):y.from(n)}function Be(t){const n=t.fetch??(r=>fetch(r));let s=1;async function e(r){const a={"content-type":"application/json",accept:"application/json",...t.headers},c=await n(new Request(t.endpoint,{method:"POST",headers:a,body:JSON.stringify(r)}));let i;try{i=await $e(c)}catch{throw new y(w.Unavailable,`the endpoint answered HTTP ${c.status} without a JSON-RPC body`)}if(!c.ok||!Array.isArray(i)&&i?.id===null){const l=i?.error;throw l?y.from(l):new y(w.Unavailable,`the endpoint answered HTTP ${c.status}`)}return i}const o=async(r,a)=>{const c=s++,i=await e({jsonrpc:"2.0",id:c,method:r,params:a??{}});if(i.error)throw le(r,i.error);return i.result};return{call:o,describe:async()=>Fe(await o("describe")),schemaGet:r=>o("schema.get",r),blocksList:r=>o("blocks.list",r),blocksApply:r=>o("blocks.apply",r),changesList:r=>o("changes.list",r),changesGet:r=>o("changes.get",r),changesDiscard:r=>o("changes.discard",r),async batch(r){const a=r.map(()=>s++),c=await e(r.map((l,d)=>({jsonrpc:"2.0",id:a[d],method:l.method,params:l.params??{}}))),i=new Map(c.map(l=>[l.id,l]));return a.map((l,d)=>{const f=i.get(l);return f?f.error?{ok:!1,error:le(r[d].method,f.error)}:{ok:!0,result:f.result}:{ok:!1,error:new y(w.InternalError,"no response for this call")}})}}}function Qe(t){return t&&!t.edited?{ifNoneMatch:t.revision}:{}}const de=20,fe=5,pe=500;function pt(t){return t instanceof y?t.code===w.MethodNotFound?!0:t.code===w.Unsupported&&t.data?.reason==="outdated":!1}function he(t,n,s=t){return s&&s!==t?s:n.notModified?t?{...t,base:n.base}:null:{revision:n.revision,base:n.base,changes:n.changes}}async function qe(t,n,s){const e=T.contentChanges(s),o=t.getQueryData(e),r=await n.changesList(Qe(o)),a=he(o,r,t.getQueryData(e));if(a)return a;const c=await n.changesList({}),i=he(void 0,c,t.getQueryData(e));if(!i)throw new y(w.InternalError,"changes.list returned notModified without a cached list");return i}async function ht(t,n,s){const o=await Be({endpoint:new URL(`/api/${t}/decofile/${encodeURIComponent(n)}/${encodeURIComponent(s)}/rpc`,window.location.origin).href}).changesList();return o.notModified?0:Object.keys(o.changes).length}async function we(t,n){const s=[];for(let r=0;r<n.length;r+=de)s.push(n.slice(r,r+de));const e=Object.create(null),o=[];for(let r=0;r<s.length;r+=fe){const a=await t.batch(s.slice(r,r+fe).map(c=>({method:"changes.get",params:{names:c}})));for(const c of a){if(!c.ok)throw c.error;const i=c.result;Object.assign(e,i.entries),o.push(...i.diagnostics)}}return{entries:e,diagnostics:o}}async function mt(t,n){let s={revision:"",versions:{}};for(let e=0;e<n.length;e+=pe){const o=n.slice(e,e+pe),r=await t.changesDiscard({names:o.map(a=>a.name),ifMatch:Object.fromEntries(o.map(a=>[a.name,a.version]))});s={revision:r.revision,versions:{...s.versions,...r.versions}}}return s}function gt(t){return t instanceof y&&t.code===w.Conflict}function ee(t){return t?.kind==="protocol"?t:null}function Et(t,n,s){const e=B.c(14);let o;e[0]!==s?(o={},e[0]=s,e[1]=o):o=e[1];const r=o,a=be();let c;e[2]!==t?(c=ee(t),e[2]=t,e[3]=c):c=e[3];const i=c,l=!!i&&!!n&&r.enabled!==!1;let d;e[4]!==n?(d=T.contentChanges(n??""),e[4]=n,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==l||e[8]!==i||e[9]!==a?(f=l?()=>qe(a,i.client,n):Z,e[6]=n,e[7]=l,e[8]=i,e[9]=a,e[10]=f):f=e[10];let v;return e[11]!==d||e[12]!==f?(v={queryKey:d,queryFn:f,staleTime:0},e[11]=d,e[12]=f,e[13]=v):v=e[13],X(v)}function Je(t){if(!t)return"";const n=Object.entries(t.changes).sort(([s],[e])=>s<e?-1:s>e?1:0).map(([s,e])=>[s,e.kind,e.version,e.baseVersion]);return JSON.stringify([t.revision,t.base.revision,t.base.resolvedRef,n])}function vt(t,n,s){const e=B.c(14);let o;e[0]!==t?(o=ee(t),e[0]=t,e[1]=o):o=e[1];const r=o;let a;e[2]!==s?(a=s?Object.keys(s.changes):[],e[2]=s,e[3]=a):a=e[3];const c=a,i=!!r&&!!n&&!!s&&c.length>0;let l;e[4]!==n||e[5]!==s?(l=T.contentChangeSides(n??"",Je(s)),e[4]=n,e[5]=s,e[6]=l):l=e[6];let d;e[7]!==i||e[8]!==c||e[9]!==r?(d=i?()=>we(r.client,c):Z,e[7]=i,e[8]=c,e[9]=r,e[10]=d):d=e[10];let f;return e[11]!==l||e[12]!==d?(f={queryKey:l,queryFn:d,staleTime:Number.POSITIVE_INFINITY},e[11]=l,e[12]=d,e[13]=f):f=e[13],X(f)}function bt(t,n,s){const e=B.c(16);let o;e[0]!==t?(o=ee(t),e[0]=t,e[1]=o):o=e[1];const r=o;let a,c,i,l;if(e[2]!==n||e[3]!==s?.changes||e[4]!==r){const v=Object.entries(s?.changes??{}).filter(We).map(Ye).sort(He);c=v.map(Ge);const R=JSON.stringify(v.map(Ve));a=!!r&&!!n&&c.length>0,l=X,i=T.contentDeletedCopies(n??"",R),e[2]=n,e[3]=s?.changes,e[4]=r,e[5]=a,e[6]=c,e[7]=i,e[8]=l}else a=e[5],c=e[6],i=e[7],l=e[8];let d;e[9]!==a||e[10]!==c||e[11]!==r?(d=a?async()=>{const v=await we(r.client,c),R=Object.create(null);for(const[x,P]of Object.entries(v.entries))R[x]=P.before&&typeof P.before=="object"?P.before:null;return R}:Z,e[9]=a,e[10]=c,e[11]=r,e[12]=d):d=e[12];let f;return e[13]!==i||e[14]!==d?(f={queryKey:i,queryFn:d,staleTime:Number.POSITIVE_INFINITY,placeholderData:je},e[13]=i,e[14]=d,e[15]=f):f=e[15],l(f)}function Ve(t){return[t.name,t.base]}function Ge(t){return t.name}function He(t,n){return t.name<n.name?-1:t.name>n.name?1:0}function Ye(t){const[n,s]=t;return{name:n,base:s.baseVersion??""}}function We(t){const[,n]=t;return n.kind==="delete"}function me(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const Ke={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Ce=m.createContext(Ke),ge=16384;class ze{data="";append(n){this.data+=n,this.data.length>ge&&(this.data=this.data.slice(this.data.length-ge))}get(){return this.data}clear(){this.data=""}}const Xe=1e3,Ze=3e4,et=3e3,Ee=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],ve="log";function tt(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function nt(t){return t===404}function st(t){return/(?:^|[\s;&|(])deno\s+task\b/.test(t)}async function rt(t){try{const n=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(et)});return await n.body?.cancel().catch(()=>{}),nt(n.status)}catch{return!1}}const Oe=Pe(Ce);function yt(t){const n=B.c(10);let s,e,o;n[0]!==t?({resetKey:o,children:s,...e}=t,n[0]=t,n[1]=s,n[2]=e,n[3]=o):(s=n[1],e=n[2],o=n[3]);let r;n[4]!==e||n[5]!==o?(r=ce.jsx(ot,{...e},o),n[4]=e,n[5]=o,n[6]=r):r=n[6];let a;return n[7]!==s||n[8]!==r?(a=ce.jsx(Oe.Host,{source:r,children:s}),n[7]=s,n[8]=r,n[9]=a):a=n[9],a}function ot(t){return Oe.usePublish(at(t)),null}function at({virtualMcpId:t,branch:n,previewUrl:s=null,enabled:e=!0}){const{org:o}=xe(),r=be(),a=Ae()?.taskId??null,[c,i]=m.useState(null),[l,d]=m.useState({phase:"idle"}),[f,v]=m.useState({state:"running"}),[R,x]=m.useState({kind:"unknown"}),[P,Q]=m.useState(!1),[Re,q]=m.useState([]),[De,J]=m.useState([]),[,ke]=m.useState(0),D=m.useRef(new Map),V=m.useRef(new Set),A=m.useRef(new Set),G=m.useRef(null),I=tt(s),te=Ue(t)?.metadata?.runtime?.selected==="deno",Ne=E=>{let b=D.current.get(E);return b||(b=new ze,D.current.set(E,b)),b};return m.useEffect(()=>{if(i(null),d({phase:"idle"}),v({state:"running"}),x({kind:"unknown"}),G.current=null,Q(!1),q([]),J([]),D.current.clear(),!t||!n||!e)return;const E=Ie({orgSlug:o.slug,virtualMcpId:t,branch:n,threadId:a??null},"events");let b=!1,k=0,U=null,N=null,_=null,C=null,S=null,M=null,ne=!1;const H=()=>{N&&clearTimeout(N),N=setTimeout(()=>{N=null,r.invalidateQueries({queryKey:T.liveMeta(o.slug,t,n)})},1e3)},_e=u=>{try{const p=JSON.parse(u.data);i(p),p.kind!=="failed"&&(Q(!1),k=0),p.kind==="ready"&&ae()}catch(p){console.warn("[vm-events] bad phase payload",p)}},se=()=>{Q(!0),i(null),d({phase:"idle"}),v({state:"running"}),x({kind:"unknown"}),q([]),J([]),D.current.clear()},re=u=>{try{const p=JSON.parse(u.data);if(typeof p.data!="string")return;k=0;const g=p.data.replace(/\r?\n/g,`\r
|
|
1
|
+
import{c as B,q as be,i as X,K as T,eK as Z,cJ as je,r as m,j as ce,a6 as xe,cI as ue}from"./index-C6-0Ff1m.js";import{h as Pe,u as Ae}from"./chat-context-BXxmldjV.js";import{b as Ie}from"./sandbox-url-D3mC8qhT.js";import{b as Ue}from"./repository-binding-Do6sAdct.js";import{e as Me}from"./backoff-CrEUbyZT.js";const w={MethodNotFound:-32601,InvalidParams:-32602,InternalError:-32603,NotFound:-32001,Conflict:-32002,InvalidBlock:-32003,ReadOnly:-32005,Unsupported:-32006,LimitExceeded:-32007,Unavailable:-32008,Unauthorized:-32010};class y extends Error{code;data;constructor(n,s,e){super(s),this.name="ContentProtocolError",this.code=n,this.data=e}toJSON(){return this.data===void 0?{code:this.code,message:this.message}:{code:this.code,message:this.message,data:this.data}}static from(n){return new y(n.code,n.message,n.data)}}const $="deco-content",K={major:1},ye=1;async function $e(t){let n=new Uint8Array(await t.arrayBuffer());if(n[0]===31&&n[1]===139){const s=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip"));n=new Uint8Array(await new Response(s).arrayBuffer())}return JSON.parse(new TextDecoder().decode(n))}const z={major:K.major,minor:ye},Se=`the endpoint speaks an older ${$} than this client needs (${z.major}.${z.minor} or newer): update @decocms/blocks in the site (8.2.0 or newer) and start deco serve again`;function F(t,n,s){const e={reason:n,required:{...z}};if(s){e.actual={protocol:s.protocol,major:s.version?.major,minor:s.version?.minor};const o=s.server;typeof o?.name=="string"&&typeof o.version=="string"&&(e.server={name:o.name,version:o.version})}return new y(w.Unsupported,t,e)}function Fe(t){const n=t??{},{protocol:s,version:e}=n;if(s!==$)throw F(`the endpoint speaks ${JSON.stringify(s)}, not ${$}`,"protocol",n);if(e?.major!==K.major)throw F(`the endpoint speaks ${$} ${String(e?.major)}.x; this client speaks ${K.major}.x`,"major",n);if(typeof e.minor!="number"||e.minor<ye)throw F(Se,"outdated",n);return t}function le(t,n){return n.code===w.MethodNotFound&&t.startsWith("changes.")?F(Se,"outdated"):y.from(n)}function Be(t){const n=t.fetch??(r=>fetch(r));let s=1;async function e(r){const a={"content-type":"application/json",accept:"application/json",...t.headers},c=await n(new Request(t.endpoint,{method:"POST",headers:a,body:JSON.stringify(r)}));let i;try{i=await $e(c)}catch{throw new y(w.Unavailable,`the endpoint answered HTTP ${c.status} without a JSON-RPC body`)}if(!c.ok||!Array.isArray(i)&&i?.id===null){const l=i?.error;throw l?y.from(l):new y(w.Unavailable,`the endpoint answered HTTP ${c.status}`)}return i}const o=async(r,a)=>{const c=s++,i=await e({jsonrpc:"2.0",id:c,method:r,params:a??{}});if(i.error)throw le(r,i.error);return i.result};return{call:o,describe:async()=>Fe(await o("describe")),schemaGet:r=>o("schema.get",r),blocksList:r=>o("blocks.list",r),blocksApply:r=>o("blocks.apply",r),changesList:r=>o("changes.list",r),changesGet:r=>o("changes.get",r),changesDiscard:r=>o("changes.discard",r),async batch(r){const a=r.map(()=>s++),c=await e(r.map((l,d)=>({jsonrpc:"2.0",id:a[d],method:l.method,params:l.params??{}}))),i=new Map(c.map(l=>[l.id,l]));return a.map((l,d)=>{const f=i.get(l);return f?f.error?{ok:!1,error:le(r[d].method,f.error)}:{ok:!0,result:f.result}:{ok:!1,error:new y(w.InternalError,"no response for this call")}})}}}function Qe(t){return t&&!t.edited?{ifNoneMatch:t.revision}:{}}const de=20,fe=5,pe=500;function pt(t){return t instanceof y?t.code===w.MethodNotFound?!0:t.code===w.Unsupported&&t.data?.reason==="outdated":!1}function he(t,n,s=t){return s&&s!==t?s:n.notModified?t?{...t,base:n.base}:null:{revision:n.revision,base:n.base,changes:n.changes}}async function qe(t,n,s){const e=T.contentChanges(s),o=t.getQueryData(e),r=await n.changesList(Qe(o)),a=he(o,r,t.getQueryData(e));if(a)return a;const c=await n.changesList({}),i=he(void 0,c,t.getQueryData(e));if(!i)throw new y(w.InternalError,"changes.list returned notModified without a cached list");return i}async function ht(t,n,s){const o=await Be({endpoint:new URL(`/api/${t}/decofile/${encodeURIComponent(n)}/${encodeURIComponent(s)}/rpc`,window.location.origin).href}).changesList();return o.notModified?0:Object.keys(o.changes).length}async function we(t,n){const s=[];for(let r=0;r<n.length;r+=de)s.push(n.slice(r,r+de));const e=Object.create(null),o=[];for(let r=0;r<s.length;r+=fe){const a=await t.batch(s.slice(r,r+fe).map(c=>({method:"changes.get",params:{names:c}})));for(const c of a){if(!c.ok)throw c.error;const i=c.result;Object.assign(e,i.entries),o.push(...i.diagnostics)}}return{entries:e,diagnostics:o}}async function mt(t,n){let s={revision:"",versions:{}};for(let e=0;e<n.length;e+=pe){const o=n.slice(e,e+pe),r=await t.changesDiscard({names:o.map(a=>a.name),ifMatch:Object.fromEntries(o.map(a=>[a.name,a.version]))});s={revision:r.revision,versions:{...s.versions,...r.versions}}}return s}function gt(t){return t instanceof y&&t.code===w.Conflict}function ee(t){return t?.kind==="protocol"?t:null}function Et(t,n,s){const e=B.c(14);let o;e[0]!==s?(o={},e[0]=s,e[1]=o):o=e[1];const r=o,a=be();let c;e[2]!==t?(c=ee(t),e[2]=t,e[3]=c):c=e[3];const i=c,l=!!i&&!!n&&r.enabled!==!1;let d;e[4]!==n?(d=T.contentChanges(n??""),e[4]=n,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==l||e[8]!==i||e[9]!==a?(f=l?()=>qe(a,i.client,n):Z,e[6]=n,e[7]=l,e[8]=i,e[9]=a,e[10]=f):f=e[10];let v;return e[11]!==d||e[12]!==f?(v={queryKey:d,queryFn:f,staleTime:0},e[11]=d,e[12]=f,e[13]=v):v=e[13],X(v)}function Je(t){if(!t)return"";const n=Object.entries(t.changes).sort(([s],[e])=>s<e?-1:s>e?1:0).map(([s,e])=>[s,e.kind,e.version,e.baseVersion]);return JSON.stringify([t.revision,t.base.revision,t.base.resolvedRef,n])}function vt(t,n,s){const e=B.c(14);let o;e[0]!==t?(o=ee(t),e[0]=t,e[1]=o):o=e[1];const r=o;let a;e[2]!==s?(a=s?Object.keys(s.changes):[],e[2]=s,e[3]=a):a=e[3];const c=a,i=!!r&&!!n&&!!s&&c.length>0;let l;e[4]!==n||e[5]!==s?(l=T.contentChangeSides(n??"",Je(s)),e[4]=n,e[5]=s,e[6]=l):l=e[6];let d;e[7]!==i||e[8]!==c||e[9]!==r?(d=i?()=>we(r.client,c):Z,e[7]=i,e[8]=c,e[9]=r,e[10]=d):d=e[10];let f;return e[11]!==l||e[12]!==d?(f={queryKey:l,queryFn:d,staleTime:Number.POSITIVE_INFINITY},e[11]=l,e[12]=d,e[13]=f):f=e[13],X(f)}function bt(t,n,s){const e=B.c(16);let o;e[0]!==t?(o=ee(t),e[0]=t,e[1]=o):o=e[1];const r=o;let a,c,i,l;if(e[2]!==n||e[3]!==s?.changes||e[4]!==r){const v=Object.entries(s?.changes??{}).filter(We).map(Ye).sort(He);c=v.map(Ge);const R=JSON.stringify(v.map(Ve));a=!!r&&!!n&&c.length>0,l=X,i=T.contentDeletedCopies(n??"",R),e[2]=n,e[3]=s?.changes,e[4]=r,e[5]=a,e[6]=c,e[7]=i,e[8]=l}else a=e[5],c=e[6],i=e[7],l=e[8];let d;e[9]!==a||e[10]!==c||e[11]!==r?(d=a?async()=>{const v=await we(r.client,c),R=Object.create(null);for(const[x,P]of Object.entries(v.entries))R[x]=P.before&&typeof P.before=="object"?P.before:null;return R}:Z,e[9]=a,e[10]=c,e[11]=r,e[12]=d):d=e[12];let f;return e[13]!==i||e[14]!==d?(f={queryKey:i,queryFn:d,staleTime:Number.POSITIVE_INFINITY,placeholderData:je},e[13]=i,e[14]=d,e[15]=f):f=e[15],l(f)}function Ve(t){return[t.name,t.base]}function Ge(t){return t.name}function He(t,n){return t.name<n.name?-1:t.name>n.name?1:0}function Ye(t){const[n,s]=t;return{name:n,base:s.baseVersion??""}}function We(t){const[,n]=t;return n.kind==="delete"}function me(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const Ke={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Ce=m.createContext(Ke),ge=16384;class ze{data="";append(n){this.data+=n,this.data.length>ge&&(this.data=this.data.slice(this.data.length-ge))}get(){return this.data}clear(){this.data=""}}const Xe=1e3,Ze=3e4,et=3e3,Ee=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],ve="log";function tt(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function nt(t){return t===404}function st(t){return/(?:^|[\s;&|(])deno\s+task\b/.test(t)}async function rt(t){try{const n=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(et)});return await n.body?.cancel().catch(()=>{}),nt(n.status)}catch{return!1}}const Oe=Pe(Ce);function yt(t){const n=B.c(10);let s,e,o;n[0]!==t?({resetKey:o,children:s,...e}=t,n[0]=t,n[1]=s,n[2]=e,n[3]=o):(s=n[1],e=n[2],o=n[3]);let r;n[4]!==e||n[5]!==o?(r=ce.jsx(ot,{...e},o),n[4]=e,n[5]=o,n[6]=r):r=n[6];let a;return n[7]!==s||n[8]!==r?(a=ce.jsx(Oe.Host,{source:r,children:s}),n[7]=s,n[8]=r,n[9]=a):a=n[9],a}function ot(t){return Oe.usePublish(at(t)),null}function at({virtualMcpId:t,branch:n,previewUrl:s=null,enabled:e=!0}){const{org:o}=xe(),r=be(),a=Ae()?.taskId??null,[c,i]=m.useState(null),[l,d]=m.useState({phase:"idle"}),[f,v]=m.useState({state:"running"}),[R,x]=m.useState({kind:"unknown"}),[P,Q]=m.useState(!1),[Re,q]=m.useState([]),[De,J]=m.useState([]),[,ke]=m.useState(0),D=m.useRef(new Map),V=m.useRef(new Set),A=m.useRef(new Set),G=m.useRef(null),I=tt(s),te=Ue(t)?.metadata?.runtime?.selected==="deno",Ne=E=>{let b=D.current.get(E);return b||(b=new ze,D.current.set(E,b)),b};return m.useEffect(()=>{if(i(null),d({phase:"idle"}),v({state:"running"}),x({kind:"unknown"}),G.current=null,Q(!1),q([]),J([]),D.current.clear(),!t||!n||!e)return;const E=Ie({orgSlug:o.slug,virtualMcpId:t,branch:n,threadId:a??null},"events");let b=!1,k=0,U=null,N=null,_=null,C=null,S=null,M=null,ne=!1;const H=()=>{N&&clearTimeout(N),N=setTimeout(()=>{N=null,r.invalidateQueries({queryKey:T.liveMeta(o.slug,t,n)})},1e3)},_e=u=>{try{const p=JSON.parse(u.data);i(p),p.kind!=="failed"&&(Q(!1),k=0),p.kind==="ready"&&ae()}catch(p){console.warn("[vm-events] bad phase payload",p)}},se=()=>{Q(!0),i(null),d({phase:"idle"}),v({state:"running"}),x({kind:"unknown"}),q([]),J([]),D.current.clear()},re=u=>{try{const p=JSON.parse(u.data);if(typeof p.data!="string")return;k=0;const g=p.data.replace(/\r?\n/g,`\r
|
|
2
2
|
`);Ne(p.source).append(g);for(const h of V.current)try{h(p.source,g)}catch{}ke(h=>h+1)}catch{}},oe=u=>{const p=u.type;try{const g=JSON.parse(u.data);switch(k=0,p){case"lifecycle":{const h=g;d(h.state);const L=`${o.slug}/${t}/${n}`;if(me(h.state.phase)&&!(M&&me(M))){ue(r,o.id);const j=T.decofile(L);r.getQueryData(j)===void 0&&r.invalidateQueries({queryKey:j})}h.state.phase==="running"&&M!=="running"&&(ue(r,o.id),r.invalidateQueries({queryKey:T.decofile(L)}),H()),M=h.state.phase;const O=h.state.phase==="running"?h.state.port:null,W=G.current;if(G.current=O,W!==null&&O!==null&&W!==O)for(const j of A.current)try{j()}catch{}return}case"status":v(g);return;case"tasks":{const h=g;ne=h.active.some(O=>st(O.command));const L=h.active.map(O=>O.logName??"").filter(Boolean);J(L);return}case"scripts":q(g.scripts);return;case"branch":{const h=g.meta;x(h);return}case"reload":for(const h of A.current)try{h()}catch{}return;case"file-changed":{const{path:h}=g,L=`${o.slug}/${t}/${n}`;if(h.startsWith(".deco/")||h.includes("/.deco/")){if(!(M==="running"))return;h.endsWith(".deco/meta.gen.json")&&H(),_&&clearTimeout(_),_=setTimeout(()=>{if(_=null,r.invalidateQueries({queryKey:T.decofile(L)}),te||ne)for(const j of A.current)try{j()}catch{}},500)}else H();return}}}catch{}};function Y(){if(b)return;const u=new EventSource(E);C=u,u.onopen=()=>{},u.onerror=()=>{C===u&&u.readyState===EventSource.CLOSED&&ie("studio")},u.addEventListener("phase",_e),u.addEventListener("gone",se),u.addEventListener(ve,re);for(const p of Ee)u.addEventListener(p,oe)}function ae(){if(b||!I||S)return;const u=new EventSource(I);S=u;let p=!1;u.onopen=()=>{if(b||S!==u)return;p=!0,k=0;const g=C;C=null,g?.close()},u.onerror=()=>{S===u&&u.readyState===EventSource.CLOSED&&Le(u,p)},u.addEventListener(ve,re);for(const g of Ee)u.addEventListener(g,oe)}async function Le(u,p){const g=I?await rt(I):!1;if(!(b||S!==u)){if(u.close(),S=null,g){se(),C||Y();return}p&&ie("direct")}}function ie(u){if(b||U)return;const p=Me(Ze,Xe,k,2,0);k++,U=setTimeout(()=>{if(U=null,!b){if(u==="direct"){S?.close(),S=null,ae();return}C?.close(),C=null,Y()}},p)}return Y(),()=>{b=!0,C?.close(),S?.close(),U&&clearTimeout(U),N&&clearTimeout(N),_&&clearTimeout(_)}},[t,n,o.slug,o.id,e,a,I,r,te]),{phase:c,lifecycle:l,status:f,branch:R,notFound:P,scripts:Re,activeProcesses:De,getBuffer:E=>D.current.get(E)?.get()??"",hasData:E=>(D.current.get(E)?.get().length??0)>0,subscribeChunks:E=>(V.current.add(E),()=>{V.current.delete(E)}),subscribeReload:E=>(A.current.add(E),()=>{A.current.delete(E)})}}function Te(){return m.use(Ce)}function St(t){const{subscribeChunks:n}=Te(),s=m.useRef(t);s.current=t,m.useEffect(()=>n((r,a)=>{s.current?.(r,a)}),[n])}function wt(t){const{subscribeReload:n}=Te(),s=m.useRef(t);s.current=t,m.useEffect(()=>n(()=>{s.current?.()}),[n])}export{y as C,w as E,$ as P,yt as S,St as a,wt as b,Et as c,bt as d,me as e,Fe as f,Be as g,Qe as h,pt as i,he as j,vt as k,mt as l,gt as m,ht as n,qe as r,Te as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a6 as c,am as r,K as l,V as d,q as f,e as S}from"./index-
|
|
1
|
+
import{c as u,a6 as c,am as r,K as l,V as d,q as f,e as S}from"./index-C6-0Ff1m.js";function m(){const e=u.c(7),{org:i}=c(),n=r();let a;e[0]!==i.id?(a=l.secrets(i.id),e[0]=i.id,e[1]=a):a=e[1];let t;e[2]!==n?(t=async()=>await n.call("SECRET_LIST",{}),e[2]=n,e[3]=t):t=e[3];let s;e[4]!==a||e[5]!==t?(s={queryKey:a,staleTime:6e4,queryFn:t},e[4]=a,e[5]=t,e[6]=s):s=e[6];const{data:o}=d(s);return o.secrets}function C(){const e=u.c(8),{org:i}=c(),n=r(),a=f();let t;e[0]!==n?(t=async y=>await n.call("SECRET_CREATE",{...y}),e[0]=n,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==a?(s=()=>{a.invalidateQueries({queryKey:l.secrets(i.id)})},e[2]=i,e[3]=a,e[4]=s):s=e[4];let o;return e[5]!==t||e[6]!==s?(o={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=o):o=e[7],S(o)}export{C as a,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ia as ee,br as te,c as M,b as re,r as b,j as i,m as se,bq as oe,D as ie,v as le,x as ne,I as ce,w as ae}from"./index-
|
|
1
|
+
import{ia as ee,br as te,c as M,b as re,r as b,j as i,m as se,bq as oe,D as ie,v as le,x as ne,I as ce,w as ae}from"./index-C6-0Ff1m.js";import{a as G,e as V}from"./UserSquare-a_XazovD.js";import{b as fe}from"./agent-icon-SasBmPrY.js";import{i as ue}from"./SearchMd-Cw05gj7E.js";import{a as _}from"./save-status-DEylj8_h.js";import{ac as de,l as me,an as ve}from"./blocks-tab-states-CmsgKSWv.js";import{aS as K,c as pe,u as xe,i as he,E as ge}from"./site-editor-toast-C2OaHizl.js";import{d as Y,r as we}from"./held-block-view-ByNmqPhe.js";import{u as Se}from"./use-voice-input-ChVzBkTC.js";function be(r){return r.schema?.definitions??r.schema?.$defs??{}}function Z(r,e){const t=be(e),s=t[btoa(r)];if(!s)return[];const o=[s];if(Array.isArray(s.allOf)){const n=s.allOf.find(l=>typeof l.$ref=="string")?.$ref;if(typeof n=="string"){const l=t[n.replace("#/definitions/","")];l&&o.push(l)}}return o}function je(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s?.includes("{{{"))return s}}function ze(r,e){if(!e)return;const t=ee(r,te(e));if(!t)return;const s=je(t.resolveType,e);if(!s)return;const o=we(s,t.data);if(o)return Y(o)}function ye(r,e){for(const t of Z(r,e)){const s=typeof t.image=="string"?t.image:void 0;if(s&&!s.includes("{{"))return Y(s)}}const Ne=12,q=new Set,F=new Set;function Re(){for(const r of F)r()}function Pe(r){return q.has(r)?!0:q.size>=Ne?!1:(q.add(r),!0)}function Q(r){q.delete(r)&&Re()}function Ie(r){return F.add(r),()=>{F.delete(r)}}function Te(r,e){const t=b.useRef(!1),[s,o]=b.useState(!1),n=b.useRef(null),l=b.useRef(null),f=b.useRef(null),c=b.useRef(r);c.current=r;const[p]=b.useState(()=>{const u=()=>{f.current?.(),f.current=null},d=()=>t.current?!0:Pe(e)?(t.current=!0,o(!0),u(),!0):!1;return a=>{if(l.current=a,n.current&&(n.current.disconnect(),n.current=null),u(),!a){t.current&&(Q(e),t.current=!1,o(!1));return}queueMicrotask(()=>{if(l.current!==a)return;const w=new IntersectionObserver(m=>{if(m[0]?.isIntersecting??!1){!d()&&!f.current&&(f.current=Ie(()=>{l.current===a&&d()}));return}u(),t.current&&(Q(e),t.current=!1,o(!1))},{root:c.current.current,rootMargin:"160px 0px"});w.observe(a),n.current=w})}});return{ref:p,iframeActive:s}}function Ce(r){const e=M.c(9),{previewUrl:t,title:s,scrollRootRef:o,slotId:n}=r,{ref:l,iframeActive:f}=Te(o,n),[c,p]=b.useState(!1),u=_()?V:G;let d;e[0]!==u||e[1]!==f||e[2]!==c||e[3]!==t||e[4]!==s?(d=f?i.jsxs(i.Fragment,{children:[!c&&i.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:i.jsx(u,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),i.jsx("iframe",{src:t,title:`Preview ${s}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>p(!0)})]}):i.jsx("div",{className:"flex h-full items-center justify-center",children:i.jsx(u,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=u,e[1]=f,e[2]=c,e[3]=t,e[4]=s,e[5]=d):d=e[5];let a;return e[6]!==l||e[7]!==d?(a=i.jsx("div",{ref:l,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:d}),e[6]=l,e[7]=d,e[8]=a):a=e[8],a}function Ue(r){const e=M.c(3),{image:t}=r,s=_()?V:G;let o;return e[0]!==s||e[1]!==t?(o=i.jsx("div",{className:"relative flex aspect-[16/10] w-full items-center justify-center overflow-hidden bg-muted/40",children:t?i.jsx("img",{src:t,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):i.jsx(s,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=s,e[1]=t,e[2]=o):o=e[2],o}function Be(r){const e=M.c(28),{entry:t,previewUrl:s,image:o,scrollRootRef:n,onSelect:l}=r,c=_()?t.isSavedBlock?fe:V:G,p=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let u;e[0]!==p?(u=se("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors shadow-edge","hover:border-primary/40 hover:bg-accent",p),e[0]=p,e[1]=u):u=e[1];let d;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==o||e[5]!==s||e[6]!==n?(d=s?i.jsx(Ce,{previewUrl:s,title:t.title,scrollRootRef:n,slotId:t.resolveType}):i.jsx(Ue,{image:o}),e[2]=t.resolveType,e[3]=t.title,e[4]=o,e[5]=s,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==t.isSavedBlock?(a=t.isSavedBlock?{color:oe}:void 0,e[8]=t.isSavedBlock,e[9]=a):a=e[9];let w;e[10]!==c||e[11]!==a?(w=i.jsx(c,{className:"h-4 w-4 shrink-0",style:a}),e[10]=c,e[11]=a,e[12]=w):w=e[12];let m;e[13]!==t.title?(m=i.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[13]=t.title,e[14]=m):m=e[14];let x;e[15]!==t.description?(x=t.description&&i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[15]=t.description,e[16]=x):x=e[16];let h;e[17]!==m||e[18]!==x?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[m,x]}),e[17]=m,e[18]=x,e[19]=h):h=e[19];let g;e[20]!==w||e[21]!==h?(g=i.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[w,h]}),e[20]=w,e[21]=h,e[22]=g):g=e[22];let S;return e[23]!==l||e[24]!==u||e[25]!==d||e[26]!==g?(S=i.jsxs("button",{type:"button",onClick:l,className:u,children:[d,g]}),e[23]=l,e[24]=u,e[25]=d,e[26]=g,e[27]=S):S=e[27],S}function We(r){const e=M.c(51),{open:t,onOpenChange:s,meta:o,decofile:n,previewBaseUrl:l,onSelect:f}=r,c=re(),[p,u]=b.useState(""),[d,a]=b.useState(t),w=b.useRef(null);t!==d&&(a(t),t&&u(""));let m,x,h,g,S,y,N,R,j,P,I;if(e[0]!==n||e[1]!==o||e[2]!==s||e[3]!==f||e[4]!==t||e[5]!==l||e[6]!==p||e[7]!==c){const z=t&&o&&n?de(o,n):[],W=o?me(o):"",H=n?ve(n):void 0,X=new Map;if(t&&W&&l)for(const v of z)X.set(v.resolveType,K(l,W,v.previewBlock,H));const O=p.trim().toLowerCase(),J=O?z.filter(v=>v.title.toLowerCase().includes(O)||v.resolveType.toLowerCase().includes(O)||v.description?.toLowerCase().includes(O)):z;x=ie,P=t,I=s,m=le,N="top-3 right-3",R="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let B;e[19]!==c?(B=c("sectionsEditor.addSectionModal.title"),e[19]=c,e[20]=B):B=e[20];let k;e[21]!==B?(k=i.jsx(ne,{children:B}),e[21]=B,e[22]=k):k=e[22];let $;e[23]===Symbol.for("react.memo_cache_sentinel")?($=i.jsx(ue,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=$):$=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=v=>u(v.target.value),e[24]=D):D=e[24];let A;e[25]!==c?(A=c("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=c,e[26]=A):A=e[26];let L;e[27]!==p||e[28]!==A?(L=i.jsxs("div",{className:"relative pt-2",children:[$,i.jsx(ce,{value:p,onChange:D,placeholder:A,className:"h-9 pl-8"})]}),e[27]=p,e[28]=A,e[29]=L):L=e[29],e[30]!==k||e[31]!==L?(j=i.jsxs(ae,{className:"shrink-0 border-b px-4 py-3 text-left",children:[k,L]}),e[30]=k,e[31]=L,e[32]=j):j=e[32],S=w,y="min-h-0 flex-1 overflow-y-auto",h="p-4",g=J.length===0?i.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:c("sectionsEditor.addSectionModal.noSectionsFound")}):i.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:J.map(v=>i.jsx(Be,{entry:v,scrollRootRef:w,previewUrl:l?X.get(v.resolveType)??K(l,W,v.previewBlock,H):null,image:l||!o?void 0:ye(v.resolveType,o),onSelect:()=>f(v)},v.resolveType))}),e[0]=n,e[1]=o,e[2]=s,e[3]=f,e[4]=t,e[5]=l,e[6]=p,e[7]=c,e[8]=m,e[9]=x,e[10]=h,e[11]=g,e[12]=S,e[13]=y,e[14]=N,e[15]=R,e[16]=j,e[17]=P,e[18]=I}else m=e[8],x=e[9],h=e[10],g=e[11],S=e[12],y=e[13],N=e[14],R=e[15],j=e[16],P=e[17],I=e[18];let T;e[33]!==h||e[34]!==g?(T=i.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=T):T=e[35];let C;e[36]!==T||e[37]!==S||e[38]!==y?(C=i.jsx("div",{ref:S,className:y,children:T}),e[36]=T,e[37]=S,e[38]=y,e[39]=C):C=e[39];let U;e[40]!==m||e[41]!==C||e[42]!==N||e[43]!==R||e[44]!==j?(U=i.jsxs(m,{closeButtonClassName:N,className:R,children:[j,C]}),e[40]=m,e[41]=C,e[42]=N,e[43]=R,e[44]=j,e[45]=U):U=e[45];let E;return e[46]!==x||e[47]!==U||e[48]!==P||e[49]!==I?(E=i.jsx(x,{open:P,onOpenChange:I,children:U}),e[46]=x,e[47]=U,e[48]=P,e[49]=I,e[50]=E):E=e[50],E}function Fe(r){const e=M.c(4),{previewServerUrl:t,runtime:s}=Se(r.virtualMcpId),{url:o}=pe(r.virtualMcpId),n=xe(r.virtualMcpId,r.branch),l=s==="cms";if(he(n))return null;if(o)return o;let f;return e[0]!==l||e[1]!==r.sandboxUrl||e[2]!==t?(f=ge({sandboxUrl:r.sandboxUrl,previewServerUrl:t,fastPreviewActive:l}),e[0]=l,e[1]=r.sandboxUrl,e[2]=t,e[3]=f):f=e[3],f}export{We as A,ze as g,Z as s,Fe as u};
|