decocms 3.94.0 → 3.94.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/dist/client/assets/{AlertCircle-CVgQ7AOT.js → AlertCircle-DiN5PNxL.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-C9ykLtuj.js → ArrowUpRight-BjAmmqz1.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-H3pWKPYO.js → CheckCircle-CnuxNI5N.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-DO3o3y5M.js → ChevronDown-DjUjI7ZT.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-B7B0rGOG.js → ChevronLeft-lLbYNeaE.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-D_tkXjWo.js → ChevronRight-QnPbpAFs.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-u7VhfB08.js → ChevronUp-DDcyY4lP.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-Cauolc8c.js → DotsVertical-nNi8MPL2.js} +1 -1
  9. package/dist/client/assets/{Eye-C8Vfx0-4.js → Eye-C9Xcteq-.js} +1 -1
  10. package/dist/client/assets/{FilterLines-DmVqY61b.js → FilterLines-Dg7IUTjL.js} +1 -1
  11. package/dist/client/assets/{Globe01-B2Kb3oGL.js → Globe01-BFrZD27Y.js} +1 -1
  12. package/dist/client/assets/{Globe04-yg-G_BoN.js → Globe04-CIm9kMjI.js} +1 -1
  13. package/dist/client/assets/{HardDrive-Ct0X1WYx.js → HardDrive-gwEfMPwy.js} +1 -1
  14. package/dist/client/assets/{Key01-CYbGr3H3.js → Key01-UGjka7-8.js} +1 -1
  15. package/dist/client/assets/{LayoutLeft-hqAstg8m.js → LayoutLeft-9cH5exAu.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-DFDKnuS_.js → LinkExternal01-B7eQGHi-.js} +1 -1
  17. package/dist/client/assets/{Monitor01-CjEGYbhQ.js → Monitor01-DVS9ezxf.js} +1 -1
  18. package/dist/client/assets/{Palette-BrlikOjU.js → Palette-T8Kt-mN9.js} +1 -1
  19. package/dist/client/assets/{Play-DsnYqyFF.js → Play-C6GLqD32.js} +1 -1
  20. package/dist/client/assets/{Plus-BCyb-AcQ.js → Plus-_eqCuzKq.js} +1 -1
  21. package/dist/client/assets/{SearchMd-pgxE25ht.js → SearchMd-mD6Ay2_2.js} +1 -1
  22. package/dist/client/assets/{Settings02-BVbp_ypE.js → Settings02--ds2DgAs.js} +1 -1
  23. package/dist/client/assets/{Shield01-CDrsrKsk.js → Shield01-CCDRrSJj.js} +1 -1
  24. package/dist/client/assets/{Star01-BQYePq21.js → Star01-_A6IWzfx.js} +1 -1
  25. package/dist/client/assets/{Stars01-BYz6LBgx.js → Stars01-BqxzzW0i.js} +1 -1
  26. package/dist/client/assets/{Stars02-DToeu8SC.js → Stars02-C1UT1VVg.js} +1 -1
  27. package/dist/client/assets/{Sun-Ct9UUaO-.js → Sun-sjbshFON.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-CUGpid9A.js → SwitchHorizontal01-D1Th0ly2.js} +1 -1
  29. package/dist/client/assets/{Tool01-qCeqaIYR.js → Tool01-Bm3M6NoB.js} +1 -1
  30. package/dist/client/assets/{Trash01-BQ-tGqiC.js → Trash01-DbUKlIo5.js} +1 -1
  31. package/dist/client/assets/{Upload01-D4__IfBX.js → Upload01-BMDi_b3F.js} +1 -1
  32. package/dist/client/assets/{User01-CxCzzEeX.js → User01-DZEkuBTV.js} +1 -1
  33. package/dist/client/assets/{Users01-Cw-lssyZ.js → Users01-Bx1kyCMQ.js} +1 -1
  34. package/dist/client/assets/{Users03-BfmtQGSl.js → Users03-GYv7mrmw.js} +1 -1
  35. package/dist/client/assets/{X-CiAMFEWO.js → X-D_fWZW_l.js} +1 -1
  36. package/dist/client/assets/{XCircle-CoU_Hwe9.js → XCircle-CHDEEtEA.js} +1 -1
  37. package/dist/client/assets/{XClose-BEAZpPEi.js → XClose-YfgGVuLX.js} +1 -1
  38. package/dist/client/assets/{Zap-BZ2VPUiO.js → Zap-BHyU9C4-.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-DiyzHRy2.js → ZapSquare-CueUsJjX.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-DV_1o0PM.js → ZoomOut-Cf_spvIb.js} +1 -1
  41. package/dist/client/assets/{access-gate-COlpF0HW.js → access-gate-DCFWYXX8.js} +1 -1
  42. package/dist/client/assets/{add-section-modal-CT6eQ2rC.js → add-section-modal-DZQu-zLX.js} +1 -1
  43. package/dist/client/assets/{agent-icon-NQ_Mk8_8.js → agent-icon-yP9sr5R9.js} +1 -1
  44. package/dist/client/assets/{agents-list-Co2Ggucu.js → agents-list-B23VydJN.js} +1 -1
  45. package/dist/client/assets/{ai-providers-CFpS67kU.js → ai-providers-CJVf-P8A.js} +1 -1
  46. package/dist/client/assets/{alert-BHi_IhB_.js → alert-IQpHoeix.js} +1 -1
  47. package/dist/client/assets/{alert-dialog-BN65AiTi.js → alert-dialog-Dc3DtcSF.js} +1 -1
  48. package/dist/client/assets/{app-editor-CVsSmOXB.js → app-editor-BpSrHNfJ.js} +1 -1
  49. package/dist/client/assets/{auth-BFkL4ufW.js → auth-ZfvkJMyI.js} +1 -1
  50. package/dist/client/assets/{auth-catchall-B7BFjX4w.js → auth-catchall-DUmmUKFy.js} +1 -1
  51. package/dist/client/assets/{auth-entry-COL91flc.js → auth-entry-DYzk1Gu_.js} +1 -1
  52. package/dist/client/assets/{auth-split-layout-BKBH2tBP.js → auth-split-layout-DEcwX6Eu.js} +1 -1
  53. package/dist/client/assets/{authenticate-and-persist-oauth-DOKW32kF.js → authenticate-and-persist-oauth-CaRJxoQM.js} +1 -1
  54. package/dist/client/assets/{automation-list-row-Dq2Md0L2.js → automation-list-row-B3pvC-mo.js} +1 -1
  55. package/dist/client/assets/{automation-runs-DxeqbBMl.js → automation-runs-r89Y4nSY.js} +1 -1
  56. package/dist/client/assets/{automations-RKi2obC6.js → automations-DbhX4Tep.js} +1 -1
  57. package/dist/client/assets/{avatar-Oz8Lqgg4.js → avatar-Xx6WG8hL.js} +1 -1
  58. package/dist/client/assets/{badge-ho6xrCP4.js → badge-CGez4o7S.js} +1 -1
  59. package/dist/client/assets/{block-document-nMujhCPS.js → block-document-Dogd3JoF.js} +1 -1
  60. package/dist/client/assets/{brand-context-DcWPjFjP.js → brand-context-DT1WZQJx.js} +1 -1
  61. package/dist/client/assets/{buckets-P0twp-Lm.js → buckets-Csybwk3V.js} +1 -1
  62. package/dist/client/assets/{capability-load-error-DFTjyVYx.js → capability-load-error-CNOWHwg5.js} +1 -1
  63. package/dist/client/assets/{card-PDEPm9MW.js → card-B13o0f5w.js} +1 -1
  64. package/dist/client/assets/{category-editor-DvGGcAON.js → category-editor-DUlVawWA.js} +1 -1
  65. package/dist/client/assets/{chat-context-JTwjeHTY.js → chat-context-xREAp4B7.js} +1 -1
  66. package/dist/client/assets/{checkbox-DiUfEdXJ.js → checkbox-Bt0kAhDE.js} +1 -1
  67. package/dist/client/assets/{cli-auth-success-v2tuS2CA.js → cli-auth-success-xfTT4Fwk.js} +1 -1
  68. package/dist/client/assets/{collection-detail-BexHPDmG.js → collection-detail-BDnt03xe.js} +1 -1
  69. package/dist/client/assets/{collection-display-button-DRtWEjmQ.js → collection-display-button-VzeMJl0p.js} +1 -1
  70. package/dist/client/assets/{collection-search-DFAr6GQp.js → collection-search-CkNrHX6K.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-Lxahjwi-.js → collection-tabs-BfkNqcSd.js} +1 -1
  72. package/dist/client/assets/{command-Cd-mPIB0.js → command-iQT6jCQU.js} +1 -1
  73. package/dist/client/assets/commerce-onboarding-Baa8XyuB.js +1 -0
  74. package/dist/client/assets/{connect-desktop-dialog-D-0UYkrF.js → connect-desktop-dialog-De9JC7oT.js} +1 -1
  75. package/dist/client/assets/{connection-card-CQKxBh27.js → connection-card-DYHA2ePc.js} +1 -1
  76. package/dist/client/assets/{connection-detail-DCn0Q_rd.js → connection-detail-sh8xmIan.js} +1 -1
  77. package/dist/client/assets/{connection-form-helpers-D9S11tHo.js → connection-form-helpers-ND0px4nU.js} +1 -1
  78. package/dist/client/assets/{connections-BhO5lMQN.js → connections-NvKjpKKp.js} +1 -1
  79. package/dist/client/assets/{context-menu-DfXylCjH.js → context-menu-DB01iJsV.js} +1 -1
  80. package/dist/client/assets/{decopilot-Cdi5SbXT.js → decopilot-C9TC61Tp.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-DBKZPhuP.js → decopilot-sse-pool-BgtEj3BO.js} +1 -1
  82. package/dist/client/assets/{dialog-B2DoU3ik.js → dialog-vzDSbn7L.js} +1 -1
  83. package/dist/client/assets/{domain-settings-DiYR0YK6.js → domain-settings-B1ZU2GFJ.js} +1 -1
  84. package/dist/client/assets/{drawer-CnIonxgu.js → drawer-Bg7-Dl26.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-C_iz5wEu.js → dropdown-menu-CuFgB89G.js} +1 -1
  86. package/dist/client/assets/{empty-state-Ccc7wvcy.js → empty-state-CvgPTCjJ.js} +1 -1
  87. package/dist/client/assets/{extract-connection-data-D2gQKJCU.js → extract-connection-data-n-h18tII.js} +1 -1
  88. package/dist/client/assets/{file-explorer-DkkhrQYG.js → file-explorer-DDeLz7xB.js} +1 -1
  89. package/dist/client/assets/{file-type-icon-C05PEJrX.js → file-type-icon-BRr20zQ9.js} +1 -1
  90. package/dist/client/assets/{files-BYWkFvwm.js → files-UWZZJX3_.js} +1 -1
  91. package/dist/client/assets/{form-DNh2q8t4.js → form-BR7032VY.js} +1 -1
  92. package/dist/client/assets/{general-BOUVk894.js → general-BuUOvdGr.js} +1 -1
  93. package/dist/client/assets/{github-repo-picker-Dl9Wu-Ij.js → github-repo-picker-Ca8-WZ6L.js} +1 -1
  94. package/dist/client/assets/{hooks-CMI_9fmc.js → hooks-CaS80xtt.js} +1 -1
  95. package/dist/client/assets/{import-from-deco-dialog-BOm9c3ra.js → import-from-deco-dialog-CsA8G5b5.js} +1 -1
  96. package/dist/client/assets/{index-DVooRj31.js → index-1R4D7cwC.js} +1 -1
  97. package/dist/client/assets/{index-BBs9Cr8d.js → index-C3Ikqs0n.js} +5 -5
  98. package/dist/client/assets/{index-Dk42mrp5.js → index-CBquAB3Y.js} +1 -1
  99. package/dist/client/assets/{index-DptZZauK.js → index-CFxtND-D.js} +3 -3
  100. package/dist/client/assets/{index-gBQPS-LW.js → index-CG5SwyV0.js} +1 -1
  101. package/dist/client/assets/{index-ES9ctbJi.js → index-CI9gZKY4.js} +1 -1
  102. package/dist/client/assets/{index-C2eVEqgk.js → index-DgTzpZTX.js} +1 -1
  103. package/dist/client/assets/{index-CBSe4ASl.js → index-F1yNAmcr.js} +1 -1
  104. package/dist/client/assets/{index-zsQNpAC_.js → index-MCh1C7h8.js} +1 -1
  105. package/dist/client/assets/{index-73tVSzqh.js → index-RTUq9ofQ.js} +1 -1
  106. package/dist/client/assets/{index-CAaHR2ia.js → index-To3riLZY.js} +1 -1
  107. package/dist/client/assets/{index-DNsPZaO7.js → index-a1rhpXFO.js} +1 -1
  108. package/dist/client/assets/{index-BgN9pI07.js → index-lpCPRzwS.js} +1 -1
  109. package/dist/client/assets/index-pwFXMo3X.css +1 -0
  110. package/dist/client/assets/{index-redirect-C9wUdbB_.js → index-redirect-CaD-Bk3y.js} +1 -1
  111. package/dist/client/assets/{index-DLktrx94.js → index-w_9m850o.js} +1 -1
  112. package/dist/client/assets/{input-Ch9q0aZa.js → input-DgMx0wzZ.js} +1 -1
  113. package/dist/client/assets/{integration-icon-YoYYs9mF.js → integration-icon-B9eaFgP5.js} +1 -1
  114. package/dist/client/assets/{label-B-U7wEM-.js → label-COJYTWhT.js} +1 -1
  115. package/dist/client/assets/{login-B6e0iAu4.js → login-BmOTfEC2.js} +1 -1
  116. package/dist/client/assets/{mcp-oauth-DQE-04Mo.js → mcp-oauth-Dz_ZLIOa.js} +1 -1
  117. package/dist/client/assets/{members-9KeuvWWT.js → members-T-ENj2jU.js} +1 -1
  118. package/dist/client/assets/{monaco-editor-DXogaJUp.js → monaco-editor-KkcyKbDr.js} +1 -1
  119. package/dist/client/assets/{monitoring-stats-row-CP7I3KY2.js → monitoring-stats-row-BCozJ2G1.js} +1 -1
  120. package/dist/client/assets/{oauth-callback-D18w_K8B.js → oauth-callback-UyIkLBxF.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-ai-provider-Cdap4ord.js → oauth-callback-ai-provider-DxadaECY.js} +1 -1
  122. package/dist/client/assets/{onboarding-BZkIK-Ka.js → onboarding-HWRkBtpi.js} +1 -1
  123. package/dist/client/assets/{org-install-CjuXIws6.js → org-install-Btw6aO95.js} +1 -1
  124. package/dist/client/assets/{org-layout-Dej6DmSC.js → org-layout-DkGJ4JJo.js} +1 -1
  125. package/dist/client/assets/{organization-choice-Bfb5SfTa.js → organization-choice-DS6_apZN.js} +1 -1
  126. package/dist/client/assets/{page-seo-form-tpLbkMUL.js → page-seo-form-jVEnLnuT.js} +1 -1
  127. package/dist/client/assets/page-seo-sheet-3yKPfGj2.js +1 -0
  128. package/dist/client/assets/{popover-CEv2N3w9.js → popover-CJsAgEpE.js} +1 -1
  129. package/dist/client/assets/{post-editor-DvPV2O57.js → post-editor-BYz_o6Vw.js} +1 -1
  130. package/dist/client/assets/{preview-dialog-td-oVNia.js → preview-dialog-DeiamaUR.js} +1 -1
  131. package/dist/client/assets/{primitives-VnhXlpi8.js → primitives-Dy3LeAwC.js} +1 -1
  132. package/dist/client/assets/{profile-WTH-rkk7.js → profile-Bh7nWsTb.js} +1 -1
  133. package/dist/client/assets/project-app-view-KV11o8fi.js +1 -0
  134. package/dist/client/assets/record-editor-BrHdaws8.js +1 -0
  135. package/dist/client/assets/registry-BJqcdGj4.js +2 -0
  136. package/dist/client/assets/{registry-layout-Ce_TARWv.js → registry-layout-CtCkqVpK.js} +1 -1
  137. package/dist/client/assets/{require-capability-BZgleI4m.js → require-capability-CnGVIAFy.js} +1 -1
  138. package/dist/client/assets/{required-auth-layout-BaGKlYtx.js → required-auth-layout-CmHxB6sm.js} +1 -1
  139. package/dist/client/assets/{reset-password-0UzgtY5z.js → reset-password-BXmhC6bN.js} +1 -1
  140. package/dist/client/assets/{roles-C1AHKSTJ.js → roles-Ddlvq9dn.js} +1 -1
  141. package/dist/client/assets/{save-status-Dc26iXJB.js → save-status-DRBQPn23.js} +1 -1
  142. package/dist/client/assets/{scroll-area-B3EoQYK2.js → scroll-area-CfenrEEW.js} +1 -1
  143. package/dist/client/assets/{search-input-CUilRo9d.js → search-input-Cw0vBwo5.js} +1 -1
  144. package/dist/client/assets/{secrets-DUGdX_tt.js → secrets-CBbes7Ds.js} +1 -1
  145. package/dist/client/assets/{sections-editor-C2iZ1hVk.js → sections-editor-BovBZ8mw.js} +1 -1
  146. package/dist/client/assets/{select-model-CArerA8a.js → select-model-JFlCldo3.js} +1 -1
  147. package/dist/client/assets/{select-CJdBdWqY.js → select-v123Plev.js} +1 -1
  148. package/dist/client/assets/{seo-editor-CwsY379b.js → seo-editor-CnFwtTWq.js} +1 -1
  149. package/dist/client/assets/{settings-layout-CcwwB4g3.js → settings-layout-DFSQzxnj.js} +1 -1
  150. package/dist/client/assets/{settings-section-BtP8pWPF.js → settings-section-BmryiFIQ.js} +1 -1
  151. package/dist/client/assets/{sheet-DDFgoCvO.js → sheet-JJCnCeDP.js} +1 -1
  152. package/dist/client/assets/{shell-controls-CrCNeNtn.js → shell-controls-DnCKN5Ud.js} +1 -1
  153. package/dist/client/assets/shell-layout-Plyn5NRY.js +1 -0
  154. package/dist/client/assets/{shell-route-loading-CxYzXt5f.js → shell-route-loading-BmsMbzWG.js} +1 -1
  155. package/dist/client/assets/{sidebar-aiqzS0KL.js → sidebar-BehvUVpU.js} +1 -1
  156. package/dist/client/assets/{skeleton-vMVUiRn_.js → skeleton-B6FQVjtu.js} +1 -1
  157. package/dist/client/assets/{sortable.esm-B0o7kFIh.js → sortable.esm-C0gt2PqU.js} +1 -1
  158. package/dist/client/assets/{sso-Box6hROX.js → sso-C3OBHGAQ.js} +1 -1
  159. package/dist/client/assets/{store-B87zIBKS.js → store-Dvz6CshC.js} +1 -1
  160. package/dist/client/assets/store-registry-DR40on4b.js +2 -0
  161. package/dist/client/assets/{studio-tools-BY37pyys.js → studio-tools-DOSKR-eb.js} +1 -1
  162. package/dist/client/assets/{switch-CZySgwCj.js → switch-BQ-vU6yK.js} +1 -1
  163. package/dist/client/assets/{table-D8KWGQn2.js → table-CJawEX9y.js} +1 -1
  164. package/dist/client/assets/{tabs-C_nkVbiW.js → tabs-D8WMETBf.js} +1 -1
  165. package/dist/client/assets/{task-status-B3dgE7Vl.js → task-status-BrMs6CVv.js} +1 -1
  166. package/dist/client/assets/{textarea-WgNB0BrE.js → textarea-CY5Vsa-T.js} +1 -1
  167. package/dist/client/assets/{toggle-group-ZDWrpgGI.js → toggle-group-MRG_3v3y.js} +1 -1
  168. package/dist/client/assets/{toolbar-CC7gZdrp.js → toolbar-W7ENetSC.js} +1 -1
  169. package/dist/client/assets/{tooltip-Cn4Fr4Nc.js → tooltip-DElXTBWP.js} +1 -1
  170. package/dist/client/assets/{types-BGHXNEpK.js → types-Cc424u4b.js} +1 -1
  171. package/dist/client/assets/{use-ai-providers-Cc5cHyjW.js → use-ai-providers-DIlFm4AM.js} +1 -1
  172. package/dist/client/assets/{use-automations-CcDuV2d6.js → use-automations-BZUZ9XFU.js} +1 -1
  173. package/dist/client/assets/{use-capability-Bj9KYcez.js → use-capability-cUl1G9Do.js} +1 -1
  174. package/dist/client/assets/{use-clock-tick-DS6HQj-T.js → use-clock-tick-CLRXhn1s.js} +1 -1
  175. package/dist/client/assets/{use-collections-JBGoJXV7.js → use-collections-DTrKVvNZ.js} +1 -1
  176. package/dist/client/assets/{use-connection-D6MfbxRS.js → use-connection-CjqwS69Q.js} +1 -1
  177. package/dist/client/assets/{use-copy-DBmQNAjE.js → use-copy-BHQua8yv.js} +1 -1
  178. package/dist/client/assets/{use-create-virtual-mcp-Djox-xO9.js → use-create-virtual-mcp-CKRlPnJl.js} +1 -1
  179. package/dist/client/assets/{use-debounced-autosave-D6UnZuik.js → use-debounced-autosave-FsErIFB3.js} +1 -1
  180. package/dist/client/assets/{use-delete-connection-BlM46eDx.js → use-delete-connection-CA4EZnYy.js} +1 -1
  181. package/dist/client/assets/{use-file-configs-Bpo5RzC0.js → use-file-configs-C59dtoKf.js} +1 -1
  182. package/dist/client/assets/{use-infinite-scroll-CToI6Rk5.js → use-infinite-scroll-KnvVbID4.js} +1 -1
  183. package/dist/client/assets/{use-join-requests-CBCoJ3mh.js → use-join-requests-CQPtg_73.js} +1 -1
  184. package/dist/client/assets/{use-mcp-client-CROrubmo.js → use-mcp-client-BOmWfyRe.js} +1 -1
  185. package/dist/client/assets/{use-mcp-prompts-D0RIhc9f.js → use-mcp-prompts-DVjpTNQh.js} +1 -1
  186. package/dist/client/assets/{use-mcp-tools-Df4SfdHr.js → use-mcp-tools-ipa9WEE1.js} +1 -1
  187. package/dist/client/assets/{use-members-DyFFnkfi.js → use-members-BNRRCPdZ.js} +1 -1
  188. package/dist/client/assets/{use-mobile-BRA9DBxz.js → use-mobile-DZPQppT0.js} +1 -1
  189. package/dist/client/assets/{use-navigate-to-agent-Cbubh-yV.js → use-navigate-to-agent-GXXWcsnL.js} +1 -1
  190. package/dist/client/assets/{use-org-auth-client-oOo72Oq9.js → use-org-auth-client-Dqbh4-dV.js} +1 -1
  191. package/dist/client/assets/{use-org-sso-Bp1ATxlv.js → use-org-sso-BS7eOw0w.js} +1 -1
  192. package/dist/client/assets/{use-organization-roles-FbsGo1TW.js → use-organization-roles-QHsDSIHK.js} +1 -1
  193. package/dist/client/assets/{use-organization-settings-CVnodPz6.js → use-organization-settings-B6o-OHM0.js} +1 -1
  194. package/dist/client/assets/{use-registry-connections-DiD1GxkL.js → use-registry-connections-BlbfO2IS.js} +1 -1
  195. package/dist/client/assets/{use-secrets-zS4yVRiI.js → use-secrets-D116hNBX.js} +1 -1
  196. package/dist/client/assets/{use-status-sounds-CkiMUfRN.js → use-status-sounds-CJwkGjdA.js} +1 -1
  197. package/dist/client/assets/{use-view-mode-iWrWXNiJ.js → use-view-mode-QIXaEFHP.js} +1 -1
  198. package/dist/client/assets/{use-virtual-mcp-BUyVS0ZN.js → use-virtual-mcp-BAJGZSzT.js} +1 -1
  199. package/dist/client/assets/useInfiniteQuery-CKC8ud6E.js +1 -0
  200. package/dist/client/assets/useSuspenseInfiniteQuery-DVOudNKB.js +1 -0
  201. package/dist/client/assets/{useSuspenseQueries-AiXukE-T.js → useSuspenseQueries-5nhzR5RI.js} +1 -1
  202. package/dist/client/assets/{variant-calendar-B-rsy4S4.js → variant-calendar-CrA1LQ-_.js} +1 -1
  203. package/dist/client/assets/{view-mode-toggle-C8lWSgq7.js → view-mode-toggle-VC3gXYv-.js} +1 -1
  204. package/dist/client/index.html +2 -2
  205. package/dist/server/cli.js +255 -215
  206. package/package.json +1 -1
  207. package/dist/client/assets/commerce-onboarding-9AsTn3E2.js +0 -1
  208. package/dist/client/assets/index-B1Be6Vk-.css +0 -1
  209. package/dist/client/assets/page-seo-sheet-CX2gPBcd.js +0 -1
  210. package/dist/client/assets/project-app-view-D_C5eQR6.js +0 -1
  211. package/dist/client/assets/record-editor-DaKtfPzO.js +0 -1
  212. package/dist/client/assets/registry-CqA4momB.js +0 -2
  213. package/dist/client/assets/shell-layout-RHUNhd-E.js +0 -1
  214. package/dist/client/assets/store-registry-Do9M9YHO.js +0 -2
  215. package/dist/client/assets/useInfiniteQuery-Dhot3ff6.js +0 -1
  216. package/dist/client/assets/useSuspenseInfiniteQuery-rXm6Ehme.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "3.94.0",
3
+ "version": "3.94.2",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{c as E,r as M,l as X,j as t,B as V,m as lt,d as Oe,K as Q,o as He,s as fe,n as Ge,p as Qe,i as at,k as ct,q as me,Q as dt,E as ut,a as We,u as Et,b as mt,v as Tt,w as ft,L as Ot}from"./index-DptZZauK.js";import{A as Rt}from"./auth-entry-COL91flc.js";import{A as W}from"./auth-split-layout-BKBH2tBP.js";import{O as it}from"./organization-choice-Bfb5SfTa.js";import{f as Ut}from"./tab-id-BptcWVWa.js";import{I as Re}from"./input-Ch9q0aZa.js";import{u as Ue,W as pt,S as gt,g as $t,C as zt}from"./use-mcp-client-CROrubmo.js";import{i as ht}from"./XCircle-CoU_Hwe9.js";import{I as xt}from"./integration-icon-YoYYs9mF.js";import{D as Ye,a as Lt,b as Pt,c as At,d as Dt,e as Mt}from"./dialog-B2DoU3ik.js";import{T as Ft,a as Kt,b as qt}from"./tooltip-Cn4Fr4Nc.js";import{i as Ze}from"./CheckCircle-H3pWKPYO.js";import{i as Vt}from"./ZoomOut-DV_1o0PM.js";import{g as Bt,c as Ht,e as Gt}from"./extract-connection-data-D2gQKJCU.js";import{F as pe,a as Xe,b as ge,c as Fe,d as he,e as xe}from"./form-DNh2q8t4.js";import{i as Qt}from"./ChevronUp-u7VhfB08.js";import{s as Wt,a as Yt}from"./Eye-C8Vfx0-4.js";import{i as Zt}from"./Settings02-BVbp_ypE.js";import{i as Xt}from"./agent-icon-NQ_Mk8_8.js";import{u as Jt}from"./useSuspenseQueries-AiXukE-T.js";import{a as en}from"./authenticate-and-persist-oauth-DOKW32kF.js";import{i as yt}from"./ArrowUpRight-C9ykLtuj.js";import{s as jt}from"./User01-CxCzzEeX.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-Oz8Lqgg4.js";import"./auth-BFkL4ufW.js";import"./X-CiAMFEWO.js";import"./label-B-U7wEM-.js";import"./AlertCircle-CVgQ7AOT.js";import"./Tool01-qCeqaIYR.js";import"./SwitchHorizontal01-CUGpid9A.js";import"./ZapSquare-DiyzHRy2.js";import"./Users03-BfmtQGSl.js";import"./ChevronDown-DO3o3y5M.js";import"./ChevronLeft-B7B0rGOG.js";import"./ChevronRight-D_tkXjWo.js";import"./DotsVertical-Cauolc8c.js";import"./Stars02-DToeu8SC.js";import"./Globe01-B2Kb3oGL.js";import"./FilterLines-DmVqY61b.js";import"./Star01-BQYePq21.js";import"./Globe04-yg-G_BoN.js";import"./HardDrive-Ct0X1WYx.js";import"./Key01-CYbGr3H3.js";import"./LayoutLeft-hqAstg8m.js";import"./LinkExternal01-DFDKnuS_.js";import"./Monitor01-CjEGYbhQ.js";import"./Sun-Ct9UUaO-.js";import"./Palette-BrlikOjU.js";import"./Play-DsnYqyFF.js";import"./Plus-BCyb-AcQ.js";import"./SearchMd-pgxE25ht.js";import"./Shield01-CDrsrKsk.js";import"./Stars01-BYz6LBgx.js";import"./Trash01-BQ-tGqiC.js";import"./Upload01-D4__IfBX.js";import"./Users01-Cw-lssyZ.js";import"./XClose-BEAZpPEi.js";import"./Zap-BZ2VPUiO.js";import"./mcp-oauth-DQE-04Mo.js";const tn=/^[a-zA-Z][a-zA-Z\d+.-]*:/,nn=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,sn=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,on=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Ee(s){const e=s.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const n=tn.test(e),i=nn.test(e),o=sn.test(e);if(n&&!i&&!o)return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const c=i?e:`https://${e}`;let r;try{r=new URL(c)}catch{return{ok:!1,error:"Enter a valid website URL."}}if(r.protocol!=="http:"&&r.protocol!=="https:")return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const a=r.hostname.split(".");return a.length<2||a.some(l=>!l||!on.test(l))?{ok:!1,error:"Enter a valid website URL."}:(r.protocol="https:",{ok:!0,value:r.origin})}function qe(s){const e=E.c(14),{children:n,className:i,wrapperClassName:o}=s,[c,r]=M.useState(!0);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=j=>{if(!j)return;const y=()=>{const u=j.scrollHeight-j.scrollTop-j.clientHeight<8;r(u)};y(),j.addEventListener("scroll",y,{passive:!0});const p=new ResizeObserver(y);p.observe(j);for(const u of Array.from(j.children))p.observe(u);return()=>{j.removeEventListener("scroll",y),p.disconnect()}},e[0]=a):a=e[0];const l=a;let m;e[1]!==o?(m=X("relative",o),e[1]=o,e[2]=m):m=e[2];let f;e[3]!==n||e[4]!==i?(f=t.jsx("div",{ref:l,className:i,children:n}),e[3]=n,e[4]=i,e[5]=f):f=e[5];const g=c?"opacity-0":"opacity-100";let d;e[6]!==g?(d=X("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",g),e[6]=g,e[7]=d):d=e[7];let h;e[8]!==d?(h=t.jsx("div",{"aria-hidden":!0,className:d}),e[8]=d,e[9]=h):h=e[9];let x;return e[10]!==m||e[11]!==f||e[12]!==h?(x=t.jsxs("div",{className:m,children:[f,h]}),e[10]=m,e[11]=f,e[12]=h,e[13]=x):x=e[13],x}function rn(s){const e=s.properties;if(!e)return[];const n=[];for(const[i,o]of Object.entries(e)){const a=o?.properties?.__type?.const;typeof a=="string"&&a.length>0&&n.push({fieldKey:i,bindingType:a})}return n}function ln(s,e){const n=[];if(s.length&&n.push({field:["id"],operator:"in",value:s}),e.length&&n.push({field:["name"],operator:"in",value:e}),n.length!==0)return n.length===1?n[0]:{operator:"or",conditions:n}}function Z(s){const e=s;if(e.isError)throw new Error(e.content?.find(n=>n.text)?.text??"Tool call failed");return e.structuredContent??s}function an(s,e,n,i){return{...s??{},[e]:{__type:n,value:i}}}function Ve(s){return s==null?!1:typeof s=="string"?s.trim().length>0:typeof s=="number"||typeof s=="boolean"?!0:Array.isArray(s)?s.some(Ve):typeof s=="object"?Object.entries(s).some(([e,n])=>!e.startsWith("__")&&Ve(n)):!1}function cn(s){return s.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,e=>e.toUpperCase())}function dn(s){return Ve(s)?typeof s=="string"?s.trim():typeof s=="number"||typeof s=="boolean"?String(s):JSON.stringify(s):null}function un(s){return s?Object.entries(s).flatMap(([e,n])=>{if(e.startsWith("__"))return[];const i=dn(n);return i?[{key:e,label:cn(e),value:i}]:[]}):[]}function mn(s,e,n){const i=s.filter(o=>o.app_name===e||!!n&&o.app_id===n);return i.length===0?null:(i.sort((o,c)=>{const r=a=>a.status==="active"?0:1;return r(o)!==r(c)?r(o)-r(c):(c.updated_at??"").localeCompare(o.updated_at??"")}),i[0].id)}function fn(s){return s.server?.icons?.[0]?.src??Bt(s.server?.repository)??null}function pn(s,e){const n=s._meta?.["mcp.mesh"];return n?.friendlyName||n?.friendly_name||s.title||s.server?.title||s.server?.name||e}function gn(s){const e=[],n=new Map(s.connections.map(i=>[i.id,i]));for(const i of s.requirements){const o=s.curated[i.bindingType],c=o?s.itemsById[o.registryAppId]:s.itemsByName[i.bindingType];if(!c)continue;const r=s.configurationState?.[i.fieldKey]?.value,a=r?n.get(r):void 0,l=r&&a?r:null,m=l?s.connectionReadiness?.[l]!==!1:!1,f=!!l&&m;e.push({fieldKey:i.fieldKey,bindingType:i.bindingType,registryItem:c,title:pn(c,i.bindingType),icon:fn(c),headline:o?.headline??c._meta?.["mcp.mesh"]?.short_description??null,checks:o?.checks??null,bullets:o?.bullets??[],satisfied:f,candidateConnectionId:f?null:l||mn(s.connections,i.bindingType,o?.registryAppId),linkedConnectionId:l,configurationState:a?.configuration_state??null})}return e}function hn(s,e){if(!s)return null;const n=o=>{if(o.startsWith("sc-domain:"))return o.substring(10);try{let r=new URL(o.startsWith("http")?o:`https://${o}`).hostname||"";return r.startsWith("www.")&&(r=r.substring(4)),r}catch{return o}},i=n(s);for(const o of e)if(n(o.siteUrl)===i)return o.siteUrl;return null}function xn(s){return(s?.response?.accountSummaries??[]).map(i=>({account:i.account,options:(i.propertySummaries??[]).map(o=>({value:o.property,label:o.displayName}))}))}function ot(s){const e=E.c(38);let n,i,o,c,r;e[0]!==s?({value:r,onChange:i,placeholder:o,className:n,...c}=s,e[0]=s,e[1]=n,e[2]=i,e[3]=o,e[4]=c,e[5]=r):(n=e[1],i=e[2],o=e[3],c=e[4],r=e[5]);const[a,l]=M.useState(!1),[m,f]=M.useState(!1);let g;e[6]!==r?(g=async()=>{if(r)try{await navigator.clipboard.writeText(r),f(!0),setTimeout(()=>f(!1),2e3)}catch(A){console.error("Failed to copy text: ",A)}},e[6]=r,e[7]=g):g=e[7];const d=g;let h;e[8]!==a?(h=()=>{l(!a)},e[8]=a,e[9]=h):h=e[9];const x=h,j=a?"text":"password";let y;e[10]!==n?(y=X("pr-20",n),e[10]=n,e[11]=y):y=e[11];let p;e[12]!==i||e[13]!==o||e[14]!==c||e[15]!==j||e[16]!==y||e[17]!==r?(p=t.jsx(Re,{type:j,value:r,onChange:i,placeholder:o,className:y,...c}),e[12]=i,e[13]=o,e[14]=c,e[15]=j,e[16]=y,e[17]=r,e[18]=p):p=e[18];const u=a?"Hide password":"Show password";let S;e[19]!==a?(S=a?t.jsx(Zt,{size:16}):t.jsx(Wt,{size:16}),e[19]=a,e[20]=S):S=e[20];let b;e[21]!==u||e[22]!==S||e[23]!==x?(b=t.jsx(V,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:x,title:u,children:S}),e[21]=u,e[22]=S,e[23]=x,e[24]=b):b=e[24];const C=!r,_=m?"Copied!":"Copy token";let k;e[25]!==m?(k=m?t.jsx(Qt,{size:16}):t.jsx(Yt,{size:16}),e[25]=m,e[26]=k):k=e[26];let w;e[27]!==d||e[28]!==_||e[29]!==k||e[30]!==C?(w=t.jsx(V,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:d,disabled:C,title:_,children:k}),e[27]=d,e[28]=_,e[29]=k,e[30]=C,e[31]=w):w=e[31];let N;e[32]!==w||e[33]!==b?(N=t.jsxs("div",{className:"absolute right-1 top-1 flex items-center gap-1 h-8",children:[b,w]}),e[32]=w,e[33]=b,e[34]=N):N=e[34];let T;return e[35]!==N||e[36]!==p?(T=t.jsxs("div",{className:"relative",children:[p,N]}),e[35]=N,e[36]=p,e[37]=T):T=e[37],T}function Je(s){const e=E.c(19),{card:n,selfClient:i,org:o,onDone:c,onError:r}=s,a=lt();let l;e[0]!==n||e[1]!==i?(l=async y=>{const p={...n.configurationState??{},...y};await i.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:n.linkedConnectionId||n.candidateConnectionId,data:{configuration_state:p}}})},e[0]=n,e[1]=i,e[2]=l):l=e[2];let m;e[3]!==c||e[4]!==o||e[5]!==a?(m=async()=>{await a.invalidateQueries({queryKey:Q.commerceDiscoveryCompanionConnectionsPrefix(o.id)}),c()},e[3]=c,e[4]=o,e[5]=a,e[6]=m):m=e[6];let f;e[7]!==r?(f=y=>{r?.(y)},e[7]=r,e[8]=f):f=e[8];let g;e[9]!==l||e[10]!==m||e[11]!==f?(g={mutationFn:l,onSuccess:m,onError:f},e[9]=l,e[10]=m,e[11]=f,e[12]=g):g=e[12];const d=Oe(g);let h;e[13]!==d?(h=y=>d.mutate(y),e[13]=d,e[14]=h):h=e[14];const x=h;let j;return e[15]!==d.error||e[16]!==d.isPending||e[17]!==x?(j={save:x,isPending:d.isPending,error:d.error},e[15]=d.error,e[16]=d.isPending,e[17]=x,e[18]=j):j=e[18],j}const yn=He({accountName:fe().min(1,"Account name is required"),appKey:fe().optional(),appToken:fe().optional()});function jn(s){const e=E.c(63),{card:n,selfClient:i,org:o,onDone:c,onIsPendingChange:r}=s;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=Ge(yn),e[0]=a):a=e[0];const l=n.configurationState?.accountName||"",m=n.configurationState?.appKey||"",f=n.configurationState?.appToken||"";let g;e[1]!==l||e[2]!==m||e[3]!==f?(g={resolver:a,defaultValues:{accountName:l,appKey:m,appToken:f}},e[1]=l,e[2]=m,e[3]=f,e[4]=g):g=e[4];const d=Qe(g);let h;e[5]!==n.configurationState?.accountName||e[6]!==n.configurationState?.appKey||e[7]!==n.configurationState?.appToken||e[8]!==d?(h=()=>{d.reset({accountName:n.configurationState?.accountName||"",appKey:n.configurationState?.appKey||"",appToken:n.configurationState?.appToken||""})},e[5]=n.configurationState?.accountName,e[6]=n.configurationState?.appKey,e[7]=n.configurationState?.appToken,e[8]=d,e[9]=h):h=e[9];let x;e[10]!==n.configurationState||e[11]!==d?(x=[n.configurationState,d],e[10]=n.configurationState,e[11]=d,e[12]=x):x=e[12],M.useEffect(h,x);let j;e[13]!==n||e[14]!==c||e[15]!==o||e[16]!==i?(j={card:n,selfClient:i,org:o,onDone:c},e[13]=n,e[14]=c,e[15]=o,e[16]=i,e[17]=j):j=e[17];const{save:y,isPending:p,error:u}=Je(j);let S,b;e[18]!==p||e[19]!==r?(b=()=>{r?.(p)},S=[p,r],e[18]=p,e[19]=r,e[20]=S,e[21]=b):(S=e[20],b=e[21]),M.useEffect(b,S);let C;if(e[22]!==d||e[23]!==y){let D;e[25]!==y?(D=async v=>{y(v)},e[25]=y,e[26]=D):D=e[26],C=d.handleSubmit(D),e[22]=d,e[23]=y,e[24]=C}else C=e[24];const _=C;let k;e[27]!==p?(k=D=>{const{field:v}=D;return t.jsxs(ge,{children:[t.jsx(Fe,{children:"Account Name"}),t.jsx(he,{children:t.jsx(Re,{placeholder:"Your VTEX account name",...v,disabled:p})}),t.jsx(xe,{})]})},e[27]=p,e[28]=k):k=e[28];let w;e[29]!==d.control||e[30]!==k?(w=t.jsx(pe,{control:d.control,name:"accountName",render:k}),e[29]=d.control,e[30]=k,e[31]=w):w=e[31];let N;e[32]!==p?(N=D=>{const{field:v}=D;return t.jsxs(ge,{children:[t.jsx(Fe,{children:"App Key (optional)"}),t.jsx(he,{children:t.jsx(ot,{placeholder:"VTEX app key",...v,disabled:p})}),t.jsx(xe,{})]})},e[32]=p,e[33]=N):N=e[33];let T;e[34]!==d.control||e[35]!==N?(T=t.jsx(pe,{control:d.control,name:"appKey",render:N}),e[34]=d.control,e[35]=N,e[36]=T):T=e[36];let A;e[37]!==p?(A=D=>{const{field:v}=D;return t.jsxs(ge,{children:[t.jsx(Fe,{children:"App Token (optional)"}),t.jsx(he,{children:t.jsx(ot,{placeholder:"VTEX app token",...v,disabled:p})}),t.jsx(xe,{})]})},e[37]=p,e[38]=A):A=e[38];let $;e[39]!==d.control||e[40]!==A?($=t.jsx(pe,{control:d.control,name:"appToken",render:A}),e[39]=d.control,e[40]=A,e[41]=$):$=e[41];let I;e[42]!==d||e[43]!==w||e[44]!==T||e[45]!==$?(I=t.jsxs(Xe,{...d,children:[w,T,$]}),e[42]=d,e[43]=w,e[44]=T,e[45]=$,e[46]=I):I=e[46];let R;e[47]!==u?(R=u&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:u instanceof Error?u.message:"Failed to save configuration"}),e[47]=u,e[48]=R):R=e[48];let U;e[49]!==p||e[50]!==c?(U=t.jsx(V,{type:"button",variant:"outline",onClick:c,disabled:p,children:"Cancel"}),e[49]=p,e[50]=c,e[51]=U):U=e[51];const F=p?"Saving...":"Save";let q;e[52]!==p||e[53]!==F?(q=t.jsx(V,{type:"submit",disabled:p,children:F}),e[52]=p,e[53]=F,e[54]=q):q=e[54];let P;e[55]!==U||e[56]!==q?(P=t.jsxs(Ye,{className:"pt-4",children:[U,q]}),e[55]=U,e[56]=q,e[57]=P):P=e[57];let K;return e[58]!==_||e[59]!==I||e[60]!==R||e[61]!==P?(K=t.jsxs("form",{onSubmit:_,className:"space-y-4",children:[I,R,P]}),e[58]=_,e[59]=I,e[60]=R,e[61]=P,e[62]=K):K=e[62],K}function bt(s){const e=E.c(30),{options:n,value:i,onChange:o,disabled:c,ariaLabel:r,searchPlaceholder:a}=s,l=a===void 0?"Search…":a,[m,f]=M.useState("");let g,d,h;if(e[0]!==n||e[1]!==m||e[2]!==i){const w=m.trim().toLowerCase();g=w?n.filter(N=>N.label.toLowerCase().includes(w)):n,d=g.map(bn),h=d.includes(i)?i:d[0]??"",e[0]=n,e[1]=m,e[2]=i,e[3]=g,e[4]=d,e[5]=h}else g=e[3],d=e[4],h=e[5];const x=h;let j;e[6]!==c||e[7]!==d||e[8]!==o?(j=function(N){if(c||!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft","Home","End"].includes(N.key))return;N.preventDefault();const A=N.currentTarget.dataset.value,$=d.indexOf(A),I=d.length;if(I===0)return;let R;N.key==="ArrowDown"||N.key==="ArrowRight"?R=($+1)%I:N.key==="ArrowUp"||N.key==="ArrowLeft"?R=($-1+I)%I:N.key==="Home"?R=0:R=I-1;const U=d[R];o(U),N.currentTarget.closest('[role="radiogroup"]')?.querySelector(`[data-value="${CSS.escape(U)}"]`)?.focus()},e[6]=c,e[7]=d,e[8]=o,e[9]=j):j=e[9];const y=j;let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Xt,{size:16,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[10]=p):p=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=w=>f(w.target.value),e[11]=u):u=e[11];const S=`Search ${r}`;let b;e[12]!==c||e[13]!==m||e[14]!==l||e[15]!==S?(b=t.jsxs("div",{className:"relative",children:[p,t.jsx(Re,{type:"text",value:m,onChange:u,disabled:c,placeholder:l,"aria-label":S,className:"h-8 pl-8"})]}),e[12]=c,e[13]=m,e[14]=l,e[15]=S,e[16]=b):b=e[16];let C;e[17]!==c||e[18]!==g||e[19]!==y||e[20]!==o||e[21]!==x||e[22]!==i?(C=g.length===0?t.jsx("div",{className:"px-2 py-2 text-sm text-muted-foreground",children:"No results"}):g.map(w=>{const N=w.value===i;return t.jsxs("button",{type:"button",role:"radio","aria-checked":N,disabled:c,"data-value":w.value,tabIndex:w.value===x?0:-1,onClick:()=>o(w.value),onKeyDown:y,className:X("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",N?"bg-muted font-medium text-foreground":"text-foreground hover:bg-muted/50"),children:[t.jsx("span",{className:"truncate",children:w.label}),N?t.jsx(Ze,{size:16,className:"shrink-0 text-primary"}):null]},w.value)}),e[17]=c,e[18]=g,e[19]=y,e[20]=o,e[21]=x,e[22]=i,e[23]=C):C=e[23];let _;e[24]!==r||e[25]!==C?(_=t.jsx("div",{role:"radiogroup","aria-label":r,className:"max-h-[280px] overflow-y-auto",children:C}),e[24]=r,e[25]=C,e[26]=_):_=e[26];let k;return e[27]!==b||e[28]!==_?(k=t.jsxs("div",{className:"space-y-2",children:[b,_]}),e[27]=b,e[28]=_,e[29]=k):k=e[29],k}function bn(s){return s.value}function $e(s){const e=E.c(16),{label:n,iconSize:i,className:o,iconClassName:c,labelClassName:r}=s,a=i===void 0?14:i;let l;e[0]!==o?(l=X("inline-flex items-center gap-2",o),e[0]=o,e[1]=l):l=e[1];let m;e[2]!==c?(m=X("shrink-0 animate-spin",c),e[2]=c,e[3]=m):m=e[3];let f;e[4]!==a||e[5]!==m?(f=t.jsx(at,{size:a,className:m}),e[4]=a,e[5]=m,e[6]=f):f=e[6];let g;e[7]!==r?(g=X("text-sm",r),e[7]=r,e[8]=g):g=e[8];let d;e[9]!==n||e[10]!==g?(d=t.jsx("span",{className:g,children:n}),e[9]=n,e[10]=g,e[11]=d):d=e[11];let h;return e[12]!==l||e[13]!==f||e[14]!==d?(h=t.jsxs("span",{className:l,children:[f,d]}),e[12]=l,e[13]=f,e[14]=d,e[15]=h):h=e[15],h}const Sn=He({propertyId:fe().min(1,"Property is required")});function vn(s){const e=E.c(55),{card:n,connectionId:i,companionClient:o,selfClient:c,org:r,onDone:a,onIsPendingChange:l}=s;let m;e[0]!==i||e[1]!==r.id?(m=Q.commerceDiscoveryCompanionGaProperties(r.id,i),e[0]=i,e[1]=r.id,e[2]=m):m=e[2];let f;e[3]!==o?(f=async()=>{const v=await o.callTool({name:"get-account-summaries",arguments:{}}),L=Z(v);return xn(L)},e[3]=o,e[4]=f):f=e[4];let g;e[5]!==m||e[6]!==f?(g={queryKey:m,queryFn:f},e[5]=m,e[6]=f,e[7]=g):g=e[7];const d=ct(g);let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=Ge(Sn),e[8]=h):h=e[8];const x=n.configurationState?.propertyId||"";let j;e[9]!==x?(j={resolver:h,defaultValues:{propertyId:x}},e[9]=x,e[10]=j):j=e[10];const y=Qe(j);let p;e[11]!==n||e[12]!==a||e[13]!==r||e[14]!==c?(p={card:n,selfClient:c,org:r,onDone:a},e[11]=n,e[12]=a,e[13]=r,e[14]=c,e[15]=p):p=e[15];const{save:u,isPending:S,error:b}=Je(p);let C,_;e[16]!==S||e[17]!==l?(C=()=>{l?.(S)},_=[S,l],e[16]=S,e[17]=l,e[18]=C,e[19]=_):(C=e[18],_=e[19]),M.useEffect(C,_);let k;if(e[20]!==y||e[21]!==u){let v;e[23]!==u?(v=async L=>{u(L)},e[23]=u,e[24]=v):v=e[24],k=y.handleSubmit(v),e[20]=y,e[21]=u,e[22]=k}else k=e[22];const w=k;if(d.isLoading){let v;return e[25]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:t.jsx($e,{label:"Loading properties…"})}),e[25]=v):v=e[25],v}if(d.isError){let v;return e[26]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"space-y-4",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load Google Analytics properties."})}),e[26]=v):v=e[26],v}let N;e[27]!==d.data?(N=d.data||[],e[27]=d.data,e[28]=N):N=e[28];const T=N;if(T.flatMap(Nn).length===0){let v;return e[29]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"space-y-4",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No Google Analytics properties found. Please connect a Google Analytics account with properties."})}),e[29]=v):v=e[29],v}let $;e[30]!==S||e[31]!==T?($=v=>{const{field:L}=v;return t.jsxs(ge,{children:[t.jsx(he,{children:t.jsx(bt,{options:T.flatMap(Cn),value:L.value,onChange:L.onChange,disabled:S,ariaLabel:"Google Analytics Property"})}),t.jsx(xe,{})]})},e[30]=S,e[31]=T,e[32]=$):$=e[32];let I;e[33]!==y.control||e[34]!==$?(I=t.jsx(pe,{control:y.control,name:"propertyId",render:$}),e[33]=y.control,e[34]=$,e[35]=I):I=e[35];let R;e[36]!==y||e[37]!==I?(R=t.jsx(Xe,{...y,children:I}),e[36]=y,e[37]=I,e[38]=R):R=e[38];let U;e[39]!==b?(U=b&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:b instanceof Error?b.message:"Failed to save configuration"}),e[39]=b,e[40]=U):U=e[40];let F;e[41]!==S||e[42]!==a?(F=t.jsx(V,{type:"button",variant:"outline",onClick:a,disabled:S,children:"Cancel"}),e[41]=S,e[42]=a,e[43]=F):F=e[43];const q=S?"Saving...":"Save";let P;e[44]!==S||e[45]!==q?(P=t.jsx(V,{type:"submit",disabled:S,children:q}),e[44]=S,e[45]=q,e[46]=P):P=e[46];let K;e[47]!==F||e[48]!==P?(K=t.jsxs(Ye,{className:"pt-4",children:[F,P]}),e[47]=F,e[48]=P,e[49]=K):K=e[49];let D;return e[50]!==w||e[51]!==R||e[52]!==U||e[53]!==K?(D=t.jsxs("form",{onSubmit:w,className:"space-y-4",children:[R,U,K]}),e[50]=w,e[51]=R,e[52]=U,e[53]=K,e[54]=D):D=e[54],D}function Cn(s){return s.options}function Nn(s){return s.options}const _n=He({siteUrl:fe().min(1,"Site is required")});function wn(s){const e=E.c(59),{card:n,connectionId:i,companionClient:o,selfClient:c,org:r,contextSiteUrl:a,onDone:l,onIsPendingChange:m}=s;let f;e[0]!==i||e[1]!==r.id?(f=Q.commerceDiscoveryCompanionGscSites(r.id,i),e[0]=i,e[1]=r.id,e[2]=f):f=e[2];let g;e[3]!==o?(g=async()=>{const v=await o.callTool({name:"list_sites",arguments:{}});return Z(v).sites||[]},e[3]=o,e[4]=g):g=e[4];let d;e[5]!==f||e[6]!==g?(d={queryKey:f,queryFn:g},e[5]=f,e[6]=g,e[7]=d):d=e[7];const h=ct(d);let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=Ge(_n),e[8]=x):x=e[8];const j=n.configurationState?.siteUrl||"";let y;e[9]!==j?(y={resolver:x,defaultValues:{siteUrl:j}},e[9]=j,e[10]=y):y=e[10];const p=Qe(y);let u;e[11]!==n||e[12]!==l||e[13]!==r||e[14]!==c?(u={card:n,selfClient:c,org:r,onDone:l},e[11]=n,e[12]=l,e[13]=r,e[14]=c,e[15]=u):u=e[15];const{save:S,isPending:b,error:C}=Je(u);let _,k;e[16]!==b||e[17]!==m?(_=()=>{m?.(b)},k=[b,m],e[16]=b,e[17]=m,e[18]=_,e[19]=k):(_=e[18],k=e[19]),M.useEffect(_,k);let w;if(e[20]!==p||e[21]!==S){let v;e[23]!==S?(v=async L=>{S(L)},e[23]=S,e[24]=v):v=e[24],w=p.handleSubmit(v),e[20]=p,e[21]=S,e[22]=w}else w=e[22];const N=w;if(h.isLoading){let v;return e[25]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:t.jsx($e,{label:"Loading sites…"})}),e[25]=v):v=e[25],v}if(h.isError){let v;return e[26]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"space-y-4",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load Google Search Console sites."})}),e[26]=v):v=e[26],v}let T,A;if(e[27]!==n.configurationState?.siteUrl||e[28]!==a||e[29]!==p||e[30]!==h.data){A=Symbol.for("react.early_return_sentinel");e:{if(T=h.data||[],T.length===0){let L;e[33]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("div",{className:"space-y-4",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No verified sites found. Please verify a site in Google Search Console."})}),e[33]=L):L=e[33],A=L;break e}const v=n.configurationState?.siteUrl;if(v&&p.getValues("siteUrl")!==v)p.setValue("siteUrl",v);else if(!v&&!p.getValues("siteUrl")){const L=hn(a,T);L&&p.setValue("siteUrl",L)}}e[27]=n.configurationState?.siteUrl,e[28]=a,e[29]=p,e[30]=h.data,e[31]=T,e[32]=A}else T=e[31],A=e[32];if(A!==Symbol.for("react.early_return_sentinel"))return A;let $;e[34]!==b||e[35]!==T?($=v=>{const{field:L}=v;return t.jsxs(ge,{children:[t.jsx(he,{children:t.jsx(bt,{options:T.map(kn),value:L.value,onChange:L.onChange,disabled:b,ariaLabel:"Verified Site"})}),t.jsx(xe,{})]})},e[34]=b,e[35]=T,e[36]=$):$=e[36];let I;e[37]!==p.control||e[38]!==$?(I=t.jsx(pe,{control:p.control,name:"siteUrl",render:$}),e[37]=p.control,e[38]=$,e[39]=I):I=e[39];let R;e[40]!==p||e[41]!==I?(R=t.jsx(Xe,{...p,children:I}),e[40]=p,e[41]=I,e[42]=R):R=e[42];let U;e[43]!==C?(U=C&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:C instanceof Error?C.message:"Failed to save configuration"}),e[43]=C,e[44]=U):U=e[44];let F;e[45]!==b||e[46]!==l?(F=t.jsx(V,{type:"button",variant:"outline",onClick:l,disabled:b,children:"Cancel"}),e[45]=b,e[46]=l,e[47]=F):F=e[47];const q=b?"Saving...":"Save";let P;e[48]!==b||e[49]!==q?(P=t.jsx(V,{type:"submit",disabled:b,children:q}),e[48]=b,e[49]=q,e[50]=P):P=e[50];let K;e[51]!==F||e[52]!==P?(K=t.jsxs(Ye,{className:"pt-4",children:[F,P]}),e[51]=F,e[52]=P,e[53]=K):K=e[53];let D;return e[54]!==N||e[55]!==R||e[56]!==U||e[57]!==K?(D=t.jsxs("form",{onSubmit:N,className:"space-y-4",children:[R,U,K]}),e[54]=N,e[55]=R,e[56]=U,e[57]=K,e[58]=D):D=e[58],D}function kn(s){return{value:s.siteUrl,label:s.siteUrl}}const In={vtex:jn,"google-analytics":vn,"google-search-console":wn};function En(){const s=E.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"size-9 shrink-0 animate-pulse rounded-lg bg-muted/60"}),t.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted/60"}),t.jsx("div",{className:"ml-auto h-8 w-20 animate-pulse rounded-lg bg-muted/60"})]}),s[0]=e):e=s[0];let n;s[1]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"p-1",children:t.jsx("div",{className:"h-5 w-40 animate-pulse rounded bg-muted/60"})}),s[1]=n):n=s[1];let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-border bg-card p-4",children:[e,t.jsxs("div",{className:"flex flex-col gap-1 px-1 py-2",children:[n,t.jsx("div",{className:"p-1",children:t.jsx("div",{className:"h-5 w-56 animate-pulse rounded bg-muted/60"})})]})]}),s[2]=i):i=s[2],i}function Be(s){const e=E.c(3),{children:n}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ze,{size:14,className:"shrink-0 text-blue-500"}),e[0]=i):i=e[0];let o;return e[1]!==n?(o=t.jsxs("div",{className:"flex items-center gap-2 p-1",children:[i,t.jsx("p",{className:"text-sm text-foreground",children:n})]}),e[1]=n,e[2]=o):o=e[2],o}function Tn(s){const e=E.c(43),{card:n,connecting:i,disabled:o,onConnect:c,org:r,selfClient:a,siteUrl:l}=s,m=n.linkedConnectionId;let f;e[0]!==n.configurationState?(f=un(n.configurationState),e[0]=n.configurationState,e[1]=f):f=e[1];const g=f;let d;e[2]!==n.icon||e[3]!==n.title?(d=t.jsx(xt,{icon:n.icon,name:n.title,size:"sm",fit:"contain",className:"p-1.5"}),e[2]=n.icon,e[3]=n.title,e[4]=d):d=e[4];let h;e[5]!==n.title?(h=t.jsx("p",{className:"flex-1 text-sm text-foreground",children:n.title}),e[5]=n.title,e[6]=h):h=e[6];let x;e[7]!==n.satisfied||e[8]!==n.title||e[9]!==i||e[10]!==o||e[11]!==c?(x=n.satisfied?t.jsxs("div",{className:"flex h-8 items-center gap-2 px-3 text-sm text-muted-foreground",children:[t.jsx(Ze,{size:16})," Connected"]}):t.jsx(V,{type:"button",variant:"outline",size:"sm",disabled:o||i,onClick:c,"aria-label":`Connect ${n.title}`,children:i?t.jsx(at,{size:16,className:"animate-spin"}):"Connect"}),e[7]=n.satisfied,e[8]=n.title,e[9]=i,e[10]=o,e[11]=c,e[12]=x):x=e[12];let j;e[13]!==d||e[14]!==h||e[15]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[d,h,x]}),e[13]=d,e[14]=h,e[15]=x,e[16]=j):j=e[16];let y;e[17]!==n.checks?(y=n.checks!==null&&t.jsxs(Be,{children:["+ ",n.checks," checks"]}),e[17]=n.checks,e[18]=y):y=e[18];let p;e[19]!==n.headline?(p=n.headline&&t.jsx(Be,{children:n.headline}),e[19]=n.headline,e[20]=p):p=e[20];let u;e[21]!==n.bullets?(u=n.bullets.map(On),e[21]=n.bullets,e[22]=u):u=e[22];let S;e[23]!==n.candidateConnectionId||e[24]!==n.satisfied||e[25]!==n.title?(S=!n.satisfied&&n.candidateConnectionId&&t.jsxs("p",{className:"px-1 text-xs text-muted-foreground",children:["Using your existing ",n.title]}),e[23]=n.candidateConnectionId,e[24]=n.satisfied,e[25]=n.title,e[26]=S):S=e[26];let b;e[27]!==y||e[28]!==p||e[29]!==u||e[30]!==S?(b=t.jsxs("div",{className:"flex flex-col gap-1 px-1 py-2",children:[y,p,u,S]}),e[27]=y,e[28]=p,e[29]=u,e[30]=S,e[31]=b):b=e[31];let C;e[32]!==n||e[33]!==m||e[34]!==r||e[35]!==g||e[36]!==a||e[37]!==l?(C=n.satisfied&&m&&t.jsx(M.Suspense,{fallback:t.jsx($n,{}),children:t.jsx(zn,{card:n,org:r,selfClient:a,connectionId:m,savedConfigEntries:g,contextSiteUrl:l})}),e[32]=n,e[33]=m,e[34]=r,e[35]=g,e[36]=a,e[37]=l,e[38]=C):C=e[38];let _;return e[39]!==b||e[40]!==C||e[41]!==j?(_=t.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-border bg-card p-4",children:[j,b,C]}),e[39]=b,e[40]=C,e[41]=j,e[42]=_):_=e[42],_}function On(s){return t.jsx(Be,{children:s},s)}function Rn(s,e){return/(token|secret|password|appKey|key)$/i.test(s)?"••••••••":e}function Un(s){const e=E.c(2),{title:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"grid gap-3 border-t border-border pt-3",children:t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Configuration isn't available here yet for ",n,"."]})}),e[0]=n,e[1]=i):i=e[1],i}function $n(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"grid gap-3 border-t border-border pt-3",children:t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted/60"}),t.jsx("div",{className:"h-8 w-20 animate-pulse rounded-lg bg-muted/60"})]})}),s[0]=e):e=s[0],e}function zn(s){const e=E.c(36),{card:n,org:i,selfClient:o,connectionId:c,savedConfigEntries:r,contextSiteUrl:a}=s;let l;e[0]!==c||e[1]!==i.id||e[2]!==i.slug?(l={connectionId:c,orgId:i.id,orgSlug:i.slug},e[0]=c,e[1]=i.id,e[2]=i.slug,e[3]=l):l=e[3];const m=Ue(l),[f,g]=M.useState(!1),[d,h]=M.useState(!1),x=In[n.bindingType];let j;e[4]!==d?(j=T=>{!T&&d||g(T)},e[4]=d,e[5]=j):j=e[5];const y=j;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Configuration"}),e[6]=p):p=e[6];let u;e[7]!==r.length?(u=r.length===0&&t.jsx("p",{className:"text-xs text-muted-foreground",children:"No configuration values saved yet."}),e[7]=r.length,e[8]=u):u=e[8];let S;e[9]!==u?(S=t.jsxs("div",{className:"grid gap-1",children:[p,u]}),e[9]=u,e[10]=S):S=e[10];let b;e[11]!==x||e[12]!==n.title||e[13]!==r.length?(b=r.length>0?t.jsxs(Ft,{children:[t.jsx(Kt,{asChild:!0,children:t.jsx(V,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>g(!0),"aria-label":`Edit ${n.title} configuration`,disabled:!x,children:t.jsx(Vt,{size:14})})}),t.jsx(qt,{children:"Edit configuration"})]}):t.jsx(V,{type:"button",variant:"outline",size:"sm",onClick:()=>g(!0),disabled:!x,children:"Configure"}),e[11]=x,e[12]=n.title,e[13]=r.length,e[14]=b):b=e[14];let C;e[15]!==S||e[16]!==b?(C=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[S,b]}),e[15]=S,e[16]=b,e[17]=C):C=e[17];let _;e[18]!==r?(_=r.length>0&&t.jsx("dl",{className:"grid gap-2",children:r.map(Ln)}),e[18]=r,e[19]=_):_=e[19];let k;e[20]!==C||e[21]!==_?(k=t.jsxs("div",{className:"grid gap-3 border-t border-border pt-3",children:[C,_]}),e[20]=C,e[21]=_,e[22]=k):k=e[22];let w;e[23]!==x||e[24]!==n||e[25]!==m||e[26]!==c||e[27]!==a||e[28]!==f||e[29]!==y||e[30]!==i||e[31]!==o?(w=x?t.jsx(Lt,{open:f,onOpenChange:y,children:t.jsxs(Pt,{className:"sm:max-w-lg",children:[t.jsxs(At,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[t.jsx(xt,{icon:n.icon,name:n.title,size:"md",fit:"contain",className:"p-1.5"}),t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[t.jsx(Dt,{children:n.title}),t.jsxs(Mt,{children:["Configure ",n.title," to enrich data"]})]})]}),t.jsx(x,{card:n,connectionId:c,companionClient:m,selfClient:o,org:i,contextSiteUrl:a,onDone:()=>g(!1),onIsPendingChange:h})]})}):t.jsx(Un,{title:n.title}),e[23]=x,e[24]=n,e[25]=m,e[26]=c,e[27]=a,e[28]=f,e[29]=y,e[30]=i,e[31]=o,e[32]=w):w=e[32];let N;return e[33]!==w||e[34]!==k?(N=t.jsxs(t.Fragment,{children:[k,w]}),e[33]=w,e[34]=k,e[35]=N):N=e[35],N}function Ln(s){return t.jsxs("div",{className:"flex items-center justify-between gap-3 text-sm",children:[t.jsx("dt",{className:"text-muted-foreground",children:s.label}),t.jsx("dd",{className:"truncate text-foreground",children:Rn(s.key,s.value)})]},s.key)}const et={vtex:{registryAppId:"deco/vtex",checks:49,headline:"Out-of-stock, thin PDPs & attribute gaps across every SKU"},"google-analytics":{registryAppId:"deco/google-analytics",checks:49,headline:"Where revenue leaks between product view and checkout"},"google-search-console":{registryAppId:"deco/google-search-console",checks:49,headline:"Search visibility & indexing gaps across your catalog"}};function Pn(s){const e=E.c(30),{selfClient:n,org:i,cdConnectionId:o}=s;let c;e[0]!==o||e[1]!==i.id||e[2]!==i.slug?(c={connectionId:o,orgId:i.id,orgSlug:i.slug},e[0]=o,e[1]=i.id,e[2]=i.slug,e[3]=c):c=e[3];const r=Ue(c);let a;e[4]!==o||e[5]!==i.id?(a=Q.commerceDiscoveryCompanionSchema(i.id,o),e[4]=o,e[5]=i.id,e[6]=a):a=e[6];let l;e[7]!==r?(l=async()=>{const O=await r.callTool({name:"MCP_CONFIGURATION",arguments:{}});return Z(O)},e[7]=r,e[8]=l):l=e[8];let m;e[9]!==a||e[10]!==l?(m={queryKey:a,queryFn:l},e[9]=a,e[10]=l,e[11]=m):m=e[11];const f=me(m),g=rn(f.data?.stateSchema??{properties:{}}),d=g.map(Gn),h=g.map(Hn).filter(Bn),x=g.filter(Vn).map(qn),j=[...h,...x].sort().join(",");let y;e[12]!==o||e[13]!==i.id?(y=Q.commerceDiscoveryConnection(i.id,o),e[12]=o,e[13]=i.id,e[14]=y):y=e[14];let p;e[15]!==o||e[16]!==n?(p=async()=>{const O=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return Z(O)},e[15]=o,e[16]=n,e[17]=p):p=e[17];let u;e[18]!==y||e[19]!==p?(u={queryKey:y,queryFn:p},e[18]=y,e[19]=p,e[20]=u):u=e[20];const b=me(u).data?.item?.configuration_state??null;let C;e[21]!==b?(C=O=>b?.[O.fieldKey]?.value,e[21]=b,e[22]=C):C=e[22];const _=g.map(C).filter(Kn),k=[...d.map(Fn),...h.map(Mn),..._.map(Dn)].sort().join(","),N=me({queryKey:Q.commerceDiscoveryCompanionConnections(i.id,k),queryFn:async()=>{if(g.length===0)return{items:[]};const O=[{field:["app_name"],operator:"in",value:d},{field:["app_id"],operator:"in",value:h}];_.length>0&&O.push({field:["id"],operator:"in",value:_});const B=await n.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{operator:"or",conditions:O},limit:1e3}});return Z(B)}}).data?.items??[],T=new Set(_),A=N.filter(O=>T.has(O.id)),$=A.filter(An);let I;e[23]!==i.id||e[24]!==i.slug?(I=O=>({queryKey:Q.commerceDiscoveryCompanionOAuthStatus(i.id,O.id),queryFn:async()=>{try{const B=await fetch(`/api/${encodeURIComponent(i.slug)}/connections/${encodeURIComponent(O.id)}/oauth-token/status`,{credentials:"include"});return B.ok?{hasToken:(await B.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}},retry:!1}),e[23]=i.id,e[24]=i.slug,e[25]=I):I=e[25];const R=Jt({queries:$.map(I)});let U;e[26]!==R?(U=(O,B)=>[O.id,R[B]?.data?.hasToken===!0],e[26]=R,e[27]=U):U=e[27];const F=new Map($.map(U)),q={};for(const O of A)q[O.id]=!O.oauth_config||!!O.connection_token||F.get(O.id)===!0;const P=me({queryKey:Q.commerceDiscoveryCompanionRegistry(i.id,j),queryFn:async()=>{if(g.length===0)return{items:[]};const O=ln(h,x),B=await Ht(pt.REGISTRY(i.id),i.id,i.slug,"COLLECTION_REGISTRY_APP_LIST",{...O?{where:O}:{},limit:1e3});return Z(B)}}),K={},D={};for(const O of P.data?.items??[])K[O.id]=O,O.server?.name&&(D[O.server.name]=O);const v=gn({requirements:g,itemsById:K,itemsByName:D,connections:N,connectionReadiness:q,configurationState:b,curated:et});let L;return e[28]!==v?(L={cards:v},e[28]=v,e[29]=L):L=e[29],L}function An(s){return s.oauth_config&&!s.connection_token}function Dn(s){return`linked:${s}`}function Mn(s){return`app:${s}`}function Fn(s){return`binding:${s}`}function Kn(s){return typeof s=="string"&&s.length>0}function qn(s){return s.bindingType}function Vn(s){return!et[s.bindingType]}function Bn(s){return!!s}function Hn(s){return et[s.bindingType]?.registryAppId}function Gn(s){return s.bindingType}function Qn({selfClient:s,org:e,userId:n,cdConnectionId:i}){const o=lt(),[c,r]=M.useState(null),[a,l]=M.useState(null),m=async(g,d)=>{const h=await s.callTool({name:"COLLECTION_CONNECTIONS_UPDATE",arguments:{id:g,data:d}});return Z(h)};async function f(g){r(g.fieldKey),l(null);try{let d=g.candidateConnectionId;if(!d){const u=Gt(g.registryItem,e.id,n,{remoteIndex:0}),S=u.connection_type==="STDIO",b=!!u.connection_url,C=S&&u.connection_headers&&typeof u.connection_headers=="object"&&"command"in u.connection_headers;if(!b&&!C){l(`${g.title} cannot be connected: no connection method available`);return}const _=await s.callTool({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:u}});d=Z(_).item.id}const h=d,x=await en({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:u=>m(h,{connection_token:u}).then(()=>{})});if(!x.ok){l(`Couldn't sign in to ${g.title}: ${x.error}`);return}const j=await s.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:i}}),y=Z(j).item?.configuration_state??null,p=an(y,g.fieldKey,g.bindingType,h);await m(i,{configuration_state:p}),await o.invalidateQueries({queryKey:Q.commerceDiscoveryConnection(e.id,i)}),await o.invalidateQueries({queryKey:Q.commerceDiscoveryCompanionConnectionsPrefix(e.id)})}catch(d){l(d instanceof Error?d.message:String(d))}finally{r(null)}}return{connect:f,connectingFieldKey:c,error:a}}const tt="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-4";function nt(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"grid gap-1.5",children:[t.jsx("p",{className:"text-2xl font-medium text-foreground",children:"Unlock your full diagnostic"}),t.jsx("p",{className:"text-base text-muted-foreground",children:"Connect your tools to unlock 100+ checks across your funnel."})]}),s[0]=e):e=s[0],e}function Wn(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"grid gap-4",children:[0,1,2].map(Yn)}),s[0]=e):e=s[0],e}function Yn(s){return t.jsx(En,{},s)}function Zn(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:tt,children:[t.jsx(nt,{}),t.jsx(Wn,{})]}),s[0]=e):e=s[0],e}function Xn(s){const e=E.c(5),{onRetry:n}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(nt,{}),e[0]=i):i=e[0];let o,c;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("p",{className:"text-sm text-foreground",children:"Couldn't load companion integrations."}),c=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Something went wrong loading your integrations."}),e[1]=o,e[2]=c):(o=e[1],c=e[2]);let r;return e[3]!==n?(r=t.jsxs("div",{className:tt,children:[i,t.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[o,c,t.jsx(V,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:"Try again"})]})]}),e[3]=n,e[4]=r):r=e[4],r}function Jn(s){const e=E.c(2);let n;return e[0]!==s?(n=t.jsx(dt,{children:i=>{const{reset:o}=i;return t.jsx(ut,{fallback:c=>{const{resetError:r}=c;return t.jsx(Xn,{onRetry:()=>{o(),r()}})},children:t.jsx(M.Suspense,{fallback:t.jsx(Zn,{}),children:t.jsx(es,{...s})})})}}),e[0]=s,e[1]=n):n=e[1],n}function es(s){const e=E.c(33),{org:n,cdConnectionId:i,siteUrl:o}=s,{data:c}=We.useSession(),r=c?.user?.id??"";let a;e[0]!==n.id||e[1]!==n.slug?(a={connectionId:gt,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=a):a=e[2];const l=Ue(a);let m;e[3]!==i||e[4]!==n||e[5]!==l?(m={selfClient:l,org:n,cdConnectionId:i},e[3]=i,e[4]=n,e[5]=l,e[6]=m):m=e[6];const{cards:f}=Pn(m);let g;e[7]!==i||e[8]!==n||e[9]!==l||e[10]!==r?(g={selfClient:l,org:n,userId:r,cdConnectionId:i},e[7]=i,e[8]=n,e[9]=l,e[10]=r,e[11]=g):g=e[11];const{connect:d,connectingFieldKey:h,error:x}=Qn(g);if(f.length===0)return null;const j=h!==null;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(nt,{}),e[12]=y):y=e[12];let p;e[13]!==x?(p=x&&t.jsx("p",{role:"alert",className:"text-sm text-destructive",children:x}),e[13]=x,e[14]=p):p=e[14];let u;if(e[15]!==j||e[16]!==f||e[17]!==d||e[18]!==h||e[19]!==n||e[20]!==l||e[21]!==o){let b;e[23]!==j||e[24]!==d||e[25]!==h||e[26]!==n||e[27]!==l||e[28]!==o?(b=C=>t.jsx(Tn,{card:C,connecting:h===C.fieldKey,disabled:j&&h!==C.fieldKey,org:n,selfClient:l,siteUrl:o,onConnect:()=>{d(C)}},C.fieldKey),e[23]=j,e[24]=d,e[25]=h,e[26]=n,e[27]=l,e[28]=o,e[29]=b):b=e[29],u=f.map(b),e[15]=j,e[16]=f,e[17]=d,e[18]=h,e[19]=n,e[20]=l,e[21]=o,e[22]=u}else u=e[22];let S;return e[30]!==p||e[31]!==u?(S=t.jsxs("div",{className:tt,children:[y,t.jsx(qe,{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-[60vh] md:flex-none",children:t.jsxs("div",{className:"grid gap-4",children:[p,u]})})]}),e[30]=p,e[31]=u,e[32]=S):S=e[32],S}const st="https://decocms-tanstack.deco-cx.workers.dev/agendar",ts="Rather have us walk you through it?",ns="Book a 20-minute call and we'll run the diagnostic with you, live.";function St({siteUrl:s,email:e}){const n=new URL(st);return s&&n.searchParams.set("siteUrl",s),e&&n.searchParams.set("email",e),n.toString()}function ss(s){const e=E.c(9),{href:n,size:i,className:o}=s,c=n===void 0?st:n,r=i===void 0?"lg":i;let a;e[0]!==o?(a=X("w-full",o),e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(yt,{size:16}),e[2]=l):l=e[2];let m;e[3]!==c?(m=t.jsxs("a",{href:c,target:"_blank",rel:"noreferrer",children:["Schedule a meeting",l]}),e[3]=c,e[4]=m):m=e[4];let f;return e[5]!==r||e[6]!==a||e[7]!==m?(f=t.jsx(V,{asChild:!0,variant:"outline",size:r,className:a,children:m}),e[5]=r,e[6]=a,e[7]=m,e[8]=f):f=e[8],f}function rt(s){const e=E.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"relative z-10 flex h-12 w-12 items-center justify-center rounded-full border border-border bg-card card-shadow",children:n}),e[0]=n,e[1]=i):i=e[1],i}function is(){const s=E.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(rt,{children:t.jsx(jt,{size:20,className:"text-muted-foreground"})}),s[0]=e):e=s[0];let n;s[1]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"relative mx-4 h-px flex-1 bg-border",children:t.jsx("span",{className:"absolute top-1/2 h-1.5 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-foreground animate-connection-travel","aria-hidden":!0})}),s[1]=n):n=s[1];let i;s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"absolute inset-0 rounded-full border border-foreground/40 animate-connection-arrive","aria-hidden":!0}),s[2]=i):i=s[2];let o;return s[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs("div",{className:"flex items-center justify-between rounded-2xl border border-border/60 bg-muted/40 px-7 py-7",children:[e,n,t.jsxs("div",{className:"relative",children:[i,t.jsxs(rt,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"deco",className:"h-6 w-6 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"deco",className:"hidden h-6 w-6 dark:block"})]})]})]}),s[3]=o):o=s[3],o}function vt(s){const e=E.c(4),{href:n}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(is,{}),e[0]=i):i=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs("div",{className:"grid gap-2",children:[t.jsx("h2",{className:"text-xl font-medium leading-7 text-foreground",children:ts}),t.jsx("p",{className:"text-base leading-6 text-muted-foreground",children:ns})]}),e[1]=o):o=e[1];let c;return e[2]!==n?(c=t.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:t.jsxs("div",{className:"flex w-full max-w-[380px] flex-col gap-6 rounded-3xl border border-border bg-card p-8 card-shadow",children:[i,o,t.jsx(ss,{href:n,size:"xl"})]})}),e[2]=n,e[3]=c):c=e[3],c}function os(s){const e=E.c(8),{className:n,href:i}=s,o=i===void 0?st:i;let c;e[0]!==n?(c=X("flex items-center gap-4 rounded-2xl border border-border bg-card p-5 card-shadow transition-colors hover:bg-accent",n),e[0]=n,e[1]=c):c=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(jt,{size:20})}),e[2]=r):r=e[2];let a,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("span",{className:"flex flex-1 flex-col gap-0.5",children:[t.jsx("span",{className:"text-base font-medium leading-5 text-foreground",children:"Prefer to talk to a human?"}),t.jsx("span",{className:"text-sm leading-5 text-muted-foreground",children:"Book a call and we'll run the diagnostic with you."})]}),l=t.jsx(yt,{size:18,className:"shrink-0 text-muted-foreground"}),e[3]=a,e[4]=l):(a=e[3],l=e[4]);let m;return e[5]!==o||e[6]!==c?(m=t.jsxs("a",{href:o,target:"_blank",rel:"noreferrer",className:c,children:[r,a,l]}),e[5]=o,e[6]=c,e[7]=m):m=e[7],m}function Ct(s){const e=E.c(10),{host:n}=s,i=`https://www.google.com/s2/favicons?domain=${n}&sz=128`;let o,c,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),c=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),r=t.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=o,e[1]=c,e[2]=r):(o=e[0],c=e[1],r=e[2]);let a;e[3]!==i?(a=t.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:t.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=a):a=e[4];let l;e[5]!==n?(l=t.jsx("span",{className:"text-lg font-medium text-foreground",children:n}),e[5]=n,e[6]=l):l=e[6];let m;return e[7]!==a||e[8]!==l?(m=t.jsxs("div",{className:"flex items-center gap-3",children:[o,c,r,a,l]}),e[7]=a,e[8]=l,e[9]=m):m=e[9],m}const rs={route:"Preparing commerce onboarding...",workspace:"Preparing your commerce workspace...",connect:"Connecting workspace...",setup:"Setting up Commerce Discovery...",button:"Setting up"};function Nt(s){return rs[s]}function _t(s){const e=E.c(2),{variant:n}=s;let i;return e[0]!==n?(i=t.jsx(W,{children:t.jsx(ze,{variant:n})}),e[0]=n,e[1]=i):i=e[1],i}function ze(s){const e=E.c(4),{variant:n}=s;let i;e[0]!==n?(i=Nt(n),e[0]=n,e[1]=i):i=e[1];let o;return e[2]!==i?(o=t.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:t.jsx($e,{label:i,className:"text-muted-foreground"})}),e[2]=i,e[3]=o):o=e[3],o}function wt(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx($e,{label:Nt("button")}),s[0]=e):e=s[0],e}function _i(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(as,{}),s[0]=e):e=s[0],e}const kt=M.createContext(null),It=()=>M.useContext(kt);function ls(s){if(!s)return null;const e=Ee(s);return e.ok?new URL(e.value).hostname:null}function as(){const s=E.c(9);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/commerce-onboarding"},s[0]=e):e=s[0];const n=Et(e),{org:i,siteUrl:o}=n;let c;s[1]!==o?(c=ls(o),s[1]=o,s[2]=c):c=s[2];const r=c;let a;s[3]!==i||s[4]!==o?(a=t.jsx(cs,{requestedOrgSlug:i,siteUrl:o}),s[3]=i,s[4]=o,s[5]=a):a=s[5];let l;return s[6]!==r||s[7]!==a?(l=t.jsx(kt.Provider,{value:r,children:a}),s[6]=r,s[7]=a,s[8]=l):l=s[8],l}function cs(s){const e=E.c(8),{requestedOrgSlug:n,siteUrl:i}=s,{data:o,isPending:c}=We.useSession(),r=It();if(c){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(_t,{variant:"route"}),e[0]=l):l=e[0],l}if(!o){const l=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let m;e[1]!==r?(m=r?t.jsx(Ct,{host:r}):void 0,e[1]=r,e[2]=m):m=e[2];let f;return e[3]!==m?(f=t.jsx(W,{children:t.jsx(Rt,{callbackUrl:l,allowAutoLogin:!1,title:"Unlock your full diagnostic",subtitle:null,brand:m})}),e[3]=m,e[4]=f):f=e[4],f}let a;return e[5]!==n||e[6]!==i?(a=t.jsx(ds,{requestedOrgSlug:n,siteUrl:i}),e[5]=n,e[6]=i,e[7]=a):a=e[7],a}function ds(s){const e=E.c(40),{requestedOrgSlug:n,siteUrl:i}=s,o=mt(),c=Tt(),[r,a]=M.useState(null),[l,m]=M.useState(null),f=c.data?.map(ms)??[];let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={mutationFn:us,retry:!1,onSuccess:u=>{m(u)}},e[0]=g):g=e[0];const d=Oe(g);if(c.isPending){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(_t,{variant:"route"}),e[1]=u):u=e[1],u}if(c.error){let u;return e[2]!==c?(u=t.jsx(Te,{title:"We could not load your organizations",description:"Retry to continue commerce setup from this page.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[2]=c,e[3]=u):u=e[3],u}const h=n?f.find(u=>u.slug===n):null;if(h){let u;return e[4]!==h||e[5]!==i?(u=t.jsx(Ie,{org:h,initialSiteUrl:i}),e[4]=h,e[5]=i,e[6]=u):u=e[6],u}if(n){let u;return e[7]!==c?(u=t.jsx(Te,{title:"Organization not found",description:"We could not find that organization for your account.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[7]=c,e[8]=u):u=e[8],u}if(r){let u;return e[9]!==r||e[10]!==i?(u=t.jsx(Ie,{org:r,initialSiteUrl:i}),e[9]=r,e[10]=i,e[11]=u):u=e[11],u}if(f.length===1&&f[0]){let u;return e[12]!==f[0]||e[13]!==i?(u=t.jsx(Ie,{org:f[0],initialSiteUrl:i}),e[12]=f[0],e[13]=i,e[14]=u):u=e[14],u}if(f.length>1){let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ee,{title:"Choose an organization",description:"Select where commerce diagnostics should continue."}),e[15]=u):u=e[15];let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S=C=>a(C),e[16]=S):S=e[16];let b;return e[17]!==f?(b=t.jsx(W,{children:t.jsxs("div",{className:"grid gap-10",children:[u,t.jsx(qe,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:t.jsx(it,{organizations:f,selectLabel:"Continue",onSelected:S})})]})}),e[17]=f,e[18]=b):b=e[18],b}if(!l){let u;e[19]!==d?(u=()=>{d.reset(),d.mutate()},e[19]=d,e[20]=u):u=e[20];let S;return e[21]!==d||e[22]!==u?(S=t.jsx(fs,{mutation:d,onRetry:u}),e[21]=d,e[22]=u,e[23]=S):S=e[23],S}const x=l;if(x?.success&&(x.status==="created"||x.status==="joined"||x.status==="already_has_organization")&&x.organization){let u;return e[24]!==x.organization||e[25]!==i?(u=t.jsx(Ie,{org:x.organization,initialSiteUrl:i}),e[24]=x.organization,e[25]=i,e[26]=u):u=e[26],u}if(x?.status==="ambiguous"&&x.organizations&&x.organizations.length>0){let u;e[27]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ee,{title:"Choose an organization",description:"Your email can access more than one organization. Choose where commerce setup should continue."}),e[27]=u):u=e[27];const S=x.domain??void 0;let b;e[28]!==o||e[29]!==i?(b=(_,k)=>{ft(),a({..._,slug:k}),o({to:"/commerce-onboarding",search:{org:k,siteUrl:i}})},e[28]=o,e[29]=i,e[30]=b):b=e[30];let C;return e[31]!==x.organizations||e[32]!==S||e[33]!==b?(C=t.jsx(W,{children:t.jsxs("div",{className:"grid gap-10",children:[u,t.jsx(qe,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:t.jsx(it,{organizations:x.organizations,domain:S,onJoined:b})})]})}),e[31]=x.organizations,e[32]=S,e[33]=b,e[34]=C):C=e[34],C}const j=x?.error??"We could not determine a commerce organization for this account.";let y;e[35]!==d?(y=()=>{m(null),d.reset()},e[35]=d,e[36]=y):y=e[36];let p;return e[37]!==j||e[38]!==y?(p=t.jsx(Te,{title:"Commerce onboarding needs support",description:j,actionLabel:"Try again",onRetry:y}),e[37]=j,e[38]=y,e[39]=p):p=e[39],p}async function us(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&ft(),e}function ms(s){return{id:s.id,name:s.name,slug:s.slug,logo:s.logo??null}}function fs(s){const e=E.c(7),{mutation:n,onRetry:i}=s,o=M.useRef(!1);let c;e[0]!==n?(c=m=>{!m||o.current||(o.current=!0,n.mutate())},e[0]=n,e[1]=c):c=e[1];const r=c;if(n.error){let m;return e[2]!==i?(m=t.jsx(Te,{title:"Commerce onboarding is unavailable",description:"We could not prepare an organization for commerce setup. Retry from this page or contact support.",actionLabel:"Retry",onRetry:i}),e[2]=i,e[3]=m):m=e[3],m}let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(ze,{variant:"workspace"}),e[4]=a):a=e[4];let l;return e[5]!==r?(l=t.jsx(W,{children:t.jsx("div",{ref:r,children:a})}),e[5]=r,e[6]=l):l=e[6],l}function ee(s){const e=E.c(8),{title:n,description:i}=s,o=It();let c;e[0]!==o?(c=o?t.jsx(Ct,{host:o}):t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=o,e[1]=c):c=e[1];let r;e[2]!==i||e[3]!==n?(r=(n||i)&&t.jsxs("div",{className:"space-y-2",children:[n&&t.jsx("h1",{className:"text-2xl font-medium leading-8",children:n}),i&&t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=n,e[4]=r):r=e[4];let a;return e[5]!==c||e[6]!==r?(a=t.jsxs("div",{className:"grid gap-10",children:[c,r]}),e[5]=c,e[6]=r,e[7]=a):a=e[7],a}function Te(s){const e=E.c(9),{title:n,description:i,actionLabel:o,onRetry:c}=s;let r;e[0]!==i||e[1]!==n?(r=t.jsx(ee,{title:n,description:i}),e[0]=i,e[1]=n,e[2]=r):r=e[2];let a;e[3]!==o||e[4]!==c?(a=t.jsx(V,{type:"button",size:"xl",className:"w-full",onClick:c,children:o}),e[3]=o,e[4]=c,e[5]=a):a=e[5];let l;return e[6]!==r||e[7]!==a?(l=t.jsx(W,{children:t.jsxs("div",{className:"grid gap-10",children:[r,a]})}),e[6]=r,e[7]=a,e[8]=l):l=e[8],l}function ps(s){return s.content?.find(e=>e.text)?.text??"Commerce Discovery setup failed."}function ke(s){const e=s;if(e.isError)throw new Error(ps(e));return e.structuredContent??s}function Ie(s){const e=E.c(10),{org:n,initialSiteUrl:i}=s,{data:o}=We.useSession(),c=o?.user?.email;let r;e[0]!==i||e[1]!==c?(r=St({siteUrl:i,email:c}),e[0]=i,e[1]=c,e[2]=r):r=e[2];const a=r;let l;e[3]!==a?(l=t.jsx(vt,{href:a}),e[3]=a,e[4]=l):l=e[4];const m=l;let f;return e[5]!==i||e[6]!==m||e[7]!==n||e[8]!==o?.user?.email?(f=t.jsx(dt,{children:g=>{const{reset:d}=g;return t.jsx(ut,{fallback:h=>{const{error:x,resetError:j}=h;return t.jsx(W,{visual:m,children:t.jsx(gs,{orgName:n.name,message:x instanceof Error?x.message:"We could not check Commerce Discovery setup.",onRetry:()=>{d(),j()}})})},children:t.jsx(M.Suspense,{fallback:t.jsx(W,{visual:m,children:t.jsx(ze,{variant:"connect"})}),children:t.jsx(hs,{org:n,initialSiteUrl:i,sessionEmail:o?.user?.email},`${n.id}:${i??""}`)})})}}),e[5]=i,e[6]=m,e[7]=n,e[8]=o?.user?.email,e[9]=f):f=e[9],f}function gs(s){const e=E.c(10),{orgName:n,message:i,onRetry:o}=s,c=`Commerce setup will continue for ${n}.`;let r;e[0]!==c?(r=t.jsx(ee,{title:"Commerce diagnostics",description:c}),e[0]=c,e[1]=r):r=e[1];let a;e[2]!==i?(a=t.jsx(ye,{message:i}),e[2]=i,e[3]=a):a=e[3];let l;e[4]!==o?(l=t.jsx(V,{type:"button",size:"xl",className:"w-full",onClick:o,children:"Retry"}),e[4]=o,e[5]=l):l=e[5];let m;return e[6]!==r||e[7]!==a||e[8]!==l?(m=t.jsxs("div",{className:"grid gap-10",children:[r,a,l]}),e[6]=r,e[7]=a,e[8]=l,e[9]=m):m=e[9],m}function hs(s){const e=E.c(104),{org:n,initialSiteUrl:i,sessionEmail:o}=s,c=mt();let r;e[0]!==n.id||e[1]!==n.slug?(r={connectionId:gt,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=r):r=e[2];const a=Ue(r),[l,m]=M.useState(i??""),[f,g]=M.useState(null),[d,h]=M.useState(null),x=M.useRef(!1),j=pt.COMMERCE_DISCOVERY(n.id),y=$t(n.id),p=Q.commerceDiscoveryConnection(n.id,j);let u;e[3]!==j||e[4]!==a?(u=async()=>{const z=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:j}});return ke(z)},e[3]=j,e[4]=a,e[5]=u):u=e[5];let S;e[6]!==p||e[7]!==u?(S={queryKey:p,queryFn:u,retry:!1},e[6]=p,e[7]=u,e[8]=S):S=e[8];const b=me(S),C=Q.commerceDiscoveryVirtualMcp(n.id,y);let _;e[9]!==a||e[10]!==y?(_=async()=>{const z=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:y}});return ke(z)},e[9]=a,e[10]=y,e[11]=_):_=e[11];let k;e[12]!==C||e[13]!==_?(k={queryKey:C,queryFn:_,retry:!1},e[12]=C,e[13]=_,e[14]=k):k=e[14];const w=me(k);let N;e[15]!==a?(N=async z=>{const G=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:z}});return ke(G)},e[15]=a,e[16]=N):N=e[16];let T;e[17]!==b||e[18]!==w?(T=z=>{g(z),h(null),b.refetch(),w.refetch()},e[17]=b,e[18]=w,e[19]=T):T=e[19];let A;e[20]===Symbol.for("react.memo_cache_sentinel")?(A=z=>{h(z instanceof Error?z.message:"Commerce Discovery setup failed.")},e[20]=A):A=e[20];let $;e[21]!==N||e[22]!==T?($={mutationFn:N,retry:!1,onSuccess:T,onError:A},e[21]=N,e[22]=T,e[23]=$):$=e[23];const I=Oe($);let R;e[24]!==a?(R={mutationFn:async z=>{const G=await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:z}});return ke(G)},retry:!1},e[24]=a,e[25]=R):R=e[25];const U=Oe(R),[F,q]=M.useState(null),P=!!b.data.item&&!!w.data.item,K=b.data.item,D=typeof K?.metadata?.siteUrl=="string"?K.metadata.siteUrl:void 0,v=i||l||D||"";let L;e[26]!==v||e[27]!==o?(L=St({siteUrl:v,email:o}),e[26]=v,e[27]=o,e[28]=L):L=e[28];const O=L;let B;e[29]!==O?(B=t.jsx(vt,{href:O}),e[29]=O,e[30]=B):B=e[30];const H=B;let je;e[31]!==I?(je=z=>{const G=Ee(z);if(!G.ok){h(G.error);return}h(null),I.mutate(G.value)},e[31]=I,e[32]=je):je=e[32];const te=je;let be;e[33]!==i||e[34]!==te||e[35]!==P?(be=z=>{!z||x.current||P||!i||(x.current=!0,te(i))},e[33]=i,e[34]=te,e[35]=P,e[36]=be):be=e[36];const Le=be;let Se;e[37]!==te||e[38]!==l?(Se=z=>{z.preventDefault(),te(l)},e[37]=te,e[38]=l,e[39]=Se):Se=e[39];const Y=Se;let ve;e[40]!==j||e[41]!==f?.reportApp||e[42]!==y?(ve=f?.reportApp??{connectionId:j,virtualMcpId:y,toolName:zt},e[40]=j,e[41]=f?.reportApp,e[42]=y,e[43]=ve):ve=e[43];const J=ve;let Ce;e[44]!==v||e[45]!==c||e[46]!==n.slug||e[47]!==J||e[48]!==U?(Ce=async()=>{q(null);const z=Ee(v);if(z.ok)try{await U.mutateAsync(z.value)}catch{q("Algo deu errado ao gerar seu relatório. Tente novamente em instantes.");return}localStorage.setItem(Ot.sidebarOpen(),JSON.stringify(!1)),c({to:"/$org/$taskId",params:{org:n.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:J.virtualMcpId,main:Ut(J.connectionId,J.toolName),chat:0}})},e[44]=v,e[45]=c,e[46]=n.slug,e[47]=J,e[48]=U,e[49]=Ce):Ce=e[49];const Pe=Ce;if(P){let z;return e[50]!==O||e[51]!==H||e[52]!==v||e[53]!==Pe||e[54]!==n||e[55]!==J||e[56]!==F||e[57]!==U.isPending?(z=t.jsx(xs,{org:n,reportApp:J,onOpenReport:Pe,isSubmitting:U.isPending,error:F,meetingUrl:O,meetingVisual:H,siteUrl:v}),e[50]=O,e[51]=H,e[52]=v,e[53]=Pe,e[54]=n,e[55]=J,e[56]=F,e[57]=U.isPending,e[58]=z):z=e[58],z}if(i){let z;e[59]!==i?(z=Ee(i),e[59]=i,e[60]=z):z=e[60];const G=z;if(!G.ok){const Me=`Commerce setup will continue for ${n.name}.`;let ae;e[61]!==Me?(ae=t.jsx(ee,{title:"Commerce diagnostics",description:Me}),e[61]=Me,e[62]=ae):ae=e[62];let ce;e[63]!==G.error?(ce=t.jsx(ye,{message:G.error}),e[63]=G.error,e[64]=ce):ce=e[64];let de;e[65]!==Y||e[66]!==d||e[67]!==I.isPending||e[68]!==l?(de=t.jsx(Ke,{siteUrl:l,error:d,isSubmitting:I.isPending,onSiteUrlChange:m,onSubmit:Y}),e[65]=Y,e[66]=d,e[67]=I.isPending,e[68]=l,e[69]=de):de=e[69];let ue;e[70]!==ae||e[71]!==ce||e[72]!==de?(ue=t.jsxs("div",{className:"grid gap-10",children:[ae,ce,de]}),e[70]=ae,e[71]=ce,e[72]=de,e[73]=ue):ue=e[73];let we;return e[74]!==H||e[75]!==ue?(we=t.jsx(W,{visual:H,children:ue}),e[74]=H,e[75]=ue,e[76]=we):we=e[76],we}const De=`Commerce Discovery is being prepared for ${G.value}.`;let oe;e[77]!==De?(oe=t.jsx(ee,{title:"Commerce diagnostics",description:De}),e[77]=De,e[78]=oe):oe=e[78];let re;e[79]!==Y||e[80]!==d||e[81]!==I||e[82]!==l?(re=d?t.jsxs(t.Fragment,{children:[t.jsx(ye,{message:d}),t.jsx(Ke,{siteUrl:l,error:null,isSubmitting:I.isPending,onSiteUrlChange:m,onSubmit:Y})]}):t.jsx(ze,{variant:"setup"}),e[79]=Y,e[80]=d,e[81]=I,e[82]=l,e[83]=re):re=e[83];let le;e[84]!==oe||e[85]!==re||e[86]!==Le?(le=t.jsxs("div",{ref:Le,className:"grid gap-10",children:[oe,re]}),e[84]=oe,e[85]=re,e[86]=Le,e[87]=le):le=e[87];let _e;return e[88]!==H||e[89]!==le?(_e=t.jsx(W,{visual:H,children:le}),e[88]=H,e[89]=le,e[90]=_e):_e=e[90],_e}const Ae=`Commerce setup will continue for ${n.name}.`;let ne;e[91]!==Ae?(ne=t.jsx(ee,{title:"Commerce diagnostics",description:Ae}),e[91]=Ae,e[92]=ne):ne=e[92];let se;e[93]!==Y||e[94]!==d||e[95]!==I.isPending||e[96]!==l?(se=t.jsx(Ke,{siteUrl:l,error:d,isSubmitting:I.isPending,onSiteUrlChange:m,onSubmit:Y}),e[93]=Y,e[94]=d,e[95]=I.isPending,e[96]=l,e[97]=se):se=e[97];let ie;e[98]!==ne||e[99]!==se?(ie=t.jsxs("div",{className:"grid gap-10",children:[ne,se]}),e[98]=ne,e[99]=se,e[100]=ie):ie=e[100];let Ne;return e[101]!==H||e[102]!==ie?(Ne=t.jsx(W,{visual:H,children:ie}),e[101]=H,e[102]=ie,e[103]=Ne):Ne=e[103],Ne}function Ke(s){const e=E.c(22),{siteUrl:n,error:i,isSubmitting:o,onSiteUrlChange:c,onSubmit:r}=s;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"Website URL"}),e[0]=a):a=e[0];let l;e[1]!==c?(l=y=>c(y.target.value),e[1]=c,e[2]=l):l=e[2];const m=!!i;let f;e[3]!==o||e[4]!==n||e[5]!==l||e[6]!==m?(f=t.jsx(Re,{id:"commerce-site-url",type:"text",inputMode:"url",value:n,onChange:l,placeholder:"https://example.com","aria-invalid":m,disabled:o}),e[3]=o,e[4]=n,e[5]=l,e[6]=m,e[7]=f):f=e[7];let g;e[8]!==i?(g=i?t.jsx(ye,{message:i}):null,e[8]=i,e[9]=g):g=e[9];let d;e[10]!==f||e[11]!==g?(d=t.jsxs("div",{className:"grid gap-2",children:[a,f,g]}),e[10]=f,e[11]=g,e[12]=d):d=e[12];let h;e[13]!==o?(h=o?t.jsx(wt,{}):t.jsxs(t.Fragment,{children:["Continue",t.jsx(ht,{size:16})]}),e[13]=o,e[14]=h):h=e[14];let x;e[15]!==o||e[16]!==h?(x=t.jsx(V,{type:"submit",size:"xl",className:"w-full",disabled:o,children:h}),e[15]=o,e[16]=h,e[17]=x):x=e[17];let j;return e[18]!==r||e[19]!==d||e[20]!==x?(j=t.jsxs("form",{className:"grid gap-4",onSubmit:r,children:[d,x]}),e[18]=r,e[19]=d,e[20]=x,e[21]=j):j=e[21],j}function xs(s){const e=E.c(25),{org:n,reportApp:i,onOpenReport:o,isSubmitting:c,error:r,meetingUrl:a,meetingVisual:l,siteUrl:m}=s;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ee,{}),e[0]=f):f=e[0];let g;e[1]!==n||e[2]!==i.connectionId||e[3]!==m?(g=t.jsx(Jn,{org:n,cdConnectionId:i.connectionId,siteUrl:m}),e[1]=n,e[2]=i.connectionId,e[3]=m,e[4]=g):g=e[4];let d;e[5]!==a?(d=t.jsx(os,{className:"md:hidden",href:a}),e[5]=a,e[6]=d):d=e[6];let h;e[7]!==r?(h=r?t.jsx(ye,{message:r}):null,e[7]=r,e[8]=h):h=e[8];const x=c||!i.virtualMcpId;let j;e[9]!==c?(j=c?t.jsx(wt,{}):t.jsxs(t.Fragment,{children:["See full report",t.jsx(ht,{size:18})]}),e[9]=c,e[10]=j):j=e[10];let y;e[11]!==o||e[12]!==x||e[13]!==j?(y=t.jsx(V,{type:"button",size:"xl",className:"w-full rounded-2xl text-base font-medium",onClick:o,disabled:x,children:j}),e[11]=o,e[12]=x,e[13]=j,e[14]=y):y=e[14];let p;e[15]!==d||e[16]!==h||e[17]!==y?(p=t.jsxs("div",{className:"flex shrink-0 flex-col gap-3 md:mt-8",children:[d,h,y]}),e[15]=d,e[16]=h,e[17]=y,e[18]=p):p=e[18];let u;e[19]!==g||e[20]!==p?(u=t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[f,g,p]}),e[19]=g,e[20]=p,e[21]=u):u=e[21];let S;return e[22]!==l||e[23]!==u?(S=t.jsx(W,{align:"fill",visual:l,children:u}),e[22]=l,e[23]=u,e[24]=S):S=e[24],S}function ye(s){const e=E.c(2),{message:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:n}),e[0]=n,e[1]=i):i=e[1],i}export{_i as default};