decocms 4.74.0 → 4.74.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BaauQIwC.js → AlertCircle-7Nt6pK3u.js} +1 -1
- package/dist/client/assets/{AreaChart-5GoV9SRg.js → AreaChart-B_EqFBTf.js} +1 -1
- package/dist/client/assets/{ArrowUp-C814v0pE.js → ArrowUp-BXJFmEZc.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BLP3DLju.js → ArrowUpRight-BP--4ucj.js} +1 -1
- package/dist/client/assets/{Check-DYPRi7NO.js → Check-D0mBSrjH.js} +1 -1
- package/dist/client/assets/{CheckCircle-D_t3rWUI.js → CheckCircle-Cwk3XPAS.js} +1 -1
- package/dist/client/assets/{ChevronDown-wHLuFr3i.js → ChevronDown-PmGFsMpL.js} +1 -1
- package/dist/client/assets/{ChevronRight-BARfL9-W.js → ChevronRight-B-vLdw8q.js} +1 -1
- package/dist/client/assets/{ChevronUp-CRmxYAjE.js → ChevronUp-BHUOn26n.js} +1 -1
- package/dist/client/assets/{Circle-DuelqjM2.js → Circle-DApmycTB.js} +1 -1
- package/dist/client/assets/{Copy01-BwtpNAKR.js → Copy01-YKEDguCl.js} +1 -1
- package/dist/client/assets/{DotsVertical-B_jKX962.js → DotsVertical-DmdjQQ_H.js} +1 -1
- package/dist/client/assets/{Eye-CM4SfxEo.js → Eye-BMt91Y28.js} +1 -1
- package/dist/client/assets/{FilterLines-CwEBxGZP.js → FilterLines-BQWL5JTu.js} +1 -1
- package/dist/client/assets/{Flag01-RtD7xNTJ.js → Flag01-Bvh5iRqx.js} +1 -1
- package/dist/client/assets/{Globe01-B-4z45oj.js → Globe01-CN1f6WBv.js} +1 -1
- package/dist/client/assets/{Globe04-D7ZgONc6.js → Globe04-qC3ih0ZL.js} +1 -1
- package/dist/client/assets/{HardDrive-DNueik1y.js → HardDrive-BwJlKgJ6.js} +1 -1
- package/dist/client/assets/{Key01-DrwX5nx2.js → Key01-C1LLnj6q.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CHLKhLgL.js → LayoutLeft-DPXJOfef.js} +1 -1
- package/dist/client/assets/{LinkExternal01-022iaJNF.js → LinkExternal01-7ka-zpyj.js} +1 -1
- package/dist/client/assets/{List-jObuFUL_.js → List-Bx8txb9K.js} +1 -1
- package/dist/client/assets/{Monitor01-BkHN4rM2.js → Monitor01-DJD9nEcj.js} +1 -1
- package/dist/client/assets/{Package-DYdmCLl6.js → Package-D5z_WcDc.js} +1 -1
- package/dist/client/assets/{Palette-BWa7ee-4.js → Palette-qT1fhobG.js} +1 -1
- package/dist/client/assets/{Play-DYP9-OJo.js → Play-GvZ0_iyw.js} +1 -1
- package/dist/client/assets/{Plus-DKATXnIq.js → Plus-C4ZEipYr.js} +1 -1
- package/dist/client/assets/{SearchLg-crE3yQZJ.js → SearchLg-BBYByRTt.js} +1 -1
- package/dist/client/assets/{SearchMd-CbytZ1-S.js → SearchMd-CUL7QlM0.js} +1 -1
- package/dist/client/assets/{Settings02-1LTNhTXj.js → Settings02-kgu7_M6O.js} +1 -1
- package/dist/client/assets/{Shield01-CULBCC4Z.js → Shield01-BISWnawB.js} +1 -1
- package/dist/client/assets/{Star01-CtWX4nA3.js → Star01-Ba-daWZ-.js} +1 -1
- package/dist/client/assets/{Stars01-COE1U6xi.js → Stars01-D7DsKu7S.js} +1 -1
- package/dist/client/assets/{Stars02-BzQc7fZz.js → Stars02-CH3Kk6h-.js} +1 -1
- package/dist/client/assets/{Sun-CyoL1WFK.js → Sun-BPy5rxZW.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-QNGjYcml.js → SwitchHorizontal01-D_tcQJ73.js} +1 -1
- package/dist/client/assets/{Tool01-BWGVYfev.js → Tool01-CXy9L9vf.js} +1 -1
- package/dist/client/assets/{Tool02-DkTMVP4f.js → Tool02-BAfdT5B8.js} +1 -1
- package/dist/client/assets/{Trash01-iPP4w9gK.js → Trash01-APUCP4GX.js} +1 -1
- package/dist/client/assets/{TrendUp01-C3q3M7MG.js → TrendUp01-CLAFKqVO.js} +1 -1
- package/dist/client/assets/{Upload01-CoVAXfWg.js → Upload01-CmRDGAjs.js} +1 -1
- package/dist/client/assets/{User01-2QspS0s6.js → User01-CpMNTHj6.js} +1 -1
- package/dist/client/assets/{UserPlus01-DoBolndD.js → UserPlus01-mMfR4YMV.js} +1 -1
- package/dist/client/assets/{Users01-C3FOprDj.js → Users01-zx9lM6Kg.js} +1 -1
- package/dist/client/assets/{Users03-BYqJADve.js → Users03-D11AqwMx.js} +1 -1
- package/dist/client/assets/{X-Bqs01fCh.js → X-BRf1CuwT.js} +1 -1
- package/dist/client/assets/{XCircle-DHCvZwgH.js → XCircle-Bx3h3ov4.js} +1 -1
- package/dist/client/assets/{XClose-P0NM9uUE.js → XClose-6eVK9gjQ.js} +1 -1
- package/dist/client/assets/{Zap-CI5WhuKJ.js → Zap-CKjhc3zs.js} +1 -1
- package/dist/client/assets/{ZapSquare-BhWmmFEB.js → ZapSquare-BntLBw72.js} +1 -1
- package/dist/client/assets/{ZoomOut-C7W-ZWAB.js → ZoomOut-5mlqDR-t.js} +1 -1
- package/dist/client/assets/{access-gate-BK7GcTMo.js → access-gate-Zzwbhi5g.js} +1 -1
- package/dist/client/assets/{add-section-modal-CfvYLCg2.js → add-section-modal-Ciwr9vqD.js} +1 -1
- package/dist/client/assets/{agent-icon-5pSyq_FH.js → agent-icon-Bm6aaEo_.js} +1 -1
- package/dist/client/assets/agents-list-CX5CGH-y.js +1 -0
- package/dist/client/assets/{ai-providers-CRHCw5VF.js → ai-providers-Bb8yB23r.js} +1 -1
- package/dist/client/assets/{alert-D4ttbBAt.js → alert-BvEEzv9b.js} +1 -1
- package/dist/client/assets/{alert-dialog-GCrUNzbs.js → alert-dialog-BWfVJWo6.js} +1 -1
- package/dist/client/assets/app-editor-CVIUKWY7.js +1 -0
- package/dist/client/assets/{auth-Cf4In3Ce.js → auth-DUNMp2q9.js} +1 -1
- package/dist/client/assets/{auth-catchall-CL7qcaW-.js → auth-catchall-CXy5AK9w.js} +1 -1
- package/dist/client/assets/{auth-entry-BBn3Oy3I.js → auth-entry-BzVS8HQW.js} +1 -1
- package/dist/client/assets/{auth-split-layout-ClDCjxcR.js → auth-split-layout-aUT-uzAh.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DeTua2ma.js → authenticate-and-persist-oauth-CBGP3HRu.js} +1 -1
- package/dist/client/assets/{automation-list-row-bCHP9GaB.js → automation-list-row-BRHz9zkz.js} +1 -1
- package/dist/client/assets/{automation-runs-K5fQtR3Q.js → automation-runs-D2vNR23X.js} +1 -1
- package/dist/client/assets/automations-4SdYvOdx.js +1 -0
- package/dist/client/assets/{autosend-CnfmH4zE.js → autosend-HLDOzs25.js} +1 -1
- package/dist/client/assets/{avatar-BB1BJsL_.js → avatar-ODfMrOSw.js} +1 -1
- package/dist/client/assets/{badge-miK_gWS7.js → badge-DqelMuvl.js} +1 -1
- package/dist/client/assets/{block-document-BnBi9DlX.js → block-document-VXj-kuOr.js} +1 -1
- package/dist/client/assets/{brand-context-Bwk8h-AT.js → brand-context-7qf_1G0Q.js} +1 -1
- package/dist/client/assets/{buckets-BVny45s4.js → buckets-D7doUMsO.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CI-tBRB_.js → bulk-category-panel-DP0FmV8B.js} +1 -1
- package/dist/client/assets/{calendar-i7Bgz_TN.js → calendar-rMb-ODp7.js} +1 -1
- package/dist/client/assets/{capability-load-error-ykEHLKnb.js → capability-load-error-DDrbVf9Z.js} +1 -1
- package/dist/client/assets/{card-BjD2_XuX.js → card-6dPhvUw3.js} +1 -1
- package/dist/client/assets/category-editor-P9vCoT62.js +1 -0
- package/dist/client/assets/{chat-context-De0V13yX.js → chat-context-BdWFa_ae.js} +5 -5
- package/dist/client/assets/{checkbox-DnsQEgvs.js → checkbox-BAEBF-lp.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DlpvQRp0.js → cli-auth-success-thW0JcOC.js} +1 -1
- package/dist/client/assets/{collection-detail-HRLTqsYR.js → collection-detail-BMWq1If8.js} +1 -1
- package/dist/client/assets/{collection-display-button-CNmqBrih.js → collection-display-button-IE8Ni7uy.js} +1 -1
- package/dist/client/assets/{collection-search-MTrnV0Y_.js → collection-search-c9oirDKJ.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CZMGnyXO.js → collection-table-wrapper-fal4CYGm.js} +1 -1
- package/dist/client/assets/{collection-tabs-Dvz33uvw.js → collection-tabs-Cx_qr9p2.js} +1 -1
- package/dist/client/assets/{command-DpdcRmV-.js → command-CMohXiY9.js} +1 -1
- package/dist/client/assets/commerce-onboarding-BjJyVAeU.js +1 -0
- package/dist/client/assets/companions-core-BaAHCjLB.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-BASAvtSw.js → connect-desktop-dialog-BnMQnI9Q.js} +1 -1
- package/dist/client/assets/{connection-card-DQ8XLP8C.js → connection-card-jq-X-joO.js} +1 -1
- package/dist/client/assets/{connection-detail-CwpaZMQ9.js → connection-detail-Bi8xUt2a.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B4Lj6wNN.js → connection-form-helpers-D8Y-iC7G.js} +1 -1
- package/dist/client/assets/{connections-C4IOF63g.js → connections-BG-UjvGH.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-_LHJFrBF.js → decopilot-sse-pool-4Coc0RZf.js} +1 -1
- package/dist/client/assets/{dialog-CUb_uQeJ.js → dialog-CIsOZrM9.js} +1 -1
- package/dist/client/assets/{domain-settings-Cj1WoInJ.js → domain-settings-tEDfHeLX.js} +1 -1
- package/dist/client/assets/{drawer-BSFvVMvA.js → drawer-CPiGkXxI.js} +1 -1
- package/dist/client/assets/{dropdown-menu-D-nlMdm5.js → dropdown-menu-B5Zph68E.js} +1 -1
- package/dist/client/assets/{empty-state-C_IbZdBr.js → empty-state-CssJRHRY.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BIadZZgr.js → extract-connection-data-udtq7ldu.js} +1 -1
- package/dist/client/assets/file-explorer-BkuM2LZ9.js +2 -0
- package/dist/client/assets/{file-type-icon-mrfxFHRk.js → file-type-icon-BDsT4NsE.js} +1 -1
- package/dist/client/assets/{files-B6sMQ0N9.js → files-P4YoAM_Q.js} +1 -1
- package/dist/client/assets/{form-CEO5VtKG.js → form-DO3brjC6.js} +1 -1
- package/dist/client/assets/{general-CpcExAES.js → general-9kseFLhw.js} +1 -1
- package/dist/client/assets/github-repo-picker-BIKsB9fh.js +1 -0
- package/dist/client/assets/{hooks-G1nBJ-F3.js → hooks-CDl8lixj.js} +1 -1
- package/dist/client/assets/{index-BZjBKD1m.js → index-60vpzjoP.js} +5 -5
- package/dist/client/assets/{index-C7cs-gci.js → index-BEa0XcuM.js} +2 -2
- package/dist/client/assets/{index-CTpTvSxb.js → index-BjO160yJ.js} +1 -1
- package/dist/client/assets/{index-BlItCfDb.js → index-BmB9QsuH.js} +1 -1
- package/dist/client/assets/{index-BW23Hqv6.js → index-CNa9GbwP.js} +1 -1
- package/dist/client/assets/{index-B_nVJPYO.js → index-Cabias0z.js} +1 -1
- package/dist/client/assets/{index-B3_jWN9S.js → index-CnI2YHm_.js} +1 -1
- package/dist/client/assets/{index-DxwLi9-g.js → index-DGL5NlRf.js} +1 -1
- package/dist/client/assets/index-DVS6dCOq.js +1 -0
- package/dist/client/assets/{index-DFuynMdy.js → index-D_sYzPoS.js} +1 -1
- package/dist/client/assets/{index-C9P6Y57L.js → index-De7Vrw1B.js} +1 -1
- package/dist/client/assets/{index-DQVI41jj.js → index-DjZlwvG-.js} +1 -1
- package/dist/client/assets/{index-lRedQ_8t.js → index-LdekSll3.js} +3 -3
- package/dist/client/assets/{index-DAFjHwsT.js → index-dlw0nWwT.js} +1 -1
- package/dist/client/assets/{index-redirect-Mh7_3AcS.js → index-redirect-Durt0uGm.js} +1 -1
- package/dist/client/assets/{input-DOZlS9i9.js → input-Ahc5_8w6.js} +1 -1
- package/dist/client/assets/{integration-icon-CN9OtiIm.js → integration-icon-yl-4tv2q.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-LDdBeQZc.js → invite-member-dialog-Cr4_AjST.js} +1 -1
- package/dist/client/assets/{label-u5PrAFB7.js → label-B-N4D4el.js} +1 -1
- package/dist/client/assets/{layout-46QoqgX4.js → layout-DduIkC_1.js} +1 -1
- package/dist/client/assets/{login-BdT0h30g.js → login-BEj0pR8n.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DHDPNOkD.js → mcp-oauth-DYEOf_NB.js} +1 -1
- package/dist/client/assets/{members-RcOcNeXi.js → members-BTIjkH3t.js} +1 -1
- package/dist/client/assets/{monaco-editor-D2naC6ph.js → monaco-editor-BAkcna7Z.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CztePoJD.js → monitoring-stats-row-CCXtKjzQ.js} +1 -1
- package/dist/client/assets/{oauth-callback-BSA-GLPM.js → oauth-callback-CbknNfun.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DgPoj4r4.js → oauth-callback-ai-provider-B8wm8Z91.js} +1 -1
- package/dist/client/assets/{onboarding-Br3afGr-.js → onboarding-WOBNvMNa.js} +1 -1
- package/dist/client/assets/{org-install-C190-hBM.js → org-install-PFEnxCFZ.js} +1 -1
- package/dist/client/assets/{org-layout-cPdojne_.js → org-layout-B4eM_cAm.js} +1 -1
- package/dist/client/assets/{organization-choice-Csr-kPrj.js → organization-choice-D0qBuG6H.js} +1 -1
- package/dist/client/assets/{orgs-WjQsKIGK.js → orgs-B9ECvLek.js} +1 -1
- package/dist/client/assets/{page-seo-form-BocKaLGp.js → page-seo-form-D93VcSbg.js} +1 -1
- package/dist/client/assets/page-seo-sheet-B0DLHoZV.js +1 -0
- package/dist/client/assets/{popover-BlN-L-7w.js → popover-B9HWZYb2.js} +1 -1
- package/dist/client/assets/post-editor-DBkV3r9Y.js +1 -0
- package/dist/client/assets/{primitives-C1zKVkUs.js → primitives-tVaEBsAv.js} +1 -1
- package/dist/client/assets/{profile-B1TQAd_m.js → profile-Z8Ki-oOg.js} +1 -1
- package/dist/client/assets/project-app-view-BqKt7pji.js +1 -0
- package/dist/client/assets/provision-repo-scoped-github-connection-CB4ICKHq.js +1 -0
- package/dist/client/assets/record-editor-CUTmCbI9.js +1 -0
- package/dist/client/assets/redirect-editor-BTOo2ipS.js +1 -0
- package/dist/client/assets/registry-Btp_DOOo.js +2 -0
- package/dist/client/assets/{registry-layout-BjGbzV73.js → registry-layout-CiSIqBb4.js} +1 -1
- package/dist/client/assets/{reports-DEwGwzSI.js → reports-D_uyJHbu.js} +1 -1
- package/dist/client/assets/{require-capability-B_dSH45y.js → require-capability-DSvw1X4X.js} +1 -1
- package/dist/client/assets/{required-auth-layout-czUUgGrX.js → required-auth-layout-CMMguY8J.js} +1 -1
- package/dist/client/assets/{reset-password-Md6XPqI1.js → reset-password-D2EOsNEe.js} +1 -1
- package/dist/client/assets/{roles-jjnXT7oA.js → roles-BfDzp1dZ.js} +1 -1
- package/dist/client/assets/{search-input-BQOeLOTi.js → search-input-B87p-N3Q.js} +1 -1
- package/dist/client/assets/{secrets-CWkoKQMY.js → secrets-oWRvJyNS.js} +1 -1
- package/dist/client/assets/{sections-editor-DJYtpXox.js → sections-editor-CdMkUBnn.js} +1 -1
- package/dist/client/assets/{select-CxRcXiYy.js → select-BK2fSAGa.js} +1 -1
- package/dist/client/assets/{select-model-CJ1n8oWC.js → select-model-DyYklQhq.js} +1 -1
- package/dist/client/assets/self-tool-result-nBf7_4aQ.js +1 -0
- package/dist/client/assets/seo-editor-CYBdDfVF.js +1 -0
- package/dist/client/assets/{settings-layout-BXO3VMKS.js → settings-layout-DhW1zJN8.js} +1 -1
- package/dist/client/assets/{settings-section-Bs1JjdR4.js → settings-section-C1Acpu_v.js} +1 -1
- package/dist/client/assets/{shell-controls-BoSvKLlP.js → shell-controls-Cp2Tzxyd.js} +1 -1
- package/dist/client/assets/{shell-layout-DamsdnEZ.js → shell-layout-cvOWu3Bb.js} +1 -1
- package/dist/client/assets/{sidebar-joQ3ZQPE.js → sidebar-D6wZQMs1.js} +1 -1
- package/dist/client/assets/{skeleton-BxJ_vH4t.js → skeleton--iEBiL2O.js} +1 -1
- package/dist/client/assets/{sso-CoEL8qOV.js → sso-BlD_fs9m.js} +1 -1
- package/dist/client/assets/{store-mvrTZUgb.js → store-BIFu6366.js} +1 -1
- package/dist/client/assets/store-registry-eGJ8V8iX.js +2 -0
- package/dist/client/assets/{studio-tools-BMyTPyPy.js → studio-tools-C6CclkE9.js} +1 -1
- package/dist/client/assets/{switch-C6-Jkvpv.js → switch-D7EBUFwg.js} +1 -1
- package/dist/client/assets/{table-BBmNComr.js → table-BMd4rGjA.js} +1 -1
- package/dist/client/assets/{tabs-kApe5O6i.js → tabs-C6mEKLrC.js} +1 -1
- package/dist/client/assets/{textarea-C5puqxj1.js → textarea-CnsXYno3.js} +1 -1
- package/dist/client/assets/{toggle-group-DScHdpkW.js → toggle-group-CHiT2zi8.js} +1 -1
- package/dist/client/assets/{toolbar-zpMjKMlc.js → toolbar-B57zOF1P.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D3Y1-YHW.js → toolbar-icon-button-BvFJpYeK.js} +1 -1
- package/dist/client/assets/{tools-list-BOMB05RR.js → tools-list-DEK41qXq.js} +1 -1
- package/dist/client/assets/{tooltip-REPIyd2Z.js → tooltip-BGm-IgA-.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bo4wIQxq.js → use-ai-providers-D5XAQyc9.js} +1 -1
- package/dist/client/assets/{use-automations-DA7j42Hg.js → use-automations-lcgzv2am.js} +1 -1
- package/dist/client/assets/{use-autosave-DBERSs2x.js → use-autosave-GrI-CtYt.js} +1 -1
- package/dist/client/assets/{use-capability-CCJ-X1mC.js → use-capability-D3kXXKk7.js} +1 -1
- package/dist/client/assets/{use-clock-tick-MLdLuh40.js → use-clock-tick-BY1pm89W.js} +1 -1
- package/dist/client/assets/{use-collections-D-OJag2e.js → use-collections-BtybZGh0.js} +1 -1
- package/dist/client/assets/{use-connection-DmUK9JRy.js → use-connection--eZlhK3I.js} +1 -1
- package/dist/client/assets/{use-copy-DzWDd5On.js → use-copy-B6jV0HNR.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BqyRJeCT.js → use-create-virtual-mcp-CuTto1BH.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-JbhBBkyc.js → use-debounced-autosave-Rhccxzrn.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DxBZ974h.js → use-debounced-value-BsrFA4Fu.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DR4kDN3B.js → use-deco-credits-DkWCOBhO.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BhVWtKJy.js → use-decopilot-events-ijeneFBZ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Ds3puvR-.js → use-delete-connection-D2mQQjVk.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C5hKFITD.js → use-deployment-admin-R973eJt7.js} +1 -1
- package/dist/client/assets/{use-file-configs-t6weWLBN.js → use-file-configs-C5YTi-f0.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B4v-_NDY.js → use-infinite-scroll-CMZ6xVYY.js} +1 -1
- package/dist/client/assets/{use-join-requests-nORXzBkG.js → use-join-requests-D329QH2z.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D6H50Mmm.js → use-mcp-client-DL7RwW_0.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cs2tX1fK.js → use-mcp-tools-K3veuXIg.js} +1 -1
- package/dist/client/assets/{use-members-Bz6iBsM4.js → use-members-CjpUW6ut.js} +1 -1
- package/dist/client/assets/{use-mobile-RU-Nn_Un.js → use-mobile-BO0IkFF-.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DYPKcx_j.js → use-navigate-to-agent-DollRSI0.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DrmuxI_m.js → use-org-auth-client-Do6ICXxA.js} +1 -1
- package/dist/client/assets/use-org-sso-Bq11wDiI.js +1 -0
- package/dist/client/assets/{use-organization-roles-DU1BIeXK.js → use-organization-roles-DZZWVozd.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CHx_I7VH.js → use-organization-settings-D5GZ0amo.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C9dbuMZN.js → use-registry-connections-DF6MEH42.js} +1 -1
- package/dist/client/assets/{use-secrets-Cs1UIn3n.js → use-secrets-DQ9xlX5K.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C3Efc5TW.js → use-status-sounds-BN6Xde6g.js} +1 -1
- package/dist/client/assets/{use-view-mode-y0S1o9OD.js → use-view-mode-CNTXd6H3.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D9inM-9h.js → use-virtual-mcp-wv33_-SX.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Cg8SDgJQ.js +1 -0
- package/dist/client/assets/{useRouterState-DB6AEQYy.js → useRouterState-W11XLSXd.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-l2LxobU8.js +1 -0
- package/dist/client/assets/{users-DV3bsEcg.js → users-CG11TxHM.js} +1 -1
- package/dist/client/assets/{variant-calendar-B7qy61Jb.js → variant-calendar-YbJ2ipqR.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BIom5MzH.js → view-mode-toggle-dgcz-Fs1.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agents-list-pNinhUjp.js +0 -1
- package/dist/client/assets/app-editor-DqcvDhID.js +0 -1
- package/dist/client/assets/automations-BchD7Vmn.js +0 -1
- package/dist/client/assets/category-editor-CSZtSGt6.js +0 -1
- package/dist/client/assets/commerce-onboarding-QSGTn2pK.js +0 -1
- package/dist/client/assets/companions-core-CgTHLTTN.js +0 -1
- package/dist/client/assets/file-explorer-BWAl04Ll.js +0 -2
- package/dist/client/assets/github-installations-ChFezl8I.js +0 -1
- package/dist/client/assets/github-repo-picker-CH-zkM68.js +0 -1
- package/dist/client/assets/index-B8fJFfFf.js +0 -1
- package/dist/client/assets/page-seo-sheet-BTjq4xGR.js +0 -1
- package/dist/client/assets/post-editor-DD6k2jq_.js +0 -1
- package/dist/client/assets/project-app-view-DlsPCtAC.js +0 -1
- package/dist/client/assets/record-editor-CE1EwunZ.js +0 -1
- package/dist/client/assets/redirect-editor-OokObJNP.js +0 -1
- package/dist/client/assets/registry-OH_DROyn.js +0 -2
- package/dist/client/assets/self-tool-result-BCQjUWN7.js +0 -1
- package/dist/client/assets/seo-editor-DYp9hHSY.js +0 -1
- package/dist/client/assets/store-registry-C-81qMOw.js +0 -2
- package/dist/client/assets/use-org-sso-BLc80T83.js +0 -1
- package/dist/client/assets/useInfiniteQuery-XeUdT1mI.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DnwWEYgY.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Z as St,_ as qe,$ as Nt,a0 as wt,a1 as rt,n as be,a2 as Et,a3 as Tt,r as Q,a4 as It,a5 as Ot,a6 as kt,a7 as Rt,a8 as ot,a9 as At,aa as Lt,ab as Dt,c as H,l as ie,j as t,B,d as Ae,K as Y,H as je,I as re,J as _e,M as Se,i as ke,m as ge,ac as Pt,t as Le,v as ze,p as oe,Q as $t,E as zt,a as qt}from"./index-LdekSll3.js";import{u as Fe}from"./use-mcp-client-DL7RwW_0.js";import{W as lt,g as Ft,S as Kt}from"./constants-D_FQAPnt.js";import{I as Ke}from"./integration-icon-yl-4tv2q.js";import{c as xe,a as ct,h as dt,D as ut,d as mt,e as ft}from"./dialog-CIsOZrM9.js";import{b as Ue,T as Me,a as Qe}from"./tooltip-BGm-IgA-.js";import{i as Ge}from"./CheckCircle-Cwk3XPAS.js";import{d as pt,f as Ut,g as ht}from"./agent-icon-Bm6aaEo_.js";import{u as J,t as Mt,m as Qt,s as Gt,g as Ht,p as Vt,F as Bt,b as Wt,a as Yt,c as Zt}from"./companions-core-BaAHCjLB.js";import{F as le,a as Ne,b as ce,c as Oe,d as de,f as ue,e as Xt}from"./form-DO3brjC6.js";import{I as we}from"./input-Ahc5_8w6.js";import{i as Jt}from"./Check-D0mBSrjH.js";import{a as gt}from"./Copy01-YKEDguCl.js";import{i as es}from"./Settings02-kgu7_M6O.js";import{s as ts}from"./Eye-BMt91Y28.js";import{u as ss}from"./use-debounced-value-BsrFA4Fu.js";import{f as xt,a as ns,p as os}from"./provision-repo-scoped-github-connection-CB4ICKHq.js";import{c as is,e as as}from"./extract-connection-data-udtq7ldu.js";import{a as rs}from"./authenticate-and-persist-oauth-CBGP3HRu.js";import{i as yt}from"./ArrowUpRight-BP--4ucj.js";function it(o,e){const s=new Set(e);return o.filter(n=>!s.has(n))}function ls(o,e,s){const n=o.slice(0);return n[e]=s,n}var cs=class extends St{#o;#e;#i;#n;#t;#s;#a;#r;#l;#c=[];constructor(o,e,s){super(),this.#o=o,this.#n=s,this.#i=[],this.#t=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#t.forEach(o=>{o.subscribe(e=>{this.#f(o,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach(o=>{o.destroy()})}setQueries(o,e){this.#i=o,this.#n=e,qe.batch(()=>{const s=this.#t,n=this.#m(this.#i);n.forEach(r=>r.observer.setOptions(r.defaultedQueryOptions));const i=n.map(r=>r.observer),a=i.map(r=>r.getCurrentResult()),l=s.length!==i.length,c=i.some((r,f)=>r!==s[f]),u=l||c,p=u?!0:a.some((r,f)=>{const m=this.#e[f];return!m||!Nt(r,m)});!u&&!p||(u&&(this.#c=n,this.#t=i),this.#e=a,this.hasListeners()&&(u&&(it(s,i).forEach(r=>{r.destroy()}),it(i,s).forEach(r=>{r.subscribe(f=>{this.#f(r,f)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map(o=>o.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(o,e){const s=this.#m(o),n=s.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=s.map(a=>a.defaultedQueryOptions.queryHash);return[n,a=>this.#u(a??n,e,i),()=>this.#d(n,s)]}#d(o,e){return e.map((s,n)=>{const i=o[n];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,a=>{e.forEach(l=>{l.observer.trackProp(a)})})})}#u(o,e,s){if(e){const n=this.#l,i=s!==void 0&&n!==void 0&&(n.length!==s.length||s.some((a,l)=>a!==n[l]));return(!this.#s||this.#e!==this.#r||i||e!==this.#a)&&(this.#a=e,this.#r=this.#e,s!==void 0&&(this.#l=s),this.#s=wt(this.#s,e(o))),this.#s}return o}#h(){return this.#n?.combine!==void 0&&this.#t.some((o,e)=>o.options.suspense&&this.#e[e]?.data===void 0)}#m(o){const e=new Map;this.#t.forEach(n=>{const i=n.options.queryHash;if(!i)return;const a=e.get(i);a?a.push(n):e.set(i,[n])});const s=[];return o.forEach(n=>{const i=this.#o.defaultQueryOptions(n),l=e.get(i.queryHash)?.shift()??new rt(this.#o,i);s.push({defaultedQueryOptions:i,observer:l})}),s}#f(o,e){const s=this.#t.indexOf(o);s!==-1&&(this.#e=ls(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const o=this.#d(this.#e,this.#c),e=this.#h(),s=this.#s,n=e?s:this.#u(o,this.#n?.combine);(e||s!==n)&&qe.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function ds({queries:o,...e},s){const n=be(s),i=Et(),a=Tt(),l=Q.useMemo(()=>o.map(C=>{const g=n.defaultQueryOptions(C);return g._optimisticResults=i?"isRestoring":"optimistic",g}),[o,n,i]);l.forEach(C=>{It(C);const g=n.getQueryCache().get(C.queryHash);Ot(C,a,g)}),kt(a);const[c]=Q.useState(()=>new cs(n,l,e)),[u,p,r]=c.getOptimisticResult(l,e.combine),f=!i&&e.subscribed!==!1;Q.useSyncExternalStore(Q.useCallback(C=>f?c.subscribe(qe.batchCalls(C)):Rt,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Q.useEffect(()=>{c.setQueries(l,e)},[l,e,c]);const h=u.some((C,g)=>ot(l[g],C))?u.flatMap((C,g)=>{const d=l[g];if(d&&ot(d,C)){const y=new rt(n,d);return At(d,y,a)}return[]}):[];if(h.length>0)throw Promise.all(h);const _=u.find((C,g)=>{const d=l[g];return d&&Lt({result:C,errorResetBoundary:a,throwOnError:d.throwOnError,query:n.getQueryCache().get(d.queryHash),suspense:d.suspense})});if(_?.error)throw _.error;return p(r())}function us(o,e){return ds({...o,queries:o.queries.map(s=>({...s,suspense:!0,throwOnError:Dt,enabled:!0,placeholderData:void 0}))},e)}const ms=/^[a-zA-Z][a-zA-Z\d+.-]*:/,fs=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,ps=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,hs=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Re(o){const e=o.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const s=ms.test(e),n=fs.test(e),i=ps.test(e);if(s&&!n&&!i)return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const a=n?e:`https://${e}`;let l;try{l=new URL(a)}catch{return{ok:!1,error:"Enter a valid website URL."}}if(l.protocol!=="http:"&&l.protocol!=="https:")return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const c=l.hostname.split(".");return c.length<2||c.some(u=>!u||!hs.test(u))?{ok:!1,error:"Enter a valid website URL."}:(l.protocol="https:",{ok:!0,value:l.origin})}function Kn(o,e){if(!o.trim())return!0;const s=Re(o);if(!s.ok||!e)return!1;const n=Re(e);return n.ok&&n.value===s.value}function Un(o){if(!o)return null;const e=Re(o);return e.ok?new URL(e.value).hostname:null}function gs(o){const e=H.c(14),{children:s,className:n,wrapperClassName:i}=o,[a,l]=Q.useState(!0);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=C=>{if(!C)return;const g=()=>{const y=C.scrollHeight-C.scrollTop-C.clientHeight<8;l(y)};g(),C.addEventListener("scroll",g,{passive:!0});const d=new ResizeObserver(g);d.observe(C);for(const y of Array.from(C.children))d.observe(y);return()=>{C.removeEventListener("scroll",g),d.disconnect()}},e[0]=c):c=e[0];const u=c;let p;e[1]!==i?(p=ie("relative",i),e[1]=i,e[2]=p):p=e[2];let r;e[3]!==s||e[4]!==n?(r=t.jsx("div",{ref:u,className:n,children:s}),e[3]=s,e[4]=n,e[5]=r):r=e[5];const f=a?"opacity-0":"opacity-100";let m;e[6]!==f?(m=ie("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",f),e[6]=f,e[7]=m):m=e[7];let h;e[8]!==m?(h=t.jsx("div",{"aria-hidden":!0,className:m}),e[8]=m,e[9]=h):h=e[9];let _;return e[10]!==p||e[11]!==r||e[12]!==h?(_=t.jsxs("div",{className:p,children:[r,h]}),e[10]=p,e[11]=r,e[12]=h,e[13]=_):_=e[13],_}function at(o){const e=H.c(38);let s,n,i,a,l;e[0]!==o?({value:l,onChange:n,placeholder:i,className:s,...a}=o,e[0]=o,e[1]=s,e[2]=n,e[3]=i,e[4]=a,e[5]=l):(s=e[1],n=e[2],i=e[3],a=e[4],l=e[5]);const[c,u]=Q.useState(!1),[p,r]=Q.useState(!1);let f;e[6]!==l?(f=async()=>{if(l)try{await navigator.clipboard.writeText(l),r(!0),setTimeout(()=>r(!1),2e3)}catch(k){console.error("Failed to copy text: ",k)}},e[6]=l,e[7]=f):f=e[7];const m=f;let h;e[8]!==c?(h=()=>{u(!c)},e[8]=c,e[9]=h):h=e[9];const _=h,C=c?"text":"password";let g;e[10]!==s?(g=ie("pr-20",s),e[10]=s,e[11]=g):g=e[11];let d;e[12]!==n||e[13]!==i||e[14]!==a||e[15]!==C||e[16]!==g||e[17]!==l?(d=t.jsx(we,{type:C,value:l,onChange:n,placeholder:i,className:g,...a}),e[12]=n,e[13]=i,e[14]=a,e[15]=C,e[16]=g,e[17]=l,e[18]=d):d=e[18];const y=c?"Hide password":"Show password";let v;e[19]!==c?(v=c?t.jsx(es,{size:16}):t.jsx(ts,{size:16}),e[19]=c,e[20]=v):v=e[20];let x;e[21]!==y||e[22]!==v||e[23]!==_?(x=t.jsx(B,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:_,title:y,children:v}),e[21]=y,e[22]=v,e[23]=_,e[24]=x):x=e[24];const E=!l,S=p?"Copied!":"Copy token";let j;e[25]!==p?(j=p?t.jsx(Jt,{size:16}):t.jsx(gt,{size:16}),e[25]=p,e[26]=j):j=e[26];let b;e[27]!==m||e[28]!==S||e[29]!==j||e[30]!==E?(b=t.jsx(B,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:m,disabled:E,title:S,children:j}),e[27]=m,e[28]=S,e[29]=j,e[30]=E,e[31]=b):b=e[31];let N;e[32]!==b||e[33]!==x?(N=t.jsxs("div",{className:"absolute right-1 top-1 flex items-center gap-1 h-8",children:[x,b]}),e[32]=b,e[33]=x,e[34]=N):N=e[34];let O;return e[35]!==N||e[36]!==d?(O=t.jsxs("div",{className:"relative",children:[d,N]}),e[35]=N,e[36]=d,e[37]=O):O=e[37],O}function He(o){const e=H.c(19),{card:s,selfClient:n,org:i,onDone:a,onError:l}=o,c=be();let u;e[0]!==s||e[1]!==n?(u=async g=>{const d={...s.configurationState??{},...g};await n.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:s.linkedConnectionId||s.candidateConnectionId,data:{configuration_state:d}}})},e[0]=s,e[1]=n,e[2]=u):u=e[2];let p;e[3]!==a||e[4]!==i||e[5]!==c?(p=async()=>{await c.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(i.id)}),a()},e[3]=a,e[4]=i,e[5]=c,e[6]=p):p=e[6];let r;e[7]!==l?(r=g=>{l?.(g)},e[7]=l,e[8]=r):r=e[8];let f;e[9]!==u||e[10]!==p||e[11]!==r?(f={mutationFn:u,onSuccess:p,onError:r},e[9]=u,e[10]=p,e[11]=r,e[12]=f):f=e[12];const m=Ae(f);let h;e[13]!==m?(h=g=>m.mutate(g),e[13]=m,e[14]=h):h=e[14];const _=h;let C;return e[15]!==m.error||e[16]!==m.isPending||e[17]!==_?(C={save:_,isPending:m.isPending,error:m.error},e[15]=m.error,e[16]=m.isPending,e[17]=_,e[18]=C):C=e[18],C}const xs=je({accountName:re().min(1,"Informe o nome da conta"),appKey:re().optional(),appToken:re().optional()});function ys(o){const e=H.c(63),{card:s,selfClient:n,org:i,onDone:a,onIsPendingChange:l}=o;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=_e(xs),e[0]=c):c=e[0];const u=s.configurationState?.accountName||"",p=s.configurationState?.appKey||"",r=s.configurationState?.appToken||"";let f;e[1]!==u||e[2]!==p||e[3]!==r?(f={resolver:c,defaultValues:{accountName:u,appKey:p,appToken:r}},e[1]=u,e[2]=p,e[3]=r,e[4]=f):f=e[4];const m=Se(f);let h;e[5]!==s.configurationState?.accountName||e[6]!==s.configurationState?.appKey||e[7]!==s.configurationState?.appToken||e[8]!==m?(h=()=>{m.reset({accountName:s.configurationState?.accountName||"",appKey:s.configurationState?.appKey||"",appToken:s.configurationState?.appToken||""})},e[5]=s.configurationState?.accountName,e[6]=s.configurationState?.appKey,e[7]=s.configurationState?.appToken,e[8]=m,e[9]=h):h=e[9];let _;e[10]!==s.configurationState||e[11]!==m?(_=[s.configurationState,m],e[10]=s.configurationState,e[11]=m,e[12]=_):_=e[12],Q.useEffect(h,_);let C;e[13]!==s||e[14]!==a||e[15]!==i||e[16]!==n?(C={card:s,selfClient:n,org:i,onDone:a},e[13]=s,e[14]=a,e[15]=i,e[16]=n,e[17]=C):C=e[17];const{save:g,isPending:d,error:y}=He(C);let v,x;e[18]!==d||e[19]!==l?(x=()=>{l?.(d)},v=[d,l],e[18]=d,e[19]=l,e[20]=v,e[21]=x):(v=e[20],x=e[21]),Q.useEffect(x,v);let E;if(e[22]!==m||e[23]!==g){let D;e[25]!==g?(D=async F=>{g(F)},e[25]=g,e[26]=D):D=e[26],E=m.handleSubmit(D),e[22]=m,e[23]=g,e[24]=E}else E=e[24];const S=E;let j;e[27]!==d?(j=D=>{const{field:F}=D;return t.jsxs(ce,{children:[t.jsx(Oe,{children:"Nome da conta"}),t.jsx(de,{children:t.jsx(we,{placeholder:"Nome da sua conta VTEX",...F,disabled:d})}),t.jsx(ue,{})]})},e[27]=d,e[28]=j):j=e[28];let b;e[29]!==m.control||e[30]!==j?(b=t.jsx(le,{control:m.control,name:"accountName",render:j}),e[29]=m.control,e[30]=j,e[31]=b):b=e[31];let N;e[32]!==d?(N=D=>{const{field:F}=D;return t.jsxs(ce,{children:[t.jsx(Oe,{children:"App Key (opcional)"}),t.jsx(de,{children:t.jsx(at,{placeholder:"App Key da VTEX",...F,disabled:d})}),t.jsx(ue,{})]})},e[32]=d,e[33]=N):N=e[33];let O;e[34]!==m.control||e[35]!==N?(O=t.jsx(le,{control:m.control,name:"appKey",render:N}),e[34]=m.control,e[35]=N,e[36]=O):O=e[36];let k;e[37]!==d?(k=D=>{const{field:F}=D;return t.jsxs(ce,{children:[t.jsx(Oe,{children:"App Token (opcional)"}),t.jsx(de,{children:t.jsx(at,{placeholder:"App Token da VTEX",...F,disabled:d})}),t.jsx(ue,{})]})},e[37]=d,e[38]=k):k=e[38];let w;e[39]!==m.control||e[40]!==k?(w=t.jsx(le,{control:m.control,name:"appToken",render:k}),e[39]=m.control,e[40]=k,e[41]=w):w=e[41];let I;e[42]!==m||e[43]!==b||e[44]!==O||e[45]!==w?(I=t.jsxs(Ne,{...m,children:[b,O,w]}),e[42]=m,e[43]=b,e[44]=O,e[45]=w,e[46]=I):I=e[46];let L;e[47]!==y?(L=y&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:y instanceof Error?y.message:"Não foi possível salvar a configuração"}),e[47]=y,e[48]=L):L=e[48];let P;e[49]!==d||e[50]!==a?(P=t.jsx(B,{type:"button",variant:"outline",onClick:a,disabled:d,children:"Cancelar"}),e[49]=d,e[50]=a,e[51]=P):P=e[51];const K=d?"Salvando...":"Salvar";let $;e[52]!==d||e[53]!==K?($=t.jsx(B,{type:"submit",disabled:d,children:K}),e[52]=d,e[53]=K,e[54]=$):$=e[54];let q;e[55]!==P||e[56]!==$?(q=t.jsxs(xe,{className:"pt-4",children:[P,$]}),e[55]=P,e[56]=$,e[57]=q):q=e[57];let M;return e[58]!==S||e[59]!==I||e[60]!==L||e[61]!==q?(M=t.jsxs("form",{onSubmit:S,className:"space-y-4",children:[I,L,q]}),e[58]=S,e[59]=I,e[60]=L,e[61]=q,e[62]=M):M=e[62],M}function Ve(o){const e=H.c(29),{options:s,value:n,onChange:i,disabled:a,ariaLabel:l,searchPlaceholder:c,hideSearch:u}=o,p=c===void 0?"Buscar...":c,r=u===void 0?!1:u,[f,m]=Q.useState("");let h,_,C;if(e[0]!==s||e[1]!==f||e[2]!==n){const j=f.trim().toLowerCase();h=j?s.filter(b=>b.label.toLowerCase().includes(j)):s,_=h.map(bs),C=_.includes(n)?n:_[0]??"",e[0]=s,e[1]=f,e[2]=n,e[3]=h,e[4]=_,e[5]=C}else h=e[3],_=e[4],C=e[5];const g=C;let d;e[6]!==a||e[7]!==_||e[8]!==i?(d=function(b){if(a||!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft","Home","End"].includes(b.key))return;b.preventDefault();const O=b.currentTarget.dataset.value,k=_.indexOf(O),w=_.length;if(w===0)return;let I;b.key==="ArrowDown"||b.key==="ArrowRight"?I=(k+1)%w:b.key==="ArrowUp"||b.key==="ArrowLeft"?I=(k-1+w)%w:b.key==="Home"?I=0:I=w-1;const L=_[I];i(L),b.currentTarget.closest('[role="radiogroup"]')?.querySelector(`[data-value="${CSS.escape(L)}"]`)?.focus()},e[6]=a,e[7]=_,e[8]=i,e[9]=d):d=e[9];const y=d;let v;e[10]!==l||e[11]!==a||e[12]!==r||e[13]!==f||e[14]!==p?(v=r?null:t.jsxs("div",{className:"relative",children:[t.jsx(pt,{size:16,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t.jsx(we,{type:"text",value:f,onChange:j=>m(j.target.value),disabled:a,placeholder:p,"aria-label":`Buscar ${l}`,className:"h-8 pl-8"})]}),e[10]=l,e[11]=a,e[12]=r,e[13]=f,e[14]=p,e[15]=v):v=e[15];let x;e[16]!==a||e[17]!==h||e[18]!==y||e[19]!==i||e[20]!==g||e[21]!==n?(x=h.length===0?t.jsx("div",{className:"px-2 py-2 text-sm text-muted-foreground",children:"Nenhum resultado"}):h.map(j=>{const b=j.value===n;return t.jsxs("button",{type:"button",role:"radio","aria-checked":b,disabled:a,"data-value":j.value,tabIndex:j.value===g?0:-1,onClick:()=>i(j.value),onKeyDown:y,className:ie("flex w-full items-center justify-between gap-2 rounded-sm px-2 py-2 text-left text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","disabled:pointer-events-none disabled:opacity-50",b?"bg-muted font-medium text-foreground":"text-foreground hover:bg-muted/50"),children:[t.jsx("span",{className:"truncate",children:j.label}),b?t.jsx(Ge,{size:16,className:"shrink-0 text-primary"}):null]},j.value)}),e[16]=a,e[17]=h,e[18]=y,e[19]=i,e[20]=g,e[21]=n,e[22]=x):x=e[22];let E;e[23]!==l||e[24]!==x?(E=t.jsx("div",{role:"radiogroup","aria-label":l,className:"max-h-[280px] overflow-y-auto",children:x}),e[23]=l,e[24]=x,e[25]=E):E=e[25];let S;return e[26]!==v||e[27]!==E?(S=t.jsxs("div",{className:"space-y-2",children:[v,E]}),e[26]=v,e[27]=E,e[28]=S):S=e[28],S}function bs(o){return o.value}function Be(o){const e=H.c(16),{label:s,iconSize:n,className:i,iconClassName:a,labelClassName:l}=o,c=n===void 0?14:n;let u;e[0]!==i?(u=ie("inline-flex items-center gap-2",i),e[0]=i,e[1]=u):u=e[1];let p;e[2]!==a?(p=ie("shrink-0 animate-spin",a),e[2]=a,e[3]=p):p=e[3];let r;e[4]!==c||e[5]!==p?(r=t.jsx(ke,{size:c,className:p}),e[4]=c,e[5]=p,e[6]=r):r=e[6];let f;e[7]!==l?(f=ie("text-sm",l),e[7]=l,e[8]=f):f=e[8];let m;e[9]!==s||e[10]!==f?(m=t.jsx("span",{className:f,children:s}),e[9]=s,e[10]=f,e[11]=m):m=e[11];let h;return e[12]!==u||e[13]!==r||e[14]!==m?(h=t.jsxs("span",{className:u,children:[r,m]}),e[12]=u,e[13]=r,e[14]=m,e[15]=h):h=e[15],h}const Cs=je({propertyId:re().min(1,"Selecione uma propriedade")});function vs(o){const e=H.c(68),{card:s,connectionId:n,companionClient:i,selfClient:a,org:l,onDone:c,onDisconnect:u,onIsPendingChange:p}=o;let r;e[0]!==n||e[1]!==l.id?(r=Y.commerceDiscoveryCompanionGaProperties(l.id,n),e[0]=n,e[1]=l.id,e[2]=r):r=e[2];let f;e[3]!==i?(f=async()=>{const R=await i.callTool({name:"get-account-summaries",arguments:{}}),T=J(R);return Mt(T)},e[3]=i,e[4]=f):f=e[4];let m;e[5]!==r||e[6]!==f?(m={queryKey:r,queryFn:f},e[5]=r,e[6]=f,e[7]=m):m=e[7];const h=ge(m);let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=_e(Cs),e[8]=_):_=e[8];const C=s.configurationState?.propertyId||"";let g;e[9]!==C?(g={resolver:_,defaultValues:{propertyId:C}},e[9]=C,e[10]=g):g=e[10];const d=Se(g);let y;e[11]!==s||e[12]!==c||e[13]!==l||e[14]!==a?(y={card:s,selfClient:a,org:l,onDone:c},e[11]=s,e[12]=c,e[13]=l,e[14]=a,e[15]=y):y=e[15];const{save:v,isPending:x,error:E}=He(y);let S,j;e[16]!==x||e[17]!==p?(S=()=>{p?.(x)},j=[x,p],e[16]=x,e[17]=p,e[18]=S,e[19]=j):(S=e[18],j=e[19]),Q.useEffect(S,j);let b;if(e[20]!==d||e[21]!==v){let R;e[23]!==v?(R=async T=>{v(T)},e[23]=v,e[24]=R):R=e[24],b=d.handleSubmit(R),e[20]=d,e[21]=v,e[22]=b}else b=e[22];const N=b;if(h.isLoading){let R;return e[25]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:t.jsx(Be,{label:"Carregando propriedades..."})}),e[25]=R):R=e[25],R}if(h.isError){let R;return e[26]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"space-y-4",children:t.jsx("p",{className:"text-sm text-destructive",children:"Não foi possível carregar as propriedades do Google Analytics."})}),e[26]=R):R=e[26],R}let O;e[27]!==h.data?(O=h.data||[],e[27]=h.data,e[28]=O):O=e[28];const k=O;if(k.flatMap(_s).length===0){let R;e[29]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhuma propriedade do Google Analytics foi encontrada. Conecte uma conta do Google Analytics com propriedades."}),e[29]=R):R=e[29];let T;e[30]!==u?(T=u?t.jsx("button",{type:"button",onClick:u,className:"text-xs text-muted-foreground underline underline-offset-2 hover:text-destructive",children:"Desconectar conta"}):t.jsx("span",{}),e[30]=u,e[31]=T):T=e[31];let G;e[32]!==c?(G=t.jsx(B,{type:"button",variant:"outline",onClick:c,children:"Fechar"}),e[32]=c,e[33]=G):G=e[33];let Z;return e[34]!==T||e[35]!==G?(Z=t.jsxs("div",{className:"space-y-4",children:[R,t.jsxs(xe,{className:"flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[T,G]})]}),e[34]=T,e[35]=G,e[36]=Z):Z=e[36],Z}let I;e[37]!==x||e[38]!==k?(I=R=>{const{field:T}=R;return t.jsxs(ce,{children:[t.jsx(de,{children:t.jsx(Ve,{options:k.flatMap(js),value:T.value,onChange:T.onChange,disabled:x,ariaLabel:"Propriedade do Google Analytics"})}),t.jsx(ue,{})]})},e[37]=x,e[38]=k,e[39]=I):I=e[39];let L;e[40]!==d.control||e[41]!==I?(L=t.jsx(le,{control:d.control,name:"propertyId",render:I}),e[40]=d.control,e[41]=I,e[42]=L):L=e[42];let P;e[43]!==d||e[44]!==L?(P=t.jsx(Ne,{...d,children:L}),e[43]=d,e[44]=L,e[45]=P):P=e[45];let K;e[46]!==E?(K=E&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:E instanceof Error?E.message:"Não foi possível salvar a configuração"}),e[46]=E,e[47]=K):K=e[47];let $;e[48]!==x||e[49]!==u?($=u?t.jsx("button",{type:"button",onClick:u,disabled:x,className:"text-xs text-muted-foreground underline underline-offset-2 hover:text-destructive disabled:opacity-50",children:"Desconectar conta"}):t.jsx("span",{}),e[48]=x,e[49]=u,e[50]=$):$=e[50];let q;e[51]!==x||e[52]!==c?(q=t.jsx(B,{type:"button",variant:"outline",onClick:c,disabled:x,children:"Cancelar"}),e[51]=x,e[52]=c,e[53]=q):q=e[53];const M=x?"Salvando...":"Salvar";let D;e[54]!==x||e[55]!==M?(D=t.jsx(B,{type:"submit",disabled:x,children:M}),e[54]=x,e[55]=M,e[56]=D):D=e[56];let F;e[57]!==q||e[58]!==D?(F=t.jsxs("div",{className:"flex gap-2",children:[q,D]}),e[57]=q,e[58]=D,e[59]=F):F=e[59];let z;e[60]!==$||e[61]!==F?(z=t.jsxs(xe,{className:"flex-col gap-2 pt-4 sm:flex-row sm:items-center sm:justify-between",children:[$,F]}),e[60]=$,e[61]=F,e[62]=z):z=e[62];let U;return e[63]!==N||e[64]!==P||e[65]!==K||e[66]!==z?(U=t.jsxs("form",{onSubmit:N,className:"space-y-4",children:[P,K,z]}),e[63]=N,e[64]=P,e[65]=K,e[66]=z,e[67]=U):U=e[67],U}function js(o){return o.options}function _s(o){return o.options}const Ss=je({siteUrl:re().min(1,"Selecione um site")});function Ns(o){const e=H.c(62),{card:s,connectionId:n,companionClient:i,selfClient:a,org:l,contextSiteUrl:c,onDone:u,onIsPendingChange:p}=o;let r;e[0]!==n||e[1]!==l.id?(r=Y.commerceDiscoveryCompanionGscSites(l.id,n),e[0]=n,e[1]=l.id,e[2]=r):r=e[2];let f;e[3]!==i?(f=async()=>{const T=await i.callTool({name:"list_sites",arguments:{}});return J(T).sites||[]},e[3]=i,e[4]=f):f=e[4];let m;e[5]!==r||e[6]!==f?(m={queryKey:r,queryFn:f},e[5]=r,e[6]=f,e[7]=m):m=e[7];const h=ge(m);let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=_e(Ss),e[8]=_):_=e[8];const C=s.configurationState?.siteUrl||"";let g;e[9]!==C?(g={resolver:_,defaultValues:{siteUrl:C}},e[9]=C,e[10]=g):g=e[10];const d=Se(g);let y;e[11]!==s||e[12]!==u||e[13]!==l||e[14]!==a?(y={card:s,selfClient:a,org:l,onDone:u},e[11]=s,e[12]=u,e[13]=l,e[14]=a,e[15]=y):y=e[15];const{save:v,isPending:x,error:E}=He(y),S=Q.useRef(!1),j=s.configurationState?.siteUrl;let b,N;e[16]!==x||e[17]!==p?(b=()=>{p?.(x)},N=[x,p],e[16]=x,e[17]=p,e[18]=b,e[19]=N):(b=e[18],N=e[19]),Q.useEffect(b,N);let O,k;e[20]!==c||e[21]!==d||e[22]!==j||e[23]!==h.data||e[24]!==h.isSuccess?(O=()=>{if(!(S.current||!h.isSuccess)){if(S.current=!0,j){d.getValues("siteUrl")!==j&&d.setValue("siteUrl",j);return}if(!d.getValues("siteUrl")){const T=Qt(c,h.data??[]);T&&d.setValue("siteUrl",T)}}},k=[h.isSuccess,h.data,j,c,d],e[20]=c,e[21]=d,e[22]=j,e[23]=h.data,e[24]=h.isSuccess,e[25]=O,e[26]=k):(O=e[25],k=e[26]),Q.useEffect(O,k);let w;if(e[27]!==d||e[28]!==v){let T;e[30]!==v?(T=async G=>{v(G)},e[30]=v,e[31]=T):T=e[31],w=d.handleSubmit(T),e[27]=d,e[28]=v,e[29]=w}else w=e[29];const I=w;if(h.isLoading){let T;return e[32]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:t.jsx(Be,{label:"Carregando sites..."})}),e[32]=T):T=e[32],T}if(h.isError){let T;return e[33]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("div",{className:"space-y-4",children:t.jsx("p",{className:"text-sm text-destructive",children:"Não foi possível carregar os sites do Google Search Console."})}),e[33]=T):T=e[33],T}let L;e[34]!==h.data?(L=h.data||[],e[34]=h.data,e[35]=L):L=e[35];const P=L;if(P.length===0){let T;return e[36]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("div",{className:"space-y-4",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum site verificado foi encontrado. Verifique um site no Google Search Console."})}),e[36]=T):T=e[36],T}let K;e[37]!==x||e[38]!==P?(K=T=>{const{field:G}=T;return t.jsxs(ce,{children:[t.jsx(de,{children:t.jsx(Ve,{options:P.map(ws),value:G.value,onChange:G.onChange,disabled:x,ariaLabel:"Site verificado"})}),t.jsx(ue,{})]})},e[37]=x,e[38]=P,e[39]=K):K=e[39];let $;e[40]!==d.control||e[41]!==K?($=t.jsx(le,{control:d.control,name:"siteUrl",render:K}),e[40]=d.control,e[41]=K,e[42]=$):$=e[42];let q;e[43]!==d||e[44]!==$?(q=t.jsx(Ne,{...d,children:$}),e[43]=d,e[44]=$,e[45]=q):q=e[45];let M;e[46]!==E?(M=E&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:E instanceof Error?E.message:"Não foi possível salvar a configuração"}),e[46]=E,e[47]=M):M=e[47];let D;e[48]!==x||e[49]!==u?(D=t.jsx(B,{type:"button",variant:"outline",onClick:u,disabled:x,children:"Cancelar"}),e[48]=x,e[49]=u,e[50]=D):D=e[50];const F=x?"Salvando...":"Salvar";let z;e[51]!==x||e[52]!==F?(z=t.jsx(B,{type:"submit",disabled:x,children:F}),e[51]=x,e[52]=F,e[53]=z):z=e[53];let U;e[54]!==D||e[55]!==z?(U=t.jsxs(xe,{className:"pt-4",children:[D,z]}),e[54]=D,e[55]=z,e[56]=U):U=e[56];let R;return e[57]!==I||e[58]!==q||e[59]!==M||e[60]!==U?(R=t.jsxs("form",{onSubmit:I,className:"space-y-4",children:[q,M,U]}),e[57]=I,e[58]=q,e[59]=M,e[60]=U,e[61]=R):R=e[61],R}function ws(o){return{value:o.siteUrl,label:o.siteUrl}}const Es=je({githubRepo:re().min(1,"Selecione um repositório")}),Ts=15e3,Is=/^[\w.-]+\/[\w.-]+$/;async function Os(o,e,s,n){const{installations:i}=await xt(o,s),a=n.trim(),l=await Promise.allSettled(i.map(async r=>{const f=r.type==="User"?"user":"org",m=a?`${f}:${r.login} ${a} in:name`:`${f}:${r.login}`,_=await e.callTool({name:"search_repositories",arguments:{query:m,page:1,perPage:50}},void 0,{signal:AbortSignal.timeout(Ts)}),C=_.content?.[0]?.text;if(_.isError)throw new Error(C??"search_repositories failed");if(!C)throw new Error("empty search_repositories response");return JSON.parse(C).items??[]})),c=new Map;let u=0;for(const r of l){if(r.status==="rejected"){u+=1;continue}for(const f of r.value)f.full_name&&!c.has(f.full_name)&&c.set(f.full_name,f)}return{repos:Array.from(c.values()).sort((r,f)=>(f.updated_at??"").localeCompare(r.updated_at??"")).map(r=>r.full_name),failed:u,total:i.length}}function ks(o){const e=H.c(89),{connectionId:s,companionClient:n,selfClient:i,org:a,onDone:l,onIsPendingChange:c}=o,u=be();let p;e[0]!==a.id?(p=lt.COMMERCE_DISCOVERY(a.id),e[0]=a.id,e[1]=p):p=e[1];const r=p,[f,m]=Q.useState(""),h=ss(f,300),_=Q.useRef(!1);let C;e[2]!==s||e[3]!==a.id?(C=Y.commerceDiscoveryCompanionGithubSelected(a.id,s),e[2]=s,e[3]=a.id,e[4]=C):C=e[4];let g;e[5]!==r||e[6]!==i?(g=async()=>{const W=await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:r}}),se=J(W).item?.configuration_state??null;return typeof se?.github_repo=="string"?se.github_repo:""},e[5]=r,e[6]=i,e[7]=g):g=e[7];let d;e[8]!==C||e[9]!==g?(d={queryKey:C,queryFn:g},e[8]=C,e[9]=g,e[10]=d):d=e[10];const y=ge(d);let v;e[11]!==s||e[12]!==h||e[13]!==a.id?(v=Y.commerceDiscoveryCompanionGithubRepos(a.id,s,h.trim()),e[11]=s,e[12]=h,e[13]=a.id,e[14]=v):v=e[14];let x;e[15]!==n||e[16]!==s||e[17]!==h||e[18]!==i?(x=()=>Os(W=>i.callTool(W),n,s,h),e[15]=n,e[16]=s,e[17]=h,e[18]=i,e[19]=x):x=e[19];let E;e[20]!==v||e[21]!==x?(E={queryKey:v,queryFn:x},e[20]=v,e[21]=x,e[22]=E):E=e[22];const S=ge(E);let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:_e(Es),defaultValues:{githubRepo:""}},e[23]=j):j=e[23];const b=Se(j);let N;e[24]!==r||e[25]!==n||e[26]!==s||e[27]!==a.id||e[28]!==a.slug||e[29]!==i?(N=async W=>{const se=await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:r}}),vt={...J(se).item?.configuration_state??null??{},github_repo:W};await i.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:r,data:{configuration_state:vt}}});const[fe,Te]=W.split("/");if(!fe||!Te)throw new Error(`Repositório inválido: "${W}". Use o formato owner/nome.`);const Je=Ft(a.id),et=J(await i.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:Je}})).item,ae=et?.metadata?.githubRepo,jt=et?.connections??[],tt=ae?.connectionId&&ae.owner.toLowerCase()===fe.toLowerCase()&&ae.name.toLowerCase()===Te.toLowerCase()?ae:null;let pe=tt?.connectionId,De=tt?.installationId,Pe;if(!pe){const{installations:he}=await xt(Ce=>i.callTool(Ce),s),Ie=ns(he,fe);if(!Ie)throw new Error(`Nenhuma instalação do GitHub encontrada para "${fe}".`);De=Ie.installationId;const st=J(await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:s}})).item;if(!st)throw new Error("Conexão do GitHub não encontrada.");const{childConnectionId:nt}=await os({orgSlug:a.slug,sourceConnection:st,installationId:De,owner:fe,repo:Te,githubCallTool:Ce=>n.callTool(Ce),selfCallTool:Ce=>i.callTool(Ce)});pe=nt,Pe=nt}const $e=ae?.connectionId&&ae.connectionId!==pe?ae.connectionId:void 0,_t=[...jt.filter(he=>he.connection_id!==pe&&he.connection_id!==$e),{connection_id:pe,selected_tools:[]}];try{await i.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:Je,data:{connections:_t,metadata:{githubRepo:{owner:fe,name:Te,url:`https://github.com/${W}`,installationId:De,connectionId:pe}}}}}),$e&&await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:$e,force:!0}}).catch(Ls)}catch(he){const Ie=he;throw Pe&&await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:Pe,force:!0}}).catch(As),Ie}},e[24]=r,e[25]=n,e[26]=s,e[27]=a.id,e[28]=a.slug,e[29]=i,e[30]=N):N=e[30];let O;e[31]!==r||e[32]!==l||e[33]!==a.id||e[34]!==u?(O=async()=>{await u.invalidateQueries({queryKey:Y.commerceDiscoveryConnection(a.id,r)}),await u.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(a.id)}),Pt(u,a.id),l()},e[31]=r,e[32]=l,e[33]=a.id,e[34]=u,e[35]=O):O=e[35];let k;e[36]!==O||e[37]!==N?(k={mutationFn:N,onSuccess:O},e[36]=O,e[37]=N,e[38]=k):k=e[38];const w=Ae(k),I=w.isPending;let L,P;e[39]!==I||e[40]!==c?(L=()=>{c?.(I)},P=[I,c],e[39]=I,e[40]=c,e[41]=L,e[42]=P):(L=e[41],P=e[42]),Q.useEffect(L,P);const K=y.data??"";let $,q;e[43]!==b||e[44]!==y.data||e[45]!==y.isSuccess?($=()=>{!y.isSuccess||_.current||(_.current=!0,y.data&&b.setValue("githubRepo",y.data))},q=[y.isSuccess,y.data,b],e[43]=b,e[44]=y.data,e[45]=y.isSuccess,e[46]=$,e[47]=q):($=e[46],q=e[47]),Q.useEffect($,q);let M;if(e[48]!==b||e[49]!==w){let W;e[51]!==w?(W=async se=>{w.mutate(se.githubRepo)},e[51]=w,e[52]=W):W=e[52],M=b.handleSubmit(W),e[48]=b,e[49]=w,e[50]=M}else M=e[50];const D=M;let F,z,U;if(e[53]!==h||e[54]!==S.data?.failed||e[55]!==S.data?.repos||e[56]!==S.data?.total||e[57]!==K){const W=S.data?.repos??[];F=S.data?.failed??0,U=S.data?.total??0;const se=h.trim();z=[...W],se&&Is.test(se)&&!z.includes(se)&&z.unshift(se),K&&!z.includes(K)&&z.push(K),e[53]=h,e[54]=S.data?.failed,e[55]=S.data?.repos,e[56]=S.data?.total,e[57]=K,e[58]=F,e[59]=z,e[60]=U}else F=e[58],z=e[59],U=e[60];const R=U>0&&F===U,T=S.isError||R?"Não foi possível buscar os repositórios (erro ou tempo esgotado). Tente novamente ou digite o repositório no formato owner/nome.":F>0?"Parte da busca falhou — alguns repositórios podem não ter aparecido. Tente novamente ou digite owner/nome.":null;let G;e[61]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx(pt,{size:16,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[61]=G):G=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=W=>m(W.target.value),e[62]=Z):Z=e[62];let X;e[63]!==I||e[64]!==f?(X=t.jsxs("div",{className:"relative",children:[G,t.jsx(we,{type:"text",value:f,onChange:Z,disabled:I,placeholder:"Buscar repositório","aria-label":"Buscar repositório",className:"h-8 pl-8"})]}),e[63]=I,e[64]=f,e[65]=X):X=e[65];let ee;e[66]!==b||e[67]!==I||e[68]!==z||e[69]!==S.isLoading||e[70]!==T?(ee=S.isLoading?t.jsx("div",{className:"flex min-h-[160px] items-center justify-center",children:t.jsx(Be,{label:"Carregando repositórios..."})}):t.jsxs(t.Fragment,{children:[T&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:T}),z.length===0?!T&&t.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum repositório encontrado. Digite o nome do repositório (owner/nome) para buscar."}):t.jsx(Ne,{...b,children:t.jsx(le,{control:b.control,name:"githubRepo",render:W=>{const{field:se}=W;return t.jsxs(ce,{children:[t.jsx(de,{children:t.jsx(Ve,{options:z.map(Rs),value:se.value,onChange:se.onChange,disabled:I,ariaLabel:"Repositório",hideSearch:!0})}),t.jsx(ue,{})]})}})})]}),e[66]=b,e[67]=I,e[68]=z,e[69]=S.isLoading,e[70]=T,e[71]=ee):ee=e[71];let V;e[72]!==w.error?(V=w.error&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:w.error instanceof Error?w.error.message:"Não foi possível salvar a configuração"}),e[72]=w.error,e[73]=V):V=e[73];let A;e[74]!==I||e[75]!==l?(A=t.jsx(B,{type:"button",variant:"outline",onClick:l,disabled:I,children:"Cancelar"}),e[74]=I,e[75]=l,e[76]=A):A=e[76];const te=I?"Salvando...":"Salvar";let ne;e[77]!==I||e[78]!==te?(ne=t.jsx(B,{type:"submit",disabled:I,children:te}),e[77]=I,e[78]=te,e[79]=ne):ne=e[79];let me;e[80]!==A||e[81]!==ne?(me=t.jsxs(xe,{className:"pt-4",children:[A,ne]}),e[80]=A,e[81]=ne,e[82]=me):me=e[82];let Ee;return e[83]!==D||e[84]!==X||e[85]!==ee||e[86]!==V||e[87]!==me?(Ee=t.jsxs("form",{onSubmit:D,className:"space-y-4",children:[X,ee,V,me]}),e[83]=D,e[84]=X,e[85]=ee,e[86]=V,e[87]=me,e[88]=Ee):Ee=e[88],Ee}function Rs(o){return{value:o,label:o}}function As(){}function Ls(){}const Ds={vtex:ys,"google-analytics":vs,"google-search-console":Ns,github:ks},ye="deco-reader@decocms.iam.gserviceaccount.com",bt={"google-analytics":"ga4","google-search-console":"gsc"},Ct={ga4:{label:"Google Analytics",resourceLabel:"ID da propriedade",resourcePlaceholder:"ex: 123456789",resourceHint:"No GA4: Admin → Detalhes da propriedade → ID da propriedade (só números).",connectSteps:["Abra o Google Analytics (GA4) da sua loja.","Vá em Admin → Acesso à propriedade (Gerenciamento de acesso).",`Clique em + → Adicionar usuários, cole ${ye} e conceda o papel Leitor.`,"Copie o ID da propriedade (Admin → Detalhes da propriedade) e cole abaixo."]},gsc:{label:"Google Search Console",resourceLabel:"Site / propriedade",resourcePlaceholder:"ex: sc-domain:sualoja.com.br",resourceHint:"Use o mesmo formato que aparece no Search Console: sc-domain:sualoja.com.br ou https://www.sualoja.com.br/.",connectSteps:["Abra o Google Search Console da sua loja.","Vá em Configurações → Usuários e permissões.",`Clique em Adicionar usuário, cole ${ye} e escolha permissão Completa.`,"Copie o endereço do site como aparece no seletor de propriedades e cole abaixo."]}};function Ps(o,e){const s=Ct[o].label;switch(e){case"no-access":return{title:`Ainda não conseguimos acessar este recurso no ${s}.`,steps:o==="ga4"?[`Confirme que ${ye} foi adicionado em Admin → Acesso à propriedade com o papel Leitor.`,"Confira se o ID da propriedade está correto (só números, sem o prefixo 'properties/').","A concessão de acesso pode levar alguns segundos — tente novamente."]:[`Confirme que ${ye} foi adicionado em Configurações → Usuários e permissões.`,"A permissão precisa ser Completa ou Restrita — 'Não verificado' não funciona.","Confira se o endereço do site está exatamente como aparece no Search Console."]};case"no-web-stream":return{title:"Esta propriedade do GA4 não tem um fluxo de dados da Web (site) configurado.",steps:["No GA4, vá em Admin → Fluxos de dados.","Clique em Adicionar fluxo → Web.","Informe a URL do site da sua loja e salve o fluxo.","Volte aqui e tente vincular de novo. (Propriedades só de app precisam de vínculo manual — fale com o suporte.)"]};case"no-match":return{title:"O recurso informado não corresponde ao domínio desta loja.",steps:o==="ga4"?["Verifique se digitou o ID da propriedade certa — provavelmente é de outro site.","No GA4, o site medido aparece em Admin → Fluxos de dados → (seu fluxo Web) → URL do stream."]:["Verifique se selecionou a propriedade do Search Console referente a esta loja.","O endereço precisa cobrir o mesmo domínio do diagnóstico."]};case"resource_already_bound":return{title:"Este recurso já está vinculado a outra loja.",steps:["Se este recurso é realmente desta loja, fale com o suporte para uma revisão manual.","Caso tenha digitado o id errado, confira e tente novamente."]};default:return{title:"Não foi possível verificar o acesso a este recurso.",steps:["Revise os passos de acesso acima e tente novamente.","Se persistir, fale com o suporte."]}}}function $s(o){const e=H.c(76),{provider:s,siteUrl:n,selfClient:i,org:a,initialResourceId:l,onDone:c,onIsPendingChange:u,onOAuthInstead:p}=o,r=Ct[s],f=be(),[m,h]=Q.useState(null);let _,C;if(e[0]!==r.resourceLabel){const V=je({resourceId:re().trim().min(1,`Informe o ${r.resourceLabel.toLowerCase()}`)});C=Se,_=_e(V),e[0]=r.resourceLabel,e[1]=_,e[2]=C}else _=e[1],C=e[2];const g=l??"";let d;e[3]!==g?(d={resourceId:g},e[3]=g,e[4]=d):d=e[4];let y;e[5]!==_||e[6]!==d?(y={resolver:_,defaultValues:d},e[5]=_,e[6]=d,e[7]=y):y=e[7];const v=C(y);let x;e[8]!==s||e[9]!==i||e[10]!==n?(x=async V=>{if(!n)throw new Error("URL da loja indisponível — recarregue a página.");const A=await i.callTool({name:"COMMERCE_DISCOVERY_BIND",arguments:{siteUrl:n,provider:s,resourceId:V.resourceId}});return J(A)},e[8]=s,e[9]=i,e[10]=n,e[11]=x):x=e[11];let E,S;e[12]!==u?(E=()=>u?.(!0),S=()=>u?.(!1),e[12]=u,e[13]=E,e[14]=S):(E=e[13],S=e[14]);let j;e[15]!==r.label||e[16]!==c||e[17]!==a||e[18]!==s||e[19]!==f||e[20]!==n?(j=async V=>{if(V.ok){h(null),Le.success(`${r.label} conectado`),n&&await f.invalidateQueries({queryKey:Y.commerceDiscoveryConnectionStatus(a.id,n)}),c();return}h({...Ps(s,V.reason??"unknown"),detail:V.detail})},e[15]=r.label,e[16]=c,e[17]=a,e[18]=s,e[19]=f,e[20]=n,e[21]=j):j=e[21];let b;e[22]!==x||e[23]!==E||e[24]!==S||e[25]!==j?(b={mutationFn:x,onMutate:E,onSettled:S,onSuccess:j},e[22]=x,e[23]=E,e[24]=S,e[25]=j,e[26]=b):b=e[26];const N=Ae(b);let O;if(e[27]!==v||e[28]!==N){let V;e[30]!==N?(V=A=>N.mutate(A),e[30]=N,e[31]=V):V=e[31],O=v.handleSubmit(V),e[27]=v,e[28]=N,e[29]=O}else O=e[29];const k=O,w=N.isPending,I=Fs;let L;e[32]!==r.connectSteps?(L=r.connectSteps.map(qs),e[32]=r.connectSteps,e[33]=L):L=e[33];let P;e[34]!==L?(P=t.jsx("ol",{className:"space-y-2 text-sm text-muted-foreground",children:L}),e[34]=L,e[35]=P):P=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx("code",{className:"min-w-0 flex-1 truncate text-xs text-foreground",children:ye}),e[36]=K):K=e[36];let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($=t.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/40 p-2",children:[K,t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:I,"aria-label":"Copiar e-mail do service account",children:t.jsx(gt,{size:16})})]}),e[37]=$):$=e[37];let q;e[38]!==r.resourceHint||e[39]!==r.resourceLabel||e[40]!==r.resourcePlaceholder||e[41]!==w?(q=V=>{const{field:A}=V;return t.jsxs(ce,{children:[t.jsx(Oe,{children:r.resourceLabel}),t.jsx(de,{children:t.jsx(we,{...A,placeholder:r.resourcePlaceholder,disabled:w,autoComplete:"off"})}),t.jsx(Xt,{children:r.resourceHint}),t.jsx(ue,{})]})},e[38]=r.resourceHint,e[39]=r.resourceLabel,e[40]=r.resourcePlaceholder,e[41]=w,e[42]=q):q=e[42];let M;e[43]!==v.control||e[44]!==q?(M=t.jsx(le,{control:v.control,name:"resourceId",render:q}),e[43]=v.control,e[44]=q,e[45]=M):M=e[45];let D;e[46]!==v||e[47]!==M?(D=t.jsx(Ne,{...v,children:M}),e[46]=v,e[47]=M,e[48]=D):D=e[48];let F;e[49]!==m?(F=m&&t.jsxs("div",{role:"alert",className:"space-y-2 rounded-lg border border-destructive/40 bg-destructive/5 p-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:m.title}),t.jsx("ol",{className:"space-y-1 text-sm text-muted-foreground",children:m.steps.map(zs)})]}),e[49]=m,e[50]=F):F=e[50];let z;e[51]!==N.error||e[52]!==N.isError?(z=N.isError&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:N.error instanceof Error?N.error.message:"Não foi possível vincular."}),e[51]=N.error,e[52]=N.isError,e[53]=z):z=e[53];let U;e[54]!==w||e[55]!==p?(U=p?t.jsx("button",{type:"button",onClick:p,disabled:w,className:"text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground disabled:opacity-50",children:"autorizar via login do Google"}):t.jsx("span",{}),e[54]=w,e[55]=p,e[56]=U):U=e[56];let R;e[57]!==w||e[58]!==c?(R=t.jsx(B,{type:"button",variant:"outline",onClick:c,disabled:w,children:"Cancelar"}),e[57]=w,e[58]=c,e[59]=R):R=e[59];const T=w?"Verificando...":"Vincular";let G;e[60]!==w||e[61]!==T?(G=t.jsx(B,{type:"submit",disabled:w,children:T}),e[60]=w,e[61]=T,e[62]=G):G=e[62];let Z;e[63]!==R||e[64]!==G?(Z=t.jsxs("div",{className:"flex gap-2",children:[R,G]}),e[63]=R,e[64]=G,e[65]=Z):Z=e[65];let X;e[66]!==U||e[67]!==Z?(X=t.jsxs(xe,{className:"flex-col gap-2 pt-2 sm:flex-row sm:items-center sm:justify-between",children:[U,Z]}),e[66]=U,e[67]=Z,e[68]=X):X=e[68];let ee;return e[69]!==k||e[70]!==P||e[71]!==D||e[72]!==F||e[73]!==z||e[74]!==X?(ee=t.jsxs("form",{onSubmit:k,className:"space-y-4",children:[P,$,D,F,z,X]}),e[69]=k,e[70]=P,e[71]=D,e[72]=F,e[73]=z,e[74]=X,e[75]=ee):ee=e[75],ee}function zs(o){return t.jsxs("li",{className:"flex gap-2",children:[t.jsx("span",{"aria-hidden":!0,children:"•"}),t.jsx("span",{children:o})]},o)}function qs(o,e){return t.jsxs("li",{className:"flex gap-2",children:[t.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-foreground",children:e+1}),t.jsx("span",{children:o})]},o)}function Fs(){navigator.clipboard?.writeText(ye),Le.success("E-mail copiado")}function Ks(){const o=H.c(2);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"size-9 shrink-0 animate-pulse rounded-lg bg-muted/60"}),o[0]=e):e=o[0];let s;return o[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-card p-3 sm:h-full sm:flex-col sm:items-stretch sm:p-4",children:[e,t.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[t.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted/60"}),t.jsx("div",{className:"hidden h-3 w-full animate-pulse rounded bg-muted/60 sm:block"})]}),t.jsx("div",{className:"h-8 w-20 shrink-0 animate-pulse rounded-lg bg-muted/60 sm:mt-auto sm:w-full"})]}),o[1]=s):s=o[1],s}const Us="rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground";function Ms(o){const e=H.c(36),{card:s,connecting:n,disconnecting:i,disabled:a,onConnect:l,onDisconnect:c,org:u,selfClient:p,siteUrl:r,autoOpenConfigFieldKey:f,onAutoOpenConfigHandled:m}=o,h=s.linkedConnectionId,_=bt[s.bindingType],C=!!_&&s.boundVia!=="oauth";let g;e[0]!==f||e[1]!==s||e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==h||e[6]!==m||e[7]!==l||e[8]!==c||e[9]!==u||e[10]!==_||e[11]!==p||e[12]!==r||e[13]!==C?(g=C&&_?t.jsx(Qs,{card:s,provider:_,org:u,selfClient:p,siteUrl:r,onOAuthInstead:l,disabled:a,connecting:n}):s.satisfied&&h?t.jsxs("div",{className:"flex items-center justify-end gap-1 sm:justify-start",children:[t.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[t.jsx(Ge,{size:16,className:"text-success"})," Conectado"]}),t.jsx(Q.Suspense,{fallback:t.jsx(Gs,{}),children:t.jsx(Hs,{card:s,org:u,selfClient:p,connectionId:h,contextSiteUrl:r,autoOpen:Gt({autoOpenFieldKey:f,card:s}),onAutoOpenHandled:m})}),t.jsxs(Ue,{children:[t.jsx(Me,{asChild:!0,children:t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0 text-muted-foreground hover:text-destructive",disabled:a||i,onClick:c,"aria-label":`Desconectar ${s.title}`,children:i?t.jsx(ke,{size:16,className:"animate-spin"}):t.jsx(Ut,{size:16})})}),t.jsx(Qe,{children:"Desconectar"})]})]}):t.jsx(B,{type:"button",variant:"outline",size:"sm",className:"sm:w-full",disabled:a||n,onClick:l,"aria-label":`Conectar ${s.title}`,children:n?t.jsx(ke,{size:16,className:"animate-spin"}):"Conectar"}),e[0]=f,e[1]=s,e[2]=n,e[3]=a,e[4]=i,e[5]=h,e[6]=m,e[7]=l,e[8]=c,e[9]=u,e[10]=_,e[11]=p,e[12]=r,e[13]=C,e[14]=g):g=e[14];const d=g;let y;e[15]!==s.icon||e[16]!==s.title?(y=t.jsx(Ke,{icon:s.icon,name:s.title,size:"sm",fit:"contain",className:"shrink-0 p-1.5"}),e[15]=s.icon,e[16]=s.title,e[17]=y):y=e[17];let v;e[18]!==s.area?(v=s.area&&t.jsx("span",{className:ie("hidden sm:inline-block",Us),children:s.area}),e[18]=s.area,e[19]=v):v=e[19];let x;e[20]!==y||e[21]!==v?(x=t.jsxs("div",{className:"shrink-0 sm:flex sm:w-full sm:items-center sm:justify-between sm:gap-2",children:[y,v]}),e[20]=y,e[21]=v,e[22]=x):x=e[22];let E;e[23]!==s.title?(E=t.jsx("p",{className:"text-sm font-medium text-foreground",children:s.title}),e[23]=s.title,e[24]=E):E=e[24];let S;e[25]!==s.headline?(S=s.headline&&t.jsx("p",{className:"hidden text-sm leading-5 text-muted-foreground sm:mt-0.5 sm:line-clamp-2 sm:block",children:s.headline}),e[25]=s.headline,e[26]=S):S=e[26];let j;e[27]!==E||e[28]!==S?(j=t.jsxs("div",{className:"min-w-0 flex-1",children:[E,S]}),e[27]=E,e[28]=S,e[29]=j):j=e[29];let b;e[30]!==d?(b=t.jsx("div",{className:"shrink-0 sm:mt-auto sm:w-full sm:pt-1",children:d}),e[30]=d,e[31]=b):b=e[31];let N;return e[32]!==x||e[33]!==j||e[34]!==b?(N=t.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-card p-3 sm:h-full sm:flex-col sm:items-stretch sm:p-4",children:[x,j,b]}),e[32]=x,e[33]=j,e[34]=b,e[35]=N):N=e[35],N}function Qs(o){const e=H.c(39),{card:s,provider:n,org:i,selfClient:a,siteUrl:l,onOAuthInstead:c,disabled:u,connecting:p}=o,[r,f]=Q.useState(!1),[m,h]=Q.useState(!1);let _;e[0]!==m?(_=I=>{!I&&m||f(I)},e[0]=m,e[1]=_):_=e[1];const C=_;let g;e[2]!==s.satisfied||e[3]!==s.title||e[4]!==p||e[5]!==u?(g=s.satisfied?t.jsxs("div",{className:"flex items-center justify-end gap-1 sm:justify-start",children:[t.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[t.jsx(Ge,{size:16,className:"text-success"})," Conectado"]}),t.jsxs(Ue,{children:[t.jsx(Me,{asChild:!0,children:t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:()=>f(!0),"aria-label":`Configurar ${s.title}`,children:t.jsx(ht,{size:16})})}),t.jsx(Qe,{children:"Editar configuração"})]})]}):t.jsx(B,{type:"button",variant:"outline",size:"sm",className:"sm:w-full",disabled:u||p,onClick:()=>f(!0),"aria-label":`Conectar ${s.title}`,children:p?t.jsx(ke,{size:16,className:"animate-spin"}):"Conectar"}),e[2]=s.satisfied,e[3]=s.title,e[4]=p,e[5]=u,e[6]=g):g=e[6];let d;e[7]!==s.icon||e[8]!==s.title?(d=t.jsx(Ke,{icon:s.icon,name:s.title,size:"md",fit:"contain",className:"p-1.5"}),e[7]=s.icon,e[8]=s.title,e[9]=d):d=e[9];let y;e[10]!==s.title?(y=t.jsx(ct,{children:s.title}),e[10]=s.title,e[11]=y):y=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(dt,{children:"Conceda acesso ao nosso leitor e informe o identificador"}),e[12]=v):v=e[12];let x;e[13]!==y?(x=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[y,v]}),e[13]=y,e[14]=x):x=e[14];let E;e[15]!==d||e[16]!==x?(E=t.jsxs(ut,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[d,x]}),e[15]=d,e[16]=x,e[17]=E):E=e[17];const S=s.boundResource??void 0;let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[18]=j):j=e[18];let b;e[19]!==s.satisfied||e[20]!==c?(b=s.satisfied?void 0:()=>{f(!1),c()},e[19]=s.satisfied,e[20]=c,e[21]=b):b=e[21];let N;e[22]!==i||e[23]!==n||e[24]!==a||e[25]!==l||e[26]!==b||e[27]!==S?(N=t.jsx($s,{provider:n,siteUrl:l,selfClient:a,org:i,initialResourceId:S,onDone:j,onIsPendingChange:h,onOAuthInstead:b}),e[22]=i,e[23]=n,e[24]=a,e[25]=l,e[26]=b,e[27]=S,e[28]=N):N=e[28];let O;e[29]!==N||e[30]!==E?(O=t.jsxs(mt,{className:"sm:max-w-lg",children:[E,N]}),e[29]=N,e[30]=E,e[31]=O):O=e[31];let k;e[32]!==C||e[33]!==r||e[34]!==O?(k=t.jsx(ft,{open:r,onOpenChange:C,children:O}),e[32]=C,e[33]=r,e[34]=O,e[35]=k):k=e[35];let w;return e[36]!==k||e[37]!==g?(w=t.jsxs(t.Fragment,{children:[g,k]}),e[36]=k,e[37]=g,e[38]=w):w=e[38],w}function Gs(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"size-8 shrink-0 animate-pulse rounded-lg bg-muted/60"}),o[0]=e):e=o[0],e}function Hs(o){const e=H.c(60),{card:s,org:n,selfClient:i,connectionId:a,contextSiteUrl:l,autoOpen:c,onAutoOpenHandled:u}=o;let p;e[0]!==a||e[1]!==n.id||e[2]!==n.slug?(p={connectionId:a,orgId:n.id,orgSlug:n.slug},e[0]=a,e[1]=n.id,e[2]=n.slug,e[3]=p):p=e[3];const r=Fe(p),[f,m]=Q.useState(c),[h,_]=Q.useState(!1),C=be(),g=Ds[s.bindingType],d=Ht(s.configurationState);let y;e[4]!==c||e[5]!==u?(y=()=>{m(!1),c&&u()},e[4]=c,e[5]=u,e[6]=y):y=e[6];const v=y;let x;e[7]!==v||e[8]!==h?(x=T=>{if(!(!T&&h)){if(!T){v();return}m(!0)}},e[7]=v,e[8]=h,e[9]=x):x=e[9];const E=x;let S;e[10]!==a||e[11]!==i?(S=async()=>{await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:a,force:!0}})},e[10]=a,e[11]=i,e[12]=S):S=e[12];let j;e[13]!==s.title||e[14]!==v||e[15]!==n.id||e[16]!==C?(j=async()=>{await C.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(n.id)}),Le.success(`${s.title} desconectado`),v()},e[13]=s.title,e[14]=v,e[15]=n.id,e[16]=C,e[17]=j):j=e[17];let b;e[18]!==S||e[19]!==j?(b={mutationFn:S,onSuccess:j,onError:Vs},e[18]=S,e[19]=j,e[20]=b):b=e[20];const N=Ae(b);if(!g)return null;let O;e[21]===Symbol.for("react.memo_cache_sentinel")?(O=()=>m(!0),e[21]=O):O=e[21];const k=`Configurar ${s.title}`;let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(ht,{size:16}),e[22]=w):w=e[22];let I;e[23]!==k?(I=t.jsx(Me,{asChild:!0,children:t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:O,"aria-label":k,children:w})}),e[23]=k,e[24]=I):I=e[24];const L=d.length>0?"Editar configuração":"Configurar";let P;e[25]!==L?(P=t.jsx(Qe,{children:L}),e[25]=L,e[26]=P):P=e[26];let K;e[27]!==I||e[28]!==P?(K=t.jsxs(Ue,{children:[I,P]}),e[27]=I,e[28]=P,e[29]=K):K=e[29];let $;e[30]!==s.icon||e[31]!==s.title?($=t.jsx(Ke,{icon:s.icon,name:s.title,size:"md",fit:"contain",className:"p-1.5"}),e[30]=s.icon,e[31]=s.title,e[32]=$):$=e[32];let q;e[33]!==s.title?(q=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[t.jsx(ct,{children:s.title}),t.jsxs(dt,{children:["Configure o ",s.title," para enriquecer os dados"]})]}),e[33]=s.title,e[34]=q):q=e[34];let M;e[35]!==$||e[36]!==q?(M=t.jsxs(ut,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[$,q]}),e[35]=$,e[36]=q,e[37]=M):M=e[37];let D;e[38]!==N?(D=()=>N.mutate(),e[38]=N,e[39]=D):D=e[39];let F;e[40]!==g||e[41]!==s||e[42]!==v||e[43]!==r||e[44]!==a||e[45]!==l||e[46]!==n||e[47]!==i||e[48]!==D?(F=t.jsx(g,{card:s,connectionId:a,companionClient:r,selfClient:i,org:n,contextSiteUrl:l,onDone:v,onDisconnect:D,onIsPendingChange:_}),e[40]=g,e[41]=s,e[42]=v,e[43]=r,e[44]=a,e[45]=l,e[46]=n,e[47]=i,e[48]=D,e[49]=F):F=e[49];let z;e[50]!==M||e[51]!==F?(z=t.jsxs(mt,{className:"sm:max-w-lg",children:[M,F]}),e[50]=M,e[51]=F,e[52]=z):z=e[52];let U;e[53]!==f||e[54]!==E||e[55]!==z?(U=t.jsx(ft,{open:f,onOpenChange:E,children:z}),e[53]=f,e[54]=E,e[55]=z,e[56]=U):U=e[56];let R;return e[57]!==K||e[58]!==U?(R=t.jsxs(t.Fragment,{children:[K,U]}),e[57]=K,e[58]=U,e[59]=R):R=e[59],R}function Vs(){Le.error("Não foi possível desconectar. Tente novamente.")}const We={vtex:{registryAppId:"deco/vtex",area:"Catálogo",headline:"Rupturas e PDPs que travam suas vendas."},"google-analytics":{registryAppId:"deco/google-analytics",area:"Funil",headline:"Onde a receita vaza no seu funil."},"google-search-console":{registryAppId:"deco/google-search-console",area:"Busca",headline:"O tráfego de busca que você deixa na mesa."},github:{registryAppId:"deco/mcp-github",area:"Engenharia",headline:"A saúde da entrega de código por trás da sua loja."}};function Bs(o){const e=H.c(40),{selfClient:s,org:n,cdConnectionId:i,siteUrl:a}=o;let l;e[0]!==i||e[1]!==n.id||e[2]!==n.slug?(l={connectionId:i,orgId:n.id,orgSlug:n.slug},e[0]=i,e[1]=n.id,e[2]=n.slug,e[3]=l):l=e[3];const c=Fe(l);let u;e[4]!==i||e[5]!==n.id?(u=Y.commerceDiscoveryCompanionSchema(n.id,i),e[4]=i,e[5]=n.id,e[6]=u):u=e[6];let p;e[7]!==c?(p=async()=>{const A=await c.callTool({name:"MCP_CONFIGURATION",arguments:{}});return J(A)},e[7]=c,e[8]=p):p=e[8];let r;e[9]!==u||e[10]!==p?(r={queryKey:u,queryFn:p,retry:!1},e[9]=u,e[10]=p,e[11]=r):r=e[11];const f=ge(r),m=f.data?.stateSchema?Vt(f.data.stateSchema):null,h=m&&m.length>0?m:Bt,_=h.map(on),C=h.map(nn).filter(sn),g=h.filter(tn).map(en),d=[...C,...g].sort().join(",");let y;e[12]!==i||e[13]!==n.id?(y=Y.commerceDiscoveryConnection(n.id,i),e[12]=i,e[13]=n.id,e[14]=y):y=e[14];let v;e[15]!==i||e[16]!==s?(v=async()=>{const A=await s.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:i}});return J(A)},e[15]=i,e[16]=s,e[17]=v):v=e[17];let x;e[18]!==y||e[19]!==v?(x={queryKey:y,queryFn:v},e[18]=y,e[19]=v,e[20]=x):x=e[20];const S=ze(x).data?.item?.configuration_state??null;let j;e[21]!==S?(j=A=>S?.[A.fieldKey]?.value,e[21]=S,e[22]=j):j=e[22];const b=h.map(j).filter(Js),N=[..._.map(Xs),...C.map(Zs),...b.map(Ys)].sort().join(","),k=ze({queryKey:Y.commerceDiscoveryCompanionConnections(n.id,N),queryFn:async()=>{if(h.length===0)return{items:[]};const A=[{field:["app_name"],operator:"in",value:_},{field:["app_id"],operator:"in",value:C}];b.length>0&&A.push({field:["id"],operator:"in",value:b});const te=await s.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{operator:"or",conditions:A},limit:1e3}});return J(te)}}).data?.items??[],w=new Set(b),I=k.filter(A=>w.has(A.id)),L=I.filter(Ws);let P;e[23]!==n.id||e[24]!==n.slug?(P=A=>({queryKey:Y.commerceDiscoveryCompanionOAuthStatus(n.id,A.id),queryFn:async()=>{try{const te=await fetch(`/api/${encodeURIComponent(n.slug)}/connections/${encodeURIComponent(A.id)}/oauth-token/status`,{credentials:"include"});return te.ok?{hasToken:(await te.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}},retry:!1}),e[23]=n.id,e[24]=n.slug,e[25]=P):P=e[25];const K=us({queries:L.map(P)});let $;e[26]!==K?($=(A,te)=>[A.id,K[te]?.data?.hasToken===!0],e[26]=K,e[27]=$):$=e[27];const q=new Map(L.map($)),M={};for(const A of I)M[A.id]=!A.oauth_config||!!A.connection_token||q.get(A.id)===!0;const D=ze({queryKey:Y.commerceDiscoveryCompanionRegistry(n.id,d),queryFn:async()=>{if(h.length===0)return{items:[]};const A=Wt(C,g),te=await is(lt.REGISTRY(n.id),n.id,n.slug,"COLLECTION_REGISTRY_APP_LIST",{...A?{where:A}:{},limit:1e3});return J(te)}}),F={},z={};for(const A of D.data?.items??[])F[A.id]=A,A.server?.name&&(z[A.server.name]=A);let U;e[28]!==n.id||e[29]!==a?(U=Y.commerceDiscoveryConnectionStatus(n.id,a??""),e[28]=n.id,e[29]=a,e[30]=U):U=e[30];const R=!!a;let T;e[31]!==s||e[32]!==a?(T=async()=>{const A=await s.callTool({name:"COMMERCE_DISCOVERY_CONNECTION_STATUS",arguments:{siteUrl:a}});return J(A)},e[31]=s,e[32]=a,e[33]=T):T=e[33];let G;e[34]!==U||e[35]!==R||e[36]!==T?(G={queryKey:U,enabled:R,queryFn:T},e[34]=U,e[35]=R,e[36]=T,e[37]=G):G=e[37];const Z=ge(G),X={};for(const[A,te]of Object.entries(bt)){const ne=Z.data?.providers?.[te];ne?.connected&&ne.via==="sa"&&(X[A]={resource:ne.resource??null})}const ee=Yt({requirements:h,itemsById:F,itemsByName:z,connections:k,connectionReadiness:M,configurationState:S,curated:We,saBindings:X});let V;return e[38]!==ee?(V={cards:ee},e[38]=ee,e[39]=V):V=e[39],V}function Ws(o){return o.oauth_config&&!o.connection_token}function Ys(o){return`linked:${o}`}function Zs(o){return`app:${o}`}function Xs(o){return`binding:${o}`}function Js(o){return typeof o=="string"&&o.length>0}function en(o){return o.bindingType}function tn(o){return!We[o.bindingType]}function sn(o){return!!o}function nn(o){return We[o.bindingType]?.registryAppId}function on(o){return o.bindingType}function an({selfClient:o,org:e,userId:s,cdConnectionId:n,domain:i,siteUrl:a}){const l=be(),[c,u]=Q.useState(null),[p,r]=Q.useState(null),[f,m]=Q.useState(null),h=async(g,d)=>{const y=await o.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:g,data:d}});return J(y)};async function _(g){u(g.fieldKey),m(null);const d={app_name:g.title,field_key:g.fieldKey,organization_id:e.id,domain:i,site_url:a};oe("commerce_onboarding_companion_connect_clicked",d);try{let y=g.candidateConnectionId;if(!y){const b=as(g.registryItem,e.id,s,{remoteIndex:0}),N=b.connection_type==="STDIO",O=!!b.connection_url,k=N&&b.connection_headers&&typeof b.connection_headers=="object"&&"command"in b.connection_headers;if(!O&&!k)return oe("commerce_onboarding_companion_connect_failed",{...d,error:"no_connection_method"}),m(`${g.title} cannot be connected: no connection method available`),!1;const w=await o.callTool({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:b}});y=J(w).item.id}const v=y,x=await rs({connectionId:v,orgId:e.id,orgSlug:e.slug,persistFallback:b=>h(v,{connection_token:b}).then(()=>{})});if(!x.ok)return oe("commerce_onboarding_companion_connect_failed",{...d,error:x.error}),m(`Couldn't sign in to ${g.title}: ${x.error}`),!1;const E=await o.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}}),S=J(E).item?.configuration_state??null,j=Zt(S,g.fieldKey,g.bindingType,v);return g.bindingType==="github"&&delete j.github_repo,await h(n,{configuration_state:j}),await l.invalidateQueries({queryKey:Y.commerceDiscoveryConnection(e.id,n)}),await l.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(e.id)}),oe("commerce_onboarding_companion_connected",d),!0}catch(y){return oe("commerce_onboarding_companion_connect_failed",{...d,error:y instanceof Error?y.message:String(y)}),m(y instanceof Error?y.message:String(y)),!1}finally{u(null)}}async function C(g){r(g.fieldKey),m(null);const d={app_name:g.title,field_key:g.fieldKey,organization_id:e.id,domain:i,site_url:a};oe("commerce_onboarding_companion_disconnect_clicked",d);try{const y=await o.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}}),x={...J(y).item?.configuration_state??null??{}};return delete x[g.fieldKey],g.bindingType==="github"&&delete x.github_repo,await h(n,{configuration_state:x}),await l.invalidateQueries({queryKey:Y.commerceDiscoveryConnection(e.id,n)}),await l.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(e.id)}),oe("commerce_onboarding_companion_disconnected",d),!0}catch(y){return oe("commerce_onboarding_companion_disconnect_failed",{...d,error:y instanceof Error?y.message:String(y)}),m(y instanceof Error?y.message:String(y)),!1}finally{r(null)}}return{connect:_,connectingFieldKey:c,disconnect:C,disconnectingFieldKey:p,error:f}}const Ye="flex min-h-0 flex-1 flex-col gap-4 md:grid md:flex-none md:gap-4";function Ze(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-2xl lg:leading-8",children:"Conecte suas ferramentas para ver o diagnóstico completo"}),o[0]=e):e=o[0],e}function rn(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[0,1,2,3].map(ln)}),o[0]=e):e=o[0],e}function ln(o){return t.jsx(Ks,{},o)}function cn(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:Ye,children:[t.jsx(Ze,{}),t.jsx(rn,{})]}),o[0]=e):e=o[0],e}function dn(o){const e=H.c(5),{onRetry:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ze,{}),e[0]=n):n=e[0];let i,a;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("p",{className:"text-sm text-foreground",children:"Não foi possível carregar as integrações complementares."}),a=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Algo deu errado ao carregar suas integrações."}),e[1]=i,e[2]=a):(i=e[1],a=e[2]);let l;return e[3]!==s?(l=t.jsxs("div",{className:Ye,children:[n,t.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[i,a,t.jsx(B,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:s,children:"Tentar novamente"})]})]}),e[3]=s,e[4]=l):l=e[4],l}function Mn(o){const e=H.c(2);let s;return e[0]!==o?(s=t.jsx($t,{children:n=>{const{reset:i}=n;return t.jsx(zt,{fallback:a=>{const{resetError:l}=a;return t.jsx(dn,{onRetry:()=>{i(),l()}})},children:t.jsx(Q.Suspense,{fallback:t.jsx(cn,{}),children:t.jsx(un,{...o})})})}}),e[0]=o,e[1]=s):s=e[1],s}function un(o){const e=H.c(46),{org:s,cdConnectionId:n,siteUrl:i,onReadinessChange:a}=o,{data:l}=qt.useSession(),c=l?.user?.id??"";let u;if(e[0]!==i){const k=i?Re(i):null;if(k?.ok)try{u=new URL(k.value).hostname}catch{u=void 0}e[0]=i,e[1]=u}else u=e[1];let p;e[2]!==s.id||e[3]!==s.slug?(p={connectionId:Kt,orgId:s.id,orgSlug:s.slug},e[2]=s.id,e[3]=s.slug,e[4]=p):p=e[4];const r=Fe(p);let f;e[5]!==n||e[6]!==s||e[7]!==r||e[8]!==i?(f={selfClient:r,org:s,cdConnectionId:n,siteUrl:i},e[5]=n,e[6]=s,e[7]=r,e[8]=i,e[9]=f):f=e[9];const{cards:m}=Bs(f);let h;e[10]!==n||e[11]!==s||e[12]!==r||e[13]!==u||e[14]!==i||e[15]!==c?(h={selfClient:r,org:s,userId:c,cdConnectionId:n,domain:u,siteUrl:i},e[10]=n,e[11]=s,e[12]=r,e[13]=u,e[14]=i,e[15]=c,e[16]=h):h=e[16];const{connect:_,connectingFieldKey:C,disconnect:g,disconnectingFieldKey:d,error:y}=an(h),[v,x]=Q.useState(null);if(a?.(m.length===0||m.some(mn)),m.length===0)return null;const E=C!==null||d!==null;let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ze,{}),e[17]=S):S=e[17];let j;e[18]!==y?(j=y&&t.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:y}),e[18]=y,e[19]=j):j=e[19];let b;if(e[20]!==v||e[21]!==E||e[22]!==m||e[23]!==_||e[24]!==C||e[25]!==g||e[26]!==d||e[27]!==s||e[28]!==r||e[29]!==i){let k;e[31]!==v||e[32]!==E||e[33]!==_||e[34]!==C||e[35]!==g||e[36]!==d||e[37]!==s||e[38]!==r||e[39]!==i?(k=w=>{const I=async()=>{await _(w)&&x(w.fieldKey)};return t.jsx(Ms,{card:w,connecting:C===w.fieldKey,disconnecting:d===w.fieldKey,disabled:E&&C!==w.fieldKey&&d!==w.fieldKey,org:s,selfClient:r,siteUrl:i,autoOpenConfigFieldKey:v,onAutoOpenConfigHandled:()=>x(L=>L===w.fieldKey?null:L),onConnect:()=>{I()},onDisconnect:()=>{g(w)}},w.fieldKey)},e[31]=v,e[32]=E,e[33]=_,e[34]=C,e[35]=g,e[36]=d,e[37]=s,e[38]=r,e[39]=i,e[40]=k):k=e[40],b=m.map(k),e[20]=v,e[21]=E,e[22]=m,e[23]=_,e[24]=C,e[25]=g,e[26]=d,e[27]=s,e[28]=r,e[29]=i,e[30]=b}else b=e[30];let N;e[41]!==b?(N=t.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:b}),e[41]=b,e[42]=N):N=e[42];let O;return e[43]!==j||e[44]!==N?(O=t.jsxs("div",{className:Ye,children:[S,t.jsxs(gs,{wrapperClassName:"flex min-h-0 flex-1 flex-col md:block",className:"-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",children:[j,N]})]}),e[43]=j,e[44]=N,e[45]=O):O=e[45],O}function mn(o){return o.satisfied}const Xe="https://decocms.com/agendar",fn="Precisa de ajuda? Fale conosco",pn="Agende uma chamada e ajudamos você a conectar suas ferramentas.",ve=[{photo:"https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200",alt:"Especialista da deco"},{photo:"https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png",alt:"Especialista da deco"},{photo:"https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png",alt:"Especialista da deco"}],hn="var(--brand-green-dark)";function Qn({siteUrl:o,email:e}){const s=new URL(Xe);return o&&s.searchParams.set("siteUrl",o),e&&s.searchParams.set("email",e),s.toString()}function gn(o){const e=H.c(12),{href:s,size:n,className:i,orgId:a}=o,l=s===void 0?Xe:s,c=n===void 0?"lg":n;let u;e[0]!==i?(u=ie("w-full",i),e[0]=i,e[1]=u):u=e[1];let p;e[2]!==a?(p=()=>oe("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:a}),e[2]=a,e[3]=p):p=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(yt,{size:16}),e[4]=r):r=e[4];let f;e[5]!==l||e[6]!==p?(f=t.jsxs("a",{href:l,target:"_blank",rel:"noreferrer",onClick:p,children:["Agendar uma reunião",r]}),e[5]=l,e[6]=p,e[7]=f):f=e[7];let m;return e[8]!==c||e[9]!==u||e[10]!==f?(m=t.jsx(B,{asChild:!0,variant:"outline",size:c,className:u,children:f}),e[8]=c,e[9]=u,e[10]=f,e[11]=m):m=e[11],m}function xn(o){const e=H.c(10),{size:s}=o,n=s===void 0?72:s;let i;e[0]!==n?(i=Math.round(n*.3),e[0]=n,e[1]=i):i=e[1];const a=i;let l;e[2]!==n?(l={height:n},e[2]=n,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==n?(c=ve.map((p,r)=>t.jsxs("div",{className:"relative shrink-0",style:{width:n,height:n,marginLeft:r===0?0:-a,zIndex:ve.length-r},children:[t.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:t.jsx("img",{src:p.photo,alt:p.alt,className:"h-full w-full object-cover",loading:"lazy"})}),r===0&&t.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[t.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),t.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},p.photo)),e[4]=a,e[5]=n,e[6]=c):c=e[6];let u;return e[7]!==l||e[8]!==c?(u=t.jsx("div",{className:"flex items-end",style:l,children:c}),e[7]=l,e[8]=c,e[9]=u):u=e[9],u}function Gn(o){const e=H.c(6),{href:s,orgId:n}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"h-20",style:{backgroundColor:hn}}),e[0]=i):i=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"-mt-9 mb-4",children:t.jsx(xn,{})}),e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:fn}),t.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:pn})]}),e[2]=l):l=e[2];let c;return e[3]!==s||e[4]!==n?(c=t.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:t.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[i,t.jsxs("div",{className:"px-8 pb-8",children:[a,l,t.jsx(gn,{href:s,size:"lg",className:"mt-6",orgId:n})]})]})}),e[3]=s,e[4]=n,e[5]=c):c=e[5],c}function Hn(o){const e=H.c(13),{className:s,href:n,orgId:i}=o,a=n===void 0?Xe:n;let l;e[0]!==i?(l=()=>oe("commerce_onboarding_meeting_cta_clicked",{placement:"mobile_banner",organization_id:i}),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==s?(c=ie("flex items-center gap-3 rounded-xl border border-border bg-card p-3 card-shadow transition-colors hover:bg-accent",s),e[2]=s,e[3]=c):c=e[3];let u,p;e[4]===Symbol.for("react.memo_cache_sentinel")?(u={height:32,width:32+2*Math.round(22.4)},p=ve.map(yn),e[4]=u,e[5]=p):(u=e[4],p=e[5]);let r,f,m;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("span",{className:"relative flex shrink-0 items-center",style:u,children:[p,t.jsx("span",{className:"absolute -right-0.5 -top-0.5 h-2.5 w-2.5 rounded-full border-2 border-card bg-success","aria-hidden":!0,style:{zIndex:ve.length+1}})]}),f=t.jsx("span",{className:"flex-1 text-sm font-medium leading-tight text-foreground",children:"Precisa de ajuda? Fale conosco"}),m=t.jsx(yt,{size:16,className:"shrink-0 text-muted-foreground"}),e[6]=r,e[7]=f,e[8]=m):(r=e[6],f=e[7],m=e[8]);let h;return e[9]!==a||e[10]!==l||e[11]!==c?(h=t.jsxs("a",{href:a,target:"_blank",rel:"noreferrer",onClick:l,className:c,children:[r,f,m]}),e[9]=a,e[10]=l,e[11]=c,e[12]=h):h=e[12],h}function yn(o,e){return t.jsx("span",{className:"absolute block h-8 w-8 overflow-hidden rounded-full border-2 border-card",style:{left:e*Math.round(22.4),zIndex:ve.length-e},children:t.jsx("img",{src:o.photo,alt:o.alt,className:"h-full w-full object-cover",loading:"lazy"})},o.photo)}function Vn(o){const e=H.c(10),{host:s}=o,n=`https://www.google.com/s2/favicons?domain=${s}&sz=128`;let i,a,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),a=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),l=t.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=i,e[1]=a,e[2]=l):(i=e[0],a=e[1],l=e[2]);let c;e[3]!==n?(c=t.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:t.jsx("img",{src:n,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=n,e[4]=c):c=e[4];let u;e[5]!==s?(u=t.jsx("span",{className:"text-lg font-medium text-foreground",children:s}),e[5]=s,e[6]=u):u=e[6];let p;return e[7]!==c||e[8]!==u?(p=t.jsxs("div",{className:"flex items-center gap-3",children:[i,a,l,c,u]}),e[7]=c,e[8]=u,e[9]=p):p=e[9],p}function bn(o){return o.content?.find(e=>e.text)?.text??"A configuração do Commerce Discovery falhou."}function Bn(o){const e=o;if(e.isError)throw new Error(bn(e));return e.structuredContent??o}export{cn as C,Be as L,Vn as S,gs as a,Qn as b,Gn as c,Mn as d,Hn as e,Kn as i,Re as n,Bn as p,Un as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as T,j as t,r as J,B as je,i as be}from"./index-LdekSll3.js";import{i as Se}from"./ChevronRight-B-vLdw8q.js";import{U as fe}from"./agent-icon-Bm6aaEo_.js";import{A as ue}from"./automation-runs-D2vNR23X.js";import{r as Ne,u as ke,a as _e,b as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-D93VcSbg.js";import{Z as xe,r as ze}from"./index-60vpzjoP.js";import{a as ge}from"./Tool01-CXy9L9vf.js";import"./AlertCircle-7Nt6pK3u.js";import"./UserPlus01-mMfR4YMV.js";import"./ArrowUp-BXJFmEZc.js";import"./Settings02-kgu7_M6O.js";import"./Tool02-BAfdT5B8.js";import"./XCircle-Bx3h3ov4.js";import"./ArrowUpRight-BP--4ucj.js";import"./TrendUp01-CLAFKqVO.js";import"./ZapSquare-BntLBw72.js";import"./Users03-D11AqwMx.js";import"./CheckCircle-Cwk3XPAS.js";import"./Check-D0mBSrjH.js";import"./ChevronDown-PmGFsMpL.js";import"./ChevronUp-BHUOn26n.js";import"./Circle-DApmycTB.js";import"./Stars02-CH3Kk6h-.js";import"./Copy01-YKEDguCl.js";import"./ZoomOut-5mlqDR-t.js";import"./DotsVertical-DmdjQQ_H.js";import"./Globe01-CN1f6WBv.js";import"./Eye-BMt91Y28.js";import"./FilterLines-BQWL5JTu.js";import"./Flag01-Bvh5iRqx.js";import"./Star01-Ba-daWZ-.js";import"./Globe04-qC3ih0ZL.js";import"./SwitchHorizontal01-D_tcQJ73.js";import"./HardDrive-BwJlKgJ6.js";import"./Key01-C1LLnj6q.js";import"./LayoutLeft-DPXJOfef.js";import"./LinkExternal01-7ka-zpyj.js";import"./List-Bx8txb9K.js";import"./Monitor01-DJD9nEcj.js";import"./Sun-BPy5rxZW.js";import"./Package-D5z_WcDc.js";import"./Palette-qT1fhobG.js";import"./Play-GvZ0_iyw.js";import"./Plus-C4ZEipYr.js";import"./SearchLg-BBYByRTt.js";import"./SearchMd-CUL7QlM0.js";import"./Shield01-BISWnawB.js";import"./Stars01-D7DsKu7S.js";import"./Trash01-APUCP4GX.js";import"./Upload01-CmRDGAjs.js";import"./User01-CpMNTHj6.js";import"./Users01-zx9lM6Kg.js";import"./XClose-6eVK9gjQ.js";import"./X-BRf1CuwT.js";import"./Zap-CKjhc3zs.js";import"./select-BK2fSAGa.js";import"./tooltip-BGm-IgA-.js";import"./useInfiniteQuery-Cg8SDgJQ.js";import"./use-infinite-scroll-CMZ6xVYY.js";import"./use-connection--eZlhK3I.js";import"./use-collections-BtybZGh0.js";import"./use-mcp-client-DL7RwW_0.js";import"./constants-D_FQAPnt.js";import"./auth-DUNMp2q9.js";import"./use-virtual-mcp-wv33_-SX.js";import"./card-6dPhvUw3.js";import"./sidebar-D6wZQMs1.js";import"./use-mobile-BO0IkFF-.js";import"./table-BMd4rGjA.js";import"./empty-state-CssJRHRY.js";import"./use-members-CjpUW6ut.js";import"./use-org-auth-client-Do6ICXxA.js";import"./use-clock-tick-BY1pm89W.js";import"./use-automations-lcgzv2am.js";import"./studio-tools-C6CclkE9.js";import"./useSuspenseInfiniteQuery-l2LxobU8.js";import"./badge-DqelMuvl.js";import"./checkbox-BAEBF-lp.js";import"./command-CMohXiY9.js";import"./index-CnI2YHm_.js";import"./dialog-CIsOZrM9.js";import"./popover-B9HWZYb2.js";import"./avatar-ODfMrOSw.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B6jV0HNR.js";import"./file-type-icon-BDsT4NsE.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-BAkcna7Z.js";import"./index-Cabias0z.js";import"./chat-context-BdWFa_ae.js";import"./autosend-HLDOzs25.js";import"./hooks-CDl8lixj.js";import"./decopilot-sse-pool-4Coc0RZf.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-D5XAQyc9.js";import"./use-decopilot-events-ijeneFBZ.js";import"./use-organization-settings-D5GZ0amo.js";import"./index-dlw0nWwT.js";import"./shell-layout-cvOWu3Bb.js";import"./alert-dialog-BWfVJWo6.js";import"./required-auth-layout-CMMguY8J.js";import"./use-org-sso-Bq11wDiI.js";import"./integration-icon-yl-4tv2q.js";import"./use-navigate-to-agent-DollRSI0.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-B_EqFBTf.js";import"./form-DO3brjC6.js";import"./label-B-N4D4el.js";import"./input-Ahc5_8w6.js";import"./switch-D7EBUFwg.js";import"./drawer-CPiGkXxI.js";import"./collection-search-c9oirDKJ.js";import"./tabs-C6mEKLrC.js";import"./toggle-group-CHiT2zi8.js";import"./use-deco-credits-DkWCOBhO.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-jq-X-joO.js";import"./use-registry-connections-DF6MEH42.js";import"./extract-connection-data-udtq7ldu.js";import"./collection-tabs-Cx_qr9p2.js";import"./textarea-CnsXYno3.js";import"./connection-form-helpers-D8Y-iC7G.js";import"./authenticate-and-persist-oauth-CBGP3HRu.js";import"./mcp-oauth-DYEOf_NB.js";import"./connect-desktop-dialog-BnMQnI9Q.js";import"./select-model-DyYklQhq.js";import"./skeleton--iEBiL2O.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C1Acpu_v.js";import"./dropdown-menu-B5Zph68E.js";import"./index-CNa9GbwP.js";import"./toolbar-B57zOF1P.js";import"./use-debounced-value-BsrFA4Fu.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BN6Xde6g.js";import"./use-mcp-tools-K3veuXIg.js";import"./use-capability-D3kXXKk7.js";import"./tools-list-DEK41qXq.js";import"./use-debounced-autosave-Rhccxzrn.js";import"./index-De7Vrw1B.js";import"./search-input-B87p-N3Q.js";import"./github-repo-picker-BIKsB9fh.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-DQ9xlX5K.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-BaAHCjLB.js";import"./index-BEa0XcuM.js";import"./get-initials-D-f_fDFw.js";import"./calendar-rMb-ODp7.js";import"./toolbar-icon-button-BvFJpYeK.js";import"./use-file-configs-C5YTi-f0.js";import"./automation-list-row-BRHz9zkz.js";function B(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=B(n.title),i=B(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:B(n.description),image:B(n.image),favicon:B(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Q="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Q;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let b;return e[23]!==u||e[24]!==y||e[25]!==g?(b=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=b):b=e[26],b}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Q;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Q;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Q;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const b=i.description??ee;let _;e[17]!==y||e[18]!==b?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:b}),e[17]=y,e[18]=b,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let S;e[24]!==i.image?(S=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=S):S=e[25];let k;e[26]!==N||e[27]!==S||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,S]}),e[26]=N,e[27]=S,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Ue(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Be(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Ue,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Ai(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=J.useState(f),[j,v]=J.useState(null),[y,b]=J.useState(0),[_,N]=J.useState(void 0);x!==f&&(u(f),v(null),N(void 0),b(Me));const{persistSeo:S,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,U=_!==void 0?_:ve,ye=K?_e(U)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(U))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==S||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),S(de)},e[8]=S,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==b?(H=()=>b(Ke),e[14]=b,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",Z=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(Se,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(be,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==U||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==S||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==Z||e[57]!==me||e[58]!==R?(A=!c||!Z&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:Z?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:U,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),S(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Be,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=U,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=S,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=Z,e[57]=me,e[58]=R,e[59]=A):A=e[59];let q;return e[60]!==I||e[61]!==A?(q=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=q):q=e[62],q}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Ai as SeoEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,e as L,j as s,C as J,l as k,w as Q,L as R,p as B,W as I,a as G,i as D,r as F,O as K}from"./index-lRedQ_8t.js";import{u as T}from"./useRouterState-DB6AEQYy.js";import{j as U,k as V,l as X,S as q,a as w,b as M,d as P,c as O,g as Y,h as Z}from"./sidebar-joQ3ZQPE.js";import{a as ee}from"./index-C9P6Y57L.js";import{n as se,c as te,a as le,d as re,b as ie,i as E}from"./ZapSquare-BhWmmFEB.js";import{t as oe,a as A}from"./Users03-BYqJADve.js";import{i as ne}from"./HardDrive-DNueik1y.js";import{i as ae}from"./Key01-DrwX5nx2.js";import{i as ce}from"./Shield01-CULBCC4Z.js";import{s as me}from"./User01-2QspS0s6.js";import{i as fe}from"./Zap-CI5WhuKJ.js";import{a as de}from"./use-capability-CCJ-X1mC.js";import{u as xe}from"./use-join-requests-nORXzBkG.js";import{u as W}from"./use-mobile-RU-Nn_Un.js";import{u as be}from"./use-status-sounds-C3Efc5TW.js";import{T as y}from"./toolbar-zpMjKMlc.js";import{S as ue,M as he}from"./shell-controls-BoSvKLlP.js";import"./LayoutLeft-CHLKhLgL.js";import"./X-Bqs01fCh.js";import"./tooltip-REPIyd2Z.js";import"./studio-tools-BMyTPyPy.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-BhVWtKJy.js";import"./decopilot-sse-pool-_LHJFrBF.js";import"./backoff-CrEUbyZT.js";import"./toolbar-icon-button-D3Y1-YHW.js";function H(){const e=S.c(21),{capabilities:t,isPrivileged:m,loading:l,error:i}=de(),o=xe().length;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(oe,{size:14}),e[0]=n):n=e[0];let r,a;if(e[1]!==t||e[2]!==i||e[3]!==m||e[4]!==o||e[5]!==l){a=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(se,{size:14}),e[8]=f):f=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(te,{size:14}),e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ae,{size:14}),e[10]=c):c=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ne,{size:14}),e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(le,{size:14}),e[12]=b):b=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(A,{size:14}),e[13]=p):p=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(fe,{size:14}),e[14]=h):h=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(re,{size:14}),e[15]=g):g=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ie,{size:14}),e[16]=u):u=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ce,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Q,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(me,{size:14}),e[20]=N):N=e[20];const C=[{label:"Organization",items:[{key:"general",label:"General",icon:n,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:d,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:c,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:b,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:p,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:h,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:u,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:o},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||i){a=C;break e}r=C.map(z=>({...z,items:z.items.filter($=>$.privilegedOnly?m:$.requires?m||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=i,e[3]=m,e[4]=o,e[5]=l,e[6]=r,e[7]=a}else r=e[6],a=e[7];return a!==Symbol.for("react.early_return_sentinel")?a:r}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=H();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/shell/$org"},e[0]=m):m=e[0];const{org:l}=L(m);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:_e},e[1]=i):i=e[1];const o=T(i);let n;e[2]!==l||e[3]!==o?(n=p=>{const h=p.replace("$org",l);return o.startsWith(h)},e[2]=l,e[3]=o,e[4]=n):n=e[4];const r=n;let a;if(e[5]!==t||e[6]!==r||e[7]!==l){let p;e[9]!==r||e[10]!==l?(p=(h,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[h.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:h.label}),s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:h.items.map(u=>s.jsx(P,{children:s.jsx(O,{asChild:!0,isActive:r(u.to),children:s.jsxs(R,{to:u.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:h.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[u.icon,u.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${h.label}-${g}`),e[9]=r,e[10]=l,e[11]=p):p=e[11],a=t.map(p),e[5]=t,e[6]=r,e[7]=l,e[8]=a}else a=e[8];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=f):f=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[f,s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=d):d=e[13];let c;e[14]!==a?(c=s.jsxs(Y,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[a,d]}),e[14]=a,e[15]=c):c=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.74.0"]})}),e[16]=x):x=e[16];let b;return e[17]!==c?(b=s.jsxs(Z,{variant:"sidebar",children:[c,x]}),e[17]=c,e[18]=b):b=e[18],b}function je(){B("signed_out",{source:"settings_sidebar"}),I(),G.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:m}=e,l=H();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org"},t[0]=i):i=t[0];const{org:o}=L(i);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ve},t[1]=n):n=t[1];const r=T(n);let a;t[2]!==o||t[3]!==r?(a=g=>{const u=g.replace("$org",o);return r.startsWith(u)},t[2]=o,t[3]=r,t[4]=a):a=t[4];const f=a;let d;if(t[5]!==l||t[6]!==f||t[7]!==m||t[8]!==o){let g;t[10]!==f||t[11]!==m||t[12]!==o?(g=(u,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:u.label}),u.items.map(j=>s.jsxs(R,{to:j.to,params:{org:o},onClick:m,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",f(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${u.label}-${_}`),t[10]=f,t[11]=m,t[12]=o,t[13]=g):g=t[13],d=l.map(g),t[5]=l,t[6]=f,t[7]=m,t[8]=o,t[9]=d}else d=t[9];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=c):c=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let b;t[16]!==d?(b=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[d,x]}),t[16]=d,t[17]=b):b=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.74.0"]})}),t[18]=p):p=t[18];let h;return t[19]!==b?(h=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,p]}),t[19]=b,t[20]=h):h=t[20],h}function Se(){I(),G.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:m}=J();be(m.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(D,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(ee,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=i):i=e[1];const o=i;if(t){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:o}),e[2]=r):r=e[2],r}let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:o})}),e[3]=n):n=e[3],n}function Ye(){const e=S.c(21),t=W();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(y.LogoLink,{}),e[0]=m):m=e[0];let l;e[1]!==t?(l=t&&s.jsx(ue,{}),e[1]=t,e[2]=l):l=e[2];let i;e[3]!==l?(i=s.jsxs(y.LeftColumn,{children:[m,l]}),e[3]=l,e[4]=i):i=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[5]=o):o=e[5];let n;e[6]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[6]=n):n=e[6];let r;e[7]!==i?(r=s.jsxs(y.Header,{children:[i,o,n]}),e[7]=i,e[8]=r):r=e[8];let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a={"--sidebar-width-icon":"3.125rem"},e[9]=a):a=e[9];let f;e[10]!==t?(f=!t&&s.jsx(ge,{}),e[10]=t,e[11]=f):f=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(U,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[12]=d):d=e[12];let c;e[13]!==f?(c=s.jsxs(V,{className:"flex-1 bg-sidebar min-h-0",style:a,children:[f,d]}),e[13]=f,e[14]=c):c=e[14];let x;e[15]!==t?(x=t&&s.jsx(he,{renderSidebar:ke}),e[15]=t,e[16]=x):x=e[16];let b;return e[17]!==x||e[18]!==r||e[19]!==c?(b=s.jsx(y.Provider,{children:s.jsx(X,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,c,x]})})}),e[17]=x,e[18]=r,e[19]=c,e[20]=b):b=e[20],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Ye as default};
|
|
1
|
+
import{c as S,e as L,j as s,C as J,l as k,w as Q,L as R,p as B,W as I,a as G,i as D,r as F,O as K}from"./index-LdekSll3.js";import{u as T}from"./useRouterState-W11XLSXd.js";import{j as U,k as V,l as X,S as q,a as w,b as M,d as P,c as O,g as Y,h as Z}from"./sidebar-D6wZQMs1.js";import{a as ee}from"./index-De7Vrw1B.js";import{n as se,c as te,a as le,d as re,b as ie,i as E}from"./ZapSquare-BntLBw72.js";import{t as oe,a as A}from"./Users03-D11AqwMx.js";import{i as ne}from"./HardDrive-BwJlKgJ6.js";import{i as ae}from"./Key01-C1LLnj6q.js";import{i as ce}from"./Shield01-BISWnawB.js";import{s as me}from"./User01-CpMNTHj6.js";import{i as fe}from"./Zap-CKjhc3zs.js";import{a as de}from"./use-capability-D3kXXKk7.js";import{u as xe}from"./use-join-requests-D329QH2z.js";import{u as W}from"./use-mobile-BO0IkFF-.js";import{u as be}from"./use-status-sounds-BN6Xde6g.js";import{T as y}from"./toolbar-B57zOF1P.js";import{S as ue,M as he}from"./shell-controls-Cp2Tzxyd.js";import"./LayoutLeft-DPXJOfef.js";import"./X-BRf1CuwT.js";import"./tooltip-BGm-IgA-.js";import"./studio-tools-C6CclkE9.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-ijeneFBZ.js";import"./decopilot-sse-pool-4Coc0RZf.js";import"./backoff-CrEUbyZT.js";import"./toolbar-icon-button-BvFJpYeK.js";function H(){const e=S.c(21),{capabilities:t,isPrivileged:m,loading:l,error:i}=de(),o=xe().length;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(oe,{size:14}),e[0]=n):n=e[0];let r,a;if(e[1]!==t||e[2]!==i||e[3]!==m||e[4]!==o||e[5]!==l){a=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(se,{size:14}),e[8]=f):f=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(te,{size:14}),e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ae,{size:14}),e[10]=c):c=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ne,{size:14}),e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(le,{size:14}),e[12]=b):b=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(A,{size:14}),e[13]=p):p=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(fe,{size:14}),e[14]=h):h=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(re,{size:14}),e[15]=g):g=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ie,{size:14}),e[16]=u):u=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(A,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ce,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Q,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(me,{size:14}),e[20]=N):N=e[20];const C=[{label:"Organization",items:[{key:"general",label:"General",icon:n,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:d,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:c,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:b,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:p,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:h,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:u,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:o},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||i){a=C;break e}r=C.map(z=>({...z,items:z.items.filter($=>$.privilegedOnly?m:$.requires?m||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=i,e[3]=m,e[4]=o,e[5]=l,e[6]=r,e[7]=a}else r=e[6],a=e[7];return a!==Symbol.for("react.early_return_sentinel")?a:r}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=H();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/shell/$org"},e[0]=m):m=e[0];const{org:l}=L(m);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:_e},e[1]=i):i=e[1];const o=T(i);let n;e[2]!==l||e[3]!==o?(n=p=>{const h=p.replace("$org",l);return o.startsWith(h)},e[2]=l,e[3]=o,e[4]=n):n=e[4];const r=n;let a;if(e[5]!==t||e[6]!==r||e[7]!==l){let p;e[9]!==r||e[10]!==l?(p=(h,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[h.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:h.label}),s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:h.items.map(u=>s.jsx(P,{children:s.jsx(O,{asChild:!0,isActive:r(u.to),children:s.jsxs(R,{to:u.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:h.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[u.icon,u.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${h.label}-${g}`),e[9]=r,e[10]=l,e[11]=p):p=e[11],a=t.map(p),e[5]=t,e[6]=r,e[7]=l,e[8]=a}else a=e[8];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=f):f=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[f,s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=d):d=e[13];let c;e[14]!==a?(c=s.jsxs(Y,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[a,d]}),e[14]=a,e[15]=c):c=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.74.2"]})}),e[16]=x):x=e[16];let b;return e[17]!==c?(b=s.jsxs(Z,{variant:"sidebar",children:[c,x]}),e[17]=c,e[18]=b):b=e[18],b}function je(){B("signed_out",{source:"settings_sidebar"}),I(),G.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:m}=e,l=H();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org"},t[0]=i):i=t[0];const{org:o}=L(i);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ve},t[1]=n):n=t[1];const r=T(n);let a;t[2]!==o||t[3]!==r?(a=g=>{const u=g.replace("$org",o);return r.startsWith(u)},t[2]=o,t[3]=r,t[4]=a):a=t[4];const f=a;let d;if(t[5]!==l||t[6]!==f||t[7]!==m||t[8]!==o){let g;t[10]!==f||t[11]!==m||t[12]!==o?(g=(u,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:u.label}),u.items.map(j=>s.jsxs(R,{to:j.to,params:{org:o},onClick:m,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",f(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${u.label}-${_}`),t[10]=f,t[11]=m,t[12]=o,t[13]=g):g=t[13],d=l.map(g),t[5]=l,t[6]=f,t[7]=m,t[8]=o,t[9]=d}else d=t[9];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=c):c=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let b;t[16]!==d?(b=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[d,x]}),t[16]=d,t[17]=b):b=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.74.2"]})}),t[18]=p):p=t[18];let h;return t[19]!==b?(h=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,p]}),t[19]=b,t[20]=h):h=t[20],h}function Se(){I(),G.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:m}=J();be(m.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(D,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(ee,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=i):i=e[1];const o=i;if(t){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:o}),e[2]=r):r=e[2],r}let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:o})}),e[3]=n):n=e[3],n}function Ye(){const e=S.c(21),t=W();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(y.LogoLink,{}),e[0]=m):m=e[0];let l;e[1]!==t?(l=t&&s.jsx(ue,{}),e[1]=t,e[2]=l):l=e[2];let i;e[3]!==l?(i=s.jsxs(y.LeftColumn,{children:[m,l]}),e[3]=l,e[4]=i):i=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[5]=o):o=e[5];let n;e[6]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[6]=n):n=e[6];let r;e[7]!==i?(r=s.jsxs(y.Header,{children:[i,o,n]}),e[7]=i,e[8]=r):r=e[8];let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a={"--sidebar-width-icon":"3.125rem"},e[9]=a):a=e[9];let f;e[10]!==t?(f=!t&&s.jsx(ge,{}),e[10]=t,e[11]=f):f=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(U,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[12]=d):d=e[12];let c;e[13]!==f?(c=s.jsxs(V,{className:"flex-1 bg-sidebar min-h-0",style:a,children:[f,d]}),e[13]=f,e[14]=c):c=e[14];let x;e[15]!==t?(x=t&&s.jsx(he,{renderSidebar:ke}),e[15]=t,e[16]=x):x=e[16];let b;return e[17]!==x||e[18]!==r||e[19]!==c?(b=s.jsx(y.Provider,{children:s.jsx(X,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,c,x]})})}),e[17]=x,e[18]=r,e[19]=c,e[20]=b):b=e[20],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Ye as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as N,j as r,r as S}from"./index-
|
|
1
|
+
import{c as v,l as N,j as r,r as S}from"./index-LdekSll3.js";import{C as w}from"./card-6dPhvUw3.js";import{i as E}from"./ArrowUpRight-BP--4ucj.js";function I(c){const e=v.c(12),{title:i,description:l,docsHref:t,actions:s,className:n,headerClassName:a,children:d}=c;let m;e[0]!==n?(m=N("flex flex-col gap-3",n),e[0]=n,e[1]=m):m=e[1];let f;e[2]!==s||e[3]!==l||e[4]!==t||e[5]!==a||e[6]!==i?(f=(i||l||t||s)&&r.jsxs("div",{className:N("flex items-center justify-between gap-3 px-4",a),children:[r.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[i&&r.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:i}),(l||t)&&r.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[l,t&&r.jsxs("a",{href:t,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",r.jsx(E,{size:12})]})]})]}),s&&r.jsx("div",{className:"shrink-0",children:s})]}),e[2]=s,e[3]=l,e[4]=t,e[5]=a,e[6]=i,e[7]=f):f=e[7];let o;return e[8]!==d||e[9]!==m||e[10]!==f?(o=r.jsxs("section",{className:m,children:[f,d]}),e[8]=d,e[9]=m,e[10]=f,e[11]=o):o=e[11],o}function P(c){const e=v.c(11),{className:i,children:l}=c;let t,s,n;if(e[0]!==l||e[1]!==i){const d=S.Children.toArray(l).filter(S.isValidElement);t=w,e[5]!==i?(s=N("p-0 gap-0 overflow-hidden",i),e[5]=i,e[6]=s):s=e[6],n=d.map($),e[0]=l,e[1]=i,e[2]=t,e[3]=s,e[4]=n}else t=e[2],s=e[3],n=e[4];let a;return e[7]!==t||e[8]!==s||e[9]!==n?(a=r.jsx(t,{className:s,children:n}),e[7]=t,e[8]=s,e[9]=n,e[10]=a):a=e[10],a}function $(c,e){return r.jsxs("div",{children:[e>0&&r.jsx("div",{className:"h-px bg-border mx-5"}),c]},e)}function R(c){const e=v.c(27),{icon:i,title:l,description:t,action:s,onClick:n,className:a,children:d}=c,m=d?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",f=n&&"hover:bg-muted/50 cursor-pointer";let o;e[0]!==a||e[1]!==m||e[2]!==f?(o=N(m,f,a),e[0]=a,e[1]=m,e[2]=f,e[3]=o):o=e[3];const b=n?"button":void 0,C=n?0:void 0;let x;e[4]!==n?(x=n?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),n())}:void 0,e[4]=n,e[5]=x):x=e[5];let p;e[6]!==i?(p=i&&r.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:i}),e[6]=i,e[7]=p):p=e[7];let u;e[8]!==l?(u=r.jsx("div",{className:"text-sm font-medium",children:l}),e[8]=l,e[9]=u):u=e[9];let h;e[10]!==t?(h=t&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:t}),e[10]=t,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==u||e[14]!==h?(g=r.jsxs("div",{className:"flex-1 min-w-0",children:[u,h,d]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15];let j;e[16]!==s?(j=s&&r.jsx("div",{className:"shrink-0",onClick:D,children:s}),e[16]=s,e[17]=j):j=e[17];let y;return e[18]!==n||e[19]!==g||e[20]!==j||e[21]!==o||e[22]!==b||e[23]!==C||e[24]!==x||e[25]!==p?(y=r.jsxs("div",{className:o,onClick:n,role:b,tabIndex:C,onKeyDown:x,children:[p,g,j]}),e[18]=n,e[19]=g,e[20]=j,e[21]=o,e[22]=b,e[23]=C,e[24]=x,e[25]=p,e[26]=y):y=e[26],y}function D(c){return c.stopPropagation()}function H(c){const e=v.c(5),{children:i,className:l}=c;let t;e[0]!==l?(t=N("flex items-center justify-end gap-2 px-4 py-4",l),e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==i||e[3]!==t?(s=r.jsx("div",{className:t,children:i}),e[2]=i,e[3]=t,e[4]=s):s=e[4],s}function K(c){const e=v.c(5),{className:i,children:l}=c;let t;e[0]!==i?(t=N("flex flex-col gap-10",i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==l||e[3]!==t?(s=r.jsx("div",{className:t,children:l}),e[2]=l,e[3]=t,e[4]=s):s=e[4],s}export{I as S,P as a,R as b,K as c,H as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,j as a}from"./index-
|
|
1
|
+
import{c as f,j as a}from"./index-LdekSll3.js";import{u as p,m as b,p as d,q as h}from"./sidebar-D6wZQMs1.js";import{i as u}from"./LayoutLeft-DPXJOfef.js";import{T as S}from"./toolbar-icon-button-BvFJpYeK.js";function T(m){const e=f.c(4),{className:o}=m,{toggleSidebar:n}=p();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=a.jsx(u,{size:16}),e[0]=t):t=e[0];let s;return e[1]!==o||e[2]!==n?(s=a.jsx(S,{onClick:n,"aria-label":"Toggle sidebar",className:o,children:t}),e[1]=o,e[2]=n,e[3]=s):s=e[3],s}function M(m){const e=f.c(12),{renderSidebar:o}=m,{openMobile:n,setOpenMobile:t}=p();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(b,{className:"sr-only",children:"Navigation"}),e[0]=s):s=e[0];let i;e[1]!==t?(i=()=>t(!1),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==o||e[4]!==i?(l=o({onClose:i}),e[3]=o,e[4]=i,e[5]=l):l=e[5];let r;e[6]!==l?(r=a.jsxs(d,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[s,l]}),e[6]=l,e[7]=r):r=e[7];let c;return e[8]!==n||e[9]!==t||e[10]!==r?(c=a.jsx(h,{open:n,onOpenChange:t,children:r}),e[8]=n,e[9]=t,e[10]=r,e[11]=c):c=e[11],c}export{M,T as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,d as ee,j as s,B as C,bU as H,t as J,w as xe,a as Y,s as Oe,v as be,K as se,bV as Te,bW as Ee,D as B,r as K,m as te,bX as $e,bY as Le,b as ze,C as De,e as we,u as Ie,R as Me,aZ as Pe,bZ as Fe,b_ as me,b$ as Re,c0 as qe,S as Ue,O as Ge,c1 as Ke}from"./index-lRedQ_8t.js";import{A as oe}from"./avatar-BB1BJsL_.js";import{t as Se,a as He}from"./Users03-BYqJADve.js";import{i as Be}from"./SearchLg-crE3yQZJ.js";import{i as Ye,s as Je,a as z,n as We}from"./Stars02-BzQc7fZz.js";import{s as Ve}from"./XClose-P0NM9uUE.js";import{i as I}from"./CheckCircle-D_t3rWUI.js";import{i as fe}from"./FilterLines-CwEBxGZP.js";import{i as G}from"./Zap-CI5WhuKJ.js";import{d as Qe,D as Xe,a as Ze,e as et}from"./dialog-CUb_uQeJ.js";import{b as tt,c as nt,d as st,a as ot,e as it,g as at,f as rt}from"./alert-dialog-GCrUNzbs.js";import{R as lt}from"./required-auth-layout-czUUgGrX.js";import{A as ct}from"./autosend-CnfmH4zE.js";import{m as dt}from"./use-mcp-client-D6H50Mmm.js";import{a as he,S as ut}from"./constants-D_FQAPnt.js";import{d as mt,c as ft}from"./hooks-G1nBJ-F3.js";import{q as ht}from"./tab-id-BijBBRwE.js";import{e as gt}from"./use-organization-settings-CHx_I7VH.js";import{u as pt}from"./use-org-sso-BLc80T83.js";function yt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a={mutationFn:async()=>{const S=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await S.json();if(!S.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:S=>{window.location.href=`/${S.slug??o}`},onError:bt},e[0]=o,e[1]=a):a=e[1];const l=ee(a),c=xt;let u;e[2]!==i||e[3]!==n?(u=i?s.jsx(oe,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),e[2]=i,e[3]=n,e[4]=u):u=e[4];let d;e[5]!==n?(d=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=d):d=e[6];let m;e[7]!==r?(m=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",r]})," email can join this organization."]}),e[7]=r,e[8]=m):m=e[8];let h;e[9]!==d||e[10]!==m?(h=s.jsxs("div",{className:"space-y-2",children:[d,m]}),e[9]=d,e[10]=m,e[11]=h):h=e[11];let p;e[12]!==l?(p=()=>l.mutate(),e[12]=l,e[13]=p):p=e[13];const f=l.isPending?"Joining…":`Enter ${n}`;let g;e[14]!==l.isPending||e[15]!==p||e[16]!==f?(g=s.jsx(C,{onClick:p,disabled:l.isPending,children:f}),e[14]=l.isPending,e[15]=p,e[16]=f,e[17]=g):g=e[17];let y;e[18]!==l.isPending?(y=s.jsx(C,{variant:"ghost",onClick:c,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=y):y=e[19];let w;e[20]!==g||e[21]!==y?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,y]}),e[20]=g,e[21]=y,e[22]=w):w=e[22];let b;return e[23]!==w||e[24]!==u||e[25]!==h?(b=s.jsxs(H,{children:[u,h,w]}),e[23]=w,e[24]=u,e[25]=h,e[26]=b):b=e[26],b}function xt(){window.location.href="/"}function bt(t){J.error(t instanceof Error?t.message:"Failed to join organization")}function ge(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:i}=t,r=wt,a=i==="not-found",l=a?Be:xe,c=a?"Organization not found":"No access";let u;e[0]!==a||e[1]!==o||e[2]!==n?(u=a?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=a,e[1]=o,e[2]=n,e[3]=u):u=e[3];const d=u;let m;e[4]!==l?(m=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=m):m=e[5];let h;e[6]!==c?(h=s.jsx("h3",{className:"text-lg font-medium",children:c}),e[6]=c,e[7]=h):h=e[7];let p;e[8]!==d?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[8]=d,e[9]=p):p=e[9];let f;e[10]!==h||e[11]!==p?(f=s.jsxs("div",{className:"space-y-2",children:[h,p]}),e[10]=h,e[11]=p,e[12]=f):f=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(C,{onClick:r,children:"Go to home"}),e[13]=g):g=e[13];let y;return e[14]!==m||e[15]!==f?(y=s.jsxs(H,{children:[m,f,g]}),e[14]=m,e[15]=f,e[16]=y):y=e[16],y}function wt(){window.location.href="/"}function St(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:i,orgLogo:r}=t;let a;e[0]!==n?(a=async()=>{const _=await Y.organization.acceptInvitation({invitationId:n});if(_.error)throw new Error(_.error.message);return _.data},e[0]=n,e[1]=a):a=e[1];let l;e[2]!==i?(l=()=>{Oe(),window.location.href=`/${i}`},e[2]=i,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={mutationFn:a,onSuccess:l,onError:kt},e[4]=a,e[5]=l,e[6]=c):c=e[6];const u=ee(c);let d;e[7]!==n?(d=async()=>{const _=await Y.organization.rejectInvitation({invitationId:n});if(_.error)throw new Error(_.error.message);return _.data},e[7]=n,e[8]=d):d=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=vt,e[9]=m):m=e[9];let h;e[10]!==d?(h={mutationFn:d,onSuccess:m,onError:jt},e[10]=d,e[11]=h):h=e[11];const p=ee(h),f=u.isPending||p.isPending;let g;e[12]!==r||e[13]!==o?(g=r?s.jsx(oe,{url:r,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Ye,{className:"h-6 w-6 text-primary"})}),e[12]=r,e[13]=o,e[14]=g):g=e[14];let y;e[15]!==o?(y=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=y):y=e[16];let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=w):w=e[17];let b;e[18]!==y?(b=s.jsxs("div",{className:"space-y-2",children:[y,w]}),e[18]=y,e[19]=b):b=e[19];let S;e[20]!==u?(S=()=>u.mutate(),e[20]=u,e[21]=S):S=e[21];const v=u.isPending?"Accepting…":"Accept invitation";let N;e[22]!==f||e[23]!==S||e[24]!==v?(N=s.jsx(C,{onClick:S,disabled:f,children:v}),e[22]=f,e[23]=S,e[24]=v,e[25]=N):N=e[25];let T;e[26]!==p?(T=()=>p.mutate(),e[26]=p,e[27]=T):T=e[27];const $=p.isPending?"Declining…":"Decline";let x;e[28]!==f||e[29]!==T||e[30]!==$?(x=s.jsx(C,{variant:"ghost",onClick:T,disabled:f,children:$}),e[28]=f,e[29]=T,e[30]=$,e[31]=x):x=e[31];let E;e[32]!==N||e[33]!==x?(E=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,x]}),e[32]=N,e[33]=x,e[34]=E):E=e[34];let L;return e[35]!==b||e[36]!==E||e[37]!==g?(L=s.jsxs(H,{children:[g,b,E]}),e[35]=b,e[36]=E,e[37]=g,e[38]=L):L=e[38],L}function jt(t){J.error(t instanceof Error?t.message:"Failed to decline invitation")}function vt(){J.success("Invitation declined"),window.location.href="/"}function kt(t){J.error(t instanceof Error?t.message:"Failed to accept invitation")}function Nt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let i;e[0]!==o||e[1]!==n?(i=o?s.jsx(oe,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Je,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=r):r=e[3];let a;e[4]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[r,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=a):a=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(C,{variant:"ghost",onClick:_t,children:"Go to home"}),e[6]=l):l=e[6];let c;return e[7]!==i||e[8]!==a?(c=s.jsxs(H,{children:[i,a,l]}),e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function _t(){window.location.href="/"}function At(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=Tt,e[2]=l):l=e[2];let c;e[3]!==a?(c={mutationFn:a,onSuccess:l,onError:Ot},e[3]=a,e[4]=c):c=e[4];const u=ee(c);let d;e[5]!==i||e[6]!==n?(d=i?s.jsx(oe,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),e[5]=i,e[6]=n,e[7]=d):d=e[7];let m;e[8]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=m):m=e[9];let h;e[10]!==r?(h=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",r]})," emails before you can join."]}),e[10]=r,e[11]=h):h=e[11];let p;e[12]!==m||e[13]!==h?(p=s.jsxs("div",{className:"space-y-2",children:[m,h]}),e[12]=m,e[13]=h,e[14]=p):p=e[14];let f;e[15]!==u?(f=()=>u.mutate(),e[15]=u,e[16]=f):f=e[16];const g=u.isPending?"Requesting…":"Request to join";let y;e[17]!==u.isPending||e[18]!==f||e[19]!==g?(y=s.jsx(C,{onClick:f,disabled:u.isPending,children:g}),e[17]=u.isPending,e[18]=f,e[19]=g,e[20]=y):y=e[20];let w;e[21]!==u.isPending?(w=s.jsx(C,{variant:"ghost",onClick:Ct,disabled:u.isPending,children:"Go to home"}),e[21]=u.isPending,e[22]=w):w=e[22];let b;e[23]!==y||e[24]!==w?(b=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[y,w]}),e[23]=y,e[24]=w,e[25]=b):b=e[25];let S;return e[26]!==b||e[27]!==d||e[28]!==p?(S=s.jsxs(H,{children:[d,p,b]}),e[26]=b,e[27]=d,e[28]=p,e[29]=S):S=e[29],S}function Ct(){window.location.href="/"}function Ot(t){J.error(t instanceof Error?t.message:"Failed to request access")}function Tt(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Et(t){const e=k.c(7);let n;e[0]!==t?(n=se.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=o):o=e[3];let i;return e[4]!==n||e[5]!==o?(i={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=i):i=e[6],be(i)}function $t({orgSlug:t}){const{data:e}=Et(t);if(e.status!=="member"){Te()?.org===t&&Ee();const n=localStorage.getItem(B.lastOrgSlug())===t;if(n&&localStorage.removeItem(B.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ge,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(St,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(yt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(At,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(Nt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ge,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Lt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:i}=t;let r;e[0]!==n.eyebrow?(r=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=r):r=e[1];let a;e[2]!==n.title?(a=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=a):a=e[3];let l;e[4]!==r||e[5]!==a?(l=s.jsxs("div",{children:[r,a]}),e[4]=r,e[5]=a,e[6]=l):l=e[6];let c;e[7]!==n.bullets?(c=n.bullets.map(zt),e[7]=n.bullets,e[8]=c):c=e[8];let u;e[9]!==c?(u=s.jsx("ul",{className:"flex flex-col gap-3",children:c}),e[9]=c,e[10]=u):u=e[10];let d;e[11]!==o||e[12]!==i||e[13]!==n.cta||e[14]!==n.learnMoreHref?(d=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(C,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=i,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=d):d=e[15];let m;return e[16]!==l||e[17]!==u||e[18]!==d?(m=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,u,d]}),e[16]=l,e[17]=u,e[18]=d,e[19]=m):m=e[19],m}function zt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const je=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:z,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:I,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:G,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:z,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:I,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:G,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:I,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:z,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:G,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:z,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:I,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:z,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:I,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:z,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:fe,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:I,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:He,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:G,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:I,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:z,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:fe,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:z,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:We,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ne="studio.release-feed.v1",ce=new Set;let M="",P={},de=!1;function Dt(){if(de)return M||"{}";try{return localStorage.getItem(ne)??"{}"}catch{return M||"{}"}}function ve(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function pe(){const t=Dt();return t!==M&&(M=t,P=ve(t)),P}function It(t){ce.add(t);const e=n=>{if(!(n.key!==ne&&n.key!==null)){try{const o=localStorage.getItem(ne)??"{}",r={...ve(o),...P};P=r,M=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ce.delete(t),window.removeEventListener("storage",e)}}function Mt(t){P=t,M=JSON.stringify(t);try{localStorage.setItem(ne,M),de=!1}catch{de=!0}ce.forEach(e=>e())}function Pt(){const t=k.c(7),e=K.useSyncExternalStore(It,pe,pe);let n;t[0]!==e?(n=c=>!!e[c],t[0]=e,t[1]=n):n=t[1];const o=n,i=Ft;let r;t[2]!==e?(r=je.reduce((c,u)=>e[u.id]?c:c+1,0),t[2]=e,t[3]=r):r=t[3];const a=r;let l;return t[4]!==o||t[5]!==a?(l={isSeen:o,markSeen:i,unseenCount:a},t[4]=o,t[5]=a,t[6]=l):l=t[6],l}function Ft(t){P[t]||Mt({...P,[t]:{seenAt:new Date().toISOString()}})}const Rt=720*60*60*1e3,qt=10080*60*1e3;function Ut(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function Gt(t){const e=je[0];if(!e)return null;const n=Ut(e.date),o=t-n;return o<0||o>Rt?null:e}function Kt(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ht(t,e){const n=Kt(t);return n===null?!1:e-n>=qt}function Bt(){const t=k.c(22),{data:e}=Y.useSession(),{isSeen:n,markSeen:o}=Pt();let i,r,a;if(t[0]!==n||t[1]!==e?.user?.createdAt){a=Symbol.for("react.early_return_sentinel");e:{const f=Date.now();if(i=Gt(f),!i){a=null;break e}if(!Ht(e?.user?.createdAt,f)){a=null;break e}r=n(i.id)}t[0]=n,t[1]=e?.user?.createdAt,t[2]=i,t[3]=r,t[4]=a}else i=t[2],r=t[3],a=t[4];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let l;t[5]!==i.id||t[6]!==o?(l=()=>o(i.id),t[5]=i.id,t[6]=o,t[7]=l):l=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ve,{size:14}),t[8]=c):c=t[8];let u;t[9]!==l?(u=s.jsx(C,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:l,children:c}),t[9]=l,t[10]=u):u=t[10];let d,m;t[11]!==i.id||t[12]!==o?(d=()=>o(i.id),m=()=>o(i.id),t[11]=i.id,t[12]=o,t[13]=d,t[14]=m):(d=t[13],m=t[14]);let h;t[15]!==i||t[16]!==d||t[17]!==m?(h=s.jsx(Lt,{release:i,onCtaClick:d,onLearnMoreClick:m}),t[15]=i,t[16]=d,t[17]=m,t[18]=h):h=t[18];let p;return t[19]!==u||t[20]!==h?(p=s.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[u,h]}),t[19]=u,t[20]=h,t[21]=p):p=t[21],p}const ke=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),D=ke?"⌘":"Ctrl",O={keyboardShortcuts:{keys:[D,"K"],description:"Keyboard shortcuts"},back:{keys:[D,"["],description:"Back to previous"},focusChatInput:{keys:[D,"L"],description:"Focus chat input"},saveAndFormat:{keys:[D,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[D,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[D,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",D,"S"],description:"New task"},toggleDaemon:{keys:[D,"D"],description:"Toggle daemon logs"}},Yt=[{label:"General",shortcuts:[O.keyboardShortcuts,O.back,O.newTask,O.toggleDaemon]},{label:"Editor",shortcuts:[O.saveAndFormat]},{label:"Chat",shortcuts:[O.focusChatInput,O.togglePlanMode,O.sendMessage,O.newLine]},{label:"Questions",shortcuts:[O.selectOption]},{label:"Monitoring",shortcuts:[O.applyFilter]}];function ye(t){return ke?t.metaKey:t.ctrlKey}function Jt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Xe,{children:s.jsx(Ze,{children:"Keyboard Shortcuts"})}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Qe,{className:"sm:max-w-md",children:[i,s.jsx("div",{className:"flex flex-col gap-4",children:Yt.map(Wt)})]}),e[1]=r):r=e[1];let a;return e[2]!==o||e[3]!==n?(a=s.jsx(et,{open:n,onOpenChange:o,children:r}),e[2]=o,e[3]=n,e[4]=a):a=e[4],a}function Wt(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Vt)})]},t.label)}function Vt(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Qt)})]},t.description)}function Qt(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Xt=300*1e3,Zt=2;function en(t,e,n){return!e||e===n?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function tn(){const t=k.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:se.appVersionCheck(),queryFn:sn,refetchInterval:Xt,refetchIntervalInBackground:!0,staleTime:0},t[0]=e):e=t[0];const{data:n,dataUpdatedAt:o}=te(e),[i,r]=K.useState(0);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={version:null,count:0},t[1]=a):a=t[1];const[l,c]=K.useState(a);o!==i&&(r(o),c(p=>en(p,n,"4.74.0")));const u=l.count>=Zt;let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(tt,{children:[s.jsx(nt,{children:"A new version is available"}),s.jsx(st,{children:"You're viewing an outdated version of this page. Refresh to get the latest updates."})]}),t[2]=d):d=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(ot,{children:[d,s.jsx(it,{children:s.jsx(at,{onClick:nn,children:"Refresh"})})]}),t[3]=m):m=t[3];let h;return t[4]!==u?(h=s.jsx(rt,{open:u,children:m}),t[4]=u,t[5]=h):h=t[5],h}function nn(){return window.location.reload()}async function sn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function on({activeOrg:t}){return t&&($e(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Le()),null}function an(t,e,n){if(!n)return null;const o=mt(t,e);return o?o.threads.get().find(r=>r.id===n)?.branch??null:null}function rn(t){const{prev:e,virtualMcpId:n,decopilotId:o,savedLayout:i,opts:r,autosendValue:a}=t,l={};n?l.virtualmcpid=n:e.virtualmcpid&&(l.virtualmcpid=e.virtualmcpid);const c=typeof e.virtualmcpid=="string"?e.virtualmcpid:o,d=(n??c)!==c;let m="chat";if(r?.main)l.main=r.main;else if(i)i.main!==void 0&&(l.main=i.main),i.sidepanel!==void 0&&(m=i.sidepanel);else if(!d){const h=e.main;h&&typeof h=="string"&&!ht(h)&&(l.main=h)}return l.sidepanel=m,r?.autosend&&(l.autosend=a),l}const Ne="studio:thread-layout:v1",ln=50;function _e(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function cn(t,e,n,o=ln){const i=t.filter(([r])=>r!==e);for(i.push([e,_e(n)]);i.length>o;)i.shift();return i}function ue(){try{const t=sessionStorage.getItem(Ne);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&n.length===2&&typeof n[0]=="string"):[]}catch{return[]}}function Ae(t){try{sessionStorage.setItem(Ne,JSON.stringify(t))}catch{}}function dn(t,e){t&&Ae(cn(ue(),t,e))}function un(t){if(!t)return null;const e=ue().find(([n])=>n===t);return e?_e(e[1]):null}function Fn(t){if(!t)return;const e=ue(),n=e.filter(([o])=>o!==t);n.length!==e.length&&Ae(n)}function Ce(t){return{queryKey:se.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Rn(t){const e=k.c(10);let n;e[0]!==t?(n=Ce(t),e[0]=t,e[1]=n):n=e[1];const o=te(n);let i;e[2]!==o.data?.prompts?(i=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=i):i=e[3];let r;e[4]!==o.data?.tiles?(r=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=r):r=e[5];let a;return e[6]!==o.isLoading||e[7]!==i||e[8]!==r?(a={isLoading:o.isLoading,prompts:i,tiles:r},e[6]=o.isLoading,e[7]=i,e[8]=r,e[9]=a):a=e[9],a}function mn(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:i}=t;let r;e[0]!==n?(r=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=r):r=e[1];const a=r,l=fn;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=u):u=e[3];let d;e[4]!==i||e[5]!==o?(d=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",i?` via ${i}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=i,e[5]=o,e[6]=d):d=e[6];let m;e[7]!==d?(m=s.jsxs("div",{className:"space-y-2",children:[u,s.jsx("p",{className:"text-sm text-muted-foreground",children:d})]}),e[7]=d,e[8]=m):m=e[8];let h;e[9]!==a?(h=s.jsx(C,{onClick:a,children:"Sign in with SSO"}),e[9]=a,e[10]=h):h=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(C,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=p):p=e[11];let f;e[12]!==h?(f=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,p]}),e[12]=h,e[13]=f):f=e[13];let g;return e[14]!==m||e[15]!==f?(g=s.jsxs(H,{children:[c,m,f]}),e[14]=m,e[15]=f,e[16]=g):g=e[16],g}function fn(){window.location.href="/"}function hn(t){const e=k.c(8),{org:n,children:o}=t,r=gt(n.id,n.slug)?.enabled_plugins??null;let a;e[0]!==n.id||e[1]!==n.name||e[2]!==r?(a={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:r,ui:null},e[0]=n.id,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const l=a;let c;return e[4]!==o||e[5]!==n||e[6]!==l?(c=s.jsx(Ke,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=c):c=e[7],c}function gn(){const t=ze(),e=ft(),{org:n,locator:o}=De(),i=we({strict:!1}),r=Ie({strict:!1}),a=i.org??"",l=i.taskId??"",c=(f,g,y=!0)=>t({to:"/$org/$taskId",params:{org:a,taskId:f},search:g,replace:y}),u=(f,g=!0)=>c(l,f,g),d=f=>u(g=>({...g,sidepanel:f})),m=(f,g,y)=>{const w=!!l&&l===f;l&&!w&&dn(l,{main:r.main,sidepanel:r.sidepanel});const b=w?null:un(f),S=he(n.id).id;return c(f,v=>rn({prev:v,virtualMcpId:g,decopilotId:S,savedLayout:b,opts:y,autosendValue:ct}),!1)};return{openSidePanel:d,setTaskId:m,createNewTask:async f=>{const g=crypto.randomUUID(),y=f??r.virtualmcpid??he(n.id).id,b=y===r.virtualmcpid?an(n.slug,o,l):null;try{await e?.create({id:g,virtual_mcp_id:y,...b?{branch:b}:{}})}catch{}m(g,y)},openTab:f=>c(l||crypto.randomUUID(),g=>({...g,main:f}))}}function pn(){const t=k.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Me(e)?.params.org;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{taskId:r}=we(i),[a,l]=K.useState(!1),c=Pe(),u=o??"";let d;t[2]!==u?(d=Ce(u),t[2]=u,t[3]=d):d=t[3];const m=!!o&&!r;let h;t[4]!==d||t[5]!==m?(h={...d,enabled:m},t[4]=d,t[5]=m,t[6]=h):h=t[6],te(h);const{data:p}=Y.useSession(),f=p?.user?.id;let g;t[7]!==o||t[8]!==f?(g=o&&f?Fe(f,o):null,t[7]=o,t[8]=f,t[9]=g):g=t[9];const y=g;let w,b;t[10]!==c?(w=()=>{const j=A=>{if(ye(A)&&A.code==="KeyK"){A.preventDefault(),l(!0);return}ye(A)&&A.code==="BracketLeft"&&c.history.canGoBack()&&(A.preventDefault(),c.history.back())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},b=[c],t[10]=c,t[11]=w,t[12]=b):(w=t[11],b=t[12]),K.useEffect(w,b);let S;t[13]!==o?(S=se.activeOrganization(o),t[13]=o,t[14]=S):S=t[14];let v;t[15]!==o||t[16]!==f?(v=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Y.organization.getFullOrganization({query:{organizationSlug:o}}).finally(yn),A=me(j);return j&&!A&&localStorage.setItem(B.lastOrgSlug(),o),f&&j&&qe(f,o,j),j},t[15]=o,t[16]=f,t[17]=v):v=t[17];const N=y?y.data:void 0,T=y?.updatedAt;let $;t[18]!==v||t[19]!==N||t[20]!==T||t[21]!==S?($={queryKey:S,queryFn:v,initialData:N,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=T,t[21]=S,t[22]=$):$=t[22];const{data:x}=be($),E=x?.id,L=x?.slug,{data:_}=pt(E,L),ie=E??"",ae=L??"";let F;t[23]!==ie||t[24]!==ae?(F=dt({connectionId:ut,orgId:ie,orgSlug:ae}),t[23]=ie,t[24]=ae,t[25]=F):F=t[25];const re=!!E&&!!L;let W;if(t[26]!==F||t[27]!==re?(W={...F,enabled:re},t[26]=F,t[27]=re,t[28]=W):W=t[28],te(W),!x){let j;t[29]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ue,{}),t[29]=j):j=t[29];let A;return t[30]!==o?(A=s.jsx(K.Suspense,{fallback:j,children:s.jsx($t,{orgSlug:o})}),t[30]=o,t[31]=A):A=t[31],A}if(me(x)){localStorage.getItem(B.lastOrgSlug())===o&&localStorage.removeItem(B.lastOrgSlug());let j;return t[32]!==x.name?(j=s.jsx(Re,{orgName:x.name}),t[32]=x.name,t[33]=j):j=t[33],j}if(_?.ssoRequired&&!_.authenticated){let j;return t[34]!==x.id||t[35]!==x.name||t[36]!==x.slug||t[37]!==_.domain?(j=s.jsx(mn,{orgId:x.id,orgSlug:x.slug,orgName:x.name,domain:_.domain}),t[34]=x.id,t[35]=x.name,t[36]=x.slug,t[37]=_.domain,t[38]=j):j=t[38],j}const le=x.logo??null;let R;t[39]!==x||t[40]!==le?(R={...x,logo:le},t[39]=x,t[40]=le,t[41]=R):R=t[41];let q;t[42]!==x?(q=s.jsx(on,{activeOrg:x}),t[42]=x,t[43]=q):q=t[43];let V,Q;t[44]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Ge,{}),Q=s.jsx(Bt,{}),t[44]=V,t[45]=Q):(V=t[44],Q=t[45]);let U;t[46]!==a?(U=s.jsx(Jt,{open:a,onOpenChange:l}),t[46]=a,t[47]=U):U=t[47];let X;t[48]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(tn,{}),t[48]=X):X=t[48];let Z;return t[49]!==R||t[50]!==q||t[51]!==U?(Z=s.jsxs(hn,{org:R,children:[q,V,Q,U,X]}),t[49]=R,t[50]=q,t[51]=U,t[52]=Z):Z=t[52],Z}function yn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function xn(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(lt,{children:s.jsx(pn,{})}),t[0]=e):e=t[0],e}const qn=Object.freeze(Object.defineProperty({__proto__:null,default:xn,usePanelActions:gn},Symbol.toStringTag,{value:"Module"}));export{O as K,Rn as a,Fn as f,ye as i,an as r,qn as s,gn as u};
|
|
1
|
+
import{c as k,d as ee,j as s,B as C,bU as H,t as J,w as xe,a as Y,s as Oe,v as be,K as se,bV as Te,bW as Ee,D as B,r as K,m as te,bX as $e,bY as Le,b as ze,C as De,e as we,u as Ie,R as Me,aZ as Pe,bZ as Fe,b_ as me,b$ as Re,c0 as qe,S as Ue,O as Ge,c1 as Ke}from"./index-LdekSll3.js";import{A as oe}from"./avatar-ODfMrOSw.js";import{t as Se,a as He}from"./Users03-D11AqwMx.js";import{i as Be}from"./SearchLg-BBYByRTt.js";import{i as Ye,s as Je,a as z,n as We}from"./Stars02-CH3Kk6h-.js";import{s as Ve}from"./XClose-6eVK9gjQ.js";import{i as I}from"./CheckCircle-Cwk3XPAS.js";import{i as fe}from"./FilterLines-BQWL5JTu.js";import{i as G}from"./Zap-CKjhc3zs.js";import{d as Qe,D as Xe,a as Ze,e as et}from"./dialog-CIsOZrM9.js";import{b as tt,c as nt,d as st,a as ot,e as it,g as at,f as rt}from"./alert-dialog-BWfVJWo6.js";import{R as lt}from"./required-auth-layout-CMMguY8J.js";import{A as ct}from"./autosend-HLDOzs25.js";import{m as dt}from"./use-mcp-client-DL7RwW_0.js";import{a as he,S as ut}from"./constants-D_FQAPnt.js";import{d as mt,c as ft}from"./hooks-CDl8lixj.js";import{q as ht}from"./tab-id-BijBBRwE.js";import{e as gt}from"./use-organization-settings-D5GZ0amo.js";import{u as pt}from"./use-org-sso-Bq11wDiI.js";function yt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a={mutationFn:async()=>{const S=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await S.json();if(!S.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:S=>{window.location.href=`/${S.slug??o}`},onError:bt},e[0]=o,e[1]=a):a=e[1];const l=ee(a),c=xt;let u;e[2]!==i||e[3]!==n?(u=i?s.jsx(oe,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),e[2]=i,e[3]=n,e[4]=u):u=e[4];let d;e[5]!==n?(d=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=d):d=e[6];let m;e[7]!==r?(m=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",r]})," email can join this organization."]}),e[7]=r,e[8]=m):m=e[8];let h;e[9]!==d||e[10]!==m?(h=s.jsxs("div",{className:"space-y-2",children:[d,m]}),e[9]=d,e[10]=m,e[11]=h):h=e[11];let p;e[12]!==l?(p=()=>l.mutate(),e[12]=l,e[13]=p):p=e[13];const f=l.isPending?"Joining…":`Enter ${n}`;let g;e[14]!==l.isPending||e[15]!==p||e[16]!==f?(g=s.jsx(C,{onClick:p,disabled:l.isPending,children:f}),e[14]=l.isPending,e[15]=p,e[16]=f,e[17]=g):g=e[17];let y;e[18]!==l.isPending?(y=s.jsx(C,{variant:"ghost",onClick:c,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=y):y=e[19];let w;e[20]!==g||e[21]!==y?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,y]}),e[20]=g,e[21]=y,e[22]=w):w=e[22];let b;return e[23]!==w||e[24]!==u||e[25]!==h?(b=s.jsxs(H,{children:[u,h,w]}),e[23]=w,e[24]=u,e[25]=h,e[26]=b):b=e[26],b}function xt(){window.location.href="/"}function bt(t){J.error(t instanceof Error?t.message:"Failed to join organization")}function ge(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:i}=t,r=wt,a=i==="not-found",l=a?Be:xe,c=a?"Organization not found":"No access";let u;e[0]!==a||e[1]!==o||e[2]!==n?(u=a?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=a,e[1]=o,e[2]=n,e[3]=u):u=e[3];const d=u;let m;e[4]!==l?(m=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=m):m=e[5];let h;e[6]!==c?(h=s.jsx("h3",{className:"text-lg font-medium",children:c}),e[6]=c,e[7]=h):h=e[7];let p;e[8]!==d?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[8]=d,e[9]=p):p=e[9];let f;e[10]!==h||e[11]!==p?(f=s.jsxs("div",{className:"space-y-2",children:[h,p]}),e[10]=h,e[11]=p,e[12]=f):f=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(C,{onClick:r,children:"Go to home"}),e[13]=g):g=e[13];let y;return e[14]!==m||e[15]!==f?(y=s.jsxs(H,{children:[m,f,g]}),e[14]=m,e[15]=f,e[16]=y):y=e[16],y}function wt(){window.location.href="/"}function St(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:i,orgLogo:r}=t;let a;e[0]!==n?(a=async()=>{const _=await Y.organization.acceptInvitation({invitationId:n});if(_.error)throw new Error(_.error.message);return _.data},e[0]=n,e[1]=a):a=e[1];let l;e[2]!==i?(l=()=>{Oe(),window.location.href=`/${i}`},e[2]=i,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={mutationFn:a,onSuccess:l,onError:kt},e[4]=a,e[5]=l,e[6]=c):c=e[6];const u=ee(c);let d;e[7]!==n?(d=async()=>{const _=await Y.organization.rejectInvitation({invitationId:n});if(_.error)throw new Error(_.error.message);return _.data},e[7]=n,e[8]=d):d=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=vt,e[9]=m):m=e[9];let h;e[10]!==d?(h={mutationFn:d,onSuccess:m,onError:jt},e[10]=d,e[11]=h):h=e[11];const p=ee(h),f=u.isPending||p.isPending;let g;e[12]!==r||e[13]!==o?(g=r?s.jsx(oe,{url:r,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Ye,{className:"h-6 w-6 text-primary"})}),e[12]=r,e[13]=o,e[14]=g):g=e[14];let y;e[15]!==o?(y=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=y):y=e[16];let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=w):w=e[17];let b;e[18]!==y?(b=s.jsxs("div",{className:"space-y-2",children:[y,w]}),e[18]=y,e[19]=b):b=e[19];let S;e[20]!==u?(S=()=>u.mutate(),e[20]=u,e[21]=S):S=e[21];const v=u.isPending?"Accepting…":"Accept invitation";let N;e[22]!==f||e[23]!==S||e[24]!==v?(N=s.jsx(C,{onClick:S,disabled:f,children:v}),e[22]=f,e[23]=S,e[24]=v,e[25]=N):N=e[25];let T;e[26]!==p?(T=()=>p.mutate(),e[26]=p,e[27]=T):T=e[27];const $=p.isPending?"Declining…":"Decline";let x;e[28]!==f||e[29]!==T||e[30]!==$?(x=s.jsx(C,{variant:"ghost",onClick:T,disabled:f,children:$}),e[28]=f,e[29]=T,e[30]=$,e[31]=x):x=e[31];let E;e[32]!==N||e[33]!==x?(E=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,x]}),e[32]=N,e[33]=x,e[34]=E):E=e[34];let L;return e[35]!==b||e[36]!==E||e[37]!==g?(L=s.jsxs(H,{children:[g,b,E]}),e[35]=b,e[36]=E,e[37]=g,e[38]=L):L=e[38],L}function jt(t){J.error(t instanceof Error?t.message:"Failed to decline invitation")}function vt(){J.success("Invitation declined"),window.location.href="/"}function kt(t){J.error(t instanceof Error?t.message:"Failed to accept invitation")}function Nt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let i;e[0]!==o||e[1]!==n?(i=o?s.jsx(oe,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Je,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=r):r=e[3];let a;e[4]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[r,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=a):a=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(C,{variant:"ghost",onClick:_t,children:"Go to home"}),e[6]=l):l=e[6];let c;return e[7]!==i||e[8]!==a?(c=s.jsxs(H,{children:[i,a,l]}),e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function _t(){window.location.href="/"}function At(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=Tt,e[2]=l):l=e[2];let c;e[3]!==a?(c={mutationFn:a,onSuccess:l,onError:Ot},e[3]=a,e[4]=c):c=e[4];const u=ee(c);let d;e[5]!==i||e[6]!==n?(d=i?s.jsx(oe,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),e[5]=i,e[6]=n,e[7]=d):d=e[7];let m;e[8]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=m):m=e[9];let h;e[10]!==r?(h=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",r]})," emails before you can join."]}),e[10]=r,e[11]=h):h=e[11];let p;e[12]!==m||e[13]!==h?(p=s.jsxs("div",{className:"space-y-2",children:[m,h]}),e[12]=m,e[13]=h,e[14]=p):p=e[14];let f;e[15]!==u?(f=()=>u.mutate(),e[15]=u,e[16]=f):f=e[16];const g=u.isPending?"Requesting…":"Request to join";let y;e[17]!==u.isPending||e[18]!==f||e[19]!==g?(y=s.jsx(C,{onClick:f,disabled:u.isPending,children:g}),e[17]=u.isPending,e[18]=f,e[19]=g,e[20]=y):y=e[20];let w;e[21]!==u.isPending?(w=s.jsx(C,{variant:"ghost",onClick:Ct,disabled:u.isPending,children:"Go to home"}),e[21]=u.isPending,e[22]=w):w=e[22];let b;e[23]!==y||e[24]!==w?(b=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[y,w]}),e[23]=y,e[24]=w,e[25]=b):b=e[25];let S;return e[26]!==b||e[27]!==d||e[28]!==p?(S=s.jsxs(H,{children:[d,p,b]}),e[26]=b,e[27]=d,e[28]=p,e[29]=S):S=e[29],S}function Ct(){window.location.href="/"}function Ot(t){J.error(t instanceof Error?t.message:"Failed to request access")}function Tt(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Et(t){const e=k.c(7);let n;e[0]!==t?(n=se.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=o):o=e[3];let i;return e[4]!==n||e[5]!==o?(i={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=i):i=e[6],be(i)}function $t({orgSlug:t}){const{data:e}=Et(t);if(e.status!=="member"){Te()?.org===t&&Ee();const n=localStorage.getItem(B.lastOrgSlug())===t;if(n&&localStorage.removeItem(B.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ge,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(St,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(yt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(At,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(Nt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ge,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Lt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:i}=t;let r;e[0]!==n.eyebrow?(r=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=r):r=e[1];let a;e[2]!==n.title?(a=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=a):a=e[3];let l;e[4]!==r||e[5]!==a?(l=s.jsxs("div",{children:[r,a]}),e[4]=r,e[5]=a,e[6]=l):l=e[6];let c;e[7]!==n.bullets?(c=n.bullets.map(zt),e[7]=n.bullets,e[8]=c):c=e[8];let u;e[9]!==c?(u=s.jsx("ul",{className:"flex flex-col gap-3",children:c}),e[9]=c,e[10]=u):u=e[10];let d;e[11]!==o||e[12]!==i||e[13]!==n.cta||e[14]!==n.learnMoreHref?(d=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(C,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=i,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=d):d=e[15];let m;return e[16]!==l||e[17]!==u||e[18]!==d?(m=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,u,d]}),e[16]=l,e[17]=u,e[18]=d,e[19]=m):m=e[19],m}function zt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const je=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:z,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:I,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:G,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:z,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:I,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:G,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:I,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:z,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:G,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:z,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:I,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:z,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:I,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:z,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:fe,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:I,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:He,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:G,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:I,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:z,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:fe,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:z,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:We,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ne="studio.release-feed.v1",ce=new Set;let M="",P={},de=!1;function Dt(){if(de)return M||"{}";try{return localStorage.getItem(ne)??"{}"}catch{return M||"{}"}}function ve(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function pe(){const t=Dt();return t!==M&&(M=t,P=ve(t)),P}function It(t){ce.add(t);const e=n=>{if(!(n.key!==ne&&n.key!==null)){try{const o=localStorage.getItem(ne)??"{}",r={...ve(o),...P};P=r,M=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ce.delete(t),window.removeEventListener("storage",e)}}function Mt(t){P=t,M=JSON.stringify(t);try{localStorage.setItem(ne,M),de=!1}catch{de=!0}ce.forEach(e=>e())}function Pt(){const t=k.c(7),e=K.useSyncExternalStore(It,pe,pe);let n;t[0]!==e?(n=c=>!!e[c],t[0]=e,t[1]=n):n=t[1];const o=n,i=Ft;let r;t[2]!==e?(r=je.reduce((c,u)=>e[u.id]?c:c+1,0),t[2]=e,t[3]=r):r=t[3];const a=r;let l;return t[4]!==o||t[5]!==a?(l={isSeen:o,markSeen:i,unseenCount:a},t[4]=o,t[5]=a,t[6]=l):l=t[6],l}function Ft(t){P[t]||Mt({...P,[t]:{seenAt:new Date().toISOString()}})}const Rt=720*60*60*1e3,qt=10080*60*1e3;function Ut(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function Gt(t){const e=je[0];if(!e)return null;const n=Ut(e.date),o=t-n;return o<0||o>Rt?null:e}function Kt(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ht(t,e){const n=Kt(t);return n===null?!1:e-n>=qt}function Bt(){const t=k.c(22),{data:e}=Y.useSession(),{isSeen:n,markSeen:o}=Pt();let i,r,a;if(t[0]!==n||t[1]!==e?.user?.createdAt){a=Symbol.for("react.early_return_sentinel");e:{const f=Date.now();if(i=Gt(f),!i){a=null;break e}if(!Ht(e?.user?.createdAt,f)){a=null;break e}r=n(i.id)}t[0]=n,t[1]=e?.user?.createdAt,t[2]=i,t[3]=r,t[4]=a}else i=t[2],r=t[3],a=t[4];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let l;t[5]!==i.id||t[6]!==o?(l=()=>o(i.id),t[5]=i.id,t[6]=o,t[7]=l):l=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ve,{size:14}),t[8]=c):c=t[8];let u;t[9]!==l?(u=s.jsx(C,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:l,children:c}),t[9]=l,t[10]=u):u=t[10];let d,m;t[11]!==i.id||t[12]!==o?(d=()=>o(i.id),m=()=>o(i.id),t[11]=i.id,t[12]=o,t[13]=d,t[14]=m):(d=t[13],m=t[14]);let h;t[15]!==i||t[16]!==d||t[17]!==m?(h=s.jsx(Lt,{release:i,onCtaClick:d,onLearnMoreClick:m}),t[15]=i,t[16]=d,t[17]=m,t[18]=h):h=t[18];let p;return t[19]!==u||t[20]!==h?(p=s.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[u,h]}),t[19]=u,t[20]=h,t[21]=p):p=t[21],p}const ke=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),D=ke?"⌘":"Ctrl",O={keyboardShortcuts:{keys:[D,"K"],description:"Keyboard shortcuts"},back:{keys:[D,"["],description:"Back to previous"},focusChatInput:{keys:[D,"L"],description:"Focus chat input"},saveAndFormat:{keys:[D,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[D,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[D,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",D,"S"],description:"New task"},toggleDaemon:{keys:[D,"D"],description:"Toggle daemon logs"}},Yt=[{label:"General",shortcuts:[O.keyboardShortcuts,O.back,O.newTask,O.toggleDaemon]},{label:"Editor",shortcuts:[O.saveAndFormat]},{label:"Chat",shortcuts:[O.focusChatInput,O.togglePlanMode,O.sendMessage,O.newLine]},{label:"Questions",shortcuts:[O.selectOption]},{label:"Monitoring",shortcuts:[O.applyFilter]}];function ye(t){return ke?t.metaKey:t.ctrlKey}function Jt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Xe,{children:s.jsx(Ze,{children:"Keyboard Shortcuts"})}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Qe,{className:"sm:max-w-md",children:[i,s.jsx("div",{className:"flex flex-col gap-4",children:Yt.map(Wt)})]}),e[1]=r):r=e[1];let a;return e[2]!==o||e[3]!==n?(a=s.jsx(et,{open:n,onOpenChange:o,children:r}),e[2]=o,e[3]=n,e[4]=a):a=e[4],a}function Wt(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Vt)})]},t.label)}function Vt(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Qt)})]},t.description)}function Qt(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Xt=300*1e3,Zt=2;function en(t,e,n){return!e||e===n?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function tn(){const t=k.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:se.appVersionCheck(),queryFn:sn,refetchInterval:Xt,refetchIntervalInBackground:!0,staleTime:0},t[0]=e):e=t[0];const{data:n,dataUpdatedAt:o}=te(e),[i,r]=K.useState(0);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={version:null,count:0},t[1]=a):a=t[1];const[l,c]=K.useState(a);o!==i&&(r(o),c(p=>en(p,n,"4.74.2")));const u=l.count>=Zt;let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(tt,{children:[s.jsx(nt,{children:"A new version is available"}),s.jsx(st,{children:"You're viewing an outdated version of this page. Refresh to get the latest updates."})]}),t[2]=d):d=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(ot,{children:[d,s.jsx(it,{children:s.jsx(at,{onClick:nn,children:"Refresh"})})]}),t[3]=m):m=t[3];let h;return t[4]!==u?(h=s.jsx(rt,{open:u,children:m}),t[4]=u,t[5]=h):h=t[5],h}function nn(){return window.location.reload()}async function sn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function on({activeOrg:t}){return t&&($e(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Le()),null}function an(t,e,n){if(!n)return null;const o=mt(t,e);return o?o.threads.get().find(r=>r.id===n)?.branch??null:null}function rn(t){const{prev:e,virtualMcpId:n,decopilotId:o,savedLayout:i,opts:r,autosendValue:a}=t,l={};n?l.virtualmcpid=n:e.virtualmcpid&&(l.virtualmcpid=e.virtualmcpid);const c=typeof e.virtualmcpid=="string"?e.virtualmcpid:o,d=(n??c)!==c;let m="chat";if(r?.main)l.main=r.main;else if(i)i.main!==void 0&&(l.main=i.main),i.sidepanel!==void 0&&(m=i.sidepanel);else if(!d){const h=e.main;h&&typeof h=="string"&&!ht(h)&&(l.main=h)}return l.sidepanel=m,r?.autosend&&(l.autosend=a),l}const Ne="studio:thread-layout:v1",ln=50;function _e(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function cn(t,e,n,o=ln){const i=t.filter(([r])=>r!==e);for(i.push([e,_e(n)]);i.length>o;)i.shift();return i}function ue(){try{const t=sessionStorage.getItem(Ne);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&n.length===2&&typeof n[0]=="string"):[]}catch{return[]}}function Ae(t){try{sessionStorage.setItem(Ne,JSON.stringify(t))}catch{}}function dn(t,e){t&&Ae(cn(ue(),t,e))}function un(t){if(!t)return null;const e=ue().find(([n])=>n===t);return e?_e(e[1]):null}function Fn(t){if(!t)return;const e=ue(),n=e.filter(([o])=>o!==t);n.length!==e.length&&Ae(n)}function Ce(t){return{queryKey:se.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Rn(t){const e=k.c(10);let n;e[0]!==t?(n=Ce(t),e[0]=t,e[1]=n):n=e[1];const o=te(n);let i;e[2]!==o.data?.prompts?(i=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=i):i=e[3];let r;e[4]!==o.data?.tiles?(r=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=r):r=e[5];let a;return e[6]!==o.isLoading||e[7]!==i||e[8]!==r?(a={isLoading:o.isLoading,prompts:i,tiles:r},e[6]=o.isLoading,e[7]=i,e[8]=r,e[9]=a):a=e[9],a}function mn(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:i}=t;let r;e[0]!==n?(r=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=r):r=e[1];const a=r,l=fn;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=u):u=e[3];let d;e[4]!==i||e[5]!==o?(d=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",i?` via ${i}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=i,e[5]=o,e[6]=d):d=e[6];let m;e[7]!==d?(m=s.jsxs("div",{className:"space-y-2",children:[u,s.jsx("p",{className:"text-sm text-muted-foreground",children:d})]}),e[7]=d,e[8]=m):m=e[8];let h;e[9]!==a?(h=s.jsx(C,{onClick:a,children:"Sign in with SSO"}),e[9]=a,e[10]=h):h=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(C,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=p):p=e[11];let f;e[12]!==h?(f=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,p]}),e[12]=h,e[13]=f):f=e[13];let g;return e[14]!==m||e[15]!==f?(g=s.jsxs(H,{children:[c,m,f]}),e[14]=m,e[15]=f,e[16]=g):g=e[16],g}function fn(){window.location.href="/"}function hn(t){const e=k.c(8),{org:n,children:o}=t,r=gt(n.id,n.slug)?.enabled_plugins??null;let a;e[0]!==n.id||e[1]!==n.name||e[2]!==r?(a={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:r,ui:null},e[0]=n.id,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const l=a;let c;return e[4]!==o||e[5]!==n||e[6]!==l?(c=s.jsx(Ke,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=c):c=e[7],c}function gn(){const t=ze(),e=ft(),{org:n,locator:o}=De(),i=we({strict:!1}),r=Ie({strict:!1}),a=i.org??"",l=i.taskId??"",c=(f,g,y=!0)=>t({to:"/$org/$taskId",params:{org:a,taskId:f},search:g,replace:y}),u=(f,g=!0)=>c(l,f,g),d=f=>u(g=>({...g,sidepanel:f})),m=(f,g,y)=>{const w=!!l&&l===f;l&&!w&&dn(l,{main:r.main,sidepanel:r.sidepanel});const b=w?null:un(f),S=he(n.id).id;return c(f,v=>rn({prev:v,virtualMcpId:g,decopilotId:S,savedLayout:b,opts:y,autosendValue:ct}),!1)};return{openSidePanel:d,setTaskId:m,createNewTask:async f=>{const g=crypto.randomUUID(),y=f??r.virtualmcpid??he(n.id).id,b=y===r.virtualmcpid?an(n.slug,o,l):null;try{await e?.create({id:g,virtual_mcp_id:y,...b?{branch:b}:{}})}catch{}m(g,y)},openTab:f=>c(l||crypto.randomUUID(),g=>({...g,main:f}))}}function pn(){const t=k.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Me(e)?.params.org;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{taskId:r}=we(i),[a,l]=K.useState(!1),c=Pe(),u=o??"";let d;t[2]!==u?(d=Ce(u),t[2]=u,t[3]=d):d=t[3];const m=!!o&&!r;let h;t[4]!==d||t[5]!==m?(h={...d,enabled:m},t[4]=d,t[5]=m,t[6]=h):h=t[6],te(h);const{data:p}=Y.useSession(),f=p?.user?.id;let g;t[7]!==o||t[8]!==f?(g=o&&f?Fe(f,o):null,t[7]=o,t[8]=f,t[9]=g):g=t[9];const y=g;let w,b;t[10]!==c?(w=()=>{const j=A=>{if(ye(A)&&A.code==="KeyK"){A.preventDefault(),l(!0);return}ye(A)&&A.code==="BracketLeft"&&c.history.canGoBack()&&(A.preventDefault(),c.history.back())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},b=[c],t[10]=c,t[11]=w,t[12]=b):(w=t[11],b=t[12]),K.useEffect(w,b);let S;t[13]!==o?(S=se.activeOrganization(o),t[13]=o,t[14]=S):S=t[14];let v;t[15]!==o||t[16]!==f?(v=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Y.organization.getFullOrganization({query:{organizationSlug:o}}).finally(yn),A=me(j);return j&&!A&&localStorage.setItem(B.lastOrgSlug(),o),f&&j&&qe(f,o,j),j},t[15]=o,t[16]=f,t[17]=v):v=t[17];const N=y?y.data:void 0,T=y?.updatedAt;let $;t[18]!==v||t[19]!==N||t[20]!==T||t[21]!==S?($={queryKey:S,queryFn:v,initialData:N,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=T,t[21]=S,t[22]=$):$=t[22];const{data:x}=be($),E=x?.id,L=x?.slug,{data:_}=pt(E,L),ie=E??"",ae=L??"";let F;t[23]!==ie||t[24]!==ae?(F=dt({connectionId:ut,orgId:ie,orgSlug:ae}),t[23]=ie,t[24]=ae,t[25]=F):F=t[25];const re=!!E&&!!L;let W;if(t[26]!==F||t[27]!==re?(W={...F,enabled:re},t[26]=F,t[27]=re,t[28]=W):W=t[28],te(W),!x){let j;t[29]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ue,{}),t[29]=j):j=t[29];let A;return t[30]!==o?(A=s.jsx(K.Suspense,{fallback:j,children:s.jsx($t,{orgSlug:o})}),t[30]=o,t[31]=A):A=t[31],A}if(me(x)){localStorage.getItem(B.lastOrgSlug())===o&&localStorage.removeItem(B.lastOrgSlug());let j;return t[32]!==x.name?(j=s.jsx(Re,{orgName:x.name}),t[32]=x.name,t[33]=j):j=t[33],j}if(_?.ssoRequired&&!_.authenticated){let j;return t[34]!==x.id||t[35]!==x.name||t[36]!==x.slug||t[37]!==_.domain?(j=s.jsx(mn,{orgId:x.id,orgSlug:x.slug,orgName:x.name,domain:_.domain}),t[34]=x.id,t[35]=x.name,t[36]=x.slug,t[37]=_.domain,t[38]=j):j=t[38],j}const le=x.logo??null;let R;t[39]!==x||t[40]!==le?(R={...x,logo:le},t[39]=x,t[40]=le,t[41]=R):R=t[41];let q;t[42]!==x?(q=s.jsx(on,{activeOrg:x}),t[42]=x,t[43]=q):q=t[43];let V,Q;t[44]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Ge,{}),Q=s.jsx(Bt,{}),t[44]=V,t[45]=Q):(V=t[44],Q=t[45]);let U;t[46]!==a?(U=s.jsx(Jt,{open:a,onOpenChange:l}),t[46]=a,t[47]=U):U=t[47];let X;t[48]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(tn,{}),t[48]=X):X=t[48];let Z;return t[49]!==R||t[50]!==q||t[51]!==U?(Z=s.jsxs(hn,{org:R,children:[q,V,Q,U,X]}),t[49]=R,t[50]=q,t[51]=U,t[52]=Z):Z=t[52],Z}function yn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function xn(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(lt,{children:s.jsx(pn,{})}),t[0]=e):e=t[0],e}const qn=Object.freeze(Object.defineProperty({__proto__:null,default:xn,usePanelActions:gn},Symbol.toStringTag,{value:"Module"}));export{O as K,Rn as a,Fn as f,ye as i,an as r,qn as s,gn as u};
|