decocms 4.570.0 → 4.570.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/dist/client/assets/{AlertCircle-1CFQF9HU.js → AlertCircle-DSTgjQZE.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CUZD7bCb.js → AreaChart-BFiXRx9a.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-yZosAbEQ.js → ArrowLeft-ENfdZA7-.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-B_QEh9AM.js → ArrowUp-BNjQS3K-.js} +1 -1
  5. package/dist/client/assets/{CartesianChart-DOo-DPo8.js → CartesianChart-D6hSTdD_.js} +1 -1
  6. package/dist/client/assets/{CategoricalChart-KK8jWPWD.js → CategoricalChart-BvoSRMBa.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DjUjDOFk.js → CheckCircle-B5oyaJit.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-C2ySHatm.js → ChevronSelectorVertical-D9X2NrqX.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-aVrgoYI4.js → ChevronUp-CWpA2uR_.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-CMrZYrMd.js → CreditCard01-DUDVRgSi.js} +1 -1
  11. package/dist/client/assets/{Globe04-Czvq6voU.js → Globe04-cXNn3Iwb.js} +1 -1
  12. package/dist/client/assets/{Key01-CJVeUDDi.js → Key01-DykOvg3J.js} +1 -1
  13. package/dist/client/assets/{LinkBroken01-Dhn_nIp2.js → LinkBroken01-DWhYckSm.js} +1 -1
  14. package/dist/client/assets/{Minus-qjFidgiH.js → Minus-DD8EF-Qg.js} +1 -1
  15. package/dist/client/assets/{Monitor01-BwW28bRE.js → Monitor01-Brx479PM.js} +1 -1
  16. package/dist/client/assets/{Play-DWKJ4lP6.js → Play-Cnv-o711.js} +1 -1
  17. package/dist/client/assets/{Plus-u00IxELx.js → Plus-Cyljarjx.js} +1 -1
  18. package/dist/client/assets/{ReferenceLine-DhlQLhxT.js → ReferenceLine-CU3NLmsp.js} +1 -1
  19. package/dist/client/assets/{SearchMd-DrxAIngK.js → SearchMd-B8lLWvFT.js} +1 -1
  20. package/dist/client/assets/{ShoppingBag01-BOpj8wnX.js → ShoppingBag01-CsD1bZL0.js} +1 -1
  21. package/dist/client/assets/{Sun-CUTKbSf6.js → Sun-qBi61vDS.js} +1 -1
  22. package/dist/client/assets/{SwitchHorizontal01-DedOEqGg.js → SwitchHorizontal01-omZLJ9y8.js} +1 -1
  23. package/dist/client/assets/{Tool01-BXFm5jK2.js → Tool01-U3lMqDqt.js} +1 -1
  24. package/dist/client/assets/{Tooltip-DhVaIgPv.js → Tooltip-DUfhZGnv.js} +1 -1
  25. package/dist/client/assets/{Trash01-t2BYg0st.js → Trash01-BbqimkDt.js} +1 -1
  26. package/dist/client/assets/{Upload01-BBUgsLLD.js → Upload01-CKgAWfXR.js} +1 -1
  27. package/dist/client/assets/{UserSquare-BloCTB27.js → UserSquare-BItoQb26.js} +1 -1
  28. package/dist/client/assets/{Users01-D0A6lP8t.js → Users01-C6CsMI-H.js} +1 -1
  29. package/dist/client/assets/{XClose-CUME_VK2.js → XClose-B0OqPlIT.js} +1 -1
  30. package/dist/client/assets/{Zap-CmNmFUbX.js → Zap-FLVG2fHK.js} +1 -1
  31. package/dist/client/assets/{access-gate-CbFfEOdM.js → access-gate-BjOW8RuZ.js} +1 -1
  32. package/dist/client/assets/{add-connection-dialog-Bk4KRwLm.js → add-connection-dialog-CUGt2QIL.js} +1 -1
  33. package/dist/client/assets/agent-app-D_QasKCt.js +1 -0
  34. package/dist/client/assets/{agent-assets-CvRDUZu-.js → agent-assets-CJlmAaWQ.js} +1 -1
  35. package/dist/client/assets/{agent-automation-CHtwx6sg.js → agent-automation-DlJDTqvr.js} +1 -1
  36. package/dist/client/assets/{agent-automations-BgmzkAtz.js → agent-automations-DNMHOegy.js} +1 -1
  37. package/dist/client/assets/{agent-calendar-BQ5xnVXW.js → agent-calendar-Z-NoCJJy.js} +1 -1
  38. package/dist/client/assets/{agent-capabilities-DmNIevq-.js → agent-capabilities-DOVKnykH.js} +1 -1
  39. package/dist/client/assets/{agent-connect-sources-DgRvrlpj.js → agent-connect-sources-DLaujtJt.js} +1 -1
  40. package/dist/client/assets/agent-deck-BHqHGfqC.js +1 -0
  41. package/dist/client/assets/{agent-e2e-CowJJC6D.js → agent-e2e-DhR3lPfF.js} +1 -1
  42. package/dist/client/assets/agent-experiments-CsbbrlzU.js +1 -0
  43. package/dist/client/assets/{agent-file-w7JCVN0l.js → agent-file-C-Y5K07p.js} +1 -1
  44. package/dist/client/assets/{agent-hosting-p1C0G82t.js → agent-hosting-BYTFH-Ly.js} +1 -1
  45. package/dist/client/assets/{agent-icon-AbOSM7KF.js → agent-icon-DKTp0XyY.js} +1 -1
  46. package/dist/client/assets/agent-library-BrbVgxGh.js +1 -0
  47. package/dist/client/assets/agent-library-file-38op_SYX.js +1 -0
  48. package/dist/client/assets/agent-overview-rJN7hxM8.js +1 -0
  49. package/dist/client/assets/{agent-releases-BWDO07Iy.js → agent-releases-DXsHCiTg.js} +1 -1
  50. package/dist/client/assets/agent-settings-OJszyqyL.js +1 -0
  51. package/dist/client/assets/{agent-site-editor-BubERiUy.js → agent-site-editor-CTCs3RDg.js} +1 -1
  52. package/dist/client/assets/agent-site-editor-code-Tm63iotr.js +2 -0
  53. package/dist/client/assets/agent-site-editor-content-DGdOpwTo.js +1 -0
  54. package/dist/client/assets/agent-site-editor-preview-UslQ1OuK.js +1 -0
  55. package/dist/client/assets/agent-view-D7OqtWKn.js +1 -0
  56. package/dist/client/assets/{agent-view-guard-w1_Juyu5.js → agent-view-guard-CuLYN5bV.js} +1 -1
  57. package/dist/client/assets/{ai-providers-DAY0nNTK.js → ai-providers-9vWHbCvl.js} +1 -1
  58. package/dist/client/assets/{alert-hJJytfOJ.js → alert-Bvpz2H4v.js} +1 -1
  59. package/dist/client/assets/{analytics-sections-BNJmu5jh.js → analytics-sections-TE-35yVi.js} +1 -1
  60. package/dist/client/assets/api-keys-BwvxdsTQ.js +1 -0
  61. package/dist/client/assets/{api-keys-DOETgk_S.js → api-keys-C-jExymv.js} +1 -1
  62. package/dist/client/assets/{app-editor-CN-Ok2RW.js → app-editor-DnFNwaE0.js} +1 -1
  63. package/dist/client/assets/{asset-utils-DhDLN_-h.js → asset-utils-C8aDDKpg.js} +1 -1
  64. package/dist/client/assets/{auth-D1oBKWc9.js → auth-I4p8-ocC.js} +1 -1
  65. package/dist/client/assets/{auth-catchall-CU9OueC2.js → auth-catchall-CwgMTdiF.js} +1 -1
  66. package/dist/client/assets/{auth-entry-BrGmprWz.js → auth-entry-DandZrkK.js} +1 -1
  67. package/dist/client/assets/{auth-split-layout-DdjSjW7w.js → auth-split-layout-Dg_DSwSr.js} +1 -1
  68. package/dist/client/assets/{authenticate-and-persist-oauth-DfXhL6KV.js → authenticate-and-persist-oauth-NcJzMudq.js} +1 -1
  69. package/dist/client/assets/{automation-list-row-D2RgfFAV.js → automation-list-row-BaDQ8nN-.js} +1 -1
  70. package/dist/client/assets/{automation-runs-_P-ch70z.js → automation-runs-BsUJbSCS.js} +1 -1
  71. package/dist/client/assets/{automations-DVc_UfEJ.js → automations-BnTFSnM5.js} +1 -1
  72. package/dist/client/assets/{autosend-xPyRMwmc.js → autosend-BWmOY3ov.js} +1 -1
  73. package/dist/client/assets/{badge-BLopTdJo.js → badge-DStDMa4b.js} +1 -1
  74. package/dist/client/assets/{block-document-DRcrQBeX.js → block-document-DIb-ND30.js} +1 -1
  75. package/dist/client/assets/{blocks-preview-workspace-context-D9X9QQD5.js → blocks-preview-workspace-context-C8dnQCV5.js} +1 -1
  76. package/dist/client/assets/{blocks-tab-states-DOYuC7hO.js → blocks-tab-states-C3vtkrE6.js} +1 -1
  77. package/dist/client/assets/{blog-schema-njjjFtQI.js → blog-schema-7Bvb7ybL.js} +1 -1
  78. package/dist/client/assets/{buckets-DHR--iFw.js → buckets-CzpSZY9W.js} +1 -1
  79. package/dist/client/assets/{build-improve-prompt-doc-DrCjUiSm.js → build-improve-prompt-doc-DSMfcdZz.js} +1 -1
  80. package/dist/client/assets/{calendar-8e1bW3QX.js → calendar-CWxLf6uz.js} +1 -1
  81. package/dist/client/assets/{capability-load-error-C9mmbd-g.js → capability-load-error-C-cOEkiu.js} +1 -1
  82. package/dist/client/assets/{category-editor-ngsbNhPd.js → category-editor-llVhx3m4.js} +1 -1
  83. package/dist/client/assets/{chart-PfmlhR6m.js → chart-aXx8MtyI.js} +1 -1
  84. package/dist/client/assets/{chat-context-BFpdF0Ea.js → chat-context-B8Z5vGcJ.js} +1 -1
  85. package/dist/client/assets/{chat-draft-B0ZUpMX_.js → chat-draft-DkEn0tls.js} +1 -1
  86. package/dist/client/assets/{checkbox-DDDKCgb5.js → checkbox-BprzbiMO.js} +1 -1
  87. package/dist/client/assets/{choose-editor-XtwrmhD8.js → choose-editor-SgZcLGEy.js} +1 -1
  88. package/dist/client/assets/{cli-auth-success-BnJsDVo5.js → cli-auth-success-DK2OLw1X.js} +1 -1
  89. package/dist/client/assets/{client-icons-Cw3Ivutw.js → client-icons-xxn_7LaS.js} +1 -1
  90. package/dist/client/assets/{cms-settings-editor-DY67ejEv.js → cms-settings-editor-BZi_-T0e.js} +1 -1
  91. package/dist/client/assets/{cms-store-drafts-CYIZoD9d.js → cms-store-drafts-SBEy3_cr.js} +1 -1
  92. package/dist/client/assets/{collapsible-C4GX1H_R.js → collapsible-DFsZxhwL.js} +1 -1
  93. package/dist/client/assets/{collection-detail-8Mxw24IU.js → collection-detail-CSrSzasC.js} +1 -1
  94. package/dist/client/assets/{collection-display-button-WZ9U6Dnn.js → collection-display-button-BxcAk_pb.js} +1 -1
  95. package/dist/client/assets/{collection-search-Dz7QHmOz.js → collection-search-Bhx5TJ6L.js} +1 -1
  96. package/dist/client/assets/{collection-table-wrapper-06TDQKrw.js → collection-table-wrapper-BoSXl9vr.js} +1 -1
  97. package/dist/client/assets/{collection-tabs-C-fKyh8w.js → collection-tabs-QO8RS8bh.js} +1 -1
  98. package/dist/client/assets/{combobox-DqPSOi3v.js → combobox-BmbiPO09.js} +1 -1
  99. package/dist/client/assets/{command-CYK5M8XI.js → command-uMdfud6o.js} +1 -1
  100. package/dist/client/assets/{companion-mcps-section-CAKFIeG-.js → companion-mcps-section-AvTxX0pL.js} +1 -1
  101. package/dist/client/assets/{config-DBXuSQO1.js → config-C9OaANUg.js} +1 -1
  102. package/dist/client/assets/{connect-NGxtU5_0.js → connect-C__OLdre.js} +1 -1
  103. package/dist/client/assets/{connect-layout-DBzvmer6.js → connect-layout-BGiLRWZe.js} +1 -1
  104. package/dist/client/assets/{connect-source-dialog-BnXxvvcJ.js → connect-source-dialog-a9uKmocf.js} +1 -1
  105. package/dist/client/assets/{connection-_PcrLws7.js → connection-DG7KBlix.js} +1 -1
  106. package/dist/client/assets/{connection-card-4gZcunZq.js → connection-card-qG0EXE1L.js} +1 -1
  107. package/dist/client/assets/{connection-detail-C0eX0pfz.js → connection-detail-CpfvCnzG.js} +1 -1
  108. package/dist/client/assets/{connection-form-helpers-C7Gv9-lg.js → connection-form-helpers-Ce5Bf_zZ.js} +1 -1
  109. package/dist/client/assets/{connection-slug-BsU2LQiu.js → connection-slug-BoBDHMu2.js} +1 -1
  110. package/dist/client/assets/{connections-BA8V7XrH.js → connections-d7gGzcVn.js} +1 -1
  111. package/dist/client/assets/{content-tab-C_nIeaie.js → content-tab-BCGl_up3.js} +3 -3
  112. package/dist/client/assets/{context-8d_KiSNS.js → context-BL8O-tTH.js} +1 -1
  113. package/dist/client/assets/{context-menu-o6rJLNXJ.js → context-menu-D_E7697D.js} +1 -1
  114. package/dist/client/assets/{context-shell-C1Ha8IE2.js → context-shell-DunJzbL-.js} +3 -3
  115. package/dist/client/assets/{core.esm-BGRTXfSt.js → core.esm-BKNJrrxU.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-h3rzGSt9.js → create-organization-dialog-DJ9X5Xlz.js} +1 -1
  117. package/dist/client/assets/{device-hint-BOo4jdep.js → device-hint-Ce3veXZo.js} +1 -1
  118. package/dist/client/assets/{discover-BeGAehHo.js → discover-NcR5tz4J.js} +1 -1
  119. package/dist/client/assets/{domain-settings-Nhk3Nbp-.js → domain-settings-DimTUYUq.js} +1 -1
  120. package/dist/client/assets/{drawer-C1zPem_-.js → drawer-C6lamT3y.js} +1 -1
  121. package/dist/client/assets/{editor-BcXADR5b.js → editor-C7RxjaWr.js} +1 -1
  122. package/dist/client/assets/{editor-classes-BftbquCD.js → editor-classes-B55y9L5n.js} +1 -1
  123. package/dist/client/assets/{empty-state-BrKCVCOA.js → empty-state-Ci8hZXbK.js} +1 -1
  124. package/dist/client/assets/{empty-state-tlDzCEBe.js → empty-state-DM7xlu-4.js} +1 -1
  125. package/dist/client/assets/{experiments-tab-choice-Dnv5W_mO.js → experiments-tab-choice-ByO3wkbg.js} +1 -1
  126. package/dist/client/assets/{extract-connection-data-B4CAQLEm.js → extract-connection-data-C8qmylg2.js} +1 -1
  127. package/dist/client/assets/{feature-gate-DWILcK73.js → feature-gate-C6EPE__O.js} +1 -1
  128. package/dist/client/assets/{feature-paywall-BOdJ7pc_.js → feature-paywall-7RP1Qwpl.js} +1 -1
  129. package/dist/client/assets/{feedback--BP5XsMC.js → feedback-idlW6Rt2.js} +1 -1
  130. package/dist/client/assets/{file-explorer-BHgkTafl.js → file-explorer-LvtKoAWE.js} +1 -1
  131. package/dist/client/assets/{file-preview-B3c1V4-B.js → file-preview-Ds-vtVwj.js} +1 -1
  132. package/dist/client/assets/{file-share-button-BmfBQCy7.js → file-share-button-B6jqluQi.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-C-QM854F.js → file-type-icon-C_NX_6K0.js} +1 -1
  134. package/dist/client/assets/{folder-icon-evgkGdeR.js → folder-icon-nyqn5Twi.js} +1 -1
  135. package/dist/client/assets/{form-D2GmFQW3.js → form-dOKUm1o9.js} +1 -1
  136. package/dist/client/assets/{general-B3MQGRB4.js → general-CmjqVXSD.js} +1 -1
  137. package/dist/client/assets/{github-icon-i7iUozqR.js → github-icon-D5i5T8iF.js} +1 -1
  138. package/dist/client/assets/{home-ZCo0svlJ.js → home-Bf_aEScW.js} +1 -1
  139. package/dist/client/assets/{home-overview-qYf3hL7N.js → home-overview-BaddYyk7.js} +1 -1
  140. package/dist/client/assets/{hosted-reconcile-CvdR91uj.js → hosted-reconcile-BdQaV1pW.js} +1 -1
  141. package/dist/client/assets/{icon-button-BUwzNv83.js → icon-button-CL44LV6o.js} +1 -1
  142. package/dist/client/assets/{index-CCTNTj2P.js → index-4w1PAhG_.js} +1 -1
  143. package/dist/client/assets/{index-cKSjr8CK.js → index-BWLOSW33.js} +1 -1
  144. package/dist/client/assets/{index-ukVGoFpO.js → index-BZRUARFj.js} +1 -1
  145. package/dist/client/assets/{index-DQBul4yU.js → index-BoutsVvy.js} +1 -1
  146. package/dist/client/assets/{index-CKnb1ufF.js → index-C0-jFhOF.js} +1 -1
  147. package/dist/client/assets/{index-BpRy7AHp.js → index-CSIpvoWn.js} +3 -3
  148. package/dist/client/assets/{index-DPD9OENi.js → index-CmbhAzcu.js} +1 -1
  149. package/dist/client/assets/{index-Dn1UQvhJ.js → index-Cojr6Fpq.js} +1 -1
  150. package/dist/client/assets/{index-C_UqErbC.js → index-Cu6-9y1I.js} +1 -1
  151. package/dist/client/assets/{index-OBb8rfAw.js → index-DADVzh-A.js} +1 -1
  152. package/dist/client/assets/{index-xj3IgJTF.js → index-DR80z_C4.js} +1 -1
  153. package/dist/client/assets/{index-D_UeTS1-.js → index-FggPcfHb.js} +1 -1
  154. package/dist/client/assets/{index-clkmgwR3.js → index-LOAUw-Ks.js} +1 -1
  155. package/dist/client/assets/{index-BfxdS8h-.js → index-Y545ko-X.js} +1 -1
  156. package/dist/client/assets/{index-ChAPkvx3.js → index-cBNiMokO.js} +1 -1
  157. package/dist/client/assets/{index-lbygo01z.js → index-e0iOUxAj.js} +1 -1
  158. package/dist/client/assets/{index-redirect-D-YiN8Xo.js → index-redirect-Bcv6Ftw-.js} +1 -1
  159. package/dist/client/assets/{infiniteQueryObserver-D03R0ede.js → infiniteQueryObserver-CgO-7OwI.js} +1 -1
  160. package/dist/client/assets/{infra-billing-s8EIFgUr.js → infra-billing-C63z5K_k.js} +1 -1
  161. package/dist/client/assets/{input-Cnq9i2l1.js → input-BX4MndAE.js} +1 -1
  162. package/dist/client/assets/{input-DfTSMalp.js → input-DPkRheY2.js} +3 -3
  163. package/dist/client/assets/{integration-icon-FxF8FEU6.js → integration-icon-dTPy2b7i.js} +1 -1
  164. package/dist/client/assets/{jira-icon-BLg3npMf.js → jira-icon-B-iFZO-u.js} +1 -1
  165. package/dist/client/assets/{label-Bh2Pit2O.js → label-ceAH5i3J.js} +1 -1
  166. package/dist/client/assets/{layout-C60ZlULv.js → layout-t2hFRUfQ.js} +1 -1
  167. package/dist/client/assets/{legacy-agents-deep-DwelfdPA.js → legacy-agents-deep-QW5LKNZ9.js} +1 -1
  168. package/dist/client/assets/{legacy-main-redirect-C_4oCw1E.js → legacy-main-redirect-agOJ7qxO.js} +1 -1
  169. package/dist/client/assets/{library-tab-BaUP3ZVF.js → library-tab-Cd6LpVzA.js} +1 -1
  170. package/dist/client/assets/library-y46FHCMx.js +1 -0
  171. package/dist/client/assets/{login-bcoCcqBW.js → login-DAO6F2t7.js} +1 -1
  172. package/dist/client/assets/{markdown-j0gDnxTp.js → markdown-R4HS4rag.js} +1 -1
  173. package/dist/client/assets/{mcp-app-renderer-C3zml1pp.js → mcp-app-renderer-BhX-TA45.js} +1 -1
  174. package/dist/client/assets/{mcp-oauth-I0kjN__K.js → mcp-oauth-B9XClwsH.js} +1 -1
  175. package/dist/client/assets/{mcp-oauth-D4Pxc73w.js → mcp-oauth-BD1gbmnp.js} +1 -1
  176. package/dist/client/assets/{members-Dxz1ewpb.js → members-B5ITOykA.js} +1 -1
  177. package/dist/client/assets/{memory-C_AcXDod.js → memory-2YoF1gtv.js} +1 -1
  178. package/dist/client/assets/{mock-board-COgbDYxA.js → mock-board-B8zFRpTH.js} +3 -3
  179. package/dist/client/assets/{monaco-editor-DtIoXdMD.js → monaco-editor-COXw9tpM.js} +1 -1
  180. package/dist/client/assets/{monitoring-DWb86ZoC.js → monitoring-D40iJL2y.js} +1 -1
  181. package/dist/client/assets/{monitoring-stats-row-BSstVGMX.js → monitoring-stats-row-Bqran8Kb.js} +1 -1
  182. package/dist/client/assets/{multi-select-DailkN9Q.js → multi-select-CJZaGsBr.js} +1 -1
  183. package/dist/client/assets/{mustache-BSD6v2ig.js → mustache-R0EQOelB.js} +1 -1
  184. package/dist/client/assets/{named-rule-view-B_8gTqcI.js → named-rule-view-C5CYsfvZ.js} +1 -1
  185. package/dist/client/assets/{new-project-dialog-wz5dJWkC.js → new-project-dialog-CIVKu-7h.js} +1 -1
  186. package/dist/client/assets/{oauth-callback-B7Nohzxd.js → oauth-callback-BPcRWINw.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-ai-provider-BmsntsZe.js → oauth-callback-ai-provider-B-M4ZinT.js} +1 -1
  188. package/dist/client/assets/{oauth-consent-cf55Bmz-.js → oauth-consent-D4opNBgY.js} +1 -1
  189. package/dist/client/assets/{onboarding-Cdi9idPQ.js → onboarding-B4LUp0An.js} +1 -1
  190. package/dist/client/assets/{openai-conversation-BMpQOydo.js → openai-conversation-zvFqUh2z.js} +1 -1
  191. package/dist/client/assets/{optimistic-project-sidebar-views-AOXvjkSa.js → optimistic-project-sidebar-views-HH03nXs0.js} +1 -1
  192. package/dist/client/assets/{order-monitor-day-Bk2YpEn9.js → order-monitor-day-DAdsKEE4.js} +1 -1
  193. package/dist/client/assets/{organization-choice-CcyZ2sED.js → organization-choice-BS5zo77t.js} +1 -1
  194. package/dist/client/assets/{orgs-C6-Q2iMm.js → orgs-KOkht6C7.js} +1 -1
  195. package/dist/client/assets/{own-accounts-section-BEuNQYr7.js → own-accounts-section-x8GM3van.js} +1 -1
  196. package/dist/client/assets/{pair-D0R2UDgp.js → pair-CCa5vpj1.js} +1 -1
  197. package/dist/client/assets/{parse-sections-DTDSECqx.js → parse-sections-y55_dTHG.js} +7 -7
  198. package/dist/client/assets/{plan-D5_Bt3KJ.js → plan-Bu1ae04L.js} +1 -1
  199. package/dist/client/assets/{plan-ladder-BWKx4tc-.js → plan-ladder-DexOsahh.js} +1 -1
  200. package/dist/client/assets/{plan-usage-card-Z5a-2qYK.js → plan-usage-card-Dv-we64H.js} +1 -1
  201. package/dist/client/assets/{popover-BrVMYzI-.js → popover-DvNPDyrT.js} +1 -1
  202. package/dist/client/assets/{post-calendar-BpEmJgqQ.js → post-calendar-BbxK7Nck.js} +1 -1
  203. package/dist/client/assets/{post-editor-yNAWU29F.js → post-editor-D3-DvSTe.js} +1 -1
  204. package/dist/client/assets/{preview-content-CWagFWI_.js → preview-content-B_nl5Vt5.js} +1 -1
  205. package/dist/client/assets/{preview-dialog-Bc1z8QHZ.js → preview-dialog-CSKtivij.js} +1 -1
  206. package/dist/client/assets/{preview-panel-bcbhyFq_.js → preview-panel-Bgx1GfaD.js} +1 -1
  207. package/dist/client/assets/{preview-tab-nbSkAxxa.js → preview-tab-BhpH-2Ud.js} +3 -3
  208. package/dist/client/assets/{product-picker-dialog-CNr_kHqK.js → product-picker-dialog-7dCvJecm.js} +1 -1
  209. package/dist/client/assets/{profile-DtHrUsir.js → profile-CE19vOJM.js} +1 -1
  210. package/dist/client/assets/{project-app-view-BfN3k7ju.js → project-app-view-1nFCQkd0.js} +1 -1
  211. package/dist/client/assets/{project-apps-C_vCRb8O.js → project-apps-BH_f18IX.js} +1 -1
  212. package/dist/client/assets/{project-icon-n7LBJrfx.js → project-icon-MnmUeo9G.js} +1 -1
  213. package/dist/client/assets/{project-index-2cTAo4fH.js → project-index-VbMkJjNv.js} +1 -1
  214. package/dist/client/assets/project-reports-CnsbnjmF.js +1 -0
  215. package/dist/client/assets/{project-sidebar-views-DhZy-bnC.js → project-sidebar-views-B0YI7MEr.js} +1 -1
  216. package/dist/client/assets/project-tasks-DNvniFkq.js +1 -0
  217. package/dist/client/assets/{projects-OSECm-FW.js → projects-BV3gIN23.js} +1 -1
  218. package/dist/client/assets/{projects-empty-state-B7zdGKEZ.js → projects-empty-state-afMxQRTs.js} +1 -1
  219. package/dist/client/assets/{prompts-J4HaC_ei.js → prompts-oZ33-QKo.js} +1 -1
  220. package/dist/client/assets/record-editor-Z7XUx2eC.js +1 -0
  221. package/dist/client/assets/{redirect-editor-DeoRyu0l.js → redirect-editor-CYAcoJC8.js} +1 -1
  222. package/dist/client/assets/{reports-CpGpr_ZH.js → reports-CDhkA5XZ.js} +1 -1
  223. package/dist/client/assets/reports-D0p-Um_j.js +1 -0
  224. package/dist/client/assets/{reports-onboarding-CJMXOfw7.js → reports-onboarding-N-tDslEn.js} +1 -1
  225. package/dist/client/assets/{reports-tab-LNIEzMQ4.js → reports-tab-CwMJYWOD.js} +2 -2
  226. package/dist/client/assets/repositories-420JyOBQ.js +1 -0
  227. package/dist/client/assets/{repositories-CCBdk88v.js → repositories-Dd6j8vDN.js} +1 -1
  228. package/dist/client/assets/{repository-binding-DdmRVWpz.js → repository-binding-lATwNZrT.js} +1 -1
  229. package/dist/client/assets/{repository-picker-ClelLyeu.js → repository-picker-C4hJc23I.js} +1 -1
  230. package/dist/client/assets/{require-capability-BCUql2uo.js → require-capability-DC5p7lOC.js} +1 -1
  231. package/dist/client/assets/{required-auth-layout-Lh-Wt6uK.js → required-auth-layout-C3gt0jrF.js} +1 -1
  232. package/dist/client/assets/{reset-password-Cq-nDwrY.js → reset-password-CyyT5tby.js} +1 -1
  233. package/dist/client/assets/{resizable-D8U4YOro.js → resizable-BOUBAwD3.js} +1 -1
  234. package/dist/client/assets/{resolve-tab-icon-CukmKoWA.js → resolve-tab-icon-Cy2CMMCX.js} +1 -1
  235. package/dist/client/assets/{review-settings-BzmxgDqt.js → review-settings-BckYzYJ3.js} +1 -1
  236. package/dist/client/assets/{role-color-C-Q62gr6.js → role-color-DoTrcNjE.js} +1 -1
  237. package/dist/client/assets/{roles-b8ba7BB1.js → roles-Bcyxf_BJ.js} +1 -1
  238. package/dist/client/assets/route-Dm6KS1MZ.js +1 -0
  239. package/dist/client/assets/{route-CXbtT4mj.js → route-WCW0DstB.js} +1 -1
  240. package/dist/client/assets/{route-Dq87eMEg.js → route-Z2AgEOBo.js} +1 -1
  241. package/dist/client/assets/{sandbox-lifecycle-context-o_ip6_5z.js → sandbox-lifecycle-context-ezRldKto.js} +1 -1
  242. package/dist/client/assets/{schema-CDmusrrq.js → schema-CYb0A5pZ.js} +1 -1
  243. package/dist/client/assets/{schema-ByYst2Pb.js → schema-oSx50TOf.js} +1 -1
  244. package/dist/client/assets/{scroll-area-Ch8iXNIM.js → scroll-area-C2kqOV3G.js} +1 -1
  245. package/dist/client/assets/{search-input-CqM9MiZ3.js → search-input-D2_G90x-.js} +1 -1
  246. package/dist/client/assets/{search-toggle-VKaSo9uW.js → search-toggle-DB94_Uzf.js} +1 -1
  247. package/dist/client/assets/{secret-picker-DPC7oeFy.js → secret-picker-BaH4MCDx.js} +1 -1
  248. package/dist/client/assets/{secrets-2ntDkWXH.js → secrets-Ba8vj8rp.js} +1 -1
  249. package/dist/client/assets/{section-array-field-ziyJ9KKG.js → section-array-field-C_pqbrT4.js} +1 -1
  250. package/dist/client/assets/{sections-B2FraWlK.js → sections-CiSDVCFc.js} +1 -1
  251. package/dist/client/assets/{sections-editor-D6NJi3oc.js → sections-editor-DbbjUxTa.js} +1 -1
  252. package/dist/client/assets/{select-BqAgCf_e.js → select-5VAmllhJ.js} +1 -1
  253. package/dist/client/assets/{select-model-CgHPgPvz.js → select-model-CGTpgJ_F.js} +1 -1
  254. package/dist/client/assets/{seo-editor-Bc6Ncl3H.js → seo-editor-BToxCPgQ.js} +1 -1
  255. package/dist/client/assets/{separator-B2LjZA6j.js → separator-BPNBTypb.js} +1 -1
  256. package/dist/client/assets/settings-tab-CvzmrN3x.js +1 -0
  257. package/dist/client/assets/{sheet-y4usetIj.js → sheet-DO79DyVm.js} +1 -1
  258. package/dist/client/assets/{shell-layout-BHLD5jhn.js → shell-layout-BE-F-e8S.js} +1 -1
  259. package/dist/client/assets/{site-draft-actions-gfTBLW-u.js → site-draft-actions-CSmqWURg.js} +1 -1
  260. package/dist/client/assets/{site-draft-view-B7polEM8.js → site-draft-view-D9Mkp6Cl.js} +1 -1
  261. package/dist/client/assets/site-editor-BnuHlrBY.js +1 -0
  262. package/dist/client/assets/{site-editor-toast-DaSHvCWu.js → site-editor-toast-hszpYNCy.js} +1 -1
  263. package/dist/client/assets/{skills-BemYRmGR.js → skills-Bv-bIoQE.js} +1 -1
  264. package/dist/client/assets/{slider-CUVU1H_x.js → slider-ShXfqPv2.js} +1 -1
  265. package/dist/client/assets/{sortable.esm-Sw9w3P90.js → sortable.esm-CuHm_9IF.js} +1 -1
  266. package/dist/client/assets/{sso-C3qLFTZi.js → sso-CSplF7G4.js} +1 -1
  267. package/dist/client/assets/{suggestion-BiaV3mvJ.js → suggestion-D3ekTtHr.js} +1 -1
  268. package/dist/client/assets/{switch-DKx4qpl7.js → switch-DXYVQM5M.js} +1 -1
  269. package/dist/client/assets/{synced-repos-edmrMUSZ.js → synced-repos-CuP83Elu.js} +1 -1
  270. package/dist/client/assets/{tab-icon-glyph-C8csunxY.js → tab-icon-glyph-vdlPy3Bm.js} +1 -1
  271. package/dist/client/assets/{table-Dq5I6aY7.js → table-D0fiB6FK.js} +1 -1
  272. package/dist/client/assets/{tabs-0SGJ_qve.js → tabs-Cv20SIqi.js} +1 -1
  273. package/dist/client/assets/{task-board-CWLsdAvC.js → task-board-DSsXkzaF.js} +1 -1
  274. package/dist/client/assets/{task-route-Cay3KQ6a.js → task-route-DMVHtIU_.js} +1 -1
  275. package/dist/client/assets/{task-status-D-bn6Q3b.js → task-status-BNhGvcs9.js} +1 -1
  276. package/dist/client/assets/{taskboard-analytics-L-F5O9dg.js → taskboard-analytics-CMwW3rsH.js} +1 -1
  277. package/dist/client/assets/tasks-BesFuPIU.js +1 -0
  278. package/dist/client/assets/{tasks-DIxE8tYD.js → tasks-DhVzWH9H.js} +1 -1
  279. package/dist/client/assets/{textarea-C8pP4RDC.js → textarea-jvxCA8mN.js} +1 -1
  280. package/dist/client/assets/{thread-analytics-01LkdxOy.js → thread-analytics-CM1xCbgM.js} +1 -1
  281. package/dist/client/assets/{thread-intent-D7FGI3D0.js → thread-intent-BirCtYTn.js} +1 -1
  282. package/dist/client/assets/{thread-route-CKRKYHUZ.js → thread-route-BaKA80Bq.js} +1 -1
  283. package/dist/client/assets/{thread-route-E0bMcc27.js → thread-route-gjL8sFh9.js} +1 -1
  284. package/dist/client/assets/{thread-sheet-body-DkwRzpXX.js → thread-sheet-body-C68t2imw.js} +1 -1
  285. package/dist/client/assets/{time-range-picker-DNs3LiZc.js → time-range-picker-8dvZbzAF.js} +1 -1
  286. package/dist/client/assets/{toggle-group-DkZuJxmr.js → toggle-group-BkFB4B6f.js} +1 -1
  287. package/dist/client/assets/{tool-namespace-CCkkm2qA.js → tool-namespace-BPtJyOTH.js} +1 -1
  288. package/dist/client/assets/{tool-set-selector-5zt8G69C.js → tool-set-selector-D3Q4u2pt.js} +1 -1
  289. package/dist/client/assets/{toolbar-icon-button-Cx0kc5lZ.js → toolbar-icon-button-DWxNo-CH.js} +1 -1
  290. package/dist/client/assets/{tooltip-jhiffORJ.js → tooltip-BS3U7s1j.js} +1 -1
  291. package/dist/client/assets/{tooltipContext-BYQJi6EG.js → tooltipContext-BLujWWNh.js} +1 -1
  292. package/dist/client/assets/{track-8QL-WYe-.js → track-CpUWIu8h.js} +1 -1
  293. package/dist/client/assets/{types-CR7kvQl1.js → types-BzcfuN64.js} +1 -1
  294. package/dist/client/assets/{url-slug-BxiYZtUy.js → url-slug-BOoM9-0A.js} +1 -1
  295. package/dist/client/assets/{usage-stats-DB51uKij.js → usage-stats-8fBPxKmN.js} +1 -1
  296. package/dist/client/assets/{use-ai-providers-sfkouqgF.js → use-ai-providers-CGSjFpU8.js} +1 -1
  297. package/dist/client/assets/{use-apply-named-rule-DA98Iihd.js → use-apply-named-rule-CpJPkStL.js} +1 -1
  298. package/dist/client/assets/use-ask-in-chat-CpD8hrjd.js +1 -0
  299. package/dist/client/assets/{use-automations-DD-H-0gg.js → use-automations-XQDz01iY.js} +1 -1
  300. package/dist/client/assets/{use-autosave-Bw7KaLnG.js → use-autosave-C37w8LAn.js} +1 -1
  301. package/dist/client/assets/use-blocks-v8-project-C468EFq8.js +1 -0
  302. package/dist/client/assets/{use-chat-layout-state-BbG5C9on.js → use-chat-layout-state-VEEgw78z.js} +1 -1
  303. package/dist/client/assets/{use-cms-publish-actions-1o6NX1uP.js → use-cms-publish-actions-ZwEhZ1LO.js} +1 -1
  304. package/dist/client/assets/{use-connect-companion-LWK1AWBF.js → use-connect-companion-DaWAsSVX.js} +1 -1
  305. package/dist/client/assets/{use-connection-CgY1E7FR.js → use-connection-Br1r8foQ.js} +1 -1
  306. package/dist/client/assets/{use-content-sync-9QsuTp3C.js → use-content-sync-W-nuOa0g.js} +1 -1
  307. package/dist/client/assets/{use-copy-DRW_V1kW.js → use-copy-B7Ns5hk7.js} +1 -1
  308. package/dist/client/assets/{use-date-fns-locale-Cw3Zaqb5.js → use-date-fns-locale-DdNyhrK9.js} +1 -1
  309. package/dist/client/assets/{use-debounced-autosave-CgAvArNN.js → use-debounced-autosave-BWd-EoeM.js} +1 -1
  310. package/dist/client/assets/{use-debounced-value-B0a3uxKQ.js → use-debounced-value-_GKTwOmp.js} +1 -1
  311. package/dist/client/assets/{use-deco-credits-BVH6IrV5.js → use-deco-credits-D7cUDa9s.js} +1 -1
  312. package/dist/client/assets/{use-decopilot-events-BYlxYXUQ.js → use-decopilot-events-MFonZFqV.js} +1 -1
  313. package/dist/client/assets/{use-delete-connection-CvuMwKsA.js → use-delete-connection-DqWgt_cH.js} +1 -1
  314. package/dist/client/assets/{use-deployment-admin-Bw3ciRk9.js → use-deployment-admin-Dpt106eE.js} +1 -1
  315. package/dist/client/assets/{use-entitlements-CMCBZq5_.js → use-entitlements-BIn3vhw_.js} +1 -1
  316. package/dist/client/assets/{use-fast-preview-draft-url-BUD5f_Gm.js → use-fast-preview-draft-url-Btcix_Th.js} +1 -1
  317. package/dist/client/assets/{use-file-configs-2Z7OwHbg.js → use-file-configs-B7N8jort.js} +1 -1
  318. package/dist/client/assets/{use-id-selection--cuaALt7.js → use-id-selection-BYftOYVM.js} +1 -1
  319. package/dist/client/assets/{use-inbox-feed-DxzsD1YQ.js → use-inbox-feed-Ccjtmqv0.js} +1 -1
  320. package/dist/client/assets/{use-infinite-scroll-BKVwA-Ob.js → use-infinite-scroll-DIKScsa1.js} +1 -1
  321. package/dist/client/assets/{use-join-requests-BZlGoiU5.js → use-join-requests-CUdH2HZc.js} +1 -1
  322. package/dist/client/assets/{use-main-panel-tabs-4JSMbOrH.js → use-main-panel-tabs-CCwGm8EC.js} +1 -1
  323. package/dist/client/assets/{use-mcp-auth-status-CYCjckUQ.js → use-mcp-auth-status-N-GvDO1N.js} +1 -1
  324. package/dist/client/assets/{use-mcp-client-CjLtJgTU.js → use-mcp-client-C6kW4vbD.js} +1 -1
  325. package/dist/client/assets/{use-mcp-prompts-JVEMCdnt.js → use-mcp-prompts-CjpO3wzS.js} +1 -1
  326. package/dist/client/assets/{use-mcp-tools-C5jhMv1O.js → use-mcp-tools-Cjb6pYnM.js} +1 -1
  327. package/dist/client/assets/{use-mobile-CKr6zvd6.js → use-mobile-Dl5gc-ru.js} +1 -1
  328. package/dist/client/assets/{use-move-blocks-B-6qZYKa.js → use-move-blocks-Ce0Kig2N.js} +1 -1
  329. package/dist/client/assets/{use-navigate-to-agent-BJsKVGd6.js → use-navigate-to-agent-B5ZbLCUr.js} +1 -1
  330. package/dist/client/assets/{use-org-fs-DDhNsbr6.js → use-org-fs-BGMZPpcx.js} +1 -1
  331. package/dist/client/assets/{use-org-repo-syncs-DBx3nqV9.js → use-org-repo-syncs-BAfsGUin.js} +1 -1
  332. package/dist/client/assets/{use-org-sso-DyxTDJHi.js → use-org-sso-CwVEWYSS.js} +1 -1
  333. package/dist/client/assets/{use-organization-settings-Cs5X07HH.js → use-organization-settings-BTar9wUH.js} +1 -1
  334. package/dist/client/assets/{use-project-scope-DK5Zq3Vj.js → use-project-scope-D-D3vFqs.js} +1 -1
  335. package/dist/client/assets/{use-recent-apps-BrqeKXhi.js → use-recent-apps-CLezfBII.js} +1 -1
  336. package/dist/client/assets/{use-reports-diagnostic-D0MF0Enh.js → use-reports-diagnostic-DOqTM6Sq.js} +1 -1
  337. package/dist/client/assets/{use-sandbox-events-DKvN2vib.js → use-sandbox-events-D2qF_K2w.js} +1 -1
  338. package/dist/client/assets/{use-secrets-q3tQjsVS.js → use-secrets-CdTtOnTm.js} +1 -1
  339. package/dist/client/assets/{use-section-preview-base-DI0VnMUg.js → use-section-preview-base-BQcFctze.js} +1 -1
  340. package/dist/client/assets/{use-sidebar-collapsed-NHFQSjyB.js → use-sidebar-collapsed-CU3_YQ2d.js} +1 -1
  341. package/dist/client/assets/{use-tags-7ZRefyR6.js → use-tags-ChNJSZUC.js} +1 -1
  342. package/dist/client/assets/{use-task-board-analytics-CFKUFKZO.js → use-task-board-analytics-CEr1IeWK.js} +1 -1
  343. package/dist/client/assets/{use-task-board-events-D1ietf1D.js → use-task-board-events-sZpvmMHd.js} +1 -1
  344. package/dist/client/assets/{use-task-board-item-prs-hyB7mT0I.js → use-task-board-item-prs-Dv_8MGt1.js} +1 -1
  345. package/dist/client/assets/{use-task-board-items-C5M-iJHh.js → use-task-board-items-CoNq_Cxi.js} +1 -1
  346. package/dist/client/assets/{use-task-board-prompts-Bj8qQJuo.js → use-task-board-prompts-CWMdTCPN.js} +1 -1
  347. package/dist/client/assets/{use-task-metadata-D_W5nMRB.js → use-task-metadata-DsDxaplE.js} +1 -1
  348. package/dist/client/assets/{use-thread-outputs-CIMyOC9i.js → use-thread-outputs-St6ye3b1.js} +1 -1
  349. package/dist/client/assets/{use-voice-input-D0UxQK8p.js → use-voice-input-B9rrFwaR.js} +1 -1
  350. package/dist/client/assets/useInfiniteQuery-Bh3c89Tr.js +1 -0
  351. package/dist/client/assets/{useQueries-D-paqk_N.js → useQueries-H5rWlyEJ.js} +1 -1
  352. package/dist/client/assets/useSuspenseInfiniteQuery-bp-UKwHD.js +1 -0
  353. package/dist/client/assets/{users-CgyVEAVi.js → users-wWFrk5XR.js} +1 -1
  354. package/dist/client/assets/{utils-CML3oMCb.js → utils-1rHoZRD5.js} +1 -1
  355. package/dist/client/assets/{variant-calendar-CiRidZhE.js → variant-calendar-BktNebbV.js} +1 -1
  356. package/dist/client/assets/{variant-matcher-override-DptryLC2.js → variant-matcher-override-CtOZ7RsB.js} +1 -1
  357. package/dist/client/assets/{view-header-C5UPfmG7.js → view-header-BOKi0SWm.js} +1 -1
  358. package/dist/client/assets/{virtual-mcp-BVgnJh3F.js → virtual-mcp-o7wxm5IS.js} +1 -1
  359. package/dist/client/assets/{watch-sse-pool-DiT4THMV.js → watch-sse-pool-D6Aszef8.js} +1 -1
  360. package/dist/client/index.html +1 -1
  361. package/dist/server/server.js +1 -1
  362. package/package.json +1 -1
  363. package/dist/client/assets/agent-app-D1s_xxXR.js +0 -1
  364. package/dist/client/assets/agent-deck-1mK6Ythm.js +0 -1
  365. package/dist/client/assets/agent-experiments-3ZqH1pHZ.js +0 -1
  366. package/dist/client/assets/agent-library-Bivz2SRZ.js +0 -1
  367. package/dist/client/assets/agent-library-file-CpGwdPNs.js +0 -1
  368. package/dist/client/assets/agent-overview-CwCkuDX2.js +0 -1
  369. package/dist/client/assets/agent-settings-DEn_87Gp.js +0 -1
  370. package/dist/client/assets/agent-site-editor-code-DqKm62jM.js +0 -2
  371. package/dist/client/assets/agent-site-editor-content-DmZnej6I.js +0 -1
  372. package/dist/client/assets/agent-site-editor-preview-DuaKrxk_.js +0 -1
  373. package/dist/client/assets/agent-view-Cey5y0PV.js +0 -1
  374. package/dist/client/assets/api-keys-IHsKCg1y.js +0 -1
  375. package/dist/client/assets/library-B-jS61L0.js +0 -1
  376. package/dist/client/assets/project-reports-C1Hkwfya.js +0 -1
  377. package/dist/client/assets/project-tasks-B8hDD-I8.js +0 -1
  378. package/dist/client/assets/record-editor-B3zURv0C.js +0 -1
  379. package/dist/client/assets/reports-CofWqBLU.js +0 -1
  380. package/dist/client/assets/repositories-yBP4WuG_.js +0 -1
  381. package/dist/client/assets/route-BK2wi4kD.js +0 -1
  382. package/dist/client/assets/settings-tab-DzS7_7oR.js +0 -1
  383. package/dist/client/assets/site-editor-Cp5Zuvwt.js +0 -1
  384. package/dist/client/assets/tasks-Drp2qtBI.js +0 -1
  385. package/dist/client/assets/use-ask-in-chat-tQsBmTsy.js +0 -1
  386. package/dist/client/assets/use-blocks-v8-project-DzHuTeMz.js +0 -1
  387. package/dist/client/assets/useInfiniteQuery-4mlqNbEX.js +0 -1
  388. package/dist/client/assets/useSuspenseInfiniteQuery-6pYaPTkl.js +0 -1
@@ -1,12 +1,12 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openai-conversation-BMpQOydo.js","assets/index-BpRy7AHp.js","assets/index-CKEKSTrk.css","assets/usage-stats-DB51uKij.js","assets/tool-namespace-CCkkm2qA.js","assets/form-D2GmFQW3.js","assets/label-Bh2Pit2O.js","assets/utils-CVEq3hMx.js","assets/markdown-j0gDnxTp.js","assets/use-copy-DRW_V1kW.js","assets/agent-icon-AbOSM7KF.js","assets/AlertCircle-1CFQF9HU.js","assets/Tool01-BXFm5jK2.js","assets/ArrowUp-B_QEh9AM.js","assets/ArrowLeft-yZosAbEQ.js","assets/LinkBroken01-Dhn_nIp2.js","assets/ShoppingBag01-BOpj8wnX.js","assets/Globe04-Czvq6voU.js","assets/CheckCircle-DjUjDOFk.js","assets/ChevronUp-aVrgoYI4.js","assets/ChevronSelectorVertical-C2ySHatm.js","assets/UserSquare-BloCTB27.js","assets/CreditCard01-CMrZYrMd.js","assets/SwitchHorizontal01-DedOEqGg.js","assets/Key01-CJVeUDDi.js","assets/Minus-qjFidgiH.js","assets/Monitor01-BwW28bRE.js","assets/Sun-CUTKbSf6.js","assets/Play-DWKJ4lP6.js","assets/Plus-u00IxELx.js","assets/SearchMd-DrxAIngK.js","assets/Trash01-t2BYg0st.js","assets/Upload01-BBUgsLLD.js","assets/Users01-D0A6lP8t.js","assets/XClose-CUME_VK2.js","assets/Zap-CmNmFUbX.js","assets/chat-context-BFpdF0Ea.js","assets/autosend-xPyRMwmc.js","assets/thread-route-E0bMcc27.js","assets/use-project-scope-DK5Zq3Vj.js","assets/repository-binding-DdmRVWpz.js","assets/use-mcp-client-CjLtJgTU.js","assets/auth-D1oBKWc9.js","assets/thread-intent-D7FGI3D0.js","assets/delay-CnY5UFtP.js","assets/watch-sse-pool-DiT4THMV.js","assets/task-board-CWLsdAvC.js","assets/schema-CDmusrrq.js","assets/use-entitlements-CMCBZq5_.js","assets/use-ai-providers-sfkouqgF.js","assets/use-decopilot-events-BYlxYXUQ.js","assets/use-organization-settings-Cs5X07HH.js","assets/use-mobile-CKr6zvd6.js","assets/tooltip-jhiffORJ.js","assets/index-lbygo01z.js","assets/icon-button-BUwzNv83.js","assets/file-type-icon-C-QM854F.js","assets/chat-draft-B0ZUpMX_.js","assets/use-voice-input-D0UxQK8p.js","assets/popover-BrVMYzI-.js","assets/drawer-C1zPem_-.js","assets/index-DPD9OENi.js","assets/checkbox-DDDKCgb5.js","assets/select-BqAgCf_e.js","assets/index-BdQq_4o_.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/tabs-0SGJ_qve.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-BVH6IrV5.js","assets/toggle-group-DkZuJxmr.js","assets/input-Cnq9i2l1.js","assets/suggestion-BiaV3mvJ.js","assets/use-mcp-prompts-JVEMCdnt.js","assets/use-org-fs-DDhNsbr6.js","assets/useInfiniteQuery-4mlqNbEX.js","assets/infiniteQueryObserver-D03R0ede.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-BOdJ7pc_.js","assets/plan-ladder-BWKx4tc-.js","assets/add-connection-dialog-Bk4KRwLm.js","assets/collection-search-Dz7QHmOz.js","assets/extract-connection-data-B4CAQLEm.js","assets/metadata-D72DunRR.js","assets/connection-_PcrLws7.js","assets/url-slug-BxiYZtUy.js","assets/connection-card-4gZcunZq.js","assets/connection-slug-BsU2LQiu.js","assets/integration-icon-FxF8FEU6.js","assets/textarea-C8pP4RDC.js","assets/use-connection-CgY1E7FR.js","assets/schema-ByYst2Pb.js","assets/connection-form-helpers-C7Gv9-lg.js","assets/authenticate-and-persist-oauth-DfXhL6KV.js","assets/mcp-oauth-I0kjN__K.js","assets/mcp-oauth-D4Pxc73w.js","assets/collection-tabs-C-fKyh8w.js","assets/badge-BLopTdJo.js","assets/use-infinite-scroll-BKVwA-Ob.js","assets/useSuspenseInfiniteQuery-6pYaPTkl.js","assets/use-task-board-events-D1ietf1D.js","assets/use-chat-layout-state-BbG5C9on.js"])))=>i.map(i=>d[i]);
2
- import{bl as Ee,c as D,b as Q,r as R,m as B,j as n,b2 as Ze,aF as oe,ba as Dt,aG as te,cU as Re,B as Y,aE as gs,aD as xs,e3 as vs,cT as bs,J as we,c7 as As,g0 as ke,g1 as ut,d9 as ys,ak as js,e as ks,I as ws,t as Ie,E as X,a5 as Te,d as Xe,bx as Mt,x as Cs,aT as Ss,w as Ns,v as Is,D as Ts,eP as _s,a6 as Ds,K as Ms,i as Ps,_ as Es,X as Rs,Z as Us,Y as be,ap as pt,an as ht,ao as ft,h as Fs,bd as Os,bb as Ls,aC as zs,as as Bs,e2 as $s,e7 as Ae,b4 as qs,e9 as Ks,b9 as mt,g2 as Qs,a as Ys,ar as Ws,at as Gs,aS as We,fd as Hs,o as Js,c_ as Zs,aY as Xs,a_ as en,ag as Pt}from"./index-BpRy7AHp.js";import{i as Et,c as tn,e as sn,j as Rt,P as nn,k as on,S as an}from"./usage-stats-DB51uKij.js";import{s as Ut}from"./XClose-CUME_VK2.js";import{I as rn}from"./icon-button-BUwzNv83.js";import{F as ln}from"./file-type-icon-C-QM854F.js";import{b as Ue,I as Vn,J as cn,c as et,d as tt,q as dn,K as un,M as pn,N as hn,u as Ft,f as fn,s as mn,e as gn}from"./chat-context-BFpdF0Ea.js";import{u as xn}from"./repository-binding-DdmRVWpz.js";import{A as vn,w as bn}from"./autosend-xPyRMwmc.js";import{t as An,z as yn,q as jn,c as kn,w as wn,h as Cn}from"./thread-intent-D7FGI3D0.js";import{r as gt,i as Sn,c as Nn,w as In,H as Tn}from"./chat-draft-B0ZUpMX_.js";import{u as _n,a as Dn,T as Mn}from"./use-voice-input-D0UxQK8p.js";import{i as Ot}from"./LinkBroken01-Dhn_nIp2.js";import{i as Lt}from"./ArrowUp-B_QEh9AM.js";import{n as zt}from"./ShoppingBag01-BOpj8wnX.js";import{t as $e,aR as Bt,a3 as $t,aQ as Ge,g as Pn,e as En,aW as Rn,aC as qt,aX as Kt,aU as Un,Y as Fn,aY as On}from"./agent-icon-AbOSM7KF.js";import{b as Qt}from"./Tool01-BXFm5jK2.js";import{h as Ln}from"./UserSquare-BloCTB27.js";import{i as zn}from"./Upload01-BBUgsLLD.js";import{i as Bn}from"./AlertCircle-1CFQF9HU.js";import{a as He,b as st,d as nt,f as ot,F as Yt}from"./form-D2GmFQW3.js";import{c as $n,S as qn,b as Kn,a as Qn,d as Yn}from"./select-BqAgCf_e.js";import{t as Wn}from"./ChevronUp-aVrgoYI4.js";import{T as at,a as it,c as rt}from"./tooltip-jhiffORJ.js";import{i as Gn}from"./ArrowLeft-yZosAbEQ.js";import{b as Hn,c as Jn}from"./tabs-0SGJ_qve.js";import{d as qe,f as Zn}from"./use-entitlements-CMCBZq5_.js";import{u as Xn}from"./use-deco-credits-BVH6IrV5.js";import{T as xt,a as eo}from"./toggle-group-DkZuJxmr.js";import{a as to,d as so,g as vt,s as no}from"./tool-namespace-CCkkm2qA.js";import{t as oo}from"./utils-CVEq3hMx.js";import{m as lt,g as ao,b as io}from"./index-DPD9OENi.js";import{p as Wt,u as ro,T as lo,a as Vo,U as co}from"./input-Cnq9i2l1.js";import{a as uo}from"./use-mcp-client-CjLtJgTU.js";import{l as po,g as ho}from"./use-mcp-prompts-JVEMCdnt.js";import{s as bt}from"./Plus-u00IxELx.js";import"./suggestion-BiaV3mvJ.js";import{p as fo,q as mo}from"./question-004-sINsf4GQ.js";import{F as At}from"./feature-paywall-BOdJ7pc_.js";import{A as go}from"./add-connection-dialog-Bk4KRwLm.js";import{a as xo}from"./use-organization-settings-Cs5X07HH.js";import{u as vo}from"./use-task-board-events-D1ietf1D.js";import{u as bo}from"./use-mobile-CKr6zvd6.js";import{r as Ao}from"./use-chat-layout-state-BbG5C9on.js";const yo=Ee("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);const jo=Ee("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const ko=Ee("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const wo=Ee("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Co=Ee("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),Qe="cubic-bezier(0.645, 0.045, 0.355, 1)",ar=44,So={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},No={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},Io={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function xe(t){const e=D.c(69),{icon:s,label:o,count:a,title:i,footerLeft:r,footerRight:l,children:V,defaultExpanded:d,variant:u,onClose:c}=t,p=u===void 0?"default":u,f=Q(),[h,m]=R.useState(d),[g,v]=R.useState(!1);let x;e[0]!==c?(x=()=>{v(!0),c?.()},e[0]=c,e[1]=x):x=e[1];const b=x;if(g)return null;const y=No[p],A=So[p];let k;e[2]!==y||e[3]!==A?(k=B("relative flex flex-col rounded-xl bg-background border shadow-soft","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",y,A),e[2]=y,e[3]=A,e[4]=k):k=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=()=>m(To),e[5]=j):j=e[5];const w=h&&"rounded-b-none",C=!h&&"rounded-b-xl";let _;e[6]!==w||e[7]!==C?(_=B("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent transition-colors rounded-t-xl",w,C),e[6]=w,e[7]=C,e[8]=_):_=e[8];const N=Io[p];let T;e[9]!==N?(T=B("shrink-0",N),e[9]=N,e[10]=T):T=e[10];let I;e[11]!==s||e[12]!==T?(I=n.jsx("span",{className:T,children:s}),e[11]=s,e[12]=T,e[13]=I):I=e[13];let E;e[14]!==o?(E=n.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=E):E=e[15];let F;e[16]!==a?(F=a?n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:a}):null,e[16]=a,e[17]=F):F=e[17];const L=h?"rotate(180deg)":"rotate(0deg)";let M;e[18]!==L?(M=n.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:n.jsx(Wn,{size:16,style:{transform:L,transition:`transform 180ms ${Qe}`}})}),e[18]=L,e[19]=M):M=e[19];let q;e[20]!==f?(q=f("chat.collapsibleHighlight.closeLabel"),e[20]=f,e[21]=q):q=e[21];let K;e[22]!==f?(K=f("chat.collapsibleHighlight.closeTitle"),e[22]=f,e[23]=K):K=e[23];let Z,U;e[24]!==b?(Z=Ve=>{Ve.stopPropagation(),b()},U=Ve=>{(Ve.key==="Enter"||Ve.key===" ")&&(Ve.preventDefault(),Ve.stopPropagation(),b())},e[24]=b,e[25]=Z,e[26]=U):(Z=e[25],U=e[26]);let W;e[27]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(Ze,{size:16}),e[27]=W):W=e[27];let P;e[28]!==q||e[29]!==K||e[30]!==Z||e[31]!==U?(P=n.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":q,title:K,onClick:Z,onKeyDown:U,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:W}),e[28]=q,e[29]=K,e[30]=Z,e[31]=U,e[32]=P):P=e[32];let G;e[33]!==h||e[34]!==I||e[35]!==E||e[36]!==F||e[37]!==M||e[38]!==P||e[39]!==_?(G=n.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":h,onClick:j,className:_,children:[I,E,F,M,P]}),e[33]=h,e[34]=I,e[35]=E,e[36]=F,e[37]=M,e[38]=P,e[39]=_,e[40]=G):G=e[40];const ne=h?"1fr":"0fr";let H;e[41]!==ne?(H={display:"grid",gridTemplateRows:ne,transition:`grid-template-rows 180ms ${Qe}`},e[41]=ne,e[42]=H):H=e[42];let re;e[43]===Symbol.for("react.memo_cache_sentinel")?(re={overflow:"hidden",minHeight:0},e[43]=re):re=e[43];const S=h?1:0;let O;e[44]!==S?(O={opacity:S,transition:`opacity 120ms ${Qe}`,maxHeight:"60vh"},e[44]=S,e[45]=O):O=e[45];let J;e[46]!==i?(J=i?n.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:n.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:i})}):n.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=i,e[47]=J):J=e[47];let $;e[48]!==V||e[49]!==i?($=V?n.jsx("div",{className:B("pb-4",!i&&"pt-4"),children:V}):null,e[48]=V,e[49]=i,e[50]=$):$=e[50];let ee;e[51]!==J||e[52]!==$?(ee=n.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[J,$]}),e[51]=J,e[52]=$,e[53]=ee):ee=e[53];let ie;e[54]!==r||e[55]!==l?(ie=r||l?n.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{children:r}),n.jsx("div",{className:"flex items-center gap-2",children:l})]})}):null,e[54]=r,e[55]=l,e[56]=ie):ie=e[56];let ce;e[57]!==O||e[58]!==ee||e[59]!==ie?(ce=n.jsx("div",{style:re,children:n.jsxs("div",{className:"flex flex-col",style:O,children:[ee,ie]})}),e[57]=O,e[58]=ee,e[59]=ie,e[60]=ce):ce=e[60];let ae;e[61]!==H||e[62]!==ce?(ae=n.jsx("div",{"data-testid":"collapsible-highlight-body",style:H,children:ce}),e[61]=H,e[62]=ce,e[63]=ae):ae=e[63];let pe;return e[64]!==G||e[65]!==ae||e[66]!==k||e[67]!==p?(pe=n.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":p,className:k,children:[G,ae]}),e[64]=G,e[65]=ae,e[66]=k,e[67]=p,e[68]=pe):pe=e[68],pe}function To(t){return!t}const _o=oe({content:te().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:Re(["pending","in_progress","completed"]),activeForm:te().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),Gt=oe({todos:Dt(_o)}),Do="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";An({description:Do,inputSchema:yn(Gt),execute:async({todos:t})=>({ok:!0,count:t.length})});const Mo="tool-todo_write",Po=new Set(["input-available","output-available"]);function Eo(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.role!=="assistant")continue;const o=s.parts;if(Array.isArray(o))for(let a=o.length-1;a>=0;a--){const i=o[a];if(i.type!==Mo||typeof i.state!="string"||!Po.has(i.state))continue;const r=Gt.safeParse(i.input);if(r.success)return r.data.todos}}return[]}function Ht(t){const e=[];for(const s of t)if("state"in s&&s.state==="approval-requested"&&"approval"in s&&s.approval?.id&&"toolCallId"in s&&s.toolCallId){const o="toolName"in s&&typeof s.toolName=="string"?s.toolName:s.type.startsWith("tool-")?s.type.replace("tool-",""):"Tool";e.push({approvalId:s.approval.id,toolCallId:s.toolCallId,toolName:o,friendlyName:oo(to(o)),input:s.input})}return e}function Jt(t){return t.at(-1)}function Zt(t){const e=[];for(const s of t)s.type==="tool-propose_plan"&&s.state==="input-available"&&e.push({toolCallId:s.toolCallId,plan:s.input.plan,state:s.state});return e}function Ro(t){return t?t.message.startsWith("[CREDITS]"):!1}const Uo={isCreditExhausted:!1,planRefusal:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,hasTaskSuggestion:!1,todos:[]};function Fo(t){const{messages:e,error:s,finishReason:o,isStreaming:a,isWaitingForApprovals:i}=t;if(!a&&s&&Ro(s))return{...Uo,isCreditExhausted:!0};const r=e.at(-1),l=r?.role==="assistant"?r.parts:[],V=l,u=!!V.filter(A=>A.type==="tool-user_ask").filter(A=>A.state!=="output-available").length,c=V.some(Et),p=Zt(l),f=Ht(V),h=Eo(e),m=a?null:jn(s),g=!a&&!!s&&!m,v=f.length>0||a&&i,x=p.length>0,y=!a&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(u||v||x||c))&&!g;return{isCreditExhausted:!1,planRefusal:m,hasTodos:h.length>0,showError:g,showWarning:y,hasApprovals:v,hasPlans:x,isWaitingForUserInput:u,hasTaskSuggestion:c,todos:h}}function Xt(){const t=D.c(6),{messages:e,error:s,finishReason:o,isStreaming:a,isWaitingForApprovals:i}=Ue(),r=s??null,l=o??null;let V;return t[0]!==a||t[1]!==i||t[2]!==e||t[3]!==r||t[4]!==l?(V=Fo({messages:e,error:r,finishReason:l,isStreaming:a,isWaitingForApprovals:i}),t[0]=a,t[1]=i,t[2]=e,t[3]=r,t[4]=l,t[5]=V):V=t[5],V}function ir(){const t=Xt(),e=qe("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)+Number(t.hasTaskSuggestion)}const yt="start-task",Oo=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/openai-conversation-zvFqUh2z.js","assets/index-CSIpvoWn.js","assets/index-CKEKSTrk.css","assets/usage-stats-8fBPxKmN.js","assets/tool-namespace-BPtJyOTH.js","assets/form-dOKUm1o9.js","assets/label-ceAH5i3J.js","assets/utils-CVEq3hMx.js","assets/markdown-R4HS4rag.js","assets/use-copy-B7Ns5hk7.js","assets/agent-icon-DKTp0XyY.js","assets/AlertCircle-DSTgjQZE.js","assets/Tool01-U3lMqDqt.js","assets/ArrowUp-BNjQS3K-.js","assets/ArrowLeft-ENfdZA7-.js","assets/LinkBroken01-DWhYckSm.js","assets/ShoppingBag01-CsD1bZL0.js","assets/Globe04-cXNn3Iwb.js","assets/CheckCircle-B5oyaJit.js","assets/ChevronUp-CWpA2uR_.js","assets/ChevronSelectorVertical-D9X2NrqX.js","assets/UserSquare-BItoQb26.js","assets/CreditCard01-DUDVRgSi.js","assets/SwitchHorizontal01-omZLJ9y8.js","assets/Key01-DykOvg3J.js","assets/Minus-DD8EF-Qg.js","assets/Monitor01-Brx479PM.js","assets/Sun-qBi61vDS.js","assets/Play-Cnv-o711.js","assets/Plus-Cyljarjx.js","assets/SearchMd-B8lLWvFT.js","assets/Trash01-BbqimkDt.js","assets/Upload01-CKgAWfXR.js","assets/Users01-C6CsMI-H.js","assets/XClose-B0OqPlIT.js","assets/Zap-FLVG2fHK.js","assets/chat-context-B8Z5vGcJ.js","assets/autosend-BWmOY3ov.js","assets/thread-route-gjL8sFh9.js","assets/use-project-scope-D-D3vFqs.js","assets/repository-binding-lATwNZrT.js","assets/use-mcp-client-C6kW4vbD.js","assets/auth-I4p8-ocC.js","assets/thread-intent-BirCtYTn.js","assets/delay-CnY5UFtP.js","assets/watch-sse-pool-D6Aszef8.js","assets/task-board-DSsXkzaF.js","assets/schema-CYb0A5pZ.js","assets/use-entitlements-BIn3vhw_.js","assets/use-ai-providers-CGSjFpU8.js","assets/use-decopilot-events-MFonZFqV.js","assets/use-organization-settings-BTar9wUH.js","assets/use-mobile-Dl5gc-ru.js","assets/tooltip-BS3U7s1j.js","assets/index-e0iOUxAj.js","assets/icon-button-CL44LV6o.js","assets/file-type-icon-C_NX_6K0.js","assets/chat-draft-DkEn0tls.js","assets/use-voice-input-B9rrFwaR.js","assets/popover-DvNPDyrT.js","assets/drawer-C6lamT3y.js","assets/index-CmbhAzcu.js","assets/checkbox-BprzbiMO.js","assets/select-5VAmllhJ.js","assets/index-BdQq_4o_.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/tabs-Cv20SIqi.js","assets/active-indicator-CCMhAsc_.js","assets/use-deco-credits-D7cUDa9s.js","assets/toggle-group-BkFB4B6f.js","assets/input-BX4MndAE.js","assets/suggestion-D3ekTtHr.js","assets/use-mcp-prompts-CjpO3wzS.js","assets/use-org-fs-BGMZPpcx.js","assets/useInfiniteQuery-Bh3c89Tr.js","assets/infiniteQueryObserver-CgO-7OwI.js","assets/question-004-sINsf4GQ.js","assets/feature-paywall-7RP1Qwpl.js","assets/plan-ladder-DexOsahh.js","assets/add-connection-dialog-CUGt2QIL.js","assets/collection-search-Bhx5TJ6L.js","assets/extract-connection-data-C8qmylg2.js","assets/metadata-D72DunRR.js","assets/connection-DG7KBlix.js","assets/url-slug-BOoM9-0A.js","assets/connection-card-qG0EXE1L.js","assets/connection-slug-BoBDHMu2.js","assets/integration-icon-dTPy2b7i.js","assets/textarea-jvxCA8mN.js","assets/use-connection-Br1r8foQ.js","assets/schema-oSx50TOf.js","assets/connection-form-helpers-Ce5Bf_zZ.js","assets/authenticate-and-persist-oauth-NcJzMudq.js","assets/mcp-oauth-B9XClwsH.js","assets/mcp-oauth-BD1gbmnp.js","assets/collection-tabs-QO8RS8bh.js","assets/badge-DStDMa4b.js","assets/use-infinite-scroll-DIKScsa1.js","assets/useSuspenseInfiniteQuery-bp-UKwHD.js","assets/use-task-board-events-sZpvmMHd.js","assets/use-chat-layout-state-VEEgw78z.js"])))=>i.map(i=>d[i]);
2
+ import{bl as Ee,c as D,b as Q,r as R,m as B,j as n,b2 as Ze,aF as oe,ba as Dt,aG as te,cU as Re,B as Y,aE as gs,aD as xs,e3 as vs,cT as bs,J as we,c7 as As,g0 as ke,g1 as ut,d9 as ys,ak as js,e as ks,I as ws,t as Ie,E as X,a5 as Te,d as Xe,bx as Mt,x as Cs,aT as Ss,w as Ns,v as Is,D as Ts,eP as _s,a6 as Ds,K as Ms,i as Ps,_ as Es,X as Rs,Z as Us,Y as be,ap as pt,an as ht,ao as ft,h as Fs,bd as Os,bb as Ls,aC as zs,as as Bs,e2 as $s,e7 as Ae,b4 as qs,e9 as Ks,b9 as mt,g2 as Qs,a as Ys,ar as Ws,at as Gs,aS as We,fd as Hs,o as Js,c_ as Zs,aY as Xs,a_ as en,ag as Pt}from"./index-CSIpvoWn.js";import{i as Et,c as tn,e as sn,j as Rt,P as nn,k as on,S as an}from"./usage-stats-8fBPxKmN.js";import{s as Ut}from"./XClose-B0OqPlIT.js";import{I as rn}from"./icon-button-CL44LV6o.js";import{F as ln}from"./file-type-icon-C_NX_6K0.js";import{b as Ue,I as Vn,J as cn,c as et,d as tt,q as dn,K as un,M as pn,N as hn,u as Ft,f as fn,s as mn,e as gn}from"./chat-context-B8Z5vGcJ.js";import{u as xn}from"./repository-binding-lATwNZrT.js";import{A as vn,w as bn}from"./autosend-BWmOY3ov.js";import{t as An,z as yn,q as jn,c as kn,w as wn,h as Cn}from"./thread-intent-BirCtYTn.js";import{r as gt,i as Sn,c as Nn,w as In,H as Tn}from"./chat-draft-DkEn0tls.js";import{u as _n,a as Dn,T as Mn}from"./use-voice-input-B9rrFwaR.js";import{i as Ot}from"./LinkBroken01-DWhYckSm.js";import{i as Lt}from"./ArrowUp-BNjQS3K-.js";import{n as zt}from"./ShoppingBag01-CsD1bZL0.js";import{t as $e,aR as Bt,a3 as $t,aQ as Ge,g as Pn,e as En,aW as Rn,aC as qt,aX as Kt,aU as Un,Y as Fn,aY as On}from"./agent-icon-DKTp0XyY.js";import{b as Qt}from"./Tool01-U3lMqDqt.js";import{h as Ln}from"./UserSquare-BItoQb26.js";import{i as zn}from"./Upload01-CKgAWfXR.js";import{i as Bn}from"./AlertCircle-DSTgjQZE.js";import{a as He,b as st,d as nt,f as ot,F as Yt}from"./form-dOKUm1o9.js";import{c as $n,S as qn,b as Kn,a as Qn,d as Yn}from"./select-5VAmllhJ.js";import{t as Wn}from"./ChevronUp-CWpA2uR_.js";import{T as at,a as it,c as rt}from"./tooltip-BS3U7s1j.js";import{i as Gn}from"./ArrowLeft-ENfdZA7-.js";import{b as Hn,c as Jn}from"./tabs-Cv20SIqi.js";import{d as qe,f as Zn}from"./use-entitlements-BIn3vhw_.js";import{u as Xn}from"./use-deco-credits-D7cUDa9s.js";import{T as xt,a as eo}from"./toggle-group-BkFB4B6f.js";import{a as to,d as so,g as vt,s as no}from"./tool-namespace-BPtJyOTH.js";import{t as oo}from"./utils-CVEq3hMx.js";import{m as lt,g as ao,b as io}from"./index-CmbhAzcu.js";import{p as Wt,u as ro,T as lo,a as Vo,U as co}from"./input-BX4MndAE.js";import{a as uo}from"./use-mcp-client-C6kW4vbD.js";import{l as po,g as ho}from"./use-mcp-prompts-CjpO3wzS.js";import{s as bt}from"./Plus-Cyljarjx.js";import"./suggestion-D3ekTtHr.js";import{p as fo,q as mo}from"./question-004-sINsf4GQ.js";import{F as At}from"./feature-paywall-7RP1Qwpl.js";import{A as go}from"./add-connection-dialog-CUGt2QIL.js";import{a as xo}from"./use-organization-settings-BTar9wUH.js";import{u as vo}from"./use-task-board-events-sZpvmMHd.js";import{u as bo}from"./use-mobile-Dl5gc-ru.js";import{r as Ao}from"./use-chat-layout-state-VEEgw78z.js";const yo=Ee("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);const jo=Ee("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);const ko=Ee("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const wo=Ee("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);const Co=Ee("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),Qe="cubic-bezier(0.645, 0.045, 0.355, 1)",ar=44,So={default:"",error:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-destructive/5 after:pointer-events-none after:-z-10",warning:"isolate after:content-[''] after:absolute after:inset-0 after:rounded-xl after:bg-warning/5 after:pointer-events-none after:-z-10"},No={default:"border-border",error:"border-destructive/30",warning:"border-warning/30"},Io={default:"text-muted-foreground",error:"text-destructive",warning:"text-warning"};function xe(t){const e=D.c(69),{icon:s,label:o,count:a,title:i,footerLeft:r,footerRight:l,children:V,defaultExpanded:d,variant:u,onClose:c}=t,p=u===void 0?"default":u,f=Q(),[h,m]=R.useState(d),[g,v]=R.useState(!1);let x;e[0]!==c?(x=()=>{v(!0),c?.()},e[0]=c,e[1]=x):x=e[1];const b=x;if(g)return null;const y=No[p],A=So[p];let k;e[2]!==y||e[3]!==A?(k=B("relative flex flex-col rounded-xl bg-background border shadow-soft","w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",y,A),e[2]=y,e[3]=A,e[4]=k):k=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=()=>m(To),e[5]=j):j=e[5];const w=h&&"rounded-b-none",C=!h&&"rounded-b-xl";let _;e[6]!==w||e[7]!==C?(_=B("flex items-center gap-2 w-full px-3 py-2 text-sm text-left","hover:bg-accent transition-colors rounded-t-xl",w,C),e[6]=w,e[7]=C,e[8]=_):_=e[8];const N=Io[p];let T;e[9]!==N?(T=B("shrink-0",N),e[9]=N,e[10]=T):T=e[10];let I;e[11]!==s||e[12]!==T?(I=n.jsx("span",{className:T,children:s}),e[11]=s,e[12]=T,e[13]=I):I=e[13];let E;e[14]!==o?(E=n.jsx("span",{className:"flex-1 min-w-0 truncate",children:o}),e[14]=o,e[15]=E):E=e[15];let F;e[16]!==a?(F=a?n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:a}):null,e[16]=a,e[17]=F):F=e[17];const L=h?"rotate(180deg)":"rotate(0deg)";let M;e[18]!==L?(M=n.jsx("span",{"aria-hidden":"true",className:"text-muted-foreground shrink-0 flex items-center justify-center",children:n.jsx(Wn,{size:16,style:{transform:L,transition:`transform 180ms ${Qe}`}})}),e[18]=L,e[19]=M):M=e[19];let q;e[20]!==f?(q=f("chat.collapsibleHighlight.closeLabel"),e[20]=f,e[21]=q):q=e[21];let K;e[22]!==f?(K=f("chat.collapsibleHighlight.closeTitle"),e[22]=f,e[23]=K):K=e[23];let Z,U;e[24]!==b?(Z=Ve=>{Ve.stopPropagation(),b()},U=Ve=>{(Ve.key==="Enter"||Ve.key===" ")&&(Ve.preventDefault(),Ve.stopPropagation(),b())},e[24]=b,e[25]=Z,e[26]=U):(Z=e[25],U=e[26]);let W;e[27]===Symbol.for("react.memo_cache_sentinel")?(W=n.jsx(Ze,{size:16}),e[27]=W):W=e[27];let P;e[28]!==q||e[29]!==K||e[30]!==Z||e[31]!==U?(P=n.jsx("span",{role:"button",tabIndex:0,"data-testid":"collapsible-highlight-close","aria-label":q,title:K,onClick:Z,onKeyDown:U,className:"text-muted-foreground hover:text-foreground transition-colors shrink-0 flex items-center justify-center -mr-1 ml-1 p-1 rounded-md hover:bg-accent",children:W}),e[28]=q,e[29]=K,e[30]=Z,e[31]=U,e[32]=P):P=e[32];let G;e[33]!==h||e[34]!==I||e[35]!==E||e[36]!==F||e[37]!==M||e[38]!==P||e[39]!==_?(G=n.jsxs("button",{type:"button","data-testid":"collapsible-highlight-chip","aria-expanded":h,onClick:j,className:_,children:[I,E,F,M,P]}),e[33]=h,e[34]=I,e[35]=E,e[36]=F,e[37]=M,e[38]=P,e[39]=_,e[40]=G):G=e[40];const ne=h?"1fr":"0fr";let H;e[41]!==ne?(H={display:"grid",gridTemplateRows:ne,transition:`grid-template-rows 180ms ${Qe}`},e[41]=ne,e[42]=H):H=e[42];let re;e[43]===Symbol.for("react.memo_cache_sentinel")?(re={overflow:"hidden",minHeight:0},e[43]=re):re=e[43];const S=h?1:0;let O;e[44]!==S?(O={opacity:S,transition:`opacity 120ms ${Qe}`,maxHeight:"60vh"},e[44]=S,e[45]=O):O=e[45];let J;e[46]!==i?(J=i?n.jsx("div",{className:"flex items-start gap-2 px-4 pt-4 pb-5 border-t border-dashed border-border/60",children:n.jsx("p",{className:"flex-1 text-base font-medium text-foreground min-w-0",children:i})}):n.jsx("div",{className:"border-t border-dashed border-border/60"}),e[46]=i,e[47]=J):J=e[47];let $;e[48]!==V||e[49]!==i?($=V?n.jsx("div",{className:B("pb-4",!i&&"pt-4"),children:V}):null,e[48]=V,e[49]=i,e[50]=$):$=e[50];let ee;e[51]!==J||e[52]!==$?(ee=n.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[J,$]}),e[51]=J,e[52]=$,e[53]=ee):ee=e[53];let ie;e[54]!==r||e[55]!==l?(ie=r||l?n.jsx("div",{className:"shrink-0 border-t border-border px-3 py-3 pb-6",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{children:r}),n.jsx("div",{className:"flex items-center gap-2",children:l})]})}):null,e[54]=r,e[55]=l,e[56]=ie):ie=e[56];let ce;e[57]!==O||e[58]!==ee||e[59]!==ie?(ce=n.jsx("div",{style:re,children:n.jsxs("div",{className:"flex flex-col",style:O,children:[ee,ie]})}),e[57]=O,e[58]=ee,e[59]=ie,e[60]=ce):ce=e[60];let ae;e[61]!==H||e[62]!==ce?(ae=n.jsx("div",{"data-testid":"collapsible-highlight-body",style:H,children:ce}),e[61]=H,e[62]=ce,e[63]=ae):ae=e[63];let pe;return e[64]!==G||e[65]!==ae||e[66]!==k||e[67]!==p?(pe=n.jsxs("div",{"data-testid":"collapsible-highlight","data-variant":p,className:k,children:[G,ae]}),e[64]=G,e[65]=ae,e[66]=k,e[67]=p,e[68]=pe):pe=e[68],pe}function To(t){return!t}const _o=oe({content:te().min(1).describe("Imperative form, e.g. 'Implement the login flow'"),status:Re(["pending","in_progress","completed"]),activeForm:te().min(1).describe("Present-continuous form shown in the UI while the todo is in progress, e.g. 'Implementing the login flow'")}),Gt=oe({todos:Dt(_o)}),Do="Plan and track multi-step work. Call with the FULL todo list every time — this replaces the prior list. Call at the start of every multi-step request. Skip only for true one-shots (a single tool call or a direct answer). Mark exactly one todo `in_progress` at a time. Flip a todo to `in_progress` before starting it and to `completed` the moment it finishes — do not batch completions. Your prior tool-call inputs are your current state — read your last call to see where you are.";An({description:Do,inputSchema:yn(Gt),execute:async({todos:t})=>({ok:!0,count:t.length})});const Mo="tool-todo_write",Po=new Set(["input-available","output-available"]);function Eo(t){for(let e=t.length-1;e>=0;e--){const s=t[e];if(s.role!=="assistant")continue;const o=s.parts;if(Array.isArray(o))for(let a=o.length-1;a>=0;a--){const i=o[a];if(i.type!==Mo||typeof i.state!="string"||!Po.has(i.state))continue;const r=Gt.safeParse(i.input);if(r.success)return r.data.todos}}return[]}function Ht(t){const e=[];for(const s of t)if("state"in s&&s.state==="approval-requested"&&"approval"in s&&s.approval?.id&&"toolCallId"in s&&s.toolCallId){const o="toolName"in s&&typeof s.toolName=="string"?s.toolName:s.type.startsWith("tool-")?s.type.replace("tool-",""):"Tool";e.push({approvalId:s.approval.id,toolCallId:s.toolCallId,toolName:o,friendlyName:oo(to(o)),input:s.input})}return e}function Jt(t){return t.at(-1)}function Zt(t){const e=[];for(const s of t)s.type==="tool-propose_plan"&&s.state==="input-available"&&e.push({toolCallId:s.toolCallId,plan:s.input.plan,state:s.state});return e}function Ro(t){return t?t.message.startsWith("[CREDITS]"):!1}const Uo={isCreditExhausted:!1,planRefusal:null,hasTodos:!1,showError:!1,showWarning:!1,hasApprovals:!1,hasPlans:!1,isWaitingForUserInput:!1,hasTaskSuggestion:!1,todos:[]};function Fo(t){const{messages:e,error:s,finishReason:o,isStreaming:a,isWaitingForApprovals:i}=t;if(!a&&s&&Ro(s))return{...Uo,isCreditExhausted:!0};const r=e.at(-1),l=r?.role==="assistant"?r.parts:[],V=l,u=!!V.filter(A=>A.type==="tool-user_ask").filter(A=>A.state!=="output-available").length,c=V.some(Et),p=Zt(l),f=Ht(V),h=Eo(e),m=a?null:jn(s),g=!a&&!!s&&!m,v=f.length>0||a&&i,x=p.length>0,y=!a&&!!o&&o!=="stop"&&!(o==="tool-calls"&&(u||v||x||c))&&!g;return{isCreditExhausted:!1,planRefusal:m,hasTodos:h.length>0,showError:g,showWarning:y,hasApprovals:v,hasPlans:x,isWaitingForUserInput:u,hasTaskSuggestion:c,todos:h}}function Xt(){const t=D.c(6),{messages:e,error:s,finishReason:o,isStreaming:a,isWaitingForApprovals:i}=Ue(),r=s??null,l=o??null;let V;return t[0]!==a||t[1]!==i||t[2]!==e||t[3]!==r||t[4]!==l?(V=Fo({messages:e,error:r,finishReason:l,isStreaming:a,isWaitingForApprovals:i}),t[0]=a,t[1]=i,t[2]=e,t[3]=r,t[4]=l,t[5]=V):V=t[5],V}function ir(){const t=Xt(),e=qe("credits");return t.isCreditExhausted?e?0:1:Number(t.hasTodos)+Number(t.showError)+ +!!t.planRefusal+Number(t.showWarning)+Number(t.hasApprovals)+Number(t.hasPlans)+Number(t.isWaitingForUserInput)+Number(t.hasTaskSuggestion)}const yt="start-task",Oo=`Turn the report below into a running task. The user pressed "Start task", which authorizes delegation.
3
3
 
4
4
  1. Read the report and any attached screenshots. Carry the reporter's own words into the task description, plus the URL of any attachment.
5
5
  2. Call TASK_BOARD_ITEM_LIST. Its \`repos\` are this organization's repositories — the only valid values for a task's repo, so pick the one the report is about and never invent a name.
6
6
  3. Call TASK_BOARD_ITEM_CREATE with a concise title, the full description, the chosen repo as owner/name, assigneeId "super-agent", and onDuplicate "return_existing". That assignment is what queues the work; the duplicate option makes the tool hand back an existing task when one already covers this report instead of opening a second one.
7
7
  4. Reply with the task key the tool returned (e.g. DECO-144) and one line on what you filed. If the output says \`deduplicated: true\`, say the report was already tracked by that task and quote its \`duplicateReason\`. Never invent a URL. Do NOT implement the fix here; the task's own run does that, and the reporter gets an email when its PR is ready for review.
8
8
 
9
- The report follows.`;function Lo(t){return{...t,content:[{type:"paragraph",content:[tn({id:yt,name:yt,char:"/",kind:"prompt",metadata:[{role:"user",content:{type:"text",text:Oo}}]})]},...t.content??[]]}}function zo(){const t=D.c(24),e=Q(),s=Vn();if(!s)return null;let o,a,i,r;t[0]!==s.path||t[1]!==e?(o=cn(s.path),r="flex px-3 pt-3",a="surface-inset flex h-7 min-w-0 items-center gap-1.5 rounded-full pr-0.5 pl-2.5 text-xs text-foreground",i=e("chat.input.openFileContext",{name:o}),t[0]=s.path,t[1]=e,t[2]=o,t[3]=a,t[4]=i,t[5]=r):(o=t[2],a=t[3],i=t[4],r=t[5]);let l,V;t[6]!==o?(l=n.jsx(ln,{filename:o,className:"h-4 w-3 shrink-0"}),V=n.jsx("span",{className:"truncate",children:o}),t[6]=o,t[7]=l,t[8]=V):(l=t[7],V=t[8]);let d;t[9]!==e?(d=e("chat.input.openFileDismiss"),t[9]=e,t[10]=d):d=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Ut,{size:12}),t[11]=u):u=t[11];let c;t[12]!==s.dismiss||t[13]!==d?(c=n.jsx(rn,{label:d,size:"icon-sm",onClick:s.dismiss,children:u}),t[12]=s.dismiss,t[13]=d,t[14]=c):c=t[14];let p;t[15]!==a||t[16]!==i||t[17]!==l||t[18]!==V||t[19]!==c?(p=n.jsxs("span",{className:a,title:i,children:[l,V,c]}),t[15]=a,t[16]=i,t[17]=l,t[18]=V,t[19]=c,t[20]=p):p=t[20];let f;return t[21]!==r||t[22]!==p?(f=n.jsx("div",{className:r,children:p}),t[21]=r,t[22]=p,t[23]=f):f=t[23],f}function Bo(t){return{autosend:vn,sidepanel:!0,...t?{mainpanel:!1}:{}}}function $o(t){const e=D.c(30),{current:s,total:o,onPrev:a,onNext:i}=t,r=Q();if(o<=1)return null;const l=s===0,V=s===0?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let d;e[0]!==V?(d=B("p-0.5 transition-colors rounded-lg",V),e[0]=V,e[1]=d):d=e[1];let u;e[2]!==r?(u=r("chat.pagination.previousLabel"),e[2]=r,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Gn,{size:14}),e[4]=c):c=e[4];let p;e[5]!==a||e[6]!==l||e[7]!==d||e[8]!==u?(p=n.jsx("button",{type:"button",onClick:a,disabled:l,className:d,"aria-label":u,children:c}),e[5]=a,e[6]=l,e[7]=d,e[8]=u,e[9]=p):p=e[9];const f=s+1;let h;e[10]!==r||e[11]!==f||e[12]!==o?(h=r("chat.pagination.counter",{current:f,total:o}),e[10]=r,e[11]=f,e[12]=o,e[13]=h):h=e[13];let m;e[14]!==h?(m=n.jsx("span",{className:"tabular-nums text-xs",children:h}),e[14]=h,e[15]=m):m=e[15];const g=s===o-1,v=s===o-1?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let x;e[16]!==v?(x=B("p-0.5 transition-colors rounded-lg",v),e[16]=v,e[17]=x):x=e[17];let b;e[18]!==r?(b=r("chat.pagination.nextLabel"),e[18]=r,e[19]=b):b=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Ot,{size:14}),e[20]=y):y=e[20];let A;e[21]!==i||e[22]!==g||e[23]!==x||e[24]!==b?(A=n.jsx("button",{type:"button",onClick:i,disabled:g,className:x,"aria-label":b,children:y}),e[21]=i,e[22]=g,e[23]=x,e[24]=b,e[25]=A):A=e[25];let k;return e[26]!==A||e[27]!==p||e[28]!==m?(k=n.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p,m,A]}),e[26]=A,e[27]=p,e[28]=m,e[29]=k):k=e[29],k}function es(t){const e=D.c(8),{currentIndex:s,total:o,onPrev:a,onNext:i,extraLeft:r}=t;let l;e[0]!==s||e[1]!==i||e[2]!==a||e[3]!==o?(l=n.jsx($o,{current:s,total:o,onPrev:a,onNext:i}),e[0]=s,e[1]=i,e[2]=a,e[3]=o,e[4]=l):l=e[4];let V;return e[5]!==r||e[6]!==l?(V=n.jsxs("div",{className:"flex items-center gap-2",children:[l,r]}),e[5]=r,e[6]=l,e[7]=V):V=e[7],V}function qo(t){const e=D.c(17),{isStreaming:s,isAllAnswered:o,isCurrentAnswered:a,onAdvanceOrSubmit:i,submitLabel:r,nextLabel:l}=t,u=o?r===void 0?"Submit":r:l===void 0?"Next":l,c=o?s:!a,p=c?o?"Waiting for the assistant to finish…":"Answer this item to continue":null;let f;e[0]!==c||e[1]!==i?(f=()=>{c||i()},e[0]=c,e[1]=i,e[2]=f):f=e[2];const h=c&&"opacity-50 cursor-not-allowed";let m;e[3]!==h?(m=B("h-7 px-2.5 text-xs",h),e[3]=h,e[4]=m):m=e[4];let g;e[5]!==c||e[6]!==u||e[7]!==f||e[8]!==m?(g=n.jsx(Y,{type:"button",size:"sm","aria-disabled":c,onClick:f,className:m,children:u}),e[5]=c,e[6]=u,e[7]=f,e[8]=m,e[9]=g):g=e[9];const v=g;if(!p)return v;let x;e[10]!==v?(x=n.jsx(at,{asChild:!0,children:v}),e[10]=v,e[11]=x):x=e[11];let b;e[12]!==p?(b=n.jsx(it,{children:p}),e[12]=p,e[13]=b):b=e[13];let y;return e[14]!==x||e[15]!==b?(y=n.jsxs(rt,{children:[x,b]}),e[14]=x,e[15]=b,e[16]=y):y=e[16],y}function ts(t,e,s){return t.findIndex(o=>e(o)===s)}function jt(t,e,s,o){return t.length===0?!1:t.every(a=>o(s[e(a)]))}function kt(t,e,s,o,a){if(t.length===0)return null;const i=ts(t,e,a);for(let r=1;r<=t.length;r++){const l=t[(i+r)%t.length];if(!l)continue;const V=e(l);if(V!==a&&!o(s[V]))return V}return null}function Ko(t){return!t.isStreaming&&t.allAnswered}function ss(t){const{parts:e,partKey:s,schema:o,defaultValues:a,isStreaming:i,hasAnswer:r,onSubmit:l}=t,V=e[0]?s(e[0]):"",[d,u]=R.useState(V),[c,p]=R.useState(!1),f=gs({resolver:xs(o),defaultValues:a}),h=f.watch(),m=ts(e,s,d),g=m>=0?e[m]:void 0,v=r(h[d]),x=jt(e,s,h,r),b=Ko({isStreaming:i,allAnswered:x}),y=()=>{if(m>0){const N=e[m-1];N&&u(s(N))}},A=()=>{if(m>=0&&m<e.length-1){const N=e[m+1];N&&u(s(N))}},k=()=>{const N=f.getValues(),T=kt(e,s,N,r,d);T&&u(T)},j=()=>{f.handleSubmit(N=>{const T=N;for(const I of e)l(I,T[s(I)])})()},w=R.useRef(j);w.current=j;const C=()=>{b&&(p(!1),w.current())},_=()=>{const N=f.getValues();if(jt(e,s,N,r)){if(i){p(!0);return}p(!1),w.current()}else{const T=kt(e,s,N,r,d);T&&u(T)}};return R.useEffect(()=>{if(c&&!i){if(!x){p(!1);return}p(!1),w.current()}},[c,i,x]),{form:f,activeKey:d,setActiveKey:u,currentIndex:m,currentPart:g,isCurrentAnswered:v,isAllAnswered:x,canSubmit:b,goPrev:y,goNext:A,advanceToNextUnanswered:k,submit:C,submitOrAdvance:_}}const ns="chat.approval.defaultDenyReason";function os(t){const e=D.c(36),{onYolo:s}=t,o=Q(),[a,i]=we();let r,l,V,d,u,c,p,f,h;if(e[0]!==s||e[1]!==a||e[2]!==i||e[3]!==o){const y=ke.find(j=>j.value===a.toolApprovalLevel)??ke[0];let A;e[13]!==s||e[14]!==a||e[15]!==i?(A=j=>{const w=j,C=a.toolApprovalLevel??"readonly";i({...a,toolApprovalLevel:w}),w==="auto"&&s(C)},e[13]=s,e[14]=a,e[15]=i,e[16]=A):A=e[16];const k=A;V=qn,f=a.toolApprovalLevel,h=k,l=Kn,u="xs",c="text-xs text-muted-foreground border-border/60 bg-transparent hover:bg-accent h-7 gap-1",p=Qo,r=Qn,d=o(y.shortKey),e[0]=s,e[1]=a,e[2]=i,e[3]=o,e[4]=r,e[5]=l,e[6]=V,e[7]=d,e[8]=u,e[9]=c,e[10]=p,e[11]=f,e[12]=h}else r=e[4],l=e[5],V=e[6],d=e[7],u=e[8],c=e[9],p=e[10],f=e[11],h=e[12];let m;e[17]!==r||e[18]!==d?(m=n.jsx(r,{children:d}),e[17]=r,e[18]=d,e[19]=m):m=e[19];let g;e[20]!==l||e[21]!==u||e[22]!==c||e[23]!==p||e[24]!==m?(g=n.jsx(l,{size:u,className:c,onClick:p,children:m}),e[20]=l,e[21]=u,e[22]=c,e[23]=p,e[24]=m,e[25]=g):g=e[25];let v;e[26]!==o?(v=ke.map(y=>n.jsx($n,{value:y.value,children:o(y.labelKey)},y.value)),e[26]=o,e[27]=v):v=e[27];let x;e[28]!==v?(x=n.jsx(Yn,{children:v}),e[28]=v,e[29]=x):x=e[29];let b;return e[30]!==V||e[31]!==x||e[32]!==f||e[33]!==h||e[34]!==g?(b=n.jsxs(V,{value:f,onValueChange:h,children:[g,x]}),e[30]=V,e[31]=x,e[32]=f,e[33]=h,e[34]=g,e[35]=b):b=e[35],b}function Qo(t){return t.stopPropagation()}function as(t){const e=D.c(8),{input:s}=t,o=Q();if(s==null){let r;e[0]!==o?(r=o("chat.approval.noInput"),e[0]=o,e[1]=r):r=e[1];let l;return e[2]!==r?(l=n.jsx("div",{className:"px-4 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=l):l=e[3],l}let a;try{let r;e[4]!==s?(r=JSON.stringify(s,null,2),e[4]=s,e[5]=r):r=e[5],a=r}catch{a=String(s)}let i;return e[6]!==a?(i=n.jsx("div",{className:"px-4",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word max-h-32 overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a})}),e[6]=a,e[7]=i):i=e[7],i}function Yo(t){const e=D.c(38),{approval:s,onRespond:o}=t,a=Q(),[i]=we(),r=i.toolApprovalLevel??"readonly";let l;e[0]!==s.approvalId||e[1]!==r||e[2]!==o||e[3]!==a?(l=()=>o(s.approvalId,!1,a(ns),r),e[0]=s.approvalId,e[1]=r,e[2]=o,e[3]=a,e[4]=l):l=e[4];const V=l;let d;e[5]!==s.approvalId||e[6]!==r||e[7]!==o?(d=()=>o(s.approvalId,!0,void 0,r),e[5]=s.approvalId,e[6]=r,e[7]=o,e[8]=d):d=e[8];const u=d;let c;e[9]!==s.approvalId||e[10]!==o?(c=C=>o(s.approvalId,!0,void 0,C),e[9]=s.approvalId,e[10]=o,e[11]=c):c=e[11];const p=c;let f;e[12]!==p?(f=n.jsx("div",{className:"flex items-center gap-2",children:n.jsx(os,{onYolo:p})}),e[12]=p,e[13]=f):f=e[13];const h=f;let m;e[14]!==a?(m=a("chat.approval.denyButton"),e[14]=a,e[15]=m):m=e[15];let g;e[16]!==V||e[17]!==m?(g=n.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:V,children:m}),e[16]=V,e[17]=m,e[18]=g):g=e[18];let v;e[19]!==a?(v=a("chat.approval.acceptButton"),e[19]=a,e[20]=v):v=e[20];let x;e[21]!==u||e[22]!==v?(x=n.jsx(Y,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs active:scale-[0.97] transition-transform",onClick:u,children:v}),e[21]=u,e[22]=v,e[23]=x):x=e[23];let b;e[24]!==g||e[25]!==x?(b=n.jsxs(n.Fragment,{children:[g,x]}),e[24]=g,e[25]=x,e[26]=b):b=e[26];const y=b;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx($e,{size:14}),e[27]=A):A=e[27];let k;e[28]!==a?(k=a("chat.approval.needsApproval"),e[28]=a,e[29]=k):k=e[29];let j;e[30]!==s.input?(j=n.jsx(as,{input:s.input}),e[30]=s.input,e[31]=j):j=e[31];let w;return e[32]!==s.friendlyName||e[33]!==h||e[34]!==y||e[35]!==k||e[36]!==j?(w=n.jsx(xe,{icon:A,label:k,title:s.friendlyName,defaultExpanded:!0,footerLeft:h,footerRight:y,children:j}),e[32]=s.friendlyName,e[33]=h,e[34]=y,e[35]=k,e[36]=j,e[37]=w):w=e[37],w}const Wo=vs(te(),oe({approved:bs().optional(),levelOverride:Re(["auto","readonly"]).optional()}));function Go(t){const e=D.c(46),{approvals:s,isStreaming:o,onRespond:a}=t,i=Q(),[r]=we(),l=r.toolApprovalLevel??"readonly";let V;e[0]!==s?(V=Object.fromEntries(s.map(Zo)),e[0]=s,e[1]=V):V=e[1];const d=V;let u;e[2]!==l||e[3]!==a||e[4]!==i?(u=(T,I)=>{const E=I;typeof E?.approved=="boolean"&&a(T.approvalId,E.approved,E.approved===!1?i(ns):void 0,E.levelOverride??l)},e[2]=l,e[3]=a,e[4]=i,e[5]=u):u=e[5];let c;e[6]!==s||e[7]!==d||e[8]!==o||e[9]!==u?(c={parts:s,partKey:Jo,schema:Wo,defaultValues:d,isStreaming:o,hasAnswer:Ho,onSubmit:u},e[6]=s,e[7]=d,e[8]=o,e[9]=u,e[10]=c):c=e[10];const p=ss(c);let f;e[11]!==s||e[12]!==p?(f=T=>{p.form.reset(Object.fromEntries(s.map(I=>[I.approvalId,{approved:!0,levelOverride:T}]))),p.submitOrAdvance()},e[11]=s,e[12]=p,e[13]=f):f=e[13];const h=f,m=p.currentPart,g=p.form;let v;e[14]!==p?(v=T=>{T.preventDefault(),p.submit()},e[14]=p,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx($e,{size:14}),e[16]=x):x=e[16];let b;e[17]!==s.length||e[18]!==i?(b=i("chat.approval.batchedLabel",{count:s.length}),e[17]=s.length,e[18]=i,e[19]=b):b=e[19];const y=m?.friendlyName??"";let A;e[20]!==h?(A=n.jsx(os,{onYolo:h}),e[20]=h,e[21]=A):A=e[21];let k;e[22]!==s.length||e[23]!==p.currentIndex||e[24]!==p.goNext||e[25]!==p.goPrev||e[26]!==A?(k=n.jsx(es,{currentIndex:p.currentIndex,total:s.length,onPrev:p.goPrev,onNext:p.goNext,extraLeft:A}),e[22]=s.length,e[23]=p.currentIndex,e[24]=p.goNext,e[25]=p.goPrev,e[26]=A,e[27]=k):k=e[27];let j;e[28]!==m||e[29]!==p.form.control||e[30]!==p.submitOrAdvance?(j=m?n.jsx(Xo,{approvalId:m.approvalId,control:p.form.control,onChange:p.submitOrAdvance}):null,e[28]=m,e[29]=p.form.control,e[30]=p.submitOrAdvance,e[31]=j):j=e[31];let w;e[32]!==m?(w=m?n.jsx(as,{input:m.input}):null,e[32]=m,e[33]=w):w=e[33];let C;e[34]!==k||e[35]!==j||e[36]!==w||e[37]!==b||e[38]!==y?(C=n.jsx(xe,{icon:x,label:b,title:y,defaultExpanded:!0,footerLeft:k,footerRight:j,children:w}),e[34]=k,e[35]=j,e[36]=w,e[37]=b,e[38]=y,e[39]=C):C=e[39];let _;e[40]!==C||e[41]!==v?(_=n.jsx("form",{onSubmit:v,children:C}),e[40]=C,e[41]=v,e[42]=_):_=e[42];let N;return e[43]!==p.form||e[44]!==_?(N=n.jsx(He,{...g,children:_}),e[43]=p.form,e[44]=_,e[45]=N):N=e[45],N}function Ho(t){return typeof t?.approved=="boolean"}function Jo(t){return t.approvalId}function Zo(t){return[t.approvalId,{approved:void 0}]}function Xo(t){const e=D.c(7),{approvalId:s,control:o,onChange:a}=t,i=Q(),r=`${s}.approved`;let l;e[0]!==a||e[1]!==i?(l=d=>{const{field:u}=d,c=u.value===!0,p=u.value===!1;return n.jsxs(n.Fragment,{children:[n.jsx(Y,{type:"button",variant:p?"secondary":"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!1),a()},"aria-pressed":p,children:i("chat.approval.denyButton")}),n.jsx(Y,{type:"button",variant:c?"default":"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!0),a()},"aria-pressed":c,children:i("chat.approval.acceptButton")})]})},e[0]=a,e[1]=i,e[2]=l):l=e[2];let V;return e[3]!==o||e[4]!==r||e[5]!==l?(V=n.jsx(As,{control:o,name:r,render:l}),e[3]=o,e[4]=r,e[5]=l,e[6]=V):V=e[6],V}function ea(){const t=D.c(5),e=Q();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx($e,{className:"size-5 text-muted-foreground animate-pulse motion-reduce:animate-none"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.approval.preparingRequest"),t[1]=e,t[2]=o):o=t[2];let a;return t[3]!==o?(a=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=a):a=t[4],a}function ta(t){const e=D.c(8),{approvals:s,isStreaming:o,onRespond:a}=t;if(o&&s.length===0){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ea,{}),e[0]=r):r=e[0],r}if(s.length===0)return null;if(s.length===1){const r=s[0];if(!r)return null;let l;return e[1]!==a||e[2]!==r?(l=n.jsx(Yo,{approval:r,onRespond:a}),e[1]=a,e[2]=r,e[3]=l):l=e[3],l}let i;return e[4]!==s||e[5]!==o||e[6]!==a?(i=n.jsx(Go,{approvals:s,isStreaming:o,onRespond:a}),e[4]=s,e[5]=o,e[6]=a,e[7]=i):i=e[7],i}function sa(t){const e=D.c(28),{plan:s,onApprove:o,onDismiss:a}=t,i=Q();let r;e[0]!==o||e[1]!==s.plan?(r=()=>{o(s.plan)},e[0]=o,e[1]=s.plan,e[2]=r):r=e[2];const l=r;let V;e[3]!==i?(V=i("chat.proposePlan.keepIterating"),e[3]=i,e[4]=V):V=e[4];let d;e[5]!==a||e[6]!==V?(d=n.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:a,children:V}),e[5]=a,e[6]=V,e[7]=d):d=e[7];let u;e[8]!==i?(u=i("chat.proposePlan.letsGo"),e[8]=i,e[9]=u):u=e[9];let c;e[10]!==l||e[11]!==u?(c=n.jsx(Y,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs bg-special hover:bg-special/90 text-special-foreground active:scale-[0.97] transition-transform",onClick:l,children:u}),e[10]=l,e[11]=u,e[12]=c):c=e[12];let p;e[13]!==d||e[14]!==c?(p=n.jsxs(n.Fragment,{children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15];const f=p;let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Bt,{size:14}),e[16]=h):h=e[16];let m;e[17]!==i?(m=i("chat.proposePlan.planReady"),e[17]=i,e[18]=m):m=e[18];let g;e[19]!==i?(g=i("chat.proposePlan.implementationPlan"),e[19]=i,e[20]=g):g=e[20];let v;e[21]!==s.plan?(v=n.jsx("div",{className:"px-4 max-h-64 overflow-y-auto",children:n.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:n.jsx(sn,{id:"plan-preview",part:{type:"text",text:s.plan}})})}),e[21]=s.plan,e[22]=v):v=e[22];let x;return e[23]!==f||e[24]!==v||e[25]!==m||e[26]!==g?(x=n.jsx(xe,{icon:h,label:m,title:g,defaultExpanded:!0,footerRight:f,children:v}),e[23]=f,e[24]=v,e[25]=m,e[26]=g,e[27]=x):x=e[27],x}function na(t){const e=D.c(6),{plans:s,onApprove:o,onDismiss:a}=t;let i;e[0]!==s?(i=Jt(s),e[0]=s,e[1]=i):i=e[1];const r=i;if(!r)return null;let l;return e[2]!==r||e[3]!==o||e[4]!==a?(l=n.jsx(sa,{plan:r,onApprove:o,onDismiss:a}),e[2]=r,e[3]=o,e[4]=a,e[5]=l):l=e[5],l}function is(t){return t?"response"in t?t.response:t.option??t.draft:""}const wt=oe({response:te().min(1,"Response is required")}),oa=oe({option:te().nullable(),draft:te()}).refine(t=>(t.option??t.draft).length>0,{message:"Please select or enter an option"}),aa=oe({response:Re(["yes","no"])});function ia(t){switch(t.type){case"text":return wt;case"choice":return oa;case"confirm":return aa;default:return wt}}function ra(t){const e={};for(const s of t)e[s.toolCallId]=ia(s.input);return oe(e)}function la(t){const e=D.c(7),{control:s,name:o,placeholder:a}=t,i=Q();let r;e[0]!==a||e[1]!==i?(r=V=>{const{field:d}=V,u=d.value??"";return n.jsxs(st,{children:[n.jsx(nt,{children:n.jsx("div",{className:"px-2",children:n.jsxs("div",{className:"flex items-center gap-3 px-2 py-3 rounded-lg bg-accent/50",children:[n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx($t,{size:16,className:"text-muted-foreground"})}),n.jsx("input",{...d,value:u,type:"text",placeholder:a||i("chat.userAskQuestion.typeResponse"),autoFocus:!0,"aria-label":i("chat.userAskQuestion.textResponseInputAriaLabel"),className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"})]})})}),n.jsx(ot,{})]})},e[0]=a,e[1]=i,e[2]=r):r=e[2];let l;return e[3]!==s||e[4]!==o||e[5]!==r?(l=n.jsx(Yt,{control:s,name:o,render:r}),e[3]=s,e[4]=o,e[5]=r,e[6]=l):l=e[6],l}function rs(t,e){const s=D.c(4);let o,a;s[0]!==t||s[1]!==e?(o=()=>{const i=r=>{if(ys(r.target)||r.metaKey||r.ctrlKey||r.altKey)return;const l=Number.parseInt(r.key,10);l>=1&&l<=t&&(r.preventDefault(),e(l-1))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},a=[t,e],s[0]=t,s[1]=e,s[2]=o,s[3]=a):(o=s[2],a=s[3]),R.useEffect(o,a)}function Va(t){const e=D.c(51),{control:s,name:o,options:a}=t,i=Q(),r=`${o}.option`;let l;e[0]!==s||e[1]!==r?(l={control:s,name:r,defaultValue:null},e[0]=s,e[1]=r,e[2]=l):l=e[2];const{field:V}=ut(l),d=`${o}.draft`;let u;e[3]!==s||e[4]!==d?(u={control:s,name:d,defaultValue:""},e[3]=s,e[4]=d,e[5]=u):u=e[5];const{field:c}=ut(u),p=V.value,f=c.value??"";let h;if(e[6]!==V||e[7]!==a?(h=L=>{const M=a[L];M!=null&&V.onChange(M)},e[6]=V,e[7]=a,e[8]=h):h=e[8],rs(a.length,h),a.length===0)return null;const m=p===null;let g;e[9]!==i?(g=i("chat.userAskQuestion.choiceOptionsAriaLabel"),e[9]=i,e[10]=g):g=e[10];let v;if(e[11]!==V||e[12]!==p||e[13]!==a||e[14]!==i){let L;e[16]!==V||e[17]!==p||e[18]!==i?(L=(M,q)=>{const K=p===M;return n.jsxs("button",{type:"button",onClick:()=>V.onChange(M),className:B("flex items-start gap-3 px-2 py-3 rounded-lg text-left transition-colors w-full",K&&"bg-accent/50",!K&&"hover:bg-accent"),"aria-label":i("chat.userAskQuestion.selectOption",{option:M}),children:[n.jsx("span",{className:B("flex items-center justify-center size-6 rounded-md text-sm shrink-0 mt-0.5",K?"bg-chart-1 text-white":"bg-muted text-foreground"),children:q+1}),n.jsx("span",{className:"text-sm text-foreground min-w-0 break-words",children:M})]},`${q}-${M}`)},e[16]=V,e[17]=p,e[18]=i,e[19]=L):L=e[19],v=a.map(L),e[11]=V,e[12]=p,e[13]=a,e[14]=i,e[15]=v}else v=e[15];const x=m&&"bg-accent/50",b=!m&&"hover:bg-accent";let y;e[20]!==x||e[21]!==b?(y=B("flex items-center gap-3 px-2 py-3 rounded-lg transition-colors w-full cursor-text",x,b),e[20]=x,e[21]=b,e[22]=y):y=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx($t,{size:16,className:"text-muted-foreground"})}),e[23]=A):A=e[23];const k=m?f:"";let j;e[24]!==c||e[25]!==V||e[26]!==p?(j=L=>{c.onChange(L.target.value),p!==null&&V.onChange(null)},e[24]=c,e[25]=V,e[26]=p,e[27]=j):j=e[27];let w;e[28]!==V||e[29]!==p?(w=()=>{p!==null&&V.onChange(null)},e[28]=V,e[29]=p,e[30]=w):w=e[30];let C;e[31]!==i?(C=i("chat.userAskQuestion.somethingElsePlaceholder"),e[31]=i,e[32]=C):C=e[32];let _;e[33]!==i?(_=i("chat.userAskQuestion.customChoiceInputAriaLabel"),e[33]=i,e[34]=_):_=e[34];let N;e[35]!==k||e[36]!==j||e[37]!==w||e[38]!==C||e[39]!==_?(N=n.jsx("input",{type:"text",value:k,onChange:j,onFocus:w,placeholder:C,"aria-label":_,className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"}),e[35]=k,e[36]=j,e[37]=w,e[38]=C,e[39]=_,e[40]=N):N=e[40];let T;e[41]!==y||e[42]!==N?(T=n.jsxs("label",{className:y,children:[A,N]}),e[41]=y,e[42]=N,e[43]=T):T=e[43];let I;e[44]!==T||e[45]!==g||e[46]!==v?(I=n.jsx(nt,{children:n.jsxs("div",{className:"flex flex-col px-2",role:"group","aria-label":g,children:[v,T]})}),e[44]=T,e[45]=g,e[46]=v,e[47]=I):I=e[47];let E;e[48]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(ot,{}),e[48]=E):E=e[48];let F;return e[49]!==I?(F=n.jsxs(st,{children:[I,E]}),e[49]=I,e[50]=F):F=e[50],F}function ca(t){const e=D.c(8),{control:s,name:o}=t,a=Q();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["yes","no"],e[0]=i):i=e[0];const r=i,l=R.useRef(null);let V;e[1]===Symbol.for("react.memo_cache_sentinel")?(V=c=>{l.current?.onChange(r[c]??"")},e[1]=V):V=e[1],rs(r.length,V);let d;e[2]!==a?(d=c=>{const{field:p}=c;return l.current=p,n.jsxs(st,{children:[n.jsx(nt,{children:n.jsx("div",{className:"flex gap-2 px-2",role:"group","aria-label":a("chat.userAskQuestion.confirmationOptionsAriaLabel"),children:r.map(f=>{const h=p.value===f;return n.jsxs("button",{type:"button",onClick:()=>p.onChange(f),className:B("flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors flex-1",h&&"bg-accent/50",!h&&"hover:bg-accent"),"aria-label":a("chat.userAskQuestion.confirmValue",{value:a(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)}),children:[n.jsx("span",{className:B("flex items-center justify-center size-6 rounded-md text-sm shrink-0",h?"bg-chart-1 text-white":"bg-muted text-foreground"),children:f==="yes"?1:2}),n.jsx("span",{className:"text-sm text-foreground capitalize",children:a(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)})]},f)})})}),n.jsx(ot,{})]})},e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==s||e[5]!==o||e[6]!==d?(u=n.jsx(Yt,{control:s,name:o,render:d}),e[4]=s,e[5]=o,e[6]=d,e[7]=u):u=e[7],u}function Ct(t){const e=D.c(13),{input:s,control:o,toolCallId:a}=t;switch(s.type){case"text":{const i=`${a}.response`;let r;return e[0]!==o||e[1]!==s.default||e[2]!==i?(r=n.jsx(la,{control:o,name:i,placeholder:s.default}),e[0]=o,e[1]=s.default,e[2]=i,e[3]=r):r=e[3],r}case"choice":{let i;e[4]!==s.options?(i=s.options?.filter(Boolean)??[],e[4]=s.options,e[5]=i):i=e[5];const r=i;let l;return e[6]!==o||e[7]!==r||e[8]!==a?(l=n.jsx(Va,{control:o,name:a,options:r}),e[6]=o,e[7]=r,e[8]=a,e[9]=l):l=e[9],l}case"confirm":{const i=`${a}.response`;let r;return e[10]!==o||e[11]!==i?(r=n.jsx(ca,{control:o,name:i}),e[10]=o,e[11]=i,e[12]=r):r=e[12],r}default:return null}}function da(t){const e=D.c(91),{parts:s,isStreaming:o,onSubmit:a}=t;let i;e[0]!==s?(i=ra(s.map(fa)),e[0]=s,e[1]=i):i=e[1];const r=i;let l;e[2]!==s?(l=Object.fromEntries(s.map(ha)),e[2]=s,e[3]=l):l=e[3];const V=l;let d;e[4]!==a?(d=(U,W)=>{const P=is(W);P&&a(U,P)},e[4]=a,e[5]=d):d=e[5];let u;e[6]!==V||e[7]!==o||e[8]!==s||e[9]!==r||e[10]!==d?(u={parts:s,partKey:pa,schema:r,defaultValues:V,isStreaming:o,hasAnswer:ua,onSubmit:d},e[6]=V,e[7]=o,e[8]=s,e[9]=r,e[10]=d,e[11]=u):u=e[11];const c=ss(u),p=c.currentPart,f=Q();let h;e[12]!==p||e[13]!==c||e[14]!==f?(h=()=>{const U=p;if(!U)return;const W=f("chat.userAskQuestion.skipMessage"),P=U.toolCallId;U.input?.type==="choice"?(c.form.setValue(`${P}.option`,null),c.form.setValue(`${P}.draft`,W)):c.form.setValue(`${P}.response`,W),c.advanceToNextUnanswered()},e[12]=p,e[13]=c,e[14]=f,e[15]=h):h=e[15];const m=h;let g;e[16]!==c.currentIndex||e[17]!==c.goNext||e[18]!==c.goPrev||e[19]!==s.length?(g=n.jsx(es,{currentIndex:c.currentIndex,total:s.length,onPrev:c.goPrev,onNext:c.goNext}),e[16]=c.currentIndex,e[17]=c.goNext,e[18]=c.goPrev,e[19]=s.length,e[20]=g):g=e[20];const v=g;let x;e[21]!==f?(x=f("chat.userAskQuestion.skip"),e[21]=f,e[22]=x):x=e[22];let b;e[23]!==m||e[24]!==x?(b=n.jsx(Y,{type:"button",variant:"outline",size:"sm",onClick:m,className:"h-7",children:x}),e[23]=m,e[24]=x,e[25]=b):b=e[25];let y;e[26]!==c.isAllAnswered||e[27]!==c.isCurrentAnswered||e[28]!==c.submitOrAdvance||e[29]!==o?(y=n.jsx(qo,{isStreaming:o,isAllAnswered:c.isAllAnswered,isCurrentAnswered:c.isCurrentAnswered,onAdvanceOrSubmit:c.submitOrAdvance}),e[26]=c.isAllAnswered,e[27]=c.isCurrentAnswered,e[28]=c.submitOrAdvance,e[29]=o,e[30]=y):y=e[30];let A;e[31]!==b||e[32]!==y?(A=n.jsxs(n.Fragment,{children:[b,y]}),e[31]=b,e[32]=y,e[33]=A):A=e[33];const k=A;if(s.length===1){const U=s[0];if(!U?.input)return null;const W=c.form;let P;e[34]!==c?(P=ee=>{ee.preventDefault(),c.submit()},e[34]=c,e[35]=P):P=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Ge,{size:14}),e[36]=G):G=e[36];let ne;e[37]!==f?(ne=f("chat.userAskQuestion.questionPending"),e[37]=f,e[38]=ne):ne=e[38];let H;e[39]!==U.input?.prompt||e[40]!==f?(H=U.input?.prompt??f("chat.userAskQuestion.question"),e[39]=U.input?.prompt,e[40]=f,e[41]=H):H=e[41];const re=U.input;let S;e[42]!==c.form.control||e[43]!==U.toolCallId||e[44]!==re?(S=n.jsx(Ct,{input:re,control:c.form.control,toolCallId:U.toolCallId}),e[42]=c.form.control,e[43]=U.toolCallId,e[44]=re,e[45]=S):S=e[45];let O;e[46]!==k||e[47]!==ne||e[48]!==H||e[49]!==S?(O=n.jsx(xe,{icon:G,label:ne,title:H,defaultExpanded:!0,footerRight:k,children:S}),e[46]=k,e[47]=ne,e[48]=H,e[49]=S,e[50]=O):O=e[50];let J;e[51]!==P||e[52]!==O?(J=n.jsx("form",{onSubmit:P,autoComplete:"off",children:O}),e[51]=P,e[52]=O,e[53]=J):J=e[53];let $;return e[54]!==c.form||e[55]!==J?($=n.jsx(He,{...W,children:J}),e[54]=c.form,e[55]=J,e[56]=$):$=e[56],$}const j=c.form;let w;e[57]!==c?(w=U=>{U.preventDefault(),c.submit()},e[57]=c,e[58]=w):w=e[58];let C;e[59]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(Ge,{size:14}),e[59]=C):C=e[59];let _;e[60]!==f?(_=f("chat.userAskQuestion.questionPending"),e[60]=f,e[61]=_):_=e[61];const N=c.currentIndex+1;let T;e[62]!==s.length||e[63]!==f||e[64]!==N?(T=f("chat.userAskQuestion.questionCount",{current:N,total:s.length}),e[62]=s.length,e[63]=f,e[64]=N,e[65]=T):T=e[65];let I;e[66]!==p?.input?.prompt||e[67]!==f?(I=p?.input?.prompt??f("chat.userAskQuestion.question"),e[66]=p?.input?.prompt,e[67]=f,e[68]=I):I=e[68];const E=c.activeKey,F=c.setActiveKey;let L;if(e[69]!==c.form||e[70]!==s){let U;e[72]!==c.form?(U=W=>n.jsx(Hn,{value:W.toolCallId,className:"mt-0",children:n.jsx(Ct,{input:W.input,control:c.form.control,toolCallId:W.toolCallId})},W.toolCallId),e[72]=c.form,e[73]=U):U=e[73],L=s.map(U),e[69]=c.form,e[70]=s,e[71]=L}else L=e[71];let M;e[74]!==c.activeKey||e[75]!==c.setActiveKey||e[76]!==L?(M=n.jsx(Jn,{value:E,onValueChange:F,children:L}),e[74]=c.activeKey,e[75]=c.setActiveKey,e[76]=L,e[77]=M):M=e[77];let q;e[78]!==v||e[79]!==k||e[80]!==_||e[81]!==T||e[82]!==I||e[83]!==M?(q=n.jsx(xe,{icon:C,label:_,count:T,title:I,defaultExpanded:!0,footerLeft:v,footerRight:k,children:M}),e[78]=v,e[79]=k,e[80]=_,e[81]=T,e[82]=I,e[83]=M,e[84]=q):q=e[84];let K;e[85]!==w||e[86]!==q?(K=n.jsx("form",{onSubmit:w,autoComplete:"off",children:q}),e[85]=w,e[86]=q,e[87]=K):K=e[87];let Z;return e[88]!==c.form||e[89]!==K?(Z=n.jsx(He,{...j,children:K}),e[88]=c.form,e[89]=K,e[90]=Z):Z=e[90],Z}function ua(t){return!!is(t)}function pa(t){return t.toolCallId}function ha(t){return t.input?.type==="choice"?[t.toolCallId,{option:null,draft:""}]:[t.toolCallId,{response:""}]}function fa(t){return{toolCallId:t.toolCallId,input:t.input}}function ma(){const t=D.c(5),e=Q();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ge,{className:"size-5 text-muted-foreground animate-pulse motion-reduce:animate-none"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.userAskQuestion.preparingQuestion"),t[1]=e,t[2]=o):o=t[2];let a;return t[3]!==o?(a=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=a):a=t[4],a}function ls(t){const e=D.c(7),{userAskParts:s,isStreaming:o,onSubmit:a}=t;let i;e[0]!==s?(i=s.filter(ga),e[0]=s,e[1]=i):i=e[1];const r=i;if(r.length===0){if(o){let V;return e[2]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(ma,{}),e[2]=V):V=e[2],V}return null}let l;return e[3]!==o||e[4]!==a||e[5]!==r?(l=n.jsx(da,{parts:r,isStreaming:o,onSubmit:a}),e[3]=o,e[4]=a,e[5]=r,e[6]=l):l=e[6],l}function ga(t){return t.state==="input-available"}function xa(t){const e=D.c(33),{parts:s,isStreaming:o,onRespond:a}=t,i=Q();let r;e[0]!==s?(r=s.at(-1),e[0]=s,e[1]=r):r=e[1];const l=r,V=l?.input;if(!l||!V?.title)return null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Bt,{size:14}),e[2]=d):d=e[2];let u;e[3]!==i?(u=i("chat.suggestTask.label"),e[3]=i,e[4]=u):u=e[4];const c=V.title;let p;e[5]!==a||e[6]!==l?(p=()=>a(l,!1),e[5]=a,e[6]=l,e[7]=p):p=e[7];let f;e[8]!==i?(f=i("chat.suggestTask.notNow"),e[8]=i,e[9]=f):f=e[9];let h;e[10]!==o||e[11]!==p||e[12]!==f?(h=n.jsx(Y,{type:"button",size:"sm",variant:"outline",className:"h-7",disabled:o,onClick:p,children:f}),e[10]=o,e[11]=p,e[12]=f,e[13]=h):h=e[13];let m;e[14]!==a||e[15]!==l?(m=()=>a(l,!0),e[14]=a,e[15]=l,e[16]=m):m=e[16];let g;e[17]!==i?(g=i("chat.suggestTask.create"),e[17]=i,e[18]=g):g=e[18];let v;e[19]!==o||e[20]!==m||e[21]!==g?(v=n.jsx(Y,{type:"button",size:"sm",className:"h-7",disabled:o,onClick:m,children:g}),e[19]=o,e[20]=m,e[21]=g,e[22]=v):v=e[22];let x;e[23]!==v||e[24]!==h?(x=n.jsxs(n.Fragment,{children:[h,v]}),e[23]=v,e[24]=h,e[25]=x):x=e[25];let b;e[26]!==V.summary?(b=V.summary?n.jsx("p",{className:"px-4 pb-1 text-sm leading-snug text-muted-foreground whitespace-pre-wrap",children:V.summary}):null,e[26]=V.summary,e[27]=b):b=e[27];let y;return e[28]!==V.title||e[29]!==x||e[30]!==b||e[31]!==u?(y=n.jsx(xe,{icon:d,label:u,title:c,defaultExpanded:!0,footerRight:x,children:b}),e[28]=V.title,e[29]=x,e[30]=b,e[31]=u,e[32]=y):y=e[32],y}function va(t){const e=t.filter(i=>i.status==="in_progress"),s=t.filter(i=>i.status==="completed").length,o=t.length;if(o>0&&s===o)return{icon:"completed",activity:"All done",progress:`${o}/${o}`};const[a]=e;return a&&e.length===1?{icon:"in_progress",activity:a.activeForm,progress:`${s}/${o} done`}:e.length>1?{icon:"in_progress",activity:`${e.length} in progress`,progress:`${s}/${o} done`}:s>0?{icon:"pending",activity:`${o-s} pending`,progress:`${s}/${o} done`}:{icon:"pending",activity:`${o} todos`,progress:"not started"}}function ba(t){const e=D.c(13),{todos:s}=t;if(s.length===0)return null;let o;e[0]!==s?(o=va(s),e[0]=s,e[1]=o):o=e[1];const a=o;let i;e[2]!==a.icon?(i=n.jsx(ka,{status:a.icon}),e[2]=a.icon,e[3]=i):i=e[3];const r=a.activity,l=a.progress;let V;e[4]!==s?(V=s.map(Aa),e[4]=s,e[5]=V):V=e[5];let d;e[6]!==V?(d=n.jsx("ul",{"data-testid":"todos-list",className:"flex flex-col px-2 max-h-[40vh] overflow-y-auto",children:V}),e[6]=V,e[7]=d):d=e[7];let u;return e[8]!==a.activity||e[9]!==a.progress||e[10]!==i||e[11]!==d?(u=n.jsx(xe,{icon:i,label:r,count:l,defaultExpanded:!1,children:d}),e[8]=a.activity,e[9]=a.progress,e[10]=i,e[11]=d,e[12]=u):u=e[12],u}function Aa(t,e){return n.jsx(ya,{todo:t},e)}function ya(t){const e=D.c(14),{todo:s}=t,o=s.status==="completed",i=s.status==="in_progress"?s.activeForm:s.content;let r;e[0]!==s.status?(r=n.jsx(ja,{status:s.status}),e[0]=s.status,e[1]=r):r=e[1];const l=o&&"text-muted-foreground";let V;e[2]!==l?(V=B("relative text-sm leading-snug pt-px select-none",l),e[2]=l,e[3]=V):V=e[3];const d=o?"100%":"0%",u=o?"width 300ms ease 200ms":"width 150ms ease";let c;e[4]!==d||e[5]!==u?(c=n.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",height:"1px",background:"currentColor",width:d,transition:u}}),e[4]=d,e[5]=u,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==V||e[9]!==c?(p=n.jsxs("span",{className:V,children:[i,c]}),e[7]=i,e[8]=V,e[9]=c,e[10]=p):p=e[10];let f;return e[11]!==r||e[12]!==p?(f=n.jsxs("li",{className:"flex items-start gap-2.5 px-2 py-1.5 rounded-lg hover:bg-accent transition-colors",children:[r,p]}),e[11]=r,e[12]=p,e[13]=f):f=e[13],f}function ja(t){const e=D.c(4),{status:s}=t,o=s==="completed"?"true":void 0,a=s==="in_progress"?"true":void 0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("svg",{viewBox:"0 0 21 21",children:n.jsx("path",{d:"M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"})}),e[0]=i):i=e[0];let r;return e[1]!==o||e[2]!==a?(r=n.jsx("div",{className:"todo-cb mt-0.5","data-checked":o,"data-progress":a,"aria-hidden":"true",children:i}),e[1]=o,e[2]=a,e[3]=r):r=e[3],r}function ka(t){const e=D.c(13),{status:s}=t,o=Q();if(s==="completed"){let r;e[0]!==o?(r=o("chat.todoStatus.completed"),e[0]=o,e[1]=r):r=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("svg",{viewBox:"0 0 10 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"w-2 h-2 text-primary-foreground",style:{strokeWidth:2},children:n.jsx("path",{d:"M1 4l2.5 2.5L9 1"})}),e[2]=l):l=e[2];let V;return e[3]!==r?(V=n.jsx("span",{"aria-label":r,className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-sm bg-primary",children:l}),e[3]=r,e[4]=V):V=e[4],V}if(s==="in_progress"){let r;e[5]!==o?(r=o("chat.todoStatus.inProgress"),e[5]=o,e[6]=r):r=e[6];let l;return e[7]!==r?(l=n.jsx("span",{"aria-label":r,className:"inline-block w-2 h-2 rounded-full bg-primary animate-pulse shrink-0"}),e[7]=r,e[8]=l):l=e[8],l}let a;e[9]!==o?(a=o("chat.todoStatus.pending"),e[9]=o,e[10]=a):a=e[10];let i;return e[11]!==a?(i=n.jsx("span",{"aria-label":a,className:"inline-block w-3.5 h-3.5 rounded-sm border-[1.5px] border-muted-foreground/50 shrink-0"}),e[11]=a,e[12]=i):i=e[12],i}const wa={usd:[{dollars:10,labelKey:"credits.topUp.starter"},{dollars:20,labelKey:"credits.topUp.popular"},{dollars:100,labelKey:"credits.topUp.bestValue"}],brl:[{dollars:50,labelKey:"credits.topUp.starter"},{dollars:100,labelKey:"credits.topUp.popular"},{dollars:500,labelKey:"credits.topUp.bestValue"}]},Ca={"credits.topUp.starter":"starter","credits.topUp.popular":"popular","credits.topUp.bestValue":"best_value"};function Sa(t){const e=D.c(46),{source:s,onDone:o}=t,a=Q(),i=js(),[r]=we(),[l,V]=R.useState(r.language==="pt-BR"?"brl":"usd"),[d,u]=R.useState(""),[c,p]=R.useState(!1),f=l==="brl"?"R$":"$";let h;e[0]!==l||e[1]!==i?(h=async M=>{const{url:q}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:M,currency:l});return q},e[0]=l,e[1]=i,e[2]=h):h=e[2];let m;e[3]!==o?(m=M=>{M&&window.open(M,"_blank","noopener,noreferrer"),o?.()},e[3]=o,e[4]=m):m=e[4];let g;e[5]!==a?(g=M=>{Ie.error(a("credits.topUp.failed",{message:M.message}))},e[5]=a,e[6]=g):g=e[6];let v;e[7]!==h||e[8]!==m||e[9]!==g?(v={mutationFn:h,onSuccess:m,onError:g},e[7]=h,e[8]=m,e[9]=g,e[10]=v):v=e[10];const{mutate:x,isPending:b}=ks(v);let y;e[11]!==l||e[12]!==s||e[13]!==x?(y=(M,q)=>{X("credits_topup_clicked",{amount_cents:M,currency:l,tier_label:q,source:s}),x(M)},e[11]=l,e[12]=s,e[13]=x,e[14]=y):y=e[14];const A=y,k=parseFloat(d),j=!isNaN(k)&&k>=1;let w,C,_;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=M=>{M&&V(M)},C=n.jsx(xt,{value:"usd",className:"h-8 px-3 text-xs",children:"USD"}),_=n.jsx(xt,{value:"brl",className:"h-8 px-3 text-xs",children:"BRL"}),e[15]=w,e[16]=C,e[17]=_):(w=e[15],C=e[16],_=e[17]);let N;e[18]!==l?(N=n.jsx("div",{className:"mb-4",children:n.jsxs(eo,{type:"single",variant:"outline",size:"sm",value:l,onValueChange:w,children:[C,_]})}),e[18]=l,e[19]=N):N=e[19];const T=wa[l];let I;if(e[20]!==A||e[21]!==f||e[22]!==b||e[23]!==a||e[24]!==T){let M;e[26]!==A||e[27]!==f||e[28]!==b||e[29]!==a?(M=q=>{const{dollars:K,labelKey:Z}=q;return n.jsxs("button",{type:"button",disabled:b,onClick:()=>A(K*100,Ca[Z]??"preset"),className:B("relative flex flex-col items-center gap-1 py-5 surface surface-interactive cursor-pointer","disabled:opacity-50 disabled:cursor-wait"),children:[n.jsxs("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:[f,K]}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a(Z)})]},K)},e[26]=A,e[27]=f,e[28]=b,e[29]=a,e[30]=M):M=e[30],I=T.map(M),e[20]=A,e[21]=f,e[22]=b,e[23]=a,e[24]=T,e[25]=I}else I=e[25];let E;e[31]!==I?(E=n.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:I}),e[31]=I,e[32]=E):E=e[32];let F;e[33]!==A||e[34]!==f||e[35]!==d||e[36]!==k||e[37]!==j||e[38]!==b||e[39]!==c||e[40]!==a?(F=c?n.jsxs("div",{className:"flex gap-2 mt-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:f}),n.jsx(ws,{type:"number",min:"1",step:"1",placeholder:a("credits.topUp.customPlaceholder"),value:d,onChange:M=>u(M.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),n.jsx(Y,{size:"lg",disabled:!j||b,onClick:()=>A(Math.round(k*100),"custom"),children:a(b?"credits.topUp.opening":"credits.topUp.add")})]}):n.jsx("button",{type:"button",className:"w-full mt-3 text-xs text-muted-foreground hover:text-foreground transition-colors py-1",onClick:()=>p(!0),children:a("credits.topUp.enterCustom")}),e[33]=A,e[34]=f,e[35]=d,e[36]=k,e[37]=j,e[38]=b,e[39]=c,e[40]=a,e[41]=F):F=e[41];let L;return e[42]!==E||e[43]!==F||e[44]!==N?(L=n.jsxs("div",{children:[N,E,F]}),e[42]=E,e[43]=F,e[44]=N,e[45]=L):L=e[45],L}const Na=["chat.creditsExhaustedBanner.benefit1","chat.creditsExhaustedBanner.benefit2","chat.creditsExhaustedBanner.benefit3"];function Ia(t){const e=D.c(47),{onDismiss:s}=t,{org:o}=Te(),a=Xe(),{decoKeyId:i}=Xn(),r=Q(),l=qe("credits");let V,d;if(e[0]!==o.id?(V=()=>{X("credits_exhausted_shown",{organization_id:o.id})},d=[o.id],e[0]=o.id,e[1]=V,e[2]=d):(V=e[1],d=e[2]),R.useEffect(V,d),!l)return null;let u;e[3]!==s?(u=T=>!T&&s?.(),e[3]=s,e[4]=u):u=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(165,149,255,0.5) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(208,236,26,0.45) 0%, transparent 100%)"],e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[7]=f):f=e[7];let h;e[8]!==r?(h=r("chat.creditsExhaustedBanner.title"),e[8]=r,e[9]=h):h=e[9];let m;e[10]!==h?(m=n.jsx(Cs,{className:"text-xl font-semibold tracking-tight",children:h}),e[10]=h,e[11]=m):m=e[11];let g;e[12]!==r?(g=r("chat.creditsExhaustedBanner.description"),e[12]=r,e[13]=g):g=e[13];let v;e[14]!==g?(v=n.jsx(Ss,{className:"mt-1.5 text-sm leading-relaxed",children:g}),e[14]=g,e[15]=v):v=e[15];let x;e[16]!==v||e[17]!==m?(x=n.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,n.jsxs(Ns,{className:"relative gap-4",children:[f,n.jsxs("div",{children:[m,v]})]})]}),e[16]=v,e[17]=m,e[18]=x):x=e[18];let b;e[19]!==i||e[20]!==s||e[21]!==r?(b=i&&n.jsxs("div",{className:"px-8 pt-5 pb-6",children:[n.jsx("div",{className:"surface p-5",children:n.jsx(Sa,{source:"exhausted_banner",onDone:s})}),n.jsx("div",{className:"mt-5 rounded-xl bg-muted/25 border border-border/50 p-4 space-y-3",children:Na.map(T=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex items-center justify-center size-5 rounded-full bg-success/15 shrink-0",children:n.jsx(Mt,{size:12,className:"text-success"})}),n.jsx("span",{className:"text-sm text-foreground/80",children:r(T)})]},T))})]}),e[19]=i,e[20]=s,e[21]=r,e[22]=b):b=e[22];let y;e[23]!==r?(y=r("chat.creditsExhaustedBanner.dismiss"),e[23]=r,e[24]=y):y=e[24];let A;e[25]!==s||e[26]!==y?(A=n.jsx(Y,{variant:"ghost",size:"sm",onClick:s,children:y}),e[25]=s,e[26]=y,e[27]=A):A=e[27];let k;e[28]!==a||e[29]!==s||e[30]!==o.slug?(k=()=>{a({to:"/$org/settings/ai-providers",params:{org:o.slug}}),s?.()},e[28]=a,e[29]=s,e[30]=o.slug,e[31]=k):k=e[31];let j;e[32]!==r?(j=r("chat.creditsExhaustedBanner.manageProviders"),e[32]=r,e[33]=j):j=e[33];let w;e[34]!==k||e[35]!==j?(w=n.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:k,children:j}),e[34]=k,e[35]=j,e[36]=w):w=e[36];let C;e[37]!==A||e[38]!==w?(C=n.jsxs("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-between",children:[A,w]}),e[37]=A,e[38]=w,e[39]=C):C=e[39];let _;e[40]!==x||e[41]!==b||e[42]!==C?(_=n.jsxs(Is,{className:"sm:max-w-[520px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ta,children:[x,b,C]}),e[40]=x,e[41]=b,e[42]=C,e[43]=_):_=e[43];let N;return e[44]!==_||e[45]!==u?(N=n.jsx(Ts,{open:!0,onOpenChange:u,children:_}),e[44]=_,e[45]=u,e[46]=N):N=e[46],N}function Ta(t){return t.preventDefault()}const _a={ai_budget_exhausted:{label:"chat.planRefused.budgetLabel",title:"chat.planRefused.budgetTitle"},feature_not_in_plan:{label:"chat.planRefused.featureLabel",title:"chat.planRefused.featureTitle"}};function St(t){const e=D.c(21),{kind:s,onDismiss:o}=t,a=Q(),i=Xe(),{org:r}=Te(),{label:l,title:V}=_a[s];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Pn,{size:14}),e[0]=d):d=e[0];let u;e[1]!==l||e[2]!==a?(u=a(l),e[1]=l,e[2]=a,e[3]=u):u=e[3];let c;e[4]!==a||e[5]!==V?(c=a(V),e[4]=a,e[5]=V,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==o||e[9]!==r.slug?(p=()=>{i({to:"/$org/settings/ai-providers",params:{org:r.slug}}),o()},e[7]=i,e[8]=o,e[9]=r.slug,e[10]=p):p=e[10];let f;e[11]!==a?(f=a("chat.planRefused.seePlans"),e[11]=a,e[12]=f):f=e[12];let h;e[13]!==p||e[14]!==f?(h=n.jsx(Y,{size:"sm",className:"h-7 text-xs",onClick:p,children:f}),e[13]=p,e[14]=f,e[15]=h):h=e[15];let m;return e[16]!==o||e[17]!==u||e[18]!==c||e[19]!==h?(m=n.jsx(xe,{icon:d,label:u,title:c,defaultExpanded:!0,variant:"warning",onClose:o,footerRight:h}),e[16]=o,e[17]=u,e[18]=c,e[19]=h,e[20]=m):m=e[20],m}function Vs(t){const e=Da(t);if(e!==null){const d=Vs(e);return{summary:d.summary,rawDetails:d.rawDetails??t}}const s=t.trim(),o=s.startsWith("<")&&/<[a-z][\s\S]*>/i.test(s),a=/cloudflare|cf-[a-z-]+|error[\s_-]?code[\s_-]?5\d\d/i.test(s),i=/failed to fetch|networkerror|load failed|offline/i.test(s),r=/timeout|timed out|aborted|deadline/i.test(s),l=s.length>240,V=/sandbox failed to start(?::\s*(.+))?/is.exec(s);if(V){const d=V[1]?.trim().replace(/\.$/,"");return{summary:d?`Your sandbox didn't finish starting up (${d}). Try again.`:"Your sandbox didn't finish starting up. Try again.",rawDetails:t}}return a||o&&l?{summary:"Our servers are having a moment. Try sending again in a few seconds.",rawDetails:t}:i?{summary:"Lost connection. Check your network and try again.",rawDetails:t}:r?{summary:"That took longer than expected. Try again.",rawDetails:t}:o||l?{summary:"Something unexpected came back from the server. Try again.",rawDetails:t}:{summary:t,rawDetails:null}}function Da(t){const e=t.trim();if(!e.startsWith("{"))return null;let s;try{s=JSON.parse(e)}catch{return null}if(!s||typeof s!="object")return null;const{error:o,message:a}=s,i=typeof o=="string"?o:a;return typeof i=="string"&&i.trim()&&!i.trim().startsWith("{")?i:null}const Ma={length:"chat.highlight.warningDescriptionLength","content-filter":"chat.highlight.warningDescriptionContentFilter","tool-calls":"chat.highlight.warningDescriptionToolCalls"};function Be(t){const e=D.c(29),s=Q(),{variant:o,onDismiss:a}=t,i=o==="error";let r;e[0]!==i||e[1]!==s?(r=s(i?"chat.highlight.errorOccurred":"chat.highlight.responseIncomplete"),e[0]=i,e[1]=s,e[2]=r):r=e[2];const l=r,V=i?Bn:Ds;let d;e[3]!==t.error||e[4]!==t.finishReason||e[5]!==t.variant||e[6]!==s?(d=t.variant==="error"?t.error.message:(()=>{const x=Ma[t.finishReason];return x?s(x):s("chat.highlight.responseStoppedUnexpectedly",{reason:t.finishReason})})(),e[3]=t.error,e[4]=t.finishReason,e[5]=t.variant,e[6]=s,e[7]=d):d=e[7];const u=d;let c;e[8]!==i||e[9]!==u?(c=i?Vs(u):{summary:u,rawDetails:null},e[8]=i,e[9]=u,e[10]=c):c=e[10];const{summary:p,rawDetails:f}=c;let h;e[11]!==V?(h=n.jsx(V,{size:14}),e[11]=V,e[12]=h):h=e[12];let m;e[13]!==i||e[14]!==t.onContinue||e[15]!==t.onFixInChat||e[16]!==s?(m=i?n.jsx(Y,{size:"sm",variant:"outline",onClick:t.onFixInChat,className:"h-7 text-xs",children:s("chat.highlight.fixInChat")}):n.jsx(Y,{size:"sm",variant:"outline",onClick:t.onContinue,className:"h-7 text-xs",children:s("chat.highlight.continue")}),e[13]=i,e[14]=t.onContinue,e[15]=t.onFixInChat,e[16]=s,e[17]=m):m=e[17];let g;e[18]!==f||e[19]!==s?(g=f?n.jsxs("details",{className:"group mx-4",children:[n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[n.jsx("svg",{"aria-hidden":"true",className:"size-3 transition-transform group-open:rotate-90",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"m4.5 3 3 3-3 3"})}),n.jsx("span",{className:"group-open:hidden",children:s("chat.highlight.showTechnicalDetails")}),n.jsx("span",{className:"hidden group-open:inline",children:s("chat.highlight.hideTechnicalDetails")})]}),n.jsxs("div",{className:"relative mt-2",children:[n.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(f).then(()=>Ie.success(s("chat.highlight.copiedToClipboard"))).catch(()=>Ie.error(s("chat.highlight.couldNotCopy")))},"aria-label":s("chat.highlight.copyErrorDetails"),title:s("chat.highlight.copy"),className:"absolute right-1.5 top-1.5 z-10 flex h-6 w-6 items-center justify-center rounded-lg bg-background/80 text-muted-foreground backdrop-blur-sm transition-colors hover:bg-background hover:text-foreground",children:n.jsx(En,{className:"size-3.5"})}),n.jsx("pre",{className:"max-h-40 overflow-auto rounded-md border border-border/60 bg-background px-3 py-2 pr-8 font-mono text-xs text-foreground/80 whitespace-pre-wrap break-all",children:f})]})]}):null,e[18]=f,e[19]=s,e[20]=g):g=e[20];let v;return e[21]!==l||e[22]!==a||e[23]!==p||e[24]!==h||e[25]!==m||e[26]!==g||e[27]!==o?(v=n.jsx(xe,{icon:h,label:l,title:p,defaultExpanded:!0,variant:o,onClose:a,footerRight:m,children:g}),e[21]=l,e[22]=a,e[23]=p,e[24]=h,e[25]=m,e[26]=g,e[27]=o,e[28]=v):v=e[28],v}function Fe(t){const e=D.c(71);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{inline:o,voiceMode:a}=s,i=o===void 0?!1:o,r=a===void 0?!1:a,l=Q(),{error:V,clearError:d,finishReason:u,clearFinishReason:c,messages:p,isStreaming:f,submit:h,sendMessage:m}=Ue(),[g,v]=we(),{virtualMcpId:x,createTaskWithMessage:b}=et(),{chatMode:y,setChatMode:A,simpleModeTier:k}=tt(),j=qe("credits");let w;e[2]!==y||e[3]!==k||e[4]!==x||e[5]!==r?(w=se=>({...r?{voiceMode:!0}:{},tier:k,mode:y,toolApprovalLevel:se,agent:x?{id:x}:void 0}),e[2]=y,e[3]=k,e[4]=x,e[5]=r,e[6]=w):w=e[6];const C=w;let _;e[7]!==g.toolApprovalLevel?(_=g.toolApprovalLevel??_s(),e[7]=g.toolApprovalLevel,e[8]=_):_=e[8];const N=_,T=p.at(-1),I=T?.role==="assistant"?T.parts:[],E=I.filter(Ua),F=I.filter(Et),L=Zt(I),M=Ht(I);let q;e[9]!==V||e[10]!==m||e[11]!==l?(q=()=>{if(V){const me={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.fixInChatMessage",{error:V.message})}]}]};m(me)}},e[9]=V,e[10]=m,e[11]=l,e[12]=q):q=e[12];const K=q;let Z;e[13]!==m||e[14]!==l?(Z=()=>{const se={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.pleaseContinue")}]}]};m(se)},e[13]=m,e[14]=l,e[15]=Z):Z=e[15];const U=Z;let W;e[16]!==C||e[17]!==N||e[18]!==h?(W=(se,me)=>{h({kind:"toolOutput",toolCallId:se.toolCallId,output:{response:me}},C(N))},e[16]=C,e[17]=N,e[18]=h,e[19]=W):W=e[19];const P=W;let G;e[20]!==C||e[21]!==N||e[22]!==h?(G=(se,me)=>{h({kind:"toolOutput",toolCallId:se.toolCallId,output:{accepted:me}},C(N))},e[20]=C,e[21]=N,e[22]=h,e[23]=G):G=e[23];const ne=G;let H;e[24]!==b||e[25]!==g||e[26]!==A||e[27]!==v||e[28]!==l||e[29]!==x?(H=se=>{A("default"),v({...g,toolApprovalLevel:"auto"}),b({virtualMcpId:x,message:{parts:[{type:"text",text:l("chat.highlight.implementPlanMessage",{plan:se})}]}})},e[24]=b,e[25]=g,e[26]=A,e[27]=v,e[28]=l,e[29]=x,e[30]=H):H=e[30];const re=H,S=Ra;let O;e[31]!==C||e[32]!==h?(O=(se,me,Oe,Le)=>{h({kind:"approval",approvalId:se,approved:me,...Oe?{reason:Oe}:{}},C(Le))},e[31]=C,e[32]=h,e[33]=O):O=e[33];const J=O,$=Xt();if($.isCreditExhausted){let se;return e[34]!==j||e[35]!==d||e[36]!==i?(se=j?n.jsx(Ia,{onDismiss:d}):n.jsx("div",{className:B(!i&&"absolute bottom-full left-0 right-0"),children:n.jsx(St,{kind:"ai_budget_exhausted",onDismiss:d})}),e[34]=j,e[35]=d,e[36]=i,e[37]=se):se=e[37],se}const{showError:ee,showWarning:ie,hasApprovals:ce}=$,ae=E.map(Ea).join("|"),pe=Jt(L)?.toolCallId??"",Ve=M.map(Pa).join("|"),Ce=!i&&"absolute bottom-full left-0 right-0";let de;e[38]!==Ce?(de=B(Ce),e[38]=Ce,e[39]=de):de=e[39];let he;e[40]!==$.todos?(he=n.jsx(ba,{todos:$.todos}),e[40]=$.todos,e[41]=he):he=e[41];let le;e[42]!==d||e[43]!==$.planRefusal?(le=$.planRefusal&&n.jsx(St,{kind:$.planRefusal,onDismiss:d}),e[42]=d,e[43]=$.planRefusal,e[44]=le):le=e[44];let ue;e[45]!==d||e[46]!==V||e[47]!==K||e[48]!==ee?(ue=ee&&n.jsx(Be,{variant:"error",error:V,onDismiss:d,onFixInChat:K}),e[45]=d,e[46]=V,e[47]=K,e[48]=ee,e[49]=ue):ue=e[49];let fe;e[50]!==c||e[51]!==u||e[52]!==U||e[53]!==ie?(fe=ie&&n.jsx(Be,{variant:"warning",finishReason:u,onDismiss:c,onContinue:U}),e[50]=c,e[51]=u,e[52]=U,e[53]=ie,e[54]=fe):fe=e[54];const _e=ce&&n.jsx(ta,{approvals:M,isStreaming:f,onRespond:J},Ve),ve=$.hasPlans&&n.jsx(na,{plans:L,isStreaming:f,onApprove:re,onDismiss:S},pe),De=$.hasTaskSuggestion&&n.jsx(xa,{parts:F,isStreaming:f,onRespond:ne},F.at(-1)?.toolCallId??"");let ye;e[55]!==$.isWaitingForUserInput||e[56]!==P||e[57]!==f||e[58]!==ae||e[59]!==E?(ye=$.isWaitingForUserInput&&n.jsx(ls,{userAskParts:E,isStreaming:f,onSubmit:P},ae),e[55]=$.isWaitingForUserInput,e[56]=P,e[57]=f,e[58]=ae,e[59]=E,e[60]=ye):ye=e[60];let je;return e[61]!==de||e[62]!==he||e[63]!==le||e[64]!==ue||e[65]!==fe||e[66]!==_e||e[67]!==ve||e[68]!==De||e[69]!==ye?(je=n.jsxs("div",{className:de,children:[he,le,ue,fe,_e,ve,De,ye]}),e[61]=de,e[62]=he,e[63]=le,e[64]=ue,e[65]=fe,e[66]=_e,e[67]=ve,e[68]=De,e[69]=ye,e[70]=je):je=e[70],je}function Pa(t){return t.approvalId}function Ea(t){return t.toolCallId}function Ra(){document.querySelector("[data-chat-input]")?.focus()}function Ua(t){return t.type==="tool-user_ask"}Fe.Error=function(e){return n.jsx(Be,{variant:"error",error:e.error,onDismiss:e.onDismiss,onFixInChat:e.onFixInChat})};Fe.Warning=function(e){return n.jsx(Be,{variant:"warning",finishReason:e.finishReason,onDismiss:e.onDismiss,onContinue:e.onContinue})};Fe.UserAskQuestion=ls;function cs(t){const e=D.c(20),{taskId:s}=t,o=Q(),a=dn(s),i=un(a),r=pn(),{stop:l,removeLocalMessage:V}=Ue();if(i.length===0)return null;let d;e[0]!==o?(d=o("chat.queueTray.sendNow"),e[0]=o,e[1]=d):d=e[1];let u;e[2]!==l?(u=()=>{l()},e[2]=l,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Lt,{size:14}),e[4]=c):c=e[4];let p;e[5]!==d||e[6]!==u?(p=n.jsx(at,{asChild:!0,children:n.jsx(Y,{type:"button",variant:"ghost",size:"icon-sm","aria-label":d,onClick:u,children:c})}),e[5]=d,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==o?(f=o("chat.queueTray.sendNow"),e[8]=o,e[9]=f):f=e[9];let h;e[10]!==f?(h=n.jsx(it,{side:"top",children:n.jsx("p",{className:"text-xs",children:f})}),e[10]=f,e[11]=h):h=e[11];let m;e[12]!==p||e[13]!==h?(m=n.jsxs(rt,{delayDuration:400,children:[p,h]}),e[12]=p,e[13]=h,e[14]=m):m=e[14];let g;return e[15]!==r||e[16]!==V||e[17]!==o||e[18]!==s?(g=(v,x)=>n.jsxs("div",{className:"group/queuerow flex items-center gap-2 px-3 py-1.5",children:[n.jsx("span",{className:"flex size-[18px] shrink-0 items-center justify-center rounded-full bg-muted text-2xs font-semibold text-muted-foreground dark:bg-background",children:x+1}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:v.text}),n.jsx("div",{className:"flex shrink-0 items-center gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/queuerow:opacity-100",children:n.jsx(Y,{type:"button",variant:"ghost",size:"icon-sm",title:o("chat.queueTray.removeFromQueue"),"aria-label":o("chat.queueTray.removeFromQueue"),onClick:()=>{r.cancel(s,v.messageId).then(b=>{b&&(hn(s,v.messageId),V(v.messageId))})},children:n.jsx(Ut,{className:"size-3.5"})})})]},v.messageId),e[15]=r,e[16]=V,e[17]=o,e[18]=s,e[19]=g):g=e[19],n.jsxs("div",{className:"mb-1 overflow-hidden surface dark:bg-muted",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border py-1.5 pr-2 pl-3 text-xs text-muted-foreground",children:[n.jsx("span",{children:o(i.length===1?"chat.queueTray.queuedMessage":"chat.queueTray.queuedMessages",{count:i.length})}),m]}),i.map(g)]})}function ds(t){const e=D.c(3),[s]=we();let o;return e[0]!==s.enableSounds||e[1]!==t?(o=()=>{s.enableSounds&&fo(t.dataUri).catch(i=>{console.warn(`[sound] ${t.name} playback failed:`,i)})},e[0]=s.enableSounds,e[1]=t,e[2]=o):o=e[2],o}const Fa={name:"switch-005",dataUri:"data:audio/mpeg;base64,SUQzBAAAAAAAIlRTU0VAAAAOAAADTGF2ZjYyLjMuMTAwAAAAAAAAAAAAAAD/+1DAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABkAABU4ABMTEx0dHR0nJycnMTExMTs7OztERERETk5OTlhYWFhiYmJibGxsbHZ2dnZ/f39/iYmJiZOTk5OdnZ2dp6enp7GxsbG7u7u7xMTExM7Ozs7Y2NjY4uLi4uzs7Oz29vb2/////wAAAABMYXZjNjIuMTEAAAAAAAAAAAAAAAAkBVYAAAAAAAAVOPCP8KUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxAAACEwDXvQRAAG8Ii93HtACUCAABAKCJwfaCEHwfeoEAQdEAYygIHBOCAIAgCAJh9QIOg+D5/ygPh/wfB8DuKAgCHyn9QPh/5SCDv+CEHAQdxOD4B27c39tbckkqYbBAYAN9bNJLB+aXAf5wQAKdzxfbmrVIRQ4xNx3HwnoDmLhfMhgJiiw/HREXNCHqjvHEPEG8QjBYlxQNepJAT0kC8ip6JzSWj1TasoG+iyycbf2Uil1ovf1f/oUtR1qP+s1WSBFKoAAU02BDjMhuP/7UsQEgws8bRpd8YABJYPeBf9wCGXTGxBYcw5AJFMFMAmQQAhGAxgLBgHIAMYAAALhgAchipbe/91aU1VV4zcZj1Vf1XgYCIMBNrsBAIGs9/Ue4i/xFPeqCqwViI9/UeLf///rOngdA3OPHFjmOBv+EQnGahgaZxVplmkAH5JadDTQlNCEuGNiWYbCCONWdUJg6HXNazFdu1T+VgaEpOP70exv7f2/4b/yH//2/4cqCX/zWRUrIw+IPNMNlDnjAXQas/I4AzmYifA0tMSCgQDF//tSxBCDSzzi3k/sQwEyCtjJ/rBZAk+Uqj1YhA5YMCAAMwgOUchTkK7OR7LbMl0W1H6SvzG0Q2ZzfKUhnmTobv9DNhS1v7P8h//8Gv8gTRt1jReZ7YEjmMQg9hhwwMycHooasFmZyjcZGBKJD+IwbMCQQLoi+IQXCcIoydKoilI2MWFS5uJdDEu2taRrYI2ZSqKY50pJLv2NfjUAAuQAMfqVQ/T3PDQgMJMeEZ45hJzY6MNoFMxqTj1zNGQKJjAxEsSCBgQJBSIL0mcKYQJfVAn/+1LEGwLKlEKrD3MiYcuMkVa/wABB8Vh6M1q1epbvXwWBURhkyEhWZ/////////////9gjZ/Wt4w+4MNMCpE4TBYQl4w1IHvMDdA2zBngBMwc8COMDhCpDAfgOAAgrBgNYU+YC0FBGAkAMpgWoSCYAGESGBGAKBgXgJOdiOJmMCmNwCYNDJhYRPykRCJhTBnEUzlsjv4UNLj/z97n3Mv/7z1nZqyitYAZIqErIwMwJAqEw0GAAMFptJMaqFwB8CQIWlhuhuDAwNjfuwrQFAYXCf/7UsQVAA+9PTP42gYRdiIu9zBwAPbFUCi0DAhgNcS+7cDwVgM05A9bUDeuQMyE/u3CygVISgZhpIau/9PhdQG2C9DpxZZJmn/dn/Psmt0EFm////l84ThUTopE4VD/9JkubOGasTvN30C20G21qgUCkVCoUCgPMywrPCGly27V5q5t24vl/8jSlSAPCxzNseNCw3oh3NGBu4BZJ5hv7DRSfR/+eWG7nA8IKh2Olv5iz3q5m3//Joxo3JqNyYkSuGt/k6D4DeoBOHmHdl0dkZYA//tSxAUAC4B1Z/2DADEcA17Z/uhI4Yoik/TrZo+ww7UtmpW4LDWu2IacoJKJJeTSM+ZmAYBEiU+ZnnAwCn1VVVV6JUJQVnioKhrgqdKgqGpUFeCp0sDR3ztQNREDRUFioKuxKCpYGQBlRIBk+aLwb8KblGQVDdphPYTUdBOGbVpAaTF6ZdjEV0iRUZRCYkA4oUQDx5zqDugtXvza/7fuNNvfZ+j9v+T/2f//J/4cAAOTpE5K4zksR9MfIB+TDcQTI4gNs1XKAzEFUrGkxABYEBb/+1LEEYNKrEjgT/TCwYYVmUX+mHoKgWhKU5Eiw9SFIRmppw+3fYo4siPhUFeexM8KgIO6wVuPDDy01qeRaVbw357//y3+o8M0pBNlNLCGBzGKwyYw2IIFOE1WNTjRM6x8MlA1AxDhUHTAkEiyKpnbWrLcaOBotBUKbk1pypcWDAIK00AhKLGkUco6q9VWvM53mcaq3tVa8zjTM/tX//EDP//////////XAAmrwAAPoKwcw0ShDCZD/BQlhzinxQdorsOuXTEIC01ZkJyu4k/qPP/7UsQUAEjkrrkvZaPBIRXUoe5QObfMhYKX9RVgTPqCSCaSCaSC0XVdV1f/////6IAlguuAJSiDRNloNBsZg+0+Ts8MMCn81WUTRAlIi+GHECD0y8AWDIqswYsxGOSKVV7MqOni8tkVOip0fZX/////9HrMCbAz2EHGS4GKAAiRAAAYAcDdKd4G6Z/nwYgJ0ZAIgZyC8aPAs/iPBhwMpWDQNARltNS5Y61v//9i8Yl4SkFkIGTkAc0UBrIYLPA4MYBEy+YLMRuY4nhTC3hZA68H//tSxCoAyQC6mY6CkWDJBIsBz/QUrgNmahSzcrYw0/HhfnMAZBojDsgTFkDR5MDkG/DZEbk2FCmowqdqv2TYABiJwqqYjaQRGZ1URZ1DhSsdiHX/GBu0QpzIBNSaLqZ0ARkwFARxMrpt/Eh47mbQAhhU6sisFUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LESoHHJCRaj/dmYAIAQAAQAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsSLg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsShg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",duration:.609,format:"mp3",license:"CC0",author:"Kenney"},Oa=zs.togglePlanMode.keys.map(t=>t==="Shift"?"⇧":t).join(""),La=[{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/perplexity.png",name:"Perplexity"},{src:"/connections/github.png",name:"GitHub"}];function za(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1.5",children:La.map(Ba)}),t[0]=e):e=t[0],e}function Ba(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-1 ring-border object-cover bg-white"},t.name)}function $a({disabled:t,onOpenConnections:e,virtualMcpId:s,selectedModel:o,isStreaming:a,onUnsupportedFile:i}){const r=Q(),[l,V]=R.useState(!1),d=ds(Fa),{org:u}=Te(),{editor:c}=Rt(),p=R.useRef(null),f=lt(o),h=()=>{!f||a||(V(!1),p.current?.click())},m=async S=>{const O=S.target.files;if(!O||O.length===0||!c)return;const J=Array.from(O);try{let $=c.state.selection.from;for(const ee of J)await Wt(c,o??null,ee,$,i,r),$=c.state.selection.to}finally{p.current&&(p.current.value="")}},g=uo({connectionId:s,orgId:u.id,orgSlug:u.slug}),v=Ms.virtualMcpPrompts(s,u.id),{data:x,isLoading:b}=Ps({queryKey:v,queryFn:()=>po(g),staleTime:6e4,enabled:l&&!!g}),y=x?.prompts??[],[A,k]=R.useState(null),{chatMode:j,setChatMode:w}=tt(),[C,_]=we(),N=Ft()?.lockedHarness!=="claude-code",T=ke.find(S=>S.value===C.toolApprovalLevel)??ke[0],I=r(T.shortKey),E=S=>{const O=ke.find(J=>J.value===S);if(O){if(O.value===C.toolApprovalLevel){V(!1);return}d(),X("chat_approval_level_changed",{from_level:C.toolApprovalLevel,to_level:O.value,source:"tools_popover"}),_({...C,toolApprovalLevel:O.value}),V(!1)}},F=j==="plan",L=()=>{d();const S=F?"default":"plan";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),w(S),V(!1)},M=()=>{e(),V(!1)},q=async(S,O)=>{if(!c||!g)return;const J=vt(S._meta),$={from:c.state.selection.from,to:c.state.selection.to};try{const ee=await ho(g,S.name,O);on(c,$,{id:S.name,name:no(S.name,J),metadata:ee.messages,char:"/",kind:"prompt",args:O})}catch{Ie.error(r("chat.toolsPopover.failedLoadPrompt"))}},K=async S=>{V(!1);const O=!!(S.arguments&&S.arguments.length>0);if(X("chat_prompt_inserted",{prompt_name:S.name,with_arguments:O}),O){k(S);return}await q(S)},Z=async S=>{A&&(await q(A,S),k(null))},U=()=>{d();const S=j==="gen-image"?"default":"gen-image";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),w(S),V(!1)},W=()=>{d();const S=j==="web-search"?"default":"web-search";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),w(S),V(!1)},P=()=>{d();const S=j==="deep-research"?"default":"deep-research";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),w(S),V(!1)},G=j==="gen-image",ne=j==="web-search",H=j==="deep-research",re=n.jsx("input",{ref:p,type:"file",multiple:!0,accept:ao(o??null),className:"hidden",onChange:m,disabled:a});return n.jsxs(n.Fragment,{children:[re,n.jsxs(Es,{open:l,onOpenChange:S=>{S&&!l&&X("chat_tools_popover_opened",{chat_mode:j}),V(S)},children:[n.jsx(Rs,{asChild:!0,children:n.jsxs(Y,{type:"button",variant:"ghost",size:"default",disabled:t,title:r("chat.toolsPopover.tools"),"aria-label":r("chat.toolsPopover.tools"),className:B("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),children:[n.jsx(Rn,{size:14}),n.jsx("span",{className:B("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),children:r("chat.toolsPopover.tools")})]})}),n.jsxs(Us,{align:"start",className:"w-56 p-1.5 space-y-1",children:[f?n.jsxs(be,{onClick:h,disabled:a,children:[n.jsx(bt,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.addFile")})]}):n.jsxs(rt,{children:[n.jsx(at,{asChild:!0,children:n.jsxs(be,{"aria-disabled":"true",className:"opacity-50 cursor-not-allowed",onSelect:S=>S.preventDefault(),children:[n.jsx(bt,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.addFile")})]})}),n.jsx(it,{side:"right",children:r("chat.toolsPopover.modelNoFileSupport")})]}),n.jsxs(be,{onClick:L,className:B(F&&"text-special"),children:[n.jsx(zt,{size:16,className:B(F&&"text-special")}),n.jsx("span",{className:"flex-1 whitespace-nowrap",children:r("chat.toolsPopover.planMode")}),n.jsx("span",{className:B("text-xs text-muted-foreground",F&&"text-special font-medium"),children:Oa})]}),n.jsxs(be,{onClick:U,className:B(G&&"text-special"),children:[n.jsx(Qt,{size:16,className:B(G&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.createImage")}),G&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(be,{onClick:W,className:B(ne&&"text-special"),children:[n.jsx(qt,{size:16,className:B(ne&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.webSearch")}),ne&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(be,{onClick:P,className:B(H&&"text-special"),children:[n.jsx(Kt,{size:16,className:B(H&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.deepResearch")}),H&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(pt,{children:[n.jsxs(ht,{className:"gap-2",children:[n.jsx("span",{className:"flex size-4 items-center justify-center text-base font-medium text-muted-foreground",children:"/"}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.prompts")})]}),n.jsx(ft,{className:"w-80 max-h-72 overflow-y-auto p-1.5",children:b?n.jsxs("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-muted-foreground",children:[n.jsx(Fs,{className:"size-3.5"}),r("chat.toolsPopover.loadingPrompts")]}):y.length===0?n.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:r("chat.toolsPopover.noPromptsAvailable")}):y.map(S=>n.jsxs(be,{onClick:()=>K(S),className:"flex flex-col items-start gap-0.5",children:[n.jsx("span",{className:"font-medium text-sm capitalize",children:S.title||so(S.name,vt(S._meta))}),S.description&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:S.description})]},S.name))})]}),N&&n.jsxs(pt,{children:[n.jsxs(ht,{className:"gap-2",children:[n.jsx($e,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.approval")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:I})]}),n.jsx(ft,{className:"w-48 p-1.5",children:n.jsx(Os,{value:C.toolApprovalLevel,onValueChange:E,children:ke.map(S=>n.jsx(Ls,{value:S.value,children:r(S.labelKey)},S.value))})})]}),n.jsxs(be,{onClick:M,children:[n.jsx(Un,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.connections")}),n.jsx(R.Suspense,{children:n.jsx(za,{})})]})]})]}),n.jsx(nn,{prompt:A,setPrompt:k,onSubmit:Z})]})}const qa=[{src:"/connections/github.png",name:"GitHub"},{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/linear.png",name:"Linear"},{src:"/connections/shopify.png",name:"Shopify"},{src:"/connections/firecrawl.png",name:"Firecrawl"},{src:"/connections/perplexity.png",name:"Perplexity"}];function Ka(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1",children:qa.map(Qa)}),t[0]=e):e=t[0],e}function Qa(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-2 ring-muted object-cover bg-white"},t.name)}function Ya(t){const e=D.c(10),{onClick:s}=t,o=Q();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=B("group relative z-10 flex items-center gap-3 w-full px-4 py-3","rounded-b-2xl","cursor-pointer"),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("chat.connectionsBanner.description"),e[1]=o,e[2]=i):i=e[2];let r;e[3]!==i?(r=n.jsx("p",{className:"flex-1 text-xs text-muted-foreground truncate text-left",children:i}),e[3]=i,e[4]=r):r=e[4];let l,V;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ka,{}),V=n.jsx(Bs,{size:14,className:"shrink-0 text-muted-foreground/60 group-hover:text-muted-foreground transition-colors"}),e[5]=l,e[6]=V):(l=e[5],V=e[6]);let d;return e[7]!==s||e[8]!==r?(d=n.jsxs("button",{type:"button",onClick:s,className:a,children:[r,l,V]}),e[7]=s,e[8]=r,e[9]=d):d=e[9],d}function Wa(t){const e=D.c(4),{data:s}=t;let o;e[0]!==s?(o=s.map(Ga),e[0]=s,e[1]=o):o=e[1];let a;return e[2]!==o?(a=n.jsx("div",{className:"flex items-center justify-center gap-[2px] h-10 overflow-hidden","aria-hidden":"true",children:o}),e[2]=o,e[3]=a):a=e[3],a}function Ga(t,e){return n.jsx("div",{className:"w-[2px] shrink-0 rounded-full bg-chart-2 transition-[height] duration-75 ease-out",style:{height:`${Math.max(4,Math.round(t*40))}px`}},e)}const Pe=12e3,Nt=oe({token:te(),expiresAt:qs()});Ks("provider",[oe({provider:Ae("elevenlabs"),conversationToken:te().min(1)}),oe({provider:Ae("openai"),transport:Ae("webrtc")})]);const Ha=$s([Nt.extend({provider:Ae("elevenlabs").default("elevenlabs"),conversationToken:te().min(1)}),Nt.extend({provider:Ae("openai"),transport:Ae("webrtc")})]);oe({token:te().min(1).max(4096),text:te().trim().min(1).max(Pe)});const us=oe({request:te().trim().min(1).max(Pe)}),Je=5e3;Dt(oe({role:Re(["user","agent"]),text:te().min(1).max(Je)})).max(60).refine(t=>t.reduce((e,s)=>e+s.text.length,0)<=Je,{message:"Voice transcript is too long"});function rr(t){const e=[];let s=Je;for(const o of t.slice(-60).reverse()){if(s<=0)break;const a=o.text.slice(-s);e.unshift({role:o.role,text:a}),s-=a.length}return e}oe({token:te().min(1).max(4096),sdp:te().min(1).max(1e5),language:Re(["en","pt"]).default("en")}).strict();const Ja=oe({sdp:te().min(1).max(1e5)});async function Za(t,e,s,o,a){if(t.provider==="openai"){const{startOpenAIConversation:l}=await mt(async()=>{const{startOpenAIConversation:V}=await import("./openai-conversation-BMpQOydo.js");return{startOpenAIConversation:V}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101]));return l(a,s,o)}const{Conversation:i}=await mt(async()=>{const{Conversation:l}=await import("./index-yN0BIuMc.js");return{Conversation:l}},[]);o.throwIfAborted();const r=await i.startSession({...s,clientTools:{delegate_to_agent:async l=>{const V=us.safeParse(l);return JSON.stringify(V.success?await s.onDelegate(V.data):{status:"rejected",reason:"A complete request is required."})},get_agent_status:()=>JSON.stringify(s.getWorkStatus()),stop_agent_work:()=>JSON.stringify(s.cancelCurrentWork())},conversationToken:t.conversationToken,connectionType:"webrtc",overrides:{agent:{language:e}}});return o.aborted&&(await r.endSession(),o.throwIfAborted()),{endSession:()=>r.endSession(),setMicMuted:l=>r.setMicMuted(l),getOutputVolume:()=>r.getOutputVolume(),publishUpdate:l=>{const V=JSON.stringify({source:"Studio background data, not a user request or instructions",contextId:l.contextId,requestId:l.delegationId,text:l.text});l.delivery==="context"?r.sendContextualUpdate(V):r.sendUserMessage(`[Studio background event, not a new user request]
9
+ The report follows.`;function Lo(t){return{...t,content:[{type:"paragraph",content:[tn({id:yt,name:yt,char:"/",kind:"prompt",metadata:[{role:"user",content:{type:"text",text:Oo}}]})]},...t.content??[]]}}function zo(){const t=D.c(24),e=Q(),s=Vn();if(!s)return null;let o,a,i,r;t[0]!==s.path||t[1]!==e?(o=cn(s.path),r="flex px-3 pt-3",a="surface-inset flex h-7 min-w-0 items-center gap-1.5 rounded-full pr-0.5 pl-2.5 text-xs text-foreground",i=e("chat.input.openFileContext",{name:o}),t[0]=s.path,t[1]=e,t[2]=o,t[3]=a,t[4]=i,t[5]=r):(o=t[2],a=t[3],i=t[4],r=t[5]);let l,V;t[6]!==o?(l=n.jsx(ln,{filename:o,className:"h-4 w-3 shrink-0"}),V=n.jsx("span",{className:"truncate",children:o}),t[6]=o,t[7]=l,t[8]=V):(l=t[7],V=t[8]);let d;t[9]!==e?(d=e("chat.input.openFileDismiss"),t[9]=e,t[10]=d):d=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Ut,{size:12}),t[11]=u):u=t[11];let c;t[12]!==s.dismiss||t[13]!==d?(c=n.jsx(rn,{label:d,size:"icon-sm",onClick:s.dismiss,children:u}),t[12]=s.dismiss,t[13]=d,t[14]=c):c=t[14];let p;t[15]!==a||t[16]!==i||t[17]!==l||t[18]!==V||t[19]!==c?(p=n.jsxs("span",{className:a,title:i,children:[l,V,c]}),t[15]=a,t[16]=i,t[17]=l,t[18]=V,t[19]=c,t[20]=p):p=t[20];let f;return t[21]!==r||t[22]!==p?(f=n.jsx("div",{className:r,children:p}),t[21]=r,t[22]=p,t[23]=f):f=t[23],f}function Bo(t){return{autosend:vn,sidepanel:!0,...t?{mainpanel:!1}:{}}}function $o(t){const e=D.c(30),{current:s,total:o,onPrev:a,onNext:i}=t,r=Q();if(o<=1)return null;const l=s===0,V=s===0?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let d;e[0]!==V?(d=B("p-0.5 transition-colors rounded-lg",V),e[0]=V,e[1]=d):d=e[1];let u;e[2]!==r?(u=r("chat.pagination.previousLabel"),e[2]=r,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Gn,{size:14}),e[4]=c):c=e[4];let p;e[5]!==a||e[6]!==l||e[7]!==d||e[8]!==u?(p=n.jsx("button",{type:"button",onClick:a,disabled:l,className:d,"aria-label":u,children:c}),e[5]=a,e[6]=l,e[7]=d,e[8]=u,e[9]=p):p=e[9];const f=s+1;let h;e[10]!==r||e[11]!==f||e[12]!==o?(h=r("chat.pagination.counter",{current:f,total:o}),e[10]=r,e[11]=f,e[12]=o,e[13]=h):h=e[13];let m;e[14]!==h?(m=n.jsx("span",{className:"tabular-nums text-xs",children:h}),e[14]=h,e[15]=m):m=e[15];const g=s===o-1,v=s===o-1?"opacity-30 cursor-not-allowed":"hover:text-foreground cursor-pointer";let x;e[16]!==v?(x=B("p-0.5 transition-colors rounded-lg",v),e[16]=v,e[17]=x):x=e[17];let b;e[18]!==r?(b=r("chat.pagination.nextLabel"),e[18]=r,e[19]=b):b=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(Ot,{size:14}),e[20]=y):y=e[20];let A;e[21]!==i||e[22]!==g||e[23]!==x||e[24]!==b?(A=n.jsx("button",{type:"button",onClick:i,disabled:g,className:x,"aria-label":b,children:y}),e[21]=i,e[22]=g,e[23]=x,e[24]=b,e[25]=A):A=e[25];let k;return e[26]!==A||e[27]!==p||e[28]!==m?(k=n.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[p,m,A]}),e[26]=A,e[27]=p,e[28]=m,e[29]=k):k=e[29],k}function es(t){const e=D.c(8),{currentIndex:s,total:o,onPrev:a,onNext:i,extraLeft:r}=t;let l;e[0]!==s||e[1]!==i||e[2]!==a||e[3]!==o?(l=n.jsx($o,{current:s,total:o,onPrev:a,onNext:i}),e[0]=s,e[1]=i,e[2]=a,e[3]=o,e[4]=l):l=e[4];let V;return e[5]!==r||e[6]!==l?(V=n.jsxs("div",{className:"flex items-center gap-2",children:[l,r]}),e[5]=r,e[6]=l,e[7]=V):V=e[7],V}function qo(t){const e=D.c(17),{isStreaming:s,isAllAnswered:o,isCurrentAnswered:a,onAdvanceOrSubmit:i,submitLabel:r,nextLabel:l}=t,u=o?r===void 0?"Submit":r:l===void 0?"Next":l,c=o?s:!a,p=c?o?"Waiting for the assistant to finish…":"Answer this item to continue":null;let f;e[0]!==c||e[1]!==i?(f=()=>{c||i()},e[0]=c,e[1]=i,e[2]=f):f=e[2];const h=c&&"opacity-50 cursor-not-allowed";let m;e[3]!==h?(m=B("h-7 px-2.5 text-xs",h),e[3]=h,e[4]=m):m=e[4];let g;e[5]!==c||e[6]!==u||e[7]!==f||e[8]!==m?(g=n.jsx(Y,{type:"button",size:"sm","aria-disabled":c,onClick:f,className:m,children:u}),e[5]=c,e[6]=u,e[7]=f,e[8]=m,e[9]=g):g=e[9];const v=g;if(!p)return v;let x;e[10]!==v?(x=n.jsx(at,{asChild:!0,children:v}),e[10]=v,e[11]=x):x=e[11];let b;e[12]!==p?(b=n.jsx(it,{children:p}),e[12]=p,e[13]=b):b=e[13];let y;return e[14]!==x||e[15]!==b?(y=n.jsxs(rt,{children:[x,b]}),e[14]=x,e[15]=b,e[16]=y):y=e[16],y}function ts(t,e,s){return t.findIndex(o=>e(o)===s)}function jt(t,e,s,o){return t.length===0?!1:t.every(a=>o(s[e(a)]))}function kt(t,e,s,o,a){if(t.length===0)return null;const i=ts(t,e,a);for(let r=1;r<=t.length;r++){const l=t[(i+r)%t.length];if(!l)continue;const V=e(l);if(V!==a&&!o(s[V]))return V}return null}function Ko(t){return!t.isStreaming&&t.allAnswered}function ss(t){const{parts:e,partKey:s,schema:o,defaultValues:a,isStreaming:i,hasAnswer:r,onSubmit:l}=t,V=e[0]?s(e[0]):"",[d,u]=R.useState(V),[c,p]=R.useState(!1),f=gs({resolver:xs(o),defaultValues:a}),h=f.watch(),m=ts(e,s,d),g=m>=0?e[m]:void 0,v=r(h[d]),x=jt(e,s,h,r),b=Ko({isStreaming:i,allAnswered:x}),y=()=>{if(m>0){const N=e[m-1];N&&u(s(N))}},A=()=>{if(m>=0&&m<e.length-1){const N=e[m+1];N&&u(s(N))}},k=()=>{const N=f.getValues(),T=kt(e,s,N,r,d);T&&u(T)},j=()=>{f.handleSubmit(N=>{const T=N;for(const I of e)l(I,T[s(I)])})()},w=R.useRef(j);w.current=j;const C=()=>{b&&(p(!1),w.current())},_=()=>{const N=f.getValues();if(jt(e,s,N,r)){if(i){p(!0);return}p(!1),w.current()}else{const T=kt(e,s,N,r,d);T&&u(T)}};return R.useEffect(()=>{if(c&&!i){if(!x){p(!1);return}p(!1),w.current()}},[c,i,x]),{form:f,activeKey:d,setActiveKey:u,currentIndex:m,currentPart:g,isCurrentAnswered:v,isAllAnswered:x,canSubmit:b,goPrev:y,goNext:A,advanceToNextUnanswered:k,submit:C,submitOrAdvance:_}}const ns="chat.approval.defaultDenyReason";function os(t){const e=D.c(36),{onYolo:s}=t,o=Q(),[a,i]=we();let r,l,V,d,u,c,p,f,h;if(e[0]!==s||e[1]!==a||e[2]!==i||e[3]!==o){const y=ke.find(j=>j.value===a.toolApprovalLevel)??ke[0];let A;e[13]!==s||e[14]!==a||e[15]!==i?(A=j=>{const w=j,C=a.toolApprovalLevel??"readonly";i({...a,toolApprovalLevel:w}),w==="auto"&&s(C)},e[13]=s,e[14]=a,e[15]=i,e[16]=A):A=e[16];const k=A;V=qn,f=a.toolApprovalLevel,h=k,l=Kn,u="xs",c="text-xs text-muted-foreground border-border/60 bg-transparent hover:bg-accent h-7 gap-1",p=Qo,r=Qn,d=o(y.shortKey),e[0]=s,e[1]=a,e[2]=i,e[3]=o,e[4]=r,e[5]=l,e[6]=V,e[7]=d,e[8]=u,e[9]=c,e[10]=p,e[11]=f,e[12]=h}else r=e[4],l=e[5],V=e[6],d=e[7],u=e[8],c=e[9],p=e[10],f=e[11],h=e[12];let m;e[17]!==r||e[18]!==d?(m=n.jsx(r,{children:d}),e[17]=r,e[18]=d,e[19]=m):m=e[19];let g;e[20]!==l||e[21]!==u||e[22]!==c||e[23]!==p||e[24]!==m?(g=n.jsx(l,{size:u,className:c,onClick:p,children:m}),e[20]=l,e[21]=u,e[22]=c,e[23]=p,e[24]=m,e[25]=g):g=e[25];let v;e[26]!==o?(v=ke.map(y=>n.jsx($n,{value:y.value,children:o(y.labelKey)},y.value)),e[26]=o,e[27]=v):v=e[27];let x;e[28]!==v?(x=n.jsx(Yn,{children:v}),e[28]=v,e[29]=x):x=e[29];let b;return e[30]!==V||e[31]!==x||e[32]!==f||e[33]!==h||e[34]!==g?(b=n.jsxs(V,{value:f,onValueChange:h,children:[g,x]}),e[30]=V,e[31]=x,e[32]=f,e[33]=h,e[34]=g,e[35]=b):b=e[35],b}function Qo(t){return t.stopPropagation()}function as(t){const e=D.c(8),{input:s}=t,o=Q();if(s==null){let r;e[0]!==o?(r=o("chat.approval.noInput"),e[0]=o,e[1]=r):r=e[1];let l;return e[2]!==r?(l=n.jsx("div",{className:"px-4 text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=l):l=e[3],l}let a;try{let r;e[4]!==s?(r=JSON.stringify(s,null,2),e[4]=s,e[5]=r):r=e[5],a=r}catch{a=String(s)}let i;return e[6]!==a?(i=n.jsx("div",{className:"px-4",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word max-h-32 overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:a})}),e[6]=a,e[7]=i):i=e[7],i}function Yo(t){const e=D.c(38),{approval:s,onRespond:o}=t,a=Q(),[i]=we(),r=i.toolApprovalLevel??"readonly";let l;e[0]!==s.approvalId||e[1]!==r||e[2]!==o||e[3]!==a?(l=()=>o(s.approvalId,!1,a(ns),r),e[0]=s.approvalId,e[1]=r,e[2]=o,e[3]=a,e[4]=l):l=e[4];const V=l;let d;e[5]!==s.approvalId||e[6]!==r||e[7]!==o?(d=()=>o(s.approvalId,!0,void 0,r),e[5]=s.approvalId,e[6]=r,e[7]=o,e[8]=d):d=e[8];const u=d;let c;e[9]!==s.approvalId||e[10]!==o?(c=C=>o(s.approvalId,!0,void 0,C),e[9]=s.approvalId,e[10]=o,e[11]=c):c=e[11];const p=c;let f;e[12]!==p?(f=n.jsx("div",{className:"flex items-center gap-2",children:n.jsx(os,{onYolo:p})}),e[12]=p,e[13]=f):f=e[13];const h=f;let m;e[14]!==a?(m=a("chat.approval.denyButton"),e[14]=a,e[15]=m):m=e[15];let g;e[16]!==V||e[17]!==m?(g=n.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:V,children:m}),e[16]=V,e[17]=m,e[18]=g):g=e[18];let v;e[19]!==a?(v=a("chat.approval.acceptButton"),e[19]=a,e[20]=v):v=e[20];let x;e[21]!==u||e[22]!==v?(x=n.jsx(Y,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs active:scale-[0.97] transition-transform",onClick:u,children:v}),e[21]=u,e[22]=v,e[23]=x):x=e[23];let b;e[24]!==g||e[25]!==x?(b=n.jsxs(n.Fragment,{children:[g,x]}),e[24]=g,e[25]=x,e[26]=b):b=e[26];const y=b;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx($e,{size:14}),e[27]=A):A=e[27];let k;e[28]!==a?(k=a("chat.approval.needsApproval"),e[28]=a,e[29]=k):k=e[29];let j;e[30]!==s.input?(j=n.jsx(as,{input:s.input}),e[30]=s.input,e[31]=j):j=e[31];let w;return e[32]!==s.friendlyName||e[33]!==h||e[34]!==y||e[35]!==k||e[36]!==j?(w=n.jsx(xe,{icon:A,label:k,title:s.friendlyName,defaultExpanded:!0,footerLeft:h,footerRight:y,children:j}),e[32]=s.friendlyName,e[33]=h,e[34]=y,e[35]=k,e[36]=j,e[37]=w):w=e[37],w}const Wo=vs(te(),oe({approved:bs().optional(),levelOverride:Re(["auto","readonly"]).optional()}));function Go(t){const e=D.c(46),{approvals:s,isStreaming:o,onRespond:a}=t,i=Q(),[r]=we(),l=r.toolApprovalLevel??"readonly";let V;e[0]!==s?(V=Object.fromEntries(s.map(Zo)),e[0]=s,e[1]=V):V=e[1];const d=V;let u;e[2]!==l||e[3]!==a||e[4]!==i?(u=(T,I)=>{const E=I;typeof E?.approved=="boolean"&&a(T.approvalId,E.approved,E.approved===!1?i(ns):void 0,E.levelOverride??l)},e[2]=l,e[3]=a,e[4]=i,e[5]=u):u=e[5];let c;e[6]!==s||e[7]!==d||e[8]!==o||e[9]!==u?(c={parts:s,partKey:Jo,schema:Wo,defaultValues:d,isStreaming:o,hasAnswer:Ho,onSubmit:u},e[6]=s,e[7]=d,e[8]=o,e[9]=u,e[10]=c):c=e[10];const p=ss(c);let f;e[11]!==s||e[12]!==p?(f=T=>{p.form.reset(Object.fromEntries(s.map(I=>[I.approvalId,{approved:!0,levelOverride:T}]))),p.submitOrAdvance()},e[11]=s,e[12]=p,e[13]=f):f=e[13];const h=f,m=p.currentPart,g=p.form;let v;e[14]!==p?(v=T=>{T.preventDefault(),p.submit()},e[14]=p,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx($e,{size:14}),e[16]=x):x=e[16];let b;e[17]!==s.length||e[18]!==i?(b=i("chat.approval.batchedLabel",{count:s.length}),e[17]=s.length,e[18]=i,e[19]=b):b=e[19];const y=m?.friendlyName??"";let A;e[20]!==h?(A=n.jsx(os,{onYolo:h}),e[20]=h,e[21]=A):A=e[21];let k;e[22]!==s.length||e[23]!==p.currentIndex||e[24]!==p.goNext||e[25]!==p.goPrev||e[26]!==A?(k=n.jsx(es,{currentIndex:p.currentIndex,total:s.length,onPrev:p.goPrev,onNext:p.goNext,extraLeft:A}),e[22]=s.length,e[23]=p.currentIndex,e[24]=p.goNext,e[25]=p.goPrev,e[26]=A,e[27]=k):k=e[27];let j;e[28]!==m||e[29]!==p.form.control||e[30]!==p.submitOrAdvance?(j=m?n.jsx(Xo,{approvalId:m.approvalId,control:p.form.control,onChange:p.submitOrAdvance}):null,e[28]=m,e[29]=p.form.control,e[30]=p.submitOrAdvance,e[31]=j):j=e[31];let w;e[32]!==m?(w=m?n.jsx(as,{input:m.input}):null,e[32]=m,e[33]=w):w=e[33];let C;e[34]!==k||e[35]!==j||e[36]!==w||e[37]!==b||e[38]!==y?(C=n.jsx(xe,{icon:x,label:b,title:y,defaultExpanded:!0,footerLeft:k,footerRight:j,children:w}),e[34]=k,e[35]=j,e[36]=w,e[37]=b,e[38]=y,e[39]=C):C=e[39];let _;e[40]!==C||e[41]!==v?(_=n.jsx("form",{onSubmit:v,children:C}),e[40]=C,e[41]=v,e[42]=_):_=e[42];let N;return e[43]!==p.form||e[44]!==_?(N=n.jsx(He,{...g,children:_}),e[43]=p.form,e[44]=_,e[45]=N):N=e[45],N}function Ho(t){return typeof t?.approved=="boolean"}function Jo(t){return t.approvalId}function Zo(t){return[t.approvalId,{approved:void 0}]}function Xo(t){const e=D.c(7),{approvalId:s,control:o,onChange:a}=t,i=Q(),r=`${s}.approved`;let l;e[0]!==a||e[1]!==i?(l=d=>{const{field:u}=d,c=u.value===!0,p=u.value===!1;return n.jsxs(n.Fragment,{children:[n.jsx(Y,{type:"button",variant:p?"secondary":"ghost",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!1),a()},"aria-pressed":p,children:i("chat.approval.denyButton")}),n.jsx(Y,{type:"button",variant:c?"default":"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{u.onChange(!0),a()},"aria-pressed":c,children:i("chat.approval.acceptButton")})]})},e[0]=a,e[1]=i,e[2]=l):l=e[2];let V;return e[3]!==o||e[4]!==r||e[5]!==l?(V=n.jsx(As,{control:o,name:r,render:l}),e[3]=o,e[4]=r,e[5]=l,e[6]=V):V=e[6],V}function ea(){const t=D.c(5),e=Q();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx($e,{className:"size-5 text-muted-foreground animate-pulse motion-reduce:animate-none"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.approval.preparingRequest"),t[1]=e,t[2]=o):o=t[2];let a;return t[3]!==o?(a=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=a):a=t[4],a}function ta(t){const e=D.c(8),{approvals:s,isStreaming:o,onRespond:a}=t;if(o&&s.length===0){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ea,{}),e[0]=r):r=e[0],r}if(s.length===0)return null;if(s.length===1){const r=s[0];if(!r)return null;let l;return e[1]!==a||e[2]!==r?(l=n.jsx(Yo,{approval:r,onRespond:a}),e[1]=a,e[2]=r,e[3]=l):l=e[3],l}let i;return e[4]!==s||e[5]!==o||e[6]!==a?(i=n.jsx(Go,{approvals:s,isStreaming:o,onRespond:a}),e[4]=s,e[5]=o,e[6]=a,e[7]=i):i=e[7],i}function sa(t){const e=D.c(28),{plan:s,onApprove:o,onDismiss:a}=t,i=Q();let r;e[0]!==o||e[1]!==s.plan?(r=()=>{o(s.plan)},e[0]=o,e[1]=s.plan,e[2]=r):r=e[2];const l=r;let V;e[3]!==i?(V=i("chat.proposePlan.keepIterating"),e[3]=i,e[4]=V):V=e[4];let d;e[5]!==a||e[6]!==V?(d=n.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-7 px-2.5 text-xs text-muted-foreground [@media(hover:hover)]:hover:text-foreground active:scale-[0.97] transition-transform",onClick:a,children:V}),e[5]=a,e[6]=V,e[7]=d):d=e[7];let u;e[8]!==i?(u=i("chat.proposePlan.letsGo"),e[8]=i,e[9]=u):u=e[9];let c;e[10]!==l||e[11]!==u?(c=n.jsx(Y,{type:"button",size:"sm",className:"h-7 px-2.5 text-xs bg-special hover:bg-special/90 text-special-foreground active:scale-[0.97] transition-transform",onClick:l,children:u}),e[10]=l,e[11]=u,e[12]=c):c=e[12];let p;e[13]!==d||e[14]!==c?(p=n.jsxs(n.Fragment,{children:[d,c]}),e[13]=d,e[14]=c,e[15]=p):p=e[15];const f=p;let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Bt,{size:14}),e[16]=h):h=e[16];let m;e[17]!==i?(m=i("chat.proposePlan.planReady"),e[17]=i,e[18]=m):m=e[18];let g;e[19]!==i?(g=i("chat.proposePlan.implementationPlan"),e[19]=i,e[20]=g):g=e[20];let v;e[21]!==s.plan?(v=n.jsx("div",{className:"px-4 max-h-64 overflow-y-auto",children:n.jsx("div",{className:"prose prose-sm max-w-none text-sm",children:n.jsx(sn,{id:"plan-preview",part:{type:"text",text:s.plan}})})}),e[21]=s.plan,e[22]=v):v=e[22];let x;return e[23]!==f||e[24]!==v||e[25]!==m||e[26]!==g?(x=n.jsx(xe,{icon:h,label:m,title:g,defaultExpanded:!0,footerRight:f,children:v}),e[23]=f,e[24]=v,e[25]=m,e[26]=g,e[27]=x):x=e[27],x}function na(t){const e=D.c(6),{plans:s,onApprove:o,onDismiss:a}=t;let i;e[0]!==s?(i=Jt(s),e[0]=s,e[1]=i):i=e[1];const r=i;if(!r)return null;let l;return e[2]!==r||e[3]!==o||e[4]!==a?(l=n.jsx(sa,{plan:r,onApprove:o,onDismiss:a}),e[2]=r,e[3]=o,e[4]=a,e[5]=l):l=e[5],l}function is(t){return t?"response"in t?t.response:t.option??t.draft:""}const wt=oe({response:te().min(1,"Response is required")}),oa=oe({option:te().nullable(),draft:te()}).refine(t=>(t.option??t.draft).length>0,{message:"Please select or enter an option"}),aa=oe({response:Re(["yes","no"])});function ia(t){switch(t.type){case"text":return wt;case"choice":return oa;case"confirm":return aa;default:return wt}}function ra(t){const e={};for(const s of t)e[s.toolCallId]=ia(s.input);return oe(e)}function la(t){const e=D.c(7),{control:s,name:o,placeholder:a}=t,i=Q();let r;e[0]!==a||e[1]!==i?(r=V=>{const{field:d}=V,u=d.value??"";return n.jsxs(st,{children:[n.jsx(nt,{children:n.jsx("div",{className:"px-2",children:n.jsxs("div",{className:"flex items-center gap-3 px-2 py-3 rounded-lg bg-accent/50",children:[n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx($t,{size:16,className:"text-muted-foreground"})}),n.jsx("input",{...d,value:u,type:"text",placeholder:a||i("chat.userAskQuestion.typeResponse"),autoFocus:!0,"aria-label":i("chat.userAskQuestion.textResponseInputAriaLabel"),className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"})]})})}),n.jsx(ot,{})]})},e[0]=a,e[1]=i,e[2]=r):r=e[2];let l;return e[3]!==s||e[4]!==o||e[5]!==r?(l=n.jsx(Yt,{control:s,name:o,render:r}),e[3]=s,e[4]=o,e[5]=r,e[6]=l):l=e[6],l}function rs(t,e){const s=D.c(4);let o,a;s[0]!==t||s[1]!==e?(o=()=>{const i=r=>{if(ys(r.target)||r.metaKey||r.ctrlKey||r.altKey)return;const l=Number.parseInt(r.key,10);l>=1&&l<=t&&(r.preventDefault(),e(l-1))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},a=[t,e],s[0]=t,s[1]=e,s[2]=o,s[3]=a):(o=s[2],a=s[3]),R.useEffect(o,a)}function Va(t){const e=D.c(51),{control:s,name:o,options:a}=t,i=Q(),r=`${o}.option`;let l;e[0]!==s||e[1]!==r?(l={control:s,name:r,defaultValue:null},e[0]=s,e[1]=r,e[2]=l):l=e[2];const{field:V}=ut(l),d=`${o}.draft`;let u;e[3]!==s||e[4]!==d?(u={control:s,name:d,defaultValue:""},e[3]=s,e[4]=d,e[5]=u):u=e[5];const{field:c}=ut(u),p=V.value,f=c.value??"";let h;if(e[6]!==V||e[7]!==a?(h=L=>{const M=a[L];M!=null&&V.onChange(M)},e[6]=V,e[7]=a,e[8]=h):h=e[8],rs(a.length,h),a.length===0)return null;const m=p===null;let g;e[9]!==i?(g=i("chat.userAskQuestion.choiceOptionsAriaLabel"),e[9]=i,e[10]=g):g=e[10];let v;if(e[11]!==V||e[12]!==p||e[13]!==a||e[14]!==i){let L;e[16]!==V||e[17]!==p||e[18]!==i?(L=(M,q)=>{const K=p===M;return n.jsxs("button",{type:"button",onClick:()=>V.onChange(M),className:B("flex items-start gap-3 px-2 py-3 rounded-lg text-left transition-colors w-full",K&&"bg-accent/50",!K&&"hover:bg-accent"),"aria-label":i("chat.userAskQuestion.selectOption",{option:M}),children:[n.jsx("span",{className:B("flex items-center justify-center size-6 rounded-md text-sm shrink-0 mt-0.5",K?"bg-chart-1 text-white":"bg-muted text-foreground"),children:q+1}),n.jsx("span",{className:"text-sm text-foreground min-w-0 break-words",children:M})]},`${q}-${M}`)},e[16]=V,e[17]=p,e[18]=i,e[19]=L):L=e[19],v=a.map(L),e[11]=V,e[12]=p,e[13]=a,e[14]=i,e[15]=v}else v=e[15];const x=m&&"bg-accent/50",b=!m&&"hover:bg-accent";let y;e[20]!==x||e[21]!==b?(y=B("flex items-center gap-3 px-2 py-3 rounded-lg transition-colors w-full cursor-text",x,b),e[20]=x,e[21]=b,e[22]=y):y=e[22];let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("span",{className:"flex items-center justify-center size-6 rounded-md bg-muted shrink-0",children:n.jsx($t,{size:16,className:"text-muted-foreground"})}),e[23]=A):A=e[23];const k=m?f:"";let j;e[24]!==c||e[25]!==V||e[26]!==p?(j=L=>{c.onChange(L.target.value),p!==null&&V.onChange(null)},e[24]=c,e[25]=V,e[26]=p,e[27]=j):j=e[27];let w;e[28]!==V||e[29]!==p?(w=()=>{p!==null&&V.onChange(null)},e[28]=V,e[29]=p,e[30]=w):w=e[30];let C;e[31]!==i?(C=i("chat.userAskQuestion.somethingElsePlaceholder"),e[31]=i,e[32]=C):C=e[32];let _;e[33]!==i?(_=i("chat.userAskQuestion.customChoiceInputAriaLabel"),e[33]=i,e[34]=_):_=e[34];let N;e[35]!==k||e[36]!==j||e[37]!==w||e[38]!==C||e[39]!==_?(N=n.jsx("input",{type:"text",value:k,onChange:j,onFocus:w,placeholder:C,"aria-label":_,className:"flex-1 text-sm bg-transparent outline-none placeholder:text-foreground/25 text-foreground min-w-0"}),e[35]=k,e[36]=j,e[37]=w,e[38]=C,e[39]=_,e[40]=N):N=e[40];let T;e[41]!==y||e[42]!==N?(T=n.jsxs("label",{className:y,children:[A,N]}),e[41]=y,e[42]=N,e[43]=T):T=e[43];let I;e[44]!==T||e[45]!==g||e[46]!==v?(I=n.jsx(nt,{children:n.jsxs("div",{className:"flex flex-col px-2",role:"group","aria-label":g,children:[v,T]})}),e[44]=T,e[45]=g,e[46]=v,e[47]=I):I=e[47];let E;e[48]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(ot,{}),e[48]=E):E=e[48];let F;return e[49]!==I?(F=n.jsxs(st,{children:[I,E]}),e[49]=I,e[50]=F):F=e[50],F}function ca(t){const e=D.c(8),{control:s,name:o}=t,a=Q();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=["yes","no"],e[0]=i):i=e[0];const r=i,l=R.useRef(null);let V;e[1]===Symbol.for("react.memo_cache_sentinel")?(V=c=>{l.current?.onChange(r[c]??"")},e[1]=V):V=e[1],rs(r.length,V);let d;e[2]!==a?(d=c=>{const{field:p}=c;return l.current=p,n.jsxs(st,{children:[n.jsx(nt,{children:n.jsx("div",{className:"flex gap-2 px-2",role:"group","aria-label":a("chat.userAskQuestion.confirmationOptionsAriaLabel"),children:r.map(f=>{const h=p.value===f;return n.jsxs("button",{type:"button",onClick:()=>p.onChange(f),className:B("flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-colors flex-1",h&&"bg-accent/50",!h&&"hover:bg-accent"),"aria-label":a("chat.userAskQuestion.confirmValue",{value:a(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)}),children:[n.jsx("span",{className:B("flex items-center justify-center size-6 rounded-md text-sm shrink-0",h?"bg-chart-1 text-white":"bg-muted text-foreground"),children:f==="yes"?1:2}),n.jsx("span",{className:"text-sm text-foreground capitalize",children:a(`chat.userAskQuestion.confirm${f==="yes"?"Yes":"No"}`)})]},f)})})}),n.jsx(ot,{})]})},e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==s||e[5]!==o||e[6]!==d?(u=n.jsx(Yt,{control:s,name:o,render:d}),e[4]=s,e[5]=o,e[6]=d,e[7]=u):u=e[7],u}function Ct(t){const e=D.c(13),{input:s,control:o,toolCallId:a}=t;switch(s.type){case"text":{const i=`${a}.response`;let r;return e[0]!==o||e[1]!==s.default||e[2]!==i?(r=n.jsx(la,{control:o,name:i,placeholder:s.default}),e[0]=o,e[1]=s.default,e[2]=i,e[3]=r):r=e[3],r}case"choice":{let i;e[4]!==s.options?(i=s.options?.filter(Boolean)??[],e[4]=s.options,e[5]=i):i=e[5];const r=i;let l;return e[6]!==o||e[7]!==r||e[8]!==a?(l=n.jsx(Va,{control:o,name:a,options:r}),e[6]=o,e[7]=r,e[8]=a,e[9]=l):l=e[9],l}case"confirm":{const i=`${a}.response`;let r;return e[10]!==o||e[11]!==i?(r=n.jsx(ca,{control:o,name:i}),e[10]=o,e[11]=i,e[12]=r):r=e[12],r}default:return null}}function da(t){const e=D.c(91),{parts:s,isStreaming:o,onSubmit:a}=t;let i;e[0]!==s?(i=ra(s.map(fa)),e[0]=s,e[1]=i):i=e[1];const r=i;let l;e[2]!==s?(l=Object.fromEntries(s.map(ha)),e[2]=s,e[3]=l):l=e[3];const V=l;let d;e[4]!==a?(d=(U,W)=>{const P=is(W);P&&a(U,P)},e[4]=a,e[5]=d):d=e[5];let u;e[6]!==V||e[7]!==o||e[8]!==s||e[9]!==r||e[10]!==d?(u={parts:s,partKey:pa,schema:r,defaultValues:V,isStreaming:o,hasAnswer:ua,onSubmit:d},e[6]=V,e[7]=o,e[8]=s,e[9]=r,e[10]=d,e[11]=u):u=e[11];const c=ss(u),p=c.currentPart,f=Q();let h;e[12]!==p||e[13]!==c||e[14]!==f?(h=()=>{const U=p;if(!U)return;const W=f("chat.userAskQuestion.skipMessage"),P=U.toolCallId;U.input?.type==="choice"?(c.form.setValue(`${P}.option`,null),c.form.setValue(`${P}.draft`,W)):c.form.setValue(`${P}.response`,W),c.advanceToNextUnanswered()},e[12]=p,e[13]=c,e[14]=f,e[15]=h):h=e[15];const m=h;let g;e[16]!==c.currentIndex||e[17]!==c.goNext||e[18]!==c.goPrev||e[19]!==s.length?(g=n.jsx(es,{currentIndex:c.currentIndex,total:s.length,onPrev:c.goPrev,onNext:c.goNext}),e[16]=c.currentIndex,e[17]=c.goNext,e[18]=c.goPrev,e[19]=s.length,e[20]=g):g=e[20];const v=g;let x;e[21]!==f?(x=f("chat.userAskQuestion.skip"),e[21]=f,e[22]=x):x=e[22];let b;e[23]!==m||e[24]!==x?(b=n.jsx(Y,{type:"button",variant:"outline",size:"sm",onClick:m,className:"h-7",children:x}),e[23]=m,e[24]=x,e[25]=b):b=e[25];let y;e[26]!==c.isAllAnswered||e[27]!==c.isCurrentAnswered||e[28]!==c.submitOrAdvance||e[29]!==o?(y=n.jsx(qo,{isStreaming:o,isAllAnswered:c.isAllAnswered,isCurrentAnswered:c.isCurrentAnswered,onAdvanceOrSubmit:c.submitOrAdvance}),e[26]=c.isAllAnswered,e[27]=c.isCurrentAnswered,e[28]=c.submitOrAdvance,e[29]=o,e[30]=y):y=e[30];let A;e[31]!==b||e[32]!==y?(A=n.jsxs(n.Fragment,{children:[b,y]}),e[31]=b,e[32]=y,e[33]=A):A=e[33];const k=A;if(s.length===1){const U=s[0];if(!U?.input)return null;const W=c.form;let P;e[34]!==c?(P=ee=>{ee.preventDefault(),c.submit()},e[34]=c,e[35]=P):P=e[35];let G;e[36]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(Ge,{size:14}),e[36]=G):G=e[36];let ne;e[37]!==f?(ne=f("chat.userAskQuestion.questionPending"),e[37]=f,e[38]=ne):ne=e[38];let H;e[39]!==U.input?.prompt||e[40]!==f?(H=U.input?.prompt??f("chat.userAskQuestion.question"),e[39]=U.input?.prompt,e[40]=f,e[41]=H):H=e[41];const re=U.input;let S;e[42]!==c.form.control||e[43]!==U.toolCallId||e[44]!==re?(S=n.jsx(Ct,{input:re,control:c.form.control,toolCallId:U.toolCallId}),e[42]=c.form.control,e[43]=U.toolCallId,e[44]=re,e[45]=S):S=e[45];let O;e[46]!==k||e[47]!==ne||e[48]!==H||e[49]!==S?(O=n.jsx(xe,{icon:G,label:ne,title:H,defaultExpanded:!0,footerRight:k,children:S}),e[46]=k,e[47]=ne,e[48]=H,e[49]=S,e[50]=O):O=e[50];let J;e[51]!==P||e[52]!==O?(J=n.jsx("form",{onSubmit:P,autoComplete:"off",children:O}),e[51]=P,e[52]=O,e[53]=J):J=e[53];let $;return e[54]!==c.form||e[55]!==J?($=n.jsx(He,{...W,children:J}),e[54]=c.form,e[55]=J,e[56]=$):$=e[56],$}const j=c.form;let w;e[57]!==c?(w=U=>{U.preventDefault(),c.submit()},e[57]=c,e[58]=w):w=e[58];let C;e[59]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(Ge,{size:14}),e[59]=C):C=e[59];let _;e[60]!==f?(_=f("chat.userAskQuestion.questionPending"),e[60]=f,e[61]=_):_=e[61];const N=c.currentIndex+1;let T;e[62]!==s.length||e[63]!==f||e[64]!==N?(T=f("chat.userAskQuestion.questionCount",{current:N,total:s.length}),e[62]=s.length,e[63]=f,e[64]=N,e[65]=T):T=e[65];let I;e[66]!==p?.input?.prompt||e[67]!==f?(I=p?.input?.prompt??f("chat.userAskQuestion.question"),e[66]=p?.input?.prompt,e[67]=f,e[68]=I):I=e[68];const E=c.activeKey,F=c.setActiveKey;let L;if(e[69]!==c.form||e[70]!==s){let U;e[72]!==c.form?(U=W=>n.jsx(Hn,{value:W.toolCallId,className:"mt-0",children:n.jsx(Ct,{input:W.input,control:c.form.control,toolCallId:W.toolCallId})},W.toolCallId),e[72]=c.form,e[73]=U):U=e[73],L=s.map(U),e[69]=c.form,e[70]=s,e[71]=L}else L=e[71];let M;e[74]!==c.activeKey||e[75]!==c.setActiveKey||e[76]!==L?(M=n.jsx(Jn,{value:E,onValueChange:F,children:L}),e[74]=c.activeKey,e[75]=c.setActiveKey,e[76]=L,e[77]=M):M=e[77];let q;e[78]!==v||e[79]!==k||e[80]!==_||e[81]!==T||e[82]!==I||e[83]!==M?(q=n.jsx(xe,{icon:C,label:_,count:T,title:I,defaultExpanded:!0,footerLeft:v,footerRight:k,children:M}),e[78]=v,e[79]=k,e[80]=_,e[81]=T,e[82]=I,e[83]=M,e[84]=q):q=e[84];let K;e[85]!==w||e[86]!==q?(K=n.jsx("form",{onSubmit:w,autoComplete:"off",children:q}),e[85]=w,e[86]=q,e[87]=K):K=e[87];let Z;return e[88]!==c.form||e[89]!==K?(Z=n.jsx(He,{...j,children:K}),e[88]=c.form,e[89]=K,e[90]=Z):Z=e[90],Z}function ua(t){return!!is(t)}function pa(t){return t.toolCallId}function ha(t){return t.input?.type==="choice"?[t.toolCallId,{option:null,draft:""}]:[t.toolCallId,{response:""}]}function fa(t){return{toolCallId:t.toolCallId,input:t.input}}function ma(){const t=D.c(5),e=Q();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Ge,{className:"size-5 text-muted-foreground animate-pulse motion-reduce:animate-none"}),t[0]=s):s=t[0];let o;t[1]!==e?(o=e("chat.userAskQuestion.preparingQuestion"),t[1]=e,t[2]=o):o=t[2];let a;return t[3]!==o?(a=n.jsxs("div",{className:"flex items-center gap-2 p-4 border border-dashed rounded-lg bg-accent/50 w-[calc(100%-16px)] max-w-[640px] mx-auto mb-2",children:[s,n.jsx("span",{className:"text-sm text-muted-foreground shimmer",children:o})]}),t[3]=o,t[4]=a):a=t[4],a}function ls(t){const e=D.c(7),{userAskParts:s,isStreaming:o,onSubmit:a}=t;let i;e[0]!==s?(i=s.filter(ga),e[0]=s,e[1]=i):i=e[1];const r=i;if(r.length===0){if(o){let V;return e[2]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(ma,{}),e[2]=V):V=e[2],V}return null}let l;return e[3]!==o||e[4]!==a||e[5]!==r?(l=n.jsx(da,{parts:r,isStreaming:o,onSubmit:a}),e[3]=o,e[4]=a,e[5]=r,e[6]=l):l=e[6],l}function ga(t){return t.state==="input-available"}function xa(t){const e=D.c(33),{parts:s,isStreaming:o,onRespond:a}=t,i=Q();let r;e[0]!==s?(r=s.at(-1),e[0]=s,e[1]=r):r=e[1];const l=r,V=l?.input;if(!l||!V?.title)return null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Bt,{size:14}),e[2]=d):d=e[2];let u;e[3]!==i?(u=i("chat.suggestTask.label"),e[3]=i,e[4]=u):u=e[4];const c=V.title;let p;e[5]!==a||e[6]!==l?(p=()=>a(l,!1),e[5]=a,e[6]=l,e[7]=p):p=e[7];let f;e[8]!==i?(f=i("chat.suggestTask.notNow"),e[8]=i,e[9]=f):f=e[9];let h;e[10]!==o||e[11]!==p||e[12]!==f?(h=n.jsx(Y,{type:"button",size:"sm",variant:"outline",className:"h-7",disabled:o,onClick:p,children:f}),e[10]=o,e[11]=p,e[12]=f,e[13]=h):h=e[13];let m;e[14]!==a||e[15]!==l?(m=()=>a(l,!0),e[14]=a,e[15]=l,e[16]=m):m=e[16];let g;e[17]!==i?(g=i("chat.suggestTask.create"),e[17]=i,e[18]=g):g=e[18];let v;e[19]!==o||e[20]!==m||e[21]!==g?(v=n.jsx(Y,{type:"button",size:"sm",className:"h-7",disabled:o,onClick:m,children:g}),e[19]=o,e[20]=m,e[21]=g,e[22]=v):v=e[22];let x;e[23]!==v||e[24]!==h?(x=n.jsxs(n.Fragment,{children:[h,v]}),e[23]=v,e[24]=h,e[25]=x):x=e[25];let b;e[26]!==V.summary?(b=V.summary?n.jsx("p",{className:"px-4 pb-1 text-sm leading-snug text-muted-foreground whitespace-pre-wrap",children:V.summary}):null,e[26]=V.summary,e[27]=b):b=e[27];let y;return e[28]!==V.title||e[29]!==x||e[30]!==b||e[31]!==u?(y=n.jsx(xe,{icon:d,label:u,title:c,defaultExpanded:!0,footerRight:x,children:b}),e[28]=V.title,e[29]=x,e[30]=b,e[31]=u,e[32]=y):y=e[32],y}function va(t){const e=t.filter(i=>i.status==="in_progress"),s=t.filter(i=>i.status==="completed").length,o=t.length;if(o>0&&s===o)return{icon:"completed",activity:"All done",progress:`${o}/${o}`};const[a]=e;return a&&e.length===1?{icon:"in_progress",activity:a.activeForm,progress:`${s}/${o} done`}:e.length>1?{icon:"in_progress",activity:`${e.length} in progress`,progress:`${s}/${o} done`}:s>0?{icon:"pending",activity:`${o-s} pending`,progress:`${s}/${o} done`}:{icon:"pending",activity:`${o} todos`,progress:"not started"}}function ba(t){const e=D.c(13),{todos:s}=t;if(s.length===0)return null;let o;e[0]!==s?(o=va(s),e[0]=s,e[1]=o):o=e[1];const a=o;let i;e[2]!==a.icon?(i=n.jsx(ka,{status:a.icon}),e[2]=a.icon,e[3]=i):i=e[3];const r=a.activity,l=a.progress;let V;e[4]!==s?(V=s.map(Aa),e[4]=s,e[5]=V):V=e[5];let d;e[6]!==V?(d=n.jsx("ul",{"data-testid":"todos-list",className:"flex flex-col px-2 max-h-[40vh] overflow-y-auto",children:V}),e[6]=V,e[7]=d):d=e[7];let u;return e[8]!==a.activity||e[9]!==a.progress||e[10]!==i||e[11]!==d?(u=n.jsx(xe,{icon:i,label:r,count:l,defaultExpanded:!1,children:d}),e[8]=a.activity,e[9]=a.progress,e[10]=i,e[11]=d,e[12]=u):u=e[12],u}function Aa(t,e){return n.jsx(ya,{todo:t},e)}function ya(t){const e=D.c(14),{todo:s}=t,o=s.status==="completed",i=s.status==="in_progress"?s.activeForm:s.content;let r;e[0]!==s.status?(r=n.jsx(ja,{status:s.status}),e[0]=s.status,e[1]=r):r=e[1];const l=o&&"text-muted-foreground";let V;e[2]!==l?(V=B("relative text-sm leading-snug pt-px select-none",l),e[2]=l,e[3]=V):V=e[3];const d=o?"100%":"0%",u=o?"width 300ms ease 200ms":"width 150ms ease";let c;e[4]!==d||e[5]!==u?(c=n.jsx("span",{"aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",height:"1px",background:"currentColor",width:d,transition:u}}),e[4]=d,e[5]=u,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==V||e[9]!==c?(p=n.jsxs("span",{className:V,children:[i,c]}),e[7]=i,e[8]=V,e[9]=c,e[10]=p):p=e[10];let f;return e[11]!==r||e[12]!==p?(f=n.jsxs("li",{className:"flex items-start gap-2.5 px-2 py-1.5 rounded-lg hover:bg-accent transition-colors",children:[r,p]}),e[11]=r,e[12]=p,e[13]=f):f=e[13],f}function ja(t){const e=D.c(4),{status:s}=t,o=s==="completed"?"true":void 0,a=s==="in_progress"?"true":void 0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("svg",{viewBox:"0 0 21 21",children:n.jsx("path",{d:"M5,10.75 L8.5,14.25 L19.4,2.3 C18.8333333,1.43333333 18.0333333,1 17,1 L4,1 C2.35,1 1,2.35 1,4 L1,17 C1,18.65 2.35,20 4,20 L17,20 C18.65,20 20,18.65 20,17 L20,7.99769186"})}),e[0]=i):i=e[0];let r;return e[1]!==o||e[2]!==a?(r=n.jsx("div",{className:"todo-cb mt-0.5","data-checked":o,"data-progress":a,"aria-hidden":"true",children:i}),e[1]=o,e[2]=a,e[3]=r):r=e[3],r}function ka(t){const e=D.c(13),{status:s}=t,o=Q();if(s==="completed"){let r;e[0]!==o?(r=o("chat.todoStatus.completed"),e[0]=o,e[1]=r):r=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("svg",{viewBox:"0 0 10 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"w-2 h-2 text-primary-foreground",style:{strokeWidth:2},children:n.jsx("path",{d:"M1 4l2.5 2.5L9 1"})}),e[2]=l):l=e[2];let V;return e[3]!==r?(V=n.jsx("span",{"aria-label":r,className:"inline-flex items-center justify-center w-3.5 h-3.5 rounded-sm bg-primary",children:l}),e[3]=r,e[4]=V):V=e[4],V}if(s==="in_progress"){let r;e[5]!==o?(r=o("chat.todoStatus.inProgress"),e[5]=o,e[6]=r):r=e[6];let l;return e[7]!==r?(l=n.jsx("span",{"aria-label":r,className:"inline-block w-2 h-2 rounded-full bg-primary animate-pulse shrink-0"}),e[7]=r,e[8]=l):l=e[8],l}let a;e[9]!==o?(a=o("chat.todoStatus.pending"),e[9]=o,e[10]=a):a=e[10];let i;return e[11]!==a?(i=n.jsx("span",{"aria-label":a,className:"inline-block w-3.5 h-3.5 rounded-sm border-[1.5px] border-muted-foreground/50 shrink-0"}),e[11]=a,e[12]=i):i=e[12],i}const wa={usd:[{dollars:10,labelKey:"credits.topUp.starter"},{dollars:20,labelKey:"credits.topUp.popular"},{dollars:100,labelKey:"credits.topUp.bestValue"}],brl:[{dollars:50,labelKey:"credits.topUp.starter"},{dollars:100,labelKey:"credits.topUp.popular"},{dollars:500,labelKey:"credits.topUp.bestValue"}]},Ca={"credits.topUp.starter":"starter","credits.topUp.popular":"popular","credits.topUp.bestValue":"best_value"};function Sa(t){const e=D.c(46),{source:s,onDone:o}=t,a=Q(),i=js(),[r]=we(),[l,V]=R.useState(r.language==="pt-BR"?"brl":"usd"),[d,u]=R.useState(""),[c,p]=R.useState(!1),f=l==="brl"?"R$":"$";let h;e[0]!==l||e[1]!==i?(h=async M=>{const{url:q}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:M,currency:l});return q},e[0]=l,e[1]=i,e[2]=h):h=e[2];let m;e[3]!==o?(m=M=>{M&&window.open(M,"_blank","noopener,noreferrer"),o?.()},e[3]=o,e[4]=m):m=e[4];let g;e[5]!==a?(g=M=>{Ie.error(a("credits.topUp.failed",{message:M.message}))},e[5]=a,e[6]=g):g=e[6];let v;e[7]!==h||e[8]!==m||e[9]!==g?(v={mutationFn:h,onSuccess:m,onError:g},e[7]=h,e[8]=m,e[9]=g,e[10]=v):v=e[10];const{mutate:x,isPending:b}=ks(v);let y;e[11]!==l||e[12]!==s||e[13]!==x?(y=(M,q)=>{X("credits_topup_clicked",{amount_cents:M,currency:l,tier_label:q,source:s}),x(M)},e[11]=l,e[12]=s,e[13]=x,e[14]=y):y=e[14];const A=y,k=parseFloat(d),j=!isNaN(k)&&k>=1;let w,C,_;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=M=>{M&&V(M)},C=n.jsx(xt,{value:"usd",className:"h-8 px-3 text-xs",children:"USD"}),_=n.jsx(xt,{value:"brl",className:"h-8 px-3 text-xs",children:"BRL"}),e[15]=w,e[16]=C,e[17]=_):(w=e[15],C=e[16],_=e[17]);let N;e[18]!==l?(N=n.jsx("div",{className:"mb-4",children:n.jsxs(eo,{type:"single",variant:"outline",size:"sm",value:l,onValueChange:w,children:[C,_]})}),e[18]=l,e[19]=N):N=e[19];const T=wa[l];let I;if(e[20]!==A||e[21]!==f||e[22]!==b||e[23]!==a||e[24]!==T){let M;e[26]!==A||e[27]!==f||e[28]!==b||e[29]!==a?(M=q=>{const{dollars:K,labelKey:Z}=q;return n.jsxs("button",{type:"button",disabled:b,onClick:()=>A(K*100,Ca[Z]??"preset"),className:B("relative flex flex-col items-center gap-1 py-5 surface surface-interactive cursor-pointer","disabled:opacity-50 disabled:cursor-wait"),children:[n.jsxs("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:[f,K]}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a(Z)})]},K)},e[26]=A,e[27]=f,e[28]=b,e[29]=a,e[30]=M):M=e[30],I=T.map(M),e[20]=A,e[21]=f,e[22]=b,e[23]=a,e[24]=T,e[25]=I}else I=e[25];let E;e[31]!==I?(E=n.jsx("div",{className:"grid grid-cols-3 gap-2.5",children:I}),e[31]=I,e[32]=E):E=e[32];let F;e[33]!==A||e[34]!==f||e[35]!==d||e[36]!==k||e[37]!==j||e[38]!==b||e[39]!==c||e[40]!==a?(F=c?n.jsxs("div",{className:"flex gap-2 mt-3",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:f}),n.jsx(ws,{type:"number",min:"1",step:"1",placeholder:a("credits.topUp.customPlaceholder"),value:d,onChange:M=>u(M.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),n.jsx(Y,{size:"lg",disabled:!j||b,onClick:()=>A(Math.round(k*100),"custom"),children:a(b?"credits.topUp.opening":"credits.topUp.add")})]}):n.jsx("button",{type:"button",className:"w-full mt-3 text-xs text-muted-foreground hover:text-foreground transition-colors py-1",onClick:()=>p(!0),children:a("credits.topUp.enterCustom")}),e[33]=A,e[34]=f,e[35]=d,e[36]=k,e[37]=j,e[38]=b,e[39]=c,e[40]=a,e[41]=F):F=e[41];let L;return e[42]!==E||e[43]!==F||e[44]!==N?(L=n.jsxs("div",{children:[N,E,F]}),e[42]=E,e[43]=F,e[44]=N,e[45]=L):L=e[45],L}const Na=["chat.creditsExhaustedBanner.benefit1","chat.creditsExhaustedBanner.benefit2","chat.creditsExhaustedBanner.benefit3"];function Ia(t){const e=D.c(47),{onDismiss:s}=t,{org:o}=Te(),a=Xe(),{decoKeyId:i}=Xn(),r=Q(),l=qe("credits");let V,d;if(e[0]!==o.id?(V=()=>{X("credits_exhausted_shown",{organization_id:o.id})},d=[o.id],e[0]=o.id,e[1]=V,e[2]=d):(V=e[1],d=e[2]),R.useEffect(V,d),!l)return null;let u;e[3]!==s?(u=T=>!T&&s?.(),e[3]=s,e[4]=u):u=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(165,149,255,0.5) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(208,236,26,0.45) 0%, transparent 100%)"],e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[6]=p):p=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[7]=f):f=e[7];let h;e[8]!==r?(h=r("chat.creditsExhaustedBanner.title"),e[8]=r,e[9]=h):h=e[9];let m;e[10]!==h?(m=n.jsx(Cs,{className:"text-xl font-semibold tracking-tight",children:h}),e[10]=h,e[11]=m):m=e[11];let g;e[12]!==r?(g=r("chat.creditsExhaustedBanner.description"),e[12]=r,e[13]=g):g=e[13];let v;e[14]!==g?(v=n.jsx(Ss,{className:"mt-1.5 text-sm leading-relaxed",children:g}),e[14]=g,e[15]=v):v=e[15];let x;e[16]!==v||e[17]!==m?(x=n.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[p,n.jsxs(Ns,{className:"relative gap-4",children:[f,n.jsxs("div",{children:[m,v]})]})]}),e[16]=v,e[17]=m,e[18]=x):x=e[18];let b;e[19]!==i||e[20]!==s||e[21]!==r?(b=i&&n.jsxs("div",{className:"px-8 pt-5 pb-6",children:[n.jsx("div",{className:"surface p-5",children:n.jsx(Sa,{source:"exhausted_banner",onDone:s})}),n.jsx("div",{className:"mt-5 rounded-xl bg-muted/25 border border-border/50 p-4 space-y-3",children:Na.map(T=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex items-center justify-center size-5 rounded-full bg-success/15 shrink-0",children:n.jsx(Mt,{size:12,className:"text-success"})}),n.jsx("span",{className:"text-sm text-foreground/80",children:r(T)})]},T))})]}),e[19]=i,e[20]=s,e[21]=r,e[22]=b):b=e[22];let y;e[23]!==r?(y=r("chat.creditsExhaustedBanner.dismiss"),e[23]=r,e[24]=y):y=e[24];let A;e[25]!==s||e[26]!==y?(A=n.jsx(Y,{variant:"ghost",size:"sm",onClick:s,children:y}),e[25]=s,e[26]=y,e[27]=A):A=e[27];let k;e[28]!==a||e[29]!==s||e[30]!==o.slug?(k=()=>{a({to:"/$org/settings/ai-providers",params:{org:o.slug}}),s?.()},e[28]=a,e[29]=s,e[30]=o.slug,e[31]=k):k=e[31];let j;e[32]!==r?(j=r("chat.creditsExhaustedBanner.manageProviders"),e[32]=r,e[33]=j):j=e[33];let w;e[34]!==k||e[35]!==j?(w=n.jsx("button",{type:"button",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:k,children:j}),e[34]=k,e[35]=j,e[36]=w):w=e[36];let C;e[37]!==A||e[38]!==w?(C=n.jsxs("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-between",children:[A,w]}),e[37]=A,e[38]=w,e[39]=C):C=e[39];let _;e[40]!==x||e[41]!==b||e[42]!==C?(_=n.jsxs(Is,{className:"sm:max-w-[520px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ta,children:[x,b,C]}),e[40]=x,e[41]=b,e[42]=C,e[43]=_):_=e[43];let N;return e[44]!==_||e[45]!==u?(N=n.jsx(Ts,{open:!0,onOpenChange:u,children:_}),e[44]=_,e[45]=u,e[46]=N):N=e[46],N}function Ta(t){return t.preventDefault()}const _a={ai_budget_exhausted:{label:"chat.planRefused.budgetLabel",title:"chat.planRefused.budgetTitle"},feature_not_in_plan:{label:"chat.planRefused.featureLabel",title:"chat.planRefused.featureTitle"}};function St(t){const e=D.c(21),{kind:s,onDismiss:o}=t,a=Q(),i=Xe(),{org:r}=Te(),{label:l,title:V}=_a[s];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Pn,{size:14}),e[0]=d):d=e[0];let u;e[1]!==l||e[2]!==a?(u=a(l),e[1]=l,e[2]=a,e[3]=u):u=e[3];let c;e[4]!==a||e[5]!==V?(c=a(V),e[4]=a,e[5]=V,e[6]=c):c=e[6];let p;e[7]!==i||e[8]!==o||e[9]!==r.slug?(p=()=>{i({to:"/$org/settings/ai-providers",params:{org:r.slug}}),o()},e[7]=i,e[8]=o,e[9]=r.slug,e[10]=p):p=e[10];let f;e[11]!==a?(f=a("chat.planRefused.seePlans"),e[11]=a,e[12]=f):f=e[12];let h;e[13]!==p||e[14]!==f?(h=n.jsx(Y,{size:"sm",className:"h-7 text-xs",onClick:p,children:f}),e[13]=p,e[14]=f,e[15]=h):h=e[15];let m;return e[16]!==o||e[17]!==u||e[18]!==c||e[19]!==h?(m=n.jsx(xe,{icon:d,label:u,title:c,defaultExpanded:!0,variant:"warning",onClose:o,footerRight:h}),e[16]=o,e[17]=u,e[18]=c,e[19]=h,e[20]=m):m=e[20],m}function Vs(t){const e=Da(t);if(e!==null){const d=Vs(e);return{summary:d.summary,rawDetails:d.rawDetails??t}}const s=t.trim(),o=s.startsWith("<")&&/<[a-z][\s\S]*>/i.test(s),a=/cloudflare|cf-[a-z-]+|error[\s_-]?code[\s_-]?5\d\d/i.test(s),i=/failed to fetch|networkerror|load failed|offline/i.test(s),r=/timeout|timed out|aborted|deadline/i.test(s),l=s.length>240,V=/sandbox failed to start(?::\s*(.+))?/is.exec(s);if(V){const d=V[1]?.trim().replace(/\.$/,"");return{summary:d?`Your sandbox didn't finish starting up (${d}). Try again.`:"Your sandbox didn't finish starting up. Try again.",rawDetails:t}}return a||o&&l?{summary:"Our servers are having a moment. Try sending again in a few seconds.",rawDetails:t}:i?{summary:"Lost connection. Check your network and try again.",rawDetails:t}:r?{summary:"That took longer than expected. Try again.",rawDetails:t}:o||l?{summary:"Something unexpected came back from the server. Try again.",rawDetails:t}:{summary:t,rawDetails:null}}function Da(t){const e=t.trim();if(!e.startsWith("{"))return null;let s;try{s=JSON.parse(e)}catch{return null}if(!s||typeof s!="object")return null;const{error:o,message:a}=s,i=typeof o=="string"?o:a;return typeof i=="string"&&i.trim()&&!i.trim().startsWith("{")?i:null}const Ma={length:"chat.highlight.warningDescriptionLength","content-filter":"chat.highlight.warningDescriptionContentFilter","tool-calls":"chat.highlight.warningDescriptionToolCalls"};function Be(t){const e=D.c(29),s=Q(),{variant:o,onDismiss:a}=t,i=o==="error";let r;e[0]!==i||e[1]!==s?(r=s(i?"chat.highlight.errorOccurred":"chat.highlight.responseIncomplete"),e[0]=i,e[1]=s,e[2]=r):r=e[2];const l=r,V=i?Bn:Ds;let d;e[3]!==t.error||e[4]!==t.finishReason||e[5]!==t.variant||e[6]!==s?(d=t.variant==="error"?t.error.message:(()=>{const x=Ma[t.finishReason];return x?s(x):s("chat.highlight.responseStoppedUnexpectedly",{reason:t.finishReason})})(),e[3]=t.error,e[4]=t.finishReason,e[5]=t.variant,e[6]=s,e[7]=d):d=e[7];const u=d;let c;e[8]!==i||e[9]!==u?(c=i?Vs(u):{summary:u,rawDetails:null},e[8]=i,e[9]=u,e[10]=c):c=e[10];const{summary:p,rawDetails:f}=c;let h;e[11]!==V?(h=n.jsx(V,{size:14}),e[11]=V,e[12]=h):h=e[12];let m;e[13]!==i||e[14]!==t.onContinue||e[15]!==t.onFixInChat||e[16]!==s?(m=i?n.jsx(Y,{size:"sm",variant:"outline",onClick:t.onFixInChat,className:"h-7 text-xs",children:s("chat.highlight.fixInChat")}):n.jsx(Y,{size:"sm",variant:"outline",onClick:t.onContinue,className:"h-7 text-xs",children:s("chat.highlight.continue")}),e[13]=i,e[14]=t.onContinue,e[15]=t.onFixInChat,e[16]=s,e[17]=m):m=e[17];let g;e[18]!==f||e[19]!==s?(g=f?n.jsxs("details",{className:"group mx-4",children:[n.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs text-muted-foreground transition-colors hover:text-foreground [&::-webkit-details-marker]:hidden",children:[n.jsx("svg",{"aria-hidden":"true",className:"size-3 transition-transform group-open:rotate-90",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"m4.5 3 3 3-3 3"})}),n.jsx("span",{className:"group-open:hidden",children:s("chat.highlight.showTechnicalDetails")}),n.jsx("span",{className:"hidden group-open:inline",children:s("chat.highlight.hideTechnicalDetails")})]}),n.jsxs("div",{className:"relative mt-2",children:[n.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(f).then(()=>Ie.success(s("chat.highlight.copiedToClipboard"))).catch(()=>Ie.error(s("chat.highlight.couldNotCopy")))},"aria-label":s("chat.highlight.copyErrorDetails"),title:s("chat.highlight.copy"),className:"absolute right-1.5 top-1.5 z-10 flex h-6 w-6 items-center justify-center rounded-lg bg-background/80 text-muted-foreground backdrop-blur-sm transition-colors hover:bg-background hover:text-foreground",children:n.jsx(En,{className:"size-3.5"})}),n.jsx("pre",{className:"max-h-40 overflow-auto rounded-md border border-border/60 bg-background px-3 py-2 pr-8 font-mono text-xs text-foreground/80 whitespace-pre-wrap break-all",children:f})]})]}):null,e[18]=f,e[19]=s,e[20]=g):g=e[20];let v;return e[21]!==l||e[22]!==a||e[23]!==p||e[24]!==h||e[25]!==m||e[26]!==g||e[27]!==o?(v=n.jsx(xe,{icon:h,label:l,title:p,defaultExpanded:!0,variant:o,onClose:a,footerRight:m,children:g}),e[21]=l,e[22]=a,e[23]=p,e[24]=h,e[25]=m,e[26]=g,e[27]=o,e[28]=v):v=e[28],v}function Fe(t){const e=D.c(71);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{inline:o,voiceMode:a}=s,i=o===void 0?!1:o,r=a===void 0?!1:a,l=Q(),{error:V,clearError:d,finishReason:u,clearFinishReason:c,messages:p,isStreaming:f,submit:h,sendMessage:m}=Ue(),[g,v]=we(),{virtualMcpId:x,createTaskWithMessage:b}=et(),{chatMode:y,setChatMode:A,simpleModeTier:k}=tt(),j=qe("credits");let w;e[2]!==y||e[3]!==k||e[4]!==x||e[5]!==r?(w=se=>({...r?{voiceMode:!0}:{},tier:k,mode:y,toolApprovalLevel:se,agent:x?{id:x}:void 0}),e[2]=y,e[3]=k,e[4]=x,e[5]=r,e[6]=w):w=e[6];const C=w;let _;e[7]!==g.toolApprovalLevel?(_=g.toolApprovalLevel??_s(),e[7]=g.toolApprovalLevel,e[8]=_):_=e[8];const N=_,T=p.at(-1),I=T?.role==="assistant"?T.parts:[],E=I.filter(Ua),F=I.filter(Et),L=Zt(I),M=Ht(I);let q;e[9]!==V||e[10]!==m||e[11]!==l?(q=()=>{if(V){const me={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.fixInChatMessage",{error:V.message})}]}]};m(me)}},e[9]=V,e[10]=m,e[11]=l,e[12]=q):q=e[12];const K=q;let Z;e[13]!==m||e[14]!==l?(Z=()=>{const se={type:"doc",content:[{type:"paragraph",content:[{type:"text",text:l("chat.highlight.pleaseContinue")}]}]};m(se)},e[13]=m,e[14]=l,e[15]=Z):Z=e[15];const U=Z;let W;e[16]!==C||e[17]!==N||e[18]!==h?(W=(se,me)=>{h({kind:"toolOutput",toolCallId:se.toolCallId,output:{response:me}},C(N))},e[16]=C,e[17]=N,e[18]=h,e[19]=W):W=e[19];const P=W;let G;e[20]!==C||e[21]!==N||e[22]!==h?(G=(se,me)=>{h({kind:"toolOutput",toolCallId:se.toolCallId,output:{accepted:me}},C(N))},e[20]=C,e[21]=N,e[22]=h,e[23]=G):G=e[23];const ne=G;let H;e[24]!==b||e[25]!==g||e[26]!==A||e[27]!==v||e[28]!==l||e[29]!==x?(H=se=>{A("default"),v({...g,toolApprovalLevel:"auto"}),b({virtualMcpId:x,message:{parts:[{type:"text",text:l("chat.highlight.implementPlanMessage",{plan:se})}]}})},e[24]=b,e[25]=g,e[26]=A,e[27]=v,e[28]=l,e[29]=x,e[30]=H):H=e[30];const re=H,S=Ra;let O;e[31]!==C||e[32]!==h?(O=(se,me,Oe,Le)=>{h({kind:"approval",approvalId:se,approved:me,...Oe?{reason:Oe}:{}},C(Le))},e[31]=C,e[32]=h,e[33]=O):O=e[33];const J=O,$=Xt();if($.isCreditExhausted){let se;return e[34]!==j||e[35]!==d||e[36]!==i?(se=j?n.jsx(Ia,{onDismiss:d}):n.jsx("div",{className:B(!i&&"absolute bottom-full left-0 right-0"),children:n.jsx(St,{kind:"ai_budget_exhausted",onDismiss:d})}),e[34]=j,e[35]=d,e[36]=i,e[37]=se):se=e[37],se}const{showError:ee,showWarning:ie,hasApprovals:ce}=$,ae=E.map(Ea).join("|"),pe=Jt(L)?.toolCallId??"",Ve=M.map(Pa).join("|"),Ce=!i&&"absolute bottom-full left-0 right-0";let de;e[38]!==Ce?(de=B(Ce),e[38]=Ce,e[39]=de):de=e[39];let he;e[40]!==$.todos?(he=n.jsx(ba,{todos:$.todos}),e[40]=$.todos,e[41]=he):he=e[41];let le;e[42]!==d||e[43]!==$.planRefusal?(le=$.planRefusal&&n.jsx(St,{kind:$.planRefusal,onDismiss:d}),e[42]=d,e[43]=$.planRefusal,e[44]=le):le=e[44];let ue;e[45]!==d||e[46]!==V||e[47]!==K||e[48]!==ee?(ue=ee&&n.jsx(Be,{variant:"error",error:V,onDismiss:d,onFixInChat:K}),e[45]=d,e[46]=V,e[47]=K,e[48]=ee,e[49]=ue):ue=e[49];let fe;e[50]!==c||e[51]!==u||e[52]!==U||e[53]!==ie?(fe=ie&&n.jsx(Be,{variant:"warning",finishReason:u,onDismiss:c,onContinue:U}),e[50]=c,e[51]=u,e[52]=U,e[53]=ie,e[54]=fe):fe=e[54];const _e=ce&&n.jsx(ta,{approvals:M,isStreaming:f,onRespond:J},Ve),ve=$.hasPlans&&n.jsx(na,{plans:L,isStreaming:f,onApprove:re,onDismiss:S},pe),De=$.hasTaskSuggestion&&n.jsx(xa,{parts:F,isStreaming:f,onRespond:ne},F.at(-1)?.toolCallId??"");let ye;e[55]!==$.isWaitingForUserInput||e[56]!==P||e[57]!==f||e[58]!==ae||e[59]!==E?(ye=$.isWaitingForUserInput&&n.jsx(ls,{userAskParts:E,isStreaming:f,onSubmit:P},ae),e[55]=$.isWaitingForUserInput,e[56]=P,e[57]=f,e[58]=ae,e[59]=E,e[60]=ye):ye=e[60];let je;return e[61]!==de||e[62]!==he||e[63]!==le||e[64]!==ue||e[65]!==fe||e[66]!==_e||e[67]!==ve||e[68]!==De||e[69]!==ye?(je=n.jsxs("div",{className:de,children:[he,le,ue,fe,_e,ve,De,ye]}),e[61]=de,e[62]=he,e[63]=le,e[64]=ue,e[65]=fe,e[66]=_e,e[67]=ve,e[68]=De,e[69]=ye,e[70]=je):je=e[70],je}function Pa(t){return t.approvalId}function Ea(t){return t.toolCallId}function Ra(){document.querySelector("[data-chat-input]")?.focus()}function Ua(t){return t.type==="tool-user_ask"}Fe.Error=function(e){return n.jsx(Be,{variant:"error",error:e.error,onDismiss:e.onDismiss,onFixInChat:e.onFixInChat})};Fe.Warning=function(e){return n.jsx(Be,{variant:"warning",finishReason:e.finishReason,onDismiss:e.onDismiss,onContinue:e.onContinue})};Fe.UserAskQuestion=ls;function cs(t){const e=D.c(20),{taskId:s}=t,o=Q(),a=dn(s),i=un(a),r=pn(),{stop:l,removeLocalMessage:V}=Ue();if(i.length===0)return null;let d;e[0]!==o?(d=o("chat.queueTray.sendNow"),e[0]=o,e[1]=d):d=e[1];let u;e[2]!==l?(u=()=>{l()},e[2]=l,e[3]=u):u=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(Lt,{size:14}),e[4]=c):c=e[4];let p;e[5]!==d||e[6]!==u?(p=n.jsx(at,{asChild:!0,children:n.jsx(Y,{type:"button",variant:"ghost",size:"icon-sm","aria-label":d,onClick:u,children:c})}),e[5]=d,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==o?(f=o("chat.queueTray.sendNow"),e[8]=o,e[9]=f):f=e[9];let h;e[10]!==f?(h=n.jsx(it,{side:"top",children:n.jsx("p",{className:"text-xs",children:f})}),e[10]=f,e[11]=h):h=e[11];let m;e[12]!==p||e[13]!==h?(m=n.jsxs(rt,{delayDuration:400,children:[p,h]}),e[12]=p,e[13]=h,e[14]=m):m=e[14];let g;return e[15]!==r||e[16]!==V||e[17]!==o||e[18]!==s?(g=(v,x)=>n.jsxs("div",{className:"group/queuerow flex items-center gap-2 px-3 py-1.5",children:[n.jsx("span",{className:"flex size-[18px] shrink-0 items-center justify-center rounded-full bg-muted text-2xs font-semibold text-muted-foreground dark:bg-background",children:x+1}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:v.text}),n.jsx("div",{className:"flex shrink-0 items-center gap-1 opacity-0 transition-opacity focus-within:opacity-100 group-hover/queuerow:opacity-100",children:n.jsx(Y,{type:"button",variant:"ghost",size:"icon-sm",title:o("chat.queueTray.removeFromQueue"),"aria-label":o("chat.queueTray.removeFromQueue"),onClick:()=>{r.cancel(s,v.messageId).then(b=>{b&&(hn(s,v.messageId),V(v.messageId))})},children:n.jsx(Ut,{className:"size-3.5"})})})]},v.messageId),e[15]=r,e[16]=V,e[17]=o,e[18]=s,e[19]=g):g=e[19],n.jsxs("div",{className:"mb-1 overflow-hidden surface dark:bg-muted",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border py-1.5 pr-2 pl-3 text-xs text-muted-foreground",children:[n.jsx("span",{children:o(i.length===1?"chat.queueTray.queuedMessage":"chat.queueTray.queuedMessages",{count:i.length})}),m]}),i.map(g)]})}function ds(t){const e=D.c(3),[s]=we();let o;return e[0]!==s.enableSounds||e[1]!==t?(o=()=>{s.enableSounds&&fo(t.dataUri).catch(i=>{console.warn(`[sound] ${t.name} playback failed:`,i)})},e[0]=s.enableSounds,e[1]=t,e[2]=o):o=e[2],o}const Fa={name:"switch-005",dataUri:"data:audio/mpeg;base64,SUQzBAAAAAAAIlRTU0VAAAAOAAADTGF2ZjYyLjMuMTAwAAAAAAAAAAAAAAD/+1DAAAAAAAAAAAAAAAAAAAAAAABJbmZvAAAADwAAABkAABU4ABMTEx0dHR0nJycnMTExMTs7OztERERETk5OTlhYWFhiYmJibGxsbHZ2dnZ/f39/iYmJiZOTk5OdnZ2dp6enp7GxsbG7u7u7xMTExM7Ozs7Y2NjY4uLi4uzs7Oz29vb2/////wAAAABMYXZjNjIuMTEAAAAAAAAAAAAAAAAkBVYAAAAAAAAVOPCP8KUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//tQxAAACEwDXvQRAAG8Ii93HtACUCAABAKCJwfaCEHwfeoEAQdEAYygIHBOCAIAgCAJh9QIOg+D5/ygPh/wfB8DuKAgCHyn9QPh/5SCDv+CEHAQdxOD4B27c39tbckkqYbBAYAN9bNJLB+aXAf5wQAKdzxfbmrVIRQ4xNx3HwnoDmLhfMhgJiiw/HREXNCHqjvHEPEG8QjBYlxQNepJAT0kC8ip6JzSWj1TasoG+iyycbf2Uil1ovf1f/oUtR1qP+s1WSBFKoAAU02BDjMhuP/7UsQEgws8bRpd8YABJYPeBf9wCGXTGxBYcw5AJFMFMAmQQAhGAxgLBgHIAMYAAALhgAchipbe/91aU1VV4zcZj1Vf1XgYCIMBNrsBAIGs9/Ue4i/xFPeqCqwViI9/UeLf///rOngdA3OPHFjmOBv+EQnGahgaZxVplmkAH5JadDTQlNCEuGNiWYbCCONWdUJg6HXNazFdu1T+VgaEpOP70exv7f2/4b/yH//2/4cqCX/zWRUrIw+IPNMNlDnjAXQas/I4AzmYifA0tMSCgQDF//tSxBCDSzzi3k/sQwEyCtjJ/rBZAk+Uqj1YhA5YMCAAMwgOUchTkK7OR7LbMl0W1H6SvzG0Q2ZzfKUhnmTobv9DNhS1v7P8h//8Gv8gTRt1jReZ7YEjmMQg9hhwwMycHooasFmZyjcZGBKJD+IwbMCQQLoi+IQXCcIoydKoilI2MWFS5uJdDEu2taRrYI2ZSqKY50pJLv2NfjUAAuQAMfqVQ/T3PDQgMJMeEZ45hJzY6MNoFMxqTj1zNGQKJjAxEsSCBgQJBSIL0mcKYQJfVAn/+1LEGwLKlEKrD3MiYcuMkVa/wABB8Vh6M1q1epbvXwWBURhkyEhWZ/////////////9gjZ/Wt4w+4MNMCpE4TBYQl4w1IHvMDdA2zBngBMwc8COMDhCpDAfgOAAgrBgNYU+YC0FBGAkAMpgWoSCYAGESGBGAKBgXgJOdiOJmMCmNwCYNDJhYRPykRCJhTBnEUzlsjv4UNLj/z97n3Mv/7z1nZqyitYAZIqErIwMwJAqEw0GAAMFptJMaqFwB8CQIWlhuhuDAwNjfuwrQFAYXCf/7UsQVAA+9PTP42gYRdiIu9zBwAPbFUCi0DAhgNcS+7cDwVgM05A9bUDeuQMyE/u3CygVISgZhpIau/9PhdQG2C9DpxZZJmn/dn/Psmt0EFm////l84ThUTopE4VD/9JkubOGasTvN30C20G21qgUCkVCoUCgPMywrPCGly27V5q5t24vl/8jSlSAPCxzNseNCw3oh3NGBu4BZJ5hv7DRSfR/+eWG7nA8IKh2Olv5iz3q5m3//Joxo3JqNyYkSuGt/k6D4DeoBOHmHdl0dkZYA//tSxAUAC4B1Z/2DADEcA17Z/uhI4Yoik/TrZo+ww7UtmpW4LDWu2IacoJKJJeTSM+ZmAYBEiU+ZnnAwCn1VVVV6JUJQVnioKhrgqdKgqGpUFeCp0sDR3ztQNREDRUFioKuxKCpYGQBlRIBk+aLwb8KblGQVDdphPYTUdBOGbVpAaTF6ZdjEV0iRUZRCYkA4oUQDx5zqDugtXvza/7fuNNvfZ+j9v+T/2f//J/4cAAOTpE5K4zksR9MfIB+TDcQTI4gNs1XKAzEFUrGkxABYEBb/+1LEEYNKrEjgT/TCwYYVmUX+mHoKgWhKU5Eiw9SFIRmppw+3fYo4siPhUFeexM8KgIO6wVuPDDy01qeRaVbw357//y3+o8M0pBNlNLCGBzGKwyYw2IIFOE1WNTjRM6x8MlA1AxDhUHTAkEiyKpnbWrLcaOBotBUKbk1pypcWDAIK00AhKLGkUco6q9VWvM53mcaq3tVa8zjTM/tX//EDP//////////XAAmrwAAPoKwcw0ShDCZD/BQlhzinxQdorsOuXTEIC01ZkJyu4k/qPP/7UsQUAEjkrrkvZaPBIRXUoe5QObfMhYKX9RVgTPqCSCaSCaSC0XVdV1f/////6IAlguuAJSiDRNloNBsZg+0+Ts8MMCn81WUTRAlIi+GHECD0y8AWDIqswYsxGOSKVV7MqOni8tkVOip0fZX/////9HrMCbAz2EHGS4GKAAiRAAAYAcDdKd4G6Z/nwYgJ0ZAIgZyC8aPAs/iPBhwMpWDQNARltNS5Y61v//9i8Yl4SkFkIGTkAc0UBrIYLPA4MYBEy+YLMRuY4nhTC3hZA68H//tSxCoAyQC6mY6CkWDJBIsBz/QUrgNmahSzcrYw0/HhfnMAZBojDsgTFkDR5MDkG/DZEbk2FCmowqdqv2TYABiJwqqYjaQRGZ1URZ1DhSsdiHX/GBu0QpzIBNSaLqZ0ARkwFARxMrpt/Eh47mbQAhhU6sisFUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LESoHHJCRaj/dmYAIAQAAQAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsSLg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7UsShg8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVX/+1LEoYPAAAGkAAAAIAAANIAAAARVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//tSxKGDwAABpAAAACAAADSAAAAEVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVMQU1FMy4xMDBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",duration:.609,format:"mp3",license:"CC0",author:"Kenney"},Oa=zs.togglePlanMode.keys.map(t=>t==="Shift"?"⇧":t).join(""),La=[{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/perplexity.png",name:"Perplexity"},{src:"/connections/github.png",name:"GitHub"}];function za(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1.5",children:La.map(Ba)}),t[0]=e):e=t[0],e}function Ba(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-1 ring-border object-cover bg-white"},t.name)}function $a({disabled:t,onOpenConnections:e,virtualMcpId:s,selectedModel:o,isStreaming:a,onUnsupportedFile:i}){const r=Q(),[l,V]=R.useState(!1),d=ds(Fa),{org:u}=Te(),{editor:c}=Rt(),p=R.useRef(null),f=lt(o),h=()=>{!f||a||(V(!1),p.current?.click())},m=async S=>{const O=S.target.files;if(!O||O.length===0||!c)return;const J=Array.from(O);try{let $=c.state.selection.from;for(const ee of J)await Wt(c,o??null,ee,$,i,r),$=c.state.selection.to}finally{p.current&&(p.current.value="")}},g=uo({connectionId:s,orgId:u.id,orgSlug:u.slug}),v=Ms.virtualMcpPrompts(s,u.id),{data:x,isLoading:b}=Ps({queryKey:v,queryFn:()=>po(g),staleTime:6e4,enabled:l&&!!g}),y=x?.prompts??[],[A,k]=R.useState(null),{chatMode:j,setChatMode:w}=tt(),[C,_]=we(),N=Ft()?.lockedHarness!=="claude-code",T=ke.find(S=>S.value===C.toolApprovalLevel)??ke[0],I=r(T.shortKey),E=S=>{const O=ke.find(J=>J.value===S);if(O){if(O.value===C.toolApprovalLevel){V(!1);return}d(),X("chat_approval_level_changed",{from_level:C.toolApprovalLevel,to_level:O.value,source:"tools_popover"}),_({...C,toolApprovalLevel:O.value}),V(!1)}},F=j==="plan",L=()=>{d();const S=F?"default":"plan";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),w(S),V(!1)},M=()=>{e(),V(!1)},q=async(S,O)=>{if(!c||!g)return;const J=vt(S._meta),$={from:c.state.selection.from,to:c.state.selection.to};try{const ee=await ho(g,S.name,O);on(c,$,{id:S.name,name:no(S.name,J),metadata:ee.messages,char:"/",kind:"prompt",args:O})}catch{Ie.error(r("chat.toolsPopover.failedLoadPrompt"))}},K=async S=>{V(!1);const O=!!(S.arguments&&S.arguments.length>0);if(X("chat_prompt_inserted",{prompt_name:S.name,with_arguments:O}),O){k(S);return}await q(S)},Z=async S=>{A&&(await q(A,S),k(null))},U=()=>{d();const S=j==="gen-image"?"default":"gen-image";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),w(S),V(!1)},W=()=>{d();const S=j==="web-search"?"default":"web-search";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),w(S),V(!1)},P=()=>{d();const S=j==="deep-research"?"default":"deep-research";X("chat_mode_changed",{from_mode:j,to_mode:S,source:"tools_popover"}),w(S),V(!1)},G=j==="gen-image",ne=j==="web-search",H=j==="deep-research",re=n.jsx("input",{ref:p,type:"file",multiple:!0,accept:ao(o??null),className:"hidden",onChange:m,disabled:a});return n.jsxs(n.Fragment,{children:[re,n.jsxs(Es,{open:l,onOpenChange:S=>{S&&!l&&X("chat_tools_popover_opened",{chat_mode:j}),V(S)},children:[n.jsx(Rs,{asChild:!0,children:n.jsxs(Y,{type:"button",variant:"ghost",size:"default",disabled:t,title:r("chat.toolsPopover.tools"),"aria-label":r("chat.toolsPopover.tools"),className:B("text-muted-foreground hover:text-foreground transition-[gap] duration-200 shrink min-w-0","gap-0 @[320px]/chat-bottom:gap-1.5"),children:[n.jsx(Rn,{size:14}),n.jsx("span",{className:B("min-w-0 truncate transition-[max-width,opacity] duration-200 ease-out max-w-0 opacity-0","@[320px]/chat-bottom:max-w-24 @[320px]/chat-bottom:opacity-100"),children:r("chat.toolsPopover.tools")})]})}),n.jsxs(Us,{align:"start",className:"w-56 p-1.5 space-y-1",children:[f?n.jsxs(be,{onClick:h,disabled:a,children:[n.jsx(bt,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.addFile")})]}):n.jsxs(rt,{children:[n.jsx(at,{asChild:!0,children:n.jsxs(be,{"aria-disabled":"true",className:"opacity-50 cursor-not-allowed",onSelect:S=>S.preventDefault(),children:[n.jsx(bt,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.addFile")})]})}),n.jsx(it,{side:"right",children:r("chat.toolsPopover.modelNoFileSupport")})]}),n.jsxs(be,{onClick:L,className:B(F&&"text-special"),children:[n.jsx(zt,{size:16,className:B(F&&"text-special")}),n.jsx("span",{className:"flex-1 whitespace-nowrap",children:r("chat.toolsPopover.planMode")}),n.jsx("span",{className:B("text-xs text-muted-foreground",F&&"text-special font-medium"),children:Oa})]}),n.jsxs(be,{onClick:U,className:B(G&&"text-special"),children:[n.jsx(Qt,{size:16,className:B(G&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.createImage")}),G&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(be,{onClick:W,className:B(ne&&"text-special"),children:[n.jsx(qt,{size:16,className:B(ne&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.webSearch")}),ne&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(be,{onClick:P,className:B(H&&"text-special"),children:[n.jsx(Kt,{size:16,className:B(H&&"text-special")}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.deepResearch")}),H&&n.jsx("span",{className:"text-xs text-special font-medium",children:r("chat.toolsPopover.on")})]}),n.jsxs(pt,{children:[n.jsxs(ht,{className:"gap-2",children:[n.jsx("span",{className:"flex size-4 items-center justify-center text-base font-medium text-muted-foreground",children:"/"}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.prompts")})]}),n.jsx(ft,{className:"w-80 max-h-72 overflow-y-auto p-1.5",children:b?n.jsxs("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-muted-foreground",children:[n.jsx(Fs,{className:"size-3.5"}),r("chat.toolsPopover.loadingPrompts")]}):y.length===0?n.jsx("div",{className:"px-2 py-3 text-sm text-muted-foreground",children:r("chat.toolsPopover.noPromptsAvailable")}):y.map(S=>n.jsxs(be,{onClick:()=>K(S),className:"flex flex-col items-start gap-0.5",children:[n.jsx("span",{className:"font-medium text-sm capitalize",children:S.title||so(S.name,vt(S._meta))}),S.description&&n.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:S.description})]},S.name))})]}),N&&n.jsxs(pt,{children:[n.jsxs(ht,{className:"gap-2",children:[n.jsx($e,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.approval")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:I})]}),n.jsx(ft,{className:"w-48 p-1.5",children:n.jsx(Os,{value:C.toolApprovalLevel,onValueChange:E,children:ke.map(S=>n.jsx(Ls,{value:S.value,children:r(S.labelKey)},S.value))})})]}),n.jsxs(be,{onClick:M,children:[n.jsx(Un,{size:16}),n.jsx("span",{className:"flex-1",children:r("chat.toolsPopover.connections")}),n.jsx(R.Suspense,{children:n.jsx(za,{})})]})]})]}),n.jsx(nn,{prompt:A,setPrompt:k,onSubmit:Z})]})}const qa=[{src:"/connections/github.png",name:"GitHub"},{src:"/connections/gmail.png",name:"Gmail"},{src:"/connections/linear.png",name:"Linear"},{src:"/connections/shopify.png",name:"Shopify"},{src:"/connections/firecrawl.png",name:"Firecrawl"},{src:"/connections/perplexity.png",name:"Perplexity"}];function Ka(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center -space-x-1",children:qa.map(Qa)}),t[0]=e):e=t[0],e}function Qa(t){return n.jsx("img",{src:t.src,alt:t.name,className:"size-5 rounded-sm ring-2 ring-muted object-cover bg-white"},t.name)}function Ya(t){const e=D.c(10),{onClick:s}=t,o=Q();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=B("group relative z-10 flex items-center gap-3 w-full px-4 py-3","rounded-b-2xl","cursor-pointer"),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("chat.connectionsBanner.description"),e[1]=o,e[2]=i):i=e[2];let r;e[3]!==i?(r=n.jsx("p",{className:"flex-1 text-xs text-muted-foreground truncate text-left",children:i}),e[3]=i,e[4]=r):r=e[4];let l,V;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ka,{}),V=n.jsx(Bs,{size:14,className:"shrink-0 text-muted-foreground/60 group-hover:text-muted-foreground transition-colors"}),e[5]=l,e[6]=V):(l=e[5],V=e[6]);let d;return e[7]!==s||e[8]!==r?(d=n.jsxs("button",{type:"button",onClick:s,className:a,children:[r,l,V]}),e[7]=s,e[8]=r,e[9]=d):d=e[9],d}function Wa(t){const e=D.c(4),{data:s}=t;let o;e[0]!==s?(o=s.map(Ga),e[0]=s,e[1]=o):o=e[1];let a;return e[2]!==o?(a=n.jsx("div",{className:"flex items-center justify-center gap-[2px] h-10 overflow-hidden","aria-hidden":"true",children:o}),e[2]=o,e[3]=a):a=e[3],a}function Ga(t,e){return n.jsx("div",{className:"w-[2px] shrink-0 rounded-full bg-chart-2 transition-[height] duration-75 ease-out",style:{height:`${Math.max(4,Math.round(t*40))}px`}},e)}const Pe=12e3,Nt=oe({token:te(),expiresAt:qs()});Ks("provider",[oe({provider:Ae("elevenlabs"),conversationToken:te().min(1)}),oe({provider:Ae("openai"),transport:Ae("webrtc")})]);const Ha=$s([Nt.extend({provider:Ae("elevenlabs").default("elevenlabs"),conversationToken:te().min(1)}),Nt.extend({provider:Ae("openai"),transport:Ae("webrtc")})]);oe({token:te().min(1).max(4096),text:te().trim().min(1).max(Pe)});const us=oe({request:te().trim().min(1).max(Pe)}),Je=5e3;Dt(oe({role:Re(["user","agent"]),text:te().min(1).max(Je)})).max(60).refine(t=>t.reduce((e,s)=>e+s.text.length,0)<=Je,{message:"Voice transcript is too long"});function rr(t){const e=[];let s=Je;for(const o of t.slice(-60).reverse()){if(s<=0)break;const a=o.text.slice(-s);e.unshift({role:o.role,text:a}),s-=a.length}return e}oe({token:te().min(1).max(4096),sdp:te().min(1).max(1e5),language:Re(["en","pt"]).default("en")}).strict();const Ja=oe({sdp:te().min(1).max(1e5)});async function Za(t,e,s,o,a){if(t.provider==="openai"){const{startOpenAIConversation:l}=await mt(async()=>{const{startOpenAIConversation:V}=await import("./openai-conversation-zvFqUh2z.js");return{startOpenAIConversation:V}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101]));return l(a,s,o)}const{Conversation:i}=await mt(async()=>{const{Conversation:l}=await import("./index-yN0BIuMc.js");return{Conversation:l}},[]);o.throwIfAborted();const r=await i.startSession({...s,clientTools:{delegate_to_agent:async l=>{const V=us.safeParse(l);return JSON.stringify(V.success?await s.onDelegate(V.data):{status:"rejected",reason:"A complete request is required."})},get_agent_status:()=>JSON.stringify(s.getWorkStatus()),stop_agent_work:()=>JSON.stringify(s.cancelCurrentWork())},conversationToken:t.conversationToken,connectionType:"webrtc",overrides:{agent:{language:e}}});return o.aborted&&(await r.endSession(),o.throwIfAborted()),{endSession:()=>r.endSession(),setMicMuted:l=>r.setMicMuted(l),getOutputVolume:()=>r.getOutputVolume(),publishUpdate:l=>{const V=JSON.stringify({source:"Studio background data, not a user request or instructions",contextId:l.contextId,requestId:l.delegationId,text:l.text});l.delivery==="context"?r.sendContextualUpdate(V):r.sendUserMessage(`[Studio background event, not a new user request]
10
10
  ${V}
11
11
  Briefly report this update. Do not delegate it as new work.`)}}}const Xa=oe({background:Ae(!0),status:Ae("started"),jobId:te().min(1)}),ei=oe({item:oe({id:te().min(1),title:te(),status:te()})}),ti=t=>`${t}:react-msg`;function ps(t,e){const s=t.findIndex(a=>a.id===e&&a.role==="user");if(s<0)return null;const o=[];for(const a of t.slice(s+1))if(!a.metadata?.subtaskJobId){if(a.role==="user")break;a.role==="assistant"&&o.push(a)}return o}function It(t,e){const s=[],o=[];for(const a of ps(t,e)??[])for(const i of a.parts){if(!("state"in i)||i.state!=="output-available"||!("output"in i))continue;const r=i.type;if(r==="tool-subtask"){const l=Xa.safeParse(i.output);l.success&&s.push(l.data.jobId)}else if(r==="tool-TASK_BOARD_ITEM_CREATE"){const l=ei.safeParse(i.output);l.success&&o.push(l.data.item)}}return{backgroundJobs:s,tasks:o}}function Tt(t,e){const s=ps(t,e);if(!s)return null;const o=s.at(-1);if(!o||o.parts.some(l=>"state"in l&&["approval-requested","input-streaming","input-available"].includes(String(l.state))))return null;const a=o.parts.findLast(l=>l.type==="text"||l.type==="dynamic-tool"||l.type.startsWith("tool-"));if(a?.type!=="text")return"";if(a.state==="streaming")return null;const i=a.text.replace(/```[\s\S]*?```/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/^\s{0,3}(?:#{1,6}\s+|[-*+]\s+|\d+\.\s+)/gm,"").replace(/[*_`]/g,"").trim();if(!i)return"";if(i.length<=Pe)return i;const r=i.slice(0,Pe-1);return`${r.slice(0,r.lastIndexOf(" "))}…`}class si{constructor(e,s){this.url=e,this.language=s}url;language;state={phase:"idle",muted:!1,working:!1,error:null};listeners=new Set;generation=0;conversation;startupAbort;userSpeaking=!1;token;timer;expires;bindings;jobs=new Map;announcements=[];lastActivity=0;approvalReported=!1;cleanup=Promise.resolve();dispatchQueue=Promise.resolve();lastContext="";lastWorkStatus="";utterance=0;seenUserEvents=new Set;tasks=new Map;boardUpdates=new Map;subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;outputVolume=()=>this.conversation?.getOutputVolume()??0;patch(e){if(!Object.entries(e).every(([s,o])=>this.state[s]===o)){this.state={...this.state,...e};for(const s of this.listeners)s()}}updateBindings(e,s){if(this.bindings=e,!s&&this.state.phase!=="idle"){this.stop();return}this.conversation&&(this.updateContext(),this.collectResults())}requestStatus(e){return e.result!==void 0?"finished":e.accepted?e.background?"running_in_background":this.bindings?.messages.some(s=>s.id===e.messageId)?"running":"queued":"submitting"}status(){const e=this.bindings;return{status:e?.isWaitingForApprovals?"approval_required":e?.error||e?.status==="error"?"failed":e?.isStreaming||e?.isRunInProgress?"working":"idle",requests:[...this.jobs.values()].slice(-6).map(s=>({id:s.messageId,request:s.request.slice(0,200),status:this.requestStatus(s),result:s.result?.slice(0,500)})),tasks:[...this.tasks.values()].slice(-10).map(s=>({title:s.title.slice(0,120),status:s.status}))}}updateContext(){const e=this.bindings?.voiceContext??"";e!==this.lastContext&&(this.lastContext=e,this.conversation?.publishUpdate({text:`Current Studio view, supplied as context only:
12
12
  ${e.slice(0,12e3)}`,delivery:"context",contextId:"studio-view"}))}collectResults(){const e=this.bindings;if(!e||!this.conversation)return;const s=e.isStreaming||e.isRunInProgress;if(this.patch({working:s||[...this.jobs.values()].some(o=>o.accepted&&o.result===void 0)}),this.publishWorkStatus(),e.isWaitingForApprovals){this.approvalReported||(this.approvalReported=!0,this.report("The Studio agent needs the user's approval. The approval controls are visible in this chat. Ask the user to review them; do not approve on their behalf."));return}this.approvalReported=!1;for(const o of this.jobs.values()){if(!o.accepted||o.result!==void 0)continue;if(o.background){this.collectBackground(o,s);continue}const a=e.messages.findIndex(l=>l.id===o.messageId);if(a<0)continue;const i=a>=0&&e.messages.slice(a+1).some(l=>l.role==="user");if(s&&!i)continue;let r;if(!s&&!i&&(e.error||e.status==="error"))r="The agent's run failed. Ask the user to return to the chat for the error details; do not claim completion.";else if(!s&&!i&&e.finishReason&&["error","length","content-filter","aborted"].includes(e.finishReason))r=`The run ended with status ${e.finishReason}; successful completion is not established.`;else{const l=Tt(e.messages,o.messageId);if(l===null)continue;r=l;const V=It(e.messages,o.messageId);if(this.track(V.tasks),V.backgroundJobs.length){o.background=V.backgroundJobs,this.collectBackground(o,s);continue}}this.finish(o,r||"The agent finished without a final text response. Do not infer that the requested change succeeded.")}this.patch({working:s||[...this.jobs.values()].some(o=>o.accepted&&o.result===void 0)}),this.publishWorkStatus()}collectBackground(e,s){const o=this.bindings?.messages??[],a=[];for(const i of e.background??[]){const r=ti(i),l=o.findIndex(u=>u.id===r);if(l<0)return;const V=o.slice(l+1).some(u=>u.role==="user");if(s&&!V)return;const d=Tt(o,r);if(d===null)return;this.track(It(o,r).tasks),a.push(d)}this.finish(e,a.filter(Boolean).join(`
@@ -1 +1 @@
1
- import{c as k,j as h,r as C,m as L}from"./index-BpRy7AHp.js";import{n as Z}from"./LinkBroken01-Dhn_nIp2.js";import{A as y}from"./agent-icon-AbOSM7KF.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
1
+ import{c as k,j as h,r as C,m as L}from"./index-CSIpvoWn.js";import{n as Z}from"./LinkBroken01-DWhYckSm.js";import{A as y}from"./agent-icon-DKTp0XyY.js";const M={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},R={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},T={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},W={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function G(E){const t=k.c(13),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g;if(e?.startsWith("icon://")||e?.includes("#agentcolor=")){const r=W[n];let l;return t[0]!==o||t[1]!==e||t[2]!==s||t[3]!==r?(l=h.jsx(y,{icon:e,name:s,size:r,className:o}),t[0]=o,t[1]=e,t[2]=s,t[3]=r,t[4]=l):l=t[4],l}const S=e??"no-icon";let i;return t[5]!==o||t[6]!==c||t[7]!==I||t[8]!==e||t[9]!==s||t[10]!==n||t[11]!==S?(i=h.jsx($,{icon:e,name:s,size:n,className:o,fallbackIcon:c,fit:I},S),t[5]=o,t[6]=c,t[7]=I,t[8]=e,t[9]=s,t[10]=n,t[11]=S,t[12]=i):i=t[12],i}function $(E){const t=k.c(25),{icon:e,name:s,size:w,className:o,fallbackIcon:c,fit:g}=E,n=w===void 0?"md":w,I=g===void 0?"cover":g,[S,i]=C.useState(!1),r=!!e&&S,l=M[n],p=R[n];let a;t[0]!==o||t[1]!==l||t[2]!==p?(a=L("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,p,o),t[0]=o,t[1]=l,t[2]=p,t[3]=a):a=t[3];const N=e||void 0,_=I==="contain"?"object-contain":"object-cover",A=!r&&"hidden";let m;t[4]!==_||t[5]!==A?(m=L("h-full w-full",_,A),t[4]=_,t[5]=A,t[6]=m):m=t[6];let v,j;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=()=>i(!1),j=()=>i(!0),t[7]=v,t[8]=j):(v=t[7],j=t[8]);let d;t[9]!==s||t[10]!==N||t[11]!==m?(d=h.jsx("img",{src:N,alt:s,className:m,onError:v,onLoad:j}),t[9]=s,t[10]=N,t[11]=m,t[12]=d):d=t[12];const z=r&&"hidden";let f;t[13]!==z?(f=L("h-full w-full flex items-center justify-center bg-muted/20",z),t[13]=z,t[14]=f):f=t[14];let x;t[15]!==c||t[16]!==n?(x=c??h.jsx(Z,{size:T[n],className:"text-muted-foreground"}),t[15]=c,t[16]=n,t[17]=x):x=t[17];let u;t[18]!==f||t[19]!==x?(u=h.jsx("div",{className:f,children:x}),t[18]=f,t[19]=x,t[20]=u):u=t[20];let b;return t[21]!==d||t[22]!==u||t[23]!==a?(b=h.jsxs("div",{className:a,children:[d,u]}),t[21]=d,t[22]=u,t[23]=a,t[24]=b):b=t[24],b}export{G as I};
@@ -1 +1 @@
1
- import{c as r,a5 as c,ak as u,K as f,i as y,q as A,e as m,j as T}from"./index-BpRy7AHp.js";function R(){const t=r.c(7),{org:e}=c(),i=u();let n;t[0]!==e.id?(n=f.jiraIntegration(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==i?(s=async()=>(await i.call("JIRA_INTEGRATION_GET",{})).integration,t[2]=i,t[3]=s):s=t[3];let a;return t[4]!==n||t[5]!==s?(a={queryKey:n,queryFn:s},t[4]=n,t[5]=s,t[6]=a):a=t[6],y(a)}function _(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=async l=>(await i.call("JIRA_INTEGRATION_UPSERT",l)).integration,t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraIntegration(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function g(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=()=>i.call("JIRA_INTEGRATION_DELETE",{}),t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraIntegration(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function J(t,e){const i=r.c(10),n=e===void 0?"":e,{org:s}=c(),a=u();let o;i[0]!==s.id||i[1]!==n?(o=f.jiraBoards(s.id,n),i[0]=s.id,i[1]=n,i[2]=o):o=i[2];let l;i[3]!==n||i[4]!==a?(l=async()=>(await a.call("JIRA_BOARDS_LIST",n?{query:n}:{})).boards,i[3]=n,i[4]=a,i[5]=l):l=i[5];let d;return i[6]!==t||i[7]!==o||i[8]!==l?(d={queryKey:o,enabled:t,staleTime:6e4,queryFn:l},i[6]=t,i[7]=o,i[8]=l,i[9]=d):d=i[9],y(d)}function q(t){const e=r.c(10),{org:i}=c(),n=u();let s;e[0]!==t||e[1]!==i.id?(s=f.jiraBoardColumns(i.id,t),e[0]=t,e[1]=i.id,e[2]=s):s=e[2];const a=t!==null;let o;e[3]!==t||e[4]!==n?(o=async()=>(await n.call("JIRA_BOARD_COLUMNS_LIST",{boardId:t??""})).columns,e[3]=t,e[4]=n,e[5]=o):o=e[5];let l;return e[6]!==s||e[7]!==a||e[8]!==o?(l={queryKey:s,enabled:a,staleTime:6e4,queryFn:o},e[6]=s,e[7]=a,e[8]=o,e[9]=l):l=e[9],y(l)}function S(){const t=r.c(7),{org:e}=c(),i=u();let n;t[0]!==e.id?(n=f.jiraAutomations(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==i?(s=async()=>(await i.call("JIRA_AUTOMATION_LIST",{})).automations,t[2]=i,t[3]=s):s=t[3];let a;return t[4]!==n||t[5]!==s?(a={queryKey:n,queryFn:s},t[4]=n,t[5]=s,t[6]=a):a=t[6],y(a)}function j(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=async l=>(await i.call("JIRA_AUTOMATION_UPSERT",l)).automation,t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraAutomations(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function E(){const t=r.c(2),e=u();let i;return t[0]!==e?(i={mutationFn:n=>e.call("JIRA_RUN_START",n)},t[0]=e,t[1]=i):i=t[1],m(i)}function N(t){const e=r.c(4),{size:i,className:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=T.jsx("path",{d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0z"}),e[0]=s):s=e[0];let a;return e[1]!==n||e[2]!==i?(a=T.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"#2684FF","aria-hidden":"true",className:n,children:s}),e[1]=n,e[2]=i,e[3]=a):a=e[3],a}export{N as J,R as a,S as b,j as c,_ as d,g as e,J as f,E as g,q as u};
1
+ import{c as r,a5 as c,ak as u,K as f,i as y,q as A,e as m,j as T}from"./index-CSIpvoWn.js";function R(){const t=r.c(7),{org:e}=c(),i=u();let n;t[0]!==e.id?(n=f.jiraIntegration(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==i?(s=async()=>(await i.call("JIRA_INTEGRATION_GET",{})).integration,t[2]=i,t[3]=s):s=t[3];let a;return t[4]!==n||t[5]!==s?(a={queryKey:n,queryFn:s},t[4]=n,t[5]=s,t[6]=a):a=t[6],y(a)}function _(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=async l=>(await i.call("JIRA_INTEGRATION_UPSERT",l)).integration,t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraIntegration(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function g(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=()=>i.call("JIRA_INTEGRATION_DELETE",{}),t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraIntegration(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function J(t,e){const i=r.c(10),n=e===void 0?"":e,{org:s}=c(),a=u();let o;i[0]!==s.id||i[1]!==n?(o=f.jiraBoards(s.id,n),i[0]=s.id,i[1]=n,i[2]=o):o=i[2];let l;i[3]!==n||i[4]!==a?(l=async()=>(await a.call("JIRA_BOARDS_LIST",n?{query:n}:{})).boards,i[3]=n,i[4]=a,i[5]=l):l=i[5];let d;return i[6]!==t||i[7]!==o||i[8]!==l?(d={queryKey:o,enabled:t,staleTime:6e4,queryFn:l},i[6]=t,i[7]=o,i[8]=l,i[9]=d):d=i[9],y(d)}function q(t){const e=r.c(10),{org:i}=c(),n=u();let s;e[0]!==t||e[1]!==i.id?(s=f.jiraBoardColumns(i.id,t),e[0]=t,e[1]=i.id,e[2]=s):s=e[2];const a=t!==null;let o;e[3]!==t||e[4]!==n?(o=async()=>(await n.call("JIRA_BOARD_COLUMNS_LIST",{boardId:t??""})).columns,e[3]=t,e[4]=n,e[5]=o):o=e[5];let l;return e[6]!==s||e[7]!==a||e[8]!==o?(l={queryKey:s,enabled:a,staleTime:6e4,queryFn:o},e[6]=s,e[7]=a,e[8]=o,e[9]=l):l=e[9],y(l)}function S(){const t=r.c(7),{org:e}=c(),i=u();let n;t[0]!==e.id?(n=f.jiraAutomations(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==i?(s=async()=>(await i.call("JIRA_AUTOMATION_LIST",{})).automations,t[2]=i,t[3]=s):s=t[3];let a;return t[4]!==n||t[5]!==s?(a={queryKey:n,queryFn:s},t[4]=n,t[5]=s,t[6]=a):a=t[6],y(a)}function j(){const t=r.c(8),{org:e}=c(),i=u(),n=A();let s;t[0]!==i?(s=async l=>(await i.call("JIRA_AUTOMATION_UPSERT",l)).automation,t[0]=i,t[1]=s):s=t[1];let a;t[2]!==e||t[3]!==n?(a=()=>n.invalidateQueries({queryKey:f.jiraAutomations(e.id)}),t[2]=e,t[3]=n,t[4]=a):a=t[4];let o;return t[5]!==s||t[6]!==a?(o={mutationFn:s,onSettled:a},t[5]=s,t[6]=a,t[7]=o):o=t[7],m(o)}function E(){const t=r.c(2),e=u();let i;return t[0]!==e?(i={mutationFn:n=>e.call("JIRA_RUN_START",n)},t[0]=e,t[1]=i):i=t[1],m(i)}function N(t){const e=r.c(4),{size:i,className:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=T.jsx("path",{d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0z"}),e[0]=s):s=e[0];let a;return e[1]!==n||e[2]!==i?(a=T.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"#2684FF","aria-hidden":"true",className:n,children:s}),e[1]=n,e[2]=i,e[3]=a):a=e[3],a}export{N as J,R as a,S as b,j as c,_ as d,g as e,J as f,E as g,q as u};
@@ -1 +1 @@
1
- import{c as n,m as r,j as i,cu as p}from"./index-BpRy7AHp.js";function d(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{d as L};
1
+ import{c as n,m as r,j as i,cu as p}from"./index-CSIpvoWn.js";function d(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{d as L};
@@ -1 +1 @@
1
- import{c as p,j as s,b as y,P as b,O as _,h as g,B as S,L as j,k as v,l as A,m as N}from"./index-BpRy7AHp.js";import{R}from"./required-auth-layout-Lh-Wt6uK.js";import{u as T}from"./use-deployment-admin-Bw3ciRk9.js";const D=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function K(){const e=p.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:L},e[0]=a):a=e[0];const d=A(a),r=y();let t;e[1]!==d||e[2]!==r?(t=D.map(o=>s.jsx(j,{to:o.to,className:N("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",d.startsWith(o.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(o.labelKey)},o.to)),e[1]=d,e[2]=r,e[3]=t):t=e[3];let n;return e[4]!==t?(n=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=n):n=e[5],n}function L(e){return e.location.pathname}function k(){const e=p.c(22),{isAdmin:a,loading:d,needsEmailVerification:r}=T(),t=y();if(d){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(g,{className:"size-5 text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!a){let i;e[1]!==t?(i=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let c;e[8]!==m?(c=s.jsx(S,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(j,{to:"/",children:m})}),e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==i||e[11]!==l||e[12]!==c?(h=s.jsx(v,{area:i,description:l,action:c}),e[10]=i,e[11]=l,e[12]=c,e[13]=h):h=e[13],h}let n;e[14]!==t?(n=t("admin.layout.adminDashboard"),e[14]=t,e[15]=n):n=e[15];let o;e[16]!==n?(o=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:n})}),e[16]=n,e[17]=o):o=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(b.Content,{children:s.jsx(_,{})}),e[19]=f):f=e[19];let x;return e[20]!==o?(x=s.jsxs(b,{variant:"plain",className:"h-dvh",children:[o,u,f]}),e[20]=o,e[21]=x):x=e[21],x}function P(){const e=p.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(R,{children:s.jsx(k,{})}),e[0]=a):a=e[0],a}export{P as default};
1
+ import{c as p,j as s,b as y,P as b,O as _,h as g,B as S,L as j,k as v,l as A,m as N}from"./index-CSIpvoWn.js";import{R}from"./required-auth-layout-C3gt0jrF.js";import{u as T}from"./use-deployment-admin-Dpt106eE.js";const D=[{to:"/_admin/users",labelKey:"admin.layout.usersTab"},{to:"/_admin/orgs",labelKey:"admin.layout.organizationsTab"},{to:"/_admin/prompts",labelKey:"admin.layout.promptsTab"}];function K(){const e=p.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:L},e[0]=a):a=e[0];const d=A(a),r=y();let t;e[1]!==d||e[2]!==r?(t=D.map(o=>s.jsx(j,{to:o.to,className:N("-mb-px border-b-2 px-3 py-2.5 text-sm font-medium transition-colors",d.startsWith(o.to)?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:r(o.labelKey)},o.to)),e[1]=d,e[2]=r,e[3]=t):t=e[3];let n;return e[4]!==t?(n=s.jsx("nav",{className:"flex items-center gap-1 border-b border-border px-4 md:px-10",children:t}),e[4]=t,e[5]=n):n=e[5],n}function L(e){return e.location.pathname}function k(){const e=p.c(22),{isAdmin:a,loading:d,needsEmailVerification:r}=T(),t=y();if(d){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex h-dvh flex-1 items-center justify-center",children:s.jsx(g,{className:"size-5 text-muted-foreground"})}),e[0]=i):i=e[0],i}if(!a){let i;e[1]!==t?(i=t("admin.layout.adminDashboardArea"),e[1]=t,e[2]=i):i=e[2];let l;e[3]!==r||e[4]!==t?(l=t(r?"admin.layout.emailVerificationRequired":"admin.layout.restrictedToDashboard"),e[3]=r,e[4]=t,e[5]=l):l=e[5];let m;e[6]!==t?(m=t("admin.layout.goHome"),e[6]=t,e[7]=m):m=e[7];let c;e[8]!==m?(c=s.jsx(S,{variant:"outline",size:"sm",asChild:!0,children:s.jsx(j,{to:"/",children:m})}),e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==i||e[11]!==l||e[12]!==c?(h=s.jsx(v,{area:i,description:l,action:c}),e[10]=i,e[11]=l,e[12]=c,e[13]=h):h=e[13],h}let n;e[14]!==t?(n=t("admin.layout.adminDashboard"),e[14]=t,e[15]=n):n=e[15];let o;e[16]!==n?(o=s.jsx("div",{className:"shrink-0 px-4 pt-6 md:px-10",children:s.jsx("h1",{className:"pb-4 text-xl font-medium",children:n})}),e[16]=n,e[17]=o):o=e[17];let u;e[18]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{}),e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(b.Content,{children:s.jsx(_,{})}),e[19]=f):f=e[19];let x;return e[20]!==o?(x=s.jsxs(b,{variant:"plain",className:"h-dvh",children:[o,u,f]}),e[20]=o,e[21]=x):x=e[21],x}function P(){const e=p.c(1);let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(R,{children:s.jsx(k,{})}),e[0]=a):a=e[0],a}export{P as default};
@@ -1 +1 @@
1
- import{c as y,f as _,u as x,a5 as S,gW as j,aS as b,hE as v,j as p,N as d}from"./index-BpRy7AHp.js";import{L}from"./legacy-main-redirect-C_4oCw1E.js";import"./thread-route-E0bMcc27.js";function k(){const e=y.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=_(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=S(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const h=j({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:h,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};
1
+ import{c as y,f as _,u as x,a5 as S,gW as j,aS as b,hE as v,j as p,N as d}from"./index-CSIpvoWn.js";import{L}from"./legacy-main-redirect-agOJ7qxO.js";import"./thread-route-gjL8sFh9.js";function k(){const e=y.c(16);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const g=_(o);let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[1]=n):n=e[1];const s=x(n),{org:t}=S(),f="_splat"in g&&typeof g._splat=="string"?g._splat:"";let c,a;if(e[2]!==t.id||e[3]!==t.slug||e[4]!==s||e[5]!==f){a=Symbol.for("react.early_return_sentinel");e:{const m=f.split("/").find(Boolean);if(!m){let r;e[8]!==t.slug?(r={org:t.slug},e[8]=t.slug,e[9]=r):r=e[9];let u;e[10]!==s||e[11]!==r?(u=p.jsx(d,{to:"/$org/projects",params:r,search:s,hash:!0,replace:!0}),e[10]=s,e[11]=r,e[12]=u):u=e[12],a=u;break e}const h=j({virtualMcpIdSearch:s.virtualmcpid,fallbackAgentId:b(t.id).id});c=v({org:t.slug,agentId:h,panel:m,source:"view-first",search:s})}e[2]=t.id,e[3]=t.slug,e[4]=s,e[5]=f,e[6]=c,e[7]=a}else c=e[6],a=e[7];if(a!==Symbol.for("react.early_return_sentinel"))return a;const l=c;let i;return e[13]!==t.slug||e[14]!==l?(i=l?.kind==="canonical"?p.jsx(L,{target:{route:l.route,search:l.search}}):p.jsx(d,{to:"/$org/home",params:{org:t.slug},replace:!0}),e[13]=t.slug,e[14]=l,e[15]=i):i=e[15],i}export{k as default};