@openhands/agent-canvas 1.0.0-rc.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (595) hide show
  1. package/README.md +46 -31
  2. package/README.windows.md +2 -2
  3. package/bin/agent-canvas.mjs +3 -1
  4. package/build/assets/Trans-CBypf0vt.js +1 -0
  5. package/build/assets/{acp-providers-Dzb4nxxB.js → acp-providers-BMyF5WII.js} +1 -1
  6. package/build/assets/active-backend-context-Cy_Ui5d7.js +1 -0
  7. package/build/assets/add-backend-modal-CUw7x0zm.js +1 -0
  8. package/build/assets/{agent-server-client-options-wXLeJYeM.js → agent-server-client-options-FoO1qgAQ.js} +1 -1
  9. package/build/assets/agent-server-conversation-service.api-D6Cmbnhd.js +5 -0
  10. package/build/assets/{agent-settings-Blipgztd.js → agent-settings-DW4vwOaz.js} +2 -2
  11. package/build/assets/{alert-banner-Bsvys-hT.js → alert-banner-BHmoArV2.js} +1 -1
  12. package/build/assets/{analytics-consent-form-modal-Cujm1lCj.js → analytics-consent-form-modal-BNK0yu4L.js} +1 -1
  13. package/build/assets/api-key-entry-screen-BjVajIjf.js +1 -0
  14. package/build/assets/app-settings-C-5X6RzZ.js +1 -0
  15. package/build/assets/automation-detail-uDMoYmAc.js +1 -0
  16. package/build/assets/automations-list-DBCKCbId.js +1 -0
  17. package/build/assets/{back-nav-button-D20Avel_.js → back-nav-button-Bckz5Wh6.js} +1 -1
  18. package/build/assets/backend-form-modal-D2-XqJA4.js +1 -0
  19. package/build/assets/{backend-synced-settings-badge-Da0G6Lwv.js → backend-synced-settings-badge-Dx16CR_k.js} +1 -1
  20. package/build/assets/{base-modal-DvuGYyu1.js → base-modal-7QRNzf6r.js} +1 -1
  21. package/build/assets/{brand-button-9SOzmqPP.js → brand-button-CKLvirxz.js} +1 -1
  22. package/build/assets/browser-D1ZybR7v.js +5 -0
  23. package/build/assets/browser-store-hzasvz9c.js +1 -0
  24. package/build/assets/{browser-tab-bveyJhG9.js → browser-tab-iOQjXzmI.js} +1 -1
  25. package/build/assets/chat-send-button-_Uc9iFpG.js +1 -0
  26. package/build/assets/check-DfvhVBub.js +1 -0
  27. package/build/assets/{checkmark--JWAesua.js → checkmark-BHPhb50L.js} +1 -1
  28. package/build/assets/{chevron-down-B9j6lcFg.js → chevron-down-CMkqyPEY.js} +1 -1
  29. package/build/assets/{circle-plus-check-toggle-AO9DWyDX.js → circle-plus-check-toggle-ChmnRlpR.js} +1 -1
  30. package/build/assets/{close--W-tHn1h.js → close-DBs90sI6.js} +1 -1
  31. package/build/assets/{code-tag-chmctf4w.js → code-tag-BtHOqHwB.js} +1 -1
  32. package/build/assets/{color-themes-0biOprdo.js → color-themes-CBikRn3w.js} +1 -1
  33. package/build/assets/{combobox-caret-C9BNHfSu.js → combobox-caret-evUAh6YW.js} +1 -1
  34. package/build/assets/{command-store-UzKGSUC2.js → command-store-DZfR8QtE.js} +1 -1
  35. package/build/assets/condenser-settings-0tw3yXX8.js +1 -0
  36. package/build/assets/{confirmation-modal-Cq3eqvqH.js → confirmation-modal-DWuxe1zG.js} +1 -1
  37. package/build/assets/{context-menu-list-item-BQU0jZPq.js → context-menu-list-item-BbHFxHaq.js} +1 -1
  38. package/build/assets/conversation-B1v96pQf.js +19 -0
  39. package/build/assets/conversation-DgfcjCPm.js +1 -0
  40. package/build/assets/{conversation-local-storage-an3MiIiJ.js → conversation-local-storage-Btum2xBJ.js} +1 -1
  41. package/build/assets/conversation-panel-TJ7swm6a.js +1 -0
  42. package/build/assets/conversation-service.api-DXawvmNN.js +1 -0
  43. package/build/assets/conversation-state-store-DmuPn875.js +1 -0
  44. package/build/assets/{conversation-store-FQmakEd-.js → conversation-store-Bu89Yxg1.js} +1 -1
  45. package/build/assets/{conversation-tab-empty-state-C8tztloo.js → conversation-tab-empty-state-7js7FjYM.js} +1 -1
  46. package/build/assets/{copy-CdKN5rtJ.js → copy-B0SkXenR.js} +1 -1
  47. package/build/assets/copy-to-clipboard-button-CfH2EQz9.js +1 -0
  48. package/build/assets/{createLucideIcon-CkGTf9Qj.js → createLucideIcon-Bazr-V-B.js} +1 -1
  49. package/build/assets/declaration-Cn-NXHEy.js +1 -0
  50. package/build/assets/{device-verify-YuGXnpRk.js → device-verify-CWKyQ680.js} +1 -1
  51. package/build/assets/{dist-5dObF4p4.js → dist-Cbu6eGx8.js} +1 -1
  52. package/build/assets/dist-Dg2JWLGc.js +1 -0
  53. package/build/assets/{dropdown-classes-CVp0kVdt.js → dropdown-classes-BI1bI1ho.js} +1 -1
  54. package/build/assets/edit-automation-modal-DdAG6kFZ.js +1 -0
  55. package/build/assets/{ellipsis-button-k7HLwYth.js → ellipsis-button-DdCsOBHV.js} +1 -1
  56. package/build/assets/entry.client-DXyvKj5G.js +2 -0
  57. package/build/assets/{enum-filter-dropdown-COqUq3mB.js → enum-filter-dropdown-WROAIeys.js} +1 -1
  58. package/build/assets/{environment-switch-overlay-wB5LxfYZ.js → environment-switch-overlay-Dv0imPE6.js} +1 -1
  59. package/build/assets/{extensions-hub-BYCLWP3d.js → extensions-hub-CkyDPXvn.js} +1 -1
  60. package/build/assets/{extensions-navigation-3FLKfb6g.js → extensions-navigation-gMR-la1J.js} +1 -1
  61. package/build/assets/{external-link-BATfjnkz.js → external-link-FsutnU75.js} +1 -1
  62. package/build/assets/files-tab-DNUoveJZ.js +1 -0
  63. package/build/assets/files-tab-store-SyvkH3ic.js +1 -0
  64. package/build/assets/{folder-DPTBlxWb.js → folder-DusyBXDE.js} +1 -1
  65. package/build/assets/{globe-Dpgjreyy.js → globe-BUcin4kT.js} +1 -1
  66. package/build/assets/home-D809jWVS.js +1 -0
  67. package/build/assets/{iconBase-BVhFI-0E.js → iconBase-B6CXDDaE.js} +1 -1
  68. package/build/assets/index-redirect-nMYgOTBX.js +1 -0
  69. package/build/assets/install-server-modal-D92Qy57I.js +1 -0
  70. package/build/assets/{launch-CMZknx1e.js → launch-BnCG2g2a.js} +1 -1
  71. package/build/assets/lesson-plan-j-ZaE8vK.js +3 -0
  72. package/build/assets/{lightbulb-S616sGEL.js → lightbulb-BJ5tWmAh.js} +1 -1
  73. package/build/assets/{link-external-ooNztGLp.js → link-external-DUtmHAHi.js} +1 -1
  74. package/build/assets/{list-todo-nCa9zxVE.js → list-todo-C-gekh-4.js} +1 -1
  75. package/build/assets/{llm-client-D6EtdLBs.js → llm-client-BZUkZYlc.js} +1 -1
  76. package/build/assets/llm-not-configured-banner-PlvJ99rE.js +27 -0
  77. package/build/assets/llm-settings-Dgk32xRW.js +1 -0
  78. package/build/assets/llm-settings-Dxo7owKm.js +1 -0
  79. package/build/assets/llm-subscription-Bvu8BLXc.js +1 -0
  80. package/build/assets/llm-subscription-service-Bq6z3Wkv.js +1 -0
  81. package/build/assets/loader-circle-Cw7_q9hg.js +1 -0
  82. package/build/assets/{loading-spinner-D7bOU6I7.js → loading-spinner-RF3IlMF5.js} +1 -1
  83. package/build/assets/manage-backends-modal-BT66a6e0.js +1 -0
  84. package/build/assets/manifest-b8402d59.js +1 -0
  85. package/build/assets/markdown-renderer-Tw6FR2ad.js +2 -0
  86. package/build/assets/mcp-B_pA7vZg.js +9 -0
  87. package/build/assets/mcp-client-ppbYplKX.js +1 -0
  88. package/build/assets/messages-Cg9aNVi6.js +41 -0
  89. package/build/assets/{modal-backdrop-_VbcKk5K.js → modal-backdrop-DRpBVVW5.js} +1 -1
  90. package/build/assets/{modal-body-Cd-PtMHr.js → modal-body-CEV2O67p.js} +1 -1
  91. package/build/assets/{modal-classes-CNm4ovfm.js → modal-classes-B2DuQ9qD.js} +1 -1
  92. package/build/assets/{modal-close-button-Dbo0NAMt.js → modal-close-button-gtb7RHFB.js} +1 -1
  93. package/build/assets/model-selector-CAv3RrJ3.js +1 -0
  94. package/build/assets/{mouse-pointer-click-D0QNGSIo.js → mouse-pointer-click-B3i6HcaF.js} +1 -1
  95. package/build/assets/{navigation-context-BpAOh_t5.js → navigation-context-CM9JmTvm.js} +1 -1
  96. package/build/assets/{navigation-link-Dci7Nuyf.js → navigation-link-FmXzqR1J.js} +1 -1
  97. package/build/assets/onboarding-Q9CzuVWy.js +1 -0
  98. package/build/assets/{openhands-logo-Dzm-d_V_.js → openhands-logo-B4aEO2sf.js} +1 -1
  99. package/build/assets/option-service.api-C-s2BYZp.js +1 -0
  100. package/build/assets/organization-service.api-CXTKpFnV.js +1 -0
  101. package/build/assets/{path-utils-DKu3CNkH.js → path-utils-CE98fIFP.js} +1 -1
  102. package/build/assets/{pencil-DPEtl5QD.js → pencil-bWrxRWlr.js} +1 -1
  103. package/build/assets/{plan-components-CutRBi0G.js → plan-components-BF-X7vnQ.js} +1 -1
  104. package/build/assets/{planner-tab-YkOp7QXt.js → planner-tab-jkyaGiRc.js} +1 -1
  105. package/build/assets/plus-BTCK8WtR.js +1 -0
  106. package/build/assets/{profiles-client-BjUo3q05.js → profiles-client-CQ9L1yHR.js} +1 -1
  107. package/build/assets/providers-B3hkV58J.js +1 -0
  108. package/build/assets/proxy-BOcEWkCD.js +1 -0
  109. package/build/assets/{react-dom-hVBnwgwZ.js → react-dom-BBXlXOZX.js} +1 -1
  110. package/build/assets/{react-CM_dJw1Z.js → react-uQK8du1l.js} +1 -1
  111. package/build/assets/{react-Dy05vyj5.js → react-x84lbX6s.js} +1 -1
  112. package/build/assets/{recommended-automations-launcher-WxaZcjRD.js → recommended-automations-launcher-DMk35aFI.js} +11 -11
  113. package/build/assets/root-CV0kyxfP.js +2 -0
  114. package/build/assets/root-PB2Jnj61.css +1 -0
  115. package/build/assets/root-layout-Bl4Qzg5J.js +2 -0
  116. package/build/assets/{runtime-waiting-state-8i0Z3A_i.js → runtime-waiting-state-C1hJpXxl.js} +1 -1
  117. package/build/assets/sdk-section-page-DHbC2_j3.js +1 -0
  118. package/build/assets/sdk-settings-schema-z51bBmMl.js +1 -0
  119. package/build/assets/{search-C_l_XW4e.js → search-Dxm1MUMi.js} +1 -1
  120. package/build/assets/{secrets-service-Skzza9sx.js → secrets-service-DlScPUwy.js} +1 -1
  121. package/build/assets/secrets-settings-B97-JKBe.js +1 -0
  122. package/build/assets/settings-BpmooyBV.js +1 -0
  123. package/build/assets/{settings-dropdown-input-BP-arqjU.js → settings-dropdown-input-hIIAlmHb.js} +1 -1
  124. package/build/assets/{settings-gear-f-zWpxfI.js → settings-gear-DQLTCnFx.js} +1 -1
  125. package/build/assets/{settings-index-BLfmrKRl.js → settings-index-kKASonWk.js} +1 -1
  126. package/build/assets/{settings-input-BM8ANxDb.js → settings-input-BlOzCtP3.js} +1 -1
  127. package/build/assets/{settings-list-classes-B9uo5WES.js → settings-list-classes-BFRbCy4U.js} +1 -1
  128. package/build/assets/settings-modal-C4pZwj-l.js +1 -0
  129. package/build/assets/{settings-section-header-context-Cid25HM2.js → settings-section-header-context-iz4Go0dL.js} +1 -1
  130. package/build/assets/settings-service.api-DVLwi82B.js +1 -0
  131. package/build/assets/{settings-switch-xa6q4M6j.js → settings-switch-6cXIH-UE.js} +1 -1
  132. package/build/assets/{settings-utils--H_EvFjx.js → settings-utils-CfScEaPn.js} +1 -1
  133. package/build/assets/shared-conversation-CLkayApe.js +1 -0
  134. package/build/assets/sidebar-mobile-menu-toggle-C8uT4Mhd.js +1 -0
  135. package/build/assets/{sidebar-nav-link-BekRAssb.js → sidebar-nav-link-BKZiAQxQ.js} +1 -1
  136. package/build/assets/{skill-card-pill-row-DeodrwPG.js → skill-card-pill-row-D13WRKIE.js} +1 -1
  137. package/build/assets/{skills-BE5HJuGM.js → skills-NpRk6v79.js} +1 -1
  138. package/build/assets/{skills-client-CgraS-wA.js → skills-client-DsqwQEwj.js} +1 -1
  139. package/build/assets/{skills-plugins-rIza_fUf.js → skills-plugins-bkwxItAw.js} +1 -1
  140. package/build/assets/{skills-settings-Dvl7gpEx.js → skills-settings-DMbrlB2b.js} +2 -2
  141. package/build/assets/{square-chevron-right-BWAB7NPp.js → square-chevron-right-DxZKcVq4.js} +1 -1
  142. package/build/assets/{styled-tooltip-X61SEwqk.js → styled-tooltip-DG1ofAcS.js} +1 -1
  143. package/build/assets/suspense-sOGeme-f.js +1 -0
  144. package/build/assets/{switch-skeleton-BbIWemkK.js → switch-skeleton-CZ6XCVZk.js} +1 -1
  145. package/build/assets/{task-list-tab-BFnyHGsn.js → task-list-tab-CddMPNCD.js} +1 -1
  146. package/build/assets/telemetry-CX4mTZUw.js +2 -0
  147. package/build/assets/{terminal-BFypysgZ.js → terminal-BOAVxAej.js} +1 -1
  148. package/build/assets/{terminal-B92mACR5.js → terminal-DbtwHqt4.js} +1 -1
  149. package/build/assets/{toggle-switch-CL_wRiGs.js → toggle-switch-C0t6ge2m.js} +1 -1
  150. package/build/assets/{trash-2-C-RvV8WA.js → trash-2-Dmprz0A0.js} +1 -1
  151. package/build/assets/{typography-BLSEGjph.js → typography-CNHbO1eE.js} +1 -1
  152. package/build/assets/{u-check-circle-dG_VJqx5.js → u-check-circle-CX66WzfT.js} +1 -1
  153. package/build/assets/{u-check-circle-half-D-5ZPRnd.js → u-check-circle-half-Bj853Ub0.js} +1 -1
  154. package/build/assets/{u-circuit-BXoisXOA.js → u-circuit-B9bLCP7N.js} +1 -1
  155. package/build/assets/{u-edit-DIgADxLH.js → u-edit-D7JyvoWm.js} +1 -1
  156. package/build/assets/use-acp-credential-form-Cj_oUYd5.js +1 -0
  157. package/build/assets/{use-active-conversation-BkohEtaN.js → use-active-conversation-B64-yy2X.js} +1 -1
  158. package/build/assets/use-agent-settings-schema-BzbQYEzb.js +1 -0
  159. package/build/assets/{use-agent-state-DITv5qV7.js → use-agent-state-DxFk391r.js} +1 -1
  160. package/build/assets/{use-breakpoint-DpxHDmuH.js → use-breakpoint-Cent5lpI.js} +1 -1
  161. package/build/assets/{use-click-outside-element-DhxCUyWl.js → use-click-outside-element-DOYR26nw.js} +1 -1
  162. package/build/assets/{use-cloud-current-user-id-CSm3kgqy.js → use-cloud-current-user-id-BVf7pb8n.js} +1 -1
  163. package/build/assets/use-config-CvdJUq4E.js +1 -0
  164. package/build/assets/use-create-conversation-Cnouynop.js +1 -0
  165. package/build/assets/{use-create-secret-LObNBU3M.js → use-create-secret-Cgu4uxyr.js} +1 -1
  166. package/build/assets/{use-event-store-DNSmyzUh.js → use-event-store-Nv92IYMU.js} +1 -1
  167. package/build/assets/use-handle-plan-click-C7824bbe.js +1 -0
  168. package/build/assets/use-is-authed-mnJtd2bw.js +1 -0
  169. package/build/assets/{use-launch-skill-in-chat-BTgXIu3N.js → use-launch-skill-in-chat-NDUo_UCA.js} +1 -1
  170. package/build/assets/use-llm-profiles-9eH3Y3Ef.js +1 -0
  171. package/build/assets/use-runtime-is-ready-DEnxJH7W.js +1 -0
  172. package/build/assets/use-save-settings-DrClHnX7.js +1 -0
  173. package/build/assets/use-settings-BNAoCX93.js +1 -0
  174. package/build/assets/{use-settings-nav-items-ykMjd_NG.js → use-settings-nav-items-CLIW2p2n.js} +2 -2
  175. package/build/assets/{use-skills-_unimM2d.js → use-skills-B9gOHrOj.js} +1 -1
  176. package/build/assets/{use-task-list-E5t-jtgs.js → use-task-list-DLKPnq3I.js} +1 -1
  177. package/build/assets/{use-tracking-C9P88zSo.js → use-tracking-Dph_dRlL.js} +1 -1
  178. package/build/assets/{use-user-conversation-2jZZ-MLA.js → use-user-conversation-leIsQH1B.js} +1 -1
  179. package/build/assets/useMutation-cXADjWAv.js +1 -0
  180. package/build/assets/useQuery-BQr6A6ry.js +1 -0
  181. package/build/assets/useTranslation-Bp1btAjp.js +1 -0
  182. package/build/assets/{utils-eXk6yerZ.js → utils-o-OXNtEy.js} +1 -1
  183. package/build/assets/v4-DOSjXdIn.js +1 -0
  184. package/build/assets/{vendor~browser-tab-BGJDGHyS.js → vendor~browser-tab-642bOcE1.js} +1 -1
  185. package/build/assets/{vendor~conversation-panel~conversation-D98u43rl.js → vendor~conversation-panel~conversation-DqmbnXRn.js} +1 -1
  186. package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CtjHOMO_.js → vendor~conversation-panel~conversation~alert-banner-CSDVP1nw.js} +1 -1
  187. package/build/assets/{vendor~conversation-panel~conversation~index-BXt2-3Cc.js → vendor~conversation-panel~conversation~index-DITarr3F.js} +1 -1
  188. package/build/assets/{vendor~entry.client-DrAdOKqA.js → vendor~entry.client-CQ77DucR.js} +1 -1
  189. package/build/assets/{vendor~entry.client-EcEhmoJW.js → vendor~entry.client-ePAFmSwg.js} +1 -1
  190. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~f0pn7nss-DUk-MwlC.js +177 -0
  191. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~lb3qbbk3-BvmOva8I.js +1 -0
  192. package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-Cl4h-NSi.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~lpdshwee-BkQQxq_q.js} +1 -1
  193. package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-BmOMM-6e.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~oli4dvxu-8xF3WeB9.js} +1 -1
  194. package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-BjMt2JeR.js → vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~nyk4vv4g-UzR6fe3Y.js} +1 -1
  195. package/build/assets/{vendor~files-tab--640YzQO.js → vendor~files-tab-Cko7Kr5k.js} +1 -1
  196. package/build/assets/{vendor~home~conversation-panel~conversation-dhKA2JVJ.js → vendor~home~conversation-panel~conversation-D3otw5Jn.js} +1 -1
  197. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DMOoHVBy.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CMdKUYP2.js} +1 -1
  198. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BoE6JRJj.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DSR6Mugx.js} +1 -1
  199. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dqpi2xyZ.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DdOzMvB1.js} +1 -1
  200. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DX2CmDJ0.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dj2eezvL.js} +1 -1
  201. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BNExlCqT.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DyN8jeZz.js} +1 -1
  202. package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DCn1M97v.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-lpEWrbMA.js} +1 -1
  203. package/build/assets/{vendor~launch-C0VvUe2W.js → vendor~launch-DoYO54df.js} +1 -1
  204. package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-COLUW-6M.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BGwU2SbU.js} +1 -1
  205. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-eG1kjEbj.js → vendor~root-layout~home~conversation-panel~conversation-Iqs0j4Wo.js} +1 -1
  206. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-7eqKdLSQ.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-BdS6bbw9.js} +1 -1
  207. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-BP3MGAAY.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~bok0tgtf-Fd3F3jth.js} +1 -1
  208. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ceijy54y-Dkd2wxJA.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ceijy54y-Cg0AqwMN.js} +2 -2
  209. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~bxn4ldi1-_LydBB1e.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~bxn4ldi1-BlsbqRyZ.js} +1 -1
  210. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~ec6pk3ix-CBICqfKC.js +48 -0
  211. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~mcp~automati~dou5smdo-DavKsAvB.js → vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~nv6afr11-BYNoKMU0.js} +97 -69
  212. package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CsO1gYxF.js → vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-BspUuSsP.js} +1 -1
  213. package/build/assets/{vendor~root-layout~home~mcp~automations-list-D40jgugf.js → vendor~root-layout~home~mcp~automations-list-C9U_eOqU.js} +1 -1
  214. package/build/assets/{vendor~root-layout~home~mcp~automations-list-cNHi83v_.js → vendor~root-layout~home~mcp~automations-list-DhQ3LPVw.js} +1 -1
  215. package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-xCM3k6Rd.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BEbhHQYg.js} +1 -1
  216. package/build/assets/{vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-BIm99UaF.js → vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~o7tv66sg-DdgDNzMc.js} +2 -2
  217. package/build/assets/{verification-settings-EUkt_CkZ.js → verification-settings-D7R-Ne6L.js} +1 -1
  218. package/build/assets/x-DCZg87p7.js +1 -0
  219. package/build/assets/{x-mark-C42svtnu.js → x-mark-jrBTJbnP.js} +1 -1
  220. package/build/index.html +4 -4
  221. package/build/locales/ar/openhands.json +22 -0
  222. package/build/locales/ca/openhands.json +22 -0
  223. package/build/locales/de/openhands.json +22 -0
  224. package/build/locales/en/openhands.json +22 -0
  225. package/build/locales/es/openhands.json +22 -0
  226. package/build/locales/fr/openhands.json +22 -0
  227. package/build/locales/it/openhands.json +22 -0
  228. package/build/locales/ja/openhands.json +22 -0
  229. package/build/locales/ko-KR/openhands.json +22 -0
  230. package/build/locales/no/openhands.json +22 -0
  231. package/build/locales/pt/openhands.json +22 -0
  232. package/build/locales/tr/openhands.json +22 -0
  233. package/build/locales/uk/openhands.json +22 -0
  234. package/build/locales/zh-CN/openhands.json +22 -0
  235. package/build/locales/zh-TW/openhands.json +22 -0
  236. package/config/defaults.json +4 -2
  237. package/dist/api/agent-server-adapter.cjs +3 -3
  238. package/dist/api/agent-server-adapter.cjs.map +1 -1
  239. package/dist/api/agent-server-adapter.d.ts +8 -0
  240. package/dist/api/agent-server-adapter.js +82 -80
  241. package/dist/api/agent-server-adapter.js.map +1 -1
  242. package/dist/api/agent-server-compatibility.cjs +1 -1
  243. package/dist/api/agent-server-compatibility.cjs.map +1 -1
  244. package/dist/api/agent-server-compatibility.d.ts +10 -0
  245. package/dist/api/agent-server-compatibility.js +69 -25
  246. package/dist/api/agent-server-compatibility.js.map +1 -1
  247. package/dist/api/backend-registry/default-backend.cjs +1 -1
  248. package/dist/api/backend-registry/default-backend.cjs.map +1 -1
  249. package/dist/api/backend-registry/default-backend.d.ts +6 -5
  250. package/dist/api/backend-registry/default-backend.js +1 -1
  251. package/dist/api/backend-registry/default-backend.js.map +1 -1
  252. package/dist/api/backend-registry/storage.cjs +1 -1
  253. package/dist/api/backend-registry/storage.cjs.map +1 -1
  254. package/dist/api/backend-registry/storage.js +38 -68
  255. package/dist/api/backend-registry/storage.js.map +1 -1
  256. package/dist/api/cloud/proxy.cjs +1 -1
  257. package/dist/api/cloud/proxy.cjs.map +1 -1
  258. package/dist/api/cloud/proxy.d.ts +3 -16
  259. package/dist/api/cloud/proxy.js +1 -1
  260. package/dist/api/cloud/proxy.js.map +1 -1
  261. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
  262. package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
  263. package/dist/api/conversation-service/agent-server-conversation-service.api.js +75 -75
  264. package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
  265. package/dist/api/llm-subscription-service.cjs +2 -0
  266. package/dist/api/llm-subscription-service.cjs.map +1 -0
  267. package/dist/api/llm-subscription-service.d.ts +23 -0
  268. package/dist/api/llm-subscription-service.js +109 -0
  269. package/dist/api/llm-subscription-service.js.map +1 -0
  270. package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
  271. package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
  272. package/dist/api/mcp-service/mcp-service.api.d.ts +2 -3
  273. package/dist/api/mcp-service/mcp-service.api.js +38 -13
  274. package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
  275. package/dist/api/settings-service/settings-service.api.cjs +1 -1
  276. package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
  277. package/dist/api/settings-service/settings-service.api.js +41 -42
  278. package/dist/api/settings-service/settings-service.api.js.map +1 -1
  279. package/dist/components/conversation-events/chat/messages.cjs +1 -1
  280. package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
  281. package/dist/components/conversation-events/chat/messages.js +4 -4
  282. package/dist/components/conversation-events/chat/messages.js.map +1 -1
  283. package/dist/components/features/backends/backend-form-modal.cjs +1 -1
  284. package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
  285. package/dist/components/features/backends/backend-form-modal.js +136 -135
  286. package/dist/components/features/backends/backend-form-modal.js.map +1 -1
  287. package/dist/components/features/backends/backend-selector.cjs +1 -1
  288. package/dist/components/features/backends/backend-selector.cjs.map +1 -1
  289. package/dist/components/features/backends/backend-selector.js +103 -91
  290. package/dist/components/features/backends/backend-selector.js.map +1 -1
  291. package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
  292. package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
  293. package/dist/components/features/backends/manage-backends-modal.js +14 -8
  294. package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
  295. package/dist/components/features/chat/path-component.cjs +1 -1
  296. package/dist/components/features/chat/path-component.cjs.map +1 -1
  297. package/dist/components/features/chat/path-component.js +1 -1
  298. package/dist/components/features/chat/path-component.js.map +1 -1
  299. package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs +1 -1
  300. package/dist/components/features/home/workspace-dropdown/folder-browser-modal.cjs.map +1 -1
  301. package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js +77 -66
  302. package/dist/components/features/home/workspace-dropdown/folder-browser-modal.js.map +1 -1
  303. package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
  304. package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
  305. package/dist/components/features/mcp-page/custom-server-editor.js +1 -0
  306. package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
  307. package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
  308. package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
  309. package/dist/components/features/mcp-page/install-server-modal.js +73 -46
  310. package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
  311. package/dist/components/features/mcp-page/marketplace-card.cjs +1 -1
  312. package/dist/components/features/mcp-page/marketplace-card.cjs.map +1 -1
  313. package/dist/components/features/mcp-page/marketplace-card.js +6 -2
  314. package/dist/components/features/mcp-page/marketplace-card.js.map +1 -1
  315. package/dist/components/features/settings/brand-button.cjs +1 -1
  316. package/dist/components/features/settings/brand-button.cjs.map +1 -1
  317. package/dist/components/features/settings/brand-button.js +1 -1
  318. package/dist/components/features/settings/brand-button.js.map +1 -1
  319. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs +2 -0
  320. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs.map +1 -0
  321. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.d.ts +5 -0
  322. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js +167 -0
  323. package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js.map +1 -0
  324. package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
  325. package/dist/components/shared/modals/settings/model-selector.cjs.map +1 -1
  326. package/dist/components/shared/modals/settings/model-selector.d.ts +1 -2
  327. package/dist/components/shared/modals/settings/model-selector.js +59 -65
  328. package/dist/components/shared/modals/settings/model-selector.js.map +1 -1
  329. package/dist/components/shared/modals/settings/settings-form.cjs +1 -1
  330. package/dist/components/shared/modals/settings/settings-form.cjs.map +1 -1
  331. package/dist/components/shared/modals/settings/settings-form.js +1 -2
  332. package/dist/components/shared/modals/settings/settings-form.js.map +1 -1
  333. package/dist/config/defaults.cjs +2 -0
  334. package/dist/config/defaults.cjs.map +1 -0
  335. package/dist/config/defaults.js +35 -0
  336. package/dist/config/defaults.js.map +1 -0
  337. package/dist/constants/llm-subscription.cjs +2 -0
  338. package/dist/constants/llm-subscription.cjs.map +1 -0
  339. package/dist/constants/llm-subscription.d.ts +16 -0
  340. package/dist/constants/llm-subscription.js +47 -0
  341. package/dist/constants/llm-subscription.js.map +1 -0
  342. package/dist/contexts/conversation-websocket-context.cjs +1 -1
  343. package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
  344. package/dist/contexts/conversation-websocket-context.js +1 -1
  345. package/dist/contexts/conversation-websocket-context.js.map +1 -1
  346. package/dist/hooks/mutation/use-llm-subscription-auth.cjs +2 -0
  347. package/dist/hooks/mutation/use-llm-subscription-auth.cjs.map +1 -0
  348. package/dist/hooks/mutation/use-llm-subscription-auth.d.ts +3 -0
  349. package/dist/hooks/mutation/use-llm-subscription-auth.js +30 -0
  350. package/dist/hooks/mutation/use-llm-subscription-auth.js.map +1 -0
  351. package/dist/hooks/mutation/use-save-fields-as-secrets.cjs +1 -1
  352. package/dist/hooks/mutation/use-save-fields-as-secrets.cjs.map +1 -1
  353. package/dist/hooks/mutation/use-save-fields-as-secrets.d.ts +8 -6
  354. package/dist/hooks/mutation/use-save-fields-as-secrets.js +1 -1
  355. package/dist/hooks/mutation/use-save-fields-as-secrets.js.map +1 -1
  356. package/dist/hooks/mutation/use-test-mcp-server.d.ts +1 -1
  357. package/dist/hooks/query/query-keys.cjs +1 -1
  358. package/dist/hooks/query/query-keys.cjs.map +1 -1
  359. package/dist/hooks/query/query-keys.d.ts +5 -0
  360. package/dist/hooks/query/query-keys.js +14 -2
  361. package/dist/hooks/query/query-keys.js.map +1 -1
  362. package/dist/hooks/query/use-agent-settings-schema.cjs +1 -1
  363. package/dist/hooks/query/use-agent-settings-schema.cjs.map +1 -1
  364. package/dist/hooks/query/use-agent-settings-schema.d.ts +2 -2
  365. package/dist/hooks/query/use-agent-settings-schema.js +21 -19
  366. package/dist/hooks/query/use-agent-settings-schema.js.map +1 -1
  367. package/dist/hooks/query/use-backends-health.cjs +1 -1
  368. package/dist/hooks/query/use-backends-health.cjs.map +1 -1
  369. package/dist/hooks/query/use-backends-health.js +38 -36
  370. package/dist/hooks/query/use-backends-health.js.map +1 -1
  371. package/dist/hooks/query/use-llm-subscription-models.cjs +2 -0
  372. package/dist/hooks/query/use-llm-subscription-models.cjs.map +1 -0
  373. package/dist/hooks/query/use-llm-subscription-models.d.ts +3 -0
  374. package/dist/hooks/query/use-llm-subscription-models.js +19 -0
  375. package/dist/hooks/query/use-llm-subscription-models.js.map +1 -0
  376. package/dist/hooks/query/use-llm-subscription-status.cjs +2 -0
  377. package/dist/hooks/query/use-llm-subscription-status.cjs.map +1 -0
  378. package/dist/hooks/query/use-llm-subscription-status.d.ts +3 -0
  379. package/dist/hooks/query/use-llm-subscription-status.js +19 -0
  380. package/dist/hooks/query/use-llm-subscription-status.js.map +1 -0
  381. package/dist/hooks/use-websocket.cjs +1 -1
  382. package/dist/hooks/use-websocket.cjs.map +1 -1
  383. package/dist/hooks/use-websocket.d.ts +0 -1
  384. package/dist/hooks/use-websocket.js +37 -38
  385. package/dist/hooks/use-websocket.js.map +1 -1
  386. package/dist/i18n/declaration.cjs +1 -1
  387. package/dist/i18n/declaration.cjs.map +1 -1
  388. package/dist/i18n/declaration.d.ts +22 -0
  389. package/dist/i18n/declaration.js +1 -1
  390. package/dist/i18n/declaration.js.map +1 -1
  391. package/dist/i18n/translation.cjs +2 -2
  392. package/dist/i18n/translation.cjs.map +1 -1
  393. package/dist/i18n/translation.js +374 -0
  394. package/dist/i18n/translation.js.map +1 -1
  395. package/dist/locales/ar/openhands.json +22 -0
  396. package/dist/locales/ca/openhands.json +22 -0
  397. package/dist/locales/de/openhands.json +22 -0
  398. package/dist/locales/en/openhands.json +22 -0
  399. package/dist/locales/es/openhands.json +22 -0
  400. package/dist/locales/fr/openhands.json +22 -0
  401. package/dist/locales/it/openhands.json +22 -0
  402. package/dist/locales/ja/openhands.json +22 -0
  403. package/dist/locales/ko-KR/openhands.json +22 -0
  404. package/dist/locales/no/openhands.json +22 -0
  405. package/dist/locales/pt/openhands.json +22 -0
  406. package/dist/locales/tr/openhands.json +22 -0
  407. package/dist/locales/uk/openhands.json +22 -0
  408. package/dist/locales/zh-CN/openhands.json +22 -0
  409. package/dist/locales/zh-TW/openhands.json +22 -0
  410. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
  411. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
  412. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +10 -22
  413. package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
  414. package/dist/node_modules/@openhands/extensions/skills/index.cjs +97 -69
  415. package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
  416. package/dist/node_modules/@openhands/extensions/skills/index.js +3 -3
  417. package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
  418. package/dist/package.cjs +1 -1
  419. package/dist/package.cjs.map +1 -1
  420. package/dist/package.js +3 -5
  421. package/dist/package.js.map +1 -1
  422. package/dist/routes/files-tab.cjs +1 -1
  423. package/dist/routes/files-tab.cjs.map +1 -1
  424. package/dist/routes/files-tab.js +28 -17
  425. package/dist/routes/files-tab.js.map +1 -1
  426. package/dist/routes/llm-settings.cjs +1 -1
  427. package/dist/routes/llm-settings.cjs.map +1 -1
  428. package/dist/routes/llm-settings.js +142 -85
  429. package/dist/routes/llm-settings.js.map +1 -1
  430. package/dist/services/canvas-ui.cjs +1 -1
  431. package/dist/services/canvas-ui.cjs.map +1 -1
  432. package/dist/services/canvas-ui.d.ts +1 -1
  433. package/dist/services/canvas-ui.js +2 -2
  434. package/dist/services/canvas-ui.js.map +1 -1
  435. package/dist/stores/files-tab-store.cjs +1 -1
  436. package/dist/stores/files-tab-store.cjs.map +1 -1
  437. package/dist/stores/files-tab-store.d.ts +2 -1
  438. package/dist/stores/files-tab-store.js +5 -1
  439. package/dist/stores/files-tab-store.js.map +1 -1
  440. package/dist/stores/use-event-store.cjs +1 -1
  441. package/dist/stores/use-event-store.cjs.map +1 -1
  442. package/dist/stores/use-event-store.js +39 -34
  443. package/dist/stores/use-event-store.js.map +1 -1
  444. package/dist/types/mcp-server.d.ts +21 -0
  445. package/dist/ui/dropdown/dropdown.cjs +1 -1
  446. package/dist/ui/dropdown/dropdown.cjs.map +1 -1
  447. package/dist/ui/dropdown/dropdown.js +6 -2
  448. package/dist/ui/dropdown/dropdown.js.map +1 -1
  449. package/dist/utils/handle-event-for-ui.cjs +1 -1
  450. package/dist/utils/handle-event-for-ui.cjs.map +1 -1
  451. package/dist/utils/handle-event-for-ui.d.ts +2 -0
  452. package/dist/utils/handle-event-for-ui.js +1 -1
  453. package/dist/utils/handle-event-for-ui.js.map +1 -1
  454. package/dist/utils/llm-subscription-schema.cjs +2 -0
  455. package/dist/utils/llm-subscription-schema.cjs.map +1 -0
  456. package/dist/utils/llm-subscription-schema.d.ts +2 -0
  457. package/dist/utils/llm-subscription-schema.js +22 -0
  458. package/dist/utils/llm-subscription-schema.js.map +1 -0
  459. package/dist/utils/mcp-config.cjs +1 -1
  460. package/dist/utils/mcp-config.cjs.map +1 -1
  461. package/dist/utils/mcp-config.js +32 -17
  462. package/dist/utils/mcp-config.js.map +1 -1
  463. package/dist/utils/mcp-credential-validation.cjs +2 -0
  464. package/dist/utils/mcp-credential-validation.cjs.map +1 -0
  465. package/dist/utils/mcp-credential-validation.d.ts +22 -0
  466. package/dist/utils/mcp-credential-validation.js +31 -0
  467. package/dist/utils/mcp-credential-validation.js.map +1 -0
  468. package/dist/utils/mcp-marketplace-utils.cjs +1 -1
  469. package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
  470. package/dist/utils/mcp-marketplace-utils.d.ts +7 -2
  471. package/dist/utils/mcp-marketplace-utils.js +33 -48
  472. package/dist/utils/mcp-marketplace-utils.js.map +1 -1
  473. package/dist/utils/sdk-settings-schema.cjs +1 -1
  474. package/dist/utils/sdk-settings-schema.cjs.map +1 -1
  475. package/dist/utils/sdk-settings-schema.js +64 -61
  476. package/dist/utils/sdk-settings-schema.js.map +1 -1
  477. package/package.json +3 -5
  478. package/scripts/check-sdk-version-sync.mjs +9 -27
  479. package/scripts/dev-with-automation.mjs +1 -3
  480. package/scripts/docker-build.mjs +0 -4
  481. package/scripts/run-staged-typecheck.mjs +44 -0
  482. package/build/assets/QueryClientProvider-XcSjsfpb.js +0 -1
  483. package/build/assets/Trans-sy4l4TyQ.js +0 -1
  484. package/build/assets/active-backend-context-B2OSC-qe.js +0 -1
  485. package/build/assets/add-backend-modal-lG8XDYjr.js +0 -1
  486. package/build/assets/agent-server-adapter-BPpZcLOE.js +0 -5
  487. package/build/assets/agent-server-conversation-service.api-C4Fc9Jnp.js +0 -1
  488. package/build/assets/api-key-entry-screen-BarZU9nr.js +0 -1
  489. package/build/assets/app-settings-CofRfixq.js +0 -1
  490. package/build/assets/automation-detail-BV4Cn0O8.js +0 -1
  491. package/build/assets/automations-list-BaJ61q7P.js +0 -1
  492. package/build/assets/backend-form-modal-B3BCZDPq.js +0 -1
  493. package/build/assets/browser-store-JRrcGdlk.js +0 -1
  494. package/build/assets/browser-wz8UzRmF.js +0 -5
  495. package/build/assets/chat-send-button-DzRpAQr4.js +0 -1
  496. package/build/assets/check-BhnsMsWy.js +0 -1
  497. package/build/assets/condenser-settings-Bo07FAEi.js +0 -1
  498. package/build/assets/context-CI9FqkUp.js +0 -1
  499. package/build/assets/conversation-DDdRyW4z.js +0 -19
  500. package/build/assets/conversation-panel-Dww2uJOd.js +0 -1
  501. package/build/assets/conversation-rGQV1Eym.js +0 -1
  502. package/build/assets/conversation-service.api-ByRiRU1e.js +0 -1
  503. package/build/assets/conversation-state-store-NEktJKfL.js +0 -1
  504. package/build/assets/declaration-D9ucT0fq.js +0 -1
  505. package/build/assets/dist-BCpEDEJq.js +0 -1
  506. package/build/assets/edit-automation-modal-CpA_JKLY.js +0 -1
  507. package/build/assets/entry.client-DUpefbBp.js +0 -2
  508. package/build/assets/files-tab-CBUPwSV1.js +0 -1
  509. package/build/assets/files-tab-store-DSKUhziI.js +0 -1
  510. package/build/assets/home-BDCL0Psk.js +0 -1
  511. package/build/assets/index-redirect-BQ_55qN6.js +0 -1
  512. package/build/assets/install-server-modal-CWZhBKwH.js +0 -1
  513. package/build/assets/lesson-plan-y520IDs6.js +0 -3
  514. package/build/assets/llm-not-configured-banner-CJyURBCm.js +0 -27
  515. package/build/assets/llm-settings-BW6yW2Go.js +0 -1
  516. package/build/assets/llm-settings-CiY22Wzi.js +0 -1
  517. package/build/assets/loader-circle-1XB9nbwF.js +0 -1
  518. package/build/assets/manage-backends-modal-v5POMal5.js +0 -1
  519. package/build/assets/manifest-eccb7f46.js +0 -1
  520. package/build/assets/markdown-renderer-z446oW0Z.js +0 -2
  521. package/build/assets/mcp-DgPFZ_Dv.js +0 -9
  522. package/build/assets/mcp-settings-redirect-l3Zbmc0F.js +0 -1
  523. package/build/assets/messages-Dq6AQ8mp.js +0 -41
  524. package/build/assets/model-selector-CdZs21EZ.js +0 -1
  525. package/build/assets/onboarding-Cdwu8QIy.js +0 -1
  526. package/build/assets/option-service.api-CdYnKVsu.js +0 -1
  527. package/build/assets/organization-service.api-CzMvXIQT.js +0 -1
  528. package/build/assets/plus-DKUID4kd.js +0 -1
  529. package/build/assets/providers-CbpQft-X.js +0 -1
  530. package/build/assets/proxy-Bx3NeKeo.js +0 -1
  531. package/build/assets/query-client-config-Ca3tW1AH.js +0 -1
  532. package/build/assets/root-CRkz_h2T.css +0 -1
  533. package/build/assets/root-CiNoOVrb.js +0 -2
  534. package/build/assets/root-layout-DUw-s9LS.js +0 -2
  535. package/build/assets/sdk-section-page-DPBwwLle.js +0 -1
  536. package/build/assets/sdk-settings-schema-Big50zDH.js +0 -1
  537. package/build/assets/secrets-settings-DmpsTC9V.js +0 -1
  538. package/build/assets/settings-ChsRtIJQ.js +0 -1
  539. package/build/assets/settings-modal-Cth7Zb-I.js +0 -1
  540. package/build/assets/settings-service.api-CcpckquT.js +0 -1
  541. package/build/assets/shared-conversation-Y0C8zqdr.js +0 -1
  542. package/build/assets/sidebar-mobile-menu-toggle-BvcBXvLY.js +0 -1
  543. package/build/assets/suspense-Bqb0V0q1.js +0 -1
  544. package/build/assets/telemetry-CAWBJ_rB.js +0 -2
  545. package/build/assets/use-acp-credential-form-Dj7Jkhgp.js +0 -1
  546. package/build/assets/use-agent-settings-schema-Lf_lBAky.js +0 -1
  547. package/build/assets/use-config-DVU9HaPf.js +0 -1
  548. package/build/assets/use-create-conversation-CJUAOf1q.js +0 -1
  549. package/build/assets/use-handle-plan-click-BdcdMWbv.js +0 -1
  550. package/build/assets/use-is-authed-B8eLO-Xq.js +0 -1
  551. package/build/assets/use-llm-profiles-BBTR-OsK.js +0 -1
  552. package/build/assets/use-runtime-is-ready-BOQpqCvp.js +0 -1
  553. package/build/assets/use-save-settings-7_MLft-Y.js +0 -1
  554. package/build/assets/use-settings-CNsxccvQ.js +0 -1
  555. package/build/assets/useMutation-Dm84WAKR.js +0 -1
  556. package/build/assets/useQuery-DGRSm7IT.js +0 -1
  557. package/build/assets/useTranslation-CL6FTf1b.js +0 -1
  558. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dqseey1n-D_BSEDk4.js +0 -1
  559. package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~jfbjdnyv-C5ZIbuq8.js +0 -177
  560. package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~mcp~settings~settings-index~~m3acswdn-DQE89epK.js +0 -48
  561. package/build/assets/x-CCfDppg5.js +0 -1
  562. package/dist/api/settings-service/legacy-app-preferences-migration.cjs +0 -2
  563. package/dist/api/settings-service/legacy-app-preferences-migration.cjs.map +0 -1
  564. package/dist/api/settings-service/legacy-app-preferences-migration.d.ts +0 -34
  565. package/dist/api/settings-service/legacy-app-preferences-migration.js +0 -52
  566. package/dist/api/settings-service/legacy-app-preferences-migration.js.map +0 -1
  567. package/dist/hooks/query/use-openhands-verified-models.cjs +0 -2
  568. package/dist/hooks/query/use-openhands-verified-models.cjs.map +0 -1
  569. package/dist/hooks/query/use-openhands-verified-models.d.ts +0 -1
  570. package/dist/hooks/query/use-openhands-verified-models.js +0 -14
  571. package/dist/hooks/query/use-openhands-verified-models.js.map +0 -1
  572. package/dist/utils/normalize-display-model.cjs +0 -2
  573. package/dist/utils/normalize-display-model.cjs.map +0 -1
  574. package/dist/utils/normalize-display-model.d.ts +0 -9
  575. package/dist/utils/normalize-display-model.js +0 -13
  576. package/dist/utils/normalize-display-model.js.map +0 -1
  577. package/dist/utils/openhands-llm.cjs +0 -2
  578. package/dist/utils/openhands-llm.cjs.map +0 -1
  579. package/dist/utils/openhands-llm.d.ts +0 -15
  580. package/dist/utils/openhands-llm.js +0 -15
  581. package/dist/utils/openhands-llm.js.map +0 -1
  582. /package/build/assets/{agent-server-ui-style-scope-BwIZYdC1.js → agent-server-ui-style-scope-1MuaCC1k.js} +0 -0
  583. /package/build/assets/{common-Dh7OqABE.js → common-DqjLSBOt.js} +0 -0
  584. /package/build/assets/{environment-switch-store-CiurvTtK.js → environment-switch-store-CBXkf5bS.js} +0 -0
  585. /package/build/assets/{extension-module-card-classes-DP5J6ngE.js → extension-module-card-classes-CVGfXtoL.js} +0 -0
  586. /package/build/assets/{git-status-mapper-BI8FyUVp.js → git-status-mapper-DVFXF1_X.js} +0 -0
  587. /package/build/assets/{handle-capture-consent-CPMXU29K.js → handle-capture-consent-BTvatyfE.js} +0 -0
  588. /package/build/assets/{map-provider-BM2SJarp.js → map-provider-COgsZR9p.js} +0 -0
  589. /package/build/assets/{objectWithoutPropertiesLoose-DSQKyRhw.js → objectWithoutPropertiesLoose-B80nTzVc.js} +0 -0
  590. /package/build/assets/{preload-helper-CT1Z6Pdu.js → preload-helper-D_sPnjeL.js} +0 -0
  591. /package/build/assets/{rolldown-runtime-BFRubm34.js → rolldown-runtime-wFmyQBCi.js} +0 -0
  592. /package/build/assets/{sdk-settings-field-metadata-p2GVlft7.js → sdk-settings-field-metadata-Cc4D-ut7.js} +0 -0
  593. /package/build/assets/{settings-wh2sLLJM.js → settings-1287uR2J.js} +0 -0
  594. /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nh19ovoo-DJTFnsA1.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~cg1m3bv7-aUIHudsf.js} +0 -0
  595. /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-BmZcy_kH.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ntycl9e1-DPPGSgT1.js} +0 -0
@@ -1,177 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{O as n,S as r,T as i,_ as a,a as o,c as s,d as c,f as l,g as u,h as d,k as f,o as p,p as m,s as h,t as ee,v as g}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dqseey1n-D_BSEDk4.js";import{t as _}from"./createLucideIcon-CkGTf9Qj.js";var v=class extends o{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||y(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=p({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),s.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function y(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var b=class extends f{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new v({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=x(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=x(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=x(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=x(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){s.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>d(t,e))}findAll(e={}){return this.getAll().filter(t=>d(e,t))}notify(e){s.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return s.batch(()=>Promise.all(e.map(e=>e.continue().catch(a))))}};function x(e){return e.options.scope?.id}var te=class extends f{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??m(r,t),a=this.get(i);return a||(a=new ee({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){s.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>u(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>u(e,t)):t}notify(e){s.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){s.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){s.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ne=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new te,this.#t=e.mutationCache||new b,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=n.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=h.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(r(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=c(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return s.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;s.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return s.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=s.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(a).catch(a)}invalidateQueries(e,t={}){return s.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=s.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(a)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(a)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(r(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(a).catch(a)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(a).catch(a)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return h.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(l(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{g(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(l(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{g(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=m(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===i&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},S=e=>typeof e==`string`,C=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},w=e=>e==null?``:String(e),re=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},ie=/###/g,ae=e=>e&&e.includes(`###`)?e.replace(ie,`.`):e,oe=e=>!e||S(e),T=(e,t,n)=>{let r=S(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(oe(e))return{};let t=ae(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return oe(e)?{}:{obj:e,k:ae(r[i])}},se=(e,t,n)=>{let{obj:r,k:i}=T(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=T(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=T(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},ce=(e,t,n,r)=>{let{obj:i,k:a}=T(e,t,Object);i[a]=i[a]||[],i[a].push(n)},E=(e,t)=>{let{obj:n,k:r}=T(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},le=(e,t,n)=>{let r=E(e,n);return r===void 0?E(t,n):r},ue=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?S(e[r])||e[r]instanceof String||S(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):ue(e[r],t[r],n):e[r]=t[r]);return e},D=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),de={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},fe=e=>S(e)?e.replace(/[&<>"'\/]/g,e=>de[e]):e,pe=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},me=[` `,`,`,`?`,`!`,`;`],he=new pe(20),ge=(e,t,n)=>{t||=``,n||=``;let r=me.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=he.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},_e=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},O=e=>e?.replace(/_/g,`-`),ve={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},k=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||ve,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>S(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),S(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},A=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},ye=class extends A{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):S(n)&&i?o.push(...n.split(i)):o.push(n)));let s=E(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!S(n)?s:_e(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),se(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(S(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=E(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ue(s,n,i):s={...s,...n},se(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},be={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},xe=Symbol(`i18next/PATH_KEY`);function Se(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===xe?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function j(e,t){let{[xe]:n}=e(Se()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var M=e=>!S(e)&&typeof e!=`boolean`&&typeof e!=`number`,Ce=class e extends A{constructor(e,t={}){super(),re([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=k.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=M(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!ge(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:S(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:S(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=j(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?j(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,ee=p?.exactUsedKey||s,g=[`[object Number]`,`[object Function]`,`[object RegExp]`],_=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=i.count!==void 0&&!S(i.count),b=e.hasDefaultValue(i),x=y?this.pluralResolver.getSuffix(d,i.count,i):``,te=i.ordinal&&y?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,ne=y&&!i.ordinal&&i.count===0,C=ne&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${x}`]||i[`defaultValue${te}`]||i.defaultValue,w=m;v&&!m&&b&&(w=C);let re=M(w),ie=Object.prototype.toString.apply(w);if(v&&w&&re&&!g.includes(ie)&&!(S(_)&&Array.isArray(w))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,w,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(w),t=e?[]:{},n=e?ee:h;for(let e in w)if(Object.prototype.hasOwnProperty.call(w,e)){let r=`${n}${o}${e}`;b&&!m?t[e]=this.translate(r,{...i,defaultValue:M(C)?C[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=w[e])}m=t}}else if(v&&S(_)&&Array.isArray(m))m=m.join(_),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&b&&(e=!0,m=C),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=b&&C!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,y&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?C:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=b&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);ne&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||C)})}):n(e,s,C))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=S(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!S(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=S(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=be.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return S(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?j(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!S(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(S(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!S(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},we=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=k.create(`languageUtils`)}getScriptPartFromCode(e){if(e=O(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=O(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(S(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),S(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return S(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):S(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},Te={zero:0,one:1,two:2,few:3,many:4,other:5},Ee={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},De=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=k.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=O(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Ee;if(!e.match(/-|_/))return Ee;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Te[e]-Te[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Oe=(e,t,n,r=`.`,i=!0)=>{let a=le(e,t,n);return!a&&i&&S(n)&&(a=_e(e,n,r),a===void 0&&(a=_e(t,n,r))),a},N=e=>e.replace(/\$/g,`$$$$`),ke=class{constructor(e={}){this.logger=k.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:ee,alwaysFormat:g}=e.interpolation;this.escape=t===void 0?fe:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?D(i):a||`{{`,this.suffix=o?D(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?D(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?D(l):``,this.nestingPrefix=d?D(d):f||D(`$t(`),this.nestingSuffix=p?D(p):m||D(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=ee||1e3,this.alwaysFormat=g===void 0?!1:g,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Oe(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Oe(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>N(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?N(this.escape(e)):N(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=S(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !S(a)&&!this.useRawValueToEscape&&(a=w(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${D(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!S(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!S(i))return i;S(i)||(i=w(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Ae=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},je=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(O(r),i),t[o]=s),s(n)}},Me=e=>(t,n,r)=>e(O(n),r)(t),Ne=class{constructor(e={}){this.logger=k.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?je:Me;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=je(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&!i[0].includes(`)`)&&i.find(e=>e.includes(`)`))){let e=i.findIndex(e=>e.includes(`)`));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Ae(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Pe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Fe=class extends A{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=k.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{ce(n.loaded,[i],a),Pe(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();S(e)&&(e=this.languageUtils.toResolveHierarchy(e)),S(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Ie=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),S(e[1])&&(t.defaultValue=e[1]),S(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Le=e=>(S(e.ns)&&(e.ns=[e.ns]),S(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),S(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),P=()=>{},Re=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},F=class e extends A{constructor(e={},t){if(super(),this.options=Le(e),this.services={},this.logger=k,this.modules={external:[]},Re(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(S(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Ie();this.options={...n,...this.options,...Le(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?k.init(r(this.modules.logger),this.options):k.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Ne;let t=new we(this.options);this.store=new ye(this.options.resources,this.options);let n=this.services;n.logger=k,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new De(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new ke(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Fe(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Ce(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=P,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=C(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=P){let n=t,r=S(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=C();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=P,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&be.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=C();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=S(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(S(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=j(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=j(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=j(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return S(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=C();return this.options.ns?(S(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=C();S(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new we(Ie());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=P){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new ye(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Ie().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new ke(n)}return a.translator=new Ce(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance(),ze=F.createInstance;F.dir,F.init,F.loadResources,F.reloadResources,F.use,F.changeLanguage,F.getFixedT,F.t,F.exists,F.setDefaultNamespace,F.hasLoadedNamespace,F.loadNamespaces,F.loadLanguages;var Be=[];Be.forEach,Be.slice;var Ve=[`__proto__`,`constructor`,`prototype`];function He(e){return!(typeof e!=`string`||e.length===0||e.length>128||Ve.indexOf(e)>-1||e.indexOf(`..`)>-1||e.indexOf(`\\`)>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function Ue(e){return!(!He(e)||e.indexOf(`/`)>-1)}function We(e){return He(e)}var Ge={lng:Ue,ns:We};function I(e){return typeof e==`string`?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e}function Ke(e){if(typeof e!=`string`||e.length===0)return e;try{let t=new URL(e);return t.username||t.password?(t.username=``,t.password=``,t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,`$1`)}}function qe(){return typeof XMLHttpRequest==`function`||typeof XMLHttpRequest==`object`}function Je(e){return!!e&&typeof e.then==`function`}function Ye(e){return Je(e)?e:Promise.resolve(e)}var Xe=/\{\{(.+?)\}\}/g;function Ze(e,t){let n=!1,r=e.replace(Xe,(e,r)=>{let i=r.trim();if(Ve.indexOf(i)>-1)return e;let a=t[i];if(a==null)return e;let o=Ge[i]||Ue,s=String(a).split(`+`);for(let t of s)if(!o(t))return n=!0,e;return s.join(`+`)});return n?null:r}var L=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof window<`u`?window:void 0,R;typeof fetch==`function`?R=fetch:L&&typeof L.fetch==`function`&&(R=L.fetch);var Qe=qe()&&L?L.XMLHttpRequest:void 0,$e=typeof ActiveXObject==`function`&&L?L.ActiveXObject:void 0,et=[`__proto__`,`constructor`,`prototype`],tt=(e,t)=>{if(t&&typeof t==`object`){let n=``;for(let e of Object.keys(t))et.indexOf(e)>-1||(n+=`&`+encodeURIComponent(e)+`=`+encodeURIComponent(t[e]));if(!n)return e;e=e+(e.indexOf(`?`)===-1?`?`:`&`)+n.slice(1)}return e},nt=(e,t,n,r)=>{let i=e=>{if(!e.ok)return n(e.statusText||`Error`,{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(r){let a=r(e,t);if(a instanceof Promise){a.then(i).catch(n);return}}typeof fetch==`function`?fetch(e,t).then(i).catch(n):R(e,t).then(i).catch(n)},rt=(e,t,n,r)=>{e.queryStringParams&&(t=tt(t,e.queryStringParams));let i={...typeof e.customHeaders==`function`?e.customHeaders():e.customHeaders};typeof window>`u`&&typeof global<`u`&&global.process!==void 0&&global.process.versions&&global.process.versions.node&&(i[`User-Agent`]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),n&&(i[`Content-Type`]=`application/json`);let a=typeof e.requestOptions==`function`?e.requestOptions(n):e.requestOptions,o={method:n?`POST`:`GET`,body:n?e.stringify(n):void 0,headers:i,...e._omitFetchOptions?{}:a},s=typeof e.alternateFetch==`function`&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{nt(t,o,r,s)}catch(n){if(!a||Object.keys(a).length===0||!n.message||n.message.indexOf(`not implemented`)<0)return r(n);try{Object.keys(a).forEach(e=>{delete o[e]}),nt(t,o,r,s),e._omitFetchOptions=!0}catch(e){r(e)}}},it=(e,t,n,r)=>{n&&typeof n==`object`&&(n=tt(``,n).slice(1)),e.queryStringParams&&(t=tt(t,e.queryStringParams));try{let i=Qe?new Qe:new $e(`MSXML2.XMLHTTP.3.0`);i.open(n?`POST`:`GET`,t,1),e.crossDomain||i.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader(`Content-Type`,`application/x-www-form-urlencoded`),i.overrideMimeType&&i.overrideMimeType(`application/json`);let a=e.customHeaders;if(a=typeof a==`function`?a():a,a)for(let e of Object.keys(a))et.indexOf(e)>-1||i.setRequestHeader(e,a[e]);i.onreadystatechange=()=>{i.readyState>3&&r(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(e){console&&console.log(e)}},at=(e,t,n,r)=>{if(typeof n==`function`&&(r=n,n=void 0),r||=(()=>{}),R&&t.indexOf(`file:`)!==0)return rt(e,t,n,r);if(qe()||typeof ActiveXObject==`function`)return it(e,t,n,r);r(Error(`No fetch and no xhr implementation found!`))},ot=()=>({loadPath:`/locales/{{lng}}/{{ns}}.json`,addPath:`/locales/add/{{lng}}/{{ns}}`,parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||``}),parseLoadPayload:(e,t)=>void 0,request:at,reloadInterval:typeof window<`u`?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:`cors`,credentials:`same-origin`,cache:`default`}}),st=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type=`backend`,this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={...ot(),...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);typeof e==`object`&&typeof e.unref==`function`&&e.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,i){let a=this.options.loadPath;typeof this.options.loadPath==`function`&&(a=this.options.loadPath(e,n)),a=Ye(a),a.then(a=>{if(!a)return i(null,{});let o=Ze(a,{lng:e.join(`+`),ns:n.join(`+`)});if(o==null){let t=e.map(I).join(`, `),r=n.map(I).join(`, `);return i(Error(`i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[`+t+`] namespaces=[`+r+`]`),!1)}this.loadUrl(o,i,t,r)})}loadUrl(e,t,n,r){let i=typeof n==`string`?[n]:n,a=typeof r==`string`?[r]:r,o=this.options.parseLoadPayload(i,a),s=I(Ke(e));this.options.request(this.options,e,o,(e,i)=>{if(i&&(i.status>=500&&i.status<600||!i.status))return t(`failed loading `+s+`; status code: `+i.status,!0);if(i&&i.status>=400&&i.status<500)return t(`failed loading `+s+`; status code: `+i.status,!1);if(!i&&e&&e.message){let n=e.message.toLowerCase();if([`failed`,`fetch`,`network`,`load`].find(e=>n.indexOf(e)>-1))return t(`failed loading `+s+`: `+I(e.message),!0)}if(e)return t(e,!1);let a,o;try{a=typeof i.data==`string`?this.options.parse(i.data,n,r):i.data}catch{o=`failed parsing `+s+` to json`}if(o)return t(o,!1);t(null,a)})}create(e,t,n,r,i){if(!this.options.addPath)return;typeof e==`string`&&(e=[e]);let a=this.options.parsePayload(t,n,r),o=0,s=[],c=[];e.forEach(n=>{let r=this.options.addPath;typeof this.options.addPath==`function`&&(r=this.options.addPath(n,t));let l=Ze(r,{lng:n,ns:t});if(l==null){o+=1,i&&o===e.length&&i(s,c);return}this.options.request(this.options,l,a,(t,n)=>{o+=1,s.push(t),c.push(n),o===e.length&&typeof i==`function`&&i(s,c)})})}reload(){let{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&r.toLowerCase()===`cimode`)return;let i=[],a=e=>{t.toResolveHierarchy(e).forEach(e=>{i.indexOf(e)<0&&i.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(e=>a(e)),i.forEach(t=>{this.allOptions.ns.forEach(r=>{e.read(t,r,`read`,null,null,(i,a)=>{i&&n.warn(`loading namespace ${r} for language ${t} failed`,i),!i&&a&&n.log(`loaded namespace ${r} for language ${t}`,a),e.loaded(`${t}|${r}`,i,a)})})})}};st.type=`backend`;var{slice:ct,forEach:lt}=[];function ut(e){return lt.call(ct.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function dt(e){return typeof e==`string`?[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e)):!1}var ft=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,pt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!ft.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!ft.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},mt={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=pt(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},ht={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return mt.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&mt.create(n,e,r,i,a)}},gt={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},_t={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},z=null,vt=()=>{if(z!==null)return z;try{if(z=typeof window<`u`&&window.localStorage!==null,!z)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{z=!1}return z},yt={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&vt())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&vt()&&window.localStorage.setItem(n,e)}},B=null,bt=()=>{if(B!==null)return B;try{if(B=typeof window<`u`&&window.sessionStorage!==null,!B)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{B=!1}return B},xt={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&bt())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&bt()&&window.sessionStorage.setItem(n,e)}},St={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Ct={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},wt={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},Tt={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Et=!1;try{document.cookie,Et=!0}catch{}var Dt=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];Et||Dt.splice(1,1);var Ot=()=>({order:Dt,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),kt=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=ut(t,this.options||{},Ot()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(ht),this.addDetector(gt),this.addDetector(yt),this.addDetector(xt),this.addDetector(St),this.addDetector(Ct),this.addDetector(wt),this.addDetector(Tt),this.addDetector(_t)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!dt(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};kt.type=`languageDetector`;var At=_(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),V=e(t(),1),jt={data:``},Mt=e=>{if(typeof window==`object`){let t=(e?e.querySelector(`#_goober`):window._goober)||Object.assign(document.createElement(`style`),{innerHTML:` `,id:`_goober`});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||jt},Nt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Pt=/\/\*[^]*?\*\/| +/g,Ft=/\n+/g,H=(e,t)=>{let n=``,r=``,i=``;for(let a in e){let o=e[a];a[0]==`@`?a[1]==`i`?n=a+` `+o+`;`:r+=a[1]==`f`?H(o,a):a+`{`+H(o,a[1]==`k`?``:t)+`}`:typeof o==`object`?r+=H(o,t?t.replace(/([^,])+/g,e=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+` `+t:t)):a):o!=null&&(a=a[1]==`-`?a:a.replace(/[A-Z]/g,`-$&`).toLowerCase(),i+=H.p?H.p(a,o):a+`:`+o+`;`)}return n+(t&&i?t+`{`+i+`}`:i)+r},U={},It=e=>{if(typeof e==`object`){let t=``;for(let n in e)t+=n+It(e[n]);return t}return e},Lt=(e,t,n,r,i)=>{let a=It(e),o=U[a]||(U[a]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return`go`+n})(a));if(!U[o]){let t=a===e?(e=>{let t,n,r=[{}];for(;t=Nt.exec(e.replace(Pt,``));)t[4]?r.shift():t[3]?(n=t[3].replace(Ft,` `).trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(Ft,` `).trim();return r[0]})(e):e;U[o]=H(i?{[`@keyframes `+o]:t}:t,n?``:`.`+o)}let s=n&&U.g;return n&&(U.g=U[o]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):t.data.indexOf(e)===-1&&(t.data=n?e+t.data:t.data+e)})(U[o],t,r,s),o},Rt=(e,t,n)=>e.reduce((e,r,i)=>{let a=t[i];if(a&&a.call){let e=a(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;a=t?`.`+t:e&&typeof e==`object`?e.props?``:H(e,``):!1===e?``:e}return e+r+(a??``)},``);function W(e){let t=this||{},n=e.call?e(t.p):e;return Lt(n.unshift?n.raw?Rt(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,Mt(t.target),t.g,t.o,t.k)}var zt,Bt,Vt;W.bind({g:1});var G=W.bind({k:1});function Ht(e,t,n,r){H.p=t,zt=e,Bt=n,Vt=r}function K(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),c=s.className||i.className;n.p=Object.assign({theme:Bt&&Bt()},s),n.o=/go\d/.test(c),s.className=W.apply(n,r)+(c?` `+c:``),t&&(s.ref=o);let l=e;return e[0]&&(l=s.as||e,delete s.as),Vt&&l[0]&&Vt(s),zt(l,s)}return t?t(i):i}}var Ut=e=>typeof e==`function`,q=(e,t)=>Ut(e)?e(t):e,Wt=(()=>{let e=0;return()=>(++e).toString()})(),Gt=(()=>{let e;return()=>{if(e===void 0&&typeof window<`u`){let t=matchMedia(`(prefers-reduced-motion: reduce)`);e=!t||t.matches}return e}})(),Kt=20,qt=`default`,Jt=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return Jt(e,{type:+!!e.toasts.find(e=>e.id===r.id),toast:r});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(e=>e.id===i||i===void 0?{...e,dismissed:!0,visible:!1}:e)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+a}))}}},J=[],Yt={toasts:[],pausedAt:void 0,settings:{toastLimit:Kt}},Y={},Xt=(e,t=qt)=>{Y[t]=Jt(Y[t]||Yt,e),J.forEach(([e,n])=>{e===t&&n(Y[t])})},Zt=e=>Object.keys(Y).forEach(t=>Xt(e,t)),Qt=e=>Object.keys(Y).find(t=>Y[t].toasts.some(t=>t.id===e)),X=(e=qt)=>t=>{Xt(t,e)},$t={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},en=(e={},t=qt)=>{let[n,r]=(0,V.useState)(Y[t]||Yt),i=(0,V.useRef)(Y[t]);(0,V.useEffect)(()=>(i.current!==Y[t]&&r(Y[t]),J.push([t,r]),()=>{let e=J.findIndex(([e])=>e===t);e>-1&&J.splice(e,1)}),[t]);let a=n.toasts.map(t=>({...e,...e[t.type],...t,removeDelay:t.removeDelay||e[t.type]?.removeDelay||e?.removeDelay,duration:t.duration||e[t.type]?.duration||e?.duration||$t[t.type],style:{...e.style,...e[t.type]?.style,...t.style}}));return{...n,toasts:a}},tn=(e,t=`blank`,n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:`status`,"aria-live":`polite`},message:e,pauseDuration:0,...n,id:n?.id||Wt()}),Z=e=>(t,n)=>{let r=tn(t,e,n);return X(r.toasterId||Qt(r.id))({type:2,toast:r}),r.id},Q=(e,t)=>Z(`blank`)(e,t);Q.error=Z(`error`),Q.success=Z(`success`),Q.loading=Z(`loading`),Q.custom=Z(`custom`),Q.dismiss=(e,t)=>{let n={type:3,toastId:e};t?X(t)(n):Zt(n)},Q.dismissAll=e=>Q.dismiss(void 0,e),Q.remove=(e,t)=>{let n={type:4,toastId:e};t?X(t)(n):Zt(n)},Q.removeAll=e=>Q.remove(void 0,e),Q.promise=(e,t,n)=>{let r=Q.loading(t.loading,{...n,...n?.loading});return typeof e==`function`&&(e=e()),e.then(e=>{let i=t.success?q(t.success,e):void 0;return i?Q.success(i,{id:r,...n,...n?.success}):Q.dismiss(r),e}).catch(e=>{let i=t.error?q(t.error,e):void 0;i?Q.error(i,{id:r,...n,...n?.error}):Q.dismiss(r)}),e};var nn=1e3,rn=(e,t=`default`)=>{let{toasts:n,pausedAt:r}=en(e,t),i=(0,V.useRef)(new Map).current,a=(0,V.useCallback)((e,t=nn)=>{if(i.has(e))return;let n=setTimeout(()=>{i.delete(e),o({type:4,toastId:e})},t);i.set(e,n)},[]);(0,V.useEffect)(()=>{if(r)return;let e=Date.now(),i=n.map(n=>{if(n.duration===1/0)return;let r=(n.duration||0)+n.pauseDuration-(e-n.createdAt);if(r<0){n.visible&&Q.dismiss(n.id);return}return setTimeout(()=>Q.dismiss(n.id,t),r)});return()=>{i.forEach(e=>e&&clearTimeout(e))}},[n,r,t]);let o=(0,V.useCallback)(X(t),[t]),s=(0,V.useCallback)(()=>{o({type:5,time:Date.now()})},[o]),c=(0,V.useCallback)((e,t)=>{o({type:1,toast:{id:e,height:t}})},[o]),l=(0,V.useCallback)(()=>{r&&o({type:6,time:Date.now()})},[r,o]),u=(0,V.useCallback)((e,t)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:a}=t||{},o=n.filter(t=>(t.position||a)===(e.position||a)&&t.height),s=o.findIndex(t=>t.id===e.id),c=o.filter((e,t)=>t<s&&e.visible).length;return o.filter(e=>e.visible).slice(...r?[c+1]:[0,c]).reduce((e,t)=>e+(t.height||0)+i,0)},[n]);return(0,V.useEffect)(()=>{n.forEach(e=>{if(e.dismissed)a(e.id,e.removeDelay);else{let t=i.get(e.id);t&&(clearTimeout(t),i.delete(e.id))}})},[n,a]),{toasts:n,handlers:{updateHeight:c,startPause:s,endPause:l,calculateOffset:u}}},an=G`
2
- from {
3
- transform: scale(0) rotate(45deg);
4
- opacity: 0;
5
- }
6
- to {
7
- transform: scale(1) rotate(45deg);
8
- opacity: 1;
9
- }`,on=G`
10
- from {
11
- transform: scale(0);
12
- opacity: 0;
13
- }
14
- to {
15
- transform: scale(1);
16
- opacity: 1;
17
- }`,sn=G`
18
- from {
19
- transform: scale(0) rotate(90deg);
20
- opacity: 0;
21
- }
22
- to {
23
- transform: scale(1) rotate(90deg);
24
- opacity: 1;
25
- }`,cn=K(`div`)`
26
- width: 20px;
27
- opacity: 0;
28
- height: 20px;
29
- border-radius: 10px;
30
- background: ${e=>e.primary||`#ff4b4b`};
31
- position: relative;
32
- transform: rotate(45deg);
33
-
34
- animation: ${an} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
35
- forwards;
36
- animation-delay: 100ms;
37
-
38
- &:after,
39
- &:before {
40
- content: '';
41
- animation: ${on} 0.15s ease-out forwards;
42
- animation-delay: 150ms;
43
- position: absolute;
44
- border-radius: 3px;
45
- opacity: 0;
46
- background: ${e=>e.secondary||`#fff`};
47
- bottom: 9px;
48
- left: 4px;
49
- height: 2px;
50
- width: 12px;
51
- }
52
-
53
- &:before {
54
- animation: ${sn} 0.15s ease-out forwards;
55
- animation-delay: 180ms;
56
- transform: rotate(90deg);
57
- }
58
- `,ln=G`
59
- from {
60
- transform: rotate(0deg);
61
- }
62
- to {
63
- transform: rotate(360deg);
64
- }
65
- `,un=K(`div`)`
66
- width: 12px;
67
- height: 12px;
68
- box-sizing: border-box;
69
- border: 2px solid;
70
- border-radius: 100%;
71
- border-color: ${e=>e.secondary||`#e0e0e0`};
72
- border-right-color: ${e=>e.primary||`#616161`};
73
- animation: ${ln} 1s linear infinite;
74
- `,dn=G`
75
- from {
76
- transform: scale(0) rotate(45deg);
77
- opacity: 0;
78
- }
79
- to {
80
- transform: scale(1) rotate(45deg);
81
- opacity: 1;
82
- }`,fn=G`
83
- 0% {
84
- height: 0;
85
- width: 0;
86
- opacity: 0;
87
- }
88
- 40% {
89
- height: 0;
90
- width: 6px;
91
- opacity: 1;
92
- }
93
- 100% {
94
- opacity: 1;
95
- height: 10px;
96
- }`,pn=K(`div`)`
97
- width: 20px;
98
- opacity: 0;
99
- height: 20px;
100
- border-radius: 10px;
101
- background: ${e=>e.primary||`#61d345`};
102
- position: relative;
103
- transform: rotate(45deg);
104
-
105
- animation: ${dn} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
106
- forwards;
107
- animation-delay: 100ms;
108
- &:after {
109
- content: '';
110
- box-sizing: border-box;
111
- animation: ${fn} 0.2s ease-out forwards;
112
- opacity: 0;
113
- animation-delay: 200ms;
114
- position: absolute;
115
- border-right: 2px solid;
116
- border-bottom: 2px solid;
117
- border-color: ${e=>e.secondary||`#fff`};
118
- bottom: 6px;
119
- left: 6px;
120
- height: 10px;
121
- width: 6px;
122
- }
123
- `,mn=K(`div`)`
124
- position: absolute;
125
- `,hn=K(`div`)`
126
- position: relative;
127
- display: flex;
128
- justify-content: center;
129
- align-items: center;
130
- min-width: 20px;
131
- min-height: 20px;
132
- `,gn=G`
133
- from {
134
- transform: scale(0.6);
135
- opacity: 0.4;
136
- }
137
- to {
138
- transform: scale(1);
139
- opacity: 1;
140
- }`,_n=K(`div`)`
141
- position: relative;
142
- transform: scale(0.6);
143
- opacity: 0.4;
144
- min-width: 20px;
145
- animation: ${gn} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
146
- forwards;
147
- `,vn=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t===void 0?n===`blank`?null:V.createElement(hn,null,V.createElement(un,{...r}),n!==`loading`&&V.createElement(mn,null,n===`error`?V.createElement(cn,{...r}):V.createElement(pn,{...r}))):typeof t==`string`?V.createElement(_n,null,t):t},yn=e=>`
148
- 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
149
- 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
150
- `,bn=e=>`
151
- 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
152
- 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
153
- `,xn=`0%{opacity:0;} 100%{opacity:1;}`,Sn=`0%{opacity:1;} 100%{opacity:0;}`,Cn=K(`div`)`
154
- display: flex;
155
- align-items: center;
156
- background: #fff;
157
- color: #363636;
158
- line-height: 1.3;
159
- will-change: transform;
160
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
161
- max-width: 350px;
162
- pointer-events: auto;
163
- padding: 8px 10px;
164
- border-radius: 8px;
165
- `,wn=K(`div`)`
166
- display: flex;
167
- justify-content: center;
168
- margin: 4px 10px;
169
- color: inherit;
170
- flex: 1 1 auto;
171
- white-space: pre-line;
172
- `,Tn=(e,t)=>{let n=e.includes(`top`)?1:-1,[r,i]=Gt()?[xn,Sn]:[yn(n),bn(n)];return{animation:t?`${G(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${G(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},En=V.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?Tn(e.position||t||`top-center`,e.visible):{opacity:0},a=V.createElement(vn,{toast:e}),o=V.createElement(wn,{...e.ariaProps},q(e.message,e));return V.createElement(Cn,{className:e.className,style:{...i,...n,...e.style}},typeof r==`function`?r({icon:a,message:o}):V.createElement(V.Fragment,null,a,o))});Ht(V.createElement);var Dn=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let a=V.useCallback(t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return V.createElement(`div`,{ref:a,className:t,style:n},i)},On=(e,t)=>{let n=e.includes(`top`),r=n?{top:0}:{bottom:0},i=e.includes(`center`)?{justifyContent:`center`}:e.includes(`right`)?{justifyContent:`flex-end`}:{};return{left:0,right:0,display:`flex`,position:`absolute`,transition:Gt()?void 0:`all 230ms cubic-bezier(.21,1.02,.73,1)`,transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},kn=W`
173
- z-index: 9999;
174
- > * {
175
- pointer-events: auto;
176
- }
177
- `,$=16,An=({reverseOrder:e,position:t=`top-center`,toastOptions:n,gutter:r,children:i,toasterId:a,containerStyle:o,containerClassName:s})=>{let{toasts:c,handlers:l}=rn(n,a);return V.createElement(`div`,{"data-rht-toaster":a||``,style:{position:`fixed`,zIndex:9999,top:$,left:$,right:$,bottom:$,pointerEvents:`none`,...o},className:s,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(n=>{let a=n.position||t,o=On(a,l.calculateOffset(n,{reverseOrder:e,gutter:r,defaultPosition:t}));return V.createElement(Dn,{id:n.id,key:n.id,onHeightUpdate:l.updateHeight,className:n.visible?kn:``,style:o},n.type===`custom`?q(n.message,n):i?i(n):V.createElement(En,{toast:n,position:a}))}))},jn=Q;export{st as a,ne as c,y as d,kt as i,te as l,jn as n,ze as o,At as r,j as s,An as t,b as u};
@@ -1,48 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-BFRubm34.js";import{O as t,k as n}from"./agent-server-client-options-wXLeJYeM.js";var r=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchEvents(e={}){return(await this.client.get(`/api/bash/bash_events/search`,{params:e})).data}async getEvent(e){return(await this.client.get(`/api/bash/bash_events/${e}`)).data}async getEvents(e){return Promise.all(e.map(async e=>{try{return await this.getEvent(e)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async startCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/start_bash_command`,r)).data}async executeCommand(e,t,n){let r=this.normalizeRequest(e,t,n);return(await this.client.post(`/api/bash/execute_bash_command`,r,{timeout:((r.timeout||30)+10)*1e3})).data}async clearEvents(){return(await this.client.delete(`/api/bash/bash_events`)).data}close(){this.client.close()}normalizeRequest(e,t,n){return typeof e==`string`?{command:e,...t?{cwd:t}:{},...n===void 0?{}:{timeout:Math.floor(n)}}:{...e,...e.timeout===void 0?{}:{timeout:Math.floor(e.timeout)}}}},i=`AGENT_SERVER_VERSION_TOO_OLD`,a={workspaces:{feature:`workspaces`,displayName:`Workspaces`,minVersion:`1.23.0`},hooks:{feature:`hooks`,displayName:`Hooks API`,minVersion:`1.23.0`},mcpTest:{feature:`mcp-test`,displayName:`MCP test API`,minVersion:`1.23.0`},cloudProxy:{feature:`cloud-proxy`,displayName:`Cloud proxy`,minVersion:`1.23.0`}},o=class e extends Error{constructor({requirement:t,actualVersion:n}){super(`${t.displayName} requires agent-server ${t.minVersion} or newer; this backend is running ${n}. Please upgrade your agent-server backend.`),this.code=i,this.name=`AgentServerVersionError`,this.feature=t.feature,this.displayName=t.displayName,this.requiredVersion=t.minVersion,this.actualVersion=n,Object.setPrototypeOf(this,e.prototype)}},s=new WeakMap;function c(e){return e instanceof o||typeof e==`object`&&!!e&&`code`in e&&e.code===`AGENT_SERVER_VERSION_TOO_OLD`}async function l(e){let t=s.get(e);if(t)return t;let n=e.get(`/server_info`).then(e=>e.data);return s.set(e,n),n}async function u(e,t){let n=await l(e),r=typeof n.version==`string`&&n.version.trim()?n.version.trim():`unknown`,i=d(r,t.minVersion);if(i===null||i<0)throw new o({requirement:t,actualVersion:r});return n}function d(e,t){let n=f(e),r=f(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function f(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}var p=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async searchSubdirectories(e,t={}){return(await this.client.get(`/api/file/search_subdirs`,{params:{path:e,page_id:t.pageId,limit:t.limit}})).data}async getHome(){return(await this.client.get(`/api/file/home`)).data}async downloadFile(e){return(await this.client.get(`/api/file/download`,{params:{path:e},responseType:`arrayBuffer`})).data}async downloadTextFile(e){return new TextDecoder().decode(await this.downloadFile(e))}async uploadFile(e,t,n){let r=new FormData,i=typeof File>`u`?void 0:File;return i&&e instanceof i?r.append(`file`,e,n||e.name):e instanceof Blob?r.append(`file`,e,n||`blob-file`):r.append(`file`,new Blob([e],{type:`text/plain`}),n||`text-file.txt`),(await this.client.post(`/api/file/upload`,r,{params:{path:t}})).data}async uploadTextFile(e,t,n){return this.uploadFile(e,t,n)}async downloadTrajectory(e){return(await this.client.get(`/api/file/download-trajectory/${encodeURIComponent(e)}`,{responseType:`blob`})).data}close(){this.client.close()}},m=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async testServer(e){return await u(this.client,a.mcpTest),(await this.client.post(`/api/mcp/test`,e,{timeout:(e.timeout??15)*1e3+5e3})).data}close(){this.client.close()}},h=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getUrl(e={}){return(await this.client.get(`/api/vscode/url`,{params:{...e.baseUrl?{base_url:e.baseUrl}:{},...e.workspaceDir?{workspace_dir:e.workspaceDir}:{}}})).data.url}async getStatus(){return(await this.client.get(`/api/vscode/status`)).data}close(){this.client.close()}},g=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async getSharedConversations(e){return(await this.client.get(`/api/shared-conversations`,{params:{ids:e}})).data}async getSharedConversation(e){return(await this.getSharedConversations([e]))[0]??null}async searchSharedEvents(e){return(await this.client.get(`/api/shared-events/search`,{params:{conversation_id:e.conversationId,limit:e.limit,page_id:e.pageId}})).data}close(){this.client.close()}},_=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:e.timeout||6e4})}async listWorkspaces(){return await this.ensureWorkspacesSupported(),(await this.client.get(`/api/workspaces`)).data}async addWorkspaces(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces`,{workspaces:e})).data}async deleteWorkspace(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces`,{params:{path:e}})).data}async addWorkspaceParents(e){return await this.ensureWorkspacesSupported(),(await this.client.post(`/api/workspaces/parents`,{parents:e})).data}async deleteWorkspaceParent(e){return await this.ensureWorkspacesSupported(),(await this.client.delete(`/api/workspaces/parents`,{params:{path:e}})).data}close(){this.client.close()}async ensureWorkspacesSupported(){await u(this.client,a.workspaces)}},v=e(((e,t)=>{t.exports=function(){throw Error(`ws does not work in the browser. Browser clients must use the native WebSocket object`)}}));if(typeof window<`u`&&window.WebSocket)window.WebSocket;else try{v()}catch{}var y=class{constructor(e,n){this.cachedEvents=[],this.cachedEventIds=new Set,this.client=e instanceof t?e:new t(e),this.conversationId=n}async search(e={}){let t={limit:e.limit??100};return e.page_id&&(t.page_id=e.page_id),e.kind&&(t.kind=e.kind),e.source&&(t.source=e.source),e.body&&(t.body=e.body),e.sort_order&&(t.sort_order=e.sort_order),e.timestamp__gte&&(t.timestamp__gte=e.timestamp__gte),e.timestamp__lt&&(t.timestamp__lt=e.timestamp__lt),(await this.client.get(`/api/conversations/${this.conversationId}/events/search`,{params:t})).data}async count(e={}){let t={};return e.kind&&(t.kind=e.kind),e.source&&(t.source=e.source),e.body&&(t.body=e.body),e.timestamp__gte&&(t.timestamp__gte=e.timestamp__gte),e.timestamp__lt&&(t.timestamp__lt=e.timestamp__lt),(await this.client.get(`/api/conversations/${this.conversationId}/events/count`,{params:t})).data}async getEventById(e){return(await this.client.get(`/api/conversations/${this.conversationId}/events/${e}`)).data}async getEventsById(e){return Promise.all(e.map(async e=>{try{return await this.getEventById(e)}catch(e){if(e instanceof n&&e.status===404)return null;throw e}}))}async addEvent(e){this.cachedEventIds.has(e.id)||(this.cachedEvents.push(e),this.cachedEventIds.add(e.id))}async append(e){await this.addEvent(e)}createDefaultCallback(e){return t=>{this.addEvent(t).catch(t=>{e&&e(t instanceof Error?t:Error(`Error adding event to cache: ${t}`))})}}async length(){return this.cachedEvents.length}async getEvent(e){return this.cachedEvents[e]}async getEvents(e,t){let n=[],r;for(;;){let e={limit:100};r&&(e.page_id=r);let t=(await this.client.get(`/api/conversations/${this.conversationId}/events/search`,{params:e})).data;if(n.push(...t.items),!t.next_page_id)break;r=t.next_page_id}let i=new Set(n.map(e=>e.id)),a=[...n,...this.cachedEvents.filter(e=>!i.has(e.id))];return e===void 0&&t===void 0?a:a.slice(e,t)}async*[Symbol.asyncIterator](){let e=await this.getEvents();for(let t of e)yield t}},b=`__full_state__`,x=class e{constructor(e,t){this.cachedState=null,this.cachedAt=0,this.lock=new S,this.client=e,this.conversationId=t,this._events=new y(e,t)}async getConversationInfo(){return await this.lock.acquire(async()=>{if(this.cachedState!==null&&Date.now()-this.cachedAt<e.CACHE_TTL_MS)return this.cachedState;let t=await this.client.get(`/api/conversations/${this.conversationId}`),n;return n=t.data.full_state?t.data.full_state:t.data,this.cachedState=n,this.cachedAt=Date.now(),n})}async refresh(){return this.cachedState=null,this.getConversationInfo()}async updateStateFromEvent(e){await this.lock.acquire(async()=>{if(e.key===b){this.cachedState===null&&(this.cachedState={});let t=e.value?.full_state??e.value;Object.assign(this.cachedState,t)}else this.cachedState===null&&(this.cachedState={}),this.cachedState[e.key]=e.value;this.cachedAt=Date.now()})}createStateUpdateCallback(e){return t=>{t.kind===`ConversationStateUpdateEvent`&&this.updateStateFromEvent(t).catch(t=>{e&&e(t instanceof Error?t:Error(`Error updating state from event: ${t}`))})}}get events(){return this._events}get id(){return this.conversationId}unwrapState(e){return e.full_state??e}async getExecutionStatus(){let e=await this.getConversationInfo(),t=this.unwrapState(e),n=t.execution_status??t.agent_status;if(n==null)throw Error(`execution_status missing in conversation info: ${JSON.stringify(e)}`);return n}async getAgentStatus(){return this.getExecutionStatus()}async setAgentStatus(e){throw Error(`Setting execution_status on RemoteState has no effect. Remote execution status is managed server-side. Attempted to set: ${e}`)}async getConfirmationPolicy(){let e=await this.getConversationInfo(),t=this.unwrapState(e).confirmation_policy;if(t==null)throw Error(`confirmation_policy missing in conversation info: ${JSON.stringify(e)}`);return t}async getActivatedKnowledgeSkills(){let e=await this.getConversationInfo();return this.unwrapState(e).activated_knowledge_skills||[]}async getAgent(){let e=await this.getConversationInfo(),t=this.unwrapState(e).agent;if(t==null)throw Error(`agent missing in conversation info: ${JSON.stringify(e)}`);return t}async getWorkspace(){let e=await this.getConversationInfo(),t=this.unwrapState(e).workspace;if(t==null)throw Error(`workspace missing in conversation info: ${JSON.stringify(e)}`);return t}async getPersistenceDir(){let e=await this.getConversationInfo(),t=this.unwrapState(e).persistence_dir;if(t==null)throw Error(`persistence_dir missing in conversation info: ${JSON.stringify(e)}`);return t}async modelDump(){let e=await this.getConversationInfo();return this.unwrapState(e)}async modelDumpJson(){let e=await this.modelDump();return JSON.stringify(e)}};x.CACHE_TTL_MS=2e3;var S=class{constructor(){this.locked=!1,this.queue=[]}async acquire(e){return new Promise((t,n)=>{let r=async()=>{try{t(await e())}catch(e){n(e)}finally{this.locked=!1;let e=this.queue.shift();e&&e()}};this.locked?this.queue.push(r):(this.locked=!0,r())})}},C=class{constructor(e){this.host=e.host.replace(/\/$/,``),this.workingDir=e.workingDir,this.apiKey=e.apiKey,this.client=new t({baseUrl:this.host,apiKey:this.apiKey,timeout:6e4}),this.bash=new r({host:this.host,...this.apiKey?{apiKey:this.apiKey}:{}})}async startWorkspaceSession(e){return await this.client.post(`/api/auth/workspace-session`,void 0,{credentials:`include`}),`${this.host}/api/conversations/${e}/workspace/`}async deleteWorkspaceSession(){await this.client.delete(`/api/auth/workspace-session`,{credentials:`include`,acceptableStatusCodes:new Set([204])})}async executeCommand(e,t,n=30){let r={command:e,timeout:Math.floor(n)};t&&(r.cwd=t);let i=(await this.client.post(`/api/bash/execute_bash_command`,r,{timeout:(n+10)*1e3})).data;return{command:e,exit_code:i.exit_code??0,stdout:i.stdout||``,stderr:i.stderr||``,timeout_occurred:!1}}async fileUpload(e,t,n){let r=new FormData,i,a;e instanceof File?(i=e,a=n||e.name):e instanceof Blob?(i=e,a=n||`blob-file`):(i=new Blob([e],{type:`text/plain`}),a=n||`text-file.txt`),r.append(`file`,i,a);let o=(await this.client.request({method:`POST`,url:`/api/file/upload`,params:{path:t},data:r,timeout:6e4})).data;return{success:o.success??!0,source_path:a,destination_path:t,file_size:o.file_size,error:o.error}}async fileDownload(e){let t=await this.client.get(`/api/file/download`,{params:{path:e},timeout:6e4}),n,r;if(typeof t.data==`string`)n=t.data,r=new Blob([t.data]).size;else if(t.data instanceof ArrayBuffer)n=new Blob([t.data]),r=t.data.byteLength;else if(t.data instanceof Blob)n=t.data,r=t.data.size;else{let e=JSON.stringify(t.data);n=e,r=new Blob([e]).size}return{success:!0,source_path:e,content:n,file_size:r}}async gitChanges(e,t={}){let n={path:e};t.ref!==void 0&&(n.ref=t.ref);try{return(await this.client.get(`/api/git/changes`,{params:n})).data}catch(e){throw Error(`Failed to get git changes: ${e instanceof Error?e.message:String(e)}`,{cause:e})}}async gitDiff(e,t={}){let n={path:e};t.ref!==void 0&&(n.ref=t.ref);try{return(await this.client.get(`/api/git/diff`,{params:n})).data}catch(e){throw Error(`Failed to get git diff: ${e instanceof Error?e.message:String(e)}`,{cause:e})}}async uploadText(e,t,n){return this.fileUpload(e,t,n)}async uploadFileObject(e,t){return this.fileUpload(e,t)}async downloadAsText(e){let t=await this.fileDownload(e);if(!t.success)throw Error(t.error||`Download failed`);return typeof t.content==`string`?t.content:t.content instanceof Blob?await t.content.text():``}async downloadAsBlob(e){let t=await this.fileDownload(e);if(!t.success)throw Error(t.error||`Download failed`);return t.content instanceof Blob?t.content:typeof t.content==`string`?new Blob([t.content],{type:`text/plain`}):new Blob}async downloadAndSave(e,t){let n=await this.downloadAsBlob(e),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=t||e.split(`/`).pop()||`download`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}close(){this.bash.close(),this.client.close()}},w={execute_command:`Execute a bash command in the terminal within a persistent shell session.
2
-
3
- ### Command Execution
4
- * One command at a time: You can only execute one bash command at a time. If you need to run multiple commands sequentially, use \`&&\` or \`;\` to chain them together.
5
- * Persistent session: Commands execute in a persistent shell session where environment variables, virtual environments, and working directory persist between commands.
6
-
7
- ### Best Practices
8
- * Directory verification: Before creating new directories or files, first verify the parent directory exists and is the correct location.
9
- * Directory management: Try to maintain working directory by using absolute paths and avoiding excessive use of \`cd\`.
10
-
11
- ### Output Handling
12
- * Output truncation: If the output exceeds a maximum length, it will be truncated before being returned.`,read_file:`Read the contents of a file from the workspace.
13
-
14
- Custom editing tool for viewing, creating and editing files in plain-text format.
15
- * If \`path\` is a text file, returns the file contents with line numbers
16
- * If \`path\` is a directory, lists non-hidden files and directories up to 2 levels deep
17
-
18
- Best practices:
19
- * Use this tool to understand the file's contents and context before making edits
20
- * Verify the directory path is correct when working with files`,write_file:`Write content to a file in the workspace. Creates the file if it does not exist.
21
-
22
- When making edits:
23
- * Ensure the edit results in idiomatic, correct code
24
- * Do not leave the code in a broken state
25
- * Always use absolute file paths (starting with /)
26
-
27
- CRITICAL REQUIREMENTS:
28
- * The content should be the complete file content, not a diff or patch
29
- * Ensure proper formatting and indentation`,think:`Use the tool to think about something. It will not obtain new information or make any changes to the repository, but just log the thought. Use it when complex reasoning or brainstorming is needed.
30
-
31
- Common use cases:
32
- 1. When exploring a repository and discovering the source of a bug, call this tool to brainstorm several unique ways of fixing the bug, and assess which change(s) are likely to be simplest and most effective.
33
- 2. After receiving test results, use this tool to brainstorm ways to fix failing tests.
34
- 3. When planning a complex refactoring, use this tool to outline different approaches and their tradeoffs.
35
- 4. When designing a new feature, use this tool to think through architecture decisions and implementation details.
36
- 5. When debugging a complex issue, use this tool to organize your thoughts and hypotheses.
37
-
38
- The tool simply logs your thought process for better transparency and does not execute any code or make changes.`,finish:`Signals the completion of the current task or conversation.
39
-
40
- Use this tool when:
41
- - You have successfully completed the user's requested task
42
- - You cannot proceed further due to technical limitations or missing information
43
-
44
- The message should include:
45
- - A clear summary of actions taken and their results
46
- - Any next steps for the user
47
- - Explanation if you're unable to complete the task
48
- - Any follow-up questions if more information is needed`};w.execute_command,w.read_file,w.write_file,w.think,w.finish;var T;(function(e){e.PRE_TOOL_USE=`PreToolUse`,e.POST_TOOL_USE=`PostToolUse`,e.USER_PROMPT_SUBMIT=`UserPromptSubmit`,e.SESSION_START=`SessionStart`,e.SESSION_END=`SessionEnd`,e.STOP=`Stop`})(T||={});var E;(function(e){e.COMMAND=`command`,e.PROMPT=`prompt`})(E||={});var D;if((function(e){e.ALLOW=`allow`,e.DENY=`deny`})(D||={}),new Set(`|.*+?[]()^$\\`.split(``)),typeof window<`u`&&window.WebSocket)window.WebSocket;else try{v()}catch{}var O;(function(e){e.TIMESTAMP=`TIMESTAMP`,e.TIMESTAMP_DESC=`TIMESTAMP_DESC`})(O||={}),(function(e){e.REVERSE_TIMESTAMP=`TIMESTAMP_DESC`})(O||={});var k;(function(e){e.IDLE=`idle`,e.RUNNING=`running`,e.PAUSED=`paused`,e.WAITING_FOR_CONFIRMATION=`waiting_for_confirmation`,e.FINISHED=`finished`,e.ERROR=`error`,e.STUCK=`stuck`,e.DELETING=`deleting`})(k||={});var A;(function(e){e.CREATED_AT=`CREATED_AT`,e.UPDATED_AT=`UPDATED_AT`,e.CREATED_AT_DESC=`CREATED_AT_DESC`,e.UPDATED_AT_DESC=`UPDATED_AT_DESC`})(A||={});var j={"claude-code":{key:`claude-code`,display_name:`Claude Code`,default_command:[`npx`,`-y`,`@agentclientprotocol/claude-agent-acp`],api_key_env_var:`ANTHROPIC_API_KEY`,base_url_env_var:`ANTHROPIC_BASE_URL`,default_session_mode:`bypassPermissions`,agent_name_patterns:[`claude-agent`],supports_set_session_model:!1,supports_runtime_model_switch:!0,session_meta_key:`claudeCode`,available_models:[{id:`claude-opus-4-7`,label:`Claude Opus 4.7`},{id:`claude-opus-4-6`,label:`Claude Opus 4.6`},{id:`opus[1m]`,label:`Claude Opus (1M)`},{id:`claude-opus-4-5`,label:`Claude Opus 4.5`},{id:`claude-opus-4-1-20250805`,label:`Claude Opus 4.1`},{id:`claude-sonnet-4-6`,label:`Claude Sonnet 4.6`},{id:`sonnet[1m]`,label:`Claude Sonnet (1M)`},{id:`claude-sonnet-4-5`,label:`Claude Sonnet 4.5`},{id:`claude-haiku-4-5`,label:`Claude Haiku 4.5`},{id:`opusplan`,label:`Opus (plan) + Sonnet (execute)`}],default_model:`claude-opus-4-7`},codex:{key:`codex`,display_name:`Codex`,default_command:[`npx`,`-y`,`@zed-industries/codex-acp`],api_key_env_var:`OPENAI_API_KEY`,base_url_env_var:`OPENAI_BASE_URL`,default_session_mode:`full-access`,agent_name_patterns:[`codex-acp`],supports_set_session_model:!0,supports_runtime_model_switch:!0,session_meta_key:null,available_models:[{id:`gpt-5.5/low`,label:`GPT-5.5 (low)`},{id:`gpt-5.5/medium`,label:`GPT-5.5 (medium)`},{id:`gpt-5.5/high`,label:`GPT-5.5 (high)`},{id:`gpt-5.5/xhigh`,label:`GPT-5.5 (xhigh)`},{id:`gpt-5.4/low`,label:`GPT-5.4 (low)`},{id:`gpt-5.4/medium`,label:`GPT-5.4 (medium)`},{id:`gpt-5.4/high`,label:`GPT-5.4 (high)`},{id:`gpt-5.4/xhigh`,label:`GPT-5.4 (xhigh)`},{id:`gpt-5.4-mini/low`,label:`GPT-5.4 Mini (low)`},{id:`gpt-5.4-mini/medium`,label:`GPT-5.4 Mini (medium)`},{id:`gpt-5.4-mini/high`,label:`GPT-5.4 Mini (high)`},{id:`gpt-5.4-mini/xhigh`,label:`GPT-5.4 Mini (xhigh)`},{id:`gpt-5.3-codex/low`,label:`GPT-5.3 Codex (low)`},{id:`gpt-5.3-codex/medium`,label:`GPT-5.3 Codex (medium)`},{id:`gpt-5.3-codex/high`,label:`GPT-5.3 Codex (high)`},{id:`gpt-5.3-codex/xhigh`,label:`GPT-5.3 Codex (xhigh)`},{id:`gpt-5.2/low`,label:`GPT-5.2 (low)`},{id:`gpt-5.2/medium`,label:`GPT-5.2 (medium)`},{id:`gpt-5.2/high`,label:`GPT-5.2 (high)`},{id:`gpt-5.2/xhigh`,label:`GPT-5.2 (xhigh)`}],default_model:`gpt-5.5/medium`},"gemini-cli":{key:`gemini-cli`,display_name:`Gemini CLI`,default_command:[`npx`,`-y`,`@google/gemini-cli`,`--acp`],api_key_env_var:`GEMINI_API_KEY`,base_url_env_var:`GEMINI_BASE_URL`,default_session_mode:`yolo`,agent_name_patterns:[`gemini-cli`],supports_set_session_model:!0,supports_runtime_model_switch:!0,session_meta_key:null,available_models:[{id:`auto-gemini-3`,label:`Auto (Gemini 3)`},{id:`auto-gemini-2.5`,label:`Auto (Gemini 2.5)`},{id:`gemini-3.1-pro-preview`,label:`Gemini 3.1 Pro (preview)`},{id:`gemini-3-flash-preview`,label:`Gemini 3 Flash (preview)`},{id:`gemini-3.1-flash-lite-preview`,label:`Gemini 3.1 Flash Lite (preview)`},{id:`gemini-2.5-pro`,label:`Gemini 2.5 Pro`},{id:`gemini-2.5-flash`,label:`Gemini 2.5 Flash`},{id:`gemini-2.5-flash-lite`,label:`Gemini 2.5 Flash Lite`}],default_model:`auto-gemini-2.5`}};function M(e){return e?j[e]??null:null}var N=[`acp_command`,`acp_args`,`acp_env`,`acp_model`,`acp_session_mode`,`acp_prompt_timeout`,`acp_server`];export{y as a,h as c,c as d,r as f,C as i,m as l,M as n,_ as o,A as r,g as s,N as t,p as u};
@@ -1 +0,0 @@
1
- import{t as e}from"./createLucideIcon-CkGTf9Qj.js";var t=e(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);export{t};
@@ -1,2 +0,0 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);var e=`openhands-agent-server-app-preferences`,t=`openhands-agent-server-disabled-skills`,n=()=>typeof window<`u`,r=()=>{if(!n())return null;try{let t=window.localStorage.getItem(e);if(!t)return null;let n=JSON.parse(t);return!n||typeof n!=`object`||Array.isArray(n)?null:n}catch{return null}},i=()=>{if(!n())return null;try{let e=window.localStorage.getItem(t);if(!e)return null;let n=JSON.parse(e);return Array.isArray(n)?n.filter(e=>typeof e==`string`):null}catch{return null}},a=()=>{if(n())try{window.localStorage.removeItem(e),window.localStorage.removeItem(t)}catch{}},o=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`],s=(e,t)=>{let n={};if(e)for(let t of o){let r=e[t];r!==void 0&&(n[t]=r)}return t&&(n.disabled_skills=t),Object.keys(n).length>0?n:null},c=async(e,t)=>{if(!e.misc_settings)return!1;let n=s(r(),i());if(!n)return!1;try{return await t(n),a(),!0}catch{return!1}};exports.migrateLegacyAppPreferences=c;
2
- //# sourceMappingURL=legacy-app-preferences-migration.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacy-app-preferences-migration.cjs","names":[],"sources":["../../../src/api/settings-service/legacy-app-preferences-migration.ts"],"sourcesContent":["/**\n * One-shot migration: promote app preferences and disabled_skills from\n * pre-1.27 agent-canvas's localStorage into the agent-server's persisted\n * `misc_settings.app_preferences` block (introduced via SDK PRs #3539 +\n * follow-up refactor).\n *\n * Older versions stored these fields under two localStorage keys because\n * the local agent-server had no native home for them:\n *\n * - `openhands-agent-server-app-preferences` — { language?, git_user_name?,\n * git_user_email?, enable_sound_notifications?, user_consents_to_analytics? }\n * - `openhands-agent-server-disabled-skills` — string[]\n *\n * Once the server reports a `misc_settings` block (even one with empty\n * defaults), we check those legacy keys, push any non-empty values up to\n * the server via a single PATCH, and clear the keys. The check is\n * idempotent: on subsequent calls both keys are absent and the function\n * no-ops.\n *\n * Failures during the PATCH are tolerated — the legacy keys are left in\n * place so a later attempt can retry. This keeps the migration a best-effort\n * side-effect of `getSettings`; if it never succeeds, the user just sees\n * empty server-side preferences (the same as a fresh install).\n */\n\nimport type { SettingsValue } from \"#/types/settings\";\nimport type {\n AppPreferences,\n SettingsApiResponse,\n} from \"./settings-service.api\";\n\nconst LEGACY_APP_PREFERENCES_KEY = \"openhands-agent-server-app-preferences\";\nconst LEGACY_DISABLED_SKILLS_KEY = \"openhands-agent-server-disabled-skills\";\n\nconst isBrowser = (): boolean => typeof window !== \"undefined\";\n\nconst readLegacyAppPreferences = (): AppPreferences | null => {\n if (!isBrowser()) return null;\n try {\n const raw = window.localStorage.getItem(LEGACY_APP_PREFERENCES_KEY);\n if (!raw) return null;\n const parsed = JSON.parse(raw) as unknown;\n if (!parsed || typeof parsed !== \"object\" || Array.isArray(parsed)) {\n return null;\n }\n return parsed as AppPreferences;\n } catch {\n return null;\n }\n};\n\nconst readLegacyDisabledSkills = (): string[] | null => {\n if (!isBrowser()) return null;\n try {\n const raw = window.localStorage.getItem(LEGACY_DISABLED_SKILLS_KEY);\n if (!raw) return null;\n const parsed = JSON.parse(raw) as unknown;\n if (!Array.isArray(parsed)) return null;\n return parsed.filter((v): v is string => typeof v === \"string\");\n } catch {\n return null;\n }\n};\n\nconst clearLegacyKeys = (): void => {\n if (!isBrowser()) return;\n try {\n window.localStorage.removeItem(LEGACY_APP_PREFERENCES_KEY);\n window.localStorage.removeItem(LEGACY_DISABLED_SKILLS_KEY);\n } catch {\n // ignore; the migration will be retried on next read\n }\n};\n\nconst APP_PREFERENCE_KEYS = [\n \"language\",\n \"user_consents_to_analytics\",\n \"enable_sound_notifications\",\n \"git_user_name\",\n \"git_user_email\",\n] as const;\n\nconst buildDiff = (\n storedPrefs: AppPreferences | null,\n storedSkills: string[] | null,\n): AppPreferences | null => {\n const diff: Record<string, unknown> = {};\n if (storedPrefs) {\n for (const key of APP_PREFERENCE_KEYS) {\n const value = (storedPrefs as Record<string, unknown>)[key];\n if (value !== undefined) {\n diff[key] = value;\n }\n }\n }\n if (storedSkills) {\n diff.disabled_skills = storedSkills;\n }\n return Object.keys(diff).length > 0\n ? (diff as Record<string, SettingsValue> as AppPreferences)\n : null;\n};\n\n/**\n * Returns `true` when a migration PATCH was issued (caller should re-fetch\n * settings). Returns `false` when no legacy data was present.\n */\nexport const migrateLegacyAppPreferences = async (\n serverResponse: SettingsApiResponse,\n pushDiff: (diff: AppPreferences) => Promise<unknown>,\n): Promise<boolean> => {\n // Only run when the server actually returns a `misc_settings` block\n // (server is new enough to accept the diff). Older servers omit the\n // field entirely; the migration stays pending until the user upgrades.\n if (!serverResponse.misc_settings) return false;\n\n const storedPrefs = readLegacyAppPreferences();\n const storedSkills = readLegacyDisabledSkills();\n const diff = buildDiff(storedPrefs, storedSkills);\n if (!diff) return false;\n\n try {\n await pushDiff(diff);\n clearLegacyKeys();\n return true;\n } catch {\n // Leave the legacy keys for a later retry; we don't want to lose data on\n // a transient network failure.\n return false;\n }\n};\n\nexport const __TEST_ONLY = {\n LEGACY_APP_PREFERENCES_KEY,\n LEGACY_DISABLED_SKILLS_KEY,\n};\n"],"mappings":"gDA+BA,IAAM,EAA6B,yCAC7B,EAA6B,yCAE7B,MAA2B,OAAO,OAAW,IAE7C,MAAwD,CAC5D,GAAI,CAAC,GAAW,CAAE,OAAO,KACzB,GAAI,CACF,IAAM,EAAM,OAAO,aAAa,QAAQ,EAA2B,CACnE,GAAI,CAAC,EAAK,OAAO,KACjB,IAAM,EAAS,KAAK,MAAM,EAAI,CAI9B,MAHI,CAAC,GAAU,OAAO,GAAW,UAAY,MAAM,QAAQ,EAAO,CACzD,KAEF,OACD,CACN,OAAO,OAIL,MAAkD,CACtD,GAAI,CAAC,GAAW,CAAE,OAAO,KACzB,GAAI,CACF,IAAM,EAAM,OAAO,aAAa,QAAQ,EAA2B,CACnE,GAAI,CAAC,EAAK,OAAO,KACjB,IAAM,EAAS,KAAK,MAAM,EAAI,CAE9B,OADK,MAAM,QAAQ,EAAO,CACnB,EAAO,OAAQ,GAAmB,OAAO,GAAM,SAAS,CAD5B,UAE7B,CACN,OAAO,OAIL,MAA8B,CAC7B,MAAW,CAChB,GAAI,CACF,OAAO,aAAa,WAAW,EAA2B,CAC1D,OAAO,aAAa,WAAW,EAA2B,MACpD,IAKJ,EAAsB,CAC1B,WACA,6BACA,6BACA,gBACA,iBACD,CAEK,GACJ,EACA,IAC0B,CAC1B,IAAM,EAAgC,EAAE,CACxC,GAAI,EACF,IAAK,IAAM,KAAO,EAAqB,CACrC,IAAM,EAAS,EAAwC,GACnD,IAAU,IAAA,KACZ,EAAK,GAAO,GAOlB,OAHI,IACF,EAAK,gBAAkB,GAElB,OAAO,KAAK,EAAK,CAAC,OAAS,EAC7B,EACD,MAOO,EAA8B,MACzC,EACA,IACqB,CAIrB,GAAI,CAAC,EAAe,cAAe,MAAO,GAI1C,IAAM,EAAO,EAFO,GAEG,CADF,GACe,CAAa,CACjD,GAAI,CAAC,EAAM,MAAO,GAElB,GAAI,CAGF,OAFA,MAAM,EAAS,EAAK,CACpB,GAAiB,CACV,QACD,CAGN,MAAO"}
@@ -1,34 +0,0 @@
1
- /**
2
- * One-shot migration: promote app preferences and disabled_skills from
3
- * pre-1.27 agent-canvas's localStorage into the agent-server's persisted
4
- * `misc_settings.app_preferences` block (introduced via SDK PRs #3539 +
5
- * follow-up refactor).
6
- *
7
- * Older versions stored these fields under two localStorage keys because
8
- * the local agent-server had no native home for them:
9
- *
10
- * - `openhands-agent-server-app-preferences` — { language?, git_user_name?,
11
- * git_user_email?, enable_sound_notifications?, user_consents_to_analytics? }
12
- * - `openhands-agent-server-disabled-skills` — string[]
13
- *
14
- * Once the server reports a `misc_settings` block (even one with empty
15
- * defaults), we check those legacy keys, push any non-empty values up to
16
- * the server via a single PATCH, and clear the keys. The check is
17
- * idempotent: on subsequent calls both keys are absent and the function
18
- * no-ops.
19
- *
20
- * Failures during the PATCH are tolerated — the legacy keys are left in
21
- * place so a later attempt can retry. This keeps the migration a best-effort
22
- * side-effect of `getSettings`; if it never succeeds, the user just sees
23
- * empty server-side preferences (the same as a fresh install).
24
- */
25
- import type { AppPreferences, SettingsApiResponse } from "./settings-service.api";
26
- /**
27
- * Returns `true` when a migration PATCH was issued (caller should re-fetch
28
- * settings). Returns `false` when no legacy data was present.
29
- */
30
- export declare const migrateLegacyAppPreferences: (serverResponse: SettingsApiResponse, pushDiff: (diff: AppPreferences) => Promise<unknown>) => Promise<boolean>;
31
- export declare const __TEST_ONLY: {
32
- LEGACY_APP_PREFERENCES_KEY: string;
33
- LEGACY_DISABLED_SKILLS_KEY: string;
34
- };
@@ -1,52 +0,0 @@
1
- //#region src/api/settings-service/legacy-app-preferences-migration.ts
2
- var e = "openhands-agent-server-app-preferences", t = "openhands-agent-server-disabled-skills", n = () => typeof window < "u", r = () => {
3
- if (!n()) return null;
4
- try {
5
- let t = window.localStorage.getItem(e);
6
- if (!t) return null;
7
- let n = JSON.parse(t);
8
- return !n || typeof n != "object" || Array.isArray(n) ? null : n;
9
- } catch {
10
- return null;
11
- }
12
- }, i = () => {
13
- if (!n()) return null;
14
- try {
15
- let e = window.localStorage.getItem(t);
16
- if (!e) return null;
17
- let n = JSON.parse(e);
18
- return Array.isArray(n) ? n.filter((e) => typeof e == "string") : null;
19
- } catch {
20
- return null;
21
- }
22
- }, a = () => {
23
- if (n()) try {
24
- window.localStorage.removeItem(e), window.localStorage.removeItem(t);
25
- } catch {}
26
- }, o = [
27
- "language",
28
- "user_consents_to_analytics",
29
- "enable_sound_notifications",
30
- "git_user_name",
31
- "git_user_email"
32
- ], s = (e, t) => {
33
- let n = {};
34
- if (e) for (let t of o) {
35
- let r = e[t];
36
- r !== void 0 && (n[t] = r);
37
- }
38
- return t && (n.disabled_skills = t), Object.keys(n).length > 0 ? n : null;
39
- }, c = async (e, t) => {
40
- if (!e.misc_settings) return !1;
41
- let n = s(r(), i());
42
- if (!n) return !1;
43
- try {
44
- return await t(n), a(), !0;
45
- } catch {
46
- return !1;
47
- }
48
- };
49
- //#endregion
50
- export { c as migrateLegacyAppPreferences };
51
-
52
- //# sourceMappingURL=legacy-app-preferences-migration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"legacy-app-preferences-migration.js","names":[],"sources":["../../../src/api/settings-service/legacy-app-preferences-migration.ts"],"sourcesContent":["/**\n * One-shot migration: promote app preferences and disabled_skills from\n * pre-1.27 agent-canvas's localStorage into the agent-server's persisted\n * `misc_settings.app_preferences` block (introduced via SDK PRs #3539 +\n * follow-up refactor).\n *\n * Older versions stored these fields under two localStorage keys because\n * the local agent-server had no native home for them:\n *\n * - `openhands-agent-server-app-preferences` — { language?, git_user_name?,\n * git_user_email?, enable_sound_notifications?, user_consents_to_analytics? }\n * - `openhands-agent-server-disabled-skills` — string[]\n *\n * Once the server reports a `misc_settings` block (even one with empty\n * defaults), we check those legacy keys, push any non-empty values up to\n * the server via a single PATCH, and clear the keys. The check is\n * idempotent: on subsequent calls both keys are absent and the function\n * no-ops.\n *\n * Failures during the PATCH are tolerated — the legacy keys are left in\n * place so a later attempt can retry. This keeps the migration a best-effort\n * side-effect of `getSettings`; if it never succeeds, the user just sees\n * empty server-side preferences (the same as a fresh install).\n */\n\nimport type { SettingsValue } from \"#/types/settings\";\nimport type {\n AppPreferences,\n SettingsApiResponse,\n} from \"./settings-service.api\";\n\nconst LEGACY_APP_PREFERENCES_KEY = \"openhands-agent-server-app-preferences\";\nconst LEGACY_DISABLED_SKILLS_KEY = \"openhands-agent-server-disabled-skills\";\n\nconst isBrowser = (): boolean => typeof window !== \"undefined\";\n\nconst readLegacyAppPreferences = (): AppPreferences | null => {\n if (!isBrowser()) return null;\n try {\n const raw = window.localStorage.getItem(LEGACY_APP_PREFERENCES_KEY);\n if (!raw) return null;\n const parsed = JSON.parse(raw) as unknown;\n if (!parsed || typeof parsed !== \"object\" || Array.isArray(parsed)) {\n return null;\n }\n return parsed as AppPreferences;\n } catch {\n return null;\n }\n};\n\nconst readLegacyDisabledSkills = (): string[] | null => {\n if (!isBrowser()) return null;\n try {\n const raw = window.localStorage.getItem(LEGACY_DISABLED_SKILLS_KEY);\n if (!raw) return null;\n const parsed = JSON.parse(raw) as unknown;\n if (!Array.isArray(parsed)) return null;\n return parsed.filter((v): v is string => typeof v === \"string\");\n } catch {\n return null;\n }\n};\n\nconst clearLegacyKeys = (): void => {\n if (!isBrowser()) return;\n try {\n window.localStorage.removeItem(LEGACY_APP_PREFERENCES_KEY);\n window.localStorage.removeItem(LEGACY_DISABLED_SKILLS_KEY);\n } catch {\n // ignore; the migration will be retried on next read\n }\n};\n\nconst APP_PREFERENCE_KEYS = [\n \"language\",\n \"user_consents_to_analytics\",\n \"enable_sound_notifications\",\n \"git_user_name\",\n \"git_user_email\",\n] as const;\n\nconst buildDiff = (\n storedPrefs: AppPreferences | null,\n storedSkills: string[] | null,\n): AppPreferences | null => {\n const diff: Record<string, unknown> = {};\n if (storedPrefs) {\n for (const key of APP_PREFERENCE_KEYS) {\n const value = (storedPrefs as Record<string, unknown>)[key];\n if (value !== undefined) {\n diff[key] = value;\n }\n }\n }\n if (storedSkills) {\n diff.disabled_skills = storedSkills;\n }\n return Object.keys(diff).length > 0\n ? (diff as Record<string, SettingsValue> as AppPreferences)\n : null;\n};\n\n/**\n * Returns `true` when a migration PATCH was issued (caller should re-fetch\n * settings). Returns `false` when no legacy data was present.\n */\nexport const migrateLegacyAppPreferences = async (\n serverResponse: SettingsApiResponse,\n pushDiff: (diff: AppPreferences) => Promise<unknown>,\n): Promise<boolean> => {\n // Only run when the server actually returns a `misc_settings` block\n // (server is new enough to accept the diff). Older servers omit the\n // field entirely; the migration stays pending until the user upgrades.\n if (!serverResponse.misc_settings) return false;\n\n const storedPrefs = readLegacyAppPreferences();\n const storedSkills = readLegacyDisabledSkills();\n const diff = buildDiff(storedPrefs, storedSkills);\n if (!diff) return false;\n\n try {\n await pushDiff(diff);\n clearLegacyKeys();\n return true;\n } catch {\n // Leave the legacy keys for a later retry; we don't want to lose data on\n // a transient network failure.\n return false;\n }\n};\n\nexport const __TEST_ONLY = {\n LEGACY_APP_PREFERENCES_KEY,\n LEGACY_DISABLED_SKILLS_KEY,\n};\n"],"mappings":";AA+BA,IAAM,IAA6B,0CAC7B,IAA6B,0CAE7B,UAA2B,OAAO,SAAW,KAE7C,UAAwD;AAC5D,KAAI,CAAC,GAAW,CAAE,QAAO;AACzB,KAAI;EACF,IAAM,IAAM,OAAO,aAAa,QAAQ,EAA2B;AACnE,MAAI,CAAC,EAAK,QAAO;EACjB,IAAM,IAAS,KAAK,MAAM,EAAI;AAI9B,SAHI,CAAC,KAAU,OAAO,KAAW,YAAY,MAAM,QAAQ,EAAO,GACzD,OAEF;SACD;AACN,SAAO;;GAIL,UAAkD;AACtD,KAAI,CAAC,GAAW,CAAE,QAAO;AACzB,KAAI;EACF,IAAM,IAAM,OAAO,aAAa,QAAQ,EAA2B;AACnE,MAAI,CAAC,EAAK,QAAO;EACjB,IAAM,IAAS,KAAK,MAAM,EAAI;AAE9B,SADK,MAAM,QAAQ,EAAO,GACnB,EAAO,QAAQ,MAAmB,OAAO,KAAM,SAAS,GAD5B;SAE7B;AACN,SAAO;;GAIL,UAA8B;AAC7B,QAAW,CAChB,KAAI;AAEF,EADA,OAAO,aAAa,WAAW,EAA2B,EAC1D,OAAO,aAAa,WAAW,EAA2B;SACpD;GAKJ,IAAsB;CAC1B;CACA;CACA;CACA;CACA;CACD,EAEK,KACJ,GACA,MAC0B;CAC1B,IAAM,IAAgC,EAAE;AACxC,KAAI,EACF,MAAK,IAAM,KAAO,GAAqB;EACrC,IAAM,IAAS,EAAwC;AACvD,EAAI,MAAU,KAAA,MACZ,EAAK,KAAO;;AAOlB,QAHI,MACF,EAAK,kBAAkB,IAElB,OAAO,KAAK,EAAK,CAAC,SAAS,IAC7B,IACD;GAOO,IAA8B,OACzC,GACA,MACqB;AAIrB,KAAI,CAAC,EAAe,cAAe,QAAO;CAI1C,IAAM,IAAO,EAFO,GAEG,EADF,GACe,CAAa;AACjD,KAAI,CAAC,EAAM,QAAO;AAElB,KAAI;AAGF,SAFA,MAAM,EAAS,EAAK,EACpB,GAAiB,EACV;SACD;AAGN,SAAO"}
@@ -1,2 +0,0 @@
1
- require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../node_modules/@tanstack/react-query/build/modern/useQuery.cjs`),t=require(`./use-verified-models.cjs`);var n=()=>e.useQuery({queryKey:t.VERIFIED_MODELS_QUERY_KEY,queryFn:t.fetchVerifiedModelsByProvider,select:e=>e?.openhands??[],staleTime:t.VERIFIED_MODELS_STALE_TIME,gcTime:t.VERIFIED_MODELS_GC_TIME});exports.useOpenhandsVerifiedModels=n;
2
- //# sourceMappingURL=use-openhands-verified-models.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-openhands-verified-models.cjs","names":[],"sources":["../../../src/hooks/query/use-openhands-verified-models.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\nexport const useOpenhandsVerifiedModels = () =>\n useQuery({\n queryKey: VERIFIED_MODELS_QUERY_KEY,\n queryFn: fetchVerifiedModelsByProvider,\n select: (data) => data?.openhands ?? [],\n staleTime: VERIFIED_MODELS_STALE_TIME,\n gcTime: VERIFIED_MODELS_GC_TIME,\n });\n"],"mappings":"6KAQA,IAAa,MACX,EAAA,SAAS,CACP,SAAU,EAAA,0BACV,QAAS,EAAA,8BACT,OAAS,GAAS,GAAM,WAAa,EAAE,CACvC,UAAW,EAAA,2BACX,OAAQ,EAAA,wBACT,CAAC"}
@@ -1 +0,0 @@
1
- export declare const useOpenhandsVerifiedModels: () => import("@tanstack/react-query").UseQueryResult<string[], import("axios").AxiosError<unknown, any>>;
@@ -1,14 +0,0 @@
1
- import { useQuery as e } from "../../node_modules/@tanstack/react-query/build/modern/useQuery.js";
2
- import { VERIFIED_MODELS_GC_TIME as t, VERIFIED_MODELS_QUERY_KEY as n, VERIFIED_MODELS_STALE_TIME as r, fetchVerifiedModelsByProvider as i } from "./use-verified-models.js";
3
- //#region src/hooks/query/use-openhands-verified-models.ts
4
- var a = () => e({
5
- queryKey: n,
6
- queryFn: i,
7
- select: (e) => e?.openhands ?? [],
8
- staleTime: r,
9
- gcTime: t
10
- });
11
- //#endregion
12
- export { a as useOpenhandsVerifiedModels };
13
-
14
- //# sourceMappingURL=use-openhands-verified-models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-openhands-verified-models.js","names":[],"sources":["../../../src/hooks/query/use-openhands-verified-models.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport {\n VERIFIED_MODELS_GC_TIME,\n VERIFIED_MODELS_QUERY_KEY,\n VERIFIED_MODELS_STALE_TIME,\n fetchVerifiedModelsByProvider,\n} from \"./use-verified-models\";\n\nexport const useOpenhandsVerifiedModels = () =>\n useQuery({\n queryKey: VERIFIED_MODELS_QUERY_KEY,\n queryFn: fetchVerifiedModelsByProvider,\n select: (data) => data?.openhands ?? [],\n staleTime: VERIFIED_MODELS_STALE_TIME,\n gcTime: VERIFIED_MODELS_GC_TIME,\n });\n"],"mappings":";;;AAQA,IAAa,UACX,EAAS;CACP,UAAU;CACV,SAAS;CACT,SAAS,MAAS,GAAM,aAAa,EAAE;CACvC,WAAW;CACX,QAAQ;CACT,CAAC"}
@@ -1,2 +0,0 @@
1
- require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`./openhands-llm.cjs`);var t=`litellm_proxy/`;function n(n,r,i){if(!n)return``;if(!n.startsWith(t)||!e.isOpenHandsProxyBaseUrl(r))return n;let a=n.slice(14);return i.includes(a)?`openhands/${a}`:n}exports.normalizeDisplayModel=n;
2
- //# sourceMappingURL=normalize-display-model.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize-display-model.cjs","names":[],"sources":["../../src/utils/normalize-display-model.ts"],"sourcesContent":["import { isOpenHandsProxyBaseUrl } from \"#/utils/openhands-llm\";\n\nconst LITELLM_PROXY_PREFIX = \"litellm_proxy/\";\n\n/**\n * Reverse the SDK's `openhands/* -> litellm_proxy/*` rewrite for display.\n *\n * The agent-server's LLM validator stores curated OpenHands models as\n * `litellm_proxy/<m>` against the All-Hands proxy base URL. Without\n * normalization the GUI re-loads such settings as `litellm_proxy`, so the\n * provider dropdown silently switches off \"OpenHands\" after every save.\n */\nexport function normalizeDisplayModel(\n rawModel: string | null | undefined,\n baseUrl: string | null | undefined,\n openhandsVerifiedModels: readonly string[],\n): string {\n if (!rawModel) return \"\";\n if (!rawModel.startsWith(LITELLM_PROXY_PREFIX)) return rawModel;\n if (!isOpenHandsProxyBaseUrl(baseUrl)) return rawModel;\n const modelName = rawModel.slice(LITELLM_PROXY_PREFIX.length);\n if (!openhandsVerifiedModels.includes(modelName)) return rawModel;\n return `openhands/${modelName}`;\n}\n"],"mappings":"oFAEA,IAAM,EAAuB,iBAU7B,SAAgB,EACd,EACA,EACA,EACQ,CACR,GAAI,CAAC,EAAU,MAAO,GAEtB,GADI,CAAC,EAAS,WAAW,EAAqB,EAC1C,CAAC,EAAA,wBAAwB,EAAQ,CAAE,OAAO,EAC9C,IAAM,EAAY,EAAS,MAAM,GAA4B,CAE7D,OADK,EAAwB,SAAS,EAAU,CACzC,aAAa,IADqC"}