@openhands/agent-canvas 1.5.0 → 1.5.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 (338) hide show
  1. package/README.md +1 -1
  2. package/README.windows.md +2 -2
  3. package/build/assets/{acp-providers-BQwoUBpe.js → acp-providers-DerAmTyY.js} +1 -1
  4. package/build/assets/{active-backend-context-BCXRv5pm.js → active-backend-context-B8rMv0X9.js} +1 -1
  5. package/build/assets/{add-backend-modal-BKHzq5no.js → add-backend-modal-CxC7BNEc.js} +1 -1
  6. package/build/assets/{agent-profiles-settings-CEp5CIz8.js → agent-profiles-settings-BJb8YXR1.js} +1 -1
  7. package/build/assets/{agent-server-compatibility-D6DSanlx.js → agent-server-compatibility-BWN-EIQn.js} +1 -1
  8. package/build/assets/{agent-server-conversation-service.api-cylugfDz.js → agent-server-conversation-service.api-DSPIkMwJ.js} +4 -4
  9. package/build/assets/{agent-settings-C-tann3x.js → agent-settings-CgCnqaAA.js} +1 -1
  10. package/build/assets/agent-settings-DDkSavD7.js +1 -0
  11. package/build/assets/{alert-banner-Dd4woGbm.js → alert-banner-Dh51WURQ.js} +1 -1
  12. package/build/assets/{api-key-entry-screen-Bll_CkuQ.js → api-key-entry-screen-iZc7n8AI.js} +1 -1
  13. package/build/assets/app-settings-B5zyipxJ.js +1 -0
  14. package/build/assets/{automation-detail-Z9dN2f5l.js → automation-detail-CZsu2CoM.js} +1 -1
  15. package/build/assets/{automation-export-D5uL0Tf8.js → automation-export-BwRX6H32.js} +1 -1
  16. package/build/assets/{automations-list-BMOWcqzZ.js → automations-list-lHAVzMoA.js} +1 -1
  17. package/build/assets/{back-nav-button-ZUDTMOTB.js → back-nav-button-DVknCcSP.js} +1 -1
  18. package/build/assets/backend-form-modal-RGcu909r.js +1 -0
  19. package/build/assets/{backend-synced-settings-badge-Db_REKVw.js → backend-synced-settings-badge-BSfN0AZA.js} +1 -1
  20. package/build/assets/{base-modal-Cb0C6m0Q.js → base-modal-CIF_785P.js} +1 -1
  21. package/build/assets/{brand-button-2Tp3aXk1.js → brand-button-B1izLAdR.js} +1 -1
  22. package/build/assets/{browser-QYLVr1kS.js → browser-DKaeq_sT.js} +2 -2
  23. package/build/assets/browser-store-BI6uklCG.js +1 -0
  24. package/build/assets/{browser-tab-BTTP1OE2.js → browser-tab-qb_ftCxW.js} +1 -1
  25. package/build/assets/{circle-plus-check-toggle-QQJKUnF6.js → circle-plus-check-toggle-DoFIjVE0.js} +1 -1
  26. package/build/assets/client-source-BZK8vRs2.js +1 -0
  27. package/build/assets/cloud-funnel-analytics-Zcv57hfT.js +1 -0
  28. package/build/assets/{color-themes-bVMmJJG6.js → color-themes-CHizm1xF.js} +1 -1
  29. package/build/assets/{combobox-caret-A5jMVHgE.js → combobox-caret-CxZpqoSR.js} +1 -1
  30. package/build/assets/{command-menu-BMVEme4H.js → command-menu-oTvKDU3Y.js} +1 -1
  31. package/build/assets/{command-store-jrWX_CcW.js → command-store-D8J5LMW1.js} +1 -1
  32. package/build/assets/{condenser-settings-CIa6eyB4.js → condenser-settings-BGlWn93P.js} +1 -1
  33. package/build/assets/{confirmation-modal-4n_944zq.js → confirmation-modal-DGBWM2Ls.js} +1 -1
  34. package/build/assets/{context-menu-list-item-DvfFic5I.js → context-menu-list-item-6psNyl7X.js} +1 -1
  35. package/build/assets/{conversation-D4o4dG2t.js → conversation-BoCYx8n2.js} +3 -3
  36. package/build/assets/conversation-DgHqMjnY.js +1 -0
  37. package/build/assets/conversation-panel-78Rxh_-I.js +1 -0
  38. package/build/assets/{conversation-service.api-0JG_fF9d.js → conversation-service.api-_f9GlIEi.js} +1 -1
  39. package/build/assets/conversation-state-store-B2Bp32XI.js +1 -0
  40. package/build/assets/{conversation-store-BCSpLuEf.js → conversation-store-LptbOvKa.js} +1 -1
  41. package/build/assets/{copy-to-clipboard-button-Dp4Q_hXi.js → copy-to-clipboard-button-CFzH_NOX.js} +1 -1
  42. package/build/assets/{device-verify-CM086oKs.js → device-verify-WBSjJBLH.js} +1 -1
  43. package/build/assets/{dropdown-classes-DZq0BQjb.js → dropdown-classes-D3wMJlXT.js} +1 -1
  44. package/build/assets/{ellipsis-button-TPJdyxnK.js → ellipsis-button-CbNnHlIq.js} +1 -1
  45. package/build/assets/{entry.client-DypYHsYm.js → entry.client-DNlPGxsu.js} +2 -2
  46. package/build/assets/{enum-filter-dropdown-CW_mBg0e.js → enum-filter-dropdown-JLYv1t8L.js} +1 -1
  47. package/build/assets/{environment-switch-overlay-6laJch-9.js → environment-switch-overlay-B1PFO8P8.js} +1 -1
  48. package/build/assets/{extensions-hub-BJFbFfKS.js → extensions-hub-CCbLA7IM.js} +1 -1
  49. package/build/assets/{extensions-navigation-DqSl7CJw.js → extensions-navigation-CPNjMNvR.js} +1 -1
  50. package/build/assets/{files-tab-store-tfCav6bB.js → files-tab-store-DJsPxYdg.js} +1 -1
  51. package/build/assets/{files-tab-c316dKAq.js → files-tab-y4K7EXBO.js} +1 -1
  52. package/build/assets/{git-provider-icon-DUb2pEos.js → git-provider-icon-ITvsH4Ko.js} +1 -1
  53. package/build/assets/{home-D7ds4Jyw.js → home-BwbeOWwU.js} +1 -1
  54. package/build/assets/home-DKPGQ5P3.js +1 -0
  55. package/build/assets/index-home-Bko2Itv5.js +1 -0
  56. package/build/assets/{install-server-modal-CvHvzZj3.js → install-server-modal-Qk1gwyI8.js} +1 -1
  57. package/build/assets/{launch-A47TK2Me.js → launch-CAGavYl-.js} +1 -1
  58. package/build/assets/lesson-plan-DMCPdtrf.js +4 -0
  59. package/build/assets/{llm-not-configured-banner-B7DR8SPs.js → llm-not-configured-banner-C1ktyb3C.js} +1 -1
  60. package/build/assets/llm-settings-BBsZFi9l.js +1 -0
  61. package/build/assets/{llm-settings-Cvi7q4ox.js → llm-settings-DFkJQr_w.js} +1 -1
  62. package/build/assets/{llm-subscription-service-Cz1yBBvE.js → llm-subscription-service-Casyzgn1.js} +1 -1
  63. package/build/assets/{manage-backends-modal-DAVhNUCe.js → manage-backends-modal-CKQ46rvw.js} +1 -1
  64. package/build/assets/manifest-03478bbf.js +1 -0
  65. package/build/assets/{map-provider-XSFHmdDs.js → map-provider-BbIb12oh.js} +1 -1
  66. package/build/assets/{markdown-renderer-B6cJJ_MN.js → markdown-renderer-B4V2OMFP.js} +1 -1
  67. package/build/assets/{mcp-BwssgMpg.js → mcp-BapoJsDc.js} +1 -1
  68. package/build/assets/{messages-D8MeG2ZQ.js → messages-CUBFMY5o.js} +1 -1
  69. package/build/assets/{model-selector-BxTbbKub.js → model-selector-DJrMrFAr.js} +1 -1
  70. package/build/assets/{navigation-link-imH6S7h2.js → navigation-link-D8hfwvxI.js} +1 -1
  71. package/build/assets/{onboarding-CyicadGt.js → onboarding-6NMkdNxV.js} +1 -1
  72. package/build/assets/onboarding-modal-Q4AnpIdg.js +1 -0
  73. package/build/assets/{organization-service.api-QknzKDh3.js → organization-service.api-vrRNwOma.js} +1 -1
  74. package/build/assets/{path-utils-BECGet7G.js → path-utils-PNfCKQDV.js} +1 -1
  75. package/build/assets/{planner-tab-DPKHmMAX.js → planner-tab-ByOw1he8.js} +1 -1
  76. package/build/assets/{plugins-management-service-DuTTxquo.js → plugins-management-service-B75jyC56.js} +1 -1
  77. package/build/assets/{profiles-service.api-D6jvZOWu.js → profiles-service.api-BQTklD5D.js} +1 -1
  78. package/build/assets/providers-DfTB2gPd.js +1 -0
  79. package/build/assets/{proxy-CuhhyjdX.js → proxy-B3tCGf0X.js} +1 -1
  80. package/build/assets/{recommended-automations-launcher-DA6DWS7V.js → recommended-automations-launcher-Bj7PuHY1.js} +1 -1
  81. package/build/assets/root-CDnuTToz.js +2 -0
  82. package/build/assets/root-layout-DfYVlcRG.js +2 -0
  83. package/build/assets/{runtime-waiting-state-DeD9G7yJ.js → runtime-waiting-state-CnyVhX4T.js} +1 -1
  84. package/build/assets/{schema-field-BOLdL_U7.js → schema-field-CUwk4wrQ.js} +1 -1
  85. package/build/assets/{sdk-section-page-ZIltERxf.js → sdk-section-page-DLLNrYjI.js} +1 -1
  86. package/build/assets/{sdk-settings-schema-Ba_Pa9uf.js → sdk-settings-schema-CLR01YIK.js} +1 -1
  87. package/build/assets/{secrets-service-50DElFny.js → secrets-service-CvyPWJhg.js} +1 -1
  88. package/build/assets/{secrets-settings-Digl7JLe.js → secrets-settings-CHy72A5C.js} +1 -1
  89. package/build/assets/settings-B9S8UVQr.js +1 -0
  90. package/build/assets/{settings-dropdown-input-BD5C9fBn.js → settings-dropdown-input-Dhx9ErGd.js} +1 -1
  91. package/build/assets/{settings-index-CODBijya.js → settings-index-BKDl2CQ-.js} +1 -1
  92. package/build/assets/{settings-input-CzNOq-Pj.js → settings-input-BsgQWS5R.js} +1 -1
  93. package/build/assets/{settings-list-classes-CuxH9ZoR.js → settings-list-classes-DSJJX99U.js} +1 -1
  94. package/build/assets/{settings-modal-BcSWpKI0.js → settings-modal-DeK11CyT.js} +1 -1
  95. package/build/assets/{settings-service.api-Bsu1PvYO.js → settings-service.api-DXk5TdeJ.js} +1 -1
  96. package/build/assets/{settings-switch-DqmHAfWJ.js → settings-switch-Bes8dIlV.js} +1 -1
  97. package/build/assets/{settings-utils-B1lBErvV.js → settings-utils-DzCVfiR3.js} +1 -1
  98. package/build/assets/{shared-conversation-CDskdmrb.js → shared-conversation-9atDzTR4.js} +1 -1
  99. package/build/assets/{sidebar-mobile-menu-toggle-DmCmZgq1.js → sidebar-mobile-menu-toggle-giMMZctn.js} +1 -1
  100. package/build/assets/{sidebar-nav-link-DMc8AIe7.js → sidebar-nav-link-CHqyFXwV.js} +1 -1
  101. package/build/assets/{sidebar-store-DXWSCFpa.js → sidebar-store-uiUXBU1N.js} +1 -1
  102. package/build/assets/{skill-card-pill-row-DOIWjiMF.js → skill-card-pill-row-BPYKQ3IN.js} +1 -1
  103. package/build/assets/{skills-plugins-DLgINYuY.js → skills-plugins-Tropusio.js} +1 -1
  104. package/build/assets/{skills-settings-DPiCWalR.js → skills-settings-BvzBBCWk.js} +1 -1
  105. package/build/assets/{task-list-tab-CuhcDycu.js → task-list-tab-DyfgG4MC.js} +1 -1
  106. package/build/assets/telemetry-C5JMEfqB.js +2 -0
  107. package/build/assets/{terminal-CVqF-tCD.js → terminal-DRXt2Lr4.js} +1 -1
  108. package/build/assets/{typography-CQn9wyEX.js → typography-CzfoD9DY.js} +1 -1
  109. package/build/assets/{use-acp-credential-form-LlfZO_DD.js → use-acp-credential-form-Bm8qXdlc.js} +1 -1
  110. package/build/assets/{use-activate-agent-profile-DpQjsXM0.js → use-activate-agent-profile-DlykqEfN.js} +1 -1
  111. package/build/assets/{use-active-agent-profile-Gw_uJujV.js → use-active-agent-profile-hI-x-UBa.js} +1 -1
  112. package/build/assets/{use-active-conversation-B0sttISF.js → use-active-conversation-2qeez40F.js} +1 -1
  113. package/build/assets/{use-agent-profiles-LHZEK0Gg.js → use-agent-profiles-0pr5bLS7.js} +1 -1
  114. package/build/assets/{use-agent-state-C5uA0bRj.js → use-agent-state-C6peDXUm.js} +1 -1
  115. package/build/assets/{use-backends-health-DKt1SmiU.js → use-backends-health-CLHPitJM.js} +1 -1
  116. package/build/assets/{use-can-manage-org-profiles-BAtqsbCi.js → use-can-manage-org-profiles-Ck_bsNbH.js} +1 -1
  117. package/build/assets/{use-cloud-current-user-id-C8m1oBy4.js → use-cloud-current-user-id-DUCSxNjY.js} +1 -1
  118. package/build/assets/use-config-B5r8erYt.js +1 -0
  119. package/build/assets/{use-create-conversation-CWQGNQ9J.js → use-create-conversation-r1JHfKO5.js} +1 -1
  120. package/build/assets/{use-create-secret-BIrsX3OB.js → use-create-secret-Cf2N11d2.js} +1 -1
  121. package/build/assets/{use-event-store-CsD17BKu.js → use-event-store-Bbaz51GR.js} +1 -1
  122. package/build/assets/{use-handle-plan-click-DEuO7Byo.js → use-handle-plan-click-CsAW3FlH.js} +1 -1
  123. package/build/assets/{use-launch-skill-in-chat-CdHOoQGM.js → use-launch-skill-in-chat-DJWEfVc5.js} +1 -1
  124. package/build/assets/{use-llm-profiles-DQpQxVOD.js → use-llm-profiles-Dr5__SlZ.js} +1 -1
  125. package/build/assets/{use-plugins-marketplace-Bkk07W_M.js → use-plugins-marketplace-BplU65ae.js} +1 -1
  126. package/build/assets/use-runtime-is-ready-vCFOcLFa.js +1 -0
  127. package/build/assets/{use-save-agent-profile-BxEsjnW0.js → use-save-agent-profile-RqUGqTv6.js} +1 -1
  128. package/build/assets/{use-save-settings-ioSUMqbE.js → use-save-settings-Chvzeu2s.js} +1 -1
  129. package/build/assets/{use-settings-DNJC4gqu.js → use-settings-CyxSlyTQ.js} +1 -1
  130. package/build/assets/{use-settings-nav-items-BUsrDbVR.js → use-settings-nav-items-zEkSO_Bf.js} +1 -1
  131. package/build/assets/{use-skills-BsmKm23M.js → use-skills-xrVoKYrF.js} +1 -1
  132. package/build/assets/{use-task-list-rs7Xbzl8.js → use-task-list-CfisapBW.js} +1 -1
  133. package/build/assets/use-tracking-D2Qg5Lpd.js +1 -0
  134. package/build/assets/{use-user-conversation-B337kUKB.js → use-user-conversation-CnE4zhOA.js} +1 -1
  135. package/build/assets/{vendor~browser-tab-Xn94EtUo.js → vendor~browser-tab-CsMb-pta.js} +1 -1
  136. package/build/assets/{vendor~browser-5Njjw1Cl.js → vendor~browser-wXQ-WZEC.js} +1 -1
  137. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js} +2 -2
  138. package/build/assets/{vendor~files-tab-CiC3-lGh.js → vendor~files-tab-B-5fBohe.js} +1 -1
  139. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DWteoTyr.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js} +1 -1
  140. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-tlf6AnDe.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js} +1 -1
  141. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B8XNNEQZ.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js} +1 -1
  142. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dc5nKwLO.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js} +1 -1
  143. package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CnJRLn5s.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js} +1 -1
  144. package/build/assets/{vendor~launch-28DK5Rsl.js → vendor~launch-_Km3J77E.js} +1 -1
  145. package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js → vendor~module-D5a_AClf.js} +1 -1
  146. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-lYNG9C1U.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js} +1 -1
  147. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-Zhq6xAxR.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js} +1 -1
  148. package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-B81b08bw.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js} +1 -1
  149. package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-jpyLM1Nn.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js} +1 -1
  150. package/build/assets/{verification-settings-HRgEM-_3.js → verification-settings-CfkrXoSa.js} +1 -1
  151. package/build/index.html +4 -4
  152. package/config/defaults.json +1 -1
  153. package/dist/api/cloud/conversation-service.api.cjs +1 -1
  154. package/dist/api/cloud/conversation-service.api.js +4 -4
  155. package/dist/api/option-service/option-service.api.cjs +1 -1
  156. package/dist/api/option-service/option-service.api.cjs.map +1 -1
  157. package/dist/api/option-service/option-service.api.js +0 -1
  158. package/dist/api/option-service/option-service.api.js.map +1 -1
  159. package/dist/api/option-service/option.types.d.ts +0 -1
  160. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  161. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  162. package/dist/components/features/backends/backend-form-modal.d.ts +1 -1
  163. package/dist/components/features/backends/backend-form-modal.js +137 -144
  164. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  165. package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
  166. package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
  167. package/dist/components/providers/agent-server-ui-providers.d.ts +4 -2
  168. package/dist/components/providers/agent-server-ui-providers.js +9 -2
  169. package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
  170. package/dist/components/providers/index.cjs +1 -1
  171. package/dist/components/providers/index.d.ts +1 -2
  172. package/dist/components/providers/index.js +0 -1
  173. package/dist/components/providers/telemetry-provider.cjs +2 -0
  174. package/dist/components/providers/telemetry-provider.cjs.map +1 -0
  175. package/dist/components/providers/telemetry-provider.d.ts +6 -0
  176. package/dist/components/providers/telemetry-provider.js +64 -0
  177. package/dist/components/providers/telemetry-provider.js.map +1 -0
  178. package/dist/config/defaults.cjs +1 -1
  179. package/dist/config/defaults.cjs.map +1 -1
  180. package/dist/config/defaults.js +1 -1
  181. package/dist/config/defaults.js.map +1 -1
  182. package/dist/contexts/conversation-websocket-context.cjs +3 -3
  183. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  184. package/dist/contexts/conversation-websocket-context.js +197 -204
  185. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  186. package/dist/hooks/mutation/use-save-settings.cjs +1 -1
  187. package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
  188. package/dist/hooks/mutation/use-save-settings.d.ts +3 -1
  189. package/dist/hooks/mutation/use-save-settings.js +6 -5
  190. package/dist/hooks/mutation/use-save-settings.js.map +1 -1
  191. package/dist/hooks/use-telemetry.cjs +1 -1
  192. package/dist/hooks/use-telemetry.cjs.map +1 -1
  193. package/dist/hooks/use-telemetry.d.ts +3 -3
  194. package/dist/hooks/use-telemetry.js +16 -22
  195. package/dist/hooks/use-telemetry.js.map +1 -1
  196. package/dist/hooks/use-tracking.cjs +1 -1
  197. package/dist/hooks/use-tracking.cjs.map +1 -1
  198. package/dist/hooks/use-tracking.d.ts +3 -4
  199. package/dist/hooks/use-tracking.js +37 -37
  200. package/dist/hooks/use-tracking.js.map +1 -1
  201. package/dist/index.cjs +1 -1
  202. package/dist/index.js +2 -2
  203. package/dist/lib/index.d.ts +2 -2
  204. package/dist/package.cjs +1 -1
  205. package/dist/package.cjs.map +1 -1
  206. package/dist/package.js +2 -2
  207. package/dist/package.js.map +1 -1
  208. package/dist/routes/app-settings.cjs +1 -1
  209. package/dist/routes/app-settings.cjs.map +1 -1
  210. package/dist/routes/app-settings.js +66 -68
  211. package/dist/routes/app-settings.js.map +1 -1
  212. package/dist/routes/llm-settings.cjs +1 -1
  213. package/dist/routes/llm-settings.cjs.map +1 -1
  214. package/dist/routes/llm-settings.js +4 -1
  215. package/dist/routes/llm-settings.js.map +1 -1
  216. package/dist/services/cloud-funnel-analytics.cjs +1 -1
  217. package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
  218. package/dist/services/cloud-funnel-analytics.d.ts +3 -11
  219. package/dist/services/cloud-funnel-analytics.js +16 -30
  220. package/dist/services/cloud-funnel-analytics.js.map +1 -1
  221. package/dist/services/telemetry.cjs +1 -1
  222. package/dist/services/telemetry.cjs.map +1 -1
  223. package/dist/services/telemetry.d.ts +46 -9
  224. package/dist/services/telemetry.js +181 -72
  225. package/dist/services/telemetry.js.map +1 -1
  226. package/dist/themes/color-themes.cjs.map +1 -1
  227. package/dist/themes/color-themes.d.ts +3 -6
  228. package/dist/themes/color-themes.js.map +1 -1
  229. package/dist/utils/error-handler.cjs +1 -1
  230. package/dist/utils/error-handler.cjs.map +1 -1
  231. package/dist/utils/error-handler.d.ts +1 -4
  232. package/dist/utils/error-handler.js +6 -7
  233. package/dist/utils/error-handler.js.map +1 -1
  234. package/dist/utils/map-provider.cjs +1 -1
  235. package/dist/utils/map-provider.cjs.map +1 -1
  236. package/dist/utils/map-provider.d.ts +1 -0
  237. package/dist/utils/map-provider.js +2 -1
  238. package/dist/utils/map-provider.js.map +1 -1
  239. package/package.json +2 -2
  240. package/build/assets/agent-settings-DGUKNSnU.js +0 -1
  241. package/build/assets/app-settings-BpViWwpC.js +0 -1
  242. package/build/assets/backend-form-modal-DhBT8P4g.js +0 -1
  243. package/build/assets/browser-store-BGXOGo-R.js +0 -1
  244. package/build/assets/client-source-Biqarhgr.js +0 -1
  245. package/build/assets/cloud-funnel-analytics-D-27T5Ao.js +0 -1
  246. package/build/assets/conversation-CHnEXGRM.js +0 -1
  247. package/build/assets/conversation-panel-11FjLCId.js +0 -1
  248. package/build/assets/conversation-state-store-JiUQp02U.js +0 -1
  249. package/build/assets/handle-capture-consent-DDnXMC9Y.js +0 -1
  250. package/build/assets/home-BQ-DC06B.js +0 -1
  251. package/build/assets/index-home-BRFDWs_4.js +0 -1
  252. package/build/assets/lesson-plan-DSf95kQ2.js +0 -4
  253. package/build/assets/llm-settings-Ch4ZbW3c.js +0 -1
  254. package/build/assets/manifest-958c741a.js +0 -1
  255. package/build/assets/onboarding-modal-DQwihcTz.js +0 -1
  256. package/build/assets/option-service.api-DAkg_F7p.js +0 -1
  257. package/build/assets/package-Dk_VtWJ4.js +0 -1
  258. package/build/assets/providers-B8pxQK8x.js +0 -1
  259. package/build/assets/root-BhP6bTBB.js +0 -2
  260. package/build/assets/root-layout-oBaHHW4s.js +0 -2
  261. package/build/assets/settings-BfgLHsgd.js +0 -1
  262. package/build/assets/telemetry-DHiTRl5_.js +0 -2
  263. package/build/assets/use-config-CXy4vD0H.js +0 -1
  264. package/build/assets/use-runtime-is-ready-D4pkGT6E.js +0 -1
  265. package/build/assets/use-tracking-poxQHMwR.js +0 -1
  266. package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ljq5gbus-B2XD4bi2.js +0 -1
  267. package/dist/components/providers/posthog-wrapper.cjs +0 -2
  268. package/dist/components/providers/posthog-wrapper.cjs.map +0 -1
  269. package/dist/components/providers/posthog-wrapper.d.ts +0 -4
  270. package/dist/components/providers/posthog-wrapper.js +0 -49
  271. package/dist/components/providers/posthog-wrapper.js.map +0 -1
  272. package/dist/node_modules/posthog-js/react/dist/esm/index.cjs +0 -2
  273. package/dist/node_modules/posthog-js/react/dist/esm/index.cjs.map +0 -1
  274. package/dist/node_modules/posthog-js/react/dist/esm/index.js +0 -113
  275. package/dist/node_modules/posthog-js/react/dist/esm/index.js.map +0 -1
  276. package/dist/utils/handle-capture-consent.cjs +0 -2
  277. package/dist/utils/handle-capture-consent.cjs.map +0 -1
  278. package/dist/utils/handle-capture-consent.d.ts +0 -7
  279. package/dist/utils/handle-capture-consent.js +0 -8
  280. package/dist/utils/handle-capture-consent.js.map +0 -1
  281. /package/build/assets/{__vite-browser-external-DU-Cb_sT.js → __vite-browser-external-BQUj0sYu.js} +0 -0
  282. /package/build/assets/{agent-server-ui-style-scope-COnDHTm5.js → agent-server-ui-style-scope-qhnhZHBV.js} +0 -0
  283. /package/build/assets/{automation-BVEmGghX.js → automation-LZB0MjdV.js} +0 -0
  284. /package/build/assets/{canvas-ui-BhxjoA1f.js → canvas-ui-COgjltGz.js} +0 -0
  285. /package/build/assets/{checkmark-DhcMGwtO.js → checkmark-h7udgXMM.js} +0 -0
  286. /package/build/assets/{close-DO5Rq_CS.js → close-DLFb5kfv.js} +0 -0
  287. /package/build/assets/{code-tag-BvjtzUsr.js → code-tag-DYlAhEQY.js} +0 -0
  288. /package/build/assets/{conversation-local-storage-B31voBg7.js → conversation-local-storage-F6zVMM--.js} +0 -0
  289. /package/build/assets/{conversation-tab-empty-state-BUhKVwoi.js → conversation-tab-empty-state-CNUmIms2.js} +0 -0
  290. /package/build/assets/{copy-DLUw2us-.js → copy-BLmGeJcd.js} +0 -0
  291. /package/build/assets/{dist-Dj01FXbZ.js → dist-CodhvuAP.js} +0 -0
  292. /package/build/assets/{environment-switch-store-D9hB9PvY.js → environment-switch-store-DkjlKWzN.js} +0 -0
  293. /package/build/assets/{extension-module-card-classes-BlO4w702.js → extension-module-card-classes-9V3J9J_b.js} +0 -0
  294. /package/build/assets/{folder-ynxP2EIL.js → folder-Bk311brm.js} +0 -0
  295. /package/build/assets/{form-control-classes-CvUaw8_L.js → form-control-classes-CbdN5aO3.js} +0 -0
  296. /package/build/assets/{get-language-from-path-rWEQrOGU.js → get-language-from-path-DBqBsCWH.js} +0 -0
  297. /package/build/assets/{git-status-mapper-C3rfzUex.js → git-status-mapper-DnL9OC8_.js} +0 -0
  298. /package/build/assets/{iconBase-CuvxAQZ5.js → iconBase-Dz51Zn5x.js} +0 -0
  299. /package/build/assets/{link-external-BVDiJfZt.js → link-external-CaBmUEs_.js} +0 -0
  300. /package/build/assets/{llm-subscription-BkdHwtQe.js → llm-subscription-DtsX5Lhg.js} +0 -0
  301. /package/build/assets/{loading-spinner-Txxx1I1p.js → loading-spinner-BcdnT0mN.js} +0 -0
  302. /package/build/assets/{middleware-CWYDMVuG.js → middleware-DYHYNAnP.js} +0 -0
  303. /package/build/assets/{modal-backdrop-Dsmzgr5s.js → modal-backdrop-zVwfOJZr.js} +0 -0
  304. /package/build/assets/{modal-body-CDZdZ-eT.js → modal-body-Cc2zp0xb.js} +0 -0
  305. /package/build/assets/{modal-classes-B4oit_4c.js → modal-classes-3qT9Ap7Q.js} +0 -0
  306. /package/build/assets/{modal-close-button-DQElFMPo.js → modal-close-button-BcIBUdSq.js} +0 -0
  307. /package/build/assets/{navigation-context-SjzfpygH.js → navigation-context-DPs2G0X8.js} +0 -0
  308. /package/build/assets/{objectWithoutPropertiesLoose-CQwg6tC0.js → objectWithoutPropertiesLoose-BgYIAs2y.js} +0 -0
  309. /package/build/assets/{openhands-logo-C-gDp1wr.js → openhands-logo-bcNw5bkY.js} +0 -0
  310. /package/build/assets/{plan-components-CgPHWz3E.js → plan-components-BdZXPyZU.js} +0 -0
  311. /package/build/assets/{react-ao3tWj6K.js → react-DPDgL6du.js} +0 -0
  312. /package/build/assets/{search-pb4UKTfK.js → search-BgOCR7_c.js} +0 -0
  313. /package/build/assets/{segmented-toggle-C1-ZVyr5.js → segmented-toggle-kzwZkLaj.js} +0 -0
  314. /package/build/assets/{settings-gear-D_HVvE5L.js → settings-gear-MXCyZW0x.js} +0 -0
  315. /package/build/assets/{settings-like-page-layout-classes-DLrsPCaI.js → settings-like-page-layout-classes-Cdl6jOe5.js} +0 -0
  316. /package/build/assets/{settings-DksoDv5z.js → settings-mQUckT0g.js} +0 -0
  317. /package/build/assets/{settings-section-header-context-C2MUIG88.js → settings-section-header-context-COMOIaxV.js} +0 -0
  318. /package/build/assets/{sidebar-layout-Cn6eQaEI.js → sidebar-layout-Bm7pa3Vk.js} +0 -0
  319. /package/build/assets/{skills-CH4xgIh-.js → skills-EqzxYBvT.js} +0 -0
  320. /package/build/assets/{styled-tooltip-CvsjHuIf.js → styled-tooltip-B14i_Uac.js} +0 -0
  321. /package/build/assets/{switch-skeleton-BpSOvZ-n.js → switch-skeleton-DqQwalyu.js} +0 -0
  322. /package/build/assets/{terminal-Dokfkxn0.js → terminal-Cgf___rK.js} +0 -0
  323. /package/build/assets/{toggle-switch-CS0ClOy2.js → toggle-switch-DX_k418f.js} +0 -0
  324. /package/build/assets/{u-check-circle-DPWVO-9N.js → u-check-circle-BqoIxNz_.js} +0 -0
  325. /package/build/assets/{u-check-circle-half-BGNAAjOW.js → u-check-circle-half-MsShT8Ec.js} +0 -0
  326. /package/build/assets/{u-edit-BIskOoEG.js → u-edit-DL5LgKon.js} +0 -0
  327. /package/build/assets/{use-breakpoint-OjLm94cF.js → use-breakpoint-BP3lqLMx.js} +0 -0
  328. /package/build/assets/{use-click-outside-element-Jpt2WWd7.js → use-click-outside-element-D9BYdANT.js} +0 -0
  329. /package/build/assets/{use-is-authed-Dvbpiu3B.js → use-is-authed-BezEyfeh.js} +0 -0
  330. /package/build/assets/{use-onboarding-completion-DkRpDTsD.js → use-onboarding-completion-C_Swglzp.js} +0 -0
  331. /package/build/assets/{v4-DPgam_jW.js → v4-DbCkTSoU.js} +0 -0
  332. /package/build/assets/{vendor~browser-BvEKaLBz.js → vendor~browser-By2MVv_N.js} +0 -0
  333. /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CznX01nZ.js → vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js} +0 -0
  334. /package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BuL5kjfS.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js} +0 -0
  335. /package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DUYl8gbZ.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js} +0 -0
  336. /package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-pIgQDxTc.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js} +0 -0
  337. /package/build/assets/{vendor~terminal-jAaNQWS9.js → vendor~terminal-CnKZILnC.js} +0 -0
  338. /package/build/assets/{x-mark-C5przfXl.js → x-mark-Batp6gXa.js} +0 -0
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/settings-modal-BcSWpKI0.js","assets/rolldown-runtime-BFRubm34.js","assets/vendor-styling-CI0PQ3ab.js","assets/declaration-BGsHjPEW.js","assets/useTranslation-Cbf5AGg_.js","assets/active-backend-context-BCXRv5pm.js","assets/agent-server-compatibility-D6DSanlx.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js","assets/createLucideIcon-D4Tak8A1.js","assets/utils-DB9LsAzA.js","assets/common-CxbUL3nR.js","assets/model-selector-BxTbbKub.js","assets/useQuery-D5pEZbY0.js","assets/suspense-DmZ3MSSh.js","assets/proxy-CuhhyjdX.js","assets/combobox-caret-A5jMVHgE.js","assets/form-control-classes-CvUaw8_L.js","assets/sdk-settings-schema-Ba_Pa9uf.js","assets/dist-Dj01FXbZ.js","assets/llm-subscription-BkdHwtQe.js","assets/map-provider-XSFHmdDs.js","assets/brand-button-2Tp3aXk1.js","assets/settings-input-CzNOq-Pj.js","assets/base-modal-Cb0C6m0Q.js","assets/modal-body-CDZdZ-eT.js","assets/modal-classes-B4oit_4c.js","assets/modal-backdrop-Dsmzgr5s.js","assets/navigation-context-SjzfpygH.js","assets/use-save-settings-ioSUMqbE.js","assets/useMutation-u8UgRgDK.js","assets/settings-service.api-Bsu1PvYO.js","assets/settings-DksoDv5z.js","assets/use-settings-DNJC4gqu.js","assets/use-tracking-poxQHMwR.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ljq5gbus-B2XD4bi2.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js","assets/settings-utils-B1lBErvV.js","assets/add-backend-modal-BKHzq5no.js","assets/backend-form-modal-DhBT8P4g.js","assets/cloud-funnel-analytics-D-27T5Ao.js","assets/client-source-Biqarhgr.js","assets/package-Dk_VtWJ4.js","assets/telemetry-DHiTRl5_.js","assets/segmented-toggle-C1-ZVyr5.js","assets/modal-close-button-DQElFMPo.js","assets/use-backends-health-DKt1SmiU.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-jpyLM1Nn.js","assets/useQueries-BpIlT8Mt.js","assets/organization-service.api-QknzKDh3.js","assets/manage-backends-modal-DAVhNUCe.js","assets/pencil-CWhApFIT.js","assets/refresh-cw-B9B7-vsy.js","assets/trash-2-BU6BlW4i.js","assets/confirmation-modal-4n_944zq.js","assets/use-cloud-current-user-id-C8m1oBy4.js","assets/environment-switch-overlay-6laJch-9.js","assets/environment-switch-store-D9hB9PvY.js","assets/alert-banner-Dd4woGbm.js","assets/vendor~conversation-panel~conversation~alert-banner-CznX01nZ.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-B81b08bw.js","assets/iconBase-CuvxAQZ5.js","assets/close-DO5Rq_CS.js","assets/typography-CQn9wyEX.js","assets/command-menu-BMVEme4H.js","assets/bot-C-EA6685.js","assets/list-todo-CAtvkzcy.js","assets/search-dIQ09UY2.js","assets/sidebar-store-DXWSCFpa.js","assets/middleware-CWYDMVuG.js","assets/react-ao3tWj6K.js","assets/x-ZE4iplpF.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,St as n,a as r,bt as i,xt as a}from"./vendor-styling-CI0PQ3ab.js";import{A as o,C as s,F as c,L as l,M as u,N as d,P as f,R as p,c as m,j as h,k as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{h as _,m as v,r as y,t as b}from"./path-utils-BECGet7G.js";import{t as x}from"./useQuery-D5pEZbY0.js";import{t as S}from"./useTranslation-Cbf5AGg_.js";import{t as C}from"./declaration-BGsHjPEW.js";import{C as w,F as T,S as E,n as D,r as O}from"./active-backend-context-BCXRv5pm.js";import{t as k}from"./createLucideIcon-D4Tak8A1.js";import{t as A}from"./bot-C-EA6685.js";import{t as j}from"./check-TbOEtHKj.js";import{n as M,t as N}from"./vendor~root-layout~conversation-panel~conversation-8tIsyrPj.js";import{r as P}from"./onboarding-modal-DQwihcTz.js";import{n as F,t as I}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-Zhq6xAxR.js";import{a as ee,c as te,d as L,f as R,i as z,l as ne,n as re,o as ie,p as ae,r as oe,s as se,t as B,u as ce}from"./onboarding-CyicadGt.js";import{n as le,t as ue}from"./format-time-delta-DhDbkD7V.js";import{n as de}from"./refresh-cw-B9B7-vsy.js";import{t as fe}from"./search-dIQ09UY2.js";import{n as pe,r as me,t as he}from"./sidebar-store-DXWSCFpa.js";import{i as ge}from"./llm-settings-Cvi7q4ox.js";import{t as _e}from"./trash-2-BU6BlW4i.js";import{t as ve}from"./x-ZE4iplpF.js";import{S as ye,b as be,t as V,y as xe}from"./utils-DB9LsAzA.js";import{t as H}from"./common-CxbUL3nR.js";import{S as Se}from"./agent-server-compatibility-D6DSanlx.js";import{n as Ce}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ljq5gbus-B2XD4bi2.js";import{a as we}from"./use-backends-health-DKt1SmiU.js";import{t as Te}from"./modal-backdrop-Dsmzgr5s.js";import{n as Ee}from"./modal-body-CDZdZ-eT.js";import{i as U,r as De}from"./base-modal-Cb0C6m0Q.js";import{_ as Oe,c as W}from"./form-control-classes-CvUaw8_L.js";import{t as ke}from"./loading-spinner-Txxx1I1p.js";import{t as Ae}from"./use-config-CXy4vD0H.js";import{n as je,t as Me}from"./navigation-context-SjzfpygH.js";import{t as Ne}from"./openhands-logo-C-gDp1wr.js";import{t as Pe}from"./navigation-link-imH6S7h2.js";import{a as G,d as Fe,f as Ie,i as Le,l as Re,n as ze,r as Be,u as Ve}from"./sidebar-layout-Cn6eQaEI.js";import{n as He,t as Ue}from"./sidebar-nav-link-DMc8AIe7.js";import{t as We}from"./styled-tooltip-CvsjHuIf.js";import{a as Ge,d as Ke,f as qe,i as Je,l as Ye,n as Xe,o as Ze,r as Qe,u as K}from"./dropdown-classes-DZq0BQjb.js";import{r as $e,t as et}from"./combobox-caret-A5jMVHgE.js";import{_ as tt,a as nt,c as rt,d as it,f as at,g as ot,h as st,i as ct,l as lt,m as ut,n as dt,p as ft,r as pt,s as mt,t as ht,u as gt}from"./git-provider-icon-DUb2pEos.js";import{n as _t,t as vt}from"./use-cloud-current-user-id-C8m1oBy4.js";import{s as yt}from"./environment-switch-store-D9hB9PvY.js";import{t as bt}from"./react-ao3tWj6K.js";import{r as xt,t as St}from"./middleware-CWYDMVuG.js";import{t as Ct}from"./conversation-store-BCSpLuEf.js";import{o as wt}from"./backend-form-modal-DhBT8P4g.js";import{r as Tt,t as Et}from"./use-settings-DNJC4gqu.js";import{t as Dt}from"./use-tracking-poxQHMwR.js";import{t as Ot}from"./add-backend-modal-BKHzq5no.js";import{t as kt}from"./manage-backends-modal-DAVhNUCe.js";import{t as At}from"./agent-server-conversation-service.api-cylugfDz.js";import{c as jt,d as Mt,u as Nt}from"./acp-providers-BQwoUBpe.js";import{t as Pt}from"./use-is-authed-Dvbpiu3B.js";import{a as Ft,c as It,d as Lt,f as Rt,i as zt,l as Bt,o as Vt,r as Ht,s as Ut,t as Wt,u as Gt}from"./sidebar-mobile-menu-toggle-DmCmZgq1.js";import{t as Kt}from"./use-click-outside-element-Jpt2WWd7.js";import{t as qt}from"./use-llm-profiles-DQpQxVOD.js";import{n as Jt}from"./use-create-conversation-CWQGNQ9J.js";import{r as Yt}from"./recommended-automations-launcher-DA6DWS7V.js";import{t as Xt}from"./conversation-service.api-0JG_fF9d.js";import{r as Zt,t as Qt}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-lYNG9C1U.js";import{n as $t,t as q}from"./context-menu-list-item-DvfFic5I.js";import{i as J,r as en,t as tn}from"./ellipsis-button-TPJdyxnK.js";import{t as nn}from"./u-edit-BIskOoEG.js";import{t as rn}from"./skills-CH4xgIh-.js";import{a as an,o as on,t as sn}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-B81b08bw.js";import{t as cn}from"./search-pb4UKTfK.js";import{t as ln}from"./handle-capture-consent-DDnXMC9Y.js";import{t as un}from"./use-save-settings-ioSUMqbE.js";import{t as dn}from"./use-user-conversation-B337kUKB.js";import{t as fn}from"./conversation-state-store-JiUQp02U.js";var pn=k(`calendar-arrow-down`,[[`path`,{d:`m14 18 4 4 4-4`,key:`1waygx`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M18 14v8`,key:`irew45`}],[`path`,{d:`M21 11.354V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.343`,key:`bse4f3`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}]]),mn=k(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),hn=k(`clock-arrow-down`,[[`path`,{d:`M12 6v6l2 1`,key:`19cm8n`}],[`path`,{d:`M12.337 21.994a10 10 0 1 1 9.588-8.767`,key:`28moa`}],[`path`,{d:`m14 18 4 4 4-4`,key:`1waygx`}],[`path`,{d:`M18 14v8`,key:`irew45`}]]),gn=k(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),_n=k(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),vn=k(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),yn=k(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),bn=k(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),xn=k(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Sn=k(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Cn=k(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Y=e(t(),1),X=i(),wn=46,Tn=30;function En({className:e,logoClassName:t,logoWidth:n=wn,logoHeight:r=Tn}={}){let{t:i}=S(`openhands`);return(0,X.jsx)(Pe,{to:`/conversations`,"aria-label":i(C.BRANDING$OPENHANDS_LOGO),className:V(e),children:(0,X.jsx)(Ne,{width:n,height:r,className:V(`shrink-0`,t)})})}function Dn(){return(0,X.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`,"data-testid":`dropdown-loading`})}function On({onClear:e}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-clear`,onClick:e,"aria-label":`Clear selection`,className:`text-white hover:text-[var(--oh-text-tertiary)]`,children:(0,X.jsx)(ve,{size:14})})}function kn({isOpen:e,isDisabled:t,getToggleButtonProps:n}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,...n({disabled:t,className:V($e,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed`)}),children:(0,X.jsx)(et,{})})}function An({isOpen:e,filteredOptions:t,selectedItem:n,emptyMessage:r,getMenuProps:i,getItemProps:a,footer:o,openUpward:s=!1,fitContent:c=!1}){return(0,X.jsxs)(`div`,{className:V(`absolute z-50 overflow-hidden text-white`,c?`min-w-full w-max`:`w-full`,s?`bottom-full mb-1`:`mt-1`,`bg-tertiary rounded-[6px] context-menu-box-shadow p-1`,`max-h-60 overflow-auto`,!e&&`hidden`),children:[(0,X.jsxs)(`ul`,{...i({className:V(`p-0`,Je)}),children:[e&&t.length===0&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,children:r}),e&&t.map((e,t)=>(0,X.jsxs)(`li`,{...a({item:e,index:t,className:V(Ze,`focus:outline-none`,n?.value===e.value&&`bg-[var(--oh-interactive-selected)] text-white`)}),children:[e.prefix?(0,X.jsx)(`span`,{className:K,children:e.prefix}):null,(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label})]},e.value))]}),e&&o?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(tt,{inset:`menu`}),(0,X.jsx)(`div`,{className:`p-0`,children:o})]}):null]})}function jn({placeholder:e,isDisabled:t,getInputProps:n,italicPlaceholder:r=!0,fitContent:i=!1}){return(0,X.jsx)(`input`,{...n({placeholder:e,disabled:t,className:V(`outline-none bg-transparent text-white not-italic`,i?`w-auto field-sizing-content whitespace-nowrap text-sm`:`flex-1 min-w-0`,r&&`placeholder:italic placeholder:text-tertiary-alt`,!r&&`placeholder:text-tertiary-alt`,W,`px-0 not-italic text-inherit`)})})}var Mn={position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0};function Nn({options:e,emptyMessage:t=`No options`,clearable:n=!1,loading:r=!1,disabled:i=!1,placeholder:a,defaultValue:o,onChange:s,testId:c,className:l,footer:u,openUpward:d=!1,hideTrigger:f=!1,defaultOpen:p=!1,openOnHover:m=!1,italicPlaceholder:h=!0,fitContent:g=!1}){let _=Y.useRef(null),[v,y]=(0,Y.useState)(o?.label??``),[b,x]=(0,Y.useState)(``);Y.useEffect(()=>()=>{_.current&&=(clearTimeout(_.current),null)},[]);let S=e.filter(e=>e.label.toLowerCase().includes(b.toLowerCase())),{isOpen:C,selectedItem:w,selectItem:T,openMenu:E,closeMenu:D,getToggleButtonProps:O,getMenuProps:k,getItemProps:A,getInputProps:j}=I({items:S,itemToString:e=>e?.label??``,inputValue:v,stateReducer:(e,t)=>t.type===I.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes,initialIsOpen:p,onInputValueChange:({inputValue:e})=>{y(e??``),x(e??``)},defaultSelectedItem:o,onSelectedItemChange:({selectedItem:e})=>{s?.(e??null)},onIsOpenChange:({isOpen:e,selectedItem:t})=>{e?(y(``),x(``)):(y(t?.label??``),x(``))}}),M=r||i,N=w?e.find(e=>e.value===w.value)??w:null,P=e=>j({...e,onChange:e=>{y(e.target.value),x(e.target.value)}});return(0,X.jsxs)(`div`,{className:V(`relative`,g?`inline-block w-auto`:`w-full`),"data-testid":c,onMouseEnter:m?()=>{_.current&&=(clearTimeout(_.current),null),E()}:void 0,onMouseLeave:m?()=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>D(),150)}:void 0,children:[f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`input`,{...P({"aria-label":a??`Filter options`,tabIndex:-1}),style:Mn}),(0,X.jsx)(`button`,{type:`button`,...O({tabIndex:-1}),style:Mn,"aria-hidden":!0})]}):(0,X.jsxs)(`div`,{className:V(qe,g?`w-auto`:`w-full`,M&&`cursor-not-allowed opacity-60`,l),children:[N?.prefix?(0,X.jsx)(`span`,{className:`flex items-center shrink-0`,children:N.prefix}):null,(0,X.jsx)(jn,{placeholder:a,isDisabled:M,getInputProps:P,italicPlaceholder:h,fitContent:g}),r&&(0,X.jsx)(Dn,{}),n&&w&&(0,X.jsx)(On,{onClear:()=>T(null)}),(0,X.jsx)(kn,{isOpen:C,isDisabled:M,getToggleButtonProps:O})]}),(0,X.jsx)(An,{isOpen:C,filteredOptions:S,selectedItem:w,emptyMessage:t,getMenuProps:k,getItemProps:A,footer:u,openUpward:d,fitContent:g})]})}var Pn=`::`;function Fn(e,t){return t?`${e}${Pn}${t}`:e}function In(e){let[t,n]=e.split(Pn);return{backendId:t,orgId:n??null}}function Ln(e){return(0,X.jsx)(wt,{isConnected:e?.isConnected??null})}function Rn(){return(0,X.jsx)(wt,{isConnected:`unavailable`})}function zn(e,t,n,r,i){let a=[],o=e.filter(e=>e.kind===`local`),s=e.filter(e=>e.kind===`cloud`);for(let e of o)a.push({value:Fn(e.id,null),label:e.name,prefix:Ln(i[e.id])});for(let e of s){let o=n[e.id],s=Ln(i[e.id]);if(!o||o.orgs.length===0)a.push({value:Fn(e.id,null),label:e.name,prefix:s});else{let n=r[e.id]?.userId??null;for(let r of o.orgs){let i=n&&n===r.id?t:r.name;a.push({value:Fn(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function Bn({openUpward:e=!1,hideTrigger:t=!1,defaultOpen:n=!1,onSelectOption:r,onOpenAddBackend:i,onOpenManageBackends:a,sidebarCollapsed:s=!1}={}){let{t:c}=S(`openhands`),{backends:l,active:d,setActive:f}=O(),p=_t(),m=vt(),h=we(l),g=u(),_=o(`/settings`),v=o(`/settings/*`),y=o(`/conversations/:conversationId`),b=o(`/automations/:automationId`),[x,w]=Y.useState(!1),[T,E]=Y.useState(!1),D=c(C.BACKEND$PERSONAL_WORKSPACE),k=Y.useMemo(()=>zn(l,D,p,m,h),[l,D,p,m,h]),A=Se(d.backend),j=c(C.BACKEND$NO_BACKEND_AVAILABLE),M=Fn(d.backend.id,d.orgId),N=A?void 0:k.find(e=>e.value===M),P=!!(_||v),F=c(C.SIDEBAR$SETTINGS),I=Ct(e=>e.isRightPanelShown),ee=!s||y&&I?`top`:`left`,te=Object.values(p).some(e=>e.isLoading);Y.useEffect(()=>{if(A||d.backend.kind!==`cloud`||d.orgId)return;let{backend:e}=d,t=p[e.id];if(!t||t.orgs.length===0)return;let n=t.currentOrgId?t.orgs.find(e=>e.id===t.currentOrgId):void 0,r=m[e.id]?.userId??null,i=r?t.orgs.find(e=>e.id===r):void 0,a=n??i??t.orgs[0];a&&f(e.id,a.id)},[d,p,m,f,A]);let L=Y.useCallback(()=>{if(i){i(),r?.();return}w(!0)},[i,r]),R=Y.useCallback(()=>{if(a){a(),r?.();return}E(!0)},[a,r]),z=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),ne=Y.useCallback(e=>{z(e),L()},[L,z]),re=Y.useCallback(e=>{z(e),L()},[L,z]),ie=Y.useCallback(e=>{z(e),R()},[R,z]),ae=Y.useCallback(e=>{z(e),R()},[R,z]),oe=(0,X.jsxs)(`div`,{className:Je,children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:z,onTouchStart:z,onTouchEnd:re,onClick:ne,className:V(Xe,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:K,"aria-hidden":!0,children:(0,X.jsx)(de,{width:16,height:16})}),c(C.BACKEND$ADD)]}),(0,X.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:z,onTouchStart:z,onTouchEnd:ae,onClick:ie,className:V(Xe,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:K,"aria-hidden":!0,children:(0,X.jsx)(me,{width:16,height:16})}),c(C.BACKEND$MANAGE)]})]}),se=Y.useCallback(async e=>{if(e===M)return;let{backendId:t,orgId:n}=In(e),i=l.find(e=>e.id===t);i&&(yt(k.find(t=>t.value===e)?.label??i.name),await new Promise(e=>{setTimeout(e,400)}),y?g(`/conversations`):b&&g(`/automations`),f(i.id,n),r?.())},[M,l,y,b,g,k,f,c,r]);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 w-full`,children:[(0,X.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,X.jsx)(Nn,{testId:`backend-selector`,defaultValue:N??{value:M,label:A?j:d.backend.name,prefix:A?Rn():Ln(h[d.backend.id])},footer:oe,openUpward:e,hideTrigger:t,defaultOpen:n,openOnHover:!t,onChange:e=>{e&&se(e.value)},placeholder:A?j:d.backend.name,loading:te,options:k,className:`h-10 px-2 py-0 bg-transparent border-transparent hover:bg-[var(--oh-surface-raised)] focus-within:bg-[var(--oh-surface-raised)] focus-within:border-transparent focus-within:ring-0`},`${M}-${N?.label??``}`)}),t?null:(0,X.jsx)(We,{content:F,placement:ee,offset:10,children:(0,X.jsx)(Pe,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":P,"aria-label":F,className:V(P?`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md bg-tertiary text-white font-normal cursor-pointer`:`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] cursor-pointer`,Oe),children:(0,X.jsx)(me,{width:16,height:16})})})]}),x?(0,X.jsx)(Ot,{onClose:()=>w(!1)}):null,T?(0,X.jsx)(kt,{onClose:()=>E(!1)}):null]})}var Vn=`command-menu-trigger`,Hn=18;function Un({collapsed:e}){let{t}=S(`openhands`),n=pe(e=>e.open),r=t(C.COMMAND_MENU$OPEN_LABEL),i=(0,X.jsxs)(`button`,{type:`button`,"data-testid":Vn,"aria-label":r,onClick:n,className:V(Ie({collapsed:e}),e?`cursor-pointer`:`group justify-between border border-[var(--oh-border-subtle)] bg-[var(--oh-surface)]/50 hover:border-[var(--oh-border)] hover:bg-[var(--oh-surface-raised)]`),children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[e?(0,X.jsx)(He,{active:!1,children:(0,X.jsx)(fe,{width:Hn,height:Hn})}):(0,X.jsx)(`span`,{className:V(G,`text-[var(--oh-muted)] group-hover:text-white`),"aria-hidden":`true`,children:(0,X.jsx)(fe,{width:Hn,height:Hn})}),(0,X.jsx)(`span`,{className:Ve(e),children:r})]}),e?null:(0,X.jsx)(`kbd`,{className:`rounded-md border border-[var(--oh-border)] bg-black/20 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--oh-text-dim)]`,children:t(C.COMMAND_MENU$SHORTCUT)})]});return e?(0,X.jsx)(We,{content:r,placement:`right`,children:i}):i}var Wn=(e=20)=>{let{data:t}=Pt(),n=D(),r=!Se(n.backend);return _({queryKey:[`user`,`conversations`,`paginated`,e,n.backend.id,n.orgId],queryFn:async({pageParam:t})=>await At.searchConversations(e,t),enabled:!!t&&r,getNextPageParam:e=>e.next_page_id,initialPageParam:void 0,refetchInterval:1e4,meta:{backendId:n.backend.id}})},Gn=(e=10)=>x({queryKey:[`start-tasks`,`search`,e],queryFn:()=>[],select:e=>e.filter(e=>e.status!==`READY`&&e.status!==`ERROR`)});function Kn({onConfirm:e,onClose:t,onCancel:n}){let{t:r}=S(`openhands`);return(0,X.jsx)(Te,{onClose:n,children:(0,X.jsxs)(Ee,{testID:`confirm-new-conversation-modal`,children:[(0,X.jsx)(De,{title:r(C.CONVERSATION$EXIT_WARNING)}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)(U,{text:r(C.BUTTON$CANCEL),onClick:t,className:`bg-tertiary`}),(0,X.jsx)(U,{text:r(C.ACTION$CONFIRM),onClick:e,className:`bg-[#C63143]`})]})]})})}function qn({titleMode:e,title:t,onSave:n,isConversationArchived:r}){return e===`edit`?(0,X.jsx)(`input`,{autoFocus:!0,"data-testid":`conversation-card-title`,onClick:e=>{e.preventDefault(),e.stopPropagation()},onBlur:e=>{n(e.currentTarget?.value?.trim?.()??``)},onKeyUp:e=>{e.nativeEvent.isComposing||e.key===`Enter`&&e.currentTarget.blur()},type:`text`,defaultValue:t,className:`text-sm leading-6 font-semibold bg-transparent w-full`}):(0,X.jsx)(`p`,{"data-testid":`conversation-card-title`,className:V(`text-xs leading-6 font-semibold bg-transparent truncate overflow-hidden`,r&&`opacity-60`),children:t})}var Jn=e=>{switch(e){case H.FINISHED:return`check`;case H.RUNNING:return`working`;case H.IDLE:case H.WAITING_FOR_CONFIRMATION:return`active`;case H.PAUSED:return`paused`;case H.ERROR:case H.STUCK:return`error`;default:return`unknown`}},Yn=(e,t)=>{if(t)return`COMMON$ARCHIVED`;switch(e){case`check`:return`COMMON$FINISHED`;case`working`:case`active`:return`COMMON$WORKING`;case`paused`:return`COMMON$PAUSED`;case`error`:return`COMMON$ERROR`;default:return`COMMON$STOPPED`}};function Xn(e){switch(e){case`check`:return(0,X.jsx)(`svg`,{"data-testid":`conversation-status-check`,viewBox:`0 0 12 12`,className:`w-2.5 h-2.5 stroke-[var(--oh-status-success)]`,fill:`none`,strokeWidth:2.25,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,X.jsx)(`path`,{d:`M2.5 6.5 5 9l4.5-5.5`})});case`working`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-working`,className:`w-1.5 h-1.5 rounded-full animate-pulse bg-[var(--oh-status-success)]`});case`active`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-active`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-status-success)]`});case`paused`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-paused`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-muted)]`});case`error`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-error`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-status-error)]`});default:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-unknown`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-color-tertiary)]`})}}function Zn({executionStatus:e,sandboxStatus:t,showTooltip:n=!0}){let{t:r}=S(`openhands`),i=t===`MISSING`,a=t===`ERROR`?`error`:i?`paused`:Jn(e),o=r(Yn(a,i)),s=(0,X.jsx)(`div`,{className:`w-2.5 h-2.5 flex items-center justify-center shrink-0`,children:i?(0,X.jsx)(Qt,{"data-testid":`conversation-status-archived`,size:10,className:`shrink-0 text-[var(--oh-muted)] opacity-60`,"aria-hidden":!0}):Xn(a)});return n?(0,X.jsx)(We,{content:o,placement:`right`,showArrow:!0,tooltipClassName:`bg-base text-white text-xs shadow-lg`,children:s}):s}function Qn({title:e,titleMode:t,onTitleSave:n,executionStatus:r,sandboxStatus:i}){let a=ut(i);return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden`,children:[r!==void 0&&(0,X.jsx)(`div`,{className:`flex w-[18px] shrink-0 items-center justify-center`,children:(0,X.jsx)(Zn,{executionStatus:r,sandboxStatus:i,showTooltip:!1})}),(0,X.jsx)(qn,{title:e,titleMode:t,onSave:n,isConversationArchived:a})]})}var $n=e(a(),1);function er({onClose:e,onDelete:t,onStop:n,onEdit:r,onDisplayCost:i,onShowAgentTools:a,onShowSkills:o,onDownloadViaVSCode:s,onDownloadConversation:c,position:l=`bottom`,floatingStyle:u,ignoreOutsideClickRef:d}){let{t:f}=S(`openhands`),{backend:p}=D(),m=Kt(e,d),h=p.kind===`cloud`?C.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:C.COMMON$STOP_CONVERSATION,g=(0,Y.useCallback)((e,t,n)=>{let r=e.filter(e=>e!=null);return r.length>0?n?(0,X.jsx)(Y.Fragment,{children:r},t):(0,X.jsxs)(Y.Fragment,{children:[r,(0,X.jsx)(tt,{inset:`menu`})]},t):null},[]),_=u!=null;return(0,X.jsxs)($t,{ref:m,testId:`context-menu`,style:_?u:void 0,theme:_?`popover`:`default`,position:_?`none`:l,alignment:_?`none`:`right`,spacing:_?`none`:`default`,className:_?`mt-0 min-w-[200px] w-max max-w-[min(280px,100vw-16px)]`:`z-[200] mt-0`,children:[g([r&&(0,X.jsx)(q,{testId:`edit-button`,onClick:r,children:(0,X.jsx)(J,{icon:(0,X.jsx)(nn,{width:16,height:16}),text:f(C.BUTTON$RENAME)})},`edit-button`)],`edit-section`),g([a&&(0,X.jsx)(q,{testId:`show-agent-tools-button`,onClick:a,children:(0,X.jsx)(J,{icon:(0,X.jsx)(ft,{width:16,height:16}),text:f(C.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})},`show-agent-tools-button`),o&&(0,X.jsx)(q,{testId:`show-skills-button`,onClick:o,children:(0,X.jsx)(J,{icon:(0,X.jsx)(rn,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:f(C.CONVERSATION$SHOW_SKILLS)})},`show-skills-button`)],`tools-section`),g([n&&(0,X.jsx)(q,{testId:`stop-button`,onClick:n,children:(0,X.jsx)(J,{icon:(0,X.jsx)(at,{width:16,height:16}),text:f(h)})},`stop-button`),s&&(0,X.jsx)(q,{testId:`download-vscode-button`,onClick:s,children:(0,X.jsx)(J,{icon:(0,X.jsx)(It,{width:16,height:16}),text:f(C.BUTTON$DOWNLOAD_VIA_VSCODE)})},`download-vscode-button`),c&&(0,X.jsx)(q,{testId:`download-trajectory-button`,onClick:c,children:(0,X.jsx)(J,{icon:(0,X.jsx)(It,{width:16,height:16}),text:f(C.BUTTON$DOWNLOAD_CONVERSATION_DATA)})},`download-trajectory-button`)],`control-section`),g([i&&(0,X.jsx)(q,{testId:`display-cost-button`,onClick:i,children:(0,X.jsx)(J,{icon:(0,X.jsx)(Ut,{width:16,height:16}),text:f(C.BUTTON$DISPLAY_COST)})},`display-cost-button`),t&&(0,X.jsx)(q,{testId:`delete-button`,onClick:t,children:(0,X.jsx)(J,{icon:(0,X.jsx)(en,{width:16,height:16}),text:f(C.COMMON$DELETE_CONVERSATION)})},`delete-button`)],`info-section`,!0)]})}function tr({contextMenuOpen:e,onContextMenuToggle:t,onDelete:n,onStop:r,onEdit:i,onDownloadViaVSCode:a,onDownloadConversation:o,executionStatus:s,conversationId:c,showOptions:l}){let u=ye(s),d=be(s),f=(0,Y.useRef)(null),[,p]=(0,Y.useReducer)(e=>e+1,0);(0,Y.useLayoutEffect)(()=>{if(!e)return;p();let t=0,n=()=>{t||=window.requestAnimationFrame(()=>{t=0,p()})};return window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{t&&window.cancelAnimationFrame(t),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]);let m=(()=>{if(!e||!f.current)return;let t=f.current.getBoundingClientRect(),n=Number(window.innerWidth)||0,r=Number(window.innerHeight)||0,i=Number(t.bottom)||0,a=Number(t.right)||0;return{position:`fixed`,top:i+280+8>r?Math.max(8,t.top-280-4):i+4,right:Math.max(8,n-a),zIndex:1e5}})(),h=typeof document<`u`?document.body:null;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(tn,{ref:f,onClick:n=>{n.preventDefault(),n.stopPropagation(),t(!e)},className:V(u&&`opacity-60`)}),e&&m&&h?(0,$n.createPortal)((0,X.jsx)(er,{ignoreOutsideClickRef:f,floatingStyle:m,onClose:()=>t(!1),onDelete:n,onStop:d?r:void 0,onEdit:i,onDownloadViaVSCode:c&&l?a:void 0,onDownloadConversation:c?o:void 0,position:`bottom`}),h):null]})}function nr(e){return e?e.split(`/`).pop()||e:null}var rr={bitbucket:sn,bitbucket_data_center:sn,github:an,gitlab:on};function ir({selectedRepository:e}){let t=e.git_provider?rr[e.git_provider]:null;return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[t&&(0,X.jsx)(t,{size:14,className:`shrink-0 text-[var(--oh-muted)]`}),e.git_provider===`azure_devops`&&(0,X.jsx)(it,{className:`h-[14px] w-[14px] shrink-0 text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{"data-testid":`conversation-card-selected-repository`,className:`min-w-0 truncate text-xs text-[var(--oh-muted)]`,children:e.selected_repository})]}),(0,X.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[(0,X.jsx)(Zt,{size:12,className:`shrink-0 text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{"data-testid":`conversation-card-selected-branch`,className:`min-w-0 truncate text-xs text-[var(--oh-muted)]`,children:e.selected_branch})]})]})}function ar({workspaceWorkingDir:e}){let{t}=S(`openhands`),n=e?b(e).trim():``;return n?(0,X.jsx)(`span`,{className:`truncate min-w-0 text-xs text-[var(--oh-muted)] flex-1`,title:e??void 0,children:n}):(0,X.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-[var(--oh-muted)] flex-1 min-w-0 overflow-hidden`,children:[(0,X.jsx)(y,{width:14,height:14,className:`text-[var(--oh-muted)]`}),(0,X.jsx)(`span`,{className:`truncate min-w-0`,children:t(C.COMMON$NO_REPOSITORY)})]})}function or({selectedRepository:e,lastUpdatedAt:t,createdAt:n,executionStatus:r,workspaceWorkingDir:i,showRepositoryMetadata:a=!0,showTimestamp:o=!0,llmModel:s,showAgentChip:c=!1,agentKind:l=null,acpServer:u=null}){let{t:d}=S(`openhands`),f=ye(r),p=null;if(c)if(l===`acp`){let e=jt(u)??d(C.CONVERSATION$ACP_AGENT_GENERIC),t=Nt(u,s),n=t??e;p={kind:Mt(u),text:n,tooltip:t?`${e} · ${t}`:e}}else s&&(p={kind:`openhands`,text:nr(s)??s,tooltip:s});let m=r===void 0?void 0:`pl-[26px]`;return(0,X.jsxs)(`div`,{className:V(`flex flex-col gap-0.5 mt-0.5 w-full min-w-0`,f&&`opacity-60`),children:[p?(0,X.jsx)(`div`,{className:m,children:(0,X.jsxs)(`span`,{"data-testid":`conversation-card-agent-chip`,className:`inline-flex items-center gap-1 text-xs text-[var(--oh-muted)] max-w-full min-w-0`,title:p.tooltip,children:[(0,X.jsx)(P,{kind:p.kind}),(0,X.jsx)(`span`,{className:`truncate`,children:p.text})]})}):null,(0,X.jsxs)(`div`,{className:V(`flex flex-row items-center gap-2 w-full min-w-0`,a&&m),children:[a&&(e?.selected_repository?(0,X.jsx)(ir,{selectedRepository:e}):(0,X.jsx)(ar,{workspaceWorkingDir:i})),(0,X.jsx)(`div`,{className:`flex items-center gap-2 shrink-0 ml-auto`,children:o&&(n??t)&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] text-right`,children:(0,X.jsx)(`time`,{children:`${ue(t??n)} ${d(C.CONVERSATION$AGO)}`})})})]})]})}function sr(){let{t:e}=S(`openhands`);return(0,X.jsxs)(`span`,{"data-testid":`error-badge`,className:`flex items-center gap-1 px-1.5 py-0.5 bg-[var(--oh-status-error)] text-white text-xs font-medium rounded-full`,children:[(0,X.jsx)(gt,{className:`text-white w-3 h-3`}),(0,X.jsx)(`span`,{children:e(C.COMMON$ERROR)})]})}function cr({onClick:e,onDelete:t,onStop:n,onChangeTitle:r,showOptions:i,title:a,selectedRepository:o,lastUpdatedAt:s,createdAt:c,conversationId:l,executionStatus:u,sandboxStatus:d,contextMenuOpen:f=!1,onContextMenuToggle:p,isActive:m=!1,workspaceWorkingDir:h,showRepositoryMetadata:g=!0,llmModel:_=null,showLlmProfiles:v=!1,agentKind:y=null,acpServer:b=null,isPinned:x=!1,onTogglePin:w,alwaysShowPinIcon:T=!1}){let{t:E}=S(`openhands`),{trackDownloadVsCodeButtonClicked:D}=Dt(),[O,k]=Y.useState(`view`),{mutateAsync:A}=lt(),j=e=>{e!==``&&e!==a&&r?.(e),k(`view`)},M=e=>{e.preventDefault(),e.stopPropagation(),t?.(),p?.(!1)},N=e=>{e.preventDefault(),e.stopPropagation(),n?.(),p?.(!1)},P=e=>{e.preventDefault(),e.stopPropagation(),k(`edit`),p?.(!1)},F=async e=>{if(e.preventDefault(),e.stopPropagation(),D(),l)try{let e=await Xt.getVSCodeUrl(l);if(e.vscode_url){let t=Bt(e.vscode_url);t&&window.open(t,`_blank`)}}catch{}p?.(!1)},I=async e=>{e.preventDefault(),e.stopPropagation(),l&&await A(l),p?.(!1)},ee=e=>{e.preventDefault(),e.stopPropagation(),w?.()},te=()=>(0,X.jsx)(`button`,{type:`button`,"data-testid":l?`conversation-pin-toggle-${l}`:`conversation-pin-toggle`,"aria-pressed":x,"aria-label":E(x?C.CONVERSATION_PANEL$UNPIN_CONVERSATION:C.CONVERSATION_PANEL$PIN_CONVERSATION),onClick:ee,className:V(`flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`),children:(0,X.jsx)(xn,{className:V(`h-3.5 w-3.5`,x&&`fill-current`),"aria-hidden":!0})}),L=!!(t||r||i),R=L||!!w,z=T&&x&&!!w,ne=g||v&&(y===`acp`||!!_);return(0,X.jsxs)(`div`,{"data-testid":`conversation-card`,"data-context-menu-open":f.toString(),"data-active":m?`true`:`false`,onClick:e,className:V(`group relative h-auto w-full cursor-pointer rounded-md py-1 pl-2 pr-1 transition-colors`,!f&&`hover:bg-[var(--oh-surface)]`,(m||f)&&`bg-[var(--oh-surface)]`),children:[(0,X.jsxs)(`div`,{className:`flex items-center w-full min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden`,children:[(0,X.jsx)(Qn,{title:a,titleMode:O,onTitleSave:j,executionStatus:u,sandboxStatus:d}),d===`ERROR`&&(0,X.jsx)(sr,{})]}),(0,X.jsxs)(`div`,{className:V(`relative ml-auto pl-2 flex items-center justify-end shrink-0`,z?`min-w-[3.75rem]`:R&&`group-hover:min-w-[3.75rem] group-focus-within:min-w-[3.75rem]`,f&&`min-w-[3.75rem]`),children:[!z&&(c??s)&&(0,X.jsx)(`p`,{className:V(`text-xs text-[var(--oh-muted)] text-right whitespace-nowrap transition-opacity -translate-x-1.5`,R&&`group-hover:opacity-0 group-focus-within:opacity-0`,f&&`opacity-0`),children:(0,X.jsx)(`time`,{children:ue(s??c)})}),R?(0,X.jsxs)(`div`,{className:V(`absolute right-0 top-1/2 flex -translate-y-1/2 items-center gap-0.5 transition-opacity`,z?`pointer-events-auto visible opacity-100`:V(`pointer-events-none opacity-0 invisible`,`group-hover:pointer-events-auto group-hover:opacity-100 group-hover:visible`,`group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-focus-within:visible`),f&&`pointer-events-auto visible opacity-100`),children:[w?te():null,z&&(c??s)&&L?(0,X.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,X.jsx)(`div`,{className:V(!f&&`invisible pointer-events-none group-hover:visible group-hover:pointer-events-auto group-focus-within:visible group-focus-within:pointer-events-auto`),children:(0,X.jsx)(tr,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&M,onStop:n&&N,onEdit:r&&P,onDownloadViaVSCode:F,onDownloadConversation:I,executionStatus:u,conversationId:l,showOptions:i})}),(0,X.jsx)(`p`,{className:V(`pointer-events-none absolute inset-0 flex items-center justify-end`,`text-xs text-[var(--oh-muted)] whitespace-nowrap -translate-x-1.5`,`group-hover:hidden group-focus-within:hidden`,f&&`hidden`),children:(0,X.jsx)(`time`,{children:ue(s??c)})})]}):null,!z&&L?(0,X.jsx)(tr,{contextMenuOpen:f,onContextMenuToggle:p||(()=>{}),onDelete:t&&M,onStop:n&&N,onEdit:r&&P,onDownloadViaVSCode:F,onDownloadConversation:I,executionStatus:u,conversationId:l,showOptions:i}):null]}):null]})]}),ne&&(0,X.jsx)(or,{selectedRepository:o,lastUpdatedAt:s,createdAt:c,executionStatus:u,workspaceWorkingDir:h,showRepositoryMetadata:g,showTimestamp:!1,llmModel:_,showAgentChip:v,agentKind:y,acpServer:b})]})}var lr={bitbucket:sn,bitbucket_data_center:sn,github:an,gitlab:on};function ur({label:e,children:t}){return(0,X.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,X.jsx)(`span`,{className:`w-20 shrink-0 text-[var(--oh-muted)]`,children:e}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 break-words text-[var(--oh-foreground)]`,children:t})]})}function dr({title:e,executionStatus:t,sandboxStatus:n,selectedRepository:r,workspaceWorkingDir:i,llmModel:a,createdAt:o}){let{t:s}=S(`openhands`),c=r?.selected_repository??null,l=r?.selected_branch??null,u=r?.git_provider??null,d=u?lr[u]:null,f=o?new Date(o).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):null;return(0,X.jsxs)(`div`,{className:`flex w-[280px] flex-col gap-3 p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[t===void 0?null:(0,X.jsx)(`div`,{className:`mt-0.5`,children:(0,X.jsx)(Zn,{executionStatus:t,sandboxStatus:n,showTooltip:!1})}),(0,X.jsx)(`span`,{className:`break-words text-sm font-medium text-white`,children:e})]}),(0,X.jsxs)(`dl`,{className:`flex flex-col gap-1.5`,children:[c?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ur,{label:s(C.CONVERSATION$REPOSITORY),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[d?(0,X.jsx)(d,{size:12,className:`mt-0.5 shrink-0`}):null,u===`azure_devops`?(0,X.jsx)(it,{className:`mt-0.5 h-3 w-3 shrink-0`}):null,(0,X.jsx)(`span`,{className:`break-all`,children:c})]})}),l?(0,X.jsx)(ur,{label:s(C.CONVERSATION$BRANCH),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,X.jsx)(Zt,{size:11,className:`mt-0.5 shrink-0`}),(0,X.jsx)(`span`,{className:`break-all`,children:l})]})}):null]}):i?(0,X.jsx)(ur,{label:s(C.CONVERSATION_PANEL$PREVIEW_DIRECTORY),children:(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 items-start gap-1.5`,children:[(0,X.jsx)(ae,{size:12,className:`mt-0.5 shrink-0`}),(0,X.jsx)(`span`,{className:`break-all`,children:i})]})}):null,a?(0,X.jsx)(ur,{label:s(C.CONVERSATION_PANEL$PREVIEW_MODEL),children:(0,X.jsx)(`span`,{className:`break-all`,children:a})}):null,f?(0,X.jsx)(ur,{label:s(C.CONVERSATION$CREATED),children:f}):null]})]})}function fr({taskStatus:e}){return(0,X.jsx)(`div`,{className:V(`w-2 h-2 rounded-full flex-shrink-0`,(()=>{switch(e){case`READY`:return`bg-green-500`;case`ERROR`:return`bg-red-500`;case`WORKING`:case`WAITING_FOR_SANDBOX`:case`PREPARING_REPOSITORY`:case`RUNNING_SETUP_SCRIPT`:case`SETTING_UP_GIT_HOOKS`:case`SETTING_UP_SKILLS`:case`STARTING_CONVERSATION`:return`bg-yellow-500 animate-pulse`;default:return`bg-[var(--oh-interactive-selected)]`}})()),"aria-label":`Task status: ${e}`})}function pr({taskStatus:e}){let{t}=S(`openhands`);return e===`WORKING`?null:(0,X.jsx)(`span`,{className:V(`text-xs font-medium px-2 py-0.5 rounded border flex-shrink-0`,(()=>{switch(e){case`READY`:return`bg-green-500/10 text-green-400 border-green-500/20`;case`ERROR`:return`bg-red-500/10 text-red-400 border-red-500/20`;default:return`bg-yellow-500/10 text-yellow-400 border-yellow-500/20`}})()),children:t(xe(e))})}function mr({title:e,taskStatus:t}){return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden mr-2`,children:[(0,X.jsx)(`div`,{className:`flex items-center`,children:(0,X.jsx)(fr,{taskStatus:t})}),(0,X.jsx)(`h3`,{className:`text-sm font-medium text-content-2 truncate flex-1`,children:e}),(0,X.jsx)(pr,{taskStatus:t})]})}function hr({selectedRepository:e,createdAt:t,detail:n}){let{t:r}=S(`openhands`);return(0,X.jsxs)(`div`,{className:V(`flex flex-col gap-1 mt-1`),children:[(0,X.jsxs)(`div`,{className:`flex flex-row justify-between items-center`,children:[e?(0,X.jsx)(ir,{selectedRepository:e}):(0,X.jsx)(ar,{}),t&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] flex-1 text-right`,children:(0,X.jsx)(`time`,{children:`${ue(t)} ${r(C.CONVERSATION$AGO)}`})})]}),n&&(0,X.jsx)(`div`,{className:`text-xs text-[var(--oh-text-subtle)] truncate`,children:n})]})}function gr({task:e,onClick:t}){let{t:n}=S(`openhands`),r=e.request.title||e.detail||n(C.CONVERSATION$STARTING_CONVERSATION),i=e.request.selected_repository?{selected_repository:e.request.selected_repository,selected_branch:e.request.selected_branch||null,git_provider:e.request.git_provider||null}:null;return(0,X.jsxs)(`div`,{"data-testid":`start-task-card`,onClick:t,className:V(`relative h-auto w-full p-3.5 border-b border-[var(--oh-border)] cursor-pointer`,`hover:bg-tertiary`),children:[(0,X.jsx)(`div`,{className:`flex items-center justify-between w-full`,children:(0,X.jsx)(mr,{title:r,taskStatus:e.status})}),(0,X.jsx)(hr,{selectedRepository:i,createdAt:e.created_at,detail:e.detail})]})}function _r({compact:e=!1}){return e?(0,X.jsx)(`div`,{"data-testid":`conversation-card-skeleton-compact`,className:`skeleton-stagger flex flex-col items-center gap-1.5 py-1`,"aria-hidden":!0,children:[0,1,2].map(e=>(0,X.jsx)(`div`,{className:`h-1.5 w-7 shrink-0 skeleton`},`conversation-skeleton-compact-${e}`))}):(0,X.jsx)(`div`,{"data-testid":`conversation-card-skeleton`,className:`skeleton-stagger flex flex-col gap-1.5 py-0.5`,"aria-hidden":!0,children:[0,1,2].map(e=>(0,X.jsx)(`div`,{className:`h-6 min-h-6 w-full skeleton`},`conversation-skeleton-row-${e}`))})}function vr({conversationId:e,title:t,selectedRepository:n,executionStatus:i,sandboxStatus:a,lastUpdatedAt:o,createdAt:s,workspaceWorkingDir:c,isActive:l=!1,onClose:u,showRepositoryMetadata:d=!0,llmModel:f=null,showLlmProfiles:p=!1,agentKind:m=null,acpServer:h=null}){let{t:g}=S(`openhands`);return(0,X.jsx)(r,{content:(0,X.jsxs)(`div`,{className:`w-[260px] p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,X.jsx)(Zn,{executionStatus:i,sandboxStatus:a,showTooltip:!1}),(0,X.jsx)(`span`,{className:`text-sm font-medium text-white truncate`,title:t,children:t||g(C.CONVERSATION$UNTITLED)})]}),(0,X.jsx)(or,{selectedRepository:n,lastUpdatedAt:o,createdAt:s,executionStatus:i,workspaceWorkingDir:c,showRepositoryMetadata:d,llmModel:f,showAgentChip:p,agentKind:m,acpServer:h})]}),placement:`right`,closeDelay:100,className:`bg-[var(--oh-surface)] text-white border border-[var(--oh-border-subtle)] shadow-xl p-0`,disableAnimation:!1,children:(0,X.jsx)(Pe,{to:`/conversations/${e}`,onClick:u,"data-testid":`compact-conversation-row`,"data-conversation-id":e,"aria-label":t||e,className:({isActive:e})=>V(`flex items-center justify-center w-10 h-9 mx-auto rounded-md`,`transition-colors cursor-pointer`,e||l?`bg-tertiary`:`hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(Zn,{executionStatus:i,sandboxStatus:a,showTooltip:!1})})})}var yr={showOlderConversations:!0,showRepoBranchMetadata:!1,showLlmProfiles:!0,showHoverMetadata:!0,organizeMode:`chronological`,conversationSort:`updated`,threadScope:`all`,groupFolderOrder:[]},Z=bt()(xt(e=>({...yr,setShowOlderConversations:t=>e(()=>({showOlderConversations:t})),toggleShowOlderConversations:()=>e(e=>({showOlderConversations:!e.showOlderConversations})),setShowRepoBranchMetadata:t=>e(()=>({showRepoBranchMetadata:t})),toggleShowRepoBranchMetadata:()=>e(e=>({showRepoBranchMetadata:!e.showRepoBranchMetadata})),setShowLlmProfiles:t=>e(()=>({showLlmProfiles:t})),toggleShowLlmProfiles:()=>e(e=>({showLlmProfiles:!e.showLlmProfiles})),setShowHoverMetadata:t=>e(()=>({showHoverMetadata:t})),toggleShowHoverMetadata:()=>e(e=>({showHoverMetadata:!e.showHoverMetadata})),setOrganizeMode:t=>e(()=>({organizeMode:t})),setConversationSort:t=>e(()=>({conversationSort:t})),setThreadScope:t=>e(()=>({threadScope:t})),setGroupFolderOrder:t=>e(()=>({groupFolderOrder:[...t]}))}),{name:`conversation-panel-preferences`,storage:St(()=>localStorage),partialize:e=>({showOlderConversations:e.showOlderConversations,showRepoBranchMetadata:e.showRepoBranchMetadata,showLlmProfiles:e.showLlmProfiles,showHoverMetadata:e.showHoverMetadata,organizeMode:e.organizeMode,conversationSort:e.conversationSort,threadScope:e.threadScope,groupFolderOrder:e.groupFolderOrder})})),br=`px-2 pb-1 pt-1`,xr=`text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]`;function Sr({children:e,suffix:t}){return t==null?(0,X.jsx)(`div`,{role:`presentation`,className:V(br,xr),children:e}):(0,X.jsxs)(`div`,{role:`presentation`,className:V(`flex items-baseline justify-between gap-2`,br),children:[(0,X.jsx)(`span`,{className:V(`min-w-0 truncate text-left`,xr),children:e}),t]})}function Cr(){return(0,X.jsx)(tt,{inset:`menu`})}function Q({icon:e,label:t,selected:n,onClick:r,testId:i,disabled:a}){return(0,X.jsxs)(`button`,{type:`button`,role:n===void 0?`menuitem`:`menuitemradio`,"aria-checked":n===void 0?void 0:!!n,"data-testid":i,disabled:a,onClick:r,className:V(`group`,Ze,`text-[var(--oh-foreground)] disabled:opacity-50`),children:[(0,X.jsx)(e,{className:V(`h-3.5 w-3.5`,Ye),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,X.jsx)(j,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-white`,"aria-hidden":!0}):null]})}var wr=e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1):e;function Tr({filterMenuOpen:e,setFilterMenuOpen:t,menuRef:n,backendKind:r,organizeMode:i,setOrganizeMode:a,conversationSort:o,setConversationSort:s,threadScope:c,setThreadScope:l,showOlderConversations:u,toggleShowOlderConversations:d,showRepoBranchMetadata:f,toggleShowRepoBranchMetadata:p,showLlmProfiles:m,toggleShowLlmProfiles:h,showHoverMetadata:g,toggleShowHoverMetadata:_,totalConversationsCount:v,onRequestDeleteAll:y}){let{t:b}=S(`openhands`),x=b(r===`local`?C.CONVERSATION_PANEL$BY_WORKSPACE:C.CONVERSATION_PANEL$BY_REPOSITORY),w=Y.useRef(null),T=Y.useRef(null),E=Y.useRef(e);return Y.useEffect(()=>{e?(T.current?.querySelector(`[role="menuitem"], [role="menuitemradio"]`))?.focus():E.current&&w.current?.focus(),E.current=e},[e]),(0,X.jsxs)(`div`,{ref:n,className:`relative shrink-0 pr-0.5`,children:[(0,X.jsx)(`button`,{ref:w,type:`button`,"data-testid":`older-conversations-filter-toggle`,"aria-label":b(C.CONVERSATION_PANEL$FILTER_LABEL),"aria-haspopup":`menu`,"aria-expanded":e,onClick:()=>t(!e),className:V(`inline-flex h-7 w-7 items-center justify-center rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`,Qe),children:(0,X.jsx)(yn,{className:`lucide lucide-list-filter shrink-0`,width:14,height:14,strokeWidth:2,"aria-hidden":!0})}),e?(0,X.jsxs)(`div`,{ref:T,role:`menu`,"aria-orientation":`vertical`,"aria-label":b(C.CONVERSATION_PANEL$FILTER_LABEL),tabIndex:-1,"data-testid":`older-conversations-filter-menu`,onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),t(!1);return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;let n=T.current;if(!n)return;let r=Array.from(n.querySelectorAll(`[role="menuitem"], [role="menuitemradio"]`)).filter(e=>!e.disabled);if(r.length===0)return;let i=r.indexOf(document.activeElement),a=e.key===`ArrowDown`?1:-1,o=((i===-1?0:i)+a+r.length)%r.length;e.preventDefault(),r[o]?.focus()},className:V(`absolute right-0 top-full z-50 mt-0 w-64 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-[var(--oh-foreground)] shadow-lg`,Je,Ke),children:[(0,X.jsx)(Sr,{children:b(C.CONVERSATION_PANEL$ORGANIZE)}),(0,X.jsx)(Q,{icon:ae,label:x,selected:i===`grouped`,onClick:()=>{a(`grouped`),t(!1)}}),(0,X.jsx)(Q,{icon:mn,label:b(C.CONVERSATION_PANEL$CHRONOLOGICAL),selected:i===`chronological`,onClick:()=>{a(`chronological`),t(!1)}}),(0,X.jsx)(Cr,{}),(0,X.jsx)(Sr,{children:b(C.CONVERSATION_PANEL$SORT_BY)}),(0,X.jsx)(Q,{icon:pn,label:b(C.CONVERSATION_PANEL$SORT_CREATED),selected:o===`created`,onClick:()=>{s(`created`),t(!1)}}),(0,X.jsx)(Q,{icon:hn,label:b(C.CONVERSATION_PANEL$SORT_UPDATED),selected:o===`updated`,onClick:()=>{s(`updated`),t(!1)}}),(0,X.jsx)(Cr,{}),(0,X.jsx)(Sr,{children:b(C.CONVERSATION_PANEL$SHOW)}),(0,X.jsx)(Q,{icon:bn,label:b(C.CONVERSATION_PANEL$ALL_THREADS),selected:c===`all`,onClick:()=>{l(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:Cn,label:b(C.CONVERSATION_PANEL$RELEVANT_THREADS),selected:c===`relevant`,onClick:()=>{l(`relevant`),t(!1)}}),(0,X.jsx)(Cr,{}),(0,X.jsx)(Sr,{children:b(C.CONVERSATION_PANEL$METADATA)}),(0,X.jsx)(Q,{icon:A,label:b(C.CONVERSATION_PANEL$LLM_MODEL),selected:m,testId:`toggle-llm-profiles`,onClick:()=>{h(),t(!1)}}),(0,X.jsx)(Q,{icon:R,label:b(C.CONVERSATION_PANEL$REPO_BRANCH),selected:f,testId:`toggle-repo-branch-metadata`,onClick:()=>{p(),t(!1)}}),(0,X.jsx)(Q,{icon:le,label:b(C.CONVERSATION_PANEL$HOVER_METADATA),selected:g,testId:`toggle-hover-metadata`,onClick:()=>{_(),t(!1)}}),(0,X.jsx)(Cr,{}),(0,X.jsx)(Sr,{suffix:(0,X.jsx)(`span`,{className:`shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70`,children:b(C.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}),children:b(C.CONVERSATION_PANEL$OLDER_SECTION)}),(0,X.jsx)(Q,{testId:`toggle-older-conversations`,icon:u?gn:_n,label:wr(b(u?C.CONVERSATION$HIDE:C.CONVERSATION$SHOW_ALL)),onClick:()=>{d(),t(!1)}}),(0,X.jsx)(Cr,{}),(0,X.jsx)(Q,{testId:`delete-all-conversations`,icon:_e,label:wr(b(C.CONVERSATION$DELETE_ALL)),disabled:v===0,onClick:()=>{v!==0&&(y(),t(!1))}})]}):null]})}var Er=V(`z-50 flex flex-col rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-white shadow-lg`,Ge);function Dr(e,t){let{open:n,enabled:r,targetWidth:i=256}=t,[a,o]=Y.useState(null),s=Y.useCallback(()=>{let t=e.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.min(i,window.innerWidth-16),a=n.right-r;a<8&&(a=8),a+r>window.innerWidth-8&&(a=Math.max(8,window.innerWidth-8-r)),o({top:n.bottom+4,left:a,width:r})},[e,i]);return Y.useLayoutEffect(()=>{if(!n||!r){o(null);return}return s(),window.addEventListener(`resize`,s),window.addEventListener(`scroll`,s,!0),()=>{window.removeEventListener(`resize`,s),window.removeEventListener(`scroll`,s,!0)}},[n,r,s]),a}function Or({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=S(`openhands`),{navigate:o}=je(),[s,c]=Y.useState(!1),l=Y.useRef(null),u=Y.useRef(null),d=Dr(u,{open:s,enabled:i}),{data:f,error:p}=se(),m=f?.workspaceParents??[],{mutate:h}=ne(),{mutate:g}=ce(),{mutate:_}=te(),{mutate:v}=L(),{workspaces:y}=ie(),b=ee(p,a),[x,w]=Y.useState(!1),[T,E]=Y.useState(!1),{mutate:D,isPending:O}=Jt(),k=Yt(),A=O||k;Y.useEffect(()=>{if(!s||x||T)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s,x,T]),Y.useEffect(()=>{if(!s||x||T)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,x,T]);let j=e=>{A||D({workingDir:e,entryPoint:`sidebar_local_menu`},{onSuccess:e=>{c(!1),o(`/conversations/${e.conversation_id}`)}})},M=Ze,N=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),P=Y.useCallback(()=>{c(e=>!e)},[]),F=s&&(!i||d!==null),I=!!b,R=i&&d?{position:`fixed`,top:d.top,left:d.left,width:d.width}:void 0,re=(0,X.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,disabled:I,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),!I&&w(!0)},className:M,children:a(C.HOME$ADD_WORKSPACES)}),ae=b?(0,X.jsx)(We,{content:b,placement:`top`,children:(0,X.jsx)(`span`,{className:`block`,children:re})}):re;return(0,X.jsxs)(`div`,{className:V(!i&&`relative`,t),ref:l,children:[(0,X.jsx)(`span`,{ref:u,className:`inline-flex`,children:e({onClick:P,"aria-expanded":s,"aria-haspopup":`menu`,disabled:A})}),F&&(0,X.jsxs)(`div`,{"data-testid":r,className:V(Er,!i&&V(`absolute top-full mt-0`,n)),style:R,children:[(0,X.jsxs)(`ul`,{className:V(`max-h-[40vh] overflow-y-auto sm:max-h-[280px]`,Je),children:[(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,disabled:A,"data-testid":`launch-no-workspace`,onClick:()=>j(),className:M,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:a(C.HOME$NO_WORKSPACE_OPTION)})})}),y.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:A,"data-testid":`launch-workspace`,"data-workspace-path":e.path,onClick:()=>j(e.path),className:M,children:[(0,X.jsx)(`span`,{className:K,"aria-hidden":!0,children:(0,X.jsx)(rt,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))]}),(0,X.jsxs)(`div`,{className:V(`flex flex-col`,Je),"data-testid":`new-conversation-menu-footer`,children:[(0,X.jsx)(tt,{inset:`menu`,testId:`new-conversation-menu-footer-divider`}),ae,(y.length>0||m.length>0)&&(0,X.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(!0)},className:M,children:a(C.HOME$MANAGE_WORKSPACES)})]})]}),(0,X.jsx)(z,{isOpen:x,onClose:()=>w(!1),onAdd:e=>h(e),onAddParent:e=>_(e)}),(0,X.jsx)(oe,{isOpen:T,workspaces:y,workspaceParents:m,onClose:()=>E(!1),onRemove:e=>g(e),onRemoveParent:e=>v(e)})]})}function kr({repo:e,disabled:t,onSelect:n,itemClass:r}){return(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:t,"data-testid":`launch-repository`,"data-repo-name":e.full_name,onClick:()=>n(e),className:r,children:[(0,X.jsx)(`span`,{className:K,"aria-hidden":!0,children:(0,X.jsx)(rt,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.full_name})]})})}function Ar({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=S(`openhands`),{navigate:o}=je(),{providers:s}=mt(),{lastSelectedProvider:c,setLastSelectedProvider:l}=dt(),[u,d]=Y.useState(!1),f=Y.useRef(null),p=Y.useRef(null),m=Dr(p,{open:u,enabled:i}),[h,g]=Y.useState(c??null),[_,v]=Y.useState(``),y=pt(_,300);Y.useEffect(()=>{if(s.length===0){h!==null&&g(null);return}h&&s.includes(h)||g(c&&s.includes(c)?c:s[0])},[s,h,c]);let{data:b,isLoading:x,isError:w,hasNextPage:T,isFetchingNextPage:E,fetchNextPage:D}=nt({provider:h}),{data:O,isLoading:k}=ct(y,h),A=Y.useMemo(()=>b?.pages.flatMap(e=>e.items)??[],[b]),j=y?O??[]:A,{mutate:M,isPending:N}=Jt(),P=Yt(),F=N||P;Y.useEffect(()=>{if(!u)return;let e=e=>{f.current&&!f.current.contains(e.target)&&d(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[u]),Y.useEffect(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&d(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u]);let I=e=>{F||M({repository:{name:e.full_name,gitProvider:e.git_provider,branch:e.main_branch??`main`},entryPoint:`sidebar_cloud_menu`},{onSuccess:e=>{d(!1),o(`/conversations/${e.conversation_id}`)}})},ee=e=>{g(e),l(e),v(``)},te=Ze;Y.useEffect(()=>{u&&(y||!T||E||x||j.length===0||j.length>=10||D())},[u,y,T,E,x,j.length,D]);let L=y?k:x,R=!y&&T&&j.length>0,z=Y.useCallback(()=>{d(e=>!e)},[]),ne=u&&(!i||m!==null),re=i&&m?{position:`fixed`,top:m.top,left:m.left,width:m.width}:void 0;return(0,X.jsxs)(`div`,{className:V(!i&&`relative`,t),ref:f,children:[(0,X.jsx)(`span`,{ref:p,className:`inline-flex`,children:e({onClick:z,"aria-expanded":u,"aria-haspopup":`menu`,disabled:F})}),ne&&(0,X.jsxs)(`div`,{"data-testid":r,className:V(Er,!i&&V(`absolute top-full mt-0`,n)),style:re,children:[s.length>1&&(0,X.jsx)(`div`,{className:`flex items-center gap-1 px-1 py-1`,"data-testid":`cloud-provider-tabs`,children:s.map(e=>{let t=e===h;return(0,X.jsxs)(`button`,{type:`button`,"data-testid":`cloud-provider-tab-${e}`,onClick:()=>ee(e),className:V(`flex items-center gap-1 rounded border px-2 py-1 text-xs`,`transition-none`,t?`border-[var(--oh-border-subtle)] bg-[var(--oh-interactive-hover)] text-white`:`border-transparent text-[var(--oh-text-secondary)] hover:text-white`),children:[(0,X.jsx)(ht,{gitProvider:e}),(0,X.jsx)(`span`,{className:`capitalize`,children:e})]},e)})}),(0,X.jsx)(`div`,{className:`px-2`,children:(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(cn,{width:16,height:16,"aria-hidden":!0,className:`pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 text-[var(--oh-muted)]`}),(0,X.jsx)(`input`,{type:`text`,"data-testid":`cloud-repo-search-input`,value:_,onChange:e=>v(e.target.value),placeholder:a(C.COMMON$SEARCH_REPOSITORIES),disabled:!h,className:V(`w-full border-0 bg-transparent py-1.5 pl-6 pr-0 text-sm text-white`,`outline-none placeholder:text-[var(--oh-muted)]`,`focus:outline-none focus:ring-0`,`disabled:cursor-not-allowed disabled:opacity-60`)})]})}),(0,X.jsx)(tt,{inset:`menu`}),(0,X.jsxs)(`ul`,{className:V(`max-h-[40vh] overflow-y-auto custom-scrollbar-always sm:max-h-[280px]`,Je),children:[L&&j.length===0&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,"data-testid":`cloud-repo-loading`,children:a(C.HOME$LOADING_REPOSITORIES)}),w&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[#F87171]`,"data-testid":`cloud-repo-error`,children:a(C.HOME$FAILED_TO_LOAD_REPOSITORIES)}),!L&&!w&&j.length===0&&!!h&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,"data-testid":`cloud-repo-empty`,children:a(C.GITHUB$NO_RESULTS)}),j.map(e=>(0,X.jsx)(kr,{repo:e,disabled:F,onSelect:I,itemClass:te},`${e.git_provider}:${e.id}`)),R&&(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`cloud-repo-load-more`,disabled:E,onClick:()=>D(),className:te,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-text-secondary)]`,children:a(E?C.HOME$LOADING_MORE_REPOSITORIES:C.CONVERSATION$LOAD_MORE)})})})]})]})]})}var jr=V(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,`text-[var(--oh-muted)] transition-colors`,`hover:bg-[var(--oh-surface-raised)] hover:text-white`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,`disabled:cursor-not-allowed disabled:opacity-50`);function Mr({backendKind:e}){let{t}=S(`openhands`),n=t(C.CONVERSATION_PANEL$NEW_THREAD_FOLDER_ARIA),r=(0,X.jsx)(vn,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0,strokeWidth:2});return e===`local`?(0,X.jsx)(Or,{useFixedPlacement:!0,popoverTestId:`conversation-panel-new-thread-popover`,popoverClassName:``,trigger:({onClick:e,"aria-expanded":t,disabled:i,"aria-haspopup":a})=>(0,X.jsx)(`button`,{type:`button`,className:jr,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})}):(0,X.jsx)(Ar,{useFixedPlacement:!0,popoverTestId:`conversation-panel-new-thread-popover`,popoverClassName:``,trigger:({onClick:e,"aria-expanded":t,disabled:i,"aria-haspopup":a})=>(0,X.jsx)(`button`,{type:`button`,className:jr,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})})}function Nr(e,t){let n=t.limit??5;if(t.expanded||e.length<=n)return{visibleConversations:[...e],isPreviewTruncated:e.length>n,isShowingAll:!0};let r=t.activeConversationId==null?-1:e.findIndex(e=>e.id===t.activeConversationId);if(r>=n){let t=e[r];return{visibleConversations:[...e.slice(0,n-1),t],isPreviewTruncated:!0,isShowingAll:!1}}return{visibleConversations:e.slice(0,n),isPreviewTruncated:e.length>n,isShowingAll:!1}}function Pr(e,t){let n=new Map(t.map(e=>[e.id,e]));return e.map(e=>n.get(e)).filter(e=>e!=null)}function Fr(e,t){if(t.length===0)return[...e];let n=new Set(t);return e.filter(e=>!n.has(e.id))}function Ir(e,t,n){if(t===`local`)return e===`__none_workspace`?{}:e.startsWith(`ws:`)?{workingDir:e.slice(3)}:{};if(e===`__none_repo`)return{};if(e.startsWith(`repo:`)){let t=e.slice(5),r=n[0];return{repository:{name:t,gitProvider:r?.git_provider??`github`,branch:r?.selected_branch??`main`}}}return{}}function Lr(e){if(!e)return 0;let t=Date.parse(e);return Number.isFinite(t)?t:0}function Rr(e,t){let n=t===`created`?`created_at`:`updated_at`;return[...e].sort((e,t)=>Lr(t[n])-Lr(e[n]))}function zr(e){let t=e.selected_workspace?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_workspace`,label:``};let n=t.split(`/`).filter(Boolean).pop()??t;return{id:`ws:${t}`,label:n}}function Br(e){let t=e.selected_repository?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_repo`,label:``};let n=t.split(`/`).filter(Boolean),r=n.length?(n[n.length-1]??t).replace(/\.git$/,``):t.replace(/\.git$/,``);return{id:`repo:${t}`,label:r}}function Vr(e,t,n,r){let i=new Map;for(let n of e){let{id:e,label:a}=t===`local`?zr(n):Br(n),o=e===`__none_workspace`?r.emptyWorkspace:e===`__none_repo`?r.emptyRepository:a,s=i.get(e);s?s.conversations.push(n):i.set(e,{label:o,conversations:[n]})}let a=[...i.entries()].map(([e,r])=>{let i=Rr(r.conversations,n);return{id:e,label:r.label,conversations:i,launch:Ir(e,t,i)}}),o=e=>e.conversations.reduce((e,t)=>Math.max(e,Lr(n===`created`?t.created_at:t.updated_at)),0);return a.sort((e,t)=>o(t)-o(e)),a}function Hr(e,t){if(t.length===0)return[...e];let n=new Map(e.map(e=>[e.id,e])),r=[],i=new Set;for(let e of t){let t=n.get(e);t&&(r.push(t),i.add(e))}for(let t of e)i.has(t.id)||r.push(t);return r}function Ur(e,t,n,r,i=`after`){if(n===r)return[...e];let a=Hr(t.map(e=>({id:e})),e).map(e=>e.id),o=a.indexOf(n),s=a.indexOf(r);if(o<0||s<0)return[...e];let c=[...a];c.splice(o,1);let l=c.indexOf(r),u=i===`before`?l:l+1;return c.splice(u,0,n),c}function Wr({group:e,expanded:t,previewExpanded:n,isDragging:r,dropIndicatorPosition:i,animateLayout:a,isCreatingConversationFlow:o,activeConversationId:s,onToggleExpanded:c,onDragStart:l,onDragEnd:u,onDragOver:d,onDragLeave:f,onDrop:p,onTogglePreviewExpanded:m,onLaunchFromGroup:h,renderConversationCard:g}){let{t:_}=S(`openhands`),v=(0,Y.useRef)(null),y=`thread-folder-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,b=e.id.replace(/[^a-zA-Z0-9_-]/g,`-`),{visibleConversations:x,isPreviewTruncated:w,isShowingAll:T}=Nr(e.conversations,{expanded:n,activeConversationId:s});return(0,X.jsxs)(N.section,{ref:v,layout:a?`position`:!1,transition:{type:`spring`,stiffness:600,damping:45},"aria-labelledby":y,"data-testid":`thread-folder-${b}`,onDragOver:d,onDragLeave:f,onDrop:p,className:`relative rounded-md`,children:[i?(0,X.jsx)(`div`,{"aria-hidden":!0,"data-testid":`thread-folder-drop-indicator-${b}`,className:V(`pointer-events-none absolute inset-x-0 z-10 h-0.5 rounded-full bg-[var(--oh-accent)]`,i===`before`?`-top-0.5`:`-bottom-0.5`)}):null,(0,X.jsxs)(`div`,{className:V(r&&`opacity-0`),children:[(0,X.jsxs)(`div`,{className:V(`flex h-8 w-full min-w-0 items-center gap-0.5 rounded-md pl-2 pr-1 text-sm font-normal`,`text-[var(--oh-muted)] transition-colors hover:bg-[var(--oh-surface-raised)] hover:text-white`),children:[(0,X.jsxs)(`button`,{type:`button`,draggable:!0,id:y,"aria-expanded":t,"aria-controls":`thread-folder-content-${b}`,"data-testid":`thread-folder-drag-${b}`,"aria-label":_(t?C.CONVERSATION_PANEL$COLLAPSE_FOLDER:C.CONVERSATION_PANEL$EXPAND_FOLDER,{label:e.label}),onClick:c,onDragStart:t=>{t.stopPropagation();let{dataTransfer:n}=t;if(n){n.effectAllowed=`move`,n.setData(`text/plain`,e.id);let r=v.current;if(r&&typeof n.setDragImage==`function`){let e=r.getBoundingClientRect(),i=r.cloneNode(!0);i.style.position=`fixed`,i.style.top=`0`,i.style.left=`-9999px`,i.style.width=`${e.width}px`,i.style.margin=`0`,i.style.pointerEvents=`none`,i.style.borderRadius=`0.5rem`,i.style.padding=`0.25rem`,i.style.backgroundColor=`var(--oh-surface-raised)`,i.style.boxShadow=`0 8px 24px rgba(0, 0, 0, 0.35)`,document.body.appendChild(i),n.setDragImage(i,t.clientX-e.left,t.clientY-e.top),window.setTimeout(()=>i.remove(),0)}}l()},onDragEnd:e=>{e.stopPropagation(),u()},className:V(`group/folder flex min-h-8 min-w-0 flex-1 cursor-grab items-center gap-2 rounded-md py-1 text-left text-inherit outline-none active:cursor-grabbing`,`focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`),children:[(0,X.jsx)(ae,{className:V(`h-4 w-4 shrink-0`,t?`hidden group-hover/folder:block`:`block group-hover/folder:hidden`),"aria-hidden":!0}),(0,X.jsx)(F,{className:V(`h-4 w-4 shrink-0`,t?`block group-hover/folder:hidden`:`hidden group-hover/folder:block`),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`truncate`,children:e.label})]}),(0,X.jsx)(`button`,{type:`button`,className:V(`inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md`,`text-inherit transition-colors`,`hover:bg-white/10 hover:text-white`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,`disabled:cursor-not-allowed disabled:opacity-50`),disabled:o,"aria-label":_(C.CONVERSATION_PANEL$ADD_CONVERSATION_TO_GROUP,{label:e.label}),"data-testid":`add-conversation-to-group-${b}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),h()},children:(0,X.jsx)(de,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})})]}),t?(0,X.jsxs)(`div`,{id:`thread-folder-content-${b}`,className:`mt-0.5 space-y-0.5`,children:[x.map(g),w?(0,X.jsx)(`div`,{className:`pl-2`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`thread-folder-view-more-${b}`,onClick:m,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:_(T?C.CONVERSATION_PANEL$LESS:C.CONVERSATION_PANEL$MORE)})}):null]}):null]})]})}function Gr({groups:e,groupIds:t,groupFolderOrder:n,setGroupFolderOrder:r,collapsedGroupIds:i,expandedGroupPreviewIds:a,onToggleGroupCollapsed:o,onToggleGroupPreviewExpanded:s,isCreatingConversationFlow:c,activeConversationId:l,onLaunchFromGroup:u,renderConversationCard:d}){let{t:f}=S(`openhands`),[p,m]=(0,Y.useState)(null),[h,g]=(0,Y.useState)(null),[_,v]=(0,Y.useState)(null),[y,b]=(0,Y.useState)(!1),x=(0,Y.useRef)(null);(0,Y.useEffect)(()=>()=>{x.current&&clearTimeout(x.current)},[]);let w=(0,Y.useCallback)(()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{b(!1),x.current=null},300)},[]),T=(0,Y.useCallback)(()=>{m(null),g(null),v(null)},[]),E=(0,Y.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?`before`:`after`},[]),D=(0,Y.useCallback)((e,i)=>{if(!p||p===e){T(),w();return}r(Ur(n,t,p,e,i)),T(),w()},[p,n,t,T,r,w]);return(0,X.jsx)(`nav`,{"aria-label":f(C.SIDEBAR$CONVERSATIONS),className:`space-y-1 md:space-y-0.5 pb-1`,children:e.map(e=>(0,X.jsx)(Wr,{group:e,expanded:!i.has(e.id),previewExpanded:a.has(e.id),isDragging:p===e.id,dropIndicatorPosition:h===e.id&&p!==e.id?_:null,animateLayout:y,isCreatingConversationFlow:c,activeConversationId:l,onToggleExpanded:()=>o(e.id),onDragStart:()=>{b(!0),m(e.id)},onDragEnd:()=>{T(),w()},onDragOver:t=>{t.preventDefault();let{dataTransfer:n}=t;n&&(n.dropEffect=`move`),g(e.id),v(E(t))},onDragLeave:()=>{g(t=>t===e.id?null:t)},onDrop:t=>{t.preventDefault(),D(e.id,E(t))},onTogglePreviewExpanded:()=>s(e.id),onLaunchFromGroup:()=>u(e.launch),renderConversationCard:d},e.id))})}function Kr({pinnedConversations:e,isPreviewExpanded:t,onTogglePreviewExpanded:n,activeConversationId:r,showDivider:i=!1,renderConversationCard:a}){let{t:o}=S(`openhands`),{visibleConversations:s,isPreviewTruncated:c,isShowingAll:l}=Nr(e,{limit:5,expanded:t,activeConversationId:r});return(0,X.jsxs)(`section`,{"data-testid":`conversation-panel-pinned-section`,className:V(`pt-1`,i?`mb-2 border-b border-[var(--oh-border-subtle)] pb-2`:`pb-2`),children:[(0,X.jsxs)(`h3`,{className:`flex items-center gap-1.5 py-1.5 pl-2 text-sm font-normal text-[var(--oh-muted)]`,children:[(0,X.jsx)(xn,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0}),o(C.CONVERSATION_PANEL$PINNED)]}),(0,X.jsx)(`div`,{className:`space-y-0.5`,children:s.map(a)}),c?(0,X.jsx)(`div`,{className:`pl-2 pt-0.5`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`conversation-panel-pinned-view-more`,onClick:n,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:o(l?C.CONVERSATION_PANEL$LESS:C.CONVERSATION_PANEL$MORE)})}):null]})}var qr={pinsByBackendId:{}};function Jr(e,t){return e[t]??[]}var Yr=bt()(xt((e,t)=>({...qr,pinConversation:(n,r)=>{let i=Jr(t().pinsByBackendId,n);i.includes(r)||e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:[r,...i]}}))},unpinConversation:(n,r)=>{let i=Jr(t().pinsByBackendId,n);i.includes(r)&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:i.filter(e=>e!==r)}}))},togglePin:(e,n)=>{Jr(t().pinsByBackendId,e).includes(n)?t().unpinConversation(e,n):t().pinConversation(e,n)},pruneMissingConversations:(n,r)=>{let i=new Set(r),a=Jr(t().pinsByBackendId,n),o=a.filter(e=>i.has(e));o.length!==a.length&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:o}}))}}),{name:`pinned-conversations`,storage:St(()=>localStorage),partialize:e=>({pinsByBackendId:e.pinsByBackendId})})),Xr=()=>{},Zr=[],Qr=3600*1e3,$r=e=>{let t=Date.now()-Qr,n=[],r=[];for(let i of e){let e=i.updated_at?Date.parse(i.updated_at):NaN;Number.isFinite(e)&&e<t?r.push(i):n.push(i)}return{recent:n,older:r}};function ei({onClose:e,compact:t=!1}){let{t:n}=S(`openhands`),{conversationId:i,navigate:a}=je(),{backend:o}=D(),s=Kt(e??Xr),[c,l]=Y.useState(!1),[u,d]=Y.useState(!1),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Z(e=>e.showOlderConversations),_=Z(e=>e.toggleShowOlderConversations),v=Z(e=>e.showRepoBranchMetadata),y=Z(e=>e.toggleShowRepoBranchMetadata),b=Z(e=>e.showLlmProfiles),x=Z(e=>e.toggleShowLlmProfiles),T=Z(e=>e.showHoverMetadata),O=Z(e=>e.toggleShowHoverMetadata),k=Z(e=>e.organizeMode),A=Z(e=>e.setOrganizeMode),j=Z(e=>e.conversationSort),M=Z(e=>e.setConversationSort),N=Z(e=>e.threadScope),P=Z(e=>e.setThreadScope),F=Z(e=>e.groupFolderOrder),I=Z(e=>e.setGroupFolderOrder),[ee,te]=Y.useState(!1),[L,R]=Y.useState(!1),z=Kt(()=>{te(!1)}),[ne,re]=Y.useState(()=>new Set),[ie,ae]=Y.useState(()=>new Set),[oe,se]=Y.useState(!1),B=Yr(e=>e.pinsByBackendId[o.id]??Zr),ce=Yr(e=>e.togglePin),le=Yr(e=>e.pruneMissingConversations),ue=Y.useCallback(e=>{re(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),de=Y.useCallback(e=>{ae(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);Y.useEffect(()=>{k!==`grouped`&&(re(new Set),ae(new Set))},[k]);let fe=Y.useRef(null),[pe,me]=Y.useState(null),[he,ge]=Y.useState(null),[_e,ve]=Y.useState(null),{data:ye,isLoading:xe,isFetched:H,hasNextPage:Se,isFetching:Ce,isFetchingNextPage:we,fetchNextPage:Te}=Wn(),{data:Ee}=Gn(),U=Y.useMemo(()=>{let e=ye?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[ye]),De=Y.useMemo(()=>Pr(B,U),[U,B]);Y.useEffect(()=>{H&&le(o.id,U.map(e=>e.id))},[o.id,U,H,le]),Y.useEffect(()=>{B.length===0&&se(!1)},[B.length]);let Oe=Y.useMemo(()=>{let e=N===`relevant`?U.filter(e=>be(e.execution_status)):U;return t?e:Fr(e,B)},[t,U,B,N]),{recent:W,older:ke}=Y.useMemo(()=>$r(Oe),[Oe]),Ae=Y.useMemo(()=>Rr(g?[...W,...ke]:W,j),[W,ke,g,j]),Me=Y.useMemo(()=>({emptyWorkspace:n(C.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:n(C.CONVERSATION_PANEL$NO_REPOSITORY)}),[n]),Ne=Y.useMemo(()=>t||k!==`grouped`?null:Vr([...W,...g?ke:[]],o.kind,j,Me),[o.kind,t,j,Me,ke,k,W,g]),G=Y.useMemo(()=>Ne?Hr(Ne,F):null,[Ne,F]),Fe=Y.useMemo(()=>Ne?.map(e=>e.id)??[],[Ne]),Ie=Y.useMemo(()=>Rr(W.filter(e=>be(e.execution_status)),j),[j,W]),Le=Ae.length,Re=Y.useMemo(()=>G?G.reduce((e,t)=>e+t.conversations.length,0):0,[G]),ze=k===`grouped`&&!t?Re===0:Le===0,Be=k===`grouped`&&!t?Re:Le,[Ve,He]=Y.useState(null),Ue=Y.useRef(Be);Ue.current=Be;let We=Y.useCallback(()=>{Se&&He(Ue.current)},[Se]);Y.useEffect(()=>{if(Ve!==null){if(Be>Ve){He(null);return}if(!Se){He(null);return}Ce||we||Te()}},[Ve,Be,Se,Ce,we,Te]);let Ge=Ve!==null||we,{mutate:Ke,mutateAsync:qe}=ot(),{mutate:Je}=st(),{mutate:Ye}=Gt(),Xe=ke.length>0&&!g,Ze=!!Se&&!Xe&&!t&&!ze,{mutate:Qe}=Jt(),K=Yt(),$e=Y.useCallback(e=>{K||Qe({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{a(`/conversations/${e.conversation_id}`)}})},[Qe,K,a]),et=Y.useCallback((e,t)=>{l(!0),me(e),ge(t)},[]),tt=Y.useCallback(e=>{d(!0),me(e)},[]),nt=Y.useCallback((e,t)=>{Ye({conversationId:e,newTitle:t},{onSuccess:()=>{w(n(C.CONVERSATION$TITLE_UPDATED))}})},[n,Ye]),rt=()=>{pe&&Ke({conversationId:pe},{onSuccess:()=>{pe===i&&a(`/conversations`)}})},it=()=>{pe&&Je({conversationId:pe})},at=async()=>{let e=U.map(e=>e.id),t=await Promise.allSettled(e.map(e=>qe({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),r=t.length-n.length;i!==null&&n.includes(i)&&a(`/conversations`),r>0&&E(`${r} conversation${r===1?``:`s`} could not be deleted.`)},ct=Y.useCallback((n,a)=>{let s=B.includes(n.id);return t?(0,X.jsx)(vr,{conversationId:n.id,title:n.title??``,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,lastUpdatedAt:n.updated_at,createdAt:n.created_at,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,isActive:n.id===i,onClose:e,showRepositoryMetadata:v,llmModel:n.llm_model,showLlmProfiles:b,agentKind:n.agent_kind,acpServer:n.acp_server},n.id):(0,X.jsx)(r,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!T||_e===n.id,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,X.jsx)(dr,{title:n.title??``,executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,llmModel:n.llm_model,createdAt:n.created_at}),children:(0,X.jsx)(Pe,{to:`/conversations/${n.id}`,onClick:e,className:V(`block rounded-md transition-colors`,_e!==n.id&&`hover:bg-[var(--oh-surface)]`,(n.id===i||_e===n.id)&&`bg-[var(--oh-surface)]`),children:(0,X.jsx)(cr,{onDelete:()=>et(n.id,n.title??``),onStop:()=>tt(n.id),onChangeTitle:e=>nt(n.id,e),title:n.title??``,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},lastUpdatedAt:n.updated_at,createdAt:n.created_at,executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,conversationId:n.id,contextMenuOpen:_e===n.id,onContextMenuToggle:e=>ve(e?n.id:null),isActive:n.id===i,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,showRepositoryMetadata:v,llmModel:n.llm_model,showLlmProfiles:b,agentKind:n.agent_kind,acpServer:n.acp_server,isPinned:s,onTogglePin:()=>ce(o.id,n.id),alwaysShowPinIcon:s&&!a?.inPinnedSection})})},n.id)},[o.id,t,i,nt,et,tt,e,_e,B,v,b,T,ce]),lt=xe||!H,ut=!t&&!lt&&De.length>0,dt=H&&!xe&&!t&&ze&&!ut&&!Ee?.length;return(0,X.jsxs)(`div`,{ref:s,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!t&&(0,X.jsx)(`div`,{className:V(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,L?`border-[var(--oh-border)]`:`border-transparent`),children:(0,X.jsxs)(`div`,{"data-testid":`older-conversations-summary`,className:`flex min-w-0 flex-nowrap items-center gap-x-2 py-2 pl-4 pr-2.5 text-[var(--oh-muted)]`,children:[(0,X.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]`,children:n(C.SIDEBAR$CONVERSATIONS)}),(0,X.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,X.jsx)(Mr,{backendKind:o.kind}),(0,X.jsx)(Tr,{filterMenuOpen:ee,setFilterMenuOpen:te,menuRef:z,backendKind:o.kind,organizeMode:k,setOrganizeMode:A,conversationSort:j,setConversationSort:M,threadScope:N,setThreadScope:P,showOlderConversations:g,toggleShowOlderConversations:_,showRepoBranchMetadata:v,toggleShowRepoBranchMetadata:y,showLlmProfiles:b,toggleShowLlmProfiles:x,showHoverMetadata:T,toggleShowHoverMetadata:O,totalConversationsCount:U.length,onRequestDeleteAll:()=>h(!0)})]})]})}),(0,X.jsxs)(`div`,{ref:fe,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{R(e.currentTarget.scrollTop>0)},className:V(`flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always`,!t&&`conversation-panel-list-scroll`),children:[lt&&(0,X.jsx)(_r,{compact:t}),!t&&dt&&(0,X.jsx)(`div`,{"data-testid":`conversation-panel-empty-state`,className:`flex min-h-0 flex-1 flex-col items-center justify-center px-4 py-8`,children:(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:n(C.CONVERSATION$NO_CONVERSATIONS)})}),ut?(0,X.jsx)(Kr,{pinnedConversations:De,isPreviewExpanded:oe,onTogglePreviewExpanded:()=>se(e=>!e),activeConversationId:i,showDivider:!t&&k===`chronological`,renderConversationCard:e=>ct(e,{inPinnedSection:!0})}):null,!t&&Ee?.map(t=>(0,X.jsx)(Pe,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,X.jsx)(gr,{task:t})},t.id)),!lt&&t?Ie.map(e=>ct(e)):null,!lt&&!t&&k===`grouped`&&G&&G.length>0?(0,X.jsx)(Gr,{groups:G,groupIds:Fe,groupFolderOrder:F,setGroupFolderOrder:I,collapsedGroupIds:ne,expandedGroupPreviewIds:ie,onToggleGroupCollapsed:ue,onToggleGroupPreviewExpanded:de,isCreatingConversationFlow:K,activeConversationId:i,onLaunchFromGroup:$e,renderConversationCard:e=>ct(e)}):null,!lt&&!t&&k===`chronological`?(0,X.jsx)(`div`,{className:`space-y-0.5`,children:Ae.map(e=>ct(e))}):null,Ze&&(Ge?(0,X.jsx)(`div`,{className:`py-1`,children:(0,X.jsx)(_r,{compact:t})}):(0,X.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:We,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:n(C.CONVERSATION$LOAD_MORE)})}))]}),c&&(0,X.jsx)(Rt,{onConfirm:()=>{rt(),l(!1),ge(null)},onCancel:()=>{l(!1),ge(null)},conversationTitle:he??void 0}),m&&(0,X.jsx)(Rt,{title:n(C.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:n(C.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:U.length}),onConfirm:async()=>{await at(),h(!1)},onCancel:()=>h(!1)}),u&&(0,X.jsx)(Lt,{onConfirm:()=>{it(),d(!1)},onCancel:()=>d(!1)}),f&&(0,X.jsx)(Kn,{onConfirm:()=>{e?.()},onClose:()=>p(!1),onCancel:()=>p(!1)})]})}function ti({collapsed:e}){return e?null:(0,X.jsx)(`div`,{className:`flex flex-col flex-1 min-h-0`,children:(0,X.jsx)(`div`,{className:`flex min-h-0 w-full flex-1 flex-col`,children:(0,X.jsx)(ei,{})})})}var ni=e=>(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 20 20`,fill:`none`,...e,children:[(0,X.jsx)(`mask`,{id:`mask0_18339_1445`,style:{maskType:`luminance`},maskUnits:`userSpaceOnUse`,x:1,y:1,width:18,height:18,children:(0,X.jsx)(`path`,{d:`M19 1H1V19H19V1Z`,fill:`white`})}),(0,X.jsxs)(`g`,{mask:`url(#mask0_18339_1445)`,children:[(0,X.jsx)(`path`,{d:`M10 18.1818V16.5454`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M10 1.81836V3.45472`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M1.81824 10H3.4546`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M18.1818 10H16.5454`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M5.93359 17.1019L6.74359 15.6782`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M14.0663 2.89844L13.2563 4.32208`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M2.89819 5.93359L4.32183 6.74359`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M17.1019 14.0663L15.6782 13.2563`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M5.92542 2.90625L6.7436 4.3217`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M14.0909 17.0854L13.2727 15.6699`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M17.0855 5.90918L15.67 6.72736`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M2.91455 14.0911L4.33001 13.2729`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M10 16.5455C13.615 16.5455 16.5455 13.615 16.5455 10C16.5455 6.38509 13.615 3.45459 10 3.45459C6.38509 3.45459 3.45459 6.38509 3.45459 10C3.45459 13.615 6.38509 16.5455 10 16.5455Z`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M12.5854 9.77916L8.80545 7.59461C8.63363 7.49643 8.41272 7.61916 8.41272 7.81552V12.1846C8.41272 12.381 8.62545 12.5119 8.80545 12.4055L12.5854 10.221C12.7573 10.1228 12.7573 9.86916 12.5854 9.77098V9.77916Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`})]})]}),$=18,ri=34,ii=Math.round(ri*30/46);function ai({collapsed:e,showCollapseToggle:t,showMobileCloseButton:n=!1,onCloseMobile:r,collapseToggleLabel:i,onCollapse:a,onExpand:o,showCollapsedExpandButton:s,isExtensionsActive:c,currentPath:l,activeBackendHealth:u,collapsedBackendPopoverOpen:d,setCollapsedBackendPopoverOpen:f,collapsedBackendPopoverRef:p,collapsedBackendCloseTimer:m,onOpenAddBackend:h,onOpenManageBackends:g}){let{t:_}=S(`openhands`),y=m;return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{className:Re(e),children:[(0,X.jsxs)(`div`,{className:V(e&&t?ze:`flex min-w-0 shrink-0 items-center`),children:[(0,X.jsx)(`div`,{className:V(e&&t&&`flex h-full w-full items-center justify-start pl-2.5 transition-opacity duration-150`,e&&s&&`opacity-0`),children:(0,X.jsx)(En,{logoWidth:ri,logoHeight:ii,logoClassName:`max-w-none`,className:V(G,`overflow-visible`)})}),e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:o,className:V(Be,s?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),children:(0,X.jsx)(v,{width:14,height:14})}):null]}),!e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:a,className:V(`hidden md:inline-flex ml-auto`,Le,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(M,{width:14,height:14})}):null,!e&&n?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-drawer-close`,onClick:r,"aria-label":_(C.SIDEBAR$CLOSE_MENU),className:V(`inline-flex ml-auto`,Le,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(M,{width:14,height:14})}):null]}),(0,X.jsxs)(`nav`,{className:Fe(e),children:[(0,X.jsx)(Un,{collapsed:e}),(0,X.jsx)(Ue,{to:`/conversations`,end:!0,label:_(C.SIDEBAR$NEW_CHAT),testId:`sidebar-conversations-link`,collapsed:e,icon:(0,X.jsx)(de,{width:$,height:$})}),(0,X.jsx)(Ue,{to:`/customize`,label:_(C.NAV$CUSTOMIZE),testId:`sidebar-skills-link`,collapsed:e,forceActive:c,icon:(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:$,height:$,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,X.jsx)(`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}),(0,X.jsx)(`path`,{d:`m7 16.5-4.74-2.85`}),(0,X.jsx)(`path`,{d:`m7 16.5 5-3`}),(0,X.jsx)(`path`,{d:`M7 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}),(0,X.jsx)(`path`,{d:`m17 16.5-5-3`}),(0,X.jsx)(`path`,{d:`m17 16.5 4.74-2.85`}),(0,X.jsx)(`path`,{d:`m17 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}),(0,X.jsx)(`path`,{d:`M12 8 7.26 5.15`}),(0,X.jsx)(`path`,{d:`m12 8 4.74-2.85`}),(0,X.jsx)(`path`,{d:`M12 13.5V8`})]})}),(0,X.jsx)(Ue,{to:`/automations`,label:_(C.SIDEBAR$AUTOMATIONS),testId:`sidebar-automations-link`,collapsed:e,icon:(0,X.jsx)(ni,{width:$,height:$})})]}),(0,X.jsx)(ti,{collapsed:e}),e&&t?(0,X.jsxs)(`nav`,{className:V(Fe(e),`mt-auto pb-2 cursor-pointer`),children:[(0,X.jsx)(We,{content:_(C.SIDEBAR$SETTINGS),placement:`right`,children:(0,X.jsxs)(Pe,{to:`/settings`,"data-testid":`collapsed-settings-link`,"aria-label":_(C.SIDEBAR$SETTINGS),className:Ie({collapsed:!0}),children:[(0,X.jsx)(He,{active:l.startsWith(`/settings`),children:(0,X.jsx)(me,{width:$,height:$})}),(0,X.jsx)(`span`,{className:Ve(!0),children:_(C.SIDEBAR$SETTINGS)})]})}),(0,X.jsxs)(`div`,{className:`relative`,ref:p,onMouseEnter:()=>{y.current&&=(clearTimeout(y.current),null),f(!0)},onMouseLeave:()=>{y.current=setTimeout(()=>f(!1),150)},children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`collapsed-backend-selector-link`,"aria-label":_(C.BACKEND$MANAGE),"aria-expanded":d,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>e.stopPropagation(),className:V(Ie({collapsed:!0}),`relative`),children:[(0,X.jsx)(He,{active:d,children:(0,X.jsxs)(`span`,{className:`relative inline-flex size-[18px] shrink-0 items-center justify-center`,children:[(0,X.jsx)(wt,{isConnected:u?.isConnected??null,className:`absolute -left-0.5 -top-0.5 z-[1] pointer-events-none`}),(0,X.jsx)(Sn,{width:$,height:$})]})}),(0,X.jsx)(`span`,{className:Ve(!0),children:_(C.BACKEND$MANAGE)})]}),d?(0,X.jsx)(`div`,{className:`absolute bottom-[-4px] left-full pl-2.5 z-40 w-[272px]`,onClick:e=>e.stopPropagation(),children:(0,X.jsx)(Bn,{sidebarCollapsed:e,hideTrigger:!0,defaultOpen:!0,openUpward:!0,onSelectOption:()=>f(!1),onOpenAddBackend:h,onOpenManageBackends:g})}):null]})]}):null,e?null:(0,X.jsx)(`div`,{className:V(`flex flex-col items-stretch max-w-none box-border shrink-0`,`-ml-2.5 w-[calc(100%+0.625rem)] border-t border-[var(--oh-border)] pt-2 px-2.5`),children:(0,X.jsx)(Bn,{sidebarCollapsed:e,openUpward:!0})})]})}var oi=Y.lazy(()=>n(()=>import(`./settings-modal-BcSWpKI0.js`).then(e=>({default:e.SettingsModal})),__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]))),si=Y.lazy(()=>n(()=>import(`./add-backend-modal-BKHzq5no.js`).then(e=>e.n).then(e=>({default:e.AddBackendModal})),__vite__mapDeps([39,1,2,40,6,7,14,9,15,3,4,5,8,10,11,12,41,42,43,44,45,23,18,24,28,26,46,29,47,48,49,50,16,35,36,37,34,32,33,27]))),ci=Y.lazy(()=>n(()=>import(`./manage-backends-modal-DAVhNUCe.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([51,1,2,6,7,14,9,15,52,10,53,54,3,4,5,8,11,12,40,41,42,43,44,45,23,18,24,28,26,46,29,47,48,49,50,16,35,36,37,34,32,33,27,55,56]))),li=250;function ui(){let{t:e}=S(`openhands`),{currentPath:t}=je(),{data:n}=Ae(),{data:r,error:i,isError:a,isFetching:o}=Tt(),{backends:s,active:c}=O(),l=we(s)[c.backend.id],u=he(e=>e.collapsed),d=he(e=>e.setCollapsed),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Y.useRef(null),[_,v]=Y.useState(!1),[y,b]=Y.useState(!1),[x,w]=Y.useState(!1),T=Y.useRef(!1),[,D]=Y.useReducer(e=>e+1,0),{isOpen:k,close:A}=Vt(),[j,M]=Y.useState(!1),[N,P]=Y.useState(!1),F=Kt(()=>h(!1)),I=Et(i);Y.useEffect(()=>{A()},[t,A]),Y.useEffect(()=>{if(k){M(!0);let e=requestAnimationFrame(()=>{P(!0)});return()=>cancelAnimationFrame(e)}P(!1);let e=window.setTimeout(()=>{M(!1)},li);return()=>window.clearTimeout(e)},[k]),Y.useEffect(()=>{if(!k)return;let e=e=>{e.key===`Escape`&&A()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[k,A]),Y.useEffect(()=>{t===`/settings`?p(!1):!o&&a&&I!==404?E(e(C.SETTINGS$FETCH_ERROR)):I===404&&!n?.feature_flags?.hide_llm_settings&&p(!0)},[t,o,a,I,n?.feature_flags?.hide_llm_settings,e]);let ee=e(u?C.SIDEBAR$EXPAND:C.SIDEBAR$COLLAPSE),te=Y.useCallback(e=>{if(!u)return;let t=e.target;t instanceof HTMLElement&&(t.closest(`a,button,input,textarea,select,[role='button'],[role='link']`)||d(!1))},[u,d]),L={collapseToggleLabel:ee,onCollapse:Y.useCallback(()=>{w(!1),T.current=!0,D(),d(!0),window.setTimeout(()=>{T.current=!1,D()},250)},[d]),onExpand:()=>d(!1),showCollapsedExpandButton:u&&x&&!T.current,isExtensionsActive:t===`/customize`||t.startsWith(`/skills`)||t===`/plugins`||t===`/mcp`,currentPath:t,activeBackendHealth:l,collapsedBackendPopoverOpen:m,setCollapsedBackendPopoverOpen:h,collapsedBackendPopoverRef:F,collapsedBackendCloseTimer:g,onOpenAddBackend:()=>v(!0),onOpenManageBackends:()=>b(!0)};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`aside`,{"aria-label":e(C.SIDEBAR$NAVIGATION_LABEL),"data-collapsed":u?`true`:`false`,onClick:te,onMouseEnter:()=>{u&&w(!0)},onMouseLeave:()=>{w(!1)},className:V(`max-md:hidden flex bg-base flex-col min-h-0 transition-[width,min-width] duration-200`,`md:border-r md:border-[var(--oh-border)] md:h-full`,u?`md:w-[60px] md:min-w-[60px] md:px-2.5`:`md:w-[300px] md:min-w-[300px] pb-2 md:pl-2.5 md:pr-0`,t===`/`&&`md:pb-3`),children:(0,X.jsx)(ai,{collapsed:u,showCollapseToggle:!0,...L})}),j?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:V(`fixed inset-0 z-40 bg-black/50 md:hidden`,`transition-opacity ease-in-out motion-reduce:transition-none`,N?`opacity-100`:`pointer-events-none opacity-0`),style:{transitionDuration:`${li}ms`},onClick:A,"aria-hidden":!N}),(0,X.jsx)(`aside`,{"aria-label":e(C.SIDEBAR$NAVIGATION_LABEL),"data-testid":`sidebar-mobile-drawer`,"aria-hidden":!N,className:V(`fixed inset-y-0 left-0 z-50 flex min-h-0 w-[min(300px,85vw)] flex-col bg-base`,`border-r border-[var(--oh-border)] pb-2 pl-2.5 pr-0 md:hidden`,`transition-transform ease-in-out motion-reduce:transition-none`,N?`translate-x-0`:`-translate-x-full`),style:{transitionDuration:`${li}ms`},children:(0,X.jsx)(ai,{collapsed:!1,showCollapseToggle:!1,showMobileCloseButton:!0,onCloseMobile:A,...L})})]}):null,f&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(oi,{settings:r,onClose:()=>p(!1)})}),_&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(si,{onClose:()=>v(!1)})}),y&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(ci,{onClose:()=>b(!1)})})]})}var di=`/settings`,fi=`/customize`,pi=[`/skills`,`/mcp`,`/plugins`];function mi(e){return e===di?{mode:`menu`}:e.startsWith(`${di}/`)&&e.length>9?{mode:`back`,backTo:di,backLabelKey:C.SETTINGS$TITLE}:e===fi?{mode:`menu`}:pi.some(t=>e===t||e.startsWith(`${t}/`))?{mode:`back`,backTo:fi,backLabelKey:C.NAV$CUSTOMIZE}:{mode:`menu`}}function hi(){let{t:e}=S(`openhands`),{currentPath:t,navigate:n}=je(),r=mi(t);return(0,X.jsxs)(`header`,{className:`flex md:hidden h-12 shrink-0 items-center gap-2 px-2.5`,"aria-label":e(C.SIDEBAR$NAVIGATION_LABEL),children:[(0,X.jsx)(Wt,{}),r.mode===`back`&&r.backTo?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-back-button`,onClick:()=>n(r.backTo),"aria-label":e(r.backLabelKey??C.COMMON$BACK),className:Ht,children:(0,X.jsx)(M,{size:20,className:zt,"aria-hidden":!0,strokeWidth:2})}):null]})}var gi=()=>{let e=Ce(),{mutate:t}=un();return{migrateUserConsent:Y.useCallback(async n=>{let r=localStorage.getItem(`analytics-consent`);r&&(n?.handleAnalyticsWasPresentInLocalStorage(),t({user_consents_to_analytics:r===`true`},{onSuccess:()=>{ln(e,r===`true`)}}),localStorage.removeItem(`analytics-consent`))},[e,t])}};function _i(){let{backend:e}=D(),t=e.kind===`local`,{data:n}=qt(),{mutate:r,isPending:i}=ge(),a=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{a.current=null},[e.id]),(0,Y.useEffect)(()=>{if(!t||i||!n)return;let{profiles:e,active_profile:o}=n,s=o!=null&&e.some(e=>e.name===o);if(e.length===0||s){a.current=null;return}let c=e.find(e=>e.api_key_set)??e[0];a.current!==c.name&&(a.current=c.name,r(c.name))},[t,n,i,r])}var vi=()=>{let e=Ce(),{data:t}=Tt();Y.useEffect(()=>{!e||t===void 0||ln(e,t.user_consents_to_analytics===!0)},[e,t])},yi=()=>{let e=Ce(),{backend:t}=D(),{data:n}=Tt(),r=vt(),i=Y.useRef(!1),a=t.kind===`cloud`,o=a?r[t.id]?.userId??null:null,s=n?.user_consents_to_analytics;Y.useEffect(()=>{if(!(!e||!a||n===void 0)){if(s===!0&&o){e.identify(o,{email:n.email??n.git_user_email??void 0}),i.current=!0;return}(s===!1||i.current&&!o)&&(e.reset(),i.current=!1)}},[e,a,s,o,n?.email,n])};function bi(e){switch(e){case H.RUNNING:return`🟢`;case H.FINISHED:case H.IDLE:case H.WAITING_FOR_CONFIRMATION:return`✅`;case H.PAUSED:return`⚪`;case H.ERROR:case H.STUCK:return`🔴`;default:return null}}var xi=`OpenHands`,Si=()=>{let{conversationId:e}=f(),{data:t}=dn(e??null),n=fn(e=>e.execution_status),r=t?.title,i=e&&r?`${r} | ${xi}`:xi;if(!e)return i;let a=bi(n??t?.execution_status??null);return a?`${a} ${i}`:i};function Ci({children:e}){let{pathname:t}=g(),n=u(),r=d(),i=h(),a=Y.useMemo(()=>{for(let e=i.length-1;e>=0;--e){let t=i[e]?.params?.conversationId;if(t)return t}return null},[i]);return(0,X.jsx)(Me,{value:Y.useMemo(()=>({currentPath:t,conversationId:a,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[t,a,r.location,n]),children:e})}var wi=Y.lazy(()=>n(()=>import(`./environment-switch-overlay-6laJch-9.js`),__vite__mapDeps([57,1,2,3,4,58]))),Ti=Y.lazy(()=>n(()=>import(`./alert-banner-Dd4woGbm.js`).then(e=>({default:e.AlertBanner})),__vite__mapDeps([59,1,2,60,3,4,61,62,11,12,29,63,64,20]))),Ei=Y.lazy(()=>n(()=>import(`./command-menu-BMVEme4H.js`).then(e=>({default:e.CommandMenu})),__vite__mapDeps([65,1,2,10,66,67,68,69,70,71,72,3,4,11,12,29]))),Di=p(function(){let e=c(),{t}=S(`openhands`);return s(e)?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h1`,{children:e.status}),(0,X.jsx)(`p`,{children:e.statusText}),(0,X.jsx)(`pre`,{children:e.data instanceof Object?JSON.stringify(e.data):e.data})]}):e instanceof Error?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h1`,{children:t(C.ERROR$GENERIC)}),(0,X.jsx)(`pre`,{children:e.message})]}):(0,X.jsx)(`div`,{children:(0,X.jsx)(`h1`,{children:t(C.ERROR$UNKNOWN)})})}),Oi=l(function(){let e=g(),t=Si(),{data:n}=Tt(),{migrateUserConsent:r}=gi(),i=Ae();if(vi(),yi(),_i(),Y.useEffect(()=>{n?.language&&T.changeLanguage(n.language)},[n?.language]),Y.useEffect(()=>{r()},[r]),i.isLoading)return(0,X.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-base`,children:(0,X.jsx)(ke,{size:`large`})});let a=/^\/conversations\/[^/]+/.test(e.pathname),o=re(e.search);return(0,X.jsx)(Ci,{children:(0,X.jsxs)(Ft,{children:[(0,X.jsxs)(`div`,{"data-testid":`root-layout`,className:`h-screen lg:min-w-5xl flex flex-col md:flex-row bg-base overflow-hidden p-0`,children:[(0,X.jsx)(`title`,{children:t}),(0,X.jsx)(ui,{}),(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-col w-full min-w-0 h-full gap-3`,children:[a?null:(0,X.jsx)(hi,{}),i.data&&(i.data.maintenance_start_time||i.data.faulty_models&&i.data.faulty_models.length>0||i.data.error_message)&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Ti,{maintenanceStartTime:i.data.maintenance_start_time,faultyModels:i.data.faulty_models,errorMessage:i.data.error_message,updatedAt:i.data.updated_at})}),(0,X.jsx)(`div`,{id:`root-outlet`,className:`relative flex-1 overflow-auto px-0 custom-scrollbar`,children:(0,X.jsx)(m,{})})]})]}),(0,X.jsxs)(Y.Suspense,{fallback:null,children:[(0,X.jsx)(wi,{}),(0,X.jsx)(Ei,{})]}),o?(0,X.jsx)(B,{}):null]})})});export{Di as ErrorBoundary,Oi as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{E as r,L as i,c as a,j as o,k as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as c}from"./useTranslation-Cbf5AGg_.js";import{t as l}from"./declaration-BGsHjPEW.js";import{a as u,d,f,h as p,i as m,o as h}from"./active-backend-context-BCXRv5pm.js";import{n as g,r as _,t as v}from"./use-settings-nav-items-BUsrDbVR.js";import{t as y}from"./utils-DB9LsAzA.js";import{_ as b}from"./agent-server-compatibility-D6DSanlx.js";import{t as x}from"./option-service.api-DAkg_F7p.js";import"./navigation-link-imH6S7h2.js";import"./sidebar-layout-Cn6eQaEI.js";import{t as S}from"./sidebar-nav-link-DMc8AIe7.js";import{n as C}from"./use-settings-DNJC4gqu.js";import{n as w}from"./use-agent-profiles-LHZEK0Gg.js";import"./close-DO5Rq_CS.js";import{r as T}from"./typography-CQn9wyEX.js";import{t as E}from"./settings-section-header-context-C2MUIG88.js";import"./settings-gear-D_HVvE5L.js";import{n as D,r as O}from"./settings-utils-B1lBErvV.js";import{t as k}from"./use-breakpoint-OjLm94cF.js";import{t as A}from"./backend-synced-settings-badge-Db_REKVw.js";import{t as j}from"./settings-like-page-layout-classes-DLrsPCaI.js";var M=e(t(),1),N=n();function P({navigationItems:e}){let{t}=c(`openhands`),n=e.filter(e=>e.type===`item`);return(0,N.jsxs)(`aside`,{"data-testid":`settings-navbar-desktop`,className:y(`hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2`,`md:sticky md:top-8 md:self-start md:pl-8`),children:[(0,N.jsx)(T.Text,{className:`px-2 text-sm font-normal text-white`,children:t(l.SETTINGS$TITLE)}),(0,N.jsxs)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:[n.map(e=>(0,N.jsx)(S,{to:e.item.to,label:t(e.item.text),end:!0,testId:`sidebar-settings-${e.item.to}`,icon:e.item.icon,disabled:e.disabled,disabledReason:e.disabled&&e.disabledAgentName?t(l.SETTINGS$AGENT_DISABLED_TOOLTIP,{agentName:e.disabledAgentName}):void 0},e.item.to)),(0,N.jsx)(_,{})]}),(0,N.jsx)(`div`,{className:`px-2 pt-3`,children:(0,N.jsx)(A,{})})]})}function F({children:e,navigationItems:t}){return(0,N.jsx)(`div`,{className:`flex h-full flex-col md:pt-8`,children:(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-10 md:items-start`,children:[(0,N.jsx)(P,{navigationItems:t}),(0,N.jsx)(`main`,{className:j,children:(0,N.jsx)(`div`,{className:`mx-auto w-full min-w-0 max-w-[800px]`,children:e})})]})})}async function I(){try{let e=b(),t;try{let n=await p.fetchQuery({queryKey:[...m.all,e.backend.id,e.orgId],queryFn:w.listProfiles,staleTime:0,...u}),r=n?.active_agent_profile_id??null,i=n?.profiles.find(e=>e.id!=null&&e.id===r);i&&(t=i.agent_kind===`acp`)}catch{}if(t===void 0&&(t=(await p.fetchQuery({queryKey:[...f.byScope(`personal`),e.backend.id,e.orgId],queryFn:()=>C(`personal`),staleTime:0}))?.agent_settings?.agent_kind===`acp`),t)return r(`/settings/agents`)}catch{}return null}var L=async({request:e})=>{let{pathname:t}=new URL(e.url),n=(await p.fetchQuery({queryKey:d.WEB_CLIENT_CONFIG,queryFn:x.getConfig,...h}))?.feature_flags;if(O(t,n)){let e=D(n);if(e&&e!==t)return r(e)}if(g.find(e=>e.to===t)?.disabledByAcp){let e=await I();if(e)return e}return null};function R(){let{t:e}=c(`openhands`),t=s(),n=o(),r=v(),i=k(768),[l,u]=(0,M.useState)(!1),{currentSectionTitle:d,currentSectionSubtitle:f}=(0,M.useMemo)(()=>{let e=r.find(e=>e.type===`item`&&e.item.to===t.pathname);if(e?.type===`item`)return{currentSectionTitle:e.item.text,currentSectionSubtitle:e.item.subtitle};let n=r.find(e=>e.type===`item`);return n?.type===`item`?{currentSectionTitle:n.item.text,currentSectionSubtitle:n.item.subtitle}:{currentSectionTitle:`SETTINGS$TITLE`,currentSectionSubtitle:null}},[r,t.pathname]),p=n.find(e=>e.pathname===t.pathname)?.handle,m=i&&t.pathname===`/settings`;return(0,N.jsx)(`main`,{"data-testid":`settings-screen`,className:`min-h-0`,children:(0,N.jsx)(E,{setHideSectionHeader:u,children:(0,N.jsx)(F,{navigationItems:r,children:(0,N.jsxs)(`div`,{className:`flex flex-col gap-6 pb-8`,children:[!(p?.hideTitle===!0||m||l)&&(0,N.jsxs)(`header`,{className:`space-y-1`,children:[(0,N.jsx)(T.H2,{children:e(d)}),f?(0,N.jsx)(`p`,{"data-testid":`settings-page-subtitle`,className:`text-sm leading-5 text-tertiary-light`,children:e(f)}):null]}),(0,N.jsx)(a,{})]})})})})}var z=i(R);export{L as clientLoader,z as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js","assets/rolldown-runtime-BFRubm34.js"])))=>i.map(i=>d[i]);
2
- import{St as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./package-Dk_VtWJ4.js";var n=`openhands-telemetry-consent`,r=`openhands-telemetry-first-use`,i=`openhands-telemetry-session`,a=`agent-canvas`,o=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,s=`https://z.openhands.dev`,c=`https://us.posthog.com`,l=!1,u=null;function d(){return typeof window<`u`&&typeof localStorage<`u`}async function f(){if(!d())return null;if(u)return u;try{let{default:t}=await e(async()=>{let{default:e}=await import(`./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js`).then(e=>e.n);return{default:e}},__vite__mapDeps([0,1]));return t}catch{return null}}function p(){return typeof process<`u`&&{}?.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`)}async function m(e=!1){if(l)return u;let n=await f();return n?(u=n.init(o,{api_host:s,ui_host:c,opt_out_capturing_by_default:!e,capture_pageview:!1,autocapture:!1,persistence:`localStorage`,persistence_name:a,consent_persistence_name:`${a}-consent`,disable_session_recording:!0,loaded:e=>{e.register({package_name:t.name,package_version:t.version})}},a),l=!0,u):null}function h(){if(!d())return`pending`;if(p())return`denied`;try{let e=localStorage.getItem(n);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}async function g(e){if(d())try{localStorage.setItem(n,e);let t=await m();if(!t)return;e===`granted`?t.opt_in_capturing():t.opt_out_capturing()}catch{}}function _(){return h()===`granted`}function v(){if(!d())return!1;try{return localStorage.getItem(r)===`true`}catch{return!1}}function y(){if(d())try{localStorage.setItem(r,`true`)}catch{}}async function b(){if(p()||v())return;let e=await m(!0);e&&((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),y(),h()!==`granted`&&e.opt_out_capturing())}function x(){if(!d())return!1;try{return sessionStorage.getItem(i)===`true`}catch{return!1}}function S(){if(d())try{sessionStorage.setItem(i,`true`)}catch{}}async function C(){if(!_()||x())return;let e=await m();e&&(e.capture(`canvas_new_session`,{is_first_use:!v()}),S())}async function w(e,t={}){if(!_())return;let n=await m();n&&n.capture(e,t)}async function T(){if(d())try{localStorage.removeItem(n),localStorage.removeItem(r),sessionStorage.removeItem(i),l&&u&&u.reset()}catch{}}export{w as a,g as i,h as n,b as o,_ as r,C as s,T as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./useQuery-D5pEZbY0.js";import{d as t,o as n}from"./active-backend-context-BCXRv5pm.js";import{i as r,o as i}from"./agent-server-compatibility-D6DSanlx.js";import{t as a}from"./option-service.api-DAkg_F7p.js";var o=o=>e({queryKey:t.WEB_CLIENT_CONFIG,queryFn:a.getConfig,retry:(e,t)=>!i(t)&&!r(t)&&e<3,meta:{disableToast:!0},...n,enabled:o?.enabled});export{o as t};
@@ -1 +0,0 @@
1
- import{T as e,b as t,w as n}from"./utils-DB9LsAzA.js";import{t as r}from"./use-active-conversation-B0sttISF.js";import{t as i}from"./use-agent-state-C5uA0bRj.js";var a=({allowAgentError:a=!1}={})=>{let{data:o}=r(),{curAgentState:s}=i(),c=a?e:n;return t(o?.execution_status)&&!c.includes(s)};export{a as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ljq5gbus-B2XD4bi2.js";import{r as t}from"./use-settings-DNJC4gqu.js";var n=()=>{let n=e(),{data:r}=t(),i={current_url:window.location.href,user_email:r?.email||r?.git_user_email||null},a=(e,t={})=>{!n||r?.user_consents_to_analytics!==!0||n.capture(e,{...t,...i})};return{trackLoginButtonClick:({provider:e})=>{a(`login_button_clicked`,{provider:e})},trackConversationCreated:({conversationId:e,taskId:t,hasRepository:n,gitProvider:r,hasWorkspace:i,workspaceMode:o,hasInitialQuery:s,agentType:c,hasParentConversation:l,entryPoint:u})=>{a(`conversation_created`,{conversation_id:e,task_id:t,is_start_task:e.startsWith(`task-`),has_repository:n,git_provider:r,has_workspace:i,workspace_mode:o,has_initial_query:s,agent_type:c,has_parent_conversation:l,entry_point:u})},trackPushButtonClick:()=>{a(`push_button_clicked`)},trackPullButtonClick:()=>{a(`pull_button_clicked`)},trackCreatePrButtonClick:()=>{a(`create_pr_button_clicked`)},trackUserSignupCompleted:()=>{a(`user_signup_completed`,{signup_timestamp:new Date().toISOString()})},trackPrebuiltAutomationEnabled:({automationId:e,automationName:t,automationCategory:n})=>{a(`prebuilt_automation_enabled`,{automation_id:e,automation_name:t,automation_category:n})},trackInitialQuerySubmitted:({entryPoint:e,queryCharacterLength:t,replayJsonSize:n})=>{a(`initial_query_submitted`,{entry_point:e,query_character_length:t,replay_json_size:n})},trackUserMessageSent:({sessionMessageCount:e,currentMessageLength:t})=>{a(`user_message_sent`,{session_message_count:e,current_message_length:t})},trackDownloadVsCodeButtonClicked:()=>{a(`download_via_vscode_button_clicked`)},trackSettingsSaved:({llmModel:e,llmApiKeySet:t,searchApiKeySet:n,remoteRuntimeResourceFactor:r})=>{a(`settings_saved`,{LLM_MODEL:e,LLM_API_KEY_SET:t,SEARCH_API_KEY_SET:n,REMOTE_RUNTIME_RESOURCE_FACTOR:r})},trackMcpConfigUpdated:({sseServersCount:e,stdioServersCount:t})=>{a(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:e,stdio_servers_count:t})},trackDownloadTrajectoryButtonClicked:()=>{a(`download_trajectory_button_clicked`)},trackConversationExported:e=>{a(`conversation_exported`,{format:e})},trackAutomationCreated:({backendKind:e})=>{a(`automation_created`,{backend_kind:e})},trackAutomationExecuted:({backendKind:e})=>{a(`automation_executed`,{backend_kind:e})},trackAutomationDeleted:({backendKind:e})=>{a(`automation_deleted`,{backend_kind:e})},trackAutomationDeactivated:({backendKind:e})=>{a(`automation_deactivated`,{backend_kind:e})},trackAutomationEdited:({backendKind:e})=>{a(`automation_edited`,{backend_kind:e})},trackAutomationExported:({backendKind:e})=>{a(`automation_exported`,{backend_kind:e})},trackAutomationImported:({backendKind:e})=>{a(`automation_imported`,{backend_kind:e})},trackBackendAdded:({backendKind:e,connectionMethod:t,isOpenhandsCloud:n,isCustomHost:r,hasApiKey:i,source:o})=>{a(`backend_added`,{backend_kind:e,connection_method:t,is_openhands_cloud:n,is_custom_host:r,has_api_key:i,source:o})},trackOnboardingStarted:()=>{a(`onboarding_started`)},trackOnboardingStepViewed:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{a(`onboarding_step_viewed`,{step:e,step_index:t,total_steps:n,agent:r})},trackOnboardingCompleted:({agent:e})=>{a(`onboarding_completed`,{agent:e})},trackOnboardingSkipped:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{a(`onboarding_skipped`,{step:e,step_index:t,total_steps:n,agent:r})}}};export{n as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js";var r=e(t()),i;function a(e){i=e}function o(){return i}var s=(0,r.createContext)({get client(){return o()},bootstrap:void 0});function c(e,t,n){if(n===void 0&&(n=new WeakMap),e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(n.has(e)&&n.get(e)===t)return!0;n.set(e,t);var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0,o=r;a<o.length;a++){var s=o[a];if(!i.includes(s)||!c(e[s],t[s],n))return!1}return!0}function l(e){var t=e.children,n=e.client,i=e.apiKey,a=e.options,l=(0,r.useRef)(null),u=(0,r.useMemo)(function(){if(n)return i&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),a&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n;var e=o();return i||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),e},[n,i,JSON.stringify(a)]);return(0,r.useEffect)(function(){if(!n){var e=o(),t=l.current;t?(i!==t.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),a&&!c(a,t.options)&&e.set_config(a),l.current={apiKey:i,options:a??{}}):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(i,a),l.current={apiKey:i,options:a??{}})}},[n,i,JSON.stringify(a)]),r.createElement(s.Provider,{value:{client:u,bootstrap:a?.bootstrap??n?.config?.bootstrap}},t)}var u=function(e){return typeof e==`function`},d=function(){return(0,r.useContext)(s).client},f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},f(e,t)};function p(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);f(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var m={componentStack:null,exceptionEvent:null,error:null},h={INVALID_FALLBACK:`[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element.`};(function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.state=m,n}return t.prototype.componentDidCatch=function(e,t){var n=this.props.additionalProperties,r;u(n)?r=n(e):typeof n==`object`&&(r=n);var i=this.context.client.captureException(e,r),a=t.componentStack;this.setState({error:e,componentStack:a??null,exceptionEvent:i})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.fallback,i=this.state;if(i.componentStack==null)return u(t)?t():t;var a=u(n)?r.createElement(n,{error:i.error,componentStack:i.componentStack,exceptionEvent:i.exceptionEvent}):n;return r.isValidElement(a)?a:(console.warn(h.INVALID_FALLBACK),r.createElement(r.Fragment,null))},t.contextType=s,t})(r.Component),a(n);export{d as n,l as t};
@@ -1,2 +0,0 @@
1
- const e=require(`../../_virtual/_rolldown/runtime.cjs`),t=require(`../../hooks/query/query-keys.cjs`),n=require(`../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs`),r=require(`../../node_modules/posthog-js/react/dist/esm/index.cjs`),i=require(`../../api/option-service/option-service.api.cjs`);let a=require(`react`);a=e.__toESM(a,1);let o=require(`react/jsx-runtime`);var s=`posthog_bootstrap`;function c(){let e=window.location.hash.substring(1),t=new URLSearchParams(e),n=t.get(`distinct_id`),r=t.get(`session_id`);if(n&&r){let e={distinctID:n,sessionID:r};return sessionStorage.setItem(s,JSON.stringify(e)),window.history.replaceState(null,``,window.location.pathname+window.location.search),e}let i=sessionStorage.getItem(s);if(i)return sessionStorage.removeItem(s),JSON.parse(i)}function l({children:e}){let s=n.useQueryClient(),[l,u]=a.default.useState(null),[d,f]=a.default.useState(!0),p=a.default.useMemo(()=>c(),[]);return a.default.useEffect(()=>{(async()=>{try{u((await s.fetchQuery({queryKey:t.QUERY_KEYS.WEB_CLIENT_CONFIG,queryFn:i.default.getConfig,meta:{disableToast:!0},...t.CONFIG_CACHE_OPTIONS})).posthog_client_key)}catch{}finally{f(!1)}})()},[s]),d||!l?e:(0,o.jsx)(r.PostHogProvider,{apiKey:l,options:{api_host:`https://us.i.posthog.com`,person_profiles:`identified_only`,bootstrap:p},children:e})}exports.PostHogWrapper=l;
2
- //# sourceMappingURL=posthog-wrapper.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"posthog-wrapper.cjs","names":[],"sources":["../../../src/components/providers/posthog-wrapper.tsx"],"sourcesContent":["import React from \"react\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { PostHogProvider } from \"posthog-js/react\";\nimport OptionService from \"#/api/option-service/option-service.api\";\nimport { QUERY_KEYS, CONFIG_CACHE_OPTIONS } from \"#/hooks/query/query-keys\";\n\nconst POSTHOG_BOOTSTRAP_KEY = \"posthog_bootstrap\";\n\nfunction getBootstrapIds() {\n // Try to extract from URL hash (e.g. #distinct_id=abc&session_id=xyz)\n const hash = window.location.hash.substring(1);\n const params = new URLSearchParams(hash);\n const distinctId = params.get(\"distinct_id\");\n const sessionId = params.get(\"session_id\");\n\n if (distinctId && sessionId) {\n const bootstrap = { distinctID: distinctId, sessionID: sessionId };\n\n // Persist to sessionStorage so IDs survive full-page OAuth redirects\n sessionStorage.setItem(POSTHOG_BOOTSTRAP_KEY, JSON.stringify(bootstrap));\n\n // Clean the hash from the URL\n window.history.replaceState(\n null,\n \"\",\n window.location.pathname + window.location.search,\n );\n return bootstrap;\n }\n\n // Fallback: check sessionStorage (covers return from OAuth redirect)\n const stored = sessionStorage.getItem(POSTHOG_BOOTSTRAP_KEY);\n if (stored) {\n sessionStorage.removeItem(POSTHOG_BOOTSTRAP_KEY);\n return JSON.parse(stored) as { distinctID: string; sessionID: string };\n }\n\n return undefined;\n}\n\nexport function PostHogWrapper({ children }: { children: React.ReactNode }) {\n const queryClient = useQueryClient();\n const [posthogClientKey, setPosthogClientKey] = React.useState<string | null>(\n null,\n );\n const [isLoading, setIsLoading] = React.useState(true);\n const bootstrapIds = React.useMemo(() => getBootstrapIds(), []);\n\n React.useEffect(() => {\n (async () => {\n try {\n // Use fetchQuery for automatic caching and deduplication\n const config = await queryClient.fetchQuery({\n queryKey: QUERY_KEYS.WEB_CLIENT_CONFIG,\n queryFn: OptionService.getConfig,\n meta: { disableToast: true },\n ...CONFIG_CACHE_OPTIONS,\n });\n setPosthogClientKey(config.posthog_client_key);\n } catch {\n // Analytics are optional; keep onboarding and recovery flows quiet.\n } finally {\n setIsLoading(false);\n }\n })();\n }, [queryClient]);\n\n if (isLoading || !posthogClientKey) {\n return children;\n }\n\n return (\n <PostHogProvider\n apiKey={posthogClientKey}\n options={{\n api_host: \"https://us.i.posthog.com\",\n person_profiles: \"identified_only\",\n bootstrap: bootstrapIds,\n }}\n >\n {children}\n </PostHogProvider>\n );\n}\n"],"mappings":"6YAMA,IAAM,EAAwB,oBAE9B,SAAS,GAAkB,CAEzB,IAAM,EAAO,OAAO,SAAS,KAAK,UAAU,EAAE,CACxC,EAAS,IAAI,gBAAgB,EAAK,CAClC,EAAa,EAAO,IAAI,cAAc,CACtC,EAAY,EAAO,IAAI,aAAa,CAE1C,GAAI,GAAc,EAAW,CAC3B,IAAM,EAAY,CAAE,WAAY,EAAY,UAAW,EAAW,CAWlE,OARA,eAAe,QAAQ,EAAuB,KAAK,UAAU,EAAU,CAAC,CAGxE,OAAO,QAAQ,aACb,KACA,GACA,OAAO,SAAS,SAAW,OAAO,SAAS,OAC5C,CACM,EAIT,IAAM,EAAS,eAAe,QAAQ,EAAsB,CAC5D,GAAI,EAEF,OADA,eAAe,WAAW,EAAsB,CACzC,KAAK,MAAM,EAAO,CAM7B,SAAgB,EAAe,CAAE,YAA2C,CAC1E,IAAM,EAAc,EAAA,gBAAgB,CAC9B,CAAC,EAAkB,GAAuB,EAAA,QAAM,SACpD,KACD,CACK,CAAC,EAAW,GAAgB,EAAA,QAAM,SAAS,GAAK,CAChD,EAAe,EAAA,QAAM,YAAc,GAAiB,CAAE,EAAE,CAAC,CAyB/D,OAvBA,EAAA,QAAM,cAAgB,EACnB,SAAY,CACX,GAAI,CAQF,GAAoB,MANC,EAAY,WAAW,CAC1C,SAAU,EAAA,WAAW,kBACrB,QAAS,EAAA,QAAc,UACvB,KAAM,CAAE,aAAc,GAAM,CAC5B,GAAG,EAAA,qBACJ,CAAC,EACyB,mBAAmB,MACxC,SAEE,CACR,EAAa,GAAM,KAEnB,EACH,CAAC,EAAY,CAAC,CAEb,GAAa,CAAC,EACT,GAIP,EAAA,EAAA,KAAC,EAAA,gBAAD,CACE,OAAQ,EACR,QAAS,CACP,SAAU,2BACV,gBAAiB,kBACjB,UAAW,EACZ,CAEA,WACe,CAAA"}
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- export declare function PostHogWrapper({ children }: {
3
- children: React.ReactNode;
4
- }): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
@@ -1,49 +0,0 @@
1
- import { CONFIG_CACHE_OPTIONS as e, QUERY_KEYS as t } from "../../hooks/query/query-keys.js";
2
- import { useQueryClient as n } from "../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js";
3
- import { PostHogProvider as r } from "../../node_modules/posthog-js/react/dist/esm/index.js";
4
- import i from "../../api/option-service/option-service.api.js";
5
- import a from "react";
6
- import { jsx as o } from "react/jsx-runtime";
7
- //#region src/components/providers/posthog-wrapper.tsx
8
- var s = "posthog_bootstrap";
9
- function c() {
10
- let e = window.location.hash.substring(1), t = new URLSearchParams(e), n = t.get("distinct_id"), r = t.get("session_id");
11
- if (n && r) {
12
- let e = {
13
- distinctID: n,
14
- sessionID: r
15
- };
16
- return sessionStorage.setItem(s, JSON.stringify(e)), window.history.replaceState(null, "", window.location.pathname + window.location.search), e;
17
- }
18
- let i = sessionStorage.getItem(s);
19
- if (i) return sessionStorage.removeItem(s), JSON.parse(i);
20
- }
21
- function l({ children: s }) {
22
- let l = n(), [u, d] = a.useState(null), [f, p] = a.useState(!0), m = a.useMemo(() => c(), []);
23
- return a.useEffect(() => {
24
- (async () => {
25
- try {
26
- d((await l.fetchQuery({
27
- queryKey: t.WEB_CLIENT_CONFIG,
28
- queryFn: i.getConfig,
29
- meta: { disableToast: !0 },
30
- ...e
31
- })).posthog_client_key);
32
- } catch {} finally {
33
- p(!1);
34
- }
35
- })();
36
- }, [l]), f || !u ? s : /* @__PURE__ */ o(r, {
37
- apiKey: u,
38
- options: {
39
- api_host: "https://us.i.posthog.com",
40
- person_profiles: "identified_only",
41
- bootstrap: m
42
- },
43
- children: s
44
- });
45
- }
46
- //#endregion
47
- export { l as PostHogWrapper };
48
-
49
- //# sourceMappingURL=posthog-wrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"posthog-wrapper.js","names":[],"sources":["../../../src/components/providers/posthog-wrapper.tsx"],"sourcesContent":["import React from \"react\";\nimport { useQueryClient } from \"@tanstack/react-query\";\nimport { PostHogProvider } from \"posthog-js/react\";\nimport OptionService from \"#/api/option-service/option-service.api\";\nimport { QUERY_KEYS, CONFIG_CACHE_OPTIONS } from \"#/hooks/query/query-keys\";\n\nconst POSTHOG_BOOTSTRAP_KEY = \"posthog_bootstrap\";\n\nfunction getBootstrapIds() {\n // Try to extract from URL hash (e.g. #distinct_id=abc&session_id=xyz)\n const hash = window.location.hash.substring(1);\n const params = new URLSearchParams(hash);\n const distinctId = params.get(\"distinct_id\");\n const sessionId = params.get(\"session_id\");\n\n if (distinctId && sessionId) {\n const bootstrap = { distinctID: distinctId, sessionID: sessionId };\n\n // Persist to sessionStorage so IDs survive full-page OAuth redirects\n sessionStorage.setItem(POSTHOG_BOOTSTRAP_KEY, JSON.stringify(bootstrap));\n\n // Clean the hash from the URL\n window.history.replaceState(\n null,\n \"\",\n window.location.pathname + window.location.search,\n );\n return bootstrap;\n }\n\n // Fallback: check sessionStorage (covers return from OAuth redirect)\n const stored = sessionStorage.getItem(POSTHOG_BOOTSTRAP_KEY);\n if (stored) {\n sessionStorage.removeItem(POSTHOG_BOOTSTRAP_KEY);\n return JSON.parse(stored) as { distinctID: string; sessionID: string };\n }\n\n return undefined;\n}\n\nexport function PostHogWrapper({ children }: { children: React.ReactNode }) {\n const queryClient = useQueryClient();\n const [posthogClientKey, setPosthogClientKey] = React.useState<string | null>(\n null,\n );\n const [isLoading, setIsLoading] = React.useState(true);\n const bootstrapIds = React.useMemo(() => getBootstrapIds(), []);\n\n React.useEffect(() => {\n (async () => {\n try {\n // Use fetchQuery for automatic caching and deduplication\n const config = await queryClient.fetchQuery({\n queryKey: QUERY_KEYS.WEB_CLIENT_CONFIG,\n queryFn: OptionService.getConfig,\n meta: { disableToast: true },\n ...CONFIG_CACHE_OPTIONS,\n });\n setPosthogClientKey(config.posthog_client_key);\n } catch {\n // Analytics are optional; keep onboarding and recovery flows quiet.\n } finally {\n setIsLoading(false);\n }\n })();\n }, [queryClient]);\n\n if (isLoading || !posthogClientKey) {\n return children;\n }\n\n return (\n <PostHogProvider\n apiKey={posthogClientKey}\n options={{\n api_host: \"https://us.i.posthog.com\",\n person_profiles: \"identified_only\",\n bootstrap: bootstrapIds,\n }}\n >\n {children}\n </PostHogProvider>\n );\n}\n"],"mappings":";;;;;;;AAMA,IAAM,IAAwB;AAE9B,SAAS,IAAkB;CAEzB,IAAM,IAAO,OAAO,SAAS,KAAK,UAAU,EAAE,EACxC,IAAS,IAAI,gBAAgB,EAAK,EAClC,IAAa,EAAO,IAAI,cAAc,EACtC,IAAY,EAAO,IAAI,aAAa;AAE1C,KAAI,KAAc,GAAW;EAC3B,IAAM,IAAY;GAAE,YAAY;GAAY,WAAW;GAAW;AAWlE,SARA,eAAe,QAAQ,GAAuB,KAAK,UAAU,EAAU,CAAC,EAGxE,OAAO,QAAQ,aACb,MACA,IACA,OAAO,SAAS,WAAW,OAAO,SAAS,OAC5C,EACM;;CAIT,IAAM,IAAS,eAAe,QAAQ,EAAsB;AAC5D,KAAI,EAEF,QADA,eAAe,WAAW,EAAsB,EACzC,KAAK,MAAM,EAAO;;AAM7B,SAAgB,EAAe,EAAE,eAA2C;CAC1E,IAAM,IAAc,GAAgB,EAC9B,CAAC,GAAkB,KAAuB,EAAM,SACpD,KACD,EACK,CAAC,GAAW,KAAgB,EAAM,SAAS,GAAK,EAChD,IAAe,EAAM,cAAc,GAAiB,EAAE,EAAE,CAAC;AAyB/D,QAvBA,EAAM,gBAAgB;AACpB,GAAC,YAAY;AACX,OAAI;AAQF,OAAoB,MANC,EAAY,WAAW;KAC1C,UAAU,EAAW;KACrB,SAAS,EAAc;KACvB,MAAM,EAAE,cAAc,IAAM;KAC5B,GAAG;KACJ,CAAC,EACyB,mBAAmB;WACxC,WAEE;AACR,MAAa,GAAM;;MAEnB;IACH,CAAC,EAAY,CAAC,EAEb,KAAa,CAAC,IACT,IAIP,kBAAC,GAAD;EACE,QAAQ;EACR,SAAS;GACP,UAAU;GACV,iBAAiB;GACjB,WAAW;GACZ;EAEA;EACe,CAAA"}
@@ -1,2 +0,0 @@
1
- const e=require(`../../../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../dist/module.cjs`);let n=require(`react`);n=e.__toESM(n);var r;function i(e){r=e}function a(){return r}var o=(0,n.createContext)({get client(){return a()},bootstrap:void 0});function s(e,t,n){if(n===void 0&&(n=new WeakMap),e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(n.has(e)&&n.get(e)===t)return!0;n.set(e,t);var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0,o=r;a<o.length;a++){var c=o[a];if(!i.includes(c)||!s(e[c],t[c],n))return!1}return!0}function c(e){var t=e.children,r=e.client,i=e.apiKey,c=e.options,l=(0,n.useRef)(null),u=(0,n.useMemo)(function(){if(r)return i&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),c&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),r;var e=a();return i||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),e},[r,i,JSON.stringify(c)]);return(0,n.useEffect)(function(){if(!r){var e=a(),t=l.current;t?(i!==t.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),c&&!s(c,t.options)&&e.set_config(c),l.current={apiKey:i,options:c??{}}):(e.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),e.init(i,c),l.current={apiKey:i,options:c??{}})}},[r,i,JSON.stringify(c)]),n.default.createElement(o.Provider,{value:{client:u,bootstrap:c?.bootstrap??r?.config?.bootstrap}},t)}var l=function(e){return typeof e==`function`},u=function(){return(0,n.useContext)(o).client},d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},d(e,t)};function f(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);d(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var p={componentStack:null,exceptionEvent:null,error:null},m={INVALID_FALLBACK:`[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element.`};(function(e){f(t,e);function t(t){var n=e.call(this,t)||this;return n.state=p,n}return t.prototype.componentDidCatch=function(e,t){var n=this.props.additionalProperties,r;l(n)?r=n(e):typeof n==`object`&&(r=n);var i=this.context.client.captureException(e,r),a=t.componentStack;this.setState({error:e,componentStack:a??null,exceptionEvent:i})},t.prototype.render=function(){var e=this.props,t=e.children,r=e.fallback,i=this.state;if(i.componentStack==null)return l(t)?t():t;var a=l(r)?n.default.createElement(r,{error:i.error,componentStack:i.componentStack,exceptionEvent:i.exceptionEvent}):r;return n.default.isValidElement(a)?a:(console.warn(m.INVALID_FALLBACK),n.default.createElement(n.default.Fragment,null))},t.contextType=o,t})(n.default.Component),i(t.default),exports.PostHogProvider=c,exports.usePostHog=u;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","names":["React","posthogJs"],"sources":["../../../../../../node_modules/posthog-js/react/dist/esm/index.js"],"sourcesContent":["import posthogJs from 'posthog-js';\nimport React, { createContext, useRef, useMemo, useEffect, useContext, useState, useCallback, Children } from 'react';\n\nvar defaultPostHogInstance;\nfunction setDefaultPostHogInstance(instance) {\n defaultPostHogInstance = instance;\n}\nfunction getDefaultPostHogInstance() {\n return defaultPostHogInstance;\n}\n\nvar PostHogContext = createContext({\n get client() {\n return getDefaultPostHogInstance();\n },\n bootstrap: undefined,\n});\n\nfunction isDeepEqual(obj1, obj2, visited) {\n if (visited === void 0) { visited = new WeakMap(); }\n if (obj1 === obj2) {\n return true;\n }\n if (typeof obj1 !== 'object' || obj1 === null || typeof obj2 !== 'object' || obj2 === null) {\n return false;\n }\n if (visited.has(obj1) && visited.get(obj1) === obj2) {\n return true;\n }\n visited.set(obj1, obj2);\n var keys1 = Object.keys(obj1);\n var keys2 = Object.keys(obj2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (var _i = 0, keys1_1 = keys1; _i < keys1_1.length; _i++) {\n var key = keys1_1[_i];\n if (!keys2.includes(key)) {\n return false;\n }\n if (!isDeepEqual(obj1[key], obj2[key], visited)) {\n return false;\n }\n }\n return true;\n}\n\nfunction PostHogProvider(_a) {\n var _b, _c;\n var children = _a.children, client = _a.client, apiKey = _a.apiKey, options = _a.options;\n var previousInitializationRef = useRef(null);\n var posthog = useMemo(function () {\n if (client) {\n if (apiKey) {\n console.warn('[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`.');\n }\n if (options) {\n console.warn('[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`.');\n }\n return client;\n }\n var defaultInstance = getDefaultPostHogInstance();\n if (apiKey) {\n return defaultInstance;\n }\n console.warn('[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior.');\n return defaultInstance;\n }, [client, apiKey, JSON.stringify(options)]);\n useEffect(function () {\n if (client) {\n return;\n }\n var defaultInstance = getDefaultPostHogInstance();\n var previousInitialization = previousInitializationRef.current;\n if (!previousInitialization) {\n if (defaultInstance.__loaded) {\n console.warn('[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues.');\n }\n defaultInstance.init(apiKey, options);\n previousInitializationRef.current = {\n apiKey: apiKey,\n options: options !== null && options !== void 0 ? options : {},\n };\n }\n else {\n if (apiKey !== previousInitialization.apiKey) {\n console.warn(\"[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop.\");\n }\n if (options && !isDeepEqual(options, previousInitialization.options)) {\n defaultInstance.set_config(options);\n }\n previousInitializationRef.current = {\n apiKey: apiKey,\n options: options !== null && options !== void 0 ? options : {},\n };\n }\n }, [client, apiKey, JSON.stringify(options)]);\n return (React.createElement(PostHogContext.Provider, { value: { client: posthog, bootstrap: (_b = options === null || options === void 0 ? void 0 : options.bootstrap) !== null && _b !== void 0 ? _b : (_c = client === null || client === void 0 ? void 0 : client.config) === null || _c === void 0 ? void 0 : _c.bootstrap } }, children));\n}\n\nvar isFunction = function (f) {\n return typeof f === 'function';\n};\nvar isUndefined = function (x) {\n return x === void 0;\n};\nvar isNull = function (x) {\n return x === null;\n};\n\nfunction useFeatureFlagEnabled(flag) {\n var _a, _b;\n var _c = useContext(PostHogContext), client = _c.client, bootstrap = _c.bootstrap;\n var _d = useState(function () { return client.isFeatureEnabled(flag); }), featureEnabled = _d[0], setFeatureEnabled = _d[1];\n useEffect(function () {\n return client.onFeatureFlags(function () {\n setFeatureEnabled(client.isFeatureEnabled(flag));\n });\n }, [client, flag]);\n var bootstrapped = (_a = bootstrap === null || bootstrap === void 0 ? void 0 : bootstrap.featureFlags) === null || _a === void 0 ? void 0 : _a[flag];\n if (!((_b = client === null || client === void 0 ? void 0 : client.featureFlags) === null || _b === void 0 ? void 0 : _b.hasLoadedFlags) && (bootstrap === null || bootstrap === void 0 ? void 0 : bootstrap.featureFlags)) {\n return isUndefined(bootstrapped) ? undefined : !!bootstrapped;\n }\n return featureEnabled;\n}\n\nfunction useFeatureFlagPayload(flag) {\n var _a;\n var _b = useContext(PostHogContext), client = _b.client, bootstrap = _b.bootstrap;\n var _c = useState(function () { var _a; return (_a = client.getFeatureFlagResult(flag, { send_event: false })) === null || _a === void 0 ? void 0 : _a.payload; }), featureFlagPayload = _c[0], setFeatureFlagPayload = _c[1];\n useEffect(function () {\n return client.onFeatureFlags(function () {\n var _a;\n setFeatureFlagPayload((_a = client.getFeatureFlagResult(flag, { send_event: false })) === null || _a === void 0 ? void 0 : _a.payload);\n });\n }, [client, flag]);\n if (!((_a = client === null || client === void 0 ? void 0 : client.featureFlags) === null || _a === void 0 ? void 0 : _a.hasLoadedFlags) && (bootstrap === null || bootstrap === void 0 ? void 0 : bootstrap.featureFlagPayloads)) {\n return bootstrap.featureFlagPayloads[flag];\n }\n return featureFlagPayload;\n}\n\nfunction useFeatureFlagResult(flag) {\n var _a, _b;\n var _c = useContext(PostHogContext), client = _c.client, bootstrap = _c.bootstrap;\n var _d = useState(function () { return client.getFeatureFlagResult(flag); }), result = _d[0], setResult = _d[1];\n useEffect(function () {\n return client.onFeatureFlags(function () {\n setResult(client.getFeatureFlagResult(flag));\n });\n }, [client, flag]);\n if (!((_a = client === null || client === void 0 ? void 0 : client.featureFlags) === null || _a === void 0 ? void 0 : _a.hasLoadedFlags) && (bootstrap === null || bootstrap === void 0 ? void 0 : bootstrap.featureFlags)) {\n var bootstrappedValue = bootstrap.featureFlags[flag];\n if (isUndefined(bootstrappedValue)) {\n return undefined;\n }\n return {\n key: flag,\n enabled: typeof bootstrappedValue === 'string' ? true : !!bootstrappedValue,\n variant: typeof bootstrappedValue === 'string' ? bootstrappedValue : undefined,\n payload: (_b = bootstrap.featureFlagPayloads) === null || _b === void 0 ? void 0 : _b[flag],\n };\n }\n return result;\n}\n\nfunction useActiveFeatureFlags() {\n var _a;\n var _b = useContext(PostHogContext), client = _b.client, bootstrap = _b.bootstrap;\n var _c = useState(function () { return client.featureFlags.getFlags(); }), featureFlags = _c[0], setFeatureFlags = _c[1];\n useEffect(function () {\n return client.onFeatureFlags(function (flags) {\n setFeatureFlags(flags);\n });\n }, [client]);\n if (!((_a = client === null || client === void 0 ? void 0 : client.featureFlags) === null || _a === void 0 ? void 0 : _a.hasLoadedFlags) && (bootstrap === null || bootstrap === void 0 ? void 0 : bootstrap.featureFlags)) {\n return Object.keys(bootstrap.featureFlags);\n }\n return featureFlags;\n}\n\nfunction useFeatureFlagVariantKey(flag) {\n var _a;\n var _b = useContext(PostHogContext), client = _b.client, bootstrap = _b.bootstrap;\n var _c = useState(function () {\n return client.getFeatureFlag(flag);\n }), featureFlagVariantKey = _c[0], setFeatureFlagVariantKey = _c[1];\n useEffect(function () {\n return client.onFeatureFlags(function () {\n setFeatureFlagVariantKey(client.getFeatureFlag(flag));\n });\n }, [client, flag]);\n if (!((_a = client === null || client === void 0 ? void 0 : client.featureFlags) === null || _a === void 0 ? void 0 : _a.hasLoadedFlags) && (bootstrap === null || bootstrap === void 0 ? void 0 : bootstrap.featureFlags)) {\n return bootstrap.featureFlags[flag];\n }\n return featureFlagVariantKey;\n}\n\nvar usePostHog = function () {\n var client = useContext(PostHogContext).client;\n return client;\n};\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nfunction VisibilityAndClickTracker(_a) {\n var children = _a.children, onIntersect = _a.onIntersect, onClick = _a.onClick, trackView = _a.trackView, options = _a.options, props = __rest(_a, [\"children\", \"onIntersect\", \"onClick\", \"trackView\", \"options\"]);\n var ref = useRef(null);\n var observerOptions = useMemo(function () { return (__assign({ threshold: 0.1 }, options)); }, [options === null || options === void 0 ? void 0 : options.threshold, options === null || options === void 0 ? void 0 : options.root, options === null || options === void 0 ? void 0 : options.rootMargin]);\n useEffect(function () {\n if (isNull(ref.current) || !trackView)\n return;\n var observer = new IntersectionObserver(function (_a) {\n var entry = _a[0];\n return onIntersect(entry);\n }, observerOptions);\n observer.observe(ref.current);\n return function () { return observer.disconnect(); };\n }, [observerOptions, trackView, onIntersect]);\n return (React.createElement(\"div\", __assign({ ref: ref }, props, { onClick: onClick }), children));\n}\n\nfunction VisibilityAndClickTrackers(_a) {\n var children = _a.children, trackInteraction = _a.trackInteraction, trackView = _a.trackView, options = _a.options, onInteract = _a.onInteract, onView = _a.onView, props = __rest(_a, [\"children\", \"trackInteraction\", \"trackView\", \"options\", \"onInteract\", \"onView\"]);\n var clickTrackedRef = useRef(false);\n var visibilityTrackedRef = useRef(false);\n var cachedOnClick = useCallback(function () {\n if (!clickTrackedRef.current && trackInteraction && onInteract) {\n onInteract();\n clickTrackedRef.current = true;\n }\n }, [trackInteraction, onInteract]);\n var onIntersect = function (entry) {\n if (!visibilityTrackedRef.current && entry.isIntersecting && onView) {\n onView();\n visibilityTrackedRef.current = true;\n }\n };\n var trackedChildren = Children.map(children, function (child) {\n return (React.createElement(VisibilityAndClickTracker, __assign({ onClick: cachedOnClick, onIntersect: onIntersect, trackView: trackView, options: options }, props), child));\n });\n return React.createElement(React.Fragment, null, trackedChildren);\n}\n\nfunction PostHogFeature(_a) {\n var flag = _a.flag, match = _a.match, children = _a.children, fallback = _a.fallback, visibilityObserverOptions = _a.visibilityObserverOptions, trackInteraction = _a.trackInteraction, trackView = _a.trackView, props = __rest(_a, [\"flag\", \"match\", \"children\", \"fallback\", \"visibilityObserverOptions\", \"trackInteraction\", \"trackView\"]);\n var payload = useFeatureFlagPayload(flag);\n var variant = useFeatureFlagVariantKey(flag);\n var posthog = usePostHog();\n var shouldTrackInteraction = trackInteraction !== null && trackInteraction !== void 0 ? trackInteraction : true;\n var shouldTrackView = trackView !== null && trackView !== void 0 ? trackView : true;\n if (!isUndefined(variant)) {\n if (isUndefined(match) || variant === match) {\n var childNode = isFunction(children) ? children(payload) : children;\n return (React.createElement(VisibilityAndClickTrackers, __assign({ flag: flag, options: visibilityObserverOptions, trackInteraction: shouldTrackInteraction, trackView: shouldTrackView, onInteract: function () { return captureFeatureInteraction({ flag: flag, posthog: posthog, flagVariant: variant }); }, onView: function () { return captureFeatureView({ flag: flag, posthog: posthog, flagVariant: variant }); } }, props), childNode));\n }\n }\n return React.createElement(React.Fragment, null, fallback);\n}\nfunction captureFeatureInteraction(_a) {\n var _b;\n var flag = _a.flag, posthog = _a.posthog, flagVariant = _a.flagVariant;\n var properties = {\n feature_flag: flag,\n $set: (_b = {}, _b[\"$feature_interaction/\".concat(flag)] = flagVariant !== null && flagVariant !== void 0 ? flagVariant : true, _b),\n };\n if (typeof flagVariant === 'string') {\n properties.feature_flag_variant = flagVariant;\n }\n posthog.capture('$feature_interaction', properties);\n}\nfunction captureFeatureView(_a) {\n var _b;\n var flag = _a.flag, posthog = _a.posthog, flagVariant = _a.flagVariant;\n var properties = {\n feature_flag: flag,\n $set: (_b = {}, _b[\"$feature_view/\".concat(flag)] = flagVariant !== null && flagVariant !== void 0 ? flagVariant : true, _b),\n };\n if (typeof flagVariant === 'string') {\n properties.feature_flag_variant = flagVariant;\n }\n posthog.capture('$feature_view', properties);\n}\n\nfunction TrackedChild(_a) {\n var child = _a.child, index = _a.index, name = _a.name, properties = _a.properties, observerOptions = _a.observerOptions;\n var trackedRef = useRef(false);\n var posthog = usePostHog();\n var onIntersect = useCallback(function (entry) {\n if (entry.isIntersecting && !trackedRef.current) {\n posthog.capture('$element_viewed', __assign({ element_name: name, child_index: index }, properties));\n trackedRef.current = true;\n }\n }, [posthog, name, index, properties]);\n return (React.createElement(VisibilityAndClickTracker, { onIntersect: onIntersect, trackView: true, options: observerOptions }, child));\n}\nfunction PostHogCaptureOnViewed(_a) {\n var name = _a.name, properties = _a.properties, observerOptions = _a.observerOptions, trackAllChildren = _a.trackAllChildren, children = _a.children, props = __rest(_a, [\"name\", \"properties\", \"observerOptions\", \"trackAllChildren\", \"children\"]);\n var trackedRef = useRef(false);\n var posthog = usePostHog();\n var onIntersect = useCallback(function (entry) {\n if (entry.isIntersecting && !trackedRef.current) {\n posthog.capture('$element_viewed', __assign({ element_name: name }, properties));\n trackedRef.current = true;\n }\n }, [posthog, name, properties]);\n if (trackAllChildren) {\n var trackedChildren = Children.map(children, function (child, index) {\n return (React.createElement(TrackedChild, { key: index, child: child, index: index, name: name, properties: properties, observerOptions: observerOptions }));\n });\n return React.createElement(\"div\", __assign({}, props), trackedChildren);\n }\n return (React.createElement(VisibilityAndClickTracker, __assign({ onIntersect: onIntersect, trackView: true, options: observerOptions }, props), children));\n}\n\nvar INITIAL_STATE = {\n componentStack: null,\n exceptionEvent: null,\n error: null,\n};\nvar __POSTHOG_ERROR_MESSAGES = {\n INVALID_FALLBACK: '[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element.',\n};\nvar PostHogErrorBoundary = (function (_super) {\n __extends(PostHogErrorBoundary, _super);\n function PostHogErrorBoundary(props) {\n var _this = _super.call(this, props) || this;\n _this.state = INITIAL_STATE;\n return _this;\n }\n PostHogErrorBoundary.prototype.componentDidCatch = function (error, errorInfo) {\n var additionalProperties = this.props.additionalProperties;\n var currentProperties;\n if (isFunction(additionalProperties)) {\n currentProperties = additionalProperties(error);\n }\n else if (typeof additionalProperties === 'object') {\n currentProperties = additionalProperties;\n }\n var client = this.context.client;\n var exceptionEvent = client.captureException(error, currentProperties);\n var componentStack = errorInfo.componentStack;\n this.setState({\n error: error,\n componentStack: componentStack !== null && componentStack !== void 0 ? componentStack : null,\n exceptionEvent: exceptionEvent,\n });\n };\n PostHogErrorBoundary.prototype.render = function () {\n var _a = this.props, children = _a.children, fallback = _a.fallback;\n var state = this.state;\n if (state.componentStack == null) {\n return isFunction(children) ? children() : children;\n }\n var element = isFunction(fallback)\n ? React.createElement(fallback, {\n error: state.error,\n componentStack: state.componentStack,\n exceptionEvent: state.exceptionEvent,\n })\n : fallback;\n if (React.isValidElement(element)) {\n return element;\n }\n console.warn(__POSTHOG_ERROR_MESSAGES.INVALID_FALLBACK);\n return React.createElement(React.Fragment, null);\n };\n PostHogErrorBoundary.contextType = PostHogContext;\n return PostHogErrorBoundary;\n}(React.Component));\n\nvar setupReactErrorHandler = function (client, callback) {\n return function (error, errorInfo) {\n var event = client.captureException(error);\n if (callback) {\n callback(event, error, errorInfo);\n }\n };\n};\n\nsetDefaultPostHogInstance(posthogJs);\n\nexport { PostHogCaptureOnViewed, PostHogContext, PostHogErrorBoundary, PostHogFeature, PostHogProvider, captureFeatureInteraction, captureFeatureView, setupReactErrorHandler, useActiveFeatureFlags, useFeatureFlagEnabled, useFeatureFlagPayload, useFeatureFlagResult, useFeatureFlagVariantKey, usePostHog };\n//# sourceMappingURL=index.js.map\n"],"x_google_ignoreList":[0],"mappings":"6IAGA,IAAI,EACJ,SAAS,EAA0B,EAAU,CACzC,EAAyB,EAE7B,SAAS,GAA4B,CACjC,OAAO,EAGX,IAAI,GAAA,EAAA,EAAA,eAA+B,CAC/B,IAAI,QAAS,CACT,OAAO,GAA2B,EAEtC,UAAW,IAAA,GACd,CAAC,CAEF,SAAS,EAAY,EAAM,EAAM,EAAS,CAEtC,GADI,IAAY,IAAK,KAAK,EAAU,IAAI,SACpC,IAAS,EACT,MAAO,GAEX,GAAI,OAAO,GAAS,WAAY,GAAiB,OAAO,GAAS,WAAY,EACzE,MAAO,GAEX,GAAI,EAAQ,IAAI,EAAK,EAAI,EAAQ,IAAI,EAAK,GAAK,EAC3C,MAAO,GAEX,EAAQ,IAAI,EAAM,EAAK,CACvB,IAAI,EAAQ,OAAO,KAAK,EAAK,CACzB,EAAQ,OAAO,KAAK,EAAK,CAC7B,GAAI,EAAM,SAAW,EAAM,OACvB,MAAO,GAEX,IAAK,IAAI,EAAK,EAAG,EAAU,EAAO,EAAK,EAAQ,OAAQ,IAAM,CACzD,IAAI,EAAM,EAAQ,GAIlB,GAHI,CAAC,EAAM,SAAS,EAAI,EAGpB,CAAC,EAAY,EAAK,GAAM,EAAK,GAAM,EAAQ,CAC3C,MAAO,GAGf,MAAO,GAGX,SAAS,EAAgB,EAAI,CACzB,IACI,EAAW,EAAG,SAAU,EAAS,EAAG,OAAQ,EAAS,EAAG,OAAQ,EAAU,EAAG,QAC7E,GAAA,EAAA,EAAA,QAAmC,KAAK,CACxC,GAAA,EAAA,EAAA,SAAkB,UAAY,CAC9B,GAAI,EAOA,OANI,GACA,QAAQ,KAAK,kIAAkI,CAE/I,GACA,QAAQ,KAAK,oIAAoI,CAE9I,EAEX,IAAI,EAAkB,GAA2B,CAKjD,OAJI,GAGJ,QAAQ,KAAK,8LAA8L,CAFhM,GAIZ,CAAC,EAAQ,EAAQ,KAAK,UAAU,EAAQ,CAAC,CAAC,CA8B7C,OA7BA,EAAA,EAAA,WAAU,UAAY,CACd,MAGJ,KAAI,EAAkB,GAA2B,CAC7C,EAAyB,EAA0B,QAClD,GAWG,IAAW,EAAuB,QAClC,QAAQ,KAAK,2UAA2U,CAExV,GAAW,CAAC,EAAY,EAAS,EAAuB,QAAQ,EAChE,EAAgB,WAAW,EAAQ,CAEvC,EAA0B,QAAU,CACxB,SACR,QAAS,GAAmD,EAAE,CACjE,GAnBG,EAAgB,UAChB,QAAQ,KAAK,8EAA8E,CAE/F,EAAgB,KAAK,EAAQ,EAAQ,CACrC,EAA0B,QAAU,CACxB,SACR,QAAS,GAAmD,EAAE,CACjE,IAcN,CAAC,EAAQ,EAAQ,KAAK,UAAU,EAAQ,CAAC,CAAC,CACrCA,EAAAA,QAAM,cAAc,EAAe,SAAU,CAAE,MAAO,CAAE,OAAQ,EAAS,UAAiB,GAA0D,WAAkD,GAAuD,QAAgD,UAAW,CAAE,CAAE,EAAS,CAGjV,IAAI,EAAa,SAAU,EAAG,CAC1B,OAAO,OAAO,GAAM,YAiGpB,EAAa,UAAY,CAEzB,OAAA,EAAA,EAAA,YADwB,EAAe,CAAC,QAoBxC,EAAgB,SAAS,EAAG,EAAG,CAI/B,MAHA,GAAgB,OAAO,gBAClB,CAAE,UAAW,EAAE,CAAE,WAAY,OAAS,SAAU,EAAG,EAAG,CAAE,EAAE,UAAY,IACvE,SAAU,EAAG,EAAG,CAAE,IAAK,IAAI,KAAK,EAAO,OAAO,UAAU,eAAe,KAAK,EAAG,EAAE,GAAE,EAAE,GAAK,EAAE,KACzF,EAAc,EAAG,EAAE,EAG9B,SAAS,EAAU,EAAG,EAAG,CACrB,GAAI,OAAO,GAAM,YAAc,IAAM,KACjC,MAAU,UAAU,uBAAyB,OAAO,EAAE,CAAG,gCAAgC,CAC7F,EAAc,EAAG,EAAE,CACnB,SAAS,GAAK,CAAE,KAAK,YAAc,EACnC,EAAE,UAAY,IAAM,KAAO,OAAO,OAAO,EAAE,EAAI,EAAG,UAAY,EAAE,UAAW,IAAI,GA6InF,IAAI,EAAgB,CAChB,eAAgB,KAChB,eAAgB,KAChB,MAAO,KACV,CACG,EAA2B,CAC3B,iBAAkB,4IACrB,EAC2B,SAAU,EAAQ,CAC1C,EAAU,EAAsB,EAAO,CACvC,SAAS,EAAqB,EAAO,CACjC,IAAI,EAAQ,EAAO,KAAK,KAAM,EAAM,EAAI,KAExC,MADA,GAAM,MAAQ,EACP,EAwCX,MAtCA,GAAqB,UAAU,kBAAoB,SAAU,EAAO,EAAW,CAC3E,IAAI,EAAuB,KAAK,MAAM,qBAClC,EACA,EAAW,EAAqB,CAChC,EAAoB,EAAqB,EAAM,CAE1C,OAAO,GAAyB,WACrC,EAAoB,GAGxB,IAAI,EADS,KAAK,QAAQ,OACE,iBAAiB,EAAO,EAAkB,CAClE,EAAiB,EAAU,eAC/B,KAAK,SAAS,CACH,QACP,eAAgB,GAAwE,KACxE,iBACnB,CAAC,EAEN,EAAqB,UAAU,OAAS,UAAY,CAChD,IAAI,EAAK,KAAK,MAAO,EAAW,EAAG,SAAU,EAAW,EAAG,SACvD,EAAQ,KAAK,MACjB,GAAI,EAAM,gBAAkB,KACxB,OAAO,EAAW,EAAS,CAAG,GAAU,CAAG,EAE/C,IAAI,EAAU,EAAW,EAAS,CAC5BA,EAAAA,QAAM,cAAc,EAAU,CAC5B,MAAO,EAAM,MACb,eAAgB,EAAM,eACtB,eAAgB,EAAM,eACzB,CAAC,CACA,EAKN,OAJIA,EAAAA,QAAM,eAAe,EAAQ,CACtB,GAEX,QAAQ,KAAK,EAAyB,iBAAiB,CAChDA,EAAAA,QAAM,cAAcA,EAAAA,QAAM,SAAU,KAAK,GAEpD,EAAqB,YAAc,EAC5B,IACTA,EAAAA,QAAM,UAAU,CAWlB,EAA0BC,EAAAA,QAAU"}
@@ -1,113 +0,0 @@
1
- import e from "../../../dist/module.js";
2
- import t, { createContext as n, useContext as r, useEffect as i, useMemo as a, useRef as o } from "react";
3
- //#region node_modules/posthog-js/react/dist/esm/index.js
4
- var s;
5
- function c(e) {
6
- s = e;
7
- }
8
- function l() {
9
- return s;
10
- }
11
- var u = n({
12
- get client() {
13
- return l();
14
- },
15
- bootstrap: void 0
16
- });
17
- function d(e, t, n) {
18
- if (n === void 0 && (n = /* @__PURE__ */ new WeakMap()), e === t) return !0;
19
- if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
20
- if (n.has(e) && n.get(e) === t) return !0;
21
- n.set(e, t);
22
- var r = Object.keys(e), i = Object.keys(t);
23
- if (r.length !== i.length) return !1;
24
- for (var a = 0, o = r; a < o.length; a++) {
25
- var s = o[a];
26
- if (!i.includes(s) || !d(e[s], t[s], n)) return !1;
27
- }
28
- return !0;
29
- }
30
- function f(e) {
31
- var n = e.children, r = e.client, s = e.apiKey, c = e.options, f = o(null), p = a(function() {
32
- if (r) return s && console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."), c && console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."), r;
33
- var e = l();
34
- return s || console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."), e;
35
- }, [
36
- r,
37
- s,
38
- JSON.stringify(c)
39
- ]);
40
- return i(function() {
41
- if (!r) {
42
- var e = l(), t = f.current;
43
- t ? (s !== t.apiKey && console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."), c && !d(c, t.options) && e.set_config(c), f.current = {
44
- apiKey: s,
45
- options: c ?? {}
46
- }) : (e.__loaded && console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."), e.init(s, c), f.current = {
47
- apiKey: s,
48
- options: c ?? {}
49
- });
50
- }
51
- }, [
52
- r,
53
- s,
54
- JSON.stringify(c)
55
- ]), t.createElement(u.Provider, { value: {
56
- client: p,
57
- bootstrap: c?.bootstrap ?? r?.config?.bootstrap
58
- } }, n);
59
- }
60
- var p = function(e) {
61
- return typeof e == "function";
62
- }, m = function() {
63
- return r(u).client;
64
- }, h = function(e, t) {
65
- return h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
66
- e.__proto__ = t;
67
- } || function(e, t) {
68
- for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
69
- }, h(e, t);
70
- };
71
- function g(e, t) {
72
- if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
73
- h(e, t);
74
- function n() {
75
- this.constructor = e;
76
- }
77
- e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
78
- }
79
- var _ = {
80
- componentStack: null,
81
- exceptionEvent: null,
82
- error: null
83
- }, v = { INVALID_FALLBACK: "[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element." };
84
- (function(e) {
85
- g(n, e);
86
- function n(t) {
87
- var n = e.call(this, t) || this;
88
- return n.state = _, n;
89
- }
90
- return n.prototype.componentDidCatch = function(e, t) {
91
- var n = this.props.additionalProperties, r;
92
- p(n) ? r = n(e) : typeof n == "object" && (r = n);
93
- var i = this.context.client.captureException(e, r), a = t.componentStack;
94
- this.setState({
95
- error: e,
96
- componentStack: a ?? null,
97
- exceptionEvent: i
98
- });
99
- }, n.prototype.render = function() {
100
- var e = this.props, n = e.children, r = e.fallback, i = this.state;
101
- if (i.componentStack == null) return p(n) ? n() : n;
102
- var a = p(r) ? t.createElement(r, {
103
- error: i.error,
104
- componentStack: i.componentStack,
105
- exceptionEvent: i.exceptionEvent
106
- }) : r;
107
- return t.isValidElement(a) ? a : (console.warn(v.INVALID_FALLBACK), t.createElement(t.Fragment, null));
108
- }, n.contextType = u, n;
109
- })(t.Component), c(e);
110
- //#endregion
111
- export { f as PostHogProvider, m as usePostHog };
112
-
113
- //# sourceMappingURL=index.js.map