@qilin-agent/experimental-inspector 0.0.0-stage → 3.1.3

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 (930) hide show
  1. package/README.i18n.yaml +49 -0
  2. package/README.md +179 -2
  3. package/README.zh.md +180 -0
  4. package/cordis.patch.yml +5 -0
  5. package/icon.svg +12 -0
  6. package/lib/client.js +3572 -0
  7. package/lib/client.page.js +314 -0
  8. package/lib/devtools/Images/3d-center.svg +3 -0
  9. package/lib/devtools/Images/3d-pan.svg +3 -0
  10. package/lib/devtools/Images/3d-rotate.svg +3 -0
  11. package/lib/devtools/Images/accelerometer-back.svg +69 -0
  12. package/lib/devtools/Images/accelerometer-bottom.png +0 -0
  13. package/lib/devtools/Images/accelerometer-front.svg +28 -0
  14. package/lib/devtools/Images/accelerometer-left.png +0 -0
  15. package/lib/devtools/Images/accelerometer-right.png +0 -0
  16. package/lib/devtools/Images/accelerometer-top.png +0 -0
  17. package/lib/devtools/Images/account-tree.svg +10 -0
  18. package/lib/devtools/Images/add-photo.svg +3 -0
  19. package/lib/devtools/Images/ai-explorer-badge.svg +114 -0
  20. package/lib/devtools/Images/align-content-center.svg +5 -0
  21. package/lib/devtools/Images/align-content-end.svg +5 -0
  22. package/lib/devtools/Images/align-content-space-around.svg +6 -0
  23. package/lib/devtools/Images/align-content-space-between.svg +4 -0
  24. package/lib/devtools/Images/align-content-space-evenly.svg +6 -0
  25. package/lib/devtools/Images/align-content-start.svg +5 -0
  26. package/lib/devtools/Images/align-content-stretch.svg +4 -0
  27. package/lib/devtools/Images/align-items-baseline.svg +4 -0
  28. package/lib/devtools/Images/align-items-center.svg +5 -0
  29. package/lib/devtools/Images/align-items-end.svg +5 -0
  30. package/lib/devtools/Images/align-items-start.svg +5 -0
  31. package/lib/devtools/Images/align-items-stretch.svg +6 -0
  32. package/lib/devtools/Images/align-self-center.svg +3 -0
  33. package/lib/devtools/Images/align-self-end.svg +4 -0
  34. package/lib/devtools/Images/align-self-start.svg +4 -0
  35. package/lib/devtools/Images/align-self-stretch.svg +5 -0
  36. package/lib/devtools/Images/animation.svg +3 -0
  37. package/lib/devtools/Images/arrow-back.svg +4 -0
  38. package/lib/devtools/Images/arrow-collapse.svg +3 -0
  39. package/lib/devtools/Images/arrow-down.svg +10 -0
  40. package/lib/devtools/Images/arrow-drop-down-dark.svg +3 -0
  41. package/lib/devtools/Images/arrow-drop-down-light.svg +3 -0
  42. package/lib/devtools/Images/arrow-drop-down.svg +3 -0
  43. package/lib/devtools/Images/arrow-forward.svg +4 -0
  44. package/lib/devtools/Images/arrow-right-circle.svg +3 -0
  45. package/lib/devtools/Images/arrow-up-down-circle.svg +3 -0
  46. package/lib/devtools/Images/arrow-up-down.svg +3 -0
  47. package/lib/devtools/Images/arrow-up.svg +10 -0
  48. package/lib/devtools/Images/attach-file.svg +3 -0
  49. package/lib/devtools/Images/baseline-high-availability.svg +17 -0
  50. package/lib/devtools/Images/baseline-limited-availability.svg +19 -0
  51. package/lib/devtools/Images/baseline-low-availability.svg +31 -0
  52. package/lib/devtools/Images/bell.svg +3 -0
  53. package/lib/devtools/Images/bezier-curve-filled.svg +3 -0
  54. package/lib/devtools/Images/bin.svg +1 -0
  55. package/lib/devtools/Images/bottom-panel-close.svg +1 -0
  56. package/lib/devtools/Images/bottom-panel-open.svg +1 -0
  57. package/lib/devtools/Images/brackets.svg +1 -0
  58. package/lib/devtools/Images/breakpoint-circle.svg +4 -0
  59. package/lib/devtools/Images/breakpoint-crossed-filled.svg +1 -0
  60. package/lib/devtools/Images/breakpoint-crossed.svg +1 -0
  61. package/lib/devtools/Images/brush-2.svg +3 -0
  62. package/lib/devtools/Images/brush-filled.svg +1 -0
  63. package/lib/devtools/Images/brush.svg +1 -0
  64. package/lib/devtools/Images/bucket.svg +4 -0
  65. package/lib/devtools/Images/bug.svg +3 -0
  66. package/lib/devtools/Images/button-magic.svg +3 -0
  67. package/lib/devtools/Images/calendar-today.svg +3 -0
  68. package/lib/devtools/Images/center-focus-weak.svg +3 -0
  69. package/lib/devtools/Images/check-circle.svg +3 -0
  70. package/lib/devtools/Images/check-double.svg +3 -0
  71. package/lib/devtools/Images/checker.svg +12 -0
  72. package/lib/devtools/Images/checkmark.svg +1 -0
  73. package/lib/devtools/Images/chevron-double-right.svg +3 -0
  74. package/lib/devtools/Images/chevron-down.svg +3 -0
  75. package/lib/devtools/Images/chevron-left-dot.svg +4 -0
  76. package/lib/devtools/Images/chevron-left.svg +3 -0
  77. package/lib/devtools/Images/chevron-right.svg +3 -0
  78. package/lib/devtools/Images/chevron-up.svg +3 -0
  79. package/lib/devtools/Images/chromeLeft.avif +0 -0
  80. package/lib/devtools/Images/chromeMiddle.avif +0 -0
  81. package/lib/devtools/Images/chromeRight.avif +0 -0
  82. package/lib/devtools/Images/class.svg +6 -0
  83. package/lib/devtools/Images/clear-list.svg +3 -0
  84. package/lib/devtools/Images/clear.svg +3 -0
  85. package/lib/devtools/Images/cloud.svg +3 -0
  86. package/lib/devtools/Images/code-circle.svg +5 -0
  87. package/lib/devtools/Images/code-whisperer-badge.svg +166 -0
  88. package/lib/devtools/Images/code.svg +3 -0
  89. package/lib/devtools/Images/colon.svg +4 -0
  90. package/lib/devtools/Images/color-picker-filled.svg +3 -0
  91. package/lib/devtools/Images/color-picker.svg +3 -0
  92. package/lib/devtools/Images/compress.svg +8 -0
  93. package/lib/devtools/Images/console-conditional-breakpoint.svg +1 -0
  94. package/lib/devtools/Images/console-logpoint.svg +1 -0
  95. package/lib/devtools/Images/container.svg +4 -0
  96. package/lib/devtools/Images/cookie.svg +3 -0
  97. package/lib/devtools/Images/cookie_off.svg +3 -0
  98. package/lib/devtools/Images/copy.svg +3 -0
  99. package/lib/devtools/Images/corporate-fare.svg +3 -0
  100. package/lib/devtools/Images/credit-card.svg +3 -0
  101. package/lib/devtools/Images/cross-circle-filled.svg +3 -0
  102. package/lib/devtools/Images/cross-circle.svg +3 -0
  103. package/lib/devtools/Images/cross.svg +3 -0
  104. package/lib/devtools/Images/cssoverview_icons_2x.avif +0 -0
  105. package/lib/devtools/Images/database-off.svg +1 -0
  106. package/lib/devtools/Images/database.svg +3 -0
  107. package/lib/devtools/Images/deployed.svg +3 -0
  108. package/lib/devtools/Images/device-fold.svg +1 -0
  109. package/lib/devtools/Images/devices.svg +3 -0
  110. package/lib/devtools/Images/devtools-thumbnail.svg +57 -0
  111. package/lib/devtools/Images/devtools-tips.svg +61 -0
  112. package/lib/devtools/Images/devtools-user-badge.svg +129 -0
  113. package/lib/devtools/Images/devtools.svg +13 -0
  114. package/lib/devtools/Images/difference.svg +3 -0
  115. package/lib/devtools/Images/dock-bottom.svg +3 -0
  116. package/lib/devtools/Images/dock-left.svg +3 -0
  117. package/lib/devtools/Images/dock-right.svg +3 -0
  118. package/lib/devtools/Images/dock-window.svg +3 -0
  119. package/lib/devtools/Images/document.svg +3 -0
  120. package/lib/devtools/Images/dog-paw.svg +10 -0
  121. package/lib/devtools/Images/dom-detective-badge.svg +136 -0
  122. package/lib/devtools/Images/domain.svg +3 -0
  123. package/lib/devtools/Images/dots-horizontal.svg +1 -0
  124. package/lib/devtools/Images/dots-vertical.svg +3 -0
  125. package/lib/devtools/Images/download.svg +3 -0
  126. package/lib/devtools/Images/edit.svg +1 -0
  127. package/lib/devtools/Images/empty.svg +2 -0
  128. package/lib/devtools/Images/errorWave.svg +74 -0
  129. package/lib/devtools/Images/exclamation.svg +3 -0
  130. package/lib/devtools/Images/expand.svg +1 -0
  131. package/lib/devtools/Images/experiment-check.svg +1 -0
  132. package/lib/devtools/Images/experiment.svg +3 -0
  133. package/lib/devtools/Images/extension.svg +1 -0
  134. package/lib/devtools/Images/eye-crossed.svg +3 -0
  135. package/lib/devtools/Images/eye.svg +3 -0
  136. package/lib/devtools/Images/file-document.svg +3 -0
  137. package/lib/devtools/Images/file-fetch-xhr.svg +3 -0
  138. package/lib/devtools/Images/file-font.svg +4 -0
  139. package/lib/devtools/Images/file-generic.svg +3 -0
  140. package/lib/devtools/Images/file-image.svg +3 -0
  141. package/lib/devtools/Images/file-json.svg +4 -0
  142. package/lib/devtools/Images/file-manifest.svg +3 -0
  143. package/lib/devtools/Images/file-media.svg +3 -0
  144. package/lib/devtools/Images/file-script.svg +3 -0
  145. package/lib/devtools/Images/file-snippet.svg +4 -0
  146. package/lib/devtools/Images/file-stylesheet.svg +4 -0
  147. package/lib/devtools/Images/file-wasm.svg +5 -0
  148. package/lib/devtools/Images/file-websocket.svg +3 -0
  149. package/lib/devtools/Images/filter-clear.svg +3 -0
  150. package/lib/devtools/Images/filter-filled.svg +3 -0
  151. package/lib/devtools/Images/filter.svg +3 -0
  152. package/lib/devtools/Images/flex-direction.svg +5 -0
  153. package/lib/devtools/Images/flex-no-wrap.svg +5 -0
  154. package/lib/devtools/Images/flex-wrap.svg +8 -0
  155. package/lib/devtools/Images/flow.svg +3 -0
  156. package/lib/devtools/Images/flowsheet.svg +1 -0
  157. package/lib/devtools/Images/fold-more.svg +3 -0
  158. package/lib/devtools/Images/folder-asterisk.svg +10 -0
  159. package/lib/devtools/Images/folder-off.svg +3 -0
  160. package/lib/devtools/Images/folder.svg +3 -0
  161. package/lib/devtools/Images/frame-crossed.svg +3 -0
  162. package/lib/devtools/Images/frame-icon.svg +54 -0
  163. package/lib/devtools/Images/frame.svg +3 -0
  164. package/lib/devtools/Images/gdp-logo-dark.png +0 -0
  165. package/lib/devtools/Images/gdp-logo-light.png +0 -0
  166. package/lib/devtools/Images/gear-filled.svg +3 -0
  167. package/lib/devtools/Images/gear.svg +4 -0
  168. package/lib/devtools/Images/gears.svg +3 -0
  169. package/lib/devtools/Images/geminiInDevTools.png +0 -0
  170. package/lib/devtools/Images/geminiInDevTools_2x.png +0 -0
  171. package/lib/devtools/Images/global.svg +5 -0
  172. package/lib/devtools/Images/google.svg +3 -0
  173. package/lib/devtools/Images/goto-filled.svg +1 -0
  174. package/lib/devtools/Images/grid-direction.svg +6 -0
  175. package/lib/devtools/Images/grid-on.svg +10 -0
  176. package/lib/devtools/Images/group.svg +3 -0
  177. package/lib/devtools/Images/heap-snapshot.svg +6 -0
  178. package/lib/devtools/Images/heap-snapshots.svg +7 -0
  179. package/lib/devtools/Images/help.svg +3 -0
  180. package/lib/devtools/Images/history.svg +3 -0
  181. package/lib/devtools/Images/home.svg +3 -0
  182. package/lib/devtools/Images/hover.svg +6 -0
  183. package/lib/devtools/Images/iframe-crossed.svg +3 -0
  184. package/lib/devtools/Images/iframe.svg +3 -0
  185. package/lib/devtools/Images/import.svg +3 -0
  186. package/lib/devtools/Images/indeterminate-question-box.svg +3 -0
  187. package/lib/devtools/Images/info-filled.svg +3 -0
  188. package/lib/devtools/Images/info.svg +3 -0
  189. package/lib/devtools/Images/issue-cross-filled.svg +3 -0
  190. package/lib/devtools/Images/issue-exclamation-filled.svg +3 -0
  191. package/lib/devtools/Images/issue-questionmark-filled.svg +3 -0
  192. package/lib/devtools/Images/issue-text-filled.svg +3 -0
  193. package/lib/devtools/Images/justify-content-center.svg +5 -0
  194. package/lib/devtools/Images/justify-content-end.svg +5 -0
  195. package/lib/devtools/Images/justify-content-space-around.svg +6 -0
  196. package/lib/devtools/Images/justify-content-space-between.svg +4 -0
  197. package/lib/devtools/Images/justify-content-space-evenly.svg +6 -0
  198. package/lib/devtools/Images/justify-content-start.svg +5 -0
  199. package/lib/devtools/Images/justify-content-stretch.svg +4 -0
  200. package/lib/devtools/Images/justify-items-center.svg +4 -0
  201. package/lib/devtools/Images/justify-items-end.svg +4 -0
  202. package/lib/devtools/Images/justify-items-start.svg +4 -0
  203. package/lib/devtools/Images/justify-items-stretch.svg +4 -0
  204. package/lib/devtools/Images/keyboard-arrow-right.svg +1 -0
  205. package/lib/devtools/Images/keyboard-full.svg +10 -0
  206. package/lib/devtools/Images/keyboard-pen.svg +1 -0
  207. package/lib/devtools/Images/keyboard.svg +3 -0
  208. package/lib/devtools/Images/label-auto.svg +3 -0
  209. package/lib/devtools/Images/label.svg +10 -0
  210. package/lib/devtools/Images/large-arrow-right-filled.svg +1 -0
  211. package/lib/devtools/Images/layers-filled.svg +1 -0
  212. package/lib/devtools/Images/layers.svg +1 -0
  213. package/lib/devtools/Images/left-panel-close.svg +1 -0
  214. package/lib/devtools/Images/left-panel-open.svg +1 -0
  215. package/lib/devtools/Images/lightbulb-spark.svg +13 -0
  216. package/lib/devtools/Images/lightbulb.svg +3 -0
  217. package/lib/devtools/Images/lighthouse_logo.svg +158 -0
  218. package/lib/devtools/Images/list.svg +3 -0
  219. package/lib/devtools/Images/location-on.svg +3 -0
  220. package/lib/devtools/Images/lock-person.svg +1 -0
  221. package/lib/devtools/Images/lock.svg +3 -0
  222. package/lib/devtools/Images/mark-email-unread.svg +3 -0
  223. package/lib/devtools/Images/match-case.svg +3 -0
  224. package/lib/devtools/Images/match-whole-word.svg +1 -0
  225. package/lib/devtools/Images/memory.svg +6 -0
  226. package/lib/devtools/Images/minus.svg +3 -0
  227. package/lib/devtools/Images/mop.svg +1 -0
  228. package/lib/devtools/Images/mouse.svg +4 -0
  229. package/lib/devtools/Images/navigationControls.png +0 -0
  230. package/lib/devtools/Images/navigationControls_2x.png +0 -0
  231. package/lib/devtools/Images/network-settings.svg +3 -0
  232. package/lib/devtools/Images/node-stack-icon.svg +1 -0
  233. package/lib/devtools/Images/nodeIcon.avif +0 -0
  234. package/lib/devtools/Images/open-externally.svg +3 -0
  235. package/lib/devtools/Images/override.svg +11 -0
  236. package/lib/devtools/Images/palette.svg +10 -0
  237. package/lib/devtools/Images/pause-circle.svg +1 -0
  238. package/lib/devtools/Images/pause.svg +1 -0
  239. package/lib/devtools/Images/pen-spark.svg +3 -0
  240. package/lib/devtools/Images/performance-panel-delete-annotation.svg +32 -0
  241. package/lib/devtools/Images/performance-panel-diagram.svg +34 -0
  242. package/lib/devtools/Images/performance-panel-entry-label.svg +75 -0
  243. package/lib/devtools/Images/performance-panel-time-range.svg +15 -0
  244. package/lib/devtools/Images/performance.svg +3 -0
  245. package/lib/devtools/Images/person.svg +3 -0
  246. package/lib/devtools/Images/photo-camera.svg +10 -0
  247. package/lib/devtools/Images/play.svg +3 -0
  248. package/lib/devtools/Images/plus.svg +3 -0
  249. package/lib/devtools/Images/policy.svg +3 -0
  250. package/lib/devtools/Images/popoverArrows.png +0 -0
  251. package/lib/devtools/Images/popup.svg +3 -0
  252. package/lib/devtools/Images/preview_feature_video_thumbnail.svg +92 -0
  253. package/lib/devtools/Images/profile.svg +3 -0
  254. package/lib/devtools/Images/psychiatry.svg +3 -0
  255. package/lib/devtools/Images/puzzle.svg +3 -0
  256. package/lib/devtools/Images/record-start.svg +4 -0
  257. package/lib/devtools/Images/record-stop.svg +4 -0
  258. package/lib/devtools/Images/redo.svg +3 -0
  259. package/lib/devtools/Images/refresh.svg +10 -0
  260. package/lib/devtools/Images/regular-expression.svg +3 -0
  261. package/lib/devtools/Images/replace.svg +1 -0
  262. package/lib/devtools/Images/replay.svg +3 -0
  263. package/lib/devtools/Images/report.svg +1 -0
  264. package/lib/devtools/Images/resizeDiagonal.svg +1 -0
  265. package/lib/devtools/Images/resizeHorizontal.svg +1 -0
  266. package/lib/devtools/Images/resizeVertical.svg +1 -0
  267. package/lib/devtools/Images/resume.svg +1 -0
  268. package/lib/devtools/Images/revert.svg +3 -0
  269. package/lib/devtools/Images/review.svg +5 -0
  270. package/lib/devtools/Images/right-panel-close.svg +1 -0
  271. package/lib/devtools/Images/right-panel-open.svg +1 -0
  272. package/lib/devtools/Images/scissors.svg +3 -0
  273. package/lib/devtools/Images/screen-rotation.svg +1 -0
  274. package/lib/devtools/Images/search.svg +3 -0
  275. package/lib/devtools/Images/select-element.svg +3 -0
  276. package/lib/devtools/Images/send.svg +3 -0
  277. package/lib/devtools/Images/shadow.svg +3 -0
  278. package/lib/devtools/Images/shield.svg +3 -0
  279. package/lib/devtools/Images/small-status-dot.svg +3 -0
  280. package/lib/devtools/Images/smart-assistant.svg +3 -0
  281. package/lib/devtools/Images/snippet.svg +4 -0
  282. package/lib/devtools/Images/spark-info.svg +3 -0
  283. package/lib/devtools/Images/spark.svg +3 -0
  284. package/lib/devtools/Images/speculative-loads.svg +1 -0
  285. package/lib/devtools/Images/speedster-badge.svg +166 -0
  286. package/lib/devtools/Images/star.svg +3 -0
  287. package/lib/devtools/Images/step-into.svg +1 -0
  288. package/lib/devtools/Images/step-out.svg +1 -0
  289. package/lib/devtools/Images/step-over.svg +1 -0
  290. package/lib/devtools/Images/step.svg +1 -0
  291. package/lib/devtools/Images/stop.svg +3 -0
  292. package/lib/devtools/Images/symbol.svg +3 -0
  293. package/lib/devtools/Images/sync.svg +3 -0
  294. package/lib/devtools/Images/tab-move.svg +1 -0
  295. package/lib/devtools/Images/table.svg +3 -0
  296. package/lib/devtools/Images/terminal.svg +10 -0
  297. package/lib/devtools/Images/text-analysis.svg +3 -0
  298. package/lib/devtools/Images/thumb-down-filled.svg +3 -0
  299. package/lib/devtools/Images/thumb-down.svg +3 -0
  300. package/lib/devtools/Images/thumb-up-filled.svg +3 -0
  301. package/lib/devtools/Images/thumb-up.svg +3 -0
  302. package/lib/devtools/Images/tonality.svg +10 -0
  303. package/lib/devtools/Images/toolbarResizerVertical.png +0 -0
  304. package/lib/devtools/Images/top-panel-close.svg +1 -0
  305. package/lib/devtools/Images/top-panel-open.svg +1 -0
  306. package/lib/devtools/Images/touch-app.svg +4 -0
  307. package/lib/devtools/Images/touchCursor.png +0 -0
  308. package/lib/devtools/Images/touchCursor_2x.png +0 -0
  309. package/lib/devtools/Images/triangle-bottom-right.svg +3 -0
  310. package/lib/devtools/Images/triangle-down.svg +1 -0
  311. package/lib/devtools/Images/triangle-left.svg +1 -0
  312. package/lib/devtools/Images/triangle-right.svg +1 -0
  313. package/lib/devtools/Images/triangle-up.svg +3 -0
  314. package/lib/devtools/Images/trophy.svg +3 -0
  315. package/lib/devtools/Images/tune.svg +3 -0
  316. package/lib/devtools/Images/undo.svg +1 -0
  317. package/lib/devtools/Images/warning-filled.svg +3 -0
  318. package/lib/devtools/Images/warning.svg +3 -0
  319. package/lib/devtools/Images/watch.svg +3 -0
  320. package/lib/devtools/Images/whatsnew.svg +61 -0
  321. package/lib/devtools/Images/width.svg +3 -0
  322. package/lib/devtools/Images/zoom-in.svg +3 -0
  323. package/lib/devtools/LICENSE +27 -0
  324. package/lib/devtools/application_tokens.css +413 -0
  325. package/lib/devtools/chunks/FormatterActions-FcPgI0uV.js +19 -0
  326. package/lib/devtools/chunks/UIFilter-CIzBruM3.js +18 -0
  327. package/lib/devtools/chunks/UIRequestLocation-CtGcVN3I.js +48 -0
  328. package/lib/devtools/chunks/_qilin-devtools_empty-BvRk9kiK.js +0 -0
  329. package/lib/devtools/chunks/accessibility-CwvHp3sj.js +2718 -0
  330. package/lib/devtools/chunks/acorn-_jSanihy.js +3232 -0
  331. package/lib/devtools/chunks/adorners-D4aU6nuY.js +45 -0
  332. package/lib/devtools/chunks/ai_assistance-BU6E0Wio.js +4255 -0
  333. package/lib/devtools/chunks/angular-Dutmu-L9.js +117 -0
  334. package/lib/devtools/chunks/animation-TEwO5UI_.js +922 -0
  335. package/lib/devtools/chunks/application-SCf6MiCN.js +12740 -0
  336. package/lib/devtools/chunks/autofill-Dp3nMnuK.js +198 -0
  337. package/lib/devtools/chunks/autofill_manager-BXntqfdp.js +58 -0
  338. package/lib/devtools/chunks/bindings-DgoVEdsr.js +4105 -0
  339. package/lib/devtools/chunks/browser-DL1S1Kiu.js +62 -0
  340. package/lib/devtools/chunks/browser_debugger-p7Rr4IBR.js +629 -0
  341. package/lib/devtools/chunks/changes-DeW5MC9u.js +2 -0
  342. package/lib/devtools/chunks/changes-k42bihtm.js +393 -0
  343. package/lib/devtools/chunks/checkbox.css-CZJJ6atQ.js +4 -0
  344. package/lib/devtools/chunks/chunk-DF993M8W.js +11 -0
  345. package/lib/devtools/chunks/code_highlighter-BnTPt9_G.js +210 -0
  346. package/lib/devtools/chunks/codemirror-CBR9VJma.js +15842 -0
  347. package/lib/devtools/chunks/color_picker-Cuh_X19Y.js +1566 -0
  348. package/lib/devtools/chunks/common-DjRFwulW.js +15145 -0
  349. package/lib/devtools/chunks/common-Uu9A2glf.js +2 -0
  350. package/lib/devtools/chunks/common-qd_KLeYO.js +6639 -0
  351. package/lib/devtools/chunks/components-CnPGgDUW.js +704 -0
  352. package/lib/devtools/chunks/components-Cw5tHQqN.js +1338 -0
  353. package/lib/devtools/chunks/components-EJwviLtZ.js +1090 -0
  354. package/lib/devtools/chunks/console-D1WlMaFQ.js +3855 -0
  355. package/lib/devtools/chunks/console-yMm3XVTY.js +2 -0
  356. package/lib/devtools/chunks/console_counters-9SfIdrUo.js +103 -0
  357. package/lib/devtools/chunks/coverage-BbFH390Q.js +1176 -0
  358. package/lib/devtools/chunks/coverage-CLBpovLw.js +2 -0
  359. package/lib/devtools/chunks/cpp-CdElSCaB.js +435 -0
  360. package/lib/devtools/chunks/css_overview-cITV9auE.js +1288 -0
  361. package/lib/devtools/chunks/data_grid-pC5qqfsJ.js +1671 -0
  362. package/lib/devtools/chunks/developer_resources-4DqQIvy6.js +240 -0
  363. package/lib/devtools/chunks/diff-qn55JSCS.js +444 -0
  364. package/lib/devtools/chunks/dom_extension-BfrKZ4JG.js +172 -0
  365. package/lib/devtools/chunks/elements-CgEYz3mX.js +2 -0
  366. package/lib/devtools/chunks/elements-Dbx4q9-v.js +11407 -0
  367. package/lib/devtools/chunks/emulation-C6XKPPGu.js +1306 -0
  368. package/lib/devtools/chunks/emulation-D8xbdsAj.js +2 -0
  369. package/lib/devtools/chunks/emulation-EtJlEukP.js +2732 -0
  370. package/lib/devtools/chunks/emulation-cjFPXHT9.js +157 -0
  371. package/lib/devtools/chunks/event_listeners-BeTH3gi2.js +414 -0
  372. package/lib/devtools/chunks/explain-P_aDGFSD.js +747 -0
  373. package/lib/devtools/chunks/greendev-BU0QcVPX.js +152 -0
  374. package/lib/devtools/chunks/heap_snapshot-CZt2KUPL.js +427 -0
  375. package/lib/devtools/chunks/helper-CI72KvIC.js +33 -0
  376. package/lib/devtools/chunks/helpers--xrfGSwQ.js +29 -0
  377. package/lib/devtools/chunks/i18n-DvFMqQdJ.js +17 -0
  378. package/lib/devtools/chunks/icon_button-BebVdJD8.js +83 -0
  379. package/lib/devtools/chunks/inline_editor-D54X5UUr.js +1309 -0
  380. package/lib/devtools/chunks/inspector_main-DRbdXLmF.js +279 -0
  381. package/lib/devtools/chunks/issue_counter-CeOjTNGW.js +193 -0
  382. package/lib/devtools/chunks/issues-CegBKEda.js +1649 -0
  383. package/lib/devtools/chunks/issues_manager-D7nfNPN1.js +3009 -0
  384. package/lib/devtools/chunks/java-7g_qfFa2.js +263 -0
  385. package/lib/devtools/chunks/layer_viewer-CaFC5oyv.js +1423 -0
  386. package/lib/devtools/chunks/layers-CXqlD9zH.js +370 -0
  387. package/lib/devtools/chunks/legacy-Bqn4Q0Tf.js +41804 -0
  388. package/lib/devtools/chunks/legacy-DOCLCisy.js +1434 -0
  389. package/lib/devtools/chunks/less-DXiRNbd4.js +195 -0
  390. package/lib/devtools/chunks/lighthouse-DtpzvfT6.js +3920 -0
  391. package/lib/devtools/chunks/lighthouse-T9ZpmENr.js +2 -0
  392. package/lib/devtools/chunks/linear_memory_inspector-C50PtM45.js +305 -0
  393. package/lib/devtools/chunks/live-metrics-Bs7wxibB.js +284 -0
  394. package/lib/devtools/chunks/main-C5y6NscM.js +2 -0
  395. package/lib/devtools/chunks/main-DcgYyEI0.js +755 -0
  396. package/lib/devtools/chunks/markdown-tZoR6Bsu.js +1512 -0
  397. package/lib/devtools/chunks/markdown_view-C67b2DdG.js +461 -0
  398. package/lib/devtools/chunks/marked-zGgfoDxO.js +1362 -0
  399. package/lib/devtools/chunks/media-BhuqASbO.js +1337 -0
  400. package/lib/devtools/chunks/media-Wfo1AbXC.js +2 -0
  401. package/lib/devtools/chunks/menus-BAUukA5-.js +969 -0
  402. package/lib/devtools/chunks/mobile_throttling-C26zde8o.js +2 -0
  403. package/lib/devtools/chunks/mobile_throttling-Cw4AkJH4.js +1052 -0
  404. package/lib/devtools/chunks/network-C3gIloDN.js +2 -0
  405. package/lib/devtools/chunks/network-CaxdpGU2.js +9181 -0
  406. package/lib/devtools/chunks/objectValue.css-C9o9fdM2.js +4 -0
  407. package/lib/devtools/chunks/object_ui-BYgPTK_b.js +1461 -0
  408. package/lib/devtools/chunks/object_ui-E7eR7aD-.js +2 -0
  409. package/lib/devtools/chunks/perf_ui-BqzJrt4p.js +2 -0
  410. package/lib/devtools/chunks/perf_ui-CQMkYfn3.js +3143 -0
  411. package/lib/devtools/chunks/performance_monitor-B2kUoCv0.js +385 -0
  412. package/lib/devtools/chunks/php-tl5gKrxu.js +423 -0
  413. package/lib/devtools/chunks/platform-BzB373NB.js +600 -0
  414. package/lib/devtools/chunks/profiler-BGu3akEf.js +4608 -0
  415. package/lib/devtools/chunks/protocol_client-Cwf_jb8R.js +24329 -0
  416. package/lib/devtools/chunks/protocol_monitor-B9nMqAAE.js +2 -0
  417. package/lib/devtools/chunks/protocol_monitor-CvLQ8ms1.js +1224 -0
  418. package/lib/devtools/chunks/puppeteer-CaOjgj3v.js +13299 -0
  419. package/lib/devtools/chunks/python-D9AdRkMm.js +580 -0
  420. package/lib/devtools/chunks/quick_open-C3IZ69m9.js +2 -0
  421. package/lib/devtools/chunks/quick_open-DRITaPnZ.js +722 -0
  422. package/lib/devtools/chunks/recorder-C0f1n95b.js +5465 -0
  423. package/lib/devtools/chunks/recorder-actions-S2RfLX4H.js +6 -0
  424. package/lib/devtools/chunks/request_link_icon-fGy57GcW.js +87 -0
  425. package/lib/devtools/chunks/root-DbVQo07X.js +255 -0
  426. package/lib/devtools/chunks/sass-BPQlMmw2.js +370 -0
  427. package/lib/devtools/chunks/security-NbgKa3ux.js +898 -0
  428. package/lib/devtools/chunks/sensors-nM7qcBE4.js +752 -0
  429. package/lib/devtools/chunks/settings-aKtQC12v.js +1433 -0
  430. package/lib/devtools/chunks/settings_ui-CzxAFzIb.js +175 -0
  431. package/lib/devtools/chunks/snackbars-lPThuWYs.js +12010 -0
  432. package/lib/devtools/chunks/snippets-dIuBmVBv.js +173 -0
  433. package/lib/devtools/chunks/source_frame-CSjno3kf.js +1352 -0
  434. package/lib/devtools/chunks/sources-BIZssBei.js +8216 -0
  435. package/lib/devtools/chunks/sources-Bf8QJxju.js +2 -0
  436. package/lib/devtools/chunks/suggestion_input-Duuu5pyd.js +196 -0
  437. package/lib/devtools/chunks/svelte-DJS1itbE.js +744 -0
  438. package/lib/devtools/chunks/textInput.css-DPvwvIic.js +4 -0
  439. package/lib/devtools/chunks/text_editor-Dq1P6D2J.js +15706 -0
  440. package/lib/devtools/chunks/text_utils-ohNt_gua.js +608 -0
  441. package/lib/devtools/chunks/theme_support-CbSSLkbO.js +92 -0
  442. package/lib/devtools/chunks/third-party-web-DGiPoc0U.js +12626 -0
  443. package/lib/devtools/chunks/timeline-BE_ysZxO.js +2 -0
  444. package/lib/devtools/chunks/timeline-C4vCX79k.js +16347 -0
  445. package/lib/devtools/chunks/utils-CELci976.js +298 -0
  446. package/lib/devtools/chunks/vue-CjH9yovn.js +73 -0
  447. package/lib/devtools/chunks/wast-CbGHiqaW.js +109 -0
  448. package/lib/devtools/chunks/web_audio-IdfBLjwV.js +277 -0
  449. package/lib/devtools/chunks/webauthn-iRZlbjGV.js +522 -0
  450. package/lib/devtools/chunks/whats_new-DOTPf2xJ.js +177 -0
  451. package/lib/devtools/chunks/xml-DI9dcP5w.js +327 -0
  452. package/lib/devtools/connect.js +9 -0
  453. package/lib/devtools/design_system_tokens.css +1061 -0
  454. package/lib/devtools/device_mode_emulation_frame.html +25 -0
  455. package/lib/devtools/devtools_app.html +25 -0
  456. package/lib/devtools/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  457. package/lib/devtools/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  458. package/lib/devtools/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  459. package/lib/devtools/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  460. package/lib/devtools/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  461. package/lib/devtools/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  462. package/lib/devtools/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  463. package/lib/devtools/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  464. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  465. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  466. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  467. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  468. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  469. package/lib/devtools/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  470. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  471. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  472. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  473. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  474. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  475. package/lib/devtools/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  476. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  477. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  478. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  479. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  480. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  481. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  482. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  483. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  484. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  485. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  486. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  487. package/lib/devtools/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  488. package/lib/devtools/emulated_devices/optimized/iPad-landscape.avif +0 -0
  489. package/lib/devtools/emulated_devices/optimized/iPad-portrait.avif +0 -0
  490. package/lib/devtools/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  491. package/lib/devtools/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  492. package/lib/devtools/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  493. package/lib/devtools/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  494. package/lib/devtools/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  495. package/lib/devtools/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  496. package/lib/devtools/emulated_devices/optimized/optimized_images.gni +53 -0
  497. package/lib/devtools/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +4 -0
  498. package/lib/devtools/entrypoints/devtools_app/devtools_app.js +6240 -0
  499. package/lib/devtools/entrypoints/formatter_worker/formatter_worker-entrypoint.js +2810 -0
  500. package/lib/devtools/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +2142 -0
  501. package/lib/devtools/entrypoints/lighthouse_worker/lighthouse_worker.js +290095 -0
  502. package/lib/devtools/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +3403 -0
  503. package/lib/devtools/models/issues_manager/descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  504. package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameOrigin.md +8 -0
  505. package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  506. package/lib/devtools/models/issues_manager/descriptions/CoepCorpNotSameSite.md +7 -0
  507. package/lib/devtools/models/issues_manager/descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  508. package/lib/devtools/models/issues_manager/descriptions/CompatibilityModeQuirks.md +5 -0
  509. package/lib/devtools/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  510. package/lib/devtools/models/issues_manager/descriptions/LowTextContrast.md +5 -0
  511. package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  512. package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  513. package/lib/devtools/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  514. package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  515. package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  516. package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  517. package/lib/devtools/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  518. package/lib/devtools/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  519. package/lib/devtools/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  520. package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  521. package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  522. package/lib/devtools/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  523. package/lib/devtools/models/issues_manager/descriptions/arInsecureContext.md +7 -0
  524. package/lib/devtools/models/issues_manager/descriptions/arInvalidInfoHeader.md +5 -0
  525. package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  526. package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  527. package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +5 -0
  528. package/lib/devtools/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  529. package/lib/devtools/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
  530. package/lib/devtools/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
  531. package/lib/devtools/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +5 -0
  532. package/lib/devtools/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +5 -0
  533. package/lib/devtools/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +5 -0
  534. package/lib/devtools/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +5 -0
  535. package/lib/devtools/models/issues_manager/descriptions/arNoWebOrOsSupport.md +4 -0
  536. package/lib/devtools/models/issues_manager/descriptions/arOsSourceIgnored.md +18 -0
  537. package/lib/devtools/models/issues_manager/descriptions/arOsTriggerIgnored.md +19 -0
  538. package/lib/devtools/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +8 -0
  539. package/lib/devtools/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
  540. package/lib/devtools/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
  541. package/lib/devtools/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
  542. package/lib/devtools/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +10 -0
  543. package/lib/devtools/models/issues_manager/descriptions/arWebAndOsHeaders.md +11 -0
  544. package/lib/devtools/models/issues_manager/descriptions/bounceTrackingMitigations.md +3 -0
  545. package/lib/devtools/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  546. package/lib/devtools/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  547. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
  548. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidHeader.md +12 -0
  549. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
  550. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistItemNotInnerList.md +12 -0
  551. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistMoreThanOneList.md +7 -0
  552. package/lib/devtools/models/issues_manager/descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
  553. package/lib/devtools/models/issues_manager/descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  554. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
  555. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
  556. package/lib/devtools/models/issues_manager/descriptions/cookieExcludePortMismatch.md +8 -0
  557. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeSchemeMismatch.md +7 -0
  558. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  559. package/lib/devtools/models/issues_manager/descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  560. package/lib/devtools/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
  561. package/lib/devtools/models/issues_manager/descriptions/cookieWarnMetadataGrantRead.md +4 -0
  562. package/lib/devtools/models/issues_manager/descriptions/cookieWarnMetadataGrantSet.md +4 -0
  563. package/lib/devtools/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  564. package/lib/devtools/models/issues_manager/descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  565. package/lib/devtools/models/issues_manager/descriptions/corsAllowCredentialsRequired.md +6 -0
  566. package/lib/devtools/models/issues_manager/descriptions/corsDisabledScheme.md +7 -0
  567. package/lib/devtools/models/issues_manager/descriptions/corsDisallowedByMode.md +7 -0
  568. package/lib/devtools/models/issues_manager/descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  569. package/lib/devtools/models/issues_manager/descriptions/corsInvalidHeaderValues.md +7 -0
  570. package/lib/devtools/models/issues_manager/descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  571. package/lib/devtools/models/issues_manager/descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  572. package/lib/devtools/models/issues_manager/descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  573. package/lib/devtools/models/issues_manager/descriptions/corsOriginMismatch.md +6 -0
  574. package/lib/devtools/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +5 -0
  575. package/lib/devtools/models/issues_manager/descriptions/corsRedirectContainsCredentials.md +5 -0
  576. package/lib/devtools/models/issues_manager/descriptions/corsWildcardOriginNotAllowed.md +8 -0
  577. package/lib/devtools/models/issues_manager/descriptions/cspEvalViolation.md +9 -0
  578. package/lib/devtools/models/issues_manager/descriptions/cspInlineViolation.md +10 -0
  579. package/lib/devtools/models/issues_manager/descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  580. package/lib/devtools/models/issues_manager/descriptions/cspTrustedTypesSinkViolation.md +8 -0
  581. package/lib/devtools/models/issues_manager/descriptions/cspURLViolation.md +10 -0
  582. package/lib/devtools/models/issues_manager/descriptions/deprecation.md +3 -0
  583. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
  584. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
  585. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestInvalidEmail.md +1 -0
  586. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
  587. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
  588. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
  589. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
  590. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
  591. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
  592. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
  593. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
  594. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
  595. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
  596. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
  597. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
  598. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
  599. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
  600. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
  601. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
  602. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
  603. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
  604. package/lib/devtools/models/issues_manager/descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
  605. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  606. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  607. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  608. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  609. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestCanceled.md +1 -0
  610. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  611. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  612. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  613. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  614. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  615. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  616. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  617. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  618. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  619. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  620. package/lib/devtools/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  621. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  622. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  623. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  624. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  625. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  626. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  627. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  628. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  629. package/lib/devtools/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  630. package/lib/devtools/models/issues_manager/descriptions/fetchingPartitionedBlobURL.md +7 -0
  631. package/lib/devtools/models/issues_manager/descriptions/genericBackUINavigationWouldSkipAd.md +4 -0
  632. package/lib/devtools/models/issues_manager/descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
  633. package/lib/devtools/models/issues_manager/descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  634. package/lib/devtools/models/issues_manager/descriptions/genericFormDuplicateIdForInputError.md +5 -0
  635. package/lib/devtools/models/issues_manager/descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  636. package/lib/devtools/models/issues_manager/descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  637. package/lib/devtools/models/issues_manager/descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  638. package/lib/devtools/models/issues_manager/descriptions/genericFormInputWithNoLabelError.md +5 -0
  639. package/lib/devtools/models/issues_manager/descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  640. package/lib/devtools/models/issues_manager/descriptions/genericFormLabelForNameError.md +5 -0
  641. package/lib/devtools/models/issues_manager/descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
  642. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextMissingToolDescription.md +5 -0
  643. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextMissingToolName.md +5 -0
  644. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextParameterMissingName.md +5 -0
  645. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextParameterMissingTitleAndDescription.md +5 -0
  646. package/lib/devtools/models/issues_manager/descriptions/genericFormModelContextRequiredParameterMissingName.md +5 -0
  647. package/lib/devtools/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  648. package/lib/devtools/models/issues_manager/descriptions/genericResponseWasBlockedByORB.md +4 -0
  649. package/lib/devtools/models/issues_manager/descriptions/heavyAd.md +10 -0
  650. package/lib/devtools/models/issues_manager/descriptions/mixedContent.md +5 -0
  651. package/lib/devtools/models/issues_manager/descriptions/navigatingPartitionedBlobURL.md +5 -0
  652. package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabled.md +7 -0
  653. package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
  654. package/lib/devtools/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
  655. package/lib/devtools/models/issues_manager/descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
  656. package/lib/devtools/models/issues_manager/descriptions/permissionElementFencedFrameDisallowed.md +5 -0
  657. package/lib/devtools/models/issues_manager/descriptions/permissionElementFontSizeTooLarge.md +5 -0
  658. package/lib/devtools/models/issues_manager/descriptions/permissionElementFontSizeTooSmall.md +5 -0
  659. package/lib/devtools/models/issues_manager/descriptions/permissionElementGeolocationDeprecated.md +5 -0
  660. package/lib/devtools/models/issues_manager/descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
  661. package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidDisplayStyle.md +5 -0
  662. package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidSizeValue.md +5 -0
  663. package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidType.md +5 -0
  664. package/lib/devtools/models/issues_manager/descriptions/permissionElementInvalidTypeActivation.md +5 -0
  665. package/lib/devtools/models/issues_manager/descriptions/permissionElementLowContrast.md +5 -0
  666. package/lib/devtools/models/issues_manager/descriptions/permissionElementNonOpaqueColor.md +5 -0
  667. package/lib/devtools/models/issues_manager/descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
  668. package/lib/devtools/models/issues_manager/descriptions/permissionElementPaddingRightUnsupported.md +6 -0
  669. package/lib/devtools/models/issues_manager/descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
  670. package/lib/devtools/models/issues_manager/descriptions/permissionElementRegistrationFailed.md +5 -0
  671. package/lib/devtools/models/issues_manager/descriptions/permissionElementRequestInProgress.md +5 -0
  672. package/lib/devtools/models/issues_manager/descriptions/permissionElementSecurityChecksFailed.md +5 -0
  673. package/lib/devtools/models/issues_manager/descriptions/permissionElementTypeNotSupported.md +5 -0
  674. package/lib/devtools/models/issues_manager/descriptions/permissionElementUntrustedEvent.md +7 -0
  675. package/lib/devtools/models/issues_manager/descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  676. package/lib/devtools/models/issues_manager/descriptions/propertyRuleInvalidNameIssue.md +3 -0
  677. package/lib/devtools/models/issues_manager/descriptions/propertyRuleIssue.md +7 -0
  678. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  679. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  680. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  681. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  682. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  683. package/lib/devtools/models/issues_manager/descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  684. package/lib/devtools/models/issues_manager/descriptions/selectivePermissionsIntervention.md +7 -0
  685. package/lib/devtools/models/issues_manager/descriptions/sharedArrayBuffer.md +7 -0
  686. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  687. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  688. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  689. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  690. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  691. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  692. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  693. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  694. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  695. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  696. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  697. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  698. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  699. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  700. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  701. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  702. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  703. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  704. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  705. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  706. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  707. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  708. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  709. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  710. package/lib/devtools/models/issues_manager/descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  711. package/lib/devtools/models/issues_manager/descriptions/sriInvalidSignatureHeader.md +14 -0
  712. package/lib/devtools/models/issues_manager/descriptions/sriInvalidSignatureInputHeader.md +15 -0
  713. package/lib/devtools/models/issues_manager/descriptions/sriMissingSignatureHeader.md +8 -0
  714. package/lib/devtools/models/issues_manager/descriptions/sriMissingSignatureInputHeader.md +7 -0
  715. package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  716. package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  717. package/lib/devtools/models/issues_manager/descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  718. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  719. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  720. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  721. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  722. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  723. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  724. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  725. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  726. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  727. package/lib/devtools/models/issues_manager/descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  728. package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedIntegrityMismatch.md +10 -0
  729. package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedInvalidLength.md +5 -0
  730. package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedSignatureExpired.md +6 -0
  731. package/lib/devtools/models/issues_manager/descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  732. package/lib/devtools/models/issues_manager/descriptions/stylesheetLateImport.md +4 -0
  733. package/lib/devtools/models/issues_manager/descriptions/stylesheetRequestFailed.md +3 -0
  734. package/lib/devtools/models/issues_manager/descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
  735. package/lib/devtools/models/issues_manager/descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
  736. package/lib/devtools/models/issues_manager/descriptions/unencodedDigestIncorrectDigestType.md +17 -0
  737. package/lib/devtools/models/issues_manager/descriptions/unencodedDigestMalformedDictionary.md +14 -0
  738. package/lib/devtools/models/issues_manager/descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
  739. package/lib/devtools/models/live-metrics/web-vitals-injected/web-vitals-injected.generated.js +1 -0
  740. package/lib/devtools/panels/recorder/injected/injected.generated.js +1 -0
  741. package/lib/devtools/panels/whats_new/resources/WNDT.md +14 -0
  742. package/lib/devtools/resource-manifest.json +3818 -0
  743. package/lib/devtools/third_party/acorn/package/LICENSE +21 -0
  744. package/lib/devtools/third_party/axe-core/LICENSE +362 -0
  745. package/lib/devtools/third_party/chromium/LICENSE +27 -0
  746. package/lib/devtools/third_party/codemirror/package/LICENSE +21 -0
  747. package/lib/devtools/third_party/codemirror.next/LICENSE +21 -0
  748. package/lib/devtools/third_party/csp_evaluator/package/LICENSE +202 -0
  749. package/lib/devtools/third_party/diff/LICENSE +202 -0
  750. package/lib/devtools/third_party/i18n/LICENSE +202 -0
  751. package/lib/devtools/third_party/intl-messageformat/LICENSE +33 -0
  752. package/lib/devtools/third_party/intl-messageformat/package/LICENSE.md +33 -0
  753. package/lib/devtools/third_party/json5/LICENSE +23 -0
  754. package/lib/devtools/third_party/legacy-javascript/LICENSE +202 -0
  755. package/lib/devtools/third_party/lighthouse/LICENSE +202 -0
  756. package/lib/devtools/third_party/lit/LICENSE +28 -0
  757. package/lib/devtools/third_party/marked/LICENSE +39 -0
  758. package/lib/devtools/third_party/marked/package/LICENSE.md +44 -0
  759. package/lib/devtools/third_party/puppeteer/LICENSE +202 -0
  760. package/lib/devtools/third_party/puppeteer/third_party/mitt/LICENSE +21 -0
  761. package/lib/devtools/third_party/puppeteer/third_party/parsel/LICENSE +21 -0
  762. package/lib/devtools/third_party/puppeteer/third_party/rxjs/LICENSE +201 -0
  763. package/lib/devtools/third_party/puppeteer-replay/package/LICENSE +202 -0
  764. package/lib/devtools/third_party/source-map-scopes-codec/LICENSE +26 -0
  765. package/lib/devtools/third_party/source-map-scopes-codec/package/LICENSE +26 -0
  766. package/lib/devtools/third_party/third-party-web/LICENSE +20 -0
  767. package/lib/devtools/third_party/third-party-web/package/LICENSE +20 -0
  768. package/lib/devtools/third_party/vscode.web-custom-data/package/LICENSE.md +21 -0
  769. package/lib/devtools/third_party/wasmparser/package/LICENSE +177 -0
  770. package/lib/devtools/third_party/web-vitals/package/LICENSE +202 -0
  771. package/lib/index.js +2554 -0
  772. package/lib/types/client/bottom/keyboard.d.ts +10 -0
  773. package/lib/types/client/bottom/locales.d.ts +17 -0
  774. package/lib/types/client/bottom/page.d.ts +10 -0
  775. package/lib/types/client/bottom/resize.d.ts +12 -0
  776. package/lib/types/client/bridge/controller.d.ts +10 -0
  777. package/lib/types/client/bridge/dispatcher.d.ts +26 -0
  778. package/lib/types/client/bridge/lifecycle.d.ts +22 -0
  779. package/lib/types/client/bridge/locales.d.ts +3 -0
  780. package/lib/types/client/bridge/publisher.d.ts +42 -0
  781. package/lib/types/client/bridge/rpc.d.ts +13 -0
  782. package/lib/types/client/bridge/transport.d.ts +41 -0
  783. package/lib/types/client/cdp/console.d.ts +45 -0
  784. package/lib/types/client/cdp/debugger.d.ts +8 -0
  785. package/lib/types/client/cdp/errors.d.ts +8 -0
  786. package/lib/types/client/cdp/heap-profiler.d.ts +8 -0
  787. package/lib/types/client/cdp/index.d.ts +10 -0
  788. package/lib/types/client/cdp/objects.d.ts +69 -0
  789. package/lib/types/client/cdp/profiler.d.ts +8 -0
  790. package/lib/types/client/cdp/properties.d.ts +16 -0
  791. package/lib/types/client/cdp/runtime.d.ts +79 -0
  792. package/lib/types/client/cdp/sources.d.ts +53 -0
  793. package/lib/types/client/cdp/stack.d.ts +27 -0
  794. package/lib/types/client/index.d.ts +3 -0
  795. package/lib/types/client/inspection/cordis.d.ts +3 -0
  796. package/lib/types/client/inspection/network.d.ts +4 -0
  797. package/lib/types/client/inspection/realm.d.ts +27 -0
  798. package/lib/types/client/plugin.d.ts +29 -0
  799. package/lib/types/host/bridge/controller.d.ts +108 -0
  800. package/lib/types/host/bridge/dispatcher.d.ts +16 -0
  801. package/lib/types/host/bridge/lifecycle.d.ts +42 -0
  802. package/lib/types/host/bridge/publisher.d.ts +31 -0
  803. package/lib/types/host/bridge/rpc.d.ts +15 -0
  804. package/lib/types/host/bridge/transport.d.ts +28 -0
  805. package/lib/types/host/cdp/console.d.ts +14 -0
  806. package/lib/types/host/cdp/debugger.d.ts +8 -0
  807. package/lib/types/host/cdp/errors.d.ts +6 -0
  808. package/lib/types/host/cdp/heap-profiler.d.ts +8 -0
  809. package/lib/types/host/cdp/index.d.ts +10 -0
  810. package/lib/types/host/cdp/objects.d.ts +8 -0
  811. package/lib/types/host/cdp/profiler.d.ts +8 -0
  812. package/lib/types/host/cdp/properties.d.ts +7 -0
  813. package/lib/types/host/cdp/runtime.d.ts +16 -0
  814. package/lib/types/host/cdp/sources.d.ts +14 -0
  815. package/lib/types/host/cdp/stack.d.ts +4 -0
  816. package/lib/types/host/index.d.ts +3 -0
  817. package/lib/types/host/inspection/cordis.d.ts +3 -0
  818. package/lib/types/host/inspection/network.d.ts +23 -0
  819. package/lib/types/host/inspection/realm.d.ts +9 -0
  820. package/lib/types/host/plugin.d.ts +19 -0
  821. package/lib/types/index.d.ts +50 -0
  822. package/lib/types/shared/bridge/buffer.d.ts +62 -0
  823. package/lib/types/shared/bridge/codec.d.ts +4 -0
  824. package/lib/types/shared/bridge/control-codec.d.ts +27 -0
  825. package/lib/types/shared/bridge/ids.d.ts +19 -0
  826. package/lib/types/shared/bridge/messages/control.d.ts +64 -0
  827. package/lib/types/shared/bridge/messages/cordis.d.ts +4 -0
  828. package/lib/types/shared/bridge/messages/network.d.ts +4 -0
  829. package/lib/types/shared/bridge/messages/observation.d.ts +110 -0
  830. package/lib/types/shared/bridge/messages/query/codec.d.ts +40 -0
  831. package/lib/types/shared/bridge/messages/query/commands.d.ts +35 -0
  832. package/lib/types/shared/bridge/messages/query/frames.d.ts +31 -0
  833. package/lib/types/shared/bridge/messages/query/index.d.ts +5 -0
  834. package/lib/types/shared/bridge/messages/runtime/command-codec.d.ts +9 -0
  835. package/lib/types/shared/bridge/messages/runtime/commands.d.ts +76 -0
  836. package/lib/types/shared/bridge/messages/runtime/console-frames.d.ts +52 -0
  837. package/lib/types/shared/bridge/messages/runtime/frames.d.ts +98 -0
  838. package/lib/types/shared/bridge/messages/runtime/index.d.ts +5 -0
  839. package/lib/types/shared/bridge/messages/runtime/value-codec.d.ts +28 -0
  840. package/lib/types/shared/bridge/messages/sources/codec.d.ts +15 -0
  841. package/lib/types/shared/bridge/messages/sources/commands.d.ts +42 -0
  842. package/lib/types/shared/bridge/messages/sources/frames.d.ts +67 -0
  843. package/lib/types/shared/bridge/messages/sources/index.d.ts +5 -0
  844. package/lib/types/shared/bridge/publisher.d.ts +33 -0
  845. package/lib/types/shared/bridge/query-reader.d.ts +10 -0
  846. package/lib/types/shared/bridge/rpc.d.ts +62 -0
  847. package/lib/types/shared/bridge/validation.d.ts +3 -0
  848. package/lib/types/shared/bridge/version.d.ts +3 -0
  849. package/lib/types/shared/cdp/capabilities.d.ts +17 -0
  850. package/lib/types/shared/cdp/console.d.ts +28 -0
  851. package/lib/types/shared/cdp/debugger.d.ts +69 -0
  852. package/lib/types/shared/cdp/errors.d.ts +27 -0
  853. package/lib/types/shared/cdp/ids.d.ts +9 -0
  854. package/lib/types/shared/cdp/index.d.ts +11 -0
  855. package/lib/types/shared/cdp/operations.d.ts +86 -0
  856. package/lib/types/shared/cdp/property.d.ts +28 -0
  857. package/lib/types/shared/cdp/realm.d.ts +137 -0
  858. package/lib/types/shared/cdp/remote-object.d.ts +44 -0
  859. package/lib/types/shared/cdp/sources.d.ts +18 -0
  860. package/lib/types/shared/cordis/collector.d.ts +26 -0
  861. package/lib/types/shared/cordis/ids.d.ts +7 -0
  862. package/lib/types/shared/cordis/model.d.ts +61 -0
  863. package/lib/types/shared/cordis/object-reference.d.ts +14 -0
  864. package/lib/types/shared/cordis/object-registry.d.ts +80 -0
  865. package/lib/types/shared/cordis/observer.d.ts +15 -0
  866. package/lib/types/shared/cordis/projector.d.ts +34 -0
  867. package/lib/types/shared/cordis/publisher.d.ts +13 -0
  868. package/lib/types/shared/cordis/reader.d.ts +18 -0
  869. package/lib/types/shared/cordis/snapshot.d.ts +39 -0
  870. package/lib/types/shared/dispose.d.ts +11 -0
  871. package/lib/types/shared/identity.d.ts +12 -0
  872. package/lib/types/shared/index.d.ts +18 -0
  873. package/lib/types/shared/json.d.ts +35 -0
  874. package/lib/types/shared/network/event-source.d.ts +20 -0
  875. package/lib/types/shared/network/observation.d.ts +52 -0
  876. package/lib/types/shared/service.d.ts +23 -0
  877. package/lib/types/shared/validation.d.ts +52 -0
  878. package/lib/types/shared/web.d.ts +16 -0
  879. package/lib/types/worker/bridge/endpoint.d.ts +49 -0
  880. package/lib/types/worker/bridge/hub.d.ts +108 -0
  881. package/lib/types/worker/bridge/runtime-rpc.d.ts +90 -0
  882. package/lib/types/worker/bridge/session.d.ts +15 -0
  883. package/lib/types/worker/bridge/source-rpc.d.ts +42 -0
  884. package/lib/types/worker/cdp/domains/debugger/cdp-params.d.ts +15 -0
  885. package/lib/types/worker/cdp/domains/debugger/index.d.ts +6 -0
  886. package/lib/types/worker/cdp/domains/debugger/projector.d.ts +22 -0
  887. package/lib/types/worker/cdp/domains/debugger/script-registry.d.ts +70 -0
  888. package/lib/types/worker/cdp/domains/debugger/session.d.ts +47 -0
  889. package/lib/types/worker/cdp/domains/dom/index.d.ts +4 -0
  890. package/lib/types/worker/cdp/domains/dom/model.d.ts +121 -0
  891. package/lib/types/worker/cdp/domains/dom/session.d.ts +78 -0
  892. package/lib/types/worker/cdp/domains/native.d.ts +25 -0
  893. package/lib/types/worker/cdp/domains/network/session.d.ts +46 -0
  894. package/lib/types/worker/cdp/domains/runtime/cdp-params.d.ts +82 -0
  895. package/lib/types/worker/cdp/domains/runtime/index.d.ts +3 -0
  896. package/lib/types/worker/cdp/domains/runtime/object-table.d.ts +117 -0
  897. package/lib/types/worker/cdp/domains/runtime/session.d.ts +97 -0
  898. package/lib/types/worker/cdp/ids.d.ts +37 -0
  899. package/lib/types/worker/cdp/protocol.d.ts +46 -0
  900. package/lib/types/worker/cdp/realm-sessions.d.ts +67 -0
  901. package/lib/types/worker/cdp/session.d.ts +39 -0
  902. package/lib/types/worker/cdp/target.d.ts +17 -0
  903. package/lib/types/worker/entry.d.ts +3 -0
  904. package/lib/types/worker/inspection/cordis-query.d.ts +11 -0
  905. package/lib/types/worker/inspection/cordis-store.d.ts +94 -0
  906. package/lib/types/worker/inspection/network-store.d.ts +110 -0
  907. package/lib/types/worker/inspection/query-router.d.ts +78 -0
  908. package/lib/types/worker/inspection/realm-store.d.ts +58 -0
  909. package/lib/types/worker/inspection/realm.d.ts +43 -0
  910. package/lib/types/worker/realms/client/bridge.d.ts +18 -0
  911. package/lib/types/worker/realms/client/console.d.ts +21 -0
  912. package/lib/types/worker/realms/client/debugger.d.ts +8 -0
  913. package/lib/types/worker/realms/client/index.d.ts +18 -0
  914. package/lib/types/worker/realms/client/runtime.d.ts +28 -0
  915. package/lib/types/worker/realms/client/scripts.d.ts +15 -0
  916. package/lib/types/worker/realms/client/sources.d.ts +30 -0
  917. package/lib/types/worker/realms/client/values.d.ts +55 -0
  918. package/lib/types/worker/realms/host/bridge.d.ts +49 -0
  919. package/lib/types/worker/realms/host/console.d.ts +25 -0
  920. package/lib/types/worker/realms/host/debugger.d.ts +25 -0
  921. package/lib/types/worker/realms/host/index.d.ts +13 -0
  922. package/lib/types/worker/realms/host/runtime.d.ts +54 -0
  923. package/lib/types/worker/realms/host/scripts.d.ts +9 -0
  924. package/lib/types/worker/realms/host/sources.d.ts +26 -0
  925. package/lib/types/worker/realms/host/values.d.ts +22 -0
  926. package/lib/types/worker/server.d.ts +16 -0
  927. package/lib/worker.js +7289 -0
  928. package/locale/en.json +6 -0
  929. package/locale/zh.json +6 -0
  930. package/package.json +90 -3
@@ -0,0 +1,3143 @@
1
+ import { n as e } from "./chunk-DF993M8W.js";
2
+ import { G as t, Ot as n, Y as r, r as i, xt as a } from "./platform-BzB373NB.js";
3
+ import { At as o, b as s, bt as c, d as l, dt as u, ft as d, jt as f, n as p, tn as m, wt as h, x as g } from "./common-qd_KLeYO.js";
4
+ import { $a as _, $i as v, $r as y, Ba as b, Bt as ee, Dn as te, Dt as x, El as ne, Fo as re, Ft as ie, Gi as ae, Ht as oe, Jn as se, Md as ce, Mn as S, Mo as le, Of as ue, Po as de, U as C, Ur as w, Vt as fe, Wi as pe, Xa as me, Xi as he, Xo as ge, Ya as _e, Z as ve, Za as ye, _n as T, _t as be, bn as xe, br as Se, do as Ce, dt as we, ei as E, en as Te, ft as Ee, gt as De, ha as Oe, kf as ke, li as Ae, ni as je, no as Me, pl as Ne, q as Pe, qn as Fe, tf as D, vn as Ie, vt as O, wo as Le, xa as Re, zn as k, zt as ze } from "./legacy-Bqn4Q0Tf.js";
5
+ import { E as Be, g as Ve, s as He, w as Ue } from "./bindings-DgoVEdsr.js";
6
+ import { En as A, Ln as We, On as Ge, Pn as Ke, Qr as j, Vt as qe, Zr as Je, jn as Ye, t as Xe } from "./snackbars-lPThuWYs.js";
7
+ import { n as M, t as N } from "./theme_support-CbSSLkbO.js";
8
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts
9
+ var Ze = /* @__PURE__ */ e({ BrickBreaker: () => ot }), Qe = {
10
+ congrats: "Congrats, you win!",
11
+ ps: "PS: You can also open the game by typing `fixme`"
12
+ }, $e = h("ui/legacy/components/perf_ui/BrickBreaker.ts", Qe), et = c.bind(void 0, $e), tt = 16, nt = 10, rt = 150, it = 85, P = 15, F = 10, at = [
13
+ {
14
+ light: "rgb(224,240,255)",
15
+ mediumLighter: "rgb(176,208,255)",
16
+ mediumDarker: "rgb(112,160,221)",
17
+ dark: "rgb(0,92,153)"
18
+ },
19
+ {
20
+ light: "rgb(253, 216, 229)",
21
+ mediumLighter: "rgb(250, 157, 188)",
22
+ mediumDarker: "rgb(249, 98, 154)",
23
+ dark: "rgb(254, 5, 105)"
24
+ },
25
+ {
26
+ light: "rgb(254, 234, 234)",
27
+ mediumLighter: "rgb(255, 216, 216)",
28
+ mediumDarker: "rgb(255, 195, 195)",
29
+ dark: "rgb(235, 125, 138)"
30
+ },
31
+ {
32
+ light: "rgb(226,183,206)",
33
+ mediumLighter: "rgb(219,124,165)",
34
+ mediumDarker: "rgb(146,60,129)",
35
+ dark: "rgb(186, 85, 255)"
36
+ },
37
+ {
38
+ light: "rgb(206,255,206)",
39
+ mediumLighter: "rgb(128,255,128)",
40
+ mediumDarker: "rgb(0,246,0)",
41
+ dark: "rgb(0,187,0)"
42
+ },
43
+ {
44
+ light: "rgb(255, 188, 181)",
45
+ mediumLighter: "rgb(254, 170, 170)",
46
+ mediumDarker: "rgb(215, 59, 43)",
47
+ dark: "rgb(187, 37, 23)"
48
+ },
49
+ {
50
+ light: "rgb(236, 254, 250)",
51
+ mediumLighter: "rgb(204, 255, 245)",
52
+ mediumDarker: "rgb(164, 240, 233)",
53
+ dark: "rgb(72,189,144)"
54
+ },
55
+ {
56
+ light: "rgb(255, 225, 185)",
57
+ mediumLighter: "rgb(255, 204, 141)",
58
+ mediumDarker: "rgb(240, 140, 115)",
59
+ dark: "rgb(211, 96, 117)"
60
+ },
61
+ {
62
+ light: "rgb(218, 255, 248)",
63
+ mediumLighter: "rgb(177, 235, 236)",
64
+ mediumDarker: "rgb(112, 214, 214)",
65
+ dark: "rgb(34, 205, 181)"
66
+ }
67
+ ], ot = class extends HTMLElement {
68
+ timelineFlameChart;
69
+ #e;
70
+ #t;
71
+ #n;
72
+ #r;
73
+ #i;
74
+ #a = 0;
75
+ #o = /* @__PURE__ */ new Set();
76
+ #s = /* @__PURE__ */ new Map();
77
+ #c = this.#B.bind(this);
78
+ #l = this.#R.bind(this);
79
+ #u = this.#z.bind(this);
80
+ #d = this.#F.bind(this);
81
+ #f = this.#V.bind(this);
82
+ #p = te();
83
+ #m = 0;
84
+ #h = !1;
85
+ #g = devicePixelRatio;
86
+ #_ = 0;
87
+ #v = 0;
88
+ #y = 0;
89
+ #b = 0;
90
+ #x = 0;
91
+ #S = !1;
92
+ #C = !1;
93
+ #w = 0;
94
+ #T = 0;
95
+ #E = 0;
96
+ #D = rt;
97
+ #O = 150;
98
+ #k = 1500;
99
+ #A = this.#k - this.#O;
100
+ #j = 0;
101
+ #M = 0;
102
+ #N;
103
+ constructor(e) {
104
+ super(), this.timelineFlameChart = e, this.#e = this.createChild("canvas", "fill"), this.#t = this.#e.getContext("2d"), this.#n = document.createElement("canvas"), this.#r = this.#n.getContext("2d");
105
+ let t = Math.floor(Math.random() * at.length);
106
+ this.#N = at[t], this.#i = this.createChild("div"), this.#i.classList.add("scorePanel"), this.#i.style.borderImage = "linear-gradient(" + this.#N.mediumDarker + "," + this.#N.dark + ") 1", this.initButton();
107
+ }
108
+ initButton() {
109
+ let e = this.createChild("div");
110
+ e.classList.add("game-close-button"), e.innerHTML = "<b><span style='font-size: 1.2em; color: white'>x</span></b>", e.style.background = this.#N.dark, e.style.boxShadow = this.#N.dark + " 1px 1px, " + this.#N.mediumDarker + " 3px 3px, " + this.#N.mediumLighter + " 5px 5px", e.addEventListener("click", this.#F.bind(this)), this.appendChild(e);
111
+ }
112
+ connectedCallback() {
113
+ this.#h = !0, this.#I(), this.#p.addEventListener("keydown", this.#c), document.addEventListener("keydown", this.#c, !1), document.addEventListener("keyup", this.#l, !1), document.addEventListener("keypress", this.#u, !1), window.addEventListener("resize", this.#d), document.addEventListener("mousemove", this.#f, !1), this.tabIndex = 1, this.focus();
114
+ }
115
+ disconnectedCallback() {
116
+ this.#p.removeEventListener("keydown", this.#c), window.removeEventListener("resize", this.#d), document.removeEventListener("keydown", this.#c, !1), document.removeEventListener("keyup", this.#l, !1), window.removeEventListener("resize", this.#d), document.removeEventListener("keypress", this.#u, !1), document.removeEventListener("mousemove", this.#f, !1);
117
+ }
118
+ #P() {
119
+ let e = window.devicePixelRatio, t = Math.round(this.offsetHeight * e), n = Math.round(this.offsetWidth * e);
120
+ this.#e.height = t, this.#e.width = n, this.#e.style.height = t / e + "px", this.#e.style.width = n / e + "px";
121
+ }
122
+ #F() {
123
+ this.#h = !1, this.remove();
124
+ }
125
+ #I() {
126
+ this.#P(), this.#j = Math.max(.1, (this.offsetHeight - this.#O) / this.#A), this.#M = nt * this.#j;
127
+ let e = this.timelineFlameChart.drawTrackOnCanvas("Main", this.#t, F);
128
+ if (e === null || e.visibleEntries.size === 0) {
129
+ console.error("Could not draw game"), this.#F();
130
+ return;
131
+ }
132
+ this.#a = e.top, this.#o = e.visibleEntries, this.#m = this.#a + this.timelineFlameChart.getCanvas().getBoundingClientRect().top - this.timelineFlameChart.getScrollOffset(), requestAnimationFrame(() => this.#L(e.top, e.height));
133
+ }
134
+ #L(e, t) {
135
+ if (e === 0) {
136
+ this.#H();
137
+ return;
138
+ }
139
+ let n = window.devicePixelRatio, r = Math.round(e * n), i = Math.max(e - 4, 0), a = Math.round(i * n), o = this.#e;
140
+ this.#n.height = o.height, this.#n.width = o.width, this.#n.style.height = o.style.height, this.#n.style.width = o.style.width, this.#r.drawImage(o, 0, r, o.width, t * n, 0, a, o.width, t * n), this.#P(), this.#t.drawImage(this.#n, 0, 0), requestAnimationFrame(() => this.#L(i, t));
141
+ }
142
+ #R(e) {
143
+ e.key === "Right" || e.key === "ArrowRight" || e.key === "d" ? (this.#S = !1, e.preventDefault()) : e.key === "Left" || e.key === "ArrowLeft" || e.key === "a" ? (this.#C = !1, e.preventDefault()) : e.stopImmediatePropagation();
144
+ }
145
+ #z(e) {
146
+ e.stopImmediatePropagation(), e.preventDefault();
147
+ }
148
+ #B(e) {
149
+ e.key === "Escape" ? (this.#F(), e.stopImmediatePropagation()) : e.key === "Right" || e.key === "ArrowRight" || e.key === "d" ? (this.#S = !0, e.preventDefault()) : e.key === "Left" || e.key === "ArrowLeft" || e.key === "a" ? (this.#C = !0, e.preventDefault()) : (e.preventDefault(), e.stopImmediatePropagation());
150
+ }
151
+ #V(e) {
152
+ this.#x = Math.max(e.offsetX - this.#D / 2, 0), this.#x = Math.min(this.#x, this.offsetWidth - this.#D);
153
+ }
154
+ #H() {
155
+ this.#_ = this.offsetWidth / 2, this.#v = this.offsetHeight - P - F, this.#y = 0, this.#b = -Math.SQRT2 * this.#M, this.#x = (this.#e.width - this.#D) / 2, this.#S = !1, this.#C = !1, this.#w = this.timelineFlameChart.getBarHeight(), this.#E = this.#o.size, this.#T = Math.max(Math.round(this.#E / 17), 2), this.#q();
156
+ }
157
+ #U() {
158
+ this.#_ = this.offsetWidth / 2, this.#v = this.offsetHeight - P - F, this.#y = 0, this.#b = -Math.SQRT2 * this.#M;
159
+ }
160
+ #W() {
161
+ if (!this.#t) return;
162
+ let e = this.#t.createRadialGradient(this.#_ + F / 4, this.#v - F / 4, 0, this.#_ + F / 4, this.#v - F / 4, F);
163
+ e.addColorStop(.3, this.#N.mediumLighter), e.addColorStop(.6, this.#N.mediumDarker), e.addColorStop(1, this.#N.dark), this.#t.beginPath(), this.#t.arc(this.#_, this.#v, F, 0, Math.PI * 2), this.#t.fillStyle = e, this.#t.fill(), this.#t.closePath();
164
+ }
165
+ #G() {
166
+ if (!this.#t) return;
167
+ let e = this.#t.createRadialGradient(this.#x + this.#D / 3, this.offsetHeight - P - P / 4, 0, this.#x + this.#D / 3, this.offsetHeight - P - P / 4, this.#D / 2);
168
+ e.addColorStop(.3, this.#N.dark), e.addColorStop(1, this.#N.mediumDarker), this.#t.beginPath(), this.#t.rect(this.#x, this.offsetHeight - P, this.#D, P), this.#t.fillStyle = e, this.#t.fill(), this.#t.closePath();
169
+ }
170
+ #K() {
171
+ if (this.#t) for (let e of this.#s.values()) this.#t.beginPath(), this.#t.rect(e.x, e.y, e.width + .5, this.#w + .5), this.#t.fillStyle = M.instance().getComputedValue("--sys-color-neutral-container", this), this.#t.fill(), this.#t.closePath();
172
+ }
173
+ #q() {
174
+ if (this.#g !== devicePixelRatio && (this.#h = !1), this.#T === 0) {
175
+ window.alert("GAME OVER"), this.#F();
176
+ return;
177
+ }
178
+ if (this.#E === 0) {
179
+ this.#X();
180
+ return;
181
+ }
182
+ this.#t.clearRect(0, 0, this.#e.width, this.#e.height), this.#t.drawImage(this.#n, 0, 0), this.#t.save(), this.#t.scale(devicePixelRatio, devicePixelRatio), this.#r.save(), this.#r.scale(devicePixelRatio, devicePixelRatio), this.#K(), this.#W(), this.#G(), this.#J();
183
+ let e = `<div><b><span style='font-size: 1.3em; color: ${this.#N.dark}'>&#x2764;&#xfe0f; ${this.#T}</span></b></div>`, t = `<div><b><span style='font-size: 1.3em; color: ${this.#N.dark}'> 🧱 ${this.#E}</span></b></div>`;
184
+ if (this.#i.innerHTML = e + t, this.#E = this.#o.size - this.#s.size, this.#M = (nt + (tt - nt) * this.#s.size / this.#o.size) * this.#j, this.#D = rt - (rt - it) * this.#s.size / this.#o.size, (this.#_ + this.#y > this.offsetWidth - F || this.#_ + this.#y < F) && (this.#y = -this.#y), this.#v + this.#b < F) this.#b = -this.#b;
185
+ else if (this.#v + this.#b > this.offsetHeight - F && this.#b > 0) if (this.#_ > this.#x - F && this.#_ < this.#x + this.#D + F) {
186
+ let e = Math.min(this.#_, this.#x + this.#D);
187
+ e = Math.max(e, this.#x);
188
+ let t = (e - this.#x) * this.#M * 2 / this.#D;
189
+ this.#y = -this.#M + t, this.#b = -Math.sqrt(2 * this.#M ** 2 - this.#y ** 2);
190
+ } else this.#U(), this.#x = (this.offsetWidth - this.#D) / 2, this.#T--;
191
+ let n = Math.round(this.clientWidth / 60);
192
+ this.#S && this.#x < this.offsetWidth - this.#D ? this.#x += n : this.#C && this.#x > 0 && (this.#x -= n), this.#_ += Math.round(this.#y), this.#v += Math.round(this.#b), this.#t.restore(), this.#r.restore(), this.#h && requestAnimationFrame(this.#q.bind(this));
193
+ }
194
+ #J() {
195
+ let e = this.timelineFlameChart.getCanvas().getBoundingClientRect(), t = this.#v + this.#m - e.top, n = this.timelineFlameChart.coordinatesToEntryIndex(this.#_, t + F), r = this.timelineFlameChart.coordinatesToEntryIndex(this.#_, t - F), i = this.timelineFlameChart.coordinatesToEntryIndex(this.#_ + F, t), a = this.timelineFlameChart.coordinatesToEntryIndex(this.#_ - F, t), o = F / Math.SQRT2, s = this.timelineFlameChart.coordinatesToEntryIndex(this.#_ + o, t + o), c = this.timelineFlameChart.coordinatesToEntryIndex(this.#_ - o, t + o), l = this.timelineFlameChart.coordinatesToEntryIndex(this.#_ + o, t - o), u = this.timelineFlameChart.coordinatesToEntryIndex(this.#_ - o, t - o), d = (t) => {
196
+ let n = this.timelineFlameChart.entryIndexToCoordinates(t);
197
+ if (n) {
198
+ let r = Math.max(n.x - e.left, 0);
199
+ this.#s.set(t, {
200
+ x: r - .5,
201
+ y: n.y - this.#m - .5,
202
+ width: this.timelineFlameChart.entryWidth(t)
203
+ });
204
+ }
205
+ };
206
+ if (n > -1 && !this.#s.has(n) && this.#o.has(n)) {
207
+ this.#b = -this.#b, d(n);
208
+ return;
209
+ }
210
+ if (r > -1 && !this.#s.has(r) && this.#o.has(r)) {
211
+ this.#b = -this.#b, d(r);
212
+ return;
213
+ }
214
+ if (i > -1 && !this.#s.has(i) && this.#o.has(i)) {
215
+ this.#y = -this.#y, d(i);
216
+ return;
217
+ }
218
+ if (a > -1 && !this.#s.has(a) && this.#o.has(a)) {
219
+ this.#y = -this.#y, d(a);
220
+ return;
221
+ }
222
+ let f = [
223
+ s,
224
+ c,
225
+ l,
226
+ u
227
+ ];
228
+ for (let e of f) if (e > -1 && !this.#s.has(e) && this.#o.has(e)) {
229
+ this.#y = -this.#y, this.#b = -this.#b, d(e);
230
+ return;
231
+ }
232
+ }
233
+ #Y(e, t) {
234
+ return Math.floor(Math.random() * (t - e) + e);
235
+ }
236
+ #X() {
237
+ this.#P();
238
+ let e = 0, t = this.offsetWidth / 15, n = this.offsetHeight * .7 / 15, r = [], i = () => -20 + Math.random() * 40, a = () => {
239
+ for (let e = 0; e < 75; e++) {
240
+ let a = document.createElement("span");
241
+ a.className = "confetti-100", a.append(this.#Z(e % 15 * t + i(), e % 5 * n + i())), r.push(window.setTimeout(() => this.append(a), Math.random() * 100)), r.push(window.setTimeout(() => {
242
+ a.remove();
243
+ }, 1e3));
244
+ }
245
+ if (++e < 6) {
246
+ setTimeout(a, Math.random() * 100 + 400);
247
+ return;
248
+ }
249
+ window.alert(`${et(Qe.congrats)}\n${et(Qe.ps)}`), r.forEach((e) => clearTimeout(e)), this.#F();
250
+ };
251
+ a();
252
+ }
253
+ #Z(e, t) {
254
+ let n = [
255
+ "💯",
256
+ "🎉",
257
+ "🎊"
258
+ ], r = document.createElement("span");
259
+ return r.textContent = n[this.#Y(0, n.length)], r.className = "confetti-100-particle", r.style.setProperty("--rotation", this.#Y(-3 * 360, 3 * 360) + "deg"), r.style.setProperty("--to-X", this.#Y(-400, 400) + "px"), r.style.setProperty("--to-Y", this.#Y(-400, 400) + "px"), r.style.left = e + "px", r.style.top = t + "px", r;
260
+ }
261
+ };
262
+ customElements.define("brick-breaker", ot);
263
+ //#endregion
264
+ //#region \0qilin-devtools:css:/home/runner/work/QiLin/QiLin/node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/ui/legacy/components/perf_ui/chartViewport.css.mjs
265
+ var st = "/*\n * Copyright 2017 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.chart-viewport-v-scroll {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n overflow-x: hidden;\n z-index: 200;\n padding-left: 1px;\n}\n\n.chart-viewport-v-scroll.always-show-scrollbar {\n overflow-y: scroll;\n}\n/* force non overlay scrollbars for Mac */\n\n:host-context(.platform-mac) .chart-viewport-v-scroll {\n right: 2px;\n top: 3px;\n bottom: 3px;\n}\n\n:host-context(.platform-mac) ::-webkit-scrollbar {\n width: 8px;\n}\n\n:host-context(.platform-mac) ::-webkit-scrollbar-thumb {\n background-color: var(--color-scrollbar-mac);\n border-radius: 50px;\n}\n\n:host-context(.platform-mac) .chart-viewport-v-scroll:hover::-webkit-scrollbar-thumb {\n background-color: var(--color-scrollbar-mac-hover);\n}\n/* force non overlay scrollbars for Aura Overlay Scrollbar enabled */\n\n:host-context(.overlay-scrollbar-enabled) ::-webkit-scrollbar {\n width: 10px;\n}\n\n:host-context(.overlay-scrollbar-enabled) ::-webkit-scrollbar-thumb {\n background-color: var(--color-scrollbar-other);\n}\n\n:host-context(.overlay-scrollbar-enabled) .chart-viewport-v-scroll:hover::-webkit-scrollbar-thumb {\n background-color: var(--color-scrollbar-other-hover);\n}\n\n.chart-viewport-selection-overlay {\n position: absolute;\n z-index: 100;\n background-color: var(--sys-color-state-ripple-primary);\n border-color: var(--sys-color-primary);\n border-width: 0 1px;\n border-style: solid;\n pointer-events: none;\n top: 0;\n bottom: 0;\n text-align: center;\n}\n\n.chart-viewport-selection-overlay .time-span {\n white-space: nowrap;\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n}\n";
266
+ //#endregion
267
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/ui/legacy/components/perf_ui/CanvasHelper.ts
268
+ function ct(e, t, n) {
269
+ e.moveTo(0, n), e.lineTo(t, n);
270
+ }
271
+ function lt(e, t, n, r) {
272
+ let i = 8 * Math.sqrt(3) / 2, a = Math.round(i / 2);
273
+ e.save(), e.beginPath(), e.translate(t, n), e.rotate(r ? Math.PI / 2 : 0), e.moveTo(-a, -8 / 2), e.lineTo(-a, 8 / 2), e.lineTo(i - a, 0), e.fill(), e.restore();
274
+ }
275
+ function ut(e, t, n, r, i, a = "--sys-color-on-surface") {
276
+ let o = new Path2D(i);
277
+ e.save(), e.translate(t, n), e.fillStyle = M.instance().getComputedValue("--sys-color-cdt-base-container"), e.fillRect(0, 0, r, r), e.fillStyle = M.instance().getComputedValue(a);
278
+ let s = r / 20;
279
+ e.scale(s, s), e.fill(o), e.restore();
280
+ }
281
+ //#endregion
282
+ //#region \0qilin-devtools:css:/home/runner/work/QiLin/QiLin/node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/ui/legacy/components/perf_ui/flameChart.css.mjs
283
+ var dt = "/*\n * Copyright 2017 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.flame-chart-main-pane {\n overflow: hidden;\n\n --selected-group-border: hsl(216deg 68% 54%);\n}\n\n:host-context(.theme-with-dark-background) .flame-chart-main-pane {\n --selected-group-border: hsl(216deg 68% 46%);\n}\n\n.flame-chart-marker-highlight-element {\n position: absolute;\n top: 1px;\n height: 18px;\n width: 6px;\n margin: 0 -3px;\n content: \"\";\n display: block;\n}\n\n.flame-chart-canvas:focus-visible {\n border-top: 1px solid var(--sys-color-state-focus-ring);\n border-bottom: 1px solid var(--sys-color-state-focus-ring);\n}\n\n.flame-chart-highlight-element {\n position: absolute;\n pointer-events: none;\n background-color: var(--sys-color-state-hover-on-subtle);\n}\n\n.reveal-descendants-arrow-highlight-element {\n position: absolute;\n pointer-events: none;\n background-color: var(--sys-color-state-hover-on-subtle);\n}\n\n.flame-chart-selected-element {\n position: absolute;\n pointer-events: none;\n outline: 2px solid var(--sys-color-primary);\n background-color: var(--sys-color-state-ripple-primary);\n}\n\n.chart-cursor-element {\n position: absolute;\n top: 0;\n bottom: 0;\n z-index: 100;\n width: 2px;\n background-color: var(--ref-palette-pink50);\n pointer-events: none;\n}\n\n.flame-chart-entry-info:not(:empty) {\n z-index: 2000;\n position: absolute;\n contain: content;\n background-color: var(--sys-color-cdt-base-container);\n pointer-events: none;\n padding: 4px 8px;\n white-space: nowrap;\n max-width: 80%;\n box-shadow: var(--drop-shadow);\n}\n\n.flame-chart-entry-info table tr td:empty {\n padding: 0;\n}\n\n.flame-chart-entry-info table tr td:not(:empty) {\n padding: 0 5px;\n white-space: nowrap;\n}\n\n.flame-chart-entry-info table tr td:first-child {\n font-weight: bold;\n}\n\n.flame-chart-entry-info table tr td span {\n margin-right: 5px;\n}\n\n.flame-chart-edit-confirm {\n position: fixed;\n bottom: 10px;\n right: 10px;\n}\n", ft = /* @__PURE__ */ e({
284
+ DEFAULT_FONT_SIZE: () => L,
285
+ getFontFamilyForCanvas: () => I
286
+ });
287
+ function I() {
288
+ return ue();
289
+ }
290
+ var L = "11px", pt = "/*\n * Copyright 2015 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.resources-dividers {\n position: absolute;\n inset: 0;\n z-index: -100;\n}\n\n.resources-event-dividers {\n position: absolute;\n left: 0;\n right: 0;\n height: 100%;\n top: 0;\n z-index: 300;\n pointer-events: none;\n}\n\n.resources-dividers-label-bar {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background-clip: padding-box;\n height: 20px;\n z-index: 200;\n pointer-events: none;\n overflow: hidden;\n}\n\n.resources-divider {\n position: absolute;\n width: 1px;\n top: 0;\n bottom: 0;\n background-color: var(--sys-color-divider);\n}\n\n.resources-event-divider {\n position: absolute;\n width: 1px;\n top: 0;\n bottom: 0;\n z-index: 300;\n}\n\n.resources-divider-label {\n position: absolute;\n top: 4px;\n right: 3px;\n font-size: 80%;\n white-space: nowrap;\n pointer-events: none;\n}\n\n.timeline-grid-header {\n height: 20px;\n pointer-events: none;\n}\n", mt = /* @__PURE__ */ e({ TimelineGrid: () => R }), ht = /* @__PURE__ */ new Map(), R = class e {
291
+ element;
292
+ #e;
293
+ gridHeaderElement;
294
+ eventDividersElement;
295
+ #t;
296
+ constructor() {
297
+ this.element = document.createElement("div"), Ae(this.element, pt), this.#e = this.element.createChild("div", "resources-dividers"), this.gridHeaderElement = document.createElement("div"), this.gridHeaderElement.classList.add("timeline-grid-header"), this.eventDividersElement = this.gridHeaderElement.createChild("div", "resources-event-dividers"), this.#t = this.gridHeaderElement.createChild("div", "resources-dividers-label-bar"), this.element.appendChild(this.gridHeaderElement);
298
+ }
299
+ static calculateGridOffsets(e, t) {
300
+ let n = e.computePosition(e.maximumBoundary()), r = n / 64, i = e.boundarySpan() / r, a = n / e.boundarySpan();
301
+ i = 10 ** Math.ceil(Math.log(i) / Math.LN10), i * a >= 320 && (i /= 5), i * a >= 128 && (i /= 2);
302
+ let o = Math.ceil((e.minimumBoundary() - e.zeroTime()) / i) * i + e.zeroTime(), s = e.maximumBoundary();
303
+ s += 64 / a, r = Math.ceil((s - o) / i), i || (r = 0);
304
+ let c = [];
305
+ for (let n = 0; n < r; ++n) {
306
+ let r = o + i * 100 * n / 100, a = e.computePosition(r);
307
+ a < (t || 0) || c.push({
308
+ position: Math.floor(a),
309
+ time: r
310
+ });
311
+ }
312
+ return {
313
+ offsets: c,
314
+ precision: Math.max(0, -Math.floor(Math.log(i * 1.01) / Math.LN10))
315
+ };
316
+ }
317
+ static drawCanvasGrid(e, t) {
318
+ e.save(), e.scale(window.devicePixelRatio, window.devicePixelRatio);
319
+ let n = Math.floor(e.canvas.height / window.devicePixelRatio);
320
+ e.strokeStyle = getComputedStyle(document.body).getPropertyValue("--app-color-strokestyle"), e.lineWidth = 1, e.translate(.5, .5), e.beginPath();
321
+ for (let r of t.offsets) e.moveTo(r.position, 0), e.lineTo(r.position, n);
322
+ e.stroke(), e.restore();
323
+ }
324
+ static drawCanvasHeaders(e, t, n, r, i, a) {
325
+ e.save(), e.scale(window.devicePixelRatio, window.devicePixelRatio);
326
+ let o = Math.ceil(e.canvas.width / window.devicePixelRatio);
327
+ e.beginPath(), e.fillStyle = M.instance().getComputedValue("--color-background-opacity-80"), e.fillRect(0, 0, o, i), e.fillStyle = M.instance().getComputedValue("--sys-color-on-surface"), e.textBaseline = "hanging", e.font = `${L} ${I()}`;
328
+ for (let i of t.offsets) {
329
+ let t = n(i.time), o = e.measureText(t).width, s = i.position - o - 4;
330
+ (!a || a < s) && e.fillText(t, s, r);
331
+ }
332
+ e.restore();
333
+ }
334
+ get dividersElement() {
335
+ return this.#e;
336
+ }
337
+ get dividersLabelBarElement() {
338
+ return this.#t;
339
+ }
340
+ updateDividers(t, n) {
341
+ let r = e.calculateGridOffsets(t, n), i = r.offsets, a = r.precision, o = this.#e.clientWidth, s = this.#e.firstChild, c = this.#t.firstChild;
342
+ for (let e = 0; e < i.length; ++e) {
343
+ if (!s) {
344
+ s = document.createElement("div"), s.className = "resources-divider", this.#e.appendChild(s), c = document.createElement("div"), c.className = "resources-divider";
345
+ let e = document.createElement("div");
346
+ e.className = "resources-divider-label", ht.set(c, e), c.appendChild(e), this.#t.appendChild(c);
347
+ }
348
+ let n = i[e].time, r = i[e].position;
349
+ if (c) {
350
+ let e = ht.get(c);
351
+ e && (e.textContent = t.formatValue(n, a));
352
+ }
353
+ let l = 100 * r / o;
354
+ s.style.left = l + "%", c && (c.style.left = l + "%"), s = s.nextSibling, c &&= c.nextSibling;
355
+ }
356
+ for (; s;) {
357
+ let e = s.nextSibling;
358
+ if (this.#e.removeChild(s), e) s = e;
359
+ else break;
360
+ }
361
+ for (; c;) {
362
+ let e = c.nextSibling;
363
+ if (this.#t.removeChild(c), e) c = e;
364
+ else break;
365
+ }
366
+ return !0;
367
+ }
368
+ addEventDividers(e) {
369
+ this.gridHeaderElement.removeChild(this.eventDividersElement);
370
+ for (let t of e) this.eventDividersElement.appendChild(t);
371
+ this.gridHeaderElement.appendChild(this.eventDividersElement);
372
+ }
373
+ removeEventDividers() {
374
+ this.eventDividersElement.removeChildren();
375
+ }
376
+ hideEventDividers() {
377
+ this.eventDividersElement.classList.add("hidden");
378
+ }
379
+ showEventDividers() {
380
+ this.eventDividersElement.classList.remove("hidden");
381
+ }
382
+ setScrollTop(e) {
383
+ this.#t.style.top = e + "px", this.eventDividersElement.style.top = e + "px";
384
+ }
385
+ }, gt = /* @__PURE__ */ e({
386
+ ARROW_SIDE: () => 8,
387
+ EDIT_ICON_WIDTH: () => 16,
388
+ Events: () => Vt,
389
+ FilterAction: () => Pt,
390
+ FlameChart: () => Ft,
391
+ FlameChartDecorationType: () => Lt,
392
+ FlameChartTimelineData: () => Bt,
393
+ GroupCollapsibleState: () => Nt,
394
+ HoverType: () => Mt,
395
+ MinimalTimeWindowMs: () => It,
396
+ RulerHeight: () => 15,
397
+ sortDecorationsForRenderingOrder: () => zt
398
+ }), _t = -1, vt = "italic 10px", z = {
399
+ eventSelectedFromGroup: "Selected a {PH1} event within {PH2}. Press \"enter\" to focus this event.",
400
+ flameChart: "Flame Chart",
401
+ sHovered: "{PH1} hovered",
402
+ sSelected: "{PH1} selected",
403
+ sExpanded: "{PH1} expanded",
404
+ sCollapsed: "{PH1} collapsed",
405
+ labelEntry: "Label entry",
406
+ linkEntries: "Link entries",
407
+ enterTrackConfigurationMode: "Configure tracks",
408
+ exitTrackConfigurationMode: "Finish configuring tracks"
409
+ }, yt = h("ui/legacy/components/perf_ui/FlameChart.ts", z), B = c.bind(void 0, yt), V = 6, bt = 10, xt = 3, St = 2, Ct = 6, wt = V, Tt = 25, Et = 44, Dt = 63, Ot = "M9.25 17V5.875L7.062 8.062L6 7L10 3L14 7L12.938 8.062L10.75 5.875V17H9.25Z", kt = "M9.25 3V14.125L7.062 11.938L6 13L10 17L14 13L12.938 11.938L10.75 14.125V3H9.25Z", At = "M13.2708 11.1459L11.9792 9.85419C12.0347 9.32641 11.875 8.87155 11.5 8.4896C11.125 8.10766 10.6736 7.94446 10.1458 8.00002L8.85417 6.70835C9.03472 6.63891 9.22222 6.58683 9.41667 6.5521C9.61111 6.51738 9.80556 6.50002 10 6.50002C10.9722 6.50002 11.7986 6.8403 12.4792 7.52085C13.1597 8.20141 13.5 9.0278 13.5 10C13.5 10.1945 13.4826 10.3889 13.4479 10.5834C13.4132 10.7778 13.3542 10.9653 13.2708 11.1459ZM16.0417 13.9167L14.9583 12.8334C15.4583 12.4445 15.9132 12.0174 16.3229 11.5521C16.7326 11.0868 17.0764 10.5695 17.3542 10C16.6736 8.59724 15.6701 7.49655 14.3438 6.69794C13.0174 5.89933 11.5694 5.50002 10 5.50002C9.63889 5.50002 9.28472 5.52085 8.9375 5.56252C8.59028 5.60419 8.25 5.67363 7.91667 5.77085L6.70833 4.56252C7.23611 4.35419 7.77431 4.20835 8.32292 4.12502C8.87153 4.04169 9.43056 4.00002 10 4.00002C11.9861 4.00002 13.8021 4.53821 15.4479 5.6146C17.0938 6.69099 18.2778 8.1528 19 10C18.6944 10.7917 18.2882 11.5104 17.7813 12.1563C17.2743 12.8021 16.6944 13.3889 16.0417 13.9167ZM16 18.125L13.2917 15.4167C12.7639 15.6111 12.2257 15.757 11.6771 15.8542C11.1285 15.9514 10.5694 16 10 16C8.01389 16 6.19792 15.4618 4.55208 14.3854C2.90625 13.309 1.72222 11.8472 1 10C1.30556 9.20835 1.70833 8.48613 2.20833 7.83335C2.70833 7.18058 3.29167 6.5903 3.95833 6.06252L1.875 3.97919L2.9375 2.91669L17.0625 17.0625L16 18.125ZM5.02083 7.14585C4.53472 7.53474 4.08333 7.96183 3.66667 8.4271C3.25 8.89238 2.90972 9.41669 2.64583 10C3.32639 11.4028 4.32986 12.5035 5.65625 13.3021C6.98264 14.1007 8.43056 14.5 10 14.5C10.3611 14.5 10.7153 14.4757 11.0625 14.4271C11.4097 14.3785 11.7569 14.3125 12.1042 14.2292L11.1667 13.2917C10.9722 13.3611 10.7778 13.4132 10.5833 13.4479C10.3889 13.4827 10.1944 13.5 10 13.5C9.02778 13.5 8.20139 13.1597 7.52083 12.4792C6.84028 11.7986 6.5 10.9722 6.5 10C6.5 9.80558 6.52431 9.61113 6.57292 9.41669C6.62153 9.22224 6.66667 9.0278 6.70833 8.83335L5.02083 7.14585Z", jt = "M10 13.5C10.972 13.5 11.7983 13.1597 12.479 12.479C13.1597 11.7983 13.5 10.972 13.5 10C13.5 9.028 13.1597 8.20167 12.479 7.521C11.7983 6.84033 10.972 6.5 10 6.5C9.028 6.5 8.20167 6.84033 7.521 7.521C6.84033 8.20167 6.5 9.028 6.5 10C6.5 10.972 6.84033 11.7983 7.521 12.479C8.20167 13.1597 9.028 13.5 10 13.5ZM10 12C9.44467 12 8.97233 11.8057 8.583 11.417C8.19433 11.0277 8 10.5553 8 10C8 9.44467 8.19433 8.97233 8.583 8.583C8.97233 8.19433 9.44467 8 10 8C10.5553 8 11.0277 8.19433 11.417 8.583C11.8057 8.97233 12 9.44467 12 10C12 10.5553 11.8057 11.0277 11.417 11.417C11.0277 11.8057 10.5553 12 10 12ZM10 16C8.014 16 6.20833 15.455 4.583 14.365C2.95833 13.2743 1.764 11.8193 1 10C1.764 8.18067 2.95833 6.72567 4.583 5.635C6.20833 4.545 8.014 4 10 4C11.986 4 13.7917 4.545 15.417 5.635C17.0417 6.72567 18.236 8.18067 19 10C18.236 11.8193 17.0417 13.2743 15.417 14.365C13.7917 15.455 11.986 16 10 16ZM10 14.5C11.5553 14.5 12.9927 14.0973 14.312 13.292C15.632 12.486 16.646 11.3887 17.354 10C16.646 8.61133 15.632 7.514 14.312 6.708C12.9927 5.90267 11.5553 5.5 10 5.5C8.44467 5.5 7.00733 5.90267 5.688 6.708C4.368 7.514 3.354 8.61133 2.646 10C3.354 11.3887 4.368 12.486 5.688 13.292C7.00733 14.0973 8.44467 14.5 10 14.5Z", Mt = /* @__PURE__ */ function(e) {
410
+ return e.TRACK_CONFIG_UP_BUTTON = "TRACK_CONFIG_UP_BUTTON", e.TRACK_CONFIG_DOWN_BUTTON = "TRACK_CONFIG_DOWN_BUTTON", e.TRACK_CONFIG_HIDE_BUTTON = "TRACK_CONFIG_HIDE_BUTTON", e.TRACK_CONFIG_SHOW_BUTTON = "TRACK_CONFIG_SHOW_BUTTON", e.INSIDE_TRACK_HEADER = "INSIDE_TRACK_HEADER", e.INSIDE_TRACK = "INSIDE_TRACK", e.OUTSIDE_TRACKS = "OUTSIDE_TRACKS", e.ERROR = "ERROR", e;
411
+ }({}), Nt = /* @__PURE__ */ function(e) {
412
+ return e[e.ALWAYS = 0] = "ALWAYS", e[e.NEVER = 1] = "NEVER", e[e.IF_MULTI_ROW = 2] = "IF_MULTI_ROW", e;
413
+ }({}), Pt = /* @__PURE__ */ function(e) {
414
+ return e.MERGE_FUNCTION = "MERGE_FUNCTION", e.COLLAPSE_FUNCTION = "COLLAPSE_FUNCTION", e.COLLAPSE_REPEATING_DESCENDANTS = "COLLAPSE_REPEATING_DESCENDANTS", e.RESET_CHILDREN = "RESET_CHILDREN", e.UNDO_ALL_ACTIONS = "UNDO_ALL_ACTIONS", e;
415
+ }({}), Ft = class extends f(E) {
416
+ flameChartDelegate;
417
+ chartViewport;
418
+ dataProvider;
419
+ candyStripePattern;
420
+ candyStripePatternGray;
421
+ contextMenu;
422
+ viewportElement;
423
+ canvas;
424
+ context;
425
+ popoverElement;
426
+ markerHighlighElement;
427
+ highlightElement;
428
+ revealDescendantsArrowHighlightElement;
429
+ selectedElement = null;
430
+ rulerEnabled;
431
+ barHeight;
432
+ hitMarginPx;
433
+ textBaseline;
434
+ textPadding;
435
+ highlightedMarkerIndex;
436
+ highlightedEntryIndex;
437
+ selectedEntryIndex;
438
+ rawTimelineDataLength;
439
+ markerPositions;
440
+ customDrawnPositions;
441
+ lastMouseOffsetX;
442
+ selectedGroupIndex;
443
+ keyboardFocusedGroup;
444
+ offsetWidth;
445
+ offsetHeight;
446
+ dragStartX;
447
+ dragStartY;
448
+ lastMouseOffsetY;
449
+ #e;
450
+ maxDragOffset;
451
+ timelineLevels;
452
+ visibleLevelOffsets;
453
+ visibleLevels;
454
+ visibleLevelHeights;
455
+ groupOffsets;
456
+ rawTimelineData;
457
+ forceDecorationCache;
458
+ entryColorsCache;
459
+ colorDimmingCache = /* @__PURE__ */ new Map();
460
+ totalTime;
461
+ lastPopoverState;
462
+ dimIndices;
463
+ dimShouldOutlineUndimmedEntries = !1;
464
+ #t = 0;
465
+ #n;
466
+ #r;
467
+ #i;
468
+ #a = null;
469
+ #o = !1;
470
+ #s = !1;
471
+ #c = null;
472
+ #l = !0;
473
+ #u = /* @__PURE__ */ new Map();
474
+ #d = null;
475
+ #f = this.#p.bind(this);
476
+ constructor(e, t, n = {}) {
477
+ super({ useShadowDom: !0 }), this.#n = `${L} ${I()}`, this.#r = `${vt} ${I()}`, this.registerRequiredCSS(dt), this.registerRequiredCSS(se), this.contentElement.classList.add("flame-chart-main-pane"), typeof n.selectedElementOutline == "boolean" && (this.#l = n.selectedElementOutline), this.flameChartDelegate = t;
478
+ let r = !0;
479
+ if (typeof n.useOverlaysForCursorRuler == "boolean" && (r = !n.useOverlaysForCursorRuler), this.chartViewport = new Ut(this, { enableCursorElement: r }), this.chartViewport.show(this.contentElement), this.dataProvider = e, this.viewportElement = this.chartViewport.viewportElement, this.canvas = this.viewportElement.createChild("canvas", "fill"), n.canvasVELogContext) {
480
+ let e = Re(n.canvasVELogContext).track({ hover: !0 });
481
+ this.canvas.setAttribute("jslog", `${e}`);
482
+ }
483
+ this.context = this.canvas.getContext("2d"), this.candyStripePattern = this.candyStripePatternGray = null, this.canvas.tabIndex = 0, x(this.canvas, B(z.flameChart)), Ee(this.canvas), this.setDefaultFocusedElement(this.canvas), this.canvas.classList.add("flame-chart-canvas"), this.canvas.addEventListener("mousemove", this.onMouseMove.bind(this), !1), this.canvas.addEventListener("mouseout", this.onMouseOut.bind(this), !1), this.canvas.addEventListener("click", this.onClick.bind(this), !1), this.canvas.addEventListener("dblclick", this.#x.bind(this), !1), this.canvas.addEventListener("keydown", this.onKeyDown.bind(this), !1), this.canvas.addEventListener("contextmenu", this.onContextMenu.bind(this), !1), this.popoverElement = n.tooltipElement || this.viewportElement.createChild("div", "flame-chart-entry-info"), this.markerHighlighElement = this.viewportElement.createChild("div", "flame-chart-marker-highlight-element"), this.highlightElement = this.viewportElement.createChild("div", "flame-chart-highlight-element"), this.revealDescendantsArrowHighlightElement = this.viewportElement.createChild("div", "reveal-descendants-arrow-highlight-element"), this.#l && (this.selectedElement = this.viewportElement.createChild("div", "flame-chart-selected-element")), this.canvas.addEventListener("focus", () => {
484
+ this.dispatchEventToListeners("CanvasFocused");
485
+ }, !1), S(this.viewportElement, this.startDragging.bind(this), this.dragging.bind(this), this.endDragging.bind(this), null), this.rulerEnabled = !0, this.barHeight = 17, this.hitMarginPx = 3, this.textBaseline = 5, this.textPadding = 5, this.chartViewport.setWindowTimes(e.minimumBoundary(), e.minimumBoundary() + e.totalTime()), this.highlightedMarkerIndex = -1, this.highlightedEntryIndex = -1, this.selectedEntryIndex = -1, this.#a = null, this.rawTimelineDataLength = 0, this.markerPositions = /* @__PURE__ */ new Map(), this.customDrawnPositions = /* @__PURE__ */ new Map(), this.lastMouseOffsetX = 0, this.selectedGroupIndex = -1, this.lastPopoverState = {
486
+ entryIndex: -1,
487
+ groupIndex: -1,
488
+ hiddenEntriesPopover: !1
489
+ }, this.keyboardFocusedGroup = -1;
490
+ }
491
+ #p() {
492
+ this.scheduleUpdate();
493
+ }
494
+ wasShown() {
495
+ super.wasShown(), M.instance().addEventListener(N.eventName, this.#f);
496
+ }
497
+ willHide() {
498
+ M.instance().removeEventListener(N.eventName, this.#f), this.hideHighlight(), super.willHide();
499
+ }
500
+ canvasBoundingClientRect() {
501
+ return this.#c && this.#c.width > 0 && this.#c.height > 0 || (this.#c = this.canvas.getBoundingClientRect()), this.#c;
502
+ }
503
+ verticalScrollBarVisible() {
504
+ return this.chartViewport.verticalScrollBarVisible();
505
+ }
506
+ setTooltipYPixelAdjustment(e) {
507
+ e !== this.#t && (this.#t = e, this.popoverElement.children.length && this.updatePopoverOffset());
508
+ }
509
+ getBarHeight() {
510
+ return this.barHeight;
511
+ }
512
+ setBarHeight(e) {
513
+ this.barHeight = e;
514
+ }
515
+ setTextBaseline(e) {
516
+ this.textBaseline = e;
517
+ }
518
+ setTextPadding(e) {
519
+ this.textPadding = e;
520
+ }
521
+ enableRuler(e) {
522
+ this.rulerEnabled = e;
523
+ }
524
+ alwaysShowVerticalScroll() {
525
+ this.chartViewport.alwaysShowVerticalScroll();
526
+ }
527
+ disableRangeSelection() {
528
+ this.chartViewport.disableRangeSelection();
529
+ }
530
+ #m(e) {
531
+ return this.dimIndices ? this.dimIndices[e] !== 0 : !1;
532
+ }
533
+ #h(e) {
534
+ return !this.isDimming() || this.#m(e) ? !1 : ArrayBuffer.isView(this.dimShouldOutlineUndimmedEntries) ? this.dimShouldOutlineUndimmedEntries[e] !== 0 : this.dimShouldOutlineUndimmedEntries;
535
+ }
536
+ #g(e, t) {
537
+ let n = new Uint8Array(this.rawTimelineDataLength);
538
+ if (t) for (let t of e) n[t] = 1;
539
+ else {
540
+ n.fill(1);
541
+ for (let t of e) n[t] = 0;
542
+ }
543
+ return n;
544
+ }
545
+ enableDimming(e, t, n) {
546
+ this.dimIndices = this.#g(e, t), this.dimShouldOutlineUndimmedEntries = Array.isArray(n) ? this.#g(n, !0) : n, this.draw();
547
+ }
548
+ disableDimming() {
549
+ this.dimIndices = null, this.dimShouldOutlineUndimmedEntries = !1, this.draw();
550
+ }
551
+ isDimming() {
552
+ return !!this.dimIndices;
553
+ }
554
+ #_(e, t) {
555
+ if (this.#m(e)) {
556
+ let e = this.colorDimmingCache.get(t);
557
+ if (e) return e;
558
+ let n = m(t);
559
+ return e = n ? n.asLegacyColor().grayscale().asString() : "lightgrey", this.colorDimmingCache.set(t, e), e;
560
+ }
561
+ return t;
562
+ }
563
+ getColorForEntry(e) {
564
+ return this.entryColorsCache ? this.#_(e, this.entryColorsCache[e]) : "";
565
+ }
566
+ highlightEntry(e) {
567
+ this.highlightedEntryIndex !== e && this.dataProvider.entryColor(e) && (this.highlightedEntryIndex = e, this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex), this.dispatchEventToListeners("EntryHovered", e));
568
+ }
569
+ hideHighlight() {
570
+ this.#a === null && (this.popoverElement.removeChildren(), this.lastPopoverState = {
571
+ entryIndex: -1,
572
+ groupIndex: -1,
573
+ hiddenEntriesPopover: !1
574
+ }), this.highlightedEntryIndex !== -1 && (this.highlightedEntryIndex = -1, this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex), this.dispatchEventToListeners("EntryHovered", -1));
575
+ }
576
+ createCandyStripePattern(e) {
577
+ let t = document.createElement("canvas");
578
+ t.width = 17, t.height = 17;
579
+ let n = t.getContext("2d", { willReadFrequently: !0 });
580
+ n.translate(17 * .5, 17 * .5), n.rotate(Math.PI * .25), n.translate(-17 * .5, -17 * .5), n.fillStyle = e;
581
+ for (let e = -17; e < 34; e += 3) n.fillRect(e, -17, 1, 51);
582
+ return n.createPattern(t, "repeat");
583
+ }
584
+ resetCanvas() {
585
+ let e = window.devicePixelRatio, t = Math.round(this.offsetWidth * e), n = Math.round(this.offsetHeight * e);
586
+ this.canvas.width = t, this.canvas.height = n, this.canvas.style.width = `${t / e}px`, this.canvas.style.height = `${n / e}px`;
587
+ }
588
+ windowChanged(e, t, n) {
589
+ this.flameChartDelegate.windowChanged(e, t, n);
590
+ }
591
+ updateRangeSelection(e, t) {
592
+ this.flameChartDelegate.updateRangeSelection(e, t);
593
+ }
594
+ setSize(e, t) {
595
+ this.offsetWidth = e, this.offsetHeight = t;
596
+ }
597
+ startDragging(e) {
598
+ return this.hideHighlight(), this.maxDragOffset = 0, this.dragStartX = e.pageX, this.dragStartY = e.pageY, !0;
599
+ }
600
+ dragging(e) {
601
+ let t = e.pageX - this.dragStartX, n = e.pageY - this.dragStartY;
602
+ this.maxDragOffset = Math.max(this.maxDragOffset, Math.sqrt(t * t + n * n));
603
+ }
604
+ endDragging(e) {
605
+ this.updateHighlight();
606
+ }
607
+ timelineData(e) {
608
+ if (!this.dataProvider) return null;
609
+ let t = this.dataProvider.timelineData(e);
610
+ return (t !== this.rawTimelineData || t && t.entryStartTimes.length !== this.rawTimelineDataLength) && this.processTimelineData(t), this.rawTimelineData || null;
611
+ }
612
+ revealEntryVertically(e) {
613
+ let t = this.timelineData();
614
+ if (!t) return;
615
+ let n = t.entryLevels[e];
616
+ this.chartViewport.setScrollOffset(this.levelToOffset(n), this.levelHeight(n), !0);
617
+ }
618
+ revealEntry(e) {
619
+ let t = this.timelineData();
620
+ if (!t) return;
621
+ let n = this.chartViewport.windowLeftTime(), r = this.chartViewport.windowRightTime(), i = t.entryStartTimes[e], a = t.entryTotalTimes[e];
622
+ Number.isNaN(a) && (a = 1);
623
+ let o = i + a, s = Math.min(a, r - n), c = t.entryLevels[e];
624
+ this.chartViewport.setScrollOffset(this.levelToOffset(c), this.levelHeight(c));
625
+ let l = (r - n) / this.offsetWidth;
626
+ if (s = Math.max(s, l * 30), n > o) {
627
+ let e = n - o + s;
628
+ this.windowChanged(n - e, r - e, !0);
629
+ } else if (r < i) {
630
+ let e = i - r + s;
631
+ this.windowChanged(n + e, r + e, !0);
632
+ }
633
+ }
634
+ setWindowTimes(e, t, n) {
635
+ this.chartViewport.setWindowTimes(e, t, n), this.updateHighlight();
636
+ }
637
+ onMouseMove(e) {
638
+ if (this.#a = null, this.lastMouseOffsetX = e.offsetX, this.lastMouseOffsetY = e.offsetY, !this.enabled() || this.chartViewport.isDragging()) return;
639
+ let t = j(this.chartViewport.pixelToTime(e.offsetX));
640
+ this.dispatchEventToListeners("MouseMove", {
641
+ mouseEvent: e,
642
+ timeInMicroSeconds: Ge(t)
643
+ });
644
+ let { groupIndex: n, hoverType: r } = this.coordinatesToGroupIndexAndHoverType(e.offsetX, e.offsetY);
645
+ switch (r) {
646
+ case "TRACK_CONFIG_UP_BUTTON":
647
+ case "TRACK_CONFIG_DOWN_BUTTON":
648
+ case "TRACK_CONFIG_HIDE_BUTTON":
649
+ case "TRACK_CONFIG_SHOW_BUTTON": {
650
+ this.hideHighlight(), this.viewportElement.style.cursor = "pointer";
651
+ let e = this.#v(n, r);
652
+ e && (this.popoverElement.appendChild(e), this.updatePopoverOffset());
653
+ return;
654
+ }
655
+ case "INSIDE_TRACK_HEADER":
656
+ this.updateHighlight(), this.viewportElement.style.cursor = "pointer";
657
+ return;
658
+ case "INSIDE_TRACK":
659
+ case "OUTSIDE_TRACKS":
660
+ this.updateHighlight();
661
+ return;
662
+ case "ERROR": return;
663
+ default: i(r, `Invalid hovering type: ${r}`);
664
+ }
665
+ }
666
+ #v(e, n) {
667
+ let r = this.rawTimelineData?.groups[e];
668
+ if (!r) return null;
669
+ let i = t(r.name, 20), a = "";
670
+ switch (n) {
671
+ case "TRACK_CONFIG_UP_BUTTON":
672
+ a = `Move ${i} track up`;
673
+ break;
674
+ case "TRACK_CONFIG_DOWN_BUTTON":
675
+ a = `Move ${i} track down`;
676
+ break;
677
+ case "TRACK_CONFIG_HIDE_BUTTON":
678
+ a = this.groupIsLastVisibleTopLevel(e) ? "Can not hide the last top level track" : `Hide ${i} track`;
679
+ break;
680
+ case "TRACK_CONFIG_SHOW_BUTTON":
681
+ a = `Show ${i} track`;
682
+ break;
683
+ default: return null;
684
+ }
685
+ let o = document.createElement("div");
686
+ return o.createChild("span", "popoverinfo-title").textContent = a, o;
687
+ }
688
+ updateHighlight() {
689
+ let e = this.coordinatesToEntryIndex(this.lastMouseOffsetX, this.lastMouseOffsetY);
690
+ if (this.updateHiddenChildrenArrowHighlighPosition(e), e === -1) {
691
+ this.hideHighlight();
692
+ let { groupIndex: e, hoverType: t } = this.coordinatesToGroupIndexAndHoverType(this.lastMouseOffsetX, this.lastMouseOffsetY);
693
+ t === "INSIDE_TRACK_HEADER" && this.#b(e), e >= 0 && this.rawTimelineData?.groups?.[e].selectable ? this.viewportElement.style.cursor = "pointer" : this.viewportElement.style.cursor = "default";
694
+ return;
695
+ }
696
+ this.chartViewport.isDragging() || (this.#y(e), this.viewportElement.style.cursor = this.dataProvider.canJumpToEntry(e) ? "pointer" : "default", this.highlightEntry(e));
697
+ }
698
+ onMouseOut() {
699
+ this.lastMouseOffsetX = -1, this.lastMouseOffsetY = -1, this.hideHighlight();
700
+ }
701
+ showPopoverForSearchResult(e) {
702
+ this.#a = e, this.#y(e);
703
+ }
704
+ #y(e) {
705
+ let t = e !== null && this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, e);
706
+ if (e === this.lastPopoverState.entryIndex && t === this.lastPopoverState.hiddenEntriesPopover) return this.updatePopoverOffset();
707
+ let n = this.timelineData();
708
+ if (!n) return;
709
+ let r = n.groups.at(this.selectedGroupIndex), i = t && r ? this.dataProvider.preparePopoverForCollapsedArrow?.(e) : e !== null && this.dataProvider.preparePopoverElement(e);
710
+ i && this.updatePopoverContents(i), this.lastPopoverState = {
711
+ entryIndex: e,
712
+ groupIndex: -1,
713
+ hiddenEntriesPopover: t
714
+ };
715
+ }
716
+ updatePopoverContents(e) {
717
+ this.popoverElement.removeChildren(), this.popoverElement.appendChild(e), this.updatePopoverOffset(), this.lastPopoverState.entryIndex = -1;
718
+ }
719
+ updateMouseOffset(e, t) {
720
+ this.lastMouseOffsetX = e, this.lastMouseOffsetY = t;
721
+ }
722
+ #b(e) {
723
+ if (e === this.lastPopoverState.groupIndex) return this.updatePopoverOffset();
724
+ this.popoverElement.removeChildren();
725
+ let t = this.timelineData();
726
+ if (!t) return;
727
+ let n = t.groups.at(e);
728
+ n?.description && (this.popoverElement.innerText = n?.description, this.updatePopoverOffset()), this.lastPopoverState = {
729
+ groupIndex: e,
730
+ entryIndex: -1,
731
+ hiddenEntriesPopover: !1
732
+ };
733
+ }
734
+ updatePopoverOffset() {
735
+ let e = this.lastMouseOffsetX, t = this.lastMouseOffsetY;
736
+ if (this.#a !== null) {
737
+ let n = this.entryIndexToCoordinates(this.selectedEntryIndex), { x: r, y: i } = this.canvas.getBoundingClientRect();
738
+ e = n?.x ? n.x - r : e, t = n?.y ? n.y - i : t;
739
+ }
740
+ let n = this.popoverElement.parentElement ? this.popoverElement.parentElement.clientWidth : 0, i = this.popoverElement.parentElement ? this.popoverElement.parentElement.clientHeight : 0, a = this.popoverElement.clientWidth, o = this.popoverElement.clientHeight, s = 6 + this.#t, c, l;
741
+ for (let u = 0; u < 2; ++u) for (let d = 0; d < 4; ++d) {
742
+ let f = d & 2 ? -10 - a : 10, p = d & 1 ? -s - o : s;
743
+ if (c = r(e + f, 0, n - a), l = r(t + p, 0, i - o), u === 0 ? (c >= e || e >= c + a) && (l >= t || t >= l + o) : c >= e || e >= c + a || l >= t || t >= l + o) break;
744
+ }
745
+ this.popoverElement.style.left = c + "px", this.popoverElement.style.top = l + "px";
746
+ }
747
+ #x(e) {
748
+ this.focus();
749
+ let { groupIndex: t } = this.coordinatesToGroupIndexAndHoverType(e.offsetX, e.offsetY);
750
+ if (this.highlightedEntryIndex !== -1) {
751
+ this.#S(t), this.dispatchEventToListeners("EntryLabelAnnotationAdded", {
752
+ entryIndex: this.highlightedEntryIndex,
753
+ withLinkCreationButton: !0
754
+ });
755
+ let n = this.flameChartDelegate.containingElement?.();
756
+ n && b(n, e, { doubleClick: !0 });
757
+ }
758
+ }
759
+ onClick(e) {
760
+ if (this.focus(), this.maxDragOffset > 5) return;
761
+ let { groupIndex: t, hoverType: n } = this.coordinatesToGroupIndexAndHoverType(e.offsetX, e.offsetY);
762
+ switch (n) {
763
+ case "TRACK_CONFIG_UP_BUTTON":
764
+ this.moveGroupUp(t);
765
+ return;
766
+ case "TRACK_CONFIG_DOWN_BUTTON":
767
+ this.moveGroupDown(t);
768
+ return;
769
+ case "TRACK_CONFIG_HIDE_BUTTON":
770
+ if (this.groupIsLastVisibleTopLevel(t)) return;
771
+ this.hideGroup(t);
772
+ return;
773
+ case "TRACK_CONFIG_SHOW_BUTTON":
774
+ this.showGroup(t);
775
+ return;
776
+ case "INSIDE_TRACK_HEADER":
777
+ this.#S(t), this.toggleGroupExpand(t);
778
+ return;
779
+ case "INSIDE_TRACK":
780
+ case "OUTSIDE_TRACKS": {
781
+ this.#S(t);
782
+ let n = this.timelineData();
783
+ if (e.shiftKey && this.highlightedEntryIndex !== -1 && n) {
784
+ let e = n.entryStartTimes[this.highlightedEntryIndex], t = e + n.entryTotalTimes[this.highlightedEntryIndex];
785
+ this.chartViewport.setRangeSelection(e, t);
786
+ } else this.chartViewport.onClick(e), this.dispatchEventToListeners("EntryInvoked", this.highlightedEntryIndex);
787
+ return;
788
+ }
789
+ }
790
+ }
791
+ setLinkSelectionAnnotationIsInProgress(e) {
792
+ this.#s = e;
793
+ }
794
+ #S(e) {
795
+ if (e < 0 || this.selectedGroupIndex === e || !this.rawTimelineData) return;
796
+ let t = this.rawTimelineData.groups;
797
+ if (!t) return;
798
+ this.keyboardFocusedGroup = e, this.#s || this.scrollGroupIntoView(e);
799
+ let n = t[e].name;
800
+ t[e].selectable ? (this.selectedGroupIndex = e, this.flameChartDelegate.updateSelectedGroup(this, t[e]), this.draw(), C.alert(B(z.sSelected, { PH1: n }))) : (this.deselectAllGroups(), C.alert(B(z.sHovered, { PH1: n })));
801
+ }
802
+ deselectAllGroups() {
803
+ this.selectedGroupIndex = -1, this.flameChartDelegate.updateSelectedGroup(this, null), this.draw();
804
+ }
805
+ deselectAllEntries() {
806
+ this.selectedEntryIndex = -1, this.rawTimelineData?.emptyInitiators(), this.draw();
807
+ }
808
+ isGroupFocused(e) {
809
+ return e === this.selectedGroupIndex || e === this.keyboardFocusedGroup;
810
+ }
811
+ scrollGroupIntoView(e) {
812
+ if (e < 0 || !this.rawTimelineData) return;
813
+ let t = this.rawTimelineData.groups, n = this.groupOffsets;
814
+ if (!n || !t) return;
815
+ let r = n[e], i = n[e + 1];
816
+ e === t.length - 1 && (i += t[e].style.padding);
817
+ let a = e === 0 ? 0 : r, o = Math.min(i - a, this.chartViewport.chartHeight());
818
+ this.chartViewport.setScrollOffset(a, o);
819
+ }
820
+ toggleGroupExpand(e) {
821
+ e < 0 || !this.isGroupCollapsible(e) || this.rawTimelineData?.groups && this.expandGroup(e, !this.rawTimelineData.groups[e].expanded);
822
+ }
823
+ bulkExpandGroups(e) {
824
+ if (e.length === 0 || !this.rawTimelineData) return;
825
+ let t = this.rawTimelineData.groups;
826
+ if (!t) return;
827
+ let n = !1;
828
+ for (let r of e) !this.isGroupCollapsible(r) || t[r].expanded || (n = !0, t[r].expanded = !0);
829
+ n && this.#C();
830
+ }
831
+ #C() {
832
+ this.updateLevelPositions(), this.updateHeight(), this.draw(), this.#w();
833
+ }
834
+ expandGroup(e, t = !0, n = !1) {
835
+ if (e < 0 || !this.isGroupCollapsible(e) || !this.rawTimelineData) return;
836
+ let r = this.rawTimelineData.groups;
837
+ if (!r) return;
838
+ let i = r[e];
839
+ if (!t) {
840
+ let t = this.timelineData();
841
+ if (t) {
842
+ let n = t.entryLevels[this.selectedEntryIndex];
843
+ this.selectedEntryIndex >= 0 && n >= i.startLevel && (e >= r.length - 1 || r[e + 1].startLevel > n) && (this.selectedEntryIndex = -1, this.rawTimelineData.emptyInitiators());
844
+ }
845
+ }
846
+ if (i.expanded !== t && (i.expanded = t, this.#C(), this.scrollGroupIntoView(e), !n)) {
847
+ let t = r[e].name, n = i.expanded ? B(z.sExpanded, { PH1: t }) : B(z.sCollapsed, { PH1: t });
848
+ C.alert(n);
849
+ }
850
+ }
851
+ moveGroupUp(e) {
852
+ if (!(e < 0) && this.rawTimelineData?.groups && this.#i) {
853
+ for (let t = 0; t < this.#i.children.length; t++) {
854
+ let n = this.#i.children[t];
855
+ if (n.index === e && t >= 1) {
856
+ this.#i.children[t] = this.#i.children[t - 1], this.#i.children[t - 1] = n;
857
+ break;
858
+ }
859
+ }
860
+ this.updateLevelPositions(), this.updateHighlight(), this.updateHeight(), this.draw(), this.#w();
861
+ }
862
+ }
863
+ #w() {
864
+ if (!this.#i || !this.dataProvider.handleTrackConfigurationChange) return;
865
+ let e = this.rawTimelineData?.groups;
866
+ if (!e) return;
867
+ let t = this.#T(this.#i);
868
+ this.dataProvider.handleTrackConfigurationChange(e, t);
869
+ }
870
+ #T(e) {
871
+ let t = [];
872
+ function n(e) {
873
+ e.index !== -1 && t.push(e.index);
874
+ for (let t of e.children) n(t);
875
+ }
876
+ return n(e), t;
877
+ }
878
+ moveGroupDown(e) {
879
+ if (!(e < 0) && this.rawTimelineData?.groups && this.#i) {
880
+ for (let t = 0; t < this.#i.children.length; t++) {
881
+ let n = this.#i.children[t];
882
+ if (n.index === e && t <= this.#i.children.length - 2) {
883
+ this.#i.children[t] = this.#i.children[t + 1], this.#i.children[t + 1] = n;
884
+ break;
885
+ }
886
+ }
887
+ this.updateLevelPositions(), this.updateHighlight(), this.updateHeight(), this.draw(), this.#w();
888
+ }
889
+ }
890
+ hideGroup(e) {
891
+ this.#E(e, !0);
892
+ }
893
+ showGroup(e) {
894
+ this.#E(e, !1);
895
+ }
896
+ showAllGroups() {
897
+ if (this.rawTimelineData?.groups) {
898
+ for (let e of this.rawTimelineData.groups) e.hidden = !1;
899
+ this.updateLevelPositions(), this.updateHighlight(), this.updateHeight(), this.draw(), this.#w(), this.scrollGroupIntoView(0);
900
+ }
901
+ }
902
+ #E(e, t) {
903
+ if (e < 0 || !this.rawTimelineData?.groups) return;
904
+ let n = this.rawTimelineData.groups;
905
+ if (!n) return;
906
+ let r = n[e];
907
+ r.hidden = t, this.updateLevelPositions(), this.updateHighlight(), this.updateHeight(), this.draw(), this.#w();
908
+ }
909
+ modifyTree(e, t) {
910
+ !this.timelineData() || !this.dataProvider.modifyTree || (this.dataProvider.modifyTree(e, t), this.update());
911
+ }
912
+ #D(e) {
913
+ if (this.#o) return;
914
+ this.contextMenu = new Se(e);
915
+ let t = B(z.enterTrackConfigurationMode);
916
+ this.contextMenu.defaultSection().appendItem(t, () => {
917
+ this.enterTrackConfigurationMode();
918
+ }, { jslogContext: "track-configuration-enter" }), this.contextMenu.show();
919
+ }
920
+ #O(e) {
921
+ if (this.#o === !1) return;
922
+ this.contextMenu = new Se(e);
923
+ let t = B(z.exitTrackConfigurationMode);
924
+ this.contextMenu.defaultSection().appendItem(t, () => {
925
+ this.#N();
926
+ }, { jslogContext: "track-configuration-exit" }), this.contextMenu.show();
927
+ }
928
+ #k() {
929
+ return !!this.dataProvider.hasTrackConfigurationMode?.();
930
+ }
931
+ onContextMenu(e) {
932
+ let { groupIndex: t, hoverType: n } = this.coordinatesToGroupIndexAndHoverType(e.offsetX, e.offsetY);
933
+ if (this.#o) {
934
+ this.#O(e);
935
+ return;
936
+ }
937
+ n === "INSIDE_TRACK_HEADER" && this.#k() && this.#D(e);
938
+ let r = e.detail === _t, i = r ? this.selectedEntryIndex : this.highlightedEntryIndex;
939
+ if (i === -1) return;
940
+ r || (this.dispatchEventToListeners("EntryInvoked", i), this.setSelectedEntry(i), this.#S(t)), this.contextMenu = this.dataProvider.customizedContextMenu?.(e, this.selectedEntryIndex, t) ?? new Se(e);
941
+ let a = this.contextMenu.annotationSection();
942
+ a.appendItem(B(z.labelEntry), () => {
943
+ this.dispatchEventToListeners("EntryLabelAnnotationAdded", {
944
+ entryIndex: this.selectedEntryIndex,
945
+ withLinkCreationButton: !1
946
+ });
947
+ }, { jslogContext: "timeline.annotations.create-entry-label" }), a.appendItem(B(z.linkEntries), () => {
948
+ this.dispatchEventToListeners("EntriesLinkAnnotationCreated", { entryFromIndex: this.selectedEntryIndex });
949
+ }, { jslogContext: "timeline.annotations.create-entries-link" }), this.contextMenu.show();
950
+ }
951
+ #A(e) {
952
+ this.selectedEntryIndex !== -1 && this.dataProvider.handleFlameChartTransformKeyboardEvent?.(e, this.selectedEntryIndex, this.selectedGroupIndex);
953
+ }
954
+ #j() {
955
+ let e = this.timelineData()?.entryStartTimes[this.selectedEntryIndex], t = this.timelineData()?.entryLevels[this.selectedEntryIndex];
956
+ if (!e || !t) return;
957
+ let n = this.canvasBoundingClientRect();
958
+ if (!n) return;
959
+ let r = this.chartViewport.timeToPosition(e) + n.left, i = this.levelToOffset(t) - this.getScrollOffset() + n.top, a = new MouseEvent("contextmenu", {
960
+ clientX: r,
961
+ clientY: i,
962
+ detail: _t
963
+ });
964
+ this.canvas.dispatchEvent(a);
965
+ }
966
+ onKeyDown(e) {
967
+ if (pe.hasAtLeastOneModifier(e) || !this.timelineData()) return;
968
+ e.key === " " && this.selectedEntryIndex > -1 && this.#j();
969
+ let t = this.handleSelectionNavigation(e);
970
+ !t && this.rawTimelineData?.groups && (t = this.handleKeyboardGroupNavigation(e)), t || this.#A(e);
971
+ }
972
+ bindCanvasEvent(e, t) {
973
+ this.canvas.addEventListener(e, t);
974
+ }
975
+ drawTrackOnCanvas(e, t, n) {
976
+ let r = this.timelineData();
977
+ if (!r) return null;
978
+ let i = this.offsetWidth, a = this.offsetHeight;
979
+ t.save();
980
+ let o = window.devicePixelRatio;
981
+ t.scale(o, o), t.fillStyle = "rgba(0, 0, 0, 0)", t.fillRect(0, 0, i, a), t.font = this.#n;
982
+ let s = this.rawTimelineData?.groups || [], c = this.groupOffsets;
983
+ if (!s.length || !c) return null;
984
+ let l = s.findIndex((t) => t.name.includes(e));
985
+ if (l < 0) return null;
986
+ this.scrollGroupIntoView(l);
987
+ let u = s[l].startLevel, d = s[l + 1].startLevel, f = c[l], p = c[l + 1], { drawBatches: m, titleIndices: h } = this.getDrawBatches(t, r), g = (e) => {
988
+ let t = Math.min(this.#R(r, e), i);
989
+ return r.entryLevels[e] >= u && r.entryLevels[e] < d && t > n;
990
+ }, _ = [];
991
+ for (let [{ color: e, outline: n }, { indexes: i }] of m) {
992
+ let a = i.filter(g);
993
+ _ = [..._, ...a], this.#P(t, r, e, a, n);
994
+ }
995
+ let v = h.filter(g);
996
+ return this.drawEventTitles(t, r, v, i), t.restore(), {
997
+ top: c[l],
998
+ height: p - f,
999
+ visibleEntries: new Set(_)
1000
+ };
1001
+ }
1002
+ handleKeyboardGroupNavigation(e) {
1003
+ let t = e, n = !1, r = !1;
1004
+ return t.code === "ArrowUp" ? n = this.selectPreviousGroup() : t.code === "ArrowDown" ? n = this.selectNextGroup() : t.code === "ArrowLeft" ? this.keyboardFocusedGroup >= 0 && (this.expandGroup(this.keyboardFocusedGroup, !1), n = !0) : t.code === "ArrowRight" ? this.keyboardFocusedGroup >= 0 && (this.expandGroup(this.keyboardFocusedGroup, !0), this.selectFirstChild(), n = !0) : t.key === "Enter" && (r = this.selectFirstEntryInCurrentGroup(), n = r), n && !r && this.deselectAllEntries(), n && t.consume(!0), n;
1005
+ }
1006
+ selectFirstEntryInCurrentGroup() {
1007
+ if (!this.rawTimelineData) return !1;
1008
+ let e = this.rawTimelineData.groups;
1009
+ if (this.keyboardFocusedGroup < 0 || !e) return !1;
1010
+ let t = e[this.keyboardFocusedGroup], n = t.startLevel;
1011
+ if (n < 0 || this.keyboardFocusedGroup < e.length - 1 && e[this.keyboardFocusedGroup + 1].startLevel === n || !this.timelineLevels) return !1;
1012
+ let r = this.timelineData();
1013
+ if (!r) return !1;
1014
+ let i = j(1), a = this.timelineLevels[n].find(((e) => {
1015
+ let t = r.entryTotalTimes[e];
1016
+ return !Number.isNaN(t) && t >= i;
1017
+ }));
1018
+ a === void 0 && (a = this.timelineLevels[n][0]), this.expandGroup(this.keyboardFocusedGroup, !0);
1019
+ let o = this.dataProvider.entryTitle(a);
1020
+ return o && C.alert(B(z.eventSelectedFromGroup, {
1021
+ PH1: o,
1022
+ PH2: t.name
1023
+ })), this.setSelectedEntry(a), !0;
1024
+ }
1025
+ selectPreviousGroup() {
1026
+ if (this.keyboardFocusedGroup <= 0) return !1;
1027
+ let e = this.getGroupIndexToSelect(-1);
1028
+ return this.#S(e), !0;
1029
+ }
1030
+ selectNextGroup() {
1031
+ if (!this.rawTimelineData?.groups || this.keyboardFocusedGroup >= this.rawTimelineData.groups.length - 1) return !1;
1032
+ let e = this.getGroupIndexToSelect(1);
1033
+ return this.#S(e), !0;
1034
+ }
1035
+ getGroupIndexToSelect(e) {
1036
+ if (!this.rawTimelineData?.groups) throw Error("No raw timeline data");
1037
+ let t = this.rawTimelineData.groups, n = this.keyboardFocusedGroup, r, i;
1038
+ do
1039
+ n += e, r = this.rawTimelineData.groups[n].name, i = this.keyboardFocusedGroup !== -1 && t[n].style.nestingLevel > t[this.keyboardFocusedGroup].style.nestingLevel;
1040
+ while (n > 0 && n < t.length - 1 && (!r || i));
1041
+ return n;
1042
+ }
1043
+ selectFirstChild() {
1044
+ if (!this.rawTimelineData?.groups) return;
1045
+ let e = this.rawTimelineData.groups;
1046
+ if (this.keyboardFocusedGroup < 0 || this.keyboardFocusedGroup >= e.length - 1) return;
1047
+ let t = this.keyboardFocusedGroup + 1;
1048
+ e[t].style.nestingLevel > e[this.keyboardFocusedGroup].style.nestingLevel && this.#S(t);
1049
+ }
1050
+ handleSelectionNavigation(e) {
1051
+ if (this.selectedEntryIndex === -1) return !1;
1052
+ let t = this.timelineData();
1053
+ if (!t) return !1;
1054
+ function r(e, n) {
1055
+ if (!t) throw Error("No timeline data");
1056
+ return e - t.entryStartTimes[n];
1057
+ }
1058
+ function i(e, n) {
1059
+ if (!t) throw Error("No timeline data");
1060
+ let r = t.entryStartTimes[e], i = t.entryStartTimes[n], a = r + t.entryTotalTimes[e];
1061
+ return r < i + t.entryTotalTimes[n] && i < a;
1062
+ }
1063
+ let o = e, s = ae;
1064
+ if (o.keyCode === s.Left.code || o.keyCode === s.Right.code) {
1065
+ let n = t.entryLevels[this.selectedEntryIndex], r = this.timelineLevels ? this.timelineLevels[n] : [], i = a(r, this.selectedEntryIndex, (e, t) => e - t);
1066
+ return i += o.keyCode === s.Left.code ? -1 : 1, e.consume(!0), i >= 0 && i < r.length && this.dispatchEventToListeners("EntrySelected", r[i]), !0;
1067
+ }
1068
+ if (o.keyCode === s.Up.code || o.keyCode === s.Down.code) {
1069
+ let e = t.entryLevels[this.selectedEntryIndex];
1070
+ if (e += o.keyCode === s.Up.code ? -1 : 1, e < 0 || this.timelineLevels && e >= this.timelineLevels.length) return this.deselectAllEntries(), o.consume(!0), !0;
1071
+ let a = t.entryStartTimes[this.selectedEntryIndex] + t.entryTotalTimes[this.selectedEntryIndex] / 2, c = this.timelineLevels ? this.timelineLevels[e] : [], l = n(c, a, r) - 1;
1072
+ return !i(this.selectedEntryIndex, c[l]) && (++l, l >= c.length || !i(this.selectedEntryIndex, c[l])) ? o.code === "ArrowDown" ? !1 : (this.deselectAllEntries(), o.consume(!0), !0) : (o.consume(!0), this.dispatchEventToListeners("EntrySelected", c[l]), !0);
1073
+ }
1074
+ return e.key === "Enter" ? (e.consume(!0), this.dispatchEventToListeners("EntryInvoked", this.selectedEntryIndex), this.dispatchEventToListeners("EntryLabelAnnotationAdded", {
1075
+ entryIndex: this.selectedEntryIndex,
1076
+ withLinkCreationButton: !0
1077
+ }), !0) : !1;
1078
+ }
1079
+ coordinatesToEntryIndex(e, t) {
1080
+ if (e < 0 || t < 0) return -1;
1081
+ let r = this.timelineData();
1082
+ if (!r) return -1;
1083
+ if (t += this.chartViewport.scrollOffset(), !this.visibleLevelOffsets || !this.visibleLevelHeights || !this.visibleLevels) throw Error("No visible level offsets or heights");
1084
+ let i = -1;
1085
+ for (let e = 0; e < this.dataProvider.maxStackDepth(); e++) if (t >= this.visibleLevelOffsets[e] && t < this.visibleLevelOffsets[e] + (this.visibleLevels[e] ? this.visibleLevelHeights[e] : 0)) {
1086
+ i = e;
1087
+ break;
1088
+ }
1089
+ if (i < 0 || !this.visibleLevels[i] || t - this.visibleLevelOffsets[i] > this.levelHeight(i)) return -1;
1090
+ for (let [t, n] of this.customDrawnPositions) if (r.entryLevels[t] === i && n.x <= e && e < n.x + n.width) return t;
1091
+ for (let [t, n] of this.markerPositions) if (r.entryLevels[t] === i && n.x <= e && e < n.x + n.width) return t;
1092
+ let a = r.entryStartTimes, o = this.timelineLevels ? this.timelineLevels[i] : [];
1093
+ if (!o?.length) return -1;
1094
+ let s = this.chartViewport.pixelToTime(e), c = Math.max(n(o, s, (e, t) => e - a[t]) - 1, 0);
1095
+ function l(t) {
1096
+ if (t === void 0 || !r) return !1;
1097
+ let n = a[t], i = r.entryTotalTimes[t], o = this.chartViewport.timeToPosition(n), s = this.chartViewport.timeToPosition(n + i);
1098
+ return o - this.hitMarginPx < e && e < s + this.hitMarginPx;
1099
+ }
1100
+ let u = o[c];
1101
+ return l.call(this, u) || (u = o[c + 1], l.call(this, u)) ? u : -1;
1102
+ }
1103
+ isMouseOverRevealChildrenArrow(e, t) {
1104
+ if (!this.entryHasDecoration(t, "HIDDEN_DESCENDANTS_ARROW")) return !1;
1105
+ let n = this.timelineData();
1106
+ if (!n) return !1;
1107
+ let r = n.entryStartTimes[t], i = n.entryTotalTimes[t], a = this.chartViewport.timeToPosition(r + i);
1108
+ return a - this.#L(n, t) - this.hitMarginPx < e && e < a + this.hitMarginPx;
1109
+ }
1110
+ entryIndexToCoordinates(e) {
1111
+ let t = this.timelineData(), { x: n, y: r } = this.canvas.getBoundingClientRect();
1112
+ return !t || !this.visibleLevelOffsets ? null : {
1113
+ x: this.chartViewport.timeToPosition(t.entryStartTimes[e]) + n,
1114
+ y: this.visibleLevelOffsets[t.entryLevels[e]] - this.chartViewport.scrollOffset() + r
1115
+ };
1116
+ }
1117
+ entryTitle(e) {
1118
+ return this.dataProvider.entryTitle(e);
1119
+ }
1120
+ getCanvasOffset() {
1121
+ return this.canvas.getBoundingClientRect();
1122
+ }
1123
+ getCanvas() {
1124
+ return this.canvas;
1125
+ }
1126
+ getScrollOffset() {
1127
+ return this.chartViewport.scrollOffset();
1128
+ }
1129
+ getContextMenu() {
1130
+ return this.contextMenu;
1131
+ }
1132
+ coordinatesToGroupIndexAndHoverType(e, t) {
1133
+ if (!this.rawTimelineData?.groups || !this.groupOffsets || e < 0 || t < 0) return {
1134
+ groupIndex: -1,
1135
+ hoverType: "ERROR"
1136
+ };
1137
+ t += this.chartViewport.scrollOffset();
1138
+ let n = this.rawTimelineData.groups || [];
1139
+ if (this.#i) {
1140
+ let r = this.#T(this.#i);
1141
+ if (r.length !== n.length) return console.warn("The data from the group tree doesn't match the data from DataProvider."), {
1142
+ groupIndex: -1,
1143
+ hoverType: "ERROR"
1144
+ };
1145
+ r.push(n.length);
1146
+ for (let i = 0; i < r.length; i++) {
1147
+ let a = r[i], o = r[i + 1] ?? r.length;
1148
+ if (t >= this.groupOffsets[a] && t < this.groupOffsets[o]) {
1149
+ let r = this.context;
1150
+ r.save(), r.font = this.#n;
1151
+ let i = V + (this.#o ? Dt : 0) + this.labelWidthForGroup(r, n[a]);
1152
+ r.restore();
1153
+ let o = t >= this.groupOffsets[a] && t < this.groupOffsets[a] + n[a].style.height;
1154
+ if (this.#o) {
1155
+ if (o) {
1156
+ if (wt <= e && e < 22) return {
1157
+ groupIndex: a,
1158
+ hoverType: "TRACK_CONFIG_UP_BUTTON"
1159
+ };
1160
+ if (Tt <= e && e < 41) return {
1161
+ groupIndex: a,
1162
+ hoverType: "TRACK_CONFIG_DOWN_BUTTON"
1163
+ };
1164
+ if (Et <= e && e < 60) return {
1165
+ groupIndex: a,
1166
+ hoverType: n[a].hidden ? "TRACK_CONFIG_SHOW_BUTTON" : "TRACK_CONFIG_HIDE_BUTTON"
1167
+ };
1168
+ if (o && e <= i) return {
1169
+ groupIndex: a,
1170
+ hoverType: "INSIDE_TRACK_HEADER"
1171
+ };
1172
+ }
1173
+ } else return o && e <= i ? {
1174
+ groupIndex: a,
1175
+ hoverType: "INSIDE_TRACK_HEADER"
1176
+ } : {
1177
+ groupIndex: a,
1178
+ hoverType: "INSIDE_TRACK"
1179
+ };
1180
+ }
1181
+ }
1182
+ }
1183
+ return {
1184
+ groupIndex: -1,
1185
+ hoverType: "OUTSIDE_TRACKS"
1186
+ };
1187
+ }
1188
+ enterTrackConfigurationMode() {
1189
+ if (!this.#k()) return;
1190
+ let e = document.createElement("div");
1191
+ e.classList.add("flame-chart-edit-confirm");
1192
+ let t = new he();
1193
+ t.data = {
1194
+ variant: v.PRIMARY,
1195
+ jslogContext: "track-configuration-exit"
1196
+ }, t.innerText = B(z.exitTrackConfigurationMode), e.appendChild(t), t.addEventListener("click", () => {
1197
+ this.#N();
1198
+ }), this.viewportElement.appendChild(e), this.#o = !0, this.dispatchEventToListeners("TracksReorderStateChange", !0), this.updateLevelPositions(), this.draw(), this.scrollGroupIntoView(0);
1199
+ }
1200
+ #M() {
1201
+ let e = this.viewportElement.querySelector(".flame-chart-edit-confirm");
1202
+ e && this.viewportElement.removeChild(e);
1203
+ }
1204
+ #N() {
1205
+ this.#M(), this.#o = !1, this.dispatchEventToListeners("TracksReorderStateChange", !1), this.updateLevelPositions(), this.draw();
1206
+ }
1207
+ markerIndexBeforeTime(e) {
1208
+ let t = this.timelineData();
1209
+ if (!t) throw Error("No timeline data");
1210
+ if (!t.markers) throw Error("No timeline markers");
1211
+ return a(t.markers, e, (e, t) => e - t.startTime());
1212
+ }
1213
+ draw() {
1214
+ let e = this.timelineData();
1215
+ if (!e) return;
1216
+ this.resetCanvas(), this.dispatchEventToListeners("LatestDrawDimensions", {
1217
+ chart: {
1218
+ widthPixels: this.offsetWidth,
1219
+ heightPixels: this.offsetHeight,
1220
+ scrollOffsetPixels: this.chartViewport.scrollOffset(),
1221
+ allGroupsCollapsed: this.rawTimelineData?.groups.every((e) => !e.expanded) ?? !0
1222
+ },
1223
+ traceWindow: Ke(this.minimumBoundary(), this.maximumBoundary())
1224
+ });
1225
+ let t = this.offsetWidth, n = this.offsetHeight, r = this.context;
1226
+ r.save();
1227
+ let i = window.devicePixelRatio, a = this.chartViewport.scrollOffset();
1228
+ r.scale(i, i), r.fillStyle = "rgba(0, 0, 0, 0)", r.fillRect(0, 0, t, n), r.translate(0, -a), r.font = this.#n;
1229
+ let { markerIndices: o, drawBatches: s, titleIndices: c } = this.getDrawBatches(r, e);
1230
+ for (let [{ color: t, outline: n }, { indexes: i }] of s) this.#P(r, e, t, i, n);
1231
+ this.#o || (this.#z(r, e), this.drawMarkers(r, e, o)), this.drawEventTitles(r, e, c, t);
1232
+ let l = Array.from(s.values()).map((e) => e.indexes).flat();
1233
+ this.#F(r, e, l), r.restore(), this.drawGroupHeaders(t, n), this.drawFlowEvents(r, e), this.drawMarkerLines();
1234
+ let u = R.calculateGridOffsets(this), d = this.dataProvider.mainFrameNavigationStartEvents?.() || [], f = 0;
1235
+ R.drawCanvasGrid(r, u), this.rulerEnabled && R.drawCanvasHeaders(r, u, (e) => {
1236
+ if (d.length === 0) return this.formatValue(e, u.precision);
1237
+ if (d.length > f + 1) {
1238
+ let t = d[f + 1], n = A(t.ts);
1239
+ e > n && f++;
1240
+ }
1241
+ let t = d[f];
1242
+ if (t) {
1243
+ let n = A(t.ts);
1244
+ e -= n - this.zeroTime();
1245
+ }
1246
+ return this.formatValue(e, u.precision);
1247
+ }, 3, 15), this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex), this.updateElementPosition(this.selectedElement, this.selectedEntryIndex), this.#a !== null && this.showPopoverForSearchResult(this.#a), this.updateMarkerHighlight();
1248
+ }
1249
+ #P(e, t, n, r, i) {
1250
+ e.save(), e.beginPath();
1251
+ for (let n = 0; n < r.length; ++n) {
1252
+ let i = r[n];
1253
+ this.#u.has(i) || this.#I(e, t, i);
1254
+ }
1255
+ i && (e.strokeStyle = `color-mix(in srgb, ${n}, ${M.instance().getComputedValue("--ref-palette-neutral10")} 60%)`, e.stroke()), e.fillStyle = n, e.fill(), e.restore();
1256
+ }
1257
+ #F(e, t, n) {
1258
+ let { entryTotalTimes: r, entryStartTimes: i, entryLevels: a } = t;
1259
+ e.save();
1260
+ for (let o = 0; o < n.length; ++o) {
1261
+ let s = n[o], c = t.entryDecorations.at(s);
1262
+ if (!c || c.length < 1) continue;
1263
+ c.length > 1 && zt(c);
1264
+ let l = i[s], u = r[s], d = this.timeToPositionClipped(l), f = a[s], p = this.#L(t, s), h = this.levelToOffset(f), g = this.#R(t, s);
1265
+ for (let n of c) switch (n.type) {
1266
+ case "CANDY": {
1267
+ let r = A(n.startAtTime);
1268
+ if (u < r) continue;
1269
+ if (!this.candyStripePattern || !this.candyStripePatternGray) {
1270
+ let e = "rgba(255, 0, 0, 0.8)";
1271
+ this.candyStripePattern = this.createCandyStripePattern(e);
1272
+ let t = m(e)?.asLegacyColor().grayscale().asString() ?? "lightgrey";
1273
+ this.candyStripePatternGray = this.createCandyStripePattern(t);
1274
+ }
1275
+ e.save(), e.beginPath();
1276
+ let i = this.timeToPositionClipped(l + r), a = this.timeToPositionClipped(l + u);
1277
+ this.#I(e, t, s, {
1278
+ startX: i,
1279
+ width: a - i
1280
+ }), e.fillStyle = this.#m(s) ? this.candyStripePatternGray : this.candyStripePattern, e.fill(), e.restore();
1281
+ break;
1282
+ }
1283
+ case "WARNING_TRIANGLE": {
1284
+ let t = d + g;
1285
+ if (n.customEndTime !== void 0) {
1286
+ let e = A(n.customEndTime);
1287
+ t = this.timeToPositionClipped(e), g = t - d;
1288
+ }
1289
+ let r = 8;
1290
+ if (n.customStartTime !== void 0) {
1291
+ let e = A(n.customStartTime), i = this.timeToPositionClipped(e);
1292
+ r = Math.min(t - i, 8);
1293
+ }
1294
+ e.save(), e.beginPath(), e.rect(d, h, g, p), e.clip(), e.beginPath(), e.fillStyle = this.#_(s, "red"), e.moveTo(d + g - r, h), e.lineTo(d + g, h), e.lineTo(d + g, h + 8), e.fill(), e.restore();
1295
+ break;
1296
+ }
1297
+ case "HIDDEN_DESCENDANTS_ARROW":
1298
+ if (e.save(), e.beginPath(), e.rect(d, h, g, p), g > p * 2) {
1299
+ e.clip(), e.beginPath(), e.fillStyle = "#474747";
1300
+ let t = d + g - 7 - 5, n = h + 6;
1301
+ e.moveTo(t, n);
1302
+ let r = d + g - 5, i = h + 6;
1303
+ e.lineTo(r, i);
1304
+ let a = d + g - 5 - 7 / 2, o = h + p - 6;
1305
+ e.lineTo(a, o);
1306
+ } else e.clip(), e.beginPath(), e.fillStyle = "#474747", e.moveTo(d + g - 8, h + p), e.lineTo(d + g, h + p), e.lineTo(d + g, h + 8);
1307
+ e.fill(), e.restore();
1308
+ break;
1309
+ }
1310
+ }
1311
+ e.restore();
1312
+ }
1313
+ #I(e, t, n, r) {
1314
+ let { entryTotalTimes: i, entryStartTimes: a, entryLevels: o } = t, s = i[n];
1315
+ if (isNaN(s)) return;
1316
+ let c = a[n], l = r?.startX ?? this.timeToPositionClipped(c), u = o[n], d = this.#L(t, n), f = this.levelToOffset(u), p = r?.width ?? this.#R(t, n);
1317
+ p !== 0 && e.rect(l, f, p - .5, d - 1);
1318
+ }
1319
+ #L(e, t) {
1320
+ let { entryLevels: n } = e, r = n[t];
1321
+ return this.levelHeight(r);
1322
+ }
1323
+ entryWidth(e) {
1324
+ let t = this.timelineData();
1325
+ return t ? this.#R(t, e) : 0;
1326
+ }
1327
+ #R(e, t) {
1328
+ let { entryTotalTimes: n, entryStartTimes: r } = e, i = n[t], a = r[t], o = this.timeToPositionClipped(a), s = this.timeToPositionClipped(a + i);
1329
+ return Math.max(s - o, 1);
1330
+ }
1331
+ getDrawBatches(e, t) {
1332
+ let n = [], r = [], { entryTotalTimes: i, entryStartTimes: o } = t, s = this.chartViewport.scrollOffset(), c = 2 * this.textPadding + k(e, "…"), l = this.chartViewport.pixelToTimeOffset(c), u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), f = (e, t) => {
1333
+ let n = t ? u : d, r = n.get(e);
1334
+ if (r) return r;
1335
+ let i = {
1336
+ color: e,
1337
+ outline: t
1338
+ };
1339
+ return n.set(e, i), i;
1340
+ }, p = /* @__PURE__ */ new Map();
1341
+ for (let e = 0; e < this.dataProvider.maxStackDepth(); ++e) {
1342
+ if (this.levelToOffset(e) + this.levelHeight(e) < s || this.levelToOffset(e) > s + this.offsetHeight || !this.visibleLevels?.[e]) continue;
1343
+ if (!this.timelineLevels) break;
1344
+ let t = this.timelineLevels[e], c = a(t, this.chartViewport.windowRightTime(), (e, t) => e - o[t]) - 1, u = Infinity;
1345
+ for (let a = c; a >= 0; --a) {
1346
+ let s = t[a], c = i[s];
1347
+ if (isNaN(c)) {
1348
+ r.push(s);
1349
+ continue;
1350
+ }
1351
+ (c >= l || this.forceDecorationCache?.[s]) && n.push(s);
1352
+ let d = o[s], m = d + c, h = !!this.dataProvider.forceDrawableLevel?.(e);
1353
+ if (m <= this.chartViewport.windowLeftTime() && !h) break;
1354
+ let g = this.timeToPositionClipped(d);
1355
+ if (!(g >= u) && (u = g, this.entryColorsCache)) {
1356
+ let e = f(this.getColorForEntry(s), this.#h(s)), t = p.get(e);
1357
+ t || (t = { indexes: [] }, p.set(e, t)), t.indexes.push(s);
1358
+ }
1359
+ }
1360
+ }
1361
+ return {
1362
+ drawBatches: p,
1363
+ titleIndices: n,
1364
+ markerIndices: r
1365
+ };
1366
+ }
1367
+ drawGroupHeaders(e, t) {
1368
+ let n = this.context, r = this.chartViewport.scrollOffset(), i = window.devicePixelRatio;
1369
+ if (!this.rawTimelineData) return;
1370
+ let a = this.rawTimelineData.groups || [];
1371
+ if (!a.length) return;
1372
+ let o = this.groupOffsets;
1373
+ if (o == null) return;
1374
+ let s = o[o.length - 1];
1375
+ n.save(), n.scale(i, i), n.translate(0, -r), n.font = this.#n, n.fillStyle = M.instance().getComputedValue("--sys-color-cdt-base-container"), this.forEachGroupInViewport((t, r, i) => {
1376
+ let a = i.style.padding;
1377
+ a < 5 || n.fillRect(0, t - a + 2, e, a - 4);
1378
+ }), a.length && s < r + t && n.fillRect(0, s + 2, e, r + t - s), n.strokeStyle = M.instance().getComputedValue("--sys-color-neutral-container"), n.beginPath(), this.forEachGroupInViewport((t, r, i, a) => {
1379
+ a || i.style.padding < 4 || ct(n, e, t - 2.5);
1380
+ }), ct(n, e, s + 1.5), n.stroke(), this.forEachGroupInViewport((t, r, i) => {
1381
+ if (i.style.useFirstLineForOverview) return;
1382
+ if (!this.isGroupCollapsible(r) || i.expanded) {
1383
+ !i.style.shareHeaderLine && this.isGroupFocused(r) && (n.fillStyle = i.style.backgroundColor, n.fillRect(0, t, e, i.style.height));
1384
+ return;
1385
+ }
1386
+ let o = r + 1;
1387
+ for (; o < a.length && a[o].style.nestingLevel > i.style.nestingLevel;) o++;
1388
+ let s = o < a.length ? a[o].startLevel : this.dataProvider.maxStackDepth();
1389
+ this.drawCollapsedOverviewForGroup(i, t, s);
1390
+ }), n.save();
1391
+ let c = a.length > 1, l = this.#o ? Dt : 0;
1392
+ this.forEachGroupInViewport((e, t, r) => {
1393
+ if (n.font = this.#n, this.isGroupCollapsible(t) && !r.expanded || r.style.shareHeaderLine) {
1394
+ let t = this.labelWidthForGroup(n, r), i = m(r.style.backgroundColor);
1395
+ i && (n.fillStyle = i.setAlpha(.8).asString()), n.fillRect(l + V, e + St, t, r.style.height - 2 * St);
1396
+ }
1397
+ n.fillStyle = this.#o && r.hidden ? M.instance().getComputedValue("--sys-color-token-subtle", this.contentElement) : r.style.color;
1398
+ let i = l + bt * (r.style.nestingLevel + 1) + 8 / 2 + xt, a = e + r.style.height - this.textBaseline;
1399
+ if (n.fillText(r.name, i, a), r.subtitle) {
1400
+ let e = n.measureText(r.name);
1401
+ n.font = this.#r, n.fillText(r.subtitle, i + e.width + Ct, a - 1), n.font = this.#n;
1402
+ }
1403
+ if (this.#o && r.hidden && n.fillRect(i, e + r.style.height / 2, k(n, r.name), 1), c && this.#o) {
1404
+ let i = r.hidden ? "--sys-color-token-subtle" : "--sys-color-on-surface";
1405
+ r.style.nestingLevel === 0 && (ut(n, wt, e, 16, Ot, i), ut(n, Tt, e, 16, kt, i)), ut(n, Et, e, 16, r.hidden ? jt : At, this.groupIsLastVisibleTopLevel(t) ? "--sys-color-state-disabled" : i);
1406
+ }
1407
+ }), n.restore(), n.fillStyle = M.instance().getComputedValue("--sys-color-token-subtle"), this.forEachGroupInViewport((e, t, r) => {
1408
+ this.isGroupCollapsible(t) && lt(n, l + bt * (r.style.nestingLevel + 1), e + r.style.height - this.textBaseline - 8 / 2, this.#o ? !1 : !!r.expanded);
1409
+ }), n.strokeStyle = M.instance().getComputedValue("--sys-color-neutral-outline"), n.beginPath(), n.stroke(), this.forEachGroupInViewport((e, t, r, i, a) => {
1410
+ this.isGroupFocused(t) && (n.fillStyle = M.instance().getComputedValue("--selected-group-border", this.contentElement), n.fillRect(0, e - 2, 2, a - r.style.padding + 4), n.fillRect(0, e - 2, 10, 2), n.fillRect(0, e + a - r.style.padding, 10, 2));
1411
+ }), n.restore();
1412
+ }
1413
+ drawMarkers(e, t, n) {
1414
+ let { entryStartTimes: r, entryLevels: i } = t;
1415
+ this.markerPositions.clear(), e.textBaseline = "alphabetic", e.save(), e.beginPath();
1416
+ let a = -1, o = -Infinity;
1417
+ for (let t = n.length - 1; t >= 0; --t) {
1418
+ let s = n[t], c = this.entryTitle(s);
1419
+ if (!c) continue;
1420
+ let l = r[s], u = i[s];
1421
+ a !== u && (o = -Infinity);
1422
+ let d = Math.max(this.chartViewport.timeToPosition(l), o), f = this.levelToOffset(u), p = this.levelHeight(u), m = Math.ceil(k(e, c)) + 8;
1423
+ o = d + m + 1, a = u, this.markerPositions.set(s, {
1424
+ x: d,
1425
+ width: m
1426
+ }), e.fillStyle = this.getColorForEntry(s), e.fillRect(d, f, m, p - 1), e.fillStyle = "white", e.fillText(c, d + 4, f + p - this.textBaseline);
1427
+ }
1428
+ e.strokeStyle = "rgba(0, 0, 0, 0.2)", e.stroke(), e.restore();
1429
+ }
1430
+ #z(e, t) {
1431
+ let { entryStartTimes: n, entryTotalTimes: r, entryLevels: i } = t;
1432
+ this.customDrawnPositions.clear(), e.save();
1433
+ let a = [];
1434
+ for (let [t, o] of this.#u.entries()) {
1435
+ let s = n[t], c = r[t], l = i[t];
1436
+ if (this.dataProvider.groupForEvent?.(t)?.hidden) continue;
1437
+ let u = this.chartViewport.timeToPosition(s), d = this.chartViewport.timeToPosition(s + c), f = u, p = this.levelToOffset(l), m = this.levelHeight(l), h = o(e, f, p, d - u, m, (e) => this.chartViewport.timeToPosition(e), (e) => this.#_(t, e));
1438
+ a.push({
1439
+ entryIndex: t,
1440
+ pos: h
1441
+ });
1442
+ }
1443
+ a.sort((e, t) => (t.pos.z ?? 0) - (e.pos.z ?? 0));
1444
+ for (let { entryIndex: e, pos: t } of a) this.customDrawnPositions.set(e, t);
1445
+ e.restore();
1446
+ }
1447
+ drawEventTitles(e, t, n, r) {
1448
+ let i = this.chartViewport.timeToPixel(), a = this.textPadding;
1449
+ e.save(), e.beginPath();
1450
+ let { entryStartTimes: o, entryLevels: s } = t;
1451
+ for (let c = 0; c < n.length; ++c) {
1452
+ let l = n[c], u = o[l], d = this.timeToPositionClipped(u), f = Math.min(this.#R(t, l), r), p = s[l], m = this.levelToOffset(p), h = this.dataProvider.entryTitle(l), g = this.#L(t, l);
1453
+ if (h?.length) {
1454
+ e.font = this.#n;
1455
+ let t = this.entryHasDecoration(l, "HIDDEN_DESCENDANTS_ARROW") && f > g * 2 ? f - a - this.barHeight : f - 2 * a;
1456
+ h = Fe(e, h, t);
1457
+ }
1458
+ let _ = this.chartViewport.timeToPosition(u);
1459
+ this.dataProvider.decorateEntry(l, e, h, d, m, f, g, _, i, (e) => this.#_(l, e)) || h?.length && (e.fillStyle = this.#_(l, this.dataProvider.textColor(l)), e.fillText(h, d + a, m + g - this.textBaseline));
1460
+ }
1461
+ e.restore();
1462
+ }
1463
+ forEachGroup(e) {
1464
+ if (!this.rawTimelineData) return;
1465
+ let t = this.rawTimelineData.groups || [];
1466
+ if (!t.length) return;
1467
+ let n = this.groupOffsets;
1468
+ if (!n) return;
1469
+ let r = [{
1470
+ nestingLevel: -1,
1471
+ visible: !0
1472
+ }];
1473
+ for (let i = 0; i < t.length; ++i) {
1474
+ let a = n[i], o = t[i], s = !0, c = r[r.length - 1];
1475
+ for (; c && c.nestingLevel >= o.style.nestingLevel;) r.pop(), s = !1, c = r[r.length - 1];
1476
+ c = r[r.length - 1];
1477
+ let l = c ? c.visible : !1, u = !o.hidden && l && (!this.isGroupCollapsible(i) || o.expanded);
1478
+ if (r.push({
1479
+ nestingLevel: o.style.nestingLevel,
1480
+ visible: !!u
1481
+ }), !this.#i) return;
1482
+ let d = [];
1483
+ function f(e) {
1484
+ d.push(e.index);
1485
+ for (let t of e.children) f(t);
1486
+ }
1487
+ if (f(this.#i), d.shift(), d.length !== t.length) {
1488
+ console.warn("The data from the group tree doesn't match the data from DataProvider.");
1489
+ return;
1490
+ }
1491
+ d.push(t.length);
1492
+ let p = n[d[d.indexOf(i) + 1]];
1493
+ !this.#o && (!l || o.hidden) || e(a, i, o, s, p - a);
1494
+ }
1495
+ }
1496
+ forEachGroupInViewport(e) {
1497
+ let t = this.chartViewport.scrollOffset();
1498
+ this.forEachGroup((n, r, i, a, o) => {
1499
+ n - i.style.padding > t + this.offsetHeight || n + o < t || e(n, r, i, a, o);
1500
+ });
1501
+ }
1502
+ labelWidthForGroup(e, t) {
1503
+ return bt * (t.style.nestingLevel + 1) + 8 / 2 + xt + k(e, t.name) + xt - V;
1504
+ }
1505
+ drawCollapsedOverviewForGroup(e, t, n) {
1506
+ let r = new g(h), i = this.chartViewport.windowLeftTime(), o = this.chartViewport.windowRightTime(), c = this.context, l = e.style.height;
1507
+ if (!this.rawTimelineData) return;
1508
+ let u = this.rawTimelineData.entryStartTimes, d = this.rawTimelineData.entryTotalTimes, f = this.chartViewport.timeToPixel();
1509
+ for (let p = e.startLevel; p < n; ++p) {
1510
+ let n = this.timelineLevels ? this.timelineLevels[p] : [], m = a(n, o, (e, t) => e - u[t]) - 1, h = Infinity;
1511
+ for (let a = m; a >= 0; --a) {
1512
+ let o = n[a], p = u[o], m = this.timeToPositionClipped(p), g = p + d[o];
1513
+ if (isNaN(g) || m >= h) continue;
1514
+ if (g <= i) break;
1515
+ h = m;
1516
+ let _ = this.getColorForEntry(o), v = this.timeToPositionClipped(g);
1517
+ if (e.style.useDecoratorsForOverview && this.dataProvider.forceDecoration(o)) {
1518
+ let e = this.chartViewport.timeToPosition(p), n = this.#R(this.rawTimelineData, o);
1519
+ c.beginPath(), c.fillStyle = _, c.fillRect(m, t, n, l - 1), this.dataProvider.decorateEntry(o, c, "", m, t, n, l, e, f, (e) => this.#_(o, e));
1520
+ continue;
1521
+ }
1522
+ r.append(new s(m, v, _));
1523
+ }
1524
+ }
1525
+ let p = r.segments().slice().sort((e, t) => e.data.localeCompare(t.data)), m;
1526
+ c.beginPath();
1527
+ for (let e = 0; e < p.length; ++e) {
1528
+ let n = p[e];
1529
+ m !== p[e].data && (c.fill(), c.beginPath(), m = p[e].data, c.fillStyle = m), c.rect(n.begin, t, n.end - n.begin, l);
1530
+ }
1531
+ c.fill();
1532
+ function h(e, t) {
1533
+ return e.data === t.data && e.end + .4 > t.end ? e : null;
1534
+ }
1535
+ }
1536
+ drawFlowEvents(e, t) {
1537
+ let n = this.timelineData();
1538
+ if (!n) return;
1539
+ let { entryTotalTimes: r, entryStartTimes: i, entryLevels: a } = t, o = window.devicePixelRatio, s = this.chartViewport.scrollOffset();
1540
+ e.save(), e.scale(o, o), e.translate(0, -s);
1541
+ let c = M.instance().getComputedValue("--sys-color-on-surface-subtle");
1542
+ e.fillStyle = c, e.strokeStyle = c;
1543
+ for (let o = 0; o < n.initiatorsData.length; ++o) {
1544
+ let s = n.initiatorsData[o], c = i[s.initiatorIndex], l = i[s.initiatorIndex] + r[s.initiatorIndex], u = i[s.eventIndex], d = l < u, f = d ? l : Math.max(c, this.chartViewport.pixelToTime(5)), p = u;
1545
+ if (p < this.chartViewport.windowLeftTime()) continue;
1546
+ let m = this.chartViewport.timeToPosition(f), h = this.chartViewport.timeToPosition(p);
1547
+ if (s.isInitiatorHidden) {
1548
+ let { circleEndX: n } = this.drawCircleAroundCollapseArrow(s.initiatorIndex, e, t);
1549
+ n && (m = n);
1550
+ }
1551
+ if (s.isEntryHidden) {
1552
+ let { circleStartX: n } = this.drawCircleAroundCollapseArrow(s.eventIndex, e, t);
1553
+ n && (h = n);
1554
+ }
1555
+ let g = a[s.initiatorIndex], _ = a[s.eventIndex], v = this.levelToOffset(g) + this.levelHeight(g) / 2, y = this.levelToOffset(_) + this.levelHeight(_) / 2, b = h - m;
1556
+ e.lineWidth = 1, e.shadowColor = "rgba(0, 0, 0, 0.3)", e.shadowOffsetX = 2, e.shadowOffsetY = 2, e.shadowBlur = 3, b > 3 && (e.beginPath(), e.moveTo(h, y), e.lineTo(h - 6, y - 3), e.lineTo(h - 6, y + 3), e.fill()), d ? (e.beginPath(), e.moveTo(m, v), e.lineTo(m + b / 2, v), e.lineTo(m + b / 2, y), e.lineTo(h, y), e.stroke()) : (e.beginPath(), e.moveTo(m, v), e.lineTo(m, y), e.lineTo(h, y), e.stroke());
1557
+ }
1558
+ e.restore();
1559
+ }
1560
+ drawCircleAroundCollapseArrow(e, t, n) {
1561
+ if (!n.entryDecorations.at(e)?.find((e) => e.type === "HIDDEN_DESCENDANTS_ARROW")) return {};
1562
+ let { entryStartTimes: r, entryLevels: i } = n, a = this.#R(n, e);
1563
+ if (a < this.barHeight * 2) return {};
1564
+ let o = r[e], s = this.timeToPositionClipped(o), c = i[e], l = this.#L(n, e), u = this.levelToOffset(c);
1565
+ t.save(), t.beginPath(), t.rect(s, u, a, l), t.clip(), t.lineWidth = 1, t.beginPath(), t.fillStyle = "#474747";
1566
+ let d = s + a - this.barHeight / 2, f = u + this.barHeight / 2;
1567
+ return t.beginPath(), t.arc(d, f, 6, 0, 2 * Math.PI), t.stroke(), t.restore(), {
1568
+ circleStartX: d - 6,
1569
+ circleEndX: d + 6
1570
+ };
1571
+ }
1572
+ drawMarkerLines() {
1573
+ let e = this.timelineData();
1574
+ if (!e) return;
1575
+ let t = e.markers, n = this.markerIndexBeforeTime(this.minimumBoundary()), r = this.maximumBoundary(), i = this.chartViewport.timeToPixel(), a = this.context;
1576
+ a.save();
1577
+ let o = window.devicePixelRatio;
1578
+ a.scale(o, o), a.translate(0, 3);
1579
+ for (let e = n; e < t.length; e++) {
1580
+ let n = t[e].startTime();
1581
+ if (n > r) break;
1582
+ t[e].draw(a, this.chartViewport.timeToPosition(n), 14, i);
1583
+ }
1584
+ a.restore();
1585
+ }
1586
+ updateMarkerHighlight() {
1587
+ let e = this.markerHighlighElement;
1588
+ e.parentElement && e.remove();
1589
+ let t = this.highlightedMarkerIndex;
1590
+ if (t === -1) return;
1591
+ let n = this.timelineData();
1592
+ if (!n) return;
1593
+ let r = n.markers[t], i = this.timeToPositionClipped(r.startTime());
1594
+ w.install(e, r.title() || "");
1595
+ let a = e.style;
1596
+ a.left = i + "px", a.backgroundColor = r.color(), this.viewportElement.appendChild(e);
1597
+ }
1598
+ processTimelineData(e) {
1599
+ if (!e) {
1600
+ this.timelineLevels = null, this.visibleLevelOffsets = null, this.visibleLevels = null, this.groupOffsets = null, this.rawTimelineData = null, this.forceDecorationCache = null, this.entryColorsCache = null, this.dimIndices = null, this.colorDimmingCache.clear(), this.rawTimelineDataLength = 0, this.#i = null, this.selectedGroupIndex = -1, this.keyboardFocusedGroup = -1, this.flameChartDelegate.updateSelectedGroup(this, null);
1601
+ return;
1602
+ }
1603
+ this.rawTimelineData = e, this.rawTimelineDataLength = e.entryStartTimes.length, this.forceDecorationCache = Array(this.rawTimelineDataLength), this.entryColorsCache = Array(this.rawTimelineDataLength), this.#u.clear();
1604
+ for (let e = 0; e < this.rawTimelineDataLength; ++e) {
1605
+ this.forceDecorationCache[e] = this.dataProvider.forceDecoration(e) ?? !1, this.entryColorsCache[e] = this.dataProvider.entryColor(e);
1606
+ let t = this.dataProvider.getDrawOverride?.(e);
1607
+ t && this.#u.set(e, t);
1608
+ }
1609
+ let t = new Uint32Array(this.dataProvider.maxStackDepth() + 1);
1610
+ for (let n = 0; n < e.entryLevels.length; ++n) ++t[e.entryLevels[n]];
1611
+ let n = Array(t.length);
1612
+ for (let e = 0; e < n.length; ++e) n[e] = new Uint32Array(t[e]), t[e] = 0;
1613
+ for (let r = 0; r < e.entryLevels.length; ++r) {
1614
+ let i = e.entryLevels[r];
1615
+ n[i][t[i]++] = r;
1616
+ }
1617
+ this.timelineLevels = n;
1618
+ let r = this.rawTimelineData.groups || [];
1619
+ for (let e = 0; e < r.length; ++e) {
1620
+ let t = this.#d?.find((t) => t.trackName === r[e].name), n = t?.expanded ?? r[e].expanded ?? !1, i = t?.hidden ?? r[e].hidden ?? !1;
1621
+ r[e].expanded = n, r[e].hidden = i;
1622
+ }
1623
+ this.#i ? this.updateGroupTree(r, this.#i) : this.#i = this.buildGroupTree(r), this.#d && r.length > 0 && this.#i && this.#d.length === r.length && this.#B(this.#d, this.#i), this.updateLevelPositions(), this.updateHeight(), this.selectedGroupIndex === -1 && (this.selectedGroupIndex = e.selectedGroup ? r.indexOf(e.selectedGroup) : -1), this.keyboardFocusedGroup = this.selectedGroupIndex, this.flameChartDelegate.updateSelectedGroup(this, e.selectedGroup);
1624
+ }
1625
+ #B(e, t) {
1626
+ function n(t) {
1627
+ t.children.length && t.children.sort((t, n) => e[t.index].visualIndex - e[n.index].visualIndex), t.children.forEach(n);
1628
+ }
1629
+ n(t);
1630
+ }
1631
+ #V(e, t, n) {
1632
+ return {
1633
+ index: t,
1634
+ nestingLevel: e.style.nestingLevel,
1635
+ startLevel: e.startLevel,
1636
+ endLevel: n,
1637
+ children: []
1638
+ };
1639
+ }
1640
+ buildGroupTree(e) {
1641
+ let t = {
1642
+ index: -1,
1643
+ nestingLevel: -1,
1644
+ startLevel: 0,
1645
+ endLevel: e.length ? e[0].startLevel : this.dataProvider.maxStackDepth(),
1646
+ children: []
1647
+ }, n = [t];
1648
+ for (let t = 0; t < e.length; t++) {
1649
+ let r = e[t], i = r.style.nestingLevel, a = n[n.length - 1];
1650
+ for (; a && a.nestingLevel >= i;) n.pop(), a = n[n.length - 1];
1651
+ let o = e[t + 1]?.startLevel ?? this.dataProvider.maxStackDepth(), s = this.#V(r, t, o);
1652
+ a.children.push(s), n.push(s);
1653
+ }
1654
+ return t;
1655
+ }
1656
+ updateGroupTree(e, t) {
1657
+ let n = this.dataProvider.maxStackDepth();
1658
+ function r(t) {
1659
+ let i = t.index;
1660
+ if (i < 0) t.startLevel = 0, t.endLevel = e.length ? e[0].startLevel : n;
1661
+ else {
1662
+ if (!e[i]) {
1663
+ console.warn("The |groups| is changed. Please make sure the flamechart is reset after data change in the data provider");
1664
+ return;
1665
+ }
1666
+ t.startLevel = e[i].startLevel, t.endLevel = e[i + 1]?.startLevel ?? n;
1667
+ }
1668
+ for (let e of t.children) r(e);
1669
+ }
1670
+ r(t);
1671
+ }
1672
+ #H(e, t, n) {
1673
+ if (!this.visibleLevels || !this.visibleLevelOffsets || !this.visibleLevelHeights || !this.groupOffsets) return t;
1674
+ let r = this.rawTimelineData?.groups;
1675
+ if (!r) return t;
1676
+ if (e.index >= r.length) return console.warn("The data from the group tree is outdated. Please make sure the flamechart is reset after data change in the data provider"), t;
1677
+ e.index >= 0 && (this.groupOffsets[e.index] = t, (this.#o && r[e.index].name || !r[e.index].hidden && n && !r[e.index].style.shareHeaderLine) && (t += r[e.index].style.height));
1678
+ let i = !1;
1679
+ if (e.index < 0) i = !0;
1680
+ else {
1681
+ let t = !(this.isGroupCollapsible(e.index) && !r[e.index].expanded);
1682
+ i = !r[e.index].hidden && t;
1683
+ }
1684
+ let a = i && n;
1685
+ for (let i = e.startLevel; i < e.endLevel; i++) {
1686
+ if (i >= this.dataProvider.maxStackDepth()) return console.warn("The data from the group tree is outdated. Please make sure the flamechart is reset after data change in the data provider"), t;
1687
+ let o = i === e.startLevel, s;
1688
+ if (e.index < 0) s = !0;
1689
+ else {
1690
+ let t = o && r[e.index].style.useFirstLineForOverview;
1691
+ s = !r[e.index].hidden && n && (a || t);
1692
+ }
1693
+ let c;
1694
+ if (r[e.index]) {
1695
+ let t = o && !r[e.index].style.shareHeaderLine, n = this.isGroupCollapsible(e.index) && !r[e.index].expanded;
1696
+ c = t || n ? r[e.index].style.height : r[e.index].style.itemsHeight ?? this.barHeight;
1697
+ } else c = this.barHeight;
1698
+ this.visibleLevels[i] = this.#o ? !1 : !!s, this.visibleLevelOffsets[i] = t, this.visibleLevelHeights[i] = this.#o ? 0 : c, (e.index < 0 || !r[e.index].hidden && (s || n && r[e.index].style.shareHeaderLine && o)) && (t += this.visibleLevelHeights[i]);
1699
+ }
1700
+ if (e.children.length === 0) return t;
1701
+ for (let n of e.children) (this.#o && r[n.index].name || a && !r[n.index]?.hidden && n !== e.children[0]) && (t += r[n.index].style.padding ?? 0), t = this.#H(n, t, a);
1702
+ return t;
1703
+ }
1704
+ updateLevelPositions() {
1705
+ if (!this.#i) {
1706
+ console.warn("Please make sure the new timeline data is processed before update the level positions.");
1707
+ return;
1708
+ }
1709
+ let e = this.dataProvider.maxStackDepth(), t = this.rawTimelineData?.groups || [];
1710
+ this.visibleLevelOffsets = new Uint32Array(e + 1), this.visibleLevelHeights = new Uint32Array(e), this.visibleLevels = Array(e), this.groupOffsets = new Uint32Array(t.length + 1);
1711
+ let n = this.rulerEnabled ? 17 : 2;
1712
+ n = this.#H(this.#i, n, !0), this.groupOffsets[t.length] = n, this.visibleLevelOffsets[e] = n;
1713
+ }
1714
+ isGroupCollapsible(e) {
1715
+ if (!this.rawTimelineData || e < 0) return;
1716
+ let t = this.rawTimelineData.groups || [], n = t[e].style;
1717
+ if (n.collapsible === 1) return !1;
1718
+ if (!n.shareHeaderLine) return n.collapsible === 0;
1719
+ let r = e + 1 >= t.length;
1720
+ return n.collapsible === 2 && (r ? this.dataProvider.maxStackDepth() : t[e + 1].startLevel) - t[e].startLevel < 2 ? !1 : !r && t[e + 1].style.nestingLevel > n.nestingLevel || (r ? this.dataProvider.maxStackDepth() : t[e + 1].startLevel) !== t[e].startLevel + 1 ? !0 : n.height !== n.itemsHeight;
1721
+ }
1722
+ groupIsLastVisibleTopLevel(e) {
1723
+ if (e < 0 || !this.rawTimelineData) return !0;
1724
+ let t = this.rawTimelineData.groups[e];
1725
+ return this.#i?.children.filter((e) => !this.rawTimelineData?.groups[e.index].hidden).length === 1 && t.style.nestingLevel === 0 && !t.hidden;
1726
+ }
1727
+ setSelectedEntry(e) {
1728
+ this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, e) && this.modifyTree("RESET_CHILDREN", e), this.selectedEntryIndex !== e && (e !== -1 && this.chartViewport.hideRangeSelection(), this.selectedEntryIndex = e, this.revealEntry(e), this.updateElementPosition(this.selectedElement, this.selectedEntryIndex), this.update());
1729
+ }
1730
+ entryHasDecoration(e, t) {
1731
+ let n = this.timelineData();
1732
+ if (!n) return !1;
1733
+ let r = n.entryDecorations.at(e);
1734
+ return r && r.length >= 1 ? r.some((e) => e.type === t) : !1;
1735
+ }
1736
+ getCustomDrawnPositionForEntryIndex(e) {
1737
+ return this.customDrawnPositions.get(e) || (this.markerPositions.get(e) ?? null);
1738
+ }
1739
+ updateElementPosition(e, t, n) {
1740
+ if (!e || (e.classList.add("hidden"), t === -1)) return;
1741
+ let r = this.timelineData();
1742
+ if (!r) return;
1743
+ let i = r.entryStartTimes[t], a = r.entryTotalTimes[t], o = 0, s = 0, c = !0, l = this.customDrawnPositions.get(t);
1744
+ if (l) o = l.x, s = l.width;
1745
+ else if (Number.isNaN(a)) {
1746
+ let e = this.markerPositions.get(t);
1747
+ e ? (o = e.x, s = e.width) : c = !1;
1748
+ } else o = this.chartViewport.timeToPosition(i), s = a * this.chartViewport.timeToPixel();
1749
+ if (o + s <= 0 || o >= this.offsetWidth) return;
1750
+ let u = o + s / 2;
1751
+ s = Math.max(s, 2), o = u - s / 2;
1752
+ let d = r.entryLevels[t], f = this.levelToOffset(d) - this.chartViewport.scrollOffset(), p = this.levelHeight(d), m = e.style;
1753
+ n ? (m.top = f + "px", m.width = p + "px", m.height = p + "px", m.left = o + s - p + "px") : (m.top = f + "px", m.width = s + "px", m.height = p - 1 + "px", m.left = o + "px"), e.classList.toggle("hidden", !c), this.viewportElement.appendChild(e);
1754
+ }
1755
+ updateHiddenChildrenArrowHighlighPosition(e) {
1756
+ this.revealDescendantsArrowHighlightElement.classList.add("hidden"), !(e === -1 || !this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, e)) && this.updateElementPosition(this.revealDescendantsArrowHighlightElement, e, !0);
1757
+ }
1758
+ timeToPositionClipped(e) {
1759
+ return r(this.chartViewport.timeToPosition(e), 0, this.offsetWidth);
1760
+ }
1761
+ groupIndexToOffsetForTest(e) {
1762
+ if (!this.groupOffsets) throw Error("No visible group offsets");
1763
+ return this.groupOffsets[e];
1764
+ }
1765
+ setEditModeForTest(e) {
1766
+ this.#o = e;
1767
+ }
1768
+ levelIsVisible(e) {
1769
+ if (!this.visibleLevels) throw Error("No level visiblibities");
1770
+ return this.visibleLevels[e];
1771
+ }
1772
+ levelToOffset(e) {
1773
+ if (!this.visibleLevelOffsets) throw Error("No visible level offsets");
1774
+ return this.visibleLevelOffsets[e];
1775
+ }
1776
+ levelHeight(e) {
1777
+ if (!this.visibleLevelHeights) throw Error("No visible level heights");
1778
+ return this.visibleLevelHeights[e];
1779
+ }
1780
+ updateBoundaries() {
1781
+ this.totalTime = this.dataProvider.totalTime(), this.#e = this.dataProvider.minimumBoundary(), this.chartViewport.setBoundaries(this.#e, this.totalTime);
1782
+ }
1783
+ updateHeight() {
1784
+ this.chartViewport.setContentHeight(this.totalContentHeight());
1785
+ }
1786
+ totalContentHeight() {
1787
+ return this.levelToOffset(this.dataProvider.maxStackDepth()) + 2;
1788
+ }
1789
+ onResize() {
1790
+ this.#c = null, this.scheduleUpdate();
1791
+ }
1792
+ setPersistedConfig(e) {
1793
+ this.#d = e;
1794
+ }
1795
+ update() {
1796
+ this.timelineData() && (this.updateHeight(), this.updateBoundaries(), this.draw(), this.chartViewport.isDragging() || this.updateHighlight());
1797
+ }
1798
+ reset() {
1799
+ this.#o &&= (this.#M(), !1), this.chartViewport.reset(), this.rawTimelineData = null, this.rawTimelineDataLength = 0, this.#i = null, this.dimIndices = null, this.colorDimmingCache.clear(), this.highlightedMarkerIndex = -1, this.highlightedEntryIndex = -1, this.selectedEntryIndex = -1, this.selectedGroupIndex = -1, this.#d = null;
1800
+ }
1801
+ scheduleUpdate() {
1802
+ this.chartViewport.scheduleUpdate();
1803
+ }
1804
+ enabled() {
1805
+ return this.rawTimelineDataLength !== 0;
1806
+ }
1807
+ computePosition(e) {
1808
+ return this.chartViewport.timeToPosition(e);
1809
+ }
1810
+ formatValue(e, t) {
1811
+ return this.dataProvider.formatValue(e - this.zeroTime(), t);
1812
+ }
1813
+ maximumBoundary() {
1814
+ return j(this.chartViewport.windowRightTime());
1815
+ }
1816
+ minimumBoundary() {
1817
+ return j(this.chartViewport.windowLeftTime());
1818
+ }
1819
+ zeroTime() {
1820
+ return j(this.dataProvider.minimumBoundary());
1821
+ }
1822
+ boundarySpan() {
1823
+ return j(this.maximumBoundary() - this.minimumBoundary());
1824
+ }
1825
+ getDimIndices() {
1826
+ return this.dimIndices || null;
1827
+ }
1828
+ }, It = .5, Lt = /* @__PURE__ */ function(e) {
1829
+ return e.CANDY = "CANDY", e.WARNING_TRIANGLE = "WARNING_TRIANGLE", e.HIDDEN_DESCENDANTS_ARROW = "HIDDEN_DESCENDANTS_ARROW", e;
1830
+ }({}), Rt = {
1831
+ CANDY: 1,
1832
+ WARNING_TRIANGLE: 2,
1833
+ HIDDEN_DESCENDANTS_ARROW: 3
1834
+ };
1835
+ function zt(e) {
1836
+ e.sort((e, t) => Rt[e.type] - Rt[t.type]);
1837
+ }
1838
+ var Bt = class e {
1839
+ entryLevels;
1840
+ entryTotalTimes;
1841
+ entryStartTimes;
1842
+ entryDecorations;
1843
+ groups;
1844
+ markers;
1845
+ initiatorsData;
1846
+ selectedGroup;
1847
+ constructor(e, t, n, r, i = [], a = []) {
1848
+ this.entryLevels = e, this.entryTotalTimes = t, this.entryStartTimes = n, this.entryDecorations = i, this.groups = r || [], this.markers = [], this.initiatorsData = a || [], this.selectedGroup = null;
1849
+ }
1850
+ static create(t) {
1851
+ return new e(t.entryLevels, t.entryTotalTimes, t.entryStartTimes, t.groups, t.entryDecorations || [], t.initiatorsData || []);
1852
+ }
1853
+ static createEmpty() {
1854
+ return new e([], [], [], []);
1855
+ }
1856
+ emptyInitiators() {
1857
+ this.initiatorsData = [];
1858
+ }
1859
+ }, Vt = /* @__PURE__ */ function(e) {
1860
+ return e.CANVAS_FOCUSED = "CanvasFocused", e.ENTRY_INVOKED = "EntryInvoked", e.ENTRY_LABEL_ANNOTATION_ADDED = "EntryLabelAnnotationAdded", e.ENTRIES_LINK_ANNOTATION_CREATED = "EntriesLinkAnnotationCreated", e.TRACKS_REORDER_STATE_CHANGED = "TracksReorderStateChange", e.ENTRY_SELECTED = "EntrySelected", e.ENTRY_HOVERED = "EntryHovered", e.LATEST_DRAW_DIMENSIONS = "LatestDrawDimensions", e.MOUSE_MOVE = "MouseMove", e;
1861
+ }({}), Ht = /* @__PURE__ */ e({ ChartViewport: () => Ut }), Ut = class extends E {
1862
+ delegate;
1863
+ viewportElement;
1864
+ #e;
1865
+ rangeSelectionEnabled;
1866
+ vScrollElement;
1867
+ vScrollContent;
1868
+ selectionOverlay;
1869
+ cursorElement;
1870
+ #t;
1871
+ totalHeight;
1872
+ offsetHeight;
1873
+ scrollTop;
1874
+ rangeSelectionStart;
1875
+ rangeSelectionEnd;
1876
+ dragStartPointX;
1877
+ dragStartPointY;
1878
+ dragStartScrollTop;
1879
+ visibleLeftTime;
1880
+ visibleRightTime;
1881
+ offsetWidth;
1882
+ targetLeftTime;
1883
+ targetRightTime;
1884
+ selectionOffsetShiftX;
1885
+ selectionStartX;
1886
+ lastMouseOffsetX;
1887
+ minimumBoundary;
1888
+ totalTime;
1889
+ isUpdateScheduled;
1890
+ cancelWindowTimesAnimation;
1891
+ #n;
1892
+ constructor(e, t) {
1893
+ super(), this.#n = t, this.registerRequiredCSS(st), this.delegate = e, this.viewportElement = this.contentElement.createChild("div", "fill"), this.viewportElement.addEventListener("mousemove", this.updateCursorPosition.bind(this), !1), this.viewportElement.addEventListener("mouseout", this.onMouseOut.bind(this), !1), this.viewportElement.addEventListener("wheel", this.onMouseWheel.bind(this), !1), this.viewportElement.addEventListener("keydown", this.onChartKeyDown.bind(this), !1), this.viewportElement.addEventListener("keyup", this.onChartKeyUp.bind(this), !1), S(this.viewportElement, this.startDragging.bind(this), this.dragging.bind(this), this.endDragging.bind(this), "-webkit-grabbing", null), S(this.viewportElement, this.startRangeSelection.bind(this), this.rangeSelectionDragging.bind(this), this.endRangeSelection.bind(this), "text", null), this.#e = !1, this.rangeSelectionEnabled = !0, this.vScrollElement = this.contentElement.createChild("div", "chart-viewport-v-scroll"), this.vScrollContent = this.vScrollElement.createChild("div"), this.vScrollElement.addEventListener("scroll", this.onScroll.bind(this), !1), this.selectionOverlay = this.contentElement.createChild("div", "chart-viewport-selection-overlay hidden"), this.cursorElement = this.contentElement.createChild("div", "chart-cursor-element hidden"), this.reset(), this.rangeSelectionStart = null, this.rangeSelectionEnd = null;
1894
+ }
1895
+ alwaysShowVerticalScroll() {
1896
+ this.#e = !0, this.vScrollElement.classList.add("always-show-scrollbar");
1897
+ }
1898
+ disableRangeSelection() {
1899
+ this.rangeSelectionEnabled = !1, this.rangeSelectionStart = null, this.rangeSelectionEnd = null;
1900
+ }
1901
+ isDragging() {
1902
+ return this.#t;
1903
+ }
1904
+ elementsToRestoreScrollPositionsFor() {
1905
+ return [this.vScrollElement];
1906
+ }
1907
+ verticalScrollBarVisible() {
1908
+ return !this.vScrollElement.classList.contains("hidden");
1909
+ }
1910
+ updateScrollBar() {
1911
+ let e = this.#e || this.totalHeight > this.offsetHeight;
1912
+ this.vScrollElement.classList.contains("hidden") === e && (this.vScrollElement.classList.toggle("hidden", !e), this.updateContentElementSize());
1913
+ }
1914
+ onResize() {
1915
+ this.updateScrollBar(), this.updateContentElementSize(), this.scheduleUpdate();
1916
+ }
1917
+ reset() {
1918
+ this.vScrollElement.scrollTop = 0, this.scrollTop = 0, this.rangeSelectionStart = null, this.rangeSelectionEnd = null, this.#t = !1, this.dragStartPointX = 0, this.dragStartPointY = 0, this.dragStartScrollTop = 0, this.visibleLeftTime = 0, this.visibleRightTime = 0, this.offsetWidth = 0, this.offsetHeight = 0, this.totalHeight = 0, this.targetLeftTime = 0, this.targetRightTime = 0, this.isUpdateScheduled = !1, this.updateContentElementSize();
1919
+ }
1920
+ updateContentElementSize() {
1921
+ let e = this.vScrollElement.offsetLeft;
1922
+ e ||= this.contentElement.offsetWidth, this.offsetWidth = e, this.offsetHeight = this.contentElement.offsetHeight, this.delegate.setSize(this.offsetWidth, this.offsetHeight);
1923
+ }
1924
+ setContentHeight(e) {
1925
+ this.totalHeight = e, this.vScrollContent.style.height = e + "px", this.updateScrollBar(), this.updateContentElementSize(), !(this.scrollTop + this.offsetHeight <= e) && (this.scrollTop = Math.max(0, e - this.offsetHeight), this.vScrollElement.scrollTop = this.scrollTop);
1926
+ }
1927
+ setScrollOffset(e, t, n) {
1928
+ if (t ||= 0, n) {
1929
+ let n = Math.floor(this.offsetHeight / 2);
1930
+ this.vScrollElement.scrollTop > e && (this.vScrollElement.scrollTop = e - (t + n));
1931
+ } else this.vScrollElement.scrollTop > e && (this.vScrollElement.scrollTop = e);
1932
+ this.vScrollElement.scrollTop < e - this.offsetHeight + t && (this.vScrollElement.scrollTop = e - this.offsetHeight + t);
1933
+ }
1934
+ scrollOffset() {
1935
+ return this.scrollTop;
1936
+ }
1937
+ chartHeight() {
1938
+ return this.offsetHeight;
1939
+ }
1940
+ setBoundaries(e, t) {
1941
+ this.minimumBoundary = e, this.totalTime = t;
1942
+ }
1943
+ onMouseWheel(e) {
1944
+ let t = l.instance().moduleSetting("flamechart-selected-navigation").get(), n = (e.deltaY || e.deltaX) / 53 * this.offsetHeight / 8, r = 1.2 ** ((e.deltaY || e.deltaX) * 1 / 53) - 1;
1945
+ if (t === "classic") e.shiftKey ? this.vScrollElement.scrollTop += n : Math.abs(e.deltaX) > Math.abs(e.deltaY) ? this.handleHorizontalPanGesture(e.deltaX, !0) : this.handleZoomGesture(r);
1946
+ else if (t === "modern") {
1947
+ let t = pe.eventHasCtrlEquivalentKey(e);
1948
+ e.shiftKey ? this.handleHorizontalPanGesture(n, !0) : Math.abs(e.deltaX) > Math.abs(e.deltaY) ? this.handleHorizontalPanGesture(e.deltaX, !0) : t ? this.handleZoomGesture(r) : this.vScrollElement.scrollTop += n;
1949
+ }
1950
+ e.consume(!0);
1951
+ }
1952
+ startDragging(e) {
1953
+ return e.shiftKey ? !1 : (this.#t = !0, this.dragStartPointX = e.pageX, this.dragStartPointY = e.pageY, this.dragStartScrollTop = this.vScrollElement.scrollTop, this.viewportElement.style.cursor = "", !0);
1954
+ }
1955
+ dragging(e) {
1956
+ let t = this.dragStartPointX - e.pageX;
1957
+ this.dragStartPointX = e.pageX, this.handleHorizontalPanGesture(t);
1958
+ let n = this.dragStartPointY - e.pageY;
1959
+ this.vScrollElement.scrollTop = this.dragStartScrollTop + n;
1960
+ }
1961
+ endDragging() {
1962
+ this.#t = !1;
1963
+ }
1964
+ startRangeSelection(e) {
1965
+ return !e.shiftKey || !this.rangeSelectionEnabled ? !1 : (this.#t = !0, this.selectionOffsetShiftX = e.offsetX - e.pageX, this.selectionStartX = e.offsetX, !0);
1966
+ }
1967
+ endRangeSelection() {
1968
+ this.#t = !1, this.selectionStartX = null;
1969
+ }
1970
+ hideRangeSelection() {
1971
+ this.selectionOverlay.classList.add("hidden"), this.rangeSelectionStart = null, this.rangeSelectionEnd = null;
1972
+ }
1973
+ setRangeSelection(e, t) {
1974
+ this.rangeSelectionEnabled && (this.rangeSelectionStart = Math.min(e, t), this.rangeSelectionEnd = Math.max(e, t), this.delegate.updateRangeSelection(this.rangeSelectionStart, this.rangeSelectionEnd));
1975
+ }
1976
+ onClick(e) {
1977
+ let t = e, n = this.pixelToTime(t.offsetX);
1978
+ this.rangeSelectionStart !== null && this.rangeSelectionEnd !== null && n >= this.rangeSelectionStart && n <= this.rangeSelectionEnd || this.hideRangeSelection();
1979
+ }
1980
+ rangeSelectionDragging(e) {
1981
+ let t = r(e.pageX + this.selectionOffsetShiftX, 0, this.offsetWidth), n = this.pixelToTime(this.selectionStartX || 0), i = this.pixelToTime(t);
1982
+ this.setRangeSelection(n, i);
1983
+ }
1984
+ onScroll() {
1985
+ this.scrollTop = this.vScrollElement.scrollTop, this.scheduleUpdate();
1986
+ }
1987
+ onMouseOut() {
1988
+ this.lastMouseOffsetX = -1, this.showCursor(!1);
1989
+ }
1990
+ updateCursorPosition(e) {
1991
+ let t = e;
1992
+ this.lastMouseOffsetX = t.offsetX;
1993
+ let n = this.#n.enableCursorElement && t.shiftKey && !t.metaKey;
1994
+ this.showCursor(n), n && (this.cursorElement.style.left = t.offsetX + "px");
1995
+ }
1996
+ pixelToTime(e) {
1997
+ return this.pixelToTimeOffset(e) + this.visibleLeftTime;
1998
+ }
1999
+ pixelToTimeOffset(e) {
2000
+ return e * (this.visibleRightTime - this.visibleLeftTime) / this.offsetWidth;
2001
+ }
2002
+ timeToPosition(e) {
2003
+ return Math.floor((e - this.visibleLeftTime) / (this.visibleRightTime - this.visibleLeftTime) * this.offsetWidth);
2004
+ }
2005
+ timeToPixel() {
2006
+ return this.offsetWidth / (this.visibleRightTime - this.visibleLeftTime);
2007
+ }
2008
+ showCursor(e) {
2009
+ this.cursorElement.classList.toggle("hidden", !e || this.#t);
2010
+ }
2011
+ onChartKeyDown(e) {
2012
+ this.showCursor(e.shiftKey), this.handleZoomPanScrollKeys(e);
2013
+ }
2014
+ onChartKeyUp(e) {
2015
+ this.showCursor(e.shiftKey);
2016
+ }
2017
+ handleZoomPanScrollKeys(e) {
2018
+ if (pe.hasAtLeastOneModifier(e) && !e.shiftKey) return;
2019
+ let t = e.shiftKey ? .8 : .3;
2020
+ switch (e.code) {
2021
+ case "KeyA":
2022
+ this.handleHorizontalPanGesture(-160, !0);
2023
+ break;
2024
+ case "KeyD":
2025
+ this.handleHorizontalPanGesture(160, !0);
2026
+ break;
2027
+ case "Equal":
2028
+ case "KeyW":
2029
+ this.handleZoomGesture(-t);
2030
+ break;
2031
+ case "Minus":
2032
+ case "KeyS":
2033
+ this.handleZoomGesture(t);
2034
+ break;
2035
+ case "ArrowUp":
2036
+ e.shiftKey && (this.vScrollElement.scrollTop -= 50);
2037
+ break;
2038
+ case "ArrowDown":
2039
+ e.shiftKey && (this.vScrollElement.scrollTop += 50);
2040
+ break;
2041
+ case "ArrowLeft":
2042
+ e.shiftKey && this.handleHorizontalPanGesture(-160, !0);
2043
+ break;
2044
+ case "ArrowRight":
2045
+ e.shiftKey && this.handleHorizontalPanGesture(160, !0);
2046
+ break;
2047
+ default: return;
2048
+ }
2049
+ e.consume(!0);
2050
+ }
2051
+ handleZoomGesture(e) {
2052
+ let t = {
2053
+ left: this.targetLeftTime,
2054
+ right: this.targetRightTime
2055
+ }, n = this.pixelToTime(this.lastMouseOffsetX || 0);
2056
+ t.left += (t.left - n) * e, t.right += (t.right - n) * e, this.requestWindowTimes(t, !0);
2057
+ }
2058
+ handleHorizontalPanGesture(e, t) {
2059
+ let n = {
2060
+ left: this.targetLeftTime,
2061
+ right: this.targetRightTime
2062
+ }, i = r(this.pixelToTimeOffset(e), this.minimumBoundary - n.left, this.totalTime + this.minimumBoundary - n.right);
2063
+ n.left += i, n.right += i, this.requestWindowTimes(n, !!t);
2064
+ }
2065
+ requestWindowTimes(e, t) {
2066
+ let n = this.minimumBoundary + this.totalTime;
2067
+ e.left < this.minimumBoundary ? (e.right = Math.min(e.right + this.minimumBoundary - e.left, n), e.left = this.minimumBoundary) : e.right > n && (e.left = Math.max(e.left - e.right + n, this.minimumBoundary), e.right = n), !(e.right - e.left < .5) && this.delegate.windowChanged(e.left, e.right, t);
2068
+ }
2069
+ scheduleUpdate() {
2070
+ this.cancelWindowTimesAnimation || this.isUpdateScheduled || (this.isUpdateScheduled = !0, Le(() => {
2071
+ this.isUpdateScheduled = !1, this.update();
2072
+ }));
2073
+ }
2074
+ update() {
2075
+ this.delegate.update();
2076
+ }
2077
+ willHide() {
2078
+ super.willHide(), this.cancelWindowTimesAnimation && (this.cancelWindowTimesAnimation(), this.setWindowTimes(this.targetLeftTime, this.targetRightTime, !1));
2079
+ }
2080
+ setWindowTimes(e, t, n) {
2081
+ if (e === this.targetLeftTime && t === this.targetRightTime) return;
2082
+ if (!n || this.visibleLeftTime === 0 || this.visibleRightTime === Infinity || e === 0 && t === Infinity || e === Infinity && t === Infinity) {
2083
+ this.targetLeftTime = e, this.targetRightTime = t, this.visibleLeftTime = e, this.visibleRightTime = t, this.scheduleUpdate();
2084
+ return;
2085
+ }
2086
+ this.cancelWindowTimesAnimation && (this.cancelWindowTimesAnimation(), this.visibleLeftTime = this.targetLeftTime, this.visibleRightTime = this.targetRightTime), this.targetLeftTime = e, this.targetRightTime = t, this.cancelWindowTimesAnimation = Te(this.element.window(), r.bind(this), [{
2087
+ from: this.visibleLeftTime,
2088
+ to: e
2089
+ }, {
2090
+ from: this.visibleRightTime,
2091
+ to: t
2092
+ }], 100, () => {
2093
+ this.cancelWindowTimesAnimation = null;
2094
+ });
2095
+ function r(e, t) {
2096
+ this.isShowing() && (this.visibleLeftTime = e, this.visibleRightTime = t, this.update());
2097
+ }
2098
+ }
2099
+ windowLeftTime() {
2100
+ return this.visibleLeftTime;
2101
+ }
2102
+ windowRightTime() {
2103
+ return this.visibleRightTime;
2104
+ }
2105
+ }, Wt = "/*\n * Copyright 2015 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.film-strip-view {\n overflow: auto hidden;\n align-content: flex-start;\n min-height: 81px;\n}\n\n.film-strip-view .frame .time {\n font-size: 10px;\n margin-top: 2px;\n}\n\n.film-strip-view .gray-info-message {\n margin: auto;\n}\n\n.film-strip-view .frame {\n background: none;\n border: none;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 4px;\n flex: none;\n cursor: pointer;\n}\n\n.film-strip-view .frame .thumbnail {\n min-width: 24px;\n display: flex;\n flex-direction: row;\n align-items: center;\n pointer-events: none;\n margin: 4px 0 2px;\n border: 2px solid transparent;\n}\n\n.film-strip-view .frame:hover .thumbnail,\n.film-strip-view .frame:focus .thumbnail {\n border-color: var(--sys-color-primary);\n}\n\n.film-strip-view .frame .thumbnail img {\n height: auto;\n width: auto;\n max-width: 80px;\n max-height: 50px;\n pointer-events: none;\n box-shadow: 0 0 3px var(--box-shadow-outline-color);\n flex: 0 0 auto;\n}\n\n.film-strip-view .frame:hover .thumbnail img,\n.film-strip-view .frame:focus .thumbnail img {\n box-shadow: none;\n}\n\n.film-strip-image-dialog {\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .image-box {\n overflow: auto;\n margin: var(--sys-size-7) var(--sys-size-8) var(--sys-size-8)\n var(--sys-size-8);\n border: var(--sys-size-1) solid var(--sys-color-divider);\n }\n\n img {\n max-height: 80vh;\n max-width: 80vw;\n }\n\n .time-box {\n margin: 0 var(--sys-size-3);\n }\n\n .button-box {\n display: flex;\n align-items: center;\n justify-content: center;\n margin: var(--sys-size-6) 0 var(--sys-size-5);\n }\n}\n", Gt = /* @__PURE__ */ e({
2106
+ Dialog: () => Yt,
2107
+ Events: () => Jt,
2108
+ FilmStripView: () => qt
2109
+ }), H = {
2110
+ doubleclickToZoomImageClickTo: "Doubleclick to zoom image. Click to view preceding requests.",
2111
+ screenshotForSSelectToView: "Screenshot for {PH1} - select to view preceding requests.",
2112
+ screenshot: "Screenshot",
2113
+ previousFrame: "Previous frame",
2114
+ nextFrame: "Next frame"
2115
+ }, Kt = h("ui/legacy/components/perf_ui/FilmStripView.ts", H), U = c.bind(void 0, Kt), qt = class e extends f(y) {
2116
+ statusLabel;
2117
+ zeroTime = j(0);
2118
+ #e = null;
2119
+ constructor() {
2120
+ super({ useShadowDom: !0 }), this.registerRequiredCSS(Wt), this.contentElement.classList.add("film-strip-view"), this.statusLabel = this.contentElement.createChild("div", "gray-info-message"), this.reset();
2121
+ }
2122
+ static setImageData(e, t) {
2123
+ t && (e.src = t);
2124
+ }
2125
+ setModel(e) {
2126
+ if (this.#e = e, this.zeroTime = A(e.zeroTime), !this.#e.frames.length) {
2127
+ this.reset();
2128
+ return;
2129
+ }
2130
+ this.update();
2131
+ }
2132
+ createFrameElement(t) {
2133
+ let n = A(t.screenshotEvent.ts), r = u(n - this.zeroTime), i = document.createElement("button");
2134
+ i.classList.add("frame"), w.install(i, U(H.doubleclickToZoomImageClickTo)), i.createChild("div", "time").textContent = r, i.tabIndex = 0, i.setAttribute("jslog", `${_("film-strip").track({
2135
+ click: !0,
2136
+ dblclick: !0
2137
+ })}`), i.setAttribute("aria-label", U(H.screenshotForSSelectToView, { PH1: r })), Pe(i);
2138
+ let a = i.createChild("div", "thumbnail").createChild("img");
2139
+ a.alt = U(H.screenshot), i.addEventListener("mousedown", this.onMouseEvent.bind(this, "FrameSelected", n), !1), i.addEventListener("mouseenter", this.onMouseEvent.bind(this, "FrameEnter", n), !1), i.addEventListener("mouseout", this.onMouseEvent.bind(this, "FrameExit", n), !1), i.addEventListener("dblclick", this.onDoubleClick.bind(this, t), !1), i.addEventListener("focusin", this.onMouseEvent.bind(this, "FrameEnter", n), !1), i.addEventListener("focusout", this.onMouseEvent.bind(this, "FrameExit", n), !1);
2140
+ let o = qe(t.screenshotEvent);
2141
+ return e.setImageData(a, o), i;
2142
+ }
2143
+ update() {
2144
+ let e = this.#e?.frames;
2145
+ if (!e || e.length < 1) return;
2146
+ let t = e.map((e) => this.createFrameElement(e));
2147
+ this.contentElement.removeChildren();
2148
+ for (let e of t) this.contentElement.appendChild(e);
2149
+ }
2150
+ onMouseEvent(e, t) {
2151
+ this.dispatchEventToListeners(e, t);
2152
+ }
2153
+ onDoubleClick(e) {
2154
+ this.#e && Yt.fromFilmStrip(this.#e, e.index);
2155
+ }
2156
+ reset() {
2157
+ this.zeroTime = j(0), this.contentElement.removeChildren(), this.contentElement.appendChild(this.statusLabel);
2158
+ }
2159
+ setStatusText(e) {
2160
+ this.statusLabel.textContent = e;
2161
+ }
2162
+ }, Jt = /* @__PURE__ */ function(e) {
2163
+ return e.FRAME_SELECTED = "FrameSelected", e.FRAME_ENTER = "FrameEnter", e.FRAME_EXIT = "FrameExit", e;
2164
+ }({}), Yt = class e {
2165
+ widget;
2166
+ index;
2167
+ dialog = null;
2168
+ #e;
2169
+ static fromFilmStrip(t, n) {
2170
+ return new e({
2171
+ source: "Trace",
2172
+ frames: t.frames,
2173
+ index: n,
2174
+ zeroTime: A(t.zeroTime)
2175
+ });
2176
+ }
2177
+ constructor(e) {
2178
+ this.#e = e, this.index = e.index;
2179
+ let t = xe("◀", this.onPrevFrame.bind(this));
2180
+ w.install(t, U(H.previousFrame));
2181
+ let n = xe("▶", this.onNextFrame.bind(this));
2182
+ w.install(n, U(H.nextFrame)), this.widget = new je({ classes: ["film-strip-image-dialog"] }), this.widget.registerRequiredCSS(Wt);
2183
+ let r = document.createElement("div");
2184
+ r.classList.add("image-box");
2185
+ let i = document.createElement("img");
2186
+ i.setAttribute("data-film-strip-dialog-img", ""), r.append(i);
2187
+ let a = document.createElement("div");
2188
+ a.classList.add("button-box");
2189
+ let o = document.createElement("div");
2190
+ o.classList.add("time-box"), a.append(t), a.append(o), a.append(n), this.widget.contentElement.append(r), this.widget.contentElement.append(a), this.widget.element.tabIndex = 0, this.widget.contentElement.append(), this.widget.contentElement.addEventListener("keydown", this.keyDown.bind(this), !1), this.dialog = null, this.render();
2191
+ }
2192
+ hide() {
2193
+ this.dialog && this.dialog.hide();
2194
+ }
2195
+ #t() {
2196
+ return this.#e.frames.length;
2197
+ }
2198
+ #n() {
2199
+ return this.#e.zeroTime;
2200
+ }
2201
+ resize() {
2202
+ this.dialog || (this.dialog = new ie(), this.widget.show(this.dialog.contentElement), this.dialog.setDefaultFocusedElement(this.widget.element), this.dialog.show()), this.dialog.setSizeBehavior(oe.MEASURE_CONTENT);
2203
+ }
2204
+ keyDown(e) {
2205
+ let t = e;
2206
+ switch (t.key) {
2207
+ case "ArrowLeft":
2208
+ ke() && t.metaKey ? this.onFirstFrame() : this.onPrevFrame();
2209
+ break;
2210
+ case "ArrowRight":
2211
+ ke() && t.metaKey ? this.onLastFrame() : this.onNextFrame();
2212
+ break;
2213
+ case "Home":
2214
+ this.onFirstFrame();
2215
+ break;
2216
+ case "End":
2217
+ this.onLastFrame();
2218
+ break;
2219
+ }
2220
+ }
2221
+ onPrevFrame() {
2222
+ this.index > 0 && --this.index, this.render();
2223
+ }
2224
+ onNextFrame() {
2225
+ this.index < this.#t() - 1 && ++this.index, this.render();
2226
+ }
2227
+ onFirstFrame() {
2228
+ this.index = 0, this.render();
2229
+ }
2230
+ onLastFrame() {
2231
+ this.index = this.#t() - 1, this.render();
2232
+ }
2233
+ render() {
2234
+ let e = this.#e.frames[this.index], t = A(e.screenshotEvent.ts), n = this.widget.contentElement.querySelector(".time-box");
2235
+ n && (n.textContent = u(t - this.#n()));
2236
+ let r = this.widget.contentElement.querySelector("img");
2237
+ if (!r) return;
2238
+ r.setAttribute("data-frame-index", this.index.toString());
2239
+ let i = qe(e.screenshotEvent);
2240
+ qt.setImageData(r, i), this.resize();
2241
+ }
2242
+ }, Xt = /* @__PURE__ */ e({ GCActionDelegate: () => en }), Zt = { garbageCollectionCompleted: "Garbage collection completed" }, Qt = h("ui/legacy/components/perf_ui/GCActionDelegate.ts", Zt), $t = c.bind(void 0, Qt), en = class {
2243
+ handleAction(e, t) {
2244
+ let n = ce.instance().models(ne).map((e) => e.collectGarbage());
2245
+ return Promise.all(n).then(() => {
2246
+ Xe.show({ message: $t(Zt.garbageCollectionCompleted) });
2247
+ }), !0;
2248
+ }
2249
+ }, tn = /* @__PURE__ */ e({
2250
+ Helper: () => an,
2251
+ Performance: () => rn
2252
+ }), nn, rn = class e {
2253
+ helper;
2254
+ constructor() {
2255
+ this.helper = new an(Be.PERFORMANCE);
2256
+ }
2257
+ static instance(t = { forceNew: null }) {
2258
+ let { forceNew: n } = t;
2259
+ return (!nn || n) && (nn = new e()), nn;
2260
+ }
2261
+ initialize(e, t) {
2262
+ this.helper.reset();
2263
+ for (let n of e) this.appendCPUProfile(n, t);
2264
+ this.helper.update();
2265
+ }
2266
+ appendLegacyCPUProfile(e, t) {
2267
+ let n = [e.profileHead], r = (e.profileEndTime - e.profileStartTime) / e.totalHitCount;
2268
+ for (; n.length;) {
2269
+ let e = n.pop()?.children ?? [];
2270
+ for (let i = 0; i < e.length; ++i) {
2271
+ let a = e[i];
2272
+ if (n.push(a), !(!a.url || !a.positionTicks)) for (let e = 0; e < a.positionTicks.length; ++e) {
2273
+ let n = a.positionTicks[e], i = n.line, o = n.ticks * r;
2274
+ this.helper.addLocationData(t, a.url, {
2275
+ line: i,
2276
+ column: 1
2277
+ }, o);
2278
+ }
2279
+ }
2280
+ }
2281
+ }
2282
+ appendCPUProfile(e, t) {
2283
+ if (!e.lines) {
2284
+ this.appendLegacyCPUProfile(e, t);
2285
+ return;
2286
+ }
2287
+ if (!(!e.samples || !e.columns)) for (let n = 1; n < e.samples.length; ++n) {
2288
+ let r = e.lines[n], i = e.columns?.[n];
2289
+ if (!r || !i) continue;
2290
+ let a = e.nodeByIndex(n);
2291
+ if (!a) continue;
2292
+ let o = Number(a.scriptId) || a.url;
2293
+ if (!o) continue;
2294
+ let s = e.timestamps[n] - e.timestamps[n - 1];
2295
+ this.helper.addLocationData(t, o, {
2296
+ line: r,
2297
+ column: i
2298
+ }, s);
2299
+ }
2300
+ }
2301
+ }, an = class {
2302
+ type;
2303
+ locationPool = new Ve();
2304
+ locationData = /* @__PURE__ */ new Map();
2305
+ constructor(e) {
2306
+ this.type = e, this.reset();
2307
+ }
2308
+ reset() {
2309
+ this.locationData = /* @__PURE__ */ new Map();
2310
+ }
2311
+ addLocationData(e, t, { line: n, column: r }, i) {
2312
+ let a = this.locationData.get(e);
2313
+ a || (a = /* @__PURE__ */ new Map(), this.locationData.set(e, a));
2314
+ let o = a.get(t);
2315
+ o || (o = /* @__PURE__ */ new Map(), a.set(t, o));
2316
+ let s = o.get(n);
2317
+ s || (s = /* @__PURE__ */ new Map(), o.set(n, s)), s.set(r, (s.get(r) || 0) + i);
2318
+ }
2319
+ async update() {
2320
+ this.locationPool.disposeAll();
2321
+ let e = /* @__PURE__ */ new Map(), t = [];
2322
+ for (let [n, r] of this.locationData) {
2323
+ let i = n ? n.model(Ne) : null;
2324
+ for (let [a, o] of r) {
2325
+ let r = Ue.instance();
2326
+ if (i) {
2327
+ let r = He.instance();
2328
+ for (let [s, c] of o) for (let [o, l] of c) {
2329
+ let c = s - 1, u = o - 1;
2330
+ if (n) {
2331
+ let n = typeof a == "string" ? i.createRawLocationByURL(a, c, u || 0) : i.createRawLocationByScriptId(String(a), c, u || 0);
2332
+ n && t.push(r.rawLocationToUILocation(n).then((t) => {
2333
+ if (t && (this.addLineColumnData(e, t.uiSourceCode, t.lineNumber + 1, (t.columnNumber ?? 0) + 1, l), t.uiSourceCode.contentType().isFromSourceMap())) {
2334
+ let t = n.script(), i = t ? r.uiSourceCodeForScript(t) : null;
2335
+ i && this.addLineColumnData(e, i, s, o, l);
2336
+ }
2337
+ }));
2338
+ }
2339
+ }
2340
+ } else if (typeof a == "string") {
2341
+ let t = r.uiSourceCodeForURL(a);
2342
+ t && e.set(t, o);
2343
+ }
2344
+ }
2345
+ await Promise.all(t);
2346
+ for (let [t, n] of e) t.setDecorationData(this.type, n);
2347
+ }
2348
+ for (let t of Ue.instance().uiSourceCodes()) e.has(t) || t.setDecorationData(this.type, void 0);
2349
+ }
2350
+ addLineColumnData(e, t, n, r, i) {
2351
+ let a = e.get(t);
2352
+ a || (a = /* @__PURE__ */ new Map(), e.set(t, a));
2353
+ let o = a.get(n);
2354
+ o || (o = /* @__PURE__ */ new Map(), a.set(n, o)), o.set(r, (o.get(r) ?? 0) + i);
2355
+ }
2356
+ }, on = /* @__PURE__ */ e({
2357
+ networkPriorityWeight: () => fn,
2358
+ priorityUILabelMap: () => dn,
2359
+ uiLabelForNetworkPriority: () => cn,
2360
+ uiLabelToNetworkPriority: () => un
2361
+ }), W = {
2362
+ lowest: "Lowest",
2363
+ low: "Low",
2364
+ medium: "Medium",
2365
+ high: "High",
2366
+ highest: "Highest"
2367
+ }, sn = h("ui/legacy/components/perf_ui/NetworkPriorities.ts", W), G = c.bind(void 0, sn);
2368
+ function cn(e) {
2369
+ return dn().get(e) || "";
2370
+ }
2371
+ var ln = /* @__PURE__ */ new Map();
2372
+ function un(e) {
2373
+ ln.size === 0 && dn().forEach((e, t) => ln.set(e, t));
2374
+ let t = ln.get(e);
2375
+ if (t) return t;
2376
+ throw Error("Priority not found");
2377
+ }
2378
+ var K = /* @__PURE__ */ new Map();
2379
+ function dn() {
2380
+ return K.size === 0 && (K.set(D.ResourcePriority.VeryLow, G(W.lowest)), K.set(D.ResourcePriority.Low, G(W.low)), K.set(D.ResourcePriority.Medium, G(W.medium)), K.set(D.ResourcePriority.High, G(W.high)), K.set(D.ResourcePriority.VeryHigh, G(W.highest))), K;
2381
+ }
2382
+ var q = /* @__PURE__ */ new Map();
2383
+ function fn(e) {
2384
+ return q.size === 0 && (q.set(D.ResourcePriority.VeryLow, 1), q.set(D.ResourcePriority.Low, 2), q.set(D.ResourcePriority.Medium, 3), q.set(D.ResourcePriority.High, 4), q.set(D.ResourcePriority.VeryHigh, 5)), q.get(e) || 0;
2385
+ }
2386
+ //#endregion
2387
+ //#region \0qilin-devtools:css:/home/runner/work/QiLin/QiLin/node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/ui/legacy/components/perf_ui/overviewGrid.css.mjs
2388
+ var pn = "/*\n * Copyright 2014 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.overview-grid-window-selector {\n position: absolute;\n top: 0;\n bottom: 0;\n background-color: var(--sys-color-state-ripple-primary);\n z-index: 250;\n pointer-events: none;\n}\n\n.overview-grid-window-resizer {\n position: absolute;\n top: 0;\n height: 19px;\n width: 10px;\n margin-left: -5px; /* half width (incl the border) */\n background-color: var(--sys-color-tonal-container);\n border: 1px solid var(--sys-color-tonal-outline);\n z-index: 500;\n border-radius: 3px;\n}\n\n/* Grip lines within the handle */\n.overview-grid-window-resizer::before,\n.overview-grid-window-resizer::after {\n content: \"\";\n width: 1px;\n background: var(--sys-color-primary);\n height: 7px;\n position: absolute;\n left: 2px;\n top: 5px;\n border-radius: 1px;\n}\n\n.overview-grid-window-resizer::after {\n left: 5px;\n}\n\n.overview-grid-window-resizer:focus-visible {\n background-color: var(--sys-color-state-focus-highlight);\n}\n\n.overview-grid-cursor-area {\n position: absolute;\n inset: 20px 0 0;\n z-index: 500;\n cursor: text;\n}\n\n.overview-grid-cursor-position {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 2px;\n background-color: var(--sys-color-primary);\n z-index: 500;\n pointer-events: none;\n visibility: hidden;\n overflow: hidden;\n}\n\n.window-curtain-left,\n.window-curtain-right {\n background-color: var(--sys-color-state-ripple-primary);\n position: absolute;\n top: 0;\n height: 100%;\n z-index: 300;\n pointer-events: none;\n border: 2px none var(--sys-color-tonal-outline);\n}\n\n.window-curtain-left {\n left: 0;\n border-right-style: solid;\n}\n\n.window-curtain-right {\n right: 0;\n border-left-style: solid;\n}\n\n.create-breadcrumb-button-container {\n visibility: hidden;\n opacity: 0%;\n transition: opacity 100ms 250ms;\n display: flex;\n position: absolute;\n top: 15px;\n justify-content: center;\n z-index: 600;\n left: 0;\n right: 0;\n}\n\n.is-breadcrumb-button-visible {\n visibility: visible;\n opacity: 100%;\n}\n\n.create-breadcrumb-button-container.with-screenshots {\n /* We have more room when screenshots are enabled,\n * so push the button down slightly */\n top: 20px;\n}\n\n.create-breadcrumb-button {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n background: var(--sys-color-cdt-base-container);\n box-shadow: var(--drop-shadow-depth-3);\n border-radius: 50px;\n padding: 1px 6px;\n gap: 2px;\n}\n\n.create-breadcrumb-button:active {\n /* On minimap cursor changes to text to selected an area,\n * so keep it as default on the breadcrumb button */\n cursor: default;\n}\n\n.create-breadcrumb-button:hover {\n background: var(--sys-color-neutral-container);\n}\n\n@media (forced-colors: active) {\n .overview-grid-cursor-position {\n forced-color-adjust: none;\n background-color: Highlight;\n }\n\n .window-curtain-left,\n .window-curtain-right {\n background-color: transparent;\n border-color: ButtonText;\n }\n\n .overview-grid-window-resizer {\n background-color: ButtonText;\n }\n\n .overview-grid-window-resizer:hover,\n .overview-grid-window-resizer:active,\n .overview-grid-window-resizer:focus-visible {\n forced-color-adjust: none;\n background-color: Highlight;\n }\n}\n", mn = /* @__PURE__ */ e({
2389
+ Events: () => Z,
2390
+ OverviewGrid: () => _n,
2391
+ Window: () => bn,
2392
+ WindowSelector: () => xn
2393
+ }), J = {
2394
+ overviewGridWindow: "Overview grid window",
2395
+ leftResizer: "Left Resizer",
2396
+ rightResizer: "Right Resizer"
2397
+ }, hn = h("ui/legacy/components/perf_ui/OverviewGrid.ts", J), gn = c.bind(void 0, hn), _n = class {
2398
+ element;
2399
+ grid;
2400
+ window;
2401
+ constructor(e, t) {
2402
+ this.element = document.createElement("div"), this.element.id = e + "-overview-container", this.grid = new R(), this.grid.element.id = e + "-overview-grid", this.grid.setScrollTop(0), this.element.appendChild(this.grid.element), this.window = new bn(this.element, this.grid.dividersLabelBarElement, t);
2403
+ }
2404
+ enableCreateBreadcrumbsButton() {
2405
+ return this.window.enableCreateBreadcrumbsButton();
2406
+ }
2407
+ set showingScreenshots(e) {
2408
+ this.window.showingScreenshots = e;
2409
+ }
2410
+ clientWidth() {
2411
+ return this.element.clientWidth;
2412
+ }
2413
+ updateDividers(e) {
2414
+ this.grid.updateDividers(e);
2415
+ }
2416
+ addEventDividers(e) {
2417
+ this.grid.addEventDividers(e);
2418
+ }
2419
+ removeEventDividers() {
2420
+ this.grid.removeEventDividers();
2421
+ }
2422
+ reset() {
2423
+ this.window.reset();
2424
+ }
2425
+ windowLeftRatio() {
2426
+ return this.window.windowLeftRatio || 0;
2427
+ }
2428
+ windowRightRatio() {
2429
+ return this.window.windowRightRatio || 0;
2430
+ }
2431
+ calculateWindowValue() {
2432
+ return this.window.calculateWindowValue();
2433
+ }
2434
+ setWindowRatio(e, t) {
2435
+ this.window.setWindowRatio(e, t);
2436
+ }
2437
+ addEventListener(e, t, n) {
2438
+ return this.window.addEventListener(e, t, n);
2439
+ }
2440
+ setClickHandler(e) {
2441
+ this.window.setClickHandler(e);
2442
+ }
2443
+ zoom(e, t) {
2444
+ this.window.zoom(e, t);
2445
+ }
2446
+ setResizeEnabled(e) {
2447
+ this.window.setResizeEnabled(e);
2448
+ }
2449
+ }, Y = 14, vn = .3, yn = 5, X = 10, bn = class extends o {
2450
+ parentElement;
2451
+ calculator;
2452
+ leftResizeElement;
2453
+ rightResizeElement;
2454
+ leftCurtainElement;
2455
+ rightCurtainElement;
2456
+ breadcrumbButtonContainerElement;
2457
+ createBreadcrumbButton;
2458
+ curtainsRange;
2459
+ breadcrumbZoomIcon;
2460
+ overviewWindowSelector;
2461
+ offsetLeft;
2462
+ dragStartPointPixel;
2463
+ dragStartLeftRatio;
2464
+ dragStartRightRatio;
2465
+ windowLeftRatio = 0;
2466
+ windowRightRatio = 1;
2467
+ resizeEnabled;
2468
+ clickHandler;
2469
+ resizerParentOffsetLeft;
2470
+ #e = !1;
2471
+ #t = !1;
2472
+ constructor(e, t, n) {
2473
+ super(), this.parentElement = e, this.parentElement.classList.add("parent-element"), ve(this.parentElement), this.calculator = n, x(this.parentElement, gn(J.overviewGridWindow)), S(this.parentElement, this.startWindowSelectorDragging.bind(this), this.windowSelectorDragging.bind(this), this.endWindowSelectorDragging.bind(this), "text", null), t && S(t, this.startWindowDragging.bind(this), this.windowDragging.bind(this), null, "-webkit-grabbing", "-webkit-grab"), this.parentElement.addEventListener("wheel", this.onMouseWheel.bind(this), !0), this.parentElement.addEventListener("dblclick", this.resizeWindowMaximum.bind(this), !0), Ae(this.parentElement, pn), this.leftResizeElement = e.createChild("div", "overview-grid-window-resizer"), S(this.leftResizeElement, this.resizerElementStartDragging.bind(this), this.leftResizeElementDragging.bind(this), null, "ew-resize"), this.rightResizeElement = e.createChild("div", "overview-grid-window-resizer"), S(this.rightResizeElement, this.resizerElementStartDragging.bind(this), this.rightResizeElementDragging.bind(this), null, "ew-resize"), x(this.leftResizeElement, gn(J.leftResizer)), we(this.leftResizeElement), this.leftResizeElement.addEventListener("keydown", (e) => this.handleKeyboardResizing(e, !1)), this.leftResizeElement.addEventListener("click", this.onResizerClicked), x(this.rightResizeElement, gn(J.rightResizer)), we(this.rightResizeElement), this.rightResizeElement.addEventListener("keydown", (e) => this.handleKeyboardResizing(e, !0)), this.rightResizeElement.addEventListener("focus", this.onRightResizeElementFocused.bind(this)), this.rightResizeElement.addEventListener("click", this.onResizerClicked), this.leftCurtainElement = e.createChild("div", "window-curtain-left"), this.rightCurtainElement = e.createChild("div", "window-curtain-right"), this.breadcrumbButtonContainerElement = e.createChild("div", "create-breadcrumb-button-container"), this.createBreadcrumbButton = this.breadcrumbButtonContainerElement.createChild("div", "create-breadcrumb-button"), this.createBreadcrumbButton.setAttribute("jslog", `${Oe("timeline.create-breadcrumb").track({ click: !0 })}`), this.reset();
2474
+ }
2475
+ enableCreateBreadcrumbsButton() {
2476
+ return this.curtainsRange = this.createBreadcrumbButton.createChild("div"), this.breadcrumbZoomIcon = le("zoom-in"), this.createBreadcrumbButton.appendChild(this.breadcrumbZoomIcon), this.createBreadcrumbButton.addEventListener("click", () => {
2477
+ this.#i();
2478
+ }), this.#e = !0, this.#n(this.parentElement), this.#n(this.rightResizeElement), this.#n(this.leftResizeElement), this.breadcrumbButtonContainerElement;
2479
+ }
2480
+ set showingScreenshots(e) {
2481
+ this.breadcrumbButtonContainerElement.classList.toggle("with-screenshots", e);
2482
+ }
2483
+ #n(e) {
2484
+ this.#e && (e.addEventListener("mouseover", () => {
2485
+ this.windowLeftRatio <= 0 && this.windowRightRatio >= 1 ? (this.breadcrumbButtonContainerElement.classList.toggle("is-breadcrumb-button-visible", !1), this.#t = !1) : (this.breadcrumbButtonContainerElement.classList.toggle("is-breadcrumb-button-visible", !0), this.#t = !0);
2486
+ }), e.addEventListener("mouseout", () => {
2487
+ this.breadcrumbButtonContainerElement.classList.toggle("is-breadcrumb-button-visible", !1), this.#t = !1;
2488
+ }));
2489
+ }
2490
+ onResizerClicked(e) {
2491
+ e.target && e.target.focus();
2492
+ }
2493
+ onRightResizeElementFocused() {
2494
+ this.parentElement.scrollLeft = 0;
2495
+ }
2496
+ reset() {
2497
+ this.windowLeftRatio = 0, this.windowRightRatio = 1, this.setResizeEnabled(!0), this.updateCurtains();
2498
+ }
2499
+ setResizeEnabled(e) {
2500
+ this.resizeEnabled = e, this.rightResizeElement.tabIndex = e ? 0 : -1, this.leftResizeElement.tabIndex = e ? 0 : -1;
2501
+ }
2502
+ setClickHandler(e) {
2503
+ this.clickHandler = e;
2504
+ }
2505
+ resizerElementStartDragging(e) {
2506
+ let t = e, n = e.target;
2507
+ return this.resizeEnabled ? (this.resizerParentOffsetLeft = t.pageX - t.offsetX - n.offsetLeft, e.stopPropagation(), !0) : !1;
2508
+ }
2509
+ leftResizeElementDragging(e) {
2510
+ let t = e;
2511
+ this.resizeWindowLeft(t.pageX - (this.resizerParentOffsetLeft || 0)), e.preventDefault();
2512
+ }
2513
+ rightResizeElementDragging(e) {
2514
+ let t = e;
2515
+ this.resizeWindowRight(t.pageX - (this.resizerParentOffsetLeft || 0)), e.preventDefault();
2516
+ }
2517
+ handleKeyboardResizing(e, t) {
2518
+ let n = e, r = e.target, i = !1;
2519
+ if (n.key === "ArrowLeft" || n.key === "ArrowRight") {
2520
+ n.key === "ArrowRight" && (i = !0);
2521
+ let a = this.getNewResizerPosition(r.offsetLeft, i, n.ctrlKey);
2522
+ t ? this.resizeWindowRight(a) : this.resizeWindowLeft(a), e.consume(!0);
2523
+ }
2524
+ }
2525
+ getNewResizerPosition(e, t, n) {
2526
+ let r, i = n ? 10 : 2;
2527
+ return i = t ? i : -Math.abs(i), r = e + yn + i, t && r < X ? r = X : !t && r > this.parentElement.clientWidth - X && (r = this.parentElement.clientWidth - X), r;
2528
+ }
2529
+ startWindowSelectorDragging(e) {
2530
+ if (!this.resizeEnabled) return !1;
2531
+ let t = e;
2532
+ this.offsetLeft = this.parentElement.getBoundingClientRect().left;
2533
+ let n = t.x - this.offsetLeft;
2534
+ return this.overviewWindowSelector = new xn(this.parentElement, n), !0;
2535
+ }
2536
+ windowSelectorDragging(e) {
2537
+ if (this.#t = !0, !this.overviewWindowSelector) return;
2538
+ let t = e;
2539
+ this.overviewWindowSelector.updatePosition(t.x - this.offsetLeft), e.preventDefault();
2540
+ }
2541
+ endWindowSelectorDragging(e) {
2542
+ if (!this.overviewWindowSelector) return;
2543
+ let t = e, n = this.overviewWindowSelector.close(t.x - this.offsetLeft);
2544
+ if (!(this.#e && n.start === n.end)) {
2545
+ if (delete this.overviewWindowSelector, n.end - n.start < 3) {
2546
+ if (this.clickHandler?.call(null, e)) return;
2547
+ let t = n.end;
2548
+ n.start = Math.max(0, t - Y / 2), n.end = Math.min(this.parentElement.clientWidth, t + Y / 2);
2549
+ } else n.end - n.start < Y && (this.parentElement.clientWidth - n.end > Y ? n.end = n.start + Y : n.start = n.end - Y);
2550
+ this.setWindowPosition(n.start, n.end);
2551
+ }
2552
+ }
2553
+ startWindowDragging(e) {
2554
+ let t = e;
2555
+ return this.dragStartPointPixel = t.pageX, this.dragStartLeftRatio = this.windowLeftRatio, this.dragStartRightRatio = this.windowRightRatio, e.stopPropagation(), !0;
2556
+ }
2557
+ windowDragging(e) {
2558
+ this.#t = !0, this.#e && this.breadcrumbButtonContainerElement.classList.toggle("is-breadcrumb-button-visible", !0);
2559
+ let t = e;
2560
+ t.preventDefault();
2561
+ let n = (t.pageX - this.dragStartPointPixel) / this.parentElement.clientWidth;
2562
+ this.dragStartLeftRatio + n < 0 && (n = -this.dragStartLeftRatio), this.dragStartRightRatio + n > 1 && (n = 1 - this.dragStartRightRatio), this.setWindowRatio(this.dragStartLeftRatio + n, this.dragStartRightRatio + n);
2563
+ }
2564
+ resizeWindowLeft(e) {
2565
+ this.#t = !0, e < X ? e = 0 : e > this.rightResizeElement.offsetLeft - 4 && (e = this.rightResizeElement.offsetLeft - 4), this.setWindowPosition(e, null);
2566
+ }
2567
+ resizeWindowRight(e) {
2568
+ this.#t = !0, e > this.parentElement.clientWidth - X ? e = this.parentElement.clientWidth : e < this.leftResizeElement.offsetLeft + Y && (e = this.leftResizeElement.offsetLeft + Y), this.setWindowPosition(null, e);
2569
+ }
2570
+ resizeWindowMaximum() {
2571
+ this.setWindowPosition(0, this.parentElement.clientWidth);
2572
+ }
2573
+ getRawSliderValue(e) {
2574
+ if (!this.calculator) throw Error("No calculator to calculate boundaries");
2575
+ let t = this.calculator.minimumBoundary(), n = this.calculator.maximumBoundary() - t;
2576
+ return e ? t + n * this.windowLeftRatio : t + n * this.windowRightRatio;
2577
+ }
2578
+ updateResizeElementAriaValue(e, t) {
2579
+ let n = e.toFixed(2), r = t.toFixed(2);
2580
+ be(this.leftResizeElement, n), be(this.rightResizeElement, r);
2581
+ let i = Number(r) - .5, a = Number(n) + .5;
2582
+ De(this.leftResizeElement, "0", i.toString()), De(this.rightResizeElement, a.toString(), "100");
2583
+ }
2584
+ updateResizeElementPositionLabels() {
2585
+ if (!this.calculator) return;
2586
+ let e = this.calculator.formatValue(this.getRawSliderValue(!0)), t = this.calculator.formatValue(this.getRawSliderValue(!1));
2587
+ O(this.leftResizeElement, String(e)), O(this.rightResizeElement, String(t));
2588
+ }
2589
+ updateResizeElementPercentageLabels(e, t) {
2590
+ O(this.leftResizeElement, e), O(this.rightResizeElement, t);
2591
+ }
2592
+ calculateWindowValue() {
2593
+ return {
2594
+ rawStartValue: this.getRawSliderValue(!0),
2595
+ rawEndValue: this.getRawSliderValue(!1)
2596
+ };
2597
+ }
2598
+ setWindowRatio(e, t) {
2599
+ this.windowLeftRatio = e, this.windowRightRatio = t, this.updateCurtains(), this.calculator && this.dispatchEventToListeners("WindowChangedWithPosition", this.calculateWindowValue()), this.dispatchEventToListeners("WindowChanged"), this.#r(e, t);
2600
+ }
2601
+ #r(e, t) {
2602
+ this.#e && (t >= 1 && e <= 0 || !this.#t ? this.breadcrumbButtonContainerElement.classList.toggle("is-breadcrumb-button-visible", !1) : this.breadcrumbButtonContainerElement.classList.toggle("is-breadcrumb-button-visible", !0));
2603
+ }
2604
+ #i() {
2605
+ this.dispatchEventToListeners("BreadcrumbAdded", this.calculateWindowValue());
2606
+ }
2607
+ updateCurtains() {
2608
+ let e = this.windowLeftRatio, t = this.windowRightRatio, n = e, r = t, i = r - n;
2609
+ if (this.parentElement.clientWidth !== 0) {
2610
+ let a = i * this.parentElement.clientWidth, o = Y / 2;
2611
+ if (a < o) {
2612
+ let s = o / a;
2613
+ n = (t + e - i * s) / 2, r = (t + e + i * s) / 2;
2614
+ }
2615
+ }
2616
+ let a = 100 * n, o = 100 * r, s = 100 - 100 * r, c = a + "%", l = o + "%";
2617
+ this.leftResizeElement.style.left = c, this.rightResizeElement.style.left = l, this.leftCurtainElement.style.width = c, this.rightCurtainElement.style.width = s + "%", this.breadcrumbButtonContainerElement.style.marginLeft = a > 0 ? a + "%" : "0%", this.breadcrumbButtonContainerElement.style.marginRight = s > 0 ? s + "%" : "0%", this.curtainsRange && (this.curtainsRange.textContent = this.getWindowRange().toFixed(0) + " ms"), this.updateResizeElementAriaValue(a, o), this.calculator ? this.updateResizeElementPositionLabels() : this.updateResizeElementPercentageLabels(c, l), this.toggleBreadcrumbZoomButtonDisplay();
2618
+ }
2619
+ toggleBreadcrumbZoomButtonDisplay() {
2620
+ this.breadcrumbZoomIcon && (this.getWindowRange() < 4.5 ? (this.breadcrumbZoomIcon.style.display = "none", this.breadcrumbButtonContainerElement.style.pointerEvents = "none") : (this.breadcrumbZoomIcon.style.display = "flex", this.breadcrumbButtonContainerElement.style.pointerEvents = "auto"));
2621
+ }
2622
+ getWindowRange() {
2623
+ if (!this.calculator) throw Error("No calculator to calculate window range");
2624
+ let e = this.windowLeftRatio > 0 ? this.windowLeftRatio : 0, t = this.windowRightRatio < 1 ? this.windowRightRatio : 1;
2625
+ return this.calculator.boundarySpan() * (t - e);
2626
+ }
2627
+ setWindowPosition(e, t) {
2628
+ let n = this.parentElement.clientWidth, r = typeof e == "number" ? e / n : this.windowLeftRatio, i = typeof t == "number" ? t / n : this.windowRightRatio;
2629
+ this.setWindowRatio(r || 0, i || 0);
2630
+ }
2631
+ onMouseWheel(e) {
2632
+ let t = e;
2633
+ if (this.resizeEnabled) {
2634
+ if (t.deltaY) {
2635
+ let e = t.offsetX / this.parentElement.clientWidth;
2636
+ this.zoom(1.1 ** (t.deltaY * .018867924528301886), e);
2637
+ }
2638
+ if (t.deltaX) {
2639
+ let e = Math.round(t.deltaX * vn), n = this.leftResizeElement.offsetLeft + yn, r = this.rightResizeElement.offsetLeft + yn;
2640
+ n - e < 0 && (e = n), r - e > this.parentElement.clientWidth && (e = r - this.parentElement.clientWidth), this.setWindowPosition(n - e, r - e), t.preventDefault();
2641
+ }
2642
+ }
2643
+ }
2644
+ zoom(e, t) {
2645
+ let n = this.windowLeftRatio || 0, i = this.windowRightRatio || 0, a = i - n, o = e * a;
2646
+ o > 1 && (o = 1, e = o / a), n = t + (n - t) * e, n = r(n, 0, 1 - o), i = t + (i - t) * e, i = r(i, o, 1), this.setWindowRatio(n, i);
2647
+ }
2648
+ }, Z = /* @__PURE__ */ function(e) {
2649
+ return e.WINDOW_CHANGED = "WindowChanged", e.WINDOW_CHANGED_WITH_POSITION = "WindowChangedWithPosition", e.BREADCRUMB_ADDED = "BreadcrumbAdded", e;
2650
+ }({}), xn = class {
2651
+ startPosition;
2652
+ width;
2653
+ windowSelector;
2654
+ constructor(e, t) {
2655
+ this.startPosition = t, this.width = e.offsetWidth, this.windowSelector = document.createElement("div"), this.windowSelector.className = "overview-grid-window-selector", this.windowSelector.style.left = this.startPosition + "px", this.windowSelector.style.right = this.width - this.startPosition + "px", e.appendChild(this.windowSelector);
2656
+ }
2657
+ close(e) {
2658
+ return e = Math.max(0, Math.min(e, this.width)), this.windowSelector.remove(), this.startPosition < e ? {
2659
+ start: this.startPosition,
2660
+ end: e
2661
+ } : {
2662
+ start: e,
2663
+ end: this.startPosition
2664
+ };
2665
+ }
2666
+ updatePosition(e) {
2667
+ e = Math.max(0, Math.min(e, this.width)), e < this.startPosition ? (this.windowSelector.style.left = e + "px", this.windowSelector.style.right = this.width - this.startPosition + "px") : (this.windowSelector.style.left = this.startPosition + "px", this.windowSelector.style.right = this.width - e + "px");
2668
+ }
2669
+ }, Sn = "/*\n * Copyright 2021 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.root {\n align-items: flex-start; /* keep chart at top so it doesnt change position as the legend changes height */\n display: flex;\n min-width: fit-content;\n white-space: nowrap;\n}\n\n.chart-root {\n position: relative;\n overflow: hidden;\n}\n\n.pie-chart-foreground {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 10;\n top: 0;\n display: flex;\n pointer-events: none;\n}\n\n.pie-chart-total {\n margin: auto;\n padding: 2px 5px;\n pointer-events: auto;\n}\n\n:focus {\n outline-style: none;\n}\n\n.pie-chart-total.selected {\n font-weight: bold;\n}\n\n.chart-root .slice.selected {\n stroke: var(--sys-color-primary);\n stroke-opacity: 100%;\n stroke-width: 0.04;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.pie-chart-legend {\n margin-left: 30px;\n}\n\n.pie-chart-legend-row {\n margin: 5px 2px 5px auto;\n padding-right: 25px;\n}\n\n.pie-chart-legend-row.selected {\n font-weight: bold;\n}\n\n.pie-chart-legend-row:focus-visible {\n box-shadow: 0 0 0 2px var(--sys-color-state-focus-ring) !important; /* stylelint-disable-line declaration-no-important */\n}\n\n.pie-chart-swatch {\n display: inline-block;\n width: 11px;\n height: 11px;\n margin: 0 6px;\n top: 1px;\n position: relative;\n border: 1px solid var(--sys-color-neutral-outline);\n}\n\n.pie-chart-name {\n display: inline-block;\n}\n\n.pie-chart-size {\n display: inline-block;\n text-align: right;\n width: 70px;\n}\n\n@media (forced-colors: active) {\n .pie-chart-swatch {\n forced-color-adjust: none;\n border-color: ButtonText;\n }\n\n .pie-chart-total {\n forced-color-adjust: none;\n background-color: canvas;\n }\n}\n", Cn = /* @__PURE__ */ e({ PieChart: () => Dn }), wn = { total: "Total" }, Tn = h("ui/legacy/components/perf_ui/PieChart.ts", wn), En = c.bind(void 0, Tn), Dn = class extends HTMLElement {
2670
+ shadow = this.attachShadow({ mode: "open" });
2671
+ chartName = "";
2672
+ size = 0;
2673
+ formatter = (e) => String(e);
2674
+ showLegend = !1;
2675
+ total = 0;
2676
+ slices = [];
2677
+ totalSelected = !0;
2678
+ sliceSelected = -1;
2679
+ innerR = .618;
2680
+ lastAngle = -Math.PI / 2;
2681
+ set data(e) {
2682
+ this.chartName = e.chartName, this.size = e.size, this.formatter = e.formatter, this.showLegend = e.showLegend, this.total = e.total, this.slices = e.slices, this.render();
2683
+ }
2684
+ render() {
2685
+ this.lastAngle = -Math.PI / 2, re(de`
2686
+ <style>${Sn}</style>
2687
+ <div class="root" role="group" @keydown=${this.onKeyDown} aria-label=${this.chartName}
2688
+ jslog=${_e().track({ keydown: "ArrowUp|ArrowDown" })}>
2689
+ <div class="chart-root" style="width: ${this.size}px; height: ${this.size}px;">
2690
+ ${ge`
2691
+ <svg>
2692
+ <g transform="scale(${this.size / 2}) translate(1, 1) scale(0.99, 0.99)">
2693
+ <circle r="1" stroke="hsl(0, 0%, 80%)" fill="transparent" stroke-width=${1 / this.size}></circle>
2694
+ <circle r=${this.innerR} stroke="hsl(0, 0%, 80%)" fill="transparent" stroke-width=${1 / this.size}></circle>
2695
+ ${this.slices.map((e, t) => {
2696
+ let n = this.sliceSelected === t, r = n && !this.showLegend ? "0" : "-1";
2697
+ return ge`<path class="slice ${n ? "selected" : ""}"
2698
+ jslog=${me().track({ click: !0 })}
2699
+ @click=${this.onSliceClicked(t)} tabIndex=${r}
2700
+ fill=${e.color} d=${this.getPathStringForSlice(e)}
2701
+ aria-label=${e.title} id=${n ? "selectedSlice" : ""}></path>`;
2702
+ })}
2703
+ <!-- This is so that the selected slice is re-drawn on top, to avoid re-ordering slices
2704
+ just to render them properly. -->
2705
+ <use href="#selectedSlice" />
2706
+ </g>
2707
+ </svg>
2708
+ `}
2709
+ <div class="pie-chart-foreground">
2710
+ <div class="pie-chart-total ${this.totalSelected ? "selected" : ""}" @click=${this.selectTotal}
2711
+ jslog=${ye("select-total").track({ click: !0 })}
2712
+ tabIndex=${this.totalSelected && !this.showLegend ? "1" : "-1"}>
2713
+ ${this.total ? this.formatter(this.total) : ""}
2714
+ </div>
2715
+ </div>
2716
+ </div>
2717
+ ${this.showLegend ? de`
2718
+ <div class="pie-chart-legend" jslog=${Me("legend")}>
2719
+ ${this.slices.map((e, t) => {
2720
+ let n = this.sliceSelected === t;
2721
+ return de`
2722
+ <div class="pie-chart-legend-row ${n ? "selected" : ""}"
2723
+ jslog=${me().track({ click: !0 })}
2724
+ @click=${this.onSliceClicked(t)} tabIndex=${n ? "0" : "-1"}>
2725
+ <div class="pie-chart-size">${this.formatter(e.value)}</div>
2726
+ <div class="pie-chart-swatch" style="background-color: ${e.color};"></div>
2727
+ <div class="pie-chart-name">${e.title}</div>
2728
+ </div>`;
2729
+ })}
2730
+ <div class="pie-chart-legend-row ${this.totalSelected ? "selected" : ""}"
2731
+ jslog=${ye("select-total").track({ click: !0 })}
2732
+ @click=${this.selectTotal} tabIndex=${this.totalSelected ? "0" : "-1"}>
2733
+ <div class="pie-chart-size">${this.formatter(this.total)}</div>
2734
+ <div class="pie-chart-swatch"></div>
2735
+ <div class="pie-chart-name">${En(wn.total)}</div>
2736
+ </div>
2737
+ </div>
2738
+ ` : ""}
2739
+ </div>
2740
+ `, this.shadow, { host: this });
2741
+ }
2742
+ onSliceClicked(e) {
2743
+ return () => {
2744
+ this.selectSlice(e);
2745
+ };
2746
+ }
2747
+ selectSlice(e) {
2748
+ this.totalSelected = !1, this.sliceSelected = e, this.render();
2749
+ }
2750
+ selectTotal() {
2751
+ this.totalSelected = !0, this.sliceSelected = -1, this.render();
2752
+ }
2753
+ selectAndFocusTotal() {
2754
+ this.selectTotal();
2755
+ let e = this.shadow.querySelector(".pie-chart-legend > :last-child");
2756
+ e && e.focus();
2757
+ }
2758
+ selectAndFocusSlice(e) {
2759
+ this.selectSlice(e);
2760
+ let t = this.shadow.querySelector(`.pie-chart-legend > :nth-child(${e + 1})`);
2761
+ t && t.focus();
2762
+ }
2763
+ focusNextElement() {
2764
+ this.totalSelected ? this.selectAndFocusSlice(0) : this.sliceSelected === this.slices.length - 1 ? this.selectAndFocusTotal() : this.selectAndFocusSlice(this.sliceSelected + 1);
2765
+ }
2766
+ focusPreviousElement() {
2767
+ this.totalSelected ? this.selectAndFocusSlice(this.slices.length - 1) : this.sliceSelected === 0 ? this.selectAndFocusTotal() : this.selectAndFocusSlice(this.sliceSelected - 1);
2768
+ }
2769
+ onKeyDown(e) {
2770
+ let t = !1;
2771
+ e.key === "ArrowDown" ? (this.focusNextElement(), t = !0) : e.key === "ArrowUp" && (this.focusPreviousElement(), t = !0), t && (e.stopImmediatePropagation(), e.preventDefault());
2772
+ }
2773
+ getPathStringForSlice(e) {
2774
+ let t = e.value / this.total * 2 * Math.PI;
2775
+ if (!isFinite(t)) return;
2776
+ t = Math.min(t, 2 * Math.PI * .9999);
2777
+ let n = Math.cos(this.lastAngle), r = Math.sin(this.lastAngle);
2778
+ this.lastAngle += t;
2779
+ let i = Math.cos(this.lastAngle), a = Math.sin(this.lastAngle), o = this.innerR, s = i * o, c = a * o, l = n * o, u = r * o, d = +(t > Math.PI);
2780
+ return `M${n},${r} A1,1,0,${d},1,${i},${a} L${s},${c} A${o},${o},0,${d},0,${l},${u} Z`;
2781
+ }
2782
+ };
2783
+ customElements.define("devtools-perf-piechart", Dn);
2784
+ //#endregion
2785
+ //#region node_modules/.pnpm/chrome-devtools-frontend@1.0.1638082/node_modules/chrome-devtools-frontend/front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.ts
2786
+ var On = /* @__PURE__ */ e({ TimelineOverviewCalculator: () => kn }), kn = class {
2787
+ #e = j(0);
2788
+ #t = j(100);
2789
+ #n = 0;
2790
+ navStartTimes;
2791
+ computePosition(e) {
2792
+ return (e - this.#e) / this.boundarySpan() * this.#n;
2793
+ }
2794
+ positionToTime(e) {
2795
+ return this.#n === 0 ? j(0) : j(e / this.#n * this.boundarySpan() + this.#e);
2796
+ }
2797
+ setBounds(e, t) {
2798
+ this.#e = e, this.#t = t;
2799
+ }
2800
+ setNavStartTimes(e) {
2801
+ this.navStartTimes = e;
2802
+ }
2803
+ setDisplayWidth(e) {
2804
+ this.#n = e;
2805
+ }
2806
+ reset() {
2807
+ this.setBounds(j(0), j(100));
2808
+ }
2809
+ formatValue(e, t) {
2810
+ if (this.navStartTimes) for (let t = this.navStartTimes.length - 1; t >= 0; t--) {
2811
+ let n = A(this.navStartTimes[t].ts);
2812
+ if (e > n) {
2813
+ e = j(e - (n - this.zeroTime()));
2814
+ break;
2815
+ }
2816
+ }
2817
+ return d(e - this.zeroTime(), t);
2818
+ }
2819
+ maximumBoundary() {
2820
+ return this.#t;
2821
+ }
2822
+ minimumBoundary() {
2823
+ return this.#e;
2824
+ }
2825
+ zeroTime() {
2826
+ return this.#e;
2827
+ }
2828
+ boundarySpan() {
2829
+ return j(this.#t - this.#e);
2830
+ }
2831
+ }, Q = null, $ = class e extends Event {
2832
+ state;
2833
+ updateType;
2834
+ options;
2835
+ static eventName = "traceboundsstatechanged";
2836
+ constructor(t, n, r = { shouldAnimate: !1 }) {
2837
+ super(e.eventName, {
2838
+ composed: !0,
2839
+ bubbles: !0
2840
+ }), this.state = t, this.updateType = n, this.options = r;
2841
+ }
2842
+ };
2843
+ function An(e) {
2844
+ jn.instance().addEventListener($.eventName, e);
2845
+ }
2846
+ var jn = class e extends EventTarget {
2847
+ static instance(t = { forceNew: null }) {
2848
+ let n = !!t.forceNew;
2849
+ return (!Q || n) && (Q = new e()), Q;
2850
+ }
2851
+ static removeInstance() {
2852
+ Q = null;
2853
+ }
2854
+ #e = null;
2855
+ constructor() {
2856
+ super();
2857
+ }
2858
+ resetWithNewBounds(e) {
2859
+ return this.#e = {
2860
+ entireTraceBounds: e,
2861
+ minimapTraceBounds: e,
2862
+ timelineTraceWindow: e
2863
+ }, this.dispatchEvent(new $(this.state(), "RESET")), this;
2864
+ }
2865
+ state() {
2866
+ if (this.#e === null) return null;
2867
+ let e = We(this.#e.entireTraceBounds), t = We(this.#e.minimapTraceBounds), n = We(this.#e.timelineTraceWindow);
2868
+ return {
2869
+ micro: this.#e,
2870
+ milli: {
2871
+ entireTraceBounds: e,
2872
+ minimapTraceBounds: t,
2873
+ timelineTraceWindow: n
2874
+ }
2875
+ };
2876
+ }
2877
+ setMiniMapBounds(e) {
2878
+ if (!this.#e) {
2879
+ console.error("TraceBounds.setMiniMapBounds could not set bounds because there is no existing trace window set.");
2880
+ return;
2881
+ }
2882
+ let t = this.#e.minimapTraceBounds;
2883
+ e.min === t.min && e.max === t.max || e.range < 1e3 || (this.#e.minimapTraceBounds = e, this.dispatchEvent(new $(this.state(), "MINIMAP_BOUNDS")));
2884
+ }
2885
+ setTimelineVisibleWindow(e, t = {
2886
+ shouldAnimate: !1,
2887
+ ignoreMiniMapBounds: !1
2888
+ }) {
2889
+ if (!this.#e) {
2890
+ console.error("TraceBounds.setTimelineVisibleWindow could not set bounds because there is no existing trace window set.");
2891
+ return;
2892
+ }
2893
+ let n = this.#e.timelineTraceWindow;
2894
+ e.range < 1e3 || e.min === n.min && e.max === n.max || (t.ignoreMiniMapBounds || (e.min = Je(Math.max(this.#e.minimapTraceBounds.min, e.min)), e.max = Je(Math.min(this.#e.minimapTraceBounds.max, e.max))), !(e.min === n.min && e.max === n.max) && (this.#e.timelineTraceWindow = e, this.dispatchEvent(new $(this.state(), "VISIBLE_WINDOW", { shouldAnimate: t.shouldAnimate }))));
2895
+ }
2896
+ }, Mn = "/*\n * Copyright 2017 The Chromium Authors\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.overview-info:not(:empty) {\n display: flex;\n background: var(--sys-color-cdt-base-container);\n box-shadow: var(--sys-elevation-level2);\n padding: var(--sys-size-4);\n border-radius: var(--sys-shape-corner-small);\n}\n\n.overview-info .frame .time {\n display: none;\n}\n\n.overview-info .frame .thumbnail img {\n max-width: 50vw;\n max-height: 50vh;\n}\n", Nn = /* @__PURE__ */ e({
2897
+ Events: () => Fn,
2898
+ OverviewInfo: () => Ln,
2899
+ TimelineOverviewBase: () => In,
2900
+ TimelineOverviewPane: () => Pn
2901
+ }), Pn = class extends f(E) {
2902
+ overviewCalculator;
2903
+ overviewGrid;
2904
+ cursorArea;
2905
+ cursorElement;
2906
+ overviewControls = [];
2907
+ markers = /* @__PURE__ */ new Map();
2908
+ overviewInfo;
2909
+ updateThrottler = new p(100);
2910
+ cursorEnabled = !1;
2911
+ cursorPosition = 0;
2912
+ lastWidth = 0;
2913
+ windowStartTime = j(0);
2914
+ windowEndTime = j(Infinity);
2915
+ muteOnWindowChanged = !1;
2916
+ hasPointer = !1;
2917
+ #e;
2918
+ #t = this.#n.bind(this);
2919
+ constructor(e) {
2920
+ super(), this.element.id = e + "-overview-pane", this.overviewCalculator = new kn(), this.overviewGrid = new _n(e, this.overviewCalculator), this.overviewGrid.element.setAttribute("jslog", `${Ce(`${e}-overview`).track({
2921
+ click: !0,
2922
+ drag: !0,
2923
+ hover: !0
2924
+ })}`), this.element.appendChild(this.overviewGrid.element), this.cursorArea = this.overviewGrid.element.createChild("div", "overview-grid-cursor-area"), this.cursorElement = this.overviewGrid.element.createChild("div", "overview-grid-cursor-position"), this.cursorArea.addEventListener("pointerdown", this.onMouseDown.bind(this), !0), this.cursorArea.addEventListener("pointerup", this.onMouseCancel.bind(this), !0), this.cursorArea.addEventListener("pointercancel", this.onMouseCancel.bind(this), !0), this.cursorArea.addEventListener("pointermove", this.onMouseMove.bind(this), !0), this.cursorArea.addEventListener("pointerleave", this.hideCursor.bind(this), !0), this.overviewGrid.setResizeEnabled(!1), this.overviewGrid.addEventListener(Z.WINDOW_CHANGED_WITH_POSITION, this.onWindowChanged, this), this.overviewGrid.addEventListener(Z.BREADCRUMB_ADDED, this.onBreadcrumbAdded, this), this.overviewGrid.setClickHandler(this.onClick.bind(this)), this.overviewInfo = new Ln(this.cursorElement), this.#e = T(this.element, "svg", "timeline-minimap-dim-highlight-svg hidden"), this.#i();
2925
+ }
2926
+ enableCreateBreadcrumbsButton() {
2927
+ let e = this.overviewGrid.enableCreateBreadcrumbsButton();
2928
+ e.addEventListener("pointerdown", this.onMouseDown.bind(this), !0), e.addEventListener("pointerup", this.onMouseCancel.bind(this), !0), e.addEventListener("pointercancel", this.onMouseCancel.bind(this), !0), e.addEventListener("pointermove", this.onMouseMove.bind(this), !0), e.addEventListener("pointerleave", this.hideCursor.bind(this), !0);
2929
+ }
2930
+ onMouseDown(e) {
2931
+ e.target instanceof HTMLElement && (e.target.setPointerCapture(e.pointerId), this.overviewInfo.hide(), this.hasPointer = !0);
2932
+ }
2933
+ onMouseCancel(e) {
2934
+ e.target instanceof HTMLElement && (e.target.releasePointerCapture(e.pointerId), this.overviewInfo.show(), this.hasPointer = !1);
2935
+ }
2936
+ onMouseMove(e) {
2937
+ if (!this.cursorEnabled) return;
2938
+ let t = e, n = e.target.getBoundingClientRect().left - this.cursorArea.getBoundingClientRect().left;
2939
+ this.cursorPosition = t.offsetX + n, this.cursorElement.style.left = this.cursorPosition + "px", this.cursorElement.style.visibility = "visible";
2940
+ let r = this.overviewCalculator.positionToTime(this.cursorPosition), i = this.overviewGrid.calculateWindowValue();
2941
+ if (j(i.rawStartValue) <= r && r <= j(i.rawEndValue)) {
2942
+ let e = Ge(r);
2943
+ this.dispatchEventToListeners("OverviewPaneMouseMove", { timeInMicroSeconds: e });
2944
+ } else this.dispatchEventToListeners("OverviewPaneMouseLeave");
2945
+ this.hasPointer || this.overviewInfo.setContent(this.buildOverviewInfo());
2946
+ }
2947
+ async buildOverviewInfo() {
2948
+ let e = this.element.ownerDocument, t = this.cursorPosition, n = await Promise.all(this.overviewControls.map((e) => e.overviewInfoPromise(t))), r = e.createDocumentFragment(), i = n.filter((e) => e !== null);
2949
+ return r.append(...i), r;
2950
+ }
2951
+ hideCursor() {
2952
+ this.cursorElement.style.visibility = "hidden", this.dispatchEventToListeners("OverviewPaneMouseLeave"), this.overviewInfo.hide();
2953
+ }
2954
+ #n() {
2955
+ this.scheduleUpdate();
2956
+ }
2957
+ wasShown() {
2958
+ super.wasShown();
2959
+ let e = jn.instance().state()?.milli.minimapTraceBounds.min, t = jn.instance().state()?.milli.minimapTraceBounds.max;
2960
+ this.update(e, t), M.instance().addEventListener(N.eventName, this.#t);
2961
+ }
2962
+ willHide() {
2963
+ M.instance().removeEventListener(N.eventName, this.#t), this.overviewInfo.hide(), super.willHide();
2964
+ }
2965
+ onResize() {
2966
+ let e = this.element.offsetWidth;
2967
+ e !== this.lastWidth && (this.lastWidth = e, this.scheduleUpdate());
2968
+ }
2969
+ setOverviewControls(e) {
2970
+ for (let e = 0; e < this.overviewControls.length; ++e) this.overviewControls[e].dispose();
2971
+ for (let t = 0; t < e.length; ++t) e[t].setCalculator(this.overviewCalculator), e[t].show(this.overviewGrid.element);
2972
+ this.overviewControls = e, this.update();
2973
+ }
2974
+ set showingScreenshots(e) {
2975
+ this.overviewGrid.showingScreenshots = e;
2976
+ }
2977
+ setBounds(e, t) {
2978
+ e === this.overviewCalculator.minimumBoundary() && t === this.overviewCalculator.maximumBoundary() || (this.overviewCalculator.setBounds(e, t), this.overviewGrid.setResizeEnabled(!0), this.cursorEnabled = !0, this.scheduleUpdate(e, t));
2979
+ }
2980
+ setNavStartTimes(e) {
2981
+ this.overviewCalculator.setNavStartTimes(e);
2982
+ }
2983
+ scheduleUpdate(e, t) {
2984
+ this.updateThrottler.schedule(async () => {
2985
+ this.update(e, t);
2986
+ });
2987
+ }
2988
+ update(e, t) {
2989
+ if (this.isShowing()) {
2990
+ this.overviewCalculator.setDisplayWidth(this.overviewGrid.clientWidth());
2991
+ for (let n = 0; n < this.overviewControls.length; ++n) this.overviewControls[n].update(e, t);
2992
+ this.overviewGrid.updateDividers(this.overviewCalculator), this.updateMarkers(), this.updateWindow();
2993
+ }
2994
+ }
2995
+ setMarkers(e) {
2996
+ this.markers = e;
2997
+ }
2998
+ #r(e) {
2999
+ for (let t of this.markers.keys()) {
3000
+ let n = this.markers.get(t);
3001
+ if (!n) continue;
3002
+ let r = Ge(j(t)), i = e && !Ye(e, r);
3003
+ n.style.filter = `grayscale(${+!!i})`;
3004
+ }
3005
+ }
3006
+ updateMarkers() {
3007
+ let e = /* @__PURE__ */ new Map();
3008
+ for (let t of this.markers.keys()) {
3009
+ let n = this.markers.get(t), r = Math.round(this.overviewCalculator.computePosition(j(t)));
3010
+ e.has(r) || (e.set(r, n), n.style.left = r + "px");
3011
+ }
3012
+ this.overviewGrid.removeEventDividers(), this.overviewGrid.addEventDividers([...e.values()]);
3013
+ }
3014
+ reset() {
3015
+ this.windowStartTime = j(0), this.windowEndTime = j(Infinity), this.overviewCalculator.reset(), this.overviewGrid.reset(), this.overviewGrid.setResizeEnabled(!1), this.cursorEnabled = !1, this.hideCursor(), this.markers = /* @__PURE__ */ new Map();
3016
+ for (let e of this.overviewControls) e.reset();
3017
+ this.overviewInfo.hide(), this.scheduleUpdate();
3018
+ }
3019
+ onClick(e) {
3020
+ return this.overviewControls.some((t) => t.onClick(e));
3021
+ }
3022
+ onBreadcrumbAdded() {
3023
+ this.dispatchEventToListeners("OverviewPaneBreadcrumbAdded", {
3024
+ startTime: j(this.windowStartTime),
3025
+ endTime: j(this.windowEndTime)
3026
+ });
3027
+ }
3028
+ onWindowChanged(e) {
3029
+ if (this.muteOnWindowChanged || !this.overviewControls.length) return;
3030
+ this.windowStartTime = j(e.data.rawStartValue === this.overviewCalculator.minimumBoundary() ? 0 : e.data.rawStartValue), this.windowEndTime = j(e.data.rawEndValue === this.overviewCalculator.maximumBoundary() ? Infinity : e.data.rawEndValue);
3031
+ let t = {
3032
+ startTime: j(this.windowStartTime),
3033
+ endTime: j(this.windowEndTime)
3034
+ };
3035
+ this.dispatchEventToListeners("OverviewPaneWindowChanged", t);
3036
+ }
3037
+ setWindowTimes(e, t) {
3038
+ e === this.windowStartTime && t === this.windowEndTime || (this.windowStartTime = e, this.windowEndTime = t, this.updateWindow(), this.dispatchEventToListeners("OverviewPaneWindowChanged", {
3039
+ startTime: j(e),
3040
+ endTime: j(t)
3041
+ }));
3042
+ }
3043
+ updateWindow() {
3044
+ if (!this.overviewControls.length) return;
3045
+ let e = this.overviewCalculator.minimumBoundary(), t = this.overviewCalculator.maximumBoundary() - e, n = e > 0, r = n && this.windowStartTime ? Math.min((this.windowStartTime - e) / t, 1) : 0, i = n && this.windowEndTime < Infinity ? (this.windowEndTime - e) / t : 1;
3046
+ this.muteOnWindowChanged = !0, this.overviewGrid.setWindowRatio(r, i), this.muteOnWindowChanged = !1;
3047
+ }
3048
+ #i() {
3049
+ let e = T(T(this.#e, "defs"), "mask");
3050
+ e.id = "dim-highlight-cutouts";
3051
+ let t = T(e, "rect");
3052
+ t.setAttribute("width", "100%"), t.setAttribute("height", "100%"), t.setAttribute("fill", "hsl(0deg 0% 95%)");
3053
+ let n = T(this.#e, "rect", "background");
3054
+ n.setAttribute("width", "100%"), n.setAttribute("height", "100%"), n.setAttribute("fill", M.instance().getComputedValue("--color-background")), n.setAttribute("mask", `url(#${e.id})`), n.style.mixBlendMode = "saturation";
3055
+ let r = T(e, "rect", "punch");
3056
+ r.setAttribute("y", "0"), r.setAttribute("height", "100%"), r.setAttribute("fill", "black");
3057
+ let i = M.instance().getComputedValue("--sys-color-state-on-header-hover");
3058
+ T(this.#e, "polygon").setAttribute("fill", i), M.instance().addEventListener(N.eventName, () => {
3059
+ this.#e.querySelector("rect.background")?.setAttribute("fill", M.instance().getComputedValue("--color-background")), this.#e.querySelector("polygon")?.setAttribute("fill", M.instance().getComputedValue("--sys-color-state-on-header-hover"));
3060
+ });
3061
+ }
3062
+ #a(e, t) {
3063
+ let n = this.#e.querySelector("polygon");
3064
+ n?.setAttribute("points", `${e},0 ${e},5 ${e + 5 - 1},1 ${t - 5 - 1},1 ${t},5 ${t},0`), n?.classList.remove("hidden");
3065
+ }
3066
+ #o() {
3067
+ this.#e.querySelector("polygon")?.classList.add("hidden");
3068
+ }
3069
+ highlightBounds(e, t) {
3070
+ let n = this.overviewCalculator.computePosition(A(e.min)), r = this.overviewCalculator.computePosition(A(e.max));
3071
+ this.#r(e);
3072
+ let i = this.#e.querySelector("rect.punch");
3073
+ i?.setAttribute("x", n.toString()), i?.setAttribute("width", (r - n).toString()), t ? this.#a(n, r) : this.#o(), this.#e.classList.remove("hidden");
3074
+ }
3075
+ clearBoundsHighlight() {
3076
+ this.#r(), this.#e.classList.add("hidden");
3077
+ }
3078
+ }, Fn = /* @__PURE__ */ function(e) {
3079
+ return e.OVERVIEW_PANE_WINDOW_CHANGED = "OverviewPaneWindowChanged", e.OVERVIEW_PANE_BREADCRUMB_ADDED = "OverviewPaneBreadcrumbAdded", e.OVERVIEW_PANE_MOUSE_MOVE = "OverviewPaneMouseMove", e.OVERVIEW_PANE_MOUSE_LEAVE = "OverviewPaneMouseLeave", e;
3080
+ }({}), In = class extends E {
3081
+ #e;
3082
+ canvas;
3083
+ #t;
3084
+ constructor() {
3085
+ super(), this.#e = null, this.canvas = this.element.createChild("canvas", "fill"), this.#t = this.canvas.getContext("2d");
3086
+ }
3087
+ width() {
3088
+ return this.canvas.width;
3089
+ }
3090
+ height() {
3091
+ return this.canvas.height;
3092
+ }
3093
+ context() {
3094
+ if (!this.#t) throw Error("Unable to retrieve canvas context");
3095
+ return this.#t;
3096
+ }
3097
+ calculator() {
3098
+ return this.#e;
3099
+ }
3100
+ update() {
3101
+ throw Error("Not implemented");
3102
+ }
3103
+ dispose() {
3104
+ this.detach();
3105
+ }
3106
+ reset() {}
3107
+ async overviewInfoPromise(e) {
3108
+ return null;
3109
+ }
3110
+ setCalculator(e) {
3111
+ this.#e = e;
3112
+ }
3113
+ onClick(e) {
3114
+ return !1;
3115
+ }
3116
+ resetCanvas() {
3117
+ this.element.clientWidth && this.setCanvasSize(this.element.clientWidth, this.element.clientHeight);
3118
+ }
3119
+ setCanvasSize(e, t) {
3120
+ this.canvas.width = e * window.devicePixelRatio, this.canvas.height = t * window.devicePixelRatio;
3121
+ }
3122
+ }, Ln = class {
3123
+ anchorElement;
3124
+ glassPane;
3125
+ visible;
3126
+ element;
3127
+ constructor(e) {
3128
+ this.anchorElement = e, this.glassPane = new ze(), this.glassPane.setPointerEventsBehavior(fe.PIERCE_CONTENTS), this.glassPane.setMarginBehavior(ee.DEFAULT_MARGIN), this.glassPane.setSizeBehavior(oe.MEASURE_CONTENT), this.visible = !1, this.element = Ie(this.glassPane.contentElement, { cssFile: Mn }).createChild("div", "overview-info");
3129
+ }
3130
+ async setContent(e) {
3131
+ this.visible = !0;
3132
+ let t = await e;
3133
+ this.visible && (this.element.removeChildren(), this.element.appendChild(t), this.glassPane.setContentAnchorBox(this.anchorElement.boxInWindow()), this.glassPane.isShowing() || this.glassPane.show(this.anchorElement.ownerDocument));
3134
+ }
3135
+ hide() {
3136
+ this.visible = !1, this.glassPane.hide();
3137
+ }
3138
+ show() {
3139
+ this.visible = !0, this.glassPane.show(window.document);
3140
+ }
3141
+ };
3142
+ //#endregion
3143
+ export { Bt as A, qt as C, Pt as D, Vt as E, L as F, ft as I, I as L, Nt as M, R as N, Ft as O, mt as P, ot as R, Jt as S, Ht as T, un as _, jn as a, Xt as b, Dn as c, _n as d, mn as f, cn as g, fn as h, Nn as i, gt as j, Lt as k, Cn as l, on as m, In as n, An as o, bn as p, Pn as r, On as s, Fn as t, Z as u, tn as v, Gt as w, Yt as x, rn as y, Ze as z };