decocms 4.74.2 → 4.74.4

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.
Files changed (235) hide show
  1. package/dist/client/assets/{AlertCircle-7Nt6pK3u.js → AlertCircle-BtNCxiGW.js} +1 -1
  2. package/dist/client/assets/{AreaChart-B_EqFBTf.js → AreaChart-jt0JyWiK.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-BXJFmEZc.js → ArrowUp-CXB4gZz7.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-BP--4ucj.js → ArrowUpRight-C32Vjo9y.js} +1 -1
  5. package/dist/client/assets/{Check-D0mBSrjH.js → Check-BUCogM6F.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-Cwk3XPAS.js → CheckCircle-BBWqvLWY.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-PmGFsMpL.js → ChevronDown-DhM0vuwQ.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-B-vLdw8q.js → ChevronRight-DEntq04v.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-BHUOn26n.js → ChevronUp-BLxduW0K.js} +1 -1
  10. package/dist/client/assets/{Circle-DApmycTB.js → Circle-CvSguByZ.js} +1 -1
  11. package/dist/client/assets/{Copy01-YKEDguCl.js → Copy01-DtdfitVc.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DmdjQQ_H.js → DotsVertical-BPezuWGR.js} +1 -1
  13. package/dist/client/assets/{Eye-BMt91Y28.js → Eye-sYe8-y4w.js} +1 -1
  14. package/dist/client/assets/{FilterLines-BQWL5JTu.js → FilterLines-BHZFohrp.js} +1 -1
  15. package/dist/client/assets/{Flag01-Bvh5iRqx.js → Flag01-DElJITIO.js} +1 -1
  16. package/dist/client/assets/{Globe01-CN1f6WBv.js → Globe01-DEC8buek.js} +1 -1
  17. package/dist/client/assets/{Globe04-qC3ih0ZL.js → Globe04-DS5fT3Vb.js} +1 -1
  18. package/dist/client/assets/{HardDrive-BwJlKgJ6.js → HardDrive-CY9dey0e.js} +1 -1
  19. package/dist/client/assets/{Key01-C1LLnj6q.js → Key01-gY92sLVc.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DPXJOfef.js → LayoutLeft-CkfMYnAT.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-7ka-zpyj.js → LinkExternal01-BoE2-EL9.js} +1 -1
  22. package/dist/client/assets/{List-Bx8txb9K.js → List-CpWvvN0q.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DJD9nEcj.js → Monitor01-DfUPunIk.js} +1 -1
  24. package/dist/client/assets/{Package-D5z_WcDc.js → Package-C7xBvhHC.js} +1 -1
  25. package/dist/client/assets/{Palette-qT1fhobG.js → Palette-DiMJ8AJU.js} +1 -1
  26. package/dist/client/assets/{Play-GvZ0_iyw.js → Play-BEJiVCde.js} +1 -1
  27. package/dist/client/assets/{Plus-C4ZEipYr.js → Plus-BANF27D9.js} +1 -1
  28. package/dist/client/assets/{SearchLg-BBYByRTt.js → SearchLg-Bkv5w7JK.js} +1 -1
  29. package/dist/client/assets/{SearchMd-CUL7QlM0.js → SearchMd-mSJ_LN9U.js} +1 -1
  30. package/dist/client/assets/{Settings02-kgu7_M6O.js → Settings02-DF0bUEBW.js} +1 -1
  31. package/dist/client/assets/{Shield01-BISWnawB.js → Shield01-BmjeaSF4.js} +1 -1
  32. package/dist/client/assets/{Star01-Ba-daWZ-.js → Star01-DvsehzkC.js} +1 -1
  33. package/dist/client/assets/{Stars01-D7DsKu7S.js → Stars01-CLXnPXMC.js} +1 -1
  34. package/dist/client/assets/{Stars02-CH3Kk6h-.js → Stars02-C6A52gEe.js} +1 -1
  35. package/dist/client/assets/{Sun-BPy5rxZW.js → Sun-C6K4KwUc.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-D_tcQJ73.js → SwitchHorizontal01-CNIVGz3C.js} +1 -1
  37. package/dist/client/assets/{Tool01-CXy9L9vf.js → Tool01-ivvpOFv0.js} +1 -1
  38. package/dist/client/assets/{Tool02-BAfdT5B8.js → Tool02-CAm9cuRL.js} +1 -1
  39. package/dist/client/assets/{Trash01-APUCP4GX.js → Trash01-D7mGDVWk.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-CLAFKqVO.js → TrendUp01-CxpitjrX.js} +1 -1
  41. package/dist/client/assets/{Upload01-CmRDGAjs.js → Upload01-C1LtRM54.js} +1 -1
  42. package/dist/client/assets/{User01-CpMNTHj6.js → User01-D6C_E4ze.js} +1 -1
  43. package/dist/client/assets/{UserPlus01-mMfR4YMV.js → UserPlus01-Df111dIO.js} +1 -1
  44. package/dist/client/assets/{Users01-zx9lM6Kg.js → Users01-BPdb_I4n.js} +1 -1
  45. package/dist/client/assets/{Users03-D11AqwMx.js → Users03-B8u3RFLN.js} +1 -1
  46. package/dist/client/assets/{X-BRf1CuwT.js → X-CC6aodtK.js} +1 -1
  47. package/dist/client/assets/{XCircle-Bx3h3ov4.js → XCircle-CIESU6rb.js} +1 -1
  48. package/dist/client/assets/{XClose-6eVK9gjQ.js → XClose-CH0_FkoC.js} +1 -1
  49. package/dist/client/assets/{Zap-CKjhc3zs.js → Zap-DfEKRvFr.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-BntLBw72.js → ZapSquare-DRqp83Rm.js} +1 -1
  51. package/dist/client/assets/{ZoomOut-5mlqDR-t.js → ZoomOut-B6KApjQS.js} +1 -1
  52. package/dist/client/assets/{access-gate-Zzwbhi5g.js → access-gate-CVqzm4qP.js} +1 -1
  53. package/dist/client/assets/{add-section-modal-Ciwr9vqD.js → add-section-modal-B3a7vhnt.js} +1 -1
  54. package/dist/client/assets/{agent-icon-Bm6aaEo_.js → agent-icon-DHqSUy98.js} +1 -1
  55. package/dist/client/assets/{agents-list-CX5CGH-y.js → agents-list-kvcHFnp5.js} +1 -1
  56. package/dist/client/assets/{ai-providers-Bb8yB23r.js → ai-providers-BxLGu2R8.js} +1 -1
  57. package/dist/client/assets/{alert-BvEEzv9b.js → alert-6pkSC3aL.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-BWfVJWo6.js → alert-dialog-DjH2ftUe.js} +1 -1
  59. package/dist/client/assets/app-editor-oMacO6Vm.js +1 -0
  60. package/dist/client/assets/{auth-DUNMp2q9.js → auth-C8KqpST8.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-CXy5AK9w.js → auth-catchall-CTws_4Wv.js} +1 -1
  62. package/dist/client/assets/{auth-entry-BzVS8HQW.js → auth-entry-B_WdTFHN.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-aUT-uzAh.js → auth-split-layout-CcyWaS4D.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-CBGP3HRu.js → authenticate-and-persist-oauth-BvMiNF1a.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-BRHz9zkz.js → automation-list-row-CUVN2q9I.js} +1 -1
  66. package/dist/client/assets/{automation-runs-D2vNR23X.js → automation-runs-BeGrCRT7.js} +1 -1
  67. package/dist/client/assets/automations-q-QzgTP8.js +1 -0
  68. package/dist/client/assets/{autosend-HLDOzs25.js → autosend-C3G-59hV.js} +1 -1
  69. package/dist/client/assets/{avatar-ODfMrOSw.js → avatar-jwDXo9TF.js} +1 -1
  70. package/dist/client/assets/{badge-DqelMuvl.js → badge-Z2tkGGxq.js} +1 -1
  71. package/dist/client/assets/{block-document-VXj-kuOr.js → block-document-Dakeh4rb.js} +1 -1
  72. package/dist/client/assets/{brand-context-7qf_1G0Q.js → brand-context-BtmgygeH.js} +1 -1
  73. package/dist/client/assets/{buckets-D7doUMsO.js → buckets-CWEt_BVh.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-DP0FmV8B.js → bulk-category-panel-BJ-j4qr3.js} +1 -1
  75. package/dist/client/assets/{calendar-rMb-ODp7.js → calendar-DjQq1pZ5.js} +1 -1
  76. package/dist/client/assets/{capability-load-error-DDrbVf9Z.js → capability-load-error-BWgJSEDh.js} +1 -1
  77. package/dist/client/assets/{card-6dPhvUw3.js → card-DHaG1O6Q.js} +1 -1
  78. package/dist/client/assets/{category-editor-P9vCoT62.js → category-editor-K1RcSFdH.js} +1 -1
  79. package/dist/client/assets/{chat-context-BdWFa_ae.js → chat-context-IsiTNdGt.js} +1 -1
  80. package/dist/client/assets/{checkbox-BAEBF-lp.js → checkbox-X9YDScmr.js} +1 -1
  81. package/dist/client/assets/{cli-auth-success-thW0JcOC.js → cli-auth-success-DlaVyKvk.js} +1 -1
  82. package/dist/client/assets/{collection-detail-BMWq1If8.js → collection-detail-DF4nYsKI.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-IE8Ni7uy.js → collection-display-button-BTGjCfxU.js} +1 -1
  84. package/dist/client/assets/{collection-search-c9oirDKJ.js → collection-search-ge5aO1gQ.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-fal4CYGm.js → collection-table-wrapper-DVO4JRbg.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-Cx_qr9p2.js → collection-tabs-BDYkItco.js} +1 -1
  87. package/dist/client/assets/{command-CMohXiY9.js → command-CMkc8zHG.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-BjJyVAeU.js → commerce-onboarding-DV3pCJKw.js} +1 -1
  89. package/dist/client/assets/{companions-core-BaAHCjLB.js → companions-core-B1zbGwdW.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-BnMQnI9Q.js → connect-desktop-dialog-CLlKwdim.js} +1 -1
  91. package/dist/client/assets/{connection-card-jq-X-joO.js → connection-card-BJwbJlKh.js} +1 -1
  92. package/dist/client/assets/{connection-detail-Bi8xUt2a.js → connection-detail-CLHP55LD.js} +1 -1
  93. package/dist/client/assets/{connection-form-helpers-D8Y-iC7G.js → connection-form-helpers-_XjGXgjL.js} +1 -1
  94. package/dist/client/assets/{connections-BG-UjvGH.js → connections-B030KJck.js} +1 -1
  95. package/dist/client/assets/{decopilot-sse-pool-4Coc0RZf.js → decopilot-sse-pool-BjnGpLM5.js} +1 -1
  96. package/dist/client/assets/{dialog-CIsOZrM9.js → dialog-DmjouGeO.js} +1 -1
  97. package/dist/client/assets/{domain-settings-tEDfHeLX.js → domain-settings-DkBfzzvj.js} +1 -1
  98. package/dist/client/assets/{drawer-CPiGkXxI.js → drawer-DPCnfWrW.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-B5Zph68E.js → dropdown-menu-CNjWF-jg.js} +1 -1
  100. package/dist/client/assets/{empty-state-CssJRHRY.js → empty-state-BEpp0Iz6.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-udtq7ldu.js → extract-connection-data-C-xhglh0.js} +1 -1
  102. package/dist/client/assets/{file-explorer-BkuM2LZ9.js → file-explorer-H-aWuOpi.js} +1 -1
  103. package/dist/client/assets/{file-type-icon-BDsT4NsE.js → file-type-icon-BFh7vGZh.js} +1 -1
  104. package/dist/client/assets/{files-P4YoAM_Q.js → files-CacpeyC7.js} +1 -1
  105. package/dist/client/assets/{form-DO3brjC6.js → form-B-roikQp.js} +1 -1
  106. package/dist/client/assets/{general-9kseFLhw.js → general-D1tFzSEX.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-BIKsB9fh.js → github-repo-picker-D4FoVfzP.js} +1 -1
  108. package/dist/client/assets/{hooks-CDl8lixj.js → hooks-Bp8t_8iG.js} +1 -1
  109. package/dist/client/assets/{index-DGL5NlRf.js → index-0m1L4svE.js} +1 -1
  110. package/dist/client/assets/{index-Cabias0z.js → index-B0iPjxK8.js} +1 -1
  111. package/dist/client/assets/{index-DjZlwvG-.js → index-BHxw2Fi3.js} +1 -1
  112. package/dist/client/assets/{index-CnI2YHm_.js → index-BlSrpoWN.js} +1 -1
  113. package/dist/client/assets/{index-DVS6dCOq.js → index-BoRzOxx1.js} +1 -1
  114. package/dist/client/assets/{index-LdekSll3.js → index-ByCUK2oF.js} +3 -3
  115. package/dist/client/assets/{index-BmB9QsuH.js → index-C1VmEUiF.js} +1 -1
  116. package/dist/client/assets/{index-dlw0nWwT.js → index-CVBW0D5I.js} +1 -1
  117. package/dist/client/assets/{index-De7Vrw1B.js → index-Cgymszdd.js} +1 -1
  118. package/dist/client/assets/{index-BEa0XcuM.js → index-ChNuMZA1.js} +2 -2
  119. package/dist/client/assets/{index-BjO160yJ.js → index-CoidyOsG.js} +1 -1
  120. package/dist/client/assets/{index-60vpzjoP.js → index-XA63zMPz.js} +5 -5
  121. package/dist/client/assets/{index-CNa9GbwP.js → index-rCFHktNC.js} +1 -1
  122. package/dist/client/assets/{index-redirect-Durt0uGm.js → index-redirect-B9uW5EgB.js} +1 -1
  123. package/dist/client/assets/{index-D_sYzPoS.js → index-xaTlFxS7.js} +1 -1
  124. package/dist/client/assets/{input-Ahc5_8w6.js → input-x4KZ8-AD.js} +1 -1
  125. package/dist/client/assets/{integration-icon-yl-4tv2q.js → integration-icon-BvBPrlHG.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-Cr4_AjST.js → invite-member-dialog-5WTFW-uZ.js} +1 -1
  127. package/dist/client/assets/{label-B-N4D4el.js → label-BBCu0q0g.js} +1 -1
  128. package/dist/client/assets/{layout-DduIkC_1.js → layout-02gQwEFt.js} +1 -1
  129. package/dist/client/assets/{login-BEj0pR8n.js → login-CKJvY61J.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-DYEOf_NB.js → mcp-oauth-COy78u62.js} +1 -1
  131. package/dist/client/assets/{members-BTIjkH3t.js → members-CRyRALWq.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-BAkcna7Z.js → monaco-editor-CSR4F4Su.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-CCXtKjzQ.js → monitoring-stats-row-C0Z8vA3q.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-CbknNfun.js → oauth-callback-BSka0Scc.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-B8wm8Z91.js → oauth-callback-ai-provider-CwbR8Fqh.js} +1 -1
  136. package/dist/client/assets/{onboarding-WOBNvMNa.js → onboarding-BYlEFv9A.js} +1 -1
  137. package/dist/client/assets/{org-install-PFEnxCFZ.js → org-install-CE42vRg6.js} +1 -1
  138. package/dist/client/assets/{org-layout-B4eM_cAm.js → org-layout-BAXAUCaN.js} +1 -1
  139. package/dist/client/assets/{organization-choice-D0qBuG6H.js → organization-choice-yLkTWoWS.js} +1 -1
  140. package/dist/client/assets/{orgs-B9ECvLek.js → orgs-WZrSFiXz.js} +1 -1
  141. package/dist/client/assets/{page-seo-form-D93VcSbg.js → page-seo-form-FKw7oGsh.js} +1 -1
  142. package/dist/client/assets/page-seo-sheet-wQA_ndcY.js +1 -0
  143. package/dist/client/assets/{popover-B9HWZYb2.js → popover-DdRBXCUa.js} +1 -1
  144. package/dist/client/assets/{post-editor-DBkV3r9Y.js → post-editor-C1F1o_ks.js} +1 -1
  145. package/dist/client/assets/{primitives-tVaEBsAv.js → primitives-D55UayIn.js} +1 -1
  146. package/dist/client/assets/{profile-Z8Ki-oOg.js → profile-CwNh4VO5.js} +1 -1
  147. package/dist/client/assets/project-app-view-QrIQqegw.js +1 -0
  148. package/dist/client/assets/record-editor-CTkX9d5y.js +1 -0
  149. package/dist/client/assets/redirect-editor-BvdPCRvw.js +1 -0
  150. package/dist/client/assets/registry-COamaEpc.js +2 -0
  151. package/dist/client/assets/{registry-layout-CiSIqBb4.js → registry-layout-C1sM1cdE.js} +1 -1
  152. package/dist/client/assets/{reports-D_uyJHbu.js → reports-Cvn0sykC.js} +1 -1
  153. package/dist/client/assets/{require-capability-DSvw1X4X.js → require-capability-DgLCytL8.js} +1 -1
  154. package/dist/client/assets/{required-auth-layout-CMMguY8J.js → required-auth-layout-t6Iidz82.js} +1 -1
  155. package/dist/client/assets/{reset-password-D2EOsNEe.js → reset-password-BjgTPKon.js} +1 -1
  156. package/dist/client/assets/{roles-BfDzp1dZ.js → roles-lm26v4ft.js} +1 -1
  157. package/dist/client/assets/{search-input-B87p-N3Q.js → search-input-DENGWCoB.js} +1 -1
  158. package/dist/client/assets/{secrets-oWRvJyNS.js → secrets-DFTgA8dm.js} +1 -1
  159. package/dist/client/assets/{sections-editor-CdMkUBnn.js → sections-editor-Di0IYMLN.js} +1 -1
  160. package/dist/client/assets/{select-BK2fSAGa.js → select-CTBgBJrc.js} +1 -1
  161. package/dist/client/assets/{select-model-DyYklQhq.js → select-model-CzzSLCq7.js} +1 -1
  162. package/dist/client/assets/self-tool-result-DP52WU4b.js +1 -0
  163. package/dist/client/assets/{seo-editor-CYBdDfVF.js → seo-editor-Gxrqvkrw.js} +1 -1
  164. package/dist/client/assets/{settings-layout-DhW1zJN8.js → settings-layout-DlZkRMdg.js} +1 -1
  165. package/dist/client/assets/{settings-section-C1Acpu_v.js → settings-section-B6ZcZIQ9.js} +1 -1
  166. package/dist/client/assets/{shell-controls-Cp2Tzxyd.js → shell-controls-ByIpzFDz.js} +1 -1
  167. package/dist/client/assets/{shell-layout-cvOWu3Bb.js → shell-layout-BCinI49w.js} +1 -1
  168. package/dist/client/assets/{sidebar-D6wZQMs1.js → sidebar-DLJnRCYQ.js} +1 -1
  169. package/dist/client/assets/{skeleton--iEBiL2O.js → skeleton-Bd3B7YLL.js} +1 -1
  170. package/dist/client/assets/{sso-BlD_fs9m.js → sso-Btq3Nd6D.js} +1 -1
  171. package/dist/client/assets/{store-BIFu6366.js → store-Bp0rmNZm.js} +1 -1
  172. package/dist/client/assets/store-registry-Dm20OxkI.js +2 -0
  173. package/dist/client/assets/{studio-tools-C6CclkE9.js → studio-tools-CLnkBk4A.js} +1 -1
  174. package/dist/client/assets/{switch-D7EBUFwg.js → switch-DUORl78q.js} +1 -1
  175. package/dist/client/assets/{table-BMd4rGjA.js → table-7YWMKP4X.js} +1 -1
  176. package/dist/client/assets/{tabs-C6mEKLrC.js → tabs-DThRuEa2.js} +1 -1
  177. package/dist/client/assets/{textarea-CnsXYno3.js → textarea-Cnq5r4Cc.js} +1 -1
  178. package/dist/client/assets/{toggle-group-CHiT2zi8.js → toggle-group-ov_TGacE.js} +1 -1
  179. package/dist/client/assets/{toolbar-B57zOF1P.js → toolbar-BvjhmpR0.js} +1 -1
  180. package/dist/client/assets/{toolbar-icon-button-BvFJpYeK.js → toolbar-icon-button-B7VwX87F.js} +1 -1
  181. package/dist/client/assets/{tools-list-DEK41qXq.js → tools-list-BGICvyrw.js} +1 -1
  182. package/dist/client/assets/{tooltip-BGm-IgA-.js → tooltip-BXQ_C7s1.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-D5XAQyc9.js → use-ai-providers-BzV9mrQh.js} +1 -1
  184. package/dist/client/assets/{use-automations-lcgzv2am.js → use-automations-CXGCrc4C.js} +1 -1
  185. package/dist/client/assets/{use-autosave-GrI-CtYt.js → use-autosave-Dt9rSkxG.js} +1 -1
  186. package/dist/client/assets/{use-capability-D3kXXKk7.js → use-capability-BNDGP512.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-BY1pm89W.js → use-clock-tick-D282Ajii.js} +1 -1
  188. package/dist/client/assets/{use-collections-BtybZGh0.js → use-collections-DEQXfLlw.js} +1 -1
  189. package/dist/client/assets/{use-connection--eZlhK3I.js → use-connection-BFhD4lzR.js} +1 -1
  190. package/dist/client/assets/{use-copy-B6jV0HNR.js → use-copy-BpXeuKZe.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-CuTto1BH.js → use-create-virtual-mcp-C4rT_XRq.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-Rhccxzrn.js → use-debounced-autosave-CG-006NP.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-BsrFA4Fu.js → use-debounced-value-BPD_WjeJ.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-DkWCOBhO.js → use-deco-credits-NDzATbhc.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-ijeneFBZ.js → use-decopilot-events-Bz_iOA1x.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-D2mQQjVk.js → use-delete-connection-DLG6OZTp.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-R973eJt7.js → use-deployment-admin-ywIEdesu.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-C5YTi-f0.js → use-file-configs-DOzRnWn-.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-CMZ6xVYY.js → use-infinite-scroll-BgAMbrxc.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-D329QH2z.js → use-join-requests-BH4dMegH.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-DL7RwW_0.js → use-mcp-client-QAqgV2Yy.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-K3veuXIg.js → use-mcp-tools-pkSaeOla.js} +1 -1
  203. package/dist/client/assets/{use-members-CjpUW6ut.js → use-members-Dnl6C1Z3.js} +1 -1
  204. package/dist/client/assets/{use-mobile-BO0IkFF-.js → use-mobile-DYP8U4Ef.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-DollRSI0.js → use-navigate-to-agent-DBK0zHc3.js} +1 -1
  206. package/dist/client/assets/{use-org-auth-client-Do6ICXxA.js → use-org-auth-client-DoSWUORm.js} +1 -1
  207. package/dist/client/assets/{use-org-sso-Bq11wDiI.js → use-org-sso-BWY4VyV_.js} +1 -1
  208. package/dist/client/assets/{use-organization-roles-DZZWVozd.js → use-organization-roles-DeRkukvp.js} +1 -1
  209. package/dist/client/assets/{use-organization-settings-D5GZ0amo.js → use-organization-settings-CzkAvvqT.js} +1 -1
  210. package/dist/client/assets/{use-registry-connections-DF6MEH42.js → use-registry-connections-BF7kjquX.js} +1 -1
  211. package/dist/client/assets/{use-secrets-DQ9xlX5K.js → use-secrets-CMO_kM9T.js} +1 -1
  212. package/dist/client/assets/{use-status-sounds-BN6Xde6g.js → use-status-sounds-Ch30upYM.js} +1 -1
  213. package/dist/client/assets/{use-view-mode-CNTXd6H3.js → use-view-mode-Bi795aau.js} +1 -1
  214. package/dist/client/assets/{use-virtual-mcp-wv33_-SX.js → use-virtual-mcp-si-9Oy0A.js} +1 -1
  215. package/dist/client/assets/useInfiniteQuery-C-TpNBma.js +1 -0
  216. package/dist/client/assets/{useRouterState-W11XLSXd.js → useRouterState-DDYcDx6T.js} +1 -1
  217. package/dist/client/assets/useSuspenseInfiniteQuery-DwG4E50W.js +1 -0
  218. package/dist/client/assets/{users-CG11TxHM.js → users-Qkn52nN1.js} +1 -1
  219. package/dist/client/assets/{variant-calendar-YbJ2ipqR.js → variant-calendar-CD2d660u.js} +1 -1
  220. package/dist/client/assets/{view-mode-toggle-dgcz-Fs1.js → view-mode-toggle-SMtwe12N.js} +1 -1
  221. package/dist/client/index.html +1 -1
  222. package/dist/server/cli.js +1 -1
  223. package/dist/server/server.js +1 -1
  224. package/package.json +1 -1
  225. package/dist/client/assets/app-editor-CVIUKWY7.js +0 -1
  226. package/dist/client/assets/automations-4SdYvOdx.js +0 -1
  227. package/dist/client/assets/page-seo-sheet-B0DLHoZV.js +0 -1
  228. package/dist/client/assets/project-app-view-BqKt7pji.js +0 -1
  229. package/dist/client/assets/record-editor-CUTmCbI9.js +0 -1
  230. package/dist/client/assets/redirect-editor-BTOo2ipS.js +0 -1
  231. package/dist/client/assets/registry-Btp_DOOo.js +0 -2
  232. package/dist/client/assets/self-tool-result-nBf7_4aQ.js +0 -1
  233. package/dist/client/assets/store-registry-eGJ8V8iX.js +0 -2
  234. package/dist/client/assets/useInfiniteQuery-Cg8SDgJQ.js +0 -1
  235. package/dist/client/assets/useSuspenseInfiniteQuery-l2LxobU8.js +0 -1
@@ -0,0 +1 @@
1
+ import{Z as Nt,_ as $e,$ as wt,a0 as Et,a1 as lt,n as he,a2 as It,a3 as Tt,r as Q,a4 as Ot,a5 as Rt,a6 as kt,a7 as At,a8 as it,a9 as Lt,aa as Dt,ab as Pt,c as H,l as ie,j as s,B,d as Oe,K as Y,H as be,I as ae,J as Ce,M as ve,i as Ie,m as me,ac as $t,t as Re,v as Pe,p as oe,Q as zt,E as qt,a as Ft}from"./index-ByCUK2oF.js";import{u as ze}from"./use-mcp-client-QAqgV2Yy.js";import{W as ct,g as Kt,S as Ut}from"./constants-D_FQAPnt.js";import{I as qe}from"./integration-icon-BvBPrlHG.js";import{c as fe,a as dt,h as ut,D as mt,d as ft,e as pt}from"./dialog-DmjouGeO.js";import{b as Fe,T as Ke,a as Ue}from"./tooltip-BXQ_C7s1.js";import{i as Me}from"./CheckCircle-BBWqvLWY.js";import{d as ht,f as Mt,g as gt}from"./agent-icon-DHqSUy98.js";import{u as J,t as Qt,m as Gt,s as Ht,g as Vt,p as Bt,F as Wt,b as Yt,a as Zt,c as Xt}from"./companions-core-B1zbGwdW.js";import{F as re,a as je,b as le,c as Ee,d as ce,f as de,e as Jt}from"./form-B-roikQp.js";import{I as _e}from"./input-x4KZ8-AD.js";import{i as es}from"./Check-BUCogM6F.js";import{a as xt}from"./Copy01-DtdfitVc.js";import{i as ts}from"./Settings02-DF0bUEBW.js";import{s as ss}from"./Eye-sYe8-y4w.js";import{u as ns}from"./use-debounced-value-BPD_WjeJ.js";import{f as yt,a as os,p as is}from"./provision-repo-scoped-github-connection-CB4ICKHq.js";import{c as as,e as rs}from"./extract-connection-data-C-xhglh0.js";import{a as ls}from"./authenticate-and-persist-oauth-BvMiNF1a.js";import{i as bt}from"./ArrowUpRight-C32Vjo9y.js";function at(o,e){const t=new Set(e);return o.filter(n=>!t.has(n))}function cs(o,e,t){const n=o.slice(0);return n[e]=t,n}var ds=class extends Nt{#o;#e;#i;#n;#t;#s;#a;#r;#l;#c=[];constructor(o,e,t){super(),this.#o=o,this.#n=t,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,$e.batch(()=>{const t=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=t.length!==i.length,c=i.some((r,f)=>r!==t[f]),u=l||c,p=u?!0:a.some((r,f)=>{const m=this.#e[f];return!m||!wt(r,m)});!u&&!p||(u&&(this.#c=n,this.#t=i),this.#e=a,this.hasListeners()&&(u&&(at(t,i).forEach(r=>{r.destroy()}),at(i,t).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 t=this.#m(o),n=t.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=t.map(a=>a.defaultedQueryOptions.queryHash);return[n,a=>this.#u(a??n,e,i),()=>this.#d(n,t)]}#d(o,e){return e.map((t,n)=>{const i=o[n];return t.defaultedQueryOptions.notifyOnChangeProps?i:t.observer.trackResult(i,a=>{e.forEach(l=>{l.observer.trackProp(a)})})})}#u(o,e,t){if(e){const n=this.#l,i=t!==void 0&&n!==void 0&&(n.length!==t.length||t.some((a,l)=>a!==n[l]));return(!this.#s||this.#e!==this.#r||i||e!==this.#a)&&(this.#a=e,this.#r=this.#e,t!==void 0&&(this.#l=t),this.#s=Et(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 t=[];return o.forEach(n=>{const i=this.#o.defaultQueryOptions(n),l=e.get(i.queryHash)?.shift()??new lt(this.#o,i);t.push({defaultedQueryOptions:i,observer:l})}),t}#f(o,e){const t=this.#t.indexOf(o);t!==-1&&(this.#e=cs(this.#e,t,e),this.#p())}#p(){if(this.hasListeners()){const o=this.#d(this.#e,this.#c),e=this.#h(),t=this.#s,n=e?t:this.#u(o,this.#n?.combine);(e||t!==n)&&$e.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function us({queries:o,...e},t){const n=he(t),i=It(),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=>{Ot(C);const g=n.getQueryCache().get(C.queryHash);Rt(C,a,g)}),kt(a);const[c]=Q.useState(()=>new ds(n,l,e)),[u,p,r]=c.getOptimisticResult(l,e.combine),f=!i&&e.subscribed!==!1;Q.useSyncExternalStore(Q.useCallback(C=>f?c.subscribe($e.batchCalls(C)):At,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Q.useEffect(()=>{c.setQueries(l,e)},[l,e,c]);const h=u.some((C,g)=>it(l[g],C))?u.flatMap((C,g)=>{const d=l[g];if(d&&it(d,C)){const y=new lt(n,d);return Lt(d,y,a)}return[]}):[];if(h.length>0)throw Promise.all(h);const _=u.find((C,g)=>{const d=l[g];return d&&Dt({result:C,errorResetBoundary:a,throwOnError:d.throwOnError,query:n.getQueryCache().get(d.queryHash),suspense:d.suspense})});if(_?.error)throw _.error;return p(r())}function ms(o,e){return us({...o,queries:o.queries.map(t=>({...t,suspense:!0,throwOnError:Pt,enabled:!0,placeholderData:void 0}))},e)}const fs=/^[a-zA-Z][a-zA-Z\d+.-]*:/,ps=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,hs=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,gs=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Te(o){const e=o.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const t=fs.test(e),n=ps.test(e),i=hs.test(e);if(t&&!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||!gs.test(u))?{ok:!1,error:"Enter a valid website URL."}:(l.protocol="https:",{ok:!0,value:l.origin})}function Gn(o,e){if(!o.trim())return!0;const t=Te(o);if(!t.ok||!e)return!1;const n=Te(e);return n.ok&&n.value===t.value}function Hn(o){if(!o)return null;const e=Te(o);return e.ok?new URL(e.value).hostname:null}function xs(o){const e=H.c(14),{children:t,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]!==t||e[4]!==n?(r=s.jsx("div",{ref:u,className:n,children:t}),e[3]=t,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=s.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?(_=s.jsxs("div",{className:p,children:[r,h]}),e[10]=p,e[11]=r,e[12]=h,e[13]=_):_=e[13],_}function rt(o){const e=H.c(38);let t,n,i,a,l;e[0]!==o?({value:l,onChange:n,placeholder:i,className:t,...a}=o,e[0]=o,e[1]=t,e[2]=n,e[3]=i,e[4]=a,e[5]=l):(t=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(R){console.error("Failed to copy text: ",R)}},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]!==t?(g=ie("pr-20",t),e[10]=t,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=s.jsx(_e,{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?s.jsx(ts,{size:16}):s.jsx(ss,{size:16}),e[19]=c,e[20]=v):v=e[20];let x;e[21]!==y||e[22]!==v||e[23]!==_?(x=s.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?s.jsx(es,{size:16}):s.jsx(xt,{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=s.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=s.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=s.jsxs("div",{className:"relative",children:[d,N]}),e[35]=N,e[36]=d,e[37]=O):O=e[37],O}function Qe(o){const e=H.c(19),{card:t,selfClient:n,org:i,onDone:a,onError:l}=o,c=he();let u;e[0]!==t||e[1]!==n?(u=async g=>{const d={...t.configurationState??{},...g};await n.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:t.linkedConnectionId||t.candidateConnectionId,data:{configuration_state:d}}})},e[0]=t,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=Oe(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 ys=be({accountName:ae().min(1,"Informe o nome da conta"),appKey:ae().optional(),appToken:ae().optional()});function bs(o){const e=H.c(63),{card:t,selfClient:n,org:i,onDone:a,onIsPendingChange:l}=o;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=Ce(ys),e[0]=c):c=e[0];const u=t.configurationState?.accountName||"",p=t.configurationState?.appKey||"",r=t.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=ve(f);let h;e[5]!==t.configurationState?.accountName||e[6]!==t.configurationState?.appKey||e[7]!==t.configurationState?.appToken||e[8]!==m?(h=()=>{m.reset({accountName:t.configurationState?.accountName||"",appKey:t.configurationState?.appKey||"",appToken:t.configurationState?.appToken||""})},e[5]=t.configurationState?.accountName,e[6]=t.configurationState?.appKey,e[7]=t.configurationState?.appToken,e[8]=m,e[9]=h):h=e[9];let _;e[10]!==t.configurationState||e[11]!==m?(_=[t.configurationState,m],e[10]=t.configurationState,e[11]=m,e[12]=_):_=e[12],Q.useEffect(h,_);let C;e[13]!==t||e[14]!==a||e[15]!==i||e[16]!==n?(C={card:t,selfClient:n,org:i,onDone:a},e[13]=t,e[14]=a,e[15]=i,e[16]=n,e[17]=C):C=e[17];const{save:g,isPending:d,error:y}=Qe(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 s.jsxs(le,{children:[s.jsx(Ee,{children:"Nome da conta"}),s.jsx(ce,{children:s.jsx(_e,{placeholder:"Nome da sua conta VTEX",...F,disabled:d})}),s.jsx(de,{})]})},e[27]=d,e[28]=j):j=e[28];let b;e[29]!==m.control||e[30]!==j?(b=s.jsx(re,{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 s.jsxs(le,{children:[s.jsx(Ee,{children:"App Key (opcional)"}),s.jsx(ce,{children:s.jsx(rt,{placeholder:"App Key da VTEX",...F,disabled:d})}),s.jsx(de,{})]})},e[32]=d,e[33]=N):N=e[33];let O;e[34]!==m.control||e[35]!==N?(O=s.jsx(re,{control:m.control,name:"appKey",render:N}),e[34]=m.control,e[35]=N,e[36]=O):O=e[36];let R;e[37]!==d?(R=D=>{const{field:F}=D;return s.jsxs(le,{children:[s.jsx(Ee,{children:"App Token (opcional)"}),s.jsx(ce,{children:s.jsx(rt,{placeholder:"App Token da VTEX",...F,disabled:d})}),s.jsx(de,{})]})},e[37]=d,e[38]=R):R=e[38];let w;e[39]!==m.control||e[40]!==R?(w=s.jsx(re,{control:m.control,name:"appToken",render:R}),e[39]=m.control,e[40]=R,e[41]=w):w=e[41];let T;e[42]!==m||e[43]!==b||e[44]!==O||e[45]!==w?(T=s.jsxs(je,{...m,children:[b,O,w]}),e[42]=m,e[43]=b,e[44]=O,e[45]=w,e[46]=T):T=e[46];let L;e[47]!==y?(L=y&&s.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=s.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?($=s.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=s.jsxs(fe,{className:"pt-4",children:[P,$]}),e[55]=P,e[56]=$,e[57]=q):q=e[57];let M;return e[58]!==S||e[59]!==T||e[60]!==L||e[61]!==q?(M=s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[T,L,q]}),e[58]=S,e[59]=T,e[60]=L,e[61]=q,e[62]=M):M=e[62],M}function Ge(o){const e=H.c(29),{options:t,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]!==t||e[1]!==f||e[2]!==n){const j=f.trim().toLowerCase();h=j?t.filter(b=>b.label.toLowerCase().includes(j)):t,_=h.map(Cs),C=_.includes(n)?n:_[0]??"",e[0]=t,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,R=_.indexOf(O),w=_.length;if(w===0)return;let T;b.key==="ArrowDown"||b.key==="ArrowRight"?T=(R+1)%w:b.key==="ArrowUp"||b.key==="ArrowLeft"?T=(R-1+w)%w:b.key==="Home"?T=0:T=w-1;const L=_[T];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:s.jsxs("div",{className:"relative",children:[s.jsx(ht,{size:16,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx(_e,{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?s.jsx("div",{className:"px-2 py-2 text-sm text-muted-foreground",children:"Nenhum resultado"}):h.map(j=>{const b=j.value===n;return s.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:[s.jsx("span",{className:"truncate",children:j.label}),b?s.jsx(Me,{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=s.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=s.jsxs("div",{className:"space-y-2",children:[v,E]}),e[26]=v,e[27]=E,e[28]=S):S=e[28],S}function Cs(o){return o.value}function He(o){const e=H.c(16),{label:t,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=s.jsx(Ie,{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]!==t||e[10]!==f?(m=s.jsx("span",{className:f,children:t}),e[9]=t,e[10]=f,e[11]=m):m=e[11];let h;return e[12]!==u||e[13]!==r||e[14]!==m?(h=s.jsxs("span",{className:u,children:[r,m]}),e[12]=u,e[13]=r,e[14]=m,e[15]=h):h=e[15],h}const vs=be({propertyId:ae().min(1,"Selecione uma propriedade")});function js(o){const e=H.c(68),{card:t,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 k=await i.callTool({name:"get-account-summaries",arguments:{}}),I=J(k);return Qt(I)},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=me(m);let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=Ce(vs),e[8]=_):_=e[8];const C=t.configurationState?.propertyId||"";let g;e[9]!==C?(g={resolver:_,defaultValues:{propertyId:C}},e[9]=C,e[10]=g):g=e[10];const d=ve(g);let y;e[11]!==t||e[12]!==c||e[13]!==l||e[14]!==a?(y={card:t,selfClient:a,org:l,onDone:c},e[11]=t,e[12]=c,e[13]=l,e[14]=a,e[15]=y):y=e[15];const{save:v,isPending:x,error:E}=Qe(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 k;e[23]!==v?(k=async I=>{v(I)},e[23]=v,e[24]=k):k=e[24],b=d.handleSubmit(k),e[20]=d,e[21]=v,e[22]=b}else b=e[22];const N=b;if(h.isLoading){let k;return e[25]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:s.jsx(He,{label:"Carregando propriedades..."})}),e[25]=k):k=e[25],k}if(h.isError){let k;return e[26]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"space-y-4",children:s.jsx("p",{className:"text-sm text-destructive",children:"Não foi possível carregar as propriedades do Google Analytics."})}),e[26]=k):k=e[26],k}let O;e[27]!==h.data?(O=h.data||[],e[27]=h.data,e[28]=O):O=e[28];const R=O;if(R.flatMap(Ss).length===0){let k;e[29]===Symbol.for("react.memo_cache_sentinel")?(k=s.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]=k):k=e[29];let I;e[30]!==u?(I=u?s.jsx("button",{type:"button",onClick:u,className:"text-xs text-muted-foreground underline underline-offset-2 hover:text-destructive",children:"Desconectar conta"}):s.jsx("span",{}),e[30]=u,e[31]=I):I=e[31];let G;e[32]!==c?(G=s.jsx(B,{type:"button",variant:"outline",onClick:c,children:"Fechar"}),e[32]=c,e[33]=G):G=e[33];let Z;return e[34]!==I||e[35]!==G?(Z=s.jsxs("div",{className:"space-y-4",children:[k,s.jsxs(fe,{className:"flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[I,G]})]}),e[34]=I,e[35]=G,e[36]=Z):Z=e[36],Z}let T;e[37]!==x||e[38]!==R?(T=k=>{const{field:I}=k;return s.jsxs(le,{children:[s.jsx(ce,{children:s.jsx(Ge,{options:R.flatMap(_s),value:I.value,onChange:I.onChange,disabled:x,ariaLabel:"Propriedade do Google Analytics"})}),s.jsx(de,{})]})},e[37]=x,e[38]=R,e[39]=T):T=e[39];let L;e[40]!==d.control||e[41]!==T?(L=s.jsx(re,{control:d.control,name:"propertyId",render:T}),e[40]=d.control,e[41]=T,e[42]=L):L=e[42];let P;e[43]!==d||e[44]!==L?(P=s.jsx(je,{...d,children:L}),e[43]=d,e[44]=L,e[45]=P):P=e[45];let K;e[46]!==E?(K=E&&s.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?s.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"}):s.jsx("span",{}),e[48]=x,e[49]=u,e[50]=$):$=e[50];let q;e[51]!==x||e[52]!==c?(q=s.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=s.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=s.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=s.jsxs(fe,{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=s.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 _s(o){return o.options}function Ss(o){return o.options}const Ns=be({siteUrl:ae().min(1,"Selecione um site")});function ws(o){const e=H.c(62),{card:t,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 I=await i.callTool({name:"list_sites",arguments:{}});return J(I).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=me(m);let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=Ce(Ns),e[8]=_):_=e[8];const C=t.configurationState?.siteUrl||"";let g;e[9]!==C?(g={resolver:_,defaultValues:{siteUrl:C}},e[9]=C,e[10]=g):g=e[10];const d=ve(g);let y;e[11]!==t||e[12]!==u||e[13]!==l||e[14]!==a?(y={card:t,selfClient:a,org:l,onDone:u},e[11]=t,e[12]=u,e[13]=l,e[14]=a,e[15]=y):y=e[15];const{save:v,isPending:x,error:E}=Qe(y),S=Q.useRef(!1),j=t.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,R;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 I=Gt(c,h.data??[]);I&&d.setValue("siteUrl",I)}}},R=[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]=R):(O=e[25],R=e[26]),Q.useEffect(O,R);let w;if(e[27]!==d||e[28]!==v){let I;e[30]!==v?(I=async G=>{v(G)},e[30]=v,e[31]=I):I=e[31],w=d.handleSubmit(I),e[27]=d,e[28]=v,e[29]=w}else w=e[29];const T=w;if(h.isLoading){let I;return e[32]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:s.jsx(He,{label:"Carregando sites..."})}),e[32]=I):I=e[32],I}if(h.isError){let I;return e[33]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("div",{className:"space-y-4",children:s.jsx("p",{className:"text-sm text-destructive",children:"Não foi possível carregar os sites do Google Search Console."})}),e[33]=I):I=e[33],I}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 I;return e[36]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("div",{className:"space-y-4",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum site verificado foi encontrado. Verifique um site no Google Search Console."})}),e[36]=I):I=e[36],I}let K;e[37]!==x||e[38]!==P?(K=I=>{const{field:G}=I;return s.jsxs(le,{children:[s.jsx(ce,{children:s.jsx(Ge,{options:P.map(Es),value:G.value,onChange:G.onChange,disabled:x,ariaLabel:"Site verificado"})}),s.jsx(de,{})]})},e[37]=x,e[38]=P,e[39]=K):K=e[39];let $;e[40]!==d.control||e[41]!==K?($=s.jsx(re,{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=s.jsx(je,{...d,children:$}),e[43]=d,e[44]=$,e[45]=q):q=e[45];let M;e[46]!==E?(M=E&&s.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=s.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=s.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=s.jsxs(fe,{className:"pt-4",children:[D,z]}),e[54]=D,e[55]=z,e[56]=U):U=e[56];let k;return e[57]!==T||e[58]!==q||e[59]!==M||e[60]!==U?(k=s.jsxs("form",{onSubmit:T,className:"space-y-4",children:[q,M,U]}),e[57]=T,e[58]=q,e[59]=M,e[60]=U,e[61]=k):k=e[61],k}function Es(o){return{value:o.siteUrl,label:o.siteUrl}}function Is(o){const[e,t]=o.split("/");return!e||!t?null:{owner:e,name:t}}function Ts(o){const{existingRepo:e,owner:t,name:n}=o;return e?.connectionId&&e.owner.toLowerCase()===t.toLowerCase()&&e.name.toLowerCase()===n.toLowerCase()?{connectionId:e.connectionId,installationId:e.installationId}:null}function Os(o){const{existingRepo:e,existingConnections:t,repoConnectionId:n}=o,i=e?.connectionId&&e.connectionId!==n?e.connectionId:void 0,a=[...t.filter(l=>l.connection_id!==n&&l.connection_id!==i),{connection_id:n,selected_tools:[]}];return{staleConnectionId:i,mergedConnections:a}}const Rs=be({githubRepo:ae().min(1,"Selecione um repositório")}),ks=15e3,As=/^[\w.-]+\/[\w.-]+$/;async function Ls(o,e,t,n){const{installations:i}=await yt(o,t),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(ks)}),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 Ds(o){const e=H.c(89),{connectionId:t,companionClient:n,selfClient:i,org:a,onDone:l,onIsPendingChange:c}=o,u=he();let p;e[0]!==a.id?(p=ct.COMMERCE_DISCOVERY(a.id),e[0]=a.id,e[1]=p):p=e[1];const r=p,[f,m]=Q.useState(""),h=ns(f,300),_=Q.useRef(!1);let C;e[2]!==t||e[3]!==a.id?(C=Y.commerceDiscoveryCompanionGithubSelected(a.id,t),e[2]=t,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=me(d);let v;e[11]!==t||e[12]!==h||e[13]!==a.id?(v=Y.commerceDiscoveryCompanionGithubRepos(a.id,t,h.trim()),e[11]=t,e[12]=h,e[13]=a.id,e[14]=v):v=e[14];let x;e[15]!==n||e[16]!==t||e[17]!==h||e[18]!==i?(x=()=>Ls(W=>i.callTool(W),n,t,h),e[15]=n,e[16]=t,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=me(E);let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:Ce(Rs),defaultValues:{githubRepo:""}},e[23]=j):j=e[23];const b=ve(j);let N;e[24]!==r||e[25]!==n||e[26]!==t||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}}),jt={...J(se).item?.configuration_state??null??{},github_repo:W};await i.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:r,data:{configuration_state:jt}}});const Ze=Is(W);if(!Ze)throw new Error(`Repositório inválido: "${W}". Use o formato owner/nome.`);const{owner:ge,name:ke}=Ze,Xe=Kt(a.id),Je=J(await i.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:Xe}})).item,et=Je?.metadata?.githubRepo,_t=Je?.connections??[],tt=Ts({existingRepo:et,owner:ge,name:ke});let Ne=tt?.connectionId,Ae=tt?.installationId,Le;if(!Ne){const{installations:De}=await yt(xe=>i.callTool(xe),t),we=os(De,ge);if(!we)throw new Error(`Nenhuma instalação do GitHub encontrada para "${ge}".`);Ae=we.installationId;const nt=J(await i.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}})).item;if(!nt)throw new Error("Conexão do GitHub não encontrada.");const{childConnectionId:ot}=await is({orgSlug:a.slug,sourceConnection:nt,installationId:Ae,owner:ge,repo:ke,githubCallTool:xe=>n.callTool(xe),selfCallTool:xe=>i.callTool(xe)});Ne=ot,Le=ot}const{staleConnectionId:st,mergedConnections:St}=Os({existingRepo:et,existingConnections:_t,repoConnectionId:Ne});try{await i.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:Xe,data:{connections:St,metadata:{githubRepo:{owner:ge,name:ke,url:`https://github.com/${W}`,installationId:Ae,connectionId:Ne}}}}}),st&&await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:st,force:!0}}).catch(zs)}catch(De){const we=De;throw Le&&await i.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:Le,force:!0}}).catch($s),we}},e[24]=r,e[25]=n,e[26]=t,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)}),$t(u,a.id),l()},e[31]=r,e[32]=l,e[33]=a.id,e[34]=u,e[35]=O):O=e[35];let R;e[36]!==O||e[37]!==N?(R={mutationFn:N,onSuccess:O},e[36]=O,e[37]=N,e[38]=R):R=e[38];const w=Oe(R),T=w.isPending;let L,P;e[39]!==T||e[40]!==c?(L=()=>{c?.(T)},P=[T,c],e[39]=T,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&&As.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 k=U>0&&F===U,I=S.isError||k?"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=s.jsx(ht,{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]!==T||e[64]!==f?(X=s.jsxs("div",{className:"relative",children:[G,s.jsx(_e,{type:"text",value:f,onChange:Z,disabled:T,placeholder:"Buscar repositório","aria-label":"Buscar repositório",className:"h-8 pl-8"})]}),e[63]=T,e[64]=f,e[65]=X):X=e[65];let ee;e[66]!==b||e[67]!==T||e[68]!==z||e[69]!==S.isLoading||e[70]!==I?(ee=S.isLoading?s.jsx("div",{className:"flex min-h-[160px] items-center justify-center",children:s.jsx(He,{label:"Carregando repositórios..."})}):s.jsxs(s.Fragment,{children:[I&&s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:I}),z.length===0?!I&&s.jsx("p",{className:"text-sm text-muted-foreground",children:"Nenhum repositório encontrado. Digite o nome do repositório (owner/nome) para buscar."}):s.jsx(je,{...b,children:s.jsx(re,{control:b.control,name:"githubRepo",render:W=>{const{field:se}=W;return s.jsxs(le,{children:[s.jsx(ce,{children:s.jsx(Ge,{options:z.map(Ps),value:se.value,onChange:se.onChange,disabled:T,ariaLabel:"Repositório",hideSearch:!0})}),s.jsx(de,{})]})}})})]}),e[66]=b,e[67]=T,e[68]=z,e[69]=S.isLoading,e[70]=I,e[71]=ee):ee=e[71];let V;e[72]!==w.error?(V=w.error&&s.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]!==T||e[75]!==l?(A=s.jsx(B,{type:"button",variant:"outline",onClick:l,disabled:T,children:"Cancelar"}),e[74]=T,e[75]=l,e[76]=A):A=e[76];const te=T?"Salvando...":"Salvar";let ne;e[77]!==T||e[78]!==te?(ne=s.jsx(B,{type:"submit",disabled:T,children:te}),e[77]=T,e[78]=te,e[79]=ne):ne=e[79];let ue;e[80]!==A||e[81]!==ne?(ue=s.jsxs(fe,{className:"pt-4",children:[A,ne]}),e[80]=A,e[81]=ne,e[82]=ue):ue=e[82];let Se;return e[83]!==D||e[84]!==X||e[85]!==ee||e[86]!==V||e[87]!==ue?(Se=s.jsxs("form",{onSubmit:D,className:"space-y-4",children:[X,ee,V,ue]}),e[83]=D,e[84]=X,e[85]=ee,e[86]=V,e[87]=ue,e[88]=Se):Se=e[88],Se}function Ps(o){return{value:o,label:o}}function $s(){}function zs(){}const qs={vtex:bs,"google-analytics":js,"google-search-console":ws,github:Ds},pe="deco-reader@decocms.iam.gserviceaccount.com",Ct={"google-analytics":"ga4","google-search-console":"gsc"},vt={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 ${pe} 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 ${pe} e escolha permissão Completa.`,"Copie o endereço do site como aparece no seletor de propriedades e cole abaixo."]}};function Fs(o,e){const t=vt[o].label;switch(e){case"no-access":return{title:`Ainda não conseguimos acessar este recurso no ${t}.`,steps:o==="ga4"?[`Confirme que ${pe} 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 ${pe} 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 Ks(o){const e=H.c(76),{provider:t,siteUrl:n,selfClient:i,org:a,initialResourceId:l,onDone:c,onIsPendingChange:u,onOAuthInstead:p}=o,r=vt[t],f=he(),[m,h]=Q.useState(null);let _,C;if(e[0]!==r.resourceLabel){const V=be({resourceId:ae().trim().min(1,`Informe o ${r.resourceLabel.toLowerCase()}`)});C=ve,_=Ce(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]!==t||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:t,resourceId:V.resourceId}});return J(A)},e[8]=t,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]!==t||e[19]!==f||e[20]!==n?(j=async V=>{if(V.ok){h(null),Re.success(`${r.label} conectado`),n&&await f.invalidateQueries({queryKey:Y.commerceDiscoveryConnectionStatus(a.id,n)}),c();return}h({...Fs(t,V.reason??"unknown"),detail:V.detail})},e[15]=r.label,e[16]=c,e[17]=a,e[18]=t,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=Oe(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 R=O,w=N.isPending,T=Qs;let L;e[32]!==r.connectSteps?(L=r.connectSteps.map(Ms),e[32]=r.connectSteps,e[33]=L):L=e[33];let P;e[34]!==L?(P=s.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=s.jsx("code",{className:"min-w-0 flex-1 truncate text-xs text-foreground",children:pe}),e[36]=K):K=e[36];let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($=s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/40 p-2",children:[K,s.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:T,"aria-label":"Copiar e-mail do service account",children:s.jsx(xt,{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 s.jsxs(le,{children:[s.jsx(Ee,{children:r.resourceLabel}),s.jsx(ce,{children:s.jsx(_e,{...A,placeholder:r.resourcePlaceholder,disabled:w,autoComplete:"off"})}),s.jsx(Jt,{children:r.resourceHint}),s.jsx(de,{})]})},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=s.jsx(re,{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=s.jsx(je,{...v,children:M}),e[46]=v,e[47]=M,e[48]=D):D=e[48];let F;e[49]!==m?(F=m&&s.jsxs("div",{role:"alert",className:"space-y-2 rounded-lg border border-destructive/40 bg-destructive/5 p-3",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:m.title}),s.jsx("ol",{className:"space-y-1 text-sm text-muted-foreground",children:m.steps.map(Us)})]}),e[49]=m,e[50]=F):F=e[50];let z;e[51]!==N.error||e[52]!==N.isError?(z=N.isError&&s.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?s.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"}):s.jsx("span",{}),e[54]=w,e[55]=p,e[56]=U):U=e[56];let k;e[57]!==w||e[58]!==c?(k=s.jsx(B,{type:"button",variant:"outline",onClick:c,disabled:w,children:"Cancelar"}),e[57]=w,e[58]=c,e[59]=k):k=e[59];const I=w?"Verificando...":"Vincular";let G;e[60]!==w||e[61]!==I?(G=s.jsx(B,{type:"submit",disabled:w,children:I}),e[60]=w,e[61]=I,e[62]=G):G=e[62];let Z;e[63]!==k||e[64]!==G?(Z=s.jsxs("div",{className:"flex gap-2",children:[k,G]}),e[63]=k,e[64]=G,e[65]=Z):Z=e[65];let X;e[66]!==U||e[67]!==Z?(X=s.jsxs(fe,{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]!==R||e[70]!==P||e[71]!==D||e[72]!==F||e[73]!==z||e[74]!==X?(ee=s.jsxs("form",{onSubmit:R,className:"space-y-4",children:[P,$,D,F,z,X]}),e[69]=R,e[70]=P,e[71]=D,e[72]=F,e[73]=z,e[74]=X,e[75]=ee):ee=e[75],ee}function Us(o){return s.jsxs("li",{className:"flex gap-2",children:[s.jsx("span",{"aria-hidden":!0,children:"•"}),s.jsx("span",{children:o})]},o)}function Ms(o,e){return s.jsxs("li",{className:"flex gap-2",children:[s.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}),s.jsx("span",{children:o})]},o)}function Qs(){navigator.clipboard?.writeText(pe),Re.success("E-mail copiado")}function Gs(){const o=H.c(2);let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"size-9 shrink-0 animate-pulse rounded-lg bg-muted/60"}),o[0]=e):e=o[0];let t;return o[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.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,s.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[s.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted/60"}),s.jsx("div",{className:"hidden h-3 w-full animate-pulse rounded bg-muted/60 sm:block"})]}),s.jsx("div",{className:"h-8 w-20 shrink-0 animate-pulse rounded-lg bg-muted/60 sm:mt-auto sm:w-full"})]}),o[1]=t):t=o[1],t}const Hs="rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground";function Vs(o){const e=H.c(36),{card:t,connecting:n,disconnecting:i,disabled:a,onConnect:l,onDisconnect:c,org:u,selfClient:p,siteUrl:r,autoOpenConfigFieldKey:f,onAutoOpenConfigHandled:m}=o,h=t.linkedConnectionId,_=Ct[t.bindingType],C=!!_&&t.boundVia!=="oauth";let g;e[0]!==f||e[1]!==t||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&&_?s.jsx(Bs,{card:t,provider:_,org:u,selfClient:p,siteUrl:r,onOAuthInstead:l,disabled:a,connecting:n}):t.satisfied&&h?s.jsxs("div",{className:"flex items-center justify-end gap-1 sm:justify-start",children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(Me,{size:16,className:"text-success"})," Conectado"]}),s.jsx(Q.Suspense,{fallback:s.jsx(Ws,{}),children:s.jsx(Ys,{card:t,org:u,selfClient:p,connectionId:h,contextSiteUrl:r,autoOpen:Ht({autoOpenFieldKey:f,card:t}),onAutoOpenHandled:m})}),s.jsxs(Fe,{children:[s.jsx(Ke,{asChild:!0,children:s.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 ${t.title}`,children:i?s.jsx(Ie,{size:16,className:"animate-spin"}):s.jsx(Mt,{size:16})})}),s.jsx(Ue,{children:"Desconectar"})]})]}):s.jsx(B,{type:"button",variant:"outline",size:"sm",className:"sm:w-full",disabled:a||n,onClick:l,"aria-label":`Conectar ${t.title}`,children:n?s.jsx(Ie,{size:16,className:"animate-spin"}):"Conectar"}),e[0]=f,e[1]=t,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]!==t.icon||e[16]!==t.title?(y=s.jsx(qe,{icon:t.icon,name:t.title,size:"sm",fit:"contain",className:"shrink-0 p-1.5"}),e[15]=t.icon,e[16]=t.title,e[17]=y):y=e[17];let v;e[18]!==t.area?(v=t.area&&s.jsx("span",{className:ie("hidden sm:inline-block",Hs),children:t.area}),e[18]=t.area,e[19]=v):v=e[19];let x;e[20]!==y||e[21]!==v?(x=s.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]!==t.title?(E=s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),e[23]=t.title,e[24]=E):E=e[24];let S;e[25]!==t.headline?(S=t.headline&&s.jsx("p",{className:"hidden text-sm leading-5 text-muted-foreground sm:mt-0.5 sm:line-clamp-2 sm:block",children:t.headline}),e[25]=t.headline,e[26]=S):S=e[26];let j;e[27]!==E||e[28]!==S?(j=s.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=s.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=s.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 Bs(o){const e=H.c(39),{card:t,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?(_=T=>{!T&&m||f(T)},e[0]=m,e[1]=_):_=e[1];const C=_;let g;e[2]!==t.satisfied||e[3]!==t.title||e[4]!==p||e[5]!==u?(g=t.satisfied?s.jsxs("div",{className:"flex items-center justify-end gap-1 sm:justify-start",children:[s.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[s.jsx(Me,{size:16,className:"text-success"})," Conectado"]}),s.jsxs(Fe,{children:[s.jsx(Ke,{asChild:!0,children:s.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:()=>f(!0),"aria-label":`Configurar ${t.title}`,children:s.jsx(gt,{size:16})})}),s.jsx(Ue,{children:"Editar configuração"})]})]}):s.jsx(B,{type:"button",variant:"outline",size:"sm",className:"sm:w-full",disabled:u||p,onClick:()=>f(!0),"aria-label":`Conectar ${t.title}`,children:p?s.jsx(Ie,{size:16,className:"animate-spin"}):"Conectar"}),e[2]=t.satisfied,e[3]=t.title,e[4]=p,e[5]=u,e[6]=g):g=e[6];let d;e[7]!==t.icon||e[8]!==t.title?(d=s.jsx(qe,{icon:t.icon,name:t.title,size:"md",fit:"contain",className:"p-1.5"}),e[7]=t.icon,e[8]=t.title,e[9]=d):d=e[9];let y;e[10]!==t.title?(y=s.jsx(dt,{children:t.title}),e[10]=t.title,e[11]=y):y=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ut,{children:"Conceda acesso ao nosso leitor e informe o identificador"}),e[12]=v):v=e[12];let x;e[13]!==y?(x=s.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=s.jsxs(mt,{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=t.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]!==t.satisfied||e[20]!==c?(b=t.satisfied?void 0:()=>{f(!1),c()},e[19]=t.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=s.jsx(Ks,{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=s.jsxs(ft,{className:"sm:max-w-lg",children:[E,N]}),e[29]=N,e[30]=E,e[31]=O):O=e[31];let R;e[32]!==C||e[33]!==r||e[34]!==O?(R=s.jsx(pt,{open:r,onOpenChange:C,children:O}),e[32]=C,e[33]=r,e[34]=O,e[35]=R):R=e[35];let w;return e[36]!==R||e[37]!==g?(w=s.jsxs(s.Fragment,{children:[g,R]}),e[36]=R,e[37]=g,e[38]=w):w=e[38],w}function Ws(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"size-8 shrink-0 animate-pulse rounded-lg bg-muted/60"}),o[0]=e):e=o[0],e}function Ys(o){const e=H.c(60),{card:t,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=ze(p),[f,m]=Q.useState(c),[h,_]=Q.useState(!1),C=he(),g=qs[t.bindingType],d=Vt(t.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=I=>{if(!(!I&&h)){if(!I){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]!==t.title||e[14]!==v||e[15]!==n.id||e[16]!==C?(j=async()=>{await C.invalidateQueries({queryKey:Y.commerceDiscoveryCompanionConnectionsPrefix(n.id)}),Re.success(`${t.title} desconectado`),v()},e[13]=t.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:Zs},e[18]=S,e[19]=j,e[20]=b):b=e[20];const N=Oe(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 R=`Configurar ${t.title}`;let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(gt,{size:16}),e[22]=w):w=e[22];let T;e[23]!==R?(T=s.jsx(Ke,{asChild:!0,children:s.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:O,"aria-label":R,children:w})}),e[23]=R,e[24]=T):T=e[24];const L=d.length>0?"Editar configuração":"Configurar";let P;e[25]!==L?(P=s.jsx(Ue,{children:L}),e[25]=L,e[26]=P):P=e[26];let K;e[27]!==T||e[28]!==P?(K=s.jsxs(Fe,{children:[T,P]}),e[27]=T,e[28]=P,e[29]=K):K=e[29];let $;e[30]!==t.icon||e[31]!==t.title?($=s.jsx(qe,{icon:t.icon,name:t.title,size:"md",fit:"contain",className:"p-1.5"}),e[30]=t.icon,e[31]=t.title,e[32]=$):$=e[32];let q;e[33]!==t.title?(q=s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[s.jsx(dt,{children:t.title}),s.jsxs(ut,{children:["Configure o ",t.title," para enriquecer os dados"]})]}),e[33]=t.title,e[34]=q):q=e[34];let M;e[35]!==$||e[36]!==q?(M=s.jsxs(mt,{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]!==t||e[42]!==v||e[43]!==r||e[44]!==a||e[45]!==l||e[46]!==n||e[47]!==i||e[48]!==D?(F=s.jsx(g,{card:t,connectionId:a,companionClient:r,selfClient:i,org:n,contextSiteUrl:l,onDone:v,onDisconnect:D,onIsPendingChange:_}),e[40]=g,e[41]=t,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=s.jsxs(ft,{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=s.jsx(pt,{open:f,onOpenChange:E,children:z}),e[53]=f,e[54]=E,e[55]=z,e[56]=U):U=e[56];let k;return e[57]!==K||e[58]!==U?(k=s.jsxs(s.Fragment,{children:[K,U]}),e[57]=K,e[58]=U,e[59]=k):k=e[59],k}function Zs(){Re.error("Não foi possível desconectar. Tente novamente.")}const Ve={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 Xs(o){const e=H.c(40),{selfClient:t,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=ze(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=me(r),m=f.data?.stateSchema?Bt(f.data.stateSchema):null,h=m&&m.length>0?m:Wt,_=h.map(cn),C=h.map(ln).filter(rn),g=h.filter(an).map(on),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]!==t?(v=async()=>{const A=await t.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:i}});return J(A)},e[15]=i,e[16]=t,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=Pe(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(nn),N=[..._.map(sn),...C.map(tn),...b.map(en)].sort().join(","),R=Pe({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 t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{operator:"or",conditions:A},limit:1e3}});return J(te)}}).data?.items??[],w=new Set(b),T=R.filter(A=>w.has(A.id)),L=T.filter(Js);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=ms({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 T)M[A.id]=!A.oauth_config||!!A.connection_token||q.get(A.id)===!0;const D=Pe({queryKey:Y.commerceDiscoveryCompanionRegistry(n.id,d),queryFn:async()=>{if(h.length===0)return{items:[]};const A=Yt(C,g),te=await as(ct.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 k=!!a;let I;e[31]!==t||e[32]!==a?(I=async()=>{const A=await t.callTool({name:"COMMERCE_DISCOVERY_CONNECTION_STATUS",arguments:{siteUrl:a}});return J(A)},e[31]=t,e[32]=a,e[33]=I):I=e[33];let G;e[34]!==U||e[35]!==k||e[36]!==I?(G={queryKey:U,enabled:k,queryFn:I},e[34]=U,e[35]=k,e[36]=I,e[37]=G):G=e[37];const Z=me(G),X={};for(const[A,te]of Object.entries(Ct)){const ne=Z.data?.providers?.[te];ne?.connected&&ne.via==="sa"&&(X[A]={resource:ne.resource??null})}const ee=Zt({requirements:h,itemsById:F,itemsByName:z,connections:R,connectionReadiness:M,configurationState:S,curated:Ve,saBindings:X});let V;return e[38]!==ee?(V={cards:ee},e[38]=ee,e[39]=V):V=e[39],V}function Js(o){return o.oauth_config&&!o.connection_token}function en(o){return`linked:${o}`}function tn(o){return`app:${o}`}function sn(o){return`binding:${o}`}function nn(o){return typeof o=="string"&&o.length>0}function on(o){return o.bindingType}function an(o){return!Ve[o.bindingType]}function rn(o){return!!o}function ln(o){return Ve[o.bindingType]?.registryAppId}function cn(o){return o.bindingType}function dn({selfClient:o,org:e,userId:t,cdConnectionId:n,domain:i,siteUrl:a}){const l=he(),[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=rs(g.registryItem,e.id,t,{remoteIndex:0}),N=b.connection_type==="STDIO",O=!!b.connection_url,R=N&&b.connection_headers&&typeof b.connection_headers=="object"&&"command"in b.connection_headers;if(!O&&!R)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 ls({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=Xt(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 Be="flex min-h-0 flex-1 flex-col gap-4 md:grid md:flex-none md:gap-4";function We(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.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 un(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[0,1,2,3].map(mn)}),o[0]=e):e=o[0],e}function mn(o){return s.jsx(Gs,{},o)}function fn(){const o=H.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:Be,children:[s.jsx(We,{}),s.jsx(un,{})]}),o[0]=e):e=o[0],e}function pn(o){const e=H.c(5),{onRetry:t}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(We,{}),e[0]=n):n=e[0];let i,a;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("p",{className:"text-sm text-foreground",children:"Não foi possível carregar as integrações complementares."}),a=s.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]!==t?(l=s.jsxs("div",{className:Be,children:[n,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[i,a,s.jsx(B,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:t,children:"Tentar novamente"})]})]}),e[3]=t,e[4]=l):l=e[4],l}function Vn(o){const e=H.c(2);let t;return e[0]!==o?(t=s.jsx(zt,{children:n=>{const{reset:i}=n;return s.jsx(qt,{fallback:a=>{const{resetError:l}=a;return s.jsx(pn,{onRetry:()=>{i(),l()}})},children:s.jsx(Q.Suspense,{fallback:s.jsx(fn,{}),children:s.jsx(hn,{...o})})})}}),e[0]=o,e[1]=t):t=e[1],t}function hn(o){const e=H.c(46),{org:t,cdConnectionId:n,siteUrl:i,onReadinessChange:a}=o,{data:l}=Ft.useSession(),c=l?.user?.id??"";let u;if(e[0]!==i){const R=i?Te(i):null;if(R?.ok)try{u=new URL(R.value).hostname}catch{u=void 0}e[0]=i,e[1]=u}else u=e[1];let p;e[2]!==t.id||e[3]!==t.slug?(p={connectionId:Ut,orgId:t.id,orgSlug:t.slug},e[2]=t.id,e[3]=t.slug,e[4]=p):p=e[4];const r=ze(p);let f;e[5]!==n||e[6]!==t||e[7]!==r||e[8]!==i?(f={selfClient:r,org:t,cdConnectionId:n,siteUrl:i},e[5]=n,e[6]=t,e[7]=r,e[8]=i,e[9]=f):f=e[9];const{cards:m}=Xs(f);let h;e[10]!==n||e[11]!==t||e[12]!==r||e[13]!==u||e[14]!==i||e[15]!==c?(h={selfClient:r,org:t,userId:c,cdConnectionId:n,domain:u,siteUrl:i},e[10]=n,e[11]=t,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}=dn(h),[v,x]=Q.useState(null);if(a?.(m.length===0||m.some(gn)),m.length===0)return null;const E=C!==null||d!==null;let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(We,{}),e[17]=S):S=e[17];let j;e[18]!==y?(j=y&&s.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]!==t||e[28]!==r||e[29]!==i){let R;e[31]!==v||e[32]!==E||e[33]!==_||e[34]!==C||e[35]!==g||e[36]!==d||e[37]!==t||e[38]!==r||e[39]!==i?(R=w=>{const T=async()=>{await _(w)&&x(w.fieldKey)};return s.jsx(Vs,{card:w,connecting:C===w.fieldKey,disconnecting:d===w.fieldKey,disabled:E&&C!==w.fieldKey&&d!==w.fieldKey,org:t,selfClient:r,siteUrl:i,autoOpenConfigFieldKey:v,onAutoOpenConfigHandled:()=>x(L=>L===w.fieldKey?null:L),onConnect:()=>{T()},onDisconnect:()=>{g(w)}},w.fieldKey)},e[31]=v,e[32]=E,e[33]=_,e[34]=C,e[35]=g,e[36]=d,e[37]=t,e[38]=r,e[39]=i,e[40]=R):R=e[40],b=m.map(R),e[20]=v,e[21]=E,e[22]=m,e[23]=_,e[24]=C,e[25]=g,e[26]=d,e[27]=t,e[28]=r,e[29]=i,e[30]=b}else b=e[30];let N;e[41]!==b?(N=s.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=s.jsxs("div",{className:Be,children:[S,s.jsxs(xs,{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 gn(o){return o.satisfied}const Ye="https://decocms.com/agendar",xn="Precisa de ajuda? Fale conosco",yn="Agende uma chamada e ajudamos você a conectar suas ferramentas.",ye=[{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"}],bn="var(--brand-green-dark)";function Bn({siteUrl:o,email:e}){const t=new URL(Ye);return o&&t.searchParams.set("siteUrl",o),e&&t.searchParams.set("email",e),t.toString()}function Cn(o){const e=H.c(12),{href:t,size:n,className:i,orgId:a}=o,l=t===void 0?Ye:t,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=s.jsx(bt,{size:16}),e[4]=r):r=e[4];let f;e[5]!==l||e[6]!==p?(f=s.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=s.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 vn(o){const e=H.c(10),{size:t}=o,n=t===void 0?72:t;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=ye.map((p,r)=>s.jsxs("div",{className:"relative shrink-0",style:{width:n,height:n,marginLeft:r===0?0:-a,zIndex:ye.length-r},children:[s.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:s.jsx("img",{src:p.photo,alt:p.alt,className:"h-full w-full object-cover",loading:"lazy"})}),r===0&&s.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[s.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),s.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=s.jsx("div",{className:"flex items-end",style:l,children:c}),e[7]=l,e[8]=c,e[9]=u):u=e[9],u}function Wn(o){const e=H.c(6),{href:t,orgId:n}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"h-20",style:{backgroundColor:bn}}),e[0]=i):i=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"-mt-9 mb-4",children:s.jsx(vn,{})}),e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:xn}),s.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:yn})]}),e[2]=l):l=e[2];let c;return e[3]!==t||e[4]!==n?(c=s.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:s.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[i,s.jsxs("div",{className:"px-8 pb-8",children:[a,l,s.jsx(Cn,{href:t,size:"lg",className:"mt-6",orgId:n})]})]})}),e[3]=t,e[4]=n,e[5]=c):c=e[5],c}function Yn(o){const e=H.c(13),{className:t,href:n,orgId:i}=o,a=n===void 0?Ye: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]!==t?(c=ie("flex items-center gap-3 rounded-xl border border-border bg-card p-3 card-shadow transition-colors hover:bg-accent",t),e[2]=t,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=ye.map(jn),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=s.jsxs("span",{className:"relative flex shrink-0 items-center",style:u,children:[p,s.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:ye.length+1}})]}),f=s.jsx("span",{className:"flex-1 text-sm font-medium leading-tight text-foreground",children:"Precisa de ajuda? Fale conosco"}),m=s.jsx(bt,{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=s.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 jn(o,e){return s.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:ye.length-e},children:s.jsx("img",{src:o.photo,alt:o.alt,className:"h-full w-full object-cover",loading:"lazy"})},o.photo)}function Zn(o){const e=H.c(10),{host:t}=o,n=`https://www.google.com/s2/favicons?domain=${t}&sz=128`;let i,a,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),a=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),l=s.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=s.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:s.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]!==t?(u=s.jsx("span",{className:"text-lg font-medium text-foreground",children:t}),e[5]=t,e[6]=u):u=e[6];let p;return e[7]!==c||e[8]!==u?(p=s.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 _n(o){return o.content?.find(e=>e.text)?.text??"A configuração do Commerce Discovery falhou."}function Xn(o){const e=o;if(e.isError)throw new Error(_n(e));return e.structuredContent??o}export{fn as C,He as L,Zn as S,xs as a,Bn as b,Wn as c,Vn as d,Yn as e,Gn as i,Te as n,Xn as p,Hn as s};
@@ -1 +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
+ import{c as T,j as t,r as J,B as je,i as be}from"./index-ByCUK2oF.js";import{i as Se}from"./ChevronRight-DEntq04v.js";import{U as fe}from"./agent-icon-DHqSUy98.js";import{A as ue}from"./automation-runs-BeGrCRT7.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-FKw7oGsh.js";import{Z as xe,r as ze}from"./index-XA63zMPz.js";import{a as ge}from"./Tool01-ivvpOFv0.js";import"./AlertCircle-BtNCxiGW.js";import"./UserPlus01-Df111dIO.js";import"./ArrowUp-CXB4gZz7.js";import"./Settings02-DF0bUEBW.js";import"./Tool02-CAm9cuRL.js";import"./XCircle-CIESU6rb.js";import"./ArrowUpRight-C32Vjo9y.js";import"./TrendUp01-CxpitjrX.js";import"./ZapSquare-DRqp83Rm.js";import"./Users03-B8u3RFLN.js";import"./CheckCircle-BBWqvLWY.js";import"./Check-BUCogM6F.js";import"./ChevronDown-DhM0vuwQ.js";import"./ChevronUp-BLxduW0K.js";import"./Circle-CvSguByZ.js";import"./Stars02-C6A52gEe.js";import"./Copy01-DtdfitVc.js";import"./ZoomOut-B6KApjQS.js";import"./DotsVertical-BPezuWGR.js";import"./Globe01-DEC8buek.js";import"./Eye-sYe8-y4w.js";import"./FilterLines-BHZFohrp.js";import"./Flag01-DElJITIO.js";import"./Star01-DvsehzkC.js";import"./Globe04-DS5fT3Vb.js";import"./SwitchHorizontal01-CNIVGz3C.js";import"./HardDrive-CY9dey0e.js";import"./Key01-gY92sLVc.js";import"./LayoutLeft-CkfMYnAT.js";import"./LinkExternal01-BoE2-EL9.js";import"./List-CpWvvN0q.js";import"./Monitor01-DfUPunIk.js";import"./Sun-C6K4KwUc.js";import"./Package-C7xBvhHC.js";import"./Palette-DiMJ8AJU.js";import"./Play-BEJiVCde.js";import"./Plus-BANF27D9.js";import"./SearchLg-Bkv5w7JK.js";import"./SearchMd-mSJ_LN9U.js";import"./Shield01-BmjeaSF4.js";import"./Stars01-CLXnPXMC.js";import"./Trash01-D7mGDVWk.js";import"./Upload01-C1LtRM54.js";import"./User01-D6C_E4ze.js";import"./Users01-BPdb_I4n.js";import"./XClose-CH0_FkoC.js";import"./X-CC6aodtK.js";import"./Zap-DfEKRvFr.js";import"./select-CTBgBJrc.js";import"./tooltip-BXQ_C7s1.js";import"./useInfiniteQuery-C-TpNBma.js";import"./use-infinite-scroll-BgAMbrxc.js";import"./use-connection-BFhD4lzR.js";import"./use-collections-DEQXfLlw.js";import"./use-mcp-client-QAqgV2Yy.js";import"./constants-D_FQAPnt.js";import"./auth-C8KqpST8.js";import"./use-virtual-mcp-si-9Oy0A.js";import"./card-DHaG1O6Q.js";import"./sidebar-DLJnRCYQ.js";import"./use-mobile-DYP8U4Ef.js";import"./table-7YWMKP4X.js";import"./empty-state-BEpp0Iz6.js";import"./use-members-Dnl6C1Z3.js";import"./use-org-auth-client-DoSWUORm.js";import"./use-clock-tick-D282Ajii.js";import"./use-automations-CXGCrc4C.js";import"./studio-tools-CLnkBk4A.js";import"./useSuspenseInfiniteQuery-DwG4E50W.js";import"./badge-Z2tkGGxq.js";import"./checkbox-X9YDScmr.js";import"./command-CMkc8zHG.js";import"./index-BlSrpoWN.js";import"./dialog-DmjouGeO.js";import"./popover-DdRBXCUa.js";import"./avatar-jwDXo9TF.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BpXeuKZe.js";import"./file-type-icon-BFh7vGZh.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-CSR4F4Su.js";import"./index-B0iPjxK8.js";import"./chat-context-IsiTNdGt.js";import"./autosend-C3G-59hV.js";import"./hooks-Bp8t_8iG.js";import"./decopilot-sse-pool-BjnGpLM5.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BzV9mrQh.js";import"./use-decopilot-events-Bz_iOA1x.js";import"./use-organization-settings-CzkAvvqT.js";import"./index-CVBW0D5I.js";import"./shell-layout-BCinI49w.js";import"./alert-dialog-DjH2ftUe.js";import"./required-auth-layout-t6Iidz82.js";import"./use-org-sso-BWY4VyV_.js";import"./integration-icon-BvBPrlHG.js";import"./use-navigate-to-agent-DBK0zHc3.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-jt0JyWiK.js";import"./form-B-roikQp.js";import"./label-BBCu0q0g.js";import"./input-x4KZ8-AD.js";import"./switch-DUORl78q.js";import"./drawer-DPCnfWrW.js";import"./collection-search-ge5aO1gQ.js";import"./tabs-DThRuEa2.js";import"./toggle-group-ov_TGacE.js";import"./use-deco-credits-NDzATbhc.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BJwbJlKh.js";import"./use-registry-connections-BF7kjquX.js";import"./extract-connection-data-C-xhglh0.js";import"./collection-tabs-BDYkItco.js";import"./textarea-Cnq5r4Cc.js";import"./connection-form-helpers-_XjGXgjL.js";import"./authenticate-and-persist-oauth-BvMiNF1a.js";import"./mcp-oauth-COy78u62.js";import"./connect-desktop-dialog-CLlKwdim.js";import"./select-model-CzzSLCq7.js";import"./skeleton-Bd3B7YLL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B6ZcZIQ9.js";import"./dropdown-menu-CNjWF-jg.js";import"./index-rCFHktNC.js";import"./toolbar-BvjhmpR0.js";import"./use-debounced-value-BPD_WjeJ.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Ch30upYM.js";import"./use-mcp-tools-pkSaeOla.js";import"./use-capability-BNDGP512.js";import"./tools-list-BGICvyrw.js";import"./use-debounced-autosave-CG-006NP.js";import"./index-Cgymszdd.js";import"./search-input-DENGWCoB.js";import"./github-repo-picker-D4FoVfzP.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-CMO_kM9T.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-B1zbGwdW.js";import"./index-ChNuMZA1.js";import"./get-initials-D-f_fDFw.js";import"./calendar-DjQq1pZ5.js";import"./toolbar-icon-button-B7VwX87F.js";import"./use-file-configs-DOzRnWn-.js";import"./automation-list-row-CUVN2q9I.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-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
+ 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-ByCUK2oF.js";import{u as T}from"./useRouterState-DDYcDx6T.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-DLJnRCYQ.js";import{a as ee}from"./index-Cgymszdd.js";import{n as se,c as te,a as le,d as re,b as ie,i as E}from"./ZapSquare-DRqp83Rm.js";import{t as oe,a as A}from"./Users03-B8u3RFLN.js";import{i as ne}from"./HardDrive-CY9dey0e.js";import{i as ae}from"./Key01-gY92sLVc.js";import{i as ce}from"./Shield01-BmjeaSF4.js";import{s as me}from"./User01-D6C_E4ze.js";import{i as fe}from"./Zap-DfEKRvFr.js";import{a as de}from"./use-capability-BNDGP512.js";import{u as xe}from"./use-join-requests-BH4dMegH.js";import{u as W}from"./use-mobile-DYP8U4Ef.js";import{u as be}from"./use-status-sounds-Ch30upYM.js";import{T as y}from"./toolbar-BvjhmpR0.js";import{S as ue,M as he}from"./shell-controls-ByIpzFDz.js";import"./LayoutLeft-CkfMYnAT.js";import"./X-CC6aodtK.js";import"./tooltip-BXQ_C7s1.js";import"./studio-tools-CLnkBk4A.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-Bz_iOA1x.js";import"./decopilot-sse-pool-BjnGpLM5.js";import"./backoff-CrEUbyZT.js";import"./toolbar-icon-button-B7VwX87F.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.4"]})}),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.4"]})}),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-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
+ import{c as v,l as N,j as r,r as S}from"./index-ByCUK2oF.js";import{C as w}from"./card-DHaG1O6Q.js";import{i as E}from"./ArrowUpRight-C32Vjo9y.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-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
+ import{c as f,j as a}from"./index-ByCUK2oF.js";import{u as p,m as b,p as d,q as h}from"./sidebar-DLJnRCYQ.js";import{i as u}from"./LayoutLeft-CkfMYnAT.js";import{T as S}from"./toolbar-icon-button-B7VwX87F.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-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};
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-ByCUK2oF.js";import{A as oe}from"./avatar-jwDXo9TF.js";import{t as Se,a as He}from"./Users03-B8u3RFLN.js";import{i as Be}from"./SearchLg-Bkv5w7JK.js";import{i as Ye,s as Je,a as z,n as We}from"./Stars02-C6A52gEe.js";import{s as Ve}from"./XClose-CH0_FkoC.js";import{i as I}from"./CheckCircle-BBWqvLWY.js";import{i as fe}from"./FilterLines-BHZFohrp.js";import{i as G}from"./Zap-DfEKRvFr.js";import{d as Qe,D as Xe,a as Ze,e as et}from"./dialog-DmjouGeO.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-DjH2ftUe.js";import{R as lt}from"./required-auth-layout-t6Iidz82.js";import{A as ct}from"./autosend-C3G-59hV.js";import{m as dt}from"./use-mcp-client-QAqgV2Yy.js";import{a as he,S as ut}from"./constants-D_FQAPnt.js";import{d as mt,c as ft}from"./hooks-Bp8t_8iG.js";import{q as ht}from"./tab-id-BijBBRwE.js";import{e as gt}from"./use-organization-settings-CzkAvvqT.js";import{u as pt}from"./use-org-sso-BWY4VyV_.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.4")));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};