monaco-editor-core 0.54.0 → 0.55.0-dev-20251007

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 (251) hide show
  1. package/esm/nls.messages.de.js +1 -1
  2. package/esm/nls.messages.es.js +1 -1
  3. package/esm/nls.messages.fr.js +1 -1
  4. package/esm/nls.messages.it.js +1 -1
  5. package/esm/nls.messages.ja.js +1 -1
  6. package/esm/nls.messages.ko.js +1 -1
  7. package/esm/nls.messages.ru.js +1 -1
  8. package/esm/nls.messages.zh-cn.js +1 -1
  9. package/esm/nls.messages.zh-tw.js +1 -1
  10. package/esm/vs/base/browser/canIUse.js +1 -0
  11. package/esm/vs/base/browser/canIUse.js.map +1 -1
  12. package/esm/vs/base/browser/dom.js +9 -0
  13. package/esm/vs/base/browser/dom.js.map +1 -1
  14. package/esm/vs/base/browser/fastDomNode.js.map +1 -1
  15. package/esm/vs/base/browser/mouseEvent.js +3 -0
  16. package/esm/vs/base/browser/mouseEvent.js.map +1 -1
  17. package/esm/vs/base/browser/trustedTypes.js +2 -0
  18. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  19. package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
  20. package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
  21. package/esm/vs/base/browser/ui/sash/sash.css +1 -1
  22. package/esm/vs/base/browser/ui/sash/sash.js +4 -0
  23. package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
  24. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
  25. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  26. package/esm/vs/base/browser/ui/table/table.css +2 -2
  27. package/esm/vs/base/browser/ui/tree/abstractTree.js +7 -3
  28. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  29. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +4 -0
  30. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  31. package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -0
  32. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  33. package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
  34. package/esm/vs/base/browser/webWorkerFactory.js +3 -0
  35. package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
  36. package/esm/vs/base/common/buffer.js.map +1 -1
  37. package/esm/vs/base/common/decorators.js +1 -0
  38. package/esm/vs/base/common/decorators.js.map +1 -1
  39. package/esm/vs/base/common/errors.js +1 -0
  40. package/esm/vs/base/common/errors.js.map +1 -1
  41. package/esm/vs/base/common/glob.js +1 -1
  42. package/esm/vs/base/common/glob.js.map +1 -1
  43. package/esm/vs/base/common/hash.js.map +1 -1
  44. package/esm/vs/base/common/hotReload.js +2 -0
  45. package/esm/vs/base/common/hotReload.js.map +1 -1
  46. package/esm/vs/base/common/hotReloadHelpers.js +1 -0
  47. package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
  48. package/esm/vs/base/common/lifecycle.js +19 -0
  49. package/esm/vs/base/common/lifecycle.js.map +1 -1
  50. package/esm/vs/base/common/map.js.map +1 -1
  51. package/esm/vs/base/common/marshalling.js +4 -0
  52. package/esm/vs/base/common/marshalling.js.map +1 -1
  53. package/esm/vs/base/common/network.js +1 -0
  54. package/esm/vs/base/common/network.js.map +1 -1
  55. package/esm/vs/base/common/objects.js +1 -0
  56. package/esm/vs/base/common/objects.js.map +1 -1
  57. package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
  58. package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
  59. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
  60. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  61. package/esm/vs/base/common/observableInternal/debugName.js +1 -0
  62. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  63. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
  64. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  65. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
  66. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
  67. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
  68. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
  69. package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
  70. package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
  71. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
  72. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  73. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
  74. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  75. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
  76. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  77. package/esm/vs/base/common/process.js +1 -0
  78. package/esm/vs/base/common/process.js.map +1 -1
  79. package/esm/vs/base/common/product.js.map +1 -1
  80. package/esm/vs/base/common/types.js +2 -0
  81. package/esm/vs/base/common/types.js.map +1 -1
  82. package/esm/vs/base/common/worker/webWorker.js +26 -14
  83. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  84. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
  85. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
  86. package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
  87. package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
  88. package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
  89. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  90. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
  91. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
  92. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
  93. package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
  94. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  95. package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
  96. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  97. package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
  98. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  99. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  100. package/esm/vs/editor/browser/editorDom.js.map +1 -1
  101. package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
  102. package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
  103. package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
  104. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
  105. package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
  106. package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
  107. package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
  108. package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
  109. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  110. package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
  111. package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
  112. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  113. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  114. package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
  115. package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
  116. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  117. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  118. package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
  119. package/esm/vs/editor/browser/view.js.map +1 -1
  120. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
  121. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  122. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
  123. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
  124. package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
  125. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
  126. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  127. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
  128. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
  129. package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
  130. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
  131. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
  132. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
  133. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  134. package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
  135. package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
  136. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
  137. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  138. package/esm/vs/editor/common/config/editorOptions.js +122 -68
  139. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  140. package/esm/vs/editor/common/config/fontInfo.js +32 -16
  141. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  142. package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
  143. package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
  144. package/esm/vs/editor/common/core/edits/edit.js +1 -0
  145. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  146. package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
  147. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  148. package/esm/vs/editor/common/core/position.js +1 -1
  149. package/esm/vs/editor/common/core/position.js.map +1 -1
  150. package/esm/vs/editor/common/core/range.js +1 -1
  151. package/esm/vs/editor/common/core/range.js.map +1 -1
  152. package/esm/vs/editor/common/core/selection.js +1 -1
  153. package/esm/vs/editor/common/core/selection.js.map +1 -1
  154. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  155. package/esm/vs/editor/common/editorCommon.js.map +1 -1
  156. package/esm/vs/editor/common/languages.js +1 -1
  157. package/esm/vs/editor/common/languages.js.map +1 -1
  158. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
  159. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
  160. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
  161. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
  162. package/esm/vs/editor/common/model/textModel.js +1 -1
  163. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  164. package/esm/vs/editor/common/model.js +1 -1
  165. package/esm/vs/editor/common/model.js.map +1 -1
  166. package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
  167. package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
  168. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  169. package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
  170. package/esm/vs/editor/common/services/modelService.js +14 -21
  171. package/esm/vs/editor/common/services/modelService.js.map +1 -1
  172. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  173. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  174. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
  175. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  176. package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
  177. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  178. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
  179. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
  180. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
  181. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  182. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
  183. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  184. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
  185. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
  186. package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
  187. package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
  188. package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
  189. package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
  190. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  191. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  192. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
  193. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
  194. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  195. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +4 -3
  196. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  197. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  205. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  206. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  207. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  208. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
  209. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
  210. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  211. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
  212. package/esm/vs/editor/editor.api.d.ts +8 -8
  213. package/esm/vs/editor/editor.api.js +4 -0
  214. package/esm/vs/editor/editor.api.js.map +1 -1
  215. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
  216. package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
  217. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  218. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
  219. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  220. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  221. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  222. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
  223. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
  224. package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
  225. package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
  226. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  227. package/esm/vs/platform/commands/common/commands.js.map +1 -1
  228. package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
  229. package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
  230. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -0
  231. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
  232. package/esm/vs/platform/dnd/browser/dnd.js +2 -0
  233. package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
  234. package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
  235. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  236. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
  237. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  238. package/esm/vs/platform/list/browser/listService.js +5 -0
  239. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  240. package/esm/vs/platform/log/common/log.js.map +1 -1
  241. package/esm/vs/platform/log/common/logService.js.map +1 -1
  242. package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
  243. package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
  244. package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
  245. package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
  246. package/esm/vs/platform/product/common/product.js +69 -0
  247. package/esm/vs/platform/product/common/product.js.map +1 -0
  248. package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
  249. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  250. package/monaco.d.ts +8 -8
  251. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/services/hoverService/hoverService.ts","vs/editor/browser/services/hoverService/hoverService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAqB,iBAAiB,EAAE,MAAM,yDAAy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M,CAAC;IACpB,CAAC;IAED,SAAS;QACR,OAAO;YACN,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAChB,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;SAChB,CAAC;IACH,CAAC;IAED,MAAM;QACL,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;CACD;AAED,SAAS,qBAAqB,CAAC,OAAoB,EAAE,WAAyB;IAC7E,WAAW,GAAG,WAAW,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9D,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;QACzE,OAAO,GAAG,OAAO,CAAC,aAAc,CAAC;IAClC,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,iBAAiB,CAAC,aAAa,EAAE,YAAY,oCAA4B,CAAC;AAE1E,0BAA0B,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;IAC/C,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACtD,IAAI,WAAW,EAAE,CAAC;QACjB,SAAS,CAAC,OAAO,CAAC,uGAAuG,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5J,SAAS,CAAC,OAAO,CAAC,iEAAiE,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvH,CAAC;AACF,CAAC,CAAC,CAAC","file":"hoverService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\nimport { editorHoverBorder } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { HoverWidget } from './hoverWidget.js';\nimport { IContextViewProvider, IDelegate } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { addDisposableListener, EventType, getActiveElement, isAncestorOfActiveElement, isAncestor, getWindow, isHTMLElement, isEditableElement } from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { ILayoutService } from '../../../../platform/layout/browser/layoutService.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\nimport { ContextViewHandler } from '../../../../platform/contextview/browser/contextViewService.js';\nimport { isManagedHoverTooltipMarkdownString, type IHoverLifecycleOptions, type IHoverOptions, type IHoverWidget, type IManagedHover, type IManagedHoverContentOrFactory, type IManagedHoverOptions } from '../../../../base/browser/ui/hover/hover.js';\nimport { IHoverDelegate, IHoverDelegateTarget } from '../../../../base/browser/ui/hover/hoverDelegate.js';\nimport { ManagedHoverWidget } from './updatableHoverWidget.js';\nimport { timeout, TimeoutTimer } from '../../../../base/common/async.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { isNumber, isString } from '../../../../base/common/types.js';\nimport { KeyChord, KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { KeybindingsRegistry, KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { IMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { stripIcons } from '../../../../base/common/iconLabels.js';\n\nexport class HoverService extends Disposable implements IHoverService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _contextViewHandler: IContextViewProvider;\n\tprivate _currentHoverOptions: IHoverOptions | undefined;\n\tprivate _currentHover: HoverWidget | undefined;\n\tprivate _currentDelayedHover: HoverWidget | undefined;\n\tprivate _currentDelayedHoverWasShown: boolean = false;\n\tprivate _currentDelayedHoverGroupId: number | string | undefined;\n\tprivate _lastHoverOptions: IHoverOptions | undefined;\n\n\tprivate _lastFocusedElementBeforeOpen: HTMLElement | undefined;\n\n\tprivate readonly _delayedHovers = new Map<HTMLElement, { show: (focus: boolean) => void }>();\n\tprivate readonly _managedHovers = new Map<HTMLElement, IManagedHover>();\n\n\tconstructor(\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IContextMenuService contextMenuService: IContextMenuService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@ILayoutService private readonly _layoutService: ILayoutService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._register(contextMenuService.onDidShowContextMenu(() => this.hideHover()));\n\t\tthis._contextViewHandler = this._register(new ContextViewHandler(this._layoutService));\n\n\t\tthis._register(KeybindingsRegistry.registerCommandAndKeybindingRule({\n\t\t\tid: 'workbench.action.showHover',\n\t\t\tweight: KeybindingWeight.WorkbenchContrib - 1,\n\t\t\twhen: EditorContextKeys.editorTextFocus.negate(),\n\t\t\tprimary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI),\n\t\t\thandler: () => { this._showAndFocusHoverForActiveElement(); },\n\t\t}));\n\t}\n\n\tshowInstantHover(options: IHoverOptions, focus?: boolean, skipLastFocusedUpdate?: boolean, dontShow?: boolean): IHoverWidget | undefined {\n\t\tconst hover = this._createHover(options, skipLastFocusedUpdate);\n\t\tif (!hover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthis._showHover(hover, options, focus);\n\t\treturn hover;\n\t}\n\n\tshowDelayedHover(\n\t\toptions: IHoverOptions,\n\t\tlifecycleOptions: Pick<IHoverLifecycleOptions, 'groupId'>,\n\t): IHoverWidget | undefined {\n\t\t// Set `id` to default if it's undefined\n\t\tif (options.id === undefined) {\n\t\t\toptions.id = getHoverIdFromContent(options.content);\n\t\t}\n\n\t\tif (!this._currentDelayedHover || this._currentDelayedHoverWasShown) {\n\t\t\t// Current hover is locked, reject\n\t\t\tif (this._currentHover?.isLocked) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\t// Identity is the same, return current hover\n\t\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t\treturn this._currentHover;\n\t\t\t}\n\n\t\t\t// Check group identity, if it's the same skip the delay and show the hover immediately\n\t\t\tif (this._currentHover && !this._currentHover.isDisposed && this._currentDelayedHoverGroupId !== undefined && this._currentDelayedHoverGroupId === lifecycleOptions?.groupId) {\n\t\t\t\treturn this.showInstantHover({\n\t\t\t\t\t...options,\n\t\t\t\t\tappearance: {\n\t\t\t\t\t\t...options.appearance,\n\t\t\t\t\t\tskipFadeInAnimation: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (this._currentDelayedHover && getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t// If the hover is the same but timeout is not finished yet, return the current hover\n\t\t\treturn this._currentDelayedHover;\n\t\t}\n\n\t\tconst hover = this._createHover(options, undefined);\n\t\tif (!hover) {\n\t\t\tthis._currentDelayedHover = undefined;\n\t\t\tthis._currentDelayedHoverWasShown = false;\n\t\t\tthis._currentDelayedHoverGroupId = undefined;\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthis._currentDelayedHover = hover;\n\t\tthis._currentDelayedHoverWasShown = false;\n\t\tthis._currentDelayedHoverGroupId = lifecycleOptions?.groupId;\n\n\t\ttimeout(this._configurationService.getValue<number>('workbench.hover.delay')).then(() => {\n\t\t\tif (hover && !hover.isDisposed) {\n\t\t\t\tthis._currentDelayedHoverWasShown = true;\n\t\t\t\tthis._showHover(hover, options);\n\t\t\t}\n\t\t});\n\n\t\treturn hover;\n\t}\n\n\tsetupDelayedHover(\n\t\ttarget: HTMLElement,\n\t\toptions: (() => Omit<IHoverOptions, 'target'>) | Omit<IHoverOptions, 'target'>,\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t): IDisposable {\n\t\tconst resolveHoverOptions = () => ({\n\t\t\t...typeof options === 'function' ? options() : options,\n\t\t\ttarget\n\t\t} satisfies IHoverOptions);\n\t\treturn this._setupDelayedHover(target, resolveHoverOptions, lifecycleOptions);\n\t}\n\n\tsetupDelayedHoverAtMouse(\n\t\ttarget: HTMLElement,\n\t\toptions: (() => Omit<IHoverOptions, 'target' | 'position'>) | Omit<IHoverOptions, 'target' | 'position'>,\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t): IDisposable {\n\t\tconst resolveHoverOptions = (e?: MouseEvent) => ({\n\t\t\t...typeof options === 'function' ? options() : options,\n\t\t\ttarget: {\n\t\t\t\ttargetElements: [target],\n\t\t\t\tx: e !== undefined ? e.x + 10 : undefined,\n\t\t\t}\n\t\t} satisfies IHoverOptions);\n\t\treturn this._setupDelayedHover(target, resolveHoverOptions, lifecycleOptions);\n\t}\n\n\tprivate _setupDelayedHover(\n\t\ttarget: HTMLElement,\n\t\tresolveHoverOptions: ((e?: MouseEvent) => IHoverOptions),\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t) {\n\t\tconst store = new DisposableStore();\n\t\tstore.add(addDisposableListener(target, EventType.MOUSE_OVER, e => {\n\t\t\tthis.showDelayedHover(resolveHoverOptions(e), {\n\t\t\t\tgroupId: lifecycleOptions?.groupId\n\t\t\t});\n\t\t}));\n\t\tif (lifecycleOptions?.setupKeyboardEvents) {\n\t\t\tstore.add(addDisposableListener(target, EventType.KEY_DOWN, e => {\n\t\t\t\tconst evt = new StandardKeyboardEvent(e);\n\t\t\t\tif (evt.equals(KeyCode.Space) || evt.equals(KeyCode.Enter)) {\n\t\t\t\t\tthis.showInstantHover(resolveHoverOptions(), true);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\tthis._delayedHovers.set(target, { show: (focus: boolean) => { this.showInstantHover(resolveHoverOptions(), focus); } });\n\t\tstore.add(toDisposable(() => this._delayedHovers.delete(target)));\n\n\t\treturn store;\n\t}\n\n\tprivate _createHover(options: IHoverOptions, skipLastFocusedUpdate?: boolean): HoverWidget | undefined {\n\t\tthis._currentDelayedHover = undefined;\n\n\t\tif (this._currentHover?.isLocked) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Set `id` to default if it's undefined\n\t\tif (options.id === undefined) {\n\t\t\toptions.id = getHoverIdFromContent(options.content);\n\t\t}\n\n\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthis._currentHoverOptions = options;\n\t\tthis._lastHoverOptions = options;\n\t\tconst trapFocus = options.trapFocus || this._accessibilityService.isScreenReaderOptimized();\n\t\tconst activeElement = getActiveElement();\n\t\t// HACK, remove this check when #189076 is fixed\n\t\tif (!skipLastFocusedUpdate) {\n\t\t\tif (trapFocus && activeElement) {\n\t\t\t\tif (!activeElement.classList.contains('monaco-hover')) {\n\t\t\t\t\tthis._lastFocusedElementBeforeOpen = activeElement as HTMLElement;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._lastFocusedElementBeforeOpen = undefined;\n\t\t\t}\n\t\t}\n\n\t\tconst hoverDisposables = new DisposableStore();\n\t\tconst hover = this._instantiationService.createInstance(HoverWidget, options);\n\t\tif (options.persistence?.sticky) {\n\t\t\thover.isLocked = true;\n\t\t}\n\n\t\t// Adjust target position when a mouse event is provided as the hover position\n\t\tif (options.position?.hoverPosition && !isNumber(options.position.hoverPosition)) {\n\t\t\toptions.target = {\n\t\t\t\ttargetElements: isHTMLElement(options.target) ? [options.target] : options.target.targetElements,\n\t\t\t\tx: options.position.hoverPosition.x + 10\n\t\t\t};\n\t\t}\n\n\t\thover.onDispose(() => {\n\t\t\tconst hoverWasFocused = this._currentHover?.domNode && isAncestorOfActiveElement(this._currentHover.domNode);\n\t\t\tif (hoverWasFocused) {\n\t\t\t\t// Required to handle cases such as closing the hover with the escape key\n\t\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t\t}\n\n\t\t\t// Only clear the current options if it's the current hover, the current options help\n\t\t\t// reduce flickering when the same hover is shown multiple times\n\t\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t\tthis.doHideHover();\n\t\t\t}\n\t\t\thoverDisposables.dispose();\n\t\t}, undefined, hoverDisposables);\n\t\t// Set the container explicitly to enable aux window support\n\t\tif (!options.container) {\n\t\t\tconst targetElement = isHTMLElement(options.target) ? options.target : options.target.targetElements[0];\n\t\t\toptions.container = this._layoutService.getContainer(getWindow(targetElement));\n\t\t}\n\n\t\thover.onRequestLayout(() => this._contextViewHandler.layout(), undefined, hoverDisposables);\n\t\tif (options.persistence?.sticky) {\n\t\t\thoverDisposables.add(addDisposableListener(getWindow(options.container).document, EventType.MOUSE_DOWN, e => {\n\t\t\t\tif (!isAncestor(e.target as HTMLElement, hover.domNode)) {\n\t\t\t\t\tthis.doHideHover();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tif ('targetElements' in options.target) {\n\t\t\t\tfor (const element of options.target.targetElements) {\n\t\t\t\t\thoverDisposables.add(addDisposableListener(element, EventType.CLICK, () => this.hideHover()));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thoverDisposables.add(addDisposableListener(options.target, EventType.CLICK, () => this.hideHover()));\n\t\t\t}\n\t\t\tconst focusedElement = getActiveElement();\n\t\t\tif (focusedElement) {\n\t\t\t\tconst focusedElementDocument = getWindow(focusedElement).document;\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_DOWN, e => this._keyDown(e, hover, !!options.persistence?.hideOnKeyDown)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_DOWN, e => this._keyDown(e, hover, !!options.persistence?.hideOnKeyDown)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_UP, e => this._keyUp(e, hover)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_UP, e => this._keyUp(e, hover)));\n\t\t\t}\n\t\t}\n\n\t\tif ('IntersectionObserver' in mainWindow) {\n\t\t\tconst observer = new IntersectionObserver(e => this._intersectionChange(e, hover), { threshold: 0 });\n\t\t\tconst firstTargetElement = 'targetElements' in options.target ? options.target.targetElements[0] : options.target;\n\t\t\tobserver.observe(firstTargetElement);\n\t\t\thoverDisposables.add(toDisposable(() => observer.disconnect()));\n\t\t}\n\n\t\tthis._currentHover = hover;\n\n\t\treturn hover;\n\t}\n\n\tprivate _showHover(hover: HoverWidget, options: IHoverOptions, focus?: boolean) {\n\t\tthis._contextViewHandler.showContextView(\n\t\t\tnew HoverContextViewDelegate(hover, focus),\n\t\t\toptions.container\n\t\t);\n\t}\n\n\thideHover(force?: boolean): void {\n\t\tif ((!force && this._currentHover?.isLocked) || !this._currentHoverOptions) {\n\t\t\treturn;\n\t\t}\n\t\tthis.doHideHover();\n\t}\n\n\tprivate doHideHover(): void {\n\t\tthis._currentHover = undefined;\n\t\tthis._currentHoverOptions = undefined;\n\t\tthis._contextViewHandler.hideContextView();\n\t}\n\n\tprivate _intersectionChange(entries: IntersectionObserverEntry[], hover: IDisposable): void {\n\t\tconst entry = entries[entries.length - 1];\n\t\tif (!entry.isIntersecting) {\n\t\t\thover.dispose();\n\t\t}\n\t}\n\n\tshowAndFocusLastHover(): void {\n\t\tif (!this._lastHoverOptions) {\n\t\t\treturn;\n\t\t}\n\t\tthis.showInstantHover(this._lastHoverOptions, true, true);\n\t}\n\n\tprivate _showAndFocusHoverForActiveElement(): void {\n\t\t// TODO: if hover is visible, focus it to avoid flickering\n\n\t\tlet activeElement = getActiveElement() as HTMLElement | null;\n\t\twhile (activeElement) {\n\t\t\tconst hover = this._delayedHovers.get(activeElement) ?? this._managedHovers.get(activeElement);\n\t\t\tif (hover) {\n\t\t\t\thover.show(true);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tactiveElement = activeElement.parentElement;\n\t\t}\n\t}\n\n\tprivate _keyDown(e: KeyboardEvent, hover: HoverWidget, hideOnKeyDown: boolean) {\n\t\tif (e.key === 'Alt') {\n\t\t\thover.isLocked = true;\n\t\t\treturn;\n\t\t}\n\t\tconst event = new StandardKeyboardEvent(e);\n\t\tconst keybinding = this._keybindingService.resolveKeyboardEvent(event);\n\t\tif (keybinding.getSingleModifierDispatchChords().some(value => !!value) || this._keybindingService.softDispatch(event, event.target).kind !== ResultKind.NoMatchingKb) {\n\t\t\treturn;\n\t\t}\n\t\tif (hideOnKeyDown && (!this._currentHoverOptions?.trapFocus || e.key !== 'Tab')) {\n\t\t\tthis.hideHover();\n\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t}\n\t}\n\n\tprivate _keyUp(e: KeyboardEvent, hover: HoverWidget) {\n\t\tif (e.key === 'Alt') {\n\t\t\thover.isLocked = false;\n\t\t\t// Hide if alt is released while the mouse is not over hover/target\n\t\t\tif (!hover.isMouseIn) {\n\t\t\t\tthis.hideHover();\n\t\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t// TODO: Investigate performance of this function. There seems to be a lot of content created\n\t// and thrown away on start up\n\tsetupManagedHover(hoverDelegate: IHoverDelegate, targetElement: HTMLElement, content: IManagedHoverContentOrFactory, options?: IManagedHoverOptions | undefined): IManagedHover {\n\t\tif (hoverDelegate.showNativeHover) {\n\t\t\treturn setupNativeHover(targetElement, content);\n\t\t}\n\n\t\ttargetElement.setAttribute('custom-hover', 'true');\n\n\t\tif (targetElement.title !== '') {\n\t\t\tconsole.warn('HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute.');\n\t\t\tconsole.trace('Stack trace:', targetElement.title);\n\t\t\ttargetElement.title = '';\n\t\t}\n\n\t\tlet hoverPreparation: IDisposable | undefined;\n\t\tlet hoverWidget: ManagedHoverWidget | undefined;\n\n\t\tconst hideHover = (disposeWidget: boolean, disposePreparation: boolean) => {\n\t\t\tconst hadHover = hoverWidget !== undefined;\n\t\t\tif (disposeWidget) {\n\t\t\t\thoverWidget?.dispose();\n\t\t\t\thoverWidget = undefined;\n\t\t\t}\n\t\t\tif (disposePreparation) {\n\t\t\t\thoverPreparation?.dispose();\n\t\t\t\thoverPreparation = undefined;\n\t\t\t}\n\t\t\tif (hadHover) {\n\t\t\t\thoverDelegate.onDidHideHover?.();\n\t\t\t\thoverWidget = undefined;\n\t\t\t}\n\t\t};\n\n\t\tconst triggerShowHover = (delay: number, focus?: boolean, target?: IHoverDelegateTarget, trapFocus?: boolean) => {\n\t\t\treturn new TimeoutTimer(async () => {\n\t\t\t\tif (!hoverWidget || hoverWidget.isDisposed) {\n\t\t\t\t\thoverWidget = new ManagedHoverWidget(hoverDelegate, target || targetElement, delay > 0);\n\t\t\t\t\tawait hoverWidget.update(typeof content === 'function' ? content() : content, focus, { ...options, trapFocus });\n\t\t\t\t}\n\t\t\t}, delay);\n\t\t};\n\n\t\tconst store = new DisposableStore();\n\t\tlet isMouseDown = false;\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_DOWN, () => {\n\t\t\tisMouseDown = true;\n\t\t\thideHover(true, true);\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_UP, () => {\n\t\t\tisMouseDown = false;\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_LEAVE, (e: MouseEvent) => {\n\t\t\tisMouseDown = false;\n\t\t\thideHover(false, (<any>e).fromElement === targetElement);\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_OVER, (e: MouseEvent) => {\n\t\t\tif (hoverPreparation) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst mouseOverStore: DisposableStore = new DisposableStore();\n\n\t\t\tconst target: IHoverDelegateTarget = {\n\t\t\t\ttargetElements: [targetElement],\n\t\t\t\tdispose: () => { }\n\t\t\t};\n\t\t\tif (hoverDelegate.placement === undefined || hoverDelegate.placement === 'mouse') {\n\t\t\t\t// track the mouse position\n\t\t\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\t\t\ttarget.x = e.x + 10;\n\t\t\t\t\tif ((isHTMLElement(e.target)) && getHoverTargetElement(e.target, targetElement) !== targetElement) {\n\t\t\t\t\t\thideHover(true, true);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tmouseOverStore.add(addDisposableListener(targetElement, EventType.MOUSE_MOVE, onMouseMove, true));\n\t\t\t}\n\n\t\t\thoverPreparation = mouseOverStore;\n\n\t\t\tif ((isHTMLElement(e.target)) && getHoverTargetElement(e.target as HTMLElement, targetElement) !== targetElement) {\n\t\t\t\treturn; // Do not show hover when the mouse is over another hover target\n\t\t\t}\n\n\t\t\tmouseOverStore.add(triggerShowHover(typeof hoverDelegate.delay === 'function' ? hoverDelegate.delay(content) : hoverDelegate.delay, false, target));\n\t\t}, true));\n\n\t\tconst onFocus = () => {\n\t\t\tif (isMouseDown || hoverPreparation) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst target: IHoverDelegateTarget = {\n\t\t\t\ttargetElements: [targetElement],\n\t\t\t\tdispose: () => { }\n\t\t\t};\n\t\t\tconst toDispose: DisposableStore = new DisposableStore();\n\t\t\tconst onBlur = () => hideHover(true, true);\n\t\t\ttoDispose.add(addDisposableListener(targetElement, EventType.BLUR, onBlur, true));\n\t\t\ttoDispose.add(triggerShowHover(typeof hoverDelegate.delay === 'function' ? hoverDelegate.delay(content) : hoverDelegate.delay, false, target));\n\t\t\thoverPreparation = toDispose;\n\t\t};\n\n\t\t// Do not show hover when focusing an input or textarea\n\t\tif (!isEditableElement(targetElement)) {\n\t\t\tstore.add(addDisposableListener(targetElement, EventType.FOCUS, onFocus, true));\n\t\t}\n\n\t\tconst hover: IManagedHover = {\n\t\t\tshow: focus => {\n\t\t\t\thideHover(false, true); // terminate a ongoing mouse over preparation\n\t\t\t\ttriggerShowHover(0, focus, undefined, focus); // show hover immediately\n\t\t\t},\n\t\t\thide: () => {\n\t\t\t\thideHover(true, true);\n\t\t\t},\n\t\t\tupdate: async (newContent, hoverOptions) => {\n\t\t\t\tcontent = newContent;\n\t\t\t\tawait hoverWidget?.update(content, undefined, hoverOptions);\n\t\t\t},\n\t\t\tdispose: () => {\n\t\t\t\tthis._managedHovers.delete(targetElement);\n\t\t\t\tstore.dispose();\n\t\t\t\thideHover(true, true);\n\t\t\t}\n\t\t};\n\t\tthis._managedHovers.set(targetElement, hover);\n\t\treturn hover;\n\t}\n\n\tshowManagedHover(target: HTMLElement): void {\n\t\tconst hover = this._managedHovers.get(target);\n\t\tif (hover) {\n\t\t\thover.show(true);\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._managedHovers.forEach(hover => hover.dispose());\n\t\tsuper.dispose();\n\t}\n}\n\nfunction getHoverOptionsIdentity(options: IHoverOptions | undefined): IHoverOptions | number | string | undefined {\n\tif (options === undefined) {\n\t\treturn undefined;\n\t}\n\treturn options?.id ?? options;\n}\n\nfunction getHoverIdFromContent(content: string | HTMLElement | IMarkdownString): string | undefined {\n\tif (isHTMLElement(content)) {\n\t\treturn undefined;\n\t}\n\tif (typeof content === 'string') {\n\t\treturn content.toString();\n\t}\n\treturn content.value;\n}\n\nfunction getStringContent(contentOrFactory: IManagedHoverContentOrFactory): string | undefined {\n\tconst content = typeof contentOrFactory === 'function' ? contentOrFactory() : contentOrFactory;\n\tif (isString(content)) {\n\t\t// Icons don't render in the native hover so we strip them out\n\t\treturn stripIcons(content);\n\t}\n\tif (isManagedHoverTooltipMarkdownString(content)) {\n\t\treturn content.markdownNotSupportedFallback;\n\t}\n\treturn undefined;\n}\n\nfunction setupNativeHover(targetElement: HTMLElement, content: IManagedHoverContentOrFactory): IManagedHover {\n\tfunction updateTitle(title: string | undefined) {\n\t\tif (title) {\n\t\t\ttargetElement.setAttribute('title', title);\n\t\t} else {\n\t\t\ttargetElement.removeAttribute('title');\n\t\t}\n\t}\n\n\tupdateTitle(getStringContent(content));\n\treturn {\n\t\tupdate: (content) => updateTitle(getStringContent(content)),\n\t\tshow: () => { },\n\t\thide: () => { },\n\t\tdispose: () => updateTitle(undefined),\n\t};\n}\n\nclass HoverContextViewDelegate implements IDelegate {\n\n\t// Render over all other context views\n\tpublic readonly layer = 1;\n\n\tget anchorPosition() {\n\t\treturn this._hover.anchor;\n\t}\n\n\tconstructor(\n\t\tprivate readonly _hover: HoverWidget,\n\t\tprivate readonly _focus: boolean = false\n\t) {\n\t}\n\n\trender(container: HTMLElement) {\n\t\tthis._hover.render(container);\n\t\tif (this._focus) {\n\t\t\tthis._hover.focus();\n\t\t}\n\t\treturn this._hover;\n\t}\n\n\tgetAnchor() {\n\t\treturn {\n\t\t\tx: this._hover.x,\n\t\t\ty: this._hover.y\n\t\t};\n\t}\n\n\tlayout() {\n\t\tthis._hover.layout();\n\t}\n}\n\nfunction getHoverTargetElement(element: HTMLElement, stopElement?: HTMLElement): HTMLElement {\n\tstopElement = stopElement ?? getWindow(element).document.body;\n\twhile (!element.hasAttribute('custom-hover') && element !== stopElement) {\n\t\telement = element.parentElement!;\n\t}\n\treturn element;\n}\n\nregisterSingleton(IHoverService, HoverService, InstantiationType.Delayed);\n\nregisterThemingParticipant((theme, collector) => {\n\tconst hoverBorder = theme.getColor(editorHoverBorder);\n\tif (hoverBorder) {\n\t\tcollector.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n\t\tcollector.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n\t}\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\nimport { editorHoverBorder } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { HoverWidget } from './hoverWidget.js';\nimport { IContextViewProvider, IDelegate } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { addDisposableListener, EventType, getActiveElement, isAncestorOfActiveElement, isAncestor, getWindow, isHTMLElement, isEditableElement } from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { ILayoutService } from '../../../../platform/layout/browser/layoutService.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\nimport { ContextViewHandler } from '../../../../platform/contextview/browser/contextViewService.js';\nimport { isManagedHoverTooltipMarkdownString, type IHoverLifecycleOptions, type IHoverOptions, type IHoverWidget, type IManagedHover, type IManagedHoverContentOrFactory, type IManagedHoverOptions } from '../../../../base/browser/ui/hover/hover.js';\nimport { IHoverDelegate, IHoverDelegateTarget } from '../../../../base/browser/ui/hover/hoverDelegate.js';\nimport { ManagedHoverWidget } from './updatableHoverWidget.js';\nimport { timeout, TimeoutTimer } from '../../../../base/common/async.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { isNumber, isString } from '../../../../base/common/types.js';\nimport { KeyChord, KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { KeybindingsRegistry, KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { IMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { stripIcons } from '../../../../base/common/iconLabels.js';\n\nexport class HoverService extends Disposable implements IHoverService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _contextViewHandler: IContextViewProvider;\n\tprivate _currentHoverOptions: IHoverOptions | undefined;\n\tprivate _currentHover: HoverWidget | undefined;\n\tprivate _currentDelayedHover: HoverWidget | undefined;\n\tprivate _currentDelayedHoverWasShown: boolean = false;\n\tprivate _currentDelayedHoverGroupId: number | string | undefined;\n\tprivate _lastHoverOptions: IHoverOptions | undefined;\n\n\tprivate _lastFocusedElementBeforeOpen: HTMLElement | undefined;\n\n\tprivate readonly _delayedHovers = new Map<HTMLElement, { show: (focus: boolean) => void }>();\n\tprivate readonly _managedHovers = new Map<HTMLElement, IManagedHover>();\n\n\tconstructor(\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IContextMenuService contextMenuService: IContextMenuService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@ILayoutService private readonly _layoutService: ILayoutService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._register(contextMenuService.onDidShowContextMenu(() => this.hideHover()));\n\t\tthis._contextViewHandler = this._register(new ContextViewHandler(this._layoutService));\n\n\t\tthis._register(KeybindingsRegistry.registerCommandAndKeybindingRule({\n\t\t\tid: 'workbench.action.showHover',\n\t\t\tweight: KeybindingWeight.WorkbenchContrib - 1,\n\t\t\twhen: EditorContextKeys.editorTextFocus.negate(),\n\t\t\tprimary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI),\n\t\t\thandler: () => { this._showAndFocusHoverForActiveElement(); },\n\t\t}));\n\t}\n\n\tshowInstantHover(options: IHoverOptions, focus?: boolean, skipLastFocusedUpdate?: boolean, dontShow?: boolean): IHoverWidget | undefined {\n\t\tconst hover = this._createHover(options, skipLastFocusedUpdate);\n\t\tif (!hover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthis._showHover(hover, options, focus);\n\t\treturn hover;\n\t}\n\n\tshowDelayedHover(\n\t\toptions: IHoverOptions,\n\t\tlifecycleOptions: Pick<IHoverLifecycleOptions, 'groupId'>,\n\t): IHoverWidget | undefined {\n\t\t// Set `id` to default if it's undefined\n\t\tif (options.id === undefined) {\n\t\t\toptions.id = getHoverIdFromContent(options.content);\n\t\t}\n\n\t\tif (!this._currentDelayedHover || this._currentDelayedHoverWasShown) {\n\t\t\t// Current hover is locked, reject\n\t\t\tif (this._currentHover?.isLocked) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\t// Identity is the same, return current hover\n\t\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t\treturn this._currentHover;\n\t\t\t}\n\n\t\t\t// Check group identity, if it's the same skip the delay and show the hover immediately\n\t\t\tif (this._currentHover && !this._currentHover.isDisposed && this._currentDelayedHoverGroupId !== undefined && this._currentDelayedHoverGroupId === lifecycleOptions?.groupId) {\n\t\t\t\treturn this.showInstantHover({\n\t\t\t\t\t...options,\n\t\t\t\t\tappearance: {\n\t\t\t\t\t\t...options.appearance,\n\t\t\t\t\t\tskipFadeInAnimation: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (this._currentDelayedHover && getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t// If the hover is the same but timeout is not finished yet, return the current hover\n\t\t\treturn this._currentDelayedHover;\n\t\t}\n\n\t\tconst hover = this._createHover(options, undefined);\n\t\tif (!hover) {\n\t\t\tthis._currentDelayedHover = undefined;\n\t\t\tthis._currentDelayedHoverWasShown = false;\n\t\t\tthis._currentDelayedHoverGroupId = undefined;\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthis._currentDelayedHover = hover;\n\t\tthis._currentDelayedHoverWasShown = false;\n\t\tthis._currentDelayedHoverGroupId = lifecycleOptions?.groupId;\n\n\t\ttimeout(this._configurationService.getValue<number>('workbench.hover.delay')).then(() => {\n\t\t\tif (hover && !hover.isDisposed) {\n\t\t\t\tthis._currentDelayedHoverWasShown = true;\n\t\t\t\tthis._showHover(hover, options);\n\t\t\t}\n\t\t});\n\n\t\treturn hover;\n\t}\n\n\tsetupDelayedHover(\n\t\ttarget: HTMLElement,\n\t\toptions: (() => Omit<IHoverOptions, 'target'>) | Omit<IHoverOptions, 'target'>,\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t): IDisposable {\n\t\tconst resolveHoverOptions = () => ({\n\t\t\t...typeof options === 'function' ? options() : options,\n\t\t\ttarget\n\t\t} satisfies IHoverOptions);\n\t\treturn this._setupDelayedHover(target, resolveHoverOptions, lifecycleOptions);\n\t}\n\n\tsetupDelayedHoverAtMouse(\n\t\ttarget: HTMLElement,\n\t\toptions: (() => Omit<IHoverOptions, 'target' | 'position'>) | Omit<IHoverOptions, 'target' | 'position'>,\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t): IDisposable {\n\t\tconst resolveHoverOptions = (e?: MouseEvent) => ({\n\t\t\t...typeof options === 'function' ? options() : options,\n\t\t\ttarget: {\n\t\t\t\ttargetElements: [target],\n\t\t\t\tx: e !== undefined ? e.x + 10 : undefined,\n\t\t\t}\n\t\t} satisfies IHoverOptions);\n\t\treturn this._setupDelayedHover(target, resolveHoverOptions, lifecycleOptions);\n\t}\n\n\tprivate _setupDelayedHover(\n\t\ttarget: HTMLElement,\n\t\tresolveHoverOptions: ((e?: MouseEvent) => IHoverOptions),\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t) {\n\t\tconst store = new DisposableStore();\n\t\tstore.add(addDisposableListener(target, EventType.MOUSE_OVER, e => {\n\t\t\tthis.showDelayedHover(resolveHoverOptions(e), {\n\t\t\t\tgroupId: lifecycleOptions?.groupId\n\t\t\t});\n\t\t}));\n\t\tif (lifecycleOptions?.setupKeyboardEvents) {\n\t\t\tstore.add(addDisposableListener(target, EventType.KEY_DOWN, e => {\n\t\t\t\tconst evt = new StandardKeyboardEvent(e);\n\t\t\t\tif (evt.equals(KeyCode.Space) || evt.equals(KeyCode.Enter)) {\n\t\t\t\t\tthis.showInstantHover(resolveHoverOptions(), true);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\tthis._delayedHovers.set(target, { show: (focus: boolean) => { this.showInstantHover(resolveHoverOptions(), focus); } });\n\t\tstore.add(toDisposable(() => this._delayedHovers.delete(target)));\n\n\t\treturn store;\n\t}\n\n\tprivate _createHover(options: IHoverOptions, skipLastFocusedUpdate?: boolean): HoverWidget | undefined {\n\t\tthis._currentDelayedHover = undefined;\n\n\t\tif (this._currentHover?.isLocked) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Set `id` to default if it's undefined\n\t\tif (options.id === undefined) {\n\t\t\toptions.id = getHoverIdFromContent(options.content);\n\t\t}\n\n\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthis._currentHoverOptions = options;\n\t\tthis._lastHoverOptions = options;\n\t\tconst trapFocus = options.trapFocus || this._accessibilityService.isScreenReaderOptimized();\n\t\tconst activeElement = getActiveElement();\n\t\t// HACK, remove this check when #189076 is fixed\n\t\tif (!skipLastFocusedUpdate) {\n\t\t\tif (trapFocus && activeElement) {\n\t\t\t\tif (!activeElement.classList.contains('monaco-hover')) {\n\t\t\t\t\tthis._lastFocusedElementBeforeOpen = activeElement as HTMLElement;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._lastFocusedElementBeforeOpen = undefined;\n\t\t\t}\n\t\t}\n\n\t\tconst hoverDisposables = new DisposableStore();\n\t\tconst hover = this._instantiationService.createInstance(HoverWidget, options);\n\t\tif (options.persistence?.sticky) {\n\t\t\thover.isLocked = true;\n\t\t}\n\n\t\t// Adjust target position when a mouse event is provided as the hover position\n\t\tif (options.position?.hoverPosition && !isNumber(options.position.hoverPosition)) {\n\t\t\toptions.target = {\n\t\t\t\ttargetElements: isHTMLElement(options.target) ? [options.target] : options.target.targetElements,\n\t\t\t\tx: options.position.hoverPosition.x + 10\n\t\t\t};\n\t\t}\n\n\t\thover.onDispose(() => {\n\t\t\tconst hoverWasFocused = this._currentHover?.domNode && isAncestorOfActiveElement(this._currentHover.domNode);\n\t\t\tif (hoverWasFocused) {\n\t\t\t\t// Required to handle cases such as closing the hover with the escape key\n\t\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t\t}\n\n\t\t\t// Only clear the current options if it's the current hover, the current options help\n\t\t\t// reduce flickering when the same hover is shown multiple times\n\t\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t\tthis.doHideHover();\n\t\t\t}\n\t\t\thoverDisposables.dispose();\n\t\t}, undefined, hoverDisposables);\n\t\t// Set the container explicitly to enable aux window support\n\t\tif (!options.container) {\n\t\t\tconst targetElement = isHTMLElement(options.target) ? options.target : options.target.targetElements[0];\n\t\t\toptions.container = this._layoutService.getContainer(getWindow(targetElement));\n\t\t}\n\n\t\thover.onRequestLayout(() => this._contextViewHandler.layout(), undefined, hoverDisposables);\n\t\tif (options.persistence?.sticky) {\n\t\t\thoverDisposables.add(addDisposableListener(getWindow(options.container).document, EventType.MOUSE_DOWN, e => {\n\t\t\t\tif (!isAncestor(e.target as HTMLElement, hover.domNode)) {\n\t\t\t\t\tthis.doHideHover();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tif ('targetElements' in options.target) {\n\t\t\t\tfor (const element of options.target.targetElements) {\n\t\t\t\t\thoverDisposables.add(addDisposableListener(element, EventType.CLICK, () => this.hideHover()));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thoverDisposables.add(addDisposableListener(options.target, EventType.CLICK, () => this.hideHover()));\n\t\t\t}\n\t\t\tconst focusedElement = getActiveElement();\n\t\t\tif (focusedElement) {\n\t\t\t\tconst focusedElementDocument = getWindow(focusedElement).document;\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_DOWN, e => this._keyDown(e, hover, !!options.persistence?.hideOnKeyDown)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_DOWN, e => this._keyDown(e, hover, !!options.persistence?.hideOnKeyDown)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_UP, e => this._keyUp(e, hover)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_UP, e => this._keyUp(e, hover)));\n\t\t\t}\n\t\t}\n\n\t\tif ('IntersectionObserver' in mainWindow) {\n\t\t\tconst observer = new IntersectionObserver(e => this._intersectionChange(e, hover), { threshold: 0 });\n\t\t\tconst firstTargetElement = 'targetElements' in options.target ? options.target.targetElements[0] : options.target;\n\t\t\tobserver.observe(firstTargetElement);\n\t\t\thoverDisposables.add(toDisposable(() => observer.disconnect()));\n\t\t}\n\n\t\tthis._currentHover = hover;\n\n\t\treturn hover;\n\t}\n\n\tprivate _showHover(hover: HoverWidget, options: IHoverOptions, focus?: boolean) {\n\t\tthis._contextViewHandler.showContextView(\n\t\t\tnew HoverContextViewDelegate(hover, focus),\n\t\t\toptions.container\n\t\t);\n\t}\n\n\thideHover(force?: boolean): void {\n\t\tif ((!force && this._currentHover?.isLocked) || !this._currentHoverOptions) {\n\t\t\treturn;\n\t\t}\n\t\tthis.doHideHover();\n\t}\n\n\tprivate doHideHover(): void {\n\t\tthis._currentHover = undefined;\n\t\tthis._currentHoverOptions = undefined;\n\t\tthis._contextViewHandler.hideContextView();\n\t}\n\n\tprivate _intersectionChange(entries: IntersectionObserverEntry[], hover: IDisposable): void {\n\t\tconst entry = entries[entries.length - 1];\n\t\tif (!entry.isIntersecting) {\n\t\t\thover.dispose();\n\t\t}\n\t}\n\n\tshowAndFocusLastHover(): void {\n\t\tif (!this._lastHoverOptions) {\n\t\t\treturn;\n\t\t}\n\t\tthis.showInstantHover(this._lastHoverOptions, true, true);\n\t}\n\n\tprivate _showAndFocusHoverForActiveElement(): void {\n\t\t// TODO: if hover is visible, focus it to avoid flickering\n\n\t\tlet activeElement = getActiveElement() as HTMLElement | null;\n\t\twhile (activeElement) {\n\t\t\tconst hover = this._delayedHovers.get(activeElement) ?? this._managedHovers.get(activeElement);\n\t\t\tif (hover) {\n\t\t\t\thover.show(true);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tactiveElement = activeElement.parentElement;\n\t\t}\n\t}\n\n\tprivate _keyDown(e: KeyboardEvent, hover: HoverWidget, hideOnKeyDown: boolean) {\n\t\tif (e.key === 'Alt') {\n\t\t\thover.isLocked = true;\n\t\t\treturn;\n\t\t}\n\t\tconst event = new StandardKeyboardEvent(e);\n\t\tconst keybinding = this._keybindingService.resolveKeyboardEvent(event);\n\t\tif (keybinding.getSingleModifierDispatchChords().some(value => !!value) || this._keybindingService.softDispatch(event, event.target).kind !== ResultKind.NoMatchingKb) {\n\t\t\treturn;\n\t\t}\n\t\tif (hideOnKeyDown && (!this._currentHoverOptions?.trapFocus || e.key !== 'Tab')) {\n\t\t\tthis.hideHover();\n\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t}\n\t}\n\n\tprivate _keyUp(e: KeyboardEvent, hover: HoverWidget) {\n\t\tif (e.key === 'Alt') {\n\t\t\thover.isLocked = false;\n\t\t\t// Hide if alt is released while the mouse is not over hover/target\n\t\t\tif (!hover.isMouseIn) {\n\t\t\t\tthis.hideHover();\n\t\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t// TODO: Investigate performance of this function. There seems to be a lot of content created\n\t// and thrown away on start up\n\tsetupManagedHover(hoverDelegate: IHoverDelegate, targetElement: HTMLElement, content: IManagedHoverContentOrFactory, options?: IManagedHoverOptions | undefined): IManagedHover {\n\t\tif (hoverDelegate.showNativeHover) {\n\t\t\treturn setupNativeHover(targetElement, content);\n\t\t}\n\n\t\ttargetElement.setAttribute('custom-hover', 'true');\n\n\t\tif (targetElement.title !== '') {\n\t\t\tconsole.warn('HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute.');\n\t\t\tconsole.trace('Stack trace:', targetElement.title);\n\t\t\ttargetElement.title = '';\n\t\t}\n\n\t\tlet hoverPreparation: IDisposable | undefined;\n\t\tlet hoverWidget: ManagedHoverWidget | undefined;\n\n\t\tconst hideHover = (disposeWidget: boolean, disposePreparation: boolean) => {\n\t\t\tconst hadHover = hoverWidget !== undefined;\n\t\t\tif (disposeWidget) {\n\t\t\t\thoverWidget?.dispose();\n\t\t\t\thoverWidget = undefined;\n\t\t\t}\n\t\t\tif (disposePreparation) {\n\t\t\t\thoverPreparation?.dispose();\n\t\t\t\thoverPreparation = undefined;\n\t\t\t}\n\t\t\tif (hadHover) {\n\t\t\t\thoverDelegate.onDidHideHover?.();\n\t\t\t\thoverWidget = undefined;\n\t\t\t}\n\t\t};\n\n\t\tconst triggerShowHover = (delay: number, focus?: boolean, target?: IHoverDelegateTarget, trapFocus?: boolean) => {\n\t\t\treturn new TimeoutTimer(async () => {\n\t\t\t\tif (!hoverWidget || hoverWidget.isDisposed) {\n\t\t\t\t\thoverWidget = new ManagedHoverWidget(hoverDelegate, target || targetElement, delay > 0);\n\t\t\t\t\tawait hoverWidget.update(typeof content === 'function' ? content() : content, focus, { ...options, trapFocus });\n\t\t\t\t}\n\t\t\t}, delay);\n\t\t};\n\n\t\tconst store = new DisposableStore();\n\t\tlet isMouseDown = false;\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_DOWN, () => {\n\t\t\tisMouseDown = true;\n\t\t\thideHover(true, true);\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_UP, () => {\n\t\t\tisMouseDown = false;\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_LEAVE, (e: MouseEvent) => {\n\t\t\tisMouseDown = false;\n\t\t\thideHover(false, (<any>e).fromElement === targetElement);\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_OVER, (e: MouseEvent) => {\n\t\t\tif (hoverPreparation) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst mouseOverStore: DisposableStore = new DisposableStore();\n\n\t\t\tconst target: IHoverDelegateTarget = {\n\t\t\t\ttargetElements: [targetElement],\n\t\t\t\tdispose: () => { }\n\t\t\t};\n\t\t\tif (hoverDelegate.placement === undefined || hoverDelegate.placement === 'mouse') {\n\t\t\t\t// track the mouse position\n\t\t\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\t\t\ttarget.x = e.x + 10;\n\t\t\t\t\tif ((isHTMLElement(e.target)) && getHoverTargetElement(e.target, targetElement) !== targetElement) {\n\t\t\t\t\t\thideHover(true, true);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tmouseOverStore.add(addDisposableListener(targetElement, EventType.MOUSE_MOVE, onMouseMove, true));\n\t\t\t}\n\n\t\t\thoverPreparation = mouseOverStore;\n\n\t\t\tif ((isHTMLElement(e.target)) && getHoverTargetElement(e.target as HTMLElement, targetElement) !== targetElement) {\n\t\t\t\treturn; // Do not show hover when the mouse is over another hover target\n\t\t\t}\n\n\t\t\tmouseOverStore.add(triggerShowHover(typeof hoverDelegate.delay === 'function' ? hoverDelegate.delay(content) : hoverDelegate.delay, false, target));\n\t\t}, true));\n\n\t\tconst onFocus = () => {\n\t\t\tif (isMouseDown || hoverPreparation) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst target: IHoverDelegateTarget = {\n\t\t\t\ttargetElements: [targetElement],\n\t\t\t\tdispose: () => { }\n\t\t\t};\n\t\t\tconst toDispose: DisposableStore = new DisposableStore();\n\t\t\tconst onBlur = () => hideHover(true, true);\n\t\t\ttoDispose.add(addDisposableListener(targetElement, EventType.BLUR, onBlur, true));\n\t\t\ttoDispose.add(triggerShowHover(typeof hoverDelegate.delay === 'function' ? hoverDelegate.delay(content) : hoverDelegate.delay, false, target));\n\t\t\thoverPreparation = toDispose;\n\t\t};\n\n\t\t// Do not show hover when focusing an input or textarea\n\t\tif (!isEditableElement(targetElement)) {\n\t\t\tstore.add(addDisposableListener(targetElement, EventType.FOCUS, onFocus, true));\n\t\t}\n\n\t\tconst hover: IManagedHover = {\n\t\t\tshow: focus => {\n\t\t\t\thideHover(false, true); // terminate a ongoing mouse over preparation\n\t\t\t\ttriggerShowHover(0, focus, undefined, focus); // show hover immediately\n\t\t\t},\n\t\t\thide: () => {\n\t\t\t\thideHover(true, true);\n\t\t\t},\n\t\t\tupdate: async (newContent, hoverOptions) => {\n\t\t\t\tcontent = newContent;\n\t\t\t\tawait hoverWidget?.update(content, undefined, hoverOptions);\n\t\t\t},\n\t\t\tdispose: () => {\n\t\t\t\tthis._managedHovers.delete(targetElement);\n\t\t\t\tstore.dispose();\n\t\t\t\thideHover(true, true);\n\t\t\t}\n\t\t};\n\t\tthis._managedHovers.set(targetElement, hover);\n\t\treturn hover;\n\t}\n\n\tshowManagedHover(target: HTMLElement): void {\n\t\tconst hover = this._managedHovers.get(target);\n\t\tif (hover) {\n\t\t\thover.show(true);\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._managedHovers.forEach(hover => hover.dispose());\n\t\tsuper.dispose();\n\t}\n}\n\nfunction getHoverOptionsIdentity(options: IHoverOptions | undefined): IHoverOptions | number | string | undefined {\n\tif (options === undefined) {\n\t\treturn undefined;\n\t}\n\treturn options?.id ?? options;\n}\n\nfunction getHoverIdFromContent(content: string | HTMLElement | IMarkdownString): string | undefined {\n\tif (isHTMLElement(content)) {\n\t\treturn undefined;\n\t}\n\tif (typeof content === 'string') {\n\t\treturn content.toString();\n\t}\n\treturn content.value;\n}\n\nfunction getStringContent(contentOrFactory: IManagedHoverContentOrFactory): string | undefined {\n\tconst content = typeof contentOrFactory === 'function' ? contentOrFactory() : contentOrFactory;\n\tif (isString(content)) {\n\t\t// Icons don't render in the native hover so we strip them out\n\t\treturn stripIcons(content);\n\t}\n\tif (isManagedHoverTooltipMarkdownString(content)) {\n\t\treturn content.markdownNotSupportedFallback;\n\t}\n\treturn undefined;\n}\n\nfunction setupNativeHover(targetElement: HTMLElement, content: IManagedHoverContentOrFactory): IManagedHover {\n\tfunction updateTitle(title: string | undefined) {\n\t\tif (title) {\n\t\t\ttargetElement.setAttribute('title', title);\n\t\t} else {\n\t\t\ttargetElement.removeAttribute('title');\n\t\t}\n\t}\n\n\tupdateTitle(getStringContent(content));\n\treturn {\n\t\tupdate: (content) => updateTitle(getStringContent(content)),\n\t\tshow: () => { },\n\t\thide: () => { },\n\t\tdispose: () => updateTitle(undefined),\n\t};\n}\n\nclass HoverContextViewDelegate implements IDelegate {\n\n\t// Render over all other context views\n\tpublic readonly layer = 1;\n\n\tget anchorPosition() {\n\t\treturn this._hover.anchor;\n\t}\n\n\tconstructor(\n\t\tprivate readonly _hover: HoverWidget,\n\t\tprivate readonly _focus: boolean = false\n\t) {\n\t}\n\n\trender(container: HTMLElement) {\n\t\tthis._hover.render(container);\n\t\tif (this._focus) {\n\t\t\tthis._hover.focus();\n\t\t}\n\t\treturn this._hover;\n\t}\n\n\tgetAnchor() {\n\t\treturn {\n\t\t\tx: this._hover.x,\n\t\t\ty: this._hover.y\n\t\t};\n\t}\n\n\tlayout() {\n\t\tthis._hover.layout();\n\t}\n}\n\nfunction getHoverTargetElement(element: HTMLElement, stopElement?: HTMLElement): HTMLElement {\n\tstopElement = stopElement ?? getWindow(element).document.body;\n\twhile (!element.hasAttribute('custom-hover') && element !== stopElement) {\n\t\telement = element.parentElement!;\n\t}\n\treturn element;\n}\n\nregisterSingleton(IHoverService, HoverService, InstantiationType.Delayed);\n\nregisterThemingParticipant((theme, collector) => {\n\tconst hoverBorder = theme.getColor(editorHoverBorder);\n\tif (hoverBorder) {\n\t\tcollector.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n\t\tcollector.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n\t}\n});\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/services/hoverService/hoverService.ts","vs/editor/browser/services/hoverService/hoverService.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAqB,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACzL,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE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,EAAE,SAAS,EAAE,EAAE;IAC/C,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACtD,IAAI,WAAW,EAAE,CAAC;QACjB,SAAS,CAAC,OAAO,CAAC,uGAAuG,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC5J,SAAS,CAAC,OAAO,CAAC,iEAAiE,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvH,CAAC;AACF,CAAC,CAAC,CAAC","file":"hoverService.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\nimport { editorHoverBorder } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { HoverWidget } from './hoverWidget.js';\nimport { IContextViewProvider, IDelegate } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { addDisposableListener, EventType, getActiveElement, isAncestorOfActiveElement, isAncestor, getWindow, isHTMLElement, isEditableElement } from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { ILayoutService } from '../../../../platform/layout/browser/layoutService.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\nimport { ContextViewHandler } from '../../../../platform/contextview/browser/contextViewService.js';\nimport { isManagedHoverTooltipMarkdownString, type IHoverLifecycleOptions, type IHoverOptions, type IHoverWidget, type IManagedHover, type IManagedHoverContentOrFactory, type IManagedHoverOptions } from '../../../../base/browser/ui/hover/hover.js';\nimport { IHoverDelegate, IHoverDelegateTarget } from '../../../../base/browser/ui/hover/hoverDelegate.js';\nimport { ManagedHoverWidget } from './updatableHoverWidget.js';\nimport { timeout, TimeoutTimer } from '../../../../base/common/async.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { isNumber, isString } from '../../../../base/common/types.js';\nimport { KeyChord, KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { KeybindingsRegistry, KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { IMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { stripIcons } from '../../../../base/common/iconLabels.js';\n\nexport class HoverService extends Disposable implements IHoverService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _contextViewHandler: IContextViewProvider;\n\tprivate _currentHoverOptions: IHoverOptions | undefined;\n\tprivate _currentHover: HoverWidget | undefined;\n\tprivate _currentDelayedHover: HoverWidget | undefined;\n\tprivate _currentDelayedHoverWasShown: boolean = false;\n\tprivate _currentDelayedHoverGroupId: number | string | undefined;\n\tprivate _lastHoverOptions: IHoverOptions | undefined;\n\n\tprivate _lastFocusedElementBeforeOpen: HTMLElement | undefined;\n\n\tprivate readonly _delayedHovers = new Map<HTMLElement, { show: (focus: boolean) => void }>();\n\tprivate readonly _managedHovers = new Map<HTMLElement, IManagedHover>();\n\n\tconstructor(\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IContextMenuService contextMenuService: IContextMenuService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@ILayoutService private readonly _layoutService: ILayoutService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._register(contextMenuService.onDidShowContextMenu(() => this.hideHover()));\n\t\tthis._contextViewHandler = this._register(new ContextViewHandler(this._layoutService));\n\n\t\tthis._register(KeybindingsRegistry.registerCommandAndKeybindingRule({\n\t\t\tid: 'workbench.action.showHover',\n\t\t\tweight: KeybindingWeight.WorkbenchContrib - 1,\n\t\t\twhen: EditorContextKeys.editorTextFocus.negate(),\n\t\t\tprimary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI),\n\t\t\thandler: () => { this._showAndFocusHoverForActiveElement(); },\n\t\t}));\n\t}\n\n\tshowInstantHover(options: IHoverOptions, focus?: boolean, skipLastFocusedUpdate?: boolean, dontShow?: boolean): IHoverWidget | undefined {\n\t\tconst hover = this._createHover(options, skipLastFocusedUpdate);\n\t\tif (!hover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthis._showHover(hover, options, focus);\n\t\treturn hover;\n\t}\n\n\tshowDelayedHover(\n\t\toptions: IHoverOptions,\n\t\tlifecycleOptions: Pick<IHoverLifecycleOptions, 'groupId'>,\n\t): IHoverWidget | undefined {\n\t\t// Set `id` to default if it's undefined\n\t\tif (options.id === undefined) {\n\t\t\toptions.id = getHoverIdFromContent(options.content);\n\t\t}\n\n\t\tif (!this._currentDelayedHover || this._currentDelayedHoverWasShown) {\n\t\t\t// Current hover is locked, reject\n\t\t\tif (this._currentHover?.isLocked) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\t// Identity is the same, return current hover\n\t\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t\treturn this._currentHover;\n\t\t\t}\n\n\t\t\t// Check group identity, if it's the same skip the delay and show the hover immediately\n\t\t\tif (this._currentHover && !this._currentHover.isDisposed && this._currentDelayedHoverGroupId !== undefined && this._currentDelayedHoverGroupId === lifecycleOptions?.groupId) {\n\t\t\t\treturn this.showInstantHover({\n\t\t\t\t\t...options,\n\t\t\t\t\tappearance: {\n\t\t\t\t\t\t...options.appearance,\n\t\t\t\t\t\tskipFadeInAnimation: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (this._currentDelayedHover && getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t// If the hover is the same but timeout is not finished yet, return the current hover\n\t\t\treturn this._currentDelayedHover;\n\t\t}\n\n\t\tconst hover = this._createHover(options, undefined);\n\t\tif (!hover) {\n\t\t\tthis._currentDelayedHover = undefined;\n\t\t\tthis._currentDelayedHoverWasShown = false;\n\t\t\tthis._currentDelayedHoverGroupId = undefined;\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthis._currentDelayedHover = hover;\n\t\tthis._currentDelayedHoverWasShown = false;\n\t\tthis._currentDelayedHoverGroupId = lifecycleOptions?.groupId;\n\n\t\ttimeout(this._configurationService.getValue<number>('workbench.hover.delay')).then(() => {\n\t\t\tif (hover && !hover.isDisposed) {\n\t\t\t\tthis._currentDelayedHoverWasShown = true;\n\t\t\t\tthis._showHover(hover, options);\n\t\t\t}\n\t\t});\n\n\t\treturn hover;\n\t}\n\n\tsetupDelayedHover(\n\t\ttarget: HTMLElement,\n\t\toptions: (() => Omit<IHoverOptions, 'target'>) | Omit<IHoverOptions, 'target'>,\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t): IDisposable {\n\t\tconst resolveHoverOptions = () => ({\n\t\t\t...typeof options === 'function' ? options() : options,\n\t\t\ttarget\n\t\t} satisfies IHoverOptions);\n\t\treturn this._setupDelayedHover(target, resolveHoverOptions, lifecycleOptions);\n\t}\n\n\tsetupDelayedHoverAtMouse(\n\t\ttarget: HTMLElement,\n\t\toptions: (() => Omit<IHoverOptions, 'target' | 'position'>) | Omit<IHoverOptions, 'target' | 'position'>,\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t): IDisposable {\n\t\tconst resolveHoverOptions = (e?: MouseEvent) => ({\n\t\t\t...typeof options === 'function' ? options() : options,\n\t\t\ttarget: {\n\t\t\t\ttargetElements: [target],\n\t\t\t\tx: e !== undefined ? e.x + 10 : undefined,\n\t\t\t}\n\t\t} satisfies IHoverOptions);\n\t\treturn this._setupDelayedHover(target, resolveHoverOptions, lifecycleOptions);\n\t}\n\n\tprivate _setupDelayedHover(\n\t\ttarget: HTMLElement,\n\t\tresolveHoverOptions: ((e?: MouseEvent) => IHoverOptions),\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t) {\n\t\tconst store = new DisposableStore();\n\t\tstore.add(addDisposableListener(target, EventType.MOUSE_OVER, e => {\n\t\t\tthis.showDelayedHover(resolveHoverOptions(e), {\n\t\t\t\tgroupId: lifecycleOptions?.groupId\n\t\t\t});\n\t\t}));\n\t\tif (lifecycleOptions?.setupKeyboardEvents) {\n\t\t\tstore.add(addDisposableListener(target, EventType.KEY_DOWN, e => {\n\t\t\t\tconst evt = new StandardKeyboardEvent(e);\n\t\t\t\tif (evt.equals(KeyCode.Space) || evt.equals(KeyCode.Enter)) {\n\t\t\t\t\tthis.showInstantHover(resolveHoverOptions(), true);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\tthis._delayedHovers.set(target, { show: (focus: boolean) => { this.showInstantHover(resolveHoverOptions(), focus); } });\n\t\tstore.add(toDisposable(() => this._delayedHovers.delete(target)));\n\n\t\treturn store;\n\t}\n\n\tprivate _createHover(options: IHoverOptions, skipLastFocusedUpdate?: boolean): HoverWidget | undefined {\n\t\tthis._currentDelayedHover = undefined;\n\n\t\tif (this._currentHover?.isLocked) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Set `id` to default if it's undefined\n\t\tif (options.id === undefined) {\n\t\t\toptions.id = getHoverIdFromContent(options.content);\n\t\t}\n\n\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthis._currentHoverOptions = options;\n\t\tthis._lastHoverOptions = options;\n\t\tconst trapFocus = options.trapFocus || this._accessibilityService.isScreenReaderOptimized();\n\t\tconst activeElement = getActiveElement();\n\t\t// HACK, remove this check when #189076 is fixed\n\t\tif (!skipLastFocusedUpdate) {\n\t\t\tif (trapFocus && activeElement) {\n\t\t\t\tif (!activeElement.classList.contains('monaco-hover')) {\n\t\t\t\t\tthis._lastFocusedElementBeforeOpen = activeElement as HTMLElement;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._lastFocusedElementBeforeOpen = undefined;\n\t\t\t}\n\t\t}\n\n\t\tconst hoverDisposables = new DisposableStore();\n\t\tconst hover = this._instantiationService.createInstance(HoverWidget, options);\n\t\tif (options.persistence?.sticky) {\n\t\t\thover.isLocked = true;\n\t\t}\n\n\t\t// Adjust target position when a mouse event is provided as the hover position\n\t\tif (options.position?.hoverPosition && !isNumber(options.position.hoverPosition)) {\n\t\t\toptions.target = {\n\t\t\t\ttargetElements: isHTMLElement(options.target) ? [options.target] : options.target.targetElements,\n\t\t\t\tx: options.position.hoverPosition.x + 10\n\t\t\t};\n\t\t}\n\n\t\thover.onDispose(() => {\n\t\t\tconst hoverWasFocused = this._currentHover?.domNode && isAncestorOfActiveElement(this._currentHover.domNode);\n\t\t\tif (hoverWasFocused) {\n\t\t\t\t// Required to handle cases such as closing the hover with the escape key\n\t\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t\t}\n\n\t\t\t// Only clear the current options if it's the current hover, the current options help\n\t\t\t// reduce flickering when the same hover is shown multiple times\n\t\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t\tthis.doHideHover();\n\t\t\t}\n\t\t\thoverDisposables.dispose();\n\t\t}, undefined, hoverDisposables);\n\t\t// Set the container explicitly to enable aux window support\n\t\tif (!options.container) {\n\t\t\tconst targetElement = isHTMLElement(options.target) ? options.target : options.target.targetElements[0];\n\t\t\toptions.container = this._layoutService.getContainer(getWindow(targetElement));\n\t\t}\n\n\t\thover.onRequestLayout(() => this._contextViewHandler.layout(), undefined, hoverDisposables);\n\t\tif (options.persistence?.sticky) {\n\t\t\thoverDisposables.add(addDisposableListener(getWindow(options.container).document, EventType.MOUSE_DOWN, e => {\n\t\t\t\tif (!isAncestor(e.target as HTMLElement, hover.domNode)) {\n\t\t\t\t\tthis.doHideHover();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tif ('targetElements' in options.target) {\n\t\t\t\tfor (const element of options.target.targetElements) {\n\t\t\t\t\thoverDisposables.add(addDisposableListener(element, EventType.CLICK, () => this.hideHover()));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thoverDisposables.add(addDisposableListener(options.target, EventType.CLICK, () => this.hideHover()));\n\t\t\t}\n\t\t\tconst focusedElement = getActiveElement();\n\t\t\tif (focusedElement) {\n\t\t\t\tconst focusedElementDocument = getWindow(focusedElement).document;\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_DOWN, e => this._keyDown(e, hover, !!options.persistence?.hideOnKeyDown)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_DOWN, e => this._keyDown(e, hover, !!options.persistence?.hideOnKeyDown)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_UP, e => this._keyUp(e, hover)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_UP, e => this._keyUp(e, hover)));\n\t\t\t}\n\t\t}\n\n\t\tif ('IntersectionObserver' in mainWindow) {\n\t\t\tconst observer = new IntersectionObserver(e => this._intersectionChange(e, hover), { threshold: 0 });\n\t\t\tconst firstTargetElement = 'targetElements' in options.target ? options.target.targetElements[0] : options.target;\n\t\t\tobserver.observe(firstTargetElement);\n\t\t\thoverDisposables.add(toDisposable(() => observer.disconnect()));\n\t\t}\n\n\t\tthis._currentHover = hover;\n\n\t\treturn hover;\n\t}\n\n\tprivate _showHover(hover: HoverWidget, options: IHoverOptions, focus?: boolean) {\n\t\tthis._contextViewHandler.showContextView(\n\t\t\tnew HoverContextViewDelegate(hover, focus),\n\t\t\toptions.container\n\t\t);\n\t}\n\n\thideHover(force?: boolean): void {\n\t\tif ((!force && this._currentHover?.isLocked) || !this._currentHoverOptions) {\n\t\t\treturn;\n\t\t}\n\t\tthis.doHideHover();\n\t}\n\n\tprivate doHideHover(): void {\n\t\tthis._currentHover = undefined;\n\t\tthis._currentHoverOptions = undefined;\n\t\tthis._contextViewHandler.hideContextView();\n\t}\n\n\tprivate _intersectionChange(entries: IntersectionObserverEntry[], hover: IDisposable): void {\n\t\tconst entry = entries[entries.length - 1];\n\t\tif (!entry.isIntersecting) {\n\t\t\thover.dispose();\n\t\t}\n\t}\n\n\tshowAndFocusLastHover(): void {\n\t\tif (!this._lastHoverOptions) {\n\t\t\treturn;\n\t\t}\n\t\tthis.showInstantHover(this._lastHoverOptions, true, true);\n\t}\n\n\tprivate _showAndFocusHoverForActiveElement(): void {\n\t\t// TODO: if hover is visible, focus it to avoid flickering\n\n\t\tlet activeElement = getActiveElement() as HTMLElement | null;\n\t\twhile (activeElement) {\n\t\t\tconst hover = this._delayedHovers.get(activeElement) ?? this._managedHovers.get(activeElement);\n\t\t\tif (hover) {\n\t\t\t\thover.show(true);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tactiveElement = activeElement.parentElement;\n\t\t}\n\t}\n\n\tprivate _keyDown(e: KeyboardEvent, hover: HoverWidget, hideOnKeyDown: boolean) {\n\t\tif (e.key === 'Alt') {\n\t\t\thover.isLocked = true;\n\t\t\treturn;\n\t\t}\n\t\tconst event = new StandardKeyboardEvent(e);\n\t\tconst keybinding = this._keybindingService.resolveKeyboardEvent(event);\n\t\tif (keybinding.getSingleModifierDispatchChords().some(value => !!value) || this._keybindingService.softDispatch(event, event.target).kind !== ResultKind.NoMatchingKb) {\n\t\t\treturn;\n\t\t}\n\t\tif (hideOnKeyDown && (!this._currentHoverOptions?.trapFocus || e.key !== 'Tab')) {\n\t\t\tthis.hideHover();\n\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t}\n\t}\n\n\tprivate _keyUp(e: KeyboardEvent, hover: HoverWidget) {\n\t\tif (e.key === 'Alt') {\n\t\t\thover.isLocked = false;\n\t\t\t// Hide if alt is released while the mouse is not over hover/target\n\t\t\tif (!hover.isMouseIn) {\n\t\t\t\tthis.hideHover();\n\t\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t// TODO: Investigate performance of this function. There seems to be a lot of content created\n\t// and thrown away on start up\n\tsetupManagedHover(hoverDelegate: IHoverDelegate, targetElement: HTMLElement, content: IManagedHoverContentOrFactory, options?: IManagedHoverOptions | undefined): IManagedHover {\n\t\tif (hoverDelegate.showNativeHover) {\n\t\t\treturn setupNativeHover(targetElement, content);\n\t\t}\n\n\t\ttargetElement.setAttribute('custom-hover', 'true');\n\n\t\tif (targetElement.title !== '') {\n\t\t\tconsole.warn('HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute.');\n\t\t\tconsole.trace('Stack trace:', targetElement.title);\n\t\t\ttargetElement.title = '';\n\t\t}\n\n\t\tlet hoverPreparation: IDisposable | undefined;\n\t\tlet hoverWidget: ManagedHoverWidget | undefined;\n\n\t\tconst hideHover = (disposeWidget: boolean, disposePreparation: boolean) => {\n\t\t\tconst hadHover = hoverWidget !== undefined;\n\t\t\tif (disposeWidget) {\n\t\t\t\thoverWidget?.dispose();\n\t\t\t\thoverWidget = undefined;\n\t\t\t}\n\t\t\tif (disposePreparation) {\n\t\t\t\thoverPreparation?.dispose();\n\t\t\t\thoverPreparation = undefined;\n\t\t\t}\n\t\t\tif (hadHover) {\n\t\t\t\thoverDelegate.onDidHideHover?.();\n\t\t\t\thoverWidget = undefined;\n\t\t\t}\n\t\t};\n\n\t\tconst triggerShowHover = (delay: number, focus?: boolean, target?: IHoverDelegateTarget, trapFocus?: boolean) => {\n\t\t\treturn new TimeoutTimer(async () => {\n\t\t\t\tif (!hoverWidget || hoverWidget.isDisposed) {\n\t\t\t\t\thoverWidget = new ManagedHoverWidget(hoverDelegate, target || targetElement, delay > 0);\n\t\t\t\t\tawait hoverWidget.update(typeof content === 'function' ? content() : content, focus, { ...options, trapFocus });\n\t\t\t\t}\n\t\t\t}, delay);\n\t\t};\n\n\t\tconst store = new DisposableStore();\n\t\tlet isMouseDown = false;\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_DOWN, () => {\n\t\t\tisMouseDown = true;\n\t\t\thideHover(true, true);\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_UP, () => {\n\t\t\tisMouseDown = false;\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_LEAVE, (e: MouseEvent) => {\n\t\t\tisMouseDown = false;\n\t\t\t// HACK: `fromElement` is a non-standard property. Not sure what to replace it with,\n\t\t\t// `relatedTarget` is NOT equivalent.\n\t\t\tinterface MouseEventWithFrom extends MouseEvent {\n\t\t\t\tfromElement: Element | null;\n\t\t\t}\n\t\t\thideHover(false, (e as MouseEventWithFrom).fromElement === targetElement);\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_OVER, (e: MouseEvent) => {\n\t\t\tif (hoverPreparation) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst mouseOverStore: DisposableStore = new DisposableStore();\n\n\t\t\tconst target: IHoverDelegateTarget = {\n\t\t\t\ttargetElements: [targetElement],\n\t\t\t\tdispose: () => { }\n\t\t\t};\n\t\t\tif (hoverDelegate.placement === undefined || hoverDelegate.placement === 'mouse') {\n\t\t\t\t// track the mouse position\n\t\t\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\t\t\ttarget.x = e.x + 10;\n\t\t\t\t\tif ((isHTMLElement(e.target)) && getHoverTargetElement(e.target, targetElement) !== targetElement) {\n\t\t\t\t\t\thideHover(true, true);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tmouseOverStore.add(addDisposableListener(targetElement, EventType.MOUSE_MOVE, onMouseMove, true));\n\t\t\t}\n\n\t\t\thoverPreparation = mouseOverStore;\n\n\t\t\tif ((isHTMLElement(e.target)) && getHoverTargetElement(e.target as HTMLElement, targetElement) !== targetElement) {\n\t\t\t\treturn; // Do not show hover when the mouse is over another hover target\n\t\t\t}\n\n\t\t\tmouseOverStore.add(triggerShowHover(typeof hoverDelegate.delay === 'function' ? hoverDelegate.delay(content) : hoverDelegate.delay, false, target));\n\t\t}, true));\n\n\t\tconst onFocus = () => {\n\t\t\tif (isMouseDown || hoverPreparation) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst target: IHoverDelegateTarget = {\n\t\t\t\ttargetElements: [targetElement],\n\t\t\t\tdispose: () => { }\n\t\t\t};\n\t\t\tconst toDispose: DisposableStore = new DisposableStore();\n\t\t\tconst onBlur = () => hideHover(true, true);\n\t\t\ttoDispose.add(addDisposableListener(targetElement, EventType.BLUR, onBlur, true));\n\t\t\ttoDispose.add(triggerShowHover(typeof hoverDelegate.delay === 'function' ? hoverDelegate.delay(content) : hoverDelegate.delay, false, target));\n\t\t\thoverPreparation = toDispose;\n\t\t};\n\n\t\t// Do not show hover when focusing an input or textarea\n\t\tif (!isEditableElement(targetElement)) {\n\t\t\tstore.add(addDisposableListener(targetElement, EventType.FOCUS, onFocus, true));\n\t\t}\n\n\t\tconst hover: IManagedHover = {\n\t\t\tshow: focus => {\n\t\t\t\thideHover(false, true); // terminate a ongoing mouse over preparation\n\t\t\t\ttriggerShowHover(0, focus, undefined, focus); // show hover immediately\n\t\t\t},\n\t\t\thide: () => {\n\t\t\t\thideHover(true, true);\n\t\t\t},\n\t\t\tupdate: async (newContent, hoverOptions) => {\n\t\t\t\tcontent = newContent;\n\t\t\t\tawait hoverWidget?.update(content, undefined, hoverOptions);\n\t\t\t},\n\t\t\tdispose: () => {\n\t\t\t\tthis._managedHovers.delete(targetElement);\n\t\t\t\tstore.dispose();\n\t\t\t\thideHover(true, true);\n\t\t\t}\n\t\t};\n\t\tthis._managedHovers.set(targetElement, hover);\n\t\treturn hover;\n\t}\n\n\tshowManagedHover(target: HTMLElement): void {\n\t\tconst hover = this._managedHovers.get(target);\n\t\tif (hover) {\n\t\t\thover.show(true);\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._managedHovers.forEach(hover => hover.dispose());\n\t\tsuper.dispose();\n\t}\n}\n\nfunction getHoverOptionsIdentity(options: IHoverOptions | undefined): IHoverOptions | number | string | undefined {\n\tif (options === undefined) {\n\t\treturn undefined;\n\t}\n\treturn options?.id ?? options;\n}\n\nfunction getHoverIdFromContent(content: string | HTMLElement | IMarkdownString): string | undefined {\n\tif (isHTMLElement(content)) {\n\t\treturn undefined;\n\t}\n\tif (typeof content === 'string') {\n\t\treturn content.toString();\n\t}\n\treturn content.value;\n}\n\nfunction getStringContent(contentOrFactory: IManagedHoverContentOrFactory): string | undefined {\n\tconst content = typeof contentOrFactory === 'function' ? contentOrFactory() : contentOrFactory;\n\tif (isString(content)) {\n\t\t// Icons don't render in the native hover so we strip them out\n\t\treturn stripIcons(content);\n\t}\n\tif (isManagedHoverTooltipMarkdownString(content)) {\n\t\treturn content.markdownNotSupportedFallback;\n\t}\n\treturn undefined;\n}\n\nfunction setupNativeHover(targetElement: HTMLElement, content: IManagedHoverContentOrFactory): IManagedHover {\n\tfunction updateTitle(title: string | undefined) {\n\t\tif (title) {\n\t\t\ttargetElement.setAttribute('title', title);\n\t\t} else {\n\t\t\ttargetElement.removeAttribute('title');\n\t\t}\n\t}\n\n\tupdateTitle(getStringContent(content));\n\treturn {\n\t\tupdate: (content) => updateTitle(getStringContent(content)),\n\t\tshow: () => { },\n\t\thide: () => { },\n\t\tdispose: () => updateTitle(undefined),\n\t};\n}\n\nclass HoverContextViewDelegate implements IDelegate {\n\n\t// Render over all other context views\n\tpublic readonly layer = 1;\n\n\tget anchorPosition() {\n\t\treturn this._hover.anchor;\n\t}\n\n\tconstructor(\n\t\tprivate readonly _hover: HoverWidget,\n\t\tprivate readonly _focus: boolean = false\n\t) {\n\t}\n\n\trender(container: HTMLElement) {\n\t\tthis._hover.render(container);\n\t\tif (this._focus) {\n\t\t\tthis._hover.focus();\n\t\t}\n\t\treturn this._hover;\n\t}\n\n\tgetAnchor() {\n\t\treturn {\n\t\t\tx: this._hover.x,\n\t\t\ty: this._hover.y\n\t\t};\n\t}\n\n\tlayout() {\n\t\tthis._hover.layout();\n\t}\n}\n\nfunction getHoverTargetElement(element: HTMLElement, stopElement?: HTMLElement): HTMLElement {\n\tstopElement = stopElement ?? getWindow(element).document.body;\n\twhile (!element.hasAttribute('custom-hover') && element !== stopElement) {\n\t\telement = element.parentElement!;\n\t}\n\treturn element;\n}\n\nregisterSingleton(IHoverService, HoverService, InstantiationType.Delayed);\n\nregisterThemingParticipant((theme, collector) => {\n\tconst hoverBorder = theme.getColor(editorHoverBorder);\n\tif (hoverBorder) {\n\t\tcollector.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n\t\tcollector.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n\t}\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\nimport { editorHoverBorder } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { HoverWidget } from './hoverWidget.js';\nimport { IContextViewProvider, IDelegate } from '../../../../base/browser/ui/contextview/contextview.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { addDisposableListener, EventType, getActiveElement, isAncestorOfActiveElement, isAncestor, getWindow, isHTMLElement, isEditableElement } from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { ILayoutService } from '../../../../platform/layout/browser/layoutService.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\nimport { ContextViewHandler } from '../../../../platform/contextview/browser/contextViewService.js';\nimport { isManagedHoverTooltipMarkdownString, type IHoverLifecycleOptions, type IHoverOptions, type IHoverWidget, type IManagedHover, type IManagedHoverContentOrFactory, type IManagedHoverOptions } from '../../../../base/browser/ui/hover/hover.js';\nimport { IHoverDelegate, IHoverDelegateTarget } from '../../../../base/browser/ui/hover/hoverDelegate.js';\nimport { ManagedHoverWidget } from './updatableHoverWidget.js';\nimport { timeout, TimeoutTimer } from '../../../../base/common/async.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { isNumber, isString } from '../../../../base/common/types.js';\nimport { KeyChord, KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';\nimport { KeybindingsRegistry, KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';\nimport { EditorContextKeys } from '../../../common/editorContextKeys.js';\nimport { IMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { stripIcons } from '../../../../base/common/iconLabels.js';\n\nexport class HoverService extends Disposable implements IHoverService {\n\tdeclare readonly _serviceBrand: undefined;\n\n\tprivate _contextViewHandler: IContextViewProvider;\n\tprivate _currentHoverOptions: IHoverOptions | undefined;\n\tprivate _currentHover: HoverWidget | undefined;\n\tprivate _currentDelayedHover: HoverWidget | undefined;\n\tprivate _currentDelayedHoverWasShown: boolean = false;\n\tprivate _currentDelayedHoverGroupId: number | string | undefined;\n\tprivate _lastHoverOptions: IHoverOptions | undefined;\n\n\tprivate _lastFocusedElementBeforeOpen: HTMLElement | undefined;\n\n\tprivate readonly _delayedHovers = new Map<HTMLElement, { show: (focus: boolean) => void }>();\n\tprivate readonly _managedHovers = new Map<HTMLElement, IManagedHover>();\n\n\tconstructor(\n\t\t@IInstantiationService private readonly _instantiationService: IInstantiationService,\n\t\t@IConfigurationService private readonly _configurationService: IConfigurationService,\n\t\t@IContextMenuService contextMenuService: IContextMenuService,\n\t\t@IKeybindingService private readonly _keybindingService: IKeybindingService,\n\t\t@ILayoutService private readonly _layoutService: ILayoutService,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\n\t\tthis._register(contextMenuService.onDidShowContextMenu(() => this.hideHover()));\n\t\tthis._contextViewHandler = this._register(new ContextViewHandler(this._layoutService));\n\n\t\tthis._register(KeybindingsRegistry.registerCommandAndKeybindingRule({\n\t\t\tid: 'workbench.action.showHover',\n\t\t\tweight: KeybindingWeight.WorkbenchContrib - 1,\n\t\t\twhen: EditorContextKeys.editorTextFocus.negate(),\n\t\t\tprimary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyMod.CtrlCmd | KeyCode.KeyI),\n\t\t\thandler: () => { this._showAndFocusHoverForActiveElement(); },\n\t\t}));\n\t}\n\n\tshowInstantHover(options: IHoverOptions, focus?: boolean, skipLastFocusedUpdate?: boolean, dontShow?: boolean): IHoverWidget | undefined {\n\t\tconst hover = this._createHover(options, skipLastFocusedUpdate);\n\t\tif (!hover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthis._showHover(hover, options, focus);\n\t\treturn hover;\n\t}\n\n\tshowDelayedHover(\n\t\toptions: IHoverOptions,\n\t\tlifecycleOptions: Pick<IHoverLifecycleOptions, 'groupId'>,\n\t): IHoverWidget | undefined {\n\t\t// Set `id` to default if it's undefined\n\t\tif (options.id === undefined) {\n\t\t\toptions.id = getHoverIdFromContent(options.content);\n\t\t}\n\n\t\tif (!this._currentDelayedHover || this._currentDelayedHoverWasShown) {\n\t\t\t// Current hover is locked, reject\n\t\t\tif (this._currentHover?.isLocked) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\t// Identity is the same, return current hover\n\t\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t\treturn this._currentHover;\n\t\t\t}\n\n\t\t\t// Check group identity, if it's the same skip the delay and show the hover immediately\n\t\t\tif (this._currentHover && !this._currentHover.isDisposed && this._currentDelayedHoverGroupId !== undefined && this._currentDelayedHoverGroupId === lifecycleOptions?.groupId) {\n\t\t\t\treturn this.showInstantHover({\n\t\t\t\t\t...options,\n\t\t\t\t\tappearance: {\n\t\t\t\t\t\t...options.appearance,\n\t\t\t\t\t\tskipFadeInAnimation: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (this._currentDelayedHover && getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t// If the hover is the same but timeout is not finished yet, return the current hover\n\t\t\treturn this._currentDelayedHover;\n\t\t}\n\n\t\tconst hover = this._createHover(options, undefined);\n\t\tif (!hover) {\n\t\t\tthis._currentDelayedHover = undefined;\n\t\t\tthis._currentDelayedHoverWasShown = false;\n\t\t\tthis._currentDelayedHoverGroupId = undefined;\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthis._currentDelayedHover = hover;\n\t\tthis._currentDelayedHoverWasShown = false;\n\t\tthis._currentDelayedHoverGroupId = lifecycleOptions?.groupId;\n\n\t\ttimeout(this._configurationService.getValue<number>('workbench.hover.delay')).then(() => {\n\t\t\tif (hover && !hover.isDisposed) {\n\t\t\t\tthis._currentDelayedHoverWasShown = true;\n\t\t\t\tthis._showHover(hover, options);\n\t\t\t}\n\t\t});\n\n\t\treturn hover;\n\t}\n\n\tsetupDelayedHover(\n\t\ttarget: HTMLElement,\n\t\toptions: (() => Omit<IHoverOptions, 'target'>) | Omit<IHoverOptions, 'target'>,\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t): IDisposable {\n\t\tconst resolveHoverOptions = () => ({\n\t\t\t...typeof options === 'function' ? options() : options,\n\t\t\ttarget\n\t\t} satisfies IHoverOptions);\n\t\treturn this._setupDelayedHover(target, resolveHoverOptions, lifecycleOptions);\n\t}\n\n\tsetupDelayedHoverAtMouse(\n\t\ttarget: HTMLElement,\n\t\toptions: (() => Omit<IHoverOptions, 'target' | 'position'>) | Omit<IHoverOptions, 'target' | 'position'>,\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t): IDisposable {\n\t\tconst resolveHoverOptions = (e?: MouseEvent) => ({\n\t\t\t...typeof options === 'function' ? options() : options,\n\t\t\ttarget: {\n\t\t\t\ttargetElements: [target],\n\t\t\t\tx: e !== undefined ? e.x + 10 : undefined,\n\t\t\t}\n\t\t} satisfies IHoverOptions);\n\t\treturn this._setupDelayedHover(target, resolveHoverOptions, lifecycleOptions);\n\t}\n\n\tprivate _setupDelayedHover(\n\t\ttarget: HTMLElement,\n\t\tresolveHoverOptions: ((e?: MouseEvent) => IHoverOptions),\n\t\tlifecycleOptions?: IHoverLifecycleOptions,\n\t) {\n\t\tconst store = new DisposableStore();\n\t\tstore.add(addDisposableListener(target, EventType.MOUSE_OVER, e => {\n\t\t\tthis.showDelayedHover(resolveHoverOptions(e), {\n\t\t\t\tgroupId: lifecycleOptions?.groupId\n\t\t\t});\n\t\t}));\n\t\tif (lifecycleOptions?.setupKeyboardEvents) {\n\t\t\tstore.add(addDisposableListener(target, EventType.KEY_DOWN, e => {\n\t\t\t\tconst evt = new StandardKeyboardEvent(e);\n\t\t\t\tif (evt.equals(KeyCode.Space) || evt.equals(KeyCode.Enter)) {\n\t\t\t\t\tthis.showInstantHover(resolveHoverOptions(), true);\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\tthis._delayedHovers.set(target, { show: (focus: boolean) => { this.showInstantHover(resolveHoverOptions(), focus); } });\n\t\tstore.add(toDisposable(() => this._delayedHovers.delete(target)));\n\n\t\treturn store;\n\t}\n\n\tprivate _createHover(options: IHoverOptions, skipLastFocusedUpdate?: boolean): HoverWidget | undefined {\n\t\tthis._currentDelayedHover = undefined;\n\n\t\tif (this._currentHover?.isLocked) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Set `id` to default if it's undefined\n\t\tif (options.id === undefined) {\n\t\t\toptions.id = getHoverIdFromContent(options.content);\n\t\t}\n\n\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\treturn undefined;\n\t\t}\n\t\tthis._currentHoverOptions = options;\n\t\tthis._lastHoverOptions = options;\n\t\tconst trapFocus = options.trapFocus || this._accessibilityService.isScreenReaderOptimized();\n\t\tconst activeElement = getActiveElement();\n\t\t// HACK, remove this check when #189076 is fixed\n\t\tif (!skipLastFocusedUpdate) {\n\t\t\tif (trapFocus && activeElement) {\n\t\t\t\tif (!activeElement.classList.contains('monaco-hover')) {\n\t\t\t\t\tthis._lastFocusedElementBeforeOpen = activeElement as HTMLElement;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._lastFocusedElementBeforeOpen = undefined;\n\t\t\t}\n\t\t}\n\n\t\tconst hoverDisposables = new DisposableStore();\n\t\tconst hover = this._instantiationService.createInstance(HoverWidget, options);\n\t\tif (options.persistence?.sticky) {\n\t\t\thover.isLocked = true;\n\t\t}\n\n\t\t// Adjust target position when a mouse event is provided as the hover position\n\t\tif (options.position?.hoverPosition && !isNumber(options.position.hoverPosition)) {\n\t\t\toptions.target = {\n\t\t\t\ttargetElements: isHTMLElement(options.target) ? [options.target] : options.target.targetElements,\n\t\t\t\tx: options.position.hoverPosition.x + 10\n\t\t\t};\n\t\t}\n\n\t\thover.onDispose(() => {\n\t\t\tconst hoverWasFocused = this._currentHover?.domNode && isAncestorOfActiveElement(this._currentHover.domNode);\n\t\t\tif (hoverWasFocused) {\n\t\t\t\t// Required to handle cases such as closing the hover with the escape key\n\t\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t\t}\n\n\t\t\t// Only clear the current options if it's the current hover, the current options help\n\t\t\t// reduce flickering when the same hover is shown multiple times\n\t\t\tif (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n\t\t\t\tthis.doHideHover();\n\t\t\t}\n\t\t\thoverDisposables.dispose();\n\t\t}, undefined, hoverDisposables);\n\t\t// Set the container explicitly to enable aux window support\n\t\tif (!options.container) {\n\t\t\tconst targetElement = isHTMLElement(options.target) ? options.target : options.target.targetElements[0];\n\t\t\toptions.container = this._layoutService.getContainer(getWindow(targetElement));\n\t\t}\n\n\t\thover.onRequestLayout(() => this._contextViewHandler.layout(), undefined, hoverDisposables);\n\t\tif (options.persistence?.sticky) {\n\t\t\thoverDisposables.add(addDisposableListener(getWindow(options.container).document, EventType.MOUSE_DOWN, e => {\n\t\t\t\tif (!isAncestor(e.target as HTMLElement, hover.domNode)) {\n\t\t\t\t\tthis.doHideHover();\n\t\t\t\t}\n\t\t\t}));\n\t\t} else {\n\t\t\tif ('targetElements' in options.target) {\n\t\t\t\tfor (const element of options.target.targetElements) {\n\t\t\t\t\thoverDisposables.add(addDisposableListener(element, EventType.CLICK, () => this.hideHover()));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thoverDisposables.add(addDisposableListener(options.target, EventType.CLICK, () => this.hideHover()));\n\t\t\t}\n\t\t\tconst focusedElement = getActiveElement();\n\t\t\tif (focusedElement) {\n\t\t\t\tconst focusedElementDocument = getWindow(focusedElement).document;\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_DOWN, e => this._keyDown(e, hover, !!options.persistence?.hideOnKeyDown)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_DOWN, e => this._keyDown(e, hover, !!options.persistence?.hideOnKeyDown)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_UP, e => this._keyUp(e, hover)));\n\t\t\t\thoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_UP, e => this._keyUp(e, hover)));\n\t\t\t}\n\t\t}\n\n\t\tif ('IntersectionObserver' in mainWindow) {\n\t\t\tconst observer = new IntersectionObserver(e => this._intersectionChange(e, hover), { threshold: 0 });\n\t\t\tconst firstTargetElement = 'targetElements' in options.target ? options.target.targetElements[0] : options.target;\n\t\t\tobserver.observe(firstTargetElement);\n\t\t\thoverDisposables.add(toDisposable(() => observer.disconnect()));\n\t\t}\n\n\t\tthis._currentHover = hover;\n\n\t\treturn hover;\n\t}\n\n\tprivate _showHover(hover: HoverWidget, options: IHoverOptions, focus?: boolean) {\n\t\tthis._contextViewHandler.showContextView(\n\t\t\tnew HoverContextViewDelegate(hover, focus),\n\t\t\toptions.container\n\t\t);\n\t}\n\n\thideHover(force?: boolean): void {\n\t\tif ((!force && this._currentHover?.isLocked) || !this._currentHoverOptions) {\n\t\t\treturn;\n\t\t}\n\t\tthis.doHideHover();\n\t}\n\n\tprivate doHideHover(): void {\n\t\tthis._currentHover = undefined;\n\t\tthis._currentHoverOptions = undefined;\n\t\tthis._contextViewHandler.hideContextView();\n\t}\n\n\tprivate _intersectionChange(entries: IntersectionObserverEntry[], hover: IDisposable): void {\n\t\tconst entry = entries[entries.length - 1];\n\t\tif (!entry.isIntersecting) {\n\t\t\thover.dispose();\n\t\t}\n\t}\n\n\tshowAndFocusLastHover(): void {\n\t\tif (!this._lastHoverOptions) {\n\t\t\treturn;\n\t\t}\n\t\tthis.showInstantHover(this._lastHoverOptions, true, true);\n\t}\n\n\tprivate _showAndFocusHoverForActiveElement(): void {\n\t\t// TODO: if hover is visible, focus it to avoid flickering\n\n\t\tlet activeElement = getActiveElement() as HTMLElement | null;\n\t\twhile (activeElement) {\n\t\t\tconst hover = this._delayedHovers.get(activeElement) ?? this._managedHovers.get(activeElement);\n\t\t\tif (hover) {\n\t\t\t\thover.show(true);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tactiveElement = activeElement.parentElement;\n\t\t}\n\t}\n\n\tprivate _keyDown(e: KeyboardEvent, hover: HoverWidget, hideOnKeyDown: boolean) {\n\t\tif (e.key === 'Alt') {\n\t\t\thover.isLocked = true;\n\t\t\treturn;\n\t\t}\n\t\tconst event = new StandardKeyboardEvent(e);\n\t\tconst keybinding = this._keybindingService.resolveKeyboardEvent(event);\n\t\tif (keybinding.getSingleModifierDispatchChords().some(value => !!value) || this._keybindingService.softDispatch(event, event.target).kind !== ResultKind.NoMatchingKb) {\n\t\t\treturn;\n\t\t}\n\t\tif (hideOnKeyDown && (!this._currentHoverOptions?.trapFocus || e.key !== 'Tab')) {\n\t\t\tthis.hideHover();\n\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t}\n\t}\n\n\tprivate _keyUp(e: KeyboardEvent, hover: HoverWidget) {\n\t\tif (e.key === 'Alt') {\n\t\t\thover.isLocked = false;\n\t\t\t// Hide if alt is released while the mouse is not over hover/target\n\t\t\tif (!hover.isMouseIn) {\n\t\t\t\tthis.hideHover();\n\t\t\t\tthis._lastFocusedElementBeforeOpen?.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t// TODO: Investigate performance of this function. There seems to be a lot of content created\n\t// and thrown away on start up\n\tsetupManagedHover(hoverDelegate: IHoverDelegate, targetElement: HTMLElement, content: IManagedHoverContentOrFactory, options?: IManagedHoverOptions | undefined): IManagedHover {\n\t\tif (hoverDelegate.showNativeHover) {\n\t\t\treturn setupNativeHover(targetElement, content);\n\t\t}\n\n\t\ttargetElement.setAttribute('custom-hover', 'true');\n\n\t\tif (targetElement.title !== '') {\n\t\t\tconsole.warn('HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute.');\n\t\t\tconsole.trace('Stack trace:', targetElement.title);\n\t\t\ttargetElement.title = '';\n\t\t}\n\n\t\tlet hoverPreparation: IDisposable | undefined;\n\t\tlet hoverWidget: ManagedHoverWidget | undefined;\n\n\t\tconst hideHover = (disposeWidget: boolean, disposePreparation: boolean) => {\n\t\t\tconst hadHover = hoverWidget !== undefined;\n\t\t\tif (disposeWidget) {\n\t\t\t\thoverWidget?.dispose();\n\t\t\t\thoverWidget = undefined;\n\t\t\t}\n\t\t\tif (disposePreparation) {\n\t\t\t\thoverPreparation?.dispose();\n\t\t\t\thoverPreparation = undefined;\n\t\t\t}\n\t\t\tif (hadHover) {\n\t\t\t\thoverDelegate.onDidHideHover?.();\n\t\t\t\thoverWidget = undefined;\n\t\t\t}\n\t\t};\n\n\t\tconst triggerShowHover = (delay: number, focus?: boolean, target?: IHoverDelegateTarget, trapFocus?: boolean) => {\n\t\t\treturn new TimeoutTimer(async () => {\n\t\t\t\tif (!hoverWidget || hoverWidget.isDisposed) {\n\t\t\t\t\thoverWidget = new ManagedHoverWidget(hoverDelegate, target || targetElement, delay > 0);\n\t\t\t\t\tawait hoverWidget.update(typeof content === 'function' ? content() : content, focus, { ...options, trapFocus });\n\t\t\t\t}\n\t\t\t}, delay);\n\t\t};\n\n\t\tconst store = new DisposableStore();\n\t\tlet isMouseDown = false;\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_DOWN, () => {\n\t\t\tisMouseDown = true;\n\t\t\thideHover(true, true);\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_UP, () => {\n\t\t\tisMouseDown = false;\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_LEAVE, (e: MouseEvent) => {\n\t\t\tisMouseDown = false;\n\t\t\t// HACK: `fromElement` is a non-standard property. Not sure what to replace it with,\n\t\t\t// `relatedTarget` is NOT equivalent.\n\t\t\tinterface MouseEventWithFrom extends MouseEvent {\n\t\t\t\tfromElement: Element | null;\n\t\t\t}\n\t\t\thideHover(false, (e as MouseEventWithFrom).fromElement === targetElement);\n\t\t}, true));\n\t\tstore.add(addDisposableListener(targetElement, EventType.MOUSE_OVER, (e: MouseEvent) => {\n\t\t\tif (hoverPreparation) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst mouseOverStore: DisposableStore = new DisposableStore();\n\n\t\t\tconst target: IHoverDelegateTarget = {\n\t\t\t\ttargetElements: [targetElement],\n\t\t\t\tdispose: () => { }\n\t\t\t};\n\t\t\tif (hoverDelegate.placement === undefined || hoverDelegate.placement === 'mouse') {\n\t\t\t\t// track the mouse position\n\t\t\t\tconst onMouseMove = (e: MouseEvent) => {\n\t\t\t\t\ttarget.x = e.x + 10;\n\t\t\t\t\tif ((isHTMLElement(e.target)) && getHoverTargetElement(e.target, targetElement) !== targetElement) {\n\t\t\t\t\t\thideHover(true, true);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tmouseOverStore.add(addDisposableListener(targetElement, EventType.MOUSE_MOVE, onMouseMove, true));\n\t\t\t}\n\n\t\t\thoverPreparation = mouseOverStore;\n\n\t\t\tif ((isHTMLElement(e.target)) && getHoverTargetElement(e.target as HTMLElement, targetElement) !== targetElement) {\n\t\t\t\treturn; // Do not show hover when the mouse is over another hover target\n\t\t\t}\n\n\t\t\tmouseOverStore.add(triggerShowHover(typeof hoverDelegate.delay === 'function' ? hoverDelegate.delay(content) : hoverDelegate.delay, false, target));\n\t\t}, true));\n\n\t\tconst onFocus = () => {\n\t\t\tif (isMouseDown || hoverPreparation) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst target: IHoverDelegateTarget = {\n\t\t\t\ttargetElements: [targetElement],\n\t\t\t\tdispose: () => { }\n\t\t\t};\n\t\t\tconst toDispose: DisposableStore = new DisposableStore();\n\t\t\tconst onBlur = () => hideHover(true, true);\n\t\t\ttoDispose.add(addDisposableListener(targetElement, EventType.BLUR, onBlur, true));\n\t\t\ttoDispose.add(triggerShowHover(typeof hoverDelegate.delay === 'function' ? hoverDelegate.delay(content) : hoverDelegate.delay, false, target));\n\t\t\thoverPreparation = toDispose;\n\t\t};\n\n\t\t// Do not show hover when focusing an input or textarea\n\t\tif (!isEditableElement(targetElement)) {\n\t\t\tstore.add(addDisposableListener(targetElement, EventType.FOCUS, onFocus, true));\n\t\t}\n\n\t\tconst hover: IManagedHover = {\n\t\t\tshow: focus => {\n\t\t\t\thideHover(false, true); // terminate a ongoing mouse over preparation\n\t\t\t\ttriggerShowHover(0, focus, undefined, focus); // show hover immediately\n\t\t\t},\n\t\t\thide: () => {\n\t\t\t\thideHover(true, true);\n\t\t\t},\n\t\t\tupdate: async (newContent, hoverOptions) => {\n\t\t\t\tcontent = newContent;\n\t\t\t\tawait hoverWidget?.update(content, undefined, hoverOptions);\n\t\t\t},\n\t\t\tdispose: () => {\n\t\t\t\tthis._managedHovers.delete(targetElement);\n\t\t\t\tstore.dispose();\n\t\t\t\thideHover(true, true);\n\t\t\t}\n\t\t};\n\t\tthis._managedHovers.set(targetElement, hover);\n\t\treturn hover;\n\t}\n\n\tshowManagedHover(target: HTMLElement): void {\n\t\tconst hover = this._managedHovers.get(target);\n\t\tif (hover) {\n\t\t\thover.show(true);\n\t\t}\n\t}\n\n\tpublic override dispose(): void {\n\t\tthis._managedHovers.forEach(hover => hover.dispose());\n\t\tsuper.dispose();\n\t}\n}\n\nfunction getHoverOptionsIdentity(options: IHoverOptions | undefined): IHoverOptions | number | string | undefined {\n\tif (options === undefined) {\n\t\treturn undefined;\n\t}\n\treturn options?.id ?? options;\n}\n\nfunction getHoverIdFromContent(content: string | HTMLElement | IMarkdownString): string | undefined {\n\tif (isHTMLElement(content)) {\n\t\treturn undefined;\n\t}\n\tif (typeof content === 'string') {\n\t\treturn content.toString();\n\t}\n\treturn content.value;\n}\n\nfunction getStringContent(contentOrFactory: IManagedHoverContentOrFactory): string | undefined {\n\tconst content = typeof contentOrFactory === 'function' ? contentOrFactory() : contentOrFactory;\n\tif (isString(content)) {\n\t\t// Icons don't render in the native hover so we strip them out\n\t\treturn stripIcons(content);\n\t}\n\tif (isManagedHoverTooltipMarkdownString(content)) {\n\t\treturn content.markdownNotSupportedFallback;\n\t}\n\treturn undefined;\n}\n\nfunction setupNativeHover(targetElement: HTMLElement, content: IManagedHoverContentOrFactory): IManagedHover {\n\tfunction updateTitle(title: string | undefined) {\n\t\tif (title) {\n\t\t\ttargetElement.setAttribute('title', title);\n\t\t} else {\n\t\t\ttargetElement.removeAttribute('title');\n\t\t}\n\t}\n\n\tupdateTitle(getStringContent(content));\n\treturn {\n\t\tupdate: (content) => updateTitle(getStringContent(content)),\n\t\tshow: () => { },\n\t\thide: () => { },\n\t\tdispose: () => updateTitle(undefined),\n\t};\n}\n\nclass HoverContextViewDelegate implements IDelegate {\n\n\t// Render over all other context views\n\tpublic readonly layer = 1;\n\n\tget anchorPosition() {\n\t\treturn this._hover.anchor;\n\t}\n\n\tconstructor(\n\t\tprivate readonly _hover: HoverWidget,\n\t\tprivate readonly _focus: boolean = false\n\t) {\n\t}\n\n\trender(container: HTMLElement) {\n\t\tthis._hover.render(container);\n\t\tif (this._focus) {\n\t\t\tthis._hover.focus();\n\t\t}\n\t\treturn this._hover;\n\t}\n\n\tgetAnchor() {\n\t\treturn {\n\t\t\tx: this._hover.x,\n\t\t\ty: this._hover.y\n\t\t};\n\t}\n\n\tlayout() {\n\t\tthis._hover.layout();\n\t}\n}\n\nfunction getHoverTargetElement(element: HTMLElement, stopElement?: HTMLElement): HTMLElement {\n\tstopElement = stopElement ?? getWindow(element).document.body;\n\twhile (!element.hasAttribute('custom-hover') && element !== stopElement) {\n\t\telement = element.parentElement!;\n\t}\n\treturn element;\n}\n\nregisterSingleton(IHoverService, HoverService, InstantiationType.Delayed);\n\nregisterThemingParticipant((theme, collector) => {\n\tconst hoverBorder = theme.getColor(editorHoverBorder);\n\tif (hoverBorder) {\n\t\tcollector.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n\t\tcollector.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n\t}\n});\n"]}
@@ -17,7 +17,7 @@ import { Emitter } from '../../../../base/common/event.js';
17
17
  import * as dom from '../../../../base/browser/dom.js';
18
18
  import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
19
19
  import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
20
- import { EDITOR_FONT_DEFAULTS } from '../../../common/config/editorOptions.js';
20
+ import { EDITOR_FONT_DEFAULTS } from '../../../common/config/fontInfo.js';
21
21
  import { HoverAction, HoverWidget as BaseHoverWidget, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';
22
22
  import { Widget } from '../../../../base/browser/ui/widget.js';
23
23
  import { IOpenerService } from '../../../../platform/opener/common/opener.js';