decocms 4.499.3 → 4.500.0

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 (374) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-DgcQq6OT.js → ActiveShapeUtils-CHPU_j8T.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-CKip96zJ.js → AlertCircle-CgfWDsMW.js} +1 -1
  3. package/dist/client/assets/{AreaChart-D-FKmMV3.js → AreaChart-CZuIkHuk.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DWXC5SxX.js → ArrowLeft-BkyozCr0.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Dg7Kez2q.js → ArrowUp-C0O7U47F.js} +1 -1
  6. package/dist/client/assets/{BarChart-BI8-_eKz.js → BarChart-D_Vp8_nk.js} +1 -1
  7. package/dist/client/assets/{Building02-BhbGM34V.js → Building02-C5UvSZSt.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-Nb2-Y2lc.js → CategoricalChart-CYT1jRTo.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-CHf8-Blx.js → CheckCircle-B1cLRmIj.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-B8uBkzm6.js → ChevronSelectorVertical-bEeSv3mr.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-DdJdulw6.js → ChevronUp-D_qU7VrJ.js} +1 -1
  12. package/dist/client/assets/{Copy01-Tr_gU1aK.js → Copy01-CT_cEqll.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-Cv44glOw.js → CreditCard01-DFGzM4td.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-9_2O7H2x.js → DotsVertical-CGu7Zbqo.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-CSAzz0sp.js → ErrorBarContext-BOQmu79L.js} +1 -1
  16. package/dist/client/assets/{Globe04-D3iPe8Pc.js → Globe04-DtoCZsmb.js} +1 -1
  17. package/dist/client/assets/{Image01-BfROTBI_.js → Image01-CyU1b2Nz.js} +1 -1
  18. package/dist/client/assets/{Key01-BeLvSel3.js → Key01-CV4MPPMx.js} +1 -1
  19. package/dist/client/assets/{Link01-Cej02QtC.js → Link01-BL0KHGWk.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-C4y5s5BD.js → LinkBroken01-CImL6HGl.js} +1 -1
  21. package/dist/client/assets/{Monitor01-CDLuLXD2.js → Monitor01-jDiltU3l.js} +1 -1
  22. package/dist/client/assets/{Play-WH2tJGci.js → Play-HeD-LWQ6.js} +1 -1
  23. package/dist/client/assets/{Plus-B7ghEA56.js → Plus-BzLmRH_e.js} +1 -1
  24. package/dist/client/assets/{SearchMd-DyqBdeBV.js → SearchMd-X-m-ot0f.js} +1 -1
  25. package/dist/client/assets/{Sector-CR2hSKiQ.js → Sector-Dk1WFIe-.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-BZ853zJ_.js → ShoppingBag01-C30WMfg1.js} +1 -1
  27. package/dist/client/assets/{Sun-uTZ6vkYv.js → Sun-D5cuTnns.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-CaMjqXcB.js → SwitchHorizontal01-iT36Ixqz.js} +1 -1
  29. package/dist/client/assets/{Tool01-DznnxM5_.js → Tool01-BLdqmAM-.js} +1 -1
  30. package/dist/client/assets/{Trash01-_5jcVImt.js → Trash01-DkcAHDGj.js} +1 -1
  31. package/dist/client/assets/{Upload01-thivCY-D.js → Upload01-CJxfk4_B.js} +1 -1
  32. package/dist/client/assets/{User01-B9FM9Mf_.js → User01-CuJbE_Yd.js} +1 -1
  33. package/dist/client/assets/{UserSquare-CyTwJikM.js → UserSquare-BlSFjBrQ.js} +1 -1
  34. package/dist/client/assets/{Users01-BZbPKUiW.js → Users01-CgCEjxiR.js} +1 -1
  35. package/dist/client/assets/{XAxis-CD5mzHHS.js → XAxis-B6hTknR7.js} +1 -1
  36. package/dist/client/assets/{XClose-CfzTTVMn.js → XClose-BcQlXPoY.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-C1q2p3OF.js → ZoomOut-C_NtAfgt.js} +1 -1
  38. package/dist/client/assets/{access-gate-Bxq1Hlbn.js → access-gate-0Qu33vtT.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-BGTbgW-i.js → add-connection-dialog-CmVGiYmi.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-CDewKQCM.js → agent-analytics-DbQCZ1PQ.js} +1 -1
  41. package/dist/client/assets/agent-app-BExNHlBs.js +1 -0
  42. package/dist/client/assets/{agent-assets-DfijL9Fx.js → agent-assets-B-t0qw5_.js} +1 -1
  43. package/dist/client/assets/{agent-automation-BvBJkvGT.js → agent-automation-AdWBGK9-.js} +1 -1
  44. package/dist/client/assets/{agent-automations-9wDIPFhf.js → agent-automations-x2lM3jDX.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-DXnppISv.js → agent-connect-sources-DygiFIri.js} +1 -1
  46. package/dist/client/assets/agent-deck-GAA8uH06.js +1 -0
  47. package/dist/client/assets/{agent-e2e-CP-dgiPD.js → agent-e2e-CDURPj47.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-BsCiftRb.js → agent-experiments-BIa2lB5Q.js} +1 -1
  49. package/dist/client/assets/{agent-file-DQXP6Kie.js → agent-file-BKXQWZUy.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-lv0YqG7F.js → agent-hosting-BYQZVYMZ.js} +1 -1
  51. package/dist/client/assets/{agent-icon-BzQJojFn.js → agent-icon-CsQzAnP1.js} +1 -1
  52. package/dist/client/assets/agent-library-CJXihsv5.js +1 -0
  53. package/dist/client/assets/agent-library-file-Cnv04MVV.js +1 -0
  54. package/dist/client/assets/{agent-monitor-DIWW-oja.js → agent-monitor-CCT32NKJ.js} +1 -1
  55. package/dist/client/assets/{agent-overview-zU7UtX4N.js → agent-overview-dfgPX_7d.js} +1 -1
  56. package/dist/client/assets/agent-settings-BTMD0j_l.js +1 -0
  57. package/dist/client/assets/{agent-site-editor-6IARQa9S.js → agent-site-editor-CG3fYjTa.js} +1 -1
  58. package/dist/client/assets/agent-site-editor-code-Crxw0pRq.js +2 -0
  59. package/dist/client/assets/{agent-site-editor-content-BoR7A3J6.js → agent-site-editor-content-5eCWHoNS.js} +3 -3
  60. package/dist/client/assets/{agent-site-editor-preview-CHew1bNX.js → agent-site-editor-preview-uwuaRHqi.js} +3 -3
  61. package/dist/client/assets/agent-view-DVbx7Not.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-3DhesBoI.js → agent-view-guard-e44iAytb.js} +1 -1
  63. package/dist/client/assets/{agents-list-dewnUR-7.js → agents-list-C2x26zj4.js} +1 -1
  64. package/dist/client/assets/ai-providers-DwXqL2iz.js +6 -0
  65. package/dist/client/assets/{alert-Cr5T7eOh.js → alert-DYD14Lxr.js} +1 -1
  66. package/dist/client/assets/{alert-dialog-CAM3tof4.js → alert-dialog-D2yDyccd.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-DOa20DSv.js → analytics-sections-CYXgA9AC.js} +1 -1
  68. package/dist/client/assets/api-keys-B_VU2t2_.js +1 -0
  69. package/dist/client/assets/{api-keys-D9dIGDrT.js → api-keys-BtQl5Awe.js} +1 -1
  70. package/dist/client/assets/app-editor-fWZMbht-.js +1 -0
  71. package/dist/client/assets/{asset-utils-koOjLbnD.js → asset-utils-cuI-wo7N.js} +1 -1
  72. package/dist/client/assets/{auth-CZA10nCD.js → auth-CsAAW7Ar.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-D9UTG4dS.js → auth-catchall-CDMks_Rc.js} +1 -1
  74. package/dist/client/assets/{auth-entry-_sycQOT3.js → auth-entry-Cwn8f6E3.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout-Ch6Z-FVb.js → auth-split-layout-DFsDNY_O.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth-CxfxW_rA.js → authenticate-and-persist-oauth-HfpfV8ZS.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-B8-Gomxx.js → automation-list-row-Bgtl2dei.js} +1 -1
  78. package/dist/client/assets/{automation-runs-BnEMFtu-.js → automation-runs-CBT3E_fm.js} +1 -1
  79. package/dist/client/assets/{automations-CoFLQY3y.js → automations-BSD8vInf.js} +1 -1
  80. package/dist/client/assets/{autosend-DutXByr0.js → autosend-8ZqTuUx9.js} +1 -1
  81. package/dist/client/assets/{avatar-DeVcKUjn.js → avatar-Da-P84-z.js} +1 -1
  82. package/dist/client/assets/{badge-BRYJjM8m.js → badge-CJ5q8uJu.js} +1 -1
  83. package/dist/client/assets/{block-document-Mhky6a-Y.js → block-document-Drzpg_bb.js} +1 -1
  84. package/dist/client/assets/{blocks-preview-workspace-context-DzJ8SMZ1.js → blocks-preview-workspace-context-CJnlWxc-.js} +1 -1
  85. package/dist/client/assets/{blog-schema-CAX9wXaL.js → blog-schema-WI1e8zgj.js} +1 -1
  86. package/dist/client/assets/{board-analytics-D110DxNA.js → board-analytics-Cla3ZHOc.js} +1 -1
  87. package/dist/client/assets/{buckets-C9rFvK2M.js → buckets-BO0Sw74J.js} +1 -1
  88. package/dist/client/assets/{build-improve-prompt-doc-DR2Es921.js → build-improve-prompt-doc-BWoapP6S.js} +1 -1
  89. package/dist/client/assets/{calendar-CKSj2y-l.js → calendar-DKYy6uOJ.js} +1 -1
  90. package/dist/client/assets/{capability-load-error-C29lQbTt.js → capability-load-error-DGJphxbe.js} +1 -1
  91. package/dist/client/assets/{category-editor-zrsILNC7.js → category-editor-C6uMv0OA.js} +1 -1
  92. package/dist/client/assets/{chart-BGPsHSIz.js → chart-CUhY88so.js} +1 -1
  93. package/dist/client/assets/chat-context-y8u3K9Tq.js +39 -0
  94. package/dist/client/assets/{chat-draft-BrKCO6YT.js → chat-draft-RqSOe2VX.js} +1 -1
  95. package/dist/client/assets/{checkbox-CVc_t6AM.js → checkbox-cuQOxwwj.js} +1 -1
  96. package/dist/client/assets/{choose-editor-DXM40rwk.js → choose-editor-DVY0m-0N.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy-DhUnD0f3.js → claim-phase-copy-kSJ81npa.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-B_LhHRr2.js → cli-auth-success-BNNiQ0ff.js} +1 -1
  99. package/dist/client/assets/{client-icons-CeVn-7HQ.js → client-icons-k3K_Wm7m.js} +1 -1
  100. package/dist/client/assets/{collapsible-RIZMF3og.js → collapsible-DEfXG6Ht.js} +1 -1
  101. package/dist/client/assets/{collection-detail-BNdoguU8.js → collection-detail-CUR7b1nw.js} +1 -1
  102. package/dist/client/assets/{collection-display-button-B05GAPuS.js → collection-display-button-Bii74DZw.js} +1 -1
  103. package/dist/client/assets/{collection-search-BhTdq2ic.js → collection-search-C-3HPALa.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-iLWfdfAw.js → collection-table-wrapper-BI9XAUwm.js} +1 -1
  105. package/dist/client/assets/{collection-tabs-hvD3R6sE.js → collection-tabs-BNpEfqyd.js} +1 -1
  106. package/dist/client/assets/{column-rules-BmNAI4d1.js → column-rules-B7pcw_Gh.js} +1 -1
  107. package/dist/client/assets/{combobox-BP3ADxyT.js → combobox-ylZ1_mxm.js} +1 -1
  108. package/dist/client/assets/{command-CfJ_yZL1.js → command-d2fvY4gQ.js} +1 -1
  109. package/dist/client/assets/{companion-mcps-section-vz_F8aij.js → companion-mcps-section--NCFPgCd.js} +1 -1
  110. package/dist/client/assets/{config-qgEB96wk.js → config-BDYRd6Wk.js} +1 -1
  111. package/dist/client/assets/{connect-CmA_24Lv.js → connect-CKDAuMYC.js} +1 -1
  112. package/dist/client/assets/{connect-layout-Df-yaTtv.js → connect-layout-Ca1Vr3vz.js} +1 -1
  113. package/dist/client/assets/{connection-BjQqCa6n.js → connection-DGqqVA7M.js} +1 -1
  114. package/dist/client/assets/{connection-card-B5kZBtAI.js → connection-card-gIhz0wdg.js} +1 -1
  115. package/dist/client/assets/{connection-detail-llruLhvc.js → connection-detail-B9omyXwb.js} +1 -1
  116. package/dist/client/assets/{connection-form-helpers-BiaAn5T-.js → connection-form-helpers-A2MriNrX.js} +1 -1
  117. package/dist/client/assets/{connections-Rhsq_PHY.js → connections-Dh4JuodF.js} +1 -1
  118. package/dist/client/assets/{context-k9qseXLi.js → context-BnF04rBC.js} +1 -1
  119. package/dist/client/assets/{context-menu-B1iKTjcY.js → context-menu-BD-010iM.js} +1 -1
  120. package/dist/client/assets/{core.esm-BDr1jUfa.js → core.esm-BH3HyyF2.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-C3LOlpX9.js → create-organization-dialog-DjZlmVnS.js} +1 -1
  122. package/dist/client/assets/{daily-pulse-D0hL2Mgc.js → daily-pulse-BXDtpJQU.js} +1 -1
  123. package/dist/client/assets/{device-hint-JTf0kvkS.js → device-hint-CN2khPPs.js} +1 -1
  124. package/dist/client/assets/{discover-BYjmCOgU.js → discover-C-mYnXQB.js} +1 -1
  125. package/dist/client/assets/{domain-settings-8ti6F4Nt.js → domain-settings-BEwECWE8.js} +1 -1
  126. package/dist/client/assets/{drawer-NA8X67Cn.js → drawer-DybzZn1x.js} +1 -1
  127. package/dist/client/assets/{editor-D7dKbHsZ.js → editor-CBqQFFb9.js} +1 -1
  128. package/dist/client/assets/{empty-state-CXB5kfzH.js → empty-state-B4qRMioD.js} +1 -1
  129. package/dist/client/assets/{empty-state-DZ11Jnto.js → empty-state-b6tRqzU8.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-BTRj6ggn.js → extract-connection-data-CIO9f-TD.js} +1 -1
  131. package/dist/client/assets/{feature-gate-DUnCy-Qc.js → feature-gate-ChDRcm7b.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-BtZlJS8N.js → feature-paywall-BN5FphJ8.js} +1 -1
  133. package/dist/client/assets/{file-explorer-ahAqk6OL.js → file-explorer-DCd1-8-d.js} +1 -1
  134. package/dist/client/assets/{file-preview-DLq_TOpg.js → file-preview-CNp5DdHM.js} +1 -1
  135. package/dist/client/assets/{file-share-button-Boymlg-_.js → file-share-button-DOQq6Wrq.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-CR_8nRKJ.js → file-type-icon-ClWl2ykw.js} +1 -1
  137. package/dist/client/assets/flat-project-DPnFbnmE.js +1 -0
  138. package/dist/client/assets/{folder-icon-BKmLVsTk.js → folder-icon-BO5Hlc-b.js} +1 -1
  139. package/dist/client/assets/{form-BBSMmS7M.js → form-Dm1N7Fdz.js} +1 -1
  140. package/dist/client/assets/{general-C_ztpdNf.js → general-CszMiv7n.js} +1 -1
  141. package/dist/client/assets/{home-B4BBGMuj.js → home-DT4jq_ad.js} +1 -1
  142. package/dist/client/assets/{icon-button-DkGaGjbK.js → icon-button-UzqZkmgc.js} +1 -1
  143. package/dist/client/assets/{index-CIkbTjtJ.js → index-B4rQ5Ej9.js} +1 -1
  144. package/dist/client/assets/{index-CWwSTXul.js → index-BA22z-aT.js} +1 -1
  145. package/dist/client/assets/{index-JcJUDiMG.js → index-BkaImz4P.js} +1 -1
  146. package/dist/client/assets/{index-BFNmnlkM.js → index-CeuDCj_w.js} +1 -1
  147. package/dist/client/assets/{index-Dv-VqjPz.js → index-ChAMt2d-.js} +1 -1
  148. package/dist/client/assets/{index-BEWyz4IL.js → index-ClN0hPjk.js} +1 -1
  149. package/dist/client/assets/{index-CvkEkbZF.js → index-D984WV3U.js} +39 -39
  150. package/dist/client/assets/{index-m_iMIYWi.js → index-DXSiv_GM.js} +3 -3
  151. package/dist/client/assets/{index-CtrX9wjc.js → index-DiGKvbHH.js} +1 -1
  152. package/dist/client/assets/{index-wv7M3764.js → index-Dq9ehfIf.js} +1 -1
  153. package/dist/client/assets/{index-DNz5LfZo.js → index-QP5dyfS7.js} +1 -1
  154. package/dist/client/assets/{index-Cz6k2mHL.js → index-ba_EB2Zw.js} +1 -1
  155. package/dist/client/assets/{index-redirect-uIRRxmIA.js → index-redirect-8HspsPDC.js} +1 -1
  156. package/dist/client/assets/{index-C6YI2JtB.js → index-z9lysifj.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-D-zgijef.js → infiniteQueryObserver-Bmwf-SCt.js} +1 -1
  158. package/dist/client/assets/{infra-billing-B_ALAMr6.js → infra-billing-DlP3vLBN.js} +1 -1
  159. package/dist/client/assets/{input-BqrqWGgY.js → input-CG0PFhS0.js} +1 -1
  160. package/dist/client/assets/input-C_t2NUbp.js +17 -0
  161. package/dist/client/assets/{integration-icon-Cie7dlB4.js → integration-icon-B4EO_1fi.js} +1 -1
  162. package/dist/client/assets/{jira-icon-B-lNy42i.js → jira-icon-DAy3a9S9.js} +1 -1
  163. package/dist/client/assets/{label-B7m6NrjR.js → label-BszVxI8j.js} +1 -1
  164. package/dist/client/assets/{layout-Gg6sfuOK.js → layout-BsHSUbxL.js} +1 -1
  165. package/dist/client/assets/{legacy-agents-deep-BSjkPeUW.js → legacy-agents-deep-DCBghYlF.js} +1 -1
  166. package/dist/client/assets/{legacy-main-redirect-DGr5DSt-.js → legacy-main-redirect-C_9Fyd8e.js} +1 -1
  167. package/dist/client/assets/library-C2ZRDo2P.js +1 -0
  168. package/dist/client/assets/{library-tab-Bx7zV5q2.js → library-tab-CZxlOQVR.js} +1 -1
  169. package/dist/client/assets/{login-BvuIcKwC.js → login-CoP-xpgM.js} +1 -1
  170. package/dist/client/assets/{markdown-Cyku6Bit.js → markdown-C8b2SRJt.js} +1 -1
  171. package/dist/client/assets/{mcp-app-renderer-_GpfDdeh.js → mcp-app-renderer-qrtR9Z1h.js} +1 -1
  172. package/dist/client/assets/{mcp-oauth-DeKiTKLu.js → mcp-oauth--_7bIOac.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-oyIK_tB1.js → mcp-oauth-BIr9y8Ow.js} +1 -1
  174. package/dist/client/assets/{members-DNBLZQhM.js → members-DX1jVu8f.js} +1 -1
  175. package/dist/client/assets/{memory-BtqyTWr8.js → memory-DGqh7MMN.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-DfIvIWa4.js → mini-report-page-DeT726Qz.js} +1 -1
  177. package/dist/client/assets/{mock-board-xsoKwtdR.js → mock-board-DiXeO9l9.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-BcVwR88i.js → monaco-editor-BmtkWb9u.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-DNdMRFxn.js → monitoring-stats-row-CROD4XJo.js} +1 -1
  180. package/dist/client/assets/{multi-select-CfULd_Rx.js → multi-select-COcK2vp_.js} +1 -1
  181. package/dist/client/assets/{mustache-o_TIeFdF.js → mustache-B3B0mlPh.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-CCTwabFu.js → new-project-dialog-CQomS8HX.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-DP4tF534.js → oauth-callback-BAjl2hrI.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-DnRBh9uO.js → oauth-callback-ai-provider-Dfitdf7t.js} +1 -1
  185. package/dist/client/assets/{onboarding-yow8oG4G.js → onboarding-DuW4ryZs.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-d_Xs65HZ.js → openai-conversation-klLH_0HC.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-9OadUgjT.js → optimistic-project-sidebar-views-CaTvAXwY.js} +1 -1
  188. package/dist/client/assets/{organization-choice-CDDi_uTO.js → organization-choice-DtdFVbBZ.js} +1 -1
  189. package/dist/client/assets/{orgs-CUmDeH_J.js → orgs-BBq2qsW_.js} +1 -1
  190. package/dist/client/assets/{page-seo-form--bS1Q_MY.js → page-seo-form-BJN0O5_N.js} +1 -1
  191. package/dist/client/assets/{pair-Bjrecdzi.js → pair-D3dg1naQ.js} +1 -1
  192. package/dist/client/assets/{plan-ladder-B2h7Dujg.js → plan-ladder-DUQWM1mB.js} +1 -1
  193. package/dist/client/assets/{popover-KZcyVDI5.js → popover-9tPVAoH5.js} +1 -1
  194. package/dist/client/assets/{post-calendar-Fmw8glqd.js → post-calendar-D9oVrQhS.js} +1 -1
  195. package/dist/client/assets/{post-editor-Dsj5Ibag.js → post-editor-C2tsxtV4.js} +1 -1
  196. package/dist/client/assets/{preview-content-Dh8Rmbe6.js → preview-content-BIpDQXJu.js} +1 -1
  197. package/dist/client/assets/{preview-dialog-Bml9zm4Y.js → preview-dialog-CH8GibCu.js} +1 -1
  198. package/dist/client/assets/{preview-panel-B_1L-tuG.js → preview-panel-CCFjojUE.js} +1 -1
  199. package/dist/client/assets/{product-picker-dialog-DoSgNDYX.js → product-picker-dialog-BoGvkEwe.js} +1 -1
  200. package/dist/client/assets/{profile-DjPOIV3n.js → profile-BKpvrH_P.js} +1 -1
  201. package/dist/client/assets/{project-app-view-DhXwsdyH.js → project-app-view-0HH2t56F.js} +1 -1
  202. package/dist/client/assets/{project-feed-Cg0FAsjP.js → project-feed-d2kKPzOq.js} +1 -1
  203. package/dist/client/assets/{project-icon-Da9vkmla.js → project-icon-DeUPWsC_.js} +1 -1
  204. package/dist/client/assets/project-reports-7r3buXCO.js +1 -0
  205. package/dist/client/assets/project-tasks-Dp-gjCz7.js +1 -0
  206. package/dist/client/assets/{projects--BD3Pi5O.js → projects-dI6btB5J.js} +1 -1
  207. package/dist/client/assets/{projects-empty-state-mNzYEnJq.js → projects-empty-state-DAa4wzAP.js} +1 -1
  208. package/dist/client/assets/{prompts-867OeL4C.js → prompts-D3LKfm14.js} +1 -1
  209. package/dist/client/assets/record-editor-BDN9ztWf.js +1 -0
  210. package/dist/client/assets/redirect-editor-DBLjC8Z9.js +1 -0
  211. package/dist/client/assets/{reports-CDcs9KF3.js → reports-B5aLNQGc.js} +1 -1
  212. package/dist/client/assets/reports-CvKnRIKX.js +1 -0
  213. package/dist/client/assets/{reports-onboarding-C1hpBv4P.js → reports-onboarding-D7Nsv0TX.js} +1 -1
  214. package/dist/client/assets/{reports-tab-ChkUNvxL.js → reports-tab-bgB5WodW.js} +2 -2
  215. package/dist/client/assets/{repositories-cVNrUSk6.js → repositories-Du_yi0rf.js} +1 -1
  216. package/dist/client/assets/{repository-binding-Diab2gJI.js → repository-binding-CrIQbyJh.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-CAPqT49B.js → repository-import-picker-n3EYoF9U.js} +1 -1
  218. package/dist/client/assets/{repository-picker-wpyEK2Xc.js → repository-picker-CjDs0ici.js} +1 -1
  219. package/dist/client/assets/{require-capability-BVRaCsRX.js → require-capability-BDLtPaM5.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-BlMmzcBE.js → required-auth-layout-CTKRCLps.js} +1 -1
  221. package/dist/client/assets/{reset-password-DEXRYELW.js → reset-password-XiFYESJ5.js} +1 -1
  222. package/dist/client/assets/{resizable-B1DqKMtx.js → resizable-C3INc4c7.js} +1 -1
  223. package/dist/client/assets/{resolve-tab-icon-B4Xubt6P.js → resolve-tab-icon-DuWtsFCw.js} +1 -1
  224. package/dist/client/assets/{review-settings-x4SlctNv.js → review-settings-BCvIwiTZ.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-C0PrMBov.js → rich-text-link-control-B2KML_yp.js} +1 -1
  226. package/dist/client/assets/roles-B5KIhtIL.js +1 -0
  227. package/dist/client/assets/{route-DZ6_uTYn.js → route-BwivpFZQ.js} +1 -1
  228. package/dist/client/assets/route-Fylk_TVt.js +1 -0
  229. package/dist/client/assets/route-nHlGvnBX.js +1 -0
  230. package/dist/client/assets/{runnable-block-editor-BbKz7DQH.js → runnable-block-editor-v2diysES.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-DOC3PBsO.js → sandbox-lifecycle-context-CtphXAh2.js} +1 -1
  232. package/dist/client/assets/schema-BMqZTcjW.js +1 -0
  233. package/dist/client/assets/{scroll-area-ClRSjtLV.js → scroll-area-B9YHNZjL.js} +1 -1
  234. package/dist/client/assets/{search-input-9d3onxt-.js → search-input-BJ-xb_6w.js} +1 -1
  235. package/dist/client/assets/{search-toggle-BFbMmpZT.js → search-toggle-DviE2KK7.js} +1 -1
  236. package/dist/client/assets/{secret-picker-4GV6jMAI.js → secret-picker-MDfAhcKZ.js} +1 -1
  237. package/dist/client/assets/{secrets-DWQ4G6Sx.js → secrets-BWXZ9ADR.js} +1 -1
  238. package/dist/client/assets/{sections-editor-DLdVQU9n.js → sections-editor-DRPdyBr7.js} +1 -1
  239. package/dist/client/assets/{select-BYlHrgDe.js → select-Cmhyur65.js} +1 -1
  240. package/dist/client/assets/{select-model-1_S8Jip8.js → select-model-DlhjRyXh.js} +1 -1
  241. package/dist/client/assets/{seo-editor-DcLNXiwq.js → seo-editor-Cslo5GyR.js} +1 -1
  242. package/dist/client/assets/{separator-DtFDelDc.js → separator-XBrskDk1.js} +1 -1
  243. package/dist/client/assets/{settings-tab-D92XwErA.js → settings-tab-Bhjq-v1u.js} +1 -1
  244. package/dist/client/assets/{sheet-Dt9lpT7b.js → sheet-bMLuzpcl.js} +1 -1
  245. package/dist/client/assets/{shell-layout-Bv5Sek6Y.js → shell-layout-CX2kb4As.js} +1 -1
  246. package/dist/client/assets/{skills-6-fiePmJ.js → skills-smEsZOyf.js} +1 -1
  247. package/dist/client/assets/{slider-CKduu4Fn.js → slider-xDThp8gG.js} +1 -1
  248. package/dist/client/assets/{sortable.esm-DPSFDajj.js → sortable.esm-C4yl7HRk.js} +1 -1
  249. package/dist/client/assets/{sso-DkPhSrvw.js → sso-D5XcZRGg.js} +1 -1
  250. package/dist/client/assets/{suggestion-DOpLmNQe.js → suggestion-B9eDgKDC.js} +1 -1
  251. package/dist/client/assets/{switch-AEq1Ywu_.js → switch-D6SJRikA.js} +1 -1
  252. package/dist/client/assets/{symbol-C4xjMjdj.js → symbol-8pL_EbyE.js} +1 -1
  253. package/dist/client/assets/{synced-repos-DoTaXu1d.js → synced-repos-CvOi5sDr.js} +1 -1
  254. package/dist/client/assets/{tab-icon-glyph-D0kyNG52.js → tab-icon-glyph-B5Fq5S50.js} +1 -1
  255. package/dist/client/assets/{table-xlf7vkj_.js → table-BVuWDAYC.js} +1 -1
  256. package/dist/client/assets/{tabs-D7DC2cRI.js → tabs-CJiVz1UY.js} +1 -1
  257. package/dist/client/assets/{task-board-BdDYkWlj.js → task-board-BypYXBtD.js} +1 -1
  258. package/dist/client/assets/{task-route-CUv19cmC.js → task-route-CxLDxVTy.js} +1 -1
  259. package/dist/client/assets/{task-status-DBiu_sll.js → task-status-DR_ZGtmT.js} +1 -1
  260. package/dist/client/assets/taskboard-analytics-B5tiovFi.js +1 -0
  261. package/dist/client/assets/tasks-C5eWHl6J.js +1 -0
  262. package/dist/client/assets/{tasks-CqusizRk.js → tasks-pRlF9aKa.js} +1 -1
  263. package/dist/client/assets/{textarea-I3De7vqg.js → textarea-C3QvYVs6.js} +1 -1
  264. package/dist/client/assets/{thread-analytics-CRKk825k.js → thread-analytics-CVYD56Lv.js} +1 -1
  265. package/dist/client/assets/{thread-button-DXETp5tJ.js → thread-button-Dnwv5gXz.js} +1 -1
  266. package/dist/client/assets/{thread-intent-C-TbGTua.js → thread-intent-BouO_OhM.js} +1 -1
  267. package/dist/client/assets/{thread-route-BhnTkbv5.js → thread-route-CzzxiajL.js} +1 -1
  268. package/dist/client/assets/{thread-route-D_yIM5gK.js → thread-route-Dp3ppEkH.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-BY8IWwzS.js → thread-sheet-body-Z8jKG5ht.js} +1 -1
  270. package/dist/client/assets/{time-range-picker-L6TIyBjU.js → time-range-picker-DE7fkhif.js} +1 -1
  271. package/dist/client/assets/{toggle-group-Br_OBwpv.js → toggle-group-BxPPN08u.js} +1 -1
  272. package/dist/client/assets/{tool-namespace-KxcOJjNS.js → tool-namespace-C5Z8tVC2.js} +1 -1
  273. package/dist/client/assets/{toolbar-icon-button-CzlG5jfK.js → toolbar-icon-button-539CZpjb.js} +1 -1
  274. package/dist/client/assets/{tooltip-CQtbKEbv.js → tooltip-CfH7_UR9.js} +1 -1
  275. package/dist/client/assets/{tooltipContext-CRvwH17A.js → tooltipContext-Dt4926A5.js} +1 -1
  276. package/dist/client/assets/{track-DSZ6JNAX.js → track-D8kXLyAV.js} +1 -1
  277. package/dist/client/assets/{types-C1Mw_99A.js → types-PjheW3sm.js} +1 -1
  278. package/dist/client/assets/{url-slug-CTpJRedE.js → url-slug-D7hdnLPq.js} +1 -1
  279. package/dist/client/assets/{usage-stats-CUfUVubb.js → usage-stats-BcmMK-YO.js} +1 -1
  280. package/dist/client/assets/{use-ai-providers-CjzrdRNJ.js → use-ai-providers-CeHzBmwD.js} +1 -1
  281. package/dist/client/assets/{use-automations-rSR1F0M4.js → use-automations-DLk4Zq7Y.js} +1 -1
  282. package/dist/client/assets/{use-autosave-DMLPE4t_.js → use-autosave-5IDmaWA6.js} +1 -1
  283. package/dist/client/assets/{use-chat-layout-state-C79Hg2yc.js → use-chat-layout-state-C4y1ngrz.js} +1 -1
  284. package/dist/client/assets/{use-chat-navigation-BRFRCeuv.js → use-chat-navigation-pwxRnoh5.js} +1 -1
  285. package/dist/client/assets/{use-clock-tick-BXc6ohp1.js → use-clock-tick-DcGl_y28.js} +1 -1
  286. package/dist/client/assets/{use-connect-companion-DSYtVNc7.js → use-connect-companion-DmQTaaXP.js} +1 -1
  287. package/dist/client/assets/{use-connection-BHRfoOud.js → use-connection-B96BwbcD.js} +1 -1
  288. package/dist/client/assets/{use-copy-Csln4Pda.js → use-copy-COXbZ1Gm.js} +1 -1
  289. package/dist/client/assets/{use-create-virtual-mcp-CUR-7WWu.js → use-create-virtual-mcp-BuymUE2O.js} +1 -1
  290. package/dist/client/assets/{use-date-fns-locale-DLPMhDmo.js → use-date-fns-locale-D2o3Y11s.js} +1 -1
  291. package/dist/client/assets/{use-debounced-autosave-DdZOXKrA.js → use-debounced-autosave-Yq56G4iL.js} +1 -1
  292. package/dist/client/assets/{use-debounced-value-C_VfXq2U.js → use-debounced-value-BZK5uiHm.js} +1 -1
  293. package/dist/client/assets/{use-deco-credits-PK7G7t4U.js → use-deco-credits-COvQvXnV.js} +1 -1
  294. package/dist/client/assets/{use-decopilot-events-3d9-CwOW.js → use-decopilot-events-BDPMNEXz.js} +1 -1
  295. package/dist/client/assets/{use-delete-connection-CDExFOVk.js → use-delete-connection-DT6vWhGX.js} +1 -1
  296. package/dist/client/assets/{use-deployment-admin-CvxHuxOS.js → use-deployment-admin-CoVHfZYT.js} +1 -1
  297. package/dist/client/assets/{use-ensure-project-folder-CiixVwYS.js → use-ensure-project-folder-peTgVhMP.js} +1 -1
  298. package/dist/client/assets/{use-fast-preview-draft-url-nXHVGGIA.js → use-fast-preview-draft-url-BDHxUOYh.js} +1 -1
  299. package/dist/client/assets/{use-file-configs-BUqTgf7p.js → use-file-configs-DoW1VYTz.js} +1 -1
  300. package/dist/client/assets/{use-infinite-scroll-CGgZOckb.js → use-infinite-scroll-1WuTfkvL.js} +1 -1
  301. package/dist/client/assets/{use-join-requests-BnD3GHpg.js → use-join-requests-uEHIq-wW.js} +1 -1
  302. package/dist/client/assets/{use-main-panel-tabs-D2yVxw9s.js → use-main-panel-tabs-eZgXms3O.js} +1 -1
  303. package/dist/client/assets/{use-mcp-auth-status-D-wQ9FWj.js → use-mcp-auth-status-GSONXJ6Y.js} +1 -1
  304. package/dist/client/assets/{use-mcp-client-CBoRmtFo.js → use-mcp-client-D8-rDWEf.js} +1 -1
  305. package/dist/client/assets/{use-mcp-prompts-C3H87HP4.js → use-mcp-prompts-9xOCFCVM.js} +1 -1
  306. package/dist/client/assets/{use-mcp-tools-BfdbHPtH.js → use-mcp-tools-BYNW1IvH.js} +1 -1
  307. package/dist/client/assets/{use-members-DCcQy8NS.js → use-members-DuiAoVt0.js} +1 -1
  308. package/dist/client/assets/{use-mobile-DHDQrS92.js → use-mobile-Cz-N6vVG.js} +1 -1
  309. package/dist/client/assets/{use-navigate-to-agent-CBJVz0YU.js → use-navigate-to-agent-CWPsHr0w.js} +1 -1
  310. package/dist/client/assets/use-new-blocks-editor-B5DYqQrS.js +1 -0
  311. package/dist/client/assets/{use-open-billing-url-DYalJRBM.js → use-open-billing-url-CHALVI7F.js} +1 -1
  312. package/dist/client/assets/{use-org-auth-client-CQhEfpFE.js → use-org-auth-client-DQ6vSNUo.js} +1 -1
  313. package/dist/client/assets/{use-org-fs-CR48g8_P.js → use-org-fs-UdNnQzcG.js} +1 -1
  314. package/dist/client/assets/{use-org-repo-syncs-C4CqaNPe.js → use-org-repo-syncs-CE9Yx0AE.js} +1 -1
  315. package/dist/client/assets/{use-org-sso-DqlYZMd5.js → use-org-sso-BRZ2xqKg.js} +1 -1
  316. package/dist/client/assets/{use-organization-roles-Co0Vqzi3.js → use-organization-roles-5fHLGM-_.js} +1 -1
  317. package/dist/client/assets/{use-organization-settings-BoQ-3bUn.js → use-organization-settings-BEUCQxuY.js} +1 -1
  318. package/dist/client/assets/{use-panel-navigate-5IaTMf0W.js → use-panel-navigate-B348HV-V.js} +1 -1
  319. package/dist/client/assets/{use-project-scope-DhGkOd7x.js → use-project-scope-CJSvss5q.js} +1 -1
  320. package/dist/client/assets/{use-releases-B2i3mkXU.js → use-releases-DRDEblSZ.js} +1 -1
  321. package/dist/client/assets/{use-reports-diagnostic-Z-QISjJo.js → use-reports-diagnostic-BQoNp5Lt.js} +1 -1
  322. package/dist/client/assets/{use-sandbox-events-4HFbLlVd.js → use-sandbox-events-afI4fSp9.js} +1 -1
  323. package/dist/client/assets/{use-secrets-ObT7hB_J.js → use-secrets-6NdpjMzr.js} +1 -1
  324. package/dist/client/assets/{use-section-preview-base-CKThWLiS.js → use-section-preview-base-Du6Z-MWu.js} +1 -1
  325. package/dist/client/assets/{use-tags-BBeLFk4l.js → use-tags-Dkeb0fZQ.js} +1 -1
  326. package/dist/client/assets/{use-task-board-analytics-BnXBdPT0.js → use-task-board-analytics-BsZ5fOsz.js} +1 -1
  327. package/dist/client/assets/{use-task-board-events-Dmw0mTzd.js → use-task-board-events-BZPWVwkQ.js} +1 -1
  328. package/dist/client/assets/{use-task-board-item-prs-C8Xn9Vf_.js → use-task-board-item-prs-6pzJEXZH.js} +1 -1
  329. package/dist/client/assets/{use-task-board-items-xt5k2e3E.js → use-task-board-items-DDExwWH5.js} +1 -1
  330. package/dist/client/assets/{use-task-metadata-BtIFipqq.js → use-task-metadata-QX8Xm3F2.js} +1 -1
  331. package/dist/client/assets/{use-thread-analytics-D9xOHQFN.js → use-thread-analytics-4YJ0wSzW.js} +1 -1
  332. package/dist/client/assets/{use-thread-outputs-v6L6hLPo.js → use-thread-outputs-BaagK6yF.js} +1 -1
  333. package/dist/client/assets/useInfiniteQuery-BgN51nwo.js +1 -0
  334. package/dist/client/assets/{useQueries-D7sPNAbk.js → useQueries-BeM3koNG.js} +1 -1
  335. package/dist/client/assets/useSuspenseInfiniteQuery-DnCmqaG2.js +1 -0
  336. package/dist/client/assets/{users-CohA04WM.js → users-DA2VVqSS.js} +1 -1
  337. package/dist/client/assets/{utils-CZAlkiGL.js → utils-DGIwcQET.js} +1 -1
  338. package/dist/client/assets/{variant-calendar-YlhockIc.js → variant-calendar-B2z-zkHQ.js} +1 -1
  339. package/dist/client/assets/{variant-matcher-override-Ch08PbYs.js → variant-matcher-override-WuIO8MOW.js} +1 -1
  340. package/dist/client/assets/{view-mode-toggle-6GOtrYS3.js → view-mode-toggle-DA847UFd.js} +1 -1
  341. package/dist/client/assets/{virtual-mcp-BvdMl-5h.js → virtual-mcp-ySkvJvwZ.js} +1 -1
  342. package/dist/client/assets/{watch-sse-pool-CuB8RiNq.js → watch-sse-pool-jwr9yBFo.js} +1 -1
  343. package/dist/client/index.html +1 -1
  344. package/dist/server/migrate.js +240 -240
  345. package/dist/server/server.js +623 -622
  346. package/package.json +1 -1
  347. package/dist/client/assets/agent-app-BP_zJSbn.js +0 -1
  348. package/dist/client/assets/agent-deck-RzemuGl7.js +0 -1
  349. package/dist/client/assets/agent-library-CC0bjZj1.js +0 -1
  350. package/dist/client/assets/agent-library-file-BSlUtfTI.js +0 -1
  351. package/dist/client/assets/agent-settings-6NCbPPF8.js +0 -1
  352. package/dist/client/assets/agent-site-editor-code-CKJCcxe8.js +0 -2
  353. package/dist/client/assets/agent-view-B3KFsBPm.js +0 -1
  354. package/dist/client/assets/ai-providers-Bk7GpeLu.js +0 -6
  355. package/dist/client/assets/api-keys-CO4qUFEE.js +0 -1
  356. package/dist/client/assets/app-editor-C1ZLULDh.js +0 -1
  357. package/dist/client/assets/chat-context-B7ixwukH.js +0 -39
  358. package/dist/client/assets/flat-project-B34hikno.js +0 -1
  359. package/dist/client/assets/input-ChjC7XxY.js +0 -17
  360. package/dist/client/assets/library-BQTdBCeN.js +0 -1
  361. package/dist/client/assets/project-reports-D7AvO1-d.js +0 -1
  362. package/dist/client/assets/project-tasks-Bkis008g.js +0 -1
  363. package/dist/client/assets/record-editor-ujycT1Q2.js +0 -1
  364. package/dist/client/assets/redirect-editor-COyH32KW.js +0 -1
  365. package/dist/client/assets/reports-BdmJCm1H.js +0 -1
  366. package/dist/client/assets/roles-C7UEXuzR.js +0 -1
  367. package/dist/client/assets/route-BZiixBAG.js +0 -1
  368. package/dist/client/assets/route-C1lmUe_X.js +0 -1
  369. package/dist/client/assets/schema-3_3MP7ZZ.js +0 -1
  370. package/dist/client/assets/taskboard-analytics-Bea9cC2r.js +0 -1
  371. package/dist/client/assets/tasks-BX3JKxDq.js +0 -1
  372. package/dist/client/assets/use-new-blocks-editor-BtqPnhyC.js +0 -1
  373. package/dist/client/assets/useInfiniteQuery-DVc0gFuD.js +0 -1
  374. package/dist/client/assets/useSuspenseInfiniteQuery-kmxM7DtM.js +0 -1
@@ -1,2 +1,2 @@
1
- import{c as F,a2 as X,aJ as Me,l as H,j as n,H as Oe,r as k,b as Z,t as ie,h as ce,s as be,v as ye,q as ve,D as Se,d as je,y as ue,aK as Ae,B as Ee,o as Ie,K as W,b6 as de}from"./index-CvkEkbZF.js";import{n as $e}from"./ArrowUp-Dg7Kez2q.js";import{c as Fe,a as we,e as He,u as Ne,T as ze,A as Ke,h as qe,b as Ge,i as Ue,j as Qe,p as Ve,L as Ye}from"./chat-context-B7ixwukH.js";import{s as Je,g as Ce,d as We}from"./tool-namespace-KxcOJjNS.js";import{c as se,T as Xe,a as Ze,b as et}from"./tooltip-CQtbKEbv.js";import{d as tt,b as st,a as nt,D as rt}from"./drawer-NA8X67Cn.js";import{C as at}from"./collection-search-BhTdq2ic.js";import{u as ot}from"./use-mobile-DHDQrS92.js";import{u as lt}from"./use-mcp-client-CBoRmtFo.js";import{u as it,g as ct}from"./use-mcp-prompts-C3H87HP4.js";import{c as ut,P as dt}from"./usage-stats-CUfUVubb.js";import{T as ft,d as mt,c as pt,e as ht,H as gt}from"./input-ChjC7XxY.js";import{u as xt,a as bt,S as yt,M as fe}from"./pair-Bjrecdzi.js";import{a as vt}from"./use-panel-navigate-5IaTMf0W.js";import{u as St}from"./thread-intent-C-TbGTua.js";import{N as jt}from"./index-BFNmnlkM.js";import{i as Et}from"./LinkBroken01-C4y5s5BD.js";import{g as Te}from"./agent-icon-BzQJojFn.js";import{e as wt}from"./use-decopilot-events-3d9-CwOW.js";import{u as Nt}from"./use-deco-credits-PK7G7t4U.js";import{F as Ct}from"./feature-paywall-BtZlJS8N.js";import{i as Tt}from"./AlertCircle-CKip96zJ.js";import{b as kt}from"./sandbox-url-D3mC8qhT.js";import{a as Pt}from"./repository-binding-Diab2gJI.js";import{e as Dt}from"./backoff-CrEUbyZT.js";const me=3,ke="inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-muted text-muted-foreground text-sm font-medium transition-colors cursor-pointer",Rt="flex flex-col gap-1.5 p-4 rounded-xl bg-accent/40 text-sm leading-snug transition-colors cursor-pointer text-left";function Pe(t){const e=F.c(46),{item:r,onSelect:o,isLoading:s,isDisabled:a,variant:l}=t,i=l===void 0?"pill":l,{prompt:c}=r;let u;if(e[0]!==c._meta||e[1]!==c.name||e[2]!==c.title){const T=Ce(c._meta);u=c.title??We(c.name,T),e[0]=c._meta,e[1]=c.name,e[2]=c.title,e[3]=u}else u=e[3];const d=u,f=c.description||null;if(i==="card"){let T;e[4]!==o||e[5]!==c?(T=()=>o(c),e[4]=o,e[5]=c,e[6]=T):T=e[6];const M=a||s,B=s&&"bg-accent/40",L=(a||s)&&"cursor-not-allowed opacity-50";let _;e[7]!==B||e[8]!==L?(_=H(Rt,"hover:bg-accent/60 text-foreground",B,L),e[7]=B,e[8]=L,e[9]=_):_=e[9];let p;e[10]!==d?(p=n.jsx("span",{className:"font-medium truncate capitalize",children:d}),e[10]=d,e[11]=p):p=e[11];let w;e[12]!==s?(w=s&&n.jsx(ce,{size:"xs"}),e[12]=s,e[13]=w):w=e[13];let h;e[14]!==p||e[15]!==w?(h=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p,w]}),e[14]=p,e[15]=w,e[16]=h):h=e[16];let v;e[17]!==f?(v=f&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:f}),e[17]=f,e[18]=v):v=e[18];let N;return e[19]!==h||e[20]!==v||e[21]!==T||e[22]!==M||e[23]!==_?(N=n.jsxs("button",{type:"button",onClick:T,disabled:M,className:_,children:[h,v]}),e[19]=h,e[20]=v,e[21]=T,e[22]=M,e[23]=_,e[24]=N):N=e[24],N}let m;e[25]!==o||e[26]!==c?(m=()=>o(c),e[25]=o,e[26]=c,e[27]=m):m=e[27];const S=a||s,j=s&&"bg-muted/50",E=(a||s)&&"cursor-not-allowed opacity-50";let x;e[28]!==j||e[29]!==E?(x=H(ke,"hover:bg-muted/70 hover:text-foreground",j,E),e[28]=j,e[29]=E,e[30]=x):x=e[30];let b;e[31]!==d?(b=n.jsx("span",{className:"capitalize",children:d}),e[31]=d,e[32]=b):b=e[32];let C;e[33]!==s?(C=s&&n.jsx(ce,{size:"xs"}),e[33]=s,e[34]=C):C=e[34];let y;e[35]!==m||e[36]!==S||e[37]!==x||e[38]!==b||e[39]!==C?(y=n.jsx(Xe,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:m,disabled:S,className:x,children:[b,C]})}),e[35]=m,e[36]=S,e[37]=x,e[38]=b,e[39]=C,e[40]=y):y=e[40];const P=f??d;let g;e[41]!==P?(g=n.jsx(Ze,{side:"top",className:"max-w-xs",children:n.jsx("p",{className:"text-xs",children:P})}),e[41]=P,e[42]=g):g=e[42];let D;return e[43]!==y||e[44]!==g?(D=n.jsxs(et,{delayDuration:400,children:[y,g]}),e[43]=y,e[44]=g,e[45]=D):D=e[45],D}function _t(t){const e=F.c(61),{items:r,open:o,onOpenChange:s,onSelect:a,loadingPrompt:l}=t,i=Z(),[c,u]=k.useState(""),d=!!l;let f;e[0]!==r||e[1]!==c?(f=c.trim()?r.filter(p=>{const w=c.toLowerCase();return p.prompt.name.toLowerCase().includes(w)||(p.prompt.title??"").toLowerCase().includes(w)||(p.prompt.description??"").toLowerCase().includes(w)}):r,e[0]=r,e[1]=c,e[2]=f):f=e[2];const m=f,S=ot();let j;e[3]!==m.length||e[4]!==c||e[5]!==i?(j=m.length===0&&n.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:i("chat.iceBreakers.noPromptsMatch",{search:c})}),e[3]=m.length,e[4]=c,e[5]=i,e[6]=j):j=e[6];let E;if(e[7]!==m||e[8]!==d||e[9]!==l?.name||e[10]!==s||e[11]!==a){let p;e[13]!==d||e[14]!==l?.name||e[15]!==s||e[16]!==a?(p=w=>n.jsx(Pe,{item:w,variant:"card",onSelect:h=>{s(!1),a(h)},isLoading:l?.name===w.prompt.name,isDisabled:d&&l?.name!==w.prompt.name},w.prompt.name),e[13]=d,e[14]=l?.name,e[15]=s,e[16]=a,e[17]=p):p=e[17],E=m.map(p),e[7]=m,e[8]=d,e[9]=l?.name,e[10]=s,e[11]=a,e[12]=E}else E=e[12];let x;e[18]!==j||e[19]!==E?(x=n.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[j,E]})}),e[18]=j,e[19]=E,e[20]=x):x=e[20];const b=x;let C;e[21]!==i?(C=i("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=i,e[22]=C):C=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=p=>{p.key==="Escape"&&u("")},e[23]=y):y=e[23];let P;e[24]!==c||e[25]!==C?(P=n.jsx(at,{value:c,onChange:u,placeholder:C,onKeyDown:y}),e[24]=c,e[25]=C,e[26]=P):P=e[26];const g=P;if(S){let p;e[27]!==i?(p=i("chat.iceBreakers.allPromptsTitle"),e[27]=i,e[28]=p):p=e[28];let w;e[29]!==p?(w=n.jsx(tt,{className:"sr-only",children:n.jsx(st,{children:p})}),e[29]=p,e[30]=w):w=e[30];let h;e[31]!==i?(h=i("chat.iceBreakers.promptsLabel"),e[31]=i,e[32]=h):h=e[32];let v;e[33]!==h?(v=n.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:n.jsx("span",{className:"text-sm font-medium text-foreground",children:h})}),e[33]=h,e[34]=v):v=e[34];let N;e[35]!==b||e[36]!==g||e[37]!==v||e[38]!==w?(N=n.jsxs(nt,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[w,v,g,b]}),e[35]=b,e[36]=g,e[37]=v,e[38]=w,e[39]=N):N=e[39];let $;return e[40]!==s||e[41]!==o||e[42]!==N?($=n.jsx(se,{delayDuration:400,children:n.jsx(rt,{open:o,onOpenChange:s,children:N})}),e[40]=s,e[41]=o,e[42]=N,e[43]=$):$=e[43],$}let D;e[44]!==i?(D=i("chat.iceBreakers.allPromptsTitle"),e[44]=i,e[45]=D):D=e[45];let T;e[46]!==D?(T=n.jsx(be,{className:"sr-only",children:n.jsx(ye,{children:D})}),e[46]=D,e[47]=T):T=e[47];let M;e[48]!==i?(M=i("chat.iceBreakers.promptsLabel"),e[48]=i,e[49]=M):M=e[49];let B;e[50]!==M?(B=n.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:n.jsx("span",{className:"text-sm font-medium text-foreground",children:M})}),e[50]=M,e[51]=B):B=e[51];let L;e[52]!==b||e[53]!==g||e[54]!==B||e[55]!==T?(L=n.jsxs(ve,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[T,B,g,b]}),e[52]=b,e[53]=g,e[54]=B,e[55]=T,e[56]=L):L=e[56];let _;return e[57]!==s||e[58]!==o||e[59]!==L?(_=n.jsx(se,{delayDuration:400,children:n.jsx(Se,{open:o,onOpenChange:s,children:L})}),e[57]=s,e[58]=o,e[59]=L,e[60]=_):_=e[60],_}function Lt(t){const e=F.c(30),{items:r,onSelect:o,loadingPrompt:s,className:a}=t,l=Z(),[i,c]=k.useState(!1);if(r.length===0)return null;let u,d,f,m,S;if(e[0]!==a||e[1]!==r||e[2]!==s||e[3]!==o||e[4]!==l){const b=r.slice(0,me),C=r.slice(me),y=!!s;let P;e[10]!==y||e[11]!==s?.name||e[12]!==o?(P=D=>n.jsx(Pe,{item:D,onSelect:o,isLoading:s?.name===D.prompt.name,isDisabled:y&&s?.name!==D.prompt.name},D.prompt.name),e[10]=y,e[11]=s?.name,e[12]=o,e[13]=P):P=e[13];const g=b.map(P);u=se,S=400,e[14]!==a?(d=H("w-full flex flex-wrap gap-2 justify-center",a),e[14]=a,e[15]=d):d=e[15],f=g,m=C.length>0&&n.jsx("button",{type:"button",disabled:y,onClick:()=>c(!0),className:H(ke,"hover:bg-muted/70 hover:text-foreground",y&&"opacity-50 cursor-not-allowed"),children:l("chat.iceBreakers.moreButton",{count:C.length})}),e[0]=a,e[1]=r,e[2]=s,e[3]=o,e[4]=l,e[5]=u,e[6]=d,e[7]=f,e[8]=m,e[9]=S}else u=e[5],d=e[6],f=e[7],m=e[8],S=e[9];let j;e[16]!==d||e[17]!==f||e[18]!==m?(j=n.jsxs("div",{className:d,children:[f,m]}),e[16]=d,e[17]=f,e[18]=m,e[19]=j):j=e[19];let E;e[20]!==r||e[21]!==s||e[22]!==i||e[23]!==o?(E=n.jsx(_t,{items:r,open:i,onOpenChange:c,onSelect:o,loadingPrompt:s}),e[20]=r,e[21]=s,e[22]=i,e[23]=o,e[24]=E):E=e[24];let x;return e[25]!==u||e[26]!==S||e[27]!==j||e[28]!==E?(x=n.jsxs(u,{delayDuration:S,children:[j,E]}),e[25]=u,e[26]=S,e[27]=j,e[28]=E,e[29]=x):x=e[29],x}function Bt(){return null}function Mt(t,e){switch(e.type){case"SELECT_PROMPT":return!e.prompt.arguments||e.prompt.arguments.length===0?{stage:"loading",prompt:e.prompt}:{stage:"idle"};case"START_LOADING":return{stage:"loading",prompt:e.prompt,arguments:e.arguments};case"RESET":return{stage:"idle"};default:return t}}function Ot(t){const e=F.c(31),{connectionId:r}=t,o=Z(),{sendMessage:s}=we(),{org:a}=X();let l;e[0]!==r||e[1]!==a.id||e[2]!==a.slug?(l={connectionId:r,orgId:a.id,orgSlug:a.slug},e[0]=r,e[1]=a.id,e[2]=a.slug,e[3]=l):l=e[3];const i=lt(l);let c;e[4]!==i?(c={client:i,staleTime:6e4},e[4]=i,e[5]=c):c=e[5];const{data:u}=it(c);let d;e[6]!==u?.prompts?(d=u?.prompts??[],e[6]=u?.prompts,e[7]=d):d=e[7];const f=d;let m;e[8]!==f?(m=f.map(At),e[8]=f,e[9]=m):m=e[9];const S=m;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j={stage:"idle"},e[10]=j):j=e[10];const[E,x]=k.useReducer(Mt,j),[b,C]=k.useState(null);let y;e[11]!==i||e[12]!==s||e[13]!==o?(y=async(h,v)=>{if(!i){ie.error(o("chat.iceBreakers.mcpClientNotAvailable")),x({type:"RESET"});return}try{const N=await ct(i,h.name,v);x({type:"RESET"});const $={type:"doc",content:[{type:"paragraph",content:[ut({id:h.name,name:Je(h.name,Ce(h._meta)),metadata:N.messages,char:"/",kind:"prompt",args:v}),{type:"text",text:" "}]}]};await s($)}catch(N){console.error("[ice-breakers] Failed to fetch prompt:",N),ie.error(o("chat.iceBreakers.failedToLoadPrompt")),x({type:"RESET"})}},e[11]=i,e[12]=s,e[13]=o,e[14]=y):y=e[14];const P=y;let g;e[15]!==P?(g=async h=>{if(h.arguments&&h.arguments.length>0){x({type:"SELECT_PROMPT",prompt:h}),C(h);return}x({type:"START_LOADING",prompt:h}),await P(h)},e[15]=P,e[16]=g):g=e[16];const D=g;let T;e[17]!==b||e[18]!==P?(T=async h=>{b&&(x({type:"START_LOADING",prompt:b,arguments:h}),C(null),await P(b,h))},e[17]=b,e[18]=P,e[19]=T):T=e[19];const M=T;if(S.length===0)return null;const B=E.stage==="loading"?E.prompt:null;let L;e[20]!==D||e[21]!==S||e[22]!==B?(L=n.jsx(Lt,{items:S,onSelect:D,loadingPrompt:B}),e[20]=D,e[21]=S,e[22]=B,e[23]=L):L=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{C(null),x({type:"RESET"})},e[24]=_):_=e[24];let p;e[25]!==b||e[26]!==M?(p=n.jsx(dt,{prompt:b,setPrompt:_,onSubmit:M}),e[25]=b,e[26]=M,e[27]=p):p=e[27];let w;return e[28]!==L||e[29]!==p?(w=n.jsxs(n.Fragment,{children:[L,p]}),e[28]=L,e[29]=p,e[30]=w):w=e[30],w}function At(t){return{prompt:t}}function It(t){const e=F.c(13),{className:r}=t,{selectedVirtualMcp:o}=Fe(),{org:s}=X();let a;e[0]!==s.id?(a=Me(s.id),e[0]=s.id,e[1]=a):a=e[1];const l=a.id,i=o?.id??l;let c;e[2]!==r?(c=H("w-full @container",r),e[2]=r,e[3]=c):c=e[3];const u=i??"default";let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Bt,{}),e[4]=d):d=e[4];let f;e[5]!==i?(f=n.jsx(Ot,{connectionId:i}),e[5]=i,e[6]=f):f=e[6];let m;e[7]!==u||e[8]!==f?(m=n.jsx(Oe,{fallback:null,children:n.jsx(k.Suspense,{fallback:d,children:f},u)}),e[7]=u,e[8]=f,e[9]=m):m=e[9];let S;return e[10]!==c||e[11]!==m?(S=n.jsx("div",{className:c,children:m}),e[10]=c,e[11]=m,e[12]=S):S=e[12],S}function $t(t){let e=0;for(const r of t)for(const o of r.parts??[]){const s=o;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function Ft(){const t=F.c(8),{openPanel:e}=vt(),r=St(),o=He()?.messages??[],s=Ne()?.taskId??null;let a;t[0]!==o?(a=$t(o),t[0]=o,t[1]=a):a=t[1];const l=a,i=k.useRef(null),c=k.useRef(null);let u,d;t[2]!==l||t[3]!==r||t[4]!==e||t[5]!==s?(u=()=>{if(!l||!s)return;const f=`${s}:${l}`;c.current!==f&&(c.current=f,r?.refreshThreadMetadata(s)),i.current!==s&&(i.current=s,e("site-editor"))},d=[l,s,e,r],t[2]=l,t[3]=r,t[4]=e,t[5]=s,t[6]=u,t[7]=d):(u=t[6],d=t[7]),k.useEffect(u,d)}function De(t){return`deco-credits-empty-dismissed:${t}`}function Ds(t){try{return localStorage.getItem(De(t))==="1"}catch{return!1}}function Ht(){const t=F.c(56),e=Z(),{org:r}=X(),o=wt("credits"),s=je(),{decoKeyId:a}=Nt(),[l,i]=k.useState(!0);let c;t[0]!==r.id?(c=()=>{ue("credits_empty_state_dismissed",{organization_id:r.id}),i(!1);try{localStorage.setItem(De(r.id),"1")}catch{}},t[0]=r.id,t[1]=c):c=t[1];const u=c;let d,f;if(t[2]!==l||t[3]!==r.id?(d=()=>{l&&ue("credits_empty_state_shown",{organization_id:r.id})},f=[l,r.id],t[2]=l,t[3]=r.id,t[4]=d,t[5]=f):(d=t[4],f=t[5]),k.useEffect(d,f),!l)return null;if(!o){let h;t[6]!==e?(h=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=h):h=t[7];let v;t[8]!==h?(v={title:h},t[8]=h,t[9]=v):v=t[9];let N;return t[10]!==u||t[11]!==v?(N=n.jsx(Ct,{feature:"chat",copy:v,onDismiss:u}),t[10]=u,t[11]=v,t[12]=N):N=t[12],N}let m;t[13]!==u?(m=h=>!h&&u(),t[13]=u,t[14]=m):m=t[14];let S;t[15]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),t[15]=S):S=t[15];let j;t[16]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:n.jsx(Te,{size:20,className:"text-warning"})}),t[16]=j):j=t[16];let E;t[17]!==e?(E=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=E):E=t[18];let x;t[19]!==E?(x=n.jsx(ye,{className:"text-lg font-semibold",children:E}),t[19]=E,t[20]=x):x=t[20];let b;t[21]!==e?(b=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=b):b=t[22];let C;t[23]!==b?(C=n.jsx(Ae,{className:"mt-2 text-[13px] leading-relaxed max-w-[320px] mx-auto",children:b}),t[23]=b,t[24]=C):C=t[24];let y;t[25]!==x||t[26]!==C?(y=n.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[S,n.jsxs(be,{className:"relative gap-3",children:[j,n.jsxs("div",{className:"text-center",children:[x,C]})]})]}),t[25]=x,t[26]=C,t[27]=y):y=t[27];let P;t[28]!==a||t[29]!==u?(P=a&&n.jsx("div",{className:"px-6 pb-5",children:n.jsx(ft,{source:"empty_state",onDone:u})}),t[28]=a,t[29]=u,t[30]=P):P=t[30];let g;t[31]!==u||t[32]!==s||t[33]!==r.slug?(g=()=>{s({to:"/$org/settings/ai-providers",params:{org:r.slug}}),u()},t[31]=u,t[32]=s,t[33]=r.slug,t[34]=g):g=t[34];let D;t[35]!==e?(D=e("chat.creditsEmptyState.useYourOwnProvider"),t[35]=e,t[36]=D):D=t[36];let T;t[37]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Et,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=T):T=t[37];let M;t[38]!==g||t[39]!==D?(M=n.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:g,children:[D,T]}),t[38]=g,t[39]=D,t[40]=M):M=t[40];let B;t[41]!==e?(B=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=B):B=t[42];let L;t[43]!==u||t[44]!==B?(L=n.jsx(Ee,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:u,children:B}),t[43]=u,t[44]=B,t[45]=L):L=t[45];let _;t[46]!==M||t[47]!==L?(_=n.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[M,L]}),t[46]=M,t[47]=L,t[48]=_):_=t[48];let p;t[49]!==y||t[50]!==P||t[51]!==_?(p=n.jsxs(ve,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:zt,children:[y,P,_]}),t[49]=y,t[50]=P,t[51]=_,t[52]=p):p=t[52];let w;return t[53]!==p||t[54]!==m?(w=n.jsx(Se,{open:!0,onOpenChange:m,children:p}),t[53]=p,t[54]=m,t[55]=w):w=t[55],w}function zt(t){return t.preventDefault()}function Kt(t){const e=F.c(6),{balanceDollars:r}=t;let o;e[0]!==r?(o=r.toFixed(2),e[0]=r,e[1]=o):o=e[1];const s=o;let a,l;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=H("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),l=n.jsx(Te,{size:13,className:"text-success"}),e[2]=a,e[3]=l):(a=e[2],l=e[3]);let i;return e[4]!==s?(i=n.jsxs("div",{className:a,children:[l,n.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",s," in credits to get started"]})]}),e[4]=s,e[5]=i):i=e[5],i}function qt(){const t=F.c(8),{org:e}=X(),r=je();let o;t[0]!==r||t[1]!==e.slug?(o=()=>r({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=r,t[1]=e.slug,t[2]=o):o=t[2];let s,a,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=H("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=n.jsx(Tt,{size:13,className:"text-warning"}),l=n.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=a,t[5]=l):(s=t[3],a=t[4],l=t[5]);let i;return t[6]!==o?(i=n.jsxs("button",{type:"button",onClick:o,className:s,children:[a,l]}),t[6]=o,t[7]=i):i=t[7],i}function Gt(t){const e=F.c(7),{scrollRef:r,sentinelRef:o,hasMoreOlder:s,isFetchingOlder:a,fetchOlderMessages:l}=t;let i,c;e[0]!==l||e[1]!==s||e[2]!==a||e[3]!==r||e[4]!==o?(i=()=>{const u=o.current,d=r.current;if(!u||!d||!s)return;const f=new IntersectionObserver(async m=>{if(!m[0]?.isIntersecting||a||!s)return;const j=d.scrollHeight,E=d.scrollTop;await l(),requestAnimationFrame(()=>{const x=d.scrollHeight;d.scrollTop=E+(x-j)})},{root:d,rootMargin:"200px 0px 0px 0px"});return f.observe(u),()=>f.disconnect()},c=[r,o,s,a,l],e[0]=l,e[1]=s,e[2]=a,e[3]=r,e[4]=o,e[5]=i,e[6]=c):(i=e[5],c=e[6]),k.useEffect(i,c)}function Ut(t){const e=F.c(5),{className:r,children:o}=t;let s;e[0]!==r?(s=H("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",r),e[0]=r,e[1]=s):s=e[1];let a;return e[2]!==o||e[3]!==s?(a=n.jsx("div",{className:s,children:o}),e[2]=o,e[3]=s,e[4]=a):a=e[4],a}function Qt(t){const e=F.c(5),{children:r,className:o}=t;let s;e[0]!==o?(s=H("flex-1 min-h-0 overflow-y-auto isolate",o),e[0]=o,e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==s?(a=n.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=a):a=e[4],a}function Vt(t){const e=F.c(2),{children:r}=t;let o;return e[0]!==r?(o=n.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:r}),e[0]=r,e[1]=o):o=e[1],o}function Yt(){const t=Z(),{messages:e,status:r,hasMoreOlder:o,isFetchingOlder:s,fetchOlderMessages:a,isRunInProgress:l}=we(),{taskId:i}=Ge();Ft();const c=Ue(i??""),u=Qe(c),d=u.size===0?e:e.filter(g=>!u.has(g.id)),f=Ve(d,r==="submitted"||r==="streaming"||l),m=f.visible,S=xt(m),j=S.at(-1),x=ht()*gt+16,b=k.useRef(null),C=k.useRef(null);Gt({scrollRef:b,sentinelRef:C,hasMoreOlder:o,isFetchingOlder:s,fetchOlderMessages:a});const y=bt({initial:!1}),P=g=>{b.current=g,y.scrollRef(g)};return n.jsx(Ye.Provider,{value:f,children:n.jsx(yt,{messages:e,children:n.jsxs("div",{className:"relative h-full w-full min-w-0",children:[n.jsx("div",{ref:P,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:x},children:n.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[n.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[n.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),s&&n.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),S.slice(0,-1).map((g,D)=>n.jsx(fe,{pair:g,isLastPair:!1,status:D===S.length-1?r:void 0},`pair-${g.user?.id??g.assistant?.id}`))]}),j&&n.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:n.jsx(fe,{pair:j,isLastPair:!0,status:r},`pair-${j.user?.id??j.assistant?.id}`)})]})}),!y.isAtBottom&&n.jsx(Ee,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-md animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:x+8},onClick:()=>{y.scrollToBottom()},children:n.jsx($e,{size:14})})]})})})}function Jt(t){const e=F.c(5),{children:r,className:o}=t;let s;e[0]!==o?(s=H("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",o),e[0]=o,e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==s?(a=n.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=a):a=e[4],a}const Rs=Object.assign(Ut,{Main:Qt,Messages:Yt,EmptyState:Vt,Footer:Jt,Input:pt,Provider:qe,ActiveTaskProvider:Ke,ThreadlessProvider:ze,IceBreakers:It,NoAiProviderEmptyState:jt,CreditsEmptyState:Ht,CreditsEyebrow:Kt,NoCreditsEyebrow:qt,CreditsExhaustedBanner:mt});function pe(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const Wt={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Re=k.createContext(Wt),he=16384;class Xt{data="";append(e){this.data+=e,this.data.length>he&&(this.data=this.data.slice(this.data.length-he))}get(){return this.data}clear(){this.data=""}}const Zt=1e3,es=3e4,ts=3e3,ge=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],xe="log";function ss(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function ns(t){return t===404}async function rs(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(ts)});return await e.body?.cancel().catch(()=>{}),ns(e.status)}catch{return!1}}function _s({virtualMcpId:t,branch:e,previewUrl:r=null,enabled:o=!0,children:s}){const{org:a}=X(),l=Ie(),i=Ne()?.taskId??null,[c,u]=k.useState(null),[d,f]=k.useState({phase:"idle"}),[m,S]=k.useState({state:"running"}),[j,E]=k.useState({kind:"unknown"}),[x,b]=k.useState(!1),[C,y]=k.useState([]),[P,g]=k.useState([]),[,D]=k.useState(0),T=k.useRef(new Map),M=k.useRef(new Set),B=k.useRef(new Set),L=k.useRef(null),_=ss(r),p=Pt(t)?.metadata?.runtime?.selected==="deno",w=v=>{let N=T.current.get(v);return N||(N=new Xt,T.current.set(v,N)),N};k.useEffect(()=>{if(u(null),f({phase:"idle"}),S({state:"running"}),E({kind:"unknown"}),L.current=null,b(!1),y([]),g([]),T.current.clear(),!t||!e||!o)return;const v=kt({orgSlug:a.slug,virtualMcpId:t,branch:e,threadId:i??null},"events");let N=!1,$=0,Y=null,q=null,G=null,K=null,z=null,J=null;const Le=R=>{try{const O=JSON.parse(R.data);u(O),O.kind!=="failed"&&(b(!1),$=0),O.kind==="ready"&&oe()}catch(O){console.warn("[vm-events] bad phase payload",O)}},ne=()=>{b(!0),u(null),f({phase:"idle"}),S({state:"running"}),E({kind:"unknown"}),y([]),g([]),T.current.clear()},re=R=>{try{const O=JSON.parse(R.data);if(typeof O.data!="string")return;$=0;const I=O.data.replace(/\r?\n/g,`\r
1
+ import{c as F,a2 as X,aJ as Me,l as H,j as n,H as Oe,r as k,b as Z,t as ie,h as ce,s as be,v as ye,q as ve,D as Se,d as je,y as ue,aK as Ae,B as Ee,o as Ie,K as W,b6 as de}from"./index-D984WV3U.js";import{n as $e}from"./ArrowUp-C0O7U47F.js";import{c as Fe,a as we,e as He,u as Ne,T as ze,A as Ke,h as qe,b as Ge,i as Ue,j as Qe,p as Ve,L as Ye}from"./chat-context-y8u3K9Tq.js";import{s as Je,g as Ce,d as We}from"./tool-namespace-C5Z8tVC2.js";import{c as se,T as Xe,a as Ze,b as et}from"./tooltip-CfH7_UR9.js";import{d as tt,b as st,a as nt,D as rt}from"./drawer-DybzZn1x.js";import{C as at}from"./collection-search-C-3HPALa.js";import{u as ot}from"./use-mobile-Cz-N6vVG.js";import{u as lt}from"./use-mcp-client-D8-rDWEf.js";import{u as it,g as ct}from"./use-mcp-prompts-9xOCFCVM.js";import{c as ut,P as dt}from"./usage-stats-BcmMK-YO.js";import{T as ft,d as mt,c as pt,e as ht,H as gt}from"./input-C_t2NUbp.js";import{u as xt,a as bt,S as yt,M as fe}from"./pair-D3dg1naQ.js";import{a as vt}from"./use-panel-navigate-B348HV-V.js";import{u as St}from"./thread-intent-BouO_OhM.js";import{N as jt}from"./index-CeuDCj_w.js";import{i as Et}from"./LinkBroken01-CImL6HGl.js";import{g as Te}from"./agent-icon-CsQzAnP1.js";import{e as wt}from"./use-decopilot-events-BDPMNEXz.js";import{u as Nt}from"./use-deco-credits-COvQvXnV.js";import{F as Ct}from"./feature-paywall-BN5FphJ8.js";import{i as Tt}from"./AlertCircle-CgfWDsMW.js";import{b as kt}from"./sandbox-url-D3mC8qhT.js";import{a as Pt}from"./repository-binding-CrIQbyJh.js";import{e as Dt}from"./backoff-CrEUbyZT.js";const me=3,ke="inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-muted text-muted-foreground text-sm font-medium transition-colors cursor-pointer",Rt="flex flex-col gap-1.5 p-4 rounded-xl bg-accent/40 text-sm leading-snug transition-colors cursor-pointer text-left";function Pe(t){const e=F.c(46),{item:r,onSelect:o,isLoading:s,isDisabled:a,variant:l}=t,i=l===void 0?"pill":l,{prompt:c}=r;let u;if(e[0]!==c._meta||e[1]!==c.name||e[2]!==c.title){const T=Ce(c._meta);u=c.title??We(c.name,T),e[0]=c._meta,e[1]=c.name,e[2]=c.title,e[3]=u}else u=e[3];const d=u,f=c.description||null;if(i==="card"){let T;e[4]!==o||e[5]!==c?(T=()=>o(c),e[4]=o,e[5]=c,e[6]=T):T=e[6];const M=a||s,B=s&&"bg-accent/40",L=(a||s)&&"cursor-not-allowed opacity-50";let _;e[7]!==B||e[8]!==L?(_=H(Rt,"hover:bg-accent/60 text-foreground",B,L),e[7]=B,e[8]=L,e[9]=_):_=e[9];let p;e[10]!==d?(p=n.jsx("span",{className:"font-medium truncate capitalize",children:d}),e[10]=d,e[11]=p):p=e[11];let w;e[12]!==s?(w=s&&n.jsx(ce,{size:"xs"}),e[12]=s,e[13]=w):w=e[13];let h;e[14]!==p||e[15]!==w?(h=n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p,w]}),e[14]=p,e[15]=w,e[16]=h):h=e[16];let v;e[17]!==f?(v=f&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:f}),e[17]=f,e[18]=v):v=e[18];let N;return e[19]!==h||e[20]!==v||e[21]!==T||e[22]!==M||e[23]!==_?(N=n.jsxs("button",{type:"button",onClick:T,disabled:M,className:_,children:[h,v]}),e[19]=h,e[20]=v,e[21]=T,e[22]=M,e[23]=_,e[24]=N):N=e[24],N}let m;e[25]!==o||e[26]!==c?(m=()=>o(c),e[25]=o,e[26]=c,e[27]=m):m=e[27];const S=a||s,j=s&&"bg-muted/50",E=(a||s)&&"cursor-not-allowed opacity-50";let x;e[28]!==j||e[29]!==E?(x=H(ke,"hover:bg-muted/70 hover:text-foreground",j,E),e[28]=j,e[29]=E,e[30]=x):x=e[30];let b;e[31]!==d?(b=n.jsx("span",{className:"capitalize",children:d}),e[31]=d,e[32]=b):b=e[32];let C;e[33]!==s?(C=s&&n.jsx(ce,{size:"xs"}),e[33]=s,e[34]=C):C=e[34];let y;e[35]!==m||e[36]!==S||e[37]!==x||e[38]!==b||e[39]!==C?(y=n.jsx(Xe,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:m,disabled:S,className:x,children:[b,C]})}),e[35]=m,e[36]=S,e[37]=x,e[38]=b,e[39]=C,e[40]=y):y=e[40];const P=f??d;let g;e[41]!==P?(g=n.jsx(Ze,{side:"top",className:"max-w-xs",children:n.jsx("p",{className:"text-xs",children:P})}),e[41]=P,e[42]=g):g=e[42];let D;return e[43]!==y||e[44]!==g?(D=n.jsxs(et,{delayDuration:400,children:[y,g]}),e[43]=y,e[44]=g,e[45]=D):D=e[45],D}function _t(t){const e=F.c(61),{items:r,open:o,onOpenChange:s,onSelect:a,loadingPrompt:l}=t,i=Z(),[c,u]=k.useState(""),d=!!l;let f;e[0]!==r||e[1]!==c?(f=c.trim()?r.filter(p=>{const w=c.toLowerCase();return p.prompt.name.toLowerCase().includes(w)||(p.prompt.title??"").toLowerCase().includes(w)||(p.prompt.description??"").toLowerCase().includes(w)}):r,e[0]=r,e[1]=c,e[2]=f):f=e[2];const m=f,S=ot();let j;e[3]!==m.length||e[4]!==c||e[5]!==i?(j=m.length===0&&n.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:i("chat.iceBreakers.noPromptsMatch",{search:c})}),e[3]=m.length,e[4]=c,e[5]=i,e[6]=j):j=e[6];let E;if(e[7]!==m||e[8]!==d||e[9]!==l?.name||e[10]!==s||e[11]!==a){let p;e[13]!==d||e[14]!==l?.name||e[15]!==s||e[16]!==a?(p=w=>n.jsx(Pe,{item:w,variant:"card",onSelect:h=>{s(!1),a(h)},isLoading:l?.name===w.prompt.name,isDisabled:d&&l?.name!==w.prompt.name},w.prompt.name),e[13]=d,e[14]=l?.name,e[15]=s,e[16]=a,e[17]=p):p=e[17],E=m.map(p),e[7]=m,e[8]=d,e[9]=l?.name,e[10]=s,e[11]=a,e[12]=E}else E=e[12];let x;e[18]!==j||e[19]!==E?(x=n.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[j,E]})}),e[18]=j,e[19]=E,e[20]=x):x=e[20];const b=x;let C;e[21]!==i?(C=i("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=i,e[22]=C):C=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=p=>{p.key==="Escape"&&u("")},e[23]=y):y=e[23];let P;e[24]!==c||e[25]!==C?(P=n.jsx(at,{value:c,onChange:u,placeholder:C,onKeyDown:y}),e[24]=c,e[25]=C,e[26]=P):P=e[26];const g=P;if(S){let p;e[27]!==i?(p=i("chat.iceBreakers.allPromptsTitle"),e[27]=i,e[28]=p):p=e[28];let w;e[29]!==p?(w=n.jsx(tt,{className:"sr-only",children:n.jsx(st,{children:p})}),e[29]=p,e[30]=w):w=e[30];let h;e[31]!==i?(h=i("chat.iceBreakers.promptsLabel"),e[31]=i,e[32]=h):h=e[32];let v;e[33]!==h?(v=n.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:n.jsx("span",{className:"text-sm font-medium text-foreground",children:h})}),e[33]=h,e[34]=v):v=e[34];let N;e[35]!==b||e[36]!==g||e[37]!==v||e[38]!==w?(N=n.jsxs(nt,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[w,v,g,b]}),e[35]=b,e[36]=g,e[37]=v,e[38]=w,e[39]=N):N=e[39];let $;return e[40]!==s||e[41]!==o||e[42]!==N?($=n.jsx(se,{delayDuration:400,children:n.jsx(rt,{open:o,onOpenChange:s,children:N})}),e[40]=s,e[41]=o,e[42]=N,e[43]=$):$=e[43],$}let D;e[44]!==i?(D=i("chat.iceBreakers.allPromptsTitle"),e[44]=i,e[45]=D):D=e[45];let T;e[46]!==D?(T=n.jsx(be,{className:"sr-only",children:n.jsx(ye,{children:D})}),e[46]=D,e[47]=T):T=e[47];let M;e[48]!==i?(M=i("chat.iceBreakers.promptsLabel"),e[48]=i,e[49]=M):M=e[49];let B;e[50]!==M?(B=n.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:n.jsx("span",{className:"text-sm font-medium text-foreground",children:M})}),e[50]=M,e[51]=B):B=e[51];let L;e[52]!==b||e[53]!==g||e[54]!==B||e[55]!==T?(L=n.jsxs(ve,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[T,B,g,b]}),e[52]=b,e[53]=g,e[54]=B,e[55]=T,e[56]=L):L=e[56];let _;return e[57]!==s||e[58]!==o||e[59]!==L?(_=n.jsx(se,{delayDuration:400,children:n.jsx(Se,{open:o,onOpenChange:s,children:L})}),e[57]=s,e[58]=o,e[59]=L,e[60]=_):_=e[60],_}function Lt(t){const e=F.c(30),{items:r,onSelect:o,loadingPrompt:s,className:a}=t,l=Z(),[i,c]=k.useState(!1);if(r.length===0)return null;let u,d,f,m,S;if(e[0]!==a||e[1]!==r||e[2]!==s||e[3]!==o||e[4]!==l){const b=r.slice(0,me),C=r.slice(me),y=!!s;let P;e[10]!==y||e[11]!==s?.name||e[12]!==o?(P=D=>n.jsx(Pe,{item:D,onSelect:o,isLoading:s?.name===D.prompt.name,isDisabled:y&&s?.name!==D.prompt.name},D.prompt.name),e[10]=y,e[11]=s?.name,e[12]=o,e[13]=P):P=e[13];const g=b.map(P);u=se,S=400,e[14]!==a?(d=H("w-full flex flex-wrap gap-2 justify-center",a),e[14]=a,e[15]=d):d=e[15],f=g,m=C.length>0&&n.jsx("button",{type:"button",disabled:y,onClick:()=>c(!0),className:H(ke,"hover:bg-muted/70 hover:text-foreground",y&&"opacity-50 cursor-not-allowed"),children:l("chat.iceBreakers.moreButton",{count:C.length})}),e[0]=a,e[1]=r,e[2]=s,e[3]=o,e[4]=l,e[5]=u,e[6]=d,e[7]=f,e[8]=m,e[9]=S}else u=e[5],d=e[6],f=e[7],m=e[8],S=e[9];let j;e[16]!==d||e[17]!==f||e[18]!==m?(j=n.jsxs("div",{className:d,children:[f,m]}),e[16]=d,e[17]=f,e[18]=m,e[19]=j):j=e[19];let E;e[20]!==r||e[21]!==s||e[22]!==i||e[23]!==o?(E=n.jsx(_t,{items:r,open:i,onOpenChange:c,onSelect:o,loadingPrompt:s}),e[20]=r,e[21]=s,e[22]=i,e[23]=o,e[24]=E):E=e[24];let x;return e[25]!==u||e[26]!==S||e[27]!==j||e[28]!==E?(x=n.jsxs(u,{delayDuration:S,children:[j,E]}),e[25]=u,e[26]=S,e[27]=j,e[28]=E,e[29]=x):x=e[29],x}function Bt(){return null}function Mt(t,e){switch(e.type){case"SELECT_PROMPT":return!e.prompt.arguments||e.prompt.arguments.length===0?{stage:"loading",prompt:e.prompt}:{stage:"idle"};case"START_LOADING":return{stage:"loading",prompt:e.prompt,arguments:e.arguments};case"RESET":return{stage:"idle"};default:return t}}function Ot(t){const e=F.c(31),{connectionId:r}=t,o=Z(),{sendMessage:s}=we(),{org:a}=X();let l;e[0]!==r||e[1]!==a.id||e[2]!==a.slug?(l={connectionId:r,orgId:a.id,orgSlug:a.slug},e[0]=r,e[1]=a.id,e[2]=a.slug,e[3]=l):l=e[3];const i=lt(l);let c;e[4]!==i?(c={client:i,staleTime:6e4},e[4]=i,e[5]=c):c=e[5];const{data:u}=it(c);let d;e[6]!==u?.prompts?(d=u?.prompts??[],e[6]=u?.prompts,e[7]=d):d=e[7];const f=d;let m;e[8]!==f?(m=f.map(At),e[8]=f,e[9]=m):m=e[9];const S=m;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j={stage:"idle"},e[10]=j):j=e[10];const[E,x]=k.useReducer(Mt,j),[b,C]=k.useState(null);let y;e[11]!==i||e[12]!==s||e[13]!==o?(y=async(h,v)=>{if(!i){ie.error(o("chat.iceBreakers.mcpClientNotAvailable")),x({type:"RESET"});return}try{const N=await ct(i,h.name,v);x({type:"RESET"});const $={type:"doc",content:[{type:"paragraph",content:[ut({id:h.name,name:Je(h.name,Ce(h._meta)),metadata:N.messages,char:"/",kind:"prompt",args:v}),{type:"text",text:" "}]}]};await s($)}catch(N){console.error("[ice-breakers] Failed to fetch prompt:",N),ie.error(o("chat.iceBreakers.failedToLoadPrompt")),x({type:"RESET"})}},e[11]=i,e[12]=s,e[13]=o,e[14]=y):y=e[14];const P=y;let g;e[15]!==P?(g=async h=>{if(h.arguments&&h.arguments.length>0){x({type:"SELECT_PROMPT",prompt:h}),C(h);return}x({type:"START_LOADING",prompt:h}),await P(h)},e[15]=P,e[16]=g):g=e[16];const D=g;let T;e[17]!==b||e[18]!==P?(T=async h=>{b&&(x({type:"START_LOADING",prompt:b,arguments:h}),C(null),await P(b,h))},e[17]=b,e[18]=P,e[19]=T):T=e[19];const M=T;if(S.length===0)return null;const B=E.stage==="loading"?E.prompt:null;let L;e[20]!==D||e[21]!==S||e[22]!==B?(L=n.jsx(Lt,{items:S,onSelect:D,loadingPrompt:B}),e[20]=D,e[21]=S,e[22]=B,e[23]=L):L=e[23];let _;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{C(null),x({type:"RESET"})},e[24]=_):_=e[24];let p;e[25]!==b||e[26]!==M?(p=n.jsx(dt,{prompt:b,setPrompt:_,onSubmit:M}),e[25]=b,e[26]=M,e[27]=p):p=e[27];let w;return e[28]!==L||e[29]!==p?(w=n.jsxs(n.Fragment,{children:[L,p]}),e[28]=L,e[29]=p,e[30]=w):w=e[30],w}function At(t){return{prompt:t}}function It(t){const e=F.c(13),{className:r}=t,{selectedVirtualMcp:o}=Fe(),{org:s}=X();let a;e[0]!==s.id?(a=Me(s.id),e[0]=s.id,e[1]=a):a=e[1];const l=a.id,i=o?.id??l;let c;e[2]!==r?(c=H("w-full @container",r),e[2]=r,e[3]=c):c=e[3];const u=i??"default";let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Bt,{}),e[4]=d):d=e[4];let f;e[5]!==i?(f=n.jsx(Ot,{connectionId:i}),e[5]=i,e[6]=f):f=e[6];let m;e[7]!==u||e[8]!==f?(m=n.jsx(Oe,{fallback:null,children:n.jsx(k.Suspense,{fallback:d,children:f},u)}),e[7]=u,e[8]=f,e[9]=m):m=e[9];let S;return e[10]!==c||e[11]!==m?(S=n.jsx("div",{className:c,children:m}),e[10]=c,e[11]=m,e[12]=S):S=e[12],S}function $t(t){let e=0;for(const r of t)for(const o of r.parts??[]){const s=o;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function Ft(){const t=F.c(8),{openPanel:e}=vt(),r=St(),o=He()?.messages??[],s=Ne()?.taskId??null;let a;t[0]!==o?(a=$t(o),t[0]=o,t[1]=a):a=t[1];const l=a,i=k.useRef(null),c=k.useRef(null);let u,d;t[2]!==l||t[3]!==r||t[4]!==e||t[5]!==s?(u=()=>{if(!l||!s)return;const f=`${s}:${l}`;c.current!==f&&(c.current=f,r?.refreshThreadMetadata(s)),i.current!==s&&(i.current=s,e("site-editor"))},d=[l,s,e,r],t[2]=l,t[3]=r,t[4]=e,t[5]=s,t[6]=u,t[7]=d):(u=t[6],d=t[7]),k.useEffect(u,d)}function De(t){return`deco-credits-empty-dismissed:${t}`}function Ds(t){try{return localStorage.getItem(De(t))==="1"}catch{return!1}}function Ht(){const t=F.c(56),e=Z(),{org:r}=X(),o=wt("credits"),s=je(),{decoKeyId:a}=Nt(),[l,i]=k.useState(!0);let c;t[0]!==r.id?(c=()=>{ue("credits_empty_state_dismissed",{organization_id:r.id}),i(!1);try{localStorage.setItem(De(r.id),"1")}catch{}},t[0]=r.id,t[1]=c):c=t[1];const u=c;let d,f;if(t[2]!==l||t[3]!==r.id?(d=()=>{l&&ue("credits_empty_state_shown",{organization_id:r.id})},f=[l,r.id],t[2]=l,t[3]=r.id,t[4]=d,t[5]=f):(d=t[4],f=t[5]),k.useEffect(d,f),!l)return null;if(!o){let h;t[6]!==e?(h=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=h):h=t[7];let v;t[8]!==h?(v={title:h},t[8]=h,t[9]=v):v=t[9];let N;return t[10]!==u||t[11]!==v?(N=n.jsx(Ct,{feature:"chat",copy:v,onDismiss:u}),t[10]=u,t[11]=v,t[12]=N):N=t[12],N}let m;t[13]!==u?(m=h=>!h&&u(),t[13]=u,t[14]=m):m=t[14];let S;t[15]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),t[15]=S):S=t[15];let j;t[16]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:n.jsx(Te,{size:20,className:"text-warning"})}),t[16]=j):j=t[16];let E;t[17]!==e?(E=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=E):E=t[18];let x;t[19]!==E?(x=n.jsx(ye,{className:"text-lg font-semibold",children:E}),t[19]=E,t[20]=x):x=t[20];let b;t[21]!==e?(b=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=b):b=t[22];let C;t[23]!==b?(C=n.jsx(Ae,{className:"mt-2 text-[13px] leading-relaxed max-w-[320px] mx-auto",children:b}),t[23]=b,t[24]=C):C=t[24];let y;t[25]!==x||t[26]!==C?(y=n.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[S,n.jsxs(be,{className:"relative gap-3",children:[j,n.jsxs("div",{className:"text-center",children:[x,C]})]})]}),t[25]=x,t[26]=C,t[27]=y):y=t[27];let P;t[28]!==a||t[29]!==u?(P=a&&n.jsx("div",{className:"px-6 pb-5",children:n.jsx(ft,{source:"empty_state",onDone:u})}),t[28]=a,t[29]=u,t[30]=P):P=t[30];let g;t[31]!==u||t[32]!==s||t[33]!==r.slug?(g=()=>{s({to:"/$org/settings/ai-providers",params:{org:r.slug}}),u()},t[31]=u,t[32]=s,t[33]=r.slug,t[34]=g):g=t[34];let D;t[35]!==e?(D=e("chat.creditsEmptyState.useYourOwnProvider"),t[35]=e,t[36]=D):D=t[36];let T;t[37]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(Et,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=T):T=t[37];let M;t[38]!==g||t[39]!==D?(M=n.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:g,children:[D,T]}),t[38]=g,t[39]=D,t[40]=M):M=t[40];let B;t[41]!==e?(B=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=B):B=t[42];let L;t[43]!==u||t[44]!==B?(L=n.jsx(Ee,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:u,children:B}),t[43]=u,t[44]=B,t[45]=L):L=t[45];let _;t[46]!==M||t[47]!==L?(_=n.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[M,L]}),t[46]=M,t[47]=L,t[48]=_):_=t[48];let p;t[49]!==y||t[50]!==P||t[51]!==_?(p=n.jsxs(ve,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:zt,children:[y,P,_]}),t[49]=y,t[50]=P,t[51]=_,t[52]=p):p=t[52];let w;return t[53]!==p||t[54]!==m?(w=n.jsx(Se,{open:!0,onOpenChange:m,children:p}),t[53]=p,t[54]=m,t[55]=w):w=t[55],w}function zt(t){return t.preventDefault()}function Kt(t){const e=F.c(6),{balanceDollars:r}=t;let o;e[0]!==r?(o=r.toFixed(2),e[0]=r,e[1]=o):o=e[1];const s=o;let a,l;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=H("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),l=n.jsx(Te,{size:13,className:"text-success"}),e[2]=a,e[3]=l):(a=e[2],l=e[3]);let i;return e[4]!==s?(i=n.jsxs("div",{className:a,children:[l,n.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",s," in credits to get started"]})]}),e[4]=s,e[5]=i):i=e[5],i}function qt(){const t=F.c(8),{org:e}=X(),r=je();let o;t[0]!==r||t[1]!==e.slug?(o=()=>r({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=r,t[1]=e.slug,t[2]=o):o=t[2];let s,a,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=H("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=n.jsx(Tt,{size:13,className:"text-warning"}),l=n.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=a,t[5]=l):(s=t[3],a=t[4],l=t[5]);let i;return t[6]!==o?(i=n.jsxs("button",{type:"button",onClick:o,className:s,children:[a,l]}),t[6]=o,t[7]=i):i=t[7],i}function Gt(t){const e=F.c(7),{scrollRef:r,sentinelRef:o,hasMoreOlder:s,isFetchingOlder:a,fetchOlderMessages:l}=t;let i,c;e[0]!==l||e[1]!==s||e[2]!==a||e[3]!==r||e[4]!==o?(i=()=>{const u=o.current,d=r.current;if(!u||!d||!s)return;const f=new IntersectionObserver(async m=>{if(!m[0]?.isIntersecting||a||!s)return;const j=d.scrollHeight,E=d.scrollTop;await l(),requestAnimationFrame(()=>{const x=d.scrollHeight;d.scrollTop=E+(x-j)})},{root:d,rootMargin:"200px 0px 0px 0px"});return f.observe(u),()=>f.disconnect()},c=[r,o,s,a,l],e[0]=l,e[1]=s,e[2]=a,e[3]=r,e[4]=o,e[5]=i,e[6]=c):(i=e[5],c=e[6]),k.useEffect(i,c)}function Ut(t){const e=F.c(5),{className:r,children:o}=t;let s;e[0]!==r?(s=H("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",r),e[0]=r,e[1]=s):s=e[1];let a;return e[2]!==o||e[3]!==s?(a=n.jsx("div",{className:s,children:o}),e[2]=o,e[3]=s,e[4]=a):a=e[4],a}function Qt(t){const e=F.c(5),{children:r,className:o}=t;let s;e[0]!==o?(s=H("flex-1 min-h-0 overflow-y-auto isolate",o),e[0]=o,e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==s?(a=n.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=a):a=e[4],a}function Vt(t){const e=F.c(2),{children:r}=t;let o;return e[0]!==r?(o=n.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:r}),e[0]=r,e[1]=o):o=e[1],o}function Yt(){const t=Z(),{messages:e,status:r,hasMoreOlder:o,isFetchingOlder:s,fetchOlderMessages:a,isRunInProgress:l}=we(),{taskId:i}=Ge();Ft();const c=Ue(i??""),u=Qe(c),d=u.size===0?e:e.filter(g=>!u.has(g.id)),f=Ve(d,r==="submitted"||r==="streaming"||l),m=f.visible,S=xt(m),j=S.at(-1),x=ht()*gt+16,b=k.useRef(null),C=k.useRef(null);Gt({scrollRef:b,sentinelRef:C,hasMoreOlder:o,isFetchingOlder:s,fetchOlderMessages:a});const y=bt({initial:!1}),P=g=>{b.current=g,y.scrollRef(g)};return n.jsx(Ye.Provider,{value:f,children:n.jsx(yt,{messages:e,children:n.jsxs("div",{className:"relative h-full w-full min-w-0",children:[n.jsx("div",{ref:P,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:x},children:n.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[n.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[n.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),s&&n.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),S.slice(0,-1).map((g,D)=>n.jsx(fe,{pair:g,isLastPair:!1,status:D===S.length-1?r:void 0},`pair-${g.user?.id??g.assistant?.id}`))]}),j&&n.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:n.jsx(fe,{pair:j,isLastPair:!0,status:r},`pair-${j.user?.id??j.assistant?.id}`)})]})}),!y.isAtBottom&&n.jsx(Ee,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-md animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:x+8},onClick:()=>{y.scrollToBottom()},children:n.jsx($e,{size:14})})]})})})}function Jt(t){const e=F.c(5),{children:r,className:o}=t;let s;e[0]!==o?(s=H("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",o),e[0]=o,e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==s?(a=n.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=a):a=e[4],a}const Rs=Object.assign(Ut,{Main:Qt,Messages:Yt,EmptyState:Vt,Footer:Jt,Input:pt,Provider:qe,ActiveTaskProvider:Ke,ThreadlessProvider:ze,IceBreakers:It,NoAiProviderEmptyState:jt,CreditsEmptyState:Ht,CreditsEyebrow:Kt,NoCreditsEyebrow:qt,CreditsExhaustedBanner:mt});function pe(t){return t==="installing"||t==="install-failed"||t==="starting"||t==="start-failed"||t==="running"||t==="crashed"}const Wt={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},Re=k.createContext(Wt),he=16384;class Xt{data="";append(e){this.data+=e,this.data.length>he&&(this.data=this.data.slice(this.data.length-he))}get(){return this.data}clear(){this.data=""}}const Zt=1e3,es=3e4,ts=3e3,ge=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],xe="log";function ss(t){if(!t)return null;try{return new URL("/_sandbox/events",t).href}catch{return null}}function ns(t){return t===404}async function rs(t){try{const e=await fetch(t,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(ts)});return await e.body?.cancel().catch(()=>{}),ns(e.status)}catch{return!1}}function _s({virtualMcpId:t,branch:e,previewUrl:r=null,enabled:o=!0,children:s}){const{org:a}=X(),l=Ie(),i=Ne()?.taskId??null,[c,u]=k.useState(null),[d,f]=k.useState({phase:"idle"}),[m,S]=k.useState({state:"running"}),[j,E]=k.useState({kind:"unknown"}),[x,b]=k.useState(!1),[C,y]=k.useState([]),[P,g]=k.useState([]),[,D]=k.useState(0),T=k.useRef(new Map),M=k.useRef(new Set),B=k.useRef(new Set),L=k.useRef(null),_=ss(r),p=Pt(t)?.metadata?.runtime?.selected==="deno",w=v=>{let N=T.current.get(v);return N||(N=new Xt,T.current.set(v,N)),N};k.useEffect(()=>{if(u(null),f({phase:"idle"}),S({state:"running"}),E({kind:"unknown"}),L.current=null,b(!1),y([]),g([]),T.current.clear(),!t||!e||!o)return;const v=kt({orgSlug:a.slug,virtualMcpId:t,branch:e,threadId:i??null},"events");let N=!1,$=0,Y=null,q=null,G=null,K=null,z=null,J=null;const Le=R=>{try{const O=JSON.parse(R.data);u(O),O.kind!=="failed"&&(b(!1),$=0),O.kind==="ready"&&oe()}catch(O){console.warn("[vm-events] bad phase payload",O)}},ne=()=>{b(!0),u(null),f({phase:"idle"}),S({state:"running"}),E({kind:"unknown"}),y([]),g([]),T.current.clear()},re=R=>{try{const O=JSON.parse(R.data);if(typeof O.data!="string")return;$=0;const I=O.data.replace(/\r?\n/g,`\r
2
2
  `);w(O.source).append(I);for(const A of M.current)try{A(O.source,I)}catch{}D(A=>A+1)}catch{}},ae=R=>{const O=R.type;try{const I=JSON.parse(R.data);switch($=0,O){case"lifecycle":{const A=I;f(A.state);const U=`${a.slug}/${t}/${e}`;if(pe(A.state.phase)&&!(J&&pe(J))){de(l,a.id);const V=W.decofile(U);l.getQueryData(V)===void 0&&l.invalidateQueries({queryKey:V})}A.state.phase==="running"&&J!=="running"&&(de(l,a.id),l.invalidateQueries({queryKey:W.decofile(U)}),l.invalidateQueries({queryKey:W.liveMeta(a.slug,t,e)})),J=A.state.phase;const Q=A.state.phase==="running"?A.state.port:null,te=L.current;if(L.current=Q,te!==null&&Q!==null&&te!==Q)for(const V of B.current)try{V()}catch{}return}case"status":S(I);return;case"tasks":{const U=I.active.map(Q=>Q.logName??"").filter(Boolean);g(U);return}case"scripts":y(I.scripts);return;case"branch":{const A=I.meta;E(A);return}case"reload":for(const A of B.current)try{A()}catch{}return;case"file-changed":{const{path:A}=I,U=`${a.slug}/${t}/${e}`;if(A.startsWith(".deco/")||A.includes("/.deco/")){if(!(J==="running"))return;G&&clearTimeout(G),G=setTimeout(()=>{if(G=null,l.invalidateQueries({queryKey:W.decofile(U)}),p)for(const V of B.current)try{V()}catch{}},500)}else q&&clearTimeout(q),q=setTimeout(()=>{q=null,l.invalidateQueries({queryKey:W.liveMeta(a.slug,t,e)})},1e3);return}}}catch{}};function ee(){if(N)return;const R=new EventSource(v);K=R,R.onopen=()=>{},R.onerror=()=>{K===R&&R.readyState===EventSource.CLOSED&&le("studio")},R.addEventListener("phase",Le),R.addEventListener("gone",ne),R.addEventListener(xe,re);for(const O of ge)R.addEventListener(O,ae)}function oe(){if(N||!_||z)return;const R=new EventSource(_);z=R;let O=!1;R.onopen=()=>{if(N||z!==R)return;O=!0,$=0;const I=K;K=null,I?.close()},R.onerror=()=>{z===R&&R.readyState===EventSource.CLOSED&&Be(R,O)},R.addEventListener(xe,re);for(const I of ge)R.addEventListener(I,ae)}async function Be(R,O){const I=_?await rs(_):!1;if(!(N||z!==R)){if(R.close(),z=null,I){ne(),K||ee();return}O&&le("direct")}}function le(R){if(N||Y)return;const O=Dt(es,Zt,$,2,0);$++,Y=setTimeout(()=>{if(Y=null,!N){if(R==="direct"){z?.close(),z=null,oe();return}K?.close(),K=null,ee()}},O)}return ee(),()=>{N=!0,K?.close(),z?.close(),Y&&clearTimeout(Y),q&&clearTimeout(q),G&&clearTimeout(G)}},[t,e,a.slug,a.id,o,i,_,l,p]);const h={phase:c,lifecycle:d,status:m,branch:j,notFound:x,scripts:C,activeProcesses:P,getBuffer:v=>T.current.get(v)?.get()??"",hasData:v=>(T.current.get(v)?.get().length??0)>0,subscribeChunks:v=>(M.current.add(v),()=>{M.current.delete(v)}),subscribeReload:v=>(B.current.add(v),()=>{B.current.delete(v)})};return n.jsx(Re,{value:h,children:s})}function _e(){return k.use(Re)}function Ls(t){const{subscribeChunks:e}=_e(),r=k.useRef(t);r.current=t,k.useEffect(()=>e((a,l)=>{r.current?.(a,l)}),[e])}function Bs(t){const{subscribeReload:e}=_e(),r=k.useRef(t);r.current=t,k.useEffect(()=>e(()=>{r.current?.()}),[e])}export{Rs as C,_s as S,Ls as a,Bs as b,_e as u,Ds as w};
@@ -1 +1 @@
1
- import{c as u,a2 as c,aa as r,K as l,R as d,o as f,e as S}from"./index-CvkEkbZF.js";function C(){const e=u.c(7),{org:i}=c(),o=r();let a;e[0]!==i.id?(a=l.secrets(i.id),e[0]=i.id,e[1]=a):a=e[1];let t;e[2]!==o?(t=async()=>await o.call("SECRET_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;e[4]!==a||e[5]!==t?(s={queryKey:a,staleTime:6e4,queryFn:t},e[4]=a,e[5]=t,e[6]=s):s=e[6];const{data:n}=d(s);return n.secrets}function m(){const e=u.c(8),{org:i}=c(),o=r(),a=f();let t;e[0]!==o?(t=async y=>await o.call("SECRET_CREATE",{...y}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==a?(s=()=>{a.invalidateQueries({queryKey:l.secrets(i.id)})},e[2]=i,e[3]=a,e[4]=s):s=e[4];let n;return e[5]!==t||e[6]!==s?(n={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=n):n=e[7],S(n)}export{m as a,C as u};
1
+ import{c as u,a2 as c,aa as r,K as l,R as d,o as f,e as S}from"./index-D984WV3U.js";function C(){const e=u.c(7),{org:i}=c(),o=r();let a;e[0]!==i.id?(a=l.secrets(i.id),e[0]=i.id,e[1]=a):a=e[1];let t;e[2]!==o?(t=async()=>await o.call("SECRET_LIST",{}),e[2]=o,e[3]=t):t=e[3];let s;e[4]!==a||e[5]!==t?(s={queryKey:a,staleTime:6e4,queryFn:t},e[4]=a,e[5]=t,e[6]=s):s=e[6];const{data:n}=d(s);return n.secrets}function m(){const e=u.c(8),{org:i}=c(),o=r(),a=f();let t;e[0]!==o?(t=async y=>await o.call("SECRET_CREATE",{...y}),e[0]=o,e[1]=t):t=e[1];let s;e[2]!==i||e[3]!==a?(s=()=>{a.invalidateQueries({queryKey:l.secrets(i.id)})},e[2]=i,e[3]=a,e[4]=s):s=e[4];let n;return e[5]!==t||e[6]!==s?(n={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=n):n=e[7],S(n)}export{m as a,C as u};
@@ -1 +1 @@
1
- import{c as q,b as Y,r as S,j as r,l as Z,D as ee,q as te,v as re,I as se,s as le}from"./index-CvkEkbZF.js";import{a as J,e as K}from"./UserSquare-CyTwJikM.js";import{d as oe}from"./agent-icon-BzQJojFn.js";import{i as ie}from"./SearchMd-DyqBdeBV.js";import{u as Q}from"./use-new-blocks-editor-BtqPnhyC.js";import{ac as ne,o as ce,aO as ae,G as fe,u as de}from"./claim-phase-copy-DhUnD0f3.js";import{d as V,r as ue}from"./section-preview-url-7zfngvgW.js";import{a as me}from"./input-ChjC7XxY.js";const ve=12,D=new Set,_=new Set;function pe(){for(const s of _)s()}function xe(s){return D.has(s)?!0:D.size>=ve?!1:(D.add(s),!0)}function X(s){D.delete(s)&&pe()}function he(s){return _.add(s),()=>{_.delete(s)}}function we(s,e){const t=S.useRef(!1),[m,i]=S.useState(!1),l=S.useRef(null),c=S.useRef(null),u=S.useRef(null),o=S.useRef(s);o.current=s;const[d]=S.useState(()=>{const a=()=>{u.current?.(),u.current=null},f=()=>t.current?!0:xe(e)?(t.current=!0,i(!0),a(),!0):!1;return n=>{if(c.current=n,l.current&&(l.current.disconnect(),l.current=null),a(),!n){t.current&&(X(e),t.current=!1,i(!1));return}queueMicrotask(()=>{if(c.current!==n)return;const w=new IntersectionObserver(v=>{if(v[0]?.isIntersecting??!1){!f()&&!u.current&&(u.current=he(()=>{c.current===n&&f()}));return}a(),t.current&&(X(e),t.current=!1,i(!1))},{root:o.current.current,rootMargin:"160px 0px"});w.observe(n),l.current=w})}});return{ref:d,iframeActive:m}}function ge(s){const e=q.c(9),{previewUrl:t,title:m,scrollRootRef:i,slotId:l}=s,{ref:c,iframeActive:u}=we(i,l),[o,d]=S.useState(!1),a=Q()?K:J;let f;e[0]!==a||e[1]!==u||e[2]!==o||e[3]!==t||e[4]!==m?(f=u?r.jsxs(r.Fragment,{children:[!o&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:r.jsx(a,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),r.jsx("iframe",{src:t,title:`Preview ${m}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>d(!0)})]}):r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(a,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=a,e[1]=u,e[2]=o,e[3]=t,e[4]=m,e[5]=f):f=e[5];let n;return e[6]!==c||e[7]!==f?(n=r.jsx("div",{ref:c,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:f}),e[6]=c,e[7]=f,e[8]=n):n=e[8],n}function Se(s){const e=q.c(27),{entry:t,previewUrl:m,scrollRootRef:i,onSelect:l}=s,u=Q()?t.isSavedBlock?oe:K:J,o=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let d;e[0]!==o?(d=Z("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors card-shadow","hover:border-primary/40 hover:bg-accent/30",o),e[0]=o,e[1]=d):d=e[1];let a;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==m||e[5]!==i?(a=r.jsx(ge,{previewUrl:m,title:t.title,scrollRootRef:i,slotId:t.resolveType}),e[2]=t.resolveType,e[3]=t.title,e[4]=m,e[5]=i,e[6]=a):a=e[6];let f;e[7]!==t.isSavedBlock?(f=t.isSavedBlock?{color:fe}:void 0,e[7]=t.isSavedBlock,e[8]=f):f=e[8];let n;e[9]!==u||e[10]!==f?(n=r.jsx(u,{className:"h-4 w-4 shrink-0",style:f}),e[9]=u,e[10]=f,e[11]=n):n=e[11];let w;e[12]!==t.title?(w=r.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[12]=t.title,e[13]=w):w=e[13];let v;e[14]!==t.description?(v=t.description&&r.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[14]=t.description,e[15]=v):v=e[15];let p;e[16]!==w||e[17]!==v?(p=r.jsxs("div",{className:"min-w-0 flex-1",children:[w,v]}),e[16]=w,e[17]=v,e[18]=p):p=e[18];let h;e[19]!==n||e[20]!==p?(h=r.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[n,p]}),e[19]=n,e[20]=p,e[21]=h):h=e[21];let g;return e[22]!==l||e[23]!==d||e[24]!==a||e[25]!==h?(g=r.jsxs("button",{type:"button",onClick:l,className:d,children:[a,h]}),e[22]=l,e[23]=d,e[24]=a,e[25]=h,e[26]=g):g=e[26],g}function Te(s){const e=q.c(51),{open:t,onOpenChange:m,meta:i,decofile:l,previewBaseUrl:c,onSelect:u}=s,o=Y(),[d,a]=S.useState(""),[f,n]=S.useState(t),w=S.useRef(null);t!==f&&(n(t),t&&a(""));let v,p,h,g,j,N,R,y,b,P,C;if(e[0]!==l||e[1]!==i||e[2]!==m||e[3]!==u||e[4]!==t||e[5]!==c||e[6]!==d||e[7]!==o){const z=t&&i&&l?ne(i,l):[],W=i?ce(i):"",F=l?ae(l):void 0,G=new Map;if(t&&W)for(const x of z)G.set(x.resolveType,V(c,W,x.previewBlock,F));const M=d.trim().toLowerCase(),H=M?z.filter(x=>x.title.toLowerCase().includes(M)||x.resolveType.toLowerCase().includes(M)||x.description?.toLowerCase().includes(M)):z;p=ee,P=t,C=m,v=te,R="top-3 right-3",y="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let B;e[19]!==o?(B=o("sectionsEditor.addSectionModal.title"),e[19]=o,e[20]=B):B=e[20];let L;e[21]!==B?(L=r.jsx(re,{children:B}),e[21]=B,e[22]=L):L=e[22];let O;e[23]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(ie,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=O):O=e[23];let $;e[24]===Symbol.for("react.memo_cache_sentinel")?($=x=>a(x.target.value),e[24]=$):$=e[24];let k;e[25]!==o?(k=o("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=o,e[26]=k):k=e[26];let A;e[27]!==d||e[28]!==k?(A=r.jsxs("div",{className:"relative pt-2",children:[O,r.jsx(se,{value:d,onChange:$,placeholder:k,className:"h-9 pl-8"})]}),e[27]=d,e[28]=k,e[29]=A):A=e[29],e[30]!==L||e[31]!==A?(b=r.jsxs(le,{className:"shrink-0 border-b px-4 py-3 text-left",children:[L,A]}),e[30]=L,e[31]=A,e[32]=b):b=e[32],j=w,N="min-h-0 flex-1 overflow-y-auto",h="p-4",g=H.length===0?r.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("sectionsEditor.addSectionModal.noSectionsFound")}):r.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:H.map(x=>r.jsx(Se,{entry:x,scrollRootRef:w,previewUrl:G.get(x.resolveType)??V(c,W,x.previewBlock,F),onSelect:()=>u(x)},x.resolveType))}),e[0]=l,e[1]=i,e[2]=m,e[3]=u,e[4]=t,e[5]=c,e[6]=d,e[7]=o,e[8]=v,e[9]=p,e[10]=h,e[11]=g,e[12]=j,e[13]=N,e[14]=R,e[15]=y,e[16]=b,e[17]=P,e[18]=C}else v=e[8],p=e[9],h=e[10],g=e[11],j=e[12],N=e[13],R=e[14],y=e[15],b=e[16],P=e[17],C=e[18];let I;e[33]!==h||e[34]!==g?(I=r.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=I):I=e[35];let T;e[36]!==I||e[37]!==j||e[38]!==N?(T=r.jsx("div",{ref:j,className:N,children:I}),e[36]=I,e[37]=j,e[38]=N,e[39]=T):T=e[39];let U;e[40]!==v||e[41]!==T||e[42]!==R||e[43]!==y||e[44]!==b?(U=r.jsxs(v,{closeButtonClassName:R,className:y,children:[b,T]}),e[40]=v,e[41]=T,e[42]=R,e[43]=y,e[44]=b,e[45]=U):U=e[45];let E;return e[46]!==p||e[47]!==U||e[48]!==P||e[49]!==C?(E=r.jsx(p,{open:P,onOpenChange:C,children:U}),e[46]=p,e[47]=U,e[48]=P,e[49]=C,e[50]=E):E=e[50],E}function Ue(s){const e=q.c(4),{previewServerUrl:t,runtime:m}=me(s.virtualMcpId),{url:i}=de(s.virtualMcpId),l=m==="cms";if(i)return i;let c;return e[0]!==l||e[1]!==s.sandboxUrl||e[2]!==t?(c=ue({sandboxUrl:s.sandboxUrl,previewServerUrl:t,fastPreviewActive:l}),e[0]=l,e[1]=s.sandboxUrl,e[2]=t,e[3]=c):c=e[3],c}export{Te as A,Ue as u};
1
+ import{c as q,b as Y,r as S,j as r,l as Z,D as ee,q as te,v as re,I as se,s as le}from"./index-D984WV3U.js";import{a as J,e as K}from"./UserSquare-BlSFjBrQ.js";import{d as oe}from"./agent-icon-CsQzAnP1.js";import{i as ie}from"./SearchMd-X-m-ot0f.js";import{u as Q}from"./use-new-blocks-editor-B5DYqQrS.js";import{ac as ne,o as ce,aO as ae,G as fe,u as de}from"./claim-phase-copy-kSJ81npa.js";import{d as V,r as ue}from"./section-preview-url-7zfngvgW.js";import{a as me}from"./input-C_t2NUbp.js";const ve=12,D=new Set,_=new Set;function pe(){for(const s of _)s()}function xe(s){return D.has(s)?!0:D.size>=ve?!1:(D.add(s),!0)}function X(s){D.delete(s)&&pe()}function he(s){return _.add(s),()=>{_.delete(s)}}function we(s,e){const t=S.useRef(!1),[m,i]=S.useState(!1),l=S.useRef(null),c=S.useRef(null),u=S.useRef(null),o=S.useRef(s);o.current=s;const[d]=S.useState(()=>{const a=()=>{u.current?.(),u.current=null},f=()=>t.current?!0:xe(e)?(t.current=!0,i(!0),a(),!0):!1;return n=>{if(c.current=n,l.current&&(l.current.disconnect(),l.current=null),a(),!n){t.current&&(X(e),t.current=!1,i(!1));return}queueMicrotask(()=>{if(c.current!==n)return;const w=new IntersectionObserver(v=>{if(v[0]?.isIntersecting??!1){!f()&&!u.current&&(u.current=he(()=>{c.current===n&&f()}));return}a(),t.current&&(X(e),t.current=!1,i(!1))},{root:o.current.current,rootMargin:"160px 0px"});w.observe(n),l.current=w})}});return{ref:d,iframeActive:m}}function ge(s){const e=q.c(9),{previewUrl:t,title:m,scrollRootRef:i,slotId:l}=s,{ref:c,iframeActive:u}=we(i,l),[o,d]=S.useState(!1),a=Q()?K:J;let f;e[0]!==a||e[1]!==u||e[2]!==o||e[3]!==t||e[4]!==m?(f=u?r.jsxs(r.Fragment,{children:[!o&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:r.jsx(a,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),r.jsx("iframe",{src:t,title:`Preview ${m}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>d(!0)})]}):r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(a,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=a,e[1]=u,e[2]=o,e[3]=t,e[4]=m,e[5]=f):f=e[5];let n;return e[6]!==c||e[7]!==f?(n=r.jsx("div",{ref:c,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:f}),e[6]=c,e[7]=f,e[8]=n):n=e[8],n}function Se(s){const e=q.c(27),{entry:t,previewUrl:m,scrollRootRef:i,onSelect:l}=s,u=Q()?t.isSavedBlock?oe:K:J,o=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let d;e[0]!==o?(d=Z("group flex flex-col overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-lg))] border bg-card text-left transition-colors card-shadow","hover:border-primary/40 hover:bg-accent/30",o),e[0]=o,e[1]=d):d=e[1];let a;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==m||e[5]!==i?(a=r.jsx(ge,{previewUrl:m,title:t.title,scrollRootRef:i,slotId:t.resolveType}),e[2]=t.resolveType,e[3]=t.title,e[4]=m,e[5]=i,e[6]=a):a=e[6];let f;e[7]!==t.isSavedBlock?(f=t.isSavedBlock?{color:fe}:void 0,e[7]=t.isSavedBlock,e[8]=f):f=e[8];let n;e[9]!==u||e[10]!==f?(n=r.jsx(u,{className:"h-4 w-4 shrink-0",style:f}),e[9]=u,e[10]=f,e[11]=n):n=e[11];let w;e[12]!==t.title?(w=r.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[12]=t.title,e[13]=w):w=e[13];let v;e[14]!==t.description?(v=t.description&&r.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[14]=t.description,e[15]=v):v=e[15];let p;e[16]!==w||e[17]!==v?(p=r.jsxs("div",{className:"min-w-0 flex-1",children:[w,v]}),e[16]=w,e[17]=v,e[18]=p):p=e[18];let h;e[19]!==n||e[20]!==p?(h=r.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[n,p]}),e[19]=n,e[20]=p,e[21]=h):h=e[21];let g;return e[22]!==l||e[23]!==d||e[24]!==a||e[25]!==h?(g=r.jsxs("button",{type:"button",onClick:l,className:d,children:[a,h]}),e[22]=l,e[23]=d,e[24]=a,e[25]=h,e[26]=g):g=e[26],g}function Te(s){const e=q.c(51),{open:t,onOpenChange:m,meta:i,decofile:l,previewBaseUrl:c,onSelect:u}=s,o=Y(),[d,a]=S.useState(""),[f,n]=S.useState(t),w=S.useRef(null);t!==f&&(n(t),t&&a(""));let v,p,h,g,j,N,R,y,b,P,C;if(e[0]!==l||e[1]!==i||e[2]!==m||e[3]!==u||e[4]!==t||e[5]!==c||e[6]!==d||e[7]!==o){const z=t&&i&&l?ne(i,l):[],W=i?ce(i):"",F=l?ae(l):void 0,G=new Map;if(t&&W)for(const x of z)G.set(x.resolveType,V(c,W,x.previewBlock,F));const M=d.trim().toLowerCase(),H=M?z.filter(x=>x.title.toLowerCase().includes(M)||x.resolveType.toLowerCase().includes(M)||x.description?.toLowerCase().includes(M)):z;p=ee,P=t,C=m,v=te,R="top-3 right-3",y="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let B;e[19]!==o?(B=o("sectionsEditor.addSectionModal.title"),e[19]=o,e[20]=B):B=e[20];let L;e[21]!==B?(L=r.jsx(re,{children:B}),e[21]=B,e[22]=L):L=e[22];let O;e[23]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(ie,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=O):O=e[23];let $;e[24]===Symbol.for("react.memo_cache_sentinel")?($=x=>a(x.target.value),e[24]=$):$=e[24];let k;e[25]!==o?(k=o("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=o,e[26]=k):k=e[26];let A;e[27]!==d||e[28]!==k?(A=r.jsxs("div",{className:"relative pt-2",children:[O,r.jsx(se,{value:d,onChange:$,placeholder:k,className:"h-9 pl-8"})]}),e[27]=d,e[28]=k,e[29]=A):A=e[29],e[30]!==L||e[31]!==A?(b=r.jsxs(le,{className:"shrink-0 border-b px-4 py-3 text-left",children:[L,A]}),e[30]=L,e[31]=A,e[32]=b):b=e[32],j=w,N="min-h-0 flex-1 overflow-y-auto",h="p-4",g=H.length===0?r.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:o("sectionsEditor.addSectionModal.noSectionsFound")}):r.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:H.map(x=>r.jsx(Se,{entry:x,scrollRootRef:w,previewUrl:G.get(x.resolveType)??V(c,W,x.previewBlock,F),onSelect:()=>u(x)},x.resolveType))}),e[0]=l,e[1]=i,e[2]=m,e[3]=u,e[4]=t,e[5]=c,e[6]=d,e[7]=o,e[8]=v,e[9]=p,e[10]=h,e[11]=g,e[12]=j,e[13]=N,e[14]=R,e[15]=y,e[16]=b,e[17]=P,e[18]=C}else v=e[8],p=e[9],h=e[10],g=e[11],j=e[12],N=e[13],R=e[14],y=e[15],b=e[16],P=e[17],C=e[18];let I;e[33]!==h||e[34]!==g?(I=r.jsx("div",{className:h,children:g}),e[33]=h,e[34]=g,e[35]=I):I=e[35];let T;e[36]!==I||e[37]!==j||e[38]!==N?(T=r.jsx("div",{ref:j,className:N,children:I}),e[36]=I,e[37]=j,e[38]=N,e[39]=T):T=e[39];let U;e[40]!==v||e[41]!==T||e[42]!==R||e[43]!==y||e[44]!==b?(U=r.jsxs(v,{closeButtonClassName:R,className:y,children:[b,T]}),e[40]=v,e[41]=T,e[42]=R,e[43]=y,e[44]=b,e[45]=U):U=e[45];let E;return e[46]!==p||e[47]!==U||e[48]!==P||e[49]!==C?(E=r.jsx(p,{open:P,onOpenChange:C,children:U}),e[46]=p,e[47]=U,e[48]=P,e[49]=C,e[50]=E):E=e[50],E}function Ue(s){const e=q.c(4),{previewServerUrl:t,runtime:m}=me(s.virtualMcpId),{url:i}=de(s.virtualMcpId),l=m==="cms";if(i)return i;let c;return e[0]!==l||e[1]!==s.sandboxUrl||e[2]!==t?(c=ue({sandboxUrl:s.sandboxUrl,previewServerUrl:t,fastPreviewActive:l}),e[0]=l,e[1]=s.sandboxUrl,e[2]=t,e[3]=c):c=e[3],c}export{Te as A,Ue as u};
@@ -1 +1 @@
1
- import{c as u,a2 as f,aa as y,m,o as g,e as T,K as l,t as E}from"./index-CvkEkbZF.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
1
+ import{c as u,a2 as f,aa as y,m,o as g,e as T,K as l,t as E}from"./index-D984WV3U.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
@@ -1 +1 @@
1
- import{c as O,f,m as S,K as _,ao as R,a2 as i,aa as l}from"./index-CvkEkbZF.js";const K=["TASK_BOARD_OPERATION","TASK_BOARD_REWORK","TASK_BOARD_DELIVERY","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function B(){const t=O.c(8),o=f({strict:!1}).org??"";let e;t[0]!==o?(e=_.taskBoardAdminOrgs(o),t[0]=o,t[1]=e):e=t[1];const s=!!o;let n;t[2]!==o?(n=()=>R(o,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=o,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],S(c)}function y(t,o){const e=O.c(14),{locator:s}=i(),n=l();let c;e[0]!==s||e[1]!==o.from||e[2]!==o.org||e[3]!==o.project||e[4]!==o.to||e[5]!==t?(c=_.taskBoardAnalytics(s,t,o.org??"",o.project??"",o.from,o.to),e[0]=s,e[1]=o.from,e[2]=o.org,e[3]=o.project,e[4]=o.to,e[5]=t,e[6]=c):c=e[6];let T;e[7]!==o||e[8]!==n||e[9]!==t?(T=()=>n.call(t,o),e[7]=o,e[8]=n,e[9]=t,e[10]=T):T=e[10];let A;return e[11]!==c||e[12]!==T?(A={queryKey:c,queryFn:T},e[11]=c,e[12]=T,e[13]=A):A=e[13],S(A)}function D(t,o){const e=O.c(15),{locator:s}=i(),n=l();let c;e[0]!==o||e[1]!==s||e[2]!==t.from||e[3]!==t.org||e[4]!==t.project||e[5]!==t.to?(c=_.taskBoardOperationTasks(s,t.org??"",t.project??"",t.from,t.to,o??""),e[0]=o,e[1]=s,e[2]=t.from,e[3]=t.org,e[4]=t.project,e[5]=t.to,e[6]=c):c=e[6];const T=o!==null;let A;e[7]!==o||e[8]!==t||e[9]!==n?(A=()=>n.call("TASK_BOARD_OPERATION_TASKS",{...t,drill:o??""}),e[7]=o,e[8]=t,e[9]=n,e[10]=A):A=e[10];let u;return e[11]!==c||e[12]!==T||e[13]!==A?(u={queryKey:c,enabled:T,queryFn:A},e[11]=c,e[12]=T,e[13]=A,e[14]=u):u=e[14],S(u)}export{K as A,y as a,D as b,B as u};
1
+ import{c as O,f,m as S,K as _,ao as R,a2 as i,aa as l}from"./index-D984WV3U.js";const K=["TASK_BOARD_OPERATION","TASK_BOARD_REWORK","TASK_BOARD_DELIVERY","TASK_BOARD_SPRINTS","TASK_BOARD_STUCK","TASK_BOARD_COST","TASK_BOARD_ERRORS","TASK_BOARD_TENANTS"];function B(){const t=O.c(8),o=f({strict:!1}).org??"";let e;t[0]!==o?(e=_.taskBoardAdminOrgs(o),t[0]=o,t[1]=e):e=t[1];const s=!!o;let n;t[2]!==o?(n=()=>R(o,"TASK_BOARD_ADMIN_ORG_LIST",{}),t[2]=o,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],S(c)}function y(t,o){const e=O.c(14),{locator:s}=i(),n=l();let c;e[0]!==s||e[1]!==o.from||e[2]!==o.org||e[3]!==o.project||e[4]!==o.to||e[5]!==t?(c=_.taskBoardAnalytics(s,t,o.org??"",o.project??"",o.from,o.to),e[0]=s,e[1]=o.from,e[2]=o.org,e[3]=o.project,e[4]=o.to,e[5]=t,e[6]=c):c=e[6];let T;e[7]!==o||e[8]!==n||e[9]!==t?(T=()=>n.call(t,o),e[7]=o,e[8]=n,e[9]=t,e[10]=T):T=e[10];let A;return e[11]!==c||e[12]!==T?(A={queryKey:c,queryFn:T},e[11]=c,e[12]=T,e[13]=A):A=e[13],S(A)}function D(t,o){const e=O.c(15),{locator:s}=i(),n=l();let c;e[0]!==o||e[1]!==s||e[2]!==t.from||e[3]!==t.org||e[4]!==t.project||e[5]!==t.to?(c=_.taskBoardOperationTasks(s,t.org??"",t.project??"",t.from,t.to,o??""),e[0]=o,e[1]=s,e[2]=t.from,e[3]=t.org,e[4]=t.project,e[5]=t.to,e[6]=c):c=e[6];const T=o!==null;let A;e[7]!==o||e[8]!==t||e[9]!==n?(A=()=>n.call("TASK_BOARD_OPERATION_TASKS",{...t,drill:o??""}),e[7]=o,e[8]=t,e[9]=n,e[10]=A):A=e[10];let u;return e[11]!==c||e[12]!==T||e[13]!==A?(u={queryKey:c,enabled:T,queryFn:A},e[11]=c,e[12]=T,e[13]=A,e[14]=u):u=e[14],S(u)}export{K as A,y as a,D as b,B as u};
@@ -1 +1 @@
1
- import{a as m}from"./task-board-BdDYkWlj.js";import{r as e}from"./index-CvkEkbZF.js";import{t as g}from"./watch-sse-pool-CuB8RiNq.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
1
+ import{a as m}from"./task-board-BypYXBtD.js";import{r as e}from"./index-D984WV3U.js";import{t as g}from"./watch-sse-pool-jwr9yBFo.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
@@ -1 +1 @@
1
- import{r as y,a1 as w,c as h,a2 as R,aa as T,o as k,m as O,K as A}from"./index-CvkEkbZF.js";import{e as B}from"./watch-sse-pool-CuB8RiNq.js";const P=()=>0;function C(e){const{orgSlug:t,itemId:s,onPrs:r}=e,o=y.useRef(r);o.current=r;const l=y.useRef(null),a=y.useRef(""),i=`${t}:${s??""}`;(!l.current||a.current!==i)&&(a.current=i,l.current=u=>{if(!t||!s)return()=>{};const d=c=>{let n;try{n=JSON.parse(c.data)}catch{return}n.data?.id!==s||!Array.isArray(n.data.prs)||(o.current(n.data.prs),u())};return B.subscribe(t,d)}),y.useSyncExternalStore(l.current,P,P)}const E=1440*60*1e3,D=40;function g(e){try{const t=window.localStorage.getItem(w.taskBoardPrs(e));return t?JSON.parse(t):{}}catch{return{}}}function L(e){const t=Date.now(),s=Object.entries(e).filter(([,r])=>t-r.updatedAt<=E);for(s.sort(([,r],[,o])=>r.updatedAt-o.updatedAt);s.length>D;)s.shift();return Object.fromEntries(s)}function _(e,t){if(typeof window>"u")return null;const s=g(e)[t];return!s||Date.now()-s.updatedAt>E?null:s}function b(e,t,s){if(!(typeof window>"u"))try{const r=g(e);r[t]={data:s,updatedAt:Date.now()},window.localStorage.setItem(w.taskBoardPrs(e),JSON.stringify(L(r)))}catch{}}const v=6e4,K=2e3,N=e=>e.state===null;function q(e){const t=h.c(25),{org:s,locator:r}=R(),o=T(),l=k();let a;t[0]!==e||t[1]!==r||t[2]!==l?(a=S=>{l.setQueryData(A.taskBoardItemPrs(r,e??""),S)},t[0]=e,t[1]=r,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==e||t[5]!==s.slug||t[6]!==a?(i={orgSlug:s.slug,itemId:e,onPrs:a},t[4]=e,t[5]=s.slug,t[6]=a,t[7]=i):i=t[7],C(i);let u;t[8]!==e||t[9]!==r?(u=A.taskBoardItemPrs(r,e??""),t[8]=e,t[9]=r,t[10]=u):u=t[10];const d=!!e;let c,n;t[11]!==e||t[12]!==r?(c=()=>e?_(r,e)?.data??void 0:void 0,n=()=>e?_(r,e)?.updatedAt:void 0,t[11]=e,t[12]=r,t[13]=c,t[14]=n):(c=t[13],n=t[14]);let f;t[15]!==e||t[16]!==r||t[17]!==o?(f=async()=>{const{prs:S}=await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:e});return b(r,e,S),S},t[15]=e,t[16]=r,t[17]=o,t[18]=f):f=t[18];let p;return t[19]!==u||t[20]!==d||t[21]!==c||t[22]!==n||t[23]!==f?(p={queryKey:u,enabled:d,refetchInterval:M,initialData:c,initialDataUpdatedAt:n,queryFn:f},t[19]=u,t[20]=d,t[21]=c,t[22]=n,t[23]=f,t[24]=p):p=t[24],O(p)}function M(e){return e.state.data?.some(N)?K:v}export{q as u};
1
+ import{r as y,a1 as w,c as h,a2 as R,aa as T,o as k,m as O,K as A}from"./index-D984WV3U.js";import{e as B}from"./watch-sse-pool-jwr9yBFo.js";const P=()=>0;function C(e){const{orgSlug:t,itemId:s,onPrs:r}=e,o=y.useRef(r);o.current=r;const l=y.useRef(null),a=y.useRef(""),i=`${t}:${s??""}`;(!l.current||a.current!==i)&&(a.current=i,l.current=u=>{if(!t||!s)return()=>{};const d=c=>{let n;try{n=JSON.parse(c.data)}catch{return}n.data?.id!==s||!Array.isArray(n.data.prs)||(o.current(n.data.prs),u())};return B.subscribe(t,d)}),y.useSyncExternalStore(l.current,P,P)}const E=1440*60*1e3,D=40;function g(e){try{const t=window.localStorage.getItem(w.taskBoardPrs(e));return t?JSON.parse(t):{}}catch{return{}}}function L(e){const t=Date.now(),s=Object.entries(e).filter(([,r])=>t-r.updatedAt<=E);for(s.sort(([,r],[,o])=>r.updatedAt-o.updatedAt);s.length>D;)s.shift();return Object.fromEntries(s)}function _(e,t){if(typeof window>"u")return null;const s=g(e)[t];return!s||Date.now()-s.updatedAt>E?null:s}function b(e,t,s){if(!(typeof window>"u"))try{const r=g(e);r[t]={data:s,updatedAt:Date.now()},window.localStorage.setItem(w.taskBoardPrs(e),JSON.stringify(L(r)))}catch{}}const v=6e4,K=2e3,N=e=>e.state===null;function q(e){const t=h.c(25),{org:s,locator:r}=R(),o=T(),l=k();let a;t[0]!==e||t[1]!==r||t[2]!==l?(a=S=>{l.setQueryData(A.taskBoardItemPrs(r,e??""),S)},t[0]=e,t[1]=r,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==e||t[5]!==s.slug||t[6]!==a?(i={orgSlug:s.slug,itemId:e,onPrs:a},t[4]=e,t[5]=s.slug,t[6]=a,t[7]=i):i=t[7],C(i);let u;t[8]!==e||t[9]!==r?(u=A.taskBoardItemPrs(r,e??""),t[8]=e,t[9]=r,t[10]=u):u=t[10];const d=!!e;let c,n;t[11]!==e||t[12]!==r?(c=()=>e?_(r,e)?.data??void 0:void 0,n=()=>e?_(r,e)?.updatedAt:void 0,t[11]=e,t[12]=r,t[13]=c,t[14]=n):(c=t[13],n=t[14]);let f;t[15]!==e||t[16]!==r||t[17]!==o?(f=async()=>{const{prs:S}=await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:e});return b(r,e,S),S},t[15]=e,t[16]=r,t[17]=o,t[18]=f):f=t[18];let p;return t[19]!==u||t[20]!==d||t[21]!==c||t[22]!==n||t[23]!==f?(p={queryKey:u,enabled:d,refetchInterval:M,initialData:c,initialDataUpdatedAt:n,queryFn:f},t[19]=u,t[20]=d,t[21]=c,t[22]=n,t[23]=f,t[24]=p):p=t[24],O(p)}function M(e){return e.state.data?.some(N)?K:v}export{q as u};
@@ -1 +1 @@
1
- import{c as C,l as H,j as J,e8 as V,a2 as z,o as G,K as M,aa as Y,m as W,b as X,e as q,y as Z,t as $}from"./index-CvkEkbZF.js";import{u as ee}from"./use-task-board-events-Dmw0mTzd.js";import{b as te}from"./use-decopilot-events-3d9-CwOW.js";function ne(e){const o=C.c(8),{size:l,className:t}=e,s=l===void 0?16:l;let a;o[0]!==s?(a={width:s,height:s},o[0]=s,o[1]=a):a=o[1];let n;o[2]!==t?(n=H("shrink-0 rounded-full object-cover",t),o[2]=t,o[3]=n):n=o[3];let u;return o[4]!==s||o[5]!==a||o[6]!==n?(u=J.jsx("img",{src:V,alt:"Super Agent",width:s,height:s,style:a,className:n}),o[4]=s,o[5]=a,o[6]=n,o[7]=u):u=o[7],u}function se(e,o){return{queryKey:M.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:l}=await o.call("TASK_BOARD_ITEM_LIST",{});return{items:l}}}}function ae(){const e=C.c(21),{org:o,locator:l}=z(),t=G();let s;e[0]!==l?(s=M.taskBoardItems(l),e[0]=l,e[1]=s):s=e[1];const a=s;let n;e[2]!==l||e[3]!==t||e[4]!==a?(n=m=>{t.cancelQueries({queryKey:a}),t.setQueryData(a,c=>c&&{...c,items:c.items.some(f=>f.id===m.id)?c.items.map(f=>f.id===m.id?m:f):[m,...c.items]}),t.invalidateQueries({queryKey:M.taskBoardActivity(l,m.id)})},e[2]=l,e[3]=t,e[4]=a,e[5]=n):n=e[5];let u,S;e[6]!==t||e[7]!==a?(u=()=>{t.invalidateQueries({queryKey:a})},S=m=>{t.cancelQueries({queryKey:a}),t.setQueryData(a,c=>c&&{...c,items:c.items.filter(f=>f.id!==m)})},e[6]=t,e[7]=a,e[8]=u,e[9]=S):(u=e[8],S=e[9]);let r;e[10]!==o.slug||e[11]!==n||e[12]!==u||e[13]!==S?(r={orgSlug:o.slug,onUpdate:n,onResync:u,onDelete:S},e[10]=o.slug,e[11]=n,e[12]=u,e[13]=S,e[14]=r):r=e[14],ee(r);let y;e[15]!==t||e[16]!==a?(y=m=>{const c=m.subject,f=m.data.status;t.cancelQueries({queryKey:a}),t.setQueryData(a,g=>g&&{...g,items:g.items.map(T=>T.threads.some(E=>E.threadId===c)?{...T,threads:T.threads.map(E=>E.threadId===c?{...E,status:f}:E)}:T)})},e[15]=t,e[16]=a,e[17]=y):y=e[17];let k;e[18]!==o.slug||e[19]!==y?(k={orgSlug:o.slug,onTaskStatus:y},e[18]=o.slug,e[19]=y,e[20]=k):k=e[20],te(k)}function ue(){const e=C.c(9),{locator:o}=z(),l=Y();let t;e[0]!==o||e[1]!==l?(t=se(o,l),e[0]=o,e[1]=l,e[2]=t):t=e[2];const s=W(t);ae();let a;e[3]!==s.data?.items?(a=s.data?.items??[],e[3]=s.data?.items,e[4]=a):a=e[4];let n;return e[5]!==s.error||e[6]!==s.isLoading||e[7]!==a?(n={items:a,isLoading:s.isLoading,error:s.error},e[5]=s.error,e[6]=s.isLoading,e[7]=a,e[8]=n):n=e[8],n}function ce(){const e=C.c(70),{org:o,locator:l}=z(),t=Y(),s=G(),a=X();let n;e[0]!==l?(n=M.taskBoardItems(l),e[0]=l,e[1]=n):n=e[1];const u=n;let S;e[2]!==s||e[3]!==u?(S=()=>s.invalidateQueries({queryKey:u}),e[2]=s,e[3]=u,e[4]=S):S=e[4];const r=S;let y;e[5]!==t?(y=i=>t.call("TASK_BOARD_ITEM_CREATE",i),e[5]=t,e[6]=y):y=e[6];let k;e[7]!==r||e[8]!==y?(k={mutationFn:y,onSuccess:r},e[7]=r,e[8]=y,e[9]=k):k=e[9];const m=q(k);let c;e[10]!==t?(c=i=>t.call("TASK_BOARD_ITEM_UPDATE",i),e[10]=t,e[11]=c):c=e[11];let f;e[12]!==s||e[13]!==u?(f=async i=>{await s.cancelQueries({queryKey:u});const _=s.getQueryData(u);return s.setQueryData(u,d=>d&&{...d,items:d.items.map(w=>w.id===i.id?{...w,...i,...i.status!==void 0&&i.status!==w.status&&{statusSince:new Date().toISOString()}}:w)}),{previous:_}},e[12]=s,e[13]=u,e[14]=f):f=e[14];let g;e[15]!==o?(g=(i,_)=>{_.status==="done"&&Z("task_marked_done",{organization_id:o.id,task_board_item_id:_.id})},e[15]=o,e[16]=g):g=e[16];let T;e[17]!==s||e[18]!==u?(T=(i,_,d)=>{d?.previous&&s.setQueryData(u,d.previous)},e[17]=s,e[18]=u,e[19]=T):T=e[19];let E;e[20]!==r||e[21]!==l||e[22]!==s?(E=(i,_,d)=>{r(),s.invalidateQueries({queryKey:M.taskBoardActivity(l,d.id)})},e[20]=r,e[21]=l,e[22]=s,e[23]=E):E=e[23];let O;e[24]!==c||e[25]!==f||e[26]!==g||e[27]!==T||e[28]!==E?(O={mutationFn:c,onMutate:f,onSuccess:g,onError:T,onSettled:E},e[24]=c,e[25]=f,e[26]=g,e[27]=T,e[28]=E,e[29]=O):O=e[29];const U=q(O);let B;e[30]!==t?(B=i=>t.call("TASK_BOARD_ITEM_DELETE",{id:i}),e[30]=t,e[31]=B):B=e[31];let A;e[32]!==r||e[33]!==a?(A=i=>{$.error(i instanceof Error&&i.message?i.message:a("taskBoard.taskBoard.deleteError")),r()},e[32]=r,e[33]=a,e[34]=A):A=e[34];let L;e[35]!==r||e[36]!==B||e[37]!==A?(L={mutationFn:B,onSuccess:r,onError:A},e[35]=r,e[36]=B,e[37]=A,e[38]=L):L=e[38];const p=q(L);let I;e[39]!==t?(I=async i=>{const _=await Promise.allSettled(i.map(d=>t.call("TASK_BOARD_ITEM_DELETE",{id:d})));return{total:i.length,failed:_.filter(oe).length}},e[39]=t,e[40]=I):I=e[40];let D,Q;e[41]!==a?(D=i=>{const{total:_,failed:d}=i;d!==0&&$.error(a("taskBoard.taskBoard.deleteBulkError",{failed:String(d),total:String(_)}))},Q=()=>$.error(a("taskBoard.taskBoard.deleteError")),e[41]=a,e[42]=D,e[43]=Q):(D=e[42],Q=e[43]);let j;e[44]!==r||e[45]!==I||e[46]!==D||e[47]!==Q?(j={mutationFn:I,onSuccess:D,onError:Q,onSettled:r},e[44]=r,e[45]=I,e[46]=D,e[47]=Q,e[48]=j):j=e[48];const x=q(j);let h;e[49]!==t?(h=i=>t.call("TASK_BOARD_ITEM_UPDATE",i),e[49]=t,e[50]=h):h=e[50];let F;e[51]!==r||e[52]!==h?(F={mutationFn:h,onSuccess:r},e[51]=r,e[52]=h,e[53]=F):F=e[53];const N=q(F);let K;e[54]!==t?(K=i=>t.call("TASK_BOARD_ITEM_RERUN",i),e[54]=t,e[55]=K):K=e[55];let R;e[56]!==r||e[57]!==l||e[58]!==s?(R=(i,_,d)=>{r(),s.invalidateQueries({queryKey:M.taskBoardActivity(l,d.id)})},e[56]=r,e[57]=l,e[58]=s,e[59]=R):R=e[59];let b;e[60]!==K||e[61]!==R?(b={mutationFn:K,onSettled:R},e[60]=K,e[61]=R,e[62]=b):b=e[62];const P=q(b);let v;return e[63]!==m||e[64]!==N||e[65]!==p||e[66]!==x||e[67]!==P||e[68]!==U?(v={create:m,update:U,remove:p,removeMany:x,link:N,rerun:P},e[63]=m,e[64]=N,e[65]=p,e[66]=x,e[67]=P,e[68]=U,e[69]=v):v=e[69],v}function oe(e){return e.status==="rejected"}export{ne as S,ce as a,ue as b,se as t,ae as u};
1
+ import{c as C,l as H,j as J,e8 as V,a2 as z,o as G,K as M,aa as Y,m as W,b as X,e as q,y as Z,t as $}from"./index-D984WV3U.js";import{u as ee}from"./use-task-board-events-BZPWVwkQ.js";import{b as te}from"./use-decopilot-events-BDPMNEXz.js";function ne(e){const o=C.c(8),{size:l,className:t}=e,s=l===void 0?16:l;let a;o[0]!==s?(a={width:s,height:s},o[0]=s,o[1]=a):a=o[1];let n;o[2]!==t?(n=H("shrink-0 rounded-full object-cover",t),o[2]=t,o[3]=n):n=o[3];let u;return o[4]!==s||o[5]!==a||o[6]!==n?(u=J.jsx("img",{src:V,alt:"Super Agent",width:s,height:s,style:a,className:n}),o[4]=s,o[5]=a,o[6]=n,o[7]=u):u=o[7],u}function se(e,o){return{queryKey:M.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:l}=await o.call("TASK_BOARD_ITEM_LIST",{});return{items:l}}}}function ae(){const e=C.c(21),{org:o,locator:l}=z(),t=G();let s;e[0]!==l?(s=M.taskBoardItems(l),e[0]=l,e[1]=s):s=e[1];const a=s;let n;e[2]!==l||e[3]!==t||e[4]!==a?(n=m=>{t.cancelQueries({queryKey:a}),t.setQueryData(a,c=>c&&{...c,items:c.items.some(f=>f.id===m.id)?c.items.map(f=>f.id===m.id?m:f):[m,...c.items]}),t.invalidateQueries({queryKey:M.taskBoardActivity(l,m.id)})},e[2]=l,e[3]=t,e[4]=a,e[5]=n):n=e[5];let u,S;e[6]!==t||e[7]!==a?(u=()=>{t.invalidateQueries({queryKey:a})},S=m=>{t.cancelQueries({queryKey:a}),t.setQueryData(a,c=>c&&{...c,items:c.items.filter(f=>f.id!==m)})},e[6]=t,e[7]=a,e[8]=u,e[9]=S):(u=e[8],S=e[9]);let r;e[10]!==o.slug||e[11]!==n||e[12]!==u||e[13]!==S?(r={orgSlug:o.slug,onUpdate:n,onResync:u,onDelete:S},e[10]=o.slug,e[11]=n,e[12]=u,e[13]=S,e[14]=r):r=e[14],ee(r);let y;e[15]!==t||e[16]!==a?(y=m=>{const c=m.subject,f=m.data.status;t.cancelQueries({queryKey:a}),t.setQueryData(a,g=>g&&{...g,items:g.items.map(T=>T.threads.some(E=>E.threadId===c)?{...T,threads:T.threads.map(E=>E.threadId===c?{...E,status:f}:E)}:T)})},e[15]=t,e[16]=a,e[17]=y):y=e[17];let k;e[18]!==o.slug||e[19]!==y?(k={orgSlug:o.slug,onTaskStatus:y},e[18]=o.slug,e[19]=y,e[20]=k):k=e[20],te(k)}function ue(){const e=C.c(9),{locator:o}=z(),l=Y();let t;e[0]!==o||e[1]!==l?(t=se(o,l),e[0]=o,e[1]=l,e[2]=t):t=e[2];const s=W(t);ae();let a;e[3]!==s.data?.items?(a=s.data?.items??[],e[3]=s.data?.items,e[4]=a):a=e[4];let n;return e[5]!==s.error||e[6]!==s.isLoading||e[7]!==a?(n={items:a,isLoading:s.isLoading,error:s.error},e[5]=s.error,e[6]=s.isLoading,e[7]=a,e[8]=n):n=e[8],n}function ce(){const e=C.c(70),{org:o,locator:l}=z(),t=Y(),s=G(),a=X();let n;e[0]!==l?(n=M.taskBoardItems(l),e[0]=l,e[1]=n):n=e[1];const u=n;let S;e[2]!==s||e[3]!==u?(S=()=>s.invalidateQueries({queryKey:u}),e[2]=s,e[3]=u,e[4]=S):S=e[4];const r=S;let y;e[5]!==t?(y=i=>t.call("TASK_BOARD_ITEM_CREATE",i),e[5]=t,e[6]=y):y=e[6];let k;e[7]!==r||e[8]!==y?(k={mutationFn:y,onSuccess:r},e[7]=r,e[8]=y,e[9]=k):k=e[9];const m=q(k);let c;e[10]!==t?(c=i=>t.call("TASK_BOARD_ITEM_UPDATE",i),e[10]=t,e[11]=c):c=e[11];let f;e[12]!==s||e[13]!==u?(f=async i=>{await s.cancelQueries({queryKey:u});const _=s.getQueryData(u);return s.setQueryData(u,d=>d&&{...d,items:d.items.map(w=>w.id===i.id?{...w,...i,...i.status!==void 0&&i.status!==w.status&&{statusSince:new Date().toISOString()}}:w)}),{previous:_}},e[12]=s,e[13]=u,e[14]=f):f=e[14];let g;e[15]!==o?(g=(i,_)=>{_.status==="done"&&Z("task_marked_done",{organization_id:o.id,task_board_item_id:_.id})},e[15]=o,e[16]=g):g=e[16];let T;e[17]!==s||e[18]!==u?(T=(i,_,d)=>{d?.previous&&s.setQueryData(u,d.previous)},e[17]=s,e[18]=u,e[19]=T):T=e[19];let E;e[20]!==r||e[21]!==l||e[22]!==s?(E=(i,_,d)=>{r(),s.invalidateQueries({queryKey:M.taskBoardActivity(l,d.id)})},e[20]=r,e[21]=l,e[22]=s,e[23]=E):E=e[23];let O;e[24]!==c||e[25]!==f||e[26]!==g||e[27]!==T||e[28]!==E?(O={mutationFn:c,onMutate:f,onSuccess:g,onError:T,onSettled:E},e[24]=c,e[25]=f,e[26]=g,e[27]=T,e[28]=E,e[29]=O):O=e[29];const U=q(O);let B;e[30]!==t?(B=i=>t.call("TASK_BOARD_ITEM_DELETE",{id:i}),e[30]=t,e[31]=B):B=e[31];let A;e[32]!==r||e[33]!==a?(A=i=>{$.error(i instanceof Error&&i.message?i.message:a("taskBoard.taskBoard.deleteError")),r()},e[32]=r,e[33]=a,e[34]=A):A=e[34];let L;e[35]!==r||e[36]!==B||e[37]!==A?(L={mutationFn:B,onSuccess:r,onError:A},e[35]=r,e[36]=B,e[37]=A,e[38]=L):L=e[38];const p=q(L);let I;e[39]!==t?(I=async i=>{const _=await Promise.allSettled(i.map(d=>t.call("TASK_BOARD_ITEM_DELETE",{id:d})));return{total:i.length,failed:_.filter(oe).length}},e[39]=t,e[40]=I):I=e[40];let D,Q;e[41]!==a?(D=i=>{const{total:_,failed:d}=i;d!==0&&$.error(a("taskBoard.taskBoard.deleteBulkError",{failed:String(d),total:String(_)}))},Q=()=>$.error(a("taskBoard.taskBoard.deleteError")),e[41]=a,e[42]=D,e[43]=Q):(D=e[42],Q=e[43]);let j;e[44]!==r||e[45]!==I||e[46]!==D||e[47]!==Q?(j={mutationFn:I,onSuccess:D,onError:Q,onSettled:r},e[44]=r,e[45]=I,e[46]=D,e[47]=Q,e[48]=j):j=e[48];const x=q(j);let h;e[49]!==t?(h=i=>t.call("TASK_BOARD_ITEM_UPDATE",i),e[49]=t,e[50]=h):h=e[50];let F;e[51]!==r||e[52]!==h?(F={mutationFn:h,onSuccess:r},e[51]=r,e[52]=h,e[53]=F):F=e[53];const N=q(F);let K;e[54]!==t?(K=i=>t.call("TASK_BOARD_ITEM_RERUN",i),e[54]=t,e[55]=K):K=e[55];let R;e[56]!==r||e[57]!==l||e[58]!==s?(R=(i,_,d)=>{r(),s.invalidateQueries({queryKey:M.taskBoardActivity(l,d.id)})},e[56]=r,e[57]=l,e[58]=s,e[59]=R):R=e[59];let b;e[60]!==K||e[61]!==R?(b={mutationFn:K,onSettled:R},e[60]=K,e[61]=R,e[62]=b):b=e[62];const P=q(b);let v;return e[63]!==m||e[64]!==N||e[65]!==p||e[66]!==x||e[67]!==P||e[68]!==U?(v={create:m,update:U,remove:p,removeMany:x,link:N,rerun:P},e[63]=m,e[64]=N,e[65]=p,e[66]=x,e[67]=P,e[68]=U,e[69]=v):v=e[69],v}function oe(e){return e.status==="rejected"}export{ne as S,ce as a,ue as b,se as t,ae as u};
@@ -1 +1 @@
1
- import{a2 as o,aa as i,r as c,R as d,K as m}from"./index-CvkEkbZF.js";import{a as T}from"./thread-intent-C-TbGTua.js";function h(a){const{org:r}=o(),s=i(),n=T(),u=c.useSyncExternalStore(n.threads.subscribe,n.threads.get),t=a===null?null:u.find(e=>e.id===a)??null,{data:l}=d({queryKey:m.ensureTask(r.id,a),queryFn:async()=>{if(a===null)return null;try{const{item:e}=await s.call("COLLECTION_THREADS_GET",{id:a});return e??null}catch{return null}},initialData:t&&!t.partial?t:void 0,select:e=>e?.metadata??null,staleTime:3e4});return t?.metadata??l??null}export{h as u};
1
+ import{a2 as o,aa as i,r as c,R as d,K as m}from"./index-D984WV3U.js";import{a as T}from"./thread-intent-BouO_OhM.js";function h(a){const{org:r}=o(),s=i(),n=T(),u=c.useSyncExternalStore(n.threads.subscribe,n.threads.get),t=a===null?null:u.find(e=>e.id===a)??null,{data:l}=d({queryKey:m.ensureTask(r.id,a),queryFn:async()=>{if(a===null)return null;try{const{item:e}=await s.call("COLLECTION_THREADS_GET",{id:a});return e??null}catch{return null}},initialData:t&&!t.partial?t:void 0,select:e=>e?.metadata??null,staleTime:3e4});return t?.metadata??l??null}export{h as u};
@@ -1 +1 @@
1
- import{c as u,m as o,f as d,r as A,K as T,ao as y,ag as E}from"./index-CvkEkbZF.js";import{a as O}from"./watch-sse-pool-CuB8RiNq.js";function b(){return d({strict:!1}).org??""}function F(){const t=u.c(8),r=b();let e;t[0]!==r?(e=T.threadAnalyticsOrgs(r),t[0]=r,t[1]=e):e=t[1];const s=!!r;let n;t[2]!==r?(n=()=>y(r,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=r,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],o(c)}const m=3e3,f=new Map,h=new Map;function _(t){let r=h.get(t);return r||(r=e=>{let s=null;const n=()=>{s||(s=setTimeout(()=>{s=null,f.set(t,(f.get(t)??0)+1),e()},m))},c=O.subscribe(t,n,n);return()=>{s&&clearTimeout(s),c()}},h.set(t,r)),r}function q(t,r){const e=u.c(5);let s;e[0]!==r||e[1]!==t?(s=_(t),e[0]=r,e[1]=t,e[2]=s):s=e[2];let n;return e[3]!==t?(n=()=>f.get(t)??0,e[3]=t,e[4]=n):n=e[4],A.useSyncExternalStore(s,n)}function K(t,r){const e=u.c(11),s=b(),n=q(s,r);let c;e[0]!==t||e[1]!==s||e[2]!==n?(c=T.threadAnalytics(s,"live",t,n),e[0]=t,e[1]=s,e[2]=n,e[3]=c):c=e[3];const i=!!s;let a;e[4]!==t||e[5]!==s?(a=()=>y(s,"THREAD_ANALYTICS_LIVE",t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let l;return e[7]!==c||e[8]!==i||e[9]!==a?(l={queryKey:c,enabled:i,queryFn:a,placeholderData:E},e[7]=c,e[8]=i,e[9]=a,e[10]=l):l=e[10],o(l)}function k(t,r){const e=u.c(12),s=b();let n;e[0]!==r||e[1]!==s||e[2]!==t?(n=T.threadAnalytics(s,t,r,0),e[0]=r,e[1]=s,e[2]=t,e[3]=n):n=e[3];const c=!!s;let i;e[4]!==r||e[5]!==s||e[6]!==t?(i=()=>y(s,t,r),e[4]=r,e[5]=s,e[6]=t,e[7]=i):i=e[7];let a;return e[8]!==n||e[9]!==c||e[10]!==i?(a={queryKey:n,enabled:c,queryFn:i},e[8]=n,e[9]=c,e[10]=i,e[11]=a):a=e[11],o(a)}export{K as a,k as b,F as u};
1
+ import{c as u,m as o,f as d,r as A,K as T,ao as y,ag as E}from"./index-D984WV3U.js";import{a as O}from"./watch-sse-pool-jwr9yBFo.js";function b(){return d({strict:!1}).org??""}function F(){const t=u.c(8),r=b();let e;t[0]!==r?(e=T.threadAnalyticsOrgs(r),t[0]=r,t[1]=e):e=t[1];const s=!!r;let n;t[2]!==r?(n=()=>y(r,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=r,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],o(c)}const m=3e3,f=new Map,h=new Map;function _(t){let r=h.get(t);return r||(r=e=>{let s=null;const n=()=>{s||(s=setTimeout(()=>{s=null,f.set(t,(f.get(t)??0)+1),e()},m))},c=O.subscribe(t,n,n);return()=>{s&&clearTimeout(s),c()}},h.set(t,r)),r}function q(t,r){const e=u.c(5);let s;e[0]!==r||e[1]!==t?(s=_(t),e[0]=r,e[1]=t,e[2]=s):s=e[2];let n;return e[3]!==t?(n=()=>f.get(t)??0,e[3]=t,e[4]=n):n=e[4],A.useSyncExternalStore(s,n)}function K(t,r){const e=u.c(11),s=b(),n=q(s,r);let c;e[0]!==t||e[1]!==s||e[2]!==n?(c=T.threadAnalytics(s,"live",t,n),e[0]=t,e[1]=s,e[2]=n,e[3]=c):c=e[3];const i=!!s;let a;e[4]!==t||e[5]!==s?(a=()=>y(s,"THREAD_ANALYTICS_LIVE",t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let l;return e[7]!==c||e[8]!==i||e[9]!==a?(l={queryKey:c,enabled:i,queryFn:a,placeholderData:E},e[7]=c,e[8]=i,e[9]=a,e[10]=l):l=e[10],o(l)}function k(t,r){const e=u.c(12),s=b();let n;e[0]!==r||e[1]!==s||e[2]!==t?(n=T.threadAnalytics(s,t,r,0),e[0]=r,e[1]=s,e[2]=t,e[3]=n):n=e[3];const c=!!s;let i;e[4]!==r||e[5]!==s||e[6]!==t?(i=()=>y(s,t,r),e[4]=r,e[5]=s,e[6]=t,e[7]=i):i=e[7];let a;return e[8]!==n||e[9]!==c||e[10]!==i?(a={queryKey:n,enabled:c,queryFn:i},e[8]=n,e[9]=c,e[10]=i,e[11]=a):a=e[11],o(a)}export{K as a,k as b,F as u};
@@ -1 +1 @@
1
- import{c,a2 as i,m as l,K as p}from"./index-CvkEkbZF.js";import{e as m}from"./chat-context-B7ixwukH.js";async function f(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=m()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>f(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
1
+ import{c,a2 as i,m as l,K as p}from"./index-D984WV3U.js";import{e as m}from"./chat-context-y8u3K9Tq.js";async function f(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=m()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>f(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
@@ -0,0 +1 @@
1
+ import{I as n}from"./infiniteQueryObserver-Bmwf-SCt.js";import{dn as u}from"./index-D984WV3U.js";function t(e,r){return u(e,n,r)}export{t as u};
@@ -1 +1 @@
1
- import{dD as Q,b5 as y,dE as S,b4 as w,dp as E,o as k,dF as M,dG as x,r as p,dH as q,dI as H,dJ as L,dK as P,dL as O,dM as B,dN as A}from"./index-CvkEkbZF.js";function R(r,s){const e=new Set(s);return r.filter(t=>!e.has(t))}function I(r,s,e){const t=r.slice(0);return t[s]=e,t}var T=class extends Q{#i;#s;#n;#r;#e;#t;#o;#u;#h;#a=[];constructor(r,s,e){super(),this.#i=r,this.#r=e,this.#n=[],this.#e=[],this.#s=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(r=>{r.subscribe(s=>{this.#f(r,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(r=>{r.destroy()})}setQueries(r,s){this.#n=r,this.#r=s,y.batch(()=>{const e=this.#e,t=this.#d(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=e.length!==i.length,c=i.some((o,f)=>o!==e[f]),d=u||c,b=d?!0:n.some((o,f)=>{const g=this.#s[f];return!g||!S(o,g)});!d&&!b||(d&&(this.#a=t,this.#e=i),this.#s=n,this.hasListeners()&&(d&&(R(e,i).forEach(o=>{o.destroy()}),R(i,e).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#p()))})}getCurrentResult(){return this.#s}getQueries(){return this.#e.map(r=>r.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(r,s){const e=this.#d(r),t=e.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=e.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,s,i),()=>this.#c(t,e)]}#c(r,s){return s.map((e,t)=>{const i=r[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,n=>{s.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,s,e){if(s){const t=this.#h,i=e!==void 0&&t!==void 0&&(t.length!==e.length||e.some((n,u)=>n!==t[u]));return(!this.#t||this.#s!==this.#u||i||s!==this.#o)&&(this.#o=s,this.#u=this.#s,e!==void 0&&(this.#h=e),this.#t=w(this.#t,s(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#e.some((r,s)=>r.options.suspense&&this.#s[s]?.data===void 0)}#d(r){const s=new Map;this.#e.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=s.get(i);n?n.push(t):s.set(i,[t])});const e=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=s.get(i.queryHash)?.shift()??new E(this.#i,i);e.push({defaultedQueryOptions:i,observer:u})}),e}#f(r,s){const e=this.#e.indexOf(r);e!==-1&&(this.#s=I(this.#s,e,s),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#s,this.#a),s=this.#b(),e=this.#t,t=s?e:this.#l(r,this.#r?.combine);(s||e!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#s)})})}}};function D({queries:r,...s},e){const t=k(e),i=M(),n=x(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{q(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),L(n);const[c]=p.useState(()=>new T(t,u,s)),[d,b,o]=c.getOptimisticResult(u,s.combine),f=!i&&s.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>f?c.subscribe(y.batchCalls(h)):P,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,s)},[u,s,c]);const m=d.some((h,a)=>O(u[a],h))?d.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const C=new E(t,l);return B(l,C,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=d.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{D as u};
1
+ import{dD as Q,b5 as y,dE as S,b4 as w,dp as E,o as k,dF as M,dG as x,r as p,dH as q,dI as H,dJ as L,dK as P,dL as O,dM as B,dN as A}from"./index-D984WV3U.js";function R(r,s){const e=new Set(s);return r.filter(t=>!e.has(t))}function I(r,s,e){const t=r.slice(0);return t[s]=e,t}var T=class extends Q{#i;#s;#n;#r;#e;#t;#o;#u;#h;#a=[];constructor(r,s,e){super(),this.#i=r,this.#r=e,this.#n=[],this.#e=[],this.#s=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(r=>{r.subscribe(s=>{this.#f(r,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(r=>{r.destroy()})}setQueries(r,s){this.#n=r,this.#r=s,y.batch(()=>{const e=this.#e,t=this.#d(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=e.length!==i.length,c=i.some((o,f)=>o!==e[f]),d=u||c,b=d?!0:n.some((o,f)=>{const g=this.#s[f];return!g||!S(o,g)});!d&&!b||(d&&(this.#a=t,this.#e=i),this.#s=n,this.hasListeners()&&(d&&(R(e,i).forEach(o=>{o.destroy()}),R(i,e).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#p()))})}getCurrentResult(){return this.#s}getQueries(){return this.#e.map(r=>r.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(r,s){const e=this.#d(r),t=e.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=e.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,s,i),()=>this.#c(t,e)]}#c(r,s){return s.map((e,t)=>{const i=r[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,n=>{s.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,s,e){if(s){const t=this.#h,i=e!==void 0&&t!==void 0&&(t.length!==e.length||e.some((n,u)=>n!==t[u]));return(!this.#t||this.#s!==this.#u||i||s!==this.#o)&&(this.#o=s,this.#u=this.#s,e!==void 0&&(this.#h=e),this.#t=w(this.#t,s(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#e.some((r,s)=>r.options.suspense&&this.#s[s]?.data===void 0)}#d(r){const s=new Map;this.#e.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=s.get(i);n?n.push(t):s.set(i,[t])});const e=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=s.get(i.queryHash)?.shift()??new E(this.#i,i);e.push({defaultedQueryOptions:i,observer:u})}),e}#f(r,s){const e=this.#e.indexOf(r);e!==-1&&(this.#s=I(this.#s,e,s),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#s,this.#a),s=this.#b(),e=this.#t,t=s?e:this.#l(r,this.#r?.combine);(s||e!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#s)})})}}};function D({queries:r,...s},e){const t=k(e),i=M(),n=x(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{q(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),L(n);const[c]=p.useState(()=>new T(t,u,s)),[d,b,o]=c.getOptimisticResult(u,s.combine),f=!i&&s.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>f?c.subscribe(y.batchCalls(h)):P,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,s)},[u,s,c]);const m=d.some((h,a)=>O(u[a],h))?d.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const C=new E(t,l);return B(l,C,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=d.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{D as u};
@@ -0,0 +1 @@
1
+ import{I as n}from"./infiniteQueryObserver-Bmwf-SCt.js";import{dn as s,dC as u}from"./index-D984WV3U.js";function a(r,e){return s({...r,enabled:!0,suspense:!0,throwOnError:u},n,e)}export{a as u};
@@ -1 +1 @@
1
- import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,n as I,K as J,t as Q,B as W}from"./index-CvkEkbZF.js";import{C as G}from"./collection-table-wrapper-iLWfdfAw.js";import{E as L}from"./empty-state-DZ11Jnto.js";import{S as H}from"./search-input-9d3onxt-.js";import{A as X}from"./avatar-DeVcKUjn.js";import{B as D}from"./badge-BRYJjM8m.js";import{u as Z}from"./use-debounced-value-C_VfXq2U.js";import{a as K}from"./admin-fetch-BhTJlAsX.js";import{f as ee}from"./format-time-CjIPQhCN.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-xlf7vkj_.js";import"./ArrowUp-Dg7Kez2q.js";import"./SearchMd-DyqBdeBV.js";import"./User01-B9FM9Mf_.js";import"./differenceInSeconds-C3x8sHUj.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),k=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let C;e[6]!==n||e[7]!==l?(C={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=C):C=e[8];const{data:P,isLoading:_,isError:A}=Y(C);let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=ie,e[9]=w):w=e[9];let y;e[10]!==s?(y={mutationFn:ae,onSuccess:w,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=y):y=e[11];const E=$(y);let b;e[12]!==P?.users?(b=P?.users??[],e[12]=P?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==k||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===k||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=k,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
1
+ import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,n as I,K as J,t as Q,B as W}from"./index-D984WV3U.js";import{C as G}from"./collection-table-wrapper-BI9XAUwm.js";import{E as L}from"./empty-state-b6tRqzU8.js";import{S as H}from"./search-input-BJ-xb_6w.js";import{A as X}from"./avatar-Da-P84-z.js";import{B as D}from"./badge-CJ5q8uJu.js";import{u as Z}from"./use-debounced-value-BZK5uiHm.js";import{a as K}from"./admin-fetch-BhTJlAsX.js";import{f as ee}from"./format-time-CjIPQhCN.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-BVuWDAYC.js";import"./ArrowUp-C0O7U47F.js";import"./SearchMd-X-m-ot0f.js";import"./User01-CuJbE_Yd.js";import"./differenceInSeconds-C3x8sHUj.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),k=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let C;e[6]!==n||e[7]!==l?(C={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=C):C=e[8];const{data:P,isLoading:_,isError:A}=Y(C);let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=ie,e[9]=w):w=e[9];let y;e[10]!==s?(y={mutationFn:ae,onSuccess:w,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=y):y=e[11];const E=$(y);let b;e[12]!==P?.users?(b=P?.users??[],e[12]=P?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==k||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===k||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=k,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{c as W,s as E,b as k}from"./ZoomOut-C1q2p3OF.js";import{a as j}from"./Image01-BfROTBI_.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function G(e){return`.deco/blocks/${P(e)}.json`}const v=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function z(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function D(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function _(e,t){return t==="directory"?e:$(e)}function M(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function S(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function H(e,t){return B(e)>=F&&!t.has(e)}function q(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function U(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function A(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function X(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:k,color:"#64748b"}:{Icon:k,color:T}}function K(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function V(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,b=s(l);let p=b.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),b.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function J(e){const t=[];for(const n of e.split(`
1
+ import{c as W,s as E,b as k}from"./ZoomOut-C_NtAfgt.js";import{a as j}from"./Image01-CyU1b2Nz.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function G(e){return`.deco/blocks/${P(e)}.json`}const v=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function z(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function D(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function _(e,t){return t==="directory"?e:$(e)}function M(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function S(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function H(e,t){return B(e)>=F&&!t.has(e)}function q(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function U(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function A(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function X(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:k,color:"#64748b"}:{Icon:k,color:T}}function K(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function V(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,b=s(l);let p=b.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),b.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function J(e){const t=[];for(const n of e.split(`
2
2
  `)){if(!n)continue;const r=n.indexOf(":");if(r<0)continue;const s=n.indexOf(":",r+1);if(s<0)continue;const o=Number.parseInt(n.slice(r+1,s),10);Number.isFinite(o)&&t.push({path:h(n.slice(0,r)),line:o,text:n.slice(s+1)})}return t}function Q(e,t,n){const r=t.trim().toLowerCase();if(!r)return[];const s=[];for(const o of e)if((o.split("/").pop()??o).toLowerCase().includes(r)&&(s.push(h(o)),s.length>=n))break;return s}const w=24;function Y(e,t){const n=e.replace(/^\s+/,""),r=t.trim().toLowerCase();if(!r)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const s=n.toLowerCase().indexOf(r);if(s<0)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const o=s>w,u=o?n.slice(s-w):n,a=u.toLowerCase(),i=[];let c=0;for(;;){const l=a.indexOf(r,c);if(l<0){c<u.length&&i.push({text:u.slice(c),match:!1});break}l>c&&i.push({text:u.slice(c,l),match:!1}),i.push({text:u.slice(l,l+r.length),match:!0}),c=l+r.length}return{leadingEllipsis:o,segments:i}}function Z(e){const t=[],n=new Map;for(const r of e){let s=n.get(r.path);s||(s={path:r.path,matches:[]},n.set(r.path,s),t.push(s)),s.matches.push(r)}return t}function tt(e){return e.split(`
3
3
  `).map(t=>t.replace(/^\d+\t/,"")).join(`
4
4
  `)}export{F as E,G as a,L as b,v as c,C as d,V as e,N as f,A as g,Z as h,z as i,_ as j,h as k,X as l,$ as m,K as n,Y as o,H as p,D as q,q as r,tt as s,x as t,Q as u,M as v,J as w,U as x,S as y};
@@ -1 +1 @@
1
- import{c as K,b as X,r as Z,j as n,l as rt,B as tt,at as ut}from"./index-CvkEkbZF.js";import{C as ht,a0 as at,F as xt}from"./agent-icon-BzQJojFn.js";import{L as gt}from"./label-B7m6NrjR.js";import{S as lt}from"./scroll-area-ClRSjtLV.js";import{S as bt}from"./switch-AEq1Ywu_.js";import{T as vt,b as yt,a as jt}from"./tooltip-CQtbKEbv.js";import{V as Tt}from"./view-mode-toggle-6GOtrYS3.js";import{ay as ct,az as mt,aA as Nt,aB as _t,aC as kt,aD as U,aE as wt}from"./agent-site-editor-content-BoR7A3J6.js";import"./AlertCircle-CKip96zJ.js";import"./Tool01-DznnxM5_.js";import"./ArrowUp-Dg7Kez2q.js";import"./ArrowLeft-DWXC5SxX.js";import"./LinkBroken01-C4y5s5BD.js";import"./ShoppingBag01-BZ853zJ_.js";import"./ZoomOut-C1q2p3OF.js";import"./Building02-BhbGM34V.js";import"./CheckCircle-CHf8-Blx.js";import"./ChevronUp-DdJdulw6.js";import"./ChevronSelectorVertical-B8uBkzm6.js";import"./UserSquare-CyTwJikM.js";import"./Copy01-Tr_gU1aK.js";import"./CreditCard01-Cv44glOw.js";import"./DotsVertical-9_2O7H2x.js";import"./Image01-BfROTBI_.js";import"./Globe04-D3iPe8Pc.js";import"./SwitchHorizontal01-CaMjqXcB.js";import"./Key01-BeLvSel3.js";import"./Link01-Cej02QtC.js";import"./Monitor01-CDLuLXD2.js";import"./Sun-uTZ6vkYv.js";import"./Play-WH2tJGci.js";import"./Plus-B7ghEA56.js";import"./SearchMd-DyqBdeBV.js";import"./Trash01-_5jcVImt.js";import"./Upload01-thivCY-D.js";import"./User01-B9FM9Mf_.js";import"./Users01-BZbPKUiW.js";import"./XClose-CfzTTVMn.js";import"./index-BdQq_4o_.js";import"./index-Dv-VqjPz.js";import"./agent-view-guard-3DhesBoI.js";import"./use-main-panel-tabs-D2yVxw9s.js";import"./use-chat-layout-state-C79Hg2yc.js";import"./use-file-configs-BUqTgf7p.js";import"./use-organization-settings-BoQ-3bUn.js";import"./schema-3_3MP7ZZ.js";import"./task-board-BdDYkWlj.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-Diab2gJI.js";import"./use-mcp-client-CBoRmtFo.js";import"./auth-CZA10nCD.js";import"./thread-route-D_yIM5gK.js";import"./use-panel-navigate-5IaTMf0W.js";import"./use-project-scope-DhGkOd7x.js";import"./thread-intent-C-TbGTua.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CuB8RiNq.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-BHRfoOud.js";import"./use-mcp-tools-BfdbHPtH.js";import"./types-C1Mw_99A.js";import"./utils-CVEq3hMx.js";import"./use-sandbox-events-4HFbLlVd.js";import"./chat-context-B7ixwukH.js";import"./autosend-DutXByr0.js";import"./use-decopilot-events-3d9-CwOW.js";import"./use-ai-providers-CjzrdRNJ.js";import"./use-chat-navigation-BRFRCeuv.js";import"./location-BjlyegC2.js";import"./tool-namespace-KxcOJjNS.js";import"./drawer-NA8X67Cn.js";import"./collection-search-BhTdq2ic.js";import"./use-mobile-DHDQrS92.js";import"./use-mcp-prompts-C3H87HP4.js";import"./usage-stats-CUfUVubb.js";import"./form-BBSMmS7M.js";import"./markdown-Cyku6Bit.js";import"./use-copy-Csln4Pda.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./input-ChjC7XxY.js";import"./icon-button-DkGaGjbK.js";import"./file-type-icon-CR_8nRKJ.js";import"./shell-layout-Bv5Sek6Y.js";import"./avatar-DeVcKUjn.js";import"./use-clock-tick-BXc6ohp1.js";import"./command-CfJ_yZL1.js";import"./index-Cz6k2mHL.js";import"./integration-icon-Cie7dlB4.js";import"./project-icon-Da9vkmla.js";import"./new-project-dialog-CCTwabFu.js";import"./repository-import-picker-CAPqT49B.js";import"./use-navigate-to-agent-CBJVz0YU.js";import"./repository-picker-wpyEK2Xc.js";import"./useInfiniteQuery-DVc0gFuD.js";import"./infiniteQueryObserver-D-zgijef.js";import"./use-debounced-value-C_VfXq2U.js";import"./required-auth-layout-BlMmzcBE.js";import"./use-org-sso-DqlYZMd5.js";import"./chat-draft-BrKCO6YT.js";import"./select-BYlHrgDe.js";import"./tabs-D7DC2cRI.js";import"./use-deco-credits-PK7G7t4U.js";import"./toggle-group-Br_OBwpv.js";import"./use-open-billing-url-DYalJRBM.js";import"./index-BFNmnlkM.js";import"./checkbox-CVc_t6AM.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-KZcyVDI5.js";import"./input-BqrqWGgY.js";import"./suggestion-DOpLmNQe.js";import"./use-org-fs-CR48g8_P.js";import"./question-004-sINsf4GQ.js";import"./use-members-DCcQy8NS.js";import"./use-org-auth-client-CQhEfpFE.js";import"./feature-paywall-BtZlJS8N.js";import"./plan-ladder-B2h7Dujg.js";import"./add-connection-dialog-BGTbgW-i.js";import"./extract-connection-data-BTRj6ggn.js";import"./metadata-D72DunRR.js";import"./connection-BjQqCa6n.js";import"./url-slug-CTpJRedE.js";import"./connection-card-B5kZBtAI.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-I3De7vqg.js";import"./connection-form-helpers-BiaAn5T-.js";import"./authenticate-and-persist-oauth-CxfxW_rA.js";import"./mcp-oauth-DeKiTKLu.js";import"./mcp-oauth-oyIK_tB1.js";import"./collection-tabs-hvD3R6sE.js";import"./badge-BRYJjM8m.js";import"./use-infinite-scroll-CGgZOckb.js";import"./useSuspenseInfiniteQuery-kmxM7DtM.js";import"./use-task-board-events-Dmw0mTzd.js";import"./pair-Bjrecdzi.js";import"./collapsible-RIZMF3og.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-_GpfDdeh.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-Dt9lpT7b.js";import"./use-thread-outputs-v6L6hLPo.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-B4Xubt6P.js";import"./use-task-metadata-BtIFipqq.js";import"./virtual-mcp-BvdMl-5h.js";import"./feature-gate-DUnCy-Qc.js";import"./alert-dialog-CAM3tof4.js";import"./runnable-block-editor-BbKz7DQH.js";import"./claim-phase-copy-DhUnD0f3.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./utils-CZAlkiGL.js";import"./monaco-editor-BcVwR88i.js";import"./editor-D7dKbHsZ.js";import"./calendar-CKSj2y-l.js";import"./use-new-blocks-editor-BtqPnhyC.js";import"./rich-text-link-control-C0PrMBov.js";import"./core.esm-BDr1jUfa.js";import"./sortable.esm-DPSFDajj.js";import"./combobox-BP3ADxyT.js";import"./search-input-9d3onxt-.js";import"./asset-utils-koOjLbnD.js";import"./sandbox-git-api-C7JbVL7R.js";import"./mustache-o_TIeFdF.js";import"./sandbox-lifecycle-context-DOC3PBsO.js";import"./empty-state-CXB5kfzH.js";import"./empty-state-DZ11Jnto.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Ht(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(jt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(vt,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(yt,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function pn(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(ht,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ut,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(gt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:H,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(xt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==W||t[70]!==G?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=q):q=t[71],q}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,H=dt(s,j),V=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{pn as VariantCalendar};
1
+ import{c as K,b as X,r as Z,j as n,l as rt,B as tt,at as ut}from"./index-D984WV3U.js";import{C as ht,a0 as at,F as xt}from"./agent-icon-CsQzAnP1.js";import{L as gt}from"./label-BszVxI8j.js";import{S as lt}from"./scroll-area-B9YHNZjL.js";import{S as bt}from"./switch-D6SJRikA.js";import{T as vt,b as yt,a as jt}from"./tooltip-CfH7_UR9.js";import{V as Tt}from"./view-mode-toggle-DA847UFd.js";import{ay as ct,az as mt,aA as Nt,aB as _t,aC as kt,aD as U,aE as wt}from"./agent-site-editor-content-5eCWHoNS.js";import"./AlertCircle-CgfWDsMW.js";import"./Tool01-BLdqmAM-.js";import"./ArrowUp-C0O7U47F.js";import"./ArrowLeft-BkyozCr0.js";import"./LinkBroken01-CImL6HGl.js";import"./ShoppingBag01-C30WMfg1.js";import"./ZoomOut-C_NtAfgt.js";import"./Building02-C5UvSZSt.js";import"./CheckCircle-B1cLRmIj.js";import"./ChevronUp-D_qU7VrJ.js";import"./ChevronSelectorVertical-bEeSv3mr.js";import"./UserSquare-BlSFjBrQ.js";import"./Copy01-CT_cEqll.js";import"./CreditCard01-DFGzM4td.js";import"./DotsVertical-CGu7Zbqo.js";import"./Image01-CyU1b2Nz.js";import"./Globe04-DtoCZsmb.js";import"./SwitchHorizontal01-iT36Ixqz.js";import"./Key01-CV4MPPMx.js";import"./Link01-BL0KHGWk.js";import"./Monitor01-jDiltU3l.js";import"./Sun-D5cuTnns.js";import"./Play-HeD-LWQ6.js";import"./Plus-BzLmRH_e.js";import"./SearchMd-X-m-ot0f.js";import"./Trash01-DkcAHDGj.js";import"./Upload01-CJxfk4_B.js";import"./User01-CuJbE_Yd.js";import"./Users01-CgCEjxiR.js";import"./XClose-BcQlXPoY.js";import"./index-BdQq_4o_.js";import"./index-ChAMt2d-.js";import"./agent-view-guard-e44iAytb.js";import"./use-main-panel-tabs-eZgXms3O.js";import"./use-chat-layout-state-C4y1ngrz.js";import"./use-file-configs-DoW1VYTz.js";import"./use-organization-settings-BEUCQxuY.js";import"./schema-BMqZTcjW.js";import"./task-board-BypYXBtD.js";import"./site-slug-DebpOoQq.js";import"./repository-binding-CrIQbyJh.js";import"./use-mcp-client-D8-rDWEf.js";import"./auth-CsAAW7Ar.js";import"./thread-route-Dp3ppEkH.js";import"./use-panel-navigate-B348HV-V.js";import"./use-project-scope-CJSvss5q.js";import"./thread-intent-BouO_OhM.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-jwr9yBFo.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-B96BwbcD.js";import"./use-mcp-tools-BYNW1IvH.js";import"./types-PjheW3sm.js";import"./utils-CVEq3hMx.js";import"./use-sandbox-events-afI4fSp9.js";import"./chat-context-y8u3K9Tq.js";import"./autosend-8ZqTuUx9.js";import"./use-decopilot-events-BDPMNEXz.js";import"./use-ai-providers-CeHzBmwD.js";import"./use-chat-navigation-pwxRnoh5.js";import"./location-BjlyegC2.js";import"./tool-namespace-C5Z8tVC2.js";import"./drawer-DybzZn1x.js";import"./collection-search-C-3HPALa.js";import"./use-mobile-Cz-N6vVG.js";import"./use-mcp-prompts-9xOCFCVM.js";import"./usage-stats-BcmMK-YO.js";import"./form-Dm1N7Fdz.js";import"./markdown-C8b2SRJt.js";import"./use-copy-COXbZ1Gm.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./input-C_t2NUbp.js";import"./icon-button-UzqZkmgc.js";import"./file-type-icon-ClWl2ykw.js";import"./shell-layout-CX2kb4As.js";import"./avatar-Da-P84-z.js";import"./use-clock-tick-DcGl_y28.js";import"./command-d2fvY4gQ.js";import"./index-ba_EB2Zw.js";import"./integration-icon-B4EO_1fi.js";import"./project-icon-DeUPWsC_.js";import"./new-project-dialog-CQomS8HX.js";import"./repository-import-picker-n3EYoF9U.js";import"./use-navigate-to-agent-CWPsHr0w.js";import"./repository-picker-CjDs0ici.js";import"./useInfiniteQuery-BgN51nwo.js";import"./infiniteQueryObserver-Bmwf-SCt.js";import"./use-debounced-value-BZK5uiHm.js";import"./required-auth-layout-CTKRCLps.js";import"./use-org-sso-BRZ2xqKg.js";import"./chat-draft-RqSOe2VX.js";import"./select-Cmhyur65.js";import"./tabs-CJiVz1UY.js";import"./use-deco-credits-COvQvXnV.js";import"./toggle-group-BxPPN08u.js";import"./use-open-billing-url-CHALVI7F.js";import"./index-CeuDCj_w.js";import"./checkbox-cuQOxwwj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-9tPVAoH5.js";import"./input-CG0PFhS0.js";import"./suggestion-B9eDgKDC.js";import"./use-org-fs-UdNnQzcG.js";import"./question-004-sINsf4GQ.js";import"./use-members-DuiAoVt0.js";import"./use-org-auth-client-DQ6vSNUo.js";import"./feature-paywall-BN5FphJ8.js";import"./plan-ladder-DUQWM1mB.js";import"./add-connection-dialog-CmVGiYmi.js";import"./extract-connection-data-CIO9f-TD.js";import"./metadata-D72DunRR.js";import"./connection-DGqqVA7M.js";import"./url-slug-D7hdnLPq.js";import"./connection-card-gIhz0wdg.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-C3QvYVs6.js";import"./connection-form-helpers-A2MriNrX.js";import"./authenticate-and-persist-oauth-HfpfV8ZS.js";import"./mcp-oauth--_7bIOac.js";import"./mcp-oauth-BIr9y8Ow.js";import"./collection-tabs-BNpEfqyd.js";import"./badge-CJ5q8uJu.js";import"./use-infinite-scroll-1WuTfkvL.js";import"./useSuspenseInfiniteQuery-DnCmqaG2.js";import"./use-task-board-events-BZPWVwkQ.js";import"./pair-D3dg1naQ.js";import"./collapsible-DEfXG6Ht.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-qrtR9Z1h.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-bMLuzpcl.js";import"./use-thread-outputs-BaagK6yF.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-DuWtsFCw.js";import"./use-task-metadata-QX8Xm3F2.js";import"./virtual-mcp-ySkvJvwZ.js";import"./feature-gate-ChDRcm7b.js";import"./alert-dialog-D2yDyccd.js";import"./runnable-block-editor-v2diysES.js";import"./claim-phase-copy-kSJ81npa.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./utils-DGIwcQET.js";import"./monaco-editor-BmtkWb9u.js";import"./editor-CBqQFFb9.js";import"./calendar-DKYy6uOJ.js";import"./use-new-blocks-editor-B5DYqQrS.js";import"./rich-text-link-control-B2KML_yp.js";import"./core.esm-BH3HyyF2.js";import"./sortable.esm-C4yl7HRk.js";import"./combobox-ylZ1_mxm.js";import"./search-input-BJ-xb_6w.js";import"./asset-utils-cuI-wo7N.js";import"./sandbox-git-api-C7JbVL7R.js";import"./mustache-B3B0mlPh.js";import"./sandbox-lifecycle-context-CtphXAh2.js";import"./empty-state-B4qRMioD.js";import"./empty-state-b6tRqzU8.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Ht(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(jt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(vt,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(yt,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function pn(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(ht,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(ut,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(bt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(gt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:H,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(xt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==W||t[70]!==G?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=q):q=t[71],q}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,H=dt(s,j),V=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:H.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{pn as VariantCalendar};
@@ -1 +1 @@
1
- import{ai as f,ag as $}from"./claim-phase-copy-DhUnD0f3.js";const v="x-deco-matchers-override";function h({pageKey:n,prefix:r,variants:t,selectedIndex:a,decofile:e,meta:s}){if(!n||a<0||a>=t.length)return[];const o=[];for(let i=0;i<=a;i++){const u=t[i];if(!u)continue;const c=u.rule,l=i===a?"1":"0",d=(f(c,e,s)?$(c,e,s):null)??`${n}@${r}.${i}.rule`;o.push(`${d}=${l}`)}return o}function P(n,r,t,a){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:n,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:a})}function x({pageKey:n,page:r,sectionIndex:t,sectionLazy:a,mvObj:e,selectedVariantIndex:s,decofile:o,meta:i}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value`:"sections"}.${t}${a?".section":""}.variants`,l=Array.isArray(e.variants)?e.variants:[];return h({pageKey:n,prefix:c,variants:l,selectedIndex:s,decofile:o,meta:i})}function B(n,r){const t=`${r}@`;return n.map(a=>a.startsWith(t)?`props.${a.slice(t.length)}`:a)}function y(n,r){if(r.length===0)return n;try{const t=new URL(n,"http://local");t.searchParams.delete(v);for(const a of r)t.searchParams.append(v,a);return n.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return n}}export{x as a,P as b,B as i,y as w};
1
+ import{ai as f,ag as $}from"./claim-phase-copy-kSJ81npa.js";const v="x-deco-matchers-override";function h({pageKey:n,prefix:r,variants:t,selectedIndex:a,decofile:e,meta:s}){if(!n||a<0||a>=t.length)return[];const o=[];for(let i=0;i<=a;i++){const u=t[i];if(!u)continue;const c=u.rule,l=i===a?"1":"0",d=(f(c,e,s)?$(c,e,s):null)??`${n}@${r}.${i}.rule`;o.push(`${d}=${l}`)}return o}function P(n,r,t,a){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:n,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:a})}function x({pageKey:n,page:r,sectionIndex:t,sectionLazy:a,mvObj:e,selectedVariantIndex:s,decofile:o,meta:i}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value`:"sections"}.${t}${a?".section":""}.variants`,l=Array.isArray(e.variants)?e.variants:[];return h({pageKey:n,prefix:c,variants:l,selectedIndex:s,decofile:o,meta:i})}function B(n,r){const t=`${r}@`;return n.map(a=>a.startsWith(t)?`props.${a.slice(t.length)}`:a)}function y(n,r){if(r.length===0)return n;try{const t=new URL(n,"http://local");t.searchParams.delete(v);for(const a of r)t.searchParams.append(v,a);return n.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return n}}export{x as a,P as b,B as i,y as w};
@@ -1 +1 @@
1
- import{c as $,r as T,l as f,j as i}from"./index-CvkEkbZF.js";import{b as k,T as I,a as P}from"./tooltip-CQtbKEbv.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:l,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,m=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==l||t[3]!==s?(g=()=>{const e=l.findIndex(j=>j.value===s),b=R.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,l],t[2]=l,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const o=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-full",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==o||t[9]!==m||t[10]!==y||t[11]!==l||t[12]!==s?(a=l.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{R.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label??e.tooltip,className:f("relative z-10 flex items-center justify-center gap-2 rounded-full transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(o.buttonWithLabel,"px-3"):o.button),children:[e.icon&&i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",o.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=o,t[9]=m,t[10]=y,t[11]=l,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":o.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-full border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
1
+ import{c as $,r as T,l as f,j as i}from"./index-D984WV3U.js";import{b as k,T as I,a as P}from"./tooltip-CfH7_UR9.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function B(E){const t=$.c(27),{value:s,onValueChange:y,options:l,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,m=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=T.useState(x);let g,p;t[2]!==l||t[3]!==s?(g=()=>{const e=l.findIndex(j=>j.value===s),b=R.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,l],t[2]=l,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),T.useEffect(g,p);const o=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-full",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==o||t[9]!==m||t[10]!==y||t[11]!==l||t[12]!==s?(a=l.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{R.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label??e.tooltip,className:f("relative z-10 flex items-center justify-center gap-2 rounded-full transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(o.buttonWithLabel,"px-3"):o.button),children:[e.icon&&i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",o.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=o,t[9]=m,t[10]=y,t[11]=l,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":o.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-full border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};