@react-native/debugger-frontend 0.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (656) hide show
  1. package/BUILD_INFO +10 -0
  2. package/README.md +22 -0
  3. package/dist/third-party/LICENSE +28 -0
  4. package/dist/third-party/front_end/Images/3d-center.svg +1 -0
  5. package/dist/third-party/front_end/Images/3d-pan.svg +1 -0
  6. package/dist/third-party/front_end/Images/3d-rotate.svg +1 -0
  7. package/dist/third-party/front_end/Images/Images.js +223 -0
  8. package/dist/third-party/front_end/Images/accelerometer-back.svg +1 -0
  9. package/dist/third-party/front_end/Images/accelerometer-bottom.png +0 -0
  10. package/dist/third-party/front_end/Images/accelerometer-front.svg +1 -0
  11. package/dist/third-party/front_end/Images/accelerometer-left.png +0 -0
  12. package/dist/third-party/front_end/Images/accelerometer-right.png +0 -0
  13. package/dist/third-party/front_end/Images/accelerometer-top.png +0 -0
  14. package/dist/third-party/front_end/Images/align-content-center.svg +1 -0
  15. package/dist/third-party/front_end/Images/align-content-end.svg +1 -0
  16. package/dist/third-party/front_end/Images/align-content-space-around.svg +1 -0
  17. package/dist/third-party/front_end/Images/align-content-space-between.svg +1 -0
  18. package/dist/third-party/front_end/Images/align-content-space-evenly.svg +1 -0
  19. package/dist/third-party/front_end/Images/align-content-start.svg +1 -0
  20. package/dist/third-party/front_end/Images/align-content-stretch.svg +1 -0
  21. package/dist/third-party/front_end/Images/align-items-baseline.svg +1 -0
  22. package/dist/third-party/front_end/Images/align-items-center.svg +1 -0
  23. package/dist/third-party/front_end/Images/align-items-end.svg +1 -0
  24. package/dist/third-party/front_end/Images/align-items-start.svg +1 -0
  25. package/dist/third-party/front_end/Images/align-items-stretch.svg +1 -0
  26. package/dist/third-party/front_end/Images/align-self-center.svg +1 -0
  27. package/dist/third-party/front_end/Images/align-self-end.svg +1 -0
  28. package/dist/third-party/front_end/Images/align-self-start.svg +1 -0
  29. package/dist/third-party/front_end/Images/align-self-stretch.svg +1 -0
  30. package/dist/third-party/front_end/Images/arrow-down.svg +1 -0
  31. package/dist/third-party/front_end/Images/arrow-drop-down-dark.svg +1 -0
  32. package/dist/third-party/front_end/Images/arrow-drop-down-light.svg +1 -0
  33. package/dist/third-party/front_end/Images/arrow-up-down-circle.svg +1 -0
  34. package/dist/third-party/front_end/Images/arrow-up-down.svg +1 -0
  35. package/dist/third-party/front_end/Images/arrow-up.svg +1 -0
  36. package/dist/third-party/front_end/Images/bell.svg +1 -0
  37. package/dist/third-party/front_end/Images/bezier-curve-filled.svg +1 -0
  38. package/dist/third-party/front_end/Images/bin.svg +1 -0
  39. package/dist/third-party/front_end/Images/bottom-panel-close.svg +1 -0
  40. package/dist/third-party/front_end/Images/bottom-panel-open.svg +1 -0
  41. package/dist/third-party/front_end/Images/brackets.svg +1 -0
  42. package/dist/third-party/front_end/Images/breakpoint-circle.svg +1 -0
  43. package/dist/third-party/front_end/Images/breakpoint-crossed-filled.svg +1 -0
  44. package/dist/third-party/front_end/Images/breakpoint-crossed.svg +1 -0
  45. package/dist/third-party/front_end/Images/brush-filled.svg +1 -0
  46. package/dist/third-party/front_end/Images/brush.svg +1 -0
  47. package/dist/third-party/front_end/Images/bug.svg +1 -0
  48. package/dist/third-party/front_end/Images/bundle.svg +1 -0
  49. package/dist/third-party/front_end/Images/check-circle.svg +1 -0
  50. package/dist/third-party/front_end/Images/check-double.svg +1 -0
  51. package/dist/third-party/front_end/Images/checker.svg +1 -0
  52. package/dist/third-party/front_end/Images/checkmark.svg +1 -0
  53. package/dist/third-party/front_end/Images/chevron-double-right.svg +1 -0
  54. package/dist/third-party/front_end/Images/chevron-down.svg +1 -0
  55. package/dist/third-party/front_end/Images/chevron-left-dot.svg +1 -0
  56. package/dist/third-party/front_end/Images/chevron-left.svg +1 -0
  57. package/dist/third-party/front_end/Images/chevron-right.svg +1 -0
  58. package/dist/third-party/front_end/Images/chevron-up.svg +1 -0
  59. package/dist/third-party/front_end/Images/chromeLeft.avif +0 -0
  60. package/dist/third-party/front_end/Images/chromeMiddle.avif +0 -0
  61. package/dist/third-party/front_end/Images/chromeRight.avif +0 -0
  62. package/dist/third-party/front_end/Images/clear-list.svg +1 -0
  63. package/dist/third-party/front_end/Images/clear.svg +1 -0
  64. package/dist/third-party/front_end/Images/cloud.svg +1 -0
  65. package/dist/third-party/front_end/Images/code-circle.svg +1 -0
  66. package/dist/third-party/front_end/Images/code.svg +1 -0
  67. package/dist/third-party/front_end/Images/colon.svg +1 -0
  68. package/dist/third-party/front_end/Images/color-picker-filled.svg +1 -0
  69. package/dist/third-party/front_end/Images/color-picker.svg +1 -0
  70. package/dist/third-party/front_end/Images/console-conditional-breakpoint.svg +1 -0
  71. package/dist/third-party/front_end/Images/console-logpoint.svg +1 -0
  72. package/dist/third-party/front_end/Images/cookie.svg +1 -0
  73. package/dist/third-party/front_end/Images/copy.svg +1 -0
  74. package/dist/third-party/front_end/Images/credit-card.svg +1 -0
  75. package/dist/third-party/front_end/Images/cross-circle-filled.svg +1 -0
  76. package/dist/third-party/front_end/Images/cross-circle.svg +1 -0
  77. package/dist/third-party/front_end/Images/cross.svg +1 -0
  78. package/dist/third-party/front_end/Images/cssoverview_icons_2x.avif +0 -0
  79. package/dist/third-party/front_end/Images/custom-typography.svg +1 -0
  80. package/dist/third-party/front_end/Images/database.svg +1 -0
  81. package/dist/third-party/front_end/Images/deployed.svg +1 -0
  82. package/dist/third-party/front_end/Images/device-fold.svg +1 -0
  83. package/dist/third-party/front_end/Images/devices.svg +1 -0
  84. package/dist/third-party/front_end/Images/dock-bottom.svg +1 -0
  85. package/dist/third-party/front_end/Images/dock-left.svg +1 -0
  86. package/dist/third-party/front_end/Images/dock-right.svg +1 -0
  87. package/dist/third-party/front_end/Images/dock-window.svg +1 -0
  88. package/dist/third-party/front_end/Images/document.svg +1 -0
  89. package/dist/third-party/front_end/Images/dots-horizontal.svg +1 -0
  90. package/dist/third-party/front_end/Images/dots-vertical.svg +1 -0
  91. package/dist/third-party/front_end/Images/download.svg +1 -0
  92. package/dist/third-party/front_end/Images/edit.svg +1 -0
  93. package/dist/third-party/front_end/Images/empty.svg +1 -0
  94. package/dist/third-party/front_end/Images/errorWave.svg +1 -0
  95. package/dist/third-party/front_end/Images/exclamation.svg +1 -0
  96. package/dist/third-party/front_end/Images/experiment-check.svg +1 -0
  97. package/dist/third-party/front_end/Images/experiment.svg +1 -0
  98. package/dist/third-party/front_end/Images/eye.svg +1 -0
  99. package/dist/third-party/front_end/Images/file-document.svg +1 -0
  100. package/dist/third-party/front_end/Images/file-font.svg +1 -0
  101. package/dist/third-party/front_end/Images/file-generic.svg +1 -0
  102. package/dist/third-party/front_end/Images/file-image.svg +1 -0
  103. package/dist/third-party/front_end/Images/file-script.svg +1 -0
  104. package/dist/third-party/front_end/Images/file-snippet.svg +1 -0
  105. package/dist/third-party/front_end/Images/file-stylesheet.svg +1 -0
  106. package/dist/third-party/front_end/Images/filter-clear.svg +1 -0
  107. package/dist/third-party/front_end/Images/filter-filled.svg +1 -0
  108. package/dist/third-party/front_end/Images/filter.svg +1 -0
  109. package/dist/third-party/front_end/Images/flex-direction.svg +1 -0
  110. package/dist/third-party/front_end/Images/flex-no-wrap.svg +1 -0
  111. package/dist/third-party/front_end/Images/flex-wrap.svg +1 -0
  112. package/dist/third-party/front_end/Images/flow.svg +1 -0
  113. package/dist/third-party/front_end/Images/fold-more.svg +1 -0
  114. package/dist/third-party/front_end/Images/folder.svg +1 -0
  115. package/dist/third-party/front_end/Images/frame-crossed.svg +1 -0
  116. package/dist/third-party/front_end/Images/frame-icon.svg +1 -0
  117. package/dist/third-party/front_end/Images/frame.svg +1 -0
  118. package/dist/third-party/front_end/Images/gear-filled.svg +1 -0
  119. package/dist/third-party/front_end/Images/gear.svg +1 -0
  120. package/dist/third-party/front_end/Images/gears.svg +1 -0
  121. package/dist/third-party/front_end/Images/heap-snapshot.svg +1 -0
  122. package/dist/third-party/front_end/Images/heap-snapshots.svg +1 -0
  123. package/dist/third-party/front_end/Images/help.svg +1 -0
  124. package/dist/third-party/front_end/Images/iframe-crossed.svg +1 -0
  125. package/dist/third-party/front_end/Images/iframe.svg +1 -0
  126. package/dist/third-party/front_end/Images/import.svg +1 -0
  127. package/dist/third-party/front_end/Images/info-filled.svg +1 -0
  128. package/dist/third-party/front_end/Images/info.svg +1 -0
  129. package/dist/third-party/front_end/Images/issue-cross-filled.svg +1 -0
  130. package/dist/third-party/front_end/Images/issue-exclamation-filled.svg +1 -0
  131. package/dist/third-party/front_end/Images/issue-questionmark-filled.svg +1 -0
  132. package/dist/third-party/front_end/Images/issue-text-filled.svg +1 -0
  133. package/dist/third-party/front_end/Images/justify-content-center.svg +1 -0
  134. package/dist/third-party/front_end/Images/justify-content-end.svg +1 -0
  135. package/dist/third-party/front_end/Images/justify-content-space-around.svg +1 -0
  136. package/dist/third-party/front_end/Images/justify-content-space-between.svg +1 -0
  137. package/dist/third-party/front_end/Images/justify-content-space-evenly.svg +1 -0
  138. package/dist/third-party/front_end/Images/justify-content-start.svg +1 -0
  139. package/dist/third-party/front_end/Images/justify-items-center.svg +1 -0
  140. package/dist/third-party/front_end/Images/justify-items-end.svg +1 -0
  141. package/dist/third-party/front_end/Images/justify-items-start.svg +1 -0
  142. package/dist/third-party/front_end/Images/justify-items-stretch.svg +1 -0
  143. package/dist/third-party/front_end/Images/keyboard-pen.svg +1 -0
  144. package/dist/third-party/front_end/Images/large-arrow-right-filled.svg +1 -0
  145. package/dist/third-party/front_end/Images/largeIcons.svg +2 -0
  146. package/dist/third-party/front_end/Images/layers-filled.svg +1 -0
  147. package/dist/third-party/front_end/Images/layers.svg +1 -0
  148. package/dist/third-party/front_end/Images/left-panel-close.svg +1 -0
  149. package/dist/third-party/front_end/Images/left-panel-open.svg +1 -0
  150. package/dist/third-party/front_end/Images/lighthouse_logo.svg +1 -0
  151. package/dist/third-party/front_end/Images/list.svg +1 -0
  152. package/dist/third-party/front_end/Images/mediumIcons.svg +1 -0
  153. package/dist/third-party/front_end/Images/memory.svg +1 -0
  154. package/dist/third-party/front_end/Images/minus.svg +1 -0
  155. package/dist/third-party/front_end/Images/minus_icon.svg +1 -0
  156. package/dist/third-party/front_end/Images/navigationControls.png +0 -0
  157. package/dist/third-party/front_end/Images/navigationControls_2x.png +0 -0
  158. package/dist/third-party/front_end/Images/network-settings.svg +1 -0
  159. package/dist/third-party/front_end/Images/nodeIcon.avif +0 -0
  160. package/dist/third-party/front_end/Images/node_search_icon.svg +1 -0
  161. package/dist/third-party/front_end/Images/open-externally.svg +1 -0
  162. package/dist/third-party/front_end/Images/pause.svg +1 -0
  163. package/dist/third-party/front_end/Images/performance.svg +1 -0
  164. package/dist/third-party/front_end/Images/person.svg +1 -0
  165. package/dist/third-party/front_end/Images/play.svg +1 -0
  166. package/dist/third-party/front_end/Images/plus.svg +1 -0
  167. package/dist/third-party/front_end/Images/popoverArrows.png +0 -0
  168. package/dist/third-party/front_end/Images/popup.svg +1 -0
  169. package/dist/third-party/front_end/Images/preview_feature_video_thumbnail.svg +1 -0
  170. package/dist/third-party/front_end/Images/profile.svg +1 -0
  171. package/dist/third-party/front_end/Images/react_native/welcomeIcon.png +0 -0
  172. package/dist/third-party/front_end/Images/record-start.svg +1 -0
  173. package/dist/third-party/front_end/Images/record-stop.svg +1 -0
  174. package/dist/third-party/front_end/Images/redo.svg +1 -0
  175. package/dist/third-party/front_end/Images/refresh.svg +1 -0
  176. package/dist/third-party/front_end/Images/replace.svg +1 -0
  177. package/dist/third-party/front_end/Images/replay.svg +1 -0
  178. package/dist/third-party/front_end/Images/resizeDiagonal.svg +1 -0
  179. package/dist/third-party/front_end/Images/resizeHorizontal.svg +1 -0
  180. package/dist/third-party/front_end/Images/resizeVertical.svg +1 -0
  181. package/dist/third-party/front_end/Images/resume.svg +1 -0
  182. package/dist/third-party/front_end/Images/review.svg +1 -0
  183. package/dist/third-party/front_end/Images/right-panel-close.svg +1 -0
  184. package/dist/third-party/front_end/Images/right-panel-open.svg +1 -0
  185. package/dist/third-party/front_end/Images/screen-rotation.svg +1 -0
  186. package/dist/third-party/front_end/Images/search.svg +1 -0
  187. package/dist/third-party/front_end/Images/securityIcons.svg +1 -0
  188. package/dist/third-party/front_end/Images/select-element.svg +1 -0
  189. package/dist/third-party/front_end/Images/settings_14x14_icon.svg +1 -0
  190. package/dist/third-party/front_end/Images/shadow.svg +1 -0
  191. package/dist/third-party/front_end/Images/smallIcons.svg +1 -0
  192. package/dist/third-party/front_end/Images/snippet.svg +1 -0
  193. package/dist/third-party/front_end/Images/star.svg +1 -0
  194. package/dist/third-party/front_end/Images/step-into.svg +1 -0
  195. package/dist/third-party/front_end/Images/step-out.svg +1 -0
  196. package/dist/third-party/front_end/Images/step-over.svg +1 -0
  197. package/dist/third-party/front_end/Images/step.svg +1 -0
  198. package/dist/third-party/front_end/Images/stop.svg +1 -0
  199. package/dist/third-party/front_end/Images/symbol.svg +1 -0
  200. package/dist/third-party/front_end/Images/sync.svg +1 -0
  201. package/dist/third-party/front_end/Images/table.svg +1 -0
  202. package/dist/third-party/front_end/Images/toolbarResizerVertical.png +0 -0
  203. package/dist/third-party/front_end/Images/top-panel-close.svg +1 -0
  204. package/dist/third-party/front_end/Images/top-panel-open.svg +1 -0
  205. package/dist/third-party/front_end/Images/touchCursor.png +0 -0
  206. package/dist/third-party/front_end/Images/touchCursor_2x.png +0 -0
  207. package/dist/third-party/front_end/Images/triangle-bottom-right.svg +1 -0
  208. package/dist/third-party/front_end/Images/triangle-down.svg +1 -0
  209. package/dist/third-party/front_end/Images/triangle-left.svg +1 -0
  210. package/dist/third-party/front_end/Images/triangle-right.svg +1 -0
  211. package/dist/third-party/front_end/Images/triangle-up.svg +1 -0
  212. package/dist/third-party/front_end/Images/undo.svg +1 -0
  213. package/dist/third-party/front_end/Images/warning-filled.svg +1 -0
  214. package/dist/third-party/front_end/Images/warning.svg +1 -0
  215. package/dist/third-party/front_end/Images/warning_icon.svg +1 -0
  216. package/dist/third-party/front_end/Images/watch.svg +1 -0
  217. package/dist/third-party/front_end/Images/whatsnew.avif +0 -0
  218. package/dist/third-party/front_end/Images/width.svg +1 -0
  219. package/dist/third-party/front_end/Tests.js +1662 -0
  220. package/dist/third-party/front_end/core/common/common-legacy.js +1 -0
  221. package/dist/third-party/front_end/core/common/common.js +1 -0
  222. package/dist/third-party/front_end/core/dom_extension/dom_extension.js +1 -0
  223. package/dist/third-party/front_end/core/host/host-legacy.js +1 -0
  224. package/dist/third-party/front_end/core/host/host.js +1 -0
  225. package/dist/third-party/front_end/core/i18n/i18n.js +1 -0
  226. package/dist/third-party/front_end/core/i18n/locales/en-US.json +1 -0
  227. package/dist/third-party/front_end/core/i18n/locales/zh.json +1 -0
  228. package/dist/third-party/front_end/core/platform/platform.js +1 -0
  229. package/dist/third-party/front_end/core/protocol_client/protocol_client-legacy.js +1 -0
  230. package/dist/third-party/front_end/core/protocol_client/protocol_client.js +1 -0
  231. package/dist/third-party/front_end/core/root/root-legacy.js +1 -0
  232. package/dist/third-party/front_end/core/root/root.js +1 -0
  233. package/dist/third-party/front_end/core/sdk/sdk-legacy.js +1 -0
  234. package/dist/third-party/front_end/core/sdk/sdk-meta.js +1 -0
  235. package/dist/third-party/front_end/core/sdk/sdk.js +1 -0
  236. package/dist/third-party/front_end/device_mode_emulation_frame.html +20 -0
  237. package/dist/third-party/front_end/devtools_app.html +20 -0
  238. package/dist/third-party/front_end/devtools_compatibility.js +1595 -0
  239. package/dist/third-party/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  240. package/dist/third-party/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  241. package/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  242. package/dist/third-party/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  243. package/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  244. package/dist/third-party/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  245. package/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  246. package/dist/third-party/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  247. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  248. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  249. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  250. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  251. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  252. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  253. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  254. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  255. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  256. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  257. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  258. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  259. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  260. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  261. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  262. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  263. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  264. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  265. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  266. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  267. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  268. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  269. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  270. package/dist/third-party/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  271. package/dist/third-party/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
  272. package/dist/third-party/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
  273. package/dist/third-party/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  274. package/dist/third-party/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  275. package/dist/third-party/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  276. package/dist/third-party/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  277. package/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  278. package/dist/third-party/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  279. package/dist/third-party/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js +1 -0
  280. package/dist/third-party/front_end/entrypoints/devtools_app/devtools_app.js +1 -0
  281. package/dist/third-party/front_end/entrypoints/formatter_worker/FormatterActions.js +1 -0
  282. package/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.js +1 -0
  283. package/dist/third-party/front_end/entrypoints/formatter_worker/formatter_worker.js +1 -0
  284. package/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js +1 -0
  285. package/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-legacy.js +1 -0
  286. package/dist/third-party/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker.js +1 -0
  287. package/dist/third-party/front_end/entrypoints/inspector/inspector.js +1 -0
  288. package/dist/third-party/front_end/entrypoints/inspector_main/inspector_main-meta.js +1 -0
  289. package/dist/third-party/front_end/entrypoints/inspector_main/inspector_main.js +1 -0
  290. package/dist/third-party/front_end/entrypoints/js_app/js_app.js +1 -0
  291. package/dist/third-party/front_end/entrypoints/lighthouse_worker/lighthouse_worker.js +1 -0
  292. package/dist/third-party/front_end/entrypoints/main/main-legacy.js +1 -0
  293. package/dist/third-party/front_end/entrypoints/main/main-meta.js +1 -0
  294. package/dist/third-party/front_end/entrypoints/main/main.js +1 -0
  295. package/dist/third-party/front_end/entrypoints/ndb_app/ndb_app.js +1 -0
  296. package/dist/third-party/front_end/entrypoints/node_app/node_app.js +1 -0
  297. package/dist/third-party/front_end/entrypoints/rn_inspector/rn_inspector.js +1 -0
  298. package/dist/third-party/front_end/entrypoints/shell/shell.js +1 -0
  299. package/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.js +1 -0
  300. package/dist/third-party/front_end/entrypoints/wasmparser_worker/wasmparser_worker.js +1 -0
  301. package/dist/third-party/front_end/entrypoints/worker_app/worker_app.js +1 -0
  302. package/dist/third-party/front_end/inspector.html +20 -0
  303. package/dist/third-party/front_end/integration_test_runner.html +40 -0
  304. package/dist/third-party/front_end/js_app.html +20 -0
  305. package/dist/third-party/front_end/legacy_test_runner/legacy_test_runner.js +36 -0
  306. package/dist/third-party/front_end/legacy_test_runner/test_runner/test_runner.js +1 -0
  307. package/dist/third-party/front_end/models/bindings/bindings-legacy.js +1 -0
  308. package/dist/third-party/front_end/models/bindings/bindings.js +1 -0
  309. package/dist/third-party/front_end/models/breakpoints/breakpoints-legacy.js +1 -0
  310. package/dist/third-party/front_end/models/breakpoints/breakpoints.js +1 -0
  311. package/dist/third-party/front_end/models/emulation/emulation.js +1 -0
  312. package/dist/third-party/front_end/models/extensions/extensions-legacy.js +1 -0
  313. package/dist/third-party/front_end/models/extensions/extensions.js +1 -0
  314. package/dist/third-party/front_end/models/formatter/formatter-legacy.js +1 -0
  315. package/dist/third-party/front_end/models/formatter/formatter.js +1 -0
  316. package/dist/third-party/front_end/models/har/har.js +1 -0
  317. package/dist/third-party/front_end/models/heap_snapshot_model/heap_snapshot_model-legacy.js +1 -0
  318. package/dist/third-party/front_end/models/heap_snapshot_model/heap_snapshot_model.js +1 -0
  319. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  320. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepCorpNotSameOrigin.md +8 -0
  321. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  322. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepCorpNotSameSite.md +7 -0
  323. package/dist/third-party/front_end/models/issues_manager/descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  324. package/dist/third-party/front_end/models/issues_manager/descriptions/CompatibilityModeQuirks.md +5 -0
  325. package/dist/third-party/front_end/models/issues_manager/descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  326. package/dist/third-party/front_end/models/issues_manager/descriptions/LowTextContrast.md +5 -0
  327. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  328. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  329. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  330. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteInvalidSameParty.md +8 -0
  331. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  332. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  333. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  334. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  335. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  336. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  337. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxRead.md +9 -0
  338. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteUnspecifiedTreatedAsLaxSet.md +9 -0
  339. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  340. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  341. package/dist/third-party/front_end/models/issues_manager/descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  342. package/dist/third-party/front_end/models/issues_manager/descriptions/arInsecureContext.md +7 -0
  343. package/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  344. package/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  345. package/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +5 -0
  346. package/dist/third-party/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  347. package/dist/third-party/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md +18 -0
  348. package/dist/third-party/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md +19 -0
  349. package/dist/third-party/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +8 -0
  350. package/dist/third-party/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +9 -0
  351. package/dist/third-party/front_end/models/issues_manager/descriptions/arSourceIgnored.md +13 -0
  352. package/dist/third-party/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +12 -0
  353. package/dist/third-party/front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +10 -0
  354. package/dist/third-party/front_end/models/issues_manager/descriptions/arWebAndOsHeaders.md +11 -0
  355. package/dist/third-party/front_end/models/issues_manager/descriptions/bounceTrackingMitigations.md +3 -0
  356. package/dist/third-party/front_end/models/issues_manager/descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  357. package/dist/third-party/front_end/models/issues_manager/descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  358. package/dist/third-party/front_end/models/issues_manager/descriptions/cookieExcludeBlockedWithinFirstPartySet.md +4 -0
  359. package/dist/third-party/front_end/models/issues_manager/descriptions/cookieExcludeDomainNonAscii.md +11 -0
  360. package/dist/third-party/front_end/models/issues_manager/descriptions/cookieWarnDomainNonAscii.md +11 -0
  361. package/dist/third-party/front_end/models/issues_manager/descriptions/corsAllowCredentialsRequired.md +6 -0
  362. package/dist/third-party/front_end/models/issues_manager/descriptions/corsDisabledScheme.md +7 -0
  363. package/dist/third-party/front_end/models/issues_manager/descriptions/corsDisallowedByMode.md +7 -0
  364. package/dist/third-party/front_end/models/issues_manager/descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  365. package/dist/third-party/front_end/models/issues_manager/descriptions/corsInsecurePrivateNetwork.md +10 -0
  366. package/dist/third-party/front_end/models/issues_manager/descriptions/corsInvalidHeaderValues.md +7 -0
  367. package/dist/third-party/front_end/models/issues_manager/descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  368. package/dist/third-party/front_end/models/issues_manager/descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  369. package/dist/third-party/front_end/models/issues_manager/descriptions/corsOriginMismatch.md +6 -0
  370. package/dist/third-party/front_end/models/issues_manager/descriptions/corsPreflightAllowPrivateNetworkError.md +10 -0
  371. package/dist/third-party/front_end/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +5 -0
  372. package/dist/third-party/front_end/models/issues_manager/descriptions/corsRedirectContainsCredentials.md +5 -0
  373. package/dist/third-party/front_end/models/issues_manager/descriptions/corsWildcardOriginNotAllowed.md +8 -0
  374. package/dist/third-party/front_end/models/issues_manager/descriptions/cspEvalViolation.md +9 -0
  375. package/dist/third-party/front_end/models/issues_manager/descriptions/cspInlineViolation.md +10 -0
  376. package/dist/third-party/front_end/models/issues_manager/descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  377. package/dist/third-party/front_end/models/issues_manager/descriptions/cspTrustedTypesSinkViolation.md +8 -0
  378. package/dist/third-party/front_end/models/issues_manager/descriptions/cspURLViolation.md +10 -0
  379. package/dist/third-party/front_end/models/issues_manager/descriptions/deprecation.md +3 -0
  380. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  381. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  382. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  383. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  384. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestCanceled.md +1 -0
  385. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataHttpNotFound.md +1 -0
  386. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataInvalidResponse.md +1 -0
  387. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataNoResponse.md +1 -0
  388. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  389. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  390. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  391. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  392. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  393. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  394. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  395. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  396. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  397. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  398. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  399. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  400. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  401. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  402. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  403. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  404. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  405. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  406. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  407. package/dist/third-party/front_end/models/issues_manager/descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  408. package/dist/third-party/front_end/models/issues_manager/descriptions/genericCrossOriginPortalPostMessageError.md +3 -0
  409. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormAriaLabelledByToNonExistingId.md +8 -0
  410. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  411. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormDuplicateIdForInputError.md +5 -0
  412. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  413. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  414. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  415. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormInputWithNoLabelError.md +5 -0
  416. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  417. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormLabelForNameError.md +5 -0
  418. package/dist/third-party/front_end/models/issues_manager/descriptions/genericFormLabelHasNeitherForNorNestedInput.md +5 -0
  419. package/dist/third-party/front_end/models/issues_manager/descriptions/heavyAd.md +10 -0
  420. package/dist/third-party/front_end/models/issues_manager/descriptions/mixedContent.md +5 -0
  421. package/dist/third-party/front_end/models/issues_manager/descriptions/sharedArrayBuffer.md +7 -0
  422. package/dist/third-party/front_end/models/issues_manager/descriptions/stylesheetLateImport.md +4 -0
  423. package/dist/third-party/front_end/models/issues_manager/descriptions/stylesheetRequestFailed.md +3 -0
  424. package/dist/third-party/front_end/models/issues_manager/issues_manager.js +1 -0
  425. package/dist/third-party/front_end/models/javascript_metadata/javascript_metadata.js +1 -0
  426. package/dist/third-party/front_end/models/logs/logs-meta.js +1 -0
  427. package/dist/third-party/front_end/models/logs/logs.js +1 -0
  428. package/dist/third-party/front_end/models/persistence/persistence-legacy.js +1 -0
  429. package/dist/third-party/front_end/models/persistence/persistence-meta.js +1 -0
  430. package/dist/third-party/front_end/models/persistence/persistence.js +1 -0
  431. package/dist/third-party/front_end/models/source_map_scopes/source_map_scopes.js +1 -0
  432. package/dist/third-party/front_end/models/text_utils/text_utils-legacy.js +1 -0
  433. package/dist/third-party/front_end/models/text_utils/text_utils.js +1 -0
  434. package/dist/third-party/front_end/models/timeline_model/timeline_model-legacy.js +1 -0
  435. package/dist/third-party/front_end/models/timeline_model/timeline_model.js +1 -0
  436. package/dist/third-party/front_end/models/trace/extras/extras.js +1 -0
  437. package/dist/third-party/front_end/models/trace/handlers/handlers.js +1 -0
  438. package/dist/third-party/front_end/models/trace/helpers/helpers.js +1 -0
  439. package/dist/third-party/front_end/models/trace/trace.js +1 -0
  440. package/dist/third-party/front_end/models/trace/types/types.js +1 -0
  441. package/dist/third-party/front_end/models/workspace/workspace-legacy.js +1 -0
  442. package/dist/third-party/front_end/models/workspace/workspace.js +1 -0
  443. package/dist/third-party/front_end/models/workspace_diff/workspace_diff-legacy.js +1 -0
  444. package/dist/third-party/front_end/models/workspace_diff/workspace_diff.js +1 -0
  445. package/dist/third-party/front_end/ndb_app.html +20 -0
  446. package/dist/third-party/front_end/node_app.html +20 -0
  447. package/dist/third-party/front_end/panels/accessibility/accessibility-legacy.js +1 -0
  448. package/dist/third-party/front_end/panels/accessibility/accessibility-meta.js +1 -0
  449. package/dist/third-party/front_end/panels/accessibility/accessibility.js +1 -0
  450. package/dist/third-party/front_end/panels/animation/animation-legacy.js +1 -0
  451. package/dist/third-party/front_end/panels/animation/animation-meta.js +1 -0
  452. package/dist/third-party/front_end/panels/animation/animation.js +1 -0
  453. package/dist/third-party/front_end/panels/application/application-legacy.js +1 -0
  454. package/dist/third-party/front_end/panels/application/application-meta.js +1 -0
  455. package/dist/third-party/front_end/panels/application/application.js +1 -0
  456. package/dist/third-party/front_end/panels/application/components/components.js +1 -0
  457. package/dist/third-party/front_end/panels/application/preloading/components/components.js +1 -0
  458. package/dist/third-party/front_end/panels/browser_debugger/browser_debugger-legacy.js +1 -0
  459. package/dist/third-party/front_end/panels/browser_debugger/browser_debugger-meta.js +1 -0
  460. package/dist/third-party/front_end/panels/browser_debugger/browser_debugger.js +1 -0
  461. package/dist/third-party/front_end/panels/changes/changes-legacy.js +1 -0
  462. package/dist/third-party/front_end/panels/changes/changes-meta.js +1 -0
  463. package/dist/third-party/front_end/panels/changes/changes.js +1 -0
  464. package/dist/third-party/front_end/panels/console/console-legacy.js +1 -0
  465. package/dist/third-party/front_end/panels/console/console-meta.js +1 -0
  466. package/dist/third-party/front_end/panels/console/console.js +6 -0
  467. package/dist/third-party/front_end/panels/console_counters/console_counters-meta.js +1 -0
  468. package/dist/third-party/front_end/panels/console_counters/console_counters.js +1 -0
  469. package/dist/third-party/front_end/panels/coverage/coverage-legacy.js +1 -0
  470. package/dist/third-party/front_end/panels/coverage/coverage-meta.js +1 -0
  471. package/dist/third-party/front_end/panels/coverage/coverage.js +1 -0
  472. package/dist/third-party/front_end/panels/css_overview/components/components.js +1 -0
  473. package/dist/third-party/front_end/panels/css_overview/css_overview-meta.js +1 -0
  474. package/dist/third-party/front_end/panels/css_overview/css_overview.js +144 -0
  475. package/dist/third-party/front_end/panels/developer_resources/developer_resources-meta.js +1 -0
  476. package/dist/third-party/front_end/panels/developer_resources/developer_resources.js +1 -0
  477. package/dist/third-party/front_end/panels/elements/components/components.js +1 -0
  478. package/dist/third-party/front_end/panels/elements/elements-legacy.js +1 -0
  479. package/dist/third-party/front_end/panels/elements/elements-meta.js +1 -0
  480. package/dist/third-party/front_end/panels/elements/elements.js +1 -0
  481. package/dist/third-party/front_end/panels/emulation/components/components.js +22 -0
  482. package/dist/third-party/front_end/panels/emulation/emulation-legacy.js +1 -0
  483. package/dist/third-party/front_end/panels/emulation/emulation-meta.js +1 -0
  484. package/dist/third-party/front_end/panels/emulation/emulation.js +1 -0
  485. package/dist/third-party/front_end/panels/event_listeners/event_listeners.js +1 -0
  486. package/dist/third-party/front_end/panels/issues/components/components.js +1 -0
  487. package/dist/third-party/front_end/panels/issues/issues-meta.js +1 -0
  488. package/dist/third-party/front_end/panels/issues/issues.js +1 -0
  489. package/dist/third-party/front_end/panels/js_profiler/js_profiler-meta.js +1 -0
  490. package/dist/third-party/front_end/panels/js_profiler/js_profiler.js +1 -0
  491. package/dist/third-party/front_end/panels/layer_viewer/layer_viewer-legacy.js +1 -0
  492. package/dist/third-party/front_end/panels/layer_viewer/layer_viewer-meta.js +1 -0
  493. package/dist/third-party/front_end/panels/layer_viewer/layer_viewer.js +1 -0
  494. package/dist/third-party/front_end/panels/layers/layers-meta.js +1 -0
  495. package/dist/third-party/front_end/panels/layers/layers.js +1 -0
  496. package/dist/third-party/front_end/panels/lighthouse/lighthouse-legacy.js +1 -0
  497. package/dist/third-party/front_end/panels/lighthouse/lighthouse-meta.js +1 -0
  498. package/dist/third-party/front_end/panels/lighthouse/lighthouse.js +66 -0
  499. package/dist/third-party/front_end/panels/media/media-meta.js +1 -0
  500. package/dist/third-party/front_end/panels/media/media.js +25 -0
  501. package/dist/third-party/front_end/panels/mobile_throttling/mobile_throttling-legacy.js +1 -0
  502. package/dist/third-party/front_end/panels/mobile_throttling/mobile_throttling-meta.js +1 -0
  503. package/dist/third-party/front_end/panels/mobile_throttling/mobile_throttling.js +1 -0
  504. package/dist/third-party/front_end/panels/network/components/components.js +1 -0
  505. package/dist/third-party/front_end/panels/network/forward/forward.js +1 -0
  506. package/dist/third-party/front_end/panels/network/network-legacy.js +1 -0
  507. package/dist/third-party/front_end/panels/network/network-meta.js +1 -0
  508. package/dist/third-party/front_end/panels/network/network.js +1 -0
  509. package/dist/third-party/front_end/panels/performance_monitor/performance_monitor-meta.js +1 -0
  510. package/dist/third-party/front_end/panels/performance_monitor/performance_monitor.js +1 -0
  511. package/dist/third-party/front_end/panels/profiler/profiler-legacy.js +1 -0
  512. package/dist/third-party/front_end/panels/profiler/profiler-meta.js +1 -0
  513. package/dist/third-party/front_end/panels/profiler/profiler.js +7 -0
  514. package/dist/third-party/front_end/panels/protocol_monitor/components/components.js +1 -0
  515. package/dist/third-party/front_end/panels/protocol_monitor/protocol_monitor-meta.js +1 -0
  516. package/dist/third-party/front_end/panels/protocol_monitor/protocol_monitor.js +1 -0
  517. package/dist/third-party/front_end/panels/recorder/components/components.js +1 -0
  518. package/dist/third-party/front_end/panels/recorder/controllers/controllers.js +1 -0
  519. package/dist/third-party/front_end/panels/recorder/converters/converters.js +1 -0
  520. package/dist/third-party/front_end/panels/recorder/extensions/extensions.js +1 -0
  521. package/dist/third-party/front_end/panels/recorder/injected/injected.generated.js +1 -0
  522. package/dist/third-party/front_end/panels/recorder/injected/injected.js +1 -0
  523. package/dist/third-party/front_end/panels/recorder/models/models.js +1 -0
  524. package/dist/third-party/front_end/panels/recorder/recorder-actions.js +1 -0
  525. package/dist/third-party/front_end/panels/recorder/recorder-meta.js +1 -0
  526. package/dist/third-party/front_end/panels/recorder/recorder.js +1 -0
  527. package/dist/third-party/front_end/panels/recorder/util/util.js +1 -0
  528. package/dist/third-party/front_end/panels/rn_welcome/rn_welcome-meta.js +1 -0
  529. package/dist/third-party/front_end/panels/rn_welcome/rn_welcome.js +1 -0
  530. package/dist/third-party/front_end/panels/screencast/screencast-meta.js +1 -0
  531. package/dist/third-party/front_end/panels/screencast/screencast.js +1 -0
  532. package/dist/third-party/front_end/panels/search/search-legacy.js +1 -0
  533. package/dist/third-party/front_end/panels/search/search.js +1 -0
  534. package/dist/third-party/front_end/panels/security/security-legacy.js +1 -0
  535. package/dist/third-party/front_end/panels/security/security-meta.js +1 -0
  536. package/dist/third-party/front_end/panels/security/security.js +1 -0
  537. package/dist/third-party/front_end/panels/sensors/sensors-meta.js +1 -0
  538. package/dist/third-party/front_end/panels/sensors/sensors.js +1 -0
  539. package/dist/third-party/front_end/panels/settings/components/components.js +1 -0
  540. package/dist/third-party/front_end/panels/settings/emulation/components/components.js +1 -0
  541. package/dist/third-party/front_end/panels/settings/emulation/emulation-meta.js +1 -0
  542. package/dist/third-party/front_end/panels/settings/emulation/emulation.js +1 -0
  543. package/dist/third-party/front_end/panels/settings/emulation/utils/utils.js +1 -0
  544. package/dist/third-party/front_end/panels/settings/settings-legacy.js +1 -0
  545. package/dist/third-party/front_end/panels/settings/settings-meta.js +1 -0
  546. package/dist/third-party/front_end/panels/settings/settings.js +1 -0
  547. package/dist/third-party/front_end/panels/snippets/snippets-legacy.js +1 -0
  548. package/dist/third-party/front_end/panels/snippets/snippets.js +1 -0
  549. package/dist/third-party/front_end/panels/sources/components/components.js +1 -0
  550. package/dist/third-party/front_end/panels/sources/sources-legacy.js +1 -0
  551. package/dist/third-party/front_end/panels/sources/sources-meta.js +1 -0
  552. package/dist/third-party/front_end/panels/sources/sources.js +1 -0
  553. package/dist/third-party/front_end/panels/timeline/timeline-legacy.js +1 -0
  554. package/dist/third-party/front_end/panels/timeline/timeline-meta.js +1 -0
  555. package/dist/third-party/front_end/panels/timeline/timeline.js +1 -0
  556. package/dist/third-party/front_end/panels/utils/utils.js +1 -0
  557. package/dist/third-party/front_end/panels/web_audio/graph_visualizer/graph_visualizer.js +1 -0
  558. package/dist/third-party/front_end/panels/web_audio/web_audio-legacy.js +1 -0
  559. package/dist/third-party/front_end/panels/web_audio/web_audio-meta.js +1 -0
  560. package/dist/third-party/front_end/panels/web_audio/web_audio.js +1 -0
  561. package/dist/third-party/front_end/panels/webauthn/webauthn-meta.js +1 -0
  562. package/dist/third-party/front_end/panels/webauthn/webauthn.js +1 -0
  563. package/dist/third-party/front_end/rn_inspector.html +20 -0
  564. package/dist/third-party/front_end/services/puppeteer/puppeteer.js +1 -0
  565. package/dist/third-party/front_end/services/tracing/tracing.js +1 -0
  566. package/dist/third-party/front_end/services/window_bounds/window_bounds.js +1 -0
  567. package/dist/third-party/front_end/third_party/acorn/acorn.js +1 -0
  568. package/dist/third-party/front_end/third_party/chromium/client-variations/client-variations.js +1 -0
  569. package/dist/third-party/front_end/third_party/codemirror.next/chunk/angular.js +2 -0
  570. package/dist/third-party/front_end/third_party/codemirror.next/chunk/codemirror.js +2 -0
  571. package/dist/third-party/front_end/third_party/codemirror.next/chunk/cpp.js +2 -0
  572. package/dist/third-party/front_end/third_party/codemirror.next/chunk/java.js +2 -0
  573. package/dist/third-party/front_end/third_party/codemirror.next/chunk/json.js +2 -0
  574. package/dist/third-party/front_end/third_party/codemirror.next/chunk/legacy.js +2 -0
  575. package/dist/third-party/front_end/third_party/codemirror.next/chunk/less.js +2 -0
  576. package/dist/third-party/front_end/third_party/codemirror.next/chunk/markdown.js +2 -0
  577. package/dist/third-party/front_end/third_party/codemirror.next/chunk/php.js +2 -0
  578. package/dist/third-party/front_end/third_party/codemirror.next/chunk/python.js +2 -0
  579. package/dist/third-party/front_end/third_party/codemirror.next/chunk/sass.js +2 -0
  580. package/dist/third-party/front_end/third_party/codemirror.next/chunk/svelte.js +2 -0
  581. package/dist/third-party/front_end/third_party/codemirror.next/chunk/vue.js +2 -0
  582. package/dist/third-party/front_end/third_party/codemirror.next/chunk/wast.js +2 -0
  583. package/dist/third-party/front_end/third_party/codemirror.next/chunk/xml.js +2 -0
  584. package/dist/third-party/front_end/third_party/codemirror.next/codemirror.next.js +2 -0
  585. package/dist/third-party/front_end/third_party/diff/diff-legacy.js +1 -0
  586. package/dist/third-party/front_end/third_party/diff/diff.js +1 -0
  587. package/dist/third-party/front_end/third_party/i18n/i18n.js +1 -0
  588. package/dist/third-party/front_end/third_party/intl-messageformat/intl-messageformat.js +15 -0
  589. package/dist/third-party/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1297 -0
  590. package/dist/third-party/front_end/third_party/lighthouse/report/report.js +222 -0
  591. package/dist/third-party/front_end/third_party/lit/lit.js +98 -0
  592. package/dist/third-party/front_end/third_party/marked/marked.js +1 -0
  593. package/dist/third-party/front_end/third_party/puppeteer/puppeteer.js +1 -0
  594. package/dist/third-party/front_end/third_party/puppeteer-replay/puppeteer-replay.js +1 -0
  595. package/dist/third-party/front_end/third_party/wasmparser/wasmparser.js +1 -0
  596. package/dist/third-party/front_end/ui/components/adorners/adorners.js +1 -0
  597. package/dist/third-party/front_end/ui/components/buttons/buttons.js +1 -0
  598. package/dist/third-party/front_end/ui/components/chrome_link/chrome_link.js +1 -0
  599. package/dist/third-party/front_end/ui/components/code_highlighter/code_highlighter.js +1 -0
  600. package/dist/third-party/front_end/ui/components/data_grid/data_grid.js +1 -0
  601. package/dist/third-party/front_end/ui/components/dialogs/dialogs.js +1 -0
  602. package/dist/third-party/front_end/ui/components/diff_view/diff_view.js +1 -0
  603. package/dist/third-party/front_end/ui/components/expandable_list/expandable_list.js +1 -0
  604. package/dist/third-party/front_end/ui/components/helpers/helpers.js +1 -0
  605. package/dist/third-party/front_end/ui/components/icon_button/icon_button.js +1 -0
  606. package/dist/third-party/front_end/ui/components/input/input.js +1 -0
  607. package/dist/third-party/front_end/ui/components/issue_counter/issue_counter.js +1 -0
  608. package/dist/third-party/front_end/ui/components/legacy_wrapper/legacy_wrapper.js +1 -0
  609. package/dist/third-party/front_end/ui/components/linear_memory_inspector/linear_memory_inspector-meta.js +1 -0
  610. package/dist/third-party/front_end/ui/components/linear_memory_inspector/linear_memory_inspector.js +1 -0
  611. package/dist/third-party/front_end/ui/components/linkifier/linkifier.js +1 -0
  612. package/dist/third-party/front_end/ui/components/markdown_view/markdown_view.js +1 -0
  613. package/dist/third-party/front_end/ui/components/menus/menus.js +1 -0
  614. package/dist/third-party/front_end/ui/components/node_text/node_text.js +1 -0
  615. package/dist/third-party/front_end/ui/components/panel_feedback/panel_feedback.js +1 -0
  616. package/dist/third-party/front_end/ui/components/panel_introduction_steps/panel_introduction_steps.js +1 -0
  617. package/dist/third-party/front_end/ui/components/render_coordinator/render_coordinator.js +1 -0
  618. package/dist/third-party/front_end/ui/components/report_view/report_view.js +1 -0
  619. package/dist/third-party/front_end/ui/components/request_link_icon/request_link_icon.js +1 -0
  620. package/dist/third-party/front_end/ui/components/settings/settings.js +1 -0
  621. package/dist/third-party/front_end/ui/components/srgb_overlay/srgb_overlay.js +1 -0
  622. package/dist/third-party/front_end/ui/components/survey_link/survey_link.js +1 -0
  623. package/dist/third-party/front_end/ui/components/text_editor/text_editor.js +1 -0
  624. package/dist/third-party/front_end/ui/components/text_prompt/text_prompt.js +1 -0
  625. package/dist/third-party/front_end/ui/components/tree_outline/tree_outline.js +1 -0
  626. package/dist/third-party/front_end/ui/components/two_states_counter/two_states_counter.js +1 -0
  627. package/dist/third-party/front_end/ui/legacy/components/color_picker/color_picker-legacy.js +1 -0
  628. package/dist/third-party/front_end/ui/legacy/components/color_picker/color_picker.js +1 -0
  629. package/dist/third-party/front_end/ui/legacy/components/cookie_table/cookie_table-legacy.js +1 -0
  630. package/dist/third-party/front_end/ui/legacy/components/cookie_table/cookie_table.js +1 -0
  631. package/dist/third-party/front_end/ui/legacy/components/data_grid/data_grid-legacy.js +1 -0
  632. package/dist/third-party/front_end/ui/legacy/components/data_grid/data_grid.js +1 -0
  633. package/dist/third-party/front_end/ui/legacy/components/inline_editor/inline_editor-legacy.js +1 -0
  634. package/dist/third-party/front_end/ui/legacy/components/inline_editor/inline_editor.js +1 -0
  635. package/dist/third-party/front_end/ui/legacy/components/object_ui/object_ui-legacy.js +1 -0
  636. package/dist/third-party/front_end/ui/legacy/components/object_ui/object_ui-meta.js +1 -0
  637. package/dist/third-party/front_end/ui/legacy/components/object_ui/object_ui.js +1 -0
  638. package/dist/third-party/front_end/ui/legacy/components/perf_ui/perf_ui-legacy.js +1 -0
  639. package/dist/third-party/front_end/ui/legacy/components/perf_ui/perf_ui-meta.js +1 -0
  640. package/dist/third-party/front_end/ui/legacy/components/perf_ui/perf_ui.js +12 -0
  641. package/dist/third-party/front_end/ui/legacy/components/quick_open/quick_open-legacy.js +1 -0
  642. package/dist/third-party/front_end/ui/legacy/components/quick_open/quick_open-meta.js +1 -0
  643. package/dist/third-party/front_end/ui/legacy/components/quick_open/quick_open.js +1 -0
  644. package/dist/third-party/front_end/ui/legacy/components/source_frame/source_frame-legacy.js +1 -0
  645. package/dist/third-party/front_end/ui/legacy/components/source_frame/source_frame-meta.js +1 -0
  646. package/dist/third-party/front_end/ui/legacy/components/source_frame/source_frame.js +1 -0
  647. package/dist/third-party/front_end/ui/legacy/components/utils/utils-legacy.js +1 -0
  648. package/dist/third-party/front_end/ui/legacy/components/utils/utils.js +1 -0
  649. package/dist/third-party/front_end/ui/legacy/legacy-legacy.js +1 -0
  650. package/dist/third-party/front_end/ui/legacy/legacy.js +1 -0
  651. package/dist/third-party/front_end/ui/legacy/theme_support/theme_support.js +1 -0
  652. package/dist/third-party/front_end/ui/legacy/utils/utils.js +1 -0
  653. package/dist/third-party/front_end/ui/lit-html/lit-html.js +1 -0
  654. package/dist/third-party/front_end/worker_app.html +20 -0
  655. package/index.js +15 -0
  656. package/package.json +25 -0
@@ -0,0 +1 @@
1
+ var e,t,n;!function(e){e.CSS="css",e.ARIA="aria",e.Text="text",e.XPath="xpath",e.Pierce="pierce"}(e=e||(e={})),function(e){e.Change="change",e.Click="click",e.Close="close",e.CustomStep="customStep",e.DoubleClick="doubleClick",e.EmulateNetworkConditions="emulateNetworkConditions",e.Hover="hover",e.KeyDown="keyDown",e.KeyUp="keyUp",e.Navigate="navigate",e.Scroll="scroll",e.SetViewport="setViewport",e.WaitForElement="waitForElement",e.WaitForExpression="waitForExpression"}(t=t||(t={})),function(e){e.Navigation="navigation"}(n=n||(n={}));var r=Object.freeze({__proto__:null,get SelectorType(){return e},get StepType(){return t},get AssertedEventType(){return n}});function a(e){throw new Error(`Unknown step type: ${e.type}`)}const i=new Set(["textarea","text","url","tel","search","password","number","email"]),o=new Set(["mouse","pen","touch"]),s=new Map([["primary","left"],["auxiliary","middle"],["secondary","right"],["back","back"],["forward","forward"]]);function l(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))return!1;return void 0!==e[t]}function c(e){return"object"==typeof e&&null!==e}function u(e){return"string"==typeof e}function p(e){return"number"==typeof e}function f(e){return Array.isArray(e)}function w(e){if(l(e,"target")&&u(e.target))return e.target}function d(e){if(l(e,"frame")){if(f(t=e.frame)&&t.every((e=>Number.isInteger(e))))return e.frame;throw new Error("Step `frame` is not an integer array")}var t}function h(e,t){if(l(e,t)){const n=e[t];if(p(n))return n}throw new Error(`Step.${t} is not a number`)}function m(e,t){if(l(e,t)){const n=e[t];if("boolean"==typeof n)return n}throw new Error(`Step.${t} is not a boolean`)}function y(e,t){if(l(e,t))return h(e,t)}function g(e,t){if(l(e,t))return b(e,t)}function v(e,t){if(l(e,t))return m(e,t)}function b(e,t){if(l(e,t)){const n=e[t];if(u(n))return n}throw new Error(`Step.${t} is not a string`)}function E(e){if(!l(e,"selectors"))throw new Error("Step does not have required selectors");if(!f(e.selectors))throw new Error("Step selectors are not an array");if(0===e.selectors.length)throw new Error("Step does not have required selectors");return e.selectors.map((e=>{if(!u(e)&&!f(e))throw new Error("Selector is not an array or string");return f(e)?e.map((e=>{if(!u(e))throw new Error("Selector element is not a string");return e})):e}))}function S(e){if(l(e,"selectors"))return E(e)}function L(e){if(!c(e))throw new Error("Asserted event is not an object");if(!l(e,"type"))throw new Error("Asserted event is missing type");if(e.type===n.Navigation)return{type:n.Navigation,url:g(e,"url"),title:g(e,"title")};throw new Error("Unknown assertedEvent type")}function k(e){if(f(e))return e.map(L)}function F(e,t){if(l(t,"timeout")&&p(t.timeout)&&!P(t.timeout))throw new Error(j);return{type:e,assertedEvents:l(t,"assertedEvents")?k(t.assertedEvents):void 0,timeout:l(t,"timeout")&&p(t.timeout)?t.timeout:void 0}}function A(e,t){return{...F(e,t),target:w(t)}}function C(e,t){return{...A(e,t),frame:d(t)}}function $(e,t){return{...C(e,t),selectors:E(t)}}function x(e){const t={offsetX:h(e,"offsetX"),offsetY:h(e,"offsetY"),duration:y(e,"duration")},n=g(e,"deviceType");if(n){if("string"!=typeof(r=n)||!o.has(r))throw new Error(`'deviceType' for click steps must be one of the following: ${[...o].join(", ")}`);t.deviceType=n}var r;const a=g(e,"button");if(a){if(!function(e){return"string"==typeof e&&s.has(e)}(a))throw new Error(`'button' for click steps must be one of the following: ${[...s.keys()].join(", ")}`);t.button=a}return t}function T(e,n){if(!c(e))throw new Error(n?`Step ${n} is not an object`:"Step is not an object");if(!l(e,"type"))throw new Error(n?`Step ${n} does not have a type`:"Step does not have a type");if(!u(e.type))throw new Error(n?`Type of the step ${n} is not a string`:"Type of the step is not a string");switch(e.type){case t.Click:return function(e){return{...$(t.Click,e),...x(e),type:t.Click}}(e);case t.DoubleClick:return function(e){return{...$(t.DoubleClick,e),...x(e),type:t.DoubleClick}}(e);case t.Hover:return function(e){return{...$(t.Hover,e),type:t.Hover}}(e);case t.Change:return function(e){return{...$(t.Change,e),type:t.Change,value:b(e,"value")}}(e);case t.KeyDown:return function(e){return{...A(t.KeyDown,e),type:t.KeyDown,key:b(e,"key")}}(e);case t.KeyUp:return function(e){return{...A(t.KeyUp,e),type:t.KeyUp,key:b(e,"key")}}(e);case t.EmulateNetworkConditions:return function(e){return{...A(t.EmulateNetworkConditions,e),type:t.EmulateNetworkConditions,download:h(e,"download"),upload:h(e,"upload"),latency:h(e,"latency")}}(e);case t.Close:return function(e){return{...A(t.Close,e),type:t.Close}}(e);case t.SetViewport:return function(e){return{...A(t.SetViewport,e),type:t.SetViewport,width:h(e,"width"),height:h(e,"height"),deviceScaleFactor:h(e,"deviceScaleFactor"),isMobile:m(e,"isMobile"),hasTouch:m(e,"hasTouch"),isLandscape:m(e,"isLandscape")}}(e);case t.Scroll:return function(e){return{...C(t.Scroll,e),type:t.Scroll,x:y(e,"x"),y:y(e,"y"),selectors:S(e)}}(e);case t.Navigate:return function(e){return{...A(t.Navigate,e),type:t.Navigate,target:w(e),url:b(e,"url")}}(e);case t.CustomStep:return function(e){if(!l(e,"name"))throw new Error("customStep is missing name");if(!u(e.name))throw new Error("customStep's name is not a string");return{...C(t.CustomStep,e),type:t.CustomStep,name:e.name,parameters:l(e,"parameters")?e.parameters:void 0}}(e);case t.WaitForElement:return function(e){const n=g(e,"operator");if(n&&">="!==n&&"=="!==n&&"<="!==n)throw new Error("WaitForElement step's operator is not one of '>=','==','<='");if(l(e,"attributes")&&(!c(e.attributes)||Object.values(e.attributes).some((e=>"string"!=typeof e))))throw new Error("WaitForElement step's attribute is not a dictionary of strings");if(l(e,"properties")&&!c(e.properties))throw new Error("WaitForElement step's attribute is not an object");return{...$(t.WaitForElement,e),type:t.WaitForElement,operator:n,count:y(e,"count"),visible:v(e,"visible"),attributes:l(e,"attributes")?e.attributes:void 0,properties:l(e,"properties")?e.properties:void 0}}(e);case t.WaitForExpression:return function(e){if(!l(e,"expression"))throw new Error("waitForExpression step is missing `expression`");return{...C(t.WaitForExpression,e),type:t.WaitForExpression,expression:b(e,"expression")}}(e);default:throw new Error(`Step type ${e.type} is not supported`)}}function I(e){const t=[];if(!f(e))throw new Error("Recording `steps` is not an array");for(const[n,r]of e.entries())t.push(T(r,n));return t}const N=1,V=3e4,j="Timeout is not between 1 and 30000 milliseconds";function P(e){return e>=1&&e<=3e4}function W(e){if(!c(e))throw new Error("Recording is not an object");if(!l(e,"title"))throw new Error("Recording is missing `title`");if(!u(e.title))throw new Error("Recording `title` is not a string");if(l(e,"timeout")&&!p(e.timeout))throw new Error("Recording `timeout` is not a number");if(!l(e,"steps"))throw new Error("Recording is missing `steps`");if(l(e,"timeout")&&p(e.timeout)&&!P(e.timeout))throw new Error(j);return t={title:e.title,timeout:l(e,"timeout")&&p(e.timeout)?e.timeout:void 0,selectorAttribute:l(e,"selectorAttribute")&&u(e.selectorAttribute)?e.selectorAttribute:void 0,steps:I(e.steps)},JSON.parse(JSON.stringify(t));var t}function O(t){for(const n of Object.values(e))if(t.startsWith(`${n}/`))return n;return e.CSS}class R{async beforeAllSteps(e,t){}async afterAllSteps(e,t){}async beforeEachStep(e,t,n){}async stringifyStep(e,t,n){}async afterEachStep(e,t,n){}}class M extends R{async beforeAllSteps(e,t){const n={...t,steps:void 0},r=JSON.stringify(n,null,e.getIndent()).split("\n");r.pop(),r[r.length-1]+=",",r.push(e.getIndent()+'"steps": ['),e.appendLine(r.join("\n")).startBlock().startBlock()}async afterAllSteps(e){e.endBlock().endBlock().appendLine(e.getIndent()+"]").appendLine("}")}async stringifyStep(e,t,n){const r=JSON.stringify(t,null,e.getIndent());if(!n)return void e.appendLine(r);const a=n.steps.lastIndexOf(t)===n.steps.length-1?"":",";e.appendLine(r+a)}}function B(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function D(e,t,n,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?a.call(e,n):a?a.value=n:t.set(e,n),n}var H,K,U;class q{constructor(e){H.set(this,void 0),K.set(this,0),U.set(this,[]),D(this,H,e,"f")}appendLine(e){const t=e.split("\n").map((e=>e?B(this,H,"f").repeat(B(this,K,"f"))+e.trimEnd():""));return B(this,U,"f").push(...t),this}startBlock(){var e;return D(this,K,(e=B(this,K,"f"),++e),"f"),this}endBlock(){var e;return D(this,K,(e=B(this,K,"f"),--e),"f"),this}toString(){return B(this,U,"f").join("\n")+"\n"}getIndent(){return B(this,H,"f")}getSize(){return B(this,U,"f").length}}function X(e,t){const n=[];return J(e,n,1,t),n.join("")}function J(e,t=[],n=1,r=" "){switch(typeof e){case"bigint":case"symbol":case"function":case"undefined":throw new Error("Invalid JSON");case"number":case"boolean":t.push(String(e));break;case"string":t.push(z(e));break;case"object":if(null===e)t.push("null");else if(Array.isArray(e)){t.push("[\n");for(let a=0;a<e.length;a++)t.push(r.repeat(n)),J(e[a],t,n+1,r),a!==e.length-1&&t.push(","),t.push("\n");t.push(r.repeat(n-1)+"]")}else{t.push("{\n");const a=Object.keys(e);for(let i=0;i<a.length;i++){const o=a[i],s=e[o];void 0!==s&&(t.push(r.repeat(n)),t.push(o),t.push(": "),J(s,t,n+1,r),i!==a.length-1&&t.push(","),t.push("\n"))}t.push(r.repeat(n-1)+"}")}break;default:throw new Error("Unknown object type")}return t}H=new WeakMap,K=new WeakMap,U=new WeakMap;const Y=(e,t)=>e.toString(16).toUpperCase().padStart(t,"0"),_=new Map([["\b","\\b"],["\f","\\f"],["\n","\\n"],["\r","\\r"],["\t","\\t"],["\v","\\v"],["'","\\'"],["\\","\\\\"],["\x3c!--","\\x3C!--"],["<script","\\x3Cscript"],["</script","\\x3C/script"]]),z=e=>{const t=/(\\|<(?:!--|\/?script))|(\p{Control})|(\p{Surrogate})/gu,n=/(\\|'|<(?:!--|\/?script))|(\p{Control})|(\p{Surrogate})/gu,r=(e,t,n,r)=>{if(n){if(_.has(n))return _.get(n);return"\\x"+Y(n.charCodeAt(0),2)}if(r){return"\\u"+Y(r.charCodeAt(0),4)}return t?_.get(t)||"":e};let a="",i="";return e.includes("'")?e.includes('"')?e.includes("`")||e.includes("${")?(i="'",a=e.replace(n,r)):(i="`",a=e.replace(t,r)):(i='"',a=e.replace(t,r)):(i="'",a=e.replace(t,r)),`${i}${a}${i}`};var G,Q,Z,ee,te,ne,re,ae,ie,oe,se,le,ce,ue,pe,fe,we,de,he;class me extends R{constructor(){super(...arguments),G.add(this)}async beforeAllSteps(e,t){e.appendLine("const puppeteer = require('puppeteer'); // v13.0.0 or later"),e.appendLine(""),e.appendLine("(async () => {").startBlock(),e.appendLine("const browser = await puppeteer.launch();"),e.appendLine("const page = await browser.newPage();"),e.appendLine(`const timeout = ${t.timeout||ye};`),e.appendLine("page.setDefaultTimeout(timeout);"),e.appendLine("")}async afterAllSteps(e,t){e.appendLine(""),e.appendLine("await browser.close();"),e.appendLine("");for(const t of ge.split("\n"))e.appendLine(t);e.endBlock().appendLine("})().catch(err => {").startBlock(),e.appendLine("console.error(err);"),e.appendLine("process.exit(1);"),e.endBlock().appendLine("});")}async stringifyStep(e,t,r){if(e.appendLine("{").startBlock(),void 0!==t.timeout&&e.appendLine(`const timeout = ${t.timeout};`),B(this,G,"m",ee).call(this,e,t),t.assertedEvents){e.appendLine("const promises = [];");for(const r of t.assertedEvents){if(r.type!==n.Navigation)throw new Error(`Event type ${r.type} is not supported`);e.appendLine(`promises.push(${"frame"in t&&t.frame?"frame":"targetPage"}.waitForNavigation());`)}}B(this,G,"m",fe).call(this,e,t),t.assertedEvents&&e.appendLine("await Promise.all(promises);"),e.endBlock().appendLine("}")}}G=new WeakSet,Q=function(e,t){"main"===t?e.appendLine("const targetPage = page;"):(e.appendLine(`const target = await browser.waitForTarget(t => t.url() === ${X(t,e.getIndent())}, { timeout });`),e.appendLine("const targetPage = await target.page();"),e.appendLine("targetPage.setDefaultTimeout(timeout);"))},Z=function(e,t){e.appendLine("let frame = targetPage.mainFrame();");for(const n of t)e.appendLine(`frame = frame.childFrames()[${n}];`)},ee=function(e,t){B(this,G,"m",Q).call(this,e,t.target||"main"),t.frame&&B(this,G,"m",Z).call(this,e,t.frame)},te=function(e,t){e.appendLine(`await scrollIntoViewIfNeeded(${X(t.selectors,e.getIndent())}, ${t.frame?"frame":"targetPage"}, timeout);`),e.appendLine(`const element = await waitForSelectors(${X(t.selectors,e.getIndent())}, ${t.frame?"frame":"targetPage"}, { timeout, visible: true });`)},ne=function(e,t){B(this,G,"m",te).call(this,e,t),e.appendLine("await element.click({"),t.duration&&e.appendLine(` delay: ${t.duration},`),t.button&&e.appendLine(` button: '${s.get(t.button)}',`),e.appendLine(" offset: {"),e.appendLine(` x: ${t.offsetX},`),e.appendLine(` y: ${t.offsetY},`),e.appendLine(" },"),e.appendLine("});")},re=function(e,t){B(this,G,"m",te).call(this,e,t),e.appendLine("await element.click({"),t.button&&e.appendLine(` button: '${s.get(t.button)}',`),e.appendLine(" offset: {"),e.appendLine(` x: ${t.offsetX},`),e.appendLine(` y: ${t.offsetY},`),e.appendLine(" },"),e.appendLine("});"),e.appendLine("await element.click({"),e.appendLine(" clickCount: 2,"),t.duration&&e.appendLine(` delay: ${t.duration},`),t.button&&e.appendLine(` button: '${s.get(t.button)}',`),e.appendLine(" offset: {"),e.appendLine(` x: ${t.offsetX},`),e.appendLine(` y: ${t.offsetY},`),e.appendLine(" },"),e.appendLine("});")},ae=function(e,t){B(this,G,"m",te).call(this,e,t),e.appendLine("await element.hover();")},ie=function(e,t){B(this,G,"m",te).call(this,e,t),e.appendLine("const inputType = await element.evaluate(el => el.type);"),e.appendLine("if (inputType === 'select-one') {"),e.appendLine(` await changeSelectElement(element, ${X(t.value,e.getIndent())})`),e.appendLine(`} else if (${X(Array.from(i),e.getIndent())}.includes(inputType)) {`),e.appendLine(` await typeIntoElement(element, ${X(t.value,e.getIndent())});`),e.appendLine("} else {"),e.appendLine(` await changeElementValue(element, ${X(t.value,e.getIndent())});`),e.appendLine("}")},oe=function(e,t){e.appendLine("await targetPage.emulateNetworkConditions({"),e.appendLine(` offline: ${!t.download&&!t.upload},`),e.appendLine(` downloadThroughput: ${t.download},`),e.appendLine(` uploadThroughput: ${t.upload},`),e.appendLine(` latency: ${t.latency},`),e.appendLine("});")},se=function(e,t){e.appendLine(`await targetPage.keyboard.down(${X(t.key,e.getIndent())});`)},le=function(e,t){e.appendLine(`await targetPage.keyboard.up(${X(t.key,e.getIndent())});`)},ce=function(e,t){e.appendLine("await targetPage.close()")},ue=function(e,t){e.appendLine(`await targetPage.setViewport(${X({width:t.width,height:t.height},e.getIndent())})`)},pe=function(e,t){"selectors"in t?(B(this,G,"m",te).call(this,e,t),e.appendLine(`await element.evaluate((el, x, y) => { el.scrollTop = y; el.scrollLeft = x; }, ${t.x}, ${t.y});`)):e.appendLine(`await targetPage.evaluate((x, y) => { window.scroll(x, y); }, ${t.x}, ${t.y})`)},fe=function(e,n){switch(n.type){case t.Click:return B(this,G,"m",ne).call(this,e,n);case t.DoubleClick:return B(this,G,"m",re).call(this,e,n);case t.Hover:return B(this,G,"m",ae).call(this,e,n);case t.Change:return B(this,G,"m",ie).call(this,e,n);case t.EmulateNetworkConditions:return B(this,G,"m",oe).call(this,e,n);case t.KeyDown:return B(this,G,"m",se).call(this,e,n);case t.KeyUp:return B(this,G,"m",le).call(this,e,n);case t.Close:return B(this,G,"m",ce).call(this,e,n);case t.SetViewport:return B(this,G,"m",ue).call(this,e,n);case t.Scroll:return B(this,G,"m",pe).call(this,e,n);case t.Navigate:return B(this,G,"m",we).call(this,e,n);case t.WaitForElement:return B(this,G,"m",he).call(this,e,n);case t.WaitForExpression:return B(this,G,"m",de).call(this,e,n);case t.CustomStep:return;default:return a(n)}},we=function(e,t){e.appendLine(`await targetPage.goto(${X(t.url,e.getIndent())});`)},de=function(e,t){e.appendLine(`await ${t.frame?"frame":"targetPage"}.waitForFunction(${X(t.expression,e.getIndent())}, { timeout });`)},he=function(e,t){e.appendLine(`await waitForElement(${X(t,e.getIndent())}, ${t.frame?"frame":"targetPage"}, timeout);`)};const ye=5e3,ge="async function waitForSelectors(selectors, frame, options) {\n for (const selector of selectors) {\n try {\n return await waitForSelector(selector, frame, options);\n } catch (err) {\n console.error(err);\n }\n }\n throw new Error('Could not find element for selectors: ' + JSON.stringify(selectors));\n}\n\nasync function scrollIntoViewIfNeeded(selectors, frame, timeout) {\n const element = await waitForSelectors(selectors, frame, { visible: false, timeout });\n if (!element) {\n throw new Error(\n 'The element could not be found.'\n );\n }\n await waitForConnected(element, timeout);\n const isInViewport = await element.isIntersectingViewport({threshold: 0});\n if (isInViewport) {\n return;\n }\n await element.evaluate(element => {\n element.scrollIntoView({\n block: 'center',\n inline: 'center',\n behavior: 'auto',\n });\n });\n await waitForInViewport(element, timeout);\n}\n\nasync function waitForConnected(element, timeout) {\n await waitForFunction(async () => {\n return await element.getProperty('isConnected');\n }, timeout);\n}\n\nasync function waitForInViewport(element, timeout) {\n await waitForFunction(async () => {\n return await element.isIntersectingViewport({threshold: 0});\n }, timeout);\n}\n\nasync function waitForSelector(selector, frame, options) {\n if (!Array.isArray(selector)) {\n selector = [selector];\n }\n if (!selector.length) {\n throw new Error('Empty selector provided to waitForSelector');\n }\n let element = null;\n for (let i = 0; i < selector.length; i++) {\n const part = selector[i];\n if (element) {\n element = await element.waitForSelector(part, options);\n } else {\n element = await frame.waitForSelector(part, options);\n }\n if (!element) {\n throw new Error('Could not find element: ' + selector.join('>>'));\n }\n if (i < selector.length - 1) {\n element = (await element.evaluateHandle(el => el.shadowRoot ? el.shadowRoot : el)).asElement();\n }\n }\n if (!element) {\n throw new Error('Could not find element: ' + selector.join('|'));\n }\n return element;\n}\n\nasync function waitForElement(step, frame, timeout) {\n const {\n count = 1,\n operator = '>=',\n visible = true,\n properties,\n attributes,\n } = step;\n const compFn = {\n '==': (a, b) => a === b,\n '>=': (a, b) => a >= b,\n '<=': (a, b) => a <= b,\n }[operator];\n await waitForFunction(async () => {\n const elements = await querySelectorsAll(step.selectors, frame);\n let result = compFn(elements.length, count);\n const elementsHandle = await frame.evaluateHandle((...elements) => {\n return elements;\n }, ...elements);\n await Promise.all(elements.map((element) => element.dispose()));\n if (result && (properties || attributes)) {\n result = await elementsHandle.evaluate(\n (elements, properties, attributes) => {\n for (const element of elements) {\n if (attributes) {\n for (const [name, value] of Object.entries(attributes)) {\n if (element.getAttribute(name) !== value) {\n return false;\n }\n }\n }\n if (properties) {\n if (!isDeepMatch(properties, element)) {\n return false;\n }\n }\n }\n return true;\n\n function isDeepMatch(a, b) {\n if (a === b) {\n return true;\n }\n if ((a && !b) || (!a && b)) {\n return false;\n }\n if (!(a instanceof Object) || !(b instanceof Object)) {\n return false;\n }\n for (const [key, value] of Object.entries(a)) {\n if (!isDeepMatch(value, b[key])) {\n return false;\n }\n }\n return true;\n }\n },\n properties,\n attributes\n );\n }\n await elementsHandle.dispose();\n return result === visible;\n }, timeout);\n}\n\nasync function querySelectorsAll(selectors, frame) {\n for (const selector of selectors) {\n const result = await querySelectorAll(selector, frame);\n if (result.length) {\n return result;\n }\n }\n return [];\n}\n\nasync function querySelectorAll(selector, frame) {\n if (!Array.isArray(selector)) {\n selector = [selector];\n }\n if (!selector.length) {\n throw new Error('Empty selector provided to querySelectorAll');\n }\n let elements = [];\n for (let i = 0; i < selector.length; i++) {\n const part = selector[i];\n if (i === 0) {\n elements = await frame.$$(part);\n } else {\n const tmpElements = elements;\n elements = [];\n for (const el of tmpElements) {\n elements.push(...(await el.$$(part)));\n }\n }\n if (elements.length === 0) {\n return [];\n }\n if (i < selector.length - 1) {\n const tmpElements = [];\n for (const el of elements) {\n const newEl = (await el.evaluateHandle(el => el.shadowRoot ? el.shadowRoot : el)).asElement();\n if (newEl) {\n tmpElements.push(newEl);\n }\n }\n elements = tmpElements;\n }\n }\n return elements;\n}\n\nasync function waitForFunction(fn, timeout) {\n let isActive = true;\n const timeoutId = setTimeout(() => {\n isActive = false;\n }, timeout);\n while (isActive) {\n const result = await fn();\n if (result) {\n clearTimeout(timeoutId);\n return;\n }\n await new Promise(resolve => setTimeout(resolve, 100));\n }\n throw new Error('Timed out');\n}\n\nasync function changeSelectElement(element, value) {\n await element.select(value);\n await element.evaluateHandle((e) => {\n e.blur();\n e.focus();\n });\n}\n\nasync function changeElementValue(element, value) {\n await element.focus();\n await element.evaluate((input, value) => {\n input.value = value;\n input.dispatchEvent(new Event('input', { bubbles: true }));\n input.dispatchEvent(new Event('change', { bubbles: true }));\n }, value);\n}\n\nasync function typeIntoElement(element, value) {\n const textToType = await element.evaluate((input, newValue) => {\n if (\n newValue.length <= input.value.length ||\n !newValue.startsWith(input.value)\n ) {\n input.value = '';\n return newValue;\n }\n const originalValue = input.value;\n input.value = '';\n input.value = originalValue;\n return newValue.substring(originalValue.length);\n }, value);\n await element.type(textToType);\n}",ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=ve.split("").reduce(((e,t,n)=>(e.set(t,n),e)),new Map);function Ee(e){if(e<0)throw new Error("Only postive integers and zero are supported");if(e>2147483647)throw new Error("Only integers between 0 and 2147483647 are supported");const t=[];do{let n=31&e;(e>>>=5)>0&&(n|=32),t.push(ve[n])}while(0!==e);return t.join("")}function Se(e){const t=[],n=e.split("");let r=0,a=0;for(const e of n){const n=be.get(e);r|=(31&n)<<a,a+=5;32&n||(t.push(r),r=0,a=0)}return t}async function Le(e,t){var n,r,a,i,o,s,l;t||(t={});const c=null!==(n=t.extension)&&void 0!==n?n:new me,u=null!==(r=t.writer)&&void 0!==r?r:new q(null!==(a=t.indentation)&&void 0!==a?a:" ");await(null===(i=c.beforeAllSteps)||void 0===i?void 0:i.call(c,u,e));const p=[1];for(const t of e.steps){const n=u.getSize();await(null===(o=c.beforeEachStep)||void 0===o?void 0:o.call(c,u,t,e)),await c.stringifyStep(u,t,e),await(null===(s=c.afterEachStep)||void 0===s?void 0:s.call(c,u,t,e));const r=u.getSize();p.push(n,r-n)}return await(null===(l=c.afterAllSteps)||void 0===l?void 0:l.call(c,u,e)),u.appendLine("//# recorderSourceMap="+function(e){const t=[];for(const n of e)t.push(Ee(n));return t.join("")}(p)),u.toString()}async function ke(e,t){var n,r,a,i;t||(t={});let o=t.extension;o||(o=new me),t.indentation||(t.indentation=" ");const s=null!==(n=t.writer)&&void 0!==n?n:new q(null!==(r=t.indentation)&&void 0!==r?r:" ");return await(null===(a=o.beforeEachStep)||void 0===a?void 0:a.call(o,s,e)),await o.stringifyStep(s,e),await(null===(i=o.afterEachStep)||void 0===i?void 0:i.call(o,s,e)),s.toString()}function Fe(e){return e.trim().startsWith("//# recorderSourceMap=")}function Ae(e){const t=e.split("\n");for(let e=t.length-1;e>=0;e--){const n=t[e];if(Fe(n))return Se(n.trim().substring("//# recorderSourceMap=".length))}}function Ce(e){return e.split("\n").filter((e=>!Fe(e))).join("\n")}class $e{async beforeAllSteps(e){}async afterAllSteps(e){}async beforeEachStep(e,t){}async runStep(e,t){}async afterEachStep(e,t){}}var xe,Te,Ie;const Ne={"==":(e,t)=>e===t,">=":(e,t)=>e>=t,"<=":(e,t)=>e<=t};class Ve extends $e{constructor(e,t,n){super(),xe.add(this),this.browser=e,this.page=t,this.timeout=(null==n?void 0:n.timeout)||5e3}async runStep(e,t){const n=B(this,xe,"m",Ie).call(this,e,t),r=this.page,a=this.browser,i=await async function(e,t,n,r){if(!n.target||"main"===n.target)return t;const a=await e.waitForTarget((e=>e.url()===n.target),{timeout:r}),i=await a.page();if(!i)return null;return i.setDefaultTimeout(r),i}(a,r,e,n);let o=null;if(!i&&e.target){const t=r.frames();for(const n of t)if(n.isOOPFrame()&&n.url()===e.target){o=n;break}o||(o=await r.waitForFrame(e.target,{timeout:n}))}const s=o||i;if(!s)throw new Error("Target is not found for step: "+JSON.stringify(e));await B(this,xe,"m",Te).call(this,s);const l=await async function(e,t){let n="mainFrame"in e?e.mainFrame():e;if("frame"in t&&t.frame)for(const e of t.frame)n=n.childFrames()[e];return n}(s,e);await this.runStepInFrame(e,r,s,l,n)}async runStepInFrame(e,r,o,l,c){const u=!0;let p=null;const f=()=>{p=async function(e,t,r){const a=[];if(t.assertedEvents)for(const i of t.assertedEvents){if(i.type!==n.Navigation)throw new Error(`Event type ${i.type} is not supported`);a.push(e.waitForNavigation({timeout:r}))}await Promise.all(a)}(l,e,c)};switch(e.type){case t.DoubleClick:{await Pe(e.selectors,l,c);const t=await We(e.selectors,l,{timeout:c,visible:u});if(!t)throw new Error("Could not find element: "+e.selectors[0]);f(),await t.click({button:e.button&&s.get(e.button),offset:{x:e.offsetX,y:e.offsetY}}),await t.click({clickCount:2,button:e.button&&s.get(e.button),delay:e.duration,offset:{x:e.offsetX,y:e.offsetY}}),await t.dispose()}break;case t.Click:{await Pe(e.selectors,l,c);const t=await We(e.selectors,l,{timeout:c,visible:u});if(!t)throw new Error("Could not find element: "+e.selectors[0]);f(),await t.click({delay:e.duration,button:e.button&&s.get(e.button),offset:{x:e.offsetX,y:e.offsetY}}),await t.dispose()}break;case t.Hover:{await Pe(e.selectors,l,c);const t=await We(e.selectors,l,{timeout:c,visible:u});if(!t)throw new Error("Could not find element: "+e.selectors[0]);f(),await t.hover(),await t.dispose()}break;case t.EmulateNetworkConditions:f(),await r.emulateNetworkConditions(e);break;case t.KeyDown:f(),await r.keyboard.down(e.key),await r.waitForTimeout(100);break;case t.KeyUp:f(),await r.keyboard.up(e.key),await r.waitForTimeout(100);break;case t.Close:"close"in o&&(f(),await o.close());break;case t.Change:{await Pe(e.selectors,l,c);const t=await We(e.selectors,l,{timeout:c,visible:u});if(!t)throw new Error("Could not find element: "+e.selectors[0]);const n=await t.evaluate((e=>e.type));f(),"select-one"===n?await this.changeSelectElement(e,t):i.has(n)?await this.typeIntoElement(e,t):await this.changeElementValue(e,t),await t.dispose()}break;case t.SetViewport:"setViewport"in o&&(f(),await o.setViewport(e));break;case t.Scroll:if("selectors"in e){await Pe(e.selectors,l,c);const t=await We(e.selectors,l,{timeout:c,visible:u});f(),await t.evaluate(((e,t,n)=>{e.scrollTop=n,e.scrollLeft=t}),e.x||0,e.y||0),await t.dispose()}else f(),await l.evaluate(((e,t)=>{window.scroll(e,t)}),e.x||0,e.y||0);break;case t.Navigate:f(),await l.goto(e.url);break;case t.WaitForElement:try{f(),await async function(e,t,n){const{count:r=1,operator:a=">=",visible:i=!0,properties:o,attributes:s}=e,l=Ne[a];await Me((async()=>{const n=await async function(e,t){for(const n of e){const e=await Re(n,t);if(e.length)return e}return[]}(e.selectors,t);let a=l(n.length,r);const c=await t.evaluateHandle(((...e)=>e),...n);return await Promise.all(n.map((e=>e.dispose()))),a&&(o||s)&&(a=await c.evaluate(((e,t,n)=>{if(n)for(const t of e)for(const[e,r]of Object.entries(n))if(t.getAttribute(e)!==r)return!1;if(t)for(const n of e)if(!r(t,n))return!1;return!0;function r(e,t){if(e===t)return!0;if(e&&!t||!e&&t)return!1;if(!(e instanceof Object&&t instanceof Object))return!1;for(const[n,a]of Object.entries(e))if(!r(a,t[n]))return!1;return!0}}),o,s)),await c.dispose(),a===i}),n)}(e,l,c)}catch(e){throw"Timed out"===e.message?new Error("waitForElement timed out. The element(s) could not be found."):e}break;case t.WaitForExpression:f(),await l.waitForFunction(e.expression,{timeout:c});break;case t.CustomStep:break;default:a(e)}await p}async typeIntoElement(e,t){const n=await t.evaluate(((e,t)=>{if(t.length<=e.value.length||!t.startsWith(e.value))return e.value="",t;const n=e.value;return e.value="",e.value=n,t.substring(n.length)}),e.value);await t.type(n)}async changeElementValue(e,t){await t.focus(),await t.evaluate(((e,t)=>{e.value=t,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}),e.value)}async changeSelectElement(e,t){await t.select(e.value),await t.evaluateHandle((e=>{e.blur(),e.focus()}))}}xe=new WeakSet,Te=async function(e){try{await e._client().send("Emulation.setAutomationOverride",{enabled:!0})}catch{}},Ie=function(e,t){return e.timeout||(null==t?void 0:t.timeout)||this.timeout};class je extends Ve{async afterAllSteps(){await this.browser.close()}}async function Pe(e,t,n){const r=await We(e,t,{visible:!1,timeout:n});if(!r)throw new Error("The element could not be found.");await async function(e,t){await Me((async()=>await e.evaluate((e=>e.isConnected))),t)}(r,n);const a=await(async e=>await e.evaluate((e=>e instanceof SVGElement))?e:null)(r),i=a?await async function(e){return await e.evaluateHandle((e=>{var t;return null!==(t=e.ownerSVGElement)&&void 0!==t?t:e}))}(a):r;!!i&&await i.isIntersectingViewport({threshold:0})||(await async function(e){await e.evaluate((e=>{e.scrollIntoView({block:"center",inline:"center",behavior:"auto"})}))}(r),i&&await async function(e,t){await Me((async()=>await e.isIntersectingViewport({threshold:0})),t)}(i,n),await i.dispose(),i!==r&&await r.dispose())}async function We(e,t,n){for(const r of e)try{return await Oe(r,t,n)}catch(e){console.error("error in waitForSelectors",e)}throw new Error("Could not find element for selectors: "+JSON.stringify(e))}async function Oe(e,t,n){if(Array.isArray(e)||(e=[e]),!e.length)throw new Error("Empty selector provided to `waitForSelector`");let r=1===e.length,a=await t.waitForSelector(e[0],{...n,visible:r&&n.visible});for(const t of e.slice(1,e.length)){if(!a)throw new Error("Could not find element: "+e.join(">>"));const i=await a.evaluateHandle((e=>e.shadowRoot?e.shadowRoot:e));a.dispose(),r=e[e.length-1]===t,a=await i.waitForSelector(t,{...n,visible:r&&n.visible}),i.dispose()}if(!a)throw new Error("Could not find element: "+e.join(">>"));return a}async function Re(e,t){if(Array.isArray(e)||(e=[e]),!e.length)throw new Error("Empty selector provided to querySelectorAll");let n=await t.$$(e[0]);if(!n.length)return[];for(const t of e.slice(1,e.length))if(n=(await Promise.all(n.map((async e=>{const n=await e.evaluateHandle((e=>e.shadowRoot?e.shadowRoot:e)),r=await n.$$(t);return n.dispose(),e.dispose(),r})))).flat(),!n.length)return[];return n}async function Me(e,t){let n=!0;const r=setTimeout((()=>{n=!1}),t);for(;n;){if(await e())return void clearTimeout(r);await new Promise((e=>setTimeout(e,100)))}throw new Error("Timed out")}var Be,De,He,Ke,Ue,qe,Xe;async function Je(e,t,n){var r,a;await(null===(r=e.beforeEachStep)||void 0===r?void 0:r.call(e,t,n)),await e.runStep(t,n),await(null===(a=e.afterEachStep)||void 0===a?void 0:a.call(e,t,n))}class Ye{constructor(e){Be.set(this,void 0),De.set(this,void 0),He.set(this,!1),D(this,De,e,"f")}abort(){D(this,He,!0,"f")}set flow(e){D(this,Be,e,"f")}async runBeforeAllSteps(e){var t,n;await(null===(n=(t=B(this,De,"f")).beforeAllSteps)||void 0===n?void 0:n.call(t,e))}async runAfterAllSteps(e){var t,n;await(null===(n=(t=B(this,De,"f")).afterAllSteps)||void 0===n?void 0:n.call(t,e))}async runStep(e){await Je(B(this,De,"f"),e)}async run(){var e,t,n,r,a,i;if(!B(this,Be,"f"))throw new Error("Set the flow on the runner instance before calling `run`.");const o=B(this,Be,"f");if(D(this,He,!1,"f"),await(null===(t=(e=B(this,De,"f")).beforeAllSteps)||void 0===t?void 0:t.call(e,o)),B(this,He,"f"))return!1;for(const e of o.steps){if(B(this,He,"f"))return await(null===(r=(n=B(this,De,"f")).afterAllSteps)||void 0===r?void 0:r.call(n,o)),!1;await Je(B(this,De,"f"),e,o)}return await(null===(i=(a=B(this,De,"f")).afterAllSteps)||void 0===i?void 0:i.call(a,o)),!0}}async function _e(e,t){const n=e instanceof $e?e:t,r=e instanceof $e?void 0:e,a=new Ye(null!=n?n:await async function(){const{default:e}=await import("puppeteer"),t=await e.launch({headless:!0}),n=await t.newPage();return new je(t,n)}());return r&&(a.flow=r),a}Be=new WeakMap,De=new WeakMap,He=new WeakMap;class ze extends R{async beforeAllSteps(e){e.appendLine("import url from 'url';"),e.appendLine("import { createRunner } from '@puppeteer/replay';"),e.appendLine(""),e.appendLine("export async function run(extension) {").startBlock(),e.appendLine("const runner = await createRunner(extension);"),e.appendLine(""),e.appendLine("await runner.runBeforeAllSteps();"),e.appendLine("")}async afterAllSteps(e){e.appendLine(""),e.appendLine("await runner.runAfterAllSteps();").endBlock().appendLine("}"),e.appendLine(""),e.appendLine("if (process && import.meta.url === url.pathToFileURL(process.argv[1]).href) {").startBlock().appendLine("run()").endBlock().appendLine("}")}async stringifyStep(e,t){e.appendLine(`await runner.runStep(${X(t,e.getIndent())});`)}}function Ge(e){var r;return Boolean(e.type===t.Navigate||(null===(r=e.assertedEvents)||void 0===r?void 0:r.some((e=>e.type===n.Navigation))))}function Qe(e){for(const n of e.steps)if(n.type===t.SetViewport)return n.isMobile;return!1}class Ze extends me{constructor(){super(...arguments),Ke.set(this,!1)}async beforeAllSteps(e,t){e.appendLine("const fs = require('fs');"),await super.beforeAllSteps(e,t),e.appendLine("const lhApi = await import('lighthouse'); // v10.0.0 or later");e.appendLine(`const flags = ${X({screenEmulation:{disabled:!0}},e.getIndent())}`),Qe(t)?e.appendLine("const config = undefined;"):e.appendLine("const config = lhApi.desktopConfig;"),e.appendLine(`const lhFlow = await lhApi.startFlow(page, {name: ${X(t.title,e.getIndent())}, config, flags});`)}async stringifyStep(e,n,r){if(n.type===t.SetViewport)return void await super.stringifyStep(e,n,r);const a=Ge(n);a?(B(this,Ke,"f")&&(e.appendLine("await lhFlow.endTimespan();"),D(this,Ke,!1,"f")),e.appendLine("await lhFlow.startNavigation();")):B(this,Ke,"f")||(e.appendLine("await lhFlow.startTimespan();"),D(this,Ke,!0,"f")),await super.stringifyStep(e,n,r),a&&e.appendLine("await lhFlow.endNavigation();")}async afterAllSteps(e,t){B(this,Ke,"f")&&e.appendLine("await lhFlow.endTimespan();"),e.appendLine("const lhFlowReport = await lhFlow.generateReport();"),e.appendLine("fs.writeFileSync(__dirname + '/flow.report.html', lhFlowReport)"),await super.afterAllSteps(e,t)}}Ke=new WeakMap;class et extends Ve{constructor(){super(...arguments),Ue.set(this,!1),qe.set(this,!1),Xe.set(this,void 0)}async createFlowResult(){if(!B(this,Xe,"f"))throw new Error("Cannot get flow result before running the flow");return B(this,Xe,"f").createFlowResult()}async beforeAllSteps(e){var t;await(null===(t=super.beforeAllSteps)||void 0===t?void 0:t.call(this,e));const{startFlow:n,desktopConfig:r}=await import("lighthouse");let a;Qe(e)||(a=r),D(this,Xe,await n(this.page,{config:a,flags:{screenEmulation:{disabled:!0}},name:e.title}),"f")}async beforeEachStep(e,n){var r;await(null===(r=super.beforeEachStep)||void 0===r?void 0:r.call(this,e,n)),e.type!==t.SetViewport&&(Ge(e)?(B(this,Ue,"f")&&(await B(this,Xe,"f").endTimespan(),D(this,Ue,!1,"f")),await B(this,Xe,"f").startNavigation(),D(this,qe,!0,"f")):B(this,Ue,"f")||(await B(this,Xe,"f").startTimespan(),D(this,Ue,!0,"f")))}async afterEachStep(e,t){var n;B(this,qe,"f")&&(await B(this,Xe,"f").endNavigation(),D(this,qe,!1,"f")),await(null===(n=super.afterEachStep)||void 0===n?void 0:n.call(this,e,t))}async afterAllSteps(e){var t;B(this,Ue,"f")&&await B(this,Xe,"f").endTimespan(),await(null===(t=super.afterAllSteps)||void 0===t?void 0:t.call(this,e))}}Ue=new WeakMap,qe=new WeakMap,Xe=new WeakMap;export{n as AssertedEventType,M as JSONStringifyExtension,et as LighthouseRunnerExtension,Ze as LighthouseStringifyExtension,ze as PuppeteerReplayStringifyExtension,Ve as PuppeteerRunnerExtension,je as PuppeteerRunnerOwningBrowserExtension,me as PuppeteerStringifyExtension,Ye as Runner,$e as RunnerExtension,r as Schema,e as SelectorType,t as StepType,R as StringifyExtension,a as assertAllStepTypesAreHandled,_e as createRunner,z as formatAsJSLiteral,X as formatJSONAsJS,O as getSelectorType,V as maxTimeout,N as minTimeout,s as mouseButtonMap,W as parse,Ae as parseSourceMap,T as parseStep,o as pointerDeviceTypes,Le as stringify,ke as stringifyStep,Ce as stripSourceMap,i as typeableInputTypes,P as validTimeout};
@@ -0,0 +1 @@
1
+ var e,t;!function(e){e[e.Unknown=-1]="Unknown",e[e.Custom=0]="Custom",e[e.Type=1]="Type",e[e.Import=2]="Import",e[e.Function=3]="Function",e[e.Table=4]="Table",e[e.Memory=5]="Memory",e[e.Global=6]="Global",e[e.Export=7]="Export",e[e.Start=8]="Start",e[e.Element=9]="Element",e[e.Code=10]="Code",e[e.Data=11]="Data",e[e.Event=13]="Event"}(e||(e={})),function(e){e[e.unreachable=0]="unreachable",e[e.nop=1]="nop",e[e.block=2]="block",e[e.loop=3]="loop",e[e.if=4]="if",e[e.else=5]="else",e[e.try=6]="try",e[e.catch=7]="catch",e[e.throw=8]="throw",e[e.rethrow=9]="rethrow",e[e.unwind=10]="unwind",e[e.end=11]="end",e[e.br=12]="br",e[e.br_if=13]="br_if",e[e.br_table=14]="br_table",e[e.return=15]="return",e[e.call=16]="call",e[e.call_indirect=17]="call_indirect",e[e.return_call=18]="return_call",e[e.return_call_indirect=19]="return_call_indirect",e[e.call_ref=20]="call_ref",e[e.return_call_ref=21]="return_call_ref",e[e.let=23]="let",e[e.delegate=24]="delegate",e[e.catch_all=25]="catch_all",e[e.drop=26]="drop",e[e.select=27]="select",e[e.select_with_type=28]="select_with_type",e[e.local_get=32]="local_get",e[e.local_set=33]="local_set",e[e.local_tee=34]="local_tee",e[e.global_get=35]="global_get",e[e.global_set=36]="global_set",e[e.i32_load=40]="i32_load",e[e.i64_load=41]="i64_load",e[e.f32_load=42]="f32_load",e[e.f64_load=43]="f64_load",e[e.i32_load8_s=44]="i32_load8_s",e[e.i32_load8_u=45]="i32_load8_u",e[e.i32_load16_s=46]="i32_load16_s",e[e.i32_load16_u=47]="i32_load16_u",e[e.i64_load8_s=48]="i64_load8_s",e[e.i64_load8_u=49]="i64_load8_u",e[e.i64_load16_s=50]="i64_load16_s",e[e.i64_load16_u=51]="i64_load16_u",e[e.i64_load32_s=52]="i64_load32_s",e[e.i64_load32_u=53]="i64_load32_u",e[e.i32_store=54]="i32_store",e[e.i64_store=55]="i64_store",e[e.f32_store=56]="f32_store",e[e.f64_store=57]="f64_store",e[e.i32_store8=58]="i32_store8",e[e.i32_store16=59]="i32_store16",e[e.i64_store8=60]="i64_store8",e[e.i64_store16=61]="i64_store16",e[e.i64_store32=62]="i64_store32",e[e.current_memory=63]="current_memory",e[e.grow_memory=64]="grow_memory",e[e.i32_const=65]="i32_const",e[e.i64_const=66]="i64_const",e[e.f32_const=67]="f32_const",e[e.f64_const=68]="f64_const",e[e.i32_eqz=69]="i32_eqz",e[e.i32_eq=70]="i32_eq",e[e.i32_ne=71]="i32_ne",e[e.i32_lt_s=72]="i32_lt_s",e[e.i32_lt_u=73]="i32_lt_u",e[e.i32_gt_s=74]="i32_gt_s",e[e.i32_gt_u=75]="i32_gt_u",e[e.i32_le_s=76]="i32_le_s",e[e.i32_le_u=77]="i32_le_u",e[e.i32_ge_s=78]="i32_ge_s",e[e.i32_ge_u=79]="i32_ge_u",e[e.i64_eqz=80]="i64_eqz",e[e.i64_eq=81]="i64_eq",e[e.i64_ne=82]="i64_ne",e[e.i64_lt_s=83]="i64_lt_s",e[e.i64_lt_u=84]="i64_lt_u",e[e.i64_gt_s=85]="i64_gt_s",e[e.i64_gt_u=86]="i64_gt_u",e[e.i64_le_s=87]="i64_le_s",e[e.i64_le_u=88]="i64_le_u",e[e.i64_ge_s=89]="i64_ge_s",e[e.i64_ge_u=90]="i64_ge_u",e[e.f32_eq=91]="f32_eq",e[e.f32_ne=92]="f32_ne",e[e.f32_lt=93]="f32_lt",e[e.f32_gt=94]="f32_gt",e[e.f32_le=95]="f32_le",e[e.f32_ge=96]="f32_ge",e[e.f64_eq=97]="f64_eq",e[e.f64_ne=98]="f64_ne",e[e.f64_lt=99]="f64_lt",e[e.f64_gt=100]="f64_gt",e[e.f64_le=101]="f64_le",e[e.f64_ge=102]="f64_ge",e[e.i32_clz=103]="i32_clz",e[e.i32_ctz=104]="i32_ctz",e[e.i32_popcnt=105]="i32_popcnt",e[e.i32_add=106]="i32_add",e[e.i32_sub=107]="i32_sub",e[e.i32_mul=108]="i32_mul",e[e.i32_div_s=109]="i32_div_s",e[e.i32_div_u=110]="i32_div_u",e[e.i32_rem_s=111]="i32_rem_s",e[e.i32_rem_u=112]="i32_rem_u",e[e.i32_and=113]="i32_and",e[e.i32_or=114]="i32_or",e[e.i32_xor=115]="i32_xor",e[e.i32_shl=116]="i32_shl",e[e.i32_shr_s=117]="i32_shr_s",e[e.i32_shr_u=118]="i32_shr_u",e[e.i32_rotl=119]="i32_rotl",e[e.i32_rotr=120]="i32_rotr",e[e.i64_clz=121]="i64_clz",e[e.i64_ctz=122]="i64_ctz",e[e.i64_popcnt=123]="i64_popcnt",e[e.i64_add=124]="i64_add",e[e.i64_sub=125]="i64_sub",e[e.i64_mul=126]="i64_mul",e[e.i64_div_s=127]="i64_div_s",e[e.i64_div_u=128]="i64_div_u",e[e.i64_rem_s=129]="i64_rem_s",e[e.i64_rem_u=130]="i64_rem_u",e[e.i64_and=131]="i64_and",e[e.i64_or=132]="i64_or",e[e.i64_xor=133]="i64_xor",e[e.i64_shl=134]="i64_shl",e[e.i64_shr_s=135]="i64_shr_s",e[e.i64_shr_u=136]="i64_shr_u",e[e.i64_rotl=137]="i64_rotl",e[e.i64_rotr=138]="i64_rotr",e[e.f32_abs=139]="f32_abs",e[e.f32_neg=140]="f32_neg",e[e.f32_ceil=141]="f32_ceil",e[e.f32_floor=142]="f32_floor",e[e.f32_trunc=143]="f32_trunc",e[e.f32_nearest=144]="f32_nearest",e[e.f32_sqrt=145]="f32_sqrt",e[e.f32_add=146]="f32_add",e[e.f32_sub=147]="f32_sub",e[e.f32_mul=148]="f32_mul",e[e.f32_div=149]="f32_div",e[e.f32_min=150]="f32_min",e[e.f32_max=151]="f32_max",e[e.f32_copysign=152]="f32_copysign",e[e.f64_abs=153]="f64_abs",e[e.f64_neg=154]="f64_neg",e[e.f64_ceil=155]="f64_ceil",e[e.f64_floor=156]="f64_floor",e[e.f64_trunc=157]="f64_trunc",e[e.f64_nearest=158]="f64_nearest",e[e.f64_sqrt=159]="f64_sqrt",e[e.f64_add=160]="f64_add",e[e.f64_sub=161]="f64_sub",e[e.f64_mul=162]="f64_mul",e[e.f64_div=163]="f64_div",e[e.f64_min=164]="f64_min",e[e.f64_max=165]="f64_max",e[e.f64_copysign=166]="f64_copysign",e[e.i32_wrap_i64=167]="i32_wrap_i64",e[e.i32_trunc_f32_s=168]="i32_trunc_f32_s",e[e.i32_trunc_f32_u=169]="i32_trunc_f32_u",e[e.i32_trunc_f64_s=170]="i32_trunc_f64_s",e[e.i32_trunc_f64_u=171]="i32_trunc_f64_u",e[e.i64_extend_i32_s=172]="i64_extend_i32_s",e[e.i64_extend_i32_u=173]="i64_extend_i32_u",e[e.i64_trunc_f32_s=174]="i64_trunc_f32_s",e[e.i64_trunc_f32_u=175]="i64_trunc_f32_u",e[e.i64_trunc_f64_s=176]="i64_trunc_f64_s",e[e.i64_trunc_f64_u=177]="i64_trunc_f64_u",e[e.f32_convert_i32_s=178]="f32_convert_i32_s",e[e.f32_convert_i32_u=179]="f32_convert_i32_u",e[e.f32_convert_i64_s=180]="f32_convert_i64_s",e[e.f32_convert_i64_u=181]="f32_convert_i64_u",e[e.f32_demote_f64=182]="f32_demote_f64",e[e.f64_convert_i32_s=183]="f64_convert_i32_s",e[e.f64_convert_i32_u=184]="f64_convert_i32_u",e[e.f64_convert_i64_s=185]="f64_convert_i64_s",e[e.f64_convert_i64_u=186]="f64_convert_i64_u",e[e.f64_promote_f32=187]="f64_promote_f32",e[e.i32_reinterpret_f32=188]="i32_reinterpret_f32",e[e.i64_reinterpret_f64=189]="i64_reinterpret_f64",e[e.f32_reinterpret_i32=190]="f32_reinterpret_i32",e[e.f64_reinterpret_i64=191]="f64_reinterpret_i64",e[e.i32_extend8_s=192]="i32_extend8_s",e[e.i32_extend16_s=193]="i32_extend16_s",e[e.i64_extend8_s=194]="i64_extend8_s",e[e.i64_extend16_s=195]="i64_extend16_s",e[e.i64_extend32_s=196]="i64_extend32_s",e[e.prefix_0xfb=251]="prefix_0xfb",e[e.prefix_0xfc=252]="prefix_0xfc",e[e.prefix_0xfd=253]="prefix_0xfd",e[e.prefix_0xfe=254]="prefix_0xfe",e[e.i32_trunc_sat_f32_s=64512]="i32_trunc_sat_f32_s",e[e.i32_trunc_sat_f32_u=64513]="i32_trunc_sat_f32_u",e[e.i32_trunc_sat_f64_s=64514]="i32_trunc_sat_f64_s",e[e.i32_trunc_sat_f64_u=64515]="i32_trunc_sat_f64_u",e[e.i64_trunc_sat_f32_s=64516]="i64_trunc_sat_f32_s",e[e.i64_trunc_sat_f32_u=64517]="i64_trunc_sat_f32_u",e[e.i64_trunc_sat_f64_s=64518]="i64_trunc_sat_f64_s",e[e.i64_trunc_sat_f64_u=64519]="i64_trunc_sat_f64_u",e[e.memory_init=64520]="memory_init",e[e.data_drop=64521]="data_drop",e[e.memory_copy=64522]="memory_copy",e[e.memory_fill=64523]="memory_fill",e[e.table_init=64524]="table_init",e[e.elem_drop=64525]="elem_drop",e[e.table_copy=64526]="table_copy",e[e.table_grow=64527]="table_grow",e[e.table_size=64528]="table_size",e[e.table_fill=64529]="table_fill",e[e.table_get=37]="table_get",e[e.table_set=38]="table_set",e[e.ref_null=208]="ref_null",e[e.ref_is_null=209]="ref_is_null",e[e.ref_func=210]="ref_func",e[e.ref_as_non_null=211]="ref_as_non_null",e[e.br_on_null=212]="br_on_null",e[e.ref_eq=213]="ref_eq",e[e.br_on_non_null=214]="br_on_non_null",e[e.atomic_notify=65024]="atomic_notify",e[e.i32_atomic_wait=65025]="i32_atomic_wait",e[e.i64_atomic_wait=65026]="i64_atomic_wait",e[e.atomic_fence=65027]="atomic_fence",e[e.i32_atomic_load=65040]="i32_atomic_load",e[e.i64_atomic_load=65041]="i64_atomic_load",e[e.i32_atomic_load8_u=65042]="i32_atomic_load8_u",e[e.i32_atomic_load16_u=65043]="i32_atomic_load16_u",e[e.i64_atomic_load8_u=65044]="i64_atomic_load8_u",e[e.i64_atomic_load16_u=65045]="i64_atomic_load16_u",e[e.i64_atomic_load32_u=65046]="i64_atomic_load32_u",e[e.i32_atomic_store=65047]="i32_atomic_store",e[e.i64_atomic_store=65048]="i64_atomic_store",e[e.i32_atomic_store8=65049]="i32_atomic_store8",e[e.i32_atomic_store16=65050]="i32_atomic_store16",e[e.i64_atomic_store8=65051]="i64_atomic_store8",e[e.i64_atomic_store16=65052]="i64_atomic_store16",e[e.i64_atomic_store32=65053]="i64_atomic_store32",e[e.i32_atomic_rmw_add=65054]="i32_atomic_rmw_add",e[e.i64_atomic_rmw_add=65055]="i64_atomic_rmw_add",e[e.i32_atomic_rmw8_add_u=65056]="i32_atomic_rmw8_add_u",e[e.i32_atomic_rmw16_add_u=65057]="i32_atomic_rmw16_add_u",e[e.i64_atomic_rmw8_add_u=65058]="i64_atomic_rmw8_add_u",e[e.i64_atomic_rmw16_add_u=65059]="i64_atomic_rmw16_add_u",e[e.i64_atomic_rmw32_add_u=65060]="i64_atomic_rmw32_add_u",e[e.i32_atomic_rmw_sub=65061]="i32_atomic_rmw_sub",e[e.i64_atomic_rmw_sub=65062]="i64_atomic_rmw_sub",e[e.i32_atomic_rmw8_sub_u=65063]="i32_atomic_rmw8_sub_u",e[e.i32_atomic_rmw16_sub_u=65064]="i32_atomic_rmw16_sub_u",e[e.i64_atomic_rmw8_sub_u=65065]="i64_atomic_rmw8_sub_u",e[e.i64_atomic_rmw16_sub_u=65066]="i64_atomic_rmw16_sub_u",e[e.i64_atomic_rmw32_sub_u=65067]="i64_atomic_rmw32_sub_u",e[e.i32_atomic_rmw_and=65068]="i32_atomic_rmw_and",e[e.i64_atomic_rmw_and=65069]="i64_atomic_rmw_and",e[e.i32_atomic_rmw8_and_u=65070]="i32_atomic_rmw8_and_u",e[e.i32_atomic_rmw16_and_u=65071]="i32_atomic_rmw16_and_u",e[e.i64_atomic_rmw8_and_u=65072]="i64_atomic_rmw8_and_u",e[e.i64_atomic_rmw16_and_u=65073]="i64_atomic_rmw16_and_u",e[e.i64_atomic_rmw32_and_u=65074]="i64_atomic_rmw32_and_u",e[e.i32_atomic_rmw_or=65075]="i32_atomic_rmw_or",e[e.i64_atomic_rmw_or=65076]="i64_atomic_rmw_or",e[e.i32_atomic_rmw8_or_u=65077]="i32_atomic_rmw8_or_u",e[e.i32_atomic_rmw16_or_u=65078]="i32_atomic_rmw16_or_u",e[e.i64_atomic_rmw8_or_u=65079]="i64_atomic_rmw8_or_u",e[e.i64_atomic_rmw16_or_u=65080]="i64_atomic_rmw16_or_u",e[e.i64_atomic_rmw32_or_u=65081]="i64_atomic_rmw32_or_u",e[e.i32_atomic_rmw_xor=65082]="i32_atomic_rmw_xor",e[e.i64_atomic_rmw_xor=65083]="i64_atomic_rmw_xor",e[e.i32_atomic_rmw8_xor_u=65084]="i32_atomic_rmw8_xor_u",e[e.i32_atomic_rmw16_xor_u=65085]="i32_atomic_rmw16_xor_u",e[e.i64_atomic_rmw8_xor_u=65086]="i64_atomic_rmw8_xor_u",e[e.i64_atomic_rmw16_xor_u=65087]="i64_atomic_rmw16_xor_u",e[e.i64_atomic_rmw32_xor_u=65088]="i64_atomic_rmw32_xor_u",e[e.i32_atomic_rmw_xchg=65089]="i32_atomic_rmw_xchg",e[e.i64_atomic_rmw_xchg=65090]="i64_atomic_rmw_xchg",e[e.i32_atomic_rmw8_xchg_u=65091]="i32_atomic_rmw8_xchg_u",e[e.i32_atomic_rmw16_xchg_u=65092]="i32_atomic_rmw16_xchg_u",e[e.i64_atomic_rmw8_xchg_u=65093]="i64_atomic_rmw8_xchg_u",e[e.i64_atomic_rmw16_xchg_u=65094]="i64_atomic_rmw16_xchg_u",e[e.i64_atomic_rmw32_xchg_u=65095]="i64_atomic_rmw32_xchg_u",e[e.i32_atomic_rmw_cmpxchg=65096]="i32_atomic_rmw_cmpxchg",e[e.i64_atomic_rmw_cmpxchg=65097]="i64_atomic_rmw_cmpxchg",e[e.i32_atomic_rmw8_cmpxchg_u=65098]="i32_atomic_rmw8_cmpxchg_u",e[e.i32_atomic_rmw16_cmpxchg_u=65099]="i32_atomic_rmw16_cmpxchg_u",e[e.i64_atomic_rmw8_cmpxchg_u=65100]="i64_atomic_rmw8_cmpxchg_u",e[e.i64_atomic_rmw16_cmpxchg_u=65101]="i64_atomic_rmw16_cmpxchg_u",e[e.i64_atomic_rmw32_cmpxchg_u=65102]="i64_atomic_rmw32_cmpxchg_u",e[e.v128_load=64768]="v128_load",e[e.i16x8_load8x8_s=64769]="i16x8_load8x8_s",e[e.i16x8_load8x8_u=64770]="i16x8_load8x8_u",e[e.i32x4_load16x4_s=64771]="i32x4_load16x4_s",e[e.i32x4_load16x4_u=64772]="i32x4_load16x4_u",e[e.i64x2_load32x2_s=64773]="i64x2_load32x2_s",e[e.i64x2_load32x2_u=64774]="i64x2_load32x2_u",e[e.v8x16_load_splat=64775]="v8x16_load_splat",e[e.v16x8_load_splat=64776]="v16x8_load_splat",e[e.v32x4_load_splat=64777]="v32x4_load_splat",e[e.v64x2_load_splat=64778]="v64x2_load_splat",e[e.v128_store=64779]="v128_store",e[e.v128_const=64780]="v128_const",e[e.i8x16_shuffle=64781]="i8x16_shuffle",e[e.i8x16_swizzle=64782]="i8x16_swizzle",e[e.i8x16_splat=64783]="i8x16_splat",e[e.i16x8_splat=64784]="i16x8_splat",e[e.i32x4_splat=64785]="i32x4_splat",e[e.i64x2_splat=64786]="i64x2_splat",e[e.f32x4_splat=64787]="f32x4_splat",e[e.f64x2_splat=64788]="f64x2_splat",e[e.i8x16_extract_lane_s=64789]="i8x16_extract_lane_s",e[e.i8x16_extract_lane_u=64790]="i8x16_extract_lane_u",e[e.i8x16_replace_lane=64791]="i8x16_replace_lane",e[e.i16x8_extract_lane_s=64792]="i16x8_extract_lane_s",e[e.i16x8_extract_lane_u=64793]="i16x8_extract_lane_u",e[e.i16x8_replace_lane=64794]="i16x8_replace_lane",e[e.i32x4_extract_lane=64795]="i32x4_extract_lane",e[e.i32x4_replace_lane=64796]="i32x4_replace_lane",e[e.i64x2_extract_lane=64797]="i64x2_extract_lane",e[e.i64x2_replace_lane=64798]="i64x2_replace_lane",e[e.f32x4_extract_lane=64799]="f32x4_extract_lane",e[e.f32x4_replace_lane=64800]="f32x4_replace_lane",e[e.f64x2_extract_lane=64801]="f64x2_extract_lane",e[e.f64x2_replace_lane=64802]="f64x2_replace_lane",e[e.i8x16_eq=64803]="i8x16_eq",e[e.i8x16_ne=64804]="i8x16_ne",e[e.i8x16_lt_s=64805]="i8x16_lt_s",e[e.i8x16_lt_u=64806]="i8x16_lt_u",e[e.i8x16_gt_s=64807]="i8x16_gt_s",e[e.i8x16_gt_u=64808]="i8x16_gt_u",e[e.i8x16_le_s=64809]="i8x16_le_s",e[e.i8x16_le_u=64810]="i8x16_le_u",e[e.i8x16_ge_s=64811]="i8x16_ge_s",e[e.i8x16_ge_u=64812]="i8x16_ge_u",e[e.i16x8_eq=64813]="i16x8_eq",e[e.i16x8_ne=64814]="i16x8_ne",e[e.i16x8_lt_s=64815]="i16x8_lt_s",e[e.i16x8_lt_u=64816]="i16x8_lt_u",e[e.i16x8_gt_s=64817]="i16x8_gt_s",e[e.i16x8_gt_u=64818]="i16x8_gt_u",e[e.i16x8_le_s=64819]="i16x8_le_s",e[e.i16x8_le_u=64820]="i16x8_le_u",e[e.i16x8_ge_s=64821]="i16x8_ge_s",e[e.i16x8_ge_u=64822]="i16x8_ge_u",e[e.i32x4_eq=64823]="i32x4_eq",e[e.i32x4_ne=64824]="i32x4_ne",e[e.i32x4_lt_s=64825]="i32x4_lt_s",e[e.i32x4_lt_u=64826]="i32x4_lt_u",e[e.i32x4_gt_s=64827]="i32x4_gt_s",e[e.i32x4_gt_u=64828]="i32x4_gt_u",e[e.i32x4_le_s=64829]="i32x4_le_s",e[e.i32x4_le_u=64830]="i32x4_le_u",e[e.i32x4_ge_s=64831]="i32x4_ge_s",e[e.i32x4_ge_u=64832]="i32x4_ge_u",e[e.f32x4_eq=64833]="f32x4_eq",e[e.f32x4_ne=64834]="f32x4_ne",e[e.f32x4_lt=64835]="f32x4_lt",e[e.f32x4_gt=64836]="f32x4_gt",e[e.f32x4_le=64837]="f32x4_le",e[e.f32x4_ge=64838]="f32x4_ge",e[e.f64x2_eq=64839]="f64x2_eq",e[e.f64x2_ne=64840]="f64x2_ne",e[e.f64x2_lt=64841]="f64x2_lt",e[e.f64x2_gt=64842]="f64x2_gt",e[e.f64x2_le=64843]="f64x2_le",e[e.f64x2_ge=64844]="f64x2_ge",e[e.v128_not=64845]="v128_not",e[e.v128_and=64846]="v128_and",e[e.v128_andnot=64847]="v128_andnot",e[e.v128_or=64848]="v128_or",e[e.v128_xor=64849]="v128_xor",e[e.v128_bitselect=64850]="v128_bitselect",e[e.v128_any_true=64851]="v128_any_true",e[e.v128_load8_lane=64852]="v128_load8_lane",e[e.v128_load16_lane=64853]="v128_load16_lane",e[e.v128_load32_lane=64854]="v128_load32_lane",e[e.v128_load64_lane=64855]="v128_load64_lane",e[e.v128_store8_lane=64856]="v128_store8_lane",e[e.v128_store16_lane=64857]="v128_store16_lane",e[e.v128_store32_lane=64858]="v128_store32_lane",e[e.v128_store64_lane=64859]="v128_store64_lane",e[e.v128_load32_zero=64860]="v128_load32_zero",e[e.v128_load64_zero=64861]="v128_load64_zero",e[e.f32x4_demote_f64x2_zero=64862]="f32x4_demote_f64x2_zero",e[e.f64x2_promote_low_f32x4=64863]="f64x2_promote_low_f32x4",e[e.i8x16_abs=64864]="i8x16_abs",e[e.i8x16_neg=64865]="i8x16_neg",e[e.i8x16_popcnt=64866]="i8x16_popcnt",e[e.i8x16_all_true=64867]="i8x16_all_true",e[e.i8x16_bitmask=64868]="i8x16_bitmask",e[e.i8x16_narrow_i16x8_s=64869]="i8x16_narrow_i16x8_s",e[e.i8x16_narrow_i16x8_u=64870]="i8x16_narrow_i16x8_u",e[e.f32x4_ceil=64871]="f32x4_ceil",e[e.f32x4_floor=64872]="f32x4_floor",e[e.f32x4_trunc=64873]="f32x4_trunc",e[e.f32x4_nearest=64874]="f32x4_nearest",e[e.i8x16_shl=64875]="i8x16_shl",e[e.i8x16_shr_s=64876]="i8x16_shr_s",e[e.i8x16_shr_u=64877]="i8x16_shr_u",e[e.i8x16_add=64878]="i8x16_add",e[e.i8x16_add_sat_s=64879]="i8x16_add_sat_s",e[e.i8x16_add_sat_u=64880]="i8x16_add_sat_u",e[e.i8x16_sub=64881]="i8x16_sub",e[e.i8x16_sub_sat_s=64882]="i8x16_sub_sat_s",e[e.i8x16_sub_sat_u=64883]="i8x16_sub_sat_u",e[e.f64x2_ceil=64884]="f64x2_ceil",e[e.f64x2_floor=64885]="f64x2_floor",e[e.i8x16_min_s=64886]="i8x16_min_s",e[e.i8x16_min_u=64887]="i8x16_min_u",e[e.i8x16_max_s=64888]="i8x16_max_s",e[e.i8x16_max_u=64889]="i8x16_max_u",e[e.f64x2_trunc=64890]="f64x2_trunc",e[e.i8x16_avgr_u=64891]="i8x16_avgr_u",e[e.i16x8_extadd_pairwise_i8x16_s=64892]="i16x8_extadd_pairwise_i8x16_s",e[e.i16x8_extadd_pairwise_i8x16_u=64893]="i16x8_extadd_pairwise_i8x16_u",e[e.i32x4_extadd_pairwise_i16x8_s=64894]="i32x4_extadd_pairwise_i16x8_s",e[e.i32x4_extadd_pairwise_i16x8_u=64895]="i32x4_extadd_pairwise_i16x8_u",e[e.i16x8_abs=64896]="i16x8_abs",e[e.i16x8_neg=64897]="i16x8_neg",e[e.i16x8_q15mulr_sat_s=64898]="i16x8_q15mulr_sat_s",e[e.i16x8_all_true=64899]="i16x8_all_true",e[e.i16x8_bitmask=64900]="i16x8_bitmask",e[e.i16x8_narrow_i32x4_s=64901]="i16x8_narrow_i32x4_s",e[e.i16x8_narrow_i32x4_u=64902]="i16x8_narrow_i32x4_u",e[e.i16x8_extend_low_i8x16_s=64903]="i16x8_extend_low_i8x16_s",e[e.i16x8_extend_high_i8x16_s=64904]="i16x8_extend_high_i8x16_s",e[e.i16x8_extend_low_i8x16_u=64905]="i16x8_extend_low_i8x16_u",e[e.i16x8_extend_high_i8x16_u=64906]="i16x8_extend_high_i8x16_u",e[e.i16x8_shl=64907]="i16x8_shl",e[e.i16x8_shr_s=64908]="i16x8_shr_s",e[e.i16x8_shr_u=64909]="i16x8_shr_u",e[e.i16x8_add=64910]="i16x8_add",e[e.i16x8_add_sat_s=64911]="i16x8_add_sat_s",e[e.i16x8_add_sat_u=64912]="i16x8_add_sat_u",e[e.i16x8_sub=64913]="i16x8_sub",e[e.i16x8_sub_sat_s=64914]="i16x8_sub_sat_s",e[e.i16x8_sub_sat_u=64915]="i16x8_sub_sat_u",e[e.f64x2_nearest=64916]="f64x2_nearest",e[e.i16x8_mul=64917]="i16x8_mul",e[e.i16x8_min_s=64918]="i16x8_min_s",e[e.i16x8_min_u=64919]="i16x8_min_u",e[e.i16x8_max_s=64920]="i16x8_max_s",e[e.i16x8_max_u=64921]="i16x8_max_u",e[e.i16x8_avgr_u=64923]="i16x8_avgr_u",e[e.i16x8_extmul_low_i8x16_s=64924]="i16x8_extmul_low_i8x16_s",e[e.i16x8_extmul_high_i8x16_s=64925]="i16x8_extmul_high_i8x16_s",e[e.i16x8_extmul_low_i8x16_u=64926]="i16x8_extmul_low_i8x16_u",e[e.i16x8_extmul_high_i8x16_u=64927]="i16x8_extmul_high_i8x16_u",e[e.i32x4_abs=64928]="i32x4_abs",e[e.i32x4_neg=64929]="i32x4_neg",e[e.i32x4_all_true=64931]="i32x4_all_true",e[e.i32x4_bitmask=64932]="i32x4_bitmask",e[e.i32x4_extend_low_i16x8_s=64935]="i32x4_extend_low_i16x8_s",e[e.i32x4_extend_high_i16x8_s=64936]="i32x4_extend_high_i16x8_s",e[e.i32x4_extend_low_i16x8_u=64937]="i32x4_extend_low_i16x8_u",e[e.i32x4_extend_high_i16x8_u=64938]="i32x4_extend_high_i16x8_u",e[e.i32x4_shl=64939]="i32x4_shl",e[e.i32x4_shr_s=64940]="i32x4_shr_s",e[e.i32x4_shr_u=64941]="i32x4_shr_u",e[e.i32x4_add=64942]="i32x4_add",e[e.i32x4_sub=64945]="i32x4_sub",e[e.i32x4_mul=64949]="i32x4_mul",e[e.i32x4_min_s=64950]="i32x4_min_s",e[e.i32x4_min_u=64951]="i32x4_min_u",e[e.i32x4_max_s=64952]="i32x4_max_s",e[e.i32x4_max_u=64953]="i32x4_max_u",e[e.i32x4_dot_i16x8_s=64954]="i32x4_dot_i16x8_s",e[e.i32x4_extmul_low_i16x8_s=64956]="i32x4_extmul_low_i16x8_s",e[e.i32x4_extmul_high_i16x8_s=64957]="i32x4_extmul_high_i16x8_s",e[e.i32x4_extmul_low_i16x8_u=64958]="i32x4_extmul_low_i16x8_u",e[e.i32x4_extmul_high_i16x8_u=64959]="i32x4_extmul_high_i16x8_u",e[e.i64x2_abs=64960]="i64x2_abs",e[e.i64x2_neg=64961]="i64x2_neg",e[e.i64x2_all_true=64963]="i64x2_all_true",e[e.i64x2_bitmask=64964]="i64x2_bitmask",e[e.i64x2_extend_low_i32x4_s=64967]="i64x2_extend_low_i32x4_s",e[e.i64x2_extend_high_i32x4_s=64968]="i64x2_extend_high_i32x4_s",e[e.i64x2_extend_low_i32x4_u=64969]="i64x2_extend_low_i32x4_u",e[e.i64x2_extend_high_i32x4_u=64970]="i64x2_extend_high_i32x4_u",e[e.i64x2_shl=64971]="i64x2_shl",e[e.i64x2_shr_s=64972]="i64x2_shr_s",e[e.i64x2_shr_u=64973]="i64x2_shr_u",e[e.i64x2_add=64974]="i64x2_add",e[e.i64x2_sub=64977]="i64x2_sub",e[e.i64x2_mul=64981]="i64x2_mul",e[e.i64x2_eq=64982]="i64x2_eq",e[e.i64x2_ne=64983]="i64x2_ne",e[e.i64x2_lt_s=64984]="i64x2_lt_s",e[e.i64x2_gt_s=64985]="i64x2_gt_s",e[e.i64x2_le_s=64986]="i64x2_le_s",e[e.i64x2_ge_s=64987]="i64x2_ge_s",e[e.i64x2_extmul_low_i32x4_s=64988]="i64x2_extmul_low_i32x4_s",e[e.i64x2_extmul_high_i32x4_s=64989]="i64x2_extmul_high_i32x4_s",e[e.i64x2_extmul_low_i32x4_u=64990]="i64x2_extmul_low_i32x4_u",e[e.i64x2_extmul_high_i32x4_u=64991]="i64x2_extmul_high_i32x4_u",e[e.f32x4_abs=64992]="f32x4_abs",e[e.f32x4_neg=64993]="f32x4_neg",e[e.f32x4_sqrt=64995]="f32x4_sqrt",e[e.f32x4_add=64996]="f32x4_add",e[e.f32x4_sub=64997]="f32x4_sub",e[e.f32x4_mul=64998]="f32x4_mul",e[e.f32x4_div=64999]="f32x4_div",e[e.f32x4_min=65e3]="f32x4_min",e[e.f32x4_max=65001]="f32x4_max",e[e.f32x4_pmin=65002]="f32x4_pmin",e[e.f32x4_pmax=65003]="f32x4_pmax",e[e.f64x2_abs=65004]="f64x2_abs",e[e.f64x2_neg=65005]="f64x2_neg",e[e.f64x2_sqrt=65007]="f64x2_sqrt",e[e.f64x2_add=65008]="f64x2_add",e[e.f64x2_sub=65009]="f64x2_sub",e[e.f64x2_mul=65010]="f64x2_mul",e[e.f64x2_div=65011]="f64x2_div",e[e.f64x2_min=65012]="f64x2_min",e[e.f64x2_max=65013]="f64x2_max",e[e.f64x2_pmin=65014]="f64x2_pmin",e[e.f64x2_pmax=65015]="f64x2_pmax",e[e.i32x4_trunc_sat_f32x4_s=65016]="i32x4_trunc_sat_f32x4_s",e[e.i32x4_trunc_sat_f32x4_u=65017]="i32x4_trunc_sat_f32x4_u",e[e.f32x4_convert_i32x4_s=65018]="f32x4_convert_i32x4_s",e[e.f32x4_convert_i32x4_u=65019]="f32x4_convert_i32x4_u",e[e.i32x4_trunc_sat_f64x2_s_zero=65020]="i32x4_trunc_sat_f64x2_s_zero",e[e.i32x4_trunc_sat_f64x2_u_zero=65021]="i32x4_trunc_sat_f64x2_u_zero",e[e.f64x2_convert_low_i32x4_s=65022]="f64x2_convert_low_i32x4_s",e[e.f64x2_convert_low_i32x4_u=65023]="f64x2_convert_low_i32x4_u",e[e.struct_new_with_rtt=64257]="struct_new_with_rtt",e[e.struct_new_default_with_rtt=64258]="struct_new_default_with_rtt",e[e.struct_get=64259]="struct_get",e[e.struct_get_s=64260]="struct_get_s",e[e.struct_get_u=64261]="struct_get_u",e[e.struct_set=64262]="struct_set",e[e.struct_new=64263]="struct_new",e[e.struct_new_default=64264]="struct_new_default",e[e.array_new_with_rtt=64273]="array_new_with_rtt",e[e.array_new_default_with_rtt=64274]="array_new_default_with_rtt",e[e.array_get=64275]="array_get",e[e.array_get_s=64276]="array_get_s",e[e.array_get_u=64277]="array_get_u",e[e.array_set=64278]="array_set",e[e.array_len=64279]="array_len",e[e.array_copy=64280]="array_copy",e[e.array_init=64281]="array_init",e[e.array_init_static=64282]="array_init_static",e[e.array_new=64283]="array_new",e[e.array_new_default=64284]="array_new_default",e[e.i31_new=64288]="i31_new",e[e.i31_get_s=64289]="i31_get_s",e[e.i31_get_u=64290]="i31_get_u",e[e.rtt_canon=64304]="rtt_canon",e[e.rtt_sub=64305]="rtt_sub",e[e.rtt_fresh_sub=64306]="rtt_fresh_sub",e[e.ref_test=64320]="ref_test",e[e.ref_test_static=64324]="ref_test_static",e[e.ref_cast=64321]="ref_cast",e[e.ref_cast_static=64325]="ref_cast_static",e[e.br_on_cast=64322]="br_on_cast",e[e.br_on_cast_static=64326]="br_on_cast_static",e[e.br_on_cast_fail=64323]="br_on_cast_fail",e[e.br_on_cast_static_fail=64327]="br_on_cast_static_fail",e[e.ref_is_func=64336]="ref_is_func",e[e.ref_is_data=64337]="ref_is_data",e[e.ref_is_i31=64338]="ref_is_i31",e[e.ref_as_func=64344]="ref_as_func",e[e.ref_as_data=64345]="ref_as_data",e[e.ref_as_i31=64346]="ref_as_i31",e[e.br_on_func=64352]="br_on_func",e[e.br_on_data=64353]="br_on_data",e[e.br_on_i31=64354]="br_on_i31",e[e.br_on_non_func=64355]="br_on_non_func",e[e.br_on_non_data=64356]="br_on_non_data",e[e.br_on_non_i31=64357]="br_on_non_i31"}(t||(t={}));const s=["unreachable","nop","block","loop","if","else","try","catch","throw","rethrow","unwind","end","br","br_if","br_table","return","call","call_indirect","return_call","return_call_indirect","call_ref","return_call_ref",void 0,"let","delegate","catch_all","drop","select","select",void 0,void 0,void 0,"local.get","local.set","local.tee","global.get","global.set","table.get","table.set",void 0,"i32.load","i64.load","f32.load","f64.load","i32.load8_s","i32.load8_u","i32.load16_s","i32.load16_u","i64.load8_s","i64.load8_u","i64.load16_s","i64.load16_u","i64.load32_s","i64.load32_u","i32.store","i64.store","f32.store","f64.store","i32.store8","i32.store16","i64.store8","i64.store16","i64.store32","current_memory","memory.grow","i32.const","i64.const","f32.const","f64.const","i32.eqz","i32.eq","i32.ne","i32.lt_s","i32.lt_u","i32.gt_s","i32.gt_u","i32.le_s","i32.le_u","i32.ge_s","i32.ge_u","i64.eqz","i64.eq","i64.ne","i64.lt_s","i64.lt_u","i64.gt_s","i64.gt_u","i64.le_s","i64.le_u","i64.ge_s","i64.ge_u","f32.eq","f32.ne","f32.lt","f32.gt","f32.le","f32.ge","f64.eq","f64.ne","f64.lt","f64.gt","f64.le","f64.ge","i32.clz","i32.ctz","i32.popcnt","i32.add","i32.sub","i32.mul","i32.div_s","i32.div_u","i32.rem_s","i32.rem_u","i32.and","i32.or","i32.xor","i32.shl","i32.shr_s","i32.shr_u","i32.rotl","i32.rotr","i64.clz","i64.ctz","i64.popcnt","i64.add","i64.sub","i64.mul","i64.div_s","i64.div_u","i64.rem_s","i64.rem_u","i64.and","i64.or","i64.xor","i64.shl","i64.shr_s","i64.shr_u","i64.rotl","i64.rotr","f32.abs","f32.neg","f32.ceil","f32.floor","f32.trunc","f32.nearest","f32.sqrt","f32.add","f32.sub","f32.mul","f32.div","f32.min","f32.max","f32.copysign","f64.abs","f64.neg","f64.ceil","f64.floor","f64.trunc","f64.nearest","f64.sqrt","f64.add","f64.sub","f64.mul","f64.div","f64.min","f64.max","f64.copysign","i32.wrap_i64","i32.trunc_f32_s","i32.trunc_f32_u","i32.trunc_f64_s","i32.trunc_f64_u","i64.extend_i32_s","i64.extend_i32_u","i64.trunc_f32_s","i64.trunc_f32_u","i64.trunc_f64_s","i64.trunc_f64_u","f32.convert_i32_s","f32.convert_i32_u","f32.convert_i64_s","f32.convert_i64_u","f32.demote_f64","f64.convert_i32_s","f64.convert_i32_u","f64.convert_i64_s","f64.convert_i64_u","f64.promote_f32","i32.reinterpret_f32","i64.reinterpret_f64","f32.reinterpret_i32","f64.reinterpret_i64","i32.extend8_s","i32.extend16_s","i64.extend8_s","i64.extend16_s","i64.extend32_s",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"ref.null","ref.is_null","ref.func","ref.as_non_null","br_on_null","ref.eq","br_on_non_null",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];var a,i,r,_,n,c,o,h,u,d,l,f;["i32.trunc_sat_f32_s","i32.trunc_sat_f32_u","i32.trunc_sat_f64_s","i32.trunc_sat_f64_u","i64.trunc_sat_f32_s","i64.trunc_sat_f32_u","i64.trunc_sat_f64_s","i64.trunc_sat_f64_u","memory.init","data.drop","memory.copy","memory.fill","table.init","elem.drop","table.copy","table.grow","table.size","table.fill"].forEach(((e,t)=>{s[64512|t]=e})),["v128.load","i16x8.load8x8_s","i16x8.load8x8_u","i32x4.load16x4_s","i32x4.load16x4_u","i64x2.load32x2_s","i64x2.load32x2_u","v8x16.load_splat","v16x8.load_splat","v32x4.load_splat","v64x2.load_splat","v128.store","v128.const","i8x16.shuffle","i8x16.swizzle","i8x16.splat","i16x8.splat","i32x4.splat","i64x2.splat","f32x4.splat","f64x2.splat","i8x16.extract_lane_s","i8x16.extract_lane_u","i8x16.replace_lane","i16x8.extract_lane_s","i16x8.extract_lane_u","i16x8.replace_lane","i32x4.extract_lane","i32x4.replace_lane","i64x2.extract_lane","i64x2.replace_lane","f32x4.extract_lane","f32x4.replace_lane","f64x2.extract_lane","f64x2.replace_lane","i8x16.eq","i8x16.ne","i8x16.lt_s","i8x16.lt_u","i8x16.gt_s","i8x16.gt_u","i8x16.le_s","i8x16.le_u","i8x16.ge_s","i8x16.ge_u","i16x8.eq","i16x8.ne","i16x8.lt_s","i16x8.lt_u","i16x8.gt_s","i16x8.gt_u","i16x8.le_s","i16x8.le_u","i16x8.ge_s","i16x8.ge_u","i32x4.eq","i32x4.ne","i32x4.lt_s","i32x4.lt_u","i32x4.gt_s","i32x4.gt_u","i32x4.le_s","i32x4.le_u","i32x4.ge_s","i32x4.ge_u","f32x4.eq","f32x4.ne","f32x4.lt","f32x4.gt","f32x4.le","f32x4.ge","f64x2.eq","f64x2.ne","f64x2.lt","f64x2.gt","f64x2.le","f64x2.ge","v128.not","v128.and","v128.andnot","v128.or","v128.xor","v128.bitselect","v128.any_true","v128.load8_lane","v128.load16_lane","v128.load32_lane","v128.load64_lane","v128.store8_lane","v128.store16_lane","v128.store32_lane","v128.store64_lane","v128.load32_zero","v128.load64_zero","f32x4.demote_f64x2_zero","f64x2.promote_low_f32x4","i8x16.abs","i8x16.neg","i8x16_popcnt","i8x16.all_true","i8x16.bitmask","i8x16.narrow_i16x8_s","i8x16.narrow_i16x8_u","f32x4.ceil","f32x4.floor","f32x4.trunc","f32x4.nearest","i8x16.shl","i8x16.shr_s","i8x16.shr_u","i8x16.add","i8x16.add_sat_s","i8x16.add_sat_u","i8x16.sub","i8x16.sub_sat_s","i8x16.sub_sat_u","f64x2.ceil","f64x2.floor","i8x16.min_s","i8x16.min_u","i8x16.max_s","i8x16.max_u","f64x2.trunc","i8x16.avgr_u","i16x8.extadd_pairwise_i8x16_s","i16x8.extadd_pairwise_i8x16_u","i32x4.extadd_pairwise_i16x8_s","i32x4.extadd_pairwise_i16x8_u","i16x8.abs","i16x8.neg","i16x8.q15mulr_sat_s","i16x8.all_true","i16x8.bitmask","i16x8.narrow_i32x4_s","i16x8.narrow_i32x4_u","i16x8.extend_low_i8x16_s","i16x8.extend_high_i8x16_s","i16x8.extend_low_i8x16_u","i16x8.extend_high_i8x16_u","i16x8.shl","i16x8.shr_s","i16x8.shr_u","i16x8.add","i16x8.add_sat_s","i16x8.add_sat_u","i16x8.sub","i16x8.sub_sat_s","i16x8.sub_sat_u","f64x2.nearest","i16x8.mul","i16x8.min_s","i16x8.min_u","i16x8.max_s","i16x8.max_u",void 0,"i16x8.avgr_u","i16x8.extmul_low_i8x16_s","i16x8.extmul_high_i8x16_s","i16x8.extmul_low_i8x16_u","i16x8.extmul_high_i8x16_u","i32x4.abs","i32x4.neg",void 0,"i32x4.all_true","i32x4.bitmask",void 0,void 0,"i32x4.extend_low_i16x8_s","i32x4.extend_high_i16x8_s","i32x4.extend_low_i16x8_u","i32x4.extend_high_i16x8_u","i32x4.shl","i32x4.shr_s","i32x4.shr_u","i32x4.add",void 0,void 0,"i32x4.sub",void 0,void 0,void 0,"i32x4.mul","i32x4.min_s","i32x4.min_u","i32x4.max_s","i32x4.max_u","i32x4.dot_i16x8_s",void 0,"i32x4.extmul_low_i16x8_s","i32x4.extmul_high_i16x8_s","i32x4.extmul_low_i16x8_u","i32x4.extmul_high_i16x8_u","i64x2.abs","i64x2.neg",void 0,"i64x2.all_true","i64x2.bitmask",void 0,void 0,"i64x2.extend_low_i32x4_s","i64x2.extend_high_i32x4_s","i64x2.extend_low_i32x4_u","i64x2.extend_high_i32x4_u","i64x2.shl","i64x2.shr_s","i64x2.shr_u","i64x2.add",void 0,void 0,"i64x2.sub",void 0,void 0,void 0,"i64x2.mul","i64x2.eq","i64x2.ne","i64x2.lt_s","i64x2.gt_s","i64x2.le_s","i64x2.ge_s","i64x2.extmul_low_i32x4_s","i64x2.extmul_high_i32x4_s","i64x2.extmul_low_i32x4_u","i64x2.extmul_high_i32x4_u","f32x4.abs","f32x4.neg",void 0,"f32x4.sqrt","f32x4.add","f32x4.sub","f32x4.mul","f32x4.div","f32x4.min","f32x4.max","f32x4.pmin","f32x4.pmax","f64x2.abs","f64x2.neg",void 0,"f64x2.sqrt","f64x2.add","f64x2.sub","f64x2.mul","f64x2.div","f64x2.min","f64x2.max","f64x2.pmin","f64x2.pmax","i32x4.trunc_sat_f32x4_s","i32x4.trunc_sat_f32x4_u","f32x4.convert_i32x4_s","f32x4.convert_i32x4_u","i32x4.trunc_sat_f64x2_s_zero","i32x4.trunc_sat_f64x2_u_zero","f64x2.convert_low_i32x4_s","f64x2.convert_low_i32x4_u"].forEach(((e,t)=>{s[64768|t]=e})),["atomic.notify","i32.atomic.wait","i64.atomic.wait","atomic.fence",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"i32.atomic.load","i64.atomic.load","i32.atomic.load8_u","i32.atomic.load16_u","i64.atomic.load8_u","i64.atomic.load16_u","i64.atomic.load32_u","i32.atomic.store","i64.atomic.store","i32.atomic.store8","i32.atomic.store16","i64.atomic.store8","i64.atomic.store16","i64.atomic.store32","i32.atomic.rmw.add","i64.atomic.rmw.add","i32.atomic.rmw8.add_u","i32.atomic.rmw16.add_u","i64.atomic.rmw8.add_u","i64.atomic.rmw16.add_u","i64.atomic.rmw32.add_u","i32.atomic.rmw.sub","i64.atomic.rmw.sub","i32.atomic.rmw8.sub_u","i32.atomic.rmw16.sub_u","i64.atomic.rmw8.sub_u","i64.atomic.rmw16.sub_u","i64.atomic.rmw32.sub_u","i32.atomic.rmw.and","i64.atomic.rmw.and","i32.atomic.rmw8.and_u","i32.atomic.rmw16.and_u","i64.atomic.rmw8.and_u","i64.atomic.rmw16.and_u","i64.atomic.rmw32.and_u","i32.atomic.rmw.or","i64.atomic.rmw.or","i32.atomic.rmw8.or_u","i32.atomic.rmw16.or_u","i64.atomic.rmw8.or_u","i64.atomic.rmw16.or_u","i64.atomic.rmw32.or_u","i32.atomic.rmw.xor","i64.atomic.rmw.xor","i32.atomic.rmw8.xor_u","i32.atomic.rmw16.xor_u","i64.atomic.rmw8.xor_u","i64.atomic.rmw16.xor_u","i64.atomic.rmw32.xor_u","i32.atomic.rmw.xchg","i64.atomic.rmw.xchg","i32.atomic.rmw8.xchg_u","i32.atomic.rmw16.xchg_u","i64.atomic.rmw8.xchg_u","i64.atomic.rmw16.xchg_u","i64.atomic.rmw32.xchg_u","i32.atomic.rmw.cmpxchg","i64.atomic.rmw.cmpxchg","i32.atomic.rmw8.cmpxchg_u","i32.atomic.rmw16.cmpxchg_u","i64.atomic.rmw8.cmpxchg_u","i64.atomic.rmw16.cmpxchg_u","i64.atomic.rmw32.cmpxchg_u"].forEach(((e,t)=>{s[65024|t]=e})),s[64257]="struct.new_with_rtt",s[64258]="struct.new_default_with_rtt",s[64259]="struct.get",s[64260]="struct.get_s",s[64261]="struct.get_u",s[64262]="struct.set",s[64263]="struct.new",s[64264]="struct.new_default",s[64273]="array.new_with_rtt",s[64274]="array.new_default_with_rtt",s[64275]="array.get",s[64276]="array.get_s",s[64277]="array.get_u",s[64278]="array.set",s[64279]="array.len",s[64280]="array.copy",s[64281]="array.init",s[64282]="array.init_static",s[64283]="array.new",s[64284]="array.new_default",s[64288]="i31.new",s[64289]="i31.get_s",s[64290]="i31.get_u",s[64304]="rtt.canon",s[64305]="rtt.sub",s[64306]="rtt.fresh_sub",s[64320]="ref.test",s[64321]="ref.cast",s[64322]="br_on_cast",s[64323]="br_on_cast_fail",s[64324]="ref.test_static",s[64325]="ref.cast_static",s[64326]="br_on_cast_static",s[64327]="br_on_cast_static_fail",s[64336]="ref.is_func",s[64337]="ref.is_data",s[64338]="ref.is_i31",s[64344]="ref.as_func",s[64345]="ref.as_data",s[64346]="ref.as_i31",s[64352]="br_on_func",s[64353]="br_on_data",s[64354]="br_on_i31",s[64355]="br_on_non_func",s[64356]="br_on_non_data",s[64357]="br_on_non_i31",function(e){e[e.Function=0]="Function",e[e.Table=1]="Table",e[e.Memory=2]="Memory",e[e.Global=3]="Global",e[e.Event=4]="Event"}(a||(a={})),function(e){e[e.unspecified=0]="unspecified",e[e.i32=-1]="i32",e[e.i64=-2]="i64",e[e.f32=-3]="f32",e[e.f64=-4]="f64",e[e.v128=-5]="v128",e[e.i8=-6]="i8",e[e.i16=-7]="i16",e[e.funcref=-16]="funcref",e[e.externref=-17]="externref",e[e.anyref=-18]="anyref",e[e.eqref=-19]="eqref",e[e.optref=-20]="optref",e[e.ref=-21]="ref",e[e.i31ref=-22]="i31ref",e[e.rtt_d=-23]="rtt_d",e[e.rtt=-24]="rtt",e[e.dataref=-25]="dataref",e[e.func=-32]="func",e[e.struct=-33]="struct",e[e.array=-34]="array",e[e.func_subtype=-35]="func_subtype",e[e.struct_subtype=-36]="struct_subtype",e[e.array_subtype=-37]="array_subtype",e[e.empty_block_type=-64]="empty_block_type"}(i||(i={}));class x{constructor(e,t=-1,s=-1){if(!(e<0||0===e&&t>=0))throw new Error(`invalid type: ${e}/${t}/${s}`);this.kind=e,this.index=t,this.depth=s,(-16===t&&-20===e||-17===t&&-20===e||-18===t&&-20===e||-19===t&&-20===e||-22===t&&-21===e||-25===t&&-21===e)&&(this.kind=t,this.index=-1)}}x.funcref=new x(-16),x.externref=new x(-17),function(e){e[e.FunctionIndex_LEB=0]="FunctionIndex_LEB",e[e.TableIndex_SLEB=1]="TableIndex_SLEB",e[e.TableIndex_I32=2]="TableIndex_I32",e[e.GlobalAddr_LEB=3]="GlobalAddr_LEB",e[e.GlobalAddr_SLEB=4]="GlobalAddr_SLEB",e[e.GlobalAddr_I32=5]="GlobalAddr_I32",e[e.TypeIndex_LEB=6]="TypeIndex_LEB",e[e.GlobalIndex_LEB=7]="GlobalIndex_LEB"}(r||(r={})),function(e){e[e.StackPointer=1]="StackPointer"}(_||(_={})),function(e){e[e.Module=0]="Module",e[e.Function=1]="Function",e[e.Local=2]="Local",e[e.Event=3]="Event",e[e.Type=4]="Type",e[e.Table=5]="Table",e[e.Memory=6]="Memory",e[e.Global=7]="Global",e[e.Field=10]="Field"}(n||(n={})),function(e){e[e.ERROR=-1]="ERROR",e[e.INITIAL=0]="INITIAL",e[e.BEGIN_WASM=1]="BEGIN_WASM",e[e.END_WASM=2]="END_WASM",e[e.BEGIN_SECTION=3]="BEGIN_SECTION",e[e.END_SECTION=4]="END_SECTION",e[e.SKIPPING_SECTION=5]="SKIPPING_SECTION",e[e.READING_SECTION_RAW_DATA=6]="READING_SECTION_RAW_DATA",e[e.SECTION_RAW_DATA=7]="SECTION_RAW_DATA",e[e.TYPE_SECTION_ENTRY=11]="TYPE_SECTION_ENTRY",e[e.IMPORT_SECTION_ENTRY=12]="IMPORT_SECTION_ENTRY",e[e.FUNCTION_SECTION_ENTRY=13]="FUNCTION_SECTION_ENTRY",e[e.TABLE_SECTION_ENTRY=14]="TABLE_SECTION_ENTRY",e[e.MEMORY_SECTION_ENTRY=15]="MEMORY_SECTION_ENTRY",e[e.GLOBAL_SECTION_ENTRY=16]="GLOBAL_SECTION_ENTRY",e[e.EXPORT_SECTION_ENTRY=17]="EXPORT_SECTION_ENTRY",e[e.DATA_SECTION_ENTRY=18]="DATA_SECTION_ENTRY",e[e.NAME_SECTION_ENTRY=19]="NAME_SECTION_ENTRY",e[e.ELEMENT_SECTION_ENTRY=20]="ELEMENT_SECTION_ENTRY",e[e.LINKING_SECTION_ENTRY=21]="LINKING_SECTION_ENTRY",e[e.START_SECTION_ENTRY=22]="START_SECTION_ENTRY",e[e.EVENT_SECTION_ENTRY=23]="EVENT_SECTION_ENTRY",e[e.BEGIN_INIT_EXPRESSION_BODY=25]="BEGIN_INIT_EXPRESSION_BODY",e[e.INIT_EXPRESSION_OPERATOR=26]="INIT_EXPRESSION_OPERATOR",e[e.END_INIT_EXPRESSION_BODY=27]="END_INIT_EXPRESSION_BODY",e[e.BEGIN_FUNCTION_BODY=28]="BEGIN_FUNCTION_BODY",e[e.READING_FUNCTION_HEADER=29]="READING_FUNCTION_HEADER",e[e.CODE_OPERATOR=30]="CODE_OPERATOR",e[e.END_FUNCTION_BODY=31]="END_FUNCTION_BODY",e[e.SKIPPING_FUNCTION_BODY=32]="SKIPPING_FUNCTION_BODY",e[e.BEGIN_ELEMENT_SECTION_ENTRY=33]="BEGIN_ELEMENT_SECTION_ENTRY",e[e.ELEMENT_SECTION_ENTRY_BODY=34]="ELEMENT_SECTION_ENTRY_BODY",e[e.END_ELEMENT_SECTION_ENTRY=35]="END_ELEMENT_SECTION_ENTRY",e[e.BEGIN_DATA_SECTION_ENTRY=36]="BEGIN_DATA_SECTION_ENTRY",e[e.DATA_SECTION_ENTRY_BODY=37]="DATA_SECTION_ENTRY_BODY",e[e.END_DATA_SECTION_ENTRY=38]="END_DATA_SECTION_ENTRY",e[e.BEGIN_GLOBAL_SECTION_ENTRY=39]="BEGIN_GLOBAL_SECTION_ENTRY",e[e.END_GLOBAL_SECTION_ENTRY=40]="END_GLOBAL_SECTION_ENTRY",e[e.RELOC_SECTION_HEADER=41]="RELOC_SECTION_HEADER",e[e.RELOC_SECTION_ENTRY=42]="RELOC_SECTION_ENTRY",e[e.SOURCE_MAPPING_URL=43]="SOURCE_MAPPING_URL",e[e.BEGIN_OFFSET_EXPRESSION_BODY=44]="BEGIN_OFFSET_EXPRESSION_BODY",e[e.OFFSET_EXPRESSION_OPERATOR=45]="OFFSET_EXPRESSION_OPERATOR",e[e.END_OFFSET_EXPRESSION_BODY=46]="END_OFFSET_EXPRESSION_BODY"}(c||(c={})),function(e){e[e.Active=0]="Active",e[e.Passive=1]="Passive",e[e.ActiveWithMemoryIndex=2]="ActiveWithMemoryIndex"}(o||(o={})),function(e){e[e.Active=0]="Active",e[e.Passive=1]="Passive"}(h||(h={})),function(e){e[e.LegacyActiveFuncrefExternval=0]="LegacyActiveFuncrefExternval",e[e.PassiveExternval=1]="PassiveExternval",e[e.ActiveExternval=2]="ActiveExternval",e[e.DeclaredExternval=3]="DeclaredExternval",e[e.LegacyActiveFuncrefElemexpr=4]="LegacyActiveFuncrefElemexpr",e[e.PassiveElemexpr=5]="PassiveElemexpr",e[e.ActiveElemexpr=6]="ActiveElemexpr",e[e.DeclaredElemexpr=7]="DeclaredElemexpr"}(u||(u={})),function(e){e[e.Active=0]="Active",e[e.Passive=1]="Passive",e[e.Declarative=2]="Declarative"}(d||(d={}));class p{constructor(e,t){this.start=e,this.end=t}offset(e){this.start+=e,this.end+=e}}class m{constructor(e){this._data=e||new Uint8Array(8)}toInt32(){return this._data[0]|this._data[1]<<8|this._data[2]<<16|this._data[3]<<24}toDouble(){var e,t=1;if(128&this._data[7]){e=-1;for(var s=0;s<8;s++,t*=256)e-=t*(255^this._data[s])}else{e=0;for(s=0;s<8;s++,t*=256)e+=t*this._data[s]}return e}toString(){var e=(this._data[0]|this._data[1]<<8|this._data[2]<<16|this._data[3]<<24)>>>0,t=(this._data[4]|this._data[5]<<8|this._data[6]<<16|this._data[7]<<24)>>>0;if(0===e&&0===t)return"0";var s=!1;t>>31&&(t=4294967296-t,e>0&&(t--,e=4294967296-e),s=!0);for(var a=[];t>0;){var i=t%10*4294967296+e;t=Math.floor(t/10),a.unshift((i%10).toString()),e=Math.floor(i/10)}for(;e>0;)a.unshift((e%10).toString()),e=Math.floor(e/10);return s&&a.unshift("-"),a.join("")}get data(){return this._data}}if("undefined"!=typeof TextDecoder)try{(f=new TextDecoder("utf-8")).decode(new Uint8Array([97,208,144])),l=e=>f.decode(e)}catch(e){}l||(l=e=>{var t=String.fromCharCode.apply(null,e);return decodeURIComponent(escape(t))});var b=Object.freeze({__proto__:null,get SectionCode(){return e},get OperatorCode(){return t},OperatorCodeNames:s,get ExternalKind(){return a},get TypeKind(){return i},Type:x,get RelocType(){return r},get LinkingType(){return _},get NameType(){return n},get BinaryReaderState(){return c},get DataMode(){return h},get ElementMode(){return d},Int64:m,BinaryReader:class{constructor(){this._data=null,this._pos=0,this._length=0,this._eof=!1,this.state=0,this.result=null,this.error=null,this._sectionEntriesLeft=0,this._sectionId=-1,this._sectionRange=null,this._functionRange=null,this._segmentType=0,this._segmentEntriesLeft=0}get data(){return this._data}get position(){return this._pos}get length(){return this._length}setData(e,t,s,a){var i=t-this._pos;this._data=new Uint8Array(e),this._pos=t,this._length=s,this._eof=void 0===a||a,this._sectionRange&&this._sectionRange.offset(i),this._functionRange&&this._functionRange.offset(i)}hasBytes(e){return this._pos+e<=this._length}hasMoreBytes(){return this.hasBytes(1)}readUint8(){return this._data[this._pos++]}readInt32(){return this._data[this._pos++]|this._data[this._pos++]<<8|this._data[this._pos++]<<16|this._data[this._pos++]<<24}readUint32(){return this.readInt32()}peekInt32(){return this._data[this._pos]|this._data[this._pos+1]<<8|this._data[this._pos+2]<<16|this._data[this._pos+3]<<24}hasVarIntBytes(){for(var e=this._pos;e<this._length;)if(0==(128&this._data[e++]))return!0;return!1}readVarUint1(){return this.readUint8()}readVarInt7(){return this.readUint8()<<25>>25}readVarUint7(){return this.readUint8()}readVarInt32(){for(var e=0,t=0;;){var s=this.readUint8();if(e|=(127&s)<<t,t+=7,0==(128&s))break}if(t>=32)return e;var a=32-t;return e<<a>>a}readVarUint32(){for(var e=0,t=0;;){var s=this.readUint8();if(e|=(127&s)<<t,t+=7,0==(128&s))break}return e>>>0}readVarInt64(){for(var e=new Uint8Array(8),t=0,s=0,a=0;;){var i=this.readUint8();if(s|=(127&i)<<a,(a+=7)>8&&(e[t++]=255&s,s>>=8,a-=8),0==(128&i))break}var r=32-a;for(s=s<<r>>r;t<8;)e[t++]=255&s,s>>=8;return new m(e)}readHeapType(){for(var e,t=0,s=0;;){if(e=this.readUint8(),28===s)return(e<<25>>25)*Math.pow(2,28)+t;if(t|=(127&e)<<s,s+=7,0==(128&e))break}return t<<(s=32-s)>>s}readTypeInternal(e){if(-21===e||-20===e||-24===e){var t=this.readHeapType();return new x(e,t)}if(-23===e){t=this.readHeapType();var s=this.readVarUint32();return new x(e,t,s)}return new x(e)}readType(){var e=this.readVarInt7();return this.readTypeInternal(e)}readBlockType(){var e=this.readHeapType();return e<0?this.readTypeInternal(e):new x(0,e)}readStringBytes(){var e=this.readVarUint32();return this.readBytes(e)}readBytes(e){var t=this._data.subarray(this._pos,this._pos+e);return this._pos+=e,new Uint8Array(t)}skipBytes(e){this._pos+=e}hasStringBytes(){if(!this.hasVarIntBytes())return!1;var e=this._pos,t=this.readVarUint32(),s=this.hasBytes(t);return this._pos=e,s}hasSectionPayload(){return this.hasBytes(this._sectionRange.end-this._pos)}readFuncType(){for(var e=this.readVarUint32(),t=new Array(e),s=0;s<e;s++)t[s]=this.readType();var a=this.readVarUint1(),i=new Array(a);for(s=0;s<a;s++)i[s]=this.readType();return{form:-32,params:t,returns:i}}readFuncSubtype(){var e=this.readFuncType();return e.form=-35,e.supertype=this.readHeapType(),e}readStructType(){for(var e=this.readVarUint32(),t=new Array(e),s=new Array(e),a=0;a<e;a++)t[a]=this.readType(),s[a]=!!this.readVarUint1();return{form:-33,fields:t,mutabilities:s}}readStructSubtype(){var e=this.readStructType();return e.form=-36,e.supertype=this.readHeapType(),e}readArrayType(){return{form:-34,elementType:this.readType(),mutability:!!this.readVarUint1()}}readArraySubtype(){var e=this.readArrayType();return e.form=-37,e.supertype=this.readHeapType(),e}readResizableLimits(e){var t,s=this.readVarUint32();return e&&(t=this.readVarUint32()),{initial:s,maximum:t}}readTableType(){var e=this.readType(),t=this.readVarUint32();return{elementType:e,limits:this.readResizableLimits(!!(1&t))}}readMemoryType(){var e=this.readVarUint32(),t=!!(2&e);return{limits:this.readResizableLimits(!!(1&e)),shared:t}}readGlobalType(){if(!this.hasVarIntBytes())return null;var e=this._pos,t=this.readType();return this.hasVarIntBytes()?{contentType:t,mutability:this.readVarUint1()}:(this._pos=e,null)}readEventType(){return{attribute:this.readVarUint32(),typeIndex:this.readVarUint32()}}readTypeEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();this.state=11;var e=this.readVarInt7();switch(e){case-32:this.result=this.readFuncType();break;case-35:this.result=this.readFuncSubtype();break;case-33:this.result=this.readStructType();break;case-36:this.result=this.readStructSubtype();break;case-34:this.result=this.readArrayType();break;case-37:this.result=this.readArraySubtype();break;default:throw new Error(`Unknown type kind: ${e}`)}return this._sectionEntriesLeft--,!0}readImportEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();this.state=12;var e,t,s=this.readStringBytes(),a=this.readStringBytes(),i=this.readUint8();switch(i){case 0:e=this.readVarUint32();break;case 1:t=this.readTableType();break;case 2:t=this.readMemoryType();break;case 3:t=this.readGlobalType();break;case 4:t=this.readEventType()}return this.result={module:s,field:a,kind:i,funcTypeIndex:e,type:t},this._sectionEntriesLeft--,!0}readExportEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();var e=this.readStringBytes(),t=this.readUint8(),s=this.readVarUint32();return this.state=17,this.result={field:e,kind:t,index:s},this._sectionEntriesLeft--,!0}readFunctionEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();var e=this.readVarUint32();return this.state=13,this.result={typeIndex:e},this._sectionEntriesLeft--,!0}readTableEntry(){return 0===this._sectionEntriesLeft?(this.skipSection(),this.read()):(this.state=14,this.result=this.readTableType(),this._sectionEntriesLeft--,!0)}readMemoryEntry(){return 0===this._sectionEntriesLeft?(this.skipSection(),this.read()):(this.state=15,this.result=this.readMemoryType(),this._sectionEntriesLeft--,!0)}readEventEntry(){return 0===this._sectionEntriesLeft?(this.skipSection(),this.read()):(this.state=23,this.result=this.readEventType(),this._sectionEntriesLeft--,!0)}readGlobalEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();var e=this.readGlobalType();return e?(this.state=39,this.result={type:e},this._sectionEntriesLeft--,!0):(this.state=16,!1)}readElementEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();const e=this._pos;if(!this.hasMoreBytes())return this.state=20,!1;const t=this.readUint8();let s,a;switch(t){case 0:case 4:s=0,a=0;break;case 1:case 5:s=1;break;case 2:case 6:if(s=0,!this.hasVarIntBytes())return this.state=20,this._pos=e,!1;a=this.readVarUint32();break;case 3:case 7:s=2;break;default:throw new Error(`Unsupported element segment type ${t}`)}return this.state=33,this.result={mode:s,tableIndex:a},this._sectionEntriesLeft--,this._segmentType=t,!0}readElementEntryBody(){let e=x.funcref;switch(this._segmentType){case 1:case 2:case 3:if(!this.hasMoreBytes())return!1;this.skipBytes(1);break;case 5:case 6:case 7:if(!this.hasMoreBytes())return!1;e=this.readType();break;case 0:case 4:break;default:throw new Error(`Unsupported element segment type ${this._segmentType}`)}return this.state=34,this.result={elementType:e},!0}readDataEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();const e=this._pos;if(!this.hasVarIntBytes())return this.state=18,!1;const t=this.readVarUint32();let s,a;switch(t){case 0:s=0,a=0;break;case 1:s=1;break;case 2:if(s=0,!this.hasVarIntBytes())return this._pos=e,this.state=18,!1;a=this.readVarUint32();break;default:throw new Error(`Unsupported data segment type ${t}`)}return this.state=36,this.result={mode:s,memoryIndex:a},this._sectionEntriesLeft--,this._segmentType=t,!0}readDataEntryBody(){return!!this.hasStringBytes()&&(this.state=37,this.result={data:this.readStringBytes()},!0)}readInitExpressionBody(){return this.state=25,this.result=null,!0}readOffsetExpressionBody(){return this.state=44,this.result=null,!0}readMemoryImmediate(){return{flags:this.readVarUint32(),offset:this.readVarUint32()}}readNameMap(){for(var e=this.readVarUint32(),t=[],s=0;s<e;s++){var a=this.readVarUint32(),i=this.readStringBytes();t.push({index:a,name:i})}return t}readNameEntry(){var e=this._pos;if(e>=this._sectionRange.end)return this.skipSection(),this.read();if(!this.hasVarIntBytes())return!1;var t=this.readVarUint7();if(!this.hasVarIntBytes())return this._pos=e,!1;var s,a=this.readVarUint32();if(!this.hasBytes(a))return this._pos=e,!1;switch(t){case 0:s={type:t,moduleName:this.readStringBytes()};break;case 1:case 3:case 4:case 5:case 6:case 7:s={type:t,names:this.readNameMap()};break;case 2:for(var i=this.readVarUint32(),r=[],_=0;_<i;_++){var n=this.readVarUint32();r.push({index:n,locals:this.readNameMap()})}s={type:t,funcs:r};break;case 10:var c=this.readVarUint32(),o=[];for(_=0;_<c;_++){var h=this.readVarUint32();o.push({index:h,fields:this.readNameMap()})}s={type:t,types:o};break;default:return this.skipBytes(a),this.read()}return this.state=19,this.result=s,!0}readRelocHeader(){if(!this.hasVarIntBytes())return!1;var e,t=this._pos,s=this.readVarUint7();if(0===s){if(!this.hasStringBytes())return this._pos=t,!1;e=this.readStringBytes()}return this.state=41,this.result={id:s,name:e},!0}readLinkingEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();if(!this.hasVarIntBytes())return!1;var e,t=this._pos,s=this.readVarUint32();return 1!==s?(this.error=new Error(`Bad linking type: ${s}`),this.state=-1,!0):this.hasVarIntBytes()?(e=this.readVarUint32(),this.state=21,this.result={type:s,index:e},this._sectionEntriesLeft--,!0):(this._pos=t,!1)}readSourceMappingURL(){if(!this.hasStringBytes())return!1;var e=this.readStringBytes();return this.state=43,this.result={url:e},!0}readRelocEntry(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();if(!this.hasVarIntBytes())return!1;var e=this._pos,t=this.readVarUint7();if(!this.hasVarIntBytes())return this._pos=e,!1;var s=this.readVarUint32();if(!this.hasVarIntBytes())return this._pos=e,!1;var a,i=this.readVarUint32();switch(t){case 0:case 1:case 2:case 6:case 7:break;case 3:case 4:case 5:if(!this.hasVarIntBytes())return this._pos=e,!1;a=this.readVarUint32();break;default:return this.error=new Error(`Bad relocation type: ${t}`),this.state=-1,!0}return this.state=42,this.result={type:t,offset:s,index:i,addend:a},this._sectionEntriesLeft--,!0}readCodeOperator_0xfb(){if(!this._eof&&!this.hasBytes(12))return!1;var e,t,s,a,i;switch(e=64256|this._data[this._pos++]){case 64322:case 64323:case 64352:case 64355:case 64353:case 64356:case 64354:case 64357:t=this.readVarUint32();break;case 64326:case 64327:t=this.readVarUint32(),s=this.readHeapType();break;case 64275:case 64276:case 64277:case 64279:case 64278:case 64283:case 64273:case 64284:case 64274:case 64263:case 64257:case 64264:case 64258:case 64304:case 64305:case 64306:case 64324:case 64325:s=this.readHeapType();break;case 64280:s=this.readHeapType(),a=this.readHeapType();break;case 64259:case 64260:case 64261:case 64262:s=this.readHeapType(),i=this.readVarUint32();break;case 64281:case 64282:s=this.readHeapType(),t=this.readVarUint32();break;case 64336:case 64337:case 64338:case 64344:case 64345:case 64346:case 64320:case 64321:case 64288:case 64289:case 64290:break;default:return this.error=new Error(`Unknown operator: 0x${e.toString(16).padStart(4,"0")}`),this.state=-1,!0}return this.result={code:e,blockType:void 0,refType:s,srcType:a,brDepth:t,brTable:void 0,tableIndex:void 0,funcIndex:void 0,typeIndex:void 0,localIndex:void 0,globalIndex:void 0,fieldIndex:i,memoryAddress:void 0,literal:void 0,segmentIndex:void 0,destinationIndex:void 0,lines:void 0,lineIndex:void 0},!0}readCodeOperator_0xfc(){if(!this.hasVarIntBytes())return!1;var e,t,s,a=64512|this.readVarUint32();switch(a){case 64512:case 64513:case 64514:case 64515:case 64516:case 64517:case 64518:case 64519:break;case 64522:this.readVarUint1(),this.readVarUint1();break;case 64523:this.readVarUint1();break;case 64524:e=this.readVarUint32(),s=this.readVarUint32();break;case 64526:s=this.readVarUint32(),t=this.readVarUint32();break;case 64527:case 64528:case 64529:s=this.readVarUint32();break;case 64520:e=this.readVarUint32(),this.readVarUint1();break;case 64521:case 64525:e=this.readVarUint32();break;default:return this.error=new Error(`Unknown operator: 0x${a.toString(16).padStart(4,"0")}`),this.state=-1,!0}return this.result={code:a,blockType:void 0,selectType:void 0,refType:void 0,srcType:void 0,brDepth:void 0,brTable:void 0,funcIndex:void 0,typeIndex:void 0,tableIndex:s,localIndex:void 0,globalIndex:void 0,fieldIndex:void 0,memoryAddress:void 0,literal:void 0,segmentIndex:e,destinationIndex:t,lines:void 0,lineIndex:void 0},!0}readCodeOperator_0xfd(){var e=this._pos;if(!this._eof&&e+17>this._length)return!1;if(!this.hasVarIntBytes())return!1;var t,s,a,i,r=64768|this.readVarUint32();switch(r){case 64768:case 64769:case 64770:case 64771:case 64772:case 64773:case 64774:case 64775:case 64776:case 64777:case 64778:case 64779:case 64860:case 64861:t=this.readMemoryImmediate();break;case 64780:s=this.readBytes(16);break;case 64781:i=new Uint8Array(16);for(var _=0;_<i.length;_++)i[_]=this.readUint8();break;case 64789:case 64790:case 64791:case 64792:case 64793:case 64794:case 64795:case 64796:case 64797:case 64798:case 64799:case 64800:case 64801:case 64802:a=this.readUint8();break;case 64782:case 64783:case 64784:case 64785:case 64786:case 64787:case 64788:case 64803:case 64804:case 64805:case 64806:case 64807:case 64808:case 64809:case 64810:case 64811:case 64812:case 64813:case 64814:case 64815:case 64816:case 64817:case 64818:case 64819:case 64820:case 64821:case 64822:case 64823:case 64824:case 64825:case 64826:case 64827:case 64828:case 64829:case 64830:case 64831:case 64832:case 64833:case 64834:case 64835:case 64836:case 64837:case 64838:case 64839:case 64840:case 64841:case 64842:case 64843:case 64844:case 64845:case 64846:case 64847:case 64848:case 64849:case 64850:case 64851:case 64862:case 64863:case 64864:case 64865:case 64866:case 64867:case 64868:case 64869:case 64870:case 64871:case 64872:case 64873:case 64874:case 64875:case 64876:case 64877:case 64878:case 64879:case 64880:case 64881:case 64882:case 64883:case 64884:case 64885:case 64886:case 64887:case 64888:case 64889:case 64890:case 64891:case 64892:case 64893:case 64894:case 64895:case 64896:case 64897:case 64898:case 64899:case 64900:case 64901:case 64902:case 64903:case 64904:case 64905:case 64906:case 64907:case 64908:case 64909:case 64910:case 64911:case 64912:case 64913:case 64914:case 64915:case 64916:case 64917:case 64918:case 64919:case 64920:case 64921:case 64923:case 64924:case 64925:case 64926:case 64927:case 64928:case 64929:case 64931:case 64932:case 64935:case 64936:case 64937:case 64938:case 64939:case 64940:case 64941:case 64942:case 64945:case 64949:case 64950:case 64951:case 64952:case 64953:case 64954:case 64956:case 64957:case 64958:case 64959:case 64960:case 64961:case 64963:case 64964:case 64967:case 64968:case 64969:case 64970:case 64971:case 64972:case 64973:case 64974:case 64977:case 64981:case 64982:case 64983:case 64984:case 64985:case 64986:case 64987:case 64988:case 64989:case 64988:case 64989:case 64992:case 64992:case 64993:case 64995:case 64996:case 64997:case 64998:case 64999:case 65e3:case 65001:case 65002:case 65003:case 65004:case 65005:case 65007:case 65008:case 65009:case 65010:case 65011:case 65012:case 65013:case 65014:case 65015:case 65016:case 65017:case 65018:case 65019:case 65020:case 65021:case 65022:case 65023:break;default:return this.error=new Error(`Unknown operator: 0x${r.toString(16).padStart(4,"0")}`),this.state=-1,!0}return this.result={code:r,blockType:void 0,selectType:void 0,refType:void 0,srcType:void 0,brDepth:void 0,brTable:void 0,funcIndex:void 0,typeIndex:void 0,localIndex:void 0,globalIndex:void 0,fieldIndex:void 0,memoryAddress:t,literal:s,segmentIndex:void 0,destinationIndex:void 0,lines:i,lineIndex:a},!0}readCodeOperator_0xfe(){var e=this._pos;if(!this._eof&&e+11>this._length)return!1;if(!this.hasVarIntBytes())return!1;var t,s=65024|this.readVarUint32();switch(s){case 65024:case 65025:case 65026:case 65040:case 65041:case 65042:case 65043:case 65044:case 65045:case 65046:case 65047:case 65048:case 65049:case 65050:case 65051:case 65052:case 65053:case 65054:case 65055:case 65056:case 65057:case 65058:case 65059:case 65060:case 65061:case 65062:case 65063:case 65064:case 65065:case 65066:case 65067:case 65068:case 65069:case 65070:case 65071:case 65072:case 65073:case 65074:case 65075:case 65076:case 65077:case 65078:case 65079:case 65080:case 65081:case 65082:case 65083:case 65084:case 65085:case 65086:case 65087:case 65088:case 65089:case 65090:case 65091:case 65092:case 65093:case 65094:case 65095:case 65096:case 65097:case 65098:case 65099:case 65100:case 65101:case 65102:t=this.readMemoryImmediate();break;case 65027:if(0!=this.readUint8())return this.error=new Error("atomic.fence consistency model must be 0"),this.state=-1,!0;break;default:return this.error=new Error(`Unknown operator: 0x${s.toString(16).padStart(4,"0")}`),this.state=-1,!0}return this.result={code:s,blockType:void 0,selectType:void 0,refType:void 0,srcType:void 0,brDepth:void 0,brTable:void 0,funcIndex:void 0,typeIndex:void 0,localIndex:void 0,globalIndex:void 0,fieldIndex:void 0,memoryAddress:t,literal:void 0,segmentIndex:void 0,destinationIndex:void 0,lines:void 0,lineIndex:void 0},!0}readCodeOperator(){switch(this.state){case 30:if(this._pos>=this._functionRange.end)return this.skipFunctionBody(),this.read();break;case 26:if(this.result&&11===this.result.code)return this.state=27,this.result=null,!0;break;case 45:if(this.result&&11===this.result.code)return this.state=46,this.result=null,!0}var e,t,s,a,i,r,_,n,c,o,h,u,d,l,f;if(26===this.state&&9===this._sectionId&&function(e){switch(e){case 0:case 1:case 2:case 3:return!0;default:return!1}}(this._segmentType))if(this.result&&210===this.result.code)e=11;else{if(!this.hasVarIntBytes())return!1;e=210,n=this.readVarUint32()}else{const b=11;var x=this._pos;if(!this._eof&&x+b>this._length)return!1;switch(e=this._data[this._pos++]){case 2:case 3:case 4:case 6:t=this.readBlockType();break;case 12:case 13:case 212:case 214:i=this.readVarUint32();break;case 14:var p=this.readVarUint32();if(!this.hasBytes(p+1))return this._pos=x,!1;r=[];for(var m=0;m<=p;m++){if(!this.hasVarIntBytes())return this._pos=x,!1;r.push(this.readVarUint32())}break;case 9:case 24:_=this.readVarUint32();break;case 7:case 8:d=this.readVarInt32();break;case 208:a=this.readHeapType();break;case 16:case 18:case 210:n=this.readVarUint32();break;case 17:case 19:c=this.readVarUint32(),this.readVarUint1();break;case 32:case 33:case 34:h=this.readVarUint32();break;case 35:case 36:u=this.readVarUint32();break;case 37:case 38:o=this.readVarUint32();break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 61:case 62:l=this.readMemoryImmediate();break;case 63:case 64:this.readVarUint1();break;case 65:f=this.readVarInt32();break;case 66:f=this.readVarInt64();break;case 67:f=new DataView(this._data.buffer,this._data.byteOffset).getFloat32(this._pos,!0),this._pos+=4;break;case 68:f=new DataView(this._data.buffer,this._data.byteOffset).getFloat64(this._pos,!0),this._pos+=8;break;case 28:1==this.readVarInt32()&&(s=this.readType());break;case 251:return!!this.readCodeOperator_0xfb()||(this._pos=x,!1);case 252:return!!this.readCodeOperator_0xfc()||(this._pos=x,!1);case 253:return!!this.readCodeOperator_0xfd()||(this._pos=x,!1);case 254:return!!this.readCodeOperator_0xfe()||(this._pos=x,!1);case 0:case 1:case 5:case 10:case 11:case 15:case 25:case 26:case 27:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:case 125:case 126:case 127:case 128:case 129:case 130:case 131:case 132:case 133:case 134:case 135:case 136:case 137:case 138:case 139:case 140:case 141:case 142:case 143:case 144:case 145:case 146:case 147:case 148:case 149:case 150:case 151:case 152:case 153:case 154:case 155:case 156:case 157:case 158:case 159:case 160:case 161:case 162:case 163:case 164:case 165:case 166:case 167:case 168:case 169:case 170:case 171:case 172:case 173:case 174:case 175:case 176:case 177:case 178:case 179:case 180:case 181:case 182:case 183:case 184:case 185:case 186:case 187:case 188:case 189:case 190:case 191:case 192:case 193:case 194:case 195:case 196:case 20:case 21:case 209:case 211:case 213:break;default:return this.error=new Error(`Unknown operator: ${e}`),this.state=-1,!0}}return this.result={code:e,blockType:t,selectType:s,refType:a,srcType:void 0,brDepth:i,brTable:r,relativeDepth:_,tableIndex:o,funcIndex:n,typeIndex:c,localIndex:h,globalIndex:u,fieldIndex:void 0,eventIndex:d,memoryAddress:l,literal:f,segmentIndex:void 0,destinationIndex:void 0,lines:void 0,lineIndex:void 0},!0}readFunctionBody(){if(0===this._sectionEntriesLeft)return this.skipSection(),this.read();if(!this.hasVarIntBytes())return!1;var e=this._pos,t=this.readVarUint32(),s=this._pos+t;if(!this.hasVarIntBytes())return this._pos=e,!1;for(var a=this.readVarUint32(),i=[],r=0;r<a;r++){if(!this.hasVarIntBytes())return this._pos=e,!1;var _=this.readVarUint32();if(!this.hasVarIntBytes())return this._pos=e,!1;var n=this.readType();i.push({count:_,type:n})}var c=this._pos;return this.state=28,this.result={locals:i},this._functionRange=new p(c,s),this._sectionEntriesLeft--,!0}readSectionHeader(){if(this._pos>=this._length&&this._eof)return this._sectionId=-1,this._sectionRange=null,this.result=null,this.state=2,!0;if(this._pos<this._length-4&&1836278016===this.peekInt32())return this._sectionId=-1,this._sectionRange=null,this.result=null,this.state=2,!0;if(!this.hasVarIntBytes())return!1;var e=this._pos,t=this.readVarUint7();if(!this.hasVarIntBytes())return this._pos=e,!1;var s=this.readVarUint32(),a=null,i=this._pos+s;if(0==t){if(!this.hasStringBytes())return this._pos=e,!1;a=this.readStringBytes()}return this.result={id:t,name:a},this._sectionId=t,this._sectionRange=new p(this._pos,i),this.state=3,!0}readSectionRawData(){var e=this._sectionRange.end-this._sectionRange.start;return!!this.hasBytes(e)&&(this.state=7,this.result=this.readBytes(e),!0)}readSectionBody(){if(this._pos>=this._sectionRange.end)return this.result=null,this.state=4,this._sectionId=-1,this._sectionRange=null,!0;var e=this.result;switch(e.id){case 1:return!!this.hasSectionPayload()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readTypeEntry());case 2:return!!this.hasSectionPayload()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readImportEntry());case 7:return!!this.hasSectionPayload()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readExportEntry());case 3:return!!this.hasSectionPayload()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readFunctionEntry());case 4:return!!this.hasSectionPayload()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readTableEntry());case 5:return!!this.hasSectionPayload()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readMemoryEntry());case 6:return!!this.hasVarIntBytes()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readGlobalEntry());case 8:return!!this.hasVarIntBytes()&&(this.state=22,this.result={index:this.readVarUint32()},!0);case 10:return!!this.hasVarIntBytes()&&(this._sectionEntriesLeft=this.readVarUint32(),this.state=29,this.readFunctionBody());case 9:return!!this.hasVarIntBytes()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readElementEntry());case 11:return!!this.hasVarIntBytes()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readDataEntry());case 13:return!!this.hasVarIntBytes()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readEventEntry());case 0:var t=l(e.name);return"name"===t?this.readNameEntry():0===t.indexOf("reloc.")?this.readRelocHeader():"linking"===t?!!this.hasVarIntBytes()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readLinkingEntry()):"sourceMappingURL"===t?this.readSourceMappingURL():this.readSectionRawData();default:return this.error=new Error(`Unsupported section: ${this._sectionId}`),this.state=-1,!0}}read(){switch(this.state){case 0:if(!this.hasBytes(8))return!1;var e=this.readUint32();if(1836278016!=e)return this.error=new Error("Bad magic number"),this.state=-1,!0;var t=this.readUint32();return 1!=t&&13!=t?(this.error=new Error(`Bad version number ${t}`),this.state=-1,!0):(this.result={magicNumber:e,version:t},this.state=1,!0);case 2:return this.result=null,this.state=1,!!this.hasMoreBytes()&&(this.state=0,this.read());case-1:return!0;case 1:case 4:return this.readSectionHeader();case 3:return this.readSectionBody();case 5:return!!this.hasSectionPayload()&&(this.state=4,this._pos=this._sectionRange.end,this._sectionId=-1,this._sectionRange=null,this.result=null,!0);case 32:return this.state=31,this._pos=this._functionRange.end,this._functionRange=null,this.result=null,!0;case 11:return this.readTypeEntry();case 12:return this.readImportEntry();case 17:return this.readExportEntry();case 13:return this.readFunctionEntry();case 14:return this.readTableEntry();case 15:return this.readMemoryEntry();case 23:return this.readEventEntry();case 16:case 40:return this.readGlobalEntry();case 39:return this.readInitExpressionBody();case 20:case 35:return this.readElementEntry();case 33:return function(e){switch(e){case 0:case 2:case 4:case 6:return!0;default:return!1}}(this._segmentType)?this.readOffsetExpressionBody():this.readElementEntryBody();case 34:return!!this.hasVarIntBytes()&&(this._segmentEntriesLeft=this.readVarUint32(),0===this._segmentEntriesLeft?(this.state=35,this.result=null,!0):this.readInitExpressionBody());case 18:case 38:return this.readDataEntry();case 36:return function(e){switch(e){case 0:case 2:return!0;default:return!1}}(this._segmentType)?this.readOffsetExpressionBody():this.readDataEntryBody();case 37:return this.state=38,this.result=null,!0;case 27:switch(this._sectionId){case 6:return this.state=40,!0;case 9:return--this._segmentEntriesLeft>0?this.readInitExpressionBody():(this.state=35,this.result=null,!0)}return this.error=new Error(`Unexpected section type: ${this._sectionId}`),this.state=-1,!0;case 46:return 11===this._sectionId?this.readDataEntryBody():this.readElementEntryBody();case 19:return this.readNameEntry();case 41:return!!this.hasVarIntBytes()&&(this._sectionEntriesLeft=this.readVarUint32(),this.readRelocEntry());case 21:return this.readLinkingEntry();case 43:return this.state=4,this.result=null,!0;case 42:return this.readRelocEntry();case 29:case 31:return this.readFunctionBody();case 28:return this.state=30,this.readCodeOperator();case 25:return this.state=26,this.readCodeOperator();case 44:return this.state=45,this.readCodeOperator();case 30:case 26:case 45:return this.readCodeOperator();case 6:return this.readSectionRawData();case 22:case 7:return this.state=4,this.result=null,!0;default:return this.error=new Error(`Unsupported state: ${this.state}`),this.state=-1,!0}}skipSection(){-1!==this.state&&0!==this.state&&4!==this.state&&1!==this.state&&2!==this.state&&(this.state=5)}skipFunctionBody(){28!==this.state&&30!==this.state||(this.state=32)}skipInitExpression(){for(;26===this.state;)this.readCodeOperator()}fetchSectionRawData(){if(3!==this.state)return this.error=new Error(`Unsupported state: ${this.state}`),void(this.state=-1);this.state=6}},get bytesToString(){return l}});const y=/[^0-9A-Za-z!#$%&'*+.:<=>?@^_`|~\/\-]/,g=new RegExp(y.source,"g");function v(e){return e.initial+(void 0!==e.maximum?" "+e.maximum:"")}var E=["0","00","000"];function N(e,t){var s=(e>>>0).toString(16).toUpperCase();if(void 0===t||s.length>=t)return s;for(var a=t-s.length-1;a>=E.length;)E.push(E[E.length-1]+"0");return E[a]+s}function w(e){return!y.test(e)}class T{getTypeName(e,t){return"$type"+e}getTableName(e,t){return"$table"+e}getMemoryName(e,t){return"$memory"+e}getGlobalName(e,t){return"$global"+e}getElementName(e,t){return`$elem${e}`}getEventName(e,t){return`$event${e}`}getFunctionName(e,t,s){return(t?"$import":"$func")+e}getVariableName(e,t,s){return"$var"+t}getFieldName(e,t,s){return"$field"+t}getLabel(e){return"$label"+e}}const I=[];class B{constructor(e,t,s,a,i){this._functionExportNames=e,this._globalExportNames=t,this._memoryExportNames=s,this._tableExportNames=a,this._eventExportNames=i}getFunctionExportNames(e){var t;return null!==(t=this._functionExportNames[e])&&void 0!==t?t:I}getGlobalExportNames(e){var t;return null!==(t=this._globalExportNames[e])&&void 0!==t?t:I}getMemoryExportNames(e){var t;return null!==(t=this._memoryExportNames[e])&&void 0!==t?t:I}getTableExportNames(e){var t;return null!==(t=this._tableExportNames[e])&&void 0!==t?t:I}getEventExportNames(e){var t;return null!==(t=this._eventExportNames[e])&&void 0!==t?t:I}}var k;!function(e){e[e.Depth=0]="Depth",e[e.WhenUsed=1]="WhenUsed",e[e.Always=2]="Always"}(k||(k={}));class S extends T{constructor(e,t,s,a,i,r,_,n){super(),this._functionNames=e,this._localNames=t,this._eventNames=s,this._typeNames=a,this._tableNames=i,this._memoryNames=r,this._globalNames=_,this._fieldNames=n}getTypeName(e,t){const s=this._typeNames[e];return s?t?`$${s}`:`$${s} (;${e};)`:super.getTypeName(e,t)}getTableName(e,t){const s=this._tableNames[e];return s?t?`$${s}`:`$${s} (;${e};)`:super.getTableName(e,t)}getMemoryName(e,t){const s=this._memoryNames[e];return s?t?`$${s}`:`$${s} (;${e};)`:super.getMemoryName(e,t)}getGlobalName(e,t){const s=this._globalNames[e];return s?t?`$${s}`:`$${s} (;${e};)`:super.getGlobalName(e,t)}getEventName(e,t){const s=this._eventNames[e];return s?t?`$${s}`:`$${s} (;${e};)`:super.getEventName(e,t)}getFunctionName(e,t,s){const a=this._functionNames[e];return a?s?`$${a}`:`$${a} (;${e};)`:`$unknown${e}`}getVariableName(e,t,s){const a=this._localNames[e]&&this._localNames[e][t];return a?s?`$${a}`:`$${a} (;${t};)`:super.getVariableName(e,t,s)}getFieldName(e,t,s){const a=this._fieldNames[e]&&this._fieldNames[e][t];return a?s?`$${a}`:`$${a} (;${t};)`:super.getFieldName(e,t,s)}}class O extends S{constructor(e,t,s,a,i,r,_,n){super(e,t,s,a,i,r,_,n)}getFunctionName(e,t,s){const a=this._functionNames[e];return a?s?`$${a}`:`$${a} (;${e};)`:t?`$import${e}`:`$func${e}`}}var R=Object.freeze({__proto__:null,DefaultNameResolver:T,NumericNameResolver:class{getTypeName(e,t){return t?""+e:`(;${e};)`}getTableName(e,t){return t?""+e:`(;${e};)`}getMemoryName(e,t){return t?""+e:`(;${e};)`}getGlobalName(e,t){return t?""+e:`(;${e};)`}getElementName(e,t){return t?""+e:`(;${e};)`}getEventName(e,t){return t?""+e:`(;${e};)`}getFunctionName(e,t,s){return s?""+e:`(;${e};)`}getVariableName(e,t,s){return s?""+t:`(;${t};)`}getFieldName(e,t,s){return s?"":t+`(;${t};)`}getLabel(e){return null}},get LabelMode(){return k},WasmDisassembler:class{constructor(){this._skipTypes=!0,this._exportMetadata=null,this._lines=[],this._offsets=[],this._buffer="",this._indent=null,this._indentLevel=0,this._addOffsets=!1,this._done=!1,this._currentPosition=0,this._nameResolver=new T,this._labelMode=k.WhenUsed,this._functionBodyOffsets=[],this._currentFunctionBodyOffset=0,this._currentSectionId=-1,this._logFirstInstruction=!1,this._reset()}_reset(){this._types=[],this._funcIndex=0,this._funcTypes=[],this._importCount=0,this._globalCount=0,this._memoryCount=0,this._eventCount=0,this._tableCount=0,this._elementCount=0,this._expression=[],this._backrefLabels=null,this._labelIndex=0}get addOffsets(){return this._addOffsets}set addOffsets(e){if(this._currentPosition)throw new Error("Cannot switch addOffsets during processing.");this._addOffsets=e}get skipTypes(){return this._skipTypes}set skipTypes(e){if(this._currentPosition)throw new Error("Cannot switch skipTypes during processing.");this._skipTypes=e}get labelMode(){return this._labelMode}set labelMode(e){if(this._currentPosition)throw new Error("Cannot switch labelMode during processing.");this._labelMode=e}get exportMetadata(){return this._exportMetadata}set exportMetadata(e){if(this._currentPosition)throw new Error("Cannot switch exportMetadata during processing.");this._exportMetadata=e}get nameResolver(){return this._nameResolver}set nameResolver(e){if(this._currentPosition)throw new Error("Cannot switch nameResolver during processing.");this._nameResolver=e}appendBuffer(e){this._buffer+=e}newLine(){this.addOffsets&&this._offsets.push(this._currentPosition),this._lines.push(this._buffer),this._buffer=""}logStartOfFunctionBodyOffset(){this.addOffsets&&(this._currentFunctionBodyOffset=this._currentPosition)}logEndOfFunctionBodyOffset(){this.addOffsets&&this._functionBodyOffsets.push({start:this._currentFunctionBodyOffset,end:this._currentPosition})}typeIndexToString(e){if(e>=0)return this._nameResolver.getTypeName(e,!0);switch(e){case-16:return"func";case-17:return"extern";case-18:return"any";case-19:return"eq";case-22:return"i31";case-25:return"data"}}typeToString(e){switch(e.kind){case-1:return"i32";case-2:return"i64";case-3:return"f32";case-4:return"f64";case-5:return"v128";case-6:return"i8";case-7:return"i16";case-16:return"funcref";case-17:return"externref";case-18:return"anyref";case-19:return"eqref";case-22:return"i31ref";case-25:return"dataref";case-21:return`(ref ${this.typeIndexToString(e.index)})`;case-20:return`(ref null ${this.typeIndexToString(e.index)})`;case-24:return`(rtt ${this.typeIndexToString(e.index)})`;case-23:return`(rtt ${e.depth} ${this.typeIndexToString(e.index)})`;default:throw new Error(`Unexpected type ${JSON.stringify(e)}`)}}maybeMut(e,t){return t?`(mut ${e})`:e}globalTypeToString(e){const t=this.typeToString(e.contentType);return this.maybeMut(t,!!e.mutability)}printFuncType(e){var t=this._types[e];if(t.params.length>0){this.appendBuffer(" (param");for(var s=0;s<t.params.length;s++)this.appendBuffer(" "),this.appendBuffer(this.typeToString(t.params[s]));this.appendBuffer(")")}if(t.returns.length>0){this.appendBuffer(" (result");for(s=0;s<t.returns.length;s++)this.appendBuffer(" "),this.appendBuffer(this.typeToString(t.returns[s]));this.appendBuffer(")")}}printStructType(e){var t=this._types[e];if(0!==t.fields.length)for(var s=0;s<t.fields.length;s++){const a=this.maybeMut(this.typeToString(t.fields[s]),t.mutabilities[s]),i=this._nameResolver.getFieldName(e,s,!1);this.appendBuffer(` (field ${i} ${a})`)}}printArrayType(e){var t=this._types[e];this.appendBuffer(" (field "),this.appendBuffer(this.maybeMut(this.typeToString(t.elementType),t.mutability))}printBlockType(e){if(-64!==e.kind){if(0===e.kind)return this.printFuncType(e.index);this.appendBuffer(" (result "),this.appendBuffer(this.typeToString(e)),this.appendBuffer(")")}}printString(e){this.appendBuffer('"');for(var t=0;t<e.length;t++){var s=e[t];s<32||s>=127||34==s||92==s?this.appendBuffer("\\"+(s>>4).toString(16)+(15&s).toString(16)):this.appendBuffer(String.fromCharCode(s))}this.appendBuffer('"')}printExpression(e){for(const t of e)this.appendBuffer("("),this.printOperator(t),this.appendBuffer(")")}useLabel(e,t=0){if(!this._backrefLabels)return""+e;var s=this._backrefLabels.length-e-1-t;if(s<0)return""+e;var a=this._backrefLabels[s];if(!a.useLabel){a.useLabel=!0,a.label=this._nameResolver.getLabel(this._labelIndex);var i=this._lines[a.line];this._lines[a.line]=i.substring(0,a.position)+" "+a.label+i.substring(a.position),this._labelIndex++}return a.label||""+e}printOperator(e){var t=e.code;switch(this.appendBuffer(s[t]),t){case 2:case 3:case 4:case 6:if(this._labelMode!==k.Depth){const e={line:this._lines.length,position:this._buffer.length,useLabel:!1,label:null};this._labelMode===k.Always&&(e.useLabel=!0,e.label=this._nameResolver.getLabel(this._labelIndex++),e.label&&(this.appendBuffer(" "),this.appendBuffer(e.label))),this._backrefLabels.push(e)}this.printBlockType(e.blockType);break;case 11:if(this._labelMode===k.Depth)break;const t=this._backrefLabels.pop();t.label&&(this.appendBuffer(" "),this.appendBuffer(t.label));break;case 12:case 13:case 212:case 214:case 64322:case 64323:case 64352:case 64355:case 64353:case 64356:case 64354:case 64357:this.appendBuffer(" "),this.appendBuffer(this.useLabel(e.brDepth));break;case 64326:case 64327:{const t=this.useLabel(e.brDepth),s=this._nameResolver.getTypeName(e.refType,!0);this.appendBuffer(` ${t} ${s}`);break}case 14:for(var a=0;a<e.brTable.length;a++)this.appendBuffer(" "),this.appendBuffer(this.useLabel(e.brTable[a]));break;case 9:this.appendBuffer(" "),this.appendBuffer(this.useLabel(e.relativeDepth));break;case 24:this.appendBuffer(" "),this.appendBuffer(this.useLabel(e.relativeDepth,1));break;case 7:case 8:var i=this._nameResolver.getEventName(e.eventIndex,!0);this.appendBuffer(` ${i}`);break;case 208:this.appendBuffer(" "),this.appendBuffer(this.typeIndexToString(e.refType));break;case 16:case 18:case 210:var r=this._nameResolver.getFunctionName(e.funcIndex,e.funcIndex<this._importCount,!0);this.appendBuffer(` ${r}`);break;case 17:case 19:this.printFuncType(e.typeIndex);break;case 28:{const t=this.typeToString(e.selectType);this.appendBuffer(` ${t}`);break}case 32:case 33:case 34:var _=this._nameResolver.getVariableName(this._funcIndex,e.localIndex,!0);this.appendBuffer(` ${_}`);break;case 35:case 36:var n=this._nameResolver.getGlobalName(e.globalIndex,!0);this.appendBuffer(` ${n}`);break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 61:case 62:case 65024:case 65025:case 65026:case 65040:case 65041:case 65042:case 65043:case 65044:case 65045:case 65046:case 65047:case 65048:case 65049:case 65050:case 65051:case 65052:case 65053:case 65054:case 65055:case 65056:case 65057:case 65058:case 65059:case 65060:case 65061:case 65062:case 65063:case 65064:case 65065:case 65066:case 65067:case 65068:case 65069:case 65070:case 65071:case 65072:case 65073:case 65074:case 65075:case 65076:case 65077:case 65078:case 65079:case 65080:case 65081:case 65082:case 65083:case 65084:case 65085:case 65086:case 65087:case 65088:case 65089:case 65090:case 65091:case 65092:case 65093:case 65094:case 65095:case 65096:case 65097:case 65098:case 65099:case 65100:case 65101:case 65102:case 64768:case 64769:case 64770:case 64771:case 64772:case 64773:case 64774:case 64775:case 64776:case 64777:case 64778:case 64779:case 64860:case 64861:var c=function(e,t){var s;switch(t){case 64768:case 64769:case 64770:case 64771:case 64772:case 64773:case 64774:case 64775:case 64776:case 64777:case 64778:case 64779:s=4;break;case 41:case 55:case 43:case 57:case 65026:case 65041:case 65048:case 65055:case 65062:case 65069:case 65076:case 65083:case 65090:case 65097:case 64861:s=3;break;case 40:case 52:case 53:case 54:case 62:case 42:case 56:case 65024:case 65025:case 65040:case 65046:case 65047:case 65053:case 65054:case 65060:case 65061:case 65067:case 65068:case 65074:case 65075:case 65081:case 65082:case 65088:case 65089:case 65095:case 65096:case 65102:case 64860:s=2;break;case 46:case 47:case 50:case 51:case 59:case 61:case 65043:case 65045:case 65050:case 65052:case 65057:case 65059:case 65064:case 65066:case 65071:case 65073:case 65078:case 65080:case 65085:case 65087:case 65092:case 65094:case 65099:case 65101:s=1;break;case 44:case 45:case 48:case 49:case 58:case 60:case 65042:case 65044:case 65049:case 65051:case 65056:case 65058:case 65063:case 65065:case 65070:case 65072:case 65077:case 65079:case 65084:case 65086:case 65091:case 65093:case 65098:case 65100:s=0}return e.flags==s?e.offset?`offset=${e.offset}`:null:e.offset?`offset=${0|e.offset} align=${1<<e.flags}`:"align="+(1<<e.flags)}(e.memoryAddress,e.code);null!==c&&(this.appendBuffer(" "),this.appendBuffer(c));break;case 63:case 64:break;case 65:case 66:this.appendBuffer(` ${e.literal.toString()}`);break;case 67:this.appendBuffer(` ${function(e){if(0===e)return 1/e<0?"-0.0":"0.0";if(isFinite(e))return e.toString();if(!isNaN(e))return e<0?"-inf":"inf";var t=new DataView(new ArrayBuffer(8));t.setFloat32(0,e,!0);var s=t.getInt32(0,!0),a=8388607&s;const i=4194304;return s>0&&a===i?"nan":a===i?"-nan":(s<0?"-":"+")+"nan:0x"+a.toString(16)}(e.literal)}`);break;case 68:this.appendBuffer(` ${function(e){if(0===e)return 1/e<0?"-0.0":"0.0";if(isFinite(e))return e.toString();if(!isNaN(e))return e<0?"-inf":"inf";var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e,!0);var s=t.getUint32(0,!0),a=t.getInt32(4,!0),i=s+4294967296*(1048575&a);const r=0x8000000000000;return a>0&&i===r?"nan":i===r?"-nan":(a<0?"-":"+")+"nan:0x"+i.toString(16)}(e.literal)}`);break;case 64780:this.appendBuffer(` i32x4 ${function(e,t){for(var s=new DataView(e.buffer,e.byteOffset,e.byteLength),a=[],i=0;i<t;i++)a.push(`0x${N(s.getInt32(i<<2,!0),8)}`);return a.join(" ")}(e.literal,4)}`);break;case 64781:this.appendBuffer(` ${function(e,t){for(var s=new DataView(e.buffer,e.byteOffset,e.byteLength),a=[],i=0;i<t;i++)a.push(`${s.getInt8(i)}`);return a.join(" ")}(e.lines,16)}`);break;case 64789:case 64790:case 64791:case 64792:case 64793:case 64794:case 64795:case 64796:case 64799:case 64800:case 64797:case 64798:case 64801:case 64802:this.appendBuffer(` ${e.lineIndex}`);break;case 64520:case 64521:this.appendBuffer(` ${e.segmentIndex}`);break;case 64525:const s=this._nameResolver.getElementName(e.segmentIndex,!0);this.appendBuffer(` ${s}`);break;case 38:case 37:case 64529:{const t=this._nameResolver.getTableName(e.tableIndex,!0);this.appendBuffer(` ${t}`);break}case 64526:if(0!==e.tableIndex||0!==e.destinationIndex){const t=this._nameResolver.getTableName(e.tableIndex,!0),s=this._nameResolver.getTableName(e.destinationIndex,!0);this.appendBuffer(` ${s} ${t}`)}break;case 64524:{if(0!==e.tableIndex){const t=this._nameResolver.getTableName(e.tableIndex,!0);this.appendBuffer(` ${t}`)}const t=this._nameResolver.getElementName(e.segmentIndex,!0);this.appendBuffer(` ${t}`);break}case 64259:case 64260:case 64261:case 64262:{const t=this._nameResolver.getTypeName(e.refType,!0),s=this._nameResolver.getFieldName(e.refType,e.fieldIndex,!0);this.appendBuffer(` ${t} ${s}`);break}case 64304:case 64305:case 64306:case 64324:case 64325:case 64264:case 64258:case 64263:case 64257:case 64284:case 64274:case 64283:case 64273:case 64275:case 64276:case 64277:case 64278:case 64279:{const t=this._nameResolver.getTypeName(e.refType,!0);this.appendBuffer(` ${t}`);break}case 64280:{const t=this._nameResolver.getTypeName(e.refType,!0),s=this._nameResolver.getTypeName(e.srcType,!0);this.appendBuffer(` ${t} ${s}`);break}case 64281:case 64282:{const t=this._nameResolver.getTypeName(e.refType,!0),s=e.brDepth;this.appendBuffer(` ${t} ${s}`);break}}}printImportSource(e){this.printString(e.module),this.appendBuffer(" "),this.printString(e.field)}increaseIndent(){this._indent+=" ",this._indentLevel++}decreaseIndent(){this._indent=this._indent.slice(0,-" ".length),this._indentLevel--}disassemble(e){if(!this.disassembleChunk(e))return null;let t=this._lines;this._addOffsets&&(t=t.map(((e,t)=>e+" ;; @"+N(this._offsets[t],4)))),t.push("");const s=t.join("\n");return this._lines.length=0,this._offsets.length=0,this._functionBodyOffsets.length=0,s}getResult(){let e=this._lines.length;if(this._backrefLabels&&this._labelMode===k.WhenUsed&&this._backrefLabels.some((t=>!t.useLabel&&(e=t.line,!0))),0===e)return{lines:[],offsets:this._addOffsets?[]:void 0,done:this._done,functionBodyOffsets:this._addOffsets?[]:void 0};if(e===this._lines.length){const e={lines:this._lines,offsets:this._addOffsets?this._offsets:void 0,done:this._done,functionBodyOffsets:this._addOffsets?this._functionBodyOffsets:void 0};return this._lines=[],this._addOffsets&&(this._offsets=[],this._functionBodyOffsets=[]),e}const t={lines:this._lines.splice(0,e),offsets:this._addOffsets?this._offsets.splice(0,e):void 0,done:!1,functionBodyOffsets:this._addOffsets?this._functionBodyOffsets:void 0};return this._backrefLabels&&this._backrefLabels.forEach((t=>{t.line-=e})),t}disassembleChunk(e,t=0){if(this._done)throw new Error("Invalid state: disassembly process was already finished.");for(;;){if(this._currentPosition=e.position+t,!e.read())return!1;switch(e.state){case 2:if(this.appendBuffer(")"),this.newLine(),this._reset(),!e.hasMoreBytes())return this._done=!0,!0;break;case-1:throw e.error;case 1:this.appendBuffer("(module"),this.newLine();break;case 4:this._currentSectionId=-1;break;case 3:var s=e.result;switch(s.id){case 1:case 2:case 7:case 6:case 3:case 8:case 10:case 5:case 11:case 4:case 9:case 13:this._currentSectionId=s.id;break;default:e.skipSection()}break;case 15:var a=e.result,i=this._memoryCount++,r=this._nameResolver.getMemoryName(i,!1);if(this.appendBuffer(` (memory ${r}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getMemoryExportNames(i))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.appendBuffer(` ${v(a.limits)}`),a.shared&&this.appendBuffer(" shared"),this.appendBuffer(")"),this.newLine();break;case 23:var _=e.result,n=this._eventCount++,c=this._nameResolver.getEventName(n,!1);if(this.appendBuffer(` (event ${c}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getEventExportNames(n))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.printFuncType(_.typeIndex),this.appendBuffer(")"),this.newLine();break;case 14:var o=e.result,h=this._tableCount++,u=this._nameResolver.getTableName(h,!1);if(this.appendBuffer(` (table ${u}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getTableExportNames(h))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.appendBuffer(` ${v(o.limits)} ${this.typeToString(o.elementType)})`),this.newLine();break;case 17:if(null===this._exportMetadata){var d=e.result;switch(this.appendBuffer(" (export "),this.printString(d.field),this.appendBuffer(" "),d.kind){case 0:var l=this._nameResolver.getFunctionName(d.index,d.index<this._importCount,!0);this.appendBuffer(`(func ${l})`);break;case 1:u=this._nameResolver.getTableName(d.index,!0);this.appendBuffer(`(table ${u})`);break;case 2:r=this._nameResolver.getMemoryName(d.index,!0);this.appendBuffer(`(memory ${r})`);break;case 3:var f=this._nameResolver.getGlobalName(d.index,!0);this.appendBuffer(`(global ${f})`);break;case 4:c=this._nameResolver.getEventName(d.index,!0);this.appendBuffer(`(event ${c})`);break;default:throw new Error(`Unsupported export ${d.kind}`)}this.appendBuffer(")"),this.newLine()}break;case 12:var x=e.result;switch(x.kind){case 0:this._importCount++;var p=this._funcIndex++;l=this._nameResolver.getFunctionName(p,!0,!1);if(this.appendBuffer(` (func ${l}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getFunctionExportNames(p))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.appendBuffer(" (import "),this.printImportSource(x),this.appendBuffer(")"),this.printFuncType(x.funcTypeIndex),this.appendBuffer(")");break;case 3:var m=x.type,b=this._globalCount++;f=this._nameResolver.getGlobalName(b,!1);if(this.appendBuffer(` (global ${f}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getGlobalExportNames(b))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.appendBuffer(" (import "),this.printImportSource(x),this.appendBuffer(`) ${this.globalTypeToString(m)})`);break;case 2:var y=x.type;i=this._memoryCount++,r=this._nameResolver.getMemoryName(i,!1);if(this.appendBuffer(` (memory ${r}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getMemoryExportNames(i))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.appendBuffer(" (import "),this.printImportSource(x),this.appendBuffer(`) ${v(y.limits)}`),y.shared&&this.appendBuffer(" shared"),this.appendBuffer(")");break;case 1:var g=x.type;h=this._tableCount++,u=this._nameResolver.getTableName(h,!1);if(this.appendBuffer(` (table ${u}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getTableExportNames(h))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.appendBuffer(" (import "),this.printImportSource(x),this.appendBuffer(`) ${v(g.limits)} ${this.typeToString(g.elementType)})`);break;case 4:var E=x.type;n=this._eventCount++,c=this._nameResolver.getEventName(n,!1);if(this.appendBuffer(` (event ${c}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getEventExportNames(n))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.appendBuffer(" (import "),this.printImportSource(x),this.appendBuffer(")"),this.printFuncType(E.typeIndex),this.appendBuffer(")");break;default:throw new Error(`NYI other import types: ${x.kind}`)}this.newLine();break;case 33:var N=e.result,w=this._elementCount++,T=this._nameResolver.getElementName(w,!1);switch(this.appendBuffer(` (elem ${T}`),N.mode){case 0:if(0!==N.tableIndex){const e=this._nameResolver.getTableName(N.tableIndex,!1);this.appendBuffer(` (table ${e})`)}break;case 1:break;case 2:this.appendBuffer(" declare")}break;case 35:this.appendBuffer(")"),this.newLine();break;case 34:const t=e.result;this.appendBuffer(` ${this.typeToString(t.elementType)}`);break;case 39:var I=e.result;b=this._globalCount++,f=this._nameResolver.getGlobalName(b,!1);if(this.appendBuffer(` (global ${f}`),null!==this._exportMetadata)for(const e of this._exportMetadata.getGlobalExportNames(b))this.appendBuffer(` (export ${JSON.stringify(e)})`);this.appendBuffer(` ${this.globalTypeToString(I.type)}`);break;case 40:this.appendBuffer(")"),this.newLine();break;case 11:var B=e.result,S=this._types.length;if(this._types.push(B),!this._skipTypes){var O=this._nameResolver.getTypeName(S,!1),R=void 0;if(void 0!==B.supertype&&(R=this.typeIndexToString(B.supertype)),-32===B.form)this.appendBuffer(` (type ${O} (func`),this.printFuncType(S),this.appendBuffer("))");else if(-35===B.form)this.appendBuffer(` (type ${O} (func_subtype`),this.printFuncType(S),this.appendBuffer(` (supertype ${R})))`);else if(-33===B.form)this.appendBuffer(` (type ${O} (struct`),this.printStructType(S),this.appendBuffer("))");else if(-36===B.form)this.appendBuffer(` (type ${O} (struct_subtype`),this.printStructType(S),this.appendBuffer(` (supertype ${R})))`);else if(-34===B.form)this.appendBuffer(` (type ${O} (array`),this.printArrayType(S),this.appendBuffer("))");else{if(-37!==B.form)throw new Error(`Unknown type form: ${B.form}`);this.appendBuffer(` (type ${O} (array_subtype`),this.printArrayType(S),this.appendBuffer(`) (supertype ${R})))`)}this.newLine()}break;case 22:var $=e.result;l=this._nameResolver.getFunctionName($.index,$.index<this._importCount,!0);this.appendBuffer(` (start ${l})`),this.newLine();break;case 36:this.appendBuffer(" (data");break;case 37:var L=e.result;this.appendBuffer(" "),this.printString(L.data);break;case 38:this.appendBuffer(")"),this.newLine();break;case 25:case 44:this._expression=[];break;case 26:case 45:11!==(F=e.result).code&&this._expression.push(F);break;case 46:this._expression.length>1?(this.appendBuffer(" (offset "),this.printExpression(this._expression),this.appendBuffer(")")):(this.appendBuffer(" "),this.printExpression(this._expression)),this._expression=[];break;case 27:this._expression.length>1&&9===this._currentSectionId?(this.appendBuffer(" (item "),this.printExpression(this._expression),this.appendBuffer(")")):(this.appendBuffer(" "),this.printExpression(this._expression)),this._expression=[];break;case 13:this._funcTypes.push(e.result.typeIndex);break;case 28:var U=e.result,V=this._types[this._funcTypes[this._funcIndex-this._importCount]];if(this.appendBuffer(" (func "),this.appendBuffer(this._nameResolver.getFunctionName(this._funcIndex,!1,!1)),null!==this._exportMetadata)for(const e of this._exportMetadata.getFunctionExportNames(this._funcIndex))this.appendBuffer(` (export ${JSON.stringify(e)})`);for(var C=0;C<V.params.length;C++){var M=this._nameResolver.getVariableName(this._funcIndex,C,!1);this.appendBuffer(` (param ${M} ${this.typeToString(V.params[C])})`)}for(C=0;C<V.returns.length;C++)this.appendBuffer(` (result ${this.typeToString(V.returns[C])})`);this.newLine();var A=V.params.length;if(U.locals.length>0){for(var D of(this.appendBuffer(" "),U.locals))for(C=0;C<D.count;C++){M=this._nameResolver.getVariableName(this._funcIndex,A++,!1);this.appendBuffer(` (local ${M} ${this.typeToString(D.type)})`)}this.newLine()}this._indent=" ",this._indentLevel=0,this._labelIndex=0,this._backrefLabels=this._labelMode===k.Depth?null:[],this._logFirstInstruction=!0;break;case 30:var F;if(this._logFirstInstruction&&(this.logStartOfFunctionBodyOffset(),this._logFirstInstruction=!1),11==(F=e.result).code&&0==this._indentLevel){this.appendBuffer(" )"),this.newLine();break}switch(F.code){case 11:case 5:case 7:case 25:case 10:case 24:this.decreaseIndent()}switch(this.appendBuffer(this._indent),this.printOperator(F),this.newLine(),F.code){case 4:case 2:case 3:case 5:case 6:case 7:case 25:case 10:this.increaseIndent()}break;case 31:this._funcIndex++,this._backrefLabels=null,this.logEndOfFunctionBodyOffset();break;default:throw new Error(`Expectected state: ${e.state}`)}}}},NameSectionReader:class{constructor(){this._done=!1,this._functionsCount=0,this._functionImportsCount=0,this._functionNames=null,this._functionLocalNames=null,this._eventNames=null,this._typeNames=null,this._tableNames=null,this._memoryNames=null,this._globalNames=null,this._fieldNames=null,this._hasNames=!1}read(e){if(this._done)throw new Error("Invalid state: disassembly process was already finished.");for(;;){if(!e.read())return!1;switch(e.state){case 2:if(!e.hasMoreBytes())return this._done=!0,!0;break;case-1:throw e.error;case 1:this._functionsCount=0,this._functionImportsCount=0,this._functionNames=[],this._functionLocalNames=[],this._eventNames=[],this._typeNames=[],this._tableNames=[],this._memoryNames=[],this._globalNames=[],this._fieldNames=[],this._hasNames=!1;break;case 4:break;case 3:var t=e.result;if(0===t.id&&"name"===l(t.name))break;if(3===t.id||2===t.id)break;e.skipSection();break;case 12:0===e.result.kind&&this._functionImportsCount++;break;case 13:this._functionsCount++;break;case 19:const s=e.result;if(1===s.type){const{names:e}=s;e.forEach((({index:e,name:t})=>{this._functionNames[e]=l(t)})),this._hasNames=!0}else if(2===s.type){const{funcs:e}=s;e.forEach((({index:e,locals:t})=>{const s=this._functionLocalNames[e]=[];t.forEach((({index:e,name:t})=>{s[e]=l(t)}))})),this._hasNames=!0}else if(3===s.type){const{names:e}=s;e.forEach((({index:e,name:t})=>{this._eventNames[e]=l(t)})),this._hasNames=!0}else if(4===s.type){const{names:e}=s;e.forEach((({index:e,name:t})=>{this._typeNames[e]=l(t)})),this._hasNames=!0}else if(5===s.type){const{names:e}=s;e.forEach((({index:e,name:t})=>{this._tableNames[e]=l(t)})),this._hasNames=!0}else if(6===s.type){const{names:e}=s;e.forEach((({index:e,name:t})=>{this._memoryNames[e]=l(t)})),this._hasNames=!0}else if(7===s.type){const{names:e}=s;e.forEach((({index:e,name:t})=>{this._globalNames[e]=l(t)})),this._hasNames=!0}else if(10===s.type){const{types:e}=s;e.forEach((({index:e,fields:t})=>{const s=this._fieldNames[e]=[];t.forEach((({index:e,name:t})=>{s[e]=l(t)}))}))}break;default:throw new Error(`Expectected state: ${e.state}`)}}}hasValidNames(){return this._hasNames}getNameResolver(){if(!this.hasValidNames())throw new Error("Has no valid name section");const e=this._functionImportsCount+this._functionsCount,t=this._functionNames.slice(0,e),s=Object.create(null);for(let e=0;e<t.length;e++){const a=t[e];if(!a)continue;!(a in s)&&w(a)&&0!==a.indexOf("unknown")?s[a]=e:(s[a]>=0&&(t[s[a]]=null,s[a]=-1),t[e]=null)}return new S(t,this._functionLocalNames,this._eventNames,this._typeNames,this._tableNames,this._memoryNames,this._globalNames,this._fieldNames)}},DevToolsNameResolver:O,DevToolsNameGenerator:class{constructor(){this._done=!1,this._functionImportsCount=0,this._memoryImportsCount=0,this._tableImportsCount=0,this._globalImportsCount=0,this._eventImportsCount=0,this._functionNames=null,this._functionLocalNames=null,this._eventNames=null,this._memoryNames=null,this._typeNames=null,this._tableNames=null,this._globalNames=null,this._fieldNames=null,this._functionExportNames=null,this._globalExportNames=null,this._memoryExportNames=null,this._tableExportNames=null,this._eventExportNames=null}_addExportName(e,t,s){const a=e[t];a?a.push(s):e[t]=[s]}_setName(e,t,s,a){if(s)if(a){if(!w(s))return;e[t]=s}else e[t]||(e[t]=s.replace(g,"_"))}read(e){if(this._done)throw new Error("Invalid state: disassembly process was already finished.");for(;;){if(!e.read())return!1;switch(e.state){case 2:if(!e.hasMoreBytes())return this._done=!0,!0;break;case-1:throw e.error;case 1:this._functionImportsCount=0,this._memoryImportsCount=0,this._tableImportsCount=0,this._globalImportsCount=0,this._eventImportsCount=0,this._functionNames=[],this._functionLocalNames=[],this._eventNames=[],this._memoryNames=[],this._typeNames=[],this._tableNames=[],this._globalNames=[],this._fieldNames=[],this._functionExportNames=[],this._globalExportNames=[],this._memoryExportNames=[],this._tableExportNames=[],this._eventExportNames=[];break;case 4:break;case 3:var t=e.result;if(0===t.id&&"name"===l(t.name))break;switch(t.id){case 2:case 7:break;default:e.skipSection()}break;case 12:var s=e.result;const i=`${l(s.module)}.${l(s.field)}`;switch(s.kind){case 0:this._setName(this._functionNames,this._functionImportsCount++,i,!1);break;case 1:this._setName(this._tableNames,this._tableImportsCount++,i,!1);break;case 2:this._setName(this._memoryNames,this._memoryImportsCount++,i,!1);break;case 3:this._setName(this._globalNames,this._globalImportsCount++,i,!1);break;case 4:this._setName(this._eventNames,this._eventImportsCount++,i,!1);default:throw new Error(`Unsupported export ${s.kind}`)}break;case 19:const r=e.result;if(1===r.type){const{names:e}=r;e.forEach((({index:e,name:t})=>{this._setName(this._functionNames,e,l(t),!0)}))}else if(2===r.type){const{funcs:e}=r;e.forEach((({index:e,locals:t})=>{const s=this._functionLocalNames[e]=[];t.forEach((({index:e,name:t})=>{s[e]=l(t)}))}))}else if(3===r.type){const{names:e}=r;e.forEach((({index:e,name:t})=>{this._setName(this._eventNames,e,l(t),!0)}))}else if(4===r.type){const{names:e}=r;e.forEach((({index:e,name:t})=>{this._setName(this._typeNames,e,l(t),!0)}))}else if(5===r.type){const{names:e}=r;e.forEach((({index:e,name:t})=>{this._setName(this._tableNames,e,l(t),!0)}))}else if(6===r.type){const{names:e}=r;e.forEach((({index:e,name:t})=>{this._setName(this._memoryNames,e,l(t),!0)}))}else if(7===r.type){const{names:e}=r;e.forEach((({index:e,name:t})=>{this._setName(this._globalNames,e,l(t),!0)}))}else if(10===r.type){const{types:e}=r;e.forEach((({index:e,fields:t})=>{const s=this._fieldNames[e]=[];t.forEach((({index:e,name:t})=>{s[e]=l(t)}))}))}break;case 17:var a=e.result;const _=l(a.field);switch(a.kind){case 0:this._addExportName(this._functionExportNames,a.index,_),this._setName(this._functionNames,a.index,_,!1);break;case 3:this._addExportName(this._globalExportNames,a.index,_),this._setName(this._globalNames,a.index,_,!1);break;case 2:this._addExportName(this._memoryExportNames,a.index,_),this._setName(this._memoryNames,a.index,_,!1);break;case 1:this._addExportName(this._tableExportNames,a.index,_),this._setName(this._tableNames,a.index,_,!1);break;case 4:this._addExportName(this._eventExportNames,a.index,_),this._setName(this._eventNames,a.index,_,!1);break;default:throw new Error(`Unsupported export ${a.kind}`)}break;default:throw new Error(`Expectected state: ${e.state}`)}}}getExportMetadata(){return new B(this._functionExportNames,this._globalExportNames,this._memoryExportNames,this._tableExportNames,this._eventExportNames)}getNameResolver(){return new O(this._functionNames,this._functionLocalNames,this._eventNames,this._typeNames,this._tableNames,this._memoryNames,this._globalNames,this._fieldNames)}}});export{R as WasmDis,b as WasmParser};
@@ -0,0 +1 @@
1
+ import*as e from"../helpers/helpers.js";import*as t from"../../lit-html/lit-html.js";const r=new CSSStyleSheet;r.replaceSync(':host{display:inline-flex}:host(.hidden){display:none}slot{display:inline-flex;box-sizing:border-box;height:14px;line-height:13px;padding:0 6px;font-size:8.5px;color:var(--override-adorner-text-color,var(--color-text-primary));background-color:var(--override-adorner-background-color,var(--color-background-elevation-1));border:1px solid var(--override-adorner-border-color,var(--color-details-hairline));border-radius:10px}:host(:focus) slot{border-color:var(--override-adorner-focus-border-color,var(--color-primary-old))}:host([aria-pressed="true"]) slot{color:var(--override-adorner-active-text-color,var(--color-background));background-color:var(--override-adorner-active-background-color,var(--color-primary-old));border:1px solid var(--override-adorner-active-background-color,var(--color-primary-old))}::slotted(*){height:10px}\n/*# sourceURL=adorner.css */\n');const{render:o,html:a}=t;class i extends HTMLElement{static litTagName=t.literal`devtools-adorner`;name="";#e=this.attachShadow({mode:"open"});#t=!1;#r;#o;#a;set data(e){this.name=e.name,e.content.slot="content",this.#a?.remove(),this.append(e.content),this.#a=e.content,this.#i()}connectedCallback(){this.getAttribute("aria-label")||this.setAttribute("aria-label",this.name),this.#e.adoptedStyleSheets=[r]}isActive(){return"true"===this.getAttribute("aria-pressed")}toggle(e){if(!this.#t)return;const t=void 0===e?!this.isActive():e;this.setAttribute("aria-pressed",Boolean(t).toString()),this.setAttribute("aria-label",(t?this.#o:this.#r)||this.name)}show(){this.classList.remove("hidden")}hide(){this.classList.add("hidden")}addInteraction(e,t){const{isToggle:r=!1,shouldPropagateOnKeydown:o=!1,ariaLabelDefault:a,ariaLabelActive:i}=t;this.#t=r,this.#r=a,this.#o=i,this.setAttribute("aria-label",a),r&&(this.addEventListener("click",(()=>{this.toggle()})),this.toggle(!1)),this.addEventListener("click",e),this.classList.add("clickable"),this.setAttribute("role","button"),this.tabIndex=0,this.addEventListener("keydown",(e=>{"Enter"!==e.code&&"Space"!==e.code||(this.click(),o||e.stopPropagation())}))}#i(){o(a` <slot name="content"></slot> `,this.#e,{host:this})}}e.CustomElements.defineComponent("devtools-adorner",i);var s=Object.freeze({__proto__:null,Adorner:i});export{s as Adorner};
@@ -0,0 +1 @@
1
+ import*as o from"../../lit-html/lit-html.js";import*as t from"../helpers/helpers.js";import*as r from"../icon_button/icon_button.js";const e=new CSSStyleSheet;e.replaceSync("*{margin:0;padding:0;box-sizing:border-box}*:focus,\n*:focus-visible,\n:host(:focus),\n:host(:focus-visible){outline:none}:host{display:inline-flex;flex-direction:row}button{--button-has-right-border-radius:calc(1 - var(--override-button-no-right-border-radius, 0));--button-border-size:1px;--button-height:24px;--button-width:100%;align-items:center;border-radius:4px calc(var(--button-has-right-border-radius) * 4px) calc(var(--button-has-right-border-radius) * 4px) 4px;display:inline-flex;font-family:inherit;font-size:12px;font-weight:500;height:var(--button-height);line-height:14px;padding:5px 12px;justify-content:center;width:var(--button-width);white-space:nowrap}button.small{--button-height:20px;border-radius:2px calc(var(--button-has-right-border-radius) * 2px) calc(var(--button-has-right-border-radius) * 2px) 2px}button:focus-visible{box-shadow:0 0 0 2px var(--color-button-outline-focus)}button.toolbar,\nbutton.round{--button-height:24px;--button-width:24px;background:transparent;border-radius:2px calc(var(--button-has-right-border-radius) * 2px) calc(var(--button-has-right-border-radius) * 2px) 2px;border:none;overflow:hidden;padding:0;white-space:nowrap}button.round{border-radius:100%}button.round.small,\nbutton.toolbar.small{--button-height:20px;--button-width:20px}button.round.tiny{--button-height:18px;--button-width:18px}button.primary{border:var(--button-border-size) solid var(--color-primary);background:var(--color-primary);color:var(--color-background)}button.primary:hover{background:var(--color-button-primary-background-hovering);border:var(--button-border-size) solid var(--color-button-primary-background-hovering)}button.primary.active,\nbutton.primary:active{background:var(--color-button-primary-background-pressed);border:var(--button-border-size) solid var(--color-button-primary-background-pressed)}button.primary:disabled,\nbutton.primary:disabled:hover{border:var(--button-border-size) solid transparent;background:var(--color-background-elevation-1);color:var(--color-text-disabled);cursor:not-allowed}button.secondary{border:var(--button-border-size) solid var(--color-details-hairline);background:var(--color-background);color:var(--color-primary)}button.secondary:hover{background:var(--color-button-secondary-background-hovering)}button.secondary.active,\nbutton.secondary:active{background:var(--color-button-secondary-background-pressed);border:var(--button-border-size) solid var(--color-button-secondary-background-pressed)}button.secondary:focus-visible{border:var(--button-border-size) solid var(--color-background)}button.secondary:disabled,\nbutton.secondary:disabled:hover{border:var(--button-border-size) solid var(--color-background-elevation-1);background:var(--color-background);color:var(--color-text-disabled);cursor:not-allowed}button.secondary.active:focus-visible,\nbutton.secondary:active:focus-visible{border:var(--button-border-size) solid var(--color-button-secondary-background-pressed)}button.toolbar:hover,\nbutton.round:hover{background-color:var(--color-iconbutton-hover)}button.toolbar.active,\nbutton.toolbar:active,\nbutton.round.active,\nbutton.round:active{background-color:var(--color-iconbutton-pressed)}button.toolbar:focus-visible,\nbutton.round:focus-visible{background-color:var(--color-background-elevation-2)}button.toolbar:disabled,\nbutton.toolbar:disabled:hover,\nbutton.round:disabled,\nbutton.round:disabled:hover{background:var(--color-background);color:var(--color-text-disabled);cursor:not-allowed}button.text-with-icon{padding:0 calc(12px - var(--button-border-size)) 0 calc(8px - var(--button-border-size))}button.small.text-with-icon{padding:0 calc(9px - var(--button-border-size)) 0 calc(3px - var(--button-border-size))}button.only-icon{padding:0}button devtools-icon{width:calc(var(--button-width) - 4px);height:calc(var(--button-height) - 4px)}button.text-with-icon devtools-icon{width:20px;height:20px;margin-right:4px}button.toolbar devtools-icon,\nbutton.round devtools-icon{--icon-color:var(--icon-default)}button.primary-toolbar devtools-icon{--icon-color:var(--icon-primary)}button.primary devtools-icon{--icon-color:var(--color-background)}button.secondary devtools-icon{--icon-color:var(--icon-primary)}button.explicit-size devtools-icon{width:unset;height:unset}button.small.text-with-icon devtools-icon{width:16px;height:16px;margin-right:4px}button.toolbar.explicit-size devtools-icon,\nbutton.round.explicit-size devtools-icon{width:unset;height:unset}button.toolbar.active devtools-icon,\nbutton.toolbar:active devtools-icon{--icon-color:var(--icon-toggled)}button.primary-toolbar:active devtools-icon{--icon-color:var(--icon-primary)}button.toolbar:hover devtools-icon{--icon-color:var(--icon-default-hover)}button.primary-toolbar:hover devtools-icon{--icon-color:var(--icon-primary)}button.toolbar:disabled devtools-icon,\nbutton.round:disabled devtools-icon{--icon-color:var(--icon-disabled)}button.primary:disabled devtools-icon{--icon-color:var(--icon-disabled)}button.secondary:disabled devtools-icon{--icon-color:var(--icon-disabled)}.spinner-component.secondary{border:2px solid var(--color-primary);border-right-color:transparent}.spinner-component.disabled{border:2px solid var(--color-text-disabled);border-right-color:transparent}.spinner-component{display:block;width:12px;height:12px;border-radius:6px;border:2px solid var(--color-background);animation:spinner-animation 1s linear infinite;border-right-color:transparent;margin-right:4px}@keyframes spinner-animation{from{transform:rotate(0)}to{transform:rotate(360deg)}}\n/*# sourceURL=button.css */\n");class i extends HTMLElement{static formAssociated=!0;static litTagName=o.literal`devtools-button`;#o=this.attachShadow({mode:"open",delegatesFocus:!0});#t=this.#r.bind(this);#e=this.#i.bind(this);#n={size:"MEDIUM",disabled:!1,active:!1,spinner:!1,type:"button"};#s=!0;#a=this.attachInternals();constructor(){super(),this.setAttribute("role","presentation"),this.addEventListener("click",this.#e,!0)}set data(o){this.#n.variant=o.variant,this.#n.iconUrl=o.iconUrl,this.#n.iconName=o.iconName,this.#n.size="MEDIUM","size"in o&&o.size&&(this.#n.size=o.size),"iconWidth"in o&&o.iconWidth&&(this.#n.iconWidth=o.iconWidth),"iconHeight"in o&&o.iconHeight&&(this.#n.iconHeight=o.iconHeight),this.#n.active=Boolean(o.active),this.#n.spinner=Boolean("spinner"in o&&o.spinner),this.#n.type="button","type"in o&&o.type&&(this.#n.type=o.type),this.#d(o.disabled||!1),this.#n.title=o.title,t.ScheduledRender.scheduleRender(this,this.#t)}set iconUrl(o){this.#n.iconUrl=o,t.ScheduledRender.scheduleRender(this,this.#t)}set iconName(o){this.#n.iconName=o,t.ScheduledRender.scheduleRender(this,this.#t)}set variant(o){this.#n.variant=o,t.ScheduledRender.scheduleRender(this,this.#t)}set size(o){this.#n.size=o,t.ScheduledRender.scheduleRender(this,this.#t)}set iconWidth(o){this.#n.iconWidth=o,t.ScheduledRender.scheduleRender(this,this.#t)}set iconHeight(o){this.#n.iconHeight=o,t.ScheduledRender.scheduleRender(this,this.#t)}set type(o){this.#n.type=o,t.ScheduledRender.scheduleRender(this,this.#t)}set title(o){this.#n.title=o,t.ScheduledRender.scheduleRender(this,this.#t)}set disabled(o){this.#d(o),t.ScheduledRender.scheduleRender(this,this.#t)}set active(o){this.#n.active=o,t.ScheduledRender.scheduleRender(this,this.#t)}set spinner(o){this.#n.spinner=o,t.ScheduledRender.scheduleRender(this,this.#t)}#d(o){this.#n.disabled=o,this.toggleAttribute("disabled",o)}focus(){this.#o.querySelector("button")?.focus()}connectedCallback(){this.#o.adoptedStyleSheets=[e],t.ScheduledRender.scheduleRender(this,this.#t)}#i(o){if(this.#n.disabled)return o.stopPropagation(),void o.preventDefault();this.form&&"submit"===this.#n.type&&(o.preventDefault(),this.form.dispatchEvent(new SubmitEvent("submit",{submitter:this}))),this.form&&"reset"===this.#n.type&&(o.preventDefault(),this.form.reset())}#c(o){const r=o.target?.assignedNodes();this.#s=!r||!Boolean(r.length),t.ScheduledRender.scheduleRender(this,this.#t)}#l(){return"toolbar"===this.#n.variant||"primary_toolbar"===this.#n.variant}#r(){if(!this.#n.variant)throw new Error("Button requires a variant to be defined");if(this.#l()){if(!this.#n.iconUrl&&!this.#n.iconName)throw new Error("Toolbar button requires an icon");if(!this.#s)throw new Error("Toolbar button does not accept children")}if("round"===this.#n.variant){if(!this.#n.iconUrl&&!this.#n.iconName)throw new Error("Round button requires an icon");if(!this.#s)throw new Error("Round button does not accept children")}if(this.#n.iconName&&this.#n.iconUrl)throw new Error("Both iconName and iconUrl are provided.");const t=Boolean(this.#n.iconUrl)||Boolean(this.#n.iconName),e={primary:"primary"===this.#n.variant,secondary:"secondary"===this.#n.variant,toolbar:this.#l(),"primary-toolbar":"primary_toolbar"===this.#n.variant,round:"round"===this.#n.variant,"text-with-icon":t&&!this.#s,"only-icon":t&&this.#s,small:Boolean("SMALL"===this.#n.size||"TINY"===this.#n.size),tiny:Boolean("TINY"===this.#n.size),active:this.#n.active,"explicit-size":Boolean(this.#n.iconHeight||this.#n.iconWidth)},i={primary:"primary"===this.#n.variant,secondary:"secondary"===this.#n.variant,disabled:Boolean(this.#n.disabled),"spinner-component":!0};o.render(o.html` <button title="${o.Directives.ifDefined(this.#n.title)}" .disabled="${this.#n.disabled}" class="${o.Directives.classMap(e)}"> ${t?o.html`<${r.Icon.Icon.litTagName} .data="${{iconPath:this.#n.iconUrl,iconName:this.#n.iconName,color:"var(--color-background)",width:this.#n.iconWidth||void 0,height:this.#n.iconHeight||void 0}}"> </${r.Icon.Icon.litTagName}>`:""} ${this.#n.spinner?o.html`<span class="${o.Directives.classMap(i)}"></span>`:""} <slot @slotchange="${this.#c}"></slot> </button> `,this.#o,{host:this})}get value(){return this.#n.value||""}set value(o){this.#n.value=o}get form(){return this.#a.form}get name(){return this.getAttribute("name")}get type(){return this.#n.type}get validity(){return this.#a.validity}get validationMessage(){return this.#a.validationMessage}get willValidate(){return this.#a.willValidate}checkValidity(){return this.#a.checkValidity()}reportValidity(){return this.#a.reportValidity()}}t.CustomElements.defineComponent("devtools-button",i);var n=Object.freeze({__proto__:null,Button:i});export{n as Button};
@@ -0,0 +1 @@
1
+ import*as e from"../../../core/platform/platform.js";import*as t from"../../../core/sdk/sdk.js";import*as r from"../../lit-html/lit-html.js";import*as o from"../helpers/helpers.js";const s=new CSSStyleSheet;s.replaceSync(".link{color:var(--color-link);text-decoration:underline;cursor:pointer;outline-offset:2px}\n/*# sourceURL=chromeLink.css */\n");class n extends HTMLElement{static litTagName=r.literal`devtools-chrome-link`;#e=this.attachShadow({mode:"open"});#t=this.#r.bind(this);#o="";connectedCallback(){this.#e.adoptedStyleSheets=[s],o.ScheduledRender.scheduleRender(this,this.#t)}set href(e){if(!e.startsWith("chrome://"))throw new Error("ChromeLink href needs to start with 'chrome://'");this.#o=e,o.ScheduledRender.scheduleRender(this,this.#t)}openSettingsTab(r){if("click"===r.type||"keydown"===r.type&&e.KeyboardUtilities.isEnterOrSpaceKey(r)){const e=t.TargetManager.TargetManager.instance().rootTarget();e&&e.targetAgent().invoke_createTarget({url:this.#o}),r.consume(!0)}}#r(){r.render(r.html` <a href="${this.#o}" class="link" target="_blank" @click="${this.openSettingsTab}" @keydown="${this.openSettingsTab}"><slot></slot></a> `,this.#e,{host:this})}}o.CustomElements.defineComponent("devtools-chrome-link",n);var i=Object.freeze({__proto__:null,ChromeLink:n});export{i as ChromeLink};
@@ -0,0 +1 @@
1
+ import*as t from"../../../third_party/codemirror.next/codemirror.next.js";const e=new CSSStyleSheet;e.replaceSync(".token-variable{color:var(--color-token-variable)}.token-property{color:var(--color-token-property)}.token-type{color:var(--color-token-type)}.token-variable-special{color:var(--color-token-variable-special)}.token-definition{color:var(--color-token-definition)}.token-builtin{color:var(--color-token-builtin)}.token-number{color:var(--color-token-number)}.token-string{color:var(--color-token-string)}.token-string-special{color:var(--color-token-string-special)}.token-atom{color:var(--color-token-atom)}.token-keyword{color:var(--color-token-keyword)}.token-comment{color:var(--color-token-comment)}.token-meta{color:var(--color-token-meta)}.token-invalid{color:var(--color-error-text)}.token-tag{color:var(--color-token-tag)}.token-attribute{color:var(--color-token-attribute)}.token-attribute-value{color:var(--color-token-attribute-value)}.token-inserted{color:var(--color-token-inserted)}.token-deleted{color:var(--color-token-deleted)}.token-heading{color:var(--color-token-variable-special);font-weight:bold}.token-link{color:var(--color-token-variable-special);text-decoration:underline}.token-strikethrough{text-decoration:strike-through}.token-strong{font-weight:bold}.token-emphasis{font-style:italic}\n/*# sourceURL=codeHighlighter.css */\n");var a=Object.freeze({__proto__:null,default:e});const r=t.tags,o=t.HighlightStyle.define([{tag:r.variableName,class:"token-variable"},{tag:r.definition(r.variableName),class:"token-definition"},{tag:r.propertyName,class:"token-property"},{tag:[r.typeName,r.className,r.namespace,r.macroName],class:"token-type"},{tag:[r.special(r.name),r.constant(r.className)],class:"token-variable-special"},{tag:r.standard(r.variableName),class:"token-builtin"},{tag:[r.number,r.literal,r.unit],class:"token-number"},{tag:r.string,class:"token-string"},{tag:[r.special(r.string),r.regexp,r.escape],class:"token-string-special"},{tag:[r.atom,r.labelName,r.bool],class:"token-atom"},{tag:r.keyword,class:"token-keyword"},{tag:[r.comment,r.quote],class:"token-comment"},{tag:r.meta,class:"token-meta"},{tag:r.invalid,class:"token-invalid"},{tag:r.tagName,class:"token-tag"},{tag:r.attributeName,class:"token-attribute"},{tag:r.attributeValue,class:"token-attribute-value"},{tag:r.inserted,class:"token-inserted"},{tag:r.deleted,class:"token-deleted"},{tag:r.heading,class:"token-heading"},{tag:r.link,class:"token-link"},{tag:r.strikethrough,class:"token-strikethrough"},{tag:r.strong,class:"token-strong"},{tag:r.emphasis,class:"token-emphasis"}]);async function s(e,a){const r=await n(a);let o;return o=r?r.language.parser.parse(e):new t.Tree(t.NodeType.none,[],[],e.length),new c(e,o)}async function n(e){switch(e){case"application/javascript":case"application/ecmascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript ":case"text/x-ecmascript":case"text/x-javascript":case"text/javascript":case"text/jsx":return t.javascript.javascript({jsx:!0});case"text/typescript":return t.javascript.javascript({typescript:!0});case"text/typescript-jsx":return t.javascript.javascript({typescript:!0,jsx:!0});case"text/css":return t.css.css();case"text/html":return t.html.html({selfClosingTags:!0});case"application/xml":case"image/svg+xml":return(await t.xml()).xml();case"application/wasm":return(await t.wast()).wast();case"text/x-c++src":return(await t.cpp()).cpp();case"text/x-go":return new t.LanguageSupport(await t.go());case"text/x-java":return(await t.java()).java();case"text/x-kotlin":return new t.LanguageSupport(await t.kotlin());case"application/json":case"application/manifest+json":return(await t.json()).json();case"application/x-httpd-php":return(await t.php()).php();case"text/x-python":return(await t.python()).python();case"text/markdown":return(await t.markdown()).markdown();case"text/x-sh":return new t.LanguageSupport(await t.shell());case"text/x-coffeescript":return new t.LanguageSupport(await t.coffeescript());case"text/x-clojure":return new t.LanguageSupport(await t.clojure());case"application/vnd.dart":return new t.LanguageSupport(await t.dart());case"text/x-gss":return new t.LanguageSupport(await t.gss());case"text/x-less":return(await t.less()).less();case"text/x-sass":return(await t.sass()).sass({indented:!0});case"text/x-scala":return new t.LanguageSupport(await t.scala());case"text/x-scss":return(await t.sass()).sass({indented:!1});case"text/x.angular":return(await t.angular()).angular();case"text/x.svelte":return(await t.svelte()).svelte();case"text/x.vue":return(await t.vue()).vue();default:return null}}class c{code;tree;constructor(t,e){this.code=t,this.tree=e}highlight(t){this.highlightRange(0,this.code.length,t)}highlightRange(e,a,r){let s=e;const n=(t,e)=>{t>s&&(r(this.code.slice(s,t),e),s=t)};t.highlightTree(this.tree,o,((t,e,a)=>{n(t,""),n(e,a)}),e,a),n(a,"")}}var i=Object.freeze({__proto__:null,highlightStyle:o,create:s,highlightNode:async function(t,e){const a=t.textContent||"",r=await s(a,e);t.removeChildren(),r.highlight(((e,a)=>{let r=document.createTextNode(e);if(a){const t=document.createElement("span");t.className=a,t.appendChild(r),r=t}t.appendChild(r)}))},languageFromMIME:n,CodeHighlighter:c});export{i as CodeHighlighter,a as Style};
@@ -0,0 +1 @@
1
+ import*as e from"../../../core/host/host.js";import*as t from"../../../core/platform/platform.js";import*as o from"../../legacy/legacy.js";import*as s from"../../lit-html/lit-html.js";import*as i from"../helpers/helpers.js";import*as r from"../render_coordinator/render_coordinator.js";import*as n from"../icon_button/icon_button.js";import*as l from"../../../core/i18n/i18n.js";const a=new CSSStyleSheet;a.replaceSync(':host{height:100%;display:block;position:relative}.wrapping-container{overflow-y:auto;height:100%}.wrapping-container:not(.show-scrollbar)::-webkit-scrollbar{display:none}table{border-spacing:0;width:100%;height:100%;table-layout:fixed}tr{outline:none}thead tr{height:27px}tbody tr{background-color:var(--override-data-grid-row-background-color,--color-background)}tbody tr.selected{background-color:var(--color-background-elevation-1)}td,\nth{padding:1px 4px;border-left:1px solid var(--color-details-hairline);color:var(--color-text-primary);line-height:var(--table-row-height);height:var(--table-row-height);user-select:text;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}th{font-weight:normal;text-align:left;border-bottom:1px solid var(--color-details-hairline);position:sticky;top:0;z-index:2;background-color:var(--color-background-elevation-1)}td:focus,\nth:focus{outline:var(--color-primary-old) auto 1px}th:hover.sortable{background:var(--color-background-elevation-0)}.cell-resize-handle{top:0;height:100%;z-index:3;width:20px;cursor:col-resize;position:absolute}td.firstVisibleColumn,\nth.firstVisibleColumn{border-left:none}.hidden{display:none}.filler-row td{height:100%;pointer-events:none;padding:0}.filler-row.empty-table td{padding:1px}[aria-sort="descending"]::after{content:"";width:0;border-left:0.4em solid transparent;border-right:0.4em solid transparent;border-top:0.4em solid var(--color-text-secondary);position:absolute;right:0.5em;top:0.85em}[aria-sort="ascending"]::after{content:"";width:0;border-bottom:0.4em solid var(--color-text-secondary);border-left:0.4em solid transparent;border-right:0.4em solid transparent;position:absolute;right:0.5em;top:0.7em}@media (forced-colors: active){th.sortable{outline:Highlight auto 1px}th:hover.sortable{background-color:Highlight}[aria-sort="ascending"]::after{forced-color-adjust:none;border-bottom:0.4em solid buttonText}[aria-sort="descending"]::after{forced-color-adjust:none;border-top:0.4em solid buttonText}}\n/*# sourceURL=dataGrid.css */\n');class c extends Event{static eventName="columnheaderclick";data;constructor(e,t){super(c.eventName),this.data={column:e,columnIndex:t}}}class d extends Event{static eventName="contextmenucolumnsortclick";data;constructor(e){super(d.eventName),this.data={column:e}}}class h extends Event{static eventName="contextmenuheaderresetclick";constructor(){super(h.eventName)}}class u extends Event{static eventName="newuserfiltertext";data;constructor(e){super(u.eventName,{composed:!0}),this.data={filterText:e}}}class m extends Event{static eventName="cellfocused";data;constructor(e,t){super(m.eventName,{composed:!0}),this.data={cell:e,row:t}}}var g=Object.freeze({__proto__:null,ColumnHeaderClickEvent:c,ContextMenuColumnSortClickEvent:d,ContextMenuHeaderResetClickEvent:h,NewUserFilterTextEvent:u,BodyCellFocusedEvent:m});function f(e,t){const o=!t.visible,s=e.data.columns.map((e=>(e===t&&(e.visible=o),e)));e.data={...e.data,columns:s}}function p(e,t){const{columns:o}=e.data;for(const s of o)s.hideable&&t.defaultSection().appendCheckboxItem(s.title,(()=>{f(e,s)}),s.visible)}function w(e,t){const o=e.data.columns.filter((e=>!0===e.sortable));if(o.length>0)for(const s of o)t.defaultSection().appendItem(s.title,(()=>{e.dispatchEvent(new d(s))}))}const b=e=>s.html`${e}`;var C=Object.freeze({__proto__:null,primitiveRenderer:b,codeBlockRenderer:e=>{if(!e)return s.nothing;const t=String(e);return s.html`<code>${t}</code>`}});function v(e){return JSON.stringify(e.map((e=>e.value instanceof n.Icon.Icon?null:e.value))).toLowerCase()}function S(e,t){const o=e.cells.find((e=>e.columnId===t));if(void 0===o)throw new Error(`Found a row that was missing an entry for column ${t}.`);return o}function x(e){return e.renderer?e.renderer(e.value):b(e.value)}function R(e,t){const o=e.filter((e=>e.visible)).reduce(((e,t)=>e+t.widthWeighting),0),s=e.find((e=>e.id===t));if(!s)throw new Error(`Could not find column with ID ${t}`);if(s.widthWeighting<1)throw new Error(`Error with column ${t}: width weightings must be >= 1.`);return s.visible?Math.round(s.widthWeighting/o*100):0}function y(e){const{key:o,currentFocusedCell:s,columns:i,rows:r}=e,[n,l]=s;switch(o){case"ArrowLeft":{if(n===i.findIndex((e=>e.visible)))return[n,l];let e=n;for(let t=e-1;t>=0;t--){if(i[t].visible){e=t;break}}return[e,l]}case"ArrowRight":{let e=n;for(let t=e+1;t<i.length;t++){if(i[t].visible){e=t;break}}return[e,l]}case"ArrowUp":{const e=i.some((e=>!0===e.sortable))?0:1;if(l===e)return[n,l];let t=l;for(let o=l-1;o>=e;o--){if(0===o){t=0;break}if(!r[o-1].hidden){t=o;break}}return[n,t]}case"ArrowDown":{if(0===l){const e=r.findIndex((e=>!e.hidden));return e>-1?[n,e+1]:[n,l]}let e=l;for(let t=e+1;t<r.length+1;t++){if(!r[t-1].hidden){e=t;break}}return[n,e]}default:return t.assertNever(o,`Unknown arrow key: ${o}`)}}const M=e=>{const{columns:t,rows:o}=e,s=t.some((e=>!0===e.sortable))?0:o.findIndex((e=>!e.hidden))+1;return[t.findIndex((e=>e.visible)),s]},I=e=>e.length<25?e:e.substr(0,20)+"…";var $=Object.freeze({__proto__:null,getStringifiedCellValues:v,getRowEntryForColumnId:S,renderCellValue:x,calculateColumnWidthPercentageFromWeighting:R,handleArrowKeyNavigation:y,calculateFirstFocusableCell:M,getCellTitleFromCellContent:I});const H=r.RenderCoordinator.RenderCoordinator.instance(),D={sortBy:"Sort By",resetColumns:"Reset Columns",headerOptions:"Header Options",enterToSort:"Column sort state: {PH1}. Press enter to apply sorting filter",sortAsc:"ascending",sortDesc:"descending",sortNone:"none"},O=l.i18n.registerUIStrings("ui/components/data_grid/DataGrid.ts",D),F=l.i18n.getLocalizedString.bind(void 0,O),T=new Set([" ","Enter"]);class k extends HTMLElement{static litTagName=s.literal`devtools-data-grid`;#e=this.attachShadow({mode:"open"});#t=[];#o=[];#s=null;#i=!1;#r="NOT_SCROLLED";#n=void 0;#l=void 0;#a=10;#c=!1;#d=null;#h=new WeakMap;#u=new ResizeObserver((()=>{this.#m()}));#g=this.#f.bind(this);#p=[0,1];#w=null;#b=!1;#C=!1;#v=!1;connectedCallback(){this.#e.adoptedStyleSheets=[a],i.SetCSSProperty.set(this,"--table-row-height","18px")}get data(){return{columns:this.#t,rows:this.#o,activeSort:this.#s,contextMenus:this.#n,label:this.#l,paddingRowsCount:this.#a,showScrollbar:this.#c}}set data(e){if(this.#t=e.columns,this.#o=e.rows,this.#o.forEach(((e,t)=>{this.#h.set(e,t)})),this.#s=e.activeSort,this.#n=e.contextMenus,this.#l=e.label,this.#c=e.showScrollbar,this.#b||(this.#p=M({columns:this.#t,rows:this.#o})),void 0!==e.paddingRowsCount&&(this.#a=e.paddingRowsCount),this.#b&&this.#S()){const[e,t]=this.#x(),o=e>this.#t.length,s=t>this.#o.length;(o||s)&&(this.#w=[o?this.#t.length:e,s?this.#o.length:t])}this.#R()}#y(){return"SCROLLED_TO_BOTTOM"===this.#r||!this.#C&&"MANUAL_SCROLL_NOT_BOTTOM"!==this.#r}#M(){if(!1===this.#b||!this.#y())return;const e=this.#e.querySelector(".wrapping-container");e&&H.scroll((()=>{const t=e.scrollHeight;e.scrollTo(0,t)}))}#I(){this.#b||this.#u.observe(this.#e.host)}#S(){return null!==this.#w}#$(){if(!this.#w)return null;const[e,t]=this.#w;return this.#e.querySelector(`[data-row-index="${t}"][data-col-index="${e}"]`)}#H(e){e.focus()}#D([e,t]){if(this.#C=!0,this.#w&&this.#w[0]===e&&this.#w[1]===t)return;this.#w=[e,t],this.#R();const s=this.#$();if(s&&(this.#H(s),0===t&&this.#t[e].sortable)){const t=this.#O(this.#t[e]);o.ARIAUtils.alert(F(D.enterToSort,{PH1:t||""}))}}#O(e){switch(this.#F(e)){case"ascending":return D.sortAsc;case"descending":return D.sortDesc;case"none":return D.sortNone}}#T(e){const o=e.key;if(!this.#w)return;if(T.has(o)){const[e,t]=this.#w,o=this.#t[e];0===t&&o&&o.sortable&&this.#k(o,e)}if(!t.KeyboardUtilities.keyIsArrowKey(o))return;const s=y({key:o,currentFocusedCell:this.#w,columns:this.#t,rows:this.#o});e.preventDefault(),this.#D(s)}#k(e,t){this.dispatchEvent(new c(e,t))}#F(e){return!e.sortable||this.#s&&this.#s.columnId===e.id?this.#s&&this.#s.columnId===e.id?"ASC"===this.#s.direction?"ascending":"descending":void 0:"none"}#z(e){const t=this.#t.map(((e,t)=>{if(!e.visible)return s.nothing;const o=s.Directives.classMap({firstVisibleColumn:0===t});return s.html`<td aria-hidden="true" class="${o}" data-filler-row-column-index="${t}">`})),o=s.Directives.classMap({"filler-row":!0,"padding-row":!0,"empty-table":0===e});return s.html`<tr aria-hidden="true" class="${o}">${t}`}#A(){this.#d&&(this.#d.documentForCursorChange.body.style.cursor=this.#d.cursorToRestore,this.#d=null,this.#m())}#E(t){if(1!==t.buttons||e.Platform.isMac()&&t.ctrlKey)return;t.preventDefault();const o=t.target;if(!o)return;const s=o.dataset.columnIndex;if(!s)return;const i=globalThis.parseInt(s,10),r=this.#t.findIndex(((e,t)=>t>i&&!0===e.visible)),n=this.#e.querySelector(`td[data-filler-row-column-index="${i}"]`),l=this.#e.querySelector(`td[data-filler-row-column-index="${r}"]`);if(!n||!l)return;const a=this.#e.querySelector(`col[data-col-column-index="${i}"]`),c=this.#e.querySelector(`col[data-col-column-index="${r}"]`);if(!a||!c)return;const d=t.target.ownerDocument;d&&(this.#d={leftCellCol:a,rightCellCol:c,leftCellColInitialPercentageWidth:globalThis.parseInt(a.style.width,10),rightCellColInitialPercentageWidth:globalThis.parseInt(c.style.width,10),initialLeftCellWidth:n.clientWidth,initialRightCellWidth:l.clientWidth,initialMouseX:t.x,documentForCursorChange:d,cursorToRestore:o.style.cursor},d.body.style.cursor="col-resize",o.setPointerCapture(t.pointerId),o.addEventListener("pointermove",this.#g))}#f(e){if(e.preventDefault(),!this.#d)return;const o=this.#d.leftCellColInitialPercentageWidth+this.#d.rightCellColInitialPercentageWidth-10,s=e.x-this.#d.initialMouseX,i=Math.abs(s)/(this.#d.initialLeftCellWidth+this.#d.initialRightCellWidth)*100;let r,n;s>0?(r=t.NumberUtilities.clamp(this.#d.leftCellColInitialPercentageWidth+i,10,o),n=t.NumberUtilities.clamp(this.#d.rightCellColInitialPercentageWidth-i,10,o)):s<0&&(r=t.NumberUtilities.clamp(this.#d.leftCellColInitialPercentageWidth-i,10,o),n=t.NumberUtilities.clamp(this.#d.rightCellColInitialPercentageWidth+i,10,o)),r&&n&&(this.#d.leftCellCol.style.width=r.toFixed(2)+"%",this.#d.rightCellCol.style.width=n.toFixed(2)+"%")}#U(e){e.preventDefault();const t=e.target;t&&(t.releasePointerCapture(e.pointerId),t.removeEventListener("pointermove",this.#g),this.#A())}#L(e,t){const[o]=t;return o!==this.#_()&&e.visible?s.html`<span class="cell-resize-handle" @pointerdown="${this.#E}" @pointerup="${this.#U}" data-column-index="${o}"></span>`:s.nothing}#_(){let e=this.#t.length-1;for(;e>-1;e--){if(this.#t[e].visible)break}return e}#P(e){if(2!==e.button&&-1!==e.button)return;const t=new o.ContextMenu.ContextMenu(e);p(this,t);w(this,t.defaultSection().appendSubMenuItem(F(D.sortBy))),t.defaultSection().appendItem(F(D.resetColumns),(()=>{this.dispatchEvent(new h)})),this.#n&&this.#n.headerRow&&this.#n.headerRow(t,this.#t),t.show()}#N(e){if(2!==e.button&&-1!==e.button)return;if(!(e.target&&e.target instanceof HTMLElement))return;const t=e.target.dataset.rowIndex;if(!t)return;const s=parseInt(t,10),i=this.#o[s-1],r=new o.ContextMenu.ContextMenu(e);w(this,r.defaultSection().appendSubMenuItem(F(D.sortBy)));const n=r.defaultSection().appendSubMenuItem(F(D.headerOptions));p(this,n),n.defaultSection().appendItem(F(D.resetColumns),(()=>{this.dispatchEvent(new h)})),this.#n&&this.#n.bodyRow&&this.#n.bodyRow(r,this.#t,i),r.show()}#W(e){const t=e.target;if(!t)return;const o=Math.round(t.scrollTop+t.clientHeight)===Math.round(t.scrollHeight);this.#r=o?"SCROLLED_TO_BOTTOM":"MANUAL_SCROLL_NOT_BOTTOM",this.#R()}#m(){return H.read((()=>{const e=this.#e.querySelectorAll("th:not(.hidden)"),t=this.#e.querySelectorAll(".cell-resize-handle");this.#e.querySelector("table")&&e.forEach((async(e,o)=>{const s=e.clientWidth,i=e.offsetLeft;if(t[o]){const e=t[o].clientWidth;H.write((()=>{t[o].style.left=i+s-e+"px"}))}}))}))}#G(){return H.read((()=>{const e=this.#e.querySelector(".wrapping-container");let t=0,o=window.innerHeight;e&&(t=e.scrollTop,o=e.clientHeight);const s=18*this.#a;let i=Math.floor((t-s)/18),r=Math.ceil((t+o+s)/18);return i=Math.max(0,i),r=Math.min(this.#o.filter((e=>!e.hidden)).length,r),{topVisibleRow:i,bottomVisibleRow:r}}))}#B(){this.#C=!1}#x(){return this.#w||this.#p}async#R(){if(this.#i)return void(this.#v=!0);this.#i=!0;const{topVisibleRow:e,bottomVisibleRow:t}=await this.#G(),o=this.#o.filter((e=>!e.hidden)),i=o.filter(((o,s)=>s>=e&&s<=t)),r=this.#t.findIndex((e=>e.visible)),n=this.#t.some((e=>!0===e.sortable)),l={"wrapping-container":!0,"show-scrollbar":!0===this.#c};await H.write((()=>{s.render(s.html` ${this.#t.map(((e,t)=>this.#L(e,[t,0])))} <div class="${s.Directives.classMap(l)}" @scroll="${this.#W}" @focusout="${this.#B}"> <table aria-label="${s.Directives.ifDefined(this.#l)}" aria-rowcount="${this.#o.length}" aria-colcount="${this.#t.length}" @keydown="${this.#T}"> <colgroup> ${this.#t.map(((e,t)=>{const o=`width: ${R(this.#t,e.id)}%`;return e.visible?s.html`<col style="${o}" data-col-column-index="${t}">`:s.nothing}))} </colgroup> <thead> <tr @contextmenu="${this.#P}"> ${this.#t.map(((e,t)=>{const o=s.Directives.classMap({hidden:!e.visible,firstVisibleColumn:t===r,sortable:n}),i=this.#x(),l=n&&t===i[0]&&0===i[1];return s.html`<th class="${o}" style="${s.Directives.ifDefined(e.styles?s.Directives.styleMap(e.styles):void 0)}" data-grid-header-cell="${e.id}" @focus="${()=>{this.#D([t,0])}}" @click="${()=>{this.#k(e,t)}}" title="${e.title}" aria-sort="${s.Directives.ifDefined(this.#F(e))}" aria-colindex="${t+1}" data-row-index="0" data-col-index="${t}" tabindex="${s.Directives.ifDefined(n?l?"0":"-1":void 0)}">${e.titleElement||e.title}`}))} </tr> </thead> <tbody> <tr class="filler-row-top padding-row" style="${s.Directives.styleMap({height:18*e+"px"})}" aria-hidden="true"></tr> ${s.Directives.repeat(i,(e=>this.#h.get(e)),(e=>{const t=this.#h.get(e);if(void 0===t)throw new Error("Trying to render a row that has no index in the rowIndexMap");const o=this.#x(),i=t+1,n=!!this.#w&&i===this.#w[1],l=s.Directives.classMap({selected:n,hidden:!0===e.hidden});return s.html` <tr aria-rowindex="${t+1}" class="${l}" style="${s.Directives.ifDefined(e.styles?s.Directives.styleMap(e.styles):void 0)}" @contextmenu="${this.#N}">${this.#t.map(((t,n)=>{const l=S(e,t.id),a=s.Directives.classMap({hidden:!t.visible,firstVisibleColumn:n===r}),c=n===o[0]&&i===o[1],d=t.visible?x(l):null;return s.html`<td class="${a}" style="${s.Directives.ifDefined(t.styles?s.Directives.styleMap(t.styles):void 0)}" tabindex="${c?"0":"-1"}" aria-colindex="${n+1}" title="${l.title||I(String(l.value))}" data-row-index="${i}" data-col-index="${n}" data-grid-value-cell-for-column="${t.id}" @focus="${()=>{this.#D([n,i]),this.dispatchEvent(new m(l,e))}}">${d}`}))} `}))} ${this.#z(i.length)} <tr class="filler-row-bottom padding-row" style="${s.Directives.styleMap({height:18*Math.max(0,o.length-t)+"px"})}" aria-hidden="true"></tr> </tbody> </table> </div> `,this.#e,{host:this})}));const a=this.#x()[1],c=this.#$();this.#C&&a>0&&c&&this.#H(c),this.#M(),this.#I(),this.#b&&this.#m(),this.#i=!1,this.#b=!0,this.#v&&(this.#v=!1,this.#R())}}i.CustomElements.defineComponent("devtools-data-grid",k);var z=Object.freeze({__proto__:null,DataGrid:k});const A=new CSSStyleSheet;A.replaceSync(":host{display:block;height:100%;overflow:hidden}\n/*# sourceURL=dataGridController.css */\n");var E;function U(e){e.style.position="absolute",e.style.left="-999em",e.style.width="100em",e.style.overflow="hidden"}let L,_;!function(e){e.inline="inline",e.list="list",e.both="both",e.none="none"}(E||(E={}));let P=!1;function N(e){(function(){if(!L){const e=document.body.createChild("div");U(e),e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),L=e}if(!_){const e=document.body.createChild("div");U(e),e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),_=e}return P=!P,P?(_.textContent="",L):(L.textContent="",_)}()).textContent=t.StringUtilities.trimEndWithMaxLength(e,1e4)}const W={sortInAscendingOrder:"{PH1} sorted in ascending order",sortInDescendingOrder:"{PH1} sorted in descending order",sortingCanceled:"{PH1} sorting canceled"},G=l.i18n.registerUIStrings("ui/components/data_grid/DataGridController.ts",W),B=l.i18n.getLocalizedString.bind(void 0,G);class j extends HTMLElement{static litTagName=s.literal`devtools-data-grid-controller`;#e=this.attachShadow({mode:"open"});#b=!1;#t=[];#o=[];#n=void 0;#l=void 0;#c=!1;#j=[];#q=[];#s=null;#V=[];#a;connectedCallback(){this.#e.adoptedStyleSheets=[A]}get data(){return{columns:this.#j,rows:this.#q,filters:this.#V,contextMenus:this.#n,label:this.#l,paddingRowsCount:this.#a,showScrollbar:this.#c}}set data(e){this.#j=e.columns,this.#q=e.rows,this.#n=e.contextMenus,this.#V=e.filters||[],this.#n=e.contextMenus,this.#l=e.label,this.#c=e.showScrollbar,this.#t=[...this.#j],this.#o=this.#K(e.rows,this.#V),!this.#b&&e.initialSort&&(this.#s=e.initialSort),this.#s&&this.#X(this.#s),this.#a=e.paddingRowsCount,this.#R()}#J(e,t,o){let s=!1;const{key:i,text:r,negative:n,regex:l}=t;let a;return a=v(i?[S(e,i)]:e.cells.filter((e=>o.has(e.columnId)))),l?s=l.test(a):r&&(s=a.includes(r.toLowerCase())),n?!s:s}#K(e,t){if(0===t.length)return[...e];const o=new Set(this.#t.filter((e=>e.visible)).map((e=>e.id)));return e.map((e=>{let s=!0;for(const i of t){if(!this.#J(e,i,o)){s=!1;break}}return{...e,hidden:!s}}))}#X(e){const{columnId:t,direction:o}=e;this.#o.sort(((e,s)=>{const i=S(e,t),r=S(s,t),n="number"==typeof i.value?i.value:String(i.value).toUpperCase(),l="number"==typeof r.value?r.value:String(r.value).toUpperCase();return n<l?"ASC"===o?-1:1:n>l?"ASC"===o?1:-1:0})),this.#R()}#k(e){const{column:t}=e.data;t.sortable&&this.#Q(t)}#Q(e){if(this.#s&&this.#s.columnId===e.id){const{columnId:e,direction:t}=this.#s;this.#s="DESC"===t?null:{columnId:e,direction:"DESC"}}else this.#s={columnId:e.id,direction:"ASC"};const t=e.title;this.#s?(this.#X(this.#s),N("ASC"===this.#s.direction?B(W.sortInAscendingOrder,{PH1:t||""}):B(W.sortInDescendingOrder,{PH1:t||""}))):(this.#o=this.#K(this.#q,this.#V),this.#R(),N(B(W.sortingCanceled,{PH1:t||""})))}#Y(e){this.#Q(e.data.column)}#Z(){this.#s=null,this.#o=[...this.#q],this.#R()}#R(){s.render(s.html` <${k.litTagName} .data="${{columns:this.#t,rows:this.#o,activeSort:this.#s,contextMenus:this.#n,label:this.#l,paddingRowsCount:this.#a,showScrollbar:this.#c}}" @columnheaderclick="${this.#k}" @contextmenucolumnsortclick="${this.#Y}" @contextmenuheaderresetclick="${this.#Z}"></${k.litTagName}> `,this.#e,{host:this}),this.#b=!0}}i.CustomElements.defineComponent("devtools-data-grid-controller",j);var q=Object.freeze({__proto__:null,DataGridController:j});class V extends o.Widget.VBox{dataGrid;constructor(e){super(!0,!0),this.dataGrid=new j,this.dataGrid.data=e,this.contentElement.appendChild(this.dataGrid)}data(){return this.dataGrid.data}update(e){this.dataGrid.data=e}}var K=Object.freeze({__proto__:null,DataGridControllerIntegrator:V});export{z as DataGrid,q as DataGridController,K as DataGridControllerIntegrator,g as DataGridEvents,C as DataGridRenderers,$ as DataGridUtils};
@@ -0,0 +1 @@
1
+ import*as t from"../../../core/platform/platform.js";import*as e from"../../../services/window_bounds/window_bounds.js";import*as o from"../helpers/helpers.js";import*as i from"../render_coordinator/render_coordinator.js";import*as n from"../../lit-html/lit-html.js";import*as s from"../../../core/i18n/i18n.js";import*as r from"../buttons/buttons.js";const a=new CSSStyleSheet;a.replaceSync(":host{--override-transparent:rgb(0 0 0/0%);display:var(--dialog-display)}dialog::backdrop{background:var(--override-transparent)}dialog{background:var(--override-transparent);border:none;border-radius:4px;top:var(--dialog-top);padding:var(--dialog-padding);left:var(--dialog-left);right:var(--dialog-right);margin:var(--dialog-margin);margin-left:var(--dialog-margin-left,0);margin-bottom:var(--dialog-margin-bottom);animation-name:slideIn;animation-duration:100ms;animation-timing-function:cubic-bezier(0,0,0.3,1);overflow:hidden}dialog:focus,\ndialog:focus-visible{outline:none}#content{min-width:var(--content-min-width);background:var(--color-background-elevation-dark-only);border-radius:4px;padding-top:var(--content-padding-top);padding-bottom:var(--content-padding-bottom);box-shadow:var(--override-content-box-shadow);max-height:var(--dialog-max-height);max-width:var(--dialog-max-width);overflow:auto;outline:none;clip-path:polygon(var(--content-clip-path))}#content-wrap{filter:drop-shadow(0 1px 2px rgb(60 64 67/30%)) drop-shadow(0 2px 0 rgb(60 64 67/15%))}@keyframes slideIn{from{transform:translateY(var(--dialog-offset-y));opacity:0%}to{opacity:100%}}\n/*# sourceURL=dialog.css */\n");const l=i.RenderCoordinator.RenderCoordinator.instance(),h="HTMLDialogElement"in globalThis;class d extends HTMLElement{static litTagName=n.literal`devtools-dialog`;#t=this.attachShadow({mode:"open"});#e=this.#o.bind(this);#i=this.#n.bind(this);#s=this.#r.bind(this);#a={origin:"MODAL",position:"bottom",horizontalAlignment:"center",showConnector:!1,getConnectorCustomXPosition:null,dialogShownCallback:null,windowBoundsService:e.WindowBoundsService.WindowBoundsServiceImpl.instance(),closeOnESC:!0,closeOnScroll:!0};#l=null;#h=!1;#d=!1;#g=new DOMRect(0,0,0,0);#p=new DOMRect(0,0,0,0);#c=null;#u=null;#S=new MutationObserver(this.#i);#m=new ResizeObserver(this.#w.bind(this));#b=this.windowBoundsService.getDevToolsBoundingElement();#v=this.#C.bind(this);get showConnector(){return this.#a.showConnector}set showConnector(t){this.#a.showConnector=t,this.#y()}get origin(){return this.#a.origin}set origin(t){this.#a.origin=t,this.#y()}get position(){return this.#a.position}set position(t){this.#a.position=t,this.#y()}get horizontalAlignment(){return this.#a.horizontalAlignment}set horizontalAlignment(t){this.#a.horizontalAlignment=t,this.#y()}get windowBoundsService(){return this.#a.windowBoundsService}set windowBoundsService(t){this.#a.windowBoundsService=t,this.#b=this.windowBoundsService.getDevToolsBoundingElement(),this.#y()}get bestVerticalPosition(){return this.#c}get bestHorizontalAlignment(){return this.#u}get getConnectorCustomXPosition(){return this.#a.getConnectorCustomXPosition}set getConnectorCustomXPosition(t){this.#a.getConnectorCustomXPosition=t,this.#y()}get dialogShownCallback(){return this.#a.dialogShownCallback}set dialogShownCallback(t){this.#a.dialogShownCallback=t,this.#y()}set closeOnESC(t){this.#a.closeOnESC=t,this.#y()}set closeOnScroll(t){this.#a.closeOnScroll=t,this.#y()}#w(){this.#p=this.#x().getBoundingClientRect()}#y(){o.ScheduledRender.scheduleRender(this,this.#e)}connectedCallback(){this.#t.adoptedStyleSheets=[a],window.addEventListener("resize",this.#i),document.body.addEventListener("keydown",this.#v),this.#S.observe(this.#b,{childList:!0,subtree:!0}),this.#b.addEventListener("wheel",this.#s),o.SetCSSProperty.set(this,"--dialog-padding","0"),o.SetCSSProperty.set(this,"--override-content-box-shadow","none"),o.SetCSSProperty.set(this,"--dialog-display",h?"block":"none"),o.SetCSSProperty.set(this,"--override-dialog-content-border","10px solid transparent"),o.SetCSSProperty.set(this,"--dialog-padding","3px 5px")}disconnectedCallback(){window.removeEventListener("resize",this.#i),document.body.removeEventListener("keydown",this.#v),this.#b.removeEventListener("wheel",this.#s),this.#S.disconnect(),this.#m.disconnect()}#x(){if(!this.#l){if(this.#l=this.#t.querySelector("dialog"),!this.#l)throw new Error("Dialog not found");this.#m.observe(this.#l)}return this.#l}getHitArea(){return this.#g}async setDialogVisible(t){t?await this.#D():this.#f()}async#P(t){if(t.stopPropagation(),t instanceof PointerEvent&&""===t.pointerType)return;const e=this.#E(t),o=this.#k(t);if(!e)if("pointermove"!==t.type)this.dispatchEvent(new p);else{if(o)return;this.dispatchEvent(new g)}}#E(t){const e=this.#p,o="bottom"===this.bestVerticalPosition?20:-20,i=t.pageX>=e.left&&t.pageX<=e.left+e.width,n=t.pageY>=e.top+o&&t.pageY<=e.top+e.height+o;return i&&n}#k(t){const e=this.#g,o=t.pageX>=e.left&&t.pageX<=e.left+e.width,i=t.pageY>=e.top&&t.pageY<=e.top+e.height;return o&&i}#A(t){if(!t||"MODAL"===t)throw new Error("Dialog origin is null");const e=t instanceof Function?t():t;return e instanceof DOMPoint?{top:e.y,bottom:e.y,left:e.x,right:e.x}:e instanceof HTMLElement?e.getBoundingClientRect():e}#B(t,e){return e.right-t.left>t.right-e.left?"left":"right"}#$(t,e,o){const{bottom:i}=t;return i+e>o?"top":"bottom"}#O(){this.#a.origin&&(this.#h=!0,l.read((()=>{const e=this.#b.getBoundingClientRect(),i=e.width,n=e.height,s=e.left,r=e.top,a=e.right;if("MODAL"===this.#a.origin)return void l.write((()=>{o.SetCSSProperty.set(this,"--dialog-top",`${r}px`),o.SetCSSProperty.set(this,"--dialog-left",`${s}px`),o.SetCSSProperty.set(this,"--dialog-margin","auto"),o.SetCSSProperty.set(this,"--dialog-margin-left","auto"),o.SetCSSProperty.set(this,"--dialog-margin-bottom","auto"),o.SetCSSProperty.set(this,"--dialog-max-height",n-30+"px"),o.SetCSSProperty.set(this,"--dialog-max-width",i-30+"px"),o.SetCSSProperty.set(this,"--dialog-right",document.body.clientWidth-a+"px")}));const h=this.#a.origin,d=this.#A(h),{top:g,right:p,bottom:c,left:u}=d,S=(u+p)/2,m=p-u+10,w=document.body.clientWidth,b=this.#a.getConnectorCustomXPosition?this.#a.getConnectorCustomXPosition():S;l.write((()=>{o.SetCSSProperty.set(this,"--dialog-top","0");const l=this.#x();l.style.visibility="hidden",this.#h&&!l.hasAttribute("open")&&(l.showModal(),this.setAttribute("open",""),this.#h=!1);const{width:h,height:v}=l.getBoundingClientRect();if(this.#u="auto"===this.#a.horizontalAlignment?this.#B(d,e):this.#a.horizontalAlignment,this.#c="auto"===this.#a.position?this.#$(d,v,n):this.#a.position,"auto"===this.#u||"auto"===this.#c)return;this.#g.height=c-g+10*(this.showConnector?2:1),this.#g.width=m;let C=0;o.SetCSSProperty.set(this,"--content-min-width",b-u+20+10+"px"),o.SetCSSProperty.set(this,"--dialog-left","auto"),o.SetCSSProperty.set(this,"--dialog-right","auto"),o.SetCSSProperty.set(this,"--dialog-margin","0");const y=this.showConnector?15:0;switch(this.#u){case"left":{const t=Math.max(u-y,s),e=a-t-30;C=b-t-5,o.SetCSSProperty.set(this,"--dialog-left",`${t}px`),this.#g.x=u,o.SetCSSProperty.set(this,"--dialog-max-width",`${e}px`);break}case"right":{const t=w-p,e=w-a,i=Math.max(t-y,e),n=w-i,r=n-s-30,l=Math.min(r,h);C=b-(n-l),this.#g.x=w-i-m,o.SetCSSProperty.set(this,"--dialog-right",`${i}px`),o.SetCSSProperty.set(this,"--dialog-max-width",`${r}px`);break}case"center":{const t=Math.min(i-30,h);let e=Math.max(S-.5*t,s);e=Math.min(e,a-t),C=b-e-5,o.SetCSSProperty.set(this,"--dialog-left",`${e}px`),this.#g.x=S-.5*m,o.SetCSSProperty.set(this,"--dialog-max-width",i-30+"px");break}default:t.assertNever(this.#u,`Unknown alignment type: ${this.#u}`)}const x=this.showConnector?10:0,D=C-10,f=C+10;let[P,E,k,A,B,$,O,R,T]=["","","","","","","","","",""];switch(this.#c){case"top":{const t="calc(100% - 10px)";this.#a.showConnector&&(P="0 0",E="100% 0",k=`100% calc(${t} - 2px)`,A=`calc(100% - 2px) ${t}`,B=`${D}px ${t}`,$=`${C}px 100%`,O=`${f}px ${t}`,R=`2px ${t}`,T=`0 calc(${t} - 2px)`),o.SetCSSProperty.set(this,"--content-padding-bottom",10+(this.#a.showConnector?10:0)+"px"),o.SetCSSProperty.set(this,"--content-padding-top","10px"),o.SetCSSProperty.set(this,"--dialog-top","0"),o.SetCSSProperty.set(this,"--dialog-margin","auto"),o.SetCSSProperty.set(this,"--dialog-margin-bottom",innerHeight-g+"px"),this.#g.y=g-20,o.SetCSSProperty.set(this,"--dialog-offset-y","20px"),o.SetCSSProperty.set(this,"--dialog-max-height",n-(innerHeight-g)-30-x+"px");break}case"bottom":this.#a.showConnector&&(P="0 12px",E="2px 10px",k=`${D}px 10px`,A=`${C}px 0`,B=`${f}px 10px`,$="calc(100% - 2px) 10px",O="100% 12px",R="100% 100%",T="0 100%"),o.SetCSSProperty.set(this,"--content-padding-top",10+(this.#a.showConnector?10:0)+"px"),o.SetCSSProperty.set(this,"--content-padding-bottom","10px"),o.SetCSSProperty.set(this,"--dialog-top",`${c}px`),this.#g.y=g,o.SetCSSProperty.set(this,"--dialog-offset-y","-20px"),o.SetCSSProperty.set(this,"--dialog-max-height",n-(c-r)-30-x+"px");break;default:t.assertNever(this.#c,`Unknown position type: ${this.#c}`)}const I=[P,E,k,A,B,$,O,R,T].join();o.SetCSSProperty.set(this,"--content-clip-path",I),l.close(),l.style.visibility=""}))})))}async#D(){if(!h)return;if(this.#h||this.hasAttribute("open"))return;this.#h=!0,this.#O(),await l.done(),this.#h=!1;const t=this.#x();t.hasAttribute("open")||t.showModal(),this.#a.dialogShownCallback&&await this.#a.dialogShownCallback(),this.#w()}#r(t){!this.#E(t)&&this.#a.closeOnScroll&&this.#x().hasAttribute("open")&&(this.#f(),this.dispatchEvent(new c))}#C(e){this.#x().hasAttribute("open")&&this.#a.closeOnESC&&e.key===t.KeyboardUtilities.ESCAPE_KEY&&(e.stopPropagation(),e.preventDefault(),this.#f(),this.dispatchEvent(new c))}#R(t){t.stopPropagation(),t.preventDefault(),this.#x().hasAttribute("open")&&this.#a.closeOnESC&&this.dispatchEvent(new c)}#n(){this.#l?.hasAttribute("open")&&this.#b!==document.body&&(this.#f(),this.dispatchEvent(new c))}#f(){!this.#d&&this.#x().hasAttribute("open")&&(this.#d=!0,l.write((()=>{this.#g.width=0,this.removeAttribute("open"),this.#x().close(),this.#d=!1})))}getDialogBounds(){return this.#p}#o(){if(!o.ScheduledRender.isScheduledRender(this))throw new Error("Dialog render was not scheduled");h?n.render(n.html` <dialog @click="${this.#P}" @pointermove="${this.#P}" @cancel="${this.#R}"> <div id="content-wrap"> <div id="content"> <slot></slot> </div> </div> </dialog> `,this.#t,{host:this}):n.render(n.html` <slot></slot> `,this.#t,{host:this})}}o.CustomElements.defineComponent("devtools-dialog",d);class g extends Event{static eventName="pointerleftdialog";constructor(){super(g.eventName,{bubbles:!0,composed:!0})}}class p extends Event{static eventName="clickoutsidedialog";constructor(){super(p.eventName,{bubbles:!0,composed:!0})}}class c extends Event{static eventName="forceddialogclose";constructor(){super(c.eventName,{bubbles:!0,composed:!0})}}var u=Object.freeze({__proto__:null,CONNECTOR_HEIGHT:10,DIALOG_SIDE_PADDING:5,DIALOG_VERTICAL_PADDING:3,DIALOG_PADDING_FROM_WINDOW:30,MODAL:"MODAL",Dialog:d,PointerLeftDialogEvent:g,ClickOutsideDialogEvent:p,ForcedDialogClose:c});const S=new CSSStyleSheet;S.replaceSync(".keybinds-category-header{white-space:nowrap;padding:0 10px 20px;display:flex}.keybinds-category-header-text{line-height:24px;flex:auto;font-weight:bold}.keybinds-key{padding:0.1em 0.6em;border:1px solid var(--color-details-hairline);font-size:11px;background-color:var(--color-background-elevation-1);color:var(--color-text-primary);box-shadow:var(--box-shadow-outline-color);border-radius:3px;display:inline-block;margin:0 0.1em;text-shadow:0 1px 0 var(--color-background);line-height:1.5;white-space:nowrap}.keybinds-list{list-style:none;margin:0;padding:0}.keybinds-list-item{line-height:30px;display:flex;padding:0 10px}.keybinds-list-text{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;user-select:none;color:var(--color-text-primary);text-align:start;position:relative;margin-right:0}.keybinds-shortcut-separator{white-space:pre-wrap}.keybinds-action-name{flex:auto;padding-right:30px}.keybinds-shortcut{flex:none}.close-icon{width:12px;height:12px;padding-top:2px}\n/*# sourceURL=shortcutDialog.css */\n");const m={showShortcutTitle:"Show shortcuts",dialogTitle:"Keyboard shortcuts",close:"Close"},w=s.i18n.registerUIStrings("ui/components/dialogs/ShortcutDialog.ts",m),b=s.i18n.getLocalizedString.bind(void 0,w);class v extends Event{static eventName="showdialog";constructor(){super(v.eventName)}}class C extends HTMLElement{static litTagName=n.literal`devtools-shortcut-dialog`;#t=this.attachShadow({mode:"open"});#e=this.#o.bind(this);#l=null;#T=null;#I=[];#z=!1;connectedCallback(){this.#t.adoptedStyleSheets=[S]}set data(t){this.#I=t.shortcuts,t.open&&(this.#z=t.open),o.ScheduledRender.scheduleRender(this,this.#e)}#D(){if(!this.#l)throw new Error("Dialog not found");this.#l.setDialogVisible(!0),o.ScheduledRender.scheduleRender(this,this.#e),this.dispatchEvent(new v)}#f(t){if(!this.#l)throw new Error("Dialog not found");this.#l.setDialogVisible(!1),t&&t.stopImmediatePropagation(),o.ScheduledRender.scheduleRender(this,this.#e)}#o(){if(!o.ScheduledRender.isScheduledRender(this))throw new Error("Shortcut dialog render was not scheduled");n.render(n.html` <${r.Button.Button.litTagName} @click="${this.#D}" on-render="${o.Directives.nodeRenderedCallback((t=>{this.#T=t}))}" .data="${{variant:"toolbar",iconName:"help",title:b(m.showShortcutTitle),iconWidth:"16px"}}"></${r.Button.Button.litTagName}> <${d.litTagName} @clickoutsidedialog="${this.#f}" .showConnector="${!0}" .origin="${()=>{if(!this.#T)throw new Error("Button not found");return this.#T}}" .position="${"bottom"}" .horizontalAlignment="${"right"}" on-render="${o.Directives.nodeRenderedCallback((t=>{this.#l=t}))}"> <div class="keybinds-category-header"> <span class="keybinds-category-header-text">${b(m.dialogTitle)}</span> <${r.Button.Button.litTagName} @click="${this.#f}" class="close-icon" .data="${{variant:"toolbar",iconName:"cross",title:b(m.close)}}"></${r.Button.Button.litTagName}> </div> <ul class="keybinds-list"> ${this.#I.map((t=>n.html` <li class="keybinds-list-item"> <div class="keybinds-action-name keybinds-list-text">${t.title}</div> ${t.bindings.map(((e,o)=>n.html` <div class="keybinds-shortcut keybinds-list-text"> <span class="keybinds-key">${e}</span> </div> ${t.bindings.at(o+1)?n.html`<span class="keybinds-shortcut-separator"> - </span>`:n.nothing} `))} `))} </ul> </${d.litTagName}> `,this.#t,{host:this}),this.#z&&(this.#D(),this.#z=!1)}}o.CustomElements.defineComponent("devtools-shortcut-dialog",C);var y=Object.freeze({__proto__:null,ShowDialog:v,ShortcutDialog:C});export{u as Dialog,y as ShortcutDialog};
@@ -0,0 +1 @@
1
+ import*as e from"../../../core/i18n/i18n.js";import*as i from"../../../third_party/diff/diff.js";import*as n from"../../lit-html/lit-html.js";import*as t from"../code_highlighter/code_highlighter.js";import*as r from"../helpers/helpers.js";const o=new CSSStyleSheet;o.replaceSync(".diff-listing{display:grid;grid-template-columns:max-content max-content max-content auto;font-family:var(--source-code-font-family);font-size:var(--source-code-font-size);white-space:pre;line-height:1.2em;user-select:text}.diff-line-number{color:var(--color-line-number);padding:0 3px 0 9px;text-align:right;user-select:none}.diff-line-marker{border-right:1px solid var(--color-details-hairline);width:20px;text-align:center}.diff-line-content{padding:0 4px}.diff-line-marker-addition,\n.diff-line-addition{--override-addition-background-color:hsl(144deg 55% 49%/20%);background-color:var(--override-addition-background-color)}.diff-line-marker-deletion,\n.diff-line-deletion{--override-deletion-background-color:rgb(255 0 0/20%);background-color:var(--override-deletion-background-color)}.diff-line-addition .inner-diff{--override-addition-inner-diff-background-color:hsl(144deg 55% 49%/30%);background-color:var(--override-addition-inner-diff-background-color)}.diff-line-deletion .inner-diff{--override-deletion-inner-diff-background-color:rgb(255 0 0/30%);background-color:var(--override-deletion-inner-diff-background-color)}.diff-hidden-text{display:inline-block;width:0;overflow:hidden}.diff-line-equal{opacity:50%}.diff-line-spacer{--override-spacer-background-color:rgb(0 0 255/10%);text-align:center;background-color:var(--override-spacer-background-color)}\n/*# sourceURL=diffView.css */\n");const a={deletions:"Deletion:",additions:"Addition:",changesDiffViewer:"Changes diff viewer",SkippingDMatchingLines:"( … Skipping {PH1} matching lines … )"},d=e.i18n.registerUIStrings("ui/components/diff_view/DiffView.ts",a),l=e.i18n.getLocalizedString.bind(void 0,d);function s(e){let n=0,t=0;const r=[],o=[],d=[];for(let n=0;n<e.length;++n){const t=e[n];switch(t[0]){case i.Diff.Operation.Equal:d.push(...s(t[1],0===n,n===e.length-1)),r.push(...t[1]),o.push(...t[1]);break;case i.Diff.Operation.Insert:for(const e of t[1])d.push(c(e,"addition"));o.push(...t[1]);break;case i.Diff.Operation.Delete:if(r.push(...t[1]),e[n+1]&&e[n+1][0]===i.Diff.Operation.Insert)n++,d.push(...f(t[1].join("\n"),e[n][1].join("\n"))),o.push(...e[n][1]);else for(const e of t[1])d.push(c(e,"deletion"))}}return{originalLines:r,currentLines:o,rows:d};function s(e,i,r){const o=[];if(!i){for(let i=0;i<3&&i<e.length;i++)o.push(c(e[i],"equal"));e.length>7&&!r&&o.push(c(l(a.SkippingDMatchingLines,{PH1:e.length-6}),"spacer"))}if(!r){const r=Math.max(e.length-3-1,i?0:3);let a=e.length-3-1;i||(a-=3),a>0&&(t+=a,n+=a);for(let i=r;i<e.length;i++)o.push(c(e[i],"equal"))}return o}function f(e,n){const t=i.Diff.DiffWrapper.charDiff(e,n,!0),r=[c("","deletion")],o=[c("","addition")];for(const e of t){const n=e[1],t=e[0],a=t===i.Diff.Operation.Equal?"":"inner-diff",d=n.split("\n");for(let e=0;e<d.length;e++)e>0&&t!==i.Diff.Operation.Insert&&r.push(c("","deletion")),e>0&&t!==i.Diff.Operation.Delete&&o.push(c("","addition")),d[e]&&(t!==i.Diff.Operation.Insert&&r[r.length-1].tokens.push({text:d[e],className:a}),t!==i.Diff.Operation.Delete&&o[o.length-1].tokens.push({text:d[e],className:a}))}return r.concat(o)}function c(e,i){return"addition"===i&&n++,"deletion"===i&&t++,"equal"===i&&(t++,n++),{originalLineNumber:t,currentLineNumber:n,tokens:e?[{text:e,className:"inner-diff"}]:[],type:i}}}function f(e){const i=new Map;for(let n=0,t=0;t<e.length;t++)i.set(t+1,n),n+=e[t].length+1;return i}class c{originalHighlighter;originalMap;currentHighlighter;currentMap;constructor(e,i,n,t){this.originalHighlighter=e,this.originalMap=i,this.currentHighlighter=n,this.currentMap=t}#e(e){return n.html` <div class="diff-listing" aria-label="${l(a.changesDiffViewer)}"> ${e.map((e=>this.#i(e)))} </div>`}#i(e){const i="equal"===e.type||"deletion"===e.type?String(e.originalLineNumber):"",t="equal"===e.type||"addition"===e.type?String(e.currentLineNumber):"";let r="",o="diff-line-marker",d=null;return"addition"===e.type?(r="+",o+=" diff-line-addition",d=n.html`<span class="diff-hidden-text">${l(a.additions)}</span>`):"deletion"===e.type&&(r="-",o+=" diff-line-deletion",d=n.html`<span class="diff-hidden-text">${l(a.deletions)}</span>`),n.html` <div class="diff-line-number" aria-hidden="true">${i}</div> <div class="diff-line-number" aria-hidden="true">${t}</div> <div class="${o}" aria-hidden="true">${r}</div> <div class="diff-line-content diff-line-${e.type}" data-line-number="${t}">${d}${this.#n(e)}</div>`}#n(e){if("spacer"===e.type)return e.tokens.map((e=>n.html`${e.text}`));const[i,t]="deletion"===e.type?[this.originalHighlighter,this.originalMap.get(e.originalLineNumber)]:[this.currentHighlighter,this.currentMap.get(e.currentLineNumber)],r=[];let o=t;for(const t of e.tokens){const e=[];i.highlightRange(o,o+t.text.length,((i,t)=>{e.push(t?n.html`<span class="${t}">${i}</span>`:i)})),r.push(t.className?n.html`<span class="${t.className}">${e}</span>`:n.html`${e}`),o+=t.text.length}return r}static async render(e,i,r){const{originalLines:o,currentLines:a,rows:d}=s(e),l=new c(await t.CodeHighlighter.create(o.join("\n"),i),f(o),await t.CodeHighlighter.create(a.join("\n"),i),f(a));n.render(l.#e(d),r,{host:this})}}class h extends HTMLElement{static litTagName=n.literal`devtools-diff-view`;#t=this.attachShadow({mode:"open"});loaded;constructor(e){super(),this.#t.adoptedStyleSheets=[o,t.Style.default],this.loaded=e?c.render(e.diff,e.mimeType,this.#t):Promise.resolve()}set data(e){this.loaded=c.render(e.diff,e.mimeType,this.#t)}}r.CustomElements.defineComponent("devtools-diff-view",h);var g=Object.freeze({__proto__:null,buildDiffRows:s,DiffView:h});export{g as DiffView};
@@ -0,0 +1 @@
1
+ import*as e from"../helpers/helpers.js";import*as t from"../../lit-html/lit-html.js";const n=new CSSStyleSheet;n.replaceSync(":host{overflow:hidden}div{line-height:1.7em}.arrow-icon-button{cursor:pointer;padding:1px 0;border:none;background:none;margin-right:2px}.arrow-icon{display:inline-block;-webkit-mask-image:var(--image-file-triangle-right);background-color:var(--icon-default);margin-top:2px;height:14px;width:14px;transition:transform 200ms}.arrow-icon.expanded{transform:rotate(90deg)}.expandable-list-container{display:flex;margin-top:4px}.expandable-list-items{overflow:hidden}.link,\n.devtools-link{color:var(--color-link);text-decoration:underline;cursor:pointer;outline-offset:2px}button.link{border:none;background:none;font-family:inherit;font-size:inherit}.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n/*# sourceURL=expandableList.css */\n");class i extends HTMLElement{static litTagName=t.literal`devtools-expandable-list`;#e=this.attachShadow({mode:"open"});#t=!1;#n=[];set data(e){this.#n=e.rows,this.#i()}#o(){this.#t=!this.#t,this.#i()}connectedCallback(){this.#e.adoptedStyleSheets=[n]}#i(){this.#n.length<1||t.render(t.html` <div class="expandable-list-container"> <div> ${this.#n.length>1?t.html` <button @click="${()=>this.#o()}" class="arrow-icon-button"> <span class="arrow-icon ${this.#t?"expanded":""}"></span> </button> `:t.nothing} </div> <div class="expandable-list-items"> ${this.#n.filter(((e,t)=>this.#t||0===t)).map((e=>t.html` ${e} `))} </div> </div> `,this.#e,{host:this})}}e.CustomElements.defineComponent("devtools-expandable-list",i);var o=Object.freeze({__proto__:null,ExpandableList:i});export{o as ExpandableList};
@@ -0,0 +1 @@
1
+ import*as e from"../../legacy/theme_support/theme_support.js";import*as t from"../../lit-html/lit-html.js";import*as r from"../../../core/platform/platform.js";import*as o from"../render_coordinator/render_coordinator.js";var n=Object.freeze({__proto__:null,setup:async function(){const t={get:()=>"default"};e.ThemeSupport.instance({forceNew:!0,setting:t})}});var a=Object.freeze({__proto__:null,defineComponent:function(e,t){customElements.get(e)?console.error(`${e} already defined!`):customElements.define(e,t)}});class s extends t.Directive.Directive{constructor(e){if(super(e),e.type!==t.Directive.PartType.ATTRIBUTE)throw new Error("Node rendered callback directive must be used as an attribute.")}update(e,[t]){t(e.element)}render(e){}}const c=t.Directive.directive(s);var d=Object.freeze({__proto__:null,nodeRenderedCallback:c});var i=Object.freeze({__proto__:null,getRootNode:function(e){const t=e.getRootNode();return t.nodeName,t}});const l=o.RenderCoordinator.RenderCoordinator.instance(),u=new WeakSet,p=new WeakSet,f=new WeakMap,_=new WeakMap;var m=Object.freeze({__proto__:null,scheduleRender:async function e(t,r){if(p.has(t))return void f.set(t,r);if(u.has(t))return;u.add(t);let o=_.get(r);if(o||(o=async()=>{u.delete(t),p.add(t);try{await r.call(t)}catch(e){throw console.error(`ScheduledRender: rendering ${t.nodeName.toLowerCase()}:`),console.error(e),e}finally{p.delete(t)}},_.set(r,o)),await l.write(o),f.has(t)){const r=f.get(t);if(f.delete(t),!r)return;e(t,r)}},isScheduledRender:function(e){return p.has(e)}});var h=Object.freeze({__proto__:null,set:function(e,t,r){e.style.setProperty(t,r)}});export{n as ComponentServerSetup,a as CustomElements,d as Directives,i as GetRootNode,m as ScheduledRender,h as SetCSSProperty};
@@ -0,0 +1 @@
1
+ import*as t from"../helpers/helpers.js";import*as e from"../../lit-html/lit-html.js";import*as o from"../render_coordinator/render_coordinator.js";const i=new CSSStyleSheet;i.replaceSync(":host{display:inline-block;white-space:nowrap;position:relative}@media (forced-colors: active){.icon-basic{forced-color-adjust:none}}\n/*# sourceURL=icon.css */\n");const n=t=>void 0!==t,a=o.RenderCoordinator.RenderCoordinator.instance();class c extends HTMLElement{static litTagName=e.literal`devtools-icon`;#t=this.attachShadow({mode:"open"});#e="";#o="rgb(110 110 110)";#i="100%";#n="100%";#a;connectedCallback(){this.#t.adoptedStyleSheets=[i]}set data(t){const{width:e,height:o}=t;if(this.#o=t.color,this.#i=n(e)?e:n(o)?o:this.#i,this.#n=n(o)?o:n(e)?e:this.#n,"iconPath"in t&&t.iconPath)this.#e=t.iconPath;else{if(!("iconName"in t)||!t.iconName)throw new Error("Misconfigured iconName or iconPath.");this.#e=new URL(`../../../Images/${t.iconName}.svg`,import.meta.url).toString(),this.#a=t.iconName}this.#c()}get data(){const t={color:this.#o,width:this.#i,height:this.#n};return this.#a?{...t,iconName:this.#a}:{...t,iconPath:this.#e}}#r(){const t=this.#e,e=this.#i,o=this.#n,i=this.#o,n={width:e,height:o,display:"block"};return i?{...n,webkitMaskImage:`url(${t})`,webkitMaskPosition:"center",webkitMaskRepeat:"no-repeat",webkitMaskSize:"99%",backgroundColor:`var(--icon-color, ${i})`}:{...n,backgroundImage:`url(${t})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"99%"}}#c(){a.write((()=>{e.render(e.html` <div class="icon-basic" style="${e.Directives.styleMap(this.#r())}"></div> `,this.#t,{host:this})}))}}t.CustomElements.defineComponent("devtools-icon",c);var r=Object.freeze({__proto__:null,Icon:c});const s=new CSSStyleSheet;s.replaceSync(":host{white-space:normal;display:inline-block}.icon-button{border:none;margin-right:2px;display:inline-flex;align-items:center;color:inherit;font-size:inherit;font-family:inherit;background-color:var(--color-background-elevation-1)}.icon-button.with-click-handler{border:1px solid var(--color-details-hairline);border-radius:2px;padding:0 4px}.icon-button.with-click-handler:hover{background-color:var(--legacy-toolbar-hover-bg-color)}.icon-button.icon-button.with-click-handler:active{background-color:var(--color-background-elevation-1)}.icon-button:focus-visible{background-color:var(--legacy-toolbar-hover-bg-color);border:1px solid var(--color-details-hairline)}.icon-button-title{margin-left:0.5ex}.compact .icon-button-title{display:none}.status-icon{margin-left:1ex}.status-icon:first-child{margin-left:inherit}@media (forced-colors: active){.icon-button{forced-color-adjust:none;background-color:ButtonFace}.icon-button:focus-visible,\n .icon-button.with-click-handler:hover{background-color:Highlight;color:HighlightText;--icon-color:HighlightText}}\n/*# sourceURL=iconButton.css */\n");class l extends HTMLElement{static litTagName=e.literal`icon-button`;#t=this.attachShadow({mode:"open"});#s=void 0;#l=[];#h=!1;#d="";#p="";#m;set data(t){this.#l=t.groups.map((t=>({...t}))),this.#s=t.clickHandler,this.#p=t.trailingText??"",this.#d=t.leadingText??"",this.#m=t.accessibleName,this.#h=Boolean(t.compact),this.#c()}get data(){return{groups:this.#l.map((t=>({...t}))),accessibleName:this.#m,clickHandler:this.#s,leadingText:this.#d,trailingText:this.#p,compact:this.#h}}connectedCallback(){this.#t.adoptedStyleSheets=[s]}#g(t){this.#s&&(t.preventDefault(),this.#s())}#c(){const t=e.Directives.classMap({"icon-button":!0,"with-click-handler":Boolean(this.#s),compact:this.#h}),o=this.#l.filter((t=>void 0!==t.text)).filter(((t,e)=>!this.#h||0===e));e.render(e.html` <button class="${t}" @click="${this.#g}" aria-label="${e.Directives.ifDefined(this.#m)}"> ${!this.#h&&this.#d?e.html`<span class="icon-button-title">${this.#d}</span>`:e.nothing} ${o.map((t=>e.html` <${c.litTagName} class="status-icon" .data="${{iconName:t.iconName,color:t.iconColor,width:t.iconWidth||"1.5ex",height:t.iconHeight||"1.5ex"}}"> </${c.litTagName}> ${this.#h?e.html`<span>​</span>`:e.nothing} <span class="icon-button-title">${t.text}</span> `))} ${!this.#h&&this.#p?e.html`<span class="icon-button-title">${this.#p}</span>`:e.nothing} </button>`,this.#t,{host:this})}}t.CustomElements.defineComponent("icon-button",l);var h=Object.freeze({__proto__:null,IconButton:l});const d=new CSSStyleSheet;d.replaceSync(":host{display:inline-block;width:20px;height:20px}span{display:block;width:100%;height:100%;white-space:nowrap;background-color:currentColor;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;-webkit-mask-size:99%}\n/*# sourceURL=newIcon.css */\n");var p=self&&self.__decorate||function(t,e,o,i){var n,a=arguments.length,c=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,i);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(c=(a<3?n(c):a>3?n(e,o,c):n(e,o))||c);return a>3&&c&&Object.defineProperty(e,o,c),c};class m extends e.LitElement{name="";static get styles(){return[d]}render(){const t={webkitMaskImage:`url(${this.pathFromName(this.name)})`};return e.html`<span style="${e.Directives.styleMap(t)}"></span>`}pathFromName(t){return new URL(`../../../Images/${t}.svg`,import.meta.url).toString()}}p([e.Decorators.property({type:String})],m.prototype,"name",void 0),t.CustomElements.defineComponent("devtools-new-icon",m);var g=Object.freeze({__proto__:null,NewIcon:m});export{r as Icon,h as IconButton,g as NewIcon};
@@ -0,0 +1 @@
1
+ const e=new CSSStyleSheet;e.replaceSync('input[type="checkbox"]{width:12px;height:12px;accent-color:var(--color-checkbox-accent-color)}\n/*# sourceURL=checkbox.css */\n');const t=new CSSStyleSheet;t.replaceSync(".devtools-text-input{height:32px;width:100%;padding:8px 11px;line-height:1.16;letter-spacing:0.015em;border:1px solid var(--color-input-outline);color:var(--color-text-primary);border-radius:3px;background-color:var(--color-background);font-family:inherit;font-size:inherit}.devtools-text-input:focus-visible{border:1px solid transparent;outline:none;box-shadow:0 0 0 2px var(--color-input-outline-active)}.devtools-text-input::placeholder{color:var(--color-input-text-disabled)}\n/*# sourceURL=textInput.css */\n");export{e as checkboxStyles,t as textInputStyles};