rubycrawl 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (578) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubycrawl/helpers.rb +1 -1
  3. data/lib/rubycrawl/markdown_converter.rb +33 -6
  4. data/lib/rubycrawl/result.rb +10 -2
  5. data/lib/rubycrawl/site_crawler.rb +7 -2
  6. data/lib/rubycrawl/version.rb +1 -1
  7. data/rubycrawl.gemspec +1 -1
  8. metadata +1 -571
  9. data/bin/console +0 -9
  10. data/bin/setup +0 -4
  11. data/node/.gitignore +0 -2
  12. data/node/.npmrc +0 -1
  13. data/node/README.md +0 -19
  14. data/node/node_modules/.bin/playwright +0 -1
  15. data/node/node_modules/.bin/playwright-core +0 -1
  16. data/node/node_modules/.package-lock.json +0 -65
  17. data/node/node_modules/dotenv/CHANGELOG.md +0 -520
  18. data/node/node_modules/dotenv/LICENSE +0 -23
  19. data/node/node_modules/dotenv/README-es.md +0 -411
  20. data/node/node_modules/dotenv/README.md +0 -645
  21. data/node/node_modules/dotenv/SECURITY.md +0 -1
  22. data/node/node_modules/dotenv/config.d.ts +0 -1
  23. data/node/node_modules/dotenv/config.js +0 -9
  24. data/node/node_modules/dotenv/lib/cli-options.js +0 -17
  25. data/node/node_modules/dotenv/lib/env-options.js +0 -28
  26. data/node/node_modules/dotenv/lib/main.d.ts +0 -162
  27. data/node/node_modules/dotenv/lib/main.js +0 -386
  28. data/node/node_modules/dotenv/package.json +0 -62
  29. data/node/node_modules/playwright/LICENSE +0 -202
  30. data/node/node_modules/playwright/NOTICE +0 -5
  31. data/node/node_modules/playwright/README.md +0 -168
  32. data/node/node_modules/playwright/ThirdPartyNotices.txt +0 -5042
  33. data/node/node_modules/playwright/cli.js +0 -19
  34. data/node/node_modules/playwright/index.d.ts +0 -17
  35. data/node/node_modules/playwright/index.js +0 -17
  36. data/node/node_modules/playwright/index.mjs +0 -18
  37. data/node/node_modules/playwright/jsx-runtime.js +0 -42
  38. data/node/node_modules/playwright/jsx-runtime.mjs +0 -21
  39. data/node/node_modules/playwright/lib/agents/agentParser.js +0 -89
  40. data/node/node_modules/playwright/lib/agents/copilot-setup-steps.yml +0 -34
  41. data/node/node_modules/playwright/lib/agents/generateAgents.js +0 -348
  42. data/node/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +0 -31
  43. data/node/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +0 -8
  44. data/node/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +0 -88
  45. data/node/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +0 -6
  46. data/node/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +0 -55
  47. data/node/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +0 -9
  48. data/node/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +0 -73
  49. data/node/node_modules/playwright/lib/common/config.js +0 -282
  50. data/node/node_modules/playwright/lib/common/configLoader.js +0 -344
  51. data/node/node_modules/playwright/lib/common/esmLoaderHost.js +0 -104
  52. data/node/node_modules/playwright/lib/common/expectBundle.js +0 -28
  53. data/node/node_modules/playwright/lib/common/expectBundleImpl.js +0 -407
  54. data/node/node_modules/playwright/lib/common/fixtures.js +0 -302
  55. data/node/node_modules/playwright/lib/common/globals.js +0 -58
  56. data/node/node_modules/playwright/lib/common/ipc.js +0 -60
  57. data/node/node_modules/playwright/lib/common/poolBuilder.js +0 -85
  58. data/node/node_modules/playwright/lib/common/process.js +0 -132
  59. data/node/node_modules/playwright/lib/common/suiteUtils.js +0 -140
  60. data/node/node_modules/playwright/lib/common/test.js +0 -321
  61. data/node/node_modules/playwright/lib/common/testLoader.js +0 -101
  62. data/node/node_modules/playwright/lib/common/testType.js +0 -298
  63. data/node/node_modules/playwright/lib/common/validators.js +0 -68
  64. data/node/node_modules/playwright/lib/fsWatcher.js +0 -67
  65. data/node/node_modules/playwright/lib/index.js +0 -726
  66. data/node/node_modules/playwright/lib/internalsForTest.js +0 -42
  67. data/node/node_modules/playwright/lib/isomorphic/events.js +0 -77
  68. data/node/node_modules/playwright/lib/isomorphic/folders.js +0 -30
  69. data/node/node_modules/playwright/lib/isomorphic/stringInternPool.js +0 -69
  70. data/node/node_modules/playwright/lib/isomorphic/teleReceiver.js +0 -521
  71. data/node/node_modules/playwright/lib/isomorphic/teleSuiteUpdater.js +0 -157
  72. data/node/node_modules/playwright/lib/isomorphic/testServerConnection.js +0 -225
  73. data/node/node_modules/playwright/lib/isomorphic/testServerInterface.js +0 -16
  74. data/node/node_modules/playwright/lib/isomorphic/testTree.js +0 -329
  75. data/node/node_modules/playwright/lib/isomorphic/types.d.js +0 -16
  76. data/node/node_modules/playwright/lib/loader/loaderMain.js +0 -59
  77. data/node/node_modules/playwright/lib/matchers/expect.js +0 -311
  78. data/node/node_modules/playwright/lib/matchers/matcherHint.js +0 -44
  79. data/node/node_modules/playwright/lib/matchers/matchers.js +0 -383
  80. data/node/node_modules/playwright/lib/matchers/toBeTruthy.js +0 -75
  81. data/node/node_modules/playwright/lib/matchers/toEqual.js +0 -100
  82. data/node/node_modules/playwright/lib/matchers/toHaveURL.js +0 -101
  83. data/node/node_modules/playwright/lib/matchers/toMatchAriaSnapshot.js +0 -159
  84. data/node/node_modules/playwright/lib/matchers/toMatchSnapshot.js +0 -342
  85. data/node/node_modules/playwright/lib/matchers/toMatchText.js +0 -99
  86. data/node/node_modules/playwright/lib/mcp/browser/browserContextFactory.js +0 -329
  87. data/node/node_modules/playwright/lib/mcp/browser/browserServerBackend.js +0 -84
  88. data/node/node_modules/playwright/lib/mcp/browser/config.js +0 -421
  89. data/node/node_modules/playwright/lib/mcp/browser/context.js +0 -244
  90. data/node/node_modules/playwright/lib/mcp/browser/response.js +0 -278
  91. data/node/node_modules/playwright/lib/mcp/browser/sessionLog.js +0 -75
  92. data/node/node_modules/playwright/lib/mcp/browser/tab.js +0 -343
  93. data/node/node_modules/playwright/lib/mcp/browser/tools/common.js +0 -65
  94. data/node/node_modules/playwright/lib/mcp/browser/tools/console.js +0 -46
  95. data/node/node_modules/playwright/lib/mcp/browser/tools/dialogs.js +0 -60
  96. data/node/node_modules/playwright/lib/mcp/browser/tools/evaluate.js +0 -61
  97. data/node/node_modules/playwright/lib/mcp/browser/tools/files.js +0 -58
  98. data/node/node_modules/playwright/lib/mcp/browser/tools/form.js +0 -63
  99. data/node/node_modules/playwright/lib/mcp/browser/tools/install.js +0 -72
  100. data/node/node_modules/playwright/lib/mcp/browser/tools/keyboard.js +0 -107
  101. data/node/node_modules/playwright/lib/mcp/browser/tools/mouse.js +0 -107
  102. data/node/node_modules/playwright/lib/mcp/browser/tools/navigate.js +0 -71
  103. data/node/node_modules/playwright/lib/mcp/browser/tools/network.js +0 -63
  104. data/node/node_modules/playwright/lib/mcp/browser/tools/open.js +0 -57
  105. data/node/node_modules/playwright/lib/mcp/browser/tools/pdf.js +0 -49
  106. data/node/node_modules/playwright/lib/mcp/browser/tools/runCode.js +0 -78
  107. data/node/node_modules/playwright/lib/mcp/browser/tools/screenshot.js +0 -93
  108. data/node/node_modules/playwright/lib/mcp/browser/tools/snapshot.js +0 -173
  109. data/node/node_modules/playwright/lib/mcp/browser/tools/tabs.js +0 -67
  110. data/node/node_modules/playwright/lib/mcp/browser/tools/tool.js +0 -47
  111. data/node/node_modules/playwright/lib/mcp/browser/tools/tracing.js +0 -74
  112. data/node/node_modules/playwright/lib/mcp/browser/tools/utils.js +0 -94
  113. data/node/node_modules/playwright/lib/mcp/browser/tools/verify.js +0 -143
  114. data/node/node_modules/playwright/lib/mcp/browser/tools/wait.js +0 -63
  115. data/node/node_modules/playwright/lib/mcp/browser/tools.js +0 -84
  116. data/node/node_modules/playwright/lib/mcp/browser/watchdog.js +0 -44
  117. data/node/node_modules/playwright/lib/mcp/config.d.js +0 -16
  118. data/node/node_modules/playwright/lib/mcp/extension/cdpRelay.js +0 -351
  119. data/node/node_modules/playwright/lib/mcp/extension/extensionContextFactory.js +0 -76
  120. data/node/node_modules/playwright/lib/mcp/extension/protocol.js +0 -28
  121. data/node/node_modules/playwright/lib/mcp/index.js +0 -61
  122. data/node/node_modules/playwright/lib/mcp/log.js +0 -35
  123. data/node/node_modules/playwright/lib/mcp/program.js +0 -111
  124. data/node/node_modules/playwright/lib/mcp/sdk/exports.js +0 -28
  125. data/node/node_modules/playwright/lib/mcp/sdk/http.js +0 -152
  126. data/node/node_modules/playwright/lib/mcp/sdk/inProcessTransport.js +0 -71
  127. data/node/node_modules/playwright/lib/mcp/sdk/server.js +0 -223
  128. data/node/node_modules/playwright/lib/mcp/sdk/tool.js +0 -47
  129. data/node/node_modules/playwright/lib/mcp/terminal/cli.js +0 -296
  130. data/node/node_modules/playwright/lib/mcp/terminal/command.js +0 -56
  131. data/node/node_modules/playwright/lib/mcp/terminal/commands.js +0 -333
  132. data/node/node_modules/playwright/lib/mcp/terminal/daemon.js +0 -129
  133. data/node/node_modules/playwright/lib/mcp/terminal/help.json +0 -32
  134. data/node/node_modules/playwright/lib/mcp/terminal/helpGenerator.js +0 -88
  135. data/node/node_modules/playwright/lib/mcp/terminal/socketConnection.js +0 -80
  136. data/node/node_modules/playwright/lib/mcp/test/browserBackend.js +0 -98
  137. data/node/node_modules/playwright/lib/mcp/test/generatorTools.js +0 -122
  138. data/node/node_modules/playwright/lib/mcp/test/plannerTools.js +0 -145
  139. data/node/node_modules/playwright/lib/mcp/test/seed.js +0 -82
  140. data/node/node_modules/playwright/lib/mcp/test/streams.js +0 -44
  141. data/node/node_modules/playwright/lib/mcp/test/testBackend.js +0 -99
  142. data/node/node_modules/playwright/lib/mcp/test/testContext.js +0 -285
  143. data/node/node_modules/playwright/lib/mcp/test/testTool.js +0 -30
  144. data/node/node_modules/playwright/lib/mcp/test/testTools.js +0 -108
  145. data/node/node_modules/playwright/lib/plugins/gitCommitInfoPlugin.js +0 -198
  146. data/node/node_modules/playwright/lib/plugins/index.js +0 -28
  147. data/node/node_modules/playwright/lib/plugins/webServerPlugin.js +0 -237
  148. data/node/node_modules/playwright/lib/program.js +0 -417
  149. data/node/node_modules/playwright/lib/reporters/base.js +0 -634
  150. data/node/node_modules/playwright/lib/reporters/blob.js +0 -138
  151. data/node/node_modules/playwright/lib/reporters/dot.js +0 -99
  152. data/node/node_modules/playwright/lib/reporters/empty.js +0 -32
  153. data/node/node_modules/playwright/lib/reporters/github.js +0 -128
  154. data/node/node_modules/playwright/lib/reporters/html.js +0 -633
  155. data/node/node_modules/playwright/lib/reporters/internalReporter.js +0 -138
  156. data/node/node_modules/playwright/lib/reporters/json.js +0 -254
  157. data/node/node_modules/playwright/lib/reporters/junit.js +0 -232
  158. data/node/node_modules/playwright/lib/reporters/line.js +0 -131
  159. data/node/node_modules/playwright/lib/reporters/list.js +0 -253
  160. data/node/node_modules/playwright/lib/reporters/listModeReporter.js +0 -69
  161. data/node/node_modules/playwright/lib/reporters/markdown.js +0 -144
  162. data/node/node_modules/playwright/lib/reporters/merge.js +0 -558
  163. data/node/node_modules/playwright/lib/reporters/multiplexer.js +0 -112
  164. data/node/node_modules/playwright/lib/reporters/reporterV2.js +0 -102
  165. data/node/node_modules/playwright/lib/reporters/teleEmitter.js +0 -317
  166. data/node/node_modules/playwright/lib/reporters/versions/blobV1.js +0 -16
  167. data/node/node_modules/playwright/lib/runner/dispatcher.js +0 -530
  168. data/node/node_modules/playwright/lib/runner/failureTracker.js +0 -72
  169. data/node/node_modules/playwright/lib/runner/lastRun.js +0 -77
  170. data/node/node_modules/playwright/lib/runner/loadUtils.js +0 -334
  171. data/node/node_modules/playwright/lib/runner/loaderHost.js +0 -89
  172. data/node/node_modules/playwright/lib/runner/processHost.js +0 -180
  173. data/node/node_modules/playwright/lib/runner/projectUtils.js +0 -241
  174. data/node/node_modules/playwright/lib/runner/rebase.js +0 -189
  175. data/node/node_modules/playwright/lib/runner/reporters.js +0 -138
  176. data/node/node_modules/playwright/lib/runner/sigIntWatcher.js +0 -96
  177. data/node/node_modules/playwright/lib/runner/storage.js +0 -91
  178. data/node/node_modules/playwright/lib/runner/taskRunner.js +0 -127
  179. data/node/node_modules/playwright/lib/runner/tasks.js +0 -410
  180. data/node/node_modules/playwright/lib/runner/testGroups.js +0 -125
  181. data/node/node_modules/playwright/lib/runner/testRunner.js +0 -398
  182. data/node/node_modules/playwright/lib/runner/testServer.js +0 -269
  183. data/node/node_modules/playwright/lib/runner/uiModeReporter.js +0 -30
  184. data/node/node_modules/playwright/lib/runner/vcs.js +0 -72
  185. data/node/node_modules/playwright/lib/runner/watchMode.js +0 -396
  186. data/node/node_modules/playwright/lib/runner/workerHost.js +0 -104
  187. data/node/node_modules/playwright/lib/third_party/pirates.js +0 -62
  188. data/node/node_modules/playwright/lib/third_party/tsconfig-loader.js +0 -103
  189. data/node/node_modules/playwright/lib/transform/babelBundle.js +0 -46
  190. data/node/node_modules/playwright/lib/transform/babelBundleImpl.js +0 -461
  191. data/node/node_modules/playwright/lib/transform/compilationCache.js +0 -274
  192. data/node/node_modules/playwright/lib/transform/esmLoader.js +0 -103
  193. data/node/node_modules/playwright/lib/transform/md.js +0 -221
  194. data/node/node_modules/playwright/lib/transform/portTransport.js +0 -67
  195. data/node/node_modules/playwright/lib/transform/transform.js +0 -303
  196. data/node/node_modules/playwright/lib/util.js +0 -400
  197. data/node/node_modules/playwright/lib/utilsBundle.js +0 -50
  198. data/node/node_modules/playwright/lib/utilsBundleImpl.js +0 -103
  199. data/node/node_modules/playwright/lib/worker/fixtureRunner.js +0 -262
  200. data/node/node_modules/playwright/lib/worker/testInfo.js +0 -536
  201. data/node/node_modules/playwright/lib/worker/testTracing.js +0 -345
  202. data/node/node_modules/playwright/lib/worker/timeoutManager.js +0 -174
  203. data/node/node_modules/playwright/lib/worker/util.js +0 -31
  204. data/node/node_modules/playwright/lib/worker/workerMain.js +0 -530
  205. data/node/node_modules/playwright/package.json +0 -72
  206. data/node/node_modules/playwright/test.d.ts +0 -18
  207. data/node/node_modules/playwright/test.js +0 -24
  208. data/node/node_modules/playwright/test.mjs +0 -34
  209. data/node/node_modules/playwright/types/test.d.ts +0 -10251
  210. data/node/node_modules/playwright/types/testReporter.d.ts +0 -822
  211. data/node/node_modules/playwright-core/LICENSE +0 -202
  212. data/node/node_modules/playwright-core/NOTICE +0 -5
  213. data/node/node_modules/playwright-core/README.md +0 -3
  214. data/node/node_modules/playwright-core/ThirdPartyNotices.txt +0 -4076
  215. data/node/node_modules/playwright-core/bin/install_media_pack.ps1 +0 -5
  216. data/node/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +0 -33
  217. data/node/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +0 -42
  218. data/node/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +0 -13
  219. data/node/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +0 -24
  220. data/node/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +0 -42
  221. data/node/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +0 -12
  222. data/node/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +0 -24
  223. data/node/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +0 -48
  224. data/node/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +0 -11
  225. data/node/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +0 -23
  226. data/node/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +0 -48
  227. data/node/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +0 -11
  228. data/node/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +0 -23
  229. data/node/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +0 -48
  230. data/node/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +0 -11
  231. data/node/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +0 -24
  232. data/node/node_modules/playwright-core/browsers.json +0 -79
  233. data/node/node_modules/playwright-core/cli.js +0 -18
  234. data/node/node_modules/playwright-core/index.d.ts +0 -17
  235. data/node/node_modules/playwright-core/index.js +0 -32
  236. data/node/node_modules/playwright-core/index.mjs +0 -28
  237. data/node/node_modules/playwright-core/lib/androidServerImpl.js +0 -65
  238. data/node/node_modules/playwright-core/lib/browserServerImpl.js +0 -120
  239. data/node/node_modules/playwright-core/lib/cli/driver.js +0 -97
  240. data/node/node_modules/playwright-core/lib/cli/program.js +0 -589
  241. data/node/node_modules/playwright-core/lib/cli/programWithTestStub.js +0 -74
  242. data/node/node_modules/playwright-core/lib/client/android.js +0 -361
  243. data/node/node_modules/playwright-core/lib/client/api.js +0 -137
  244. data/node/node_modules/playwright-core/lib/client/artifact.js +0 -79
  245. data/node/node_modules/playwright-core/lib/client/browser.js +0 -161
  246. data/node/node_modules/playwright-core/lib/client/browserContext.js +0 -582
  247. data/node/node_modules/playwright-core/lib/client/browserType.js +0 -185
  248. data/node/node_modules/playwright-core/lib/client/cdpSession.js +0 -51
  249. data/node/node_modules/playwright-core/lib/client/channelOwner.js +0 -194
  250. data/node/node_modules/playwright-core/lib/client/clientHelper.js +0 -64
  251. data/node/node_modules/playwright-core/lib/client/clientInstrumentation.js +0 -55
  252. data/node/node_modules/playwright-core/lib/client/clientStackTrace.js +0 -69
  253. data/node/node_modules/playwright-core/lib/client/clock.js +0 -68
  254. data/node/node_modules/playwright-core/lib/client/connection.js +0 -318
  255. data/node/node_modules/playwright-core/lib/client/consoleMessage.js +0 -58
  256. data/node/node_modules/playwright-core/lib/client/coverage.js +0 -44
  257. data/node/node_modules/playwright-core/lib/client/dialog.js +0 -56
  258. data/node/node_modules/playwright-core/lib/client/download.js +0 -62
  259. data/node/node_modules/playwright-core/lib/client/electron.js +0 -138
  260. data/node/node_modules/playwright-core/lib/client/elementHandle.js +0 -284
  261. data/node/node_modules/playwright-core/lib/client/errors.js +0 -77
  262. data/node/node_modules/playwright-core/lib/client/eventEmitter.js +0 -314
  263. data/node/node_modules/playwright-core/lib/client/events.js +0 -103
  264. data/node/node_modules/playwright-core/lib/client/fetch.js +0 -368
  265. data/node/node_modules/playwright-core/lib/client/fileChooser.js +0 -46
  266. data/node/node_modules/playwright-core/lib/client/fileUtils.js +0 -34
  267. data/node/node_modules/playwright-core/lib/client/frame.js +0 -409
  268. data/node/node_modules/playwright-core/lib/client/harRouter.js +0 -87
  269. data/node/node_modules/playwright-core/lib/client/input.js +0 -84
  270. data/node/node_modules/playwright-core/lib/client/jsHandle.js +0 -109
  271. data/node/node_modules/playwright-core/lib/client/jsonPipe.js +0 -39
  272. data/node/node_modules/playwright-core/lib/client/localUtils.js +0 -60
  273. data/node/node_modules/playwright-core/lib/client/locator.js +0 -369
  274. data/node/node_modules/playwright-core/lib/client/network.js +0 -747
  275. data/node/node_modules/playwright-core/lib/client/page.js +0 -745
  276. data/node/node_modules/playwright-core/lib/client/pageAgent.js +0 -64
  277. data/node/node_modules/playwright-core/lib/client/platform.js +0 -77
  278. data/node/node_modules/playwright-core/lib/client/playwright.js +0 -71
  279. data/node/node_modules/playwright-core/lib/client/selectors.js +0 -55
  280. data/node/node_modules/playwright-core/lib/client/stream.js +0 -39
  281. data/node/node_modules/playwright-core/lib/client/timeoutSettings.js +0 -79
  282. data/node/node_modules/playwright-core/lib/client/tracing.js +0 -119
  283. data/node/node_modules/playwright-core/lib/client/types.js +0 -28
  284. data/node/node_modules/playwright-core/lib/client/video.js +0 -59
  285. data/node/node_modules/playwright-core/lib/client/waiter.js +0 -142
  286. data/node/node_modules/playwright-core/lib/client/webError.js +0 -39
  287. data/node/node_modules/playwright-core/lib/client/webSocket.js +0 -93
  288. data/node/node_modules/playwright-core/lib/client/worker.js +0 -85
  289. data/node/node_modules/playwright-core/lib/client/writableStream.js +0 -39
  290. data/node/node_modules/playwright-core/lib/generated/bindingsControllerSource.js +0 -28
  291. data/node/node_modules/playwright-core/lib/generated/clockSource.js +0 -28
  292. data/node/node_modules/playwright-core/lib/generated/injectedScriptSource.js +0 -28
  293. data/node/node_modules/playwright-core/lib/generated/pollingRecorderSource.js +0 -28
  294. data/node/node_modules/playwright-core/lib/generated/storageScriptSource.js +0 -28
  295. data/node/node_modules/playwright-core/lib/generated/utilityScriptSource.js +0 -28
  296. data/node/node_modules/playwright-core/lib/generated/webSocketMockSource.js +0 -336
  297. data/node/node_modules/playwright-core/lib/inProcessFactory.js +0 -60
  298. data/node/node_modules/playwright-core/lib/inprocess.js +0 -3
  299. data/node/node_modules/playwright-core/lib/mcpBundle.js +0 -84
  300. data/node/node_modules/playwright-core/lib/mcpBundleImpl/index.js +0 -147
  301. data/node/node_modules/playwright-core/lib/outofprocess.js +0 -76
  302. data/node/node_modules/playwright-core/lib/protocol/serializers.js +0 -197
  303. data/node/node_modules/playwright-core/lib/protocol/validator.js +0 -2969
  304. data/node/node_modules/playwright-core/lib/protocol/validatorPrimitives.js +0 -193
  305. data/node/node_modules/playwright-core/lib/remote/playwrightConnection.js +0 -129
  306. data/node/node_modules/playwright-core/lib/remote/playwrightServer.js +0 -334
  307. data/node/node_modules/playwright-core/lib/server/agent/actionRunner.js +0 -335
  308. data/node/node_modules/playwright-core/lib/server/agent/actions.js +0 -128
  309. data/node/node_modules/playwright-core/lib/server/agent/codegen.js +0 -111
  310. data/node/node_modules/playwright-core/lib/server/agent/context.js +0 -150
  311. data/node/node_modules/playwright-core/lib/server/agent/expectTools.js +0 -156
  312. data/node/node_modules/playwright-core/lib/server/agent/pageAgent.js +0 -204
  313. data/node/node_modules/playwright-core/lib/server/agent/performTools.js +0 -262
  314. data/node/node_modules/playwright-core/lib/server/agent/tool.js +0 -109
  315. data/node/node_modules/playwright-core/lib/server/android/android.js +0 -465
  316. data/node/node_modules/playwright-core/lib/server/android/backendAdb.js +0 -177
  317. data/node/node_modules/playwright-core/lib/server/artifact.js +0 -127
  318. data/node/node_modules/playwright-core/lib/server/bidi/bidiBrowser.js +0 -549
  319. data/node/node_modules/playwright-core/lib/server/bidi/bidiChromium.js +0 -148
  320. data/node/node_modules/playwright-core/lib/server/bidi/bidiConnection.js +0 -213
  321. data/node/node_modules/playwright-core/lib/server/bidi/bidiDeserializer.js +0 -116
  322. data/node/node_modules/playwright-core/lib/server/bidi/bidiExecutionContext.js +0 -267
  323. data/node/node_modules/playwright-core/lib/server/bidi/bidiFirefox.js +0 -128
  324. data/node/node_modules/playwright-core/lib/server/bidi/bidiInput.js +0 -146
  325. data/node/node_modules/playwright-core/lib/server/bidi/bidiNetworkManager.js +0 -383
  326. data/node/node_modules/playwright-core/lib/server/bidi/bidiOverCdp.js +0 -102
  327. data/node/node_modules/playwright-core/lib/server/bidi/bidiPage.js +0 -583
  328. data/node/node_modules/playwright-core/lib/server/bidi/bidiPdf.js +0 -106
  329. data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiCommands.d.js +0 -22
  330. data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiKeyboard.js +0 -256
  331. data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocol.js +0 -24
  332. data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolCore.js +0 -180
  333. data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiProtocolPermissions.js +0 -42
  334. data/node/node_modules/playwright-core/lib/server/bidi/third_party/bidiSerializer.js +0 -148
  335. data/node/node_modules/playwright-core/lib/server/bidi/third_party/firefoxPrefs.js +0 -259
  336. data/node/node_modules/playwright-core/lib/server/browser.js +0 -149
  337. data/node/node_modules/playwright-core/lib/server/browserContext.js +0 -702
  338. data/node/node_modules/playwright-core/lib/server/browserType.js +0 -336
  339. data/node/node_modules/playwright-core/lib/server/callLog.js +0 -82
  340. data/node/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  341. data/node/node_modules/playwright-core/lib/server/chromium/chromium.js +0 -395
  342. data/node/node_modules/playwright-core/lib/server/chromium/chromiumSwitches.js +0 -104
  343. data/node/node_modules/playwright-core/lib/server/chromium/crBrowser.js +0 -511
  344. data/node/node_modules/playwright-core/lib/server/chromium/crConnection.js +0 -197
  345. data/node/node_modules/playwright-core/lib/server/chromium/crCoverage.js +0 -235
  346. data/node/node_modules/playwright-core/lib/server/chromium/crDevTools.js +0 -111
  347. data/node/node_modules/playwright-core/lib/server/chromium/crDragDrop.js +0 -131
  348. data/node/node_modules/playwright-core/lib/server/chromium/crExecutionContext.js +0 -146
  349. data/node/node_modules/playwright-core/lib/server/chromium/crInput.js +0 -187
  350. data/node/node_modules/playwright-core/lib/server/chromium/crNetworkManager.js +0 -707
  351. data/node/node_modules/playwright-core/lib/server/chromium/crPage.js +0 -1001
  352. data/node/node_modules/playwright-core/lib/server/chromium/crPdf.js +0 -121
  353. data/node/node_modules/playwright-core/lib/server/chromium/crProtocolHelper.js +0 -145
  354. data/node/node_modules/playwright-core/lib/server/chromium/crServiceWorker.js +0 -136
  355. data/node/node_modules/playwright-core/lib/server/chromium/defaultFontFamilies.js +0 -162
  356. data/node/node_modules/playwright-core/lib/server/chromium/protocol.d.js +0 -16
  357. data/node/node_modules/playwright-core/lib/server/clock.js +0 -149
  358. data/node/node_modules/playwright-core/lib/server/codegen/csharp.js +0 -327
  359. data/node/node_modules/playwright-core/lib/server/codegen/java.js +0 -274
  360. data/node/node_modules/playwright-core/lib/server/codegen/javascript.js +0 -247
  361. data/node/node_modules/playwright-core/lib/server/codegen/jsonl.js +0 -52
  362. data/node/node_modules/playwright-core/lib/server/codegen/language.js +0 -132
  363. data/node/node_modules/playwright-core/lib/server/codegen/languages.js +0 -68
  364. data/node/node_modules/playwright-core/lib/server/codegen/python.js +0 -279
  365. data/node/node_modules/playwright-core/lib/server/codegen/types.js +0 -16
  366. data/node/node_modules/playwright-core/lib/server/console.js +0 -57
  367. data/node/node_modules/playwright-core/lib/server/cookieStore.js +0 -206
  368. data/node/node_modules/playwright-core/lib/server/debugController.js +0 -191
  369. data/node/node_modules/playwright-core/lib/server/debugger.js +0 -119
  370. data/node/node_modules/playwright-core/lib/server/deviceDescriptors.js +0 -39
  371. data/node/node_modules/playwright-core/lib/server/deviceDescriptorsSource.json +0 -1779
  372. data/node/node_modules/playwright-core/lib/server/dialog.js +0 -116
  373. data/node/node_modules/playwright-core/lib/server/dispatchers/androidDispatcher.js +0 -325
  374. data/node/node_modules/playwright-core/lib/server/dispatchers/artifactDispatcher.js +0 -118
  375. data/node/node_modules/playwright-core/lib/server/dispatchers/browserContextDispatcher.js +0 -384
  376. data/node/node_modules/playwright-core/lib/server/dispatchers/browserDispatcher.js +0 -118
  377. data/node/node_modules/playwright-core/lib/server/dispatchers/browserTypeDispatcher.js +0 -64
  378. data/node/node_modules/playwright-core/lib/server/dispatchers/cdpSessionDispatcher.js +0 -44
  379. data/node/node_modules/playwright-core/lib/server/dispatchers/debugControllerDispatcher.js +0 -78
  380. data/node/node_modules/playwright-core/lib/server/dispatchers/dialogDispatcher.js +0 -47
  381. data/node/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js +0 -364
  382. data/node/node_modules/playwright-core/lib/server/dispatchers/electronDispatcher.js +0 -89
  383. data/node/node_modules/playwright-core/lib/server/dispatchers/elementHandlerDispatcher.js +0 -181
  384. data/node/node_modules/playwright-core/lib/server/dispatchers/frameDispatcher.js +0 -227
  385. data/node/node_modules/playwright-core/lib/server/dispatchers/jsHandleDispatcher.js +0 -85
  386. data/node/node_modules/playwright-core/lib/server/dispatchers/jsonPipeDispatcher.js +0 -58
  387. data/node/node_modules/playwright-core/lib/server/dispatchers/localUtilsDispatcher.js +0 -149
  388. data/node/node_modules/playwright-core/lib/server/dispatchers/networkDispatchers.js +0 -213
  389. data/node/node_modules/playwright-core/lib/server/dispatchers/pageAgentDispatcher.js +0 -96
  390. data/node/node_modules/playwright-core/lib/server/dispatchers/pageDispatcher.js +0 -393
  391. data/node/node_modules/playwright-core/lib/server/dispatchers/playwrightDispatcher.js +0 -108
  392. data/node/node_modules/playwright-core/lib/server/dispatchers/streamDispatcher.js +0 -67
  393. data/node/node_modules/playwright-core/lib/server/dispatchers/tracingDispatcher.js +0 -68
  394. data/node/node_modules/playwright-core/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -165
  395. data/node/node_modules/playwright-core/lib/server/dispatchers/writableStreamDispatcher.js +0 -79
  396. data/node/node_modules/playwright-core/lib/server/dom.js +0 -815
  397. data/node/node_modules/playwright-core/lib/server/download.js +0 -70
  398. data/node/node_modules/playwright-core/lib/server/electron/electron.js +0 -273
  399. data/node/node_modules/playwright-core/lib/server/electron/loader.js +0 -29
  400. data/node/node_modules/playwright-core/lib/server/errors.js +0 -69
  401. data/node/node_modules/playwright-core/lib/server/fetch.js +0 -621
  402. data/node/node_modules/playwright-core/lib/server/fileChooser.js +0 -43
  403. data/node/node_modules/playwright-core/lib/server/fileUploadUtils.js +0 -84
  404. data/node/node_modules/playwright-core/lib/server/firefox/ffBrowser.js +0 -418
  405. data/node/node_modules/playwright-core/lib/server/firefox/ffConnection.js +0 -142
  406. data/node/node_modules/playwright-core/lib/server/firefox/ffExecutionContext.js +0 -150
  407. data/node/node_modules/playwright-core/lib/server/firefox/ffInput.js +0 -159
  408. data/node/node_modules/playwright-core/lib/server/firefox/ffNetworkManager.js +0 -256
  409. data/node/node_modules/playwright-core/lib/server/firefox/ffPage.js +0 -497
  410. data/node/node_modules/playwright-core/lib/server/firefox/firefox.js +0 -114
  411. data/node/node_modules/playwright-core/lib/server/firefox/protocol.d.js +0 -16
  412. data/node/node_modules/playwright-core/lib/server/formData.js +0 -147
  413. data/node/node_modules/playwright-core/lib/server/frameSelectors.js +0 -160
  414. data/node/node_modules/playwright-core/lib/server/frames.js +0 -1471
  415. data/node/node_modules/playwright-core/lib/server/har/harRecorder.js +0 -147
  416. data/node/node_modules/playwright-core/lib/server/har/harTracer.js +0 -607
  417. data/node/node_modules/playwright-core/lib/server/harBackend.js +0 -157
  418. data/node/node_modules/playwright-core/lib/server/helper.js +0 -96
  419. data/node/node_modules/playwright-core/lib/server/index.js +0 -58
  420. data/node/node_modules/playwright-core/lib/server/input.js +0 -277
  421. data/node/node_modules/playwright-core/lib/server/instrumentation.js +0 -72
  422. data/node/node_modules/playwright-core/lib/server/javascript.js +0 -291
  423. data/node/node_modules/playwright-core/lib/server/launchApp.js +0 -128
  424. data/node/node_modules/playwright-core/lib/server/localUtils.js +0 -214
  425. data/node/node_modules/playwright-core/lib/server/macEditingCommands.js +0 -143
  426. data/node/node_modules/playwright-core/lib/server/network.js +0 -667
  427. data/node/node_modules/playwright-core/lib/server/page.js +0 -830
  428. data/node/node_modules/playwright-core/lib/server/pipeTransport.js +0 -89
  429. data/node/node_modules/playwright-core/lib/server/playwright.js +0 -69
  430. data/node/node_modules/playwright-core/lib/server/progress.js +0 -132
  431. data/node/node_modules/playwright-core/lib/server/protocolError.js +0 -52
  432. data/node/node_modules/playwright-core/lib/server/recorder/chat.js +0 -161
  433. data/node/node_modules/playwright-core/lib/server/recorder/recorderApp.js +0 -366
  434. data/node/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +0 -138
  435. data/node/node_modules/playwright-core/lib/server/recorder/recorderSignalProcessor.js +0 -83
  436. data/node/node_modules/playwright-core/lib/server/recorder/recorderUtils.js +0 -157
  437. data/node/node_modules/playwright-core/lib/server/recorder/throttledFile.js +0 -57
  438. data/node/node_modules/playwright-core/lib/server/recorder.js +0 -499
  439. data/node/node_modules/playwright-core/lib/server/registry/browserFetcher.js +0 -177
  440. data/node/node_modules/playwright-core/lib/server/registry/dependencies.js +0 -371
  441. data/node/node_modules/playwright-core/lib/server/registry/index.js +0 -1422
  442. data/node/node_modules/playwright-core/lib/server/registry/nativeDeps.js +0 -1280
  443. data/node/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js +0 -127
  444. data/node/node_modules/playwright-core/lib/server/screencast.js +0 -190
  445. data/node/node_modules/playwright-core/lib/server/screenshotter.js +0 -333
  446. data/node/node_modules/playwright-core/lib/server/selectors.js +0 -112
  447. data/node/node_modules/playwright-core/lib/server/socksClientCertificatesInterceptor.js +0 -383
  448. data/node/node_modules/playwright-core/lib/server/socksInterceptor.js +0 -95
  449. data/node/node_modules/playwright-core/lib/server/trace/recorder/snapshotter.js +0 -147
  450. data/node/node_modules/playwright-core/lib/server/trace/recorder/snapshotterInjected.js +0 -561
  451. data/node/node_modules/playwright-core/lib/server/trace/recorder/tracing.js +0 -604
  452. data/node/node_modules/playwright-core/lib/server/trace/viewer/traceParser.js +0 -72
  453. data/node/node_modules/playwright-core/lib/server/trace/viewer/traceViewer.js +0 -245
  454. data/node/node_modules/playwright-core/lib/server/transport.js +0 -181
  455. data/node/node_modules/playwright-core/lib/server/types.js +0 -28
  456. data/node/node_modules/playwright-core/lib/server/usKeyboardLayout.js +0 -145
  457. data/node/node_modules/playwright-core/lib/server/utils/ascii.js +0 -44
  458. data/node/node_modules/playwright-core/lib/server/utils/comparators.js +0 -139
  459. data/node/node_modules/playwright-core/lib/server/utils/crypto.js +0 -216
  460. data/node/node_modules/playwright-core/lib/server/utils/debug.js +0 -42
  461. data/node/node_modules/playwright-core/lib/server/utils/debugLogger.js +0 -122
  462. data/node/node_modules/playwright-core/lib/server/utils/env.js +0 -73
  463. data/node/node_modules/playwright-core/lib/server/utils/eventsHelper.js +0 -39
  464. data/node/node_modules/playwright-core/lib/server/utils/expectUtils.js +0 -123
  465. data/node/node_modules/playwright-core/lib/server/utils/fileUtils.js +0 -191
  466. data/node/node_modules/playwright-core/lib/server/utils/happyEyeballs.js +0 -207
  467. data/node/node_modules/playwright-core/lib/server/utils/hostPlatform.js +0 -123
  468. data/node/node_modules/playwright-core/lib/server/utils/httpServer.js +0 -203
  469. data/node/node_modules/playwright-core/lib/server/utils/imageUtils.js +0 -141
  470. data/node/node_modules/playwright-core/lib/server/utils/image_tools/colorUtils.js +0 -89
  471. data/node/node_modules/playwright-core/lib/server/utils/image_tools/compare.js +0 -109
  472. data/node/node_modules/playwright-core/lib/server/utils/image_tools/imageChannel.js +0 -78
  473. data/node/node_modules/playwright-core/lib/server/utils/image_tools/stats.js +0 -102
  474. data/node/node_modules/playwright-core/lib/server/utils/linuxUtils.js +0 -71
  475. data/node/node_modules/playwright-core/lib/server/utils/network.js +0 -242
  476. data/node/node_modules/playwright-core/lib/server/utils/nodePlatform.js +0 -154
  477. data/node/node_modules/playwright-core/lib/server/utils/pipeTransport.js +0 -84
  478. data/node/node_modules/playwright-core/lib/server/utils/processLauncher.js +0 -241
  479. data/node/node_modules/playwright-core/lib/server/utils/profiler.js +0 -65
  480. data/node/node_modules/playwright-core/lib/server/utils/socksProxy.js +0 -511
  481. data/node/node_modules/playwright-core/lib/server/utils/spawnAsync.js +0 -41
  482. data/node/node_modules/playwright-core/lib/server/utils/task.js +0 -51
  483. data/node/node_modules/playwright-core/lib/server/utils/userAgent.js +0 -98
  484. data/node/node_modules/playwright-core/lib/server/utils/wsServer.js +0 -121
  485. data/node/node_modules/playwright-core/lib/server/utils/zipFile.js +0 -74
  486. data/node/node_modules/playwright-core/lib/server/utils/zones.js +0 -57
  487. data/node/node_modules/playwright-core/lib/server/videoRecorder.js +0 -124
  488. data/node/node_modules/playwright-core/lib/server/webkit/protocol.d.js +0 -16
  489. data/node/node_modules/playwright-core/lib/server/webkit/webkit.js +0 -108
  490. data/node/node_modules/playwright-core/lib/server/webkit/wkBrowser.js +0 -335
  491. data/node/node_modules/playwright-core/lib/server/webkit/wkConnection.js +0 -144
  492. data/node/node_modules/playwright-core/lib/server/webkit/wkExecutionContext.js +0 -154
  493. data/node/node_modules/playwright-core/lib/server/webkit/wkInput.js +0 -181
  494. data/node/node_modules/playwright-core/lib/server/webkit/wkInterceptableRequest.js +0 -197
  495. data/node/node_modules/playwright-core/lib/server/webkit/wkPage.js +0 -1158
  496. data/node/node_modules/playwright-core/lib/server/webkit/wkProvisionalPage.js +0 -83
  497. data/node/node_modules/playwright-core/lib/server/webkit/wkWorkers.js +0 -105
  498. data/node/node_modules/playwright-core/lib/third_party/pixelmatch.js +0 -255
  499. data/node/node_modules/playwright-core/lib/utils/isomorphic/ariaSnapshot.js +0 -455
  500. data/node/node_modules/playwright-core/lib/utils/isomorphic/assert.js +0 -31
  501. data/node/node_modules/playwright-core/lib/utils/isomorphic/colors.js +0 -72
  502. data/node/node_modules/playwright-core/lib/utils/isomorphic/cssParser.js +0 -245
  503. data/node/node_modules/playwright-core/lib/utils/isomorphic/cssTokenizer.js +0 -1051
  504. data/node/node_modules/playwright-core/lib/utils/isomorphic/headers.js +0 -53
  505. data/node/node_modules/playwright-core/lib/utils/isomorphic/locatorGenerators.js +0 -689
  506. data/node/node_modules/playwright-core/lib/utils/isomorphic/locatorParser.js +0 -176
  507. data/node/node_modules/playwright-core/lib/utils/isomorphic/locatorUtils.js +0 -81
  508. data/node/node_modules/playwright-core/lib/utils/isomorphic/lruCache.js +0 -51
  509. data/node/node_modules/playwright-core/lib/utils/isomorphic/manualPromise.js +0 -114
  510. data/node/node_modules/playwright-core/lib/utils/isomorphic/mimeType.js +0 -459
  511. data/node/node_modules/playwright-core/lib/utils/isomorphic/multimap.js +0 -80
  512. data/node/node_modules/playwright-core/lib/utils/isomorphic/protocolFormatter.js +0 -81
  513. data/node/node_modules/playwright-core/lib/utils/isomorphic/protocolMetainfo.js +0 -330
  514. data/node/node_modules/playwright-core/lib/utils/isomorphic/rtti.js +0 -43
  515. data/node/node_modules/playwright-core/lib/utils/isomorphic/selectorParser.js +0 -386
  516. data/node/node_modules/playwright-core/lib/utils/isomorphic/semaphore.js +0 -54
  517. data/node/node_modules/playwright-core/lib/utils/isomorphic/stackTrace.js +0 -158
  518. data/node/node_modules/playwright-core/lib/utils/isomorphic/stringUtils.js +0 -204
  519. data/node/node_modules/playwright-core/lib/utils/isomorphic/time.js +0 -49
  520. data/node/node_modules/playwright-core/lib/utils/isomorphic/timeoutRunner.js +0 -66
  521. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/entries.js +0 -16
  522. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotRenderer.js +0 -499
  523. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotServer.js +0 -120
  524. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/snapshotStorage.js +0 -89
  525. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/traceLoader.js +0 -131
  526. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModel.js +0 -365
  527. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/traceModernizer.js +0 -400
  528. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV3.js +0 -16
  529. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV4.js +0 -16
  530. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV5.js +0 -16
  531. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV6.js +0 -16
  532. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV7.js +0 -16
  533. data/node/node_modules/playwright-core/lib/utils/isomorphic/trace/versions/traceV8.js +0 -16
  534. data/node/node_modules/playwright-core/lib/utils/isomorphic/traceUtils.js +0 -58
  535. data/node/node_modules/playwright-core/lib/utils/isomorphic/types.js +0 -16
  536. data/node/node_modules/playwright-core/lib/utils/isomorphic/urlMatch.js +0 -190
  537. data/node/node_modules/playwright-core/lib/utils/isomorphic/utilityScriptSerializers.js +0 -251
  538. data/node/node_modules/playwright-core/lib/utils/isomorphic/yaml.js +0 -84
  539. data/node/node_modules/playwright-core/lib/utils.js +0 -111
  540. data/node/node_modules/playwright-core/lib/utilsBundle.js +0 -109
  541. data/node/node_modules/playwright-core/lib/utilsBundleImpl/index.js +0 -218
  542. data/node/node_modules/playwright-core/lib/utilsBundleImpl/xdg-open +0 -1066
  543. data/node/node_modules/playwright-core/lib/vite/htmlReport/index.html +0 -84
  544. data/node/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +0 -1
  545. data/node/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DadYNm1I.js +0 -32
  546. data/node/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  547. data/node/node_modules/playwright-core/lib/vite/recorder/assets/index-BSjZa4pk.css +0 -1
  548. data/node/node_modules/playwright-core/lib/vite/recorder/assets/index-BhTWtUlo.js +0 -193
  549. data/node/node_modules/playwright-core/lib/vite/recorder/index.html +0 -29
  550. data/node/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +0 -9
  551. data/node/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-a5XoALAZ.js +0 -32
  552. data/node/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CJSZINFr.js +0 -266
  553. data/node/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +0 -9
  554. data/node/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +0 -1
  555. data/node/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  556. data/node/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.7ch9cixO.css +0 -1
  557. data/node/node_modules/playwright-core/lib/vite/traceViewer/index.BVu7tZDe.css +0 -1
  558. data/node/node_modules/playwright-core/lib/vite/traceViewer/index.Bk2uYQRV.js +0 -2
  559. data/node/node_modules/playwright-core/lib/vite/traceViewer/index.html +0 -43
  560. data/node/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +0 -16
  561. data/node/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +0 -9
  562. data/node/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +0 -21
  563. data/node/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +0 -5
  564. data/node/node_modules/playwright-core/lib/vite/traceViewer/uiMode.Btcz36p_.css +0 -1
  565. data/node/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CQJ9SCIQ.js +0 -5
  566. data/node/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +0 -17
  567. data/node/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +0 -32
  568. data/node/node_modules/playwright-core/lib/zipBundle.js +0 -34
  569. data/node/node_modules/playwright-core/lib/zipBundleImpl.js +0 -5
  570. data/node/node_modules/playwright-core/package.json +0 -43
  571. data/node/node_modules/playwright-core/types/protocol.d.ts +0 -23824
  572. data/node/node_modules/playwright-core/types/structs.d.ts +0 -45
  573. data/node/node_modules/playwright-core/types/types.d.ts +0 -22843
  574. data/node/package-lock.json +0 -72
  575. data/node/package.json +0 -14
  576. data/node/src/index.js +0 -215
  577. data/spec/rubycrawl_spec.rb +0 -51
  578. data/spec/spec_helper.rb +0 -11
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var pollingRecorderSource_exports = {};
20
- __export(pollingRecorderSource_exports, {
21
- source: () => source
22
- });
23
- module.exports = __toCommonJS(pollingRecorderSource_exports);
24
- const source = '\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n for (const name in obj) { fn = obj[name]; break; }\n const module = { exports: {} };\n fn(module.exports, module);\n result = module.exports;\n }\n return result;\n }\n};\nvar __export = (target, all) => {for (var name in all) target[name] = all[name];};\nvar __toESM = mod => ({ ...mod, \'default\': mod });\nvar __toCommonJS = mod => ({ ...mod, __esModule: true });\n\n\n// packages/injected/src/recorder/pollingRecorder.ts\nvar pollingRecorder_exports = {};\n__export(pollingRecorder_exports, {\n PollingRecorder: () => PollingRecorder,\n default: () => pollingRecorder_default\n});\nmodule.exports = __toCommonJS(pollingRecorder_exports);\n\n// packages/injected/src/recorder/clipPaths.ts\nvar svgJson = { "tagName": "svg", "children": [{ "tagName": "defs", "children": [{ "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-gripper" }, "children": [{ "tagName": "path", "attrs": { "d": "M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-circle-large-filled" }, "children": [{ "tagName": "path", "attrs": { "d": "M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-stop-circle" }, "children": [{ "tagName": "path", "attrs": { "d": "M6 6h4v4H6z" } }, { "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-inspect" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-whole-word" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M0 11H1V13H15V11H16V14H15H1H0V11Z" } }, { "tagName": "path", "attrs": { "d": "M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z" } }, { "tagName": "path", "attrs": { "d": "M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-eye" }, "children": [{ "tagName": "path", "attrs": { "d": "M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-symbol-constant" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M4 6h8v1H4V6zm8 3H4v1h8V9z" } }, { "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-check" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-close" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-pass" }, "children": [{ "tagName": "path", "attrs": { "d": "M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z" } }, { "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z" } }] }, { "tagName": "clipPath", "attrs": { "width": "16", "height": "16", "viewBox": "0 0 16 16", "fill": "currentColor", "id": "icon-gist" }, "children": [{ "tagName": "path", "attrs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M10.57 1.14l3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13l.5-.5h7.72l.35.14zM10 5h3l-3-3v3zM3 2v12h10V6H9.5L9 5.5V2H3zm2.062 7.533l1.817-1.828L6.17 7 4 9.179v.707l2.171 2.174.707-.707-1.816-1.82zM8.8 7.714l.7-.709 2.189 2.175v.709L9.5 12.062l-.705-.709 1.831-1.82L8.8 7.714z" } }] }] }] };\nvar clipPaths_default = svgJson;\n\n// packages/injected/src/recorder/recorder.ts\nvar HighlightColors = {\n multiple: "#f6b26b7f",\n single: "#6fa8dc7f",\n assert: "#8acae480",\n action: "#dc6f6f7f"\n};\nvar NoneTool = class {\n};\nvar InspectTool = class {\n constructor(recorder, assertVisibility) {\n this._hoveredModel = null;\n this._hoveredElement = null;\n this._recorder = recorder;\n this._assertVisibility = assertVisibility;\n }\n cursor() {\n return "pointer";\n }\n uninstall() {\n this._hoveredModel = null;\n this._hoveredElement = null;\n }\n onClick(event) {\n var _a;\n consumeEvent(event);\n if (event.button !== 0)\n return;\n if ((_a = this._hoveredModel) == null ? void 0 : _a.selector)\n this._commit(this._hoveredModel.selector, this._hoveredModel);\n }\n onPointerDown(event) {\n consumeEvent(event);\n }\n onPointerUp(event) {\n consumeEvent(event);\n }\n onMouseDown(event) {\n consumeEvent(event);\n }\n onMouseUp(event) {\n consumeEvent(event);\n }\n onMouseMove(event) {\n var _a;\n consumeEvent(event);\n let target = this._recorder.deepEventTarget(event);\n if (!target.isConnected)\n target = null;\n if (this._hoveredElement === target)\n return;\n this._hoveredElement = target;\n let model = null;\n if (this._hoveredElement) {\n const generated = this._recorder.injectedScript.generateSelector(this._hoveredElement, { testIdAttributeName: this._recorder.state.testIdAttributeName, multiple: false });\n model = {\n selector: generated.selector,\n elements: generated.elements,\n tooltipText: this._recorder.injectedScript.utils.asLocator(this._recorder.state.language, generated.selector),\n color: this._assertVisibility ? HighlightColors.assert : HighlightColors.single\n };\n }\n if (((_a = this._hoveredModel) == null ? void 0 : _a.selector) === (model == null ? void 0 : model.selector))\n return;\n this._hoveredModel = model;\n this._recorder.updateHighlight(model, true);\n }\n onMouseEnter(event) {\n consumeEvent(event);\n }\n onMouseLeave(event) {\n consumeEvent(event);\n const window = this._recorder.injectedScript.window;\n if (window.top !== window && this._recorder.deepEventTarget(event).nodeType === Node.DOCUMENT_NODE)\n this._reset(true);\n }\n onKeyDown(event) {\n consumeEvent(event);\n if (event.key === "Escape") {\n if (this._assertVisibility)\n this._recorder.setMode("recording");\n }\n }\n onKeyUp(event) {\n consumeEvent(event);\n }\n onScroll(event) {\n this._reset(false);\n }\n _commit(selector, model) {\n var _a;\n if (this._assertVisibility) {\n this._recorder.recordAction({\n name: "assertVisible",\n selector,\n signals: []\n });\n this._recorder.setMode("recording");\n (_a = this._recorder.overlay) == null ? void 0 : _a.flashToolSucceeded("assertingVisibility");\n } else {\n this._recorder.elementPicked(selector, model);\n }\n }\n _reset(userGesture) {\n this._hoveredElement = null;\n this._hoveredModel = null;\n this._recorder.updateHighlight(null, userGesture);\n }\n};\nvar RecordActionTool = class {\n constructor(recorder) {\n this._hoveredModel = null;\n this._hoveredElement = null;\n this._activeModel = null;\n this._expectProgrammaticKeyUp = false;\n this._observer = null;\n this._recorder = recorder;\n this._performingActions = /* @__PURE__ */ new Set();\n this._dialog = new Dialog(recorder);\n }\n cursor() {\n return "pointer";\n }\n _installObserverIfNeeded() {\n var _a;\n if (this._observer)\n return;\n if (!((_a = this._recorder.injectedScript.document) == null ? void 0 : _a.body))\n return;\n this._observer = new MutationObserver((mutations) => {\n if (!this._hoveredElement)\n return;\n for (const mutation of mutations) {\n for (const node of mutation.removedNodes) {\n if (node === this._hoveredElement || node.contains(this._hoveredElement))\n this._resetHoveredModel();\n }\n }\n });\n this._observer.observe(this._recorder.injectedScript.document.body, { childList: true, subtree: true });\n }\n uninstall() {\n var _a;\n (_a = this._observer) == null ? void 0 : _a.disconnect();\n this._observer = null;\n this._hoveredModel = null;\n this._hoveredElement = null;\n this._activeModel = null;\n this._expectProgrammaticKeyUp = false;\n this._dialog.close();\n }\n onClick(event) {\n if (this._dialog.isShowing()) {\n if (event.button === 2 && event.type === "auxclick") {\n consumeEvent(event);\n }\n return;\n }\n if (isRangeInput(this._hoveredElement))\n return;\n if (this._shouldIgnoreMouseEvent(event))\n return;\n if (this._actionInProgress(event))\n return;\n if (this._consumedDueToNoModel(event, this._hoveredModel))\n return;\n if (event.button === 2 && event.type === "auxclick") {\n this._showActionListDialog(this._hoveredModel, event);\n return;\n }\n const checkbox = asCheckbox(this._recorder.deepEventTarget(event));\n if (checkbox && event.detail === 1) {\n this._performAction({\n name: checkbox.checked ? "check" : "uncheck",\n selector: this._hoveredModel.selector,\n signals: []\n });\n return;\n }\n this._cancelPendingClickAction();\n if (event.detail === 1) {\n this._pendingClickAction = {\n action: {\n name: "click",\n selector: this._hoveredModel.selector,\n position: positionForEvent(event),\n signals: [],\n button: buttonForEvent(event),\n modifiers: modifiersForEvent(event),\n clickCount: event.detail\n },\n timeout: this._recorder.injectedScript.utils.builtins.setTimeout(() => this._commitPendingClickAction(), 200)\n };\n }\n }\n onDblClick(event) {\n if (this._dialog.isShowing())\n return;\n if (isRangeInput(this._hoveredElement))\n return;\n if (this._shouldIgnoreMouseEvent(event))\n return;\n if (this._actionInProgress(event))\n return;\n if (this._consumedDueToNoModel(event, this._hoveredModel))\n return;\n this._cancelPendingClickAction();\n this._performAction({\n name: "click",\n selector: this._hoveredModel.selector,\n position: positionForEvent(event),\n signals: [],\n button: buttonForEvent(event),\n modifiers: modifiersForEvent(event),\n clickCount: event.detail\n });\n }\n _commitPendingClickAction() {\n if (this._pendingClickAction)\n this._performAction(this._pendingClickAction.action);\n this._cancelPendingClickAction();\n }\n _cancelPendingClickAction() {\n if (this._pendingClickAction)\n this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout);\n this._pendingClickAction = void 0;\n }\n onContextMenu(event) {\n if (this._dialog.isShowing()) {\n consumeEvent(event);\n return;\n }\n if (this._shouldIgnoreMouseEvent(event))\n return;\n if (this._actionInProgress(event))\n return;\n if (this._consumedDueToNoModel(event, this._hoveredModel))\n return;\n this._showActionListDialog(this._hoveredModel, event);\n }\n onPointerDown(event) {\n if (this._dialog.isShowing())\n return;\n if (this._shouldIgnoreMouseEvent(event))\n return;\n this._consumeWhenAboutToPerform(event);\n }\n onPointerUp(event) {\n if (this._dialog.isShowing())\n return;\n if (this._shouldIgnoreMouseEvent(event))\n return;\n this._consumeWhenAboutToPerform(event);\n }\n onMouseDown(event) {\n if (this._dialog.isShowing())\n return;\n if (this._shouldIgnoreMouseEvent(event))\n return;\n this._consumeWhenAboutToPerform(event);\n this._activeModel = this._hoveredModel;\n }\n onMouseUp(event) {\n if (this._dialog.isShowing())\n return;\n if (this._shouldIgnoreMouseEvent(event))\n return;\n this._consumeWhenAboutToPerform(event);\n }\n onMouseMove(event) {\n if (this._dialog.isShowing())\n return;\n const target = this._recorder.deepEventTarget(event);\n if (this._hoveredElement === target)\n return;\n this._hoveredElement = target;\n this._updateModelForHoveredElement();\n }\n onMouseLeave(event) {\n if (this._dialog.isShowing())\n return;\n const window = this._recorder.injectedScript.window;\n if (window.top !== window && this._recorder.deepEventTarget(event).nodeType === Node.DOCUMENT_NODE) {\n this._hoveredElement = null;\n this._updateModelForHoveredElement();\n }\n }\n onFocus(event) {\n if (this._dialog.isShowing())\n return;\n this._onFocus(true);\n }\n onInput(event) {\n if (this._dialog.isShowing())\n return;\n const target = this._recorder.deepEventTarget(event);\n if (target.nodeName === "INPUT" && target.type.toLowerCase() === "file") {\n this._recordAction({\n name: "setInputFiles",\n selector: this._activeModel.selector,\n signals: [],\n files: [...target.files || []].map((file) => file.name)\n });\n return;\n }\n if (isRangeInput(target)) {\n this._recordAction({\n name: "fill",\n // must use hoveredModel instead of activeModel for it to work in webkit\n selector: this._hoveredModel.selector,\n signals: [],\n text: target.value\n });\n return;\n }\n if (["INPUT", "TEXTAREA"].includes(target.nodeName) || target.isContentEditable) {\n if (target.nodeName === "INPUT" && ["checkbox", "radio"].includes(target.type.toLowerCase())) {\n return;\n }\n if (this._consumedDueWrongTarget(event))\n return;\n this._recordAction({\n name: "fill",\n selector: this._activeModel.selector,\n signals: [],\n text: target.isContentEditable ? target.innerText : target.value\n });\n }\n if (target.nodeName === "SELECT") {\n const selectElement = target;\n this._recordAction({\n name: "select",\n selector: this._activeModel.selector,\n options: [...selectElement.selectedOptions].map((option) => option.value),\n signals: []\n });\n }\n }\n onKeyDown(event) {\n if (this._dialog.isShowing())\n return;\n if (!this._shouldGenerateKeyPressFor(event))\n return;\n if (this._actionInProgress(event)) {\n this._expectProgrammaticKeyUp = true;\n return;\n }\n if (this._consumedDueWrongTarget(event))\n return;\n if (event.key === " ") {\n const checkbox = asCheckbox(this._recorder.deepEventTarget(event));\n if (checkbox && event.detail === 0) {\n this._performAction({\n name: checkbox.checked ? "uncheck" : "check",\n selector: this._activeModel.selector,\n signals: []\n });\n return;\n }\n }\n this._performAction({\n name: "press",\n selector: this._activeModel.selector,\n signals: [],\n key: event.key,\n modifiers: modifiersForEvent(event)\n });\n }\n onKeyUp(event) {\n if (this._dialog.isShowing())\n return;\n if (!this._shouldGenerateKeyPressFor(event))\n return;\n if (!this._expectProgrammaticKeyUp) {\n consumeEvent(event);\n return;\n }\n this._expectProgrammaticKeyUp = false;\n }\n onScroll(event) {\n if (this._dialog.isShowing())\n return;\n this._resetHoveredModel();\n }\n _showActionListDialog(model, event) {\n consumeEvent(event);\n const actionPosition = positionForEvent(event);\n const actions = [\n {\n title: "Click",\n cb: () => this._performAction({\n name: "click",\n selector: model.selector,\n position: actionPosition,\n signals: [],\n button: "left",\n modifiers: 0,\n clickCount: 0\n })\n },\n {\n title: "Right click",\n cb: () => this._performAction({\n name: "click",\n selector: model.selector,\n position: actionPosition,\n signals: [],\n button: "right",\n modifiers: 0,\n clickCount: 0\n })\n },\n {\n title: "Double click",\n cb: () => this._performAction({\n name: "click",\n selector: model.selector,\n position: actionPosition,\n signals: [],\n button: "left",\n modifiers: 0,\n clickCount: 2\n })\n },\n {\n title: "Hover",\n cb: () => this._performAction({\n name: "hover",\n selector: model.selector,\n position: actionPosition,\n signals: []\n })\n },\n {\n title: "Pick locator",\n cb: () => this._recorder.elementPicked(model.selector, model)\n }\n ];\n const listElement = this._recorder.document.createElement("x-pw-action-list");\n listElement.setAttribute("role", "list");\n listElement.setAttribute("aria-label", "Choose action");\n for (const action of actions) {\n const actionElement = this._recorder.document.createElement("x-pw-action-item");\n actionElement.setAttribute("role", "listitem");\n actionElement.textContent = action.title;\n actionElement.setAttribute("aria-label", action.title);\n actionElement.addEventListener("click", () => {\n this._dialog.close();\n action.cb();\n });\n listElement.appendChild(actionElement);\n }\n const dialogElement = this._dialog.show({\n label: "Choose action",\n body: listElement,\n autosize: true\n });\n const anchorBox = this._recorder.highlight.firstTooltipBox() || model.elements[0].getBoundingClientRect();\n const dialogPosition = this._recorder.highlight.tooltipPosition(anchorBox, dialogElement);\n this._dialog.moveTo(dialogPosition.anchorTop, dialogPosition.anchorLeft);\n }\n _resetHoveredModel() {\n this._hoveredModel = null;\n this._hoveredElement = null;\n this._updateHighlight(false);\n }\n _onFocus(userGesture) {\n const activeElement = deepActiveElement(this._recorder.document);\n if (userGesture && activeElement === this._recorder.document.body)\n return;\n const result = activeElement ? this._recorder.injectedScript.generateSelector(activeElement, { testIdAttributeName: this._recorder.state.testIdAttributeName }) : null;\n this._activeModel = result && result.selector ? { ...result, color: HighlightColors.action } : null;\n if (userGesture) {\n this._hoveredElement = activeElement;\n this._updateModelForHoveredElement();\n }\n }\n _shouldIgnoreMouseEvent(event) {\n const target = this._recorder.deepEventTarget(event);\n const nodeName = target.nodeName;\n if (nodeName === "SELECT" || nodeName === "OPTION")\n return true;\n if (nodeName === "INPUT" && ["date", "range"].includes(target.type))\n return true;\n return false;\n }\n _actionInProgress(event) {\n const isKeyEvent = event instanceof KeyboardEvent;\n const isMouseOrPointerEvent = event instanceof MouseEvent || event instanceof PointerEvent;\n for (const action of this._performingActions) {\n if (isKeyEvent && action.name === "press" && event.key === action.key)\n return true;\n if (isMouseOrPointerEvent && (action.name === "click" || action.name === "hover" || action.name === "check" || action.name === "uncheck"))\n return true;\n }\n consumeEvent(event);\n return false;\n }\n _consumedDueToNoModel(event, model) {\n if (model)\n return false;\n consumeEvent(event);\n return true;\n }\n _consumedDueWrongTarget(event) {\n if (this._activeModel && this._activeModel.elements[0] === this._recorder.deepEventTarget(event))\n return false;\n consumeEvent(event);\n return true;\n }\n _consumeWhenAboutToPerform(event) {\n if (!this._performingActions.size)\n consumeEvent(event);\n }\n _recordAction(action) {\n this._recorder.recordAction(action);\n }\n _performAction(action) {\n this._recorder.updateHighlight(null, false);\n this._performingActions.add(action);\n const promise = this._recorder.performAction(action).then(() => {\n this._performingActions.delete(action);\n this._onFocus(false);\n });\n if (!this._recorder.injectedScript.isUnderTest)\n return;\n void promise.then(() => {\n console.error("Action performed for test: " + JSON.stringify({\n // eslint-disable-line no-console\n hovered: this._hoveredModel ? this._hoveredModel.selector : null,\n active: this._activeModel ? this._activeModel.selector : null\n }));\n });\n }\n _shouldGenerateKeyPressFor(event) {\n if (typeof event.key !== "string")\n return false;\n if (event.key === "Enter" && (this._recorder.deepEventTarget(event).nodeName === "TEXTAREA" || this._recorder.deepEventTarget(event).isContentEditable))\n return false;\n if (["Backspace", "Delete", "AltGraph"].includes(event.key))\n return false;\n if (event.key === "@" && event.code === "KeyL")\n return false;\n if (navigator.platform.includes("Mac")) {\n if (event.key === "v" && event.metaKey)\n return false;\n } else {\n if (event.key === "v" && event.ctrlKey)\n return false;\n if (event.key === "Insert" && event.shiftKey)\n return false;\n }\n if (["Shift", "Control", "Meta", "Alt", "Process"].includes(event.key))\n return false;\n const hasModifier = event.ctrlKey || event.altKey || event.metaKey;\n if (event.key.length === 1 && !hasModifier)\n return !!asCheckbox(this._recorder.deepEventTarget(event));\n return true;\n }\n _updateModelForHoveredElement() {\n this._installObserverIfNeeded();\n if (this._performingActions.size)\n return;\n if (!this._hoveredElement || !this._hoveredElement.isConnected) {\n this._hoveredModel = null;\n this._hoveredElement = null;\n this._updateHighlight(true);\n return;\n }\n const { selector, elements } = this._recorder.injectedScript.generateSelector(this._hoveredElement, { testIdAttributeName: this._recorder.state.testIdAttributeName });\n if (this._hoveredModel && this._hoveredModel.selector === selector)\n return;\n this._hoveredModel = selector ? { selector, elements, color: HighlightColors.action } : null;\n this._updateHighlight(true);\n }\n _updateHighlight(userGesture) {\n this._recorder.updateHighlight(this._hoveredModel, userGesture);\n }\n};\nvar JsonRecordActionTool = class {\n constructor(recorder) {\n this._recorder = recorder;\n }\n install() {\n this._recorder.highlight.uninstall();\n }\n uninstall() {\n this._recorder.highlight.install();\n }\n onClick(event) {\n const element = this._recorder.deepEventTarget(event);\n if (isRangeInput(element))\n return;\n if (event.button === 2 && event.type === "auxclick")\n return;\n if (this._shouldIgnoreMouseEvent(event))\n return;\n const checkbox = asCheckbox(element);\n const { ariaSnapshot, selector, ref } = this._ariaSnapshot(element);\n if (checkbox && event.detail === 1) {\n this._recorder.recordAction({\n name: checkbox.checked ? "check" : "uncheck",\n selector,\n ref,\n signals: [],\n ariaSnapshot\n });\n return;\n }\n this._recorder.recordAction({\n name: "click",\n selector,\n ref,\n ariaSnapshot,\n position: positionForEvent(event),\n signals: [],\n button: buttonForEvent(event),\n modifiers: modifiersForEvent(event),\n clickCount: event.detail\n });\n }\n onContextMenu(event) {\n const element = this._recorder.deepEventTarget(event);\n const { ariaSnapshot, selector, ref } = this._ariaSnapshot(element);\n this._recorder.recordAction({\n name: "click",\n selector,\n ref,\n ariaSnapshot,\n position: positionForEvent(event),\n signals: [],\n button: "right",\n modifiers: modifiersForEvent(event),\n clickCount: 1\n });\n }\n onInput(event) {\n const element = this._recorder.deepEventTarget(event);\n const { ariaSnapshot, selector, ref } = this._ariaSnapshot(element);\n if (isRangeInput(element)) {\n this._recorder.recordAction({\n name: "fill",\n selector,\n ref,\n ariaSnapshot,\n signals: [],\n text: element.value\n });\n return;\n }\n if (["INPUT", "TEXTAREA"].includes(element.nodeName) || element.isContentEditable) {\n if (element.nodeName === "INPUT" && ["checkbox", "radio"].includes(element.type.toLowerCase())) {\n return;\n }\n this._recorder.recordAction({\n name: "fill",\n ref,\n selector,\n ariaSnapshot,\n signals: [],\n text: element.isContentEditable ? element.innerText : element.value\n });\n return;\n }\n if (element.nodeName === "SELECT") {\n const selectElement = element;\n this._recorder.recordAction({\n name: "select",\n selector,\n ref,\n ariaSnapshot,\n options: [...selectElement.selectedOptions].map((option) => option.value),\n signals: []\n });\n return;\n }\n }\n onKeyDown(event) {\n if (!this._shouldGenerateKeyPressFor(event))\n return;\n const element = this._recorder.deepEventTarget(event);\n const { ariaSnapshot, selector, ref } = this._ariaSnapshot(element);\n if (event.key === " ") {\n const checkbox = asCheckbox(element);\n if (checkbox && event.detail === 0) {\n this._recorder.recordAction({\n name: checkbox.checked ? "uncheck" : "check",\n selector,\n ref,\n ariaSnapshot,\n signals: []\n });\n return;\n }\n }\n this._recorder.recordAction({\n name: "press",\n selector,\n ref,\n ariaSnapshot,\n signals: [],\n key: event.key,\n modifiers: modifiersForEvent(event)\n });\n }\n _shouldIgnoreMouseEvent(event) {\n const target = this._recorder.deepEventTarget(event);\n const nodeName = target.nodeName;\n if (nodeName === "SELECT" || nodeName === "OPTION")\n return true;\n if (nodeName === "INPUT" && ["date", "range"].includes(target.type))\n return true;\n return false;\n }\n _shouldGenerateKeyPressFor(event) {\n if (typeof event.key !== "string")\n return false;\n if (event.key === "Enter" && (this._recorder.deepEventTarget(event).nodeName === "TEXTAREA" || this._recorder.deepEventTarget(event).isContentEditable))\n return false;\n if (["Backspace", "Delete", "AltGraph"].includes(event.key))\n return false;\n if (event.key === "@" && event.code === "KeyL")\n return false;\n if (navigator.platform.includes("Mac")) {\n if (event.key === "v" && event.metaKey)\n return false;\n } else {\n if (event.key === "v" && event.ctrlKey)\n return false;\n if (event.key === "Insert" && event.shiftKey)\n return false;\n }\n if (["Shift", "Control", "Meta", "Alt", "Process"].includes(event.key))\n return false;\n const hasModifier = event.ctrlKey || event.altKey || event.metaKey;\n if (event.key.length === 1 && !hasModifier)\n return !this._isEditable(this._recorder.deepEventTarget(event));\n return true;\n }\n _isEditable(element) {\n if (element.nodeName === "TEXTAREA" || element.nodeName === "INPUT")\n return true;\n if (element.isContentEditable)\n return true;\n return false;\n }\n _ariaSnapshot(element) {\n const { ariaSnapshot, refs } = this._recorder.injectedScript.ariaSnapshotForRecorder();\n const ref = element ? refs.get(element) : void 0;\n const elementInfo = element ? this._recorder.injectedScript.generateSelector(element, { testIdAttributeName: this._recorder.state.testIdAttributeName }) : void 0;\n return { ariaSnapshot, selector: elementInfo == null ? void 0 : elementInfo.selector, ref };\n }\n};\nvar TextAssertionTool = class {\n constructor(recorder, kind) {\n this._hoverHighlight = null;\n this._action = null;\n this._recorder = recorder;\n this._textCache = /* @__PURE__ */ new Map();\n this._kind = kind;\n this._dialog = new Dialog(recorder);\n }\n cursor() {\n return "pointer";\n }\n uninstall() {\n this._dialog.close();\n this._hoverHighlight = null;\n }\n onClick(event) {\n consumeEvent(event);\n if (this._kind === "value") {\n this._commitAssertValue();\n } else {\n if (!this._dialog.isShowing())\n this._showDialog();\n }\n }\n onMouseDown(event) {\n const target = this._recorder.deepEventTarget(event);\n if (this._elementHasValue(target))\n event.preventDefault();\n }\n onPointerUp(event) {\n var _a;\n const target = (_a = this._hoverHighlight) == null ? void 0 : _a.elements[0];\n if (this._kind === "value" && target && (target.nodeName === "INPUT" || target.nodeName === "SELECT") && target.disabled) {\n this._commitAssertValue();\n }\n }\n onMouseMove(event) {\n var _a;\n if (this._dialog.isShowing())\n return;\n const target = this._recorder.deepEventTarget(event);\n if (((_a = this._hoverHighlight) == null ? void 0 : _a.elements[0]) === target)\n return;\n if (this._kind === "text" || this._kind === "snapshot") {\n this._hoverHighlight = this._recorder.injectedScript.utils.elementText(this._textCache, target).full ? { elements: [target], selector: "", color: HighlightColors.assert } : null;\n } else if (this._elementHasValue(target)) {\n const generated = this._recorder.injectedScript.generateSelector(target, { testIdAttributeName: this._recorder.state.testIdAttributeName });\n this._hoverHighlight = { selector: generated.selector, elements: generated.elements, color: HighlightColors.assert };\n } else {\n this._hoverHighlight = null;\n }\n this._recorder.updateHighlight(this._hoverHighlight, true);\n }\n onKeyDown(event) {\n if (event.key === "Escape")\n this._recorder.setMode("recording");\n consumeEvent(event);\n }\n onScroll(event) {\n this._recorder.updateHighlight(this._hoverHighlight, false);\n }\n _elementHasValue(element) {\n return element.nodeName === "TEXTAREA" || element.nodeName === "SELECT" || element.nodeName === "INPUT" && !["button", "image", "reset", "submit"].includes(element.type);\n }\n _generateAction() {\n var _a;\n this._textCache.clear();\n const target = (_a = this._hoverHighlight) == null ? void 0 : _a.elements[0];\n if (!target)\n return null;\n if (this._kind === "value") {\n if (!this._elementHasValue(target))\n return null;\n const { selector } = this._recorder.injectedScript.generateSelector(target, { testIdAttributeName: this._recorder.state.testIdAttributeName });\n if (target.nodeName === "INPUT" && ["checkbox", "radio"].includes(target.type.toLowerCase())) {\n return {\n name: "assertChecked",\n selector,\n signals: [],\n // Interestingly, inputElement.checked is reversed inside this event handler.\n checked: !target.checked\n };\n } else {\n return {\n name: "assertValue",\n selector,\n signals: [],\n value: target.value\n };\n }\n } else if (this._kind === "snapshot") {\n const generated = this._recorder.injectedScript.generateSelector(target, { testIdAttributeName: this._recorder.state.testIdAttributeName, forTextExpect: true });\n this._hoverHighlight = { selector: generated.selector, elements: generated.elements, color: HighlightColors.assert };\n this._recorder.updateHighlight(this._hoverHighlight, true);\n return {\n name: "assertSnapshot",\n selector: this._hoverHighlight.selector,\n signals: [],\n ariaSnapshot: this._recorder.injectedScript.ariaSnapshot(target, { mode: "codegen" })\n };\n } else {\n const generated = this._recorder.injectedScript.generateSelector(target, { testIdAttributeName: this._recorder.state.testIdAttributeName, forTextExpect: true });\n this._hoverHighlight = { selector: generated.selector, elements: generated.elements, color: HighlightColors.assert };\n this._recorder.updateHighlight(this._hoverHighlight, true);\n return {\n name: "assertText",\n selector: this._hoverHighlight.selector,\n signals: [],\n text: this._recorder.injectedScript.utils.elementText(this._textCache, target).normalized,\n substring: true\n };\n }\n }\n _renderValue(action) {\n if ((action == null ? void 0 : action.name) === "assertText")\n return this._recorder.injectedScript.utils.normalizeWhiteSpace(action.text);\n if ((action == null ? void 0 : action.name) === "assertChecked")\n return String(action.checked);\n if ((action == null ? void 0 : action.name) === "assertValue")\n return action.value;\n if ((action == null ? void 0 : action.name) === "assertSnapshot")\n return action.ariaSnapshot;\n return "";\n }\n _commit() {\n if (!this._action || !this._dialog.isShowing())\n return;\n this._dialog.close();\n this._recorder.recordAction(this._action);\n this._recorder.setMode("recording");\n }\n _showDialog() {\n var _a, _b, _c, _d;\n if (!((_a = this._hoverHighlight) == null ? void 0 : _a.elements[0]))\n return;\n this._action = this._generateAction();\n if (((_b = this._action) == null ? void 0 : _b.name) === "assertText") {\n this._showTextDialog(this._action);\n } else if (((_c = this._action) == null ? void 0 : _c.name) === "assertSnapshot") {\n this._recorder.recordAction(this._action);\n this._recorder.setMode("recording");\n (_d = this._recorder.overlay) == null ? void 0 : _d.flashToolSucceeded("assertingSnapshot");\n }\n }\n _showTextDialog(action) {\n const textElement = this._recorder.document.createElement("textarea");\n textElement.setAttribute("spellcheck", "false");\n textElement.value = this._renderValue(action);\n textElement.classList.add("text-editor");\n const updateAndValidate = () => {\n var _a;\n const newValue = this._recorder.injectedScript.utils.normalizeWhiteSpace(textElement.value);\n const target = (_a = this._hoverHighlight) == null ? void 0 : _a.elements[0];\n if (!target)\n return;\n action.text = newValue;\n const targetText = this._recorder.injectedScript.utils.elementText(this._textCache, target).normalized;\n const matches = newValue && targetText.includes(newValue);\n textElement.classList.toggle("does-not-match", !matches);\n };\n textElement.addEventListener("input", updateAndValidate);\n const label = "Assert that element contains text";\n const dialogElement = this._dialog.show({\n label,\n body: textElement,\n onCommit: () => this._commit()\n });\n const position = this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(), dialogElement);\n this._dialog.moveTo(position.anchorTop, position.anchorLeft);\n textElement.focus();\n }\n _commitAssertValue() {\n var _a;\n if (this._kind !== "value")\n return;\n const action = this._generateAction();\n if (!action)\n return;\n this._recorder.recordAction(action);\n this._recorder.setMode("recording");\n (_a = this._recorder.overlay) == null ? void 0 : _a.flashToolSucceeded("assertingValue");\n }\n};\nvar Overlay = class {\n constructor(recorder) {\n this._listeners = [];\n this._offsetX = 0;\n this._measure = { width: 0, height: 0 };\n this._recorder = recorder;\n const document = this._recorder.document;\n this._overlayElement = document.createElement("x-pw-overlay");\n const toolsListElement = document.createElement("x-pw-tools-list");\n this._overlayElement.appendChild(toolsListElement);\n this._dragHandle = document.createElement("x-pw-tool-gripper");\n this._dragHandle.appendChild(document.createElement("x-div"));\n toolsListElement.appendChild(this._dragHandle);\n this._recordToggle = this._recorder.document.createElement("x-pw-tool-item");\n this._recordToggle.title = "Record";\n this._recordToggle.classList.add("record");\n this._recordToggle.appendChild(this._recorder.document.createElement("x-div"));\n toolsListElement.appendChild(this._recordToggle);\n this._pickLocatorToggle = this._recorder.document.createElement("x-pw-tool-item");\n this._pickLocatorToggle.title = "Pick locator";\n this._pickLocatorToggle.classList.add("pick-locator");\n this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div"));\n toolsListElement.appendChild(this._pickLocatorToggle);\n this._assertVisibilityToggle = this._recorder.document.createElement("x-pw-tool-item");\n this._assertVisibilityToggle.title = "Assert visibility";\n this._assertVisibilityToggle.classList.add("visibility");\n this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div"));\n toolsListElement.appendChild(this._assertVisibilityToggle);\n this._assertTextToggle = this._recorder.document.createElement("x-pw-tool-item");\n this._assertTextToggle.title = "Assert text";\n this._assertTextToggle.classList.add("text");\n this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div"));\n toolsListElement.appendChild(this._assertTextToggle);\n this._assertValuesToggle = this._recorder.document.createElement("x-pw-tool-item");\n this._assertValuesToggle.title = "Assert value";\n this._assertValuesToggle.classList.add("value");\n this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div"));\n toolsListElement.appendChild(this._assertValuesToggle);\n this._assertSnapshotToggle = this._recorder.document.createElement("x-pw-tool-item");\n this._assertSnapshotToggle.title = "Assert snapshot";\n this._assertSnapshotToggle.classList.add("snapshot");\n this._assertSnapshotToggle.appendChild(this._recorder.document.createElement("x-div"));\n toolsListElement.appendChild(this._assertSnapshotToggle);\n this._updateVisualPosition();\n this._refreshListeners();\n }\n _refreshListeners() {\n removeEventListeners(this._listeners);\n this._listeners = [\n addEventListener(this._dragHandle, "mousedown", (event) => {\n this._dragState = { offsetX: this._offsetX, dragStart: { x: event.clientX, y: 0 } };\n }),\n addEventListener(this._recordToggle, "click", () => {\n if (this._recordToggle.classList.contains("disabled"))\n return;\n this._recorder.setMode(this._recorder.state.mode === "none" || this._recorder.state.mode === "standby" || this._recorder.state.mode === "inspecting" ? "recording" : "standby");\n }),\n addEventListener(this._pickLocatorToggle, "click", () => {\n if (this._pickLocatorToggle.classList.contains("disabled"))\n return;\n const newMode = {\n "inspecting": "standby",\n "none": "inspecting",\n "standby": "inspecting",\n "recording": "recording-inspecting",\n "recording-inspecting": "recording",\n "assertingText": "recording-inspecting",\n "assertingVisibility": "recording-inspecting",\n "assertingValue": "recording-inspecting",\n "assertingSnapshot": "recording-inspecting"\n };\n this._recorder.setMode(newMode[this._recorder.state.mode]);\n }),\n addEventListener(this._assertVisibilityToggle, "click", () => {\n if (!this._assertVisibilityToggle.classList.contains("disabled"))\n this._recorder.setMode(this._recorder.state.mode === "assertingVisibility" ? "recording" : "assertingVisibility");\n }),\n addEventListener(this._assertTextToggle, "click", () => {\n if (!this._assertTextToggle.classList.contains("disabled"))\n this._recorder.setMode(this._recorder.state.mode === "assertingText" ? "recording" : "assertingText");\n }),\n addEventListener(this._assertValuesToggle, "click", () => {\n if (!this._assertValuesToggle.classList.contains("disabled"))\n this._recorder.setMode(this._recorder.state.mode === "assertingValue" ? "recording" : "assertingValue");\n }),\n addEventListener(this._assertSnapshotToggle, "click", () => {\n if (!this._assertSnapshotToggle.classList.contains("disabled"))\n this._recorder.setMode(this._recorder.state.mode === "assertingSnapshot" ? "recording" : "assertingSnapshot");\n })\n ];\n }\n install() {\n this._recorder.highlight.appendChild(this._overlayElement);\n this._refreshListeners();\n this._updateVisualPosition();\n }\n contains(element) {\n return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement, element);\n }\n setUIState(state) {\n const isRecording = state.mode === "recording" || state.mode === "assertingText" || state.mode === "assertingVisibility" || state.mode === "assertingValue" || state.mode === "assertingSnapshot" || state.mode === "recording-inspecting";\n this._recordToggle.classList.toggle("toggled", isRecording);\n this._recordToggle.title = isRecording ? "Stop Recording" : "Start Recording";\n this._pickLocatorToggle.classList.toggle("toggled", state.mode === "inspecting" || state.mode === "recording-inspecting");\n this._assertVisibilityToggle.classList.toggle("toggled", state.mode === "assertingVisibility");\n this._assertVisibilityToggle.classList.toggle("disabled", state.mode === "none" || state.mode === "standby" || state.mode === "inspecting");\n this._assertTextToggle.classList.toggle("toggled", state.mode === "assertingText");\n this._assertTextToggle.classList.toggle("disabled", state.mode === "none" || state.mode === "standby" || state.mode === "inspecting");\n this._assertValuesToggle.classList.toggle("toggled", state.mode === "assertingValue");\n this._assertValuesToggle.classList.toggle("disabled", state.mode === "none" || state.mode === "standby" || state.mode === "inspecting");\n this._assertSnapshotToggle.classList.toggle("toggled", state.mode === "assertingSnapshot");\n this._assertSnapshotToggle.classList.toggle("disabled", state.mode === "none" || state.mode === "standby" || state.mode === "inspecting");\n if (this._offsetX !== state.overlay.offsetX) {\n this._offsetX = state.overlay.offsetX;\n this._updateVisualPosition();\n }\n if (state.mode === "none")\n this._hideOverlay();\n else\n this._showOverlay();\n }\n flashToolSucceeded(tool) {\n let element;\n if (tool === "assertingVisibility")\n element = this._assertVisibilityToggle;\n else if (tool === "assertingSnapshot")\n element = this._assertSnapshotToggle;\n else\n element = this._assertValuesToggle;\n element.classList.add("succeeded");\n this._recorder.injectedScript.utils.builtins.setTimeout(() => element.classList.remove("succeeded"), 2e3);\n }\n _hideOverlay() {\n this._overlayElement.setAttribute("hidden", "true");\n }\n _showOverlay() {\n if (!this._overlayElement.hasAttribute("hidden"))\n return;\n this._overlayElement.removeAttribute("hidden");\n this._updateVisualPosition();\n }\n _updateVisualPosition() {\n this._measure = this._overlayElement.getBoundingClientRect();\n this._overlayElement.style.left = (this._recorder.injectedScript.window.innerWidth - this._measure.width) / 2 + this._offsetX + "px";\n }\n onMouseMove(event) {\n if (!event.buttons) {\n this._dragState = void 0;\n return false;\n }\n if (this._dragState) {\n this._offsetX = this._dragState.offsetX + event.clientX - this._dragState.dragStart.x;\n const halfGapSize = (this._recorder.injectedScript.window.innerWidth - this._measure.width) / 2 - 10;\n this._offsetX = Math.max(-halfGapSize, Math.min(halfGapSize, this._offsetX));\n this._updateVisualPosition();\n this._recorder.setOverlayState({ offsetX: this._offsetX });\n consumeEvent(event);\n return true;\n }\n return false;\n }\n onMouseUp(event) {\n if (this._dragState) {\n consumeEvent(event);\n return true;\n }\n return false;\n }\n onClick(event) {\n if (this._dragState) {\n this._dragState = void 0;\n consumeEvent(event);\n return true;\n }\n return false;\n }\n onDblClick(event) {\n return false;\n }\n};\nvar Recorder = class {\n constructor(injectedScript, options) {\n this._listeners = [];\n this._lastHighlightedSelector = void 0;\n this._lastHighlightedAriaTemplateJSON = "undefined";\n this.state = {\n mode: "none",\n testIdAttributeName: "data-testid",\n language: "javascript",\n overlay: { offsetX: 0 }\n };\n this._delegate = {};\n var _a, _b;\n this.document = injectedScript.document;\n this.injectedScript = injectedScript;\n this.highlight = injectedScript.createHighlight();\n this._tools = {\n "none": new NoneTool(),\n "standby": new NoneTool(),\n "inspecting": new InspectTool(this, false),\n "recording": (options == null ? void 0 : options.recorderMode) === "api" ? new JsonRecordActionTool(this) : new RecordActionTool(this),\n "recording-inspecting": new InspectTool(this, false),\n "assertingText": new TextAssertionTool(this, "text"),\n "assertingVisibility": new InspectTool(this, true),\n "assertingValue": new TextAssertionTool(this, "value"),\n "assertingSnapshot": new TextAssertionTool(this, "snapshot")\n };\n this._currentTool = this._tools.none;\n (_b = (_a = this._currentTool).install) == null ? void 0 : _b.call(_a);\n if (injectedScript.window.top === injectedScript.window) {\n this.overlay = new Overlay(this);\n this.overlay.setUIState(this.state);\n }\n this._stylesheet = new injectedScript.window.CSSStyleSheet();\n this._stylesheet.replaceSync(`\n body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }\n body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }\n `);\n this.installListeners();\n injectedScript.utils.cacheNormalizedWhitespaces();\n if (injectedScript.isUnderTest)\n console.error("Recorder script ready for test");\n injectedScript.consoleApi.install();\n }\n installListeners() {\n var _a, _b, _c;\n removeEventListeners(this._listeners);\n this._listeners = [\n addEventListener(this.document, "click", (event) => this._onClick(event), true),\n addEventListener(this.document, "auxclick", (event) => this._onClick(event), true),\n addEventListener(this.document, "dblclick", (event) => this._onDblClick(event), true),\n addEventListener(this.document, "contextmenu", (event) => this._onContextMenu(event), true),\n addEventListener(this.document, "dragstart", (event) => this._onDragStart(event), true),\n addEventListener(this.document, "input", (event) => this._onInput(event), true),\n addEventListener(this.document, "keydown", (event) => this._onKeyDown(event), true),\n addEventListener(this.document, "keyup", (event) => this._onKeyUp(event), true),\n addEventListener(this.document, "pointerdown", (event) => this._onPointerDown(event), true),\n addEventListener(this.document, "pointerup", (event) => this._onPointerUp(event), true),\n addEventListener(this.document, "mousedown", (event) => this._onMouseDown(event), true),\n addEventListener(this.document, "mouseup", (event) => this._onMouseUp(event), true),\n addEventListener(this.document, "mousemove", (event) => this._onMouseMove(event), true),\n addEventListener(this.document, "mouseleave", (event) => this._onMouseLeave(event), true),\n addEventListener(this.document, "mouseenter", (event) => this._onMouseEnter(event), true),\n addEventListener(this.document, "focus", (event) => this._onFocus(event), true),\n addEventListener(this.document, "scroll", (event) => this._onScroll(event), true)\n ];\n this.highlight.install();\n let recreationInterval;\n const recreate = () => {\n this.highlight.install();\n recreationInterval = this.injectedScript.utils.builtins.setTimeout(recreate, 500);\n };\n recreationInterval = this.injectedScript.utils.builtins.setTimeout(recreate, 500);\n this._listeners.push(() => this.injectedScript.utils.builtins.clearTimeout(recreationInterval));\n this.highlight.appendChild(createSvgElement(this.document, clipPaths_default));\n (_a = this.overlay) == null ? void 0 : _a.install();\n (_c = (_b = this._currentTool) == null ? void 0 : _b.install) == null ? void 0 : _c.call(_b);\n this.document.adoptedStyleSheets.push(this._stylesheet);\n }\n _switchCurrentTool() {\n var _a, _b, _c, _d, _e, _f;\n const newTool = this._tools[this.state.mode];\n if (newTool === this._currentTool)\n return;\n (_b = (_a = this._currentTool).uninstall) == null ? void 0 : _b.call(_a);\n this.clearHighlight();\n this._currentTool = newTool;\n (_d = (_c = this._currentTool).install) == null ? void 0 : _d.call(_c);\n const cursor = (_e = newTool.cursor) == null ? void 0 : _e.call(newTool);\n if (cursor)\n (_f = this.injectedScript.document.body) == null ? void 0 : _f.setAttribute("data-pw-cursor", cursor);\n }\n setUIState(state, delegate) {\n var _a;\n this._delegate = delegate;\n if (state.actionPoint && this.state.actionPoint && state.actionPoint.x === this.state.actionPoint.x && state.actionPoint.y === this.state.actionPoint.y) {\n } else if (!state.actionPoint && !this.state.actionPoint) {\n } else {\n if (state.actionPoint)\n this.highlight.showActionPoint(state.actionPoint.x, state.actionPoint.y);\n else\n this.highlight.hideActionPoint();\n }\n this.state = state;\n this.highlight.setLanguage(state.language);\n this._switchCurrentTool();\n (_a = this.overlay) == null ? void 0 : _a.setUIState(state);\n let highlight = "noop";\n if (state.actionSelector !== this._lastHighlightedSelector) {\n const entries = state.actionSelector ? entriesForSelectorHighlight(this.injectedScript, state.language, state.actionSelector, this.document) : null;\n highlight = (entries == null ? void 0 : entries.length) ? entries : "clear";\n this._lastHighlightedSelector = (entries == null ? void 0 : entries.length) ? state.actionSelector : void 0;\n }\n const ariaTemplateJSON = JSON.stringify(state.ariaTemplate);\n if (this._lastHighlightedAriaTemplateJSON !== ariaTemplateJSON) {\n const elements = state.ariaTemplate ? this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document, state.ariaTemplate) : [];\n if (elements.length) {\n const color = elements.length > 1 ? HighlightColors.multiple : HighlightColors.single;\n highlight = elements.map((element) => ({ element, color }));\n this._lastHighlightedAriaTemplateJSON = ariaTemplateJSON;\n } else {\n if (!this._lastHighlightedSelector)\n highlight = "clear";\n this._lastHighlightedAriaTemplateJSON = "undefined";\n }\n }\n if (highlight === "clear")\n this.highlight.clearHighlight();\n else if (highlight !== "noop")\n this.highlight.updateHighlight(highlight);\n }\n clearHighlight() {\n this.updateHighlight(null, false);\n }\n _onClick(event) {\n var _a, _b, _c;\n if (!event.isTrusted)\n return;\n if ((_a = this.overlay) == null ? void 0 : _a.onClick(event))\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_c = (_b = this._currentTool).onClick) == null ? void 0 : _c.call(_b, event);\n }\n _onDblClick(event) {\n var _a, _b, _c;\n if (!event.isTrusted)\n return;\n if ((_a = this.overlay) == null ? void 0 : _a.onDblClick(event))\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_c = (_b = this._currentTool).onDblClick) == null ? void 0 : _c.call(_b, event);\n }\n _onContextMenu(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n (_b = (_a = this._currentTool).onContextMenu) == null ? void 0 : _b.call(_a, event);\n }\n _onDragStart(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onDragStart) == null ? void 0 : _b.call(_a, event);\n }\n _onPointerDown(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onPointerDown) == null ? void 0 : _b.call(_a, event);\n }\n _onPointerUp(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onPointerUp) == null ? void 0 : _b.call(_a, event);\n }\n _onMouseDown(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onMouseDown) == null ? void 0 : _b.call(_a, event);\n }\n _onMouseUp(event) {\n var _a, _b, _c;\n if (!event.isTrusted)\n return;\n if ((_a = this.overlay) == null ? void 0 : _a.onMouseUp(event))\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_c = (_b = this._currentTool).onMouseUp) == null ? void 0 : _c.call(_b, event);\n }\n _onMouseMove(event) {\n var _a, _b, _c;\n if (!event.isTrusted)\n return;\n if ((_a = this.overlay) == null ? void 0 : _a.onMouseMove(event))\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_c = (_b = this._currentTool).onMouseMove) == null ? void 0 : _c.call(_b, event);\n }\n _onMouseEnter(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onMouseEnter) == null ? void 0 : _b.call(_a, event);\n }\n _onMouseLeave(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onMouseLeave) == null ? void 0 : _b.call(_a, event);\n }\n _onFocus(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onFocus) == null ? void 0 : _b.call(_a, event);\n }\n _onScroll(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n this._lastHighlightedSelector = void 0;\n this._lastHighlightedAriaTemplateJSON = "undefined";\n this.highlight.hideActionPoint();\n (_b = (_a = this._currentTool).onScroll) == null ? void 0 : _b.call(_a, event);\n }\n _onInput(event) {\n var _a, _b;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onInput) == null ? void 0 : _b.call(_a, event);\n }\n _onKeyDown(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onKeyDown) == null ? void 0 : _b.call(_a, event);\n }\n _onKeyUp(event) {\n var _a, _b;\n if (!event.isTrusted)\n return;\n if (this._ignoreOverlayEvent(event))\n return;\n (_b = (_a = this._currentTool).onKeyUp) == null ? void 0 : _b.call(_a, event);\n }\n updateHighlight(model, userGesture) {\n this._lastHighlightedSelector = void 0;\n this._lastHighlightedAriaTemplateJSON = "undefined";\n this._updateHighlight(model, userGesture);\n }\n _updateHighlight(model, userGesture) {\n var _a, _b;\n let tooltipText = model == null ? void 0 : model.tooltipText;\n if (tooltipText === void 0 && (model == null ? void 0 : model.selector))\n tooltipText = this.injectedScript.utils.asLocator(this.state.language, model.selector);\n if (model)\n this.highlight.updateHighlight(model.elements.map((element) => ({ element, color: model.color, tooltipText })));\n else\n this.highlight.clearHighlight();\n if (userGesture)\n (_b = (_a = this._delegate).highlightUpdated) == null ? void 0 : _b.call(_a);\n }\n _ignoreOverlayEvent(event) {\n return event.composedPath().some((e) => {\n const nodeName = e.nodeName || "";\n return nodeName.toLowerCase() === "x-pw-glass";\n });\n }\n deepEventTarget(event) {\n var _a;\n for (const element of event.composedPath()) {\n if (!((_a = this.overlay) == null ? void 0 : _a.contains(element)))\n return element;\n }\n return event.composedPath()[0];\n }\n setMode(mode) {\n var _a, _b;\n void ((_b = (_a = this._delegate).setMode) == null ? void 0 : _b.call(_a, mode));\n }\n _captureAutoExpectSnapshot() {\n const documentElement = this.injectedScript.document.documentElement;\n return documentElement ? this.injectedScript.utils.generateAriaTree(documentElement, { mode: "autoexpect" }) : void 0;\n }\n async performAction(action) {\n var _a, _b, _c;\n const previousSnapshot = this._lastActionAutoexpectSnapshot;\n this._lastActionAutoexpectSnapshot = this._captureAutoExpectSnapshot();\n if (!isAssertAction(action) && this._lastActionAutoexpectSnapshot) {\n const element = this.injectedScript.utils.findNewElement(previousSnapshot == null ? void 0 : previousSnapshot.root, (_a = this._lastActionAutoexpectSnapshot) == null ? void 0 : _a.root);\n action.preconditionSelector = element ? this.injectedScript.generateSelector(element, { testIdAttributeName: this.state.testIdAttributeName }).selector : void 0;\n if (action.preconditionSelector === action.selector)\n action.preconditionSelector = void 0;\n }\n await ((_c = (_b = this._delegate).performAction) == null ? void 0 : _c.call(_b, action).catch(() => {\n }));\n }\n recordAction(action) {\n var _a, _b;\n this._lastActionAutoexpectSnapshot = this._captureAutoExpectSnapshot();\n void ((_b = (_a = this._delegate).recordAction) == null ? void 0 : _b.call(_a, action));\n }\n setOverlayState(state) {\n var _a, _b;\n void ((_b = (_a = this._delegate).setOverlayState) == null ? void 0 : _b.call(_a, state));\n }\n elementPicked(selector, model) {\n var _a, _b;\n const ariaSnapshot = this.injectedScript.ariaSnapshot(model.elements[0], { mode: "expect" });\n void ((_b = (_a = this._delegate).elementPicked) == null ? void 0 : _b.call(_a, { selector, ariaSnapshot }));\n }\n};\nvar Dialog = class {\n constructor(recorder) {\n this._dialogElement = null;\n this._recorder = recorder;\n }\n isShowing() {\n return !!this._dialogElement;\n }\n show(options) {\n const acceptButton = this._recorder.document.createElement("x-pw-tool-item");\n acceptButton.title = "Accept";\n acceptButton.classList.add("accept");\n acceptButton.appendChild(this._recorder.document.createElement("x-div"));\n acceptButton.addEventListener("click", () => {\n var _a;\n return (_a = options.onCommit) == null ? void 0 : _a.call(options);\n });\n const cancelButton = this._recorder.document.createElement("x-pw-tool-item");\n cancelButton.title = "Close";\n cancelButton.classList.add("cancel");\n cancelButton.appendChild(this._recorder.document.createElement("x-div"));\n cancelButton.addEventListener("click", () => {\n var _a;\n this.close();\n (_a = options.onCancel) == null ? void 0 : _a.call(options);\n });\n this._dialogElement = this._recorder.document.createElement("x-pw-dialog");\n if (options.autosize)\n this._dialogElement.classList.add("autosize");\n this._keyboardListener = (event) => {\n var _a;\n if (event.key === "Escape") {\n this.close();\n (_a = options.onCancel) == null ? void 0 : _a.call(options);\n return;\n }\n if (options.onCommit && event.key === "Enter" && (event.ctrlKey || event.metaKey)) {\n if (this._dialogElement)\n options.onCommit();\n return;\n }\n };\n this._onGlassPaneClickHandler = (event) => {\n var _a;\n this.close();\n (_a = options.onCancel) == null ? void 0 : _a.call(options);\n };\n this._dialogElement.addEventListener("click", (event) => event.stopPropagation());\n const toolbarElement = this._recorder.document.createElement("x-pw-tools-list");\n const labelElement = this._recorder.document.createElement("label");\n labelElement.textContent = options.label;\n toolbarElement.appendChild(labelElement);\n toolbarElement.appendChild(this._recorder.document.createElement("x-spacer"));\n if (options.onCommit)\n toolbarElement.appendChild(acceptButton);\n toolbarElement.appendChild(cancelButton);\n this._dialogElement.appendChild(toolbarElement);\n const bodyElement = this._recorder.document.createElement("x-pw-dialog-body");\n bodyElement.appendChild(options.body);\n this._dialogElement.appendChild(bodyElement);\n this._recorder.highlight.appendChild(this._dialogElement);\n this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler);\n this._recorder.document.addEventListener("keydown", this._keyboardListener, true);\n return this._dialogElement;\n }\n moveTo(top, left) {\n if (!this._dialogElement)\n return;\n this._dialogElement.style.top = top + "px";\n this._dialogElement.style.left = left + "px";\n }\n close() {\n if (!this._dialogElement)\n return;\n this._dialogElement.remove();\n this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler);\n this._recorder.document.removeEventListener("keydown", this._keyboardListener);\n this._dialogElement = null;\n }\n};\nfunction deepActiveElement(document) {\n let activeElement = document.activeElement;\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n activeElement = activeElement.shadowRoot.activeElement;\n return activeElement;\n}\nfunction modifiersForEvent(event) {\n return (event.altKey ? 1 : 0) | (event.ctrlKey ? 2 : 0) | (event.metaKey ? 4 : 0) | (event.shiftKey ? 8 : 0);\n}\nfunction buttonForEvent(event) {\n switch (event.which) {\n case 1:\n return "left";\n case 2:\n return "middle";\n case 3:\n return "right";\n }\n return "left";\n}\nfunction positionForEvent(event) {\n const targetElement = event.target;\n if (targetElement.nodeName !== "CANVAS")\n return;\n return {\n x: event.offsetX,\n y: event.offsetY\n };\n}\nfunction consumeEvent(e) {\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n}\nfunction asCheckbox(node) {\n if (!node || node.nodeName !== "INPUT")\n return null;\n const inputElement = node;\n return ["checkbox", "radio"].includes(inputElement.type) ? inputElement : null;\n}\nfunction isRangeInput(node) {\n if (!node || node.nodeName !== "INPUT")\n return false;\n const inputElement = node;\n return inputElement.type.toLowerCase() === "range";\n}\nfunction addEventListener(target, eventName, listener, useCapture) {\n target.addEventListener(eventName, listener, useCapture);\n const remove = () => {\n target.removeEventListener(eventName, listener, useCapture);\n };\n return remove;\n}\nfunction removeEventListeners(listeners) {\n for (const listener of listeners)\n listener();\n listeners.splice(0, listeners.length);\n}\nfunction entriesForSelectorHighlight(injectedScript, language, selector, ownerDocument) {\n try {\n const parsedSelector = injectedScript.parseSelector(selector);\n const elements = injectedScript.querySelectorAll(parsedSelector, ownerDocument);\n const color = elements.length > 1 ? HighlightColors.multiple : HighlightColors.single;\n const locator = injectedScript.utils.asLocator(language, selector);\n return elements.map((element, index) => {\n const suffix = elements.length > 1 ? ` [${index + 1} of ${elements.length}]` : "";\n return { element, color, tooltipText: locator + suffix };\n });\n } catch (e) {\n return [];\n }\n}\nfunction createSvgElement(doc, { tagName, attrs, children }) {\n const elem = doc.createElementNS("http://www.w3.org/2000/svg", tagName);\n if (attrs) {\n for (const [k, v] of Object.entries(attrs))\n elem.setAttribute(k, v);\n }\n if (children) {\n for (const c of children)\n elem.appendChild(createSvgElement(doc, c));\n }\n return elem;\n}\nfunction isAssertAction(action) {\n return action.name.startsWith("assert");\n}\n\n// packages/injected/src/recorder/pollingRecorder.ts\nvar PollingRecorder = class {\n constructor(injectedScript, options) {\n this._recorder = new Recorder(injectedScript, options);\n this._embedder = injectedScript.window;\n injectedScript.onGlobalListenersRemoved.add(() => this._recorder.installListeners());\n const refreshOverlay = () => {\n this._lastStateJSON = void 0;\n this._pollRecorderMode().catch((e) => console.log(e));\n };\n this._embedder.__pw_refreshOverlay = refreshOverlay;\n refreshOverlay();\n }\n async _pollRecorderMode() {\n const pollPeriod = 1e3;\n if (this._pollRecorderModeTimer)\n this._recorder.injectedScript.utils.builtins.clearTimeout(this._pollRecorderModeTimer);\n const state = await this._embedder.__pw_recorderState().catch(() => null);\n if (!state) {\n this._pollRecorderModeTimer = this._recorder.injectedScript.utils.builtins.setTimeout(() => this._pollRecorderMode(), pollPeriod);\n return;\n }\n const stringifiedState = JSON.stringify(state);\n if (this._lastStateJSON !== stringifiedState) {\n this._lastStateJSON = stringifiedState;\n const win = this._recorder.document.defaultView;\n if (win.top !== win) {\n state.actionPoint = void 0;\n }\n this._recorder.setUIState(state, this);\n }\n this._pollRecorderModeTimer = this._recorder.injectedScript.utils.builtins.setTimeout(() => this._pollRecorderMode(), pollPeriod);\n }\n async performAction(action) {\n await this._embedder.__pw_recorderPerformAction(action);\n }\n async recordAction(action) {\n await this._embedder.__pw_recorderRecordAction(action);\n }\n async elementPicked(elementInfo) {\n await this._embedder.__pw_recorderElementPicked(elementInfo);\n }\n async setMode(mode) {\n await this._embedder.__pw_recorderSetMode(mode);\n }\n async setOverlayState(state) {\n await this._embedder.__pw_recorderSetOverlayState(state);\n }\n};\nvar pollingRecorder_default = PollingRecorder;\n';
25
- // Annotate the CommonJS export names for ESM import in node:
26
- 0 && (module.exports = {
27
- source
28
- });
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var storageScriptSource_exports = {};
20
- __export(storageScriptSource_exports, {
21
- source: () => source
22
- });
23
- module.exports = __toCommonJS(storageScriptSource_exports);
24
- const source = '\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n for (const name in obj) { fn = obj[name]; break; }\n const module = { exports: {} };\n fn(module.exports, module);\n result = module.exports;\n }\n return result;\n }\n};\nvar __export = (target, all) => {for (var name in all) target[name] = all[name];};\nvar __toESM = mod => ({ ...mod, \'default\': mod });\nvar __toCommonJS = mod => ({ ...mod, __esModule: true });\n\n\n// packages/injected/src/storageScript.ts\nvar storageScript_exports = {};\n__export(storageScript_exports, {\n StorageScript: () => StorageScript\n});\nmodule.exports = __toCommonJS(storageScript_exports);\n\n// packages/playwright-core/src/utils/isomorphic/utilityScriptSerializers.ts\nfunction isRegExp(obj) {\n try {\n return obj instanceof RegExp || Object.prototype.toString.call(obj) === "[object RegExp]";\n } catch (error) {\n return false;\n }\n}\nfunction isDate(obj) {\n try {\n return obj instanceof Date || Object.prototype.toString.call(obj) === "[object Date]";\n } catch (error) {\n return false;\n }\n}\nfunction isURL(obj) {\n try {\n return obj instanceof URL || Object.prototype.toString.call(obj) === "[object URL]";\n } catch (error) {\n return false;\n }\n}\nfunction isError(obj) {\n var _a;\n try {\n return obj instanceof Error || obj && ((_a = Object.getPrototypeOf(obj)) == null ? void 0 : _a.name) === "Error";\n } catch (error) {\n return false;\n }\n}\nfunction isTypedArray(obj, constructor) {\n try {\n return obj instanceof constructor || Object.prototype.toString.call(obj) === `[object ${constructor.name}]`;\n } catch (error) {\n return false;\n }\n}\nvar typedArrayConstructors = {\n i8: Int8Array,\n ui8: Uint8Array,\n ui8c: Uint8ClampedArray,\n i16: Int16Array,\n ui16: Uint16Array,\n i32: Int32Array,\n ui32: Uint32Array,\n // TODO: add Float16Array once it\'s in baseline\n f32: Float32Array,\n f64: Float64Array,\n bi64: BigInt64Array,\n bui64: BigUint64Array\n};\nfunction typedArrayToBase64(array) {\n if ("toBase64" in array)\n return array.toBase64();\n const binary = Array.from(new Uint8Array(array.buffer, array.byteOffset, array.byteLength)).map((b) => String.fromCharCode(b)).join("");\n return btoa(binary);\n}\nfunction base64ToTypedArray(base64, TypedArrayConstructor) {\n const binary = atob(base64);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++)\n bytes[i] = binary.charCodeAt(i);\n return new TypedArrayConstructor(bytes.buffer);\n}\nfunction parseEvaluationResultValue(value, handles = [], refs = /* @__PURE__ */ new Map()) {\n if (Object.is(value, void 0))\n return void 0;\n if (typeof value === "object" && value) {\n if ("ref" in value)\n return refs.get(value.ref);\n if ("v" in value) {\n if (value.v === "undefined")\n return void 0;\n if (value.v === "null")\n return null;\n if (value.v === "NaN")\n return NaN;\n if (value.v === "Infinity")\n return Infinity;\n if (value.v === "-Infinity")\n return -Infinity;\n if (value.v === "-0")\n return -0;\n return void 0;\n }\n if ("d" in value) {\n return new Date(value.d);\n }\n if ("u" in value)\n return new URL(value.u);\n if ("bi" in value)\n return BigInt(value.bi);\n if ("e" in value) {\n const error = new Error(value.e.m);\n error.name = value.e.n;\n error.stack = value.e.s;\n return error;\n }\n if ("r" in value)\n return new RegExp(value.r.p, value.r.f);\n if ("a" in value) {\n const result = [];\n refs.set(value.id, result);\n for (const a of value.a)\n result.push(parseEvaluationResultValue(a, handles, refs));\n return result;\n }\n if ("o" in value) {\n const result = {};\n refs.set(value.id, result);\n for (const { k, v } of value.o) {\n if (k === "__proto__")\n continue;\n result[k] = parseEvaluationResultValue(v, handles, refs);\n }\n return result;\n }\n if ("h" in value)\n return handles[value.h];\n if ("ta" in value)\n return base64ToTypedArray(value.ta.b, typedArrayConstructors[value.ta.k]);\n }\n return value;\n}\nfunction serializeAsCallArgument(value, handleSerializer) {\n return serialize(value, handleSerializer, { visited: /* @__PURE__ */ new Map(), lastId: 0 });\n}\nfunction serialize(value, handleSerializer, visitorInfo) {\n if (value && typeof value === "object") {\n if (typeof globalThis.Window === "function" && value instanceof globalThis.Window)\n return "ref: <Window>";\n if (typeof globalThis.Document === "function" && value instanceof globalThis.Document)\n return "ref: <Document>";\n if (typeof globalThis.Node === "function" && value instanceof globalThis.Node)\n return "ref: <Node>";\n }\n return innerSerialize(value, handleSerializer, visitorInfo);\n}\nfunction innerSerialize(value, handleSerializer, visitorInfo) {\n var _a;\n const result = handleSerializer(value);\n if ("fallThrough" in result)\n value = result.fallThrough;\n else\n return result;\n if (typeof value === "symbol")\n return { v: "undefined" };\n if (Object.is(value, void 0))\n return { v: "undefined" };\n if (Object.is(value, null))\n return { v: "null" };\n if (Object.is(value, NaN))\n return { v: "NaN" };\n if (Object.is(value, Infinity))\n return { v: "Infinity" };\n if (Object.is(value, -Infinity))\n return { v: "-Infinity" };\n if (Object.is(value, -0))\n return { v: "-0" };\n if (typeof value === "boolean")\n return value;\n if (typeof value === "number")\n return value;\n if (typeof value === "string")\n return value;\n if (typeof value === "bigint")\n return { bi: value.toString() };\n if (isError(value)) {\n let stack;\n if ((_a = value.stack) == null ? void 0 : _a.startsWith(value.name + ": " + value.message)) {\n stack = value.stack;\n } else {\n stack = `${value.name}: ${value.message}\n${value.stack}`;\n }\n return { e: { n: value.name, m: value.message, s: stack } };\n }\n if (isDate(value))\n return { d: value.toJSON() };\n if (isURL(value))\n return { u: value.toJSON() };\n if (isRegExp(value))\n return { r: { p: value.source, f: value.flags } };\n for (const [k, ctor] of Object.entries(typedArrayConstructors)) {\n if (isTypedArray(value, ctor))\n return { ta: { b: typedArrayToBase64(value), k } };\n }\n const id = visitorInfo.visited.get(value);\n if (id)\n return { ref: id };\n if (Array.isArray(value)) {\n const a = [];\n const id2 = ++visitorInfo.lastId;\n visitorInfo.visited.set(value, id2);\n for (let i = 0; i < value.length; ++i)\n a.push(serialize(value[i], handleSerializer, visitorInfo));\n return { a, id: id2 };\n }\n if (typeof value === "object") {\n const o = [];\n const id2 = ++visitorInfo.lastId;\n visitorInfo.visited.set(value, id2);\n for (const name of Object.keys(value)) {\n let item;\n try {\n item = value[name];\n } catch (e) {\n continue;\n }\n if (name === "toJSON" && typeof item === "function")\n o.push({ k: name, v: { o: [], id: 0 } });\n else\n o.push({ k: name, v: serialize(item, handleSerializer, visitorInfo) });\n }\n let jsonWrapper;\n try {\n if (o.length === 0 && value.toJSON && typeof value.toJSON === "function")\n jsonWrapper = { value: value.toJSON() };\n } catch (e) {\n }\n if (jsonWrapper)\n return innerSerialize(jsonWrapper.value, handleSerializer, visitorInfo);\n return { o, id: id2 };\n }\n}\n\n// packages/injected/src/storageScript.ts\nvar StorageScript = class {\n constructor(isFirefox) {\n this._isFirefox = isFirefox;\n this._global = globalThis;\n }\n _idbRequestToPromise(request) {\n return new Promise((resolve, reject) => {\n request.addEventListener("success", () => resolve(request.result));\n request.addEventListener("error", () => reject(request.error));\n });\n }\n _isPlainObject(v) {\n const ctor = v == null ? void 0 : v.constructor;\n if (this._isFirefox) {\n const constructorImpl = ctor == null ? void 0 : ctor.toString();\n if ((constructorImpl == null ? void 0 : constructorImpl.startsWith("function Object() {")) && (constructorImpl == null ? void 0 : constructorImpl.includes("[native code]")))\n return true;\n }\n return ctor === Object;\n }\n _trySerialize(value) {\n let trivial = true;\n const encoded = serializeAsCallArgument(value, (v) => {\n const isTrivial = this._isPlainObject(v) || Array.isArray(v) || typeof v === "string" || typeof v === "number" || typeof v === "boolean" || Object.is(v, null);\n if (!isTrivial)\n trivial = false;\n return { fallThrough: v };\n });\n if (trivial)\n return { trivial: value };\n return { encoded };\n }\n async _collectDB(dbInfo) {\n if (!dbInfo.name)\n throw new Error("Database name is empty");\n if (!dbInfo.version)\n throw new Error("Database version is unset");\n const db = await this._idbRequestToPromise(indexedDB.open(dbInfo.name));\n if (db.objectStoreNames.length === 0)\n return { name: dbInfo.name, version: dbInfo.version, stores: [] };\n const transaction = db.transaction(db.objectStoreNames, "readonly");\n const stores = await Promise.all([...db.objectStoreNames].map(async (storeName) => {\n const objectStore = transaction.objectStore(storeName);\n const keys = await this._idbRequestToPromise(objectStore.getAllKeys());\n const records = await Promise.all(keys.map(async (key) => {\n const record = {};\n if (objectStore.keyPath === null) {\n const { encoded: encoded2, trivial: trivial2 } = this._trySerialize(key);\n if (trivial2)\n record.key = trivial2;\n else\n record.keyEncoded = encoded2;\n }\n const value = await this._idbRequestToPromise(objectStore.get(key));\n const { encoded, trivial } = this._trySerialize(value);\n if (trivial)\n record.value = trivial;\n else\n record.valueEncoded = encoded;\n return record;\n }));\n const indexes = [...objectStore.indexNames].map((indexName) => {\n const index = objectStore.index(indexName);\n return {\n name: index.name,\n keyPath: typeof index.keyPath === "string" ? index.keyPath : void 0,\n keyPathArray: Array.isArray(index.keyPath) ? index.keyPath : void 0,\n multiEntry: index.multiEntry,\n unique: index.unique\n };\n });\n return {\n name: storeName,\n records,\n indexes,\n autoIncrement: objectStore.autoIncrement,\n keyPath: typeof objectStore.keyPath === "string" ? objectStore.keyPath : void 0,\n keyPathArray: Array.isArray(objectStore.keyPath) ? objectStore.keyPath : void 0\n };\n }));\n return {\n name: dbInfo.name,\n version: dbInfo.version,\n stores\n };\n }\n async collect(recordIndexedDB) {\n const localStorage = Object.keys(this._global.localStorage).map((name) => ({ name, value: this._global.localStorage.getItem(name) }));\n if (!recordIndexedDB)\n return { localStorage };\n try {\n const databases = await this._global.indexedDB.databases();\n const indexedDB2 = await Promise.all(databases.map((db) => this._collectDB(db)));\n return { localStorage, indexedDB: indexedDB2 };\n } catch (e) {\n throw new Error("Unable to serialize IndexedDB: " + e.message);\n }\n }\n async _restoreDB(dbInfo) {\n const openRequest = this._global.indexedDB.open(dbInfo.name, dbInfo.version);\n openRequest.addEventListener("upgradeneeded", () => {\n var _a, _b;\n const db2 = openRequest.result;\n for (const store of dbInfo.stores) {\n const objectStore = db2.createObjectStore(store.name, { autoIncrement: store.autoIncrement, keyPath: (_a = store.keyPathArray) != null ? _a : store.keyPath });\n for (const index of store.indexes)\n objectStore.createIndex(index.name, (_b = index.keyPathArray) != null ? _b : index.keyPath, { unique: index.unique, multiEntry: index.multiEntry });\n }\n });\n const db = await this._idbRequestToPromise(openRequest);\n if (db.objectStoreNames.length === 0)\n return;\n const transaction = db.transaction(db.objectStoreNames, "readwrite");\n await Promise.all(dbInfo.stores.map(async (store) => {\n const objectStore = transaction.objectStore(store.name);\n await Promise.all(store.records.map(async (record) => {\n var _a, _b;\n await this._idbRequestToPromise(\n objectStore.add(\n (_a = record.value) != null ? _a : parseEvaluationResultValue(record.valueEncoded),\n (_b = record.key) != null ? _b : parseEvaluationResultValue(record.keyEncoded)\n )\n );\n }));\n }));\n }\n async restore(originState) {\n var _a, _b, _c;\n const registrations = this._global.navigator.serviceWorker ? await this._global.navigator.serviceWorker.getRegistrations() : [];\n await Promise.all(registrations.map(async (r) => {\n if (!r.installing && !r.waiting && !r.active)\n r.unregister().catch(() => {\n });\n else\n await r.unregister().catch(() => {\n });\n }));\n try {\n for (const db of await ((_b = (_a = this._global.indexedDB).databases) == null ? void 0 : _b.call(_a)) || []) {\n if (db.name)\n this._global.indexedDB.deleteDatabase(db.name);\n }\n await Promise.all(((_c = originState == null ? void 0 : originState.indexedDB) != null ? _c : []).map((dbInfo) => this._restoreDB(dbInfo)));\n } catch (e) {\n throw new Error("Unable to restore IndexedDB: " + e.message);\n }\n this._global.sessionStorage.clear();\n this._global.localStorage.clear();\n for (const { name, value } of (originState == null ? void 0 : originState.localStorage) || [])\n this._global.localStorage.setItem(name, value);\n }\n};\n';
25
- // Annotate the CommonJS export names for ESM import in node:
26
- 0 && (module.exports = {
27
- source
28
- });
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var utilityScriptSource_exports = {};
20
- __export(utilityScriptSource_exports, {
21
- source: () => source
22
- });
23
- module.exports = __toCommonJS(utilityScriptSource_exports);
24
- const source = '\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n for (const name in obj) { fn = obj[name]; break; }\n const module = { exports: {} };\n fn(module.exports, module);\n result = module.exports;\n }\n return result;\n }\n};\nvar __export = (target, all) => {for (var name in all) target[name] = all[name];};\nvar __toESM = mod => ({ ...mod, \'default\': mod });\nvar __toCommonJS = mod => ({ ...mod, __esModule: true });\n\n\n// packages/injected/src/utilityScript.ts\nvar utilityScript_exports = {};\n__export(utilityScript_exports, {\n UtilityScript: () => UtilityScript\n});\nmodule.exports = __toCommonJS(utilityScript_exports);\n\n// packages/playwright-core/src/utils/isomorphic/utilityScriptSerializers.ts\nfunction isRegExp(obj) {\n try {\n return obj instanceof RegExp || Object.prototype.toString.call(obj) === "[object RegExp]";\n } catch (error) {\n return false;\n }\n}\nfunction isDate(obj) {\n try {\n return obj instanceof Date || Object.prototype.toString.call(obj) === "[object Date]";\n } catch (error) {\n return false;\n }\n}\nfunction isURL(obj) {\n try {\n return obj instanceof URL || Object.prototype.toString.call(obj) === "[object URL]";\n } catch (error) {\n return false;\n }\n}\nfunction isError(obj) {\n var _a;\n try {\n return obj instanceof Error || obj && ((_a = Object.getPrototypeOf(obj)) == null ? void 0 : _a.name) === "Error";\n } catch (error) {\n return false;\n }\n}\nfunction isTypedArray(obj, constructor) {\n try {\n return obj instanceof constructor || Object.prototype.toString.call(obj) === `[object ${constructor.name}]`;\n } catch (error) {\n return false;\n }\n}\nvar typedArrayConstructors = {\n i8: Int8Array,\n ui8: Uint8Array,\n ui8c: Uint8ClampedArray,\n i16: Int16Array,\n ui16: Uint16Array,\n i32: Int32Array,\n ui32: Uint32Array,\n // TODO: add Float16Array once it\'s in baseline\n f32: Float32Array,\n f64: Float64Array,\n bi64: BigInt64Array,\n bui64: BigUint64Array\n};\nfunction typedArrayToBase64(array) {\n if ("toBase64" in array)\n return array.toBase64();\n const binary = Array.from(new Uint8Array(array.buffer, array.byteOffset, array.byteLength)).map((b) => String.fromCharCode(b)).join("");\n return btoa(binary);\n}\nfunction base64ToTypedArray(base64, TypedArrayConstructor) {\n const binary = atob(base64);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++)\n bytes[i] = binary.charCodeAt(i);\n return new TypedArrayConstructor(bytes.buffer);\n}\nfunction parseEvaluationResultValue(value, handles = [], refs = /* @__PURE__ */ new Map()) {\n if (Object.is(value, void 0))\n return void 0;\n if (typeof value === "object" && value) {\n if ("ref" in value)\n return refs.get(value.ref);\n if ("v" in value) {\n if (value.v === "undefined")\n return void 0;\n if (value.v === "null")\n return null;\n if (value.v === "NaN")\n return NaN;\n if (value.v === "Infinity")\n return Infinity;\n if (value.v === "-Infinity")\n return -Infinity;\n if (value.v === "-0")\n return -0;\n return void 0;\n }\n if ("d" in value) {\n return new Date(value.d);\n }\n if ("u" in value)\n return new URL(value.u);\n if ("bi" in value)\n return BigInt(value.bi);\n if ("e" in value) {\n const error = new Error(value.e.m);\n error.name = value.e.n;\n error.stack = value.e.s;\n return error;\n }\n if ("r" in value)\n return new RegExp(value.r.p, value.r.f);\n if ("a" in value) {\n const result = [];\n refs.set(value.id, result);\n for (const a of value.a)\n result.push(parseEvaluationResultValue(a, handles, refs));\n return result;\n }\n if ("o" in value) {\n const result = {};\n refs.set(value.id, result);\n for (const { k, v } of value.o) {\n if (k === "__proto__")\n continue;\n result[k] = parseEvaluationResultValue(v, handles, refs);\n }\n return result;\n }\n if ("h" in value)\n return handles[value.h];\n if ("ta" in value)\n return base64ToTypedArray(value.ta.b, typedArrayConstructors[value.ta.k]);\n }\n return value;\n}\nfunction serializeAsCallArgument(value, handleSerializer) {\n return serialize(value, handleSerializer, { visited: /* @__PURE__ */ new Map(), lastId: 0 });\n}\nfunction serialize(value, handleSerializer, visitorInfo) {\n if (value && typeof value === "object") {\n if (typeof globalThis.Window === "function" && value instanceof globalThis.Window)\n return "ref: <Window>";\n if (typeof globalThis.Document === "function" && value instanceof globalThis.Document)\n return "ref: <Document>";\n if (typeof globalThis.Node === "function" && value instanceof globalThis.Node)\n return "ref: <Node>";\n }\n return innerSerialize(value, handleSerializer, visitorInfo);\n}\nfunction innerSerialize(value, handleSerializer, visitorInfo) {\n var _a;\n const result = handleSerializer(value);\n if ("fallThrough" in result)\n value = result.fallThrough;\n else\n return result;\n if (typeof value === "symbol")\n return { v: "undefined" };\n if (Object.is(value, void 0))\n return { v: "undefined" };\n if (Object.is(value, null))\n return { v: "null" };\n if (Object.is(value, NaN))\n return { v: "NaN" };\n if (Object.is(value, Infinity))\n return { v: "Infinity" };\n if (Object.is(value, -Infinity))\n return { v: "-Infinity" };\n if (Object.is(value, -0))\n return { v: "-0" };\n if (typeof value === "boolean")\n return value;\n if (typeof value === "number")\n return value;\n if (typeof value === "string")\n return value;\n if (typeof value === "bigint")\n return { bi: value.toString() };\n if (isError(value)) {\n let stack;\n if ((_a = value.stack) == null ? void 0 : _a.startsWith(value.name + ": " + value.message)) {\n stack = value.stack;\n } else {\n stack = `${value.name}: ${value.message}\n${value.stack}`;\n }\n return { e: { n: value.name, m: value.message, s: stack } };\n }\n if (isDate(value))\n return { d: value.toJSON() };\n if (isURL(value))\n return { u: value.toJSON() };\n if (isRegExp(value))\n return { r: { p: value.source, f: value.flags } };\n for (const [k, ctor] of Object.entries(typedArrayConstructors)) {\n if (isTypedArray(value, ctor))\n return { ta: { b: typedArrayToBase64(value), k } };\n }\n const id = visitorInfo.visited.get(value);\n if (id)\n return { ref: id };\n if (Array.isArray(value)) {\n const a = [];\n const id2 = ++visitorInfo.lastId;\n visitorInfo.visited.set(value, id2);\n for (let i = 0; i < value.length; ++i)\n a.push(serialize(value[i], handleSerializer, visitorInfo));\n return { a, id: id2 };\n }\n if (typeof value === "object") {\n const o = [];\n const id2 = ++visitorInfo.lastId;\n visitorInfo.visited.set(value, id2);\n for (const name of Object.keys(value)) {\n let item;\n try {\n item = value[name];\n } catch (e) {\n continue;\n }\n if (name === "toJSON" && typeof item === "function")\n o.push({ k: name, v: { o: [], id: 0 } });\n else\n o.push({ k: name, v: serialize(item, handleSerializer, visitorInfo) });\n }\n let jsonWrapper;\n try {\n if (o.length === 0 && value.toJSON && typeof value.toJSON === "function")\n jsonWrapper = { value: value.toJSON() };\n } catch (e) {\n }\n if (jsonWrapper)\n return innerSerialize(jsonWrapper.value, handleSerializer, visitorInfo);\n return { o, id: id2 };\n }\n}\n\n// packages/injected/src/utilityScript.ts\nvar UtilityScript = class {\n constructor(global, isUnderTest) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n this.global = global;\n this.isUnderTest = isUnderTest;\n if (global.__pwClock) {\n this.builtins = global.__pwClock.builtins;\n } else {\n this.builtins = {\n setTimeout: (_a = global.setTimeout) == null ? void 0 : _a.bind(global),\n clearTimeout: (_b = global.clearTimeout) == null ? void 0 : _b.bind(global),\n setInterval: (_c = global.setInterval) == null ? void 0 : _c.bind(global),\n clearInterval: (_d = global.clearInterval) == null ? void 0 : _d.bind(global),\n requestAnimationFrame: (_e = global.requestAnimationFrame) == null ? void 0 : _e.bind(global),\n cancelAnimationFrame: (_f = global.cancelAnimationFrame) == null ? void 0 : _f.bind(global),\n requestIdleCallback: (_g = global.requestIdleCallback) == null ? void 0 : _g.bind(global),\n cancelIdleCallback: (_h = global.cancelIdleCallback) == null ? void 0 : _h.bind(global),\n performance: global.performance,\n Intl: global.Intl,\n Date: global.Date\n };\n }\n if (this.isUnderTest)\n global.builtins = this.builtins;\n }\n evaluate(isFunction, returnByValue, expression, argCount, ...argsAndHandles) {\n const args = argsAndHandles.slice(0, argCount);\n const handles = argsAndHandles.slice(argCount);\n const parameters = [];\n for (let i = 0; i < args.length; i++)\n parameters[i] = parseEvaluationResultValue(args[i], handles);\n let result = this.global.eval(expression);\n if (isFunction === true) {\n result = result(...parameters);\n } else if (isFunction === false) {\n result = result;\n } else {\n if (typeof result === "function")\n result = result(...parameters);\n }\n return returnByValue ? this._promiseAwareJsonValueNoThrow(result) : result;\n }\n jsonValue(returnByValue, value) {\n if (value === void 0)\n return void 0;\n return serializeAsCallArgument(value, (value2) => ({ fallThrough: value2 }));\n }\n _promiseAwareJsonValueNoThrow(value) {\n const safeJson = (value2) => {\n try {\n return this.jsonValue(true, value2);\n } catch (e) {\n return void 0;\n }\n };\n if (value && typeof value === "object" && typeof value.then === "function") {\n return (async () => {\n const promiseValue = await value;\n return safeJson(promiseValue);\n })();\n }\n return safeJson(value);\n }\n};\n';
25
- // Annotate the CommonJS export names for ESM import in node:
26
- 0 && (module.exports = {
27
- source
28
- });