ember-native-devtools 1.0.2

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 (468) hide show
  1. package/bin/devtools.js +95 -0
  2. package/download/chrome-devtools-frontend.appspot.com/robots.txt/index.html +4 -0
  3. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/3d-center.svg +1 -0
  4. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/3d-pan.svg +1 -0
  5. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/3d-rotate.svg +1 -0
  6. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/Images.js +259 -0
  7. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-back.svg +1 -0
  8. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-bottom.png +0 -0
  9. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-front.svg +1 -0
  10. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-left.png +0 -0
  11. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-right.png +0 -0
  12. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/accelerometer-top.png +0 -0
  13. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/account-box.svg +1 -0
  14. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-center.svg +1 -0
  15. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-end.svg +1 -0
  16. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-space-around.svg +1 -0
  17. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-space-between.svg +1 -0
  18. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-space-evenly.svg +1 -0
  19. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-start.svg +1 -0
  20. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-content-stretch.svg +1 -0
  21. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-baseline.svg +1 -0
  22. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-center.svg +1 -0
  23. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-end.svg +1 -0
  24. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-start.svg +1 -0
  25. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-items-stretch.svg +1 -0
  26. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-self-center.svg +1 -0
  27. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-self-end.svg +1 -0
  28. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-self-start.svg +1 -0
  29. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/align-self-stretch.svg +1 -0
  30. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-back.svg +1 -0
  31. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-down.svg +1 -0
  32. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-drop-down-dark.svg +1 -0
  33. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-drop-down-light.svg +1 -0
  34. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-forward.svg +1 -0
  35. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-up-down-circle.svg +1 -0
  36. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-up-down.svg +1 -0
  37. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/arrow-up.svg +1 -0
  38. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bell.svg +1 -0
  39. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bezier-curve-filled.svg +1 -0
  40. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bin.svg +1 -0
  41. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bottom-panel-close.svg +1 -0
  42. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bottom-panel-open.svg +1 -0
  43. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/brackets.svg +1 -0
  44. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/breakpoint-circle.svg +1 -0
  45. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/breakpoint-crossed-filled.svg +1 -0
  46. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/breakpoint-crossed.svg +1 -0
  47. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/brush-filled.svg +1 -0
  48. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/brush.svg +1 -0
  49. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bug.svg +1 -0
  50. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/bundle.svg +1 -0
  51. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/calendar-today.svg +1 -0
  52. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/check-circle.svg +1 -0
  53. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/check-double.svg +1 -0
  54. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/checker.svg +1 -0
  55. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/checkmark.svg +1 -0
  56. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-double-right.svg +1 -0
  57. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-down.svg +1 -0
  58. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-left-dot.svg +1 -0
  59. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-left.svg +1 -0
  60. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-right.svg +1 -0
  61. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chevron-up.svg +1 -0
  62. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chromeLeft.avif +0 -0
  63. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chromeMiddle.avif +0 -0
  64. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/chromeRight.avif +0 -0
  65. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/class.svg +1 -0
  66. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/clear-list.svg +1 -0
  67. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/clear.svg +1 -0
  68. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cloud.svg +1 -0
  69. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/code-circle.svg +1 -0
  70. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/code.svg +1 -0
  71. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/colon.svg +1 -0
  72. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/color-picker-filled.svg +1 -0
  73. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/color-picker.svg +1 -0
  74. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/console-conditional-breakpoint.svg +1 -0
  75. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/console-logpoint.svg +1 -0
  76. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cookie.svg +1 -0
  77. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/copy.svg +1 -0
  78. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/corporate-fare.svg +1 -0
  79. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/credit-card.svg +1 -0
  80. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cross-circle-filled.svg +1 -0
  81. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cross-circle.svg +1 -0
  82. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cross.svg +1 -0
  83. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/cssoverview_icons_2x.avif +0 -0
  84. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/custom-typography.svg +1 -0
  85. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/database.svg +1 -0
  86. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/deployed.svg +1 -0
  87. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/device-fold.svg +1 -0
  88. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/devices.svg +1 -0
  89. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/devtools.svg +1 -0
  90. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dock-bottom.svg +1 -0
  91. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dock-left.svg +1 -0
  92. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dock-right.svg +1 -0
  93. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dock-window.svg +1 -0
  94. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/document.svg +1 -0
  95. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dog-paw.svg +1 -0
  96. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dots-horizontal.svg +1 -0
  97. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/dots-vertical.svg +1 -0
  98. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/download.svg +1 -0
  99. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/edit.svg +1 -0
  100. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/empty.svg +1 -0
  101. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/errorWave.svg +1 -0
  102. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/exclamation.svg +1 -0
  103. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/experiment-check.svg +1 -0
  104. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/experiment.svg +1 -0
  105. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/extension.svg +1 -0
  106. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/eye.svg +1 -0
  107. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-document.svg +1 -0
  108. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-fetch-xhr.svg +1 -0
  109. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-font.svg +1 -0
  110. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-generic.svg +1 -0
  111. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-image.svg +1 -0
  112. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-json.svg +1 -0
  113. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-manifest.svg +1 -0
  114. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-media.svg +1 -0
  115. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-script.svg +1 -0
  116. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-snippet.svg +1 -0
  117. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-stylesheet.svg +1 -0
  118. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-wasm.svg +1 -0
  119. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/file-websocket.svg +1 -0
  120. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/filter-clear.svg +1 -0
  121. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/filter-filled.svg +1 -0
  122. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/filter.svg +1 -0
  123. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/flex-direction.svg +1 -0
  124. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/flex-no-wrap.svg +1 -0
  125. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/flex-wrap.svg +1 -0
  126. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/flow.svg +1 -0
  127. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/fold-more.svg +1 -0
  128. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/folder.svg +1 -0
  129. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/frame-crossed.svg +1 -0
  130. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/frame-icon.svg +1 -0
  131. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/frame.svg +1 -0
  132. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/gear-filled.svg +1 -0
  133. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/gear.svg +1 -0
  134. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/gears.svg +1 -0
  135. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/globe.svg +1 -0
  136. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/google.svg +1 -0
  137. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/goto-filled.svg +1 -0
  138. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/heap-snapshot.svg +1 -0
  139. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/heap-snapshots.svg +1 -0
  140. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/help.svg +1 -0
  141. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/hover.svg +1 -0
  142. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/iframe-crossed.svg +1 -0
  143. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/iframe.svg +1 -0
  144. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/import.svg +1 -0
  145. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/indeterminate-question-box.svg +1 -0
  146. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/info-filled.svg +1 -0
  147. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/info.svg +1 -0
  148. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/issue-cross-filled.svg +1 -0
  149. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/issue-exclamation-filled.svg +1 -0
  150. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/issue-questionmark-filled.svg +1 -0
  151. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/issue-text-filled.svg +1 -0
  152. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-center.svg +1 -0
  153. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-end.svg +1 -0
  154. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-space-around.svg +1 -0
  155. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-space-between.svg +1 -0
  156. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-space-evenly.svg +1 -0
  157. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-content-start.svg +1 -0
  158. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-items-center.svg +1 -0
  159. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-items-end.svg +1 -0
  160. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-items-start.svg +1 -0
  161. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/justify-items-stretch.svg +1 -0
  162. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/keyboard-arrow-right.svg +1 -0
  163. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/keyboard-pen.svg +1 -0
  164. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/keyboard.svg +1 -0
  165. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/large-arrow-right-filled.svg +1 -0
  166. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/layers-filled.svg +1 -0
  167. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/layers.svg +1 -0
  168. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/left-panel-close.svg +1 -0
  169. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/left-panel-open.svg +1 -0
  170. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/lightbulb-spark.svg +1 -0
  171. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/lightbulb.svg +1 -0
  172. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/lighthouse_logo.svg +1 -0
  173. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/list.svg +1 -0
  174. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/location-on.svg +1 -0
  175. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/lock.svg +1 -0
  176. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/match-case.svg +1 -0
  177. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/match-whole-word.svg +1 -0
  178. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/memory.svg +1 -0
  179. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/minus.svg +1 -0
  180. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/mop.svg +1 -0
  181. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/mouse.svg +1 -0
  182. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/navigationControls.png +0 -0
  183. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/navigationControls_2x.png +0 -0
  184. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/network-settings.svg +1 -0
  185. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/nodeIcon.avif +0 -0
  186. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/open-externally.svg +1 -0
  187. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/pause.svg +1 -0
  188. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/pen-spark.svg +1 -0
  189. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/performance.svg +1 -0
  190. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/person.svg +1 -0
  191. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/play.svg +1 -0
  192. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/plus.svg +1 -0
  193. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/policy.svg +1 -0
  194. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/popoverArrows.png +0 -0
  195. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/popup.svg +1 -0
  196. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/preview_feature_video_thumbnail.svg +1 -0
  197. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/profile.svg +1 -0
  198. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/psychiatry.svg +1 -0
  199. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/record-start.svg +1 -0
  200. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/record-stop.svg +1 -0
  201. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/redo.svg +1 -0
  202. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/refresh.svg +1 -0
  203. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/regular-expression.svg +1 -0
  204. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/replace.svg +1 -0
  205. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/replay.svg +1 -0
  206. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/report.svg +1 -0
  207. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/resizeDiagonal.svg +1 -0
  208. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/resizeHorizontal.svg +1 -0
  209. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/resizeVertical.svg +1 -0
  210. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/resume.svg +1 -0
  211. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/review.svg +1 -0
  212. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/right-panel-close.svg +1 -0
  213. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/right-panel-open.svg +1 -0
  214. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/scissors.svg +1 -0
  215. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/screen-rotation.svg +1 -0
  216. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/search.svg +1 -0
  217. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/select-element.svg +1 -0
  218. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/send.svg +1 -0
  219. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/shadow.svg +1 -0
  220. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/small-status-dot.svg +1 -0
  221. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/snippet.svg +1 -0
  222. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/spark-info.svg +1 -0
  223. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/spark.svg +1 -0
  224. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/star.svg +1 -0
  225. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/step-into.svg +1 -0
  226. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/step-out.svg +1 -0
  227. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/step-over.svg +1 -0
  228. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/step.svg +1 -0
  229. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/stop.svg +1 -0
  230. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/symbol.svg +1 -0
  231. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/sync.svg +1 -0
  232. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/table.svg +1 -0
  233. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/thumb-down.svg +1 -0
  234. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/thumb-up.svg +1 -0
  235. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/toolbarResizerVertical.png +0 -0
  236. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/top-panel-close.svg +1 -0
  237. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/top-panel-open.svg +1 -0
  238. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/touch-app.svg +1 -0
  239. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/touchCursor.png +0 -0
  240. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/touchCursor_2x.png +0 -0
  241. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-bottom-right.svg +1 -0
  242. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-down.svg +1 -0
  243. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-left.svg +1 -0
  244. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-right.svg +1 -0
  245. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/triangle-up.svg +1 -0
  246. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/tune.svg +1 -0
  247. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/undo.svg +1 -0
  248. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/warning-filled.svg +1 -0
  249. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/warning.svg +1 -0
  250. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/watch.svg +1 -0
  251. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/whatsnew.avif +0 -0
  252. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/width.svg +1 -0
  253. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/Images/zoom-in.svg +1 -0
  254. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/common/common.js +1 -0
  255. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/dom_extension/dom_extension.js +1 -0
  256. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/host/host.js +1 -0
  257. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/i18n/i18n.js +1 -0
  258. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/i18n/locales/en-US.json +1 -0
  259. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/platform/platform.js +1 -0
  260. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/protocol_client/protocol_client.js +1 -0
  261. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/root/root.js +1 -0
  262. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/core/sdk/sdk.js +1 -0
  263. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/devtools_app.html +18 -0
  264. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/devtools_compatibility.js +1774 -0
  265. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ember_app.html +26 -0
  266. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/devtools_app/devtools_app.js +1 -0
  267. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/formatter_worker/formatter_worker-entrypoint.js +1 -0
  268. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/formatter_worker/formatter_worker.js +1 -0
  269. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
  270. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
  271. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/inspector/inspector.js +1 -0
  272. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/inspector_main/inspector_main.js +1 -0
  273. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/lighthouse_worker/lighthouse_worker.js +1 -0
  274. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/main/main.js +1 -0
  275. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/shell/shell.js +1 -0
  276. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
  277. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/entrypoints/wasmparser_worker/wasmparser_worker.js +1 -0
  278. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/inspector.html +18 -0
  279. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/autofill_manager/autofill_manager.js +1 -0
  280. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/bindings/bindings.js +1 -0
  281. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/breakpoints/breakpoints.js +1 -0
  282. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/cpu_profile/cpu_profile.js +1 -0
  283. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/crux-manager/crux-manager.js +1 -0
  284. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/emulation/emulation.js +1 -0
  285. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/extensions/extensions.js +1 -0
  286. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/formatter/formatter.js +1 -0
  287. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/har/har.js +1 -0
  288. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/heap_snapshot_model/heap_snapshot_model.js +1 -0
  289. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/issues_manager/issues_manager.js +1 -0
  290. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/javascript_metadata/javascript_metadata.js +1 -0
  291. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/live-metrics/live-metrics.js +1 -0
  292. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/live-metrics/web-vitals-injected/spec/spec.js +1 -0
  293. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/live-metrics/web-vitals-injected/web-vitals-injected.generated.js +1 -0
  294. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/logs/logs.js +1 -0
  295. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/persistence/persistence.js +1 -0
  296. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/source_map_scopes/source_map_scopes.js +1 -0
  297. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/text_utils/text_utils.js +1 -0
  298. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/timeline_model/timeline_model.js +1 -0
  299. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/extras/extras.js +1 -0
  300. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/handlers/handlers.js +1 -0
  301. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/helpers/helpers.js +1 -0
  302. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/insights/insights.js +1 -0
  303. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/core/core.js +1 -0
  304. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/graph/graph.js +1 -0
  305. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/lantern.js +1 -0
  306. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/metrics/metrics.js +1 -0
  307. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/simulation/simulation.js +1 -0
  308. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/lantern/types/types.js +1 -0
  309. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/root-causes/root-causes.js +1 -0
  310. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/trace.js +1 -0
  311. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/trace/types/types.js +1 -0
  312. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/workspace/workspace.js +1 -0
  313. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/models/workspace_diff/workspace_diff.js +1 -0
  314. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/accessibility/accessibility.js +1 -0
  315. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/animation/animation.js +1 -0
  316. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/application/application.js +41 -0
  317. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/application/components/components.js +614 -0
  318. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/application/preloading/components/components.js +292 -0
  319. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/application/preloading/helper/helper.js +1 -0
  320. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/autofill/autofill.js +88 -0
  321. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/browser_debugger/browser_debugger.js +1 -0
  322. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/changes/changes.js +1 -0
  323. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/console/console.js +6 -0
  324. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/console_counters/console_counters.js +1 -0
  325. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/coverage/coverage.js +1 -0
  326. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/css_overview/components/components.js +23 -0
  327. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/css_overview/css_overview.js +147 -0
  328. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/developer_resources/developer_resources.js +1 -0
  329. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/elements/components/components.js +272 -0
  330. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/elements/elements.js +8 -0
  331. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/emulation/components/components.js +39 -0
  332. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/emulation/emulation.js +1 -0
  333. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/event_listeners/event_listeners.js +1 -0
  334. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/explain/explain.js +203 -0
  335. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/freestyler/freestyler.js +177 -0
  336. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/issues/components/components.js +14 -0
  337. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/issues/issues.js +1 -0
  338. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/layer_viewer/layer_viewer.js +1 -0
  339. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/layers/layers.js +1 -0
  340. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/lighthouse/lighthouse.js +64 -0
  341. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/linear_memory_inspector/components/components.js +177 -0
  342. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/linear_memory_inspector/linear_memory_inspector.js +1 -0
  343. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/media/media.js +25 -0
  344. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/mobile_throttling/mobile_throttling.js +1 -0
  345. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/network/components/components.js +315 -0
  346. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/network/forward/forward.js +1 -0
  347. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/network/network.js +1 -0
  348. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/performance_monitor/performance_monitor.js +1 -0
  349. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/profiler/profiler.js +8 -0
  350. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/protocol_monitor/components/components.js +180 -0
  351. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/protocol_monitor/protocol_monitor.js +1 -0
  352. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/components/components.js +714 -0
  353. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/controllers/controllers.js +1 -0
  354. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/converters/converters.js +1 -0
  355. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/extensions/extensions.js +1 -0
  356. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/injected/injected.generated.js +1 -0
  357. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/models/models.js +1 -0
  358. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/recorder.js +120 -0
  359. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/recorder/util/util.js +1 -0
  360. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/screencast/screencast.js +1 -0
  361. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/search/search.js +1 -0
  362. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/security/security.js +1 -0
  363. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/sensors/sensors.js +1 -0
  364. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/components/components.js +23 -0
  365. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/emulation/components/components.js +222 -0
  366. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/emulation/emulation.js +1 -0
  367. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/emulation/utils/utils.js +1 -0
  368. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/settings/settings.js +130 -0
  369. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/snippets/snippets.js +1 -0
  370. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/sources/components/components.js +162 -0
  371. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/sources/sources.js +14 -0
  372. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/components/components.js +623 -0
  373. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/components/insights/insights.js +85 -0
  374. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/extensions/extensions.js +1 -0
  375. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/overlays/components/components.js +52 -0
  376. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/overlays/overlays.js +1 -0
  377. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/timeline.js +4 -0
  378. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/timeline/utils/utils.js +1 -0
  379. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/utils/utils.js +1 -0
  380. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/web_audio/graph_visualizer/graph_visualizer.js +1 -0
  381. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/web_audio/web_audio.js +23 -0
  382. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/panels/webauthn/webauthn.js +6 -0
  383. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/services/puppeteer/puppeteer.js +1 -0
  384. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/services/trace_bounds/trace_bounds.js +1 -0
  385. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/services/tracing/tracing.js +1 -0
  386. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/services/window_bounds/window_bounds.js +1 -0
  387. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/setup-ember-extension.js +160 -0
  388. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/acorn/acorn.js +1 -0
  389. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/chromium/client-variations/client-variations.js +1 -0
  390. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/angular.js +2 -0
  391. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/codemirror.js +2 -0
  392. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/cpp.js +2 -0
  393. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/java.js +2 -0
  394. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/legacy.js +2 -0
  395. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/less.js +2 -0
  396. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/markdown.js +2 -0
  397. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/php.js +2 -0
  398. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/python.js +2 -0
  399. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/sass.js +2 -0
  400. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/svelte.js +2 -0
  401. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/vue.js +2 -0
  402. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/wast.js +2 -0
  403. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/chunk/xml.js +2 -0
  404. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/codemirror.next/codemirror.next.js +2 -0
  405. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/csp_evaluator/csp_evaluator.js +194 -0
  406. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/diff/diff.js +1 -0
  407. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/i18n/i18n.js +1 -0
  408. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/intl-messageformat/intl-messageformat.js +15 -0
  409. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/lighthouse/lighthouse-dt-bundle.js +2137 -0
  410. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/lighthouse/report/report.js +39 -0
  411. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/lit/lit.js +110 -0
  412. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/marked/marked.js +1 -0
  413. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer/debug/index.html +4 -0
  414. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer/puppeteer.js +378 -0
  415. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer-replay/lighthouse/index.html +4 -0
  416. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer-replay/puppeteer/index.html +4 -0
  417. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/puppeteer-replay/puppeteer-replay.js +1 -0
  418. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/third_party/wasmparser/wasmparser.js +1 -0
  419. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/adorners/adorners.js +3 -0
  420. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/buttons/buttons.js +11 -0
  421. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/chrome_link/chrome_link.js +5 -0
  422. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/code_highlighter/code_highlighter.js +1 -0
  423. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/data_grid/data_grid.js +69 -0
  424. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/dialogs/dialogs.js +81 -0
  425. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/diff_view/diff_view.js +8 -0
  426. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/expandable_list/expandable_list.js +17 -0
  427. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/helpers/helpers.js +1 -0
  428. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/highlighting/highlighting.js +1 -0
  429. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/icon_button/icon_button.js +12 -0
  430. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/input/input.js +1 -0
  431. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/issue_counter/issue_counter.js +9 -0
  432. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/legacy_wrapper/legacy_wrapper.js +1 -0
  433. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/linkifier/linkifier.js +1 -0
  434. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/markdown_view/markdown_view.js +41 -0
  435. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/menus/menus.js +73 -0
  436. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/node_text/node_text.js +3 -0
  437. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/panel_feedback/panel_feedback.js +37 -0
  438. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/panel_introduction_steps/panel_introduction_steps.js +9 -0
  439. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/render_coordinator/render_coordinator.js +1 -0
  440. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/report_view/report_view.js +21 -0
  441. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/request_link_icon/request_link_icon.js +8 -0
  442. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/settings/settings.js +16 -0
  443. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/split_view/split_view.js +9 -0
  444. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/srgb_overlay/srgb_overlay.js +6 -0
  445. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/suggestion_input/suggestion_input.js +29 -0
  446. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/switch/switch.js +10 -0
  447. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/text_editor/text_editor.js +1 -0
  448. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/text_prompt/text_prompt.js +3 -0
  449. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/components/tree_outline/tree_outline.js +30 -0
  450. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/color_picker/color_picker.js +1 -0
  451. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/cookie_table/cookie_table.js +1 -0
  452. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/data_grid/data_grid.js +1 -0
  453. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/inline_editor/inline_editor.js +46 -0
  454. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/object_ui/object_ui.js +9 -0
  455. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/perf_ui/perf_ui.js +59 -0
  456. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/quick_open/quick_open.js +1 -0
  457. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/source_frame/source_frame.js +1 -0
  458. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/components/utils/utils.js +1 -0
  459. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/legacy.js +3 -0
  460. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/legacy/theme_support/theme_support.js +1 -0
  461. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/lit-html/lit-html.js +1 -0
  462. package/download/chrome-devtools-frontend.appspot.com/serve_file/@abb728f8afc6a86cc66b1313f5056728ce422ddd/ui/visual_logging/visual_logging.js +1 -0
  463. package/download/googlechrome.github.io/lighthouse/scorecalc/calc.js +838 -0
  464. package/download/googlechrome.github.io/lighthouse/scorecalc/index.html +78 -0
  465. package/download/googlechrome.github.io/lighthouse/scorecalc/style.css +554 -0
  466. package/download/wicg.github.io/attribution-reporting-api/validate-headers/index.html +104 -0
  467. package/download/wicg.github.io/attribution-reporting-api/validate-headers.js +1 -0
  468. package/package.json +31 -0
@@ -0,0 +1 @@
1
+ import*as e from"../../core/common/common.js";import*as t from"../../core/platform/platform.js";import{assertNotNullOrUndefined as o}from"../../core/platform/platform.js";import*as r from"../../core/sdk/sdk.js";import*as s from"../text_utils/text_utils.js";import*as i from"../workspace/workspace.js";import*as n from"../../core/i18n/i18n.js";const a={unknownErrorLoadingFile:"Unknown error loading file"},c=n.i18n.registerUIStrings("models/bindings/ContentProviderBasedProject.ts",a),u=n.i18n.getLocalizedString.bind(void 0,c);class l extends i.Workspace.ProjectStore{#e;#t;constructor(e,t,o,r,s){super(e,t,o,r),this.#e=s,this.#t=new WeakMap,e.addProject(this)}async requestFileContent(e){const{contentProvider:t}=this.#t.get(e);try{return await t.requestContentData()}catch(e){return{error:e?String(e):u(a.unknownErrorLoadingFile)}}}isServiceProject(){return this.#e}async requestMetadata(e){const{metadata:t}=this.#t.get(e);return t}canSetFileContent(){return!1}async setFileContent(e,t,o){}fullDisplayName(e){let t=e.parentURL().replace(/^(?:https?|file)\:\/\//,"");try{t=decodeURI(t)}catch(e){}return t+"/"+e.displayName(!0)}mimeType(e){const{mimeType:t}=this.#t.get(e);return t}canRename(){return!1}rename(e,t,o){const r=e.url();this.performRename(r,t,((t,r)=>{t&&r&&this.renameUISourceCode(e,r),o(t,r)}))}excludeFolder(e){}canExcludeFolder(e){return!1}async createFile(e,t,o,r){return null}canCreateFile(){return!1}deleteFile(e){}remove(){}performRename(e,t,o){o(!1)}searchInFileContent(e,t,o,r){const{contentProvider:s}=this.#t.get(e);return s.searchInContent(t,o,r)}async findFilesMatchingSearchRequest(e,o,r){const i=new Map;return r.setTotalWork(o.length),await Promise.all(o.map(async function(o){let n=!0,a=[];for(const r of e.queries().slice()){const i=await this.searchInFileContent(o,r,!e.ignoreCase(),e.isRegex());if(!i.length){n=!1;break}a=t.ArrayUtilities.mergeOrdered(a,i,s.ContentProvider.SearchMatch.comparator)}n&&i.set(o,a);r.incrementWorked(1)}.bind(this))),r.done(),i}indexContent(e){queueMicrotask(e.done.bind(e))}addUISourceCodeWithProvider(e,t,o,r){this.#t.set(e,{mimeType:r,metadata:o,contentProvider:t}),this.addUISourceCode(e)}addContentProvider(e,t,o){const r=this.createUISourceCode(e,t.contentType());return this.addUISourceCodeWithProvider(r,t,null,o),r}reset(){this.removeProject(),this.workspace().addProject(this)}dispose(){this.removeProject()}}var d=Object.freeze({__proto__:null,ContentProviderBasedProject:l});const g={removeFromIgnoreList:"Remove from ignore list",addScriptToIgnoreList:"Add script to ignore list",addDirectoryToIgnoreList:"Add directory to ignore list",addAllContentScriptsToIgnoreList:"Add all extension scripts to ignore list",addAllThirdPartyScriptsToIgnoreList:"Add all third-party scripts to ignore list"},p=n.i18n.registerUIStrings("models/bindings/IgnoreListManager.ts",g),h=n.i18n.getLocalizedString.bind(void 0,p);let m;class S{#o;#r;#s;constructor(t){this.#o=t,r.TargetManager.TargetManager.instance().addModelListener(r.DebuggerModel.DebuggerModel,r.DebuggerModel.Events.GlobalObjectCleared,this.clearCacheIfNeeded.bind(this),this),e.Settings.Settings.instance().moduleSetting("skip-stack-frames-pattern").addChangeListener(this.patternChanged.bind(this)),e.Settings.Settings.instance().moduleSetting("skip-content-scripts").addChangeListener(this.patternChanged.bind(this)),e.Settings.Settings.instance().moduleSetting("automatically-ignore-list-known-third-party-scripts").addChangeListener(this.patternChanged.bind(this)),e.Settings.Settings.instance().moduleSetting("enable-ignore-listing").addChangeListener(this.patternChanged.bind(this)),this.#r=new Set,this.#s=new Map,r.TargetManager.TargetManager.instance().observeModels(r.DebuggerModel.DebuggerModel,this)}static instance(e={forceNew:null,debuggerWorkspaceBinding:null}){const{forceNew:t,debuggerWorkspaceBinding:o}=e;if(!m||t){if(!o)throw new Error(`Unable to create settings: debuggerWorkspaceBinding must be provided: ${(new Error).stack}`);m=new S(o)}return m}static removeInstance(){m=void 0}addChangeListener(e){this.#r.add(e)}removeChangeListener(e){this.#r.delete(e)}modelAdded(e){this.setIgnoreListPatterns(e);const t=e.sourceMapManager();t.addEventListener(r.SourceMapManager.Events.SourceMapAttached,this.sourceMapAttached,this),t.addEventListener(r.SourceMapManager.Events.SourceMapDetached,this.sourceMapDetached,this)}modelRemoved(e){this.clearCacheIfNeeded();const t=e.sourceMapManager();t.removeEventListener(r.SourceMapManager.Events.SourceMapAttached,this.sourceMapAttached,this),t.removeEventListener(r.SourceMapManager.Events.SourceMapDetached,this.sourceMapDetached,this)}clearCacheIfNeeded(){this.#s.size>1024&&this.#s.clear()}getSkipStackFramesPatternSetting(){return e.Settings.Settings.instance().moduleSetting("skip-stack-frames-pattern")}setIgnoreListPatterns(e){const t=this.enableIgnoreListing?this.getSkipStackFramesPatternSetting().getAsArray():[],o=[];for(const e of t)!e.disabled&&e.pattern&&o.push(e.pattern);return e.setBlackboxPatterns(o)}getGeneralRulesForUISourceCode(e){return{isContentScript:e.project().type()===i.Workspace.projectTypes.ContentScripts,isKnownThirdParty:e.isKnownThirdParty()}}isUserOrSourceMapIgnoreListedUISourceCode(e){if(e.isUnconditionallyIgnoreListed())return!0;const t=this.uiSourceCodeURL(e);return this.isUserIgnoreListedURL(t,this.getGeneralRulesForUISourceCode(e))}isUserIgnoreListedURL(e,t){if(!this.enableIgnoreListing)return!1;if(t?.isContentScript&&this.skipContentScripts)return!0;if(t?.isKnownThirdParty&&this.automaticallyIgnoreListKnownThirdPartyScripts)return!0;if(!e)return!1;if(this.#s.has(e))return Boolean(this.#s.get(e));const o=this.getSkipStackFramesPatternSetting().asRegExp(),r=o&&o.test(e)||!1;return this.#s.set(e,r),r}sourceMapAttached(e){const t=e.data.client,o=e.data.sourceMap;this.updateScriptRanges(t,o)}sourceMapDetached(e){const t=e.data.client;this.updateScriptRanges(t,void 0)}async updateScriptRanges(e,t){let o=!1;if(S.instance().isUserIgnoreListedURL(e.sourceURL,{isContentScript:e.isContentScript()})||(o=t?.sourceURLs().some((e=>this.isUserIgnoreListedURL(e,{isKnownThirdParty:t.hasIgnoreListHint(e)})))??!1),!o)return L.get(e)&&await e.setBlackboxedRanges([])&&L.delete(e),void await this.#o.updateLocations(e);if(!t)return;const r=t.findRanges((e=>this.isUserIgnoreListedURL(e,{isKnownThirdParty:t.hasIgnoreListHint(e)})),{isStartMatching:!0}).flatMap((e=>[e.start,e.end]));!function(e,t){if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(e[o].lineNumber!==t[o].lineNumber||e[o].columnNumber!==t[o].columnNumber)return!1;return!0}(L.get(e)||[],r)&&await e.setBlackboxedRanges(r)&&L.set(e,r),this.#o.updateLocations(e)}uiSourceCodeURL(e){return e.project().type()===i.Workspace.projectTypes.Debugger?null:e.url()}canIgnoreListUISourceCode(e){const t=this.uiSourceCodeURL(e);return!!t&&Boolean(this.urlToRegExpString(t))}ignoreListUISourceCode(e){const t=this.uiSourceCodeURL(e);t&&this.ignoreListURL(t)}unIgnoreListUISourceCode(e){this.unIgnoreListURL(this.uiSourceCodeURL(e),this.getGeneralRulesForUISourceCode(e))}get enableIgnoreListing(){return e.Settings.Settings.instance().moduleSetting("enable-ignore-listing").get()}set enableIgnoreListing(t){e.Settings.Settings.instance().moduleSetting("enable-ignore-listing").set(t)}get skipContentScripts(){return this.enableIgnoreListing&&e.Settings.Settings.instance().moduleSetting("skip-content-scripts").get()}get automaticallyIgnoreListKnownThirdPartyScripts(){return this.enableIgnoreListing&&e.Settings.Settings.instance().moduleSetting("automatically-ignore-list-known-third-party-scripts").get()}ignoreListContentScripts(){this.enableIgnoreListing||(this.enableIgnoreListing=!0),e.Settings.Settings.instance().moduleSetting("skip-content-scripts").set(!0)}unIgnoreListContentScripts(){e.Settings.Settings.instance().moduleSetting("skip-content-scripts").set(!1)}ignoreListThirdParty(){this.enableIgnoreListing||(this.enableIgnoreListing=!0),e.Settings.Settings.instance().moduleSetting("automatically-ignore-list-known-third-party-scripts").set(!0)}unIgnoreListThirdParty(){e.Settings.Settings.instance().moduleSetting("automatically-ignore-list-known-third-party-scripts").set(!1)}ignoreListURL(e){const t=this.urlToRegExpString(e);t&&this.ignoreListRegex(t,e)}ignoreListRegex(e,t){const o=this.getSkipStackFramesPatternSetting().getAsArray();let r=!1;for(let s=0;s<o.length;++s){const i=o[s];(i.pattern===e||t&&i.disabledForUrl===t)&&(i.disabled=!1,i.disabledForUrl=void 0,r=!0)}r||o.push({pattern:e,disabled:!1}),this.enableIgnoreListing||(this.enableIgnoreListing=!0),this.getSkipStackFramesPatternSetting().setAsArray(o)}unIgnoreListURL(e,t){if(t?.isContentScript&&this.unIgnoreListContentScripts(),t?.isKnownThirdParty&&this.unIgnoreListThirdParty(),!e)return;let o=this.getSkipStackFramesPatternSetting().getAsArray();const r=S.instance().urlToRegExpString(e);if(r){o=o.filter((function(e){return e.pattern!==r}));for(let t=0;t<o.length;++t){const r=o[t];if(!r.disabled)try{new RegExp(r.pattern).test(e)&&(r.disabled=!0,r.disabledForUrl=e)}catch(e){}}this.getSkipStackFramesPatternSetting().setAsArray(o)}}removeIgnoreListPattern(e){let t=this.getSkipStackFramesPatternSetting().getAsArray();t=t.filter((function(t){return t.pattern!==e})),this.getSkipStackFramesPatternSetting().setAsArray(t)}ignoreListHasPattern(e,t){return this.getSkipStackFramesPatternSetting().getAsArray().some((o=>!(t&&o.disabled)&&o.pattern===e))}async patternChanged(){this.#s.clear();const e=[];for(const t of r.TargetManager.TargetManager.instance().models(r.DebuggerModel.DebuggerModel)){e.push(this.setIgnoreListPatterns(t));const o=t.sourceMapManager();for(const r of t.scripts())e.push(this.updateScriptRanges(r,o.sourceMapForClient(r)))}await Promise.all(e);const t=Array.from(this.#r);for(const e of t)e();this.patternChangeFinishedForTests()}patternChangeFinishedForTests(){}urlToRegExpString(o){const r=new e.ParsedURL.ParsedURL(o);if(r.isAboutBlank()||r.isDataURL())return"";if(!r.isValid)return"^"+t.StringUtilities.escapeForRegExp(o)+"$";let s=r.lastPathComponent;if(s?s="/"+s:r.folderPathComponents&&(s=r.folderPathComponents+"/"),s||(s=r.host),!s)return"";const i=r.scheme;let n="";return i&&"http"!==i&&"https"!==i&&(n="^"+i+"://","chrome-extension"===i&&(n+=r.host+"\\b"),n+=".*"),n+t.StringUtilities.escapeForRegExp(s)+(o.endsWith(s)?"$":"\\b")}getIgnoreListURLContextMenuItems(e){if(e.project().type()===i.Workspace.projectTypes.FileSystem)return[];const t=[],o=this.canIgnoreListUISourceCode(e),r=this.isUserOrSourceMapIgnoreListedUISourceCode(e),{isContentScript:s,isKnownThirdParty:n}=this.getGeneralRulesForUISourceCode(e);return r?(o||s||n)&&t.push({text:h(g.removeFromIgnoreList),callback:this.unIgnoreListUISourceCode.bind(this,e),jslogContext:"remove-script-from-ignorelist"}):(o&&t.push({text:h(g.addScriptToIgnoreList),callback:this.ignoreListUISourceCode.bind(this,e),jslogContext:"add-script-to-ignorelist"}),t.push(...this.getIgnoreListGeneralContextMenuItems({isContentScript:s,isKnownThirdParty:n}))),t}getIgnoreListGeneralContextMenuItems(e){const t=[];return e?.isContentScript&&t.push({text:h(g.addAllContentScriptsToIgnoreList),callback:this.ignoreListContentScripts.bind(this),jslogContext:"add-content-scripts-to-ignorelist"}),e?.isKnownThirdParty&&t.push({text:h(g.addAllThirdPartyScriptsToIgnoreList),callback:this.ignoreListThirdParty.bind(this),jslogContext:"add-3p-scripts-to-ignorelist"}),t}getIgnoreListFolderContextMenuItems(e,o){const r=[],s="^"+t.StringUtilities.escapeForRegExp(e)+"/";return this.ignoreListHasPattern(s,!0)?r.push({text:h(g.removeFromIgnoreList),callback:this.removeIgnoreListPattern.bind(this,s),jslogContext:"remove-from-ignore-list"}):this.isUserIgnoreListedURL(e,o)?r.push({text:h(g.removeFromIgnoreList),callback:this.unIgnoreListURL.bind(this,e,o),jslogContext:"remove-from-ignore-list"}):o?.isCurrentlyIgnoreListed||(r.push({text:h(g.addDirectoryToIgnoreList),callback:this.ignoreListRegex.bind(this,s),jslogContext:"add-directory-to-ignore-list"}),r.push(...this.getIgnoreListGeneralContextMenuItems(o))),r}}const L=new WeakMap;var M=Object.freeze({__proto__:null,IgnoreListManager:S});const f=new WeakMap,b=new WeakMap;let C;class v extends e.ObjectWrapper.ObjectWrapper{constructor(){super()}static instance({forceNew:e}={forceNew:!1}){return C&&!e||(C=new v),C}}class w{static resolveFrame(e,t){const o=w.targetForUISourceCode(e),s=o&&o.model(r.ResourceTreeModel.ResourceTreeModel);return s?s.frameForId(t):null}static setInitialFrameAttribution(e,t){if(!t)return;const o=w.resolveFrame(e,t);if(!o)return;const r=new Map;r.set(t,{frame:o,count:1}),f.set(e,r)}static cloneInitialFrameAttribution(e,t){const o=f.get(e);if(!o)return;const r=new Map;for(const e of o.keys()){const t=o.get(e);void 0!==t&&r.set(e,{frame:t.frame,count:t.count})}f.set(t,r)}static addFrameAttribution(e,t){const o=w.resolveFrame(e,t);if(!o)return;const r=f.get(e);if(!r)return;const s=r.get(t)||{frame:o,count:0};if(s.count+=1,r.set(t,s),1!==s.count)return;const i={uiSourceCode:e,frame:o};v.instance().dispatchEventToListeners("FrameAttributionAdded",i)}static removeFrameAttribution(e,t){const o=f.get(e);if(!o)return;const r=o.get(t);if(console.assert(Boolean(r),"Failed to remove frame attribution for url: "+e.url()),!r)return;if(r.count-=1,r.count>0)return;o.delete(t);const s={uiSourceCode:e,frame:r.frame};v.instance().dispatchEventToListeners("FrameAttributionRemoved",s)}static targetForUISourceCode(e){return b.get(e.project())||null}static setTargetForProject(e,t){b.set(e,t)}static getTargetForProject(e){return b.get(e)||null}static framesForUISourceCode(e){const t=w.targetForUISourceCode(e),o=t&&t.model(r.ResourceTreeModel.ResourceTreeModel),s=f.get(e);if(!o||!s)return[];return Array.from(s.keys()).map((e=>o.frameForId(e))).filter((e=>Boolean(e)))}}var I=Object.freeze({__proto__:null,NetworkProjectManager:v,NetworkProject:w});class T{#i;#o;#n=new Map;#a;#c;#u=new Map;#l=new Map;#d=new t.MapUtilities.Multimap;constructor(e,t,o){this.#i=e.sourceMapManager(),this.#o=o,this.#a=new l(t,"jsSourceMaps:stub:"+e.target().id(),i.Workspace.projectTypes.Service,"",!0),this.#c=[this.#i.addEventListener(r.SourceMapManager.Events.SourceMapWillAttach,this.sourceMapWillAttach,this),this.#i.addEventListener(r.SourceMapManager.Events.SourceMapFailedToAttach,this.sourceMapFailedToAttach,this),this.#i.addEventListener(r.SourceMapManager.Events.SourceMapAttached,this.sourceMapAttached,this),this.#i.addEventListener(r.SourceMapManager.Events.SourceMapDetached,this.sourceMapDetached,this)]}addStubUISourceCode(t){const o=this.#a.addContentProvider(e.ParsedURL.ParsedURL.concatenate(t.sourceURL,":sourcemap"),s.StaticContentProvider.StaticContentProvider.fromString(t.sourceURL,e.ResourceType.resourceTypes.Script,"\n\n\n\n\n// Please wait a bit.\n// Compiled script is not shown while source map is being loaded!"),"text/javascript");this.#n.set(t,o)}removeStubUISourceCode(e){const t=this.#n.get(e);this.#n.delete(e),t&&this.#a.removeUISourceCode(t.url())}getLocationRangesForSameSourceLocation(e){const t=e.debuggerModel,o=e.script();if(!o)return[];const r=this.#i.sourceMapForClient(o);if(!r)return[];const{lineNumber:s,columnNumber:i}=o.rawLocationToRelativeLocation(e),n=r.findEntry(s,i);if(!n||!n.sourceURL)return[];const a=this.#l.get(r);if(!a)return[];const c=a.uiSourceCodeForURL(n.sourceURL);if(!c)return[];if(!this.#d.hasValue(c,r))return[];return r.findReverseRanges(n.sourceURL,n.sourceLineNumber,n.sourceColumnNumber).map((({startLine:e,startColumn:r,endLine:s,endColumn:i})=>{const n=o.relativeLocationToRawLocation({lineNumber:e,columnNumber:r}),a=o.relativeLocationToRawLocation({lineNumber:s,columnNumber:i});return{start:t.createRawLocation(o,n.lineNumber,n.columnNumber),end:t.createRawLocation(o,a.lineNumber,a.columnNumber)}}))}uiSourceCodeForURL(e,t){const o=t?i.Workspace.projectTypes.ContentScripts:i.Workspace.projectTypes.Network;for(const t of this.#u.values()){if(t.type()!==o)continue;const r=t.uiSourceCodeForURL(e);if(r)return r}return null}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const{lineNumber:o,columnNumber:r}=t.rawLocationToRelativeLocation(e),s=this.#n.get(t);if(s)return new i.UISourceCode.UILocation(s,o,r);const n=this.#i.sourceMapForClient(t);if(!n)return null;const a=this.#l.get(n);if(!a)return null;const c=n.findEntry(o,r,e.inlineFrameIndex);if(!c||!c.sourceURL)return null;const u=a.uiSourceCodeForURL(c.sourceURL);return u&&this.#d.hasValue(u,n)?u.uiLocation(c.sourceLineNumber,c.sourceColumnNumber):null}uiLocationToRawLocations(e,t,o){const r=[];for(const s of this.#d.get(e)){const i=s.sourceLineMapping(e.url(),t,o);if(!i)continue;const n=this.#i.clientForSourceMap(s);if(!n)continue;const a=n.relativeLocationToRawLocation(i);r.push(n.debuggerModel.createRawLocation(n,a.lineNumber,a.columnNumber))}return r}uiLocationRangeToRawLocationRanges(e,t){if(!this.#d.has(e))return null;const o=[];for(const r of this.#d.get(e)){const s=this.#i.clientForSourceMap(r);if(s)for(const i of r.reverseMapTextRanges(e.url(),t)){const e=s.relativeLocationToRawLocation(i.start),t=s.relativeLocationToRawLocation(i.end),r=s.debuggerModel.createRawLocation(s,e.lineNumber,e.columnNumber),n=s.debuggerModel.createRawLocation(s,t.lineNumber,t.columnNumber);o.push({start:r,end:n})}}return o}getMappedLines(e){if(!this.#d.has(e))return null;const t=new Set;for(const o of this.#d.get(e))for(const r of o.mappings())r.sourceURL===e.url()&&t.add(r.sourceLineNumber);return t}sourceMapWillAttach(e){const{client:t}=e.data;this.addStubUISourceCode(t),this.#o.updateLocations(t),S.instance().isUserIgnoreListedURL(t.sourceURL,{isContentScript:t.isContentScript()})&&this.#i.cancelAttachSourceMap(t)}sourceMapFailedToAttach(e){const{client:t}=e.data;this.removeStubUISourceCode(t),this.#o.updateLocations(t)}sourceMapAttached(t){const{client:o,sourceMap:n}=t.data,a=new Set([o]);this.removeStubUISourceCode(o);const c=o.target(),u=`jsSourceMaps:${o.isContentScript()?"extensions":""}:${c.id()}`;let d=this.#u.get(u);if(!d){const e=o.isContentScript()?i.Workspace.projectTypes.ContentScripts:i.Workspace.projectTypes.Network;d=new l(this.#a.workspace(),u,e,"",!1),w.setTargetForProject(d,c),this.#u.set(u,d)}this.#l.set(n,d);for(const t of n.sourceURLs()){const c=e.ResourceType.resourceTypes.SourceMapScript,u=d.createUISourceCode(t,c);n.hasIgnoreListHint(t)&&u.markKnownThirdParty();const l=n.embeddedContentByURL(t),g=null!==l?s.StaticContentProvider.StaticContentProvider.fromString(t,c,l):new r.CompilerSourceMappingContentProvider.CompilerSourceMappingContentProvider(t,c,o.createPageResourceLoadInitiator());let p=null;if(null!==l){const e=new TextEncoder;p=new i.UISourceCode.UISourceCodeMetadata(null,e.encode(l).length)}const h=e.ResourceType.ResourceType.mimeFromURL(t)??c.canonicalMimeType();this.#d.set(u,n),w.setInitialFrameAttribution(u,o.frameId);const m=d.uiSourceCodeForURL(t);if(null!==m){for(const e of this.#d.get(m)){this.#d.delete(m,e);const o=this.#i.clientForSourceMap(e);o&&(w.removeFrameAttribution(m,o.frameId),n.compatibleForURL(t,e)&&(this.#d.set(u,e),w.addFrameAttribution(u,o.frameId)),a.add(o))}d.removeUISourceCode(t)}d.addUISourceCodeWithProvider(u,g,p,h)}Promise.all([...a].map((e=>this.#o.updateLocations(e)))).then((()=>this.sourceMapAttachedForTest(n)))}sourceMapDetached(e){const{client:t,sourceMap:o}=e.data,r=this.#l.get(o);if(r){for(const e of r.uiSourceCodes())this.#d.delete(e,o)&&(w.removeFrameAttribution(e,t.frameId),this.#d.has(e)||r.removeUISourceCode(e.url()));this.#l.delete(o),this.#o.updateLocations(t)}}scriptsForUISourceCode(e){const t=[];for(const o of this.#d.get(e)){const e=this.#i.clientForSourceMap(o);e&&t.push(e)}return t}sourceMapAttachedForTest(e){}dispose(){e.EventTarget.removeEventListeners(this.#c);for(const e of this.#u.values())e.dispose();this.#a.dispose()}}var R=Object.freeze({__proto__:null,CompilerScriptMapping:T});class y{#g;#p;#h;constructor(e,t){this.#g=e,this.#p=t,this.#p.add(this),this.#h=null}async update(){this.#g&&(this.#h?await this.#h.then((()=>this.update())):(this.#h=this.#g(this),await this.#h,this.#h=null))}async uiLocation(){throw"Not implemented"}dispose(){this.#p.delete(this),this.#g=null}isDisposed(){return!this.#p.has(this)}async isIgnoreListed(){throw"Not implemented"}}class F{#m;constructor(){this.#m=new Set}add(e){this.#m.add(e)}delete(e){this.#m.delete(e)}has(e){return this.#m.has(e)}disposeAll(){for(const e of this.#m)e.dispose()}}var U=Object.freeze({__proto__:null,LiveLocationWithPool:y,LiveLocationPool:F});class P{#i;#S;#c;#L;constructor(e,t,o){this.#i=t,this.#S=new l(o,"cssSourceMaps:"+e.id(),i.Workspace.projectTypes.Network,"",!1),w.setTargetForProject(this.#S,e),this.#L=new Map,this.#c=[this.#i.addEventListener(r.SourceMapManager.Events.SourceMapAttached,this.sourceMapAttached,this),this.#i.addEventListener(r.SourceMapManager.Events.SourceMapDetached,this.sourceMapDetached,this)]}sourceMapAttachedForTest(e){}async sourceMapAttached(e){const t=e.data.client,o=e.data.sourceMap,r=this.#S,s=this.#L;for(const e of o.sourceURLs()){let i=s.get(e);i||(i=new j(r,e,t.createPageResourceLoadInitiator()),s.set(e,i)),i.addSourceMap(o,t.frameId)}await z.instance().updateLocations(t),this.sourceMapAttachedForTest(o)}async sourceMapDetached(e){const t=e.data.client,o=e.data.sourceMap,r=this.#L;for(const e of o.sourceURLs()){const s=r.get(e);s&&(s.removeSourceMap(o,t.frameId),s.getUiSourceCode()||r.delete(e))}await z.instance().updateLocations(t)}rawLocationToUILocation(e){const t=e.header();if(!t)return null;const o=this.#i.sourceMapForClient(t);if(!o)return null;let{lineNumber:r,columnNumber:s}=e;o.mapsOrigin()&&t.isInline&&(r-=t.startLine,0===r&&(s-=t.startColumn));const i=o.findEntry(r,s);if(!i||!i.sourceURL)return null;const n=this.#S.uiSourceCodeForURL(i.sourceURL);return n?n.uiLocation(i.sourceLineNumber,i.sourceColumnNumber):null}uiLocationToRawLocations(e){const{uiSourceCode:t,lineNumber:o,columnNumber:s=0}=e,i=k.get(t);if(!i)return[];const n=[];for(const e of i.getReferringSourceMaps()){const i=e.findReverseEntries(t.url(),o,s),a=this.#i.clientForSourceMap(e);a&&n.push(...i.map((e=>new r.CSSModel.CSSLocation(a,e.lineNumber,e.columnNumber))))}return n}static uiSourceOrigin(e){const t=k.get(e);return t?t.getReferringSourceMaps().map((e=>e.compiledURL())):[]}dispose(){e.EventTarget.removeEventListeners(this.#c),this.#S.dispose()}}const k=new WeakMap;class j{#S;#M;#f;referringSourceMaps;uiSourceCode;constructor(e,t,o){this.#S=e,this.#M=t,this.#f=o,this.referringSourceMaps=[],this.uiSourceCode=null}recreateUISourceCodeIfNeeded(t){const o=this.referringSourceMaps[this.referringSourceMaps.length-1],n=e.ResourceType.resourceTypes.SourceMapStyleSheet,a=o.embeddedContentByURL(this.#M),c=null!==a?s.StaticContentProvider.StaticContentProvider.fromString(this.#M,n,a):new r.CompilerSourceMappingContentProvider.CompilerSourceMappingContentProvider(this.#M,n,this.#f),u=this.#S.createUISourceCode(this.#M,n);k.set(u,this);const l=e.ResourceType.ResourceType.mimeFromURL(this.#M)||n.canonicalMimeType(),d="string"==typeof a?new i.UISourceCode.UISourceCodeMetadata(null,a.length):null;this.uiSourceCode?(w.cloneInitialFrameAttribution(this.uiSourceCode,u),this.#S.removeUISourceCode(this.uiSourceCode.url())):w.setInitialFrameAttribution(u,t),this.uiSourceCode=u,this.#S.addUISourceCodeWithProvider(this.uiSourceCode,c,d,l)}addSourceMap(e,t){this.uiSourceCode&&w.addFrameAttribution(this.uiSourceCode,t),this.referringSourceMaps.push(e),this.recreateUISourceCodeIfNeeded(t)}removeSourceMap(e,t){const o=this.uiSourceCode;w.removeFrameAttribution(o,t);const r=this.referringSourceMaps.lastIndexOf(e);-1!==r&&this.referringSourceMaps.splice(r,1),this.referringSourceMaps.length?this.recreateUISourceCodeIfNeeded(t):(this.#S.removeUISourceCode(o.url()),this.uiSourceCode=null)}getReferringSourceMaps(){return this.referringSourceMaps}getUiSourceCode(){return this.uiSourceCode}}var D=Object.freeze({__proto__:null,SASSSourceMapping:P});function N(e){for(const t of r.TargetManager.TargetManager.instance().models(r.ResourceTreeModel.ResourceTreeModel)){const o=t.resourceForURL(e);if(o)return o}return null}function E(e,t,o){const s=e.model(r.ResourceTreeModel.ResourceTreeModel);if(!s)return null;const i=s.frameForId(t);return i?x(i.resourceForURL(o)):null}function x(e){return!e||"number"!=typeof e.contentSize()&&!e.lastModified()?null:new i.UISourceCode.UISourceCodeMetadata(e.lastModified(),e.contentSize())}var A=Object.freeze({__proto__:null,resourceForURL:N,displayNameForURL:function(o){if(!o)return"";const s=N(o);if(s)return s.displayName;const n=i.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(o);if(n)return n.displayName();const a=r.TargetManager.TargetManager.instance().inspectedURL();if(!a)return t.StringUtilities.trimURL(o,"");const c=e.ParsedURL.ParsedURL.fromString(a);if(!c)return o;const u=c.lastPathComponent,l=a.indexOf(u);if(-1!==l&&l+u.length===a.length){const e=a.substring(0,l);if(o.startsWith(e)&&o.length>l)return o.substring(l)}const d=t.StringUtilities.trimURL(o,c.host);return"/"===d?c.host+"/":d},metadataForURL:E,resourceMetadata:x});const O=new WeakMap;class W{#b;#S;#C;#c;constructor(e,t){this.#b=e;const o=this.#b.target();this.#S=new l(t,"css:"+o.id(),i.Workspace.projectTypes.Network,"",!1),w.setTargetForProject(this.#S,o),this.#C=new Map,this.#c=[this.#b.addEventListener(r.CSSModel.Events.StyleSheetAdded,this.styleSheetAdded,this),this.#b.addEventListener(r.CSSModel.Events.StyleSheetRemoved,this.styleSheetRemoved,this),this.#b.addEventListener(r.CSSModel.Events.StyleSheetChanged,this.styleSheetChanged,this)]}addSourceMap(e,t){this.#C.get(e)?.addSourceMap(e,t)}rawLocationToUILocation(e){const t=e.header();if(!t||!this.acceptsHeader(t))return null;const o=this.#C.get(t.resourceURL());if(!o)return null;let r=e.lineNumber,s=e.columnNumber;if(t.isInline&&t.hasSourceURL){r-=t.lineNumberInSource(0);const e=t.columnNumberInSource(r,0);void 0===e?s=e:s-=e}return o.getUiSourceCode().uiLocation(r,s)}uiLocationToRawLocations(e){const t=O.get(e.uiSourceCode);if(!t)return[];const o=[];for(const s of t.getHeaders()){let t=e.lineNumber,i=e.columnNumber;s.isInline&&s.hasSourceURL&&(i=s.columnNumberInSource(t,e.columnNumber||0),t=s.lineNumberInSource(t)),o.push(new r.CSSModel.CSSLocation(s,t,i))}return o}acceptsHeader(e){return!e.isConstructedByNew()&&(!(e.isInline&&!e.hasSourceURL&&"inspector"!==e.origin)&&!!e.resourceURL())}styleSheetAdded(e){const t=e.data;if(!this.acceptsHeader(t))return;const o=t.resourceURL();let r=this.#C.get(o);r?r.addHeader(t):(r=new B(this.#b,this.#S,t),this.#C.set(o,r))}styleSheetRemoved(e){const t=e.data;if(!this.acceptsHeader(t))return;const o=t.resourceURL(),r=this.#C.get(o);r&&(1===r.getHeaders().size?(r.dispose(),this.#C.delete(o)):r.removeHeader(t))}styleSheetChanged(e){const t=this.#b.styleSheetHeaderForId(e.data.styleSheetId);if(!t||!this.acceptsHeader(t))return;const o=this.#C.get(t.resourceURL());o&&o.styleSheetChanged(t)}dispose(){for(const e of this.#C.values())e.dispose();this.#C.clear(),e.EventTarget.removeEventListeners(this.#c),this.#S.removeProject()}}class B{#b;#S;headers;uiSourceCode;#c;#v;#w;#I;#T;constructor(t,o,r){this.#b=t,this.#S=o,this.headers=new Set([r]);const s=t.target(),n=r.resourceURL(),a=E(s,r.frameId,n);this.uiSourceCode=this.#S.createUISourceCode(n,r.contentType()),O.set(this.uiSourceCode,this),w.setInitialFrameAttribution(this.uiSourceCode,r.frameId),this.#S.addUISourceCodeWithProvider(this.uiSourceCode,this,a,"text/css"),this.#c=[this.uiSourceCode.addEventListener(i.UISourceCode.Events.WorkingCopyChanged,this.workingCopyChanged,this),this.uiSourceCode.addEventListener(i.UISourceCode.Events.WorkingCopyCommitted,this.workingCopyCommitted,this)],this.#v=new e.Throttler.Throttler(B.updateTimeout),this.#w=!1}addHeader(e){this.headers.add(e),w.addFrameAttribution(this.uiSourceCode,e.frameId)}removeHeader(e){this.headers.delete(e),w.removeFrameAttribution(this.uiSourceCode,e.frameId)}styleSheetChanged(e){if(console.assert(this.headers.has(e)),this.#T||!this.headers.has(e))return;const t=this.mirrorContent.bind(this,e,!0);this.#v.schedule(t,"Default")}workingCopyCommitted(){if(this.#I)return;const e=this.mirrorContent.bind(this,this.uiSourceCode,!0);this.#v.schedule(e,"AsSoonAsPossible")}workingCopyChanged(){if(this.#I)return;const e=this.mirrorContent.bind(this,this.uiSourceCode,!1);this.#v.schedule(e,"Default")}async mirrorContent(e,t){if(this.#w)return void this.styleFileSyncedForTest();let o=null;if(o=e===this.uiSourceCode?this.uiSourceCode.workingCopy():s.ContentData.ContentData.textOr(await e.requestContentData(),null),null===o||this.#w)return void this.styleFileSyncedForTest();e!==this.uiSourceCode&&(this.#I=!0,this.uiSourceCode.addRevision(o),this.#I=!1),this.#T=!0;const r=[];for(const s of this.headers)s!==e&&r.push(this.#b.setStyleSheetText(s.id,o,t));await Promise.all(r),this.#T=!1,this.styleFileSyncedForTest()}styleFileSyncedForTest(){}dispose(){this.#w||(this.#w=!0,this.#S.removeUISourceCode(this.uiSourceCode.url()),e.EventTarget.removeEventListeners(this.#c))}contentURL(){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().contentURL()}contentType(){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().contentType()}requestContent(){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().requestContent()}requestContentData(){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().requestContentData()}searchInContent(e,t,o){return console.assert(this.headers.size>0),this.headers.values().next().value.originalContentProvider().searchInContent(e,t,o)}static updateTimeout=200;getHeaders(){return this.headers}getUiSourceCode(){return this.uiSourceCode}addSourceMap(e,t){const o=this.#b.sourceMapManager();this.headers.forEach((r=>{o.detachSourceMap(r),o.attachSourceMap(r,e,t)}))}}var H=Object.freeze({__proto__:null,StylesSourceMapping:W,StyleFile:B});let _;class z{#R;#y;#F;constructor(e,t){this.#R=e,this.#y=new Map,t.observeModels(r.CSSModel.CSSModel,this),this.#F=new Set}static instance(e={forceNew:null,resourceMapping:null,targetManager:null}){const{forceNew:t,resourceMapping:o,targetManager:r}=e;if(!_||t){if(!o||!r)throw new Error(`Unable to create CSSWorkspaceBinding: resourceMapping and targetManager must be provided: ${(new Error).stack}`);_=new z(o,r)}return _}static removeInstance(){_=void 0}get modelToInfo(){return this.#y}getCSSModelInfo(e){return this.#y.get(e)}modelAdded(e){this.#y.set(e,new V(e,this.#R))}modelRemoved(e){this.getCSSModelInfo(e).dispose(),this.#y.delete(e)}async pendingLiveLocationChangesPromise(){await Promise.all(this.#F)}recordLiveLocationChange(e){e.then((()=>{this.#F.delete(e)})),this.#F.add(e)}async updateLocations(e){const t=this.getCSSModelInfo(e.cssModel()).updateLocations(e);this.recordLiveLocationChange(t),await t}createLiveLocation(e,t,o){const r=this.getCSSModelInfo(e.cssModel()).createLiveLocation(e,t,o);return this.recordLiveLocationChange(r),r}propertyRawLocation(e,t){const o=e.ownerStyle;if(!o||o.type!==r.CSSStyleDeclaration.Type.Regular||!o.styleSheetId)return null;const s=o.cssModel().styleSheetHeaderForId(o.styleSheetId);if(!s)return null;const i=t?e.nameRange():e.valueRange();if(!i)return null;const n=i.startLine,a=i.startColumn;return new r.CSSModel.CSSLocation(s,s.lineNumberInSource(n),s.columnNumberInSource(n,a))}propertyUILocation(e,t){const o=this.propertyRawLocation(e,t);return o?this.rawLocationToUILocation(o):null}rawLocationToUILocation(e){return this.getCSSModelInfo(e.cssModel()).rawLocationToUILocation(e)}uiLocationToRawLocations(e){const t=[];for(const o of this.#y.values())t.push(...o.uiLocationToRawLocations(e));return t}}class V{#c;#R;#U;#P;#m;#k;constructor(e,o){this.#c=[e.addEventListener(r.CSSModel.Events.StyleSheetAdded,(e=>{this.styleSheetAdded(e)}),this),e.addEventListener(r.CSSModel.Events.StyleSheetRemoved,(e=>{this.styleSheetRemoved(e)}),this)],this.#R=o,this.#U=new W(e,o.workspace);const s=e.sourceMapManager();this.#P=new P(e.target(),s,o.workspace),this.#m=new t.MapUtilities.Multimap,this.#k=new t.MapUtilities.Multimap}get locations(){return this.#m}async createLiveLocation(e,t,o){const r=new q(e,this,t,o),s=e.header();return s?(r.setHeader(s),this.#m.set(s,r),await r.update()):this.#k.set(e.url,r),r}disposeLocation(e){const t=e.header();t?this.#m.delete(t,e):this.#k.delete(e.url,e)}updateLocations(e){const t=[];for(const o of this.#m.get(e))t.push(o.update());return Promise.all(t)}async styleSheetAdded(e){const t=e.data;if(!t.sourceURL)return;const o=[];for(const e of this.#k.get(t.sourceURL))e.setHeader(t),this.#m.set(t,e),o.push(e.update());await Promise.all(o),this.#k.deleteAll(t.sourceURL)}async styleSheetRemoved(e){const t=e.data,o=[];for(const e of this.#m.get(t))e.setHeader(t),this.#k.set(e.url,e),o.push(e.update());await Promise.all(o),this.#m.deleteAll(t)}addSourceMap(e,t){this.#U.addSourceMap(e,t)}rawLocationToUILocation(e){let t=null;return t=t||this.#P.rawLocationToUILocation(e),t=t||this.#U.rawLocationToUILocation(e),t=t||this.#R.cssLocationToUILocation(e),t}uiLocationToRawLocations(e){let t=this.#P.uiLocationToRawLocations(e);return t.length?t:(t=this.#U.uiLocationToRawLocations(e),t.length?t:this.#R.uiLocationToCSSLocations(e))}dispose(){e.EventTarget.removeEventListeners(this.#c),this.#U.dispose(),this.#P.dispose()}}class q extends y{url;#j;#D;#N;headerInternal;constructor(e,t,o,r){super(o,r),this.url=e.url,this.#j=e.lineNumber,this.#D=e.columnNumber,this.#N=t,this.headerInternal=null}header(){return this.headerInternal}setHeader(e){this.headerInternal=e}async uiLocation(){if(!this.headerInternal)return null;const e=new r.CSSModel.CSSLocation(this.headerInternal,this.#j,this.#D);return z.instance().rawLocationToUILocation(e)}dispose(){super.dispose(),this.#N.disposeLocation(this)}async isIgnoreListed(){return!1}}var G=Object.freeze({__proto__:null,CSSWorkspaceBinding:z,ModelInfo:V,LiveLocation:q});const K={errorInDebuggerLanguagePlugin:"Error in debugger language plugin: {PH1}",loadingDebugSymbolsForVia:"[{PH1}] Loading debug symbols for {PH2} (via {PH3})...",loadingDebugSymbolsFor:"[{PH1}] Loading debug symbols for {PH2}...",loadedDebugSymbolsForButDidnt:"[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files",loadedDebugSymbolsForFound:"[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)",failedToLoadDebugSymbolsFor:"[{PH1}] Failed to load debug symbols for {PH2} ({PH3})",failedToLoadDebugSymbolsForFunction:'No debug information for function "{PH1}"',debugSymbolsIncomplete:"The debug information for function {PH1} is incomplete"},$=n.i18n.registerUIStrings("models/bindings/DebuggerLanguagePlugins.ts",K),J=n.i18n.getLocalizedString.bind(void 0,$);function X(e){return`${e.sourceURL}@${e.hash}`}function Q(e){const{script:t}=e;return{rawModuleId:X(t),codeOffset:e.location().columnNumber-(t.codeOffset()||0),inlineFrameIndex:e.inlineFrameIndex}}class Y extends Error{exception;exceptionDetails;constructor(e,t){const{description:o}=t.exception||{};super(o||t.text),this.exception=e,this.exceptionDetails=t}static makeLocal(e,t){const o={type:"object",subtype:"error",description:t},r={text:"Uncaught",exceptionId:-1,columnNumber:0,lineNumber:0,exception:o},s=e.debuggerModel.runtimeModel().createRemoteObject(o);return new Y(s,r)}}class Z extends r.RemoteObject.LocalJSONObject{constructor(e){super(e)}get description(){return this.type}get type(){return"namespace"}}async function ee(e,t,o){if("reftype"===t.type){const o=await async function(e,t){if(!/^(local|global|operand)$/.test(t.valueClass))return{type:"undefined"};const o=Number(t.index),r=`${t.valueClass}s[${o}]`,s=await e.debuggerModel.agent.invoke_evaluateOnCallFrame({callFrameId:e.id,expression:r,silent:!0,generatePreview:!0,throwOnSideEffect:!0});return s.getError()||s.exceptionDetails?{type:"undefined"}:s.result}(e,t);return e.debuggerModel.runtimeModel().createRemoteObject(o)}return new re(e,t,o)}class te extends r.RemoteObject.RemoteObjectImpl{variables;#E;#x;stopId;constructor(e,t,o){super(e.debuggerModel.runtimeModel(),void 0,"object",void 0,null),this.variables=[],this.#E=e,this.#x=o,this.stopId=t}async doGetProperties(e,t,o){if(t)return{properties:[],internalProperties:[]};const s=[],i={};function n(e,t){return new r.RemoteObject.RemoteObjectProperty(e,t,!1,!1,!0,!1)}for(const e of this.variables){let t;try{const o=await this.#x.evaluate(e.name,Q(this.#E),this.stopId);t=o?await ee(this.#E,o,this.#x):new r.RemoteObject.LocalJSONObject(void 0)}catch(e){console.warn(e),t=new r.RemoteObject.LocalJSONObject(void 0)}if(e.nestedName&&e.nestedName.length>1){let o=i;for(let t=0;t<e.nestedName.length-1;t++){const r=e.nestedName[t];let s=o[r];s||(s=new Z({}),o[r]=s),o=s.value}o[e.nestedName[e.nestedName.length-1]]=t}else s.push(n(e.name,t))}for(const e in i)s.push(n(e,i[e]));return{properties:s,internalProperties:[]}}}class oe{#A;#O;#W;#B;#H;constructor(e,t,o,r,s,i){if(s&&"data:"!==new URL(s).protocol)throw new Error("The icon must be a data:-URL");this.#A=e,this.#O=o,this.#W=r,this.#B=s,this.#H=new te(e,t,i)}async getVariableValue(e){for(let t=0;t<this.#H.variables.length;++t){if(this.#H.variables[t].name!==e)continue;const o=await this.#H.getAllProperties(!1,!1);if(!o.properties)continue;const{value:r}=o.properties[t];if(r)return r}return null}callFrame(){return this.#A}type(){return this.#O}typeName(){return this.#W}name(){}range(){return null}object(){return this.#H}description(){return""}icon(){return this.#B}extraProperties(){return[]}}class re extends r.RemoteObject.RemoteObject{extensionObject;plugin;callFrame;constructor(e,t,o){super(),this.extensionObject=t,this.plugin=o,this.callFrame=e}get linearMemoryAddress(){return this.extensionObject.linearMemoryAddress}get linearMemorySize(){return this.extensionObject.linearMemorySize}get objectId(){return this.extensionObject.objectId}get type(){return"array"===this.extensionObject.type||"null"===this.extensionObject.type?"object":this.extensionObject.type}get subtype(){if("array"===this.extensionObject.type||"null"===this.extensionObject.type)return this.extensionObject.type}get value(){return this.extensionObject.value}unserializableValue(){}get description(){return this.extensionObject.description}set description(e){}get hasChildren(){return this.extensionObject.hasChildren}get preview(){}get className(){return this.extensionObject.className??null}arrayLength(){return 0}arrayBufferByteLength(){return 0}getOwnProperties(e,t){return this.getAllProperties(!1,e,t)}async getAllProperties(e,t,s){const{objectId:i}=this.extensionObject;if(i){o(this.plugin.getProperties);const e=await this.plugin.getProperties(i);return{properties:await Promise.all(e.map((async e=>new r.RemoteObject.RemoteObjectProperty(e.name,await ee(this.callFrame,e.value,this.plugin))))),internalProperties:null}}return{properties:null,internalProperties:null}}release(){const{objectId:e}=this.extensionObject;e&&(o(this.plugin.releaseObject),this.plugin.releaseObject(e))}debuggerModel(){return this.callFrame.debuggerModel}runtimeModel(){return this.callFrame.debuggerModel.runtimeModel()}isLinearMemoryInspectable(){return void 0!==this.extensionObject.linearMemoryAddress}}class se{#_;#o;#z;#V;#q;callFrameByStopId=new Map;stopIdByCallFrame=new Map;nextStopId=0n;constructor(e,t,o){this.#_=t,this.#o=o,this.#z=[],this.#V=new Map,e.observeModels(r.DebuggerModel.DebuggerModel,this),this.#q=new Map}async evaluateOnCallFrame(e,t){const{script:o}=e,{expression:s,returnByValue:i,throwOnSideEffect:n}=t,{plugin:a}=await this.rawModuleIdAndPluginForScript(o);if(!a)return null;const c=Q(e);if(0===(await a.rawLocationToSourceLocation(c)).length)return null;if(i)return{error:"Cannot return by value"};if(n)return{error:"Cannot guarantee side-effect freedom"};try{const t=await a.evaluate(s,c,this.stopIdForCallFrame(e));return t?{object:await ee(e,t,a),exceptionDetails:void 0}:{object:new r.RemoteObject.LocalJSONObject(void 0),exceptionDetails:void 0}}catch(t){if(t instanceof Y){const{exception:e,exceptionDetails:o}=t;return{object:e,exceptionDetails:o}}const{exception:o,exceptionDetails:r}=Y.makeLocal(e,t.message);return{object:o,exceptionDetails:r}}}stopIdForCallFrame(e){let t=this.stopIdByCallFrame.get(e);return void 0!==t||(t=this.nextStopId++,this.stopIdByCallFrame.set(e,t),this.callFrameByStopId.set(t,e)),t}callFrameForStopId(e){return this.callFrameByStopId.get(e)}expandCallFrames(e){return Promise.all(e.map((async e=>{const t=await this.getFunctionInfo(e.script,e.location());if(t){if("frames"in t&&t.frames.length)return t.frames.map((({name:t},o)=>e.createVirtualCallFrame(o,t)));if("missingSymbolFiles"in t&&t.missingSymbolFiles.length){const o=t.missingSymbolFiles,r=J(K.debugSymbolsIncomplete,{PH1:e.functionName});e.missingDebugInfoDetails={details:r,resources:o}}else e.missingDebugInfoDetails={details:J(K.failedToLoadDebugSymbolsForFunction,{PH1:e.functionName}),resources:[]}}return e}))).then((e=>e.flat()))}modelAdded(e){this.#V.set(e,new ie(e,this.#_)),e.addEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),e.addEventListener(r.DebuggerModel.Events.ParsedScriptSource,this.parsedScriptSource,this),e.addEventListener(r.DebuggerModel.Events.DebuggerResumed,this.debuggerResumed,this),e.setEvaluateOnCallFrameCallback(this.evaluateOnCallFrame.bind(this)),e.setExpandCallFramesCallback(this.expandCallFrames.bind(this))}modelRemoved(t){t.removeEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),t.removeEventListener(r.DebuggerModel.Events.ParsedScriptSource,this.parsedScriptSource,this),t.removeEventListener(r.DebuggerModel.Events.DebuggerResumed,this.debuggerResumed,this),t.setEvaluateOnCallFrameCallback(null),t.setExpandCallFramesCallback(null);const o=this.#V.get(t);o&&(o.dispose(),this.#V.delete(t)),this.#q.forEach(((o,r)=>{const s=o.scripts.filter((e=>e.debuggerModel!==t));0===s.length?(o.plugin.removeRawModule(r).catch((t=>{e.Console.Console.instance().error(J(K.errorInDebuggerLanguagePlugin,{PH1:t.message}),!1)})),this.#q.delete(r)):o.scripts=s}))}globalObjectCleared(e){const t=e.data;this.modelRemoved(t),this.modelAdded(t)}addPlugin(e){this.#z.push(e);for(const e of this.#V.keys())for(const t of e.scripts())this.hasPluginForScript(t)||this.parsedScriptSource({data:t})}removePlugin(e){this.#z=this.#z.filter((t=>t!==e));const t=new Set;this.#q.forEach(((o,r)=>{o.plugin===e&&(o.scripts.forEach((e=>t.add(e))),this.#q.delete(r))}));for(const e of t){this.#V.get(e.debuggerModel).removeScript(e),this.parsedScriptSource({data:e})}}hasPluginForScript(e){const t=X(e),o=this.#q.get(t);return void 0!==o&&o.scripts.includes(e)}async rawModuleIdAndPluginForScript(e){const t=X(e),o=this.#q.get(t);return o&&(await o.addRawModulePromise,o===this.#q.get(t))?{rawModuleId:t,plugin:o.plugin}:{rawModuleId:t,plugin:null}}uiSourceCodeForURL(e,t){const o=this.#V.get(e);return o?o.getProject().uiSourceCodeForURL(t):null}async rawLocationToUILocation(t){const o=t.script();if(!o)return null;const{rawModuleId:r,plugin:s}=await this.rawModuleIdAndPluginForScript(o);if(!s)return null;const i={rawModuleId:r,codeOffset:t.columnNumber-(o.codeOffset()||0),inlineFrameIndex:t.inlineFrameIndex};try{const e=await s.rawLocationToSourceLocation(i);for(const t of e){const e=this.uiSourceCodeForURL(o.debuggerModel,t.sourceFileURL);if(e)return e.uiLocation(t.lineNumber,t.columnNumber>=0?t.columnNumber:void 0)}}catch(t){e.Console.Console.instance().error(J(K.errorInDebuggerLanguagePlugin,{PH1:t.message}),!1)}return null}uiLocationToRawLocationRanges(t,o,s=-1){const i=[];return this.scriptsForUISourceCode(t).forEach((e=>{const n=X(e),a=this.#q.get(n);if(!a)return;const{plugin:c}=a;i.push(async function(e,i,n){const a={rawModuleId:e,sourceFileURL:t.url(),lineNumber:o,columnNumber:s},c=await i.sourceLocationToRawLocation(a);if(!c)return[];return c.map((e=>({start:new r.DebuggerModel.Location(n.debuggerModel,n.scriptId,0,Number(e.startOffset)+(n.codeOffset()||0)),end:new r.DebuggerModel.Location(n.debuggerModel,n.scriptId,0,Number(e.endOffset)+(n.codeOffset()||0))})))}(n,c,e))})),0===i.length?Promise.resolve(null):Promise.all(i).then((e=>e.flat())).catch((t=>(e.Console.Console.instance().error(J(K.errorInDebuggerLanguagePlugin,{PH1:t.message}),!1),null)))}async uiLocationToRawLocations(e,t,o){const r=await this.uiLocationToRawLocationRanges(e,t,o);return r?r.map((({start:e})=>e)):null}async uiLocationRangeToRawLocationRanges(e,t){const o=[];for(let r=t.startLine;r<=t.endLine;++r)o.push(this.uiLocationToRawLocationRanges(e,r));const r=[];for(const e of await Promise.all(o)){if(null===e)return null;for(const o of e){const[e,i]=await Promise.all([this.rawLocationToUILocation(o.start),this.rawLocationToUILocation(o.end)]);if(null===e||null===i)continue;t.intersection(new s.TextRange.TextRange(e.lineNumber,e.columnNumber??0,i.lineNumber,i.columnNumber??1/0)).isEmpty()||r.push(o)}}return r}scriptsForUISourceCode(e){for(const t of this.#V.values()){const o=t.uiSourceCodeToScripts.get(e);if(o)return o}return[]}setDebugInfoURL(e,t){this.hasPluginForScript(e)||(e.debugSymbols={type:"ExternalDWARF",externalURL:t},this.parsedScriptSource({data:e}),e.debuggerModel.setDebugInfoURL(e,t))}parsedScriptSource(t){const o=t.data;if(o.sourceURL)for(const t of this.#z){if(!t.handleScript(o))continue;const r=X(o);let s=this.#q.get(r);if(s)s.scripts.push(o);else{const i=(async()=>{const i=e.Console.Console.instance(),n=o.sourceURL,a=o.debugSymbols&&o.debugSymbols.externalURL||"";a?i.log(J(K.loadingDebugSymbolsForVia,{PH1:t.name,PH2:n,PH3:a})):i.log(J(K.loadingDebugSymbolsFor,{PH1:t.name,PH2:n}));try{const c=!a&&e.ParsedURL.schemeIs(n,"wasm:")?await o.getWasmBytecode():void 0,u=await t.addRawModule(r,a,{url:n,code:c});if(s!==this.#q.get(r))return[];if("missingSymbolFiles"in u){const e=t.createPageResourceLoadInitiator();return{missingSymbolFiles:u.missingSymbolFiles.map((t=>({resourceUrl:t,initiator:e})))}}const l=u;return 0===l.length?i.warn(J(K.loadedDebugSymbolsForButDidnt,{PH1:t.name,PH2:n})):i.log(J(K.loadedDebugSymbolsForFound,{PH1:t.name,PH2:n,PH3:l.length})),l}catch(e){return i.error(J(K.failedToLoadDebugSymbolsFor,{PH1:t.name,PH2:n,PH3:e.message}),!1),this.#q.delete(r),[]}})();s={rawModuleId:r,plugin:t,scripts:[o],addRawModulePromise:i},this.#q.set(r,s)}return void s.addRawModulePromise.then((e=>{if(!("missingSymbolFiles"in e)&&o.debuggerModel.scriptForId(o.scriptId)===o){const t=this.#V.get(o.debuggerModel);t&&(t.addSourceFiles(o,e),this.#o.updateLocations(o))}}))}}debuggerResumed(e){const t=Array.from(this.callFrameByStopId.values()).filter((t=>t.debuggerModel===e.data));for(const e of t){const t=this.stopIdByCallFrame.get(e);o(t),this.stopIdByCallFrame.delete(e),this.callFrameByStopId.delete(t)}}getSourcesForScript(e){const t=X(e),o=this.#q.get(t);return o?o.addRawModulePromise:Promise.resolve(void 0)}async resolveScopeChain(t){const o=t.script,{rawModuleId:r,plugin:s}=await this.rawModuleIdAndPluginForScript(o);if(!s)return null;const i={rawModuleId:r,codeOffset:t.location().columnNumber-(o.codeOffset()||0),inlineFrameIndex:t.inlineFrameIndex},n=this.stopIdForCallFrame(t);try{if(0===(await s.rawLocationToSourceLocation(i)).length)return null;const e=new Map,o=await s.listVariablesInScope(i);for(const r of o||[]){let o=e.get(r.scope);if(!o){const{type:i,typeName:a,icon:c}=await s.getScopeInfo(r.scope);o=new oe(t,n,i,a,c,s),e.set(r.scope,o)}o.object().variables.push(r)}return Array.from(e.values())}catch(t){return e.Console.Console.instance().error(J(K.errorInDebuggerLanguagePlugin,{PH1:t.message}),!1),null}}async getFunctionInfo(t,o){const{rawModuleId:r,plugin:s}=await this.rawModuleIdAndPluginForScript(t);if(!s)return null;const i={rawModuleId:r,codeOffset:o.columnNumber-(t.codeOffset()||0),inlineFrameIndex:0};try{const e=await s.getFunctionInfo(i);if("missingSymbolFiles"in e){const t=s.createPageResourceLoadInitiator();return{missingSymbolFiles:e.missingSymbolFiles.map((e=>({resourceUrl:e,initiator:t}))),..."frames"in e&&{frames:e.frames}}}return e}catch(t){return e.Console.Console.instance().warn(J(K.errorInDebuggerLanguagePlugin,{PH1:t.message})),{frames:[]}}}async getInlinedFunctionRanges(t){const o=t.script();if(!o)return[];const{rawModuleId:s,plugin:i}=await this.rawModuleIdAndPluginForScript(o);if(!i)return[];const n={rawModuleId:s,codeOffset:t.columnNumber-(o.codeOffset()||0)};try{return(await i.getInlinedFunctionRanges(n)).map((e=>({start:new r.DebuggerModel.Location(o.debuggerModel,o.scriptId,0,Number(e.startOffset)+(o.codeOffset()||0)),end:new r.DebuggerModel.Location(o.debuggerModel,o.scriptId,0,Number(e.endOffset)+(o.codeOffset()||0))})))}catch(t){return e.Console.Console.instance().warn(J(K.errorInDebuggerLanguagePlugin,{PH1:t.message})),[]}}async getInlinedCalleesRanges(t){const o=t.script();if(!o)return[];const{rawModuleId:s,plugin:i}=await this.rawModuleIdAndPluginForScript(o);if(!i)return[];const n={rawModuleId:s,codeOffset:t.columnNumber-(o.codeOffset()||0)};try{return(await i.getInlinedCalleesRanges(n)).map((e=>({start:new r.DebuggerModel.Location(o.debuggerModel,o.scriptId,0,Number(e.startOffset)+(o.codeOffset()||0)),end:new r.DebuggerModel.Location(o.debuggerModel,o.scriptId,0,Number(e.endOffset)+(o.codeOffset()||0))})))}catch(t){return e.Console.Console.instance().warn(J(K.errorInDebuggerLanguagePlugin,{PH1:t.message})),[]}}async getMappedLines(e){const t=await Promise.all(this.scriptsForUISourceCode(e).map((e=>this.rawModuleIdAndPluginForScript(e))));let o=null;for(const{rawModuleId:r,plugin:s}of t){if(!s)continue;const t=await s.getMappedLines(r,e.url());void 0!==t&&(null===o?o=new Set(t):t.forEach((e=>o.add(e))))}return o}}class ie{project;uiSourceCodeToScripts;constructor(e,t){this.project=new l(t,"language_plugins::"+e.target().id(),i.Workspace.projectTypes.Network,"",!1),w.setTargetForProject(this.project,e.target()),this.uiSourceCodeToScripts=new Map}addSourceFiles(t,o){const s=t.createPageResourceLoadInitiator();for(const i of o){let o=this.project.uiSourceCodeForURL(i);if(o){const e=this.uiSourceCodeToScripts.get(o);e.includes(t)||e.push(t)}else{o=this.project.createUISourceCode(i,e.ResourceType.resourceTypes.SourceMapScript),w.setInitialFrameAttribution(o,t.frameId),this.uiSourceCodeToScripts.set(o,[t]);const n=new r.CompilerSourceMappingContentProvider.CompilerSourceMappingContentProvider(i,e.ResourceType.resourceTypes.SourceMapScript,s),a=e.ResourceType.ResourceType.mimeFromURL(i)||"text/javascript";this.project.addUISourceCodeWithProvider(o,n,null,a)}}}removeScript(e){this.uiSourceCodeToScripts.forEach(((t,o)=>{0===(t=t.filter((t=>t!==e))).length?(this.uiSourceCodeToScripts.delete(o),this.project.removeUISourceCode(o.url())):this.uiSourceCodeToScripts.set(o,t)}))}dispose(){this.project.dispose()}getProject(){return this.project}}var ne=Object.freeze({__proto__:null,SourceScope:oe,ExtensionRemoteObject:re,DebuggerLanguagePluginManager:se});class ae{#o;#S;#c;#G;#K;constructor(e,t,o){ce.add(this),this.#o=o,this.#S=new l(t,"debugger:"+e.target().id(),i.Workspace.projectTypes.Debugger,"",!0),this.#c=[e.addEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),e.addEventListener(r.DebuggerModel.Events.ParsedScriptSource,this.parsedScriptSource,this),e.addEventListener(r.DebuggerModel.Events.DiscardedAnonymousScriptSource,this.discardedScriptSource,this)],this.#G=new Map,this.#K=new Map}static createV8ScriptURL(t){const o=e.ParsedURL.ParsedURL.extractName(t.sourceURL);return"debugger:///VM"+t.scriptId+(o?" "+o:"")}static scriptForUISourceCode(e){for(const t of ce){const o=t.#G.get(e);if(void 0!==o)return o}return null}uiSourceCodeForScript(e){return this.#K.get(e)??null}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const o=this.#K.get(t);if(!o)return null;const{lineNumber:r,columnNumber:s}=t.rawLocationToRelativeLocation(e);return o.uiLocation(r,s)}uiLocationToRawLocations(e,t,o){const r=this.#G.get(e);return r?(({lineNumber:t,columnNumber:o}=r.relativeLocationToRawLocation({lineNumber:t,columnNumber:o})),[r.debuggerModel.createRawLocation(r,t,o??0)]):[]}uiLocationRangeToRawLocationRanges(e,{startLine:t,startColumn:o,endLine:r,endColumn:s}){const i=this.#G.get(e);if(!i)return[];({lineNumber:t,columnNumber:o}=i.relativeLocationToRawLocation({lineNumber:t,columnNumber:o})),({lineNumber:r,columnNumber:s}=i.relativeLocationToRawLocation({lineNumber:r,columnNumber:s}));return[{start:i.debuggerModel.createRawLocation(i,t,o),end:i.debuggerModel.createRawLocation(i,r,s)}]}parsedScriptSource(t){const o=t.data,r=ae.createV8ScriptURL(o),s=this.#S.createUISourceCode(r,e.ResourceType.resourceTypes.Script);o.isBreakpointCondition&&s.markAsUnconditionallyIgnoreListed(),this.#G.set(s,o),this.#K.set(o,s),this.#S.addUISourceCodeWithProvider(s,o,null,"text/javascript"),this.#o.updateLocations(o)}discardedScriptSource(e){const t=e.data,o=this.#K.get(t);void 0!==o&&(this.#K.delete(t),this.#G.delete(o),this.#S.removeUISourceCode(o.url()))}globalObjectCleared(){this.#K.clear(),this.#G.clear(),this.#S.reset()}dispose(){ce.delete(this),e.EventTarget.removeEventListeners(this.#c),this.globalObjectCleared(),this.#S.dispose()}}const ce=new Set;var ue=Object.freeze({__proto__:null,DefaultScriptMapping:ae});const le={liveEditFailed:"`LiveEdit` failed: {PH1}",liveEditCompileFailed:"`LiveEdit` compile failed: {PH1}"},de=n.i18n.registerUIStrings("models/bindings/ResourceScriptMapping.ts",le),ge=n.i18n.getLocalizedString.bind(void 0,de);class pe{debuggerModel;#_;debuggerWorkspaceBinding;#$;#u;#K;#c;constructor(e,t,o){this.debuggerModel=e,this.#_=t,this.debuggerWorkspaceBinding=o,this.#$=new Map,this.#u=new Map,this.#K=new Map;const s=e.runtimeModel();this.#c=[this.debuggerModel.addEventListener(r.DebuggerModel.Events.ParsedScriptSource,(e=>this.addScript(e.data)),this),this.debuggerModel.addEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),s.addEventListener(r.RuntimeModel.Events.ExecutionContextDestroyed,this.executionContextDestroyed,this),s.target().targetManager().addEventListener("InspectedURLChanged",this.inspectedURLChanged,this)]}project(e){const t=(e.isContentScript()?"js:extensions:":"js::")+this.debuggerModel.target().id()+":"+e.frameId;let o=this.#u.get(t);if(!o){const r=e.isContentScript()?i.Workspace.projectTypes.ContentScripts:i.Workspace.projectTypes.Network;o=new l(this.#_,t,r,"",!1),w.setTargetForProject(o,this.debuggerModel.target()),this.#u.set(t,o)}return o}uiSourceCodeForScript(e){return this.#K.get(e)??null}rawLocationToUILocation(e){const t=e.script();if(!t)return null;const o=this.#K.get(t);if(!o)return null;const r=this.#$.get(o);if(!r)return null;if(r.hasDivergedFromVM()&&!r.isMergingToVM()||r.isDivergingFromVM())return null;if(r.script!==t)return null;const{lineNumber:s,columnNumber:i=0}=e;return o.uiLocation(s,i)}uiLocationToRawLocations(e,t,o){const r=this.#$.get(e);if(!r)return[];const{script:s}=r;return s?[this.debuggerModel.createRawLocation(s,t,o)]:[]}uiLocationRangeToRawLocationRanges(e,{startLine:t,startColumn:o,endLine:r,endColumn:s}){const i=this.#$.get(e);if(!i)return null;const{script:n}=i;if(!n)return null;return[{start:this.debuggerModel.createRawLocation(n,t,o),end:this.debuggerModel.createRawLocation(n,r,s)}]}inspectedURLChanged(e){for(let t=this.debuggerModel.target();t!==e.data;t=t.parentTarget())if(null===t)return;for(const e of Array.from(this.#K.keys()))this.removeScripts([e]),this.addScript(e)}addScript(t){if(t.isLiveEdit()||t.isBreakpointCondition)return;let o=t.sourceURL;if(!o)return;if(t.hasSourceURL)o=r.SourceMapManager.SourceMapManager.resolveRelativeSourceURL(t.debuggerModel.target(),o);else{if(t.isInlineScript())return;if(t.isContentScript()){if(!new e.ParsedURL.ParsedURL(o).isValid)return}}const s=this.project(t),i=s.uiSourceCodeForURL(o);if(i){const e=this.#$.get(i);e&&e.script&&this.removeScripts([e.script])}const n=t.originalContentProvider(),a=s.createUISourceCode(o,n.contentType());w.setInitialFrameAttribution(a,t.frameId);const c=E(this.debuggerModel.target(),t.frameId,o),u=new he(this,a,t);this.#$.set(a,u),this.#K.set(t,a);const l=t.isWasm()?"application/wasm":"text/javascript";s.addUISourceCodeWithProvider(a,n,c,l),this.debuggerWorkspaceBinding.updateLocations(t)}scriptFile(e){return this.#$.get(e)||null}removeScripts(e){const o=new t.MapUtilities.Multimap;for(const t of e){const e=this.#K.get(t);if(!e)continue;const r=this.#$.get(e);r&&r.dispose(),this.#$.delete(e),this.#K.delete(t),o.set(e.project(),e),this.debuggerWorkspaceBinding.updateLocations(t)}for(const e of o.keysArray()){const t=o.get(e);let r=!0;for(const o of e.uiSourceCodes())if(!t.has(o)){r=!1;break}r?(this.#u.delete(e.id()),e.removeProject()):t.forEach((t=>e.removeUISourceCode(t.url())))}}executionContextDestroyed(e){const t=e.data;this.removeScripts(this.debuggerModel.scriptsForExecutionContext(t))}globalObjectCleared(){const e=Array.from(this.#K.keys());this.removeScripts(e)}resetForTest(){this.globalObjectCleared()}dispose(){e.EventTarget.removeEventListeners(this.#c),this.globalObjectCleared()}}class he extends e.ObjectWrapper.ObjectWrapper{#J;uiSourceCode;script;#X;#Q;#Y;#Z;#ee=new e.Mutex.Mutex;constructor(e,t,o){super(),this.#J=e,this.uiSourceCode=t,this.script=this.uiSourceCode.contentType().isScript()?o:null,this.uiSourceCode.addEventListener(i.UISourceCode.Events.WorkingCopyChanged,this.workingCopyChanged,this),this.uiSourceCode.addEventListener(i.UISourceCode.Events.WorkingCopyCommitted,this.workingCopyCommitted,this)}isDiverged(){if(this.uiSourceCode.isDirty())return!0;if(!this.script)return!1;if(void 0===this.#X||null===this.#X)return!1;const e=this.uiSourceCode.workingCopy();if(!e)return!1;if(!e.startsWith(this.#X.trimEnd()))return!0;const t=this.uiSourceCode.workingCopy().substr(this.#X.length);return Boolean(t.length)&&!t.match(r.Script.sourceURLRegex)}workingCopyChanged(){this.update()}workingCopyCommitted(){if(this.uiSourceCode.project().canSetFileContent())return;if(!this.script)return;const e=this.uiSourceCode.workingCopy();this.script.editSource(e).then((({status:t,exceptionDetails:o})=>{this.scriptSourceWasSet(e,t,o)}))}async scriptSourceWasSet(t,o,r){if("Ok"===o&&(this.#X=t),await this.update(),"Ok"===o)return;if(!r)return void e.Console.Console.instance().addMessage(ge(le.liveEditFailed,{PH1:function(e){switch(e){case"BlockedByActiveFunction":return"Functions that are on the stack (currently being executed) can not be edited";case"BlockedByActiveGenerator":return"Async functions/generators that are active can not be edited";case"BlockedByTopLevelEsModuleChange":return"The top-level of ES modules can not be edited";case"CompileError":case"Ok":throw new Error("Compile errors and Ok status must not be reported on the console")}}(o)}),"warning");const s=ge(le.liveEditCompileFailed,{PH1:r.text});this.uiSourceCode.addLineMessage("Error",s,r.lineNumber,r.columnNumber)}async update(){const e=await this.#ee.acquire(),t=this.isDiverged();t&&!this.#Y?await this.divergeFromVM():!t&&this.#Y&&await this.mergeToVM(),e()}async divergeFromVM(){this.script&&(this.#Q=!0,await this.#J.debuggerWorkspaceBinding.updateLocations(this.script),this.#Q=void 0,this.#Y=!0,this.dispatchEventToListeners("DidDivergeFromVM"))}async mergeToVM(){this.script&&(this.#Y=void 0,this.#Z=!0,await this.#J.debuggerWorkspaceBinding.updateLocations(this.script),this.#Z=void 0,this.dispatchEventToListeners("DidMergeToVM"))}hasDivergedFromVM(){return Boolean(this.#Y)}isDivergingFromVM(){return Boolean(this.#Q)}isMergingToVM(){return Boolean(this.#Z)}checkMapping(){this.script&&void 0===this.#X?this.script.requestContentData().then((e=>{this.#X=s.ContentData.ContentData.textOr(e,null),this.update().then((()=>this.mappingCheckedForTest()))})):this.mappingCheckedForTest()}mappingCheckedForTest(){}dispose(){this.uiSourceCode.removeEventListener(i.UISourceCode.Events.WorkingCopyChanged,this.workingCopyChanged,this),this.uiSourceCode.removeEventListener(i.UISourceCode.Events.WorkingCopyCommitted,this.workingCopyCommitted,this)}addSourceMapURL(e){this.script&&this.script.debuggerModel.setSourceMapURL(this.script,e)}addDebugInfoURL(e){if(!this.script)return;const{pluginManager:t}=Le.instance();t.setDebugInfoURL(this.script,e)}hasSourceMapURL(){return Boolean(this.script?.sourceMapURL)}async missingSymbolFiles(){if(!this.script)return null;const{pluginManager:e}=this.#J.debuggerWorkspaceBinding,t=await e.getSourcesForScript(this.script);return t&&"missingSymbolFiles"in t?t.missingSymbolFiles:null}}var me=Object.freeze({__proto__:null,ResourceScriptMapping:pe,ResourceScriptFile:he});let Se;class Le{resourceMapping;#te;#V;#F;pluginManager;constructor(e,t){this.resourceMapping=e,this.#te=[],this.#V=new Map,t.addModelListener(r.DebuggerModel.DebuggerModel,r.DebuggerModel.Events.GlobalObjectCleared,this.globalObjectCleared,this),t.addModelListener(r.DebuggerModel.DebuggerModel,r.DebuggerModel.Events.DebuggerResumed,this.debuggerResumed,this),t.observeModels(r.DebuggerModel.DebuggerModel,this),this.#F=new Set,this.pluginManager=new se(t,e.workspace,this)}static instance(e={forceNew:null,resourceMapping:null,targetManager:null}){const{forceNew:t,resourceMapping:o,targetManager:r}=e;if(!Se||t){if(!o||!r)throw new Error(`Unable to create DebuggerWorkspaceBinding: resourceMapping and targetManager must be provided: ${(new Error).stack}`);Se=new Le(o,r)}return Se}static removeInstance(){Se=void 0}addSourceMapping(e){this.#te.push(e)}removeSourceMapping(e){const t=this.#te.indexOf(e);-1!==t&&this.#te.splice(t,1)}async computeAutoStepRanges(e,t){function o(e,t){const{start:o,end:r}=t;return o.scriptId===e.scriptId&&(!(e.lineNumber<o.lineNumber||e.lineNumber>r.lineNumber)&&(!(e.lineNumber===o.lineNumber&&e.columnNumber<o.columnNumber)&&!(e.lineNumber===r.lineNumber&&e.columnNumber>=r.columnNumber)))}const r=t.location();if(!r)return[];const s=this.pluginManager;let i=[];if("StepOut"===e)return await s.getInlinedFunctionRanges(r);const n=await s.rawLocationToUILocation(r);if(n)return i=await s.uiLocationToRawLocationRanges(n.uiSourceCode,n.lineNumber,n.columnNumber)||[],i=i.filter((e=>o(r,e))),"StepOver"===e&&(i=i.concat(await s.getInlinedCalleesRanges(r))),i;const a=this.#V.get(r.debuggerModel)?.compilerMapping;return a?(i=a.getLocationRangesForSameSourceLocation(r),i=i.filter((e=>o(r,e))),i):[]}modelAdded(e){e.setBeforePausedCallback(this.shouldPause.bind(this)),this.#V.set(e,new Me(e,this)),e.setComputeAutoStepRangesCallback(this.computeAutoStepRanges.bind(this))}modelRemoved(e){e.setComputeAutoStepRangesCallback(null);const t=this.#V.get(e);t&&(t.dispose(),this.#V.delete(e))}async pendingLiveLocationChangesPromise(){await Promise.all(this.#F)}recordLiveLocationChange(e){e.then((()=>{this.#F.delete(e)})),this.#F.add(e)}async updateLocations(e){const t=this.#V.get(e.debuggerModel);if(t){const o=t.updateLocations(e);this.recordLiveLocationChange(o),await o}}async createLiveLocation(e,t,o){const r=this.#V.get(e.debuggerModel);if(!r)return null;const s=r.createLiveLocation(e,t,o);return this.recordLiveLocationChange(s),s}async createStackTraceTopFrameLiveLocation(e,t,o){console.assert(e.length>0);const r=be.createStackTraceTopFrameLocation(e,this,t,o);return this.recordLiveLocationChange(r),r}async createCallFrameLiveLocation(e,t,o){if(!e.script())return null;const r=e.debuggerModel,s=this.createLiveLocation(e,t,o);this.recordLiveLocationChange(s);const i=await s;return i?(this.registerCallFrameLiveLocation(r,i),i):null}async rawLocationToUILocation(e){for(const t of this.#te){const o=t.rawLocationToUILocation(e);if(o)return o}const t=await this.pluginManager.rawLocationToUILocation(e);if(t)return t;const o=this.#V.get(e.debuggerModel);return o?o.rawLocationToUILocation(e):null}uiSourceCodeForSourceMapSourceURL(e,t,o){const r=this.#V.get(e);return r?r.compilerMapping.uiSourceCodeForURL(t,o):null}async uiSourceCodeForSourceMapSourceURLPromise(e,t,o){return this.uiSourceCodeForSourceMapSourceURL(e,t,o)||this.waitForUISourceCodeAdded(t,e.target())}async uiSourceCodeForDebuggerLanguagePluginSourceURLPromise(e,t){return this.pluginManager.uiSourceCodeForURL(e,t)||this.waitForUISourceCodeAdded(t,e.target())}uiSourceCodeForScript(e){const t=this.#V.get(e.debuggerModel);return t?t.uiSourceCodeForScript(e):null}waitForUISourceCodeAdded(e,t){return new Promise((o=>{const r=i.Workspace.WorkspaceImpl.instance(),s=r.addEventListener(i.Workspace.Events.UISourceCodeAdded,(n=>{const a=n.data;a.url()===e&&w.targetForUISourceCode(a)===t&&(r.removeEventListener(i.Workspace.Events.UISourceCodeAdded,s.listener),o(a))}))}))}async uiLocationToRawLocations(e,t,o){for(const r of this.#te){const s=r.uiLocationToRawLocations(e,t,o);if(s.length)return s}const r=await this.pluginManager.uiLocationToRawLocations(e,t,o);if(r)return r;for(const r of this.#V.values()){const s=r.uiLocationToRawLocations(e,t,o);if(s.length)return s}return[]}async uiLocationRangeToRawLocationRanges(e,t){for(const o of this.#te){const r=o.uiLocationRangeToRawLocationRanges(e,t);if(r)return r}const o=await this.pluginManager.uiLocationRangeToRawLocationRanges(e,t);if(o)return o;for(const o of this.#V.values()){const r=o.uiLocationRangeToRawLocationRanges(e,t);if(r)return r}return[]}uiLocationToRawLocationsForUnformattedJavaScript(e,t,o){console.assert(e.contentType().isScript());const r=[];for(const s of this.#V.values())r.push(...s.uiLocationToRawLocations(e,t,o));return r}async normalizeUILocation(e){const t=await this.uiLocationToRawLocations(e.uiSourceCode,e.lineNumber,e.columnNumber);for(const e of t){const t=await this.rawLocationToUILocation(e);if(t)return t}return e}async getMappedLines(e){for(const t of this.#V.values()){const o=t.getMappedLines(e);if(null!==o)return o}return await this.pluginManager.getMappedLines(e)}scriptFile(e,t){const o=this.#V.get(t);return o?o.getResourceScriptMapping().scriptFile(e):null}scriptsForUISourceCode(e){const t=new Set;this.pluginManager.scriptsForUISourceCode(e).forEach((e=>t.add(e)));for(const o of this.#V.values()){const r=o.getResourceScriptMapping().scriptFile(e);r&&r.script&&t.add(r.script),o.compilerMapping.scriptsForUISourceCode(e).forEach((e=>t.add(e)))}return[...t]}supportsConditionalBreakpoints(e){return this.pluginManager.scriptsForUISourceCode(e).every((e=>e.isJavaScript()))}globalObjectCleared(e){this.reset(e.data)}reset(e){const t=this.#V.get(e);if(t){for(const e of t.callFrameLocations.values())this.removeLiveLocation(e);t.callFrameLocations.clear()}}resetForTest(e){const t=e.model(r.DebuggerModel.DebuggerModel),o=this.#V.get(t);o&&o.getResourceScriptMapping().resetForTest()}registerCallFrameLiveLocation(e,t){const o=this.#V.get(e);if(o){o.callFrameLocations.add(t)}}removeLiveLocation(e){const t=this.#V.get(e.rawLocation.debuggerModel);t&&t.disposeLocation(e)}debuggerResumed(e){this.reset(e.data)}async shouldPause(t,o){const{callFrames:[r]}=t;if(!r)return!1;const s=r.functionLocation();if(!(o&&"step"===t.reason&&s&&r.script.isWasm()&&e.Settings.moduleSetting("wasm-auto-stepping").get()&&this.pluginManager.hasPluginForScript(r.script)))return!0;return!!await this.pluginManager.rawLocationToUILocation(r.location())||(o.script()!==s.script()||o.columnNumber!==s.columnNumber||o.lineNumber!==s.lineNumber)}}class Me{#oe;#o;callFrameLocations;#re;#R;#J;compilerMapping;#m;constructor(e,o){this.#oe=e,this.#o=o,this.callFrameLocations=new Set;const{workspace:r}=o.resourceMapping;this.#re=new ae(e,r,o),this.#R=o.resourceMapping,this.#J=new pe(e,r,o),this.compilerMapping=new T(e,r,o),this.#m=new t.MapUtilities.Multimap}async createLiveLocation(e,t,o){console.assert(""!==e.scriptId);const r=e.scriptId,s=new fe(r,e,this.#o,t,o);return this.#m.set(r,s),await s.update(),s}disposeLocation(e){this.#m.delete(e.scriptId,e)}async updateLocations(e){const t=[];for(const o of this.#m.get(e.scriptId))t.push(o.update());await Promise.all(t)}rawLocationToUILocation(e){let t=this.compilerMapping.rawLocationToUILocation(e);return t=t||this.#J.rawLocationToUILocation(e),t=t||this.#R.jsLocationToUILocation(e),t=t||this.#re.rawLocationToUILocation(e),t}uiSourceCodeForScript(e){let t=null;return t=t||this.#J.uiSourceCodeForScript(e),t=t||this.#R.uiSourceCodeForScript(e),t=t||this.#re.uiSourceCodeForScript(e),t}uiLocationToRawLocations(e,t,o=0){let r=this.compilerMapping.uiLocationToRawLocations(e,t,o);return r=r.length?r:this.#J.uiLocationToRawLocations(e,t,o),r=r.length?r:this.#R.uiLocationToJSLocations(e,t,o),r=r.length?r:this.#re.uiLocationToRawLocations(e,t,o),r}uiLocationRangeToRawLocationRanges(e,t){let o=this.compilerMapping.uiLocationRangeToRawLocationRanges(e,t);return o??=this.#J.uiLocationRangeToRawLocationRanges(e,t),o??=this.#R.uiLocationRangeToJSLocationRanges(e,t),o??=this.#re.uiLocationRangeToRawLocationRanges(e,t),o}getMappedLines(e){return this.compilerMapping.getMappedLines(e)}dispose(){this.#oe.setBeforePausedCallback(null),this.compilerMapping.dispose(),this.#J.dispose(),this.#re.dispose()}getResourceScriptMapping(){return this.#J}}class fe extends y{scriptId;rawLocation;#se;constructor(e,t,o,r,s){super(r,s),this.scriptId=e,this.rawLocation=t,this.#se=o}async uiLocation(){const e=this.rawLocation;return this.#se.rawLocationToUILocation(e)}dispose(){super.dispose(),this.#se.removeLiveLocation(this)}async isIgnoreListed(){const e=await this.uiLocation();return!!e&&S.instance().isUserOrSourceMapIgnoreListedUISourceCode(e.uiSourceCode)}}class be extends y{#ie;#ne;#m;constructor(e,t){super(e,t),this.#ie=!0,this.#ne=null,this.#m=null}static async createStackTraceTopFrameLocation(e,t,o,r){const s=new be(o,r),i=e.map((e=>t.createLiveLocation(e,s.scheduleUpdate.bind(s),r)));return s.#m=(await Promise.all(i)).filter((e=>Boolean(e))),await s.updateLocation(),s}async uiLocation(){return this.#ne?this.#ne.uiLocation():null}async isIgnoreListed(){return!!this.#ne&&this.#ne.isIgnoreListed()}dispose(){if(super.dispose(),this.#m)for(const e of this.#m)e.dispose();this.#m=null,this.#ne=null}async scheduleUpdate(){this.#ie||(this.#ie=!0,queueMicrotask((()=>{this.updateLocation()})))}async updateLocation(){if(this.#ie=!1,this.#m&&0!==this.#m.length){this.#ne=this.#m[0];for(const e of this.#m)if(!await e.isIgnoreListed()){this.#ne=e;break}this.update()}}}var Ce=Object.freeze({__proto__:null,DebuggerWorkspaceBinding:Le,Location:fe});class ve{#ae;#ce;#ue;#le;#de;#ge;#pe;#he;#me;#Se;#Le;#Me;constructor(e,t,o){this.#ae=e,this.#ce=e.size,this.#ue=0,this.#de=t||Number.MAX_VALUE,this.#ge=o,this.#pe=new TextDecoder,this.#he=!1,this.#me=null,this.#le=null}async read(e){if(this.#ge&&this.#ge(this),this.#ae?.type.endsWith("gzip")){const e=this.#ae.stream(),t=this.decompressStream(e);this.#le=t.getReader()}else this.#Me=new FileReader,this.#Me.onload=this.onChunkLoaded.bind(this),this.#Me.onerror=this.onError.bind(this);return this.#Le=e,this.loadChunk(),new Promise((e=>{this.#Se=e}))}cancel(){this.#he=!0}loadedSize(){return this.#ue}fileSize(){return this.#ce}fileName(){return this.#ae?this.#ae.name:""}error(){return this.#me}decompressStream(e){const t=new DecompressionStream("gzip");return e.pipeThrough(t)}onChunkLoaded(e){if(this.#he)return;if(e.target.readyState!==FileReader.DONE)return;if(!this.#Me)return;const t=this.#Me.result;this.#ue+=t.byteLength;const o=this.#ue===this.#ce;this.decodeChunkBuffer(t,o)}async decodeChunkBuffer(e,t){if(!this.#Le)return;const o=this.#pe.decode(e,{stream:!t});await this.#Le.write(o,t),this.#he||(this.#ge&&this.#ge(this),t?this.finishRead():this.loadChunk())}async finishRead(){this.#Le&&(this.#ae=null,this.#Me=null,await this.#Le.close(),this.#Se(!this.#me))}async loadChunk(){if(this.#Le&&this.#ae){if(this.#le){const{value:e,done:t}=await this.#le.read();if(t||!e)return await this.#Le.write("",!0),this.finishRead();this.decodeChunkBuffer(e.buffer,!1)}if(this.#Me){const e=this.#ue,t=Math.min(this.#ce,e+this.#de),o=this.#ae.slice(e,t);this.#Me.readAsArrayBuffer(o)}}}onError(e){const t=e.target;this.#me=t.error,this.#Se(!1)}}var we=Object.freeze({__proto__:null,ChunkedFileReader:ve,FileOutputStream:class{#fe;#be;#Ce;constructor(){this.#fe=[]}async open(e){this.#Ce=!1,this.#fe=[],this.#be=e;const t=await i.FileManager.FileManager.instance().save(this.#be,"",!0,!1);return t&&i.FileManager.FileManager.instance().addEventListener("AppendedToURL",this.onAppendDone,this),Boolean(t)}write(e){return new Promise((t=>{this.#fe.push(t),i.FileManager.FileManager.instance().append(this.#be,e)}))}async close(){this.#Ce=!0,this.#fe.length||(i.FileManager.FileManager.instance().removeEventListener("AppendedToURL",this.onAppendDone,this),i.FileManager.FileManager.instance().close(this.#be))}onAppendDone(e){if(e.data!==this.#be)return;const t=this.#fe.shift();t&&t(),this.#fe.length||this.#Ce&&(i.FileManager.FileManager.instance().removeEventListener("AppendedToURL",this.onAppendDone,this),i.FileManager.FileManager.instance().close(this.#be))}}});class Ie{#ve=new WeakMap;constructor(){r.TargetManager.TargetManager.instance().observeModels(r.DebuggerModel.DebuggerModel,this),r.TargetManager.TargetManager.instance().observeModels(r.CSSModel.CSSModel,this)}modelAdded(e){const t=e.target(),o=this.#ve.get(t)??new Te;e instanceof r.DebuggerModel.DebuggerModel?o.setDebuggerModel(e):o.setCSSModel(e),this.#ve.set(t,o)}modelRemoved(e){const t=e.target(),o=this.#ve.get(t);o?.clear()}addMessage(e,t,o){const r=this.#ve.get(o);r?.addMessage(e,t)}clear(){for(const e of r.TargetManager.TargetManager.instance().targets()){const t=this.#ve.get(e);t?.clear()}}}class Te{#oe;#b;#we=new Map;#p;constructor(){this.#p=new F,i.Workspace.WorkspaceImpl.instance().addEventListener(i.Workspace.Events.UISourceCodeAdded,this.#Ie.bind(this))}setDebuggerModel(e){if(this.#oe)throw new Error("Cannot set DebuggerModel twice");this.#oe=e,e.addEventListener(r.DebuggerModel.Events.ParsedScriptSource,(e=>{queueMicrotask((()=>{this.#Te(e)}))})),e.addEventListener(r.DebuggerModel.Events.GlobalObjectCleared,this.#Re,this)}setCSSModel(e){if(this.#b)throw new Error("Cannot set CSSModel twice");this.#b=e,e.addEventListener(r.CSSModel.Events.StyleSheetAdded,(e=>queueMicrotask((()=>this.#ye(e)))))}async addMessage(e,t){const o=new ye(e,this.#p),r=this.#Fe(t)??this.#Ue(t)??this.#Pe(t);if(r&&await o.updateLocationSource(r),t.url){let e=this.#we.get(t.url);e||(e=[],this.#we.set(t.url,e)),e.push({source:t,presentation:o})}}#Pe(e){if(!e.url)return null;const t=i.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e.url);return t?new i.UISourceCode.UILocation(t,e.line,e.column):null}#Ue(e){if(!this.#b||!e.url)return null;return this.#b.createRawLocationsByURL(e.url,e.line,e.column)[0]??null}#Fe(e){if(!this.#oe)return null;if(e.scriptId)return this.#oe.createRawLocationByScriptId(e.scriptId,e.line,e.column);const t=e.stackTrace&&e.stackTrace.callFrames?e.stackTrace.callFrames[0]:null;return t?this.#oe.createRawLocationByScriptId(t.scriptId,t.lineNumber,t.columnNumber):e.url?this.#oe.createRawLocationByURL(e.url,e.line,e.column):null}#Te(e){const t=e.data,o=this.#we.get(t.sourceURL),r=[];for(const{presentation:e,source:s}of o??[]){const o=this.#Fe(s);o&&t.scriptId===o.scriptId&&r.push(e.updateLocationSource(o))}Promise.all(r).then(this.parsedScriptSourceForTest.bind(this))}parsedScriptSourceForTest(){}#Ie(e){const t=e.data,o=this.#we.get(t.url()),r=[];for(const{presentation:e,source:s}of o??[])r.push(e.updateLocationSource(new i.UISourceCode.UILocation(t,s.line,s.column)));Promise.all(r).then(this.uiSourceCodeAddedForTest.bind(this))}uiSourceCodeAddedForTest(){}#ye(e){const t=e.data,o=this.#we.get(t.sourceURL),s=[];for(const{source:e,presentation:i}of o??[])t.containsLocation(e.line,e.column)&&s.push(i.updateLocationSource(new r.CSSModel.CSSLocation(t,e.line,e.column)));Promise.all(s).then(this.styleSheetAddedForTest.bind(this))}styleSheetAddedForTest(){}clear(){this.#Re()}#Re(){const e=Array.from(this.#we.values()).flat();for(const{presentation:t}of e)t.dispose();this.#we.clear(),this.#p.disposeAll()}}class Re extends y{#Pe;constructor(e,t,o){super(t,o),this.#Pe=e}async isIgnoreListed(){return!1}async uiLocation(){return this.#Pe}}class ye{#ke;#je;#p;#De;constructor(e,t){this.#De=e,this.#p=t}async updateLocationSource(e){e instanceof r.DebuggerModel.Location?await Le.instance().createLiveLocation(e,this.#Ne.bind(this),this.#p):e instanceof r.CSSModel.CSSLocation?await z.instance().createLiveLocation(e,this.#Ne.bind(this),this.#p):e instanceof i.UISourceCode.UILocation&&(this.#je||(this.#je=new Re(e,this.#Ne.bind(this),this.#p),await this.#je.update()))}async#Ne(e){this.#ke&&this.#ke.removeMessage(this.#De),e!==this.#je&&(this.#ke?.removeMessage(this.#De),this.#je?.dispose(),this.#je=e);const t=await e.uiLocation();t&&(this.#De.range=s.TextRange.TextRange.createFromLocation(t.lineNumber,t.columnNumber||0),this.#ke=t.uiSourceCode,this.#ke.addMessage(this.#De))}dispose(){this.#ke?.removeMessage(this.#De),this.#je?.dispose()}}var Fe=Object.freeze({__proto__:null,PresentationSourceFrameMessageManager:Ie,PresentationConsoleMessageManager:class{#Ee=new Ie;constructor(){r.TargetManager.TargetManager.instance().addModelListener(r.ConsoleModel.ConsoleModel,r.ConsoleModel.Events.MessageAdded,(e=>this.consoleMessageAdded(e.data))),r.ConsoleModel.ConsoleModel.allMessagesUnordered().forEach(this.consoleMessageAdded,this),r.TargetManager.TargetManager.instance().addModelListener(r.ConsoleModel.ConsoleModel,r.ConsoleModel.Events.ConsoleCleared,(()=>this.#Ee.clear()))}consoleMessageAdded(e){const t=e.runtimeModel();if(!e.isErrorOrWarning()||!e.runtimeModel()||"violation"===e.source||!t)return;const o="error"===e.level?"Error":"Warning";this.#Ee.addMessage(new i.UISourceCode.Message(o,e.messageText),e,t.target())}},PresentationSourceFrameMessageHelper:Te,PresentationSourceFrameMessage:ye});const Ue=new WeakMap,Pe=new WeakMap,ke=new WeakSet;function je(e){return new s.TextRange.TextRange(e.lineOffset,e.columnOffset,e.endLine,e.endColumn)}function De(e){return new s.TextRange.TextRange(e.startLine,e.startColumn,e.endLine,e.endColumn)}class Ne{project;#L;#b;#c;constructor(e,t){const o=t.target();this.project=new l(e,"resources:"+o.id(),i.Workspace.projectTypes.Network,"",!1),w.setTargetForProject(this.project,o),this.#L=new Map;const s=o.model(r.CSSModel.CSSModel);console.assert(Boolean(s)),this.#b=s;for(const e of t.frames())for(const t of e.getResourcesMap().values())this.addResource(t);this.#c=[t.addEventListener(r.ResourceTreeModel.Events.ResourceAdded,this.resourceAdded,this),t.addEventListener(r.ResourceTreeModel.Events.FrameWillNavigate,this.frameWillNavigate,this),t.addEventListener(r.ResourceTreeModel.Events.FrameDetached,this.frameDetached,this),this.#b.addEventListener(r.CSSModel.Events.StyleSheetChanged,(e=>{this.styleSheetChanged(e)}),this)]}async styleSheetChanged(e){const t=this.#b.styleSheetHeaderForId(e.data.styleSheetId);if(!t||!t.isInline||t.isInline&&t.isMutable)return;const o=this.#L.get(t.resourceURL());o&&await o.styleSheetChanged(t,e.data.edit||null)}acceptsResource(t){const o=t.resourceType();return(o===e.ResourceType.resourceTypes.Image||o===e.ResourceType.resourceTypes.Font||o===e.ResourceType.resourceTypes.Document||o===e.ResourceType.resourceTypes.Manifest||o===e.ResourceType.resourceTypes.Fetch||o===e.ResourceType.resourceTypes.XHR)&&(!(o===e.ResourceType.resourceTypes.Image&&t.mimeType&&!t.mimeType.startsWith("image"))&&(!(o===e.ResourceType.resourceTypes.Font&&t.mimeType&&!t.mimeType.includes("font"))&&(o!==e.ResourceType.resourceTypes.Image&&o!==e.ResourceType.resourceTypes.Font||!e.ParsedURL.schemeIs(t.contentURL(),"data:"))))}resourceAdded(e){this.addResource(e.data)}addResource(e){if(!this.acceptsResource(e))return;let t=this.#L.get(e.url);t?t.addResource(e):(t=new Ee(this.project,e),this.#L.set(e.url,t))}removeFrameResources(e){for(const t of e.resources()){if(!this.acceptsResource(t))continue;const e=this.#L.get(t.url);e&&(1===e.resources.size?(e.dispose(),this.#L.delete(t.url)):e.removeResource(t))}}frameWillNavigate(e){this.removeFrameResources(e.data)}frameDetached(e){this.removeFrameResources(e.data.frame)}resetForTest(){for(const e of this.#L.values())e.dispose();this.#L.clear()}dispose(){e.EventTarget.removeEventListeners(this.#c);for(const e of this.#L.values())e.dispose();this.#L.clear(),this.project.removeProject()}getProject(){return this.project}}class Ee{resources;#S;#ke;#xe;constructor(e,t){this.resources=new Set([t]),this.#S=e,this.#ke=this.#S.createUISourceCode(t.url,t.contentType()),ke.add(this.#ke),t.frameId&&w.setInitialFrameAttribution(this.#ke,t.frameId),this.#S.addUISourceCodeWithProvider(this.#ke,this,x(t),t.mimeType),this.#xe=[],Promise.all([...this.inlineScripts().map((e=>Le.instance().updateLocations(e))),...this.inlineStyles().map((e=>z.instance().updateLocations(e)))])}inlineStyles(){const e=w.targetForUISourceCode(this.#ke),t=[];if(!e)return t;const o=e.model(r.CSSModel.CSSModel);if(o)for(const e of o.getStyleSheetIdsForURL(this.#ke.url())){const r=o.styleSheetHeaderForId(e);r&&t.push(r)}return t}inlineScripts(){const e=w.targetForUISourceCode(this.#ke);if(!e)return[];const t=e.model(r.DebuggerModel.DebuggerModel);return t?t.scripts().filter((e=>e.embedderName()===this.#ke.url())):[]}async styleSheetChanged(e,t){if(this.#xe.push({stylesheet:e,edit:t}),this.#xe.length>1)return;const o=await this.#ke.requestContentData();s.ContentData.ContentData.isError(o)||await this.innerStyleSheetChanged(o.text),this.#xe=[]}async innerStyleSheetChanged(e){const t=this.inlineScripts(),o=this.inlineStyles();let r=new s.Text.Text(e);for(const e of this.#xe){const i=e.edit;if(!i)continue;const n=e.stylesheet,a=Ue.get(n)??De(n),c=i.oldRange.relativeFrom(a.startLine,a.startColumn),u=i.newRange.relativeFrom(a.startLine,a.startColumn);r=new s.Text.Text(r.replaceRange(c,i.newText));const l=[];for(const e of t){const t=Pe.get(e)??je(e);t.follows(c)&&(Pe.set(e,t.rebaseAfterTextEdit(c,u)),l.push(Le.instance().updateLocations(e)))}for(const e of o){const t=Ue.get(e)??De(e);t.follows(c)&&(Ue.set(e,t.rebaseAfterTextEdit(c,u)),l.push(z.instance().updateLocations(e)))}await Promise.all(l)}this.#ke.addRevision(r.value())}addResource(e){this.resources.add(e),e.frameId&&w.addFrameAttribution(this.#ke,e.frameId)}removeResource(e){this.resources.delete(e),e.frameId&&w.removeFrameAttribution(this.#ke,e.frameId)}dispose(){this.#S.removeUISourceCode(this.#ke.url()),Promise.all([...this.inlineScripts().map((e=>Le.instance().updateLocations(e))),...this.inlineStyles().map((e=>z.instance().updateLocations(e)))])}firstResource(){return console.assert(this.resources.size>0),this.resources.values().next().value}contentURL(){return this.firstResource().contentURL()}contentType(){return this.firstResource().contentType()}requestContent(){return this.firstResource().requestContent()}requestContentData(){return this.firstResource().requestContentData()}searchInContent(e,t,o){return this.firstResource().searchInContent(e,t,o)}}var xe=Object.freeze({__proto__:null,ResourceMapping:class{workspace;#y;constructor(e,t){this.workspace=t,this.#y=new Map,e.observeModels(r.ResourceTreeModel.ResourceTreeModel,this)}modelAdded(e){const t=new Ne(this.workspace,e);this.#y.set(e,t)}modelRemoved(e){const t=this.#y.get(e);t&&(t.dispose(),this.#y.delete(e))}infoForTarget(e){const t=e.model(r.ResourceTreeModel.ResourceTreeModel);return t&&this.#y.get(t)||null}uiSourceCodeForScript(e){const t=this.infoForTarget(e.debuggerModel.target());if(!t)return null;return t.getProject().uiSourceCodeForURL(e.sourceURL)}cssLocationToUILocation(e){const t=e.header();if(!t)return null;const o=this.infoForTarget(e.cssModel().target());if(!o)return null;const r=o.getProject().uiSourceCodeForURL(e.url);if(!r)return null;const s=Ue.get(t)??De(t),i=e.lineNumber+s.startLine-t.startLine;let n=e.columnNumber;return e.lineNumber===t.startLine&&(n+=s.startColumn-t.startColumn),r.uiLocation(i,n)}jsLocationToUILocation(e){const t=e.script();if(!t)return null;const o=this.infoForTarget(e.debuggerModel.target());if(!o)return null;const r=t.embedderName();if(!r)return null;const s=o.getProject().uiSourceCodeForURL(r);if(!s)return null;const{startLine:i,startColumn:n}=Pe.get(t)??je(t);let{lineNumber:a,columnNumber:c}=e;return a===t.lineOffset&&(c+=n-t.columnOffset),a+=i-t.lineOffset,t.hasSourceURL&&(0===a&&(c+=t.columnOffset),a+=t.lineOffset),s.uiLocation(a,c)}uiLocationToJSLocations(e,t,o){if(!ke.has(e))return[];const s=w.targetForUISourceCode(e);if(!s)return[];const i=s.model(r.DebuggerModel.DebuggerModel);if(!i)return[];const n=[];for(const r of i.scripts()){if(r.embedderName()!==e.url())continue;const s=Pe.get(r)??je(r);if(!s.containsLocation(t,o))continue;let a=t,c=o;r.hasSourceURL&&(a-=s.startLine,0===a&&(c-=s.startColumn)),n.push(i.createRawLocation(r,a,c))}return n}uiLocationRangeToJSLocationRanges(e,t){if(!ke.has(e))return null;const o=w.targetForUISourceCode(e);if(!o)return null;const s=o.model(r.DebuggerModel.DebuggerModel);if(!s)return null;const i=[];for(const o of s.scripts()){if(o.embedderName()!==e.url())continue;const r=(Pe.get(o)??je(o)).intersection(t);if(r.isEmpty())continue;let{startLine:n,startColumn:a,endLine:c,endColumn:u}=r;o.hasSourceURL&&(n-=r.startLine,0===n&&(a-=r.startColumn),c-=r.startLine,0===c&&(u-=r.startColumn));const l=s.createRawLocation(o,n,a),d=s.createRawLocation(o,c,u);i.push({start:l,end:d})}return i}getMappedLines(e){if(!ke.has(e))return null;const t=w.targetForUISourceCode(e);if(!t)return null;const o=t.model(r.DebuggerModel.DebuggerModel);if(!o)return null;const s=new Set;for(const t of o.scripts()){if(t.embedderName()!==e.url())continue;const{startLine:o,endLine:r}=Pe.get(t)??je(t);for(let e=o;e<=r;++e)s.add(e)}return s}uiLocationToCSSLocations(e){if(!ke.has(e.uiSourceCode))return[];const t=w.targetForUISourceCode(e.uiSourceCode);if(!t)return[];const o=t.model(r.CSSModel.CSSModel);return o?o.createRawLocationsByURL(e.uiSourceCode.url(),e.lineNumber,e.columnNumber):[]}resetForTest(e){const t=e.model(r.ResourceTreeModel.ResourceTreeModel),o=t?this.#y.get(t):null;o&&o.resetForTest()}}});var Ae=Object.freeze({__proto__:null,TempFile:class{#Ae;constructor(){this.#Ae=null}write(e){this.#Ae&&e.unshift(this.#Ae),this.#Ae=new Blob(e,{type:"text/plain"})}read(){return this.readRange()}size(){return this.#Ae?this.#Ae.size:0}async readRange(t,o){if(!this.#Ae)return e.Console.Console.instance().error("Attempt to read a temp file that was never written"),"";const r="number"==typeof t||"number"==typeof o?this.#Ae.slice(t,o):this.#Ae,s=new FileReader;try{await new Promise(((e,t)=>{s.onloadend=e,s.onerror=t,s.readAsText(r)}))}catch(t){e.Console.Console.instance().error("Failed to read from temp file: "+t.message)}return s.result}async copyToOutputStream(e,t){if(!this.#Ae)return e.close(),null;const o=new ve(this.#Ae,1e7,t);return o.read(e).then((e=>e?null:o.error()))}remove(){this.#Ae=null}}});export{G as CSSWorkspaceBinding,R as CompilerScriptMapping,d as ContentProviderBasedProject,ne as DebuggerLanguagePlugins,Ce as DebuggerWorkspaceBinding,ue as DefaultScriptMapping,we as FileUtils,M as IgnoreListManager,U as LiveLocation,I as NetworkProject,Fe as PresentationConsoleMessageHelper,xe as ResourceMapping,me as ResourceScriptMapping,A as ResourceUtils,D as SASSSourceMapping,H as StylesSourceMapping,Ae as TempFile};
@@ -0,0 +1 @@
1
+ import*as e from"../../core/common/common.js";import{assertNotNullOrUndefined as t}from"../../core/platform/platform.js";import*as o from"../../core/root/root.js";import*as i from"../../core/sdk/sdk.js";import*as r from"../bindings/bindings.js";import*as s from"../formatter/formatter.js";import*as n from"../source_map_scopes/source_map_scopes.js";import*as a from"../workspace/workspace.js";let u;class d extends e.ObjectWrapper.ObjectWrapper{storage=new h;#e;targetManager;debuggerWorkspaceBinding;#t=new Map;#o=new Map;#i=new Map;#r=[];constructor(e,t,o,r){super(),this.#e=t,this.targetManager=e,this.debuggerWorkspaceBinding=o,this.storage.mute(),this.#s(r??100),this.storage.unmute(),this.#e.addEventListener(a.Workspace.Events.UISourceCodeAdded,this.uiSourceCodeAdded,this),this.#e.addEventListener(a.Workspace.Events.UISourceCodeRemoved,this.uiSourceCodeRemoved,this),this.#e.addEventListener(a.Workspace.Events.ProjectRemoved,this.projectRemoved,this),this.targetManager.observeModels(i.DebuggerModel.DebuggerModel,this)}#s(e){let t=this.storage.breakpoints.size-e;for(const e of this.storage.breakpoints.values()){if(t>0){t--;continue}const o=h.computeId(e),i=new l(this,null,e,"RESTORED");this.#i.set(o,i)}}static instance(e={forceNew:null,targetManager:null,workspace:null,debuggerWorkspaceBinding:null}){const{forceNew:t,targetManager:o,workspace:i,debuggerWorkspaceBinding:r,restoreInitialBreakpointCount:s}=e;if(!u||t){if(!o||!i||!r)throw new Error(`Unable to create settings: targetManager, workspace, and debuggerWorkspaceBinding must be provided: ${(new Error).stack}`);u=new d(o,i,r,s)}return u}modelAdded(e){o.Runtime.experiments.isEnabled("instrumentation-breakpoints")&&e.setSynchronizeBreakpointsCallback(this.restoreBreakpointsForScript.bind(this))}modelRemoved(e){e.setSynchronizeBreakpointsCallback(null)}addUpdateBindingsCallback(e){this.#r.push(e)}async copyBreakpoints(e,t){const o=t.project().uiSourceCodeForURL(t.url())!==t||this.#e.project(t.project().id())!==t.project(),i=this.storage.breakpointItems(e.url(),e.contentType().name());for(const e of i)o?this.storage.updateBreakpoint({...e,url:t.url(),resourceTypeName:t.contentType().name()}):await this.setBreakpoint(t,e.lineNumber,e.columnNumber,e.condition,e.enabled,e.isLogpoint,"RESTORED")}async restoreBreakpointsForScript(e){if(!o.Runtime.experiments.isEnabled("instrumentation-breakpoints"))return;if(!e.sourceURL)return;const i=await this.getUISourceCodeWithUpdatedBreakpointInfo(e);this.#n(e.sourceURL)&&await this.#a(i);const r=e.debuggerModel,s=await r.sourceMapManager().sourceMapForClientPromise(e);if(s)for(const t of s.sourceURLs())if(this.#n(t)){const o=await this.debuggerWorkspaceBinding.uiSourceCodeForSourceMapSourceURLPromise(r,t,e.isContentScript());await this.#a(o)}const{pluginManager:n}=this.debuggerWorkspaceBinding,a=await n.getSourcesForScript(e);if(Array.isArray(a))for(const e of a)if(this.#n(e)){const o=await this.debuggerWorkspaceBinding.uiSourceCodeForDebuggerLanguagePluginSourceURLPromise(r,e);t(o),await this.#a(o)}}async getUISourceCodeWithUpdatedBreakpointInfo(e){const o=this.debuggerWorkspaceBinding.uiSourceCodeForScript(e);return t(o),await this.#u(o),o}async#u(e){if(this.#r.length>0){const t=[];for(const o of this.#r)t.push(o(e));await Promise.all(t)}}async#a(e){this.restoreBreakpoints(e);const t=this.#i.values(),o=Array.from(t).filter((t=>t.uiSourceCodes.has(e)));await Promise.all(o.map((e=>e.updateBreakpoint())))}#n(e){return this.storage.breakpointItems(e).length>0}static getScriptForInlineUiSourceCode(e){const t=r.DefaultScriptMapping.DefaultScriptMapping.scriptForUISourceCode(e);return t&&t.isInlineScript()&&!t.hasSourceURL?t:null}static breakpointLocationFromUiLocation(e){const t=e.uiSourceCode,o=d.getScriptForInlineUiSourceCode(t),{lineNumber:i,columnNumber:r}=o?o.relativeLocationToRawLocation(e):e;return{lineNumber:i,columnNumber:r}}static uiLocationFromBreakpointLocation(e,t,o){const i=d.getScriptForInlineUiSourceCode(e);return i&&({lineNumber:t,columnNumber:o}=i.rawLocationToRelativeLocation({lineNumber:t,columnNumber:o})),e.uiLocation(t,o)}static isValidPositionInScript(e,t,o){return!o||!(e<o.lineOffset||e>o.endLine)&&(!(e===o.lineOffset&&t&&t<o.columnOffset)&&!(e===o.endLine&&(!t||t>=o.endColumn)))}restoreBreakpoints(e){const t=d.getScriptForInlineUiSourceCode(e),o=t?.sourceURL??e.url();if(!o)return;const i=e.contentType();this.storage.mute();const r=this.storage.breakpointItems(o,i.name());for(const o of r){const{lineNumber:i,columnNumber:r}=o;d.isValidPositionInScript(i,r,t)&&this.innerSetBreakpoint(e,i,r,o.condition,o.enabled,o.isLogpoint,"RESTORED")}this.storage.unmute()}uiSourceCodeAdded(e){const t=e.data;this.restoreBreakpoints(t)}uiSourceCodeRemoved(e){const t=e.data;this.removeUISourceCode(t)}projectRemoved(e){const t=e.data;for(const e of t.uiSourceCodes())this.removeUISourceCode(e)}removeUISourceCode(e){this.#d(e).forEach((t=>t.removeUISourceCode(e)))}async setBreakpoint(t,o,i,r,s,n,u){const c=this.#e.findCompatibleUISourceCodes(t);let l;for(const p of c){const c=new a.UISourceCode.UILocation(p,o,i),h=await this.debuggerWorkspaceBinding.normalizeUILocation(c),g=d.breakpointLocationFromUiLocation(h),b=this.innerSetBreakpoint(h.uiSourceCode,g.lineNumber,g.columnNumber,r,s,n,u);t===p&&(h.id()!==c.id()&&e.Revealer.reveal(h),l=b)}return console.assert(void 0!==l,"The passed uiSourceCode is expected to be a valid uiSourceCode"),l}innerSetBreakpoint(e,t,o,i,r,s,n){const a={url:d.getScriptForInlineUiSourceCode(e)?.sourceURL??e.url(),resourceTypeName:e.contentType().name(),lineNumber:t,columnNumber:o,condition:i,enabled:r,isLogpoint:s},u=h.computeId(a);let c=this.#i.get(u);return c?(c.updateState(a),c.addUISourceCode(e),c.updateBreakpoint(),c):(c=new l(this,e,a,n),this.#i.set(u,c),c)}findBreakpoint(e){const t=this.#o.get(e.uiSourceCode);return t&&t.get(e.id())||null}addHomeUISourceCode(e,t){let o=this.#t.get(e);o||(o=new Set,this.#t.set(e,o)),o.add(t)}removeHomeUISourceCode(e,t){const o=this.#t.get(e);o&&(o.delete(t),0===o.size&&this.#t.delete(e))}async possibleBreakpoints(e,t){const o=await this.debuggerWorkspaceBinding.uiLocationRangeToRawLocationRanges(e,t),i=(await Promise.all(o.map((({start:e,end:t})=>e.debuggerModel.getPossibleBreakpoints(e,t,!1))))).flat(),r=new Map;return await Promise.all(i.map((async o=>{const i=await this.debuggerWorkspaceBinding.rawLocationToUILocation(o);null!==i&&i.uiSourceCode===e&&t.containsLocation(i.lineNumber,i.columnNumber??0)&&r.set(i.id(),i)}))),[...r.values()]}breakpointLocationsForUISourceCode(e){const t=this.#o.get(e);return t?Array.from(t.values()):[]}#d(e){return this.breakpointLocationsForUISourceCode(e).map((e=>e.breakpoint)).concat(Array.from(this.#t.get(e)??[]))}allBreakpointLocations(){const e=[];for(const t of this.#o.values())e.push(...t.values());return e}removeBreakpoint(e,t){const o=e.breakpointStorageId();t&&this.storage.removeBreakpoint(o),this.#i.delete(o)}uiLocationAdded(e,t){let o=this.#o.get(t.uiSourceCode);o||(o=new Map,this.#o.set(t.uiSourceCode,o));const i=new g(e,t);o.set(t.id(),i),this.dispatchEventToListeners(c.BreakpointAdded,i)}uiLocationRemoved(e,t){const o=this.#o.get(t.uiSourceCode);if(!o)return;const i=o.get(t.id())||null;i&&(o.delete(t.id()),0===o.size&&this.#o.delete(t.uiSourceCode),this.dispatchEventToListeners(c.BreakpointRemoved,i))}supportsConditionalBreakpoints(e){return this.debuggerWorkspaceBinding.supportsConditionalBreakpoints(e)}}var c;!function(e){e.BreakpointAdded="breakpoint-added",e.BreakpointRemoved="breakpoint-removed"}(c||(c={}));class l{breakpointManager;#c=new Set;uiSourceCodes=new Set;#l;#p;isRemoved=!1;#h=null;#g=new Map;constructor(e,t,o,r){this.breakpointManager=e,this.#p=r,this.updateState(o),t?(console.assert(t.contentType().name()===o.resourceTypeName),this.addUISourceCode(t)):this.#b(o),this.breakpointManager.targetManager.observeModels(i.DebuggerModel.DebuggerModel,this)}#b(t){t.resolvedState?this.#h=t.resolvedState.map((e=>({...e,scriptHash:""}))):t.resourceTypeName===e.ResourceType.resourceTypes.Script.name()&&(this.#h=[{url:t.url,lineNumber:t.lineNumber,columnNumber:t.columnNumber,scriptHash:"",condition:this.backendCondition()}])}getLastResolvedState(){return this.#h}updateLastResolvedState(e){let t;this.#h=e,e&&(t=e.map((e=>({url:e.url,lineNumber:e.lineNumber,columnNumber:e.columnNumber,condition:e.condition})))),function(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let o=0;o<e.length;o++){const i=e[o],r=t[o];if(i.url!==r.url||i.lineNumber!==r.lineNumber||i.columnNumber!==r.columnNumber||i.condition!==r.condition)return!1}return!0}(this.#l.resolvedState,t)||(this.#l={...this.#l,resolvedState:t},this.breakpointManager.storage.updateBreakpoint(this.#l))}get origin(){return this.#p}async refreshInDebugger(){if(!this.isRemoved){const e=Array.from(this.#g.values());await Promise.all(e.map((async e=>(await e.resetBreakpoint(),this.#m(e)))))}}modelAdded(e){const t=this.breakpointManager.debuggerWorkspaceBinding,o=new p(e,this,t);this.#g.set(e,o),this.#m(o),e.addEventListener(i.DebuggerModel.Events.DebuggerWasEnabled,this.#k,this),e.addEventListener(i.DebuggerModel.Events.DebuggerWasDisabled,this.#S,this),e.addEventListener(i.DebuggerModel.Events.ScriptSourceWasEdited,this.#v,this)}modelRemoved(e){const t=this.#g.get(e);t?.cleanUpAfterDebuggerIsGone(),this.#g.delete(e),this.#f(e)}#f(e){e.removeEventListener(i.DebuggerModel.Events.DebuggerWasEnabled,this.#k,this),e.removeEventListener(i.DebuggerModel.Events.DebuggerWasDisabled,this.#S,this),e.removeEventListener(i.DebuggerModel.Events.ScriptSourceWasEdited,this.#v,this)}#k(e){const t=e.data,o=this.#g.get(t);o&&this.#m(o)}#S(e){const t=e.data,o=this.#g.get(t);o?.cleanUpAfterDebuggerIsGone()}async#v(e){const{source:t,data:{script:o,status:r}}=e;if("Ok"!==r)return;console.assert(t instanceof i.DebuggerModel.DebuggerModel);const s=this.#g.get(t);s?.wasSetIn(o.scriptId)&&(await s.resetBreakpoint(),this.#m(s))}modelBreakpoint(e){return this.#g.get(e)}addUISourceCode(e){this.uiSourceCodes.has(e)||(this.uiSourceCodes.add(e),this.breakpointManager.addHomeUISourceCode(e,this),this.bound()||this.breakpointManager.uiLocationAdded(this,this.defaultUILocation(e)))}clearUISourceCodes(){this.bound()||this.removeAllUnboundLocations();for(const e of this.uiSourceCodes)this.removeUISourceCode(e)}removeUISourceCode(e){if(this.uiSourceCodes.has(e)&&(this.uiSourceCodes.delete(e),this.breakpointManager.removeHomeUISourceCode(e,this),this.bound()||this.breakpointManager.uiLocationRemoved(this,this.defaultUILocation(e))),this.bound()){for(const t of this.#c)t.uiSourceCode===e&&(this.#c.delete(t),this.breakpointManager.uiLocationRemoved(this,t));this.bound()||this.isRemoved||this.addAllUnboundLocations()}}url(){return this.#l.url}lineNumber(){return this.#l.lineNumber}columnNumber(){return this.#l.columnNumber}uiLocationAdded(e){this.isRemoved||(this.bound()||this.removeAllUnboundLocations(),this.#c.add(e),this.breakpointManager.uiLocationAdded(this,e))}uiLocationRemoved(e){this.#c.has(e)&&(this.#c.delete(e),this.breakpointManager.uiLocationRemoved(this,e),this.bound()||this.isRemoved||this.addAllUnboundLocations())}enabled(){return this.#l.enabled}bound(){return 0!==this.#c.size}hasBoundScript(){for(const e of this.uiSourceCodes)if(e.project().type()===a.Workspace.projectTypes.Network)return!0;return!1}setEnabled(e){this.updateState({...this.#l,enabled:e})}condition(){return this.#l.condition}backendCondition(e){const t=this.condition();if(""===t)return"";const o=e=>{let t=i.DebuggerModel.COND_BREAKPOINT_SOURCE_URL;return this.isLogpoint()&&(e=`${b}${e}${m}`,t=i.DebuggerModel.LOGPOINT_SOURCE_URL),`${e}\n\n//# sourceURL=${t}`};return e?n.NamesResolver.allVariablesAtPosition(e).then((e=>e.size>0?s.FormatterWorkerPool.formatterWorkerPool().javaScriptSubstitute(t,e):t)).then((e=>o(e)),(()=>o(t))):o(t)}setCondition(e,t){this.updateState({...this.#l,condition:e,isLogpoint:t})}isLogpoint(){return this.#l.isLogpoint}get storageState(){return this.#l}updateState(e){if(this.#l&&(this.#l.url!==e.url||this.#l.lineNumber!==e.lineNumber||this.#l.columnNumber!==e.columnNumber))throw new Error("Invalid breakpoint state update");this.#l?.enabled===e.enabled&&this.#l?.condition===e.condition&&this.#l?.isLogpoint===e.isLogpoint||(this.#l=e,this.breakpointManager.storage.updateBreakpoint(this.#l),this.updateBreakpoint())}async updateBreakpoint(){return this.bound()||(this.removeAllUnboundLocations(),this.isRemoved||this.addAllUnboundLocations()),this.#L()}async remove(e){if(this.getIsRemoved())return;this.isRemoved=!0;const t=!e;for(const e of this.#g.keys())this.#f(e);await this.#L(),this.breakpointManager.removeBreakpoint(this,t),this.breakpointManager.targetManager.unobserveModels(i.DebuggerModel.DebuggerModel,this),this.clearUISourceCodes()}breakpointStorageId(){return h.computeId(this.#l)}defaultUILocation(e){return d.uiLocationFromBreakpointLocation(e,this.#l.lineNumber,this.#l.columnNumber)}removeAllUnboundLocations(){for(const e of this.uiSourceCodes)this.breakpointManager.uiLocationRemoved(this,this.defaultUILocation(e))}addAllUnboundLocations(){for(const e of this.uiSourceCodes)this.breakpointManager.uiLocationAdded(this,this.defaultUILocation(e))}getUiSourceCodes(){return this.uiSourceCodes}getIsRemoved(){return this.isRemoved}async#L(){await Promise.all(Array.from(this.#g.values()).map((e=>this.#m(e))))}async#m(e){const t=await e.scheduleUpdateInDebugger();"ERROR_BACKEND"===t?await this.remove(!0):"ERROR_BREAKPOINT_CLASH"===t&&await this.remove(!1)}}class p{#I;#B;#C;#R=new r.LiveLocation.LiveLocationPool;#c=new Map;#U=new e.Mutex.Mutex;#M=!1;#N=null;#w=[];#E=new Set;constructor(e,t,o){this.#I=e,this.#B=t,this.#C=o}get currentState(){return this.#N}resetLocations(){for(const e of this.#c.values())this.#B.uiLocationRemoved(e);this.#c.clear(),this.#R.disposeAll(),this.#E.clear()}async scheduleUpdateInDebugger(){if(!this.#I.debuggerEnabled())return"OK";const e=await this.#U.acquire();let t="PENDING";for(;"PENDING"===t;)t=await this.#D();return e(),t}scriptDiverged(){for(const e of this.#B.getUiSourceCodes()){const t=this.#C.scriptFile(e,this.#I);if(t&&t.hasDivergedFromVM())return!0}return!1}async#D(){if(this.#I.target().isDisposed())return this.cleanUpAfterDebuggerIsGone(),"OK";const e=this.#B.lineNumber(),t=this.#B.columnNumber(),i=this.#B.backendCondition();let s=null;if(!this.#B.getIsRemoved()&&this.#B.enabled()&&!this.scriptDiverged()){let n=[];for(const o of this.#B.getUiSourceCodes()){const{lineNumber:i,columnNumber:s}=d.uiLocationFromBreakpointLocation(o,e,t);if(n=(await r.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().uiLocationToRawLocations(o,i,s)).filter((e=>e.debuggerModel===this.#I)),n.length)break}if(n.length&&n.every((e=>e.script()))){const e=await Promise.all(n.map((async e=>{const t=e.script(),o=await this.#B.backendCondition(e);return{url:t.sourceURL,scriptHash:t.hash,lineNumber:e.lineNumber,columnNumber:e.columnNumber,condition:o}})));s=e.slice(0)}else if(!o.Runtime.experiments.isEnabled("instrumentation-breakpoints")){const o=this.#B.getLastResolvedState();if(o)s=o.map((e=>({...e,condition:i})));else{s=[{url:this.#B.url(),scriptHash:"",lineNumber:e,columnNumber:t,condition:i}]}}}const n=this.#w.length;if(n&&l.State.subset(s,this.#N))return"OK";if(this.#B.updateLastResolvedState(s),n)return await this.resetBreakpoint(),"PENDING";if(!s)return"OK";const{breakpointIds:a,locations:u,serverError:c}=await this.#y(s),p=c&&this.#I.debuggerEnabled()&&!this.#I.isReadyToPause();if(!a.length&&p)return"PENDING";if(this.#N=s,this.#M)return this.#M=!1,"OK";if(!a.length)return"ERROR_BACKEND";this.#w=a,this.#w.forEach((e=>this.#I.addBreakpointListener(e,this.breakpointResolved,this)));return(await Promise.all(u.map((e=>this.addResolvedLocation(e))))).includes("ERROR")?"ERROR_BREAKPOINT_CLASH":"OK"}async#y(e){const t=await Promise.all(e.map((e=>e.url?this.#I.setBreakpointByURL(e.url,e.lineNumber,e.columnNumber,e.condition):this.#I.setBreakpointInAnonymousScript(e.scriptHash,e.lineNumber,e.columnNumber,e.condition)))),o=[];let i=[],r=!1;for(const e of t)e.breakpointId?(o.push(e.breakpointId),i=i.concat(e.locations)):r=!0;return{breakpointIds:o,locations:i,serverError:r}}async resetBreakpoint(){this.#w.length&&(this.resetLocations(),await Promise.all(this.#w.map((e=>this.#I.removeBreakpoint(e)))),this.didRemoveFromDebugger(),this.#N=null)}didRemoveFromDebugger(){this.#M?this.#M=!1:(this.resetLocations(),this.#w.forEach((e=>this.#I.removeBreakpointListener(e,this.breakpointResolved,this))),this.#w=[])}async breakpointResolved({data:e}){"ERROR"===await this.addResolvedLocation(e)&&await this.#B.remove(!1)}async locationUpdated(e){const t=this.#c.get(e),o=await e.uiLocation();t&&this.#B.uiLocationRemoved(t),o?(this.#c.set(e,o),this.#B.uiLocationAdded(o)):this.#c.delete(e)}async addResolvedLocation(e){this.#E.add(e.scriptId);const t=await this.#C.rawLocationToUILocation(e);if(!t)return"OK";const o=this.#B.breakpointManager.findBreakpoint(t);return o&&o.breakpoint!==this.#B?"ERROR":(await this.#C.createLiveLocation(e,this.locationUpdated.bind(this),this.#R),"OK")}cleanUpAfterDebuggerIsGone(){this.#M=!0,this.resetLocations(),this.#N=null,this.#w.length&&this.didRemoveFromDebugger()}wasSetIn(e){return this.#E.has(e)}}!function(e){let t;!function(e){e.subset=function(e,t){if(e===t)return!0;if(!e||!t)return!1;if(0===e.length)return!1;for(const o of e)if(void 0===t.find((e=>o.url===e.url&&o.scriptHash===e.scriptHash&&o.lineNumber===e.lineNumber&&o.columnNumber===e.columnNumber&&o.condition===e.condition)))return!1;return!0}}(t=e.State||(e.State={}))}(l||(l={}));class h{setting;breakpoints;#F;constructor(){this.setting=e.Settings.Settings.instance().createLocalSetting("breakpoints",[]),this.breakpoints=new Map,this.#F=!1;for(const e of this.setting.get())this.breakpoints.set(h.computeId(e),e)}mute(){this.#F=!0}unmute(){this.#F=!1}breakpointItems(e,t){const o=[];for(const i of this.breakpoints.values())i.url===e&&(i.resourceTypeName!==t&&void 0!==t||o.push(i));return o}updateBreakpoint(e){if(this.#F)return;const t=h.computeId(e);t&&(this.breakpoints.delete(t),this.breakpoints.set(t,e),this.save())}removeBreakpoint(e){this.#F||(this.breakpoints.delete(e),this.save())}save(){this.setting.set(Array.from(this.breakpoints.values()))}static computeId({url:e,resourceTypeName:t,lineNumber:o,columnNumber:i}){if(!e)return"";let r=`${e}:${t}:${o}`;return void 0!==i&&(r+=`:${i}`),r}}class g{breakpoint;uiLocation;constructor(e,t){this.breakpoint=e,this.uiLocation=t}}const b="/** DEVTOOLS_LOGPOINT */ console.log(",m=")";var k=Object.freeze({__proto__:null,BreakpointManager:d,get Events(){return c},get Breakpoint(){return l},ModelBreakpoint:p,EMPTY_BREAKPOINT_CONDITION:"",NEVER_PAUSE_HERE_CONDITION:"false",BreakpointLocation:g});export{k as BreakpointManager};
@@ -0,0 +1 @@
1
+ import*as t from"../../core/platform/platform.js";class e{callFrame;callUID;self;total;id;parent;children;functionName;depth;deoptReason;constructor(t){this.callFrame=t,this.callUID=`${t.functionName}@${t.scriptId}:${t.lineNumber}:${t.columnNumber}`,this.self=0,this.total=0,this.id=0,this.functionName=t.functionName,this.parent=null,this.children=[]}get scriptId(){return String(this.callFrame.scriptId)}get url(){return this.callFrame.url}get lineNumber(){return this.callFrame.lineNumber}get columnNumber(){return this.callFrame.columnNumber}setFunctionName(t){null!==t&&(this.functionName=t)}}class i{root;total;maxDepth;constructor(){}initialize(t){this.root=t,this.assignDepthsAndParents(),this.total=this.calculateTotals(this.root)}assignDepthsAndParents(){const t=this.root;t.depth=-1,t.parent=null,this.maxDepth=0;const e=[t];for(;e.length;){const t=e.pop(),i=t.depth+1;i>this.maxDepth&&(this.maxDepth=i);const s=t.children;for(const o of s)o.depth=i,o.parent=t,e.push(o)}}calculateTotals(t){const e=[t],i=[];for(;e.length;){const t=e.pop();t.total=t.self,i.push(t),e.push(...t.children)}for(;i.length>1;){const t=i.pop();t.parent&&(t.parent.total+=t.total)}return t.total}}var s=Object.freeze({__proto__:null,ProfileNode:e,ProfileTreeModel:i});class o extends e{id;self;positionTicks;deoptReason;constructor(t,e){super(t.callFrame||{functionName:t.functionName,scriptId:t.scriptId,url:t.url,lineNumber:t.lineNumber-1,columnNumber:t.columnNumber-1}),this.id=t.id,this.self=(t.hitCount||0)*e,this.positionTicks=t.positionTicks,this.deoptReason=t.deoptReason&&"no reason"!==t.deoptReason?t.deoptReason:null}}var r=Object.freeze({__proto__:null,CPUProfileNode:o,CPUProfileDataModel:class extends i{profileStartTime;profileEndTime;timestamps;samples;lines;totalHitCount;profileHead;#t;gcNode;programNode;idleNode;#e;#i;constructor(t){super();Boolean(t.head)?(this.profileStartTime=1e3*t.startTime,this.profileEndTime=1e3*t.endTime,this.timestamps=t.timestamps,this.compatibilityConversionHeadToNodes(t)):(this.profileStartTime=t.startTime/1e3,this.profileEndTime=t.endTime/1e3,this.timestamps=this.convertTimeDeltas(t)),this.samples=t.samples,this.lines=t.lines,this.totalHitCount=0,this.profileHead=this.translateProfileTree(t.nodes),this.initialize(this.profileHead),this.extractMetaNodes(),this.samples?.length&&(this.sortSamples(),this.normalizeTimestamps(),this.fixMissingSamples())}compatibilityConversionHeadToNodes(t){if(!t.head||t.nodes)return;const e=[];!function t(i){return e.push(i),i.children=i.children.map(t),i.id}(t.head),t.nodes=e,delete t.head}convertTimeDeltas(t){if(!t.timeDeltas)return[];let e=t.startTime;const i=new Array(t.timeDeltas.length);for(let s=0;s<t.timeDeltas.length;++s)e+=t.timeDeltas[s],i[s]=e;return i}translateProfileTree(t){const e=new Map;for(let i=0;i<t.length;++i){const s=t[i];e.set(s.id,s)}!function(t,i){if("number"!=typeof t[0].hitCount){if(!i)throw new Error("Error: Neither hitCount nor samples are present in profile.");for(let e=0;e<t.length;++e)t[e].hitCount=0;for(let t=0;t<i.length;++t){const s=e.get(i[t]);s&&void 0!==s.hitCount&&s.hitCount++}}}(t,this.samples),function(t){if(!t[0].children){t[0].children=[];for(let i=1;i<t.length;++i){const s=t[i],o=e.get(s.parent);o&&(o.children?o.children.push(s.id):o.children=[s.id])}}}(t),this.totalHitCount=t.reduce(((t,e)=>t+(e.hitCount||0)),0);const i=(this.profileEndTime-this.profileStartTime)/this.totalHitCount,s=t[0],r=new Map([[s.id,s.id]]);this.#t=new Map;const n=new o(s,i);if(this.#t.set(s.id,n),!s.children)throw new Error("Missing children for root");const l=s.children.map((()=>n)),a=s.children.map((t=>e.get(t)));for(;a.length;){let t=l.pop();const s=a.pop();if(!s||!t)continue;s.children||(s.children=[]);const n=new o(s,i);t.children.push(n),t=n,r.set(s.id,t.id),l.push.apply(l,s.children.map((()=>t))),a.push.apply(a,s.children.map((t=>e.get(t)))),this.#t.set(s.id,n)}return this.samples&&(this.samples=this.samples.map((t=>r.get(t)))),n}sortSamples(){if(!this.timestamps||!this.samples)return;const t=this.timestamps,e=this.samples,i=t.map(((t,e)=>e));i.sort(((e,i)=>t[e]-t[i])),this.timestamps=[],this.samples=[];for(let s=0;s<i.length;s++){const o=i[s];this.timestamps.push(t[o]),this.samples.push(e[o])}}normalizeTimestamps(){if(!this.samples)return;let t=this.timestamps;if(t){for(let e=0;e<t.length;++e)t[e]/=1e3;if(this.samples.length===t.length){const e=t.at(-1)||0,i=(e-t[0])/(t.length-1);this.timestamps.push(e+i)}this.profileStartTime=t.at(0)||this.profileStartTime,this.profileEndTime=t.at(-1)||this.profileEndTime}else{const e=this.profileStartTime,i=(this.profileEndTime-e)/this.samples.length;t=new Array(this.samples.length+1);for(let s=0;s<t.length;++s)t[s]=e+s*i;this.timestamps=t}}extractMetaNodes(){const t=this.profileHead.children;for(let e=0;e<t.length&&!(this.gcNode&&this.programNode&&this.idleNode);e++){const i=t[e];"(garbage collector)"===i.functionName?this.gcNode=i:"(program)"===i.functionName?this.programNode=i:"(idle)"===i.functionName&&(this.idleNode=i)}}fixMissingSamples(){const t=this.samples;if(!t)return;const e=t.length;if(!this.programNode||e<3)return;const i=this.#t,s=this.programNode.id,o=this.gcNode?this.gcNode.id:-1,r=this.idleNode?this.idleNode.id:-1;let n=t[0],l=t[1];for(let o=1;o<e-1;o++){const e=t[o+1],r=i.get(n),d=i.get(e);void 0!==n&&void 0!==e&&r&&d?(l!==s||h(n)||h(e)||a(r)!==a(d)||(t[o]=n),n=l,l=e):console.error(`Unexpectedly found undefined nodes: ${n} ${e}`)}function a(t){for(;t.parent&&t.parent.parent;)t=t.parent;return t}function h(t){return t===s||t===o||t===r}}forEachFrame(e,i,s,o){if(!this.profileHead||!this.samples)return;s=s||0,o=o||1/0;const r=this.samples,n=this.timestamps,l=this.#t,a=this.gcNode,h=r.length,d=t.ArrayUtilities.lowerBound(n,s,t.ArrayUtilities.DEFAULT_COMPARATOR);let p=0;const c=[];let m,u=this.profileHead.id,f=null;const g=this.maxDepth+3;this.#e||(this.#e=new Array(g));const N=this.#e;this.#i||(this.#i=new Array(g));const T=this.#i;let P,D;for(D=d;D<h&&(m=n[D],!(m>=o));D++){const t=r[D];if(t===u)continue;P=l.get(t);let s=l.get(u)||null;if(s)if(a&&P===a)f=s,e(f.depth+1,a,D,m),N[++p]=m,T[p]=0,u=t;else{if(a&&s===a&&f){const t=N[p],e=m-t;T[p-1]+=e,i(f.depth+1,a,D,t,e,e-T[p]),--p,s=f,u=s.id,f=null}for(;P&&P.depth>s.depth;)c.push(P),P=P.parent;for(;s&&s!==P;){const t=N[p],e=m-t;T[p-1]+=e,i(s.depth,s,D,t,e,e-T[p]),--p,P&&P.depth===s.depth&&(c.push(P),P=P.parent),s=s.parent}for(;c.length;){const t=c.pop();if(!t)break;P=t,e(t.depth,t,D,m),N[++p]=m,T[p]=0}u=t}}if(m=n[D]||this.profileEndTime,P&&f&&l.get(u)===a){const t=N[p],e=m-t;T[p-1]+=e,i(f.depth+1,P,D,t,e,e-T[p]),--p,u=f.id}for(let t=l.get(u);t&&t.parent;t=t.parent){const e=N[p],s=m-e;T[p-1]+=s,i(t.depth,t,D,e,s,s-T[p]),--p}}nodeByIndex(t){return this.samples&&this.#t.get(this.samples[t])||null}nodeById(t){return this.#t.get(t)||null}nodes(){return this.#t?[...this.#t.values()]:null}}});export{r as CPUProfileDataModel,s as ProfileTreeModel};
@@ -0,0 +1 @@
1
+ import*as t from"../../core/common/common.js";import*as e from"../../core/sdk/sdk.js";let n;const r=["ALL","DESKTOP","PHONE"],i=["origin","url"],a=["largest_contentful_paint","cumulative_layout_shift","interaction_to_next_paint","round_trip_time","form_factors"];class o extends t.ObjectWrapper.ObjectWrapper{#t=new Map;#e=new Map;#n;#r;#i="https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=AIzaSyCCSOx25vrb5z0tbedCB3_JRzzbVW6Uwgw";constructor(){super();const n=t.Settings.Settings.instance().getHostConfig(),r=!n||!0===n.isOffTheRecord?"Session":"Global";this.#r=t.Settings.Settings.instance().createSetting("field-data",{enabled:!1,override:"",originMappings:[]},r),this.#r.addChangeListener((()=>{this.#a()})),e.TargetManager.TargetManager.instance().addModelListener(e.ResourceTreeModel.ResourceTreeModel,e.ResourceTreeModel.Events.FrameNavigated,this.#o,this)}static instance(t={forceNew:null}){const{forceNew:e}=t;return n&&!e||(n=new o),n}getConfigSetting(){return this.#r}isEnabled(){return this.#r.get().enabled}async getFieldDataForPage(t){const e={"origin-ALL":null,"origin-DESKTOP":null,"origin-PHONE":null,"origin-TABLET":null,"url-ALL":null,"url-DESKTOP":null,"url-PHONE":null,"url-TABLET":null};try{const n=this.#s(t),a=[];for(const t of i)for(const i of r){const r=this.#c(n,t,i).then((n=>{e[`${t}-${i}`]=n}));a.push(r)}await Promise.all(a)}catch(t){console.error(t)}finally{return e}}#g(t){try{const e=new URL(t),n=(this.#r.get().originMappings||[]).find((t=>t.developmentOrigin===e.origin));if(!n)return t;const r=new URL(n.productionOrigin);return r.pathname=e.pathname,r.href}catch{return t}}async getFieldDataForCurrentPage(){const t=this.#r.get().override||this.#g(this.#n||await this.#l());return this.getFieldDataForPage(t)}async#l(){const t=e.TargetManager.TargetManager.instance();let n=t.inspectedURL();return n||(n=await new Promise((e=>{t.addEventListener("InspectedURLChanged",(function n(r){const i=r.data.inspectedURL();i&&(e(i),t.removeEventListener("InspectedURLChanged",n))}))}))),n}async#o(t){t.data.isPrimaryFrame()&&(this.#n=t.data.url,await this.#a())}async#a(){if(this.dispatchEventToListeners("field-data-changed",void 0),!this.#r.get().enabled)return;const t=await this.getFieldDataForCurrentPage();this.dispatchEventToListeners("field-data-changed",t)}#s(t){const e=new URL(t);return e.hash="",e.search="",e}async#c(t,e,n){const{origin:r,href:i,hostname:o}=t;if("localhost"===o)return null;const s="origin"===e?this.#t:this.#e,c="origin"===e?`${r}-${n}`:`${i}-${n}`,g=s.get(c);if(void 0!==g)return g;try{const t="ALL"===n?void 0:n,o="origin"===e?await this.#d({origin:r,metrics:a,formFactor:t}):await this.#d({url:i,metrics:a,formFactor:t});return s.set(c,o),o}catch(t){return console.error(t),null}}async#d(t){const e=JSON.stringify(t),n=await fetch(this.#i,{method:"POST",body:e});if(!n.ok&&404!==n.status)throw new Error(`Failed to fetch data from CrUX server (Status code: ${n.status})`);const r=await n.json();if(404===n.status){if("NOT_FOUND"===r?.error?.status)return null;throw new Error(`Failed to fetch data from CrUX server (Status code: ${n.status})`)}if(!("record"in r))throw new Error(`Failed to find data in CrUX response: ${JSON.stringify(r)}`);return r}setEndpointForTesting(t){this.#i=t}}export{o as CrUXManager,r as DEVICE_SCOPE_LIST};
@@ -0,0 +1 @@
1
+ import*as e from"../../core/common/common.js";import*as t from"../../core/host/host.js";import*as i from"../../core/i18n/i18n.js";import*as o from"../../core/sdk/sdk.js";import*as a from"../../ui/legacy/legacy.js";const n={laptopWithTouch:"Laptop with touch",laptopWithHiDPIScreen:"Laptop with HiDPI screen",laptopWithMDPIScreen:"Laptop with MDPI screen"},l=i.i18n.registerUIStrings("models/emulation/EmulatedDevices.ts",n),r=i.i18n.getLazilyComputedLocalizedString.bind(void 0,l);function h(e){return e.replace(/@url\(([^\)]*?)\)/g,((e,t)=>new URL(`../../emulated_devices/${t}`,import.meta.url).toString()))}class s{title;type;order;vertical;horizontal;deviceScaleFactor;capabilities;userAgent;userAgentMetadata;modes;isDualScreen;isFoldableScreen;verticalSpanned;horizontalSpanned;#e;#t;constructor(){this.title="",this.type=p.Unknown,this.vertical={width:0,height:0,outlineInsets:null,outlineImage:null,hinge:null},this.horizontal={width:0,height:0,outlineInsets:null,outlineImage:null,hinge:null},this.deviceScaleFactor=1,this.capabilities=["touch","mobile"],this.userAgent="",this.userAgentMetadata=null,this.modes=[],this.isDualScreen=!1,this.isFoldableScreen=!1,this.verticalSpanned={width:0,height:0,outlineInsets:null,outlineImage:null,hinge:null},this.horizontalSpanned={width:0,height:0,outlineInsets:null,outlineImage:null,hinge:null},this.#e=m.Default,this.#t=!0}static fromJSONV1(e){try{function t(e,t,i,o){if("object"!=typeof e||null===e||!e.hasOwnProperty(t)){if(void 0!==o)return o;throw new Error("Emulated device is missing required property '"+t+"'")}const a=e[t];if(typeof a!==i||null===a)throw new Error("Emulated device property '"+t+"' has wrong type '"+typeof a+"'");return a}function i(e,i){const o=t(e,i,"number");if(o!==Math.abs(o))throw new Error("Emulated device value '"+i+"' must be integer");return o}function a(e){return new I(i(e,"left"),i(e,"top"),i(e,"right"),i(e,"bottom"))}function n(e){const o={};if(o.r=i(e,"r"),o.r<0||o.r>255)throw new Error("color has wrong r value: "+o.r);if(o.g=i(e,"g"),o.g<0||o.g>255)throw new Error("color has wrong g value: "+o.g);if(o.b=i(e,"b"),o.b<0||o.b>255)throw new Error("color has wrong b value: "+o.b);if(o.a=t(e,"a","number"),o.a<0||o.a>1)throw new Error("color has wrong a value: "+o.a);return o}function l(e){const t={};if(t.width=i(e,"width"),t.width<0||t.width>L)throw new Error("Emulated device has wrong hinge width: "+t.width);if(t.height=i(e,"height"),t.height<0||t.height>L)throw new Error("Emulated device has wrong hinge height: "+t.height);if(t.x=i(e,"x"),t.x<0||t.x>L)throw new Error("Emulated device has wrong x offset: "+t.height);if(t.y=i(e,"y"),t.x<0||t.x>L)throw new Error("Emulated device has wrong y offset: "+t.height);return e.contentColor&&(t.contentColor=n(e.contentColor)),e.outlineColor&&(t.outlineColor=n(e.outlineColor)),t}function r(e){const o={};if(o.width=i(e,"width"),o.width<0||o.width>L||o.width<P)throw new Error("Emulated device has wrong width: "+o.width);if(o.height=i(e,"height"),o.height<0||o.height>L||o.height<P)throw new Error("Emulated device has wrong height: "+o.height);const n=t(e.outline,"insets","object",null);if(n){if(o.outlineInsets=a(n),o.outlineInsets.left<0||o.outlineInsets.top<0)throw new Error("Emulated device has wrong outline insets");o.outlineImage=t(e.outline,"image","string")}return e.hinge&&(o.hinge=l(t(e,"hinge","object",void 0))),o}const h=new s;h.title=t(e,"title","string");const b=t(e,"type","string");if(!Object.values(p).includes(b))throw new Error("Emulated device has wrong type: "+b);h.type=b,h.order=t(e,"order","number",0);const f=t(e,"user-agent","string");h.userAgent=o.NetworkManager.MultitargetNetworkManager.patchUserAgentWithChromeVersion(f),h.userAgentMetadata=t(e,"user-agent-metadata","object",null);const v=t(e,"capabilities","object",[]);if(!Array.isArray(v))throw new Error("Emulated device capabilities must be an array");h.capabilities=[];for(let M=0;M<v.length;++M){if("string"!=typeof v[M])throw new Error("Emulated device capability must be a string");h.capabilities.push(v[M])}if(h.deviceScaleFactor=t(e.screen,"device-pixel-ratio","number"),h.deviceScaleFactor<0||h.deviceScaleFactor>100)throw new Error("Emulated device has wrong deviceScaleFactor: "+h.deviceScaleFactor);if(h.vertical=r(t(e.screen,"vertical","object")),h.horizontal=r(t(e.screen,"horizontal","object")),h.isDualScreen=t(e,"dual-screen","boolean",!1),h.isFoldableScreen=t(e,"foldable-screen","boolean",!1),(h.isDualScreen||h.isFoldableScreen)&&(h.verticalSpanned=r(t(e.screen,"vertical-spanned","object",null)),h.horizontalSpanned=r(t(e.screen,"horizontal-spanned","object",null))),(h.isDualScreen||h.isFoldableScreen)&&(!h.verticalSpanned||!h.horizontalSpanned))throw new Error("Emulated device '"+h.title+"'has dual screen without spanned orientations");const w=t(e,"modes","object",[{title:"default",orientation:"vertical"},{title:"default",orientation:"horizontal"}]);if(!Array.isArray(w))throw new Error("Emulated device modes must be an array");h.modes=[];for(let x=0;x<w.length;++x){const y={};if(y.title=t(w[x],"title","string"),y.orientation=t(w[x],"orientation","string"),y.orientation!==c&&y.orientation!==d&&y.orientation!==g&&y.orientation!==u)throw new Error("Emulated device mode has wrong orientation '"+y.orientation+"'");const z=h.orientationByName(y.orientation);if(y.insets=a(t(w[x],"insets","object",{left:0,top:0,right:0,bottom:0})),y.insets.top<0||y.insets.left<0||y.insets.right<0||y.insets.bottom<0||y.insets.top+y.insets.bottom>z.height||y.insets.left+y.insets.right>z.width)throw new Error("Emulated device mode '"+y.title+"'has wrong mode insets");y.image=t(w[x],"image","string",null),h.modes.push(y)}h.#t=t(e,"show-by-default","boolean",void 0);const S=t(e,"show","string",m.Default);if(!Object.values(m).includes(S))throw new Error("Emulated device has wrong show mode: "+S);return h.#e=S,h}catch(A){return null}}static deviceComparator(e,t){const i=e.order||0,o=t.order||0;return i>o?1:o>i||e.title<t.title?-1:e.title>t.title?1:0}modesForOrientation(e){const t=[];for(let i=0;i<this.modes.length;i++)this.modes[i].orientation===e&&t.push(this.modes[i]);return t}getSpanPartner(e){switch(e.orientation){case c:return this.modesForOrientation(g)[0];case d:return this.modesForOrientation(u)[0];case g:return this.modesForOrientation(c)[0];default:return this.modesForOrientation(d)[0]}}getRotationPartner(e){switch(e.orientation){case u:return this.modesForOrientation(g)[0];case g:return this.modesForOrientation(u)[0];case d:return this.modesForOrientation(c)[0];default:return this.modesForOrientation(d)[0]}}toJSON(){const e={};e.title=this.title,e.type=this.type,e["user-agent"]=this.userAgent,e.capabilities=this.capabilities,e.screen={"device-pixel-ratio":this.deviceScaleFactor,vertical:this.orientationToJSON(this.vertical),horizontal:this.orientationToJSON(this.horizontal),"vertical-spanned":void 0,"horizontal-spanned":void 0},(this.isDualScreen||this.isFoldableScreen)&&(e.screen["vertical-spanned"]=this.orientationToJSON(this.verticalSpanned),e.screen["horizontal-spanned"]=this.orientationToJSON(this.horizontalSpanned)),e.modes=[];for(let t=0;t<this.modes.length;++t){const i={title:this.modes[t].title,orientation:this.modes[t].orientation,insets:{left:this.modes[t].insets.left,top:this.modes[t].insets.top,right:this.modes[t].insets.right,bottom:this.modes[t].insets.bottom},image:this.modes[t].image||void 0};e.modes.push(i)}return e["show-by-default"]=this.#t,e["dual-screen"]=this.isDualScreen,e["foldable-screen"]=this.isFoldableScreen,e.show=this.#e,this.userAgentMetadata&&(e["user-agent-metadata"]=this.userAgentMetadata),e}orientationToJSON(e){const t={};return t.width=e.width,t.height=e.height,e.outlineInsets&&(t.outline={insets:{left:e.outlineInsets.left,top:e.outlineInsets.top,right:e.outlineInsets.right,bottom:e.outlineInsets.bottom},image:e.outlineImage}),e.hinge&&(t.hinge={width:e.hinge.width,height:e.hinge.height,x:e.hinge.x,y:e.hinge.y,contentColor:void 0,outlineColor:void 0},e.hinge.contentColor&&(t.hinge.contentColor={r:e.hinge.contentColor.r,g:e.hinge.contentColor.g,b:e.hinge.contentColor.b,a:e.hinge.contentColor.a}),e.hinge.outlineColor&&(t.hinge.outlineColor={r:e.hinge.outlineColor.r,g:e.hinge.outlineColor.g,b:e.hinge.outlineColor.b,a:e.hinge.outlineColor.a})),t}modeImage(e){return e.image?h(e.image):""}outlineImage(e){const t=this.orientationByName(e.orientation);return t.outlineImage?h(t.outlineImage):""}orientationByName(e){switch(e){case g:return this.verticalSpanned;case u:return this.horizontalSpanned;case c:return this.vertical;default:return this.horizontal}}show(){return this.#e===m.Default?this.#t:this.#e===m.Always}setShow(e){this.#e=e?m.Always:m.Never}copyShowFrom(e){this.#e=e.#e}touch(){return-1!==this.capabilities.indexOf("touch")}mobile(){return-1!==this.capabilities.indexOf("mobile")}}const d="horizontal",c="vertical",u="horizontal-spanned",g="vertical-spanned";var p,m;let b;!function(e){e.Phone="phone",e.Tablet="tablet",e.Notebook="notebook",e.Desktop="desktop",e.Unknown="unknown"}(p||(p={})),function(e){e.Always="Always",e.Default="Default",e.Never="Never"}(m||(m={}));class f extends e.ObjectWrapper.ObjectWrapper{#i;#o;#a;#n;constructor(){super(),this.#i=e.Settings.Settings.instance().createSetting("standard-emulated-device-list",[]),this.#o=new Set,this.listFromJSONV1(this.#i.get(),this.#o),this.updateStandardDevices(),this.#a=e.Settings.Settings.instance().createSetting("custom-emulated-device-list",[]),this.#n=new Set,this.listFromJSONV1(this.#a.get(),this.#n)||this.saveCustomDevices()}static instance(){return b||(b=new f),b}updateStandardDevices(){const e=new Set;for(const t of v){const i=s.fromJSONV1(t);i&&e.add(i)}this.copyShowValues(this.#o,e),this.#o=e,this.saveStandardDevices()}listFromJSONV1(e,t){if(!Array.isArray(e))return!1;let i=!0;for(let o=0;o<e.length;++o){const a=s.fromJSONV1(e[o]);a?(t.add(a),a.modes.length||(a.modes.push({title:"",orientation:d,insets:new I(0,0,0,0),image:null}),a.modes.push({title:"",orientation:c,insets:new I(0,0,0,0),image:null}))):i=!1}return i}standard(){return[...this.#o]}custom(){return[...this.#n]}revealCustomSetting(){e.Revealer.reveal(this.#a)}addCustomDevice(e){this.#n.add(e),this.saveCustomDevices()}removeCustomDevice(e){this.#n.delete(e),this.saveCustomDevices()}saveCustomDevices(){const e=[];this.#n.forEach((t=>e.push(t.toJSON()))),this.#a.set(e),this.dispatchEventToListeners("CustomDevicesUpdated")}saveStandardDevices(){const e=[];this.#o.forEach((t=>e.push(t.toJSON()))),this.#i.set(e),this.dispatchEventToListeners("StandardDevicesUpdated")}copyShowValues(e,t){const i=new Map;for(const t of e)i.set(t.title,t);for(const e of t){const t=i.get(e.title);t&&e.copyShowFrom(t)}}}const v=[{order:10,"show-by-default":!0,title:"iPhone SE",screen:{horizontal:{width:667,height:375},"device-pixel-ratio":2,vertical:{width:375,height:667}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",type:"phone"},{order:12,"show-by-default":!0,title:"iPhone XR",screen:{horizontal:{width:896,height:414},"device-pixel-ratio":2,vertical:{width:414,height:896}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",type:"phone"},{order:14,"show-by-default":!0,title:"iPhone 12 Pro",screen:{horizontal:{width:844,height:390},"device-pixel-ratio":3,vertical:{width:390,height:844}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",type:"phone"},{order:15,"show-by-default":!0,title:"iPhone 14 Pro Max",screen:{horizontal:{width:932,height:430},"device-pixel-ratio":3,vertical:{width:430,height:932}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",type:"phone"},{order:16,"show-by-default":!1,title:"Pixel 3 XL",screen:{horizontal:{width:786,height:393},"device-pixel-ratio":2.75,vertical:{width:393,height:786}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 11; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"11",architecture:"",model:"Pixel 3",mobile:!0},type:"phone"},{order:18,"show-by-default":!0,title:"Pixel 7",screen:{horizontal:{width:915,height:412},"device-pixel-ratio":2.625,vertical:{width:412,height:915}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"13",architecture:"",model:"Pixel 5",mobile:!0},type:"phone"},{order:20,"show-by-default":!0,title:"Samsung Galaxy S8+",screen:{horizontal:{width:740,height:360},"device-pixel-ratio":4,vertical:{width:360,height:740}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"SM-G955U",mobile:!0},type:"phone"},{order:24,"show-by-default":!0,title:"Samsung Galaxy S20 Ultra",screen:{horizontal:{width:915,height:412},"device-pixel-ratio":3.5,vertical:{width:412,height:915}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 13; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"13",architecture:"",model:"SM-G981B",mobile:!0},type:"phone"},{order:26,"show-by-default":!0,title:"iPad Mini",screen:{horizontal:{width:1024,height:768},"device-pixel-ratio":2,vertical:{width:768,height:1024}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPad; CPU OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",type:"tablet"},{order:28,"show-by-default":!0,title:"iPad Air",screen:{horizontal:{width:1180,height:820},"device-pixel-ratio":2,vertical:{width:820,height:1180}},capabilities:["touch"],"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15",type:"tablet"},{order:29,"show-by-default":!0,title:"iPad Pro",screen:{horizontal:{width:1366,height:1024},"device-pixel-ratio":2,vertical:{width:1024,height:1366}},capabilities:["touch"],"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15",type:"tablet"},{order:30,"show-by-default":!0,title:"Surface Pro 7",screen:{horizontal:{width:1368,height:912},"device-pixel-ratio":2,vertical:{width:912,height:1368}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",type:"tablet"},{order:32,"show-by-default":!0,"dual-screen":!0,title:"Surface Duo",screen:{horizontal:{width:720,height:540},"device-pixel-ratio":2.5,vertical:{width:540,height:720},"vertical-spanned":{width:1114,height:720,hinge:{width:34,height:720,x:540,y:0,contentColor:{r:38,g:38,b:38,a:1}}},"horizontal-spanned":{width:720,height:1114,hinge:{width:720,height:34,x:0,y:540,contentColor:{r:38,g:38,b:38,a:1}}}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 11.0; Surface Duo) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"11.0",architecture:"",model:"Surface Duo",mobile:!0},type:"phone",modes:[{title:"default",orientation:"vertical",insets:{left:0,top:0,right:0,bottom:0}},{title:"default",orientation:"horizontal",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"vertical-spanned",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"horizontal-spanned",insets:{left:0,top:0,right:0,bottom:0}}]},{order:34,"show-by-default":!0,"foldable-screen":!0,title:"Galaxy Z Fold 5",screen:{horizontal:{width:882,height:344},"device-pixel-ratio":2.625,vertical:{width:344,height:882},"vertical-spanned":{width:690,height:829,hinge:{width:0,height:829,x:345,y:0,contentColor:{r:38,g:38,b:38,a:.2},outlineColor:{r:38,g:38,b:38,a:.7}}},"horizontal-spanned":{width:829,height:690,hinge:{width:829,height:0,x:0,y:345,contentColor:{r:38,g:38,b:38,a:.2},outlineColor:{r:38,g:38,b:38,a:.7}}}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"10.0",architecture:"",model:"SM-F946U",mobile:!0},type:"phone",modes:[{title:"default",orientation:"vertical",insets:{left:0,top:0,right:0,bottom:0}},{title:"default",orientation:"horizontal",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"vertical-spanned",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"horizontal-spanned",insets:{left:0,top:0,right:0,bottom:0}}]},{order:35,"show-by-default":!0,"foldable-screen":!0,title:"Asus Zenbook Fold",screen:{horizontal:{width:1280,height:853},"device-pixel-ratio":1.5,vertical:{width:853,height:1280},"vertical-spanned":{width:1706,height:1280,hinge:{width:107,height:1280,x:800,y:0,contentColor:{r:38,g:38,b:38,a:.2},outlineColor:{r:38,g:38,b:38,a:.7}}},"horizontal-spanned":{width:1280,height:1706,hinge:{width:1706,height:107,x:0,y:800,contentColor:{r:38,g:38,b:38,a:.2},outlineColor:{r:38,g:38,b:38,a:.7}}}},capabilities:["touch"],"user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","user-agent-metadata":{platform:"Windows",platformVersion:"11.0",architecture:"",model:"UX9702AA",mobile:!1},type:"tablet",modes:[{title:"default",orientation:"vertical",insets:{left:0,top:0,right:0,bottom:0}},{title:"default",orientation:"horizontal",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"vertical-spanned",insets:{left:0,top:0,right:0,bottom:0}},{title:"spanned",orientation:"horizontal-spanned",insets:{left:0,top:0,right:0,bottom:0}}]},{order:36,"show-by-default":!0,title:"Samsung Galaxy A51/71",screen:{horizontal:{width:914,height:412},"device-pixel-ratio":2.625,vertical:{width:412,height:914}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"SM-G955U",mobile:!0},type:"phone"},{order:52,"show-by-default":!0,title:"Nest Hub Max",screen:{horizontal:{outline:{image:"@url(optimized/google-nest-hub-max-horizontal.avif)",insets:{left:92,top:96,right:91,bottom:248}},width:1280,height:800},"device-pixel-ratio":2,vertical:{width:1280,height:800}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.188 Safari/537.36 CrKey/1.54.250320",type:"tablet",modes:[{title:"default",orientation:"horizontal"}]},{order:50,"show-by-default":!0,title:"Nest Hub",screen:{horizontal:{outline:{image:"@url(optimized/google-nest-hub-horizontal.avif)",insets:{left:82,top:74,right:83,bottom:222}},width:1024,height:600},"device-pixel-ratio":2,vertical:{width:1024,height:600}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.109 Safari/537.36 CrKey/1.54.248666","user-agent-metadata":{platform:"Android",platformVersion:"",architecture:"",model:"",mobile:!1},type:"tablet",modes:[{title:"default",orientation:"horizontal"}]},{order:129,"show-by-default":!1,title:"iPhone 4",screen:{horizontal:{width:480,height:320},"device-pixel-ratio":2,vertical:{width:320,height:480}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_2 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D257 Safari/9537.53",type:"phone"},{order:130,"show-by-default":!1,title:"iPhone 5/SE",screen:{horizontal:{outline:{image:"@url(optimized/iPhone5-landscape.avif)",insets:{left:115,top:25,right:115,bottom:28}},width:568,height:320},"device-pixel-ratio":2,vertical:{outline:{image:"@url(optimized/iPhone5-portrait.avif)",insets:{left:29,top:105,right:25,bottom:111}},width:320,height:568}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1",type:"phone"},{order:131,"show-by-default":!1,title:"iPhone 6/7/8",screen:{horizontal:{outline:{image:"@url(optimized/iPhone6-landscape.avif)",insets:{left:106,top:28,right:106,bottom:28}},width:667,height:375},"device-pixel-ratio":2,vertical:{outline:{image:"@url(optimized/iPhone6-portrait.avif)",insets:{left:28,top:105,right:28,bottom:105}},width:375,height:667}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{order:132,"show-by-default":!1,title:"iPhone 6/7/8 Plus",screen:{horizontal:{outline:{image:"@url(optimized/iPhone6Plus-landscape.avif)",insets:{left:109,top:29,right:109,bottom:27}},width:736,height:414},"device-pixel-ratio":3,vertical:{outline:{image:"@url(optimized/iPhone6Plus-portrait.avif)",insets:{left:26,top:107,right:30,bottom:111}},width:414,height:736}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{order:133,"show-by-default":!1,title:"iPhone X",screen:{horizontal:{width:812,height:375},"device-pixel-ratio":3,vertical:{width:375,height:812}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",type:"phone"},{"show-by-default":!1,title:"BlackBerry Z30",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":2,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+",type:"phone"},{"show-by-default":!1,title:"Nexus 4",screen:{horizontal:{width:640,height:384},"device-pixel-ratio":2,vertical:{width:384,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 4.4.2; Nexus 4 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"4.4.2",architecture:"",model:"Nexus 4",mobile:!0},type:"phone"},{title:"Nexus 5",type:"phone","user-agent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"6.0",architecture:"",model:"Nexus 5",mobile:!0},capabilities:["touch","mobile"],"show-by-default":!1,screen:{"device-pixel-ratio":3,vertical:{width:360,height:640},horizontal:{width:640,height:360}},modes:[{title:"default",orientation:"vertical",insets:{left:0,top:25,right:0,bottom:48},image:"@url(optimized/google-nexus-5-vertical-default-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-default-2x.avif) 2x"},{title:"navigation bar",orientation:"vertical",insets:{left:0,top:80,right:0,bottom:48},image:"@url(optimized/google-nexus-5-vertical-navigation-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-navigation-2x.avif) 2x"},{title:"keyboard",orientation:"vertical",insets:{left:0,top:80,right:0,bottom:312},image:"@url(optimized/google-nexus-5-vertical-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5-vertical-keyboard-2x.avif) 2x"},{title:"default",orientation:"horizontal",insets:{left:0,top:25,right:42,bottom:0},image:"@url(optimized/google-nexus-5-horizontal-default-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-default-2x.avif) 2x"},{title:"navigation bar",orientation:"horizontal",insets:{left:0,top:80,right:42,bottom:0},image:"@url(optimized/google-nexus-5-horizontal-navigation-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-navigation-2x.avif) 2x"},{title:"keyboard",orientation:"horizontal",insets:{left:0,top:80,right:42,bottom:202},image:"@url(optimized/google-nexus-5-horizontal-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5-horizontal-keyboard-2x.avif) 2x"}]},{title:"Nexus 5X",type:"phone","user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 5X Build/OPR4.170623.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"Nexus 5X",mobile:!0},capabilities:["touch","mobile"],"show-by-default":!1,screen:{"device-pixel-ratio":2.625,vertical:{outline:{image:"@url(optimized/Nexus5X-portrait.avif)",insets:{left:18,top:88,right:22,bottom:98}},width:412,height:732},horizontal:{outline:{image:"@url(optimized/Nexus5X-landscape.avif)",insets:{left:88,top:21,right:98,bottom:19}},width:732,height:412}},modes:[{title:"default",orientation:"vertical",insets:{left:0,top:24,right:0,bottom:48},image:"@url(optimized/google-nexus-5x-vertical-default-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-default-2x.avif) 2x"},{title:"navigation bar",orientation:"vertical",insets:{left:0,top:80,right:0,bottom:48},image:"@url(optimized/google-nexus-5x-vertical-navigation-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-navigation-2x.avif) 2x"},{title:"keyboard",orientation:"vertical",insets:{left:0,top:80,right:0,bottom:342},image:"@url(optimized/google-nexus-5x-vertical-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5x-vertical-keyboard-2x.avif) 2x"},{title:"default",orientation:"horizontal",insets:{left:0,top:24,right:48,bottom:0},image:"@url(optimized/google-nexus-5x-horizontal-default-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-default-2x.avif) 2x"},{title:"navigation bar",orientation:"horizontal",insets:{left:0,top:80,right:48,bottom:0},image:"@url(optimized/google-nexus-5x-horizontal-navigation-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-navigation-2x.avif) 2x"},{title:"keyboard",orientation:"horizontal",insets:{left:0,top:80,right:48,bottom:222},image:"@url(optimized/google-nexus-5x-horizontal-keyboard-1x.avif) 1x, @url(optimized/google-nexus-5x-horizontal-keyboard-2x.avif) 2x"}]},{"show-by-default":!1,title:"Nexus 6",screen:{horizontal:{width:732,height:412},"device-pixel-ratio":3.5,vertical:{width:412,height:732}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F26U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"7.1.1",architecture:"",model:"Nexus 6",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Nexus 6P",screen:{horizontal:{outline:{image:"@url(optimized/Nexus6P-landscape.avif)",insets:{left:94,top:17,right:88,bottom:17}},width:732,height:412},"device-pixel-ratio":3.5,vertical:{outline:{image:"@url(optimized/Nexus6P-portrait.avif)",insets:{left:16,top:94,right:16,bottom:88}},width:412,height:732}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; Nexus 6P Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"Nexus 6P",mobile:!0},type:"phone"},{order:120,"show-by-default":!1,title:"Pixel 2",screen:{horizontal:{width:731,height:411},"device-pixel-ratio":2.625,vertical:{width:411,height:731}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0",architecture:"",model:"Pixel 2",mobile:!0},type:"phone"},{order:121,"show-by-default":!1,title:"Pixel 2 XL",screen:{horizontal:{width:823,height:411},"device-pixel-ratio":3.5,vertical:{width:411,height:823}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"Pixel 2 XL",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Pixel 3",screen:{horizontal:{width:786,height:393},"device-pixel-ratio":2.75,vertical:{width:393,height:786}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 9; Pixel 3 Build/PQ1A.181105.017.A1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"9",architecture:"",model:"Pixel 3",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Pixel 4",screen:{horizontal:{width:745,height:353},"device-pixel-ratio":3,vertical:{width:353,height:745}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"10",architecture:"",model:"Pixel 4",mobile:!0},type:"phone"},{"show-by-default":!1,title:"LG Optimus L70",screen:{horizontal:{width:640,height:384},"device-pixel-ratio":1.25,vertical:{width:384,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; LGMS323 Build/KOT49I.MS32310c) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"4.4.2",architecture:"",model:"LGMS323",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Nokia N9",screen:{horizontal:{width:854,height:480},"device-pixel-ratio":1,vertical:{width:480,height:854}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13",type:"phone"},{"show-by-default":!1,title:"Nokia Lumia 520",screen:{horizontal:{width:533,height:320},"device-pixel-ratio":1.5,vertical:{width:320,height:533}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)",type:"phone"},{"show-by-default":!1,title:"Microsoft Lumia 550",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":2,vertical:{width:640,height:360}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 550) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263","user-agent-metadata":{platform:"Android",platformVersion:"4.2.1",architecture:"",model:"Lumia 550",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Microsoft Lumia 950",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":4,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; Microsoft; Lumia 950) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Mobile Safari/537.36 Edge/14.14263","user-agent-metadata":{platform:"Android",platformVersion:"4.2.1",architecture:"",model:"Lumia 950",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy S III",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":2,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30","user-agent-metadata":{platform:"Android",platformVersion:"4.0",architecture:"",model:"GT-I9300",mobile:!0},type:"phone"},{order:110,"show-by-default":!1,title:"Galaxy S5",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":3,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"5.0",architecture:"",model:"SM-G900P",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy S8",screen:{horizontal:{width:740,height:360},"device-pixel-ratio":3,vertical:{width:360,height:740}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 7.0; SM-G950U Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"7.0",architecture:"",model:"SM-G950U",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy S9+",screen:{horizontal:{width:658,height:320},"device-pixel-ratio":4.5,vertical:{width:320,height:658}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.0.0",architecture:"",model:"SM-G965U",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy Tab S4",screen:{horizontal:{width:1138,height:712},"device-pixel-ratio":2.25,vertical:{width:712,height:1138}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 8.1.0; SM-T837A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"8.1.0",architecture:"",model:"SM-T837A",mobile:!1},type:"phone"},{order:1,"show-by-default":!1,title:"JioPhone 2",screen:{horizontal:{width:320,height:240},"device-pixel-ratio":1,vertical:{width:240,height:320}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Mobile; LYF/F300B/LYF-F300B-001-01-15-130718-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5","user-agent-metadata":{platform:"Android",platformVersion:"",architecture:"",model:"LYF/F300B/LYF-F300B-001-01-15-130718-i",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Kindle Fire HDX",screen:{horizontal:{width:1280,height:800},"device-pixel-ratio":2,vertical:{width:800,height:1280}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true",type:"tablet"},{order:140,"show-by-default":!1,title:"iPad",screen:{horizontal:{outline:{image:"@url(optimized/iPad-landscape.avif)",insets:{left:112,top:56,right:116,bottom:52}},width:1024,height:768},"device-pixel-ratio":2,vertical:{outline:{image:"@url(optimized/iPad-portrait.avif)",insets:{left:52,top:114,right:55,bottom:114}},width:768,height:1024}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",type:"tablet"},{order:141,"show-by-default":!1,title:"iPad Pro",screen:{horizontal:{width:1366,height:1024},"device-pixel-ratio":2,vertical:{width:1024,height:1366}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1",type:"tablet"},{"show-by-default":!1,title:"Blackberry PlayBook",screen:{horizontal:{width:1024,height:600},"device-pixel-ratio":1,vertical:{width:600,height:1024}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+",type:"tablet"},{"show-by-default":!1,title:"Nexus 10",screen:{horizontal:{width:1280,height:800},"device-pixel-ratio":2,vertical:{width:800,height:1280}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 10 Build/MOB31T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"6.0.1",architecture:"",model:"Nexus 10",mobile:!1},type:"tablet"},{"show-by-default":!1,title:"Nexus 7",screen:{horizontal:{width:960,height:600},"device-pixel-ratio":2,vertical:{width:600,height:960}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"6.0.1",architecture:"",model:"Nexus 7",mobile:!1},type:"tablet"},{"show-by-default":!1,title:"Galaxy Note 3",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":3,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; Android 4.3; en-us; SM-N900T Build/JSS15J) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30","user-agent-metadata":{platform:"Android",platformVersion:"4.3",architecture:"",model:"SM-N900T",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Galaxy Note II",screen:{horizontal:{width:640,height:360},"device-pixel-ratio":2,vertical:{width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; U; Android 4.1; en-us; GT-N7100 Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30","user-agent-metadata":{platform:"Android",platformVersion:"4.1",architecture:"",model:"GT-N7100",mobile:!0},type:"phone"},{"show-by-default":!1,title:r(n.laptopWithTouch),screen:{horizontal:{width:1280,height:950},"device-pixel-ratio":1,vertical:{width:950,height:1280}},capabilities:["touch"],"user-agent":"",type:"notebook",modes:[{title:"default",orientation:"horizontal"}]},{"show-by-default":!1,title:r(n.laptopWithHiDPIScreen),screen:{horizontal:{width:1440,height:900},"device-pixel-ratio":2,vertical:{width:900,height:1440}},capabilities:[],"user-agent":"",type:"notebook",modes:[{title:"default",orientation:"horizontal"}]},{"show-by-default":!1,title:r(n.laptopWithMDPIScreen),screen:{horizontal:{width:1280,height:800},"device-pixel-ratio":1,vertical:{width:800,height:1280}},capabilities:[],"user-agent":"",type:"notebook",modes:[{title:"default",orientation:"horizontal"}]},{"show-by-default":!1,title:"Moto G4",screen:{horizontal:{outline:{image:"@url(optimized/MotoG4-landscape.avif)",insets:{left:91,top:30,right:74,bottom:30}},width:640,height:360},"device-pixel-ratio":3,vertical:{outline:{image:"@url(optimized/MotoG4-portrait.avif)",insets:{left:30,top:91,right:30,bottom:74}},width:360,height:640}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"6.0.1",architecture:"",model:"Moto G (4)",mobile:!0},type:"phone"},{"show-by-default":!1,title:"Moto G Power",screen:{"device-pixel-ratio":1.75,horizontal:{width:823,height:412},vertical:{width:412,height:823}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 11; moto g power (2022)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36","user-agent-metadata":{platform:"Android",platformVersion:"11",architecture:"",model:"moto g power (2022)",mobile:!0},type:"phone"},{order:200,"show-by-default":!1,title:"Facebook on Android",screen:{horizontal:{width:892,height:412},"device-pixel-ratio":3.5,vertical:{width:412,height:892}},capabilities:["touch","mobile"],"user-agent":"Mozilla/5.0 (Linux; Android 12; Pixel 6 Build/SQ3A.220705.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/%s Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/407.0.0.0.65;]","user-agent-metadata":{platform:"Android",platformVersion:"12",architecture:"",model:"Pixel 6",mobile:!0},type:"phone"}];var w=Object.freeze({__proto__:null,computeRelativeImageURL:h,EmulatedDevice:s,Horizontal:d,Vertical:c,HorizontalSpanned:u,VerticalSpanned:g,EmulatedDevicesList:f});const S={widthCannotBeEmpty:"Width cannot be empty.",widthMustBeANumber:"Width must be a number.",widthMustBeLessThanOrEqualToS:"Width must be less than or equal to {PH1}.",widthMustBeGreaterThanOrEqualToS:"Width must be greater than or equal to {PH1}.",heightCannotBeEmpty:"Height cannot be empty.",heightMustBeANumber:"Height must be a number.",heightMustBeLessThanOrEqualToS:"Height must be less than or equal to {PH1}.",heightMustBeGreaterThanOrEqualTo:"Height must be greater than or equal to {PH1}.",devicePixelRatioMustBeANumberOr:"Device pixel ratio must be a number or blank.",devicePixelRatioMustBeLessThanOr:"Device pixel ratio must be less than or equal to {PH1}.",devicePixelRatioMustBeGreater:"Device pixel ratio must be greater than or equal to {PH1}."},M=i.i18n.registerUIStrings("models/emulation/DeviceModeModel.ts",S),x=i.i18n.getLocalizedString.bind(void 0,M);let y;class z extends e.ObjectWrapper.ObjectWrapper{#l;#r;#h;#s;#d;#c;#u;#g;#p;#m;#b;#f;#v;#w;#S;#M;#x;#y;#z;#I;#A;#k;#P;#L;#T;#C;constructor(){super(),this.#l=new A(0,0,1,1),this.#r=new A(0,0,1,1),this.#h=new a.Geometry.Size(1,1),this.#s=new a.Geometry.Size(1,1),this.#d=!1,this.#c=new a.Geometry.Size(1,1),this.#u=window.devicePixelRatio,this.#g="Desktop",this.#p=!!window.visualViewport&&"segments"in window.visualViewport,this.#m=e.Settings.Settings.instance().createSetting("emulation.device-scale",1),this.#m.get()||this.#m.set(1),this.#m.addChangeListener(this.scaleSettingChanged,this),this.#b=1,this.#f=e.Settings.Settings.instance().createSetting("emulation.device-width",400),this.#f.get()<P&&this.#f.set(P),this.#f.get()>L&&this.#f.set(L),this.#f.addChangeListener(this.widthSettingChanged,this),this.#v=e.Settings.Settings.instance().createSetting("emulation.device-height",0),this.#v.get()&&this.#v.get()<P&&this.#v.set(P),this.#v.get()>L&&this.#v.set(L),this.#v.addChangeListener(this.heightSettingChanged,this),this.#w=e.Settings.Settings.instance().createSetting("emulation.device-ua","Mobile"),this.#w.addChangeListener(this.uaSettingChanged,this),this.#S=e.Settings.Settings.instance().createSetting("emulation.device-scale-factor",0),this.#S.addChangeListener(this.deviceScaleFactorSettingChanged,this),this.#M=e.Settings.Settings.instance().moduleSetting("emulation.show-device-outline"),this.#M.addChangeListener(this.deviceOutlineSettingChanged,this),this.#x=e.Settings.Settings.instance().createSetting("emulation.toolbar-controls-enabled",!0,"Session"),this.#y=k.None,this.#z=null,this.#I=null,this.#A=1,this.#k=!1,this.#P=!1,this.#L=null,this.#T=null,o.TargetManager.TargetManager.instance().observeModels(o.EmulationModel.EmulationModel,this)}static instance(e){return y&&!e?.forceNew||(y=new z),y}static widthValidator(e){let t,i=!1;return e?/^[\d]+$/.test(e)?Number(e)>L?t=x(S.widthMustBeLessThanOrEqualToS,{PH1:L}):Number(e)<P?t=x(S.widthMustBeGreaterThanOrEqualToS,{PH1:P}):i=!0:t=x(S.widthMustBeANumber):t=x(S.widthCannotBeEmpty),{valid:i,errorMessage:t}}static heightValidator(e){let t,i=!1;return e?/^[\d]+$/.test(e)?Number(e)>L?t=x(S.heightMustBeLessThanOrEqualToS,{PH1:L}):Number(e)<P?t=x(S.heightMustBeGreaterThanOrEqualTo,{PH1:P}):i=!0:t=x(S.heightMustBeANumber):t=x(S.heightCannotBeEmpty),{valid:i,errorMessage:t}}static scaleValidator(e){let t,i=!1;const o=Number(e.trim());return e?Number.isNaN(o)?t=x(S.devicePixelRatioMustBeANumberOr):Number(e)>C?t=x(S.devicePixelRatioMustBeLessThanOr,{PH1:C}):Number(e)<T?t=x(S.devicePixelRatioMustBeGreater,{PH1:T}):i=!0:i=!0,{valid:i,errorMessage:t}}get scaleSettingInternal(){return this.#m}setAvailableSize(e,t){this.#h=e,this.#s=t,this.#d=!0,this.calculateAndEmulate(!1)}emulate(e,i,o,a){const n=this.#y!==e||this.#z!==i||this.#I!==o;if(this.#y=e,e===k.Device&&i&&o){if(console.assert(Boolean(i)&&Boolean(o),"Must pass device and mode for device emulation"),this.#I=o,this.#z=i,this.#d){const e=i.orientationByName(o.orientation);this.#m.set(a||this.calculateFitScale(e.width,e.height,this.currentOutline(),this.currentInsets()))}}else this.#z=null,this.#I=null;e!==k.None&&t.userMetrics.actionTaken(t.UserMetrics.Action.DeviceModeEnabled),this.calculateAndEmulate(n)}setWidth(e){const t=Math.min(L,this.preferredScaledWidth());e=Math.max(Math.min(e,t),1),this.#f.set(e)}setWidthAndScaleToFit(e){e=Math.max(Math.min(e,L),1),this.#m.set(this.calculateFitScale(e,this.#v.get())),this.#f.set(e)}setHeight(e){const t=Math.min(L,this.preferredScaledHeight());(e=Math.max(Math.min(e,t),0))===this.preferredScaledHeight()&&(e=0),this.#v.set(e)}setHeightAndScaleToFit(e){e=Math.max(Math.min(e,L),0),this.#m.set(this.calculateFitScale(this.#f.get(),e)),this.#v.set(e)}setScale(e){this.#m.set(e)}device(){return this.#z}mode(){return this.#I}type(){return this.#y}screenImage(){return this.#z&&this.#I?this.#z.modeImage(this.#I):""}outlineImage(){return this.#z&&this.#I&&this.#M.get()?this.#z.outlineImage(this.#I):""}outlineRect(){return this.#C||null}screenRect(){return this.#l}visiblePageRect(){return this.#r}scale(){return this.#b}fitScale(){return this.#A}appliedDeviceSize(){return this.#c}appliedDeviceScaleFactor(){return this.#u}appliedUserAgentType(){return this.#g}isFullHeight(){return!this.#v.get()}isMobile(){switch(this.#y){case k.Device:return!!this.#z&&this.#z.mobile();case k.None:return!1;case k.Responsive:return"Mobile"===this.#w.get()||"Mobile (no touch)"===this.#w.get()}return!1}enabledSetting(){return e.Settings.Settings.instance().createSetting("emulation.show-device-mode",!1)}scaleSetting(){return this.#m}uaSetting(){return this.#w}deviceScaleFactorSetting(){return this.#S}deviceOutlineSetting(){return this.#M}toolbarControlsEnabledSetting(){return this.#x}reset(){this.#S.set(0),this.#m.set(1),this.setWidth(400),this.setHeight(0),this.#w.set("Mobile")}modelAdded(e){if(e.target()===o.TargetManager.TargetManager.instance().primaryPageTarget()&&e.supportsDeviceEmulation()){if(this.#L=e,this.#T){const e=this.#T;this.#T=null,e()}const t=e.target().model(o.ResourceTreeModel.ResourceTreeModel);t&&(t.addEventListener(o.ResourceTreeModel.Events.FrameResized,this.onFrameChange,this),t.addEventListener(o.ResourceTreeModel.Events.FrameNavigated,this.onFrameChange,this))}else e.emulateTouch(this.#k,this.#P)}modelRemoved(e){this.#L===e&&(this.#L=null)}inspectedURL(){return this.#L?this.#L.target().inspectedURL():null}onFrameChange(){const e=this.#L?this.#L.overlayModel():null;e&&this.showHingeIfApplicable(e)}scaleSettingChanged(){this.calculateAndEmulate(!1)}widthSettingChanged(){this.calculateAndEmulate(!1)}heightSettingChanged(){this.calculateAndEmulate(!1)}uaSettingChanged(){this.calculateAndEmulate(!0)}deviceScaleFactorSettingChanged(){this.calculateAndEmulate(!1)}deviceOutlineSettingChanged(){this.calculateAndEmulate(!1)}preferredScaledWidth(){return Math.floor(this.#s.width/(this.#m.get()||1))}preferredScaledHeight(){return Math.floor(this.#s.height/(this.#m.get()||1))}currentOutline(){let e=new I(0,0,0,0);if(this.#y!==k.Device||!this.#z||!this.#I)return e;const t=this.#z.orientationByName(this.#I.orientation);return this.#M.get()&&(e=t.outlineInsets||e),e}currentInsets(){return this.#y===k.Device&&this.#I?this.#I.insets:new I(0,0,0,0)}getScreenOrientationType(){if(!this.#I)throw new Error("Mode required to get orientation type.");switch(this.#I.orientation){case g:case c:return"portraitPrimary";default:return"landscapePrimary"}}calculateAndEmulate(e){this.#L||(this.#T=this.calculateAndEmulate.bind(this,e));const t=this.isMobile(),i=this.#L?this.#L.overlayModel():null;if(i&&this.showHingeIfApplicable(i),this.#y===k.Device&&this.#z&&this.#I){const i=this.#z.orientationByName(this.#I.orientation),o=this.currentOutline(),n=this.currentInsets();this.#A=this.calculateFitScale(i.width,i.height,o,n),this.#g=t?this.#z.touch()?"Mobile":"Mobile (no touch)":this.#z.touch()?"Desktop (touch)":"Desktop",this.applyDeviceMetrics(new a.Geometry.Size(i.width,i.height),n,o,this.#m.get(),this.#z.deviceScaleFactor,t,this.getScreenOrientationType(),e,this.#p),this.applyUserAgent(this.#z.userAgent,this.#z.userAgentMetadata),this.applyTouch(this.#z.touch(),t)}else if(this.#y===k.None)this.#A=this.calculateFitScale(this.#h.width,this.#h.height),this.#g="Desktop",this.applyDeviceMetrics(this.#h,new I(0,0,0,0),new I(0,0,0,0),1,0,t,null,e),this.applyUserAgent("",null),this.applyTouch(!1,!1);else if(this.#y===k.Responsive){let i=this.#f.get();(!i||i>this.preferredScaledWidth())&&(i=this.preferredScaledWidth());let o=this.#v.get();(!o||o>this.preferredScaledHeight())&&(o=this.preferredScaledHeight());const n=t?N:0;this.#A=this.calculateFitScale(this.#f.get(),this.#v.get()),this.#g=this.#w.get(),this.applyDeviceMetrics(new a.Geometry.Size(i,o),new I(0,0,0,0),new I(0,0,0,0),this.#m.get(),this.#S.get()||n,t,o>=i?"portraitPrimary":"landscapePrimary",e),this.applyUserAgent(t?E:"",t?K:null),this.applyTouch("Desktop (touch)"===this.#w.get()||"Mobile"===this.#w.get(),"Mobile"===this.#w.get())}i&&i.setShowViewportSizeOnResize(this.#y===k.None),this.dispatchEventToListeners("Updated")}calculateFitScale(e,t,i,o){const a=i?i.left+i.right:0,n=i?i.top+i.bottom:0,l=o?o.left+o.right:0,r=o?o.top+o.bottom:0;let h=Math.min(e?this.#s.width/(e+a):1,t?this.#s.height/(t+n):1);h=Math.min(Math.floor(100*h),100);let s=h;for(;s>.7*h;){let i=!0;if(e&&(i=i&&Number.isInteger((e-l)*s/100)),t&&(i=i&&Number.isInteger((t-r)*s/100)),i)return s/100;s-=1}return h/100}setSizeAndScaleToFit(e,t){this.#m.set(this.calculateFitScale(e,t)),this.setWidth(e),this.setHeight(t)}applyUserAgent(e,t){o.NetworkManager.MultitargetNetworkManager.instance().setUserAgentOverride(e,t)}applyDeviceMetrics(e,t,i,o,a,n,l,r,h=!1){e.width=Math.max(1,Math.floor(e.width)),e.height=Math.max(1,Math.floor(e.height));let s=e.width-t.left-t.right,d=e.height-t.top-t.bottom;const c=t.left,u=t.top,g="landscapePrimary"===l?90:0;if(this.#c=e,this.#u=a||window.devicePixelRatio,this.#l=new A(Math.max(0,(this.#h.width-e.width*o)/2),i.top*o,e.width*o,e.height*o),this.#C=new A(this.#l.left-i.left*o,0,(i.left+e.width+i.right)*o,(i.top+e.height+i.bottom)*o),this.#r=new A(c*o,u*o,Math.min(s*o,this.#h.width-this.#l.left-c*o),Math.min(d*o,this.#h.height-this.#l.top-u*o)),this.#b=o,h||(1===o&&this.#h.width>=e.width&&this.#h.height>=e.height&&(s=0,d=0),this.#r.width===s*o&&this.#r.height===d*o&&Number.isInteger(s*o)&&Number.isInteger(d*o)&&(s=0,d=0)),this.#L)if(r&&this.#L.resetPageScaleFactor(),s||d||n||a||1!==o||l||h){const t={width:s,height:d,deviceScaleFactor:a,mobile:n,scale:o,screenWidth:e.width,screenHeight:e.height,positionX:c,positionY:u,dontSetVisibleSize:!0,displayFeature:void 0,devicePosture:void 0,screenOrientation:void 0},i=this.getDisplayFeature();i?(t.displayFeature=i,t.devicePosture={type:"folded"}):t.devicePosture={type:"continuous"},l&&(t.screenOrientation={type:l,angle:g}),this.#L.emulateDevice(t)}else this.#L.emulateDevice(null)}exitHingeMode(){const e=this.#L?this.#L.overlayModel():null;e&&e.showHingeForDualScreen(null)}webPlatformExperimentalFeaturesEnabled(){return this.#p}shouldReportDisplayFeature(){return this.#p}async captureScreenshot(e,t){const i=this.#L?this.#L.target().model(o.ScreenCaptureModel.ScreenCaptureModel):null;if(!i)return null;let a;a=t?"fromClip":e?"fullpage":"fromViewport";const n=this.#L?this.#L.overlayModel():null;n&&n.setShowViewportSizeOnResize(!1);const l=await i.captureScreenshot("png",100,a,t),r={width:0,height:0,deviceScaleFactor:0,mobile:!1};if(e&&this.#L){if(this.#z&&this.#I){const e=this.#z.orientationByName(this.#I.orientation);r.width=e.width,r.height=e.height;const t=this.getDisplayFeature();t&&(r.displayFeature=t)}else r.width=0,r.height=0;await this.#L.emulateDevice(r)}return this.calculateAndEmulate(!1),l}applyTouch(e,t){this.#k=e,this.#P=t;for(const i of o.TargetManager.TargetManager.instance().models(o.EmulationModel.EmulationModel))i.emulateTouch(e,t)}showHingeIfApplicable(e){const t=this.#z&&this.#I?this.#z.orientationByName(this.#I.orientation):null;t&&t.hinge?e.showHingeForDualScreen(t.hinge):e.showHingeForDualScreen(null)}getDisplayFeatureOrientation(){if(!this.#I)throw new Error("Mode required to get display feature orientation.");switch(this.#I.orientation){case g:case c:return"vertical";default:return"horizontal"}}getDisplayFeature(){if(!this.shouldReportDisplayFeature())return null;if(!this.#z||!this.#I||this.#I.orientation!==g&&this.#I.orientation!==u)return null;const e=this.#z.orientationByName(this.#I.orientation);if(!e||!e.hinge)return null;const t=e.hinge;return{orientation:this.getDisplayFeatureOrientation(),offset:this.#I.orientation===g?t.x:t.y,maskLength:this.#I.orientation===g?t.width:t.height}}}class I{left;top;right;bottom;constructor(e,t,i,o){this.left=e,this.top=t,this.right=i,this.bottom=o}isEqual(e){return null!==e&&this.left===e.left&&this.top===e.top&&this.right===e.right&&this.bottom===e.bottom}}class A{left;top;width;height;constructor(e,t,i,o){this.left=e,this.top=t,this.width=i,this.height=o}isEqual(e){return null!==e&&this.left===e.left&&this.top===e.top&&this.width===e.width&&this.height===e.height}scale(e){return new A(this.left*e,this.top*e,this.width*e,this.height*e)}relativeTo(e){return new A(this.left-e.left,this.top-e.top,this.width,this.height)}rebaseTo(e){return new A(this.left+e.left,this.top+e.top,this.width,this.height)}}var k;!function(e){e.None="None",e.Responsive="Responsive",e.Device="Device"}(k||(k={}));const P=50,L=9999,T=0,C=10,E=o.NetworkManager.MultitargetNetworkManager.patchUserAgentWithChromeVersion("Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36"),K={platform:"Android",platformVersion:"6.0",architecture:"",model:"Nexus 5",mobile:!0},N=2;var O=Object.freeze({__proto__:null,DeviceModeModel:z,Insets:I,Rect:A,get Type(){return k},MinDeviceSize:P,MaxDeviceSize:L,MinDeviceScaleFactor:T,MaxDeviceScaleFactor:C,MaxDeviceNameLength:50,defaultMobileScaleFactor:N});export{O as DeviceModeModel,w as EmulatedDevices};
@@ -0,0 +1 @@
1
+ import*as e from"../../core/sdk/sdk.js";import*as t from"../../ui/legacy/legacy.js";import*as n from"../../core/common/common.js";import*as s from"../../core/host/host.js";import*as i from"../../core/i18n/i18n.js";import*as r from"../../core/platform/platform.js";import*as o from"../../core/root/root.js";import*as a from"../logs/logs.js";import*as c from"../../ui/legacy/components/utils/utils.js";import*as d from"../../ui/legacy/theme_support/theme_support.js";import*as l from"../bindings/bindings.js";import*as u from"../har/har.js";import*as h from"../workspace/workspace.js";self.injectedExtensionAPI=function(e,t,n,s,i,r,o){const a=new Set(s),c=window.chrome||{};if(Object.getOwnPropertyDescriptor(c,"devtools"))return;let d=!1,l=!1;function u(e,t){this._type=e,this._listeners=[],this._customDispatch=t}function h(){this.onRequestFinished=new O("network-request-finished",(function(e){const t=e.arguments[1];t.__proto__=new C(e.arguments[0]),this._fire(t)})),y(this,"network","onFinished","onRequestFinished"),this.onNavigated=new O("inspected-url-changed")}function p(e){this._id=e}function m(){const e={elements:new q,sources:new M,network:new k};function t(t){return e[t]}for(const n in e)Object.defineProperty(this,n,{get:t.bind(null,n),enumerable:!0});this.applyStyleSheet=function(e){z.sendRequest({command:"applyStyleSheet",styleSheet:e})}}function g(e){this._id=e,e&&(this.onShown=new O("view-shown-"+e,(function(e){const t=e.arguments[0];"number"==typeof t?this._fire(window.parent.frames[t]):this._fire()})),this.onHidden=new O("view-hidden,"+e))}function f(e){g.call(this,null),this._hostPanelName=e,this.onSelectionChanged=new O("panel-objectSelected-"+e)}function w(){this._plugins=new Map}function b(){this._plugins=new Map}function R(){}function E(e){return function(...t){const n={__proto__:e.prototype};e.apply(n,t),function(e,t){for(const n in t){if("_"===n.charAt(0))continue;let s=null;for(let e=t;e&&!s;e=e.__proto__)s=Object.getOwnPropertyDescriptor(e,n);s&&("function"==typeof s.value?e[n]=s.value.bind(t):"function"==typeof s.get?e.__defineGetter__(n,s.get.bind(t)):Object.defineProperty(e,n,s))}}(this,n)}}function y(e,t,n,s){let i=!1;e.__defineGetter__(n,(function(){return i||(console.warn(t+"."+n+" is deprecated. Use "+t+"."+s+" instead"),i=!0),e[s]}))}function x(e){const t=e[e.length-1];return"function"==typeof t?t:void 0}u.prototype={addListener:function(e){if("function"!=typeof e)throw"addListener: callback is not a function";0===this._listeners.length&&z.sendRequest({command:"subscribe",type:this._type}),this._listeners.push(e),z.registerHandler("notify-"+this._type,this._dispatch.bind(this))},removeListener:function(e){const t=this._listeners;for(let n=0;n<t.length;++n)if(t[n]===e){t.splice(n,1);break}0===this._listeners.length&&z.sendRequest({command:"unsubscribe",type:this._type})},_fire:function(...e){const t=this._listeners.slice();for(let e=0;e<t.length;++e)t[e].apply(null,Array.from(arguments))},_dispatch:function(e){this._customDispatch?this._customDispatch.call(this,e):this._fire.apply(this,e.arguments)}},h.prototype={getHAR:function(e){z.sendRequest({command:"getHAR"},e&&function(t){const n=t,s=n&&n.entries||[];for(let e=0;e<s.length;++e)s[e].__proto__=new C(s[e]._requestId),delete s[e]._requestId;e&&e(n)})},addRequestHeaders:function(e){z.sendRequest({command:"addRequestHeaders",headers:e,extensionId:window.location.hostname})}},p.prototype={getContent:function(e){z.sendRequest({command:"getRequestContent",id:this._id},e&&function(t){const{content:n,encoding:s}=t;e&&e(n,s)})}},m.prototype={create:function(e,t,n,s){const i="extension-panel-"+z.nextObjectId();z.sendRequest({command:"createPanel",id:i,title:e,page:n},s&&(()=>s.call(this,new A(i))))},setOpenResourceHandler:function(e){const t=z.hasHandler("open-resource");e?z.registerHandler("open-resource",(function(t){d=!0;try{const{resource:n,lineNumber:s}=t;B(n)&&e.call(null,new H(n),s)}finally{d=!1}})):z.unregisterHandler("open-resource"),t===!e&&z.sendRequest({command:"setOpenResourceHandler",handlerPresent:Boolean(e)})},setThemeChangeHandler:function(e){const t=z.hasHandler("host-theme-change");e?z.registerHandler("host-theme-change",(function(t){const{themeName:n}=t;c.devtools.panels.themeName=n,e.call(null,n)})):z.unregisterHandler("host-theme-change"),t===!e&&z.sendRequest({command:"setThemeChangeHandler",handlerPresent:Boolean(e)})},openResource:function(e,t,n,s){const i=x(arguments),r="number"==typeof n?n:0;z.sendRequest({command:"openResource",url:e,lineNumber:t,columnNumber:r},i)},get SearchAction(){return{CancelSearch:"cancelSearch",PerformSearch:"performSearch",NextSearchResult:"nextSearchResult",PreviousSearchResult:"previousSearchResult"}}},f.prototype={createSidebarPane:function(e,t){const n="extension-sidebar-"+z.nextObjectId();z.sendRequest({command:"createSidebarPane",panel:this._hostPanelName,id:n,title:e},t&&function(){t&&t(new T(n))})},__proto__:g.prototype},w.prototype={registerRecorderExtensionPlugin:async function(e,t,n){if(this._plugins.has(e))throw new Error(`Tried to register plugin '${t}' twice`);const s=new MessageChannel,i=s.port1;this._plugins.set(e,i),i.onmessage=({data:t})=>{const{requestId:n}=t;(async function(t){switch(t.method){case"stringify":return e.stringify(t.parameters.recording);case"stringifyStep":return e.stringifyStep(t.parameters.step);case"replay":try{return d=!0,l=!0,e.replay(t.parameters.recording)}finally{d=!1,l=!1}default:throw new Error(`'${t.method}' is not recognized`)}})(t).then((e=>i.postMessage({requestId:n,result:e}))).catch((e=>i.postMessage({requestId:n,error:{message:e.message}})))};const r=[];"stringify"in e&&"stringifyStep"in e&&r.push("export"),"replay"in e&&r.push("replay"),await new Promise((e=>{z.sendRequest({command:"registerRecorderExtensionPlugin",pluginName:t,mediaType:n,capabilities:r,port:s.port2},(()=>e()),[s.port2])}))},unregisterRecorderExtensionPlugin:async function(e){const t=this._plugins.get(e);if(!t)throw new Error("Tried to unregister a plugin that was not previously registered");this._plugins.delete(e),t.postMessage({event:"unregisteredRecorderExtensionPlugin"}),t.close()},createView:async function(e,t){const n="recorder-extension-view-"+z.nextObjectId();return await new Promise((s=>{z.sendRequest({command:"createRecorderView",id:n,title:e,pagePath:t},s)})),new P(n)}},b.prototype={registerLanguageExtensionPlugin:async function(e,t,n){if(this._plugins.has(e))throw new Error(`Tried to register plugin '${t}' twice`);const s=new MessageChannel,i=s.port1;this._plugins.set(e,i),i.onmessage=({data:t})=>{const{requestId:n}=t;console.time(`${n}: ${t.method}`),function(t){switch(t.method){case"addRawModule":return e.addRawModule(t.parameters.rawModuleId,t.parameters.symbolsURL,t.parameters.rawModule);case"removeRawModule":return e.removeRawModule(t.parameters.rawModuleId);case"sourceLocationToRawLocation":return e.sourceLocationToRawLocation(t.parameters.sourceLocation);case"rawLocationToSourceLocation":return e.rawLocationToSourceLocation(t.parameters.rawLocation);case"getScopeInfo":return e.getScopeInfo(t.parameters.type);case"listVariablesInScope":return e.listVariablesInScope(t.parameters.rawLocation);case"getFunctionInfo":return e.getFunctionInfo(t.parameters.rawLocation);case"getInlinedFunctionRanges":return e.getInlinedFunctionRanges(t.parameters.rawLocation);case"getInlinedCalleesRanges":return e.getInlinedCalleesRanges(t.parameters.rawLocation);case"getMappedLines":return"getMappedLines"in e?e.getMappedLines(t.parameters.rawModuleId,t.parameters.sourceFileURL):Promise.resolve(void 0);case"formatValue":return"evaluate"in e&&e.evaluate?e.evaluate(t.parameters.expression,t.parameters.context,t.parameters.stopId):Promise.resolve(void 0);case"getProperties":if("getProperties"in e&&e.getProperties)return e.getProperties(t.parameters.objectId);if(!("evaluate"in e)||!e.evaluate)return Promise.resolve(void 0);break;case"releaseObject":if("releaseObject"in e&&e.releaseObject)return e.releaseObject(t.parameters.objectId)}throw new Error(`Unknown language plugin method ${t.method}`)}(t).then((e=>i.postMessage({requestId:n,result:e}))).catch((e=>i.postMessage({requestId:n,error:{message:e.message}}))).finally((()=>console.timeEnd(`${n}: ${t.method}`)))},await new Promise((e=>{z.sendRequest({command:"registerLanguageExtensionPlugin",pluginName:t,port:s.port2,supportedScriptTypes:n},(()=>e()),[s.port2])}))},unregisterLanguageExtensionPlugin:async function(e){const t=this._plugins.get(e);if(!t)throw new Error("Tried to unregister a plugin that was not previously registered");this._plugins.delete(e),t.postMessage({event:"unregisteredLanguageExtensionPlugin"}),t.close()},getWasmLinearMemory:async function(e,t,n){const s=await new Promise((s=>z.sendRequest({command:"getWasmLinearMemory",offset:e,length:t,stopId:n},s)));return Array.isArray(s)?new Uint8Array(s).buffer:new ArrayBuffer(0)},getWasmLocal:async function(e,t){return new Promise((n=>z.sendRequest({command:"getWasmLocal",local:e,stopId:t},n)))},getWasmGlobal:async function(e,t){return new Promise((n=>z.sendRequest({command:"getWasmGlobal",global:e,stopId:t},n)))},getWasmOp:async function(e,t){return new Promise((n=>z.sendRequest({command:"getWasmOp",op:e,stopId:t},n)))},reportResourceLoad:function(e,t){return new Promise((n=>z.sendRequest({command:"reportResourceLoad",extensionId:window.location.origin,resourceUrl:e,status:t},n)))}},R.prototype={show:function(e){return new Promise((t=>z.sendRequest({command:"showNetworkPanel",filter:e?.filter},(()=>t()))))}};const v=E(b),_=E(w),I=E((function(){this.onProfilingStarted=new O("profiling-started-",(function(){this._fire()})),this.onProfilingStopped=new O("profiling-stopped-",(function(){this._fire()}))})),S=E(U),O=E(u),A=E(N),P=E(j),T=E(D),L=E(f),C=E(p),H=E(F),k=E(R);class q extends L{constructor(){super("elements")}}class M extends L{constructor(){super("sources")}}function N(e){g.call(this,e),this.onSearch=new O("panel-search-"+e)}function j(e){g.call(this,e)}function D(e){g.call(this,e)}function U(e){this._id=e,this.onClicked=new O("button-clicked-"+e)}function B(t){try{return e.allowFileAccess||"file:"!==new URL(t.url).protocol}catch(e){return!1}}function W(){this.onResourceAdded=new O("resource-added",(function(e){const t=e.arguments[0];B(t)&&this._fire(new H(t))})),this.onResourceContentCommitted=new O("resource-content-committed",(function(e){const t=e.arguments[0];B(t)&&this._fire(new H(t),e.arguments[1])}))}function F(e){if(!B(e))throw new Error("Resource access not allowed");this._url=e.url,this._type=e.type}N.prototype={createStatusBarButton:function(e,t,n){const s="button-"+z.nextObjectId();return z.sendRequest({command:"createToolbarButton",panel:this._id,id:s,icon:e,tooltip:t,disabled:Boolean(n)}),new S(s)},show:function(){d&&z.sendRequest({command:"showPanel",id:this._id})},__proto__:g.prototype},j.prototype={show:function(){d&&l&&z.sendRequest({command:"showRecorderView",id:this._id})},__proto__:g.prototype},D.prototype={setHeight:function(e){z.sendRequest({command:"setSidebarHeight",id:this._id,height:e})},setExpression:function(e,t,n,s){z.sendRequest({command:"setSidebarContent",id:this._id,expression:e,rootTitle:t,evaluateOnPage:!0,evaluateOptions:"object"==typeof n?n:{}},x(arguments))},setObject:function(e,t,n){z.sendRequest({command:"setSidebarContent",id:this._id,expression:e,rootTitle:t},n)},setPage:function(e){z.sendRequest({command:"setSidebarPage",id:this._id,page:e})},__proto__:g.prototype},U.prototype={update:function(e,t,n){z.sendRequest({command:"updateButton",id:this._id,icon:e,tooltip:t,disabled:Boolean(n)})}},W.prototype={reload:function(e){let t=null;"object"==typeof e?t=e:"string"==typeof e&&(t={userAgent:e},console.warn("Passing userAgent as string parameter to inspectedWindow.reload() is deprecated. Use inspectedWindow.reload({ userAgent: value}) instead.")),z.sendRequest({command:"Reload",options:t})},eval:function(e,t){const n=x(arguments);return z.sendRequest({command:"evaluateOnInspectedPage",expression:e,evaluateOptions:"object"==typeof t?t:void 0},n&&function(e){const{isError:t,isException:s,value:i}=e;t||s?n&&n(void 0,e):n&&n(i)}),null},getResources:function(e){function t(e){return new H(e)}z.sendRequest({command:"getPageResources"},e&&function(n){e&&e(n.filter(B).map(t))})}},F.prototype={get url(){return this._url},get type(){return this._type},getContent:function(e){z.sendRequest({command:"getResourceContent",url:this._url},e&&function(t){const{content:n,encoding:s}=t;e&&e(n,s)})},setContent:function(e,t,n){z.sendRequest({command:"setResourceContent",url:this._url,content:e,commit:t},n)}};let V=[],G=null;function K(){G=null,z.sendRequest({command:"_forwardKeyboardEvent",entries:V}),V=[]}function $(e){this._callbacks={},this._handlers={},this._lastRequestId=0,this._lastObjectId=0,this.registerHandler("callback",this._onCallback.bind(this));const t=new MessageChannel;this._port=t.port1,this._port.addEventListener("message",this._onMessage.bind(this),!1),this._port.start(),e.postMessage("registerExtension","*",[t.port2])}document.addEventListener("keydown",(function(e){const t=document.activeElement;if(t){if(("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName||t.isContentEditable)&&!(e.ctrlKey||e.altKey||e.metaKey))return}let n=0;e.shiftKey&&(n|=1),e.ctrlKey&&(n|=2),e.altKey&&(n|=4),e.metaKey&&(n|=8);const s=255&e.keyCode|n<<8;if(!a.has(s))return;e.preventDefault();const i={eventType:e.type,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey,keyIdentifier:e.keyIdentifier,key:e.key,code:e.code,location:e.location,keyCode:e.keyCode};V.push(i),G||(G=window.setTimeout(K,0))}),!1),$.prototype={sendRequest:function(e,t,n){"function"==typeof t&&(e.requestId=this._registerCallback(t)),this._port.postMessage(e,n)},hasHandler:function(e){return Boolean(this._handlers[e])},registerHandler:function(e,t){this._handlers[e]=t},unregisterHandler:function(e){delete this._handlers[e]},nextObjectId:function(){return r.toString()+"_"+ ++this._lastObjectId},_registerCallback:function(e){const t=++this._lastRequestId;return this._callbacks[t]=e,t},_onCallback:function(e){if(e.requestId in this._callbacks){const t=this._callbacks[e.requestId];delete this._callbacks[e.requestId],t(e.result)}},_onMessage:function(e){const t=e.data,n=this._handlers[t.command];n&&n.call(this,t)}};const z=new $(o||window.parent),X=new function(){this.inspectedWindow=new W,this.panels=new m,this.network=new h,this.languageServices=new v,this.recorder=new _,this.performance=new I,y(this,"webInspector","resources","network")};if(Object.defineProperty(c,"devtools",{value:{},enumerable:!0}),c.devtools.inspectedWindow={},Object.defineProperty(c.devtools.inspectedWindow,"tabId",{get:function(){return t}}),c.devtools.inspectedWindow.__proto__=X.inspectedWindow,c.devtools.network=X.network,c.devtools.panels=X.panels,c.devtools.panels.themeName=n,c.devtools.languageServices=X.languageServices,c.devtools.recorder=X.recorder,c.devtools.performance=X.performance,!1!==e.exposeExperimentalAPIs){c.experimental=c.experimental||{},c.experimental.devtools=c.experimental.devtools||{};const e=Object.getOwnPropertyNames(X);for(let t=0;t<e.length;++t){const n=Object.getOwnPropertyDescriptor(X,e[t]);n&&Object.defineProperty(c.experimental.devtools,e[t],n)}c.experimental.devtools.inspectedWindow=c.devtools.inspectedWindow}e.exposeWebInspectorNamespace&&(window.webInspector=X),i(z,X)},self.buildExtensionAPIInjectedScript=function(e,t,n,s,i){const r=[e,t||null,n,s].map((e=>JSON.stringify(e))).join(",");return i||(i=()=>{}),"(function(injectedScriptId){ ("+self.injectedExtensionAPI.toString()+")("+r+","+i+", injectedScriptId);})"};var p=Object.freeze({__proto__:null});class m extends t.Widget.Widget{server;id;iframe;frameIndex;constructor(e,t,n,s){super(),this.setHideOnDetach(),this.element.className="vbox flex-auto",this.element.tabIndex=-1,this.server=e,this.id=t,this.iframe=document.createElement("iframe"),this.iframe.addEventListener("load",this.onLoad.bind(this),!1),this.iframe.src=n,this.iframe.className=s,this.setDefaultFocusedElement(this.element),this.element.appendChild(this.iframe)}wasShown(){super.wasShown(),"number"==typeof this.frameIndex&&this.server.notifyViewShown(this.id,this.frameIndex)}willHide(){"number"==typeof this.frameIndex&&this.server.notifyViewHidden(this.id)}onLoad(){const e=window.frames;this.frameIndex=Array.prototype.indexOf.call(e,this.iframe.contentWindow),this.isShowing()&&this.server.notifyViewShown(this.id,this.frameIndex)}}class g extends t.Widget.VBox{server;id;constructor(e,t){super(),this.server=e,this.id=t}wasShown(){this.server.notifyViewShown(this.id)}willHide(){this.server.notifyViewHidden(this.id)}}var f=Object.freeze({__proto__:null,ExtensionView:m,ExtensionNotifierView:g});class w extends t.Panel.Panel{server;id;panelToolbar;searchableViewInternal;constructor(e,n,s,i){super(n),this.server=e,this.id=s,this.setHideOnDetach(),this.panelToolbar=new t.Toolbar.Toolbar("hidden",this.element),this.searchableViewInternal=new t.SearchableView.SearchableView(this,null),this.searchableViewInternal.show(this.element);new m(e,this.id,i,"extension").show(this.searchableViewInternal.element)}addToolbarItem(e){this.panelToolbar.element.classList.remove("hidden"),this.panelToolbar.appendToolbarItem(e)}onSearchCanceled(){this.server.notifySearchAction(this.id,"cancelSearch"),this.searchableViewInternal.updateSearchMatchesCount(0)}searchableView(){return this.searchableViewInternal}performSearch(e,t,n){const s=e.query;this.server.notifySearchAction(this.id,"performSearch",s)}jumpToNextSearchResult(){this.server.notifySearchAction(this.id,"nextSearchResult")}jumpToPreviousSearchResult(){this.server.notifySearchAction(this.id,"previousSearchResult")}supportsCaseSensitiveSearch(){return!1}supportsRegexSearch(){return!1}}class b{id;toolbarButtonInternal;constructor(e,n,s,i,r){this.id=n,this.toolbarButtonInternal=new t.Toolbar.ToolbarButton("",""),this.toolbarButtonInternal.addEventListener("Click",e.notifyButtonClicked.bind(e,this.id)),this.update(s,i,r)}update(e,t,n){"string"==typeof e&&this.toolbarButtonInternal.setBackgroundImage(e),"string"==typeof t&&this.toolbarButtonInternal.setTitle(t),"boolean"==typeof n&&this.toolbarButtonInternal.setEnabled(!n)}toolbarButton(){return this.toolbarButtonInternal}}class R extends t.View.SimpleView{panelNameInternal;server;idInternal;extensionView;objectPropertiesView;constructor(e,t,n,s){super(n),this.element.classList.add("fill"),this.panelNameInternal=t,this.server=e,this.idInternal=s}id(){return this.idInternal}panelName(){return this.panelNameInternal}setObject(t,n,s){this.createObjectPropertiesView(),this.setObjectInternal(e.RemoteObject.RemoteObject.fromLocalObject(t),n,s)}setExpression(e,t,n,s,i){this.createObjectPropertiesView(),this.server.evaluate(e,!0,!1,n,s,this.onEvaluate.bind(this,t,i))}setPage(e){this.objectPropertiesView&&(this.objectPropertiesView.detach(),delete this.objectPropertiesView),this.extensionView&&this.extensionView.detach(!0),this.extensionView=new m(this.server,this.idInternal,e,"extension fill"),this.extensionView.show(this.element),this.element.style.height||this.setHeight("150px")}setHeight(e){this.element.style.height=e}onEvaluate(e,t,n,s,i){n?t(n.toString()):s?this.setObjectInternal(s,e,t):t()}createObjectPropertiesView(){this.objectPropertiesView||(this.extensionView&&(this.extensionView.detach(!0),delete this.extensionView),this.objectPropertiesView=new g(this.server,this.idInternal),this.objectPropertiesView.show(this.element))}setObjectInternal(e,n,s){const i=this.objectPropertiesView;i?(i.element.removeChildren(),t.UIUtils.Renderer.render(e,{title:n,editable:!1}).then((e=>{if(!e)return void s();const t=e.tree&&e.tree.firstChild();t&&t.expand(),i.element.appendChild(e.node),s()}))):s("operation cancelled")}}var E=Object.freeze({__proto__:null,ExtensionPanel:w,ExtensionButton:b,ExtensionSidebarPane:R});function y(e){switch(e){case"http":return"80";case"https":return"443";case"ftp":return"25"}}class x{pattern;static parse(e){if("<all_urls>"===e)return new x({matchesAll:!0});const t=function(e){const t=e.indexOf("://");if(t<0)return;const n=e.substr(0,t).toLowerCase();return["*","http","https","ftp","chrome","chrome-extension"].includes(n)?{scheme:n,hostPattern:e.substr(t+3)}:void 0}(e);if(!t)return;const{scheme:n,hostPattern:s}=t,i=function(e,t){const n=e.indexOf("/");if(n>=0){const t=e.substr(n);if("/*"!==t&&"/"!==t)return;e=e.substr(0,n)}if(e.endsWith(":*")&&(e=e.substr(0,e.length-2)),e.endsWith(":"))return;let s;try{s=new URL(e.startsWith("*.")?`http://${e.substr(2)}`:`http://${e}`)}catch{return}if("/"!==s.pathname)return;if(s.hostname.endsWith(".")&&(s.hostname=s.hostname.substr(0,s.hostname.length-1)),"%2A"!==s.hostname&&s.hostname.includes("%2A"))return;const i=y("http");if(!i)return;const r=e.endsWith(`:${i}`)?i:""===s.port?"*":s.port;if("*"!==r&&!["http","https","ftp"].includes(t))return;return{host:"%2A"!==s.hostname?e.startsWith("*.")?`*.${s.hostname}`:s.hostname:"*",port:r}}(s,n);if(!i)return;const{host:r,port:o}=i;return new x({scheme:n,host:r,port:o,matchesAll:!1})}constructor(e){this.pattern=e}get scheme(){return this.pattern.matchesAll?"*":this.pattern.scheme}get host(){return this.pattern.matchesAll?"*":this.pattern.host}get port(){return this.pattern.matchesAll?"*":this.pattern.port}matchesAllUrls(){return this.pattern.matchesAll}matchesUrl(e){let t;try{t=new URL(e)}catch{return!1}if(this.matchesAllUrls())return!0;const n=t.protocol.substr(0,t.protocol.length-1),s=t.port||y(n);return this.matchesScheme(n)&&this.matchesHost(t.hostname)&&(!s||this.matchesPort(s))}matchesScheme(e){return!!this.pattern.matchesAll||("*"===this.pattern.scheme?"http"===e||"https"===e:this.pattern.scheme===e)}matchesHost(e){if(this.pattern.matchesAll)return!0;if("*"===this.pattern.host)return!0;let t=new URL(`http://${e}`).hostname;return t.endsWith(".")&&(t=t.substr(0,t.length-1)),this.pattern.host.startsWith("*.")?t===this.pattern.host.substr(2)||t.endsWith(this.pattern.host.substr(1)):this.pattern.host===t}matchesPort(e){return!!this.pattern.matchesAll||("*"===this.pattern.port||this.pattern.port===e)}}var v=Object.freeze({__proto__:null,HostUrlPattern:x});class _{port;nextRequestId=0;pendingRequests;constructor(e){this.port=e,this.port.onmessage=this.onResponse.bind(this),this.pendingRequests=new Map}sendRequest(e,t){return new Promise(((n,s)=>{const i=this.nextRequestId++;this.pendingRequests.set(i,{resolve:n,reject:s}),this.port.postMessage({requestId:i,method:e,parameters:t})}))}disconnect(){for(const{reject:e}of this.pendingRequests.values())e(new Error("Extension endpoint disconnected"));this.pendingRequests.clear(),this.port.close()}onResponse({data:e}){if("event"in e)return void this.handleEvent(e);const{requestId:t,result:n,error:s}=e,i=this.pendingRequests.get(t);i?(this.pendingRequests.delete(t),s?i.reject(new Error(s.message)):i.resolve(n)):console.error(`No pending request ${t}`)}handleEvent(e){throw new Error("handleEvent is not implemented")}}class I extends _{plugin;constructor(e,t){super(t),this.plugin=e}handleEvent({event:e}){switch(e){case"unregisteredLanguageExtensionPlugin":{this.disconnect();const{pluginManager:e}=l.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance();e.removePlugin(this.plugin);break}}}}class S{supportedScriptTypes;endpoint;extensionOrigin;name;constructor(e,t,n,s){this.name=t,this.extensionOrigin=e,this.supportedScriptTypes=n,this.endpoint=new I(this,s)}handleScript(e){const t=e.scriptLanguage();return null!==t&&null!==e.debugSymbols&&t===this.supportedScriptTypes.language&&this.supportedScriptTypes.symbol_types.includes(e.debugSymbols.type)}createPageResourceLoadInitiator(){return{target:null,frameId:null,extensionId:this.extensionOrigin,initiatorUrl:this.extensionOrigin}}addRawModule(e,t,n){return this.endpoint.sendRequest("addRawModule",{rawModuleId:e,symbolsURL:t,rawModule:n})}removeRawModule(e){return this.endpoint.sendRequest("removeRawModule",{rawModuleId:e})}sourceLocationToRawLocation(e){return this.endpoint.sendRequest("sourceLocationToRawLocation",{sourceLocation:e})}rawLocationToSourceLocation(e){return this.endpoint.sendRequest("rawLocationToSourceLocation",{rawLocation:e})}getScopeInfo(e){return this.endpoint.sendRequest("getScopeInfo",{type:e})}listVariablesInScope(e){return this.endpoint.sendRequest("listVariablesInScope",{rawLocation:e})}getFunctionInfo(e){return this.endpoint.sendRequest("getFunctionInfo",{rawLocation:e})}getInlinedFunctionRanges(e){return this.endpoint.sendRequest("getInlinedFunctionRanges",{rawLocation:e})}getInlinedCalleesRanges(e){return this.endpoint.sendRequest("getInlinedCalleesRanges",{rawLocation:e})}async getMappedLines(e,t){return this.endpoint.sendRequest("getMappedLines",{rawModuleId:e,sourceFileURL:t})}async evaluate(e,t,n){return this.endpoint.sendRequest("formatValue",{expression:e,context:t,stopId:n})}getProperties(e){return this.endpoint.sendRequest("getProperties",{objectId:e})}releaseObject(e){return this.endpoint.sendRequest("releaseObject",{objectId:e})}}let O=null;class A extends n.ObjectWrapper.ObjectWrapper{#e=new Set;#t=new Map;static instance(){return O||(O=new A),O}addPlugin(e){this.#e.add(e),this.dispatchEventToListeners("pluginAdded",e)}removePlugin(e){this.#e.delete(e),this.dispatchEventToListeners("pluginRemoved",e)}plugins(){return Array.from(this.#e.values())}registerView(e){this.#t.set(e.id,e),this.dispatchEventToListeners("viewRegistered",e)}views(){return Array.from(this.#t.values())}getViewDescriptor(e){return this.#t.get(e)}showView(e){const t=this.#t.get(e);if(!t)throw new Error(`View with id ${e} is not found.`);this.dispatchEventToListeners("showViewRequested",t)}}var P=Object.freeze({__proto__:null,RecorderPluginManager:A});class T extends _{name;mediaType;capabilities;constructor(e,t,n,s){super(t),this.name=e,this.mediaType=s,this.capabilities=n}getName(){return this.name}getCapabilities(){return this.capabilities}getMediaType(){return this.mediaType}handleEvent({event:e}){if("unregisteredRecorderExtensionPlugin"!==e)throw new Error(`Unrecognized Recorder extension endpoint event: ${e}`);this.disconnect(),A.instance().removePlugin(this)}stringify(e){return this.sendRequest("stringify",{recording:e})}stringifyStep(e){return this.sendRequest("stringifyStep",{step:e})}replay(e){return this.sendRequest("replay",{recording:e})}}var L=Object.freeze({__proto__:null,RecorderExtensionEndpoint:T});const C=new WeakMap,H=[].map((e=>new URL(e).origin));let k;class q{runtimeAllowedHosts;runtimeBlockedHosts;static create(e){const t=[],n=[];if(e){for(const n of e.runtimeAllowedHosts){const e=x.parse(n);if(!e)return null;t.push(e)}for(const t of e.runtimeBlockedHosts){const e=x.parse(t);if(!e)return null;n.push(e)}}return new q(t,n)}constructor(e,t){this.runtimeAllowedHosts=e,this.runtimeBlockedHosts=t}isAllowedOnURL(e){return e?!(this.runtimeBlockedHosts.some((t=>t.matchesUrl(e)))&&!this.runtimeAllowedHosts.some((t=>t.matchesUrl(e)))):0===this.runtimeBlockedHosts.length}}class M{name;hostsPolicy;allowFileAccess;constructor(e,t,n){this.name=e,this.hostsPolicy=t,this.allowFileAccess=n}isAllowedOnTarget(t){if(t||(t=e.TargetManager.TargetManager.instance().primaryPageTarget()?.inspectedURL()),!t)return!1;if(!j.canInspectURL(t))return!1;if(!this.hostsPolicy.isAllowedOnURL(t))return!1;if(!this.allowFileAccess){let e;try{e=new URL(t)}catch(e){return!1}return"file:"!==e.protocol}return!0}}class N{filter;constructor(e){this.filter=e}}class j extends n.ObjectWrapper.ObjectWrapper{clientObjects;handlers;subscribers;subscriptionStartHandlers;subscriptionStopHandlers;extraHeaders;requests;requestIds;lastRequestId;registeredExtensions;status;sidebarPanesInternal;extensionsEnabled;inspectedTabId;extensionAPITestHook;themeChangeHandlers=new Map;#n=[];constructor(){super(),this.clientObjects=new Map,this.handlers=new Map,this.subscribers=new Map,this.subscriptionStartHandlers=new Map,this.subscriptionStopHandlers=new Map,this.extraHeaders=new Map,this.requests=new Map,this.requestIds=new Map,this.lastRequestId=0,this.registeredExtensions=new Map,this.status=new U,this.sidebarPanesInternal=[],this.extensionsEnabled=!0,this.registerHandler("addRequestHeaders",this.onAddRequestHeaders.bind(this)),this.registerHandler("applyStyleSheet",this.onApplyStyleSheet.bind(this)),this.registerHandler("createPanel",this.onCreatePanel.bind(this)),this.registerHandler("createSidebarPane",this.onCreateSidebarPane.bind(this)),this.registerHandler("createToolbarButton",this.onCreateToolbarButton.bind(this)),this.registerHandler("evaluateOnInspectedPage",this.onEvaluateOnInspectedPage.bind(this)),this.registerHandler("_forwardKeyboardEvent",this.onForwardKeyboardEvent.bind(this)),this.registerHandler("getHAR",this.onGetHAR.bind(this)),this.registerHandler("getPageResources",this.onGetPageResources.bind(this)),this.registerHandler("getRequestContent",this.onGetRequestContent.bind(this)),this.registerHandler("getResourceContent",this.onGetResourceContent.bind(this)),this.registerHandler("Reload",this.onReload.bind(this)),this.registerHandler("setOpenResourceHandler",this.onSetOpenResourceHandler.bind(this)),this.registerHandler("setThemeChangeHandler",this.onSetThemeChangeHandler.bind(this)),this.registerHandler("setResourceContent",this.onSetResourceContent.bind(this)),this.registerHandler("setSidebarHeight",this.onSetSidebarHeight.bind(this)),this.registerHandler("setSidebarContent",this.onSetSidebarContent.bind(this)),this.registerHandler("setSidebarPage",this.onSetSidebarPage.bind(this)),this.registerHandler("showPanel",this.onShowPanel.bind(this)),this.registerHandler("subscribe",this.onSubscribe.bind(this)),this.registerHandler("openResource",this.onOpenResource.bind(this)),this.registerHandler("unsubscribe",this.onUnsubscribe.bind(this)),this.registerHandler("updateButton",this.onUpdateButton.bind(this)),this.registerHandler("registerLanguageExtensionPlugin",this.registerLanguageExtensionEndpoint.bind(this)),this.registerHandler("getWasmLinearMemory",this.onGetWasmLinearMemory.bind(this)),this.registerHandler("getWasmGlobal",this.onGetWasmGlobal.bind(this)),this.registerHandler("getWasmLocal",this.onGetWasmLocal.bind(this)),this.registerHandler("getWasmOp",this.onGetWasmOp.bind(this)),this.registerHandler("registerRecorderExtensionPlugin",this.registerRecorderExtensionEndpoint.bind(this)),this.registerHandler("reportResourceLoad",this.onReportResourceLoad.bind(this)),this.registerHandler("createRecorderView",this.onCreateRecorderView.bind(this)),this.registerHandler("showRecorderView",this.onShowRecorderView.bind(this)),this.registerHandler("showNetworkPanel",this.onShowNetworkPanel.bind(this)),window.addEventListener("message",this.onWindowMessage,!1);const e=window.DevToolsAPI&&window.DevToolsAPI.getInspectedTabId&&window.DevToolsAPI.getInspectedTabId();e&&this.setInspectedTabId({data:e}),s.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(s.InspectorFrontendHostAPI.Events.SetInspectedTabId,this.setInspectedTabId,this),this.initExtensions(),d.ThemeSupport.instance().addEventListener(d.ThemeChangeEvent.eventName,this.#s)}get isEnabledForTest(){return this.extensionsEnabled}dispose(){d.ThemeSupport.instance().removeEventListener(d.ThemeChangeEvent.eventName,this.#s),e.TargetManager.TargetManager.instance().removeEventListener("InspectedURLChanged",this.inspectedURLChanged,this),s.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(s.InspectorFrontendHostAPI.Events.SetInspectedTabId,this.setInspectedTabId,this),window.removeEventListener("message",this.onWindowMessage,!1)}#s=()=>{const e=d.ThemeSupport.instance().themeName();for(const t of this.themeChangeHandlers.values())t.postMessage({command:"host-theme-change",themeName:e})};static instance(e={forceNew:null}){const{forceNew:t}=e;return k&&!t||(k?.dispose(),k=new j),k}initializeExtensions(){null!==this.inspectedTabId&&s.InspectorFrontendHost.InspectorFrontendHostInstance.setAddExtensionCallback(this.addExtension.bind(this))}hasExtensions(){return Boolean(this.registeredExtensions.size)}notifySearchAction(e,t,n){this.postNotification("panel-search-"+e,t,n)}notifyViewShown(e,t){this.postNotification("view-shown-"+e,t)}notifyViewHidden(e){this.postNotification("view-hidden,"+e)}notifyButtonClicked(e){this.postNotification("button-clicked-"+e)}profilingStarted(){this.postNotification("profiling-started-")}profilingStopped(){this.postNotification("profiling-stopped-")}registerLanguageExtensionEndpoint(e,t){if("registerLanguageExtensionPlugin"!==e.command)return this.status.E_BADARG("command","expected registerLanguageExtensionPlugin");const{pluginManager:n}=l.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),{pluginName:s,port:i,supportedScriptTypes:{language:r,symbol_types:o}}=e,a=Array.isArray(o)&&o.every((e=>"string"==typeof e))?o:[],c=this.getExtensionOrigin(t),d=new S(c,s,{language:r,symbol_types:a},i);return n.addPlugin(d),this.status.OK()}async loadWasmValue(e,t,n,s){const{pluginManager:i}=l.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),r=i.callFrameForStopId(s);if(!r)return this.status.E_BADARG("stopId","Unknown stop id");const o=await r.debuggerModel.agent.invoke_evaluateOnCallFrame({callFrameId:r.id,expression:n,silent:!0,returnByValue:!e,generatePreview:e,throwOnSideEffect:!0});return o.exceptionDetails||o.getError()?this.status.E_FAILED("Failed"):t(o.result)}async onGetWasmLinearMemory(e){return"getWasmLinearMemory"!==e.command?this.status.E_BADARG("command","expected getWasmLinearMemory"):await this.loadWasmValue(!1,(e=>e.value),`[].slice.call(new Uint8Array(memories[0].buffer, ${Number(e.offset)}, ${Number(e.length)}))`,e.stopId)}convertWasmValue(e,t){return n=>{if("undefined"===n.type)return;if("object"!==n.type||"wasmvalue"!==n.subtype)return this.status.E_FAILED("Bad object type");const s=n?.description,i=n.preview?.properties?.find((e=>"value"===e.name))?.value??"";switch(s){case"i32":case"f32":case"f64":return{type:s,value:Number(i)};case"i64":return{type:s,value:BigInt(i)};case"v128":return{type:s,value:i};default:return{type:"reftype",valueClass:e,index:t}}}}async onGetWasmGlobal(e){if("getWasmGlobal"!==e.command)return this.status.E_BADARG("command","expected getWasmGlobal");const t=Number(e.global);return await this.loadWasmValue(!0,this.convertWasmValue("global",t),`globals[${t}]`,e.stopId)??this.status.E_BADARG("global",`No global with index ${t}`)}async onGetWasmLocal(e){if("getWasmLocal"!==e.command)return this.status.E_BADARG("command","expected getWasmLocal");const t=Number(e.local);return await this.loadWasmValue(!0,this.convertWasmValue("local",t),`locals[${t}]`,e.stopId)??this.status.E_BADARG("local",`No local with index ${t}`)}async onGetWasmOp(e){if("getWasmOp"!==e.command)return this.status.E_BADARG("command","expected getWasmOp");const t=Number(e.op);return await this.loadWasmValue(!0,this.convertWasmValue("operand",t),`stack[${t}]`,e.stopId)??this.status.E_BADARG("op",`No operand with index ${t}`)}registerRecorderExtensionEndpoint(e,t){if("registerRecorderExtensionPlugin"!==e.command)return this.status.E_BADARG("command","expected registerRecorderExtensionPlugin");const{pluginName:n,mediaType:s,port:i,capabilities:r}=e;return A.instance().addPlugin(new T(n,i,r,s)),this.status.OK()}onReportResourceLoad(t){if("reportResourceLoad"!==t.command)return this.status.E_BADARG("command","expected reportResourceLoad");const{resourceUrl:n,extensionId:s,status:i}=t,r={url:n,initiator:{target:null,frameId:null,initiatorUrl:s,extensionId:s},errorMessage:i.errorMessage,success:i.success??null,size:i.size??null};return e.PageResourceLoader.PageResourceLoader.instance().resourceLoadedThroughExtension(r),this.status.OK()}onShowRecorderView(e){if("showRecorderView"!==e.command)return this.status.E_BADARG("command","expected showRecorderView");A.instance().showView(e.id)}onShowNetworkPanel(e){return"showNetworkPanel"!==e.command?this.status.E_BADARG("command","expected showNetworkPanel"):(n.Revealer.reveal(new N(e.filter)),this.status.OK())}onCreateRecorderView(e,t){if("createRecorderView"!==e.command)return this.status.E_BADARG("command","expected createRecorderView");const n=e.id;if(this.clientObjects.has(n))return this.status.E_EXISTS(n);const s=j.expandResourcePath(this.getExtensionOrigin(t),e.pagePath);if(void 0===s)return this.status.E_BADARG("pagePath","Resources paths cannot point to non-extension resources");return A.instance().registerView({id:n,pagePath:s,title:e.title,onShown:()=>this.notifyViewShown(n),onHidden:()=>this.notifyViewHidden(n)}),this.status.OK()}inspectedURLChanged(t){if(!j.canInspectURL(t.data.inspectedURL()))return void this.disableExtensions();if(t.data!==e.TargetManager.TargetManager.instance().primaryPageTarget())return;this.requests=new Map,this.enableExtensions();const n=t.data.inspectedURL();this.postNotification("inspected-url-changed",n);this.#n.splice(0).forEach((e=>this.addExtension(e)))}hasSubscribers(e){return this.subscribers.has(e)}isNotificationAllowedForExtension(e,t,...n){if("network-request-finished"===t){const t=n[1],s=C.get(e),i=s&&this.registeredExtensions.get(s);return!!i?.isAllowedOnTarget(t.request.url)}return!0}postNotification(e,...t){if(!this.extensionsEnabled)return;const n=this.subscribers.get(e);if(!n)return;const s={command:"notify-"+e,arguments:Array.prototype.slice.call(arguments,1)};for(const i of n)this.extensionEnabled(i)&&this.isNotificationAllowedForExtension(i,e,...t)&&i.postMessage(s)}onSubscribe(e,t){if("subscribe"!==e.command)return this.status.E_BADARG("command","expected subscribe");const n=this.subscribers.get(e.type);if(n)n.add(t);else{this.subscribers.set(e.type,new Set([t]));const n=this.subscriptionStartHandlers.get(e.type);n&&n()}}onUnsubscribe(e,t){if("unsubscribe"!==e.command)return this.status.E_BADARG("command","expected unsubscribe");const n=this.subscribers.get(e.type);if(n&&(n.delete(t),!n.size)){this.subscribers.delete(e.type);const t=this.subscriptionStopHandlers.get(e.type);t&&t()}}onAddRequestHeaders(t){if("addRequestHeaders"!==t.command)return this.status.E_BADARG("command","expected addRequestHeaders");const n=t.extensionId;if("string"!=typeof n)return this.status.E_BADARGTYPE("extensionId",typeof n,"string");let s=this.extraHeaders.get(n);s||(s=new Map,this.extraHeaders.set(n,s));for(const e in t.headers)s.set(e,t.headers[e]);const i={};for(const e of this.extraHeaders.values())for(const[t,n]of e)"__proto__"!==t&&"string"==typeof n&&(i[t]=n);e.NetworkManager.MultitargetNetworkManager.instance().setExtraHTTPHeaders(i)}onApplyStyleSheet(e){if("applyStyleSheet"!==e.command)return this.status.E_BADARG("command","expected applyStyleSheet");if(!o.Runtime.experiments.isEnabled("apply-custom-stylesheet"))return;const t=document.createElement("style");t.textContent=e.styleSheet,document.head.appendChild(t),d.ThemeSupport.instance().addCustomStylesheet(e.styleSheet);for(let e=document.body;e;e=e.traverseNextNode(document.body))e instanceof ShadowRoot&&d.ThemeSupport.instance().injectCustomStyleSheets(e)}getExtensionOrigin(e){const t=C.get(e);if(!t)throw new Error("Received a message from an unregistered extension");return t}onCreatePanel(e,n){if("createPanel"!==e.command)return this.status.E_BADARG("command","expected createPanel");const s=e.id;if(this.clientObjects.has(s)||t.InspectorView.InspectorView.instance().hasPanel(s))return this.status.E_EXISTS(s);const r=j.expandResourcePath(this.getExtensionOrigin(n),e.page);if(void 0===r)return this.status.E_BADARG("page","Resources paths cannot point to non-extension resources");let o=this.getExtensionOrigin(n)+e.title;o=o.replace(/\s|:\d+/g,"");const a=new D(o,i.i18n.lockedString(e.title),new w(this,o,s,r));return this.clientObjects.set(s,a),t.InspectorView.InspectorView.instance().addPanel(a),this.status.OK()}onShowPanel(e){if("showPanel"!==e.command)return this.status.E_BADARG("command","expected showPanel");let n=e.id;const s=this.clientObjects.get(e.id);s&&s instanceof D&&(n=s.viewId()),t.InspectorView.InspectorView.instance().showPanel(n)}onCreateToolbarButton(e,t){if("createToolbarButton"!==e.command)return this.status.E_BADARG("command","expected createToolbarButton");const n=this.clientObjects.get(e.panel);if(!(n&&n instanceof D))return this.status.E_NOTFOUND(e.panel);const s=j.expandResourcePath(this.getExtensionOrigin(t),e.icon);if(void 0===s)return this.status.E_BADARG("icon","Resources paths cannot point to non-extension resources");const i=new b(this,e.id,s,e.tooltip,e.disabled);return this.clientObjects.set(e.id,i),n.widget().then((function(e){e.addToolbarItem(i.toolbarButton())})),this.status.OK()}onUpdateButton(e,t){if("updateButton"!==e.command)return this.status.E_BADARG("command","expected updateButton");const n=this.clientObjects.get(e.id);if(!(n&&n instanceof b))return this.status.E_NOTFOUND(e.id);const s=e.icon&&j.expandResourcePath(this.getExtensionOrigin(t),e.icon);return e.icon&&void 0===s?this.status.E_BADARG("icon","Resources paths cannot point to non-extension resources"):(n.update(s,e.tooltip,e.disabled),this.status.OK())}onCreateSidebarPane(e){if("createSidebarPane"!==e.command)return this.status.E_BADARG("command","expected createSidebarPane");const t=e.id,n=new R(this,e.panel,i.i18n.lockedString(e.title),t);return this.sidebarPanesInternal.push(n),this.clientObjects.set(t,n),this.dispatchEventToListeners("SidebarPaneAdded",n),this.status.OK()}sidebarPanes(){return this.sidebarPanesInternal}onSetSidebarHeight(e){if("setSidebarHeight"!==e.command)return this.status.E_BADARG("command","expected setSidebarHeight");const t=this.clientObjects.get(e.id);return t&&t instanceof R?(t.setHeight(e.height),this.status.OK()):this.status.E_NOTFOUND(e.id)}onSetSidebarContent(e,t){if("setSidebarContent"!==e.command)return this.status.E_BADARG("command","expected setSidebarContent");const{requestId:n,id:s,rootTitle:i,expression:r,evaluateOptions:o,evaluateOnPage:a}=e,c=this.clientObjects.get(s);if(!(c&&c instanceof R))return this.status.E_NOTFOUND(e.id);function d(e){const s=e?this.status.E_FAILED(e):this.status.OK();this.dispatchCallback(n,t,s)}a?c.setExpression(r,i,o,this.getExtensionOrigin(t),d.bind(this)):c.setObject(e.expression,e.rootTitle,d.bind(this))}onSetSidebarPage(e,t){if("setSidebarPage"!==e.command)return this.status.E_BADARG("command","expected setSidebarPage");const n=this.clientObjects.get(e.id);if(!(n&&n instanceof R))return this.status.E_NOTFOUND(e.id);const s=j.expandResourcePath(this.getExtensionOrigin(t),e.page);if(void 0===s)return this.status.E_BADARG("page","Resources paths cannot point to non-extension resources");n.setPage(s)}onOpenResource(e){if("openResource"!==e.command)return this.status.E_BADARG("command","expected openResource");const t=h.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(e.url);if(t)return n.Revealer.reveal(t.uiLocation(e.lineNumber,e.columnNumber)),this.status.OK();const s=l.ResourceUtils.resourceForURL(e.url);if(s)return n.Revealer.reveal(s),this.status.OK();const i=a.NetworkLog.NetworkLog.instance().requestForURL(e.url);return i?(n.Revealer.reveal(i),this.status.OK()):this.status.E_NOTFOUND(e.url)}onSetOpenResourceHandler(e,t){if("setOpenResourceHandler"!==e.command)return this.status.E_BADARG("command","expected setOpenResourceHandler");const n=this.registeredExtensions.get(this.getExtensionOrigin(t));if(!n)throw new Error("Received a message from an unregistered extension");const{name:s}=n;e.handlerPresent?c.Linkifier.Linkifier.registerLinkHandler(s,this.handleOpenURL.bind(this,t)):c.Linkifier.Linkifier.unregisterLinkHandler(s)}onSetThemeChangeHandler(e,t){if("setThemeChangeHandler"!==e.command)return this.status.E_BADARG("command","expected setThemeChangeHandler");const n=this.getExtensionOrigin(t);if(!this.registeredExtensions.get(n))throw new Error("Received a message from an unregistered extension");e.handlerPresent?this.themeChangeHandlers.set(n,t):this.themeChangeHandlers.delete(n)}handleOpenURL(e,t,n){e.postMessage({command:"open-resource",resource:this.makeResource(t),lineNumber:n+1})}extensionAllowedOnURL(e,t){const n=C.get(t),s=n&&this.registeredExtensions.get(n);return Boolean(s?.isAllowedOnTarget(e))}extensionAllowedOnTarget(e,t){return this.extensionAllowedOnURL(e.inspectedURL(),t)}onReload(t,n){if("Reload"!==t.command)return this.status.E_BADARG("command","expected Reload");const s=t.options||{};let i;e.NetworkManager.MultitargetNetworkManager.instance().setUserAgentOverride("string"==typeof s.userAgent?s.userAgent:"",null),s.injectedScript&&(i="(function(){"+s.injectedScript+"})()");const r=e.TargetManager.TargetManager.instance().primaryPageTarget();if(!r)return this.status.OK();const o=r.model(e.ResourceTreeModel.ResourceTreeModel);return this.extensionAllowedOnTarget(r,n)?(o?.reloadPage(Boolean(s.ignoreCache),i),this.status.OK()):this.status.E_FAILED("Permission denied")}onEvaluateOnInspectedPage(e,t){if("evaluateOnInspectedPage"!==e.command)return this.status.E_BADARG("command","expected evaluateOnInspectedPage");const{requestId:n,expression:s,evaluateOptions:i}=e;return this.evaluate(s,!0,!0,i,this.getExtensionOrigin(t),function(e,s,i){let r;r=e||!s?this.status.E_PROTOCOLERROR(e?.toString()):i?{isException:!0,value:s.description}:{value:s.value},this.dispatchCallback(n,t,r)}.bind(this))}async onGetHAR(e,t){if("getHAR"!==e.command)return this.status.E_BADARG("command","expected getHAR");const n=a.NetworkLog.NetworkLog.instance().requests().filter((e=>this.extensionAllowedOnURL(e.url(),t))),s=await u.Log.Log.build(n);for(let e=0;e<s.entries.length;++e)s.entries[e]._requestId=this.requestId(n[e]);return s}makeResource(e){return{url:e.contentURL(),type:e.contentType().name()}}onGetPageResources(t,n){const s=new Map;function i(e){return s.has(e.contentURL())||s.set(e.contentURL(),this.makeResource(e)),!1}let r=h.Workspace.WorkspaceImpl.instance().uiSourceCodesForProjectType(h.Workspace.projectTypes.Network);r=r.concat(h.Workspace.WorkspaceImpl.instance().uiSourceCodesForProjectType(h.Workspace.projectTypes.ContentScripts)),r.forEach(i.bind(this));for(const t of e.TargetManager.TargetManager.instance().models(e.ResourceTreeModel.ResourceTreeModel))this.extensionAllowedOnTarget(t.target(),n)&&t.forAllResources(i.bind(this));return[...s.values()]}async getResourceContent(e,t,n){if(!this.extensionAllowedOnURL(e.contentURL(),n))return void this.dispatchCallback(t.requestId,n,this.status.E_FAILED("Permission denied"));const{content:s,isEncoded:i}=await e.requestContent();this.dispatchCallback(t.requestId,n,{encoding:i?"base64":"",content:s})}onGetRequestContent(e,t){if("getRequestContent"!==e.command)return this.status.E_BADARG("command","expected getRequestContent");const n=this.requestById(e.id);if(!n)return this.status.E_NOTFOUND(e.id);this.getResourceContent(n,e,t)}onGetResourceContent(e,t){if("getResourceContent"!==e.command)return this.status.E_BADARG("command","expected getResourceContent");const n=e.url,s=h.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(n)||l.ResourceUtils.resourceForURL(n);if(!s)return this.status.E_NOTFOUND(n);this.getResourceContent(s,e,t)}onSetResourceContent(t,n){if("setResourceContent"!==t.command)return this.status.E_BADARG("command","expected setResourceContent");const{url:s,requestId:i,content:r,commit:o}=t;if(!this.extensionAllowedOnURL(s,n))return this.status.E_FAILED("Permission denied");const a=h.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(s);if(!a||!a.contentType().isDocumentOrScriptOrStyleSheet()){return e.ResourceTreeModel.ResourceTreeModel.resourceForURL(s)?this.status.E_NOTSUPPORTED("Resource is not editable"):this.status.E_NOTFOUND(s)}a.setWorkingCopy(r),o&&a.commitWorkingCopy(),function(e){const t=e?this.status.E_FAILED(e):this.status.OK();this.dispatchCallback(i,n,t)}.call(this,null)}requestId(e){const t=this.requestIds.get(e);if(void 0===t){const t=++this.lastRequestId;return this.requestIds.set(e,t),this.requests.set(t,e),t}return t}requestById(e){return this.requests.get(e)}onForwardKeyboardEvent(e){if("_forwardKeyboardEvent"!==e.command)return this.status.E_BADARG("command","expected _forwardKeyboardEvent");e.entries.forEach((function(e){const t=new window.KeyboardEvent(e.eventType,{key:e.key,code:e.code,keyCode:e.keyCode,location:e.location,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey});t.__keyCode=function(e){let t=e.keyCode;t||e.key===r.KeyboardUtilities.ESCAPE_KEY&&(t=27);return t||0}(e),document.dispatchEvent(t)}))}dispatchCallback(e,t,n){e&&t.postMessage({command:"callback",requestId:e,result:n})}initExtensions(){this.registerAutosubscriptionHandler("resource-added",h.Workspace.WorkspaceImpl.instance(),h.Workspace.Events.UISourceCodeAdded,this.notifyResourceAdded),this.registerAutosubscriptionTargetManagerHandler("network-request-finished",e.NetworkManager.NetworkManager,e.NetworkManager.Events.RequestFinished,this.notifyRequestFinished),this.registerSubscriptionHandler("panel-objectSelected-elements",function(){t.Context.Context.instance().addFlavorChangeListener(e.DOMModel.DOMNode,this.notifyElementsSelectionChanged,this)}.bind(this),function(){t.Context.Context.instance().removeFlavorChangeListener(e.DOMModel.DOMNode,this.notifyElementsSelectionChanged,this)}.bind(this)),this.registerResourceContentCommittedHandler(this.notifyUISourceCodeContentCommitted),e.TargetManager.TargetManager.instance().addEventListener("InspectedURLChanged",this.inspectedURLChanged,this)}notifyResourceAdded(e){const t=e.data;this.postNotification("resource-added",this.makeResource(t))}notifyUISourceCodeContentCommitted(e){const{uiSourceCode:t,content:n}=e.data;this.postNotification("resource-content-committed",this.makeResource(t),n)}async notifyRequestFinished(e){const t=e.data,n=await u.Log.Entry.build(t);this.postNotification("network-request-finished",this.requestId(t),n)}notifyElementsSelectionChanged(){this.postNotification("panel-objectSelected-elements")}sourceSelectionChanged(e,t){this.postNotification("panel-objectSelected-sources",{startLine:t.startLine,startColumn:t.startColumn,endLine:t.endLine,endColumn:t.endColumn,url:e})}setInspectedTabId(e){const t=this.inspectedTabId;this.inspectedTabId=e.data,null===t&&this.initializeExtensions()}addExtensionFrame({startPage:e,name:t}){const n=document.createElement("iframe");n.src=e,n.dataset.devtoolsExtension=t,n.style.display="none",document.body.appendChild(n)}addExtension(n){const i=n.startPage,r=e.TargetManager.TargetManager.instance().primaryPageTarget()?.inspectedURL()??"";if(""===r)return void this.#n.push(n);if(j.canInspectURL(r)||this.disableExtensions(),!this.extensionsEnabled)return void this.#n.push(n);const o=q.create(n.hostsPolicy);if(o){try{const e=new URL(i).origin,a=n.name||`Extension ${e}`,c=new M(a,o,Boolean(n.allowFileAccess));if(!c.isAllowedOnTarget(r))return void this.#n.push(n);if(!this.registeredExtensions.get(e)){const i=self.buildExtensionAPIInjectedScript(n,this.inspectedTabId,d.ThemeSupport.instance().themeName(),t.ShortcutRegistry.ShortcutRegistry.instance().globalShortcutKeys(),j.instance().extensionAPITestHook);s.InspectorFrontendHost.InspectorFrontendHostInstance.setInjectedScriptForOrigin(e,i),this.registeredExtensions.set(e,c)}this.addExtensionFrame(n)}catch(e){return console.error("Failed to initialize extension "+i+":"+e),!1}return!0}}registerExtension(e,t){this.registeredExtensions.has(e)?(C.set(t,e),t.addEventListener("message",this.onmessage.bind(this),!1),t.start()):e!==window.location.origin&&console.error("Ignoring unauthorized client request from "+e)}onWindowMessage=e=>{"registerExtension"===e.data&&this.registerExtension(e.origin,e.ports[0])};extensionEnabled(e){if(!this.extensionsEnabled)return!1;const t=C.get(e);if(!t)return!1;const n=this.registeredExtensions.get(t);return!!n&&n.isAllowedOnTarget()}async onmessage(e){const t=e.data;let n;const s=e.currentTarget,i=this.handlers.get(t.command);n=i?this.extensionEnabled(s)?await i(t,e.target):this.status.E_FAILED("Permission denied"):this.status.E_NOTSUPPORTED(t.command),n&&t.requestId&&this.dispatchCallback(t.requestId,e.target,n)}registerHandler(e,t){console.assert(Boolean(e)),this.handlers.set(e,t)}registerSubscriptionHandler(e,t,n){this.subscriptionStartHandlers.set(e,t),this.subscriptionStopHandlers.set(e,n)}registerAutosubscriptionHandler(e,t,n,s){this.registerSubscriptionHandler(e,(()=>t.addEventListener(n,s,this)),(()=>t.removeEventListener(n,s,this)))}registerAutosubscriptionTargetManagerHandler(t,n,s,i){this.registerSubscriptionHandler(t,(()=>e.TargetManager.TargetManager.instance().addModelListener(n,s,i,this)),(()=>e.TargetManager.TargetManager.instance().removeModelListener(n,s,i,this)))}registerResourceContentCommittedHandler(e){this.registerSubscriptionHandler("resource-content-committed",function(){h.Workspace.WorkspaceImpl.instance().addEventListener(h.Workspace.Events.WorkingCopyCommittedByUser,e,this),h.Workspace.WorkspaceImpl.instance().setHasResourceContentTrackingExtensions(!0)}.bind(this),function(){h.Workspace.WorkspaceImpl.instance().setHasResourceContentTrackingExtensions(!1),h.Workspace.WorkspaceImpl.instance().removeEventListener(h.Workspace.Events.WorkingCopyCommittedByUser,e,this)}.bind(this))}static expandResourcePath(e,t){const s=new URL(e).origin,i=new URL(n.ParsedURL.normalizePath(t),s);if(i.origin===s)return i.href}evaluate(t,n,s,i,r,o){let a,c;if((i=i||{}).frameURL)c=function(t){let n=null;return e.ResourceTreeModel.ResourceTreeModel.frames().some((function(e){return n=e.url===t?e:null,n})),n}(i.frameURL);else{const t=e.TargetManager.TargetManager.instance().primaryPageTarget(),n=t&&t.model(e.ResourceTreeModel.ResourceTreeModel);c=n&&n.mainFrame}if(!c)return i.frameURL?console.warn("evaluate: there is no frame with URL "+i.frameURL):console.warn("evaluate: the main frame is not yet available"),this.status.E_NOTFOUND(i.frameURL||"<top>");const d=this.registeredExtensions.get(r);if(!d?.isAllowedOnTarget(c.url))return this.status.E_FAILED("Permission denied");let l;i.useContentScriptContext?l=r:i.scriptExecutionContext&&(l=i.scriptExecutionContext);const u=c.resourceTreeModel().target().model(e.RuntimeModel.RuntimeModel),h=u?u.executionContexts():[];if(l){for(let e=0;e<h.length;++e){const t=h[e];t.frameId!==c.id||t.origin!==l||t.isDefault||(a=t)}if(!a)return console.warn("The JavaScript context "+l+" was not found in the frame "+c.url),this.status.E_NOTFOUND(l)}else{for(let e=0;e<h.length;++e){const t=h[e];t.frameId===c.id&&t.isDefault&&(a=t)}if(!a)return this.status.E_FAILED(c.url+" has no execution context")}if(!d?.isAllowedOnTarget(a.origin))return this.status.E_FAILED("Permission denied");a.evaluate({expression:t,objectGroup:"extension",includeCommandLineAPI:n,silent:!0,returnByValue:s,generatePreview:!1},!1,!1).then((function(e){if("error"in e)return void o(e.error,null,!1);o(null,e.object||null,Boolean(e.exceptionDetails))}))}static canInspectURL(e){let t;try{t=new URL(e)}catch(e){return!1}return!!H.includes(t.origin)||"chrome:"!==t.protocol&&"devtools:"!==t.protocol&&"chrome-untrusted:"!==t.protocol&&"chrome-error:"!==t.protocol&&"chrome-search:"!==t.protocol&&(!(t.protocol.startsWith("http")&&t.hostname.match(/^chrome\.google\.com\.?$/)&&t.pathname.startsWith("/webstore"))&&((!t.protocol.startsWith("http")||!t.hostname.match(/^chromewebstore\.google\.com\.?$/))&&!(window.DevToolsAPI&&window.DevToolsAPI.getOriginsForbiddenForExtensions&&window.DevToolsAPI.getOriginsForbiddenForExtensions()||[]).includes(t.origin)))}disableExtensions(){this.extensionsEnabled=!1}enableExtensions(){this.extensionsEnabled=!0}}class D extends t.View.SimpleView{name;panel;constructor(e,t,n){super(t),this.name=e,this.panel=n}viewId(){return this.name}widget(){return Promise.resolve(this.panel)}}class U{OK;E_EXISTS;E_BADARG;E_BADARGTYPE;E_NOTFOUND;E_NOTSUPPORTED;E_PROTOCOLERROR;E_FAILED;constructor(){function e(e,t,...n){const s={code:e,description:t,details:n};return"OK"!==e&&(s.isError=!0,console.error("Extension server error: "+r.StringUtilities.sprintf(t,...n))),s}this.OK=e.bind(null,"OK","OK"),this.E_EXISTS=e.bind(null,"E_EXISTS","Object already exists: %s"),this.E_BADARG=e.bind(null,"E_BADARG","Invalid argument %s: %s"),this.E_BADARGTYPE=e.bind(null,"E_BADARGTYPE","Invalid type for argument %s: got %s, expected %s"),this.E_NOTFOUND=e.bind(null,"E_NOTFOUND","Object not found: %s"),this.E_NOTSUPPORTED=e.bind(null,"E_NOTSUPPORTED","Object does not support requested operation: %s"),this.E_PROTOCOLERROR=e.bind(null,"E_PROTOCOLERROR","Inspector protocol error: %s"),this.E_FAILED=e.bind(null,"E_FAILED","Operation failed: %s")}}var B=Object.freeze({__proto__:null,HostsPolicy:q,RevealableNetworkRequestFilter:N,ExtensionServer:j,ExtensionStatus:U});export{p as ExtensionAPI,E as ExtensionPanel,B as ExtensionServer,f as ExtensionView,v as HostUrlPattern,L as RecorderExtensionEndpoint,P as RecorderPluginManager};