@checkly/playwright-core 1.51.17-beta.2 → 1.54.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/ThirdPartyNotices.txt +65 -123
  2. package/browsers.json +16 -14
  3. package/index.js +1 -1
  4. package/lib/androidServerImpl.js +47 -50
  5. package/lib/browserServerImpl.js +89 -69
  6. package/lib/checkly/escapeRegExp.js +23 -27
  7. package/lib/checkly/fetch.js +64 -46
  8. package/lib/checkly/secretsFilter.js +49 -35
  9. package/lib/cli/driver.js +71 -69
  10. package/lib/cli/program.js +400 -359
  11. package/lib/cli/programWithTestStub.js +51 -45
  12. package/lib/client/accessibility.js +31 -32
  13. package/lib/client/android.js +151 -242
  14. package/lib/client/api.js +135 -283
  15. package/lib/client/artifact.js +39 -36
  16. package/lib/client/browser.js +96 -71
  17. package/lib/client/browserContext.js +314 -345
  18. package/lib/client/browserType.js +103 -127
  19. package/lib/client/cdpSession.js +29 -31
  20. package/lib/client/channelOwner.js +90 -113
  21. package/lib/client/clientHelper.js +48 -39
  22. package/lib/client/clientInstrumentation.js +40 -37
  23. package/lib/client/clientStackTrace.js +41 -37
  24. package/lib/client/clock.js +36 -36
  25. package/lib/client/connection.js +188 -214
  26. package/lib/client/consoleMessage.js +31 -28
  27. package/lib/client/coverage.js +25 -22
  28. package/lib/client/dialog.js +30 -31
  29. package/lib/client/download.js +25 -25
  30. package/lib/client/electron.js +80 -77
  31. package/lib/client/elementHandle.js +120 -159
  32. package/lib/client/errors.js +53 -53
  33. package/lib/client/eventEmitter.js +124 -121
  34. package/lib/client/events.js +72 -68
  35. package/lib/client/fetch.js +166 -190
  36. package/lib/client/fileChooser.js +25 -24
  37. package/lib/client/fileUtils.js +31 -28
  38. package/lib/client/frame.js +207 -306
  39. package/lib/client/harRouter.js +42 -52
  40. package/lib/client/input.js +42 -69
  41. package/lib/client/jsHandle.js +54 -69
  42. package/lib/client/jsonPipe.js +27 -23
  43. package/lib/client/localUtils.js +29 -29
  44. package/lib/client/locator.js +145 -237
  45. package/lib/client/network.js +282 -307
  46. package/lib/client/page.js +269 -318
  47. package/lib/client/platform.js +46 -43
  48. package/lib/client/playwright.js +51 -76
  49. package/lib/client/selectors.js +45 -63
  50. package/lib/client/stream.js +29 -25
  51. package/lib/client/timeoutSettings.js +55 -41
  52. package/lib/client/tracing.js +49 -96
  53. package/lib/client/types.js +26 -22
  54. package/lib/client/video.js +35 -27
  55. package/lib/client/waiter.js +69 -88
  56. package/lib/client/webError.js +25 -23
  57. package/lib/client/webSocket.js +43 -56
  58. package/lib/client/worker.js +48 -56
  59. package/lib/client/writableStream.js +27 -23
  60. package/lib/generated/bindingsControllerSource.js +28 -0
  61. package/lib/generated/clockSource.js +26 -6
  62. package/lib/generated/consoleApiSource.js +26 -6
  63. package/lib/generated/injectedScriptSource.js +26 -6
  64. package/lib/generated/pollingRecorderSource.js +26 -6
  65. package/lib/generated/storageScriptSource.js +28 -0
  66. package/lib/generated/utilityScriptSource.js +26 -6
  67. package/lib/generated/webSocketMockSource.js +333 -5
  68. package/lib/inProcessFactory.js +51 -53
  69. package/lib/inprocess.js +2 -19
  70. package/lib/outofprocess.js +51 -46
  71. package/lib/protocol/serializers.js +153 -134
  72. package/lib/protocol/validator.js +2807 -2739
  73. package/lib/protocol/validatorPrimitives.js +114 -73
  74. package/lib/remote/playwrightConnection.js +88 -242
  75. package/lib/remote/playwrightServer.js +305 -92
  76. package/lib/server/accessibility.js +44 -37
  77. package/lib/server/android/android.js +251 -241
  78. package/lib/server/android/backendAdb.js +87 -82
  79. package/lib/server/artifact.js +78 -55
  80. package/lib/server/bidi/bidiBrowser.js +297 -158
  81. package/lib/server/bidi/bidiChromium.js +119 -89
  82. package/lib/server/bidi/bidiConnection.js +66 -83
  83. package/lib/server/bidi/bidiExecutionContext.js +129 -113
  84. package/lib/server/bidi/bidiFirefox.js +86 -76
  85. package/lib/server/bidi/bidiInput.js +106 -117
  86. package/lib/server/bidi/bidiNetworkManager.js +142 -159
  87. package/lib/server/bidi/bidiOverCdp.js +57 -58
  88. package/lib/server/bidi/bidiPage.js +260 -260
  89. package/lib/server/bidi/bidiPdf.js +52 -86
  90. package/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
  91. package/lib/server/bidi/third_party/bidiDeserializer.js +55 -50
  92. package/lib/server/bidi/third_party/bidiKeyboard.js +236 -220
  93. package/lib/server/bidi/third_party/bidiProtocol.js +22 -137
  94. package/lib/server/bidi/third_party/bidiProtocolCore.js +152 -0
  95. package/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
  96. package/lib/server/bidi/third_party/bidiSerializer.js +67 -63
  97. package/lib/server/bidi/third_party/firefoxPrefs.js +141 -119
  98. package/lib/server/browser.js +93 -95
  99. package/lib/server/browserContext.js +419 -429
  100. package/lib/server/browserType.js +186 -216
  101. package/lib/server/callLog.js +47 -44
  102. package/lib/server/chromium/chromium.js +235 -203
  103. package/lib/server/chromium/chromiumSwitches.js +100 -67
  104. package/lib/server/chromium/crAccessibility.js +157 -131
  105. package/lib/server/chromium/crBrowser.js +310 -292
  106. package/lib/server/chromium/crConnection.js +95 -121
  107. package/lib/server/chromium/crCoverage.js +121 -131
  108. package/lib/server/chromium/crDevTools.js +60 -51
  109. package/lib/server/chromium/crDragDrop.js +68 -84
  110. package/lib/server/chromium/crExecutionContext.js +89 -83
  111. package/lib/server/chromium/crInput.js +118 -113
  112. package/lib/server/chromium/crNetworkManager.js +274 -375
  113. package/lib/server/chromium/crPage.js +536 -593
  114. package/lib/server/chromium/crPdf.js +54 -86
  115. package/lib/server/chromium/crProtocolHelper.js +92 -80
  116. package/lib/server/chromium/crServiceWorker.js +84 -73
  117. package/lib/server/chromium/defaultFontFamilies.js +152 -135
  118. package/lib/server/chromium/protocol.d.js +16 -0
  119. package/lib/server/chromium/videoRecorder.js +66 -99
  120. package/lib/server/clock.js +107 -83
  121. package/lib/server/codegen/csharp.js +192 -162
  122. package/lib/server/codegen/java.js +156 -129
  123. package/lib/server/codegen/javascript.js +163 -148
  124. package/lib/server/codegen/jsonl.js +32 -28
  125. package/lib/server/codegen/language.js +75 -52
  126. package/lib/server/codegen/languages.js +65 -27
  127. package/lib/server/codegen/python.js +141 -126
  128. package/lib/server/codegen/types.js +15 -4
  129. package/lib/server/console.js +28 -32
  130. package/lib/server/cookieStore.js +108 -86
  131. package/lib/server/debugController.js +147 -151
  132. package/lib/server/debugger.js +86 -78
  133. package/lib/server/deviceDescriptors.js +37 -24
  134. package/lib/server/deviceDescriptorsSource.json +238 -128
  135. package/lib/server/dialog.js +84 -39
  136. package/lib/server/dispatchers/androidDispatcher.js +257 -148
  137. package/lib/server/dispatchers/artifactDispatcher.js +79 -79
  138. package/lib/server/dispatchers/browserContextDispatcher.js +289 -259
  139. package/lib/server/dispatchers/browserDispatcher.js +96 -148
  140. package/lib/server/dispatchers/browserTypeDispatcher.js +50 -41
  141. package/lib/server/dispatchers/cdpSessionDispatcher.js +35 -39
  142. package/lib/server/dispatchers/debugControllerDispatcher.js +65 -83
  143. package/lib/server/dispatchers/dialogDispatcher.js +34 -31
  144. package/lib/server/dispatchers/dispatcher.js +208 -248
  145. package/lib/server/dispatchers/electronDispatcher.js +66 -70
  146. package/lib/server/dispatchers/elementHandlerDispatcher.js +164 -216
  147. package/lib/server/dispatchers/frameDispatcher.js +211 -272
  148. package/lib/server/dispatchers/jsHandleDispatcher.js +63 -75
  149. package/lib/server/dispatchers/jsonPipeDispatcher.js +37 -38
  150. package/lib/server/dispatchers/localUtilsDispatcher.js +121 -119
  151. package/lib/server/dispatchers/networkDispatchers.js +117 -128
  152. package/lib/server/dispatchers/pageDispatcher.js +256 -248
  153. package/lib/server/dispatchers/playwrightDispatcher.js +92 -87
  154. package/lib/server/dispatchers/streamDispatcher.js +52 -48
  155. package/lib/server/dispatchers/tracingDispatcher.js +47 -52
  156. package/lib/server/dispatchers/webSocketRouteDispatcher.js +126 -150
  157. package/lib/server/dispatchers/writableStreamDispatcher.js +65 -43
  158. package/lib/server/dom.js +485 -582
  159. package/lib/server/download.js +47 -37
  160. package/lib/server/electron/electron.js +216 -243
  161. package/lib/server/electron/loader.js +9 -37
  162. package/lib/server/errors.js +47 -46
  163. package/lib/server/fetch.js +317 -360
  164. package/lib/server/fileChooser.js +25 -24
  165. package/lib/server/fileUploadUtils.js +66 -60
  166. package/lib/server/firefox/ffAccessibility.js +153 -131
  167. package/lib/server/firefox/ffBrowser.js +268 -305
  168. package/lib/server/firefox/ffConnection.js +63 -84
  169. package/lib/server/firefox/ffExecutionContext.js +92 -73
  170. package/lib/server/firefox/ffInput.js +82 -84
  171. package/lib/server/firefox/ffNetworkManager.js +137 -114
  172. package/lib/server/firefox/ffPage.js +261 -293
  173. package/lib/server/firefox/firefox.js +80 -72
  174. package/lib/server/firefox/protocol.d.js +16 -0
  175. package/lib/server/formData.js +107 -35
  176. package/lib/server/frameSelectors.js +98 -114
  177. package/lib/server/frames.js +845 -1055
  178. package/lib/server/har/harRecorder.js +85 -77
  179. package/lib/server/har/harTracer.js +290 -223
  180. package/lib/server/harBackend.js +80 -80
  181. package/lib/server/helper.js +55 -59
  182. package/lib/server/index.js +59 -99
  183. package/lib/server/input.js +151 -189
  184. package/lib/server/instrumentation.js +57 -44
  185. package/lib/server/javascript.js +133 -134
  186. package/lib/server/launchApp.js +113 -75
  187. package/lib/server/localUtils.js +150 -142
  188. package/lib/server/macEditingCommands.js +141 -137
  189. package/lib/server/network.js +299 -303
  190. package/lib/server/page.js +513 -544
  191. package/lib/server/pipeTransport.js +49 -45
  192. package/lib/server/playwright.js +58 -67
  193. package/lib/server/progress.js +137 -68
  194. package/lib/server/protocolError.js +34 -31
  195. package/lib/server/recorder/chat.js +70 -86
  196. package/lib/server/recorder/recorderApp.js +341 -176
  197. package/lib/server/recorder/recorderInTraceViewer.js +65 -94
  198. package/lib/server/recorder/recorderRunner.js +93 -116
  199. package/lib/server/recorder/recorderSignalProcessor.js +83 -0
  200. package/lib/server/recorder/recorderUtils.js +104 -47
  201. package/lib/server/recorder/throttledFile.js +42 -30
  202. package/lib/server/recorder.js +395 -275
  203. package/lib/server/registry/browserFetcher.js +106 -101
  204. package/lib/server/registry/dependencies.js +245 -196
  205. package/lib/server/registry/index.js +930 -803
  206. package/lib/server/registry/nativeDeps.js +1073 -464
  207. package/lib/server/registry/oopDownloadBrowserMain.js +57 -75
  208. package/lib/server/screenshotter.js +160 -191
  209. package/lib/server/selectors.js +90 -51
  210. package/lib/server/socksClientCertificatesInterceptor.js +171 -186
  211. package/lib/server/socksInterceptor.js +62 -70
  212. package/lib/server/trace/recorder/snapshotter.js +76 -102
  213. package/lib/server/trace/recorder/snapshotterInjected.js +238 -217
  214. package/lib/server/trace/recorder/tracing.js +354 -362
  215. package/lib/server/trace/test/inMemorySnapshotter.js +46 -52
  216. package/lib/server/trace/viewer/traceViewer.js +160 -147
  217. package/lib/server/transport.js +119 -134
  218. package/lib/server/types.js +26 -22
  219. package/lib/server/usKeyboardLayout.js +135 -545
  220. package/lib/server/utils/ascii.js +39 -26
  221. package/lib/server/utils/comparators.js +105 -103
  222. package/lib/server/utils/crypto.js +157 -112
  223. package/lib/server/utils/debug.js +36 -32
  224. package/lib/server/utils/debugLogger.js +77 -48
  225. package/lib/server/utils/env.js +52 -37
  226. package/lib/server/utils/eventsHelper.js +29 -28
  227. package/lib/server/utils/expectUtils.js +31 -26
  228. package/lib/server/utils/fileUtils.js +123 -136
  229. package/lib/server/utils/happyEyeballs.js +141 -126
  230. package/lib/server/utils/hostPlatform.js +84 -120
  231. package/lib/server/utils/httpServer.js +106 -121
  232. package/lib/server/utils/image_tools/colorUtils.js +42 -51
  233. package/lib/server/utils/image_tools/compare.js +44 -43
  234. package/lib/server/utils/image_tools/imageChannel.js +38 -30
  235. package/lib/server/utils/image_tools/stats.js +40 -40
  236. package/lib/server/utils/linuxUtils.js +50 -37
  237. package/lib/server/utils/network.js +152 -96
  238. package/lib/server/utils/nodePlatform.js +87 -79
  239. package/lib/server/utils/pipeTransport.js +44 -42
  240. package/lib/server/utils/processLauncher.js +111 -121
  241. package/lib/server/utils/profiler.js +52 -39
  242. package/lib/server/utils/socksProxy.js +280 -339
  243. package/lib/server/utils/spawnAsync.js +37 -41
  244. package/lib/server/utils/task.js +31 -38
  245. package/lib/server/utils/userAgent.js +73 -66
  246. package/lib/server/utils/wsServer.js +68 -75
  247. package/lib/server/utils/zipFile.js +36 -37
  248. package/lib/server/utils/zones.js +37 -34
  249. package/lib/server/webkit/protocol.d.js +16 -0
  250. package/lib/server/webkit/webkit.js +77 -61
  251. package/lib/server/webkit/wkAccessibility.js +161 -118
  252. package/lib/server/webkit/wkBrowser.js +193 -184
  253. package/lib/server/webkit/wkConnection.js +59 -83
  254. package/lib/server/webkit/wkExecutionContext.js +85 -70
  255. package/lib/server/webkit/wkInput.js +97 -95
  256. package/lib/server/webkit/wkInterceptableRequest.js +102 -95
  257. package/lib/server/webkit/wkPage.js +568 -667
  258. package/lib/server/webkit/wkProvisionalPage.js +45 -56
  259. package/lib/server/webkit/wkWorkers.js +79 -79
  260. package/lib/utils/expectUtils.js +31 -26
  261. package/lib/utils/isomorphic/ariaSnapshot.js +149 -152
  262. package/lib/utils/isomorphic/assert.js +28 -22
  263. package/lib/utils/isomorphic/colors.js +66 -59
  264. package/lib/utils/isomorphic/cssParser.js +120 -125
  265. package/lib/utils/isomorphic/cssTokenizer.js +436 -364
  266. package/lib/utils/isomorphic/headers.js +38 -37
  267. package/lib/utils/isomorphic/locatorGenerators.js +358 -357
  268. package/lib/utils/isomorphic/locatorParser.js +96 -105
  269. package/lib/utils/isomorphic/locatorUtils.js +63 -44
  270. package/lib/utils/isomorphic/manualPromise.js +46 -39
  271. package/lib/utils/isomorphic/mimeType.js +447 -25
  272. package/lib/utils/isomorphic/multimap.js +34 -27
  273. package/lib/utils/isomorphic/protocolFormatter.js +68 -0
  274. package/lib/utils/isomorphic/protocolMetainfo.js +321 -0
  275. package/lib/utils/isomorphic/recorderUtils.js +140 -181
  276. package/lib/utils/isomorphic/rtti.js +35 -33
  277. package/lib/utils/isomorphic/selectorParser.js +182 -193
  278. package/lib/utils/isomorphic/semaphore.js +27 -24
  279. package/lib/utils/isomorphic/stackTrace.js +87 -98
  280. package/lib/utils/isomorphic/stringUtils.js +98 -112
  281. package/lib/utils/isomorphic/time.js +46 -22
  282. package/lib/utils/isomorphic/timeoutRunner.js +53 -53
  283. package/lib/utils/isomorphic/traceUtils.js +37 -41
  284. package/lib/utils/isomorphic/types.js +15 -4
  285. package/lib/utils/isomorphic/urlMatch.js +113 -67
  286. package/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
  287. package/lib/utils.js +101 -443
  288. package/lib/utilsBundle.js +101 -52
  289. package/lib/utilsBundleImpl/index.js +160 -150
  290. package/lib/zipBundle.js +32 -23
  291. package/lib/zipBundleImpl.js +4 -4
  292. package/package.json +1 -1
  293. package/types/protocol.d.ts +1267 -1057
  294. package/types/types.d.ts +131 -29
  295. package/lib/common/socksProxy.js +0 -569
  296. package/lib/common/timeoutSettings.js +0 -73
  297. package/lib/common/types.js +0 -5
  298. package/lib/image_tools/colorUtils.js +0 -98
  299. package/lib/image_tools/compare.js +0 -108
  300. package/lib/image_tools/imageChannel.js +0 -70
  301. package/lib/image_tools/stats.js +0 -102
  302. package/lib/protocol/debug.js +0 -27
  303. package/lib/protocol/transport.js +0 -82
  304. package/lib/server/dispatchers/selectorsDispatcher.js +0 -36
  305. package/lib/server/isomorphic/utilityScriptSerializers.js +0 -229
  306. package/lib/server/recorder/contextRecorder.js +0 -290
  307. package/lib/server/recorder/recorderCollection.js +0 -104
  308. package/lib/server/recorder/recorderFrontend.js +0 -5
  309. package/lib/server/storageScript.js +0 -160
  310. package/lib/server/timeoutSettings.js +0 -74
  311. package/lib/third_party/diff_match_patch.js +0 -2222
  312. package/lib/utils/ascii.js +0 -31
  313. package/lib/utils/comparators.js +0 -171
  314. package/lib/utils/crypto.js +0 -174
  315. package/lib/utils/debug.js +0 -46
  316. package/lib/utils/debugLogger.js +0 -91
  317. package/lib/utils/env.js +0 -49
  318. package/lib/utils/eventsHelper.js +0 -38
  319. package/lib/utils/fileUtils.js +0 -205
  320. package/lib/utils/happy-eyeballs.js +0 -210
  321. package/lib/utils/headers.js +0 -52
  322. package/lib/utils/hostPlatform.js +0 -133
  323. package/lib/utils/httpServer.js +0 -237
  324. package/lib/utils/index.js +0 -368
  325. package/lib/utils/linuxUtils.js +0 -78
  326. package/lib/utils/manualPromise.js +0 -109
  327. package/lib/utils/multimap.js +0 -75
  328. package/lib/utils/network.js +0 -160
  329. package/lib/utils/processLauncher.js +0 -248
  330. package/lib/utils/profiler.js +0 -53
  331. package/lib/utils/rtti.js +0 -44
  332. package/lib/utils/semaphore.js +0 -51
  333. package/lib/utils/spawnAsync.js +0 -45
  334. package/lib/utils/stackTrace.js +0 -121
  335. package/lib/utils/task.js +0 -58
  336. package/lib/utils/time.js +0 -37
  337. package/lib/utils/timeoutRunner.js +0 -66
  338. package/lib/utils/traceUtils.js +0 -44
  339. package/lib/utils/userAgent.js +0 -105
  340. package/lib/utils/wsServer.js +0 -127
  341. package/lib/utils/zipFile.js +0 -75
  342. package/lib/utils/zones.js +0 -62
  343. package/lib/vite/htmlReport/index.html +0 -69
  344. package/lib/vite/recorder/assets/codeMirrorModule-B9YMkrwa.js +0 -24
  345. package/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +0 -1
  346. package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  347. package/lib/vite/recorder/assets/index-ELPgmkwA.js +0 -184
  348. package/lib/vite/recorder/assets/index-eHBmevrY.css +0 -1
  349. package/lib/vite/recorder/index.html +0 -29
  350. package/lib/vite/recorder/playwright-logo.svg +0 -9
  351. package/lib/vite/traceViewer/assets/codeMirrorModule-gU1OOCQO.js +0 -24
  352. package/lib/vite/traceViewer/assets/defaultSettingsView-B5n_FjMx.js +0 -1
  353. package/lib/vite/traceViewer/assets/inspectorTab-6Tru8Mn_.js +0 -235
  354. package/lib/vite/traceViewer/assets/workbench-B_Nj4NA2.js +0 -25
  355. package/lib/vite/traceViewer/assets/xtermModule-BoAIEibi.js +0 -9
  356. package/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +0 -1
  357. package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  358. package/lib/vite/traceViewer/defaultSettingsView.CO3FR0CX.css +0 -1
  359. package/lib/vite/traceViewer/embedded.DpNPH6mk.js +0 -2
  360. package/lib/vite/traceViewer/embedded.html +0 -18
  361. package/lib/vite/traceViewer/embedded.mLhjB5IF.css +0 -1
  362. package/lib/vite/traceViewer/index.CFOW-Ezb.css +0 -1
  363. package/lib/vite/traceViewer/index.CuE3SYGw.js +0 -2
  364. package/lib/vite/traceViewer/index.html +0 -47
  365. package/lib/vite/traceViewer/inspectorTab.CXDulcFG.css +0 -1
  366. package/lib/vite/traceViewer/playwright-logo.svg +0 -9
  367. package/lib/vite/traceViewer/recorder.BD-uZJs7.js +0 -2
  368. package/lib/vite/traceViewer/recorder.html +0 -17
  369. package/lib/vite/traceViewer/recorder.tn0RQdqM.css +0 -0
  370. package/lib/vite/traceViewer/snapshot.html +0 -21
  371. package/lib/vite/traceViewer/sw.bundle.js +0 -3
  372. package/lib/vite/traceViewer/uiMode.BatfzHMG.css +0 -1
  373. package/lib/vite/traceViewer/uiMode.DHrNgddz.js +0 -5
  374. package/lib/vite/traceViewer/uiMode.html +0 -21
  375. package/lib/vite/traceViewer/workbench.B9vIAzH9.css +0 -1
  376. package/lib/vite/traceViewer/xtermModule.Beg8tuEN.css +0 -32
@@ -1,235 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-gU1OOCQO.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
2
- var kv=Object.defineProperty;var xv=(n,e,t)=>e in n?kv(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var we=(n,e,t)=>xv(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function t(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=t(o);fetch(o.href,l)}})();function bv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Nu={exports:{}},Ys={},Au={exports:{}},ae={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var Qh;function Tv(){if(Qh)return ae;Qh=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=y&&N[y]||N["@@iterator"],typeof N=="function"?N:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function E(N,F,le){this.props=N,this.context=F,this.refs=_,this.updater=le||S}E.prototype.isReactComponent={},E.prototype.setState=function(N,F){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,F,"setState")},E.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function L(){}L.prototype=E.prototype;function O(N,F,le){this.props=N,this.context=F,this.refs=_,this.updater=le||S}var P=O.prototype=new L;P.constructor=O,x(P,E.prototype),P.isPureReactComponent=!0;var D=Array.isArray,V=Object.prototype.hasOwnProperty,U={current:null},Z={key:!0,ref:!0,__self:!0,__source:!0};function H(N,F,le){var ce,he={},pe=null,Se=null;if(F!=null)for(ce in F.ref!==void 0&&(Se=F.ref),F.key!==void 0&&(pe=""+F.key),F)V.call(F,ce)&&!Z.hasOwnProperty(ce)&&(he[ce]=F[ce]);var me=arguments.length-2;if(me===1)he.children=le;else if(1<me){for(var Te=Array(me),xt=0;xt<me;xt++)Te[xt]=arguments[xt+2];he.children=Te}if(N&&N.defaultProps)for(ce in me=N.defaultProps,me)he[ce]===void 0&&(he[ce]=me[ce]);return{$$typeof:n,type:N,key:pe,ref:Se,props:he,_owner:U.current}}function M(N,F){return{$$typeof:n,type:N.type,key:F,ref:N.ref,props:N.props,_owner:N._owner}}function ue(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function fe(N){var F={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(le){return F[le]})}var R=/\/+/g;function ee(N,F){return typeof N=="object"&&N!==null&&N.key!=null?fe(""+N.key):F.toString(36)}function Ee(N,F,le,ce,he){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var Se=!1;if(N===null)Se=!0;else switch(pe){case"string":case"number":Se=!0;break;case"object":switch(N.$$typeof){case n:case e:Se=!0}}if(Se)return Se=N,he=he(Se),N=ce===""?"."+ee(Se,0):ce,D(he)?(le="",N!=null&&(le=N.replace(R,"$&/")+"/"),Ee(he,F,le,"",function(xt){return xt})):he!=null&&(ue(he)&&(he=M(he,le+(!he.key||Se&&Se.key===he.key?"":(""+he.key).replace(R,"$&/")+"/")+N)),F.push(he)),1;if(Se=0,ce=ce===""?".":ce+":",D(N))for(var me=0;me<N.length;me++){pe=N[me];var Te=ce+ee(pe,me);Se+=Ee(pe,F,le,Te,he)}else if(Te=v(N),typeof Te=="function")for(N=Te.call(N),me=0;!(pe=N.next()).done;)pe=pe.value,Te=ce+ee(pe,me++),Se+=Ee(pe,F,le,Te,he);else if(pe==="object")throw F=String(N),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return Se}function ft(N,F,le){if(N==null)return N;var ce=[],he=0;return Ee(N,ce,"","",function(pe){return F.call(le,pe,he++)}),ce}function Xe(N){if(N._status===-1){var F=N._result;F=F(),F.then(function(le){(N._status===0||N._status===-1)&&(N._status=1,N._result=le)},function(le){(N._status===0||N._status===-1)&&(N._status=2,N._result=le)}),N._status===-1&&(N._status=0,N._result=F)}if(N._status===1)return N._result.default;throw N._result}var be={current:null},W={transition:null},se={ReactCurrentDispatcher:be,ReactCurrentBatchConfig:W,ReactCurrentOwner:U};function G(){throw Error("act(...) is not supported in production builds of React.")}return ae.Children={map:ft,forEach:function(N,F,le){ft(N,function(){F.apply(this,arguments)},le)},count:function(N){var F=0;return ft(N,function(){F++}),F},toArray:function(N){return ft(N,function(F){return F})||[]},only:function(N){if(!ue(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},ae.Component=E,ae.Fragment=t,ae.Profiler=o,ae.PureComponent=O,ae.StrictMode=s,ae.Suspense=d,ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,ae.act=G,ae.cloneElement=function(N,F,le){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var ce=x({},N.props),he=N.key,pe=N.ref,Se=N._owner;if(F!=null){if(F.ref!==void 0&&(pe=F.ref,Se=U.current),F.key!==void 0&&(he=""+F.key),N.type&&N.type.defaultProps)var me=N.type.defaultProps;for(Te in F)V.call(F,Te)&&!Z.hasOwnProperty(Te)&&(ce[Te]=F[Te]===void 0&&me!==void 0?me[Te]:F[Te])}var Te=arguments.length-2;if(Te===1)ce.children=le;else if(1<Te){me=Array(Te);for(var xt=0;xt<Te;xt++)me[xt]=arguments[xt+2];ce.children=me}return{$$typeof:n,type:N.type,key:he,ref:pe,props:ce,_owner:Se}},ae.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:l,_context:N},N.Consumer=N},ae.createElement=H,ae.createFactory=function(N){var F=H.bind(null,N);return F.type=N,F},ae.createRef=function(){return{current:null}},ae.forwardRef=function(N){return{$$typeof:f,render:N}},ae.isValidElement=ue,ae.lazy=function(N){return{$$typeof:m,_payload:{_status:-1,_result:N},_init:Xe}},ae.memo=function(N,F){return{$$typeof:p,type:N,compare:F===void 0?null:F}},ae.startTransition=function(N){var F=W.transition;W.transition={};try{N()}finally{W.transition=F}},ae.unstable_act=G,ae.useCallback=function(N,F){return be.current.useCallback(N,F)},ae.useContext=function(N){return be.current.useContext(N)},ae.useDebugValue=function(){},ae.useDeferredValue=function(N){return be.current.useDeferredValue(N)},ae.useEffect=function(N,F){return be.current.useEffect(N,F)},ae.useId=function(){return be.current.useId()},ae.useImperativeHandle=function(N,F,le){return be.current.useImperativeHandle(N,F,le)},ae.useInsertionEffect=function(N,F){return be.current.useInsertionEffect(N,F)},ae.useLayoutEffect=function(N,F){return be.current.useLayoutEffect(N,F)},ae.useMemo=function(N,F){return be.current.useMemo(N,F)},ae.useReducer=function(N,F,le){return be.current.useReducer(N,F,le)},ae.useRef=function(N){return be.current.useRef(N)},ae.useState=function(N){return be.current.useState(N)},ae.useSyncExternalStore=function(N,F,le){return be.current.useSyncExternalStore(N,F,le)},ae.useTransition=function(){return be.current.useTransition()},ae.version="18.3.1",ae}var Gh;function mc(){return Gh||(Gh=1,Au.exports=Tv()),Au.exports}/**
11
- * @license React
12
- * react-jsx-runtime.production.min.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var Jh;function Cv(){if(Jh)return Ys;Jh=1;var n=mc(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(f,d,p){var m,y={},v=null,S=null;p!==void 0&&(v=""+p),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(S=d.ref);for(m in d)s.call(d,m)&&!l.hasOwnProperty(m)&&(y[m]=d[m]);if(f&&f.defaultProps)for(m in d=f.defaultProps,d)y[m]===void 0&&(y[m]=d[m]);return{$$typeof:e,type:f,key:v,ref:S,props:y,_owner:o.current}}return Ys.Fragment=t,Ys.jsx=u,Ys.jsxs=u,Ys}var Yh;function Nv(){return Yh||(Yh=1,Nu.exports=Cv()),Nu.exports}var C=Nv(),te=mc();const kt=bv(te);function Av(n,e,t,s){const[o,l]=kt.useState(t);return kt.useEffect(()=>{let u=!1;return n().then(f=>{u||l(f)}),()=>{u=!0}},e),o}function gl(){const n=kt.useRef(null),[e,t]=kt.useState(new DOMRect(0,0,10,10));return kt.useLayoutEffect(()=>{const s=n.current;if(!s)return;const o=s.getBoundingClientRect();t(new DOMRect(0,0,o.width,o.height));const l=new ResizeObserver(u=>{const f=u[u.length-1];f&&f.contentRect&&t(f.contentRect)});return l.observe(s),()=>l.disconnect()},[n]),[e,n]}function di(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0)+"ms";const e=n/1e3;if(e<60)return e.toFixed(1)+"s";const t=e/60;if(t<60)return t.toFixed(1)+"m";const s=t/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function Lv(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0);const e=n/1024;if(e<1e3)return e.toFixed(1)+"K";const t=e/1024;return t<1e3?t.toFixed(1)+"M":(t/1024).toFixed(1)+"G"}function FE(n,e,t,s,o){let l=0,u=n.length;for(;l<u;){const f=l+u>>1;t(e,n[f])>=0?l=f+1:u=f}return u}function Xh(n){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function ec(n,e){n&&(e=rr.getObject(n,e));const[t,s]=kt.useState(e),o=kt.useCallback(l=>{n?rr.setObject(n,l):s(l)},[n,s]);return kt.useEffect(()=>{if(n){const l=()=>s(rr.getObject(n,e));return rr.onChangeEmitter.addEventListener(n,l),()=>rr.onChangeEmitter.removeEventListener(n,l)}},[e,n]),[t,o]}class Iv{constructor(){this.onChangeEmitter=new EventTarget}getString(e,t){return localStorage[e]||t}setString(e,t){var s;localStorage[e]=t,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,t){if(!localStorage[e])return t;try{return JSON.parse(localStorage[e])}catch{return t}}setObject(e,t){var s;localStorage[e]=JSON.stringify(t),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const rr=new Iv;function Gt(...n){return n.filter(Boolean).join(" ")}async function BE(n){const e=new TextEncoder().encode(n);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-1",e))).map(t=>t.toString(16).padStart(2,"0")).join("")}function Ov(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const Zh="\\u0000-\\u0020\\u007f-\\u009f",$v=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Zh+'"]{2,}[^\\s'+Zh+`"')}\\],:;.!?]`,"ug");function zE(){const[n,e]=kt.useState(!1),t=kt.useCallback(()=>{const s=[];return e(o=>(s.push(setTimeout(()=>e(!1),1e3)),o?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[n,t]}function UE(){return kt.useMemo(()=>document.cookie.split("; ").filter(e=>e.includes("=")).map(e=>{const t=e.indexOf("=");return[e.substring(0,t),e.substring(t+1)]}),[])}function qE(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",t=>{t.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",t=>{document.body.classList.add("inactive")},!1);const n=rr.getString("theme","light-mode"),e=window.matchMedia("(prefers-color-scheme: dark)");(n==="dark-mode"||e.matches)&&document.body.classList.add("dark-mode")}const yc=new Set;function Mv(){const n=tc(),e=n==="dark-mode"?"light-mode":"dark-mode";n&&document.body.classList.remove(n),document.body.classList.add(e),rr.setString("theme",e);for(const t of yc)t(e)}function HE(n){yc.add(n)}function VE(n){yc.delete(n)}function tc(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function WE(){const[n,e]=kt.useState(tc()==="dark-mode");return[n,t=>{tc()==="dark-mode"!==t&&Mv(),e(t)}]}var $o={},Lu={exports:{}},yt={},Iu={exports:{}},Ou={};/**
19
- * @license React
20
- * scheduler.production.min.js
21
- *
22
- * Copyright (c) Facebook, Inc. and its affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var ep;function Pv(){return ep||(ep=1,function(n){function e(W,se){var G=W.length;W.push(se);e:for(;0<G;){var N=G-1>>>1,F=W[N];if(0<o(F,se))W[N]=se,W[G]=F,G=N;else break e}}function t(W){return W.length===0?null:W[0]}function s(W){if(W.length===0)return null;var se=W[0],G=W.pop();if(G!==se){W[0]=G;e:for(var N=0,F=W.length,le=F>>>1;N<le;){var ce=2*(N+1)-1,he=W[ce],pe=ce+1,Se=W[pe];if(0>o(he,G))pe<F&&0>o(Se,he)?(W[N]=Se,W[pe]=G,N=pe):(W[N]=he,W[ce]=G,N=ce);else if(pe<F&&0>o(Se,G))W[N]=Se,W[pe]=G,N=pe;else break e}}return se}function o(W,se){var G=W.sortIndex-se.sortIndex;return G!==0?G:W.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var d=[],p=[],m=1,y=null,v=3,S=!1,x=!1,_=!1,E=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(W){for(var se=t(p);se!==null;){if(se.callback===null)s(p);else if(se.startTime<=W)s(p),se.sortIndex=se.expirationTime,e(d,se);else break;se=t(p)}}function D(W){if(_=!1,P(W),!x)if(t(d)!==null)x=!0,Xe(V);else{var se=t(p);se!==null&&be(D,se.startTime-W)}}function V(W,se){x=!1,_&&(_=!1,L(H),H=-1),S=!0;var G=v;try{for(P(se),y=t(d);y!==null&&(!(y.expirationTime>se)||W&&!fe());){var N=y.callback;if(typeof N=="function"){y.callback=null,v=y.priorityLevel;var F=N(y.expirationTime<=se);se=n.unstable_now(),typeof F=="function"?y.callback=F:y===t(d)&&s(d),P(se)}else s(d);y=t(d)}if(y!==null)var le=!0;else{var ce=t(p);ce!==null&&be(D,ce.startTime-se),le=!1}return le}finally{y=null,v=G,S=!1}}var U=!1,Z=null,H=-1,M=5,ue=-1;function fe(){return!(n.unstable_now()-ue<M)}function R(){if(Z!==null){var W=n.unstable_now();ue=W;var se=!0;try{se=Z(!0,W)}finally{se?ee():(U=!1,Z=null)}}else U=!1}var ee;if(typeof O=="function")ee=function(){O(R)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,ft=Ee.port2;Ee.port1.onmessage=R,ee=function(){ft.postMessage(null)}}else ee=function(){E(R,0)};function Xe(W){Z=W,U||(U=!0,ee())}function be(W,se){H=E(function(){W(n.unstable_now())},se)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(W){W.callback=null},n.unstable_continueExecution=function(){x||S||(x=!0,Xe(V))},n.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<W?Math.floor(1e3/W):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_getFirstCallbackNode=function(){return t(d)},n.unstable_next=function(W){switch(v){case 1:case 2:case 3:var se=3;break;default:se=v}var G=v;v=se;try{return W()}finally{v=G}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(W,se){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var G=v;v=W;try{return se()}finally{v=G}},n.unstable_scheduleCallback=function(W,se,G){var N=n.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?N+G:N):G=N,W){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=G+F,W={id:m++,callback:se,priorityLevel:W,startTime:G,expirationTime:F,sortIndex:-1},G>N?(W.sortIndex=G,e(p,W),t(d)===null&&W===t(p)&&(_?(L(H),H=-1):_=!0,be(D,G-N))):(W.sortIndex=F,e(d,W),x||S||(x=!0,Xe(V))),W},n.unstable_shouldYield=fe,n.unstable_wrapCallback=function(W){var se=v;return function(){var G=v;v=se;try{return W.apply(this,arguments)}finally{v=G}}}}(Ou)),Ou}var tp;function Rv(){return tp||(tp=1,Iu.exports=Pv()),Iu.exports}/**
27
- * @license React
28
- * react-dom.production.min.js
29
- *
30
- * Copyright (c) Facebook, Inc. and its affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var np;function jv(){if(np)return yt;np=1;var n=mc(),e=Rv();function t(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,o={};function l(r,i){u(r,i),u(r+"Capture",i)}function u(r,i){for(o[r]=i,r=0;r<i.length;r++)s.add(i[r])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},y={};function v(r){return d.call(y,r)?!0:d.call(m,r)?!1:p.test(r)?y[r]=!0:(m[r]=!0,!1)}function S(r,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function x(r,i,a,c){if(i===null||typeof i>"u"||S(r,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function _(r,i,a,c,h,g,w){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=r,this.type=i,this.sanitizeURL=g,this.removeEmptyString=w}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){E[r]=new _(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];E[i]=new _(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){E[r]=new _(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){E[r]=new _(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){E[r]=new _(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){E[r]=new _(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){E[r]=new _(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){E[r]=new _(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){E[r]=new _(r,5,!1,r.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function O(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(L,O);E[i]=new _(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(L,O);E[i]=new _(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(L,O);E[i]=new _(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){E[r]=new _(r,1,!1,r.toLowerCase(),null,!1,!1)}),E.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){E[r]=new _(r,1,!1,r.toLowerCase(),null,!0,!0)});function P(r,i,a,c){var h=E.hasOwnProperty(i)?E[i]:null;(h!==null?h.type!==0:c||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(x(i,a,h,c)&&(a=null),c||h===null?v(i)&&(a===null?r.removeAttribute(i):r.setAttribute(i,""+a)):h.mustUseProperty?r[h.propertyName]=a===null?h.type===3?!1:"":a:(i=h.attributeName,c=h.attributeNamespace,a===null?r.removeAttribute(i):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,c?r.setAttributeNS(c,i,a):r.setAttribute(i,a))))}var D=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),U=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),ue=Symbol.for("react.provider"),fe=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),ft=Symbol.for("react.memo"),Xe=Symbol.for("react.lazy"),be=Symbol.for("react.offscreen"),W=Symbol.iterator;function se(r){return r===null||typeof r!="object"?null:(r=W&&r[W]||r["@@iterator"],typeof r=="function"?r:null)}var G=Object.assign,N;function F(r){if(N===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);N=i&&i[1]||""}return`
35
- `+N+r}var le=!1;function ce(r,i){if(!r||le)return"";le=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch($){var c=$}Reflect.construct(r,[],i)}else{try{i.call()}catch($){c=$}r.call(i.prototype)}else{try{throw Error()}catch($){c=$}r()}}catch($){if($&&c&&typeof $.stack=="string"){for(var h=$.stack.split(`
36
- `),g=c.stack.split(`
37
- `),w=h.length-1,k=g.length-1;1<=w&&0<=k&&h[w]!==g[k];)k--;for(;1<=w&&0<=k;w--,k--)if(h[w]!==g[k]){if(w!==1||k!==1)do if(w--,k--,0>k||h[w]!==g[k]){var b=`
38
- `+h[w].replace(" at new "," at ");return r.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",r.displayName)),b}while(1<=w&&0<=k);break}}}finally{le=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?F(r):""}function he(r){switch(r.tag){case 5:return F(r.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return r=ce(r.type,!1),r;case 11:return r=ce(r.type.render,!1),r;case 1:return r=ce(r.type,!0),r;default:return""}}function pe(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Z:return"Fragment";case U:return"Portal";case M:return"Profiler";case H:return"StrictMode";case ee:return"Suspense";case Ee:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case fe:return(r.displayName||"Context")+".Consumer";case ue:return(r._context.displayName||"Context")+".Provider";case R:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ft:return i=r.displayName||null,i!==null?i:pe(r.type)||"Memo";case Xe:i=r._payload,r=r._init;try{return pe(r(i))}catch{}}return null}function Se(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(i);case 8:return i===H?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function me(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Te(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function xt(r){var i=Te(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),c=""+r[i];if(!r.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,g=a.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return h.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(r,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Ei(r){r._valueTracker||(r._valueTracker=xt(r))}function Zc(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return r&&(c=Te(r)?r.checked?"true":"false":r.value),r=c,r!==a?(i.setValue(r),!0):!1}function ki(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Pl(r,i){var a=i.checked;return G({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function ef(r,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=me(i.value!=null?i.value:a),r._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function tf(r,i){i=i.checked,i!=null&&P(r,"checked",i,!1)}function Rl(r,i){tf(r,i);var a=me(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?jl(r,i.type,a):i.hasOwnProperty("defaultValue")&&jl(r,i.type,me(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function nf(r,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,a||i===r.value||(r.value=i),r.defaultValue=i}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function jl(r,i,a){(i!=="number"||ki(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var ds=Array.isArray;function hr(r,i,a,c){if(r=r.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<r.length;a++)h=i.hasOwnProperty("$"+r[a].value),r[a].selected!==h&&(r[a].selected=h),h&&c&&(r[a].defaultSelected=!0)}else{for(a=""+me(a),i=null,h=0;h<r.length;h++){if(r[h].value===a){r[h].selected=!0,c&&(r[h].defaultSelected=!0);return}i!==null||r[h].disabled||(i=r[h])}i!==null&&(i.selected=!0)}}function Dl(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(t(91));return G({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function rf(r,i){var a=i.value;if(a==null){if(a=i.children,i=i.defaultValue,a!=null){if(i!=null)throw Error(t(92));if(ds(a)){if(1<a.length)throw Error(t(93));a=a[0]}i=a}i==null&&(i=""),a=i}r._wrapperState={initialValue:me(a)}}function sf(r,i){var a=me(i.value),c=me(i.defaultValue);a!=null&&(a=""+a,a!==r.value&&(r.value=a),i.defaultValue==null&&r.defaultValue!==a&&(r.defaultValue=a)),c!=null&&(r.defaultValue=""+c)}function of(r){var i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function lf(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fl(r,i){return r==null||r==="http://www.w3.org/1999/xhtml"?lf(i):r==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var xi,af=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,a,c,h){MSApp.execUnsafeLocalFunction(function(){return r(i,a,c,h)})}:r}(function(r,i){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=i;else{for(xi=xi||document.createElement("div"),xi.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=xi.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function hs(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var ps={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Cy=["Webkit","ms","Moz","O"];Object.keys(ps).forEach(function(r){Cy.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),ps[i]=ps[r]})});function uf(r,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||ps.hasOwnProperty(r)&&ps[r]?(""+i).trim():i+"px"}function cf(r,i){r=r.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,h=uf(a,i[a],c);a==="float"&&(a="cssFloat"),c?r.setProperty(a,h):r[a]=h}}var Ny=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Bl(r,i){if(i){if(Ny[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(t(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(t(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(t(61))}if(i.style!=null&&typeof i.style!="object")throw Error(t(62))}}function zl(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ul=null;function ql(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Hl=null,pr=null,gr=null;function ff(r){if(r=Rs(r)){if(typeof Hl!="function")throw Error(t(280));var i=r.stateNode;i&&(i=Ki(i),Hl(r.stateNode,r.type,i))}}function df(r){pr?gr?gr.push(r):gr=[r]:pr=r}function hf(){if(pr){var r=pr,i=gr;if(gr=pr=null,ff(r),i)for(r=0;r<i.length;r++)ff(i[r])}}function pf(r,i){return r(i)}function gf(){}var Vl=!1;function mf(r,i,a){if(Vl)return r(i,a);Vl=!0;try{return pf(r,i,a)}finally{Vl=!1,(pr!==null||gr!==null)&&(gf(),hf())}}function gs(r,i){var a=r.stateNode;if(a===null)return null;var c=Ki(a);if(c===null)return null;a=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(a&&typeof a!="function")throw Error(t(231,i,typeof a));return a}var Wl=!1;if(f)try{var ms={};Object.defineProperty(ms,"passive",{get:function(){Wl=!0}}),window.addEventListener("test",ms,ms),window.removeEventListener("test",ms,ms)}catch{Wl=!1}function Ay(r,i,a,c,h,g,w,k,b){var $=Array.prototype.slice.call(arguments,3);try{i.apply(a,$)}catch(B){this.onError(B)}}var ys=!1,bi=null,Ti=!1,Kl=null,Ly={onError:function(r){ys=!0,bi=r}};function Iy(r,i,a,c,h,g,w,k,b){ys=!1,bi=null,Ay.apply(Ly,arguments)}function Oy(r,i,a,c,h,g,w,k,b){if(Iy.apply(this,arguments),ys){if(ys){var $=bi;ys=!1,bi=null}else throw Error(t(198));Ti||(Ti=!0,Kl=$)}}function qn(r){var i=r,a=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,i.flags&4098&&(a=i.return),r=i.return;while(r)}return i.tag===3?a:null}function yf(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function wf(r){if(qn(r)!==r)throw Error(t(188))}function $y(r){var i=r.alternate;if(!i){if(i=qn(r),i===null)throw Error(t(188));return i!==r?null:r}for(var a=r,c=i;;){var h=a.return;if(h===null)break;var g=h.alternate;if(g===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===a)return wf(h),r;if(g===c)return wf(h),i;g=g.sibling}throw Error(t(188))}if(a.return!==c.return)a=h,c=g;else{for(var w=!1,k=h.child;k;){if(k===a){w=!0,a=h,c=g;break}if(k===c){w=!0,c=h,a=g;break}k=k.sibling}if(!w){for(k=g.child;k;){if(k===a){w=!0,a=g,c=h;break}if(k===c){w=!0,c=g,a=h;break}k=k.sibling}if(!w)throw Error(t(189))}}if(a.alternate!==c)throw Error(t(190))}if(a.tag!==3)throw Error(t(188));return a.stateNode.current===a?r:i}function vf(r){return r=$y(r),r!==null?Sf(r):null}function Sf(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=Sf(r);if(i!==null)return i;r=r.sibling}return null}var _f=e.unstable_scheduleCallback,Ef=e.unstable_cancelCallback,My=e.unstable_shouldYield,Py=e.unstable_requestPaint,Re=e.unstable_now,Ry=e.unstable_getCurrentPriorityLevel,Ql=e.unstable_ImmediatePriority,kf=e.unstable_UserBlockingPriority,Ci=e.unstable_NormalPriority,jy=e.unstable_LowPriority,xf=e.unstable_IdlePriority,Ni=null,Yt=null;function Dy(r){if(Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(Ni,r,void 0,(r.current.flags&128)===128)}catch{}}var Bt=Math.clz32?Math.clz32:zy,Fy=Math.log,By=Math.LN2;function zy(r){return r>>>=0,r===0?32:31-(Fy(r)/By|0)|0}var Ai=64,Li=4194304;function ws(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ii(r,i){var a=r.pendingLanes;if(a===0)return 0;var c=0,h=r.suspendedLanes,g=r.pingedLanes,w=a&268435455;if(w!==0){var k=w&~h;k!==0?c=ws(k):(g&=w,g!==0&&(c=ws(g)))}else w=a&~h,w!==0?c=ws(w):g!==0&&(c=ws(g));if(c===0)return 0;if(i!==0&&i!==c&&!(i&h)&&(h=c&-c,g=i&-i,h>=g||h===16&&(g&4194240)!==0))return i;if(c&4&&(c|=a&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=c;0<i;)a=31-Bt(i),h=1<<a,c|=r[a],i&=~h;return c}function Uy(r,i){switch(r){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qy(r,i){for(var a=r.suspendedLanes,c=r.pingedLanes,h=r.expirationTimes,g=r.pendingLanes;0<g;){var w=31-Bt(g),k=1<<w,b=h[w];b===-1?(!(k&a)||k&c)&&(h[w]=Uy(k,i)):b<=i&&(r.expiredLanes|=k),g&=~k}}function Gl(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function bf(){var r=Ai;return Ai<<=1,!(Ai&4194240)&&(Ai=64),r}function Jl(r){for(var i=[],a=0;31>a;a++)i.push(r);return i}function vs(r,i,a){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-Bt(i),r[i]=a}function Hy(r,i){var a=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0<a;){var h=31-Bt(a),g=1<<h;i[h]=0,c[h]=-1,r[h]=-1,a&=~g}}function Yl(r,i){var a=r.entangledLanes|=i;for(r=r.entanglements;a;){var c=31-Bt(a),h=1<<c;h&i|r[c]&i&&(r[c]|=i),a&=~h}}var ye=0;function Tf(r){return r&=-r,1<r?4<r?r&268435455?16:536870912:4:1}var Cf,Xl,Nf,Af,Lf,Zl=!1,Oi=[],wn=null,vn=null,Sn=null,Ss=new Map,_s=new Map,_n=[],Vy="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function If(r,i){switch(r){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":vn=null;break;case"mouseover":case"mouseout":Sn=null;break;case"pointerover":case"pointerout":Ss.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":_s.delete(i.pointerId)}}function Es(r,i,a,c,h,g){return r===null||r.nativeEvent!==g?(r={blockedOn:i,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},i!==null&&(i=Rs(i),i!==null&&Xl(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),r)}function Wy(r,i,a,c,h){switch(i){case"focusin":return wn=Es(wn,r,i,a,c,h),!0;case"dragenter":return vn=Es(vn,r,i,a,c,h),!0;case"mouseover":return Sn=Es(Sn,r,i,a,c,h),!0;case"pointerover":var g=h.pointerId;return Ss.set(g,Es(Ss.get(g)||null,r,i,a,c,h)),!0;case"gotpointercapture":return g=h.pointerId,_s.set(g,Es(_s.get(g)||null,r,i,a,c,h)),!0}return!1}function Of(r){var i=Hn(r.target);if(i!==null){var a=qn(i);if(a!==null){if(i=a.tag,i===13){if(i=yf(a),i!==null){r.blockedOn=i,Lf(r.priority,function(){Nf(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){r.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}r.blockedOn=null}function $i(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var a=ta(r.domEventName,r.eventSystemFlags,i[0],r.nativeEvent);if(a===null){a=r.nativeEvent;var c=new a.constructor(a.type,a);Ul=c,a.target.dispatchEvent(c),Ul=null}else return i=Rs(a),i!==null&&Xl(i),r.blockedOn=a,!1;i.shift()}return!0}function $f(r,i,a){$i(r)&&a.delete(i)}function Ky(){Zl=!1,wn!==null&&$i(wn)&&(wn=null),vn!==null&&$i(vn)&&(vn=null),Sn!==null&&$i(Sn)&&(Sn=null),Ss.forEach($f),_s.forEach($f)}function ks(r,i){r.blockedOn===i&&(r.blockedOn=null,Zl||(Zl=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Ky)))}function xs(r){function i(h){return ks(h,r)}if(0<Oi.length){ks(Oi[0],r);for(var a=1;a<Oi.length;a++){var c=Oi[a];c.blockedOn===r&&(c.blockedOn=null)}}for(wn!==null&&ks(wn,r),vn!==null&&ks(vn,r),Sn!==null&&ks(Sn,r),Ss.forEach(i),_s.forEach(i),a=0;a<_n.length;a++)c=_n[a],c.blockedOn===r&&(c.blockedOn=null);for(;0<_n.length&&(a=_n[0],a.blockedOn===null);)Of(a),a.blockedOn===null&&_n.shift()}var mr=D.ReactCurrentBatchConfig,Mi=!0;function Qy(r,i,a,c){var h=ye,g=mr.transition;mr.transition=null;try{ye=1,ea(r,i,a,c)}finally{ye=h,mr.transition=g}}function Gy(r,i,a,c){var h=ye,g=mr.transition;mr.transition=null;try{ye=4,ea(r,i,a,c)}finally{ye=h,mr.transition=g}}function ea(r,i,a,c){if(Mi){var h=ta(r,i,a,c);if(h===null)wa(r,i,c,Pi,a),If(r,c);else if(Wy(h,r,i,a,c))c.stopPropagation();else if(If(r,c),i&4&&-1<Vy.indexOf(r)){for(;h!==null;){var g=Rs(h);if(g!==null&&Cf(g),g=ta(r,i,a,c),g===null&&wa(r,i,c,Pi,a),g===h)break;h=g}h!==null&&c.stopPropagation()}else wa(r,i,c,null,a)}}var Pi=null;function ta(r,i,a,c){if(Pi=null,r=ql(c),r=Hn(r),r!==null)if(i=qn(r),i===null)r=null;else if(a=i.tag,a===13){if(r=yf(i),r!==null)return r;r=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null);return Pi=r,null}function Mf(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ry()){case Ql:return 1;case kf:return 4;case Ci:case jy:return 16;case xf:return 536870912;default:return 16}default:return 16}}var En=null,na=null,Ri=null;function Pf(){if(Ri)return Ri;var r,i=na,a=i.length,c,h="value"in En?En.value:En.textContent,g=h.length;for(r=0;r<a&&i[r]===h[r];r++);var w=a-r;for(c=1;c<=w&&i[a-c]===h[g-c];c++);return Ri=h.slice(r,1<c?1-c:void 0)}function ji(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Di(){return!0}function Rf(){return!1}function bt(r){function i(a,c,h,g,w){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var k in r)r.hasOwnProperty(k)&&(a=r[k],this[k]=a?a(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Di:Rf,this.isPropagationStopped=Rf,this}return G(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Di)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),i}var yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ra=bt(yr),bs=G({},yr,{view:0,detail:0}),Jy=bt(bs),sa,ia,Ts,Fi=G({},bs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:la,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ts&&(Ts&&r.type==="mousemove"?(sa=r.screenX-Ts.screenX,ia=r.screenY-Ts.screenY):ia=sa=0,Ts=r),sa)},movementY:function(r){return"movementY"in r?r.movementY:ia}}),jf=bt(Fi),Yy=G({},Fi,{dataTransfer:0}),Xy=bt(Yy),Zy=G({},bs,{relatedTarget:0}),oa=bt(Zy),ew=G({},yr,{animationName:0,elapsedTime:0,pseudoElement:0}),tw=bt(ew),nw=G({},yr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),rw=bt(nw),sw=G({},yr,{data:0}),Df=bt(sw),iw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ow={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},lw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aw(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=lw[r])?!!i[r]:!1}function la(){return aw}var uw=G({},bs,{key:function(r){if(r.key){var i=iw[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=ji(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?ow[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:la,charCode:function(r){return r.type==="keypress"?ji(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ji(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),cw=bt(uw),fw=G({},Fi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ff=bt(fw),dw=G({},bs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:la}),hw=bt(dw),pw=G({},yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),gw=bt(pw),mw=G({},Fi,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),yw=bt(mw),ww=[9,13,27,32],aa=f&&"CompositionEvent"in window,Cs=null;f&&"documentMode"in document&&(Cs=document.documentMode);var vw=f&&"TextEvent"in window&&!Cs,Bf=f&&(!aa||Cs&&8<Cs&&11>=Cs),zf=" ",Uf=!1;function qf(r,i){switch(r){case"keyup":return ww.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var wr=!1;function Sw(r,i){switch(r){case"compositionend":return Hf(i);case"keypress":return i.which!==32?null:(Uf=!0,zf);case"textInput":return r=i.data,r===zf&&Uf?null:r;default:return null}}function _w(r,i){if(wr)return r==="compositionend"||!aa&&qf(r,i)?(r=Pf(),Ri=na=En=null,wr=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Bf&&i.locale!=="ko"?null:i.data;default:return null}}var Ew={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vf(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!Ew[r.type]:i==="textarea"}function Wf(r,i,a,c){df(c),i=Hi(i,"onChange"),0<i.length&&(a=new ra("onChange","change",null,a,c),r.push({event:a,listeners:i}))}var Ns=null,As=null;function kw(r){cd(r,0)}function Bi(r){var i=kr(r);if(Zc(i))return r}function xw(r,i){if(r==="change")return i}var Kf=!1;if(f){var ua;if(f){var ca="oninput"in document;if(!ca){var Qf=document.createElement("div");Qf.setAttribute("oninput","return;"),ca=typeof Qf.oninput=="function"}ua=ca}else ua=!1;Kf=ua&&(!document.documentMode||9<document.documentMode)}function Gf(){Ns&&(Ns.detachEvent("onpropertychange",Jf),As=Ns=null)}function Jf(r){if(r.propertyName==="value"&&Bi(As)){var i=[];Wf(i,As,r,ql(r)),mf(kw,i)}}function bw(r,i,a){r==="focusin"?(Gf(),Ns=i,As=a,Ns.attachEvent("onpropertychange",Jf)):r==="focusout"&&Gf()}function Tw(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Bi(As)}function Cw(r,i){if(r==="click")return Bi(i)}function Nw(r,i){if(r==="input"||r==="change")return Bi(i)}function Aw(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var zt=typeof Object.is=="function"?Object.is:Aw;function Ls(r,i){if(zt(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var a=Object.keys(r),c=Object.keys(i);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!d.call(i,h)||!zt(r[h],i[h]))return!1}return!0}function Yf(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Xf(r,i){var a=Yf(r);r=0;for(var c;a;){if(a.nodeType===3){if(c=r+a.textContent.length,r<=i&&c>=i)return{node:a,offset:i-r};r=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Yf(a)}}function Zf(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Zf(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function ed(){for(var r=window,i=ki();i instanceof r.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)r=i.contentWindow;else break;i=ki(r.document)}return i}function fa(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function Lw(r){var i=ed(),a=r.focusedElem,c=r.selectionRange;if(i!==a&&a&&a.ownerDocument&&Zf(a.ownerDocument.documentElement,a)){if(c!==null&&fa(a)){if(i=c.start,r=c.end,r===void 0&&(r=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(r,a.value.length);else if(r=(i=a.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var h=a.textContent.length,g=Math.min(c.start,h);c=c.end===void 0?g:Math.min(c.end,h),!r.extend&&g>c&&(h=c,c=g,g=h),h=Xf(a,g);var w=Xf(a,c);h&&w&&(r.rangeCount!==1||r.anchorNode!==h.node||r.anchorOffset!==h.offset||r.focusNode!==w.node||r.focusOffset!==w.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),r.removeAllRanges(),g>c?(r.addRange(i),r.extend(w.node,w.offset)):(i.setEnd(w.node,w.offset),r.addRange(i)))}}for(i=[],r=a;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<i.length;a++)r=i[a],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var Iw=f&&"documentMode"in document&&11>=document.documentMode,vr=null,da=null,Is=null,ha=!1;function td(r,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ha||vr==null||vr!==ki(c)||(c=vr,"selectionStart"in c&&fa(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Is&&Ls(Is,c)||(Is=c,c=Hi(da,"onSelect"),0<c.length&&(i=new ra("onSelect","select",null,i,a),r.push({event:i,listeners:c}),i.target=vr)))}function zi(r,i){var a={};return a[r.toLowerCase()]=i.toLowerCase(),a["Webkit"+r]="webkit"+i,a["Moz"+r]="moz"+i,a}var Sr={animationend:zi("Animation","AnimationEnd"),animationiteration:zi("Animation","AnimationIteration"),animationstart:zi("Animation","AnimationStart"),transitionend:zi("Transition","TransitionEnd")},pa={},nd={};f&&(nd=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);function Ui(r){if(pa[r])return pa[r];if(!Sr[r])return r;var i=Sr[r],a;for(a in i)if(i.hasOwnProperty(a)&&a in nd)return pa[r]=i[a];return r}var rd=Ui("animationend"),sd=Ui("animationiteration"),id=Ui("animationstart"),od=Ui("transitionend"),ld=new Map,ad="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function kn(r,i){ld.set(r,i),l(i,[r])}for(var ga=0;ga<ad.length;ga++){var ma=ad[ga],Ow=ma.toLowerCase(),$w=ma[0].toUpperCase()+ma.slice(1);kn(Ow,"on"+$w)}kn(rd,"onAnimationEnd"),kn(sd,"onAnimationIteration"),kn(id,"onAnimationStart"),kn("dblclick","onDoubleClick"),kn("focusin","onFocus"),kn("focusout","onBlur"),kn(od,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Os="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Mw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Os));function ud(r,i,a){var c=r.type||"unknown-event";r.currentTarget=a,Oy(c,i,void 0,r),r.currentTarget=null}function cd(r,i){i=(i&4)!==0;for(var a=0;a<r.length;a++){var c=r[a],h=c.event;c=c.listeners;e:{var g=void 0;if(i)for(var w=c.length-1;0<=w;w--){var k=c[w],b=k.instance,$=k.currentTarget;if(k=k.listener,b!==g&&h.isPropagationStopped())break e;ud(h,k,$),g=b}else for(w=0;w<c.length;w++){if(k=c[w],b=k.instance,$=k.currentTarget,k=k.listener,b!==g&&h.isPropagationStopped())break e;ud(h,k,$),g=b}}}if(Ti)throw r=Kl,Ti=!1,Kl=null,r}function ke(r,i){var a=i[xa];a===void 0&&(a=i[xa]=new Set);var c=r+"__bubble";a.has(c)||(fd(i,r,2,!1),a.add(c))}function ya(r,i,a){var c=0;i&&(c|=4),fd(a,r,c,i)}var qi="_reactListening"+Math.random().toString(36).slice(2);function $s(r){if(!r[qi]){r[qi]=!0,s.forEach(function(a){a!=="selectionchange"&&(Mw.has(a)||ya(a,!1,r),ya(a,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[qi]||(i[qi]=!0,ya("selectionchange",!1,i))}}function fd(r,i,a,c){switch(Mf(i)){case 1:var h=Qy;break;case 4:h=Gy;break;default:h=ea}a=h.bind(null,i,a,r),h=void 0,!Wl||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),c?h!==void 0?r.addEventListener(i,a,{capture:!0,passive:h}):r.addEventListener(i,a,!0):h!==void 0?r.addEventListener(i,a,{passive:h}):r.addEventListener(i,a,!1)}function wa(r,i,a,c,h){var g=c;if(!(i&1)&&!(i&2)&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var k=c.stateNode.containerInfo;if(k===h||k.nodeType===8&&k.parentNode===h)break;if(w===4)for(w=c.return;w!==null;){var b=w.tag;if((b===3||b===4)&&(b=w.stateNode.containerInfo,b===h||b.nodeType===8&&b.parentNode===h))return;w=w.return}for(;k!==null;){if(w=Hn(k),w===null)return;if(b=w.tag,b===5||b===6){c=g=w;continue e}k=k.parentNode}}c=c.return}mf(function(){var $=g,B=ql(a),z=[];e:{var j=ld.get(r);if(j!==void 0){var K=ra,J=r;switch(r){case"keypress":if(ji(a)===0)break e;case"keydown":case"keyup":K=cw;break;case"focusin":J="focus",K=oa;break;case"focusout":J="blur",K=oa;break;case"beforeblur":case"afterblur":K=oa;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Xy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=hw;break;case rd:case sd:case id:K=tw;break;case od:K=gw;break;case"scroll":K=Jy;break;case"wheel":K=yw;break;case"copy":case"cut":case"paste":K=rw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Ff}var Y=(i&4)!==0,je=!Y&&r==="scroll",A=Y?j!==null?j+"Capture":null:j;Y=[];for(var T=$,I;T!==null;){I=T;var q=I.stateNode;if(I.tag===5&&q!==null&&(I=q,A!==null&&(q=gs(T,A),q!=null&&Y.push(Ms(T,q,I)))),je)break;T=T.return}0<Y.length&&(j=new K(j,J,null,a,B),z.push({event:j,listeners:Y}))}}if(!(i&7)){e:{if(j=r==="mouseover"||r==="pointerover",K=r==="mouseout"||r==="pointerout",j&&a!==Ul&&(J=a.relatedTarget||a.fromElement)&&(Hn(J)||J[sn]))break e;if((K||j)&&(j=B.window===B?B:(j=B.ownerDocument)?j.defaultView||j.parentWindow:window,K?(J=a.relatedTarget||a.toElement,K=$,J=J?Hn(J):null,J!==null&&(je=qn(J),J!==je||J.tag!==5&&J.tag!==6)&&(J=null)):(K=null,J=$),K!==J)){if(Y=jf,q="onMouseLeave",A="onMouseEnter",T="mouse",(r==="pointerout"||r==="pointerover")&&(Y=Ff,q="onPointerLeave",A="onPointerEnter",T="pointer"),je=K==null?j:kr(K),I=J==null?j:kr(J),j=new Y(q,T+"leave",K,a,B),j.target=je,j.relatedTarget=I,q=null,Hn(B)===$&&(Y=new Y(A,T+"enter",J,a,B),Y.target=I,Y.relatedTarget=je,q=Y),je=q,K&&J)t:{for(Y=K,A=J,T=0,I=Y;I;I=_r(I))T++;for(I=0,q=A;q;q=_r(q))I++;for(;0<T-I;)Y=_r(Y),T--;for(;0<I-T;)A=_r(A),I--;for(;T--;){if(Y===A||A!==null&&Y===A.alternate)break t;Y=_r(Y),A=_r(A)}Y=null}else Y=null;K!==null&&dd(z,j,K,Y,!1),J!==null&&je!==null&&dd(z,je,J,Y,!0)}}e:{if(j=$?kr($):window,K=j.nodeName&&j.nodeName.toLowerCase(),K==="select"||K==="input"&&j.type==="file")var X=xw;else if(Vf(j))if(Kf)X=Nw;else{X=Tw;var ne=bw}else(K=j.nodeName)&&K.toLowerCase()==="input"&&(j.type==="checkbox"||j.type==="radio")&&(X=Cw);if(X&&(X=X(r,$))){Wf(z,X,a,B);break e}ne&&ne(r,j,$),r==="focusout"&&(ne=j._wrapperState)&&ne.controlled&&j.type==="number"&&jl(j,"number",j.value)}switch(ne=$?kr($):window,r){case"focusin":(Vf(ne)||ne.contentEditable==="true")&&(vr=ne,da=$,Is=null);break;case"focusout":Is=da=vr=null;break;case"mousedown":ha=!0;break;case"contextmenu":case"mouseup":case"dragend":ha=!1,td(z,a,B);break;case"selectionchange":if(Iw)break;case"keydown":case"keyup":td(z,a,B)}var re;if(aa)e:{switch(r){case"compositionstart":var ie="onCompositionStart";break e;case"compositionend":ie="onCompositionEnd";break e;case"compositionupdate":ie="onCompositionUpdate";break e}ie=void 0}else wr?qf(r,a)&&(ie="onCompositionEnd"):r==="keydown"&&a.keyCode===229&&(ie="onCompositionStart");ie&&(Bf&&a.locale!=="ko"&&(wr||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&wr&&(re=Pf()):(En=B,na="value"in En?En.value:En.textContent,wr=!0)),ne=Hi($,ie),0<ne.length&&(ie=new Df(ie,r,null,a,B),z.push({event:ie,listeners:ne}),re?ie.data=re:(re=Hf(a),re!==null&&(ie.data=re)))),(re=vw?Sw(r,a):_w(r,a))&&($=Hi($,"onBeforeInput"),0<$.length&&(B=new Df("onBeforeInput","beforeinput",null,a,B),z.push({event:B,listeners:$}),B.data=re))}cd(z,i)})}function Ms(r,i,a){return{instance:r,listener:i,currentTarget:a}}function Hi(r,i){for(var a=i+"Capture",c=[];r!==null;){var h=r,g=h.stateNode;h.tag===5&&g!==null&&(h=g,g=gs(r,a),g!=null&&c.unshift(Ms(r,g,h)),g=gs(r,i),g!=null&&c.push(Ms(r,g,h))),r=r.return}return c}function _r(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function dd(r,i,a,c,h){for(var g=i._reactName,w=[];a!==null&&a!==c;){var k=a,b=k.alternate,$=k.stateNode;if(b!==null&&b===c)break;k.tag===5&&$!==null&&(k=$,h?(b=gs(a,g),b!=null&&w.unshift(Ms(a,b,k))):h||(b=gs(a,g),b!=null&&w.push(Ms(a,b,k)))),a=a.return}w.length!==0&&r.push({event:i,listeners:w})}var Pw=/\r\n?/g,Rw=/\u0000|\uFFFD/g;function hd(r){return(typeof r=="string"?r:""+r).replace(Pw,`
39
- `).replace(Rw,"")}function Vi(r,i,a){if(i=hd(i),hd(r)!==i&&a)throw Error(t(425))}function Wi(){}var va=null,Sa=null;function _a(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Ea=typeof setTimeout=="function"?setTimeout:void 0,jw=typeof clearTimeout=="function"?clearTimeout:void 0,pd=typeof Promise=="function"?Promise:void 0,Dw=typeof queueMicrotask=="function"?queueMicrotask:typeof pd<"u"?function(r){return pd.resolve(null).then(r).catch(Fw)}:Ea;function Fw(r){setTimeout(function(){throw r})}function ka(r,i){var a=i,c=0;do{var h=a.nextSibling;if(r.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(c===0){r.removeChild(h),xs(i);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=h}while(a);xs(i)}function xn(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return r}function gd(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var a=r.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return r;i--}else a==="/$"&&i++}r=r.previousSibling}return null}var Er=Math.random().toString(36).slice(2),Xt="__reactFiber$"+Er,Ps="__reactProps$"+Er,sn="__reactContainer$"+Er,xa="__reactEvents$"+Er,Bw="__reactListeners$"+Er,zw="__reactHandles$"+Er;function Hn(r){var i=r[Xt];if(i)return i;for(var a=r.parentNode;a;){if(i=a[sn]||a[Xt]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(r=gd(r);r!==null;){if(a=r[Xt])return a;r=gd(r)}return i}r=a,a=r.parentNode}return null}function Rs(r){return r=r[Xt]||r[sn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function kr(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(t(33))}function Ki(r){return r[Ps]||null}var ba=[],xr=-1;function bn(r){return{current:r}}function xe(r){0>xr||(r.current=ba[xr],ba[xr]=null,xr--)}function _e(r,i){xr++,ba[xr]=r.current,r.current=i}var Tn={},Ze=bn(Tn),dt=bn(!1),Vn=Tn;function br(r,i){var a=r.type.contextTypes;if(!a)return Tn;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var h={},g;for(g in a)h[g]=i[g];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=h),h}function ht(r){return r=r.childContextTypes,r!=null}function Qi(){xe(dt),xe(Ze)}function md(r,i,a){if(Ze.current!==Tn)throw Error(t(168));_e(Ze,i),_e(dt,a)}function yd(r,i,a){var c=r.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var h in c)if(!(h in i))throw Error(t(108,Se(r)||"Unknown",h));return G({},a,c)}function Gi(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Tn,Vn=Ze.current,_e(Ze,r),_e(dt,dt.current),!0}function wd(r,i,a){var c=r.stateNode;if(!c)throw Error(t(169));a?(r=yd(r,i,Vn),c.__reactInternalMemoizedMergedChildContext=r,xe(dt),xe(Ze),_e(Ze,r)):xe(dt),_e(dt,a)}var on=null,Ji=!1,Ta=!1;function vd(r){on===null?on=[r]:on.push(r)}function Uw(r){Ji=!0,vd(r)}function Cn(){if(!Ta&&on!==null){Ta=!0;var r=0,i=ye;try{var a=on;for(ye=1;r<a.length;r++){var c=a[r];do c=c(!0);while(c!==null)}on=null,Ji=!1}catch(h){throw on!==null&&(on=on.slice(r+1)),_f(Ql,Cn),h}finally{ye=i,Ta=!1}}return null}var Tr=[],Cr=0,Yi=null,Xi=0,Lt=[],It=0,Wn=null,ln=1,an="";function Kn(r,i){Tr[Cr++]=Xi,Tr[Cr++]=Yi,Yi=r,Xi=i}function Sd(r,i,a){Lt[It++]=ln,Lt[It++]=an,Lt[It++]=Wn,Wn=r;var c=ln;r=an;var h=32-Bt(c)-1;c&=~(1<<h),a+=1;var g=32-Bt(i)+h;if(30<g){var w=h-h%5;g=(c&(1<<w)-1).toString(32),c>>=w,h-=w,ln=1<<32-Bt(i)+h|a<<h|c,an=g+r}else ln=1<<g|a<<h|c,an=r}function Ca(r){r.return!==null&&(Kn(r,1),Sd(r,1,0))}function Na(r){for(;r===Yi;)Yi=Tr[--Cr],Tr[Cr]=null,Xi=Tr[--Cr],Tr[Cr]=null;for(;r===Wn;)Wn=Lt[--It],Lt[It]=null,an=Lt[--It],Lt[It]=null,ln=Lt[--It],Lt[It]=null}var Tt=null,Ct=null,Ce=!1,Ut=null;function _d(r,i){var a=Pt(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=r,i=r.deletions,i===null?(r.deletions=[a],r.flags|=16):i.push(a)}function Ed(r,i){switch(r.tag){case 5:var a=r.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(r.stateNode=i,Tt=r,Ct=xn(i.firstChild),!0):!1;case 6:return i=r.pendingProps===""||i.nodeType!==3?null:i,i!==null?(r.stateNode=i,Tt=r,Ct=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=Wn!==null?{id:ln,overflow:an}:null,r.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Pt(18,null,null,0),a.stateNode=i,a.return=r,r.child=a,Tt=r,Ct=null,!0):!1;default:return!1}}function Aa(r){return(r.mode&1)!==0&&(r.flags&128)===0}function La(r){if(Ce){var i=Ct;if(i){var a=i;if(!Ed(r,i)){if(Aa(r))throw Error(t(418));i=xn(a.nextSibling);var c=Tt;i&&Ed(r,i)?_d(c,a):(r.flags=r.flags&-4097|2,Ce=!1,Tt=r)}}else{if(Aa(r))throw Error(t(418));r.flags=r.flags&-4097|2,Ce=!1,Tt=r}}}function kd(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Tt=r}function Zi(r){if(r!==Tt)return!1;if(!Ce)return kd(r),Ce=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!_a(r.type,r.memoizedProps)),i&&(i=Ct)){if(Aa(r))throw xd(),Error(t(418));for(;i;)_d(r,i),i=xn(i.nextSibling)}if(kd(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(t(317));e:{for(r=r.nextSibling,i=0;r;){if(r.nodeType===8){var a=r.data;if(a==="/$"){if(i===0){Ct=xn(r.nextSibling);break e}i--}else a!=="$"&&a!=="$!"&&a!=="$?"||i++}r=r.nextSibling}Ct=null}}else Ct=Tt?xn(r.stateNode.nextSibling):null;return!0}function xd(){for(var r=Ct;r;)r=xn(r.nextSibling)}function Nr(){Ct=Tt=null,Ce=!1}function Ia(r){Ut===null?Ut=[r]:Ut.push(r)}var qw=D.ReactCurrentBatchConfig;function js(r,i,a){if(r=a.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(t(309));var c=a.stateNode}if(!c)throw Error(t(147,r));var h=c,g=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===g?i.ref:(i=function(w){var k=h.refs;w===null?delete k[g]:k[g]=w},i._stringRef=g,i)}if(typeof r!="string")throw Error(t(284));if(!a._owner)throw Error(t(290,r))}return r}function eo(r,i){throw r=Object.prototype.toString.call(i),Error(t(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function bd(r){var i=r._init;return i(r._payload)}function Td(r){function i(A,T){if(r){var I=A.deletions;I===null?(A.deletions=[T],A.flags|=16):I.push(T)}}function a(A,T){if(!r)return null;for(;T!==null;)i(A,T),T=T.sibling;return null}function c(A,T){for(A=new Map;T!==null;)T.key!==null?A.set(T.key,T):A.set(T.index,T),T=T.sibling;return A}function h(A,T){return A=Pn(A,T),A.index=0,A.sibling=null,A}function g(A,T,I){return A.index=I,r?(I=A.alternate,I!==null?(I=I.index,I<T?(A.flags|=2,T):I):(A.flags|=2,T)):(A.flags|=1048576,T)}function w(A){return r&&A.alternate===null&&(A.flags|=2),A}function k(A,T,I,q){return T===null||T.tag!==6?(T=Eu(I,A.mode,q),T.return=A,T):(T=h(T,I),T.return=A,T)}function b(A,T,I,q){var X=I.type;return X===Z?B(A,T,I.props.children,q,I.key):T!==null&&(T.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Xe&&bd(X)===T.type)?(q=h(T,I.props),q.ref=js(A,T,I),q.return=A,q):(q=bo(I.type,I.key,I.props,null,A.mode,q),q.ref=js(A,T,I),q.return=A,q)}function $(A,T,I,q){return T===null||T.tag!==4||T.stateNode.containerInfo!==I.containerInfo||T.stateNode.implementation!==I.implementation?(T=ku(I,A.mode,q),T.return=A,T):(T=h(T,I.children||[]),T.return=A,T)}function B(A,T,I,q,X){return T===null||T.tag!==7?(T=tr(I,A.mode,q,X),T.return=A,T):(T=h(T,I),T.return=A,T)}function z(A,T,I){if(typeof T=="string"&&T!==""||typeof T=="number")return T=Eu(""+T,A.mode,I),T.return=A,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case V:return I=bo(T.type,T.key,T.props,null,A.mode,I),I.ref=js(A,null,T),I.return=A,I;case U:return T=ku(T,A.mode,I),T.return=A,T;case Xe:var q=T._init;return z(A,q(T._payload),I)}if(ds(T)||se(T))return T=tr(T,A.mode,I,null),T.return=A,T;eo(A,T)}return null}function j(A,T,I,q){var X=T!==null?T.key:null;if(typeof I=="string"&&I!==""||typeof I=="number")return X!==null?null:k(A,T,""+I,q);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case V:return I.key===X?b(A,T,I,q):null;case U:return I.key===X?$(A,T,I,q):null;case Xe:return X=I._init,j(A,T,X(I._payload),q)}if(ds(I)||se(I))return X!==null?null:B(A,T,I,q,null);eo(A,I)}return null}function K(A,T,I,q,X){if(typeof q=="string"&&q!==""||typeof q=="number")return A=A.get(I)||null,k(T,A,""+q,X);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case V:return A=A.get(q.key===null?I:q.key)||null,b(T,A,q,X);case U:return A=A.get(q.key===null?I:q.key)||null,$(T,A,q,X);case Xe:var ne=q._init;return K(A,T,I,ne(q._payload),X)}if(ds(q)||se(q))return A=A.get(I)||null,B(T,A,q,X,null);eo(T,q)}return null}function J(A,T,I,q){for(var X=null,ne=null,re=T,ie=T=0,We=null;re!==null&&ie<I.length;ie++){re.index>ie?(We=re,re=null):We=re.sibling;var ge=j(A,re,I[ie],q);if(ge===null){re===null&&(re=We);break}r&&re&&ge.alternate===null&&i(A,re),T=g(ge,T,ie),ne===null?X=ge:ne.sibling=ge,ne=ge,re=We}if(ie===I.length)return a(A,re),Ce&&Kn(A,ie),X;if(re===null){for(;ie<I.length;ie++)re=z(A,I[ie],q),re!==null&&(T=g(re,T,ie),ne===null?X=re:ne.sibling=re,ne=re);return Ce&&Kn(A,ie),X}for(re=c(A,re);ie<I.length;ie++)We=K(re,A,ie,I[ie],q),We!==null&&(r&&We.alternate!==null&&re.delete(We.key===null?ie:We.key),T=g(We,T,ie),ne===null?X=We:ne.sibling=We,ne=We);return r&&re.forEach(function(Rn){return i(A,Rn)}),Ce&&Kn(A,ie),X}function Y(A,T,I,q){var X=se(I);if(typeof X!="function")throw Error(t(150));if(I=X.call(I),I==null)throw Error(t(151));for(var ne=X=null,re=T,ie=T=0,We=null,ge=I.next();re!==null&&!ge.done;ie++,ge=I.next()){re.index>ie?(We=re,re=null):We=re.sibling;var Rn=j(A,re,ge.value,q);if(Rn===null){re===null&&(re=We);break}r&&re&&Rn.alternate===null&&i(A,re),T=g(Rn,T,ie),ne===null?X=Rn:ne.sibling=Rn,ne=Rn,re=We}if(ge.done)return a(A,re),Ce&&Kn(A,ie),X;if(re===null){for(;!ge.done;ie++,ge=I.next())ge=z(A,ge.value,q),ge!==null&&(T=g(ge,T,ie),ne===null?X=ge:ne.sibling=ge,ne=ge);return Ce&&Kn(A,ie),X}for(re=c(A,re);!ge.done;ie++,ge=I.next())ge=K(re,A,ie,ge.value,q),ge!==null&&(r&&ge.alternate!==null&&re.delete(ge.key===null?ie:ge.key),T=g(ge,T,ie),ne===null?X=ge:ne.sibling=ge,ne=ge);return r&&re.forEach(function(Ev){return i(A,Ev)}),Ce&&Kn(A,ie),X}function je(A,T,I,q){if(typeof I=="object"&&I!==null&&I.type===Z&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case V:e:{for(var X=I.key,ne=T;ne!==null;){if(ne.key===X){if(X=I.type,X===Z){if(ne.tag===7){a(A,ne.sibling),T=h(ne,I.props.children),T.return=A,A=T;break e}}else if(ne.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Xe&&bd(X)===ne.type){a(A,ne.sibling),T=h(ne,I.props),T.ref=js(A,ne,I),T.return=A,A=T;break e}a(A,ne);break}else i(A,ne);ne=ne.sibling}I.type===Z?(T=tr(I.props.children,A.mode,q,I.key),T.return=A,A=T):(q=bo(I.type,I.key,I.props,null,A.mode,q),q.ref=js(A,T,I),q.return=A,A=q)}return w(A);case U:e:{for(ne=I.key;T!==null;){if(T.key===ne)if(T.tag===4&&T.stateNode.containerInfo===I.containerInfo&&T.stateNode.implementation===I.implementation){a(A,T.sibling),T=h(T,I.children||[]),T.return=A,A=T;break e}else{a(A,T);break}else i(A,T);T=T.sibling}T=ku(I,A.mode,q),T.return=A,A=T}return w(A);case Xe:return ne=I._init,je(A,T,ne(I._payload),q)}if(ds(I))return J(A,T,I,q);if(se(I))return Y(A,T,I,q);eo(A,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,T!==null&&T.tag===6?(a(A,T.sibling),T=h(T,I),T.return=A,A=T):(a(A,T),T=Eu(I,A.mode,q),T.return=A,A=T),w(A)):a(A,T)}return je}var Ar=Td(!0),Cd=Td(!1),to=bn(null),no=null,Lr=null,Oa=null;function $a(){Oa=Lr=no=null}function Ma(r){var i=to.current;xe(to),r._currentValue=i}function Pa(r,i,a){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===a)break;r=r.return}}function Ir(r,i){no=r,Oa=Lr=null,r=r.dependencies,r!==null&&r.firstContext!==null&&(r.lanes&i&&(pt=!0),r.firstContext=null)}function Ot(r){var i=r._currentValue;if(Oa!==r)if(r={context:r,memoizedValue:i,next:null},Lr===null){if(no===null)throw Error(t(308));Lr=r,no.dependencies={lanes:0,firstContext:r}}else Lr=Lr.next=r;return i}var Qn=null;function Ra(r){Qn===null?Qn=[r]:Qn.push(r)}function Nd(r,i,a,c){var h=i.interleaved;return h===null?(a.next=a,Ra(i)):(a.next=h.next,h.next=a),i.interleaved=a,un(r,c)}function un(r,i){r.lanes|=i;var a=r.alternate;for(a!==null&&(a.lanes|=i),a=r,r=r.return;r!==null;)r.childLanes|=i,a=r.alternate,a!==null&&(a.childLanes|=i),a=r,r=r.return;return a.tag===3?a.stateNode:null}var Nn=!1;function ja(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ad(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function cn(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function An(r,i,a){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,de&2){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,un(r,a)}return h=c.interleaved,h===null?(i.next=i,Ra(c)):(i.next=h.next,h.next=i),c.interleaved=i,un(r,a)}function ro(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,Yl(r,a)}}function Ld(r,i){var a=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var w={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?h=g=w:g=g.next=w,a=a.next}while(a!==null);g===null?h=g=i:g=g.next=i}else h=g=i;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,effects:c.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}function so(r,i,a,c){var h=r.updateQueue;Nn=!1;var g=h.firstBaseUpdate,w=h.lastBaseUpdate,k=h.shared.pending;if(k!==null){h.shared.pending=null;var b=k,$=b.next;b.next=null,w===null?g=$:w.next=$,w=b;var B=r.alternate;B!==null&&(B=B.updateQueue,k=B.lastBaseUpdate,k!==w&&(k===null?B.firstBaseUpdate=$:k.next=$,B.lastBaseUpdate=b))}if(g!==null){var z=h.baseState;w=0,B=$=b=null,k=g;do{var j=k.lane,K=k.eventTime;if((c&j)===j){B!==null&&(B=B.next={eventTime:K,lane:0,tag:k.tag,payload:k.payload,callback:k.callback,next:null});e:{var J=r,Y=k;switch(j=i,K=a,Y.tag){case 1:if(J=Y.payload,typeof J=="function"){z=J.call(K,z,j);break e}z=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=Y.payload,j=typeof J=="function"?J.call(K,z,j):J,j==null)break e;z=G({},z,j);break e;case 2:Nn=!0}}k.callback!==null&&k.lane!==0&&(r.flags|=64,j=h.effects,j===null?h.effects=[k]:j.push(k))}else K={eventTime:K,lane:j,tag:k.tag,payload:k.payload,callback:k.callback,next:null},B===null?($=B=K,b=z):B=B.next=K,w|=j;if(k=k.next,k===null){if(k=h.shared.pending,k===null)break;j=k,k=j.next,j.next=null,h.lastBaseUpdate=j,h.shared.pending=null}}while(!0);if(B===null&&(b=z),h.baseState=b,h.firstBaseUpdate=$,h.lastBaseUpdate=B,i=h.shared.interleaved,i!==null){h=i;do w|=h.lane,h=h.next;while(h!==i)}else g===null&&(h.shared.lanes=0);Yn|=w,r.lanes=w,r.memoizedState=z}}function Id(r,i,a){if(r=i.effects,i.effects=null,r!==null)for(i=0;i<r.length;i++){var c=r[i],h=c.callback;if(h!==null){if(c.callback=null,c=a,typeof h!="function")throw Error(t(191,h));h.call(c)}}}var Ds={},Zt=bn(Ds),Fs=bn(Ds),Bs=bn(Ds);function Gn(r){if(r===Ds)throw Error(t(174));return r}function Da(r,i){switch(_e(Bs,i),_e(Fs,r),_e(Zt,Ds),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:Fl(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=Fl(i,r)}xe(Zt),_e(Zt,i)}function Or(){xe(Zt),xe(Fs),xe(Bs)}function Od(r){Gn(Bs.current);var i=Gn(Zt.current),a=Fl(i,r.type);i!==a&&(_e(Fs,r),_e(Zt,a))}function Fa(r){Fs.current===r&&(xe(Zt),xe(Fs))}var Ie=bn(0);function io(r){for(var i=r;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if(i.flags&128)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Ba=[];function za(){for(var r=0;r<Ba.length;r++)Ba[r]._workInProgressVersionPrimary=null;Ba.length=0}var oo=D.ReactCurrentDispatcher,Ua=D.ReactCurrentBatchConfig,Jn=0,Oe=null,ze=null,He=null,lo=!1,zs=!1,Us=0,Hw=0;function et(){throw Error(t(321))}function qa(r,i){if(i===null)return!1;for(var a=0;a<i.length&&a<r.length;a++)if(!zt(r[a],i[a]))return!1;return!0}function Ha(r,i,a,c,h,g){if(Jn=g,Oe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,oo.current=r===null||r.memoizedState===null?Qw:Gw,r=a(c,h),zs){g=0;do{if(zs=!1,Us=0,25<=g)throw Error(t(301));g+=1,He=ze=null,i.updateQueue=null,oo.current=Jw,r=a(c,h)}while(zs)}if(oo.current=co,i=ze!==null&&ze.next!==null,Jn=0,He=ze=Oe=null,lo=!1,i)throw Error(t(300));return r}function Va(){var r=Us!==0;return Us=0,r}function en(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?Oe.memoizedState=He=r:He=He.next=r,He}function $t(){if(ze===null){var r=Oe.alternate;r=r!==null?r.memoizedState:null}else r=ze.next;var i=He===null?Oe.memoizedState:He.next;if(i!==null)He=i,ze=r;else{if(r===null)throw Error(t(310));ze=r,r={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},He===null?Oe.memoizedState=He=r:He=He.next=r}return He}function qs(r,i){return typeof i=="function"?i(r):i}function Wa(r){var i=$t(),a=i.queue;if(a===null)throw Error(t(311));a.lastRenderedReducer=r;var c=ze,h=c.baseQueue,g=a.pending;if(g!==null){if(h!==null){var w=h.next;h.next=g.next,g.next=w}c.baseQueue=h=g,a.pending=null}if(h!==null){g=h.next,c=c.baseState;var k=w=null,b=null,$=g;do{var B=$.lane;if((Jn&B)===B)b!==null&&(b=b.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),c=$.hasEagerState?$.eagerState:r(c,$.action);else{var z={lane:B,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};b===null?(k=b=z,w=c):b=b.next=z,Oe.lanes|=B,Yn|=B}$=$.next}while($!==null&&$!==g);b===null?w=c:b.next=k,zt(c,i.memoizedState)||(pt=!0),i.memoizedState=c,i.baseState=w,i.baseQueue=b,a.lastRenderedState=c}if(r=a.interleaved,r!==null){h=r;do g=h.lane,Oe.lanes|=g,Yn|=g,h=h.next;while(h!==r)}else h===null&&(a.lanes=0);return[i.memoizedState,a.dispatch]}function Ka(r){var i=$t(),a=i.queue;if(a===null)throw Error(t(311));a.lastRenderedReducer=r;var c=a.dispatch,h=a.pending,g=i.memoizedState;if(h!==null){a.pending=null;var w=h=h.next;do g=r(g,w.action),w=w.next;while(w!==h);zt(g,i.memoizedState)||(pt=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),a.lastRenderedState=g}return[g,c]}function $d(){}function Md(r,i){var a=Oe,c=$t(),h=i(),g=!zt(c.memoizedState,h);if(g&&(c.memoizedState=h,pt=!0),c=c.queue,Qa(jd.bind(null,a,c,r),[r]),c.getSnapshot!==i||g||He!==null&&He.memoizedState.tag&1){if(a.flags|=2048,Hs(9,Rd.bind(null,a,c,h,i),void 0,null),Ve===null)throw Error(t(349));Jn&30||Pd(a,i,h)}return h}function Pd(r,i,a){r.flags|=16384,r={getSnapshot:i,value:a},i=Oe.updateQueue,i===null?(i={lastEffect:null,stores:null},Oe.updateQueue=i,i.stores=[r]):(a=i.stores,a===null?i.stores=[r]:a.push(r))}function Rd(r,i,a,c){i.value=a,i.getSnapshot=c,Dd(i)&&Fd(r)}function jd(r,i,a){return a(function(){Dd(i)&&Fd(r)})}function Dd(r){var i=r.getSnapshot;r=r.value;try{var a=i();return!zt(r,a)}catch{return!0}}function Fd(r){var i=un(r,1);i!==null&&Wt(i,r,1,-1)}function Bd(r){var i=en();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qs,lastRenderedState:r},i.queue=r,r=r.dispatch=Kw.bind(null,Oe,r),[i.memoizedState,r]}function Hs(r,i,a,c){return r={tag:r,create:i,destroy:a,deps:c,next:null},i=Oe.updateQueue,i===null?(i={lastEffect:null,stores:null},Oe.updateQueue=i,i.lastEffect=r.next=r):(a=i.lastEffect,a===null?i.lastEffect=r.next=r:(c=a.next,a.next=r,r.next=c,i.lastEffect=r)),r}function zd(){return $t().memoizedState}function ao(r,i,a,c){var h=en();Oe.flags|=r,h.memoizedState=Hs(1|i,a,void 0,c===void 0?null:c)}function uo(r,i,a,c){var h=$t();c=c===void 0?null:c;var g=void 0;if(ze!==null){var w=ze.memoizedState;if(g=w.destroy,c!==null&&qa(c,w.deps)){h.memoizedState=Hs(i,a,g,c);return}}Oe.flags|=r,h.memoizedState=Hs(1|i,a,g,c)}function Ud(r,i){return ao(8390656,8,r,i)}function Qa(r,i){return uo(2048,8,r,i)}function qd(r,i){return uo(4,2,r,i)}function Hd(r,i){return uo(4,4,r,i)}function Vd(r,i){if(typeof i=="function")return r=r(),i(r),function(){i(null)};if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function Wd(r,i,a){return a=a!=null?a.concat([r]):null,uo(4,4,Vd.bind(null,i,r),a)}function Ga(){}function Kd(r,i){var a=$t();i=i===void 0?null:i;var c=a.memoizedState;return c!==null&&i!==null&&qa(i,c[1])?c[0]:(a.memoizedState=[r,i],r)}function Qd(r,i){var a=$t();i=i===void 0?null:i;var c=a.memoizedState;return c!==null&&i!==null&&qa(i,c[1])?c[0]:(r=r(),a.memoizedState=[r,i],r)}function Gd(r,i,a){return Jn&21?(zt(a,i)||(a=bf(),Oe.lanes|=a,Yn|=a,r.baseState=!0),i):(r.baseState&&(r.baseState=!1,pt=!0),r.memoizedState=a)}function Vw(r,i){var a=ye;ye=a!==0&&4>a?a:4,r(!0);var c=Ua.transition;Ua.transition={};try{r(!1),i()}finally{ye=a,Ua.transition=c}}function Jd(){return $t().memoizedState}function Ww(r,i,a){var c=$n(r);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},Yd(r))Xd(i,a);else if(a=Nd(r,i,a,c),a!==null){var h=ot();Wt(a,r,c,h),Zd(a,i,c)}}function Kw(r,i,a){var c=$n(r),h={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(Yd(r))Xd(i,h);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var w=i.lastRenderedState,k=g(w,a);if(h.hasEagerState=!0,h.eagerState=k,zt(k,w)){var b=i.interleaved;b===null?(h.next=h,Ra(i)):(h.next=b.next,b.next=h),i.interleaved=h;return}}catch{}finally{}a=Nd(r,i,h,c),a!==null&&(h=ot(),Wt(a,r,c,h),Zd(a,i,c))}}function Yd(r){var i=r.alternate;return r===Oe||i!==null&&i===Oe}function Xd(r,i){zs=lo=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function Zd(r,i,a){if(a&4194240){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,Yl(r,a)}}var co={readContext:Ot,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useInsertionEffect:et,useLayoutEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useMutableSource:et,useSyncExternalStore:et,useId:et,unstable_isNewReconciler:!1},Qw={readContext:Ot,useCallback:function(r,i){return en().memoizedState=[r,i===void 0?null:i],r},useContext:Ot,useEffect:Ud,useImperativeHandle:function(r,i,a){return a=a!=null?a.concat([r]):null,ao(4194308,4,Vd.bind(null,i,r),a)},useLayoutEffect:function(r,i){return ao(4194308,4,r,i)},useInsertionEffect:function(r,i){return ao(4,2,r,i)},useMemo:function(r,i){var a=en();return i=i===void 0?null:i,r=r(),a.memoizedState=[r,i],r},useReducer:function(r,i,a){var c=en();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},c.queue=r,r=r.dispatch=Ww.bind(null,Oe,r),[c.memoizedState,r]},useRef:function(r){var i=en();return r={current:r},i.memoizedState=r},useState:Bd,useDebugValue:Ga,useDeferredValue:function(r){return en().memoizedState=r},useTransition:function(){var r=Bd(!1),i=r[0];return r=Vw.bind(null,r[1]),en().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,a){var c=Oe,h=en();if(Ce){if(a===void 0)throw Error(t(407));a=a()}else{if(a=i(),Ve===null)throw Error(t(349));Jn&30||Pd(c,i,a)}h.memoizedState=a;var g={value:a,getSnapshot:i};return h.queue=g,Ud(jd.bind(null,c,g,r),[r]),c.flags|=2048,Hs(9,Rd.bind(null,c,g,a,i),void 0,null),a},useId:function(){var r=en(),i=Ve.identifierPrefix;if(Ce){var a=an,c=ln;a=(c&~(1<<32-Bt(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=Us++,0<a&&(i+="H"+a.toString(32)),i+=":"}else a=Hw++,i=":"+i+"r"+a.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},Gw={readContext:Ot,useCallback:Kd,useContext:Ot,useEffect:Qa,useImperativeHandle:Wd,useInsertionEffect:qd,useLayoutEffect:Hd,useMemo:Qd,useReducer:Wa,useRef:zd,useState:function(){return Wa(qs)},useDebugValue:Ga,useDeferredValue:function(r){var i=$t();return Gd(i,ze.memoizedState,r)},useTransition:function(){var r=Wa(qs)[0],i=$t().memoizedState;return[r,i]},useMutableSource:$d,useSyncExternalStore:Md,useId:Jd,unstable_isNewReconciler:!1},Jw={readContext:Ot,useCallback:Kd,useContext:Ot,useEffect:Qa,useImperativeHandle:Wd,useInsertionEffect:qd,useLayoutEffect:Hd,useMemo:Qd,useReducer:Ka,useRef:zd,useState:function(){return Ka(qs)},useDebugValue:Ga,useDeferredValue:function(r){var i=$t();return ze===null?i.memoizedState=r:Gd(i,ze.memoizedState,r)},useTransition:function(){var r=Ka(qs)[0],i=$t().memoizedState;return[r,i]},useMutableSource:$d,useSyncExternalStore:Md,useId:Jd,unstable_isNewReconciler:!1};function qt(r,i){if(r&&r.defaultProps){i=G({},i),r=r.defaultProps;for(var a in r)i[a]===void 0&&(i[a]=r[a]);return i}return i}function Ja(r,i,a,c){i=r.memoizedState,a=a(c,i),a=a==null?i:G({},i,a),r.memoizedState=a,r.lanes===0&&(r.updateQueue.baseState=a)}var fo={isMounted:function(r){return(r=r._reactInternals)?qn(r)===r:!1},enqueueSetState:function(r,i,a){r=r._reactInternals;var c=ot(),h=$n(r),g=cn(c,h);g.payload=i,a!=null&&(g.callback=a),i=An(r,g,h),i!==null&&(Wt(i,r,h,c),ro(i,r,h))},enqueueReplaceState:function(r,i,a){r=r._reactInternals;var c=ot(),h=$n(r),g=cn(c,h);g.tag=1,g.payload=i,a!=null&&(g.callback=a),i=An(r,g,h),i!==null&&(Wt(i,r,h,c),ro(i,r,h))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var a=ot(),c=$n(r),h=cn(a,c);h.tag=2,i!=null&&(h.callback=i),i=An(r,h,c),i!==null&&(Wt(i,r,c,a),ro(i,r,c))}};function eh(r,i,a,c,h,g,w){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,g,w):i.prototype&&i.prototype.isPureReactComponent?!Ls(a,c)||!Ls(h,g):!0}function th(r,i,a){var c=!1,h=Tn,g=i.contextType;return typeof g=="object"&&g!==null?g=Ot(g):(h=ht(i)?Vn:Ze.current,c=i.contextTypes,g=(c=c!=null)?br(r,h):Tn),i=new i(a,g),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=fo,r.stateNode=i,i._reactInternals=r,c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=h,r.__reactInternalMemoizedMaskedChildContext=g),i}function nh(r,i,a,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,c),i.state!==r&&fo.enqueueReplaceState(i,i.state,null)}function Ya(r,i,a,c){var h=r.stateNode;h.props=a,h.state=r.memoizedState,h.refs={},ja(r);var g=i.contextType;typeof g=="object"&&g!==null?h.context=Ot(g):(g=ht(i)?Vn:Ze.current,h.context=br(r,g)),h.state=r.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(Ja(r,i,g,a),h.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(i=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),i!==h.state&&fo.enqueueReplaceState(h,h.state,null),so(r,a,h,c),h.state=r.memoizedState),typeof h.componentDidMount=="function"&&(r.flags|=4194308)}function $r(r,i){try{var a="",c=i;do a+=he(c),c=c.return;while(c);var h=a}catch(g){h=`
40
- Error generating stack: `+g.message+`
41
- `+g.stack}return{value:r,source:i,stack:h,digest:null}}function Xa(r,i,a){return{value:r,source:null,stack:a??null,digest:i??null}}function Za(r,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var Yw=typeof WeakMap=="function"?WeakMap:Map;function rh(r,i,a){a=cn(-1,a),a.tag=3,a.payload={element:null};var c=i.value;return a.callback=function(){vo||(vo=!0,pu=c),Za(r,i)},a}function sh(r,i,a){a=cn(-1,a),a.tag=3;var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var h=i.value;a.payload=function(){return c(h)},a.callback=function(){Za(r,i)}}var g=r.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){Za(r,i),typeof c!="function"&&(In===null?In=new Set([this]):In.add(this));var w=i.stack;this.componentDidCatch(i.value,{componentStack:w!==null?w:""})}),a}function ih(r,i,a){var c=r.pingCache;if(c===null){c=r.pingCache=new Yw;var h=new Set;c.set(i,h)}else h=c.get(i),h===void 0&&(h=new Set,c.set(i,h));h.has(a)||(h.add(a),r=fv.bind(null,r,i,a),i.then(r,r))}function oh(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function lh(r,i,a,c,h){return r.mode&1?(r.flags|=65536,r.lanes=h,r):(r===i?r.flags|=65536:(r.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=cn(-1,1),i.tag=2,An(a,i,1))),a.lanes|=1),r)}var Xw=D.ReactCurrentOwner,pt=!1;function it(r,i,a,c){i.child=r===null?Cd(i,null,a,c):Ar(i,r.child,a,c)}function ah(r,i,a,c,h){a=a.render;var g=i.ref;return Ir(i,h),c=Ha(r,i,a,c,g,h),a=Va(),r!==null&&!pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~h,fn(r,i,h)):(Ce&&a&&Ca(i),i.flags|=1,it(r,i,c,h),i.child)}function uh(r,i,a,c,h){if(r===null){var g=a.type;return typeof g=="function"&&!_u(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=g,ch(r,i,g,c,h)):(r=bo(a.type,null,c,i,i.mode,h),r.ref=i.ref,r.return=i,i.child=r)}if(g=r.child,!(r.lanes&h)){var w=g.memoizedProps;if(a=a.compare,a=a!==null?a:Ls,a(w,c)&&r.ref===i.ref)return fn(r,i,h)}return i.flags|=1,r=Pn(g,c),r.ref=i.ref,r.return=i,i.child=r}function ch(r,i,a,c,h){if(r!==null){var g=r.memoizedProps;if(Ls(g,c)&&r.ref===i.ref)if(pt=!1,i.pendingProps=c=g,(r.lanes&h)!==0)r.flags&131072&&(pt=!0);else return i.lanes=r.lanes,fn(r,i,h)}return eu(r,i,a,c,h)}function fh(r,i,a){var c=i.pendingProps,h=c.children,g=r!==null?r.memoizedState:null;if(c.mode==="hidden")if(!(i.mode&1))i.memoizedState={baseLanes:0,cachePool:null,transitions:null},_e(Pr,Nt),Nt|=a;else{if(!(a&1073741824))return r=g!==null?g.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,_e(Pr,Nt),Nt|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:a,_e(Pr,Nt),Nt|=c}else g!==null?(c=g.baseLanes|a,i.memoizedState=null):c=a,_e(Pr,Nt),Nt|=c;return it(r,i,h,a),i.child}function dh(r,i){var a=i.ref;(r===null&&a!==null||r!==null&&r.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function eu(r,i,a,c,h){var g=ht(a)?Vn:Ze.current;return g=br(i,g),Ir(i,h),a=Ha(r,i,a,c,g,h),c=Va(),r!==null&&!pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~h,fn(r,i,h)):(Ce&&c&&Ca(i),i.flags|=1,it(r,i,a,h),i.child)}function hh(r,i,a,c,h){if(ht(a)){var g=!0;Gi(i)}else g=!1;if(Ir(i,h),i.stateNode===null)po(r,i),th(i,a,c),Ya(i,a,c,h),c=!0;else if(r===null){var w=i.stateNode,k=i.memoizedProps;w.props=k;var b=w.context,$=a.contextType;typeof $=="object"&&$!==null?$=Ot($):($=ht(a)?Vn:Ze.current,$=br(i,$));var B=a.getDerivedStateFromProps,z=typeof B=="function"||typeof w.getSnapshotBeforeUpdate=="function";z||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(k!==c||b!==$)&&nh(i,w,c,$),Nn=!1;var j=i.memoizedState;w.state=j,so(i,c,w,h),b=i.memoizedState,k!==c||j!==b||dt.current||Nn?(typeof B=="function"&&(Ja(i,a,B,c),b=i.memoizedState),(k=Nn||eh(i,a,k,c,j,b,$))?(z||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(i.flags|=4194308)):(typeof w.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=b),w.props=c,w.state=b,w.context=$,c=k):(typeof w.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{w=i.stateNode,Ad(r,i),k=i.memoizedProps,$=i.type===i.elementType?k:qt(i.type,k),w.props=$,z=i.pendingProps,j=w.context,b=a.contextType,typeof b=="object"&&b!==null?b=Ot(b):(b=ht(a)?Vn:Ze.current,b=br(i,b));var K=a.getDerivedStateFromProps;(B=typeof K=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(k!==z||j!==b)&&nh(i,w,c,b),Nn=!1,j=i.memoizedState,w.state=j,so(i,c,w,h);var J=i.memoizedState;k!==z||j!==J||dt.current||Nn?(typeof K=="function"&&(Ja(i,a,K,c),J=i.memoizedState),($=Nn||eh(i,a,$,c,j,J,b)||!1)?(B||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(c,J,b),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(c,J,b)),typeof w.componentDidUpdate=="function"&&(i.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof w.componentDidUpdate!="function"||k===r.memoizedProps&&j===r.memoizedState||(i.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||k===r.memoizedProps&&j===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=J),w.props=c,w.state=J,w.context=b,c=$):(typeof w.componentDidUpdate!="function"||k===r.memoizedProps&&j===r.memoizedState||(i.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||k===r.memoizedProps&&j===r.memoizedState||(i.flags|=1024),c=!1)}return tu(r,i,a,c,g,h)}function tu(r,i,a,c,h,g){dh(r,i);var w=(i.flags&128)!==0;if(!c&&!w)return h&&wd(i,a,!1),fn(r,i,g);c=i.stateNode,Xw.current=i;var k=w&&typeof a.getDerivedStateFromError!="function"?null:c.render();return i.flags|=1,r!==null&&w?(i.child=Ar(i,r.child,null,g),i.child=Ar(i,null,k,g)):it(r,i,k,g),i.memoizedState=c.state,h&&wd(i,a,!0),i.child}function ph(r){var i=r.stateNode;i.pendingContext?md(r,i.pendingContext,i.pendingContext!==i.context):i.context&&md(r,i.context,!1),Da(r,i.containerInfo)}function gh(r,i,a,c,h){return Nr(),Ia(h),i.flags|=256,it(r,i,a,c),i.child}var nu={dehydrated:null,treeContext:null,retryLane:0};function ru(r){return{baseLanes:r,cachePool:null,transitions:null}}function mh(r,i,a){var c=i.pendingProps,h=Ie.current,g=!1,w=(i.flags&128)!==0,k;if((k=w)||(k=r!==null&&r.memoizedState===null?!1:(h&2)!==0),k?(g=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(h|=1),_e(Ie,h&1),r===null)return La(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?(i.mode&1?r.data==="$!"?i.lanes=8:i.lanes=1073741824:i.lanes=1,null):(w=c.children,r=c.fallback,g?(c=i.mode,g=i.child,w={mode:"hidden",children:w},!(c&1)&&g!==null?(g.childLanes=0,g.pendingProps=w):g=To(w,c,0,null),r=tr(r,c,a,null),g.return=i,r.return=i,g.sibling=r,i.child=g,i.child.memoizedState=ru(a),i.memoizedState=nu,r):su(i,w));if(h=r.memoizedState,h!==null&&(k=h.dehydrated,k!==null))return Zw(r,i,w,c,k,h,a);if(g){g=c.fallback,w=i.mode,h=r.child,k=h.sibling;var b={mode:"hidden",children:c.children};return!(w&1)&&i.child!==h?(c=i.child,c.childLanes=0,c.pendingProps=b,i.deletions=null):(c=Pn(h,b),c.subtreeFlags=h.subtreeFlags&14680064),k!==null?g=Pn(k,g):(g=tr(g,w,a,null),g.flags|=2),g.return=i,c.return=i,c.sibling=g,i.child=c,c=g,g=i.child,w=r.child.memoizedState,w=w===null?ru(a):{baseLanes:w.baseLanes|a,cachePool:null,transitions:w.transitions},g.memoizedState=w,g.childLanes=r.childLanes&~a,i.memoizedState=nu,c}return g=r.child,r=g.sibling,c=Pn(g,{mode:"visible",children:c.children}),!(i.mode&1)&&(c.lanes=a),c.return=i,c.sibling=null,r!==null&&(a=i.deletions,a===null?(i.deletions=[r],i.flags|=16):a.push(r)),i.child=c,i.memoizedState=null,c}function su(r,i){return i=To({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function ho(r,i,a,c){return c!==null&&Ia(c),Ar(i,r.child,null,a),r=su(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function Zw(r,i,a,c,h,g,w){if(a)return i.flags&256?(i.flags&=-257,c=Xa(Error(t(422))),ho(r,i,w,c)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(g=c.fallback,h=i.mode,c=To({mode:"visible",children:c.children},h,0,null),g=tr(g,h,w,null),g.flags|=2,c.return=i,g.return=i,c.sibling=g,i.child=c,i.mode&1&&Ar(i,r.child,null,w),i.child.memoizedState=ru(w),i.memoizedState=nu,g);if(!(i.mode&1))return ho(r,i,w,null);if(h.data==="$!"){if(c=h.nextSibling&&h.nextSibling.dataset,c)var k=c.dgst;return c=k,g=Error(t(419)),c=Xa(g,c,void 0),ho(r,i,w,c)}if(k=(w&r.childLanes)!==0,pt||k){if(c=Ve,c!==null){switch(w&-w){case 4:h=2;break;case 16:h=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=h&(c.suspendedLanes|w)?0:h,h!==0&&h!==g.retryLane&&(g.retryLane=h,un(r,h),Wt(c,r,h,-1))}return Su(),c=Xa(Error(t(421))),ho(r,i,w,c)}return h.data==="$?"?(i.flags|=128,i.child=r.child,i=dv.bind(null,r),h._reactRetry=i,null):(r=g.treeContext,Ct=xn(h.nextSibling),Tt=i,Ce=!0,Ut=null,r!==null&&(Lt[It++]=ln,Lt[It++]=an,Lt[It++]=Wn,ln=r.id,an=r.overflow,Wn=i),i=su(i,c.children),i.flags|=4096,i)}function yh(r,i,a){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Pa(r.return,i,a)}function iu(r,i,a,c,h){var g=r.memoizedState;g===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h}:(g.isBackwards=i,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=h)}function wh(r,i,a){var c=i.pendingProps,h=c.revealOrder,g=c.tail;if(it(r,i,c.children,a),c=Ie.current,c&2)c=c&1|2,i.flags|=128;else{if(r!==null&&r.flags&128)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&yh(r,a,i);else if(r.tag===19)yh(r,a,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}c&=1}if(_e(Ie,c),!(i.mode&1))i.memoizedState=null;else switch(h){case"forwards":for(a=i.child,h=null;a!==null;)r=a.alternate,r!==null&&io(r)===null&&(h=a),a=a.sibling;a=h,a===null?(h=i.child,i.child=null):(h=a.sibling,a.sibling=null),iu(i,!1,h,a,g);break;case"backwards":for(a=null,h=i.child,i.child=null;h!==null;){if(r=h.alternate,r!==null&&io(r)===null){i.child=h;break}r=h.sibling,h.sibling=a,a=h,h=r}iu(i,!0,a,null,g);break;case"together":iu(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function po(r,i){!(i.mode&1)&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function fn(r,i,a){if(r!==null&&(i.dependencies=r.dependencies),Yn|=i.lanes,!(a&i.childLanes))return null;if(r!==null&&i.child!==r.child)throw Error(t(153));if(i.child!==null){for(r=i.child,a=Pn(r,r.pendingProps),i.child=a,a.return=i;r.sibling!==null;)r=r.sibling,a=a.sibling=Pn(r,r.pendingProps),a.return=i;a.sibling=null}return i.child}function ev(r,i,a){switch(i.tag){case 3:ph(i),Nr();break;case 5:Od(i);break;case 1:ht(i.type)&&Gi(i);break;case 4:Da(i,i.stateNode.containerInfo);break;case 10:var c=i.type._context,h=i.memoizedProps.value;_e(to,c._currentValue),c._currentValue=h;break;case 13:if(c=i.memoizedState,c!==null)return c.dehydrated!==null?(_e(Ie,Ie.current&1),i.flags|=128,null):a&i.child.childLanes?mh(r,i,a):(_e(Ie,Ie.current&1),r=fn(r,i,a),r!==null?r.sibling:null);_e(Ie,Ie.current&1);break;case 19:if(c=(a&i.childLanes)!==0,r.flags&128){if(c)return wh(r,i,a);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),_e(Ie,Ie.current),c)break;return null;case 22:case 23:return i.lanes=0,fh(r,i,a)}return fn(r,i,a)}var vh,ou,Sh,_h;vh=function(r,i){for(var a=i.child;a!==null;){if(a.tag===5||a.tag===6)r.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},ou=function(){},Sh=function(r,i,a,c){var h=r.memoizedProps;if(h!==c){r=i.stateNode,Gn(Zt.current);var g=null;switch(a){case"input":h=Pl(r,h),c=Pl(r,c),g=[];break;case"select":h=G({},h,{value:void 0}),c=G({},c,{value:void 0}),g=[];break;case"textarea":h=Dl(r,h),c=Dl(r,c),g=[];break;default:typeof h.onClick!="function"&&typeof c.onClick=="function"&&(r.onclick=Wi)}Bl(a,c);var w;a=null;for($ in h)if(!c.hasOwnProperty($)&&h.hasOwnProperty($)&&h[$]!=null)if($==="style"){var k=h[$];for(w in k)k.hasOwnProperty(w)&&(a||(a={}),a[w]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(o.hasOwnProperty($)?g||(g=[]):(g=g||[]).push($,null));for($ in c){var b=c[$];if(k=h!=null?h[$]:void 0,c.hasOwnProperty($)&&b!==k&&(b!=null||k!=null))if($==="style")if(k){for(w in k)!k.hasOwnProperty(w)||b&&b.hasOwnProperty(w)||(a||(a={}),a[w]="");for(w in b)b.hasOwnProperty(w)&&k[w]!==b[w]&&(a||(a={}),a[w]=b[w])}else a||(g||(g=[]),g.push($,a)),a=b;else $==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,k=k?k.__html:void 0,b!=null&&k!==b&&(g=g||[]).push($,b)):$==="children"?typeof b!="string"&&typeof b!="number"||(g=g||[]).push($,""+b):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(o.hasOwnProperty($)?(b!=null&&$==="onScroll"&&ke("scroll",r),g||k===b||(g=[])):(g=g||[]).push($,b))}a&&(g=g||[]).push("style",a);var $=g;(i.updateQueue=$)&&(i.flags|=4)}},_h=function(r,i,a,c){a!==c&&(i.flags|=4)};function Vs(r,i){if(!Ce)switch(r.tailMode){case"hidden":i=r.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?r.tail=null:a.sibling=null;break;case"collapsed":a=r.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function tt(r){var i=r.alternate!==null&&r.alternate.child===r.child,a=0,c=0;if(i)for(var h=r.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&14680064,c|=h.flags&14680064,h.return=r,h=h.sibling;else for(h=r.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=r,h=h.sibling;return r.subtreeFlags|=c,r.childLanes=a,i}function tv(r,i,a){var c=i.pendingProps;switch(Na(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(i),null;case 1:return ht(i.type)&&Qi(),tt(i),null;case 3:return c=i.stateNode,Or(),xe(dt),xe(Ze),za(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(Zi(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&!(i.flags&256)||(i.flags|=1024,Ut!==null&&(yu(Ut),Ut=null))),ou(r,i),tt(i),null;case 5:Fa(i);var h=Gn(Bs.current);if(a=i.type,r!==null&&i.stateNode!=null)Sh(r,i,a,c,h),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!c){if(i.stateNode===null)throw Error(t(166));return tt(i),null}if(r=Gn(Zt.current),Zi(i)){c=i.stateNode,a=i.type;var g=i.memoizedProps;switch(c[Xt]=i,c[Ps]=g,r=(i.mode&1)!==0,a){case"dialog":ke("cancel",c),ke("close",c);break;case"iframe":case"object":case"embed":ke("load",c);break;case"video":case"audio":for(h=0;h<Os.length;h++)ke(Os[h],c);break;case"source":ke("error",c);break;case"img":case"image":case"link":ke("error",c),ke("load",c);break;case"details":ke("toggle",c);break;case"input":ef(c,g),ke("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!g.multiple},ke("invalid",c);break;case"textarea":rf(c,g),ke("invalid",c)}Bl(a,g),h=null;for(var w in g)if(g.hasOwnProperty(w)){var k=g[w];w==="children"?typeof k=="string"?c.textContent!==k&&(g.suppressHydrationWarning!==!0&&Vi(c.textContent,k,r),h=["children",k]):typeof k=="number"&&c.textContent!==""+k&&(g.suppressHydrationWarning!==!0&&Vi(c.textContent,k,r),h=["children",""+k]):o.hasOwnProperty(w)&&k!=null&&w==="onScroll"&&ke("scroll",c)}switch(a){case"input":Ei(c),nf(c,g,!0);break;case"textarea":Ei(c),of(c);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(c.onclick=Wi)}c=h,i.updateQueue=c,c!==null&&(i.flags|=4)}else{w=h.nodeType===9?h:h.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=lf(a)),r==="http://www.w3.org/1999/xhtml"?a==="script"?(r=w.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=w.createElement(a,{is:c.is}):(r=w.createElement(a),a==="select"&&(w=r,c.multiple?w.multiple=!0:c.size&&(w.size=c.size))):r=w.createElementNS(r,a),r[Xt]=i,r[Ps]=c,vh(r,i,!1,!1),i.stateNode=r;e:{switch(w=zl(a,c),a){case"dialog":ke("cancel",r),ke("close",r),h=c;break;case"iframe":case"object":case"embed":ke("load",r),h=c;break;case"video":case"audio":for(h=0;h<Os.length;h++)ke(Os[h],r);h=c;break;case"source":ke("error",r),h=c;break;case"img":case"image":case"link":ke("error",r),ke("load",r),h=c;break;case"details":ke("toggle",r),h=c;break;case"input":ef(r,c),h=Pl(r,c),ke("invalid",r);break;case"option":h=c;break;case"select":r._wrapperState={wasMultiple:!!c.multiple},h=G({},c,{value:void 0}),ke("invalid",r);break;case"textarea":rf(r,c),h=Dl(r,c),ke("invalid",r);break;default:h=c}Bl(a,h),k=h;for(g in k)if(k.hasOwnProperty(g)){var b=k[g];g==="style"?cf(r,b):g==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,b!=null&&af(r,b)):g==="children"?typeof b=="string"?(a!=="textarea"||b!=="")&&hs(r,b):typeof b=="number"&&hs(r,""+b):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(o.hasOwnProperty(g)?b!=null&&g==="onScroll"&&ke("scroll",r):b!=null&&P(r,g,b,w))}switch(a){case"input":Ei(r),nf(r,c,!1);break;case"textarea":Ei(r),of(r);break;case"option":c.value!=null&&r.setAttribute("value",""+me(c.value));break;case"select":r.multiple=!!c.multiple,g=c.value,g!=null?hr(r,!!c.multiple,g,!1):c.defaultValue!=null&&hr(r,!!c.multiple,c.defaultValue,!0);break;default:typeof h.onClick=="function"&&(r.onclick=Wi)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return tt(i),null;case 6:if(r&&i.stateNode!=null)_h(r,i,r.memoizedProps,c);else{if(typeof c!="string"&&i.stateNode===null)throw Error(t(166));if(a=Gn(Bs.current),Gn(Zt.current),Zi(i)){if(c=i.stateNode,a=i.memoizedProps,c[Xt]=i,(g=c.nodeValue!==a)&&(r=Tt,r!==null))switch(r.tag){case 3:Vi(c.nodeValue,a,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Vi(c.nodeValue,a,(r.mode&1)!==0)}g&&(i.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[Xt]=i,i.stateNode=c}return tt(i),null;case 13:if(xe(Ie),c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Ce&&Ct!==null&&i.mode&1&&!(i.flags&128))xd(),Nr(),i.flags|=98560,g=!1;else if(g=Zi(i),c!==null&&c.dehydrated!==null){if(r===null){if(!g)throw Error(t(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(t(317));g[Xt]=i}else Nr(),!(i.flags&128)&&(i.memoizedState=null),i.flags|=4;tt(i),g=!1}else Ut!==null&&(yu(Ut),Ut=null),g=!0;if(!g)return i.flags&65536?i:null}return i.flags&128?(i.lanes=a,i):(c=c!==null,c!==(r!==null&&r.memoizedState!==null)&&c&&(i.child.flags|=8192,i.mode&1&&(r===null||Ie.current&1?Ue===0&&(Ue=3):Su())),i.updateQueue!==null&&(i.flags|=4),tt(i),null);case 4:return Or(),ou(r,i),r===null&&$s(i.stateNode.containerInfo),tt(i),null;case 10:return Ma(i.type._context),tt(i),null;case 17:return ht(i.type)&&Qi(),tt(i),null;case 19:if(xe(Ie),g=i.memoizedState,g===null)return tt(i),null;if(c=(i.flags&128)!==0,w=g.rendering,w===null)if(c)Vs(g,!1);else{if(Ue!==0||r!==null&&r.flags&128)for(r=i.child;r!==null;){if(w=io(r),w!==null){for(i.flags|=128,Vs(g,!1),c=w.updateQueue,c!==null&&(i.updateQueue=c,i.flags|=4),i.subtreeFlags=0,c=a,a=i.child;a!==null;)g=a,r=c,g.flags&=14680066,w=g.alternate,w===null?(g.childLanes=0,g.lanes=r,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=w.childLanes,g.lanes=w.lanes,g.child=w.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=w.memoizedProps,g.memoizedState=w.memoizedState,g.updateQueue=w.updateQueue,g.type=w.type,r=w.dependencies,g.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a=a.sibling;return _e(Ie,Ie.current&1|2),i.child}r=r.sibling}g.tail!==null&&Re()>Rr&&(i.flags|=128,c=!0,Vs(g,!1),i.lanes=4194304)}else{if(!c)if(r=io(w),r!==null){if(i.flags|=128,c=!0,a=r.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),Vs(g,!0),g.tail===null&&g.tailMode==="hidden"&&!w.alternate&&!Ce)return tt(i),null}else 2*Re()-g.renderingStartTime>Rr&&a!==1073741824&&(i.flags|=128,c=!0,Vs(g,!1),i.lanes=4194304);g.isBackwards?(w.sibling=i.child,i.child=w):(a=g.last,a!==null?a.sibling=w:i.child=w,g.last=w)}return g.tail!==null?(i=g.tail,g.rendering=i,g.tail=i.sibling,g.renderingStartTime=Re(),i.sibling=null,a=Ie.current,_e(Ie,c?a&1|2:a&1),i):(tt(i),null);case 22:case 23:return vu(),c=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(i.flags|=8192),c&&i.mode&1?Nt&1073741824&&(tt(i),i.subtreeFlags&6&&(i.flags|=8192)):tt(i),null;case 24:return null;case 25:return null}throw Error(t(156,i.tag))}function nv(r,i){switch(Na(i),i.tag){case 1:return ht(i.type)&&Qi(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Or(),xe(dt),xe(Ze),za(),r=i.flags,r&65536&&!(r&128)?(i.flags=r&-65537|128,i):null;case 5:return Fa(i),null;case 13:if(xe(Ie),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(t(340));Nr()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return xe(Ie),null;case 4:return Or(),null;case 10:return Ma(i.type._context),null;case 22:case 23:return vu(),null;case 24:return null;default:return null}}var go=!1,nt=!1,rv=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Mr(r,i){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Pe(r,i,c)}else a.current=null}function lu(r,i,a){try{a()}catch(c){Pe(r,i,c)}}var Eh=!1;function sv(r,i){if(va=Mi,r=ed(),fa(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var w=0,k=-1,b=-1,$=0,B=0,z=r,j=null;t:for(;;){for(var K;z!==a||h!==0&&z.nodeType!==3||(k=w+h),z!==g||c!==0&&z.nodeType!==3||(b=w+c),z.nodeType===3&&(w+=z.nodeValue.length),(K=z.firstChild)!==null;)j=z,z=K;for(;;){if(z===r)break t;if(j===a&&++$===h&&(k=w),j===g&&++B===c&&(b=w),(K=z.nextSibling)!==null)break;z=j,j=z.parentNode}z=K}a=k===-1||b===-1?null:{start:k,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(Sa={focusedElem:r,selectionRange:a},Mi=!1,Q=i;Q!==null;)if(i=Q,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Q=r;else for(;Q!==null;){i=Q;try{var J=i.alternate;if(i.flags&1024)switch(i.tag){case 0:case 11:case 15:break;case 1:if(J!==null){var Y=J.memoizedProps,je=J.memoizedState,A=i.stateNode,T=A.getSnapshotBeforeUpdate(i.elementType===i.type?Y:qt(i.type,Y),je);A.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var I=i.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(q){Pe(i,i.return,q)}if(r=i.sibling,r!==null){r.return=i.return,Q=r;break}Q=i.return}return J=Eh,Eh=!1,J}function Ws(r,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&r)===r){var g=h.destroy;h.destroy=void 0,g!==void 0&&lu(i,a,g)}h=h.next}while(h!==c)}}function mo(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&r)===r){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function au(r){var i=r.ref;if(i!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof i=="function"?i(r):i.current=r}}function kh(r){var i=r.alternate;i!==null&&(r.alternate=null,kh(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Xt],delete i[Ps],delete i[xa],delete i[Bw],delete i[zw])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function xh(r){return r.tag===5||r.tag===3||r.tag===4}function bh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||xh(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function uu(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(r,i):a.insertBefore(r,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(r,a)):(i=a,i.appendChild(r)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Wi));else if(c!==4&&(r=r.child,r!==null))for(uu(r,i,a),r=r.sibling;r!==null;)uu(r,i,a),r=r.sibling}function cu(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(cu(r,i,a),r=r.sibling;r!==null;)cu(r,i,a),r=r.sibling}var Qe=null,Ht=!1;function Ln(r,i,a){for(a=a.child;a!==null;)Th(r,i,a),a=a.sibling}function Th(r,i,a){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(Ni,a)}catch{}switch(a.tag){case 5:nt||Mr(a,i);case 6:var c=Qe,h=Ht;Qe=null,Ln(r,i,a),Qe=c,Ht=h,Qe!==null&&(Ht?(r=Qe,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):Qe.removeChild(a.stateNode));break;case 18:Qe!==null&&(Ht?(r=Qe,a=a.stateNode,r.nodeType===8?ka(r.parentNode,a):r.nodeType===1&&ka(r,a),xs(r)):ka(Qe,a.stateNode));break;case 4:c=Qe,h=Ht,Qe=a.stateNode.containerInfo,Ht=!0,Ln(r,i,a),Qe=c,Ht=h;break;case 0:case 11:case 14:case 15:if(!nt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var g=h,w=g.destroy;g=g.tag,w!==void 0&&(g&2||g&4)&&lu(a,i,w),h=h.next}while(h!==c)}Ln(r,i,a);break;case 1:if(!nt&&(Mr(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(k){Pe(a,i,k)}Ln(r,i,a);break;case 21:Ln(r,i,a);break;case 22:a.mode&1?(nt=(c=nt)||a.memoizedState!==null,Ln(r,i,a),nt=c):Ln(r,i,a);break;default:Ln(r,i,a)}}function Ch(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new rv),i.forEach(function(c){var h=hv.bind(null,r,c);a.has(c)||(a.add(c),c.then(h,h))})}}function Vt(r,i){var a=i.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c];try{var g=r,w=i,k=w;e:for(;k!==null;){switch(k.tag){case 5:Qe=k.stateNode,Ht=!1;break e;case 3:Qe=k.stateNode.containerInfo,Ht=!0;break e;case 4:Qe=k.stateNode.containerInfo,Ht=!0;break e}k=k.return}if(Qe===null)throw Error(t(160));Th(g,w,h),Qe=null,Ht=!1;var b=h.alternate;b!==null&&(b.return=null),h.return=null}catch($){Pe(h,i,$)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)Nh(i,r),i=i.sibling}function Nh(r,i){var a=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Vt(i,r),tn(r),c&4){try{Ws(3,r,r.return),mo(3,r)}catch(Y){Pe(r,r.return,Y)}try{Ws(5,r,r.return)}catch(Y){Pe(r,r.return,Y)}}break;case 1:Vt(i,r),tn(r),c&512&&a!==null&&Mr(a,a.return);break;case 5:if(Vt(i,r),tn(r),c&512&&a!==null&&Mr(a,a.return),r.flags&32){var h=r.stateNode;try{hs(h,"")}catch(Y){Pe(r,r.return,Y)}}if(c&4&&(h=r.stateNode,h!=null)){var g=r.memoizedProps,w=a!==null?a.memoizedProps:g,k=r.type,b=r.updateQueue;if(r.updateQueue=null,b!==null)try{k==="input"&&g.type==="radio"&&g.name!=null&&tf(h,g),zl(k,w);var $=zl(k,g);for(w=0;w<b.length;w+=2){var B=b[w],z=b[w+1];B==="style"?cf(h,z):B==="dangerouslySetInnerHTML"?af(h,z):B==="children"?hs(h,z):P(h,B,z,$)}switch(k){case"input":Rl(h,g);break;case"textarea":sf(h,g);break;case"select":var j=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!g.multiple;var K=g.value;K!=null?hr(h,!!g.multiple,K,!1):j!==!!g.multiple&&(g.defaultValue!=null?hr(h,!!g.multiple,g.defaultValue,!0):hr(h,!!g.multiple,g.multiple?[]:"",!1))}h[Ps]=g}catch(Y){Pe(r,r.return,Y)}}break;case 6:if(Vt(i,r),tn(r),c&4){if(r.stateNode===null)throw Error(t(162));h=r.stateNode,g=r.memoizedProps;try{h.nodeValue=g}catch(Y){Pe(r,r.return,Y)}}break;case 3:if(Vt(i,r),tn(r),c&4&&a!==null&&a.memoizedState.isDehydrated)try{xs(i.containerInfo)}catch(Y){Pe(r,r.return,Y)}break;case 4:Vt(i,r),tn(r);break;case 13:Vt(i,r),tn(r),h=r.child,h.flags&8192&&(g=h.memoizedState!==null,h.stateNode.isHidden=g,!g||h.alternate!==null&&h.alternate.memoizedState!==null||(hu=Re())),c&4&&Ch(r);break;case 22:if(B=a!==null&&a.memoizedState!==null,r.mode&1?(nt=($=nt)||B,Vt(i,r),nt=$):Vt(i,r),tn(r),c&8192){if($=r.memoizedState!==null,(r.stateNode.isHidden=$)&&!B&&r.mode&1)for(Q=r,B=r.child;B!==null;){for(z=Q=B;Q!==null;){switch(j=Q,K=j.child,j.tag){case 0:case 11:case 14:case 15:Ws(4,j,j.return);break;case 1:Mr(j,j.return);var J=j.stateNode;if(typeof J.componentWillUnmount=="function"){c=j,a=j.return;try{i=c,J.props=i.memoizedProps,J.state=i.memoizedState,J.componentWillUnmount()}catch(Y){Pe(c,a,Y)}}break;case 5:Mr(j,j.return);break;case 22:if(j.memoizedState!==null){Ih(z);continue}}K!==null?(K.return=j,Q=K):Ih(z)}B=B.sibling}e:for(B=null,z=r;;){if(z.tag===5){if(B===null){B=z;try{h=z.stateNode,$?(g=h.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(k=z.stateNode,b=z.memoizedProps.style,w=b!=null&&b.hasOwnProperty("display")?b.display:null,k.style.display=uf("display",w))}catch(Y){Pe(r,r.return,Y)}}}else if(z.tag===6){if(B===null)try{z.stateNode.nodeValue=$?"":z.memoizedProps}catch(Y){Pe(r,r.return,Y)}}else if((z.tag!==22&&z.tag!==23||z.memoizedState===null||z===r)&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===r)break e;for(;z.sibling===null;){if(z.return===null||z.return===r)break e;B===z&&(B=null),z=z.return}B===z&&(B=null),z.sibling.return=z.return,z=z.sibling}}break;case 19:Vt(i,r),tn(r),c&4&&Ch(r);break;case 21:break;default:Vt(i,r),tn(r)}}function tn(r){var i=r.flags;if(i&2){try{e:{for(var a=r.return;a!==null;){if(xh(a)){var c=a;break e}a=a.return}throw Error(t(160))}switch(c.tag){case 5:var h=c.stateNode;c.flags&32&&(hs(h,""),c.flags&=-33);var g=bh(r);cu(r,g,h);break;case 3:case 4:var w=c.stateNode.containerInfo,k=bh(r);uu(r,k,w);break;default:throw Error(t(161))}}catch(b){Pe(r,r.return,b)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function iv(r,i,a){Q=r,Ah(r)}function Ah(r,i,a){for(var c=(r.mode&1)!==0;Q!==null;){var h=Q,g=h.child;if(h.tag===22&&c){var w=h.memoizedState!==null||go;if(!w){var k=h.alternate,b=k!==null&&k.memoizedState!==null||nt;k=go;var $=nt;if(go=w,(nt=b)&&!$)for(Q=h;Q!==null;)w=Q,b=w.child,w.tag===22&&w.memoizedState!==null?Oh(h):b!==null?(b.return=w,Q=b):Oh(h);for(;g!==null;)Q=g,Ah(g),g=g.sibling;Q=h,go=k,nt=$}Lh(r)}else h.subtreeFlags&8772&&g!==null?(g.return=h,Q=g):Lh(r)}}function Lh(r){for(;Q!==null;){var i=Q;if(i.flags&8772){var a=i.alternate;try{if(i.flags&8772)switch(i.tag){case 0:case 11:case 15:nt||mo(5,i);break;case 1:var c=i.stateNode;if(i.flags&4&&!nt)if(a===null)c.componentDidMount();else{var h=i.elementType===i.type?a.memoizedProps:qt(i.type,a.memoizedProps);c.componentDidUpdate(h,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var g=i.updateQueue;g!==null&&Id(i,g,c);break;case 3:var w=i.updateQueue;if(w!==null){if(a=null,i.child!==null)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}Id(i,w,a)}break;case 5:var k=i.stateNode;if(a===null&&i.flags&4){a=k;var b=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":b.autoFocus&&a.focus();break;case"img":b.src&&(a.src=b.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var $=i.alternate;if($!==null){var B=$.memoizedState;if(B!==null){var z=B.dehydrated;z!==null&&xs(z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}nt||i.flags&512&&au(i)}catch(j){Pe(i,i.return,j)}}if(i===r){Q=null;break}if(a=i.sibling,a!==null){a.return=i.return,Q=a;break}Q=i.return}}function Ih(r){for(;Q!==null;){var i=Q;if(i===r){Q=null;break}var a=i.sibling;if(a!==null){a.return=i.return,Q=a;break}Q=i.return}}function Oh(r){for(;Q!==null;){var i=Q;try{switch(i.tag){case 0:case 11:case 15:var a=i.return;try{mo(4,i)}catch(b){Pe(i,a,b)}break;case 1:var c=i.stateNode;if(typeof c.componentDidMount=="function"){var h=i.return;try{c.componentDidMount()}catch(b){Pe(i,h,b)}}var g=i.return;try{au(i)}catch(b){Pe(i,g,b)}break;case 5:var w=i.return;try{au(i)}catch(b){Pe(i,w,b)}}}catch(b){Pe(i,i.return,b)}if(i===r){Q=null;break}var k=i.sibling;if(k!==null){k.return=i.return,Q=k;break}Q=i.return}}var ov=Math.ceil,yo=D.ReactCurrentDispatcher,fu=D.ReactCurrentOwner,Mt=D.ReactCurrentBatchConfig,de=0,Ve=null,Fe=null,Ge=0,Nt=0,Pr=bn(0),Ue=0,Ks=null,Yn=0,wo=0,du=0,Qs=null,gt=null,hu=0,Rr=1/0,dn=null,vo=!1,pu=null,In=null,So=!1,On=null,_o=0,Gs=0,gu=null,Eo=-1,ko=0;function ot(){return de&6?Re():Eo!==-1?Eo:Eo=Re()}function $n(r){return r.mode&1?de&2&&Ge!==0?Ge&-Ge:qw.transition!==null?(ko===0&&(ko=bf()),ko):(r=ye,r!==0||(r=window.event,r=r===void 0?16:Mf(r.type)),r):1}function Wt(r,i,a,c){if(50<Gs)throw Gs=0,gu=null,Error(t(185));vs(r,a,c),(!(de&2)||r!==Ve)&&(r===Ve&&(!(de&2)&&(wo|=a),Ue===4&&Mn(r,Ge)),mt(r,c),a===1&&de===0&&!(i.mode&1)&&(Rr=Re()+500,Ji&&Cn()))}function mt(r,i){var a=r.callbackNode;qy(r,i);var c=Ii(r,r===Ve?Ge:0);if(c===0)a!==null&&Ef(a),r.callbackNode=null,r.callbackPriority=0;else if(i=c&-c,r.callbackPriority!==i){if(a!=null&&Ef(a),i===1)r.tag===0?Uw(Mh.bind(null,r)):vd(Mh.bind(null,r)),Dw(function(){!(de&6)&&Cn()}),a=null;else{switch(Tf(c)){case 1:a=Ql;break;case 4:a=kf;break;case 16:a=Ci;break;case 536870912:a=xf;break;default:a=Ci}a=Uh(a,$h.bind(null,r))}r.callbackPriority=i,r.callbackNode=a}}function $h(r,i){if(Eo=-1,ko=0,de&6)throw Error(t(327));var a=r.callbackNode;if(jr()&&r.callbackNode!==a)return null;var c=Ii(r,r===Ve?Ge:0);if(c===0)return null;if(c&30||c&r.expiredLanes||i)i=xo(r,c);else{i=c;var h=de;de|=2;var g=Rh();(Ve!==r||Ge!==i)&&(dn=null,Rr=Re()+500,Zn(r,i));do try{uv();break}catch(k){Ph(r,k)}while(!0);$a(),yo.current=g,de=h,Fe!==null?i=0:(Ve=null,Ge=0,i=Ue)}if(i!==0){if(i===2&&(h=Gl(r),h!==0&&(c=h,i=mu(r,h))),i===1)throw a=Ks,Zn(r,0),Mn(r,c),mt(r,Re()),a;if(i===6)Mn(r,c);else{if(h=r.current.alternate,!(c&30)&&!lv(h)&&(i=xo(r,c),i===2&&(g=Gl(r),g!==0&&(c=g,i=mu(r,g))),i===1))throw a=Ks,Zn(r,0),Mn(r,c),mt(r,Re()),a;switch(r.finishedWork=h,r.finishedLanes=c,i){case 0:case 1:throw Error(t(345));case 2:er(r,gt,dn);break;case 3:if(Mn(r,c),(c&130023424)===c&&(i=hu+500-Re(),10<i)){if(Ii(r,0)!==0)break;if(h=r.suspendedLanes,(h&c)!==c){ot(),r.pingedLanes|=r.suspendedLanes&h;break}r.timeoutHandle=Ea(er.bind(null,r,gt,dn),i);break}er(r,gt,dn);break;case 4:if(Mn(r,c),(c&4194240)===c)break;for(i=r.eventTimes,h=-1;0<c;){var w=31-Bt(c);g=1<<w,w=i[w],w>h&&(h=w),c&=~g}if(c=h,c=Re()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*ov(c/1960))-c,10<c){r.timeoutHandle=Ea(er.bind(null,r,gt,dn),c);break}er(r,gt,dn);break;case 5:er(r,gt,dn);break;default:throw Error(t(329))}}}return mt(r,Re()),r.callbackNode===a?$h.bind(null,r):null}function mu(r,i){var a=Qs;return r.current.memoizedState.isDehydrated&&(Zn(r,i).flags|=256),r=xo(r,i),r!==2&&(i=gt,gt=a,i!==null&&yu(i)),r}function yu(r){gt===null?gt=r:gt.push.apply(gt,r)}function lv(r){for(var i=r;;){if(i.flags&16384){var a=i.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var h=a[c],g=h.getSnapshot;h=h.value;try{if(!zt(g(),h))return!1}catch{return!1}}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Mn(r,i){for(i&=~du,i&=~wo,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var a=31-Bt(i),c=1<<a;r[a]=-1,i&=~c}}function Mh(r){if(de&6)throw Error(t(327));jr();var i=Ii(r,0);if(!(i&1))return mt(r,Re()),null;var a=xo(r,i);if(r.tag!==0&&a===2){var c=Gl(r);c!==0&&(i=c,a=mu(r,c))}if(a===1)throw a=Ks,Zn(r,0),Mn(r,i),mt(r,Re()),a;if(a===6)throw Error(t(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,er(r,gt,dn),mt(r,Re()),null}function wu(r,i){var a=de;de|=1;try{return r(i)}finally{de=a,de===0&&(Rr=Re()+500,Ji&&Cn())}}function Xn(r){On!==null&&On.tag===0&&!(de&6)&&jr();var i=de;de|=1;var a=Mt.transition,c=ye;try{if(Mt.transition=null,ye=1,r)return r()}finally{ye=c,Mt.transition=a,de=i,!(de&6)&&Cn()}}function vu(){Nt=Pr.current,xe(Pr)}function Zn(r,i){r.finishedWork=null,r.finishedLanes=0;var a=r.timeoutHandle;if(a!==-1&&(r.timeoutHandle=-1,jw(a)),Fe!==null)for(a=Fe.return;a!==null;){var c=a;switch(Na(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Qi();break;case 3:Or(),xe(dt),xe(Ze),za();break;case 5:Fa(c);break;case 4:Or();break;case 13:xe(Ie);break;case 19:xe(Ie);break;case 10:Ma(c.type._context);break;case 22:case 23:vu()}a=a.return}if(Ve=r,Fe=r=Pn(r.current,null),Ge=Nt=i,Ue=0,Ks=null,du=wo=Yn=0,gt=Qs=null,Qn!==null){for(i=0;i<Qn.length;i++)if(a=Qn[i],c=a.interleaved,c!==null){a.interleaved=null;var h=c.next,g=a.pending;if(g!==null){var w=g.next;g.next=h,c.next=w}a.pending=c}Qn=null}return r}function Ph(r,i){do{var a=Fe;try{if($a(),oo.current=co,lo){for(var c=Oe.memoizedState;c!==null;){var h=c.queue;h!==null&&(h.pending=null),c=c.next}lo=!1}if(Jn=0,He=ze=Oe=null,zs=!1,Us=0,fu.current=null,a===null||a.return===null){Ue=1,Ks=i,Fe=null;break}e:{var g=r,w=a.return,k=a,b=i;if(i=Ge,k.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){var $=b,B=k,z=B.tag;if(!(B.mode&1)&&(z===0||z===11||z===15)){var j=B.alternate;j?(B.updateQueue=j.updateQueue,B.memoizedState=j.memoizedState,B.lanes=j.lanes):(B.updateQueue=null,B.memoizedState=null)}var K=oh(w);if(K!==null){K.flags&=-257,lh(K,w,k,g,i),K.mode&1&&ih(g,$,i),i=K,b=$;var J=i.updateQueue;if(J===null){var Y=new Set;Y.add(b),i.updateQueue=Y}else J.add(b);break e}else{if(!(i&1)){ih(g,$,i),Su();break e}b=Error(t(426))}}else if(Ce&&k.mode&1){var je=oh(w);if(je!==null){!(je.flags&65536)&&(je.flags|=256),lh(je,w,k,g,i),Ia($r(b,k));break e}}g=b=$r(b,k),Ue!==4&&(Ue=2),Qs===null?Qs=[g]:Qs.push(g),g=w;do{switch(g.tag){case 3:g.flags|=65536,i&=-i,g.lanes|=i;var A=rh(g,b,i);Ld(g,A);break e;case 1:k=b;var T=g.type,I=g.stateNode;if(!(g.flags&128)&&(typeof T.getDerivedStateFromError=="function"||I!==null&&typeof I.componentDidCatch=="function"&&(In===null||!In.has(I)))){g.flags|=65536,i&=-i,g.lanes|=i;var q=sh(g,k,i);Ld(g,q);break e}}g=g.return}while(g!==null)}Dh(a)}catch(X){i=X,Fe===a&&a!==null&&(Fe=a=a.return);continue}break}while(!0)}function Rh(){var r=yo.current;return yo.current=co,r===null?co:r}function Su(){(Ue===0||Ue===3||Ue===2)&&(Ue=4),Ve===null||!(Yn&268435455)&&!(wo&268435455)||Mn(Ve,Ge)}function xo(r,i){var a=de;de|=2;var c=Rh();(Ve!==r||Ge!==i)&&(dn=null,Zn(r,i));do try{av();break}catch(h){Ph(r,h)}while(!0);if($a(),de=a,yo.current=c,Fe!==null)throw Error(t(261));return Ve=null,Ge=0,Ue}function av(){for(;Fe!==null;)jh(Fe)}function uv(){for(;Fe!==null&&!My();)jh(Fe)}function jh(r){var i=zh(r.alternate,r,Nt);r.memoizedProps=r.pendingProps,i===null?Dh(r):Fe=i,fu.current=null}function Dh(r){var i=r;do{var a=i.alternate;if(r=i.return,i.flags&32768){if(a=nv(a,i),a!==null){a.flags&=32767,Fe=a;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Ue=6,Fe=null;return}}else if(a=tv(a,i,Nt),a!==null){Fe=a;return}if(i=i.sibling,i!==null){Fe=i;return}Fe=i=r}while(i!==null);Ue===0&&(Ue=5)}function er(r,i,a){var c=ye,h=Mt.transition;try{Mt.transition=null,ye=1,cv(r,i,a,c)}finally{Mt.transition=h,ye=c}return null}function cv(r,i,a,c){do jr();while(On!==null);if(de&6)throw Error(t(327));a=r.finishedWork;var h=r.finishedLanes;if(a===null)return null;if(r.finishedWork=null,r.finishedLanes=0,a===r.current)throw Error(t(177));r.callbackNode=null,r.callbackPriority=0;var g=a.lanes|a.childLanes;if(Hy(r,g),r===Ve&&(Fe=Ve=null,Ge=0),!(a.subtreeFlags&2064)&&!(a.flags&2064)||So||(So=!0,Uh(Ci,function(){return jr(),null})),g=(a.flags&15990)!==0,a.subtreeFlags&15990||g){g=Mt.transition,Mt.transition=null;var w=ye;ye=1;var k=de;de|=4,fu.current=null,sv(r,a),Nh(a,r),Lw(Sa),Mi=!!va,Sa=va=null,r.current=a,iv(a),Py(),de=k,ye=w,Mt.transition=g}else r.current=a;if(So&&(So=!1,On=r,_o=h),g=r.pendingLanes,g===0&&(In=null),Dy(a.stateNode),mt(r,Re()),i!==null)for(c=r.onRecoverableError,a=0;a<i.length;a++)h=i[a],c(h.value,{componentStack:h.stack,digest:h.digest});if(vo)throw vo=!1,r=pu,pu=null,r;return _o&1&&r.tag!==0&&jr(),g=r.pendingLanes,g&1?r===gu?Gs++:(Gs=0,gu=r):Gs=0,Cn(),null}function jr(){if(On!==null){var r=Tf(_o),i=Mt.transition,a=ye;try{if(Mt.transition=null,ye=16>r?16:r,On===null)var c=!1;else{if(r=On,On=null,_o=0,de&6)throw Error(t(331));var h=de;for(de|=4,Q=r.current;Q!==null;){var g=Q,w=g.child;if(Q.flags&16){var k=g.deletions;if(k!==null){for(var b=0;b<k.length;b++){var $=k[b];for(Q=$;Q!==null;){var B=Q;switch(B.tag){case 0:case 11:case 15:Ws(8,B,g)}var z=B.child;if(z!==null)z.return=B,Q=z;else for(;Q!==null;){B=Q;var j=B.sibling,K=B.return;if(kh(B),B===$){Q=null;break}if(j!==null){j.return=K,Q=j;break}Q=K}}}var J=g.alternate;if(J!==null){var Y=J.child;if(Y!==null){J.child=null;do{var je=Y.sibling;Y.sibling=null,Y=je}while(Y!==null)}}Q=g}}if(g.subtreeFlags&2064&&w!==null)w.return=g,Q=w;else e:for(;Q!==null;){if(g=Q,g.flags&2048)switch(g.tag){case 0:case 11:case 15:Ws(9,g,g.return)}var A=g.sibling;if(A!==null){A.return=g.return,Q=A;break e}Q=g.return}}var T=r.current;for(Q=T;Q!==null;){w=Q;var I=w.child;if(w.subtreeFlags&2064&&I!==null)I.return=w,Q=I;else e:for(w=T;Q!==null;){if(k=Q,k.flags&2048)try{switch(k.tag){case 0:case 11:case 15:mo(9,k)}}catch(X){Pe(k,k.return,X)}if(k===w){Q=null;break e}var q=k.sibling;if(q!==null){q.return=k.return,Q=q;break e}Q=k.return}}if(de=h,Cn(),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(Ni,r)}catch{}c=!0}return c}finally{ye=a,Mt.transition=i}}return!1}function Fh(r,i,a){i=$r(a,i),i=rh(r,i,1),r=An(r,i,1),i=ot(),r!==null&&(vs(r,1,i),mt(r,i))}function Pe(r,i,a){if(r.tag===3)Fh(r,r,a);else for(;i!==null;){if(i.tag===3){Fh(i,r,a);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(In===null||!In.has(c))){r=$r(a,r),r=sh(i,r,1),i=An(i,r,1),r=ot(),i!==null&&(vs(i,1,r),mt(i,r));break}}i=i.return}}function fv(r,i,a){var c=r.pingCache;c!==null&&c.delete(i),i=ot(),r.pingedLanes|=r.suspendedLanes&a,Ve===r&&(Ge&a)===a&&(Ue===4||Ue===3&&(Ge&130023424)===Ge&&500>Re()-hu?Zn(r,0):du|=a),mt(r,i)}function Bh(r,i){i===0&&(r.mode&1?(i=Li,Li<<=1,!(Li&130023424)&&(Li=4194304)):i=1);var a=ot();r=un(r,i),r!==null&&(vs(r,i,a),mt(r,a))}function dv(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),Bh(r,a)}function hv(r,i){var a=0;switch(r.tag){case 13:var c=r.stateNode,h=r.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(t(314))}c!==null&&c.delete(i),Bh(r,a)}var zh;zh=function(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps||dt.current)pt=!0;else{if(!(r.lanes&a)&&!(i.flags&128))return pt=!1,ev(r,i,a);pt=!!(r.flags&131072)}else pt=!1,Ce&&i.flags&1048576&&Sd(i,Xi,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;po(r,i),r=i.pendingProps;var h=br(i,Ze.current);Ir(i,a),h=Ha(null,i,c,r,h,a);var g=Va();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,ht(c)?(g=!0,Gi(i)):g=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,ja(i),h.updater=fo,i.stateNode=h,h._reactInternals=i,Ya(i,c,r,a),i=tu(null,i,c,!0,g,a)):(i.tag=0,Ce&&g&&Ca(i),it(null,i,h,a),i=i.child),i;case 16:c=i.elementType;e:{switch(po(r,i),r=i.pendingProps,h=c._init,c=h(c._payload),i.type=c,h=i.tag=gv(c),r=qt(c,r),h){case 0:i=eu(null,i,c,r,a);break e;case 1:i=hh(null,i,c,r,a);break e;case 11:i=ah(null,i,c,r,a);break e;case 14:i=uh(null,i,c,qt(c.type,r),a);break e}throw Error(t(306,c,""))}return i;case 0:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:qt(c,h),eu(r,i,c,h,a);case 1:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:qt(c,h),hh(r,i,c,h,a);case 3:e:{if(ph(i),r===null)throw Error(t(387));c=i.pendingProps,g=i.memoizedState,h=g.element,Ad(r,i),so(i,c,null,a);var w=i.memoizedState;if(c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){h=$r(Error(t(423)),i),i=gh(r,i,c,a,h);break e}else if(c!==h){h=$r(Error(t(424)),i),i=gh(r,i,c,a,h);break e}else for(Ct=xn(i.stateNode.containerInfo.firstChild),Tt=i,Ce=!0,Ut=null,a=Cd(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Nr(),c===h){i=fn(r,i,a);break e}it(r,i,c,a)}i=i.child}return i;case 5:return Od(i),r===null&&La(i),c=i.type,h=i.pendingProps,g=r!==null?r.memoizedProps:null,w=h.children,_a(c,h)?w=null:g!==null&&_a(c,g)&&(i.flags|=32),dh(r,i),it(r,i,w,a),i.child;case 6:return r===null&&La(i),null;case 13:return mh(r,i,a);case 4:return Da(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=Ar(i,null,c,a):it(r,i,c,a),i.child;case 11:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:qt(c,h),ah(r,i,c,h,a);case 7:return it(r,i,i.pendingProps,a),i.child;case 8:return it(r,i,i.pendingProps.children,a),i.child;case 12:return it(r,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,h=i.pendingProps,g=i.memoizedProps,w=h.value,_e(to,c._currentValue),c._currentValue=w,g!==null)if(zt(g.value,w)){if(g.children===h.children&&!dt.current){i=fn(r,i,a);break e}}else for(g=i.child,g!==null&&(g.return=i);g!==null;){var k=g.dependencies;if(k!==null){w=g.child;for(var b=k.firstContext;b!==null;){if(b.context===c){if(g.tag===1){b=cn(-1,a&-a),b.tag=2;var $=g.updateQueue;if($!==null){$=$.shared;var B=$.pending;B===null?b.next=b:(b.next=B.next,B.next=b),$.pending=b}}g.lanes|=a,b=g.alternate,b!==null&&(b.lanes|=a),Pa(g.return,a,i),k.lanes|=a;break}b=b.next}}else if(g.tag===10)w=g.type===i.type?null:g.child;else if(g.tag===18){if(w=g.return,w===null)throw Error(t(341));w.lanes|=a,k=w.alternate,k!==null&&(k.lanes|=a),Pa(w,a,i),w=g.sibling}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===i){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}it(r,i,h.children,a),i=i.child}return i;case 9:return h=i.type,c=i.pendingProps.children,Ir(i,a),h=Ot(h),c=c(h),i.flags|=1,it(r,i,c,a),i.child;case 14:return c=i.type,h=qt(c,i.pendingProps),h=qt(c.type,h),uh(r,i,c,h,a);case 15:return ch(r,i,i.type,i.pendingProps,a);case 17:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:qt(c,h),po(r,i),i.tag=1,ht(c)?(r=!0,Gi(i)):r=!1,Ir(i,a),th(i,c,h),Ya(i,c,h,a),tu(null,i,c,!0,r,a);case 19:return wh(r,i,a);case 22:return fh(r,i,a)}throw Error(t(156,i.tag))};function Uh(r,i){return _f(r,i)}function pv(r,i,a,c){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(r,i,a,c){return new pv(r,i,a,c)}function _u(r){return r=r.prototype,!(!r||!r.isReactComponent)}function gv(r){if(typeof r=="function")return _u(r)?1:0;if(r!=null){if(r=r.$$typeof,r===R)return 11;if(r===ft)return 14}return 2}function Pn(r,i){var a=r.alternate;return a===null?(a=Pt(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function bo(r,i,a,c,h,g){var w=2;if(c=r,typeof r=="function")_u(r)&&(w=1);else if(typeof r=="string")w=5;else e:switch(r){case Z:return tr(a.children,h,g,i);case H:w=8,h|=8;break;case M:return r=Pt(12,a,i,h|2),r.elementType=M,r.lanes=g,r;case ee:return r=Pt(13,a,i,h),r.elementType=ee,r.lanes=g,r;case Ee:return r=Pt(19,a,i,h),r.elementType=Ee,r.lanes=g,r;case be:return To(a,h,g,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ue:w=10;break e;case fe:w=9;break e;case R:w=11;break e;case ft:w=14;break e;case Xe:w=16,c=null;break e}throw Error(t(130,r==null?r:typeof r,""))}return i=Pt(w,a,i,h),i.elementType=r,i.type=c,i.lanes=g,i}function tr(r,i,a,c){return r=Pt(7,r,c,i),r.lanes=a,r}function To(r,i,a,c){return r=Pt(22,r,c,i),r.elementType=be,r.lanes=a,r.stateNode={isHidden:!1},r}function Eu(r,i,a){return r=Pt(6,r,null,i),r.lanes=a,r}function ku(r,i,a){return i=Pt(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function mv(r,i,a,c,h){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jl(0),this.expirationTimes=Jl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jl(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function xu(r,i,a,c,h,g,w,k,b){return r=new mv(r,i,a,k,b),i===1?(i=1,g===!0&&(i|=8)):i=0,g=Pt(3,null,null,i),r.current=g,g.stateNode=r,g.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},ja(g),r}function yv(r,i,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:U,key:c==null?null:""+c,children:r,containerInfo:i,implementation:a}}function qh(r){if(!r)return Tn;r=r._reactInternals;e:{if(qn(r)!==r||r.tag!==1)throw Error(t(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(ht(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(t(171))}if(r.tag===1){var a=r.type;if(ht(a))return yd(r,a,i)}return i}function Hh(r,i,a,c,h,g,w,k,b){return r=xu(a,c,!0,r,h,g,w,k,b),r.context=qh(null),a=r.current,c=ot(),h=$n(a),g=cn(c,h),g.callback=i??null,An(a,g,h),r.current.lanes=h,vs(r,h,c),mt(r,c),r}function Co(r,i,a,c){var h=i.current,g=ot(),w=$n(h);return a=qh(a),i.context===null?i.context=a:i.pendingContext=a,i=cn(g,w),i.payload={element:r},c=c===void 0?null:c,c!==null&&(i.callback=c),r=An(h,i,w),r!==null&&(Wt(r,h,w,g),ro(r,h,w)),w}function No(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Vh(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var a=r.retryLane;r.retryLane=a!==0&&a<i?a:i}}function bu(r,i){Vh(r,i),(r=r.alternate)&&Vh(r,i)}function wv(){return null}var Wh=typeof reportError=="function"?reportError:function(r){console.error(r)};function Tu(r){this._internalRoot=r}Ao.prototype.render=Tu.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(t(409));Co(r,i,null,null)},Ao.prototype.unmount=Tu.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Xn(function(){Co(null,r,null,null)}),i[sn]=null}};function Ao(r){this._internalRoot=r}Ao.prototype.unstable_scheduleHydration=function(r){if(r){var i=Af();r={blockedOn:null,target:r,priority:i};for(var a=0;a<_n.length&&i!==0&&i<_n[a].priority;a++);_n.splice(a,0,r),a===0&&Of(r)}};function Cu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Lo(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Kh(){}function vv(r,i,a,c,h){if(h){if(typeof c=="function"){var g=c;c=function(){var $=No(w);g.call($)}}var w=Hh(i,c,r,0,null,!1,!1,"",Kh);return r._reactRootContainer=w,r[sn]=w.current,$s(r.nodeType===8?r.parentNode:r),Xn(),w}for(;h=r.lastChild;)r.removeChild(h);if(typeof c=="function"){var k=c;c=function(){var $=No(b);k.call($)}}var b=xu(r,0,!1,null,null,!1,!1,"",Kh);return r._reactRootContainer=b,r[sn]=b.current,$s(r.nodeType===8?r.parentNode:r),Xn(function(){Co(i,b,a,c)}),b}function Io(r,i,a,c,h){var g=a._reactRootContainer;if(g){var w=g;if(typeof h=="function"){var k=h;h=function(){var b=No(w);k.call(b)}}Co(i,w,r,h)}else w=vv(a,i,r,h,c);return No(w)}Cf=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var a=ws(i.pendingLanes);a!==0&&(Yl(i,a|1),mt(i,Re()),!(de&6)&&(Rr=Re()+500,Cn()))}break;case 13:Xn(function(){var c=un(r,1);if(c!==null){var h=ot();Wt(c,r,1,h)}}),bu(r,1)}},Xl=function(r){if(r.tag===13){var i=un(r,134217728);if(i!==null){var a=ot();Wt(i,r,134217728,a)}bu(r,134217728)}},Nf=function(r){if(r.tag===13){var i=$n(r),a=un(r,i);if(a!==null){var c=ot();Wt(a,r,i,c)}bu(r,i)}},Af=function(){return ye},Lf=function(r,i){var a=ye;try{return ye=r,i()}finally{ye=a}},Hl=function(r,i,a){switch(i){case"input":if(Rl(r,a),i=a.name,a.type==="radio"&&i!=null){for(a=r;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<a.length;i++){var c=a[i];if(c!==r&&c.form===r.form){var h=Ki(c);if(!h)throw Error(t(90));Zc(c),Rl(c,h)}}}break;case"textarea":sf(r,a);break;case"select":i=a.value,i!=null&&hr(r,!!a.multiple,i,!1)}},pf=wu,gf=Xn;var Sv={usingClientEntryPoint:!1,Events:[Rs,kr,Ki,df,hf,wu]},Js={findFiberByHostInstance:Hn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_v={bundleType:Js.bundleType,version:Js.version,rendererPackageName:Js.rendererPackageName,rendererConfig:Js.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:D.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=vf(r),r===null?null:r.stateNode},findFiberByHostInstance:Js.findFiberByHostInstance||wv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oo.isDisabled&&Oo.supportsFiber)try{Ni=Oo.inject(_v),Yt=Oo}catch{}}return yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sv,yt.createPortal=function(r,i){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cu(i))throw Error(t(200));return yv(r,i,null,a)},yt.createRoot=function(r,i){if(!Cu(r))throw Error(t(299));var a=!1,c="",h=Wh;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onRecoverableError!==void 0&&(h=i.onRecoverableError)),i=xu(r,1,!1,null,null,a,!1,c,h),r[sn]=i.current,$s(r.nodeType===8?r.parentNode:r),new Tu(i)},yt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(t(188)):(r=Object.keys(r).join(","),Error(t(268,r)));return r=vf(i),r=r===null?null:r.stateNode,r},yt.flushSync=function(r){return Xn(r)},yt.hydrate=function(r,i,a){if(!Lo(i))throw Error(t(200));return Io(null,r,i,!0,a)},yt.hydrateRoot=function(r,i,a){if(!Cu(r))throw Error(t(405));var c=a!=null&&a.hydratedSources||null,h=!1,g="",w=Wh;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),i=Hh(i,null,r,1,a??null,h,!1,g,w),r[sn]=i.current,$s(r),c)for(r=0;r<c.length;r++)a=c[r],h=a._getVersion,h=h(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,h]:i.mutableSourceEagerHydrationData.push(a,h);return new Ao(i)},yt.render=function(r,i,a){if(!Lo(i))throw Error(t(200));return Io(null,r,i,!1,a)},yt.unmountComponentAtNode=function(r){if(!Lo(r))throw Error(t(40));return r._reactRootContainer?(Xn(function(){Io(null,null,r,!1,function(){r._reactRootContainer=null,r[sn]=null})}),!0):!1},yt.unstable_batchedUpdates=wu,yt.unstable_renderSubtreeIntoContainer=function(r,i,a,c){if(!Lo(a))throw Error(t(200));if(r==null||r._reactInternals===void 0)throw Error(t(38));return Io(r,i,a,!1,c)},yt.version="18.3.1-next-f1338f8080-20240426",yt}var rp;function Dv(){if(rp)return Lu.exports;rp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Lu.exports=jv(),Lu.exports}var sp;function Fv(){if(sp)return $o;sp=1;var n=Dv();return $o.createRoot=n.createRoot,$o.hydrateRoot=n.hydrateRoot,$o}var KE=Fv();const Bv="_attach",si=Symbol("context"),zv=Symbol("page"),Jp=Symbol("next"),Yp=Symbol("prev"),ip=Symbol("events");class QE{constructor(e){we(this,"startTime");we(this,"endTime");we(this,"browserName");we(this,"channel");we(this,"platform");we(this,"wallTime");we(this,"title");we(this,"options");we(this,"pages");we(this,"actions");we(this,"attachments");we(this,"visibleAttachments");we(this,"events");we(this,"stdio");we(this,"errors");we(this,"errorDescriptors");we(this,"hasSource");we(this,"hasStepData");we(this,"sdkLanguage");we(this,"testIdAttributeName");we(this,"sources");we(this,"resources");e.forEach(s=>Uv(s));const t=e.find(s=>s.origin==="library");this.browserName=(t==null?void 0:t.browserName)||"",this.sdkLanguage=t==null?void 0:t.sdkLanguage,this.channel=t==null?void 0:t.channel,this.testIdAttributeName=t==null?void 0:t.testIdAttributeName,this.platform=(t==null?void 0:t.platform)||"",this.title=(t==null?void 0:t.title)||"",this.options=(t==null?void 0:t.options)||{},this.actions=qv(e),this.pages=[].concat(...e.map(s=>s.pages)),this.wallTime=e.map(s=>s.wallTime).reduce((s,o)=>Math.min(s||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=e.map(s=>s.startTime).reduce((s,o)=>Math.min(s,o),Number.MAX_VALUE),this.endTime=e.map(s=>s.endTime).reduce((s,o)=>Math.max(s,o),Number.MIN_VALUE),this.events=[].concat(...e.map(s=>s.events)),this.stdio=[].concat(...e.map(s=>s.stdio)),this.errors=[].concat(...e.map(s=>s.errors)),this.hasSource=e.some(s=>s.hasSource),this.hasStepData=e.some(s=>s.origin==="testRunner"),this.resources=[...e.map(s=>s.resources)].flat(),this.attachments=this.actions.flatMap(s=>{var o;return((o=s.attachments)==null?void 0:o.map(l=>({...l,traceUrl:s.context.traceUrl})))??[]}),this.visibleAttachments=this.attachments.filter(s=>!s.name.startsWith("_")),this.events.sort((s,o)=>s.time-o.time),this.resources.sort((s,o)=>s._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Yv(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}_errorDescriptorsFromActions(){var t;const e=[];for(const s of this.actions||[])(t=s.error)!=null&&t.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,t)=>({stack:e.stack,message:e.message,prompt:this.attachments.find(s=>s.name===`_prompt-${t}`)}))}}function Uv(n){for(const t of n.pages)t[si]=n;for(let t=0;t<n.actions.length;++t){const s=n.actions[t];s[si]=n,s[zv]=n.pages.find(o=>o.pageId===s.pageId)}let e;for(let t=n.actions.length-1;t>=0;t--){const s=n.actions[t];s[Jp]=e,s.apiName.includes("route.")||(e=s)}for(const t of n.events)t[si]=n;for(const t of n.resources)t[si]=n}function qv(n){const e=new Map;for(const o of n){const l=o.traceUrl;let u=e.get(l);u||(u=[],e.set(l,u)),u.push(o)}const t=[];let s=0;for(const[,o]of e){e.size>1&&Hv(o,++s);const l=Vv(o);t.push(...l)}t.sort((o,l)=>l.parentId===o.callId?-1:o.parentId===l.callId?1:o.startTime-l.startTime);for(let o=1;o<t.length;++o)t[o][Yp]=t[o-1];return t}function Hv(n,e){for(const t of n)for(const s of t.actions)s.callId&&(s.callId=`${e}:${s.callId}`),s.parentId&&(s.parentId=`${e}:${s.parentId}`)}function Vv(n){const e=new Map,t=n.filter(f=>f.origin==="library"),s=n.filter(f=>f.origin==="testRunner");if(!s.length||!t.length)return n.map(f=>f.actions.map(d=>({...d,context:f}))).flat();const o=t.some(f=>f.actions.some(d=>!!d.stepId));for(const f of t)for(const d of f.actions){const p=o?d.stepId:`${d.apiName}@${d.wallTime}`;e.set(p,{...d,context:f})}const l=Kv(s,e,o);l&&Wv(t,l);const u=new Map;for(const f of s)for(const d of f.actions){const p=o?d.callId:`${d.apiName}@${d.wallTime}`,m=e.get(p);if(m){u.set(d.callId,m.callId),d.error&&(m.error=d.error),d.attachments&&(m.attachments=d.attachments),d.annotations&&(m.annotations=d.annotations),d.parentId&&(m.parentId=u.get(d.parentId)??d.parentId),m.startTime=d.startTime,m.endTime=d.endTime;continue}d.parentId&&(d.parentId=u.get(d.parentId)??d.parentId),e.set(p,{...d,context:f})}return[...e.values()]}function Wv(n,e){for(const t of n){t.startTime+=e,t.endTime+=e;for(const s of t.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of t.events)s.time+=e;for(const s of t.stdio)s.timestamp+=e;for(const s of t.pages)for(const o of s.screencastFrames)o.timestamp+=e;for(const s of t.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function Kv(n,e,t){for(const s of n)for(const o of s.actions){if(!o.startTime)continue;const l=t?o.callId:`${o.apiName}@${o.wallTime}`,u=e.get(l);if(u)return o.startTime-u.startTime}return 0}function GE(n){var s;const e=new Map;for(const o of n)e.set(o.callId,{id:o.callId,parent:void 0,children:[],action:o});const t={id:"",parent:void 0,children:[]};for(const o of e.values()){if((s=o.action)!=null&&s.apiName.startsWith(Bv))continue;const l=o.action.parentId&&e.get(o.action.parentId)||t;l.children.push(o),o.parent=l}return{rootItem:t,itemMap:e}}function nl(n){return n[si]}function Qv(n){return n[Jp]}function Gv(n){return n[Yp]}function JE(n){let e=0,t=0;for(const s of Jv(n)){if(s.type==="console"){const o=s.messageType;o==="warning"?++t:o==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:t}}function Jv(n){let e=n[ip];if(e)return e;const t=Qv(n);return e=nl(n).events.filter(s=>s.time>=n.startTime&&(!t||s.time<t.startTime)),n[ip]=e,e}function Yv(n,e){var s;const t=new Map;for(const o of n)for(const l of o.stack||[]){let u=t.get(l.file);u||(u={errors:[],content:void 0},t.set(l.file,u))}for(const o of e){const{action:l,stack:u,message:f}=o;!l||!u||(s=t.get(u[0].file))==null||s.errors.push({line:u[0].line||0,message:f})}return t}const $u=new Set(["page.route","page.routefromhar","page.unroute","page.unrouteall","browsercontext.route","browsercontext.routefromhar","browsercontext.unroute","browsercontext.unrouteall"]);{for(const n of[...$u])$u.add(n+"async");for(const n of["page.route_from_har","page.unroute_all","context.route_from_har","context.unroute_all"])$u.add(n)}const Xv=50,Xp=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:t=!1,orientation:s="vertical",minSidebarSize:o=Xv,settingName:l,sidebar:u,main:f})=>{const d=Math.max(o,n)*window.devicePixelRatio,[p,m]=ec(l?l+"."+s+":size":void 0,d),[y,v]=ec(l?l+"."+s+":size":void 0,d),[S,x]=te.useState(null),[_,E]=gl();let L;s==="vertical"?(L=y/window.devicePixelRatio,_&&_.height<L&&(L=_.height-10)):(L=p/window.devicePixelRatio,_&&_.width<L&&(L=_.width-10)),document.body.style.userSelect=S?"none":"inherit";let O={};return s==="vertical"?t?O={top:S?0:L-4,bottom:S?0:void 0,height:S?"initial":8}:O={bottom:S?0:L-4,top:S?0:void 0,height:S?"initial":8}:t?O={left:S?0:L-4,right:S?0:void 0,width:S?"initial":8}:O={right:S?0:L-4,left:S?0:void 0,width:S?"initial":8},C.jsxs("div",{className:Gt("split-view",s,t&&"sidebar-first"),ref:E,children:[C.jsx("div",{className:"split-view-main",children:f}),!e&&C.jsx("div",{style:{flexBasis:L},className:"split-view-sidebar",children:u}),!e&&C.jsx("div",{style:O,className:"split-view-resizer",onMouseDown:P=>x({offset:s==="vertical"?P.clientY:P.clientX,size:L}),onMouseUp:()=>x(null),onMouseMove:P=>{if(!P.buttons)x(null);else if(S){const V=(s==="vertical"?P.clientY:P.clientX)-S.offset,U=t?S.size+V:S.size-V,H=P.target.parentElement.getBoundingClientRect(),M=Math.min(Math.max(o,U),(s==="vertical"?H.height:H.width)-o);s==="vertical"?v(M*window.devicePixelRatio):m(M*window.devicePixelRatio)}}})]})},Be=function(n,e,t){return n>=e&&n<=t};function wt(n){return Be(n,48,57)}function op(n){return wt(n)||Be(n,65,70)||Be(n,97,102)}function Zv(n){return Be(n,65,90)}function e0(n){return Be(n,97,122)}function t0(n){return Zv(n)||e0(n)}function n0(n){return n>=128}function Vo(n){return t0(n)||n0(n)||n===95}function lp(n){return Vo(n)||wt(n)||n===45}function r0(n){return Be(n,0,8)||n===11||Be(n,14,31)||n===127}function Wo(n){return n===10}function hn(n){return Wo(n)||n===9||n===32}const s0=1114111;class wc extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function i0(n){const e=[];for(let t=0;t<n.length;t++){let s=n.charCodeAt(t);if(s===13&&n.charCodeAt(t+1)===10&&(s=10,t++),(s===13||s===12)&&(s=10),s===0&&(s=65533),Be(s,55296,56319)&&Be(n.charCodeAt(t+1),56320,57343)){const o=s-55296,l=n.charCodeAt(t+1)-56320;s=Math.pow(2,16)+o*Math.pow(2,10)+l,t++}e.push(s)}return e}function qe(n){if(n<=65535)return String.fromCharCode(n);n-=Math.pow(2,16);const e=Math.floor(n/Math.pow(2,10))+55296,t=n%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(t)}function o0(n){const e=i0(n);let t=-1;const s=[];let o;const l=function(R){return R>=e.length?-1:e[R]},u=function(R){if(R===void 0&&(R=1),R>3)throw"Spec Error: no more than three codepoints of lookahead.";return l(t+R)},f=function(R){return R===void 0&&(R=1),t+=R,o=l(t),!0},d=function(){return t-=1,!0},p=function(R){return R===void 0&&(R=o),R===-1},m=function(){if(y(),f(),hn(o)){for(;hn(u());)f();return new nc}else{if(o===34)return x();if(o===35)if(lp(u())||L(u(1),u(2))){const R=new hg("");return P(u(1),u(2),u(3))&&(R.type="id"),R.value=Z(),R}else return new rt(o);else return o===36?u()===61?(f(),new c0):new rt(o):o===39?x():o===40?new ag:o===41?new ug:o===42?u()===61?(f(),new f0):new rt(o):o===43?U()?(d(),v()):new rt(o):o===44?new sg:o===45?U()?(d(),v()):u(1)===45&&u(2)===62?(f(2),new tg):D()?(d(),S()):new rt(o):o===46?U()?(d(),v()):new rt(o):o===58?new ng:o===59?new rg:o===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new eg):new rt(o):o===64?P(u(1),u(2),u(3))?new dg(Z()):new rt(o):o===91?new lg:o===92?O()?(d(),S()):new rt(o):o===93?new rc:o===94?u()===61?(f(),new u0):new rt(o):o===123?new ig:o===124?u()===61?(f(),new a0):u()===124?(f(),new cg):new rt(o):o===125?new og:o===126?u()===61?(f(),new l0):new rt(o):wt(o)?(d(),v()):Vo(o)?(d(),S()):p()?new Qo:new rt(o)}},y=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),o===42&&u()===47){f();break}else if(p())return},v=function(){const R=H();if(P(u(1),u(2),u(3))){const ee=new d0;return ee.value=R.value,ee.repr=R.repr,ee.type=R.type,ee.unit=Z(),ee}else if(u()===37){f();const ee=new yg;return ee.value=R.value,ee.repr=R.repr,ee}else{const ee=new mg;return ee.value=R.value,ee.repr=R.repr,ee.type=R.type,ee}},S=function(){const R=Z();if(R.toLowerCase()==="url"&&u()===40){for(f();hn(u(1))&&hn(u(2));)f();return u()===34||u()===39?new Go(R):hn(u())&&(u(2)===34||u(2)===39)?new Go(R):_()}else return u()===40?(f(),new Go(R)):new fg(R)},x=function(R){R===void 0&&(R=o);let ee="";for(;f();){if(o===R||p())return new pg(ee);if(Wo(o))return d(),new Zp;o===92?p(u())||(Wo(u())?f():ee+=qe(E())):ee+=qe(o)}throw new Error("Internal error")},_=function(){const R=new gg("");for(;hn(u());)f();if(p(u()))return R;for(;f();){if(o===41||p())return R;if(hn(o)){for(;hn(u());)f();return u()===41||p(u())?(f(),R):(ue(),new Ko)}else{if(o===34||o===39||o===40||r0(o))return ue(),new Ko;if(o===92)if(O())R.value+=qe(E());else return ue(),new Ko;else R.value+=qe(o)}}throw new Error("Internal error")},E=function(){if(f(),op(o)){const R=[o];for(let Ee=0;Ee<5&&op(u());Ee++)f(),R.push(o);hn(u())&&f();let ee=parseInt(R.map(function(Ee){return String.fromCharCode(Ee)}).join(""),16);return ee>s0&&(ee=65533),ee}else return p()?65533:o},L=function(R,ee){return!(R!==92||Wo(ee))},O=function(){return L(o,u())},P=function(R,ee,Ee){return R===45?Vo(ee)||ee===45||L(ee,Ee):Vo(R)?!0:R===92?L(R,ee):!1},D=function(){return P(o,u(1),u(2))},V=function(R,ee,Ee){return R===43||R===45?!!(wt(ee)||ee===46&&wt(Ee)):R===46?!!wt(ee):!!wt(R)},U=function(){return V(o,u(1),u(2))},Z=function(){let R="";for(;f();)if(lp(o))R+=qe(o);else if(O())R+=qe(E());else return d(),R;throw new Error("Internal parse error")},H=function(){let R="",ee="integer";for((u()===43||u()===45)&&(f(),R+=qe(o));wt(u());)f(),R+=qe(o);if(u(1)===46&&wt(u(2)))for(f(),R+=qe(o),f(),R+=qe(o),ee="number";wt(u());)f(),R+=qe(o);const Ee=u(1),ft=u(2),Xe=u(3);if((Ee===69||Ee===101)&&wt(ft))for(f(),R+=qe(o),f(),R+=qe(o),ee="number";wt(u());)f(),R+=qe(o);else if((Ee===69||Ee===101)&&(ft===43||ft===45)&&wt(Xe))for(f(),R+=qe(o),f(),R+=qe(o),f(),R+=qe(o),ee="number";wt(u());)f(),R+=qe(o);const be=M(R);return{type:ee,value:be,repr:R}},M=function(R){return+R},ue=function(){for(;f();){if(o===41||p())return;O()&&E()}};let fe=0;for(;!p(u());)if(s.push(m()),fe++,fe>e.length*2)throw new Error("I'm infinite-looping!");return s}class De{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class Zp extends De{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Ko extends De{constructor(){super(...arguments),this.tokenType="BADURL"}}class nc extends De{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class eg extends De{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class tg extends De{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class ng extends De{constructor(){super(...arguments),this.tokenType=":"}}class rg extends De{constructor(){super(...arguments),this.tokenType=";"}}class sg extends De{constructor(){super(...arguments),this.tokenType=","}}class ns extends De{constructor(){super(...arguments),this.value="",this.mirror=""}}class ig extends ns{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class og extends ns{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class lg extends ns{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class rc extends ns{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class ag extends ns{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class ug extends ns{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class l0 extends De{constructor(){super(...arguments),this.tokenType="~="}}class a0 extends De{constructor(){super(...arguments),this.tokenType="|="}}class u0 extends De{constructor(){super(...arguments),this.tokenType="^="}}class c0 extends De{constructor(){super(...arguments),this.tokenType="$="}}class f0 extends De{constructor(){super(...arguments),this.tokenType="*="}}class cg extends De{constructor(){super(...arguments),this.tokenType="||"}}class Qo extends De{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class rt extends De{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=qe(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
42
- `:this.value}}class rs extends De{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class fg extends rs{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return wi(this.value)}}class Go extends rs{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return wi(this.value)+"("}}class dg extends rs{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+wi(this.value)}}class hg extends rs{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+wi(this.value):"#"+h0(this.value)}}class pg extends rs{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+wg(this.value)+'"'}}class gg extends rs{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+wg(this.value)+'")'}}class mg extends De{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class yg extends De{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class d0 extends De{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let t=wi(this.unit);return t[0].toLowerCase()==="e"&&(t[1]==="-"||Be(t.charCodeAt(1),48,57))&&(t="\\65 "+t.slice(1,t.length)),e+t}}function wi(n){n=""+n;let e="";const t=n.charCodeAt(0);for(let s=0;s<n.length;s++){const o=n.charCodeAt(s);if(o===0)throw new wc("Invalid character: the input contains U+0000.");Be(o,1,31)||o===127||s===0&&Be(o,48,57)||s===1&&Be(o,48,57)&&t===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||Be(o,48,57)||Be(o,65,90)||Be(o,97,122)?e+=n[s]:e+="\\"+n[s]}return e}function h0(n){n=""+n;let e="";for(let t=0;t<n.length;t++){const s=n.charCodeAt(t);if(s===0)throw new wc("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||Be(s,48,57)||Be(s,65,90)||Be(s,97,122)?e+=n[t]:e+="\\"+s.toString(16)+" "}return e}function wg(n){n=""+n;let e="";for(let t=0;t<n.length;t++){const s=n.charCodeAt(t);if(s===0)throw new wc("Invalid character: the input contains U+0000.");Be(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+n[t]:e+=n[t]}return e}class vt extends Error{}function p0(n,e){let t;try{t=o0(n),t[t.length-1]instanceof Qo||t.push(new Qo)}catch(M){const ue=M.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,fe=(M.stack||"").indexOf(M.message);throw fe!==-1&&(M.stack=M.stack.substring(0,fe)+ue+M.stack.substring(fe+M.message.length)),M.message=ue,M}const s=t.find(M=>M instanceof dg||M instanceof Zp||M instanceof Ko||M instanceof cg||M instanceof eg||M instanceof tg||M instanceof rg||M instanceof ig||M instanceof og||M instanceof gg||M instanceof yg);if(s)throw new vt(`Unsupported token "${s.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let o=0;const l=new Set;function u(){return new vt(`Unexpected token "${t[o].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;t[o]instanceof nc;)o++}function d(M=o){return t[M]instanceof fg}function p(M=o){return t[M]instanceof pg}function m(M=o){return t[M]instanceof mg}function y(M=o){return t[M]instanceof sg}function v(M=o){return t[M]instanceof ag}function S(M=o){return t[M]instanceof ug}function x(M=o){return t[M]instanceof Go}function _(M=o){return t[M]instanceof rt&&t[M].value==="*"}function E(M=o){return t[M]instanceof Qo}function L(M=o){return t[M]instanceof rt&&[">","+","~"].includes(t[M].value)}function O(M=o){return y(M)||S(M)||E(M)||L(M)||t[M]instanceof nc}function P(){const M=[D()];for(;f(),!!y();)o++,M.push(D());return M}function D(){return f(),m()||p()?t[o++].value:V()}function V(){const M={simples:[]};for(f(),L()?M.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):M.simples.push({selector:U(),combinator:""});;){if(f(),L())M.simples[M.simples.length-1].combinator=t[o++].value,f();else if(O())break;M.simples.push({combinator:"",selector:U()})}return M}function U(){let M="";const ue=[];for(;!O();)if(d()||_())M+=t[o++].toSource();else if(t[o]instanceof hg)M+=t[o++].toSource();else if(t[o]instanceof rt&&t[o].value===".")if(o++,d())M+="."+t[o++].toSource();else throw u();else if(t[o]instanceof ng)if(o++,d())if(!e.has(t[o].value.toLowerCase()))M+=":"+t[o++].toSource();else{const fe=t[o++].value.toLowerCase();ue.push({name:fe,args:[]}),l.add(fe)}else if(x()){const fe=t[o++].value.toLowerCase();if(e.has(fe)?(ue.push({name:fe,args:P()}),l.add(fe)):M+=`:${fe}(${Z()})`,f(),!S())throw u();o++}else throw u();else if(t[o]instanceof lg){for(M+="[",o++;!(t[o]instanceof rc)&&!E();)M+=t[o++].toSource();if(!(t[o]instanceof rc))throw u();M+="]",o++}else throw u();if(!M&&!ue.length)throw u();return{css:M||void 0,functions:ue}}function Z(){let M="",ue=1;for(;!E()&&((v()||x())&&ue++,S()&&ue--,!!ue);)M+=t[o++].toSource();return M}const H=P();if(!E())throw u();if(H.some(M=>typeof M!="object"||!("simples"in M)))throw new vt(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:H,names:Array.from(l)}}const sc=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),g0=new Set(["left-of","right-of","above","below","near"]),vg=new Set(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function ml(n){const e=w0(n),t=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const o=p0(s.body,vg);t.push({name:"css",body:o.selector,source:s.body});continue}if(sc.has(s.name)){let o,l;try{const p=JSON.parse("["+s.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new vt(`Malformed selector: ${s.name}=`+s.body);if(o=p[0],p.length===2){if(typeof p[1]!="number"||!g0.has(s.name))throw new vt(`Malformed selector: ${s.name}=`+s.body);l=p[1]}}catch{throw new vt(`Malformed selector: ${s.name}=`+s.body)}const u={name:s.name,source:s.body,body:{parsed:ml(o),distance:l}},f=[...u.body.parsed.parts].reverse().find(p=>p.name==="internal:control"&&p.body==="enter-frame"),d=f?u.body.parsed.parts.indexOf(f):-1;d!==-1&&m0(u.body.parsed.parts.slice(0,d+1),t.slice(0,d+1))&&u.body.parsed.parts.splice(0,d+1),t.push(u);continue}t.push({...s,source:s.body})}if(sc.has(t[0].name))throw new vt(`"${t[0].name}" selector cannot be first`);return{capture:e.capture,parts:t}}function m0(n,e){return gn({parts:n})===gn({parts:e})}function gn(n,e){return typeof n=="string"?n:n.parts.map((t,s)=>{let o=!0;!e&&s!==n.capture&&(t.name==="css"||t.name==="xpath"&&t.source.startsWith("//")||t.source.startsWith(".."))&&(o=!1);const l=o?t.name+"=":"";return`${s===n.capture?"*":""}${l}${t.source}`}).join(" >> ")}function y0(n,e){const t=(s,o)=>{for(const l of s.parts)e(l,o),sc.has(l.name)&&t(l.body.parsed,!0)};t(n,!1)}function w0(n){let e=0,t,s=0;const o={parts:[]},l=()=>{const f=n.substring(s,e).trim(),d=f.indexOf("=");let p,m;d!==-1&&f.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(p=f.substring(0,d).trim(),m=f.substring(d+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(p="text",m=f):/^\(*\/\//.test(f)||f.startsWith("..")?(p="xpath",m=f):(p="css",m=f);let y=!1;if(p[0]==="*"&&(y=!0,p=p.substring(1)),o.parts.push({name:p,body:m}),y){if(o.capture!==void 0)throw new vt("Only one of the selectors can capture using * modifier");o.capture=o.parts.length-1}};if(!n.includes(">>"))return e=n.length,l(),o;const u=()=>{const d=n.substring(s,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<n.length;){const f=n[e];f==="\\"&&e+1<n.length?e+=2:f===t?(t=void 0,e++):!t&&(f==='"'||f==="'"||f==="`")&&!u()?(t=f,e++):!t&&f===">"&&n[e+1]===">"?(l(),e+=2,s=e):e++}return l(),o}function ar(n,e){let t=0,s=n.length===0;const o=()=>n[t]||"",l=()=>{const E=o();return++t,s=t>=n.length,E},u=E=>{throw s?new vt(`Unexpected end of selector while parsing selector \`${n}\``):new vt(`Error while parsing selector \`${n}\` - unexpected symbol "${o()}" at position ${t}`+(E?" during "+E:""))};function f(){for(;!s&&/\s/.test(o());)l()}function d(E){return E>="€"||E>="0"&&E<="9"||E>="A"&&E<="Z"||E>="a"&&E<="z"||E>="0"&&E<="9"||E==="_"||E==="-"}function p(){let E="";for(f();!s&&d(o());)E+=l();return E}function m(E){let L=l();for(L!==E&&u("parsing quoted string");!s&&o()!==E;)o()==="\\"&&l(),L+=l();return o()!==E&&u("parsing quoted string"),L+=l(),L}function y(){l()!=="/"&&u("parsing regular expression");let E="",L=!1;for(;!s;){if(o()==="\\")E+=l(),s&&u("parsing regular expression");else if(L&&o()==="]")L=!1;else if(!L&&o()==="[")L=!0;else if(!L&&o()==="/")break;E+=l()}l()!=="/"&&u("parsing regular expression");let O="";for(;!s&&o().match(/[dgimsuy]/);)O+=l();try{return new RegExp(E,O)}catch(P){throw new vt(`Error while parsing selector \`${n}\`: ${P.message}`)}}function v(){let E="";return f(),o()==="'"||o()==='"'?E=m(o()).slice(1,-1):E=p(),E||u("parsing property path"),E}function S(){f();let E="";return s||(E+=l()),!s&&E!=="="&&(E+=l()),["=","*=","^=","$=","|=","~="].includes(E)||u("parsing operator"),E}function x(){l();const E=[];for(E.push(v()),f();o()===".";)l(),E.push(v()),f();if(o()==="]")return l(),{name:E.join("."),jsonPath:E,op:"<truthy>",value:null,caseSensitive:!1};const L=S();let O,P=!0;if(f(),o()==="/"){if(L!=="=")throw new vt(`Error while parsing selector \`${n}\` - cannot use ${L} in attribute with regular expression`);O=y()}else if(o()==="'"||o()==='"')O=m(o()).slice(1,-1),f(),o()==="i"||o()==="I"?(P=!1,l()):(o()==="s"||o()==="S")&&(P=!0,l());else{for(O="";!s&&(d(o())||o()==="+"||o()===".");)O+=l();O==="true"?O=!0:O==="false"?O=!1:e||(O=+O,Number.isNaN(O)&&u("parsing attribute value"))}if(f(),o()!=="]"&&u("parsing attribute value"),l(),L!=="="&&typeof O!="string")throw new vt(`Error while parsing selector \`${n}\` - cannot use ${L} in attribute with non-string matching value - ${O}`);return{name:E.join("."),jsonPath:E,op:L,value:O,caseSensitive:P}}const _={name:"",attributes:[]};for(_.name=p(),f();o()==="[";)_.attributes.push(x()),f();if(s||u(void 0),!_.name&&!_.attributes.length)throw new vt(`Error while parsing selector \`${n}\` - selector cannot be empty`);return _}function yl(n,e="'"){const t=JSON.stringify(n),s=t.substring(1,t.length-1).replace(/\\"/g,'"');if(e==="'")return e+s.replace(/[']/g,"\\'")+e;if(e==='"')return e+s.replace(/["]/g,'\\"')+e;if(e==="`")return e+s.replace(/[`]/g,"`")+e;throw new Error("Invalid escape char")}function rl(n){return n.charAt(0).toUpperCase()+n.substring(1)}function Sg(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function jt(n){let e="";for(let t=0;t<n.length;t++)e+=v0(n,t);return e}function Xs(n){return`"${jt(n).replace(/\\ /g," ")}"`}function v0(n,e){const t=n.charCodeAt(e);return t===0?"�":t>=1&&t<=31||t>=48&&t<=57&&(e===0||e===1&&n.charCodeAt(0)===45)?"\\"+t.toString(16)+" ":e===0&&t===45&&n.length===1?"\\"+n.charAt(e):t>=128||t===45||t===95||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?n.charAt(e):"\\"+n.charAt(e)}let nr;function S0(){nr=new Map}function ct(n){let e=nr==null?void 0:nr.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),nr==null||nr.set(n,e)),e}function wl(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function _g(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function St(n,e){return typeof n!="string"?_g(n):`${JSON.stringify(n)}${e?"s":"i"}`}function at(n,e){return typeof n!="string"?_g(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function _0(n,e,t=""){if(n.length<=e)return n;const s=[...n];return s.length>e?s.slice(0,e-t.length).join("")+t:s.join("")}function ap(n,e){return _0(n,e,"…")}function sl(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E0(n,e){const t=n.length,s=e.length;let o=0,l=0;const u=Array(t+1).fill(null).map(()=>Array(s+1).fill(0));for(let f=1;f<=t;f++)for(let d=1;d<=s;d++)n[f-1]===e[d-1]&&(u[f][d]=u[f-1][d-1]+1,u[f][d]>o&&(o=u[f][d],l=f));return n.slice(l-o,l)}function Jr(n,e,t=!1){return Eg(n,e,t,1)[0]}function Eg(n,e,t=!1,s=20,o){try{return qr(new A0[n](o),ml(e),t,s)}catch{return[e]}}function qr(n,e,t=!1,s=20){const o=[...e.parts],l=[];let u=t?"frame-locator":"page";for(let f=0;f<o.length;f++){const d=o[f],p=u;if(u="locator",d.name==="nth"){d.body==="0"?l.push([n.generateLocator(p,"first",""),n.generateLocator(p,"nth","0")]):d.body==="-1"?l.push([n.generateLocator(p,"last",""),n.generateLocator(p,"nth","-1")]):l.push([n.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){l.push([n.generateLocator(p,"visible",d.body),n.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:x,text:_}=Zs(d.body);l.push([n.generateLocator(p,"text",_,{exact:x})]);continue}if(d.name==="internal:has-text"){const{exact:x,text:_}=Zs(d.body);if(!x){l.push([n.generateLocator(p,"has-text",_,{exact:x})]);continue}}if(d.name==="internal:has-not-text"){const{exact:x,text:_}=Zs(d.body);if(!x){l.push([n.generateLocator(p,"has-not-text",_,{exact:x})]);continue}}if(d.name==="internal:has"){const x=qr(n,d.body.parsed,!1,s);l.push(x.map(_=>n.generateLocator(p,"has",_)));continue}if(d.name==="internal:has-not"){const x=qr(n,d.body.parsed,!1,s);l.push(x.map(_=>n.generateLocator(p,"hasNot",_)));continue}if(d.name==="internal:and"){const x=qr(n,d.body.parsed,!1,s);l.push(x.map(_=>n.generateLocator(p,"and",_)));continue}if(d.name==="internal:or"){const x=qr(n,d.body.parsed,!1,s);l.push(x.map(_=>n.generateLocator(p,"or",_)));continue}if(d.name==="internal:chain"){const x=qr(n,d.body.parsed,!1,s);l.push(x.map(_=>n.generateLocator(p,"chain",_)));continue}if(d.name==="internal:label"){const{exact:x,text:_}=Zs(d.body);l.push([n.generateLocator(p,"label",_,{exact:x})]);continue}if(d.name==="internal:role"){const x=ar(d.body,!0),_={attrs:[]};for(const E of x.attributes)E.name==="name"?(_.exact=E.caseSensitive,_.name=E.value):(E.name==="level"&&typeof E.value=="string"&&(E.value=+E.value),_.attrs.push({name:E.name==="include-hidden"?"includeHidden":E.name,value:E.value}));l.push([n.generateLocator(p,"role",x.name,_)]);continue}if(d.name==="internal:testid"){const x=ar(d.body,!0),{value:_}=x.attributes[0];l.push([n.generateLocator(p,"test-id",_)]);continue}if(d.name==="internal:attr"){const x=ar(d.body,!0),{name:_,value:E,caseSensitive:L}=x.attributes[0],O=E,P=!!L;if(_==="placeholder"){l.push([n.generateLocator(p,"placeholder",O,{exact:P})]);continue}if(_==="alt"){l.push([n.generateLocator(p,"alt",O,{exact:P})]);continue}if(_==="title"){l.push([n.generateLocator(p,"title",O,{exact:P})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const x=l[l.length-1],_=o[f-1],E=x.map(L=>n.chainLocators([L,n.generateLocator(p,"frame","")]));["xpath","css"].includes(_.name)&&E.push(n.generateLocator(p,"frame-locator",gn({parts:[_]})),n.generateLocator(p,"frame-locator",gn({parts:[_]},!0))),x.splice(0,x.length,...E),u="frame-locator";continue}const m=o[f+1],y=gn({parts:[d]}),v=n.generateLocator(p,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:x,text:_}=Zs(m.body);if(!x){const E=n.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",_,{exact:x}),L={};m.name==="internal:has-text"?L.hasText=_:L.hasNotText=_;const O=n.generateLocator(p,"default",y,L);l.push([n.chainLocators([v,E]),O]),f++;continue}}let S;if(["xpath","css"].includes(d.name)){const x=gn({parts:[d]},!0);S=n.generateLocator(p,"default",x)}l.push([v,S].filter(Boolean))}return k0(n,l,s)}function k0(n,e,t){const s=e.map(()=>""),o=[],l=u=>{if(u===e.length)return o.push(n.chainLocators(s)),o.length<t;for(const f of e[u])if(s[u]=f,!l(u+1))return!1;return!0};return l(0),o}function Zs(n){let e=!1;const t=n.match(/^\/(.*)\/([igm]*)$/);return t?{text:new RegExp(t[1],t[2])}:(n.endsWith('"')?(n=JSON.parse(n),e=!0):n.endsWith('"s')?(n=JSON.parse(n.substring(0,n.length-1)),e=!0):n.endsWith('"i')&&(n=JSON.parse(n.substring(0,n.length-1)),e=!1),{exact:e,text:n})}class x0{constructor(e){this.preferredQuote=e}generateLocator(e,t,s,o={}){switch(t){case"default":return o.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(o.hasNotText)} })`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${s==="true"?"true":"false"} })`;case"role":const l=[];Je(o.name)?l.push(`name: ${this.regexToSourceString(o.name)}`):typeof o.name=="string"&&(l.push(`name: ${this.quote(o.name)}`),o.exact&&l.push("exact: true"));for(const{name:f,value:d}of o.attrs)l.push(`${f}: ${typeof d=="string"?this.quote(d):d}`);const u=l.length?`, { ${l.join(", ")} }`:"";return`getByRole(${this.quote(s)}${u})`;case"has-text":return`filter({ hasText: ${this.toHasText(s)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(s)} })`;case"has":return`filter({ has: ${s} })`;case"hasNot":return`filter({ hasNot: ${s} })`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("getByText",s,!!o.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!o.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!o.exact);case"label":return this.toCallWithExact("getByLabel",s,!!o.exact);case"title":return this.toCallWithExact("getByTitle",s,!!o.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return wl(String(e))}toCallWithExact(e,t,s){return Je(t)?`${e}(${this.regexToSourceString(t)})`:s?`${e}(${this.quote(t)}, { exact: true })`:`${e}(${this.quote(t)})`}toHasText(e){return Je(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return Je(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return yl(e,this.preferredQuote??"'")}}class b0{generateLocator(e,t,s,o={}){switch(t){case"default":return o.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(o.hasText)})`:o.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(o.hasNotText)})`:`locator(${this.quote(s)})`;case"frame-locator":return`frame_locator(${this.quote(s)})`;case"frame":return"content_frame";case"nth":return`nth(${s})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${s==="true"?"True":"False"})`;case"role":const l=[];Je(o.name)?l.push(`name=${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`name=${this.quote(o.name)}`),o.exact&&l.push("exact=True"));for(const{name:f,value:d}of o.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),l.push(`${Sg(f)}=${p}`)}const u=l.length?`, ${l.join(", ")}`:"";return`get_by_role(${this.quote(s)}${u})`;case"has-text":return`filter(has_text=${this.toHasText(s)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(s)})`;case"has":return`filter(has=${s})`;case"hasNot":return`filter(has_not=${s})`;case"and":return`and_(${s})`;case"or":return`or_(${s})`;case"chain":return`locator(${s})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("get_by_text",s,!!o.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!o.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!o.exact);case"label":return this.toCallWithExact("get_by_label",s,!!o.exact);case"title":return this.toCallWithExact("get_by_title",s,!!o.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${wl(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${t})`}toCallWithExact(e,t,s){return Je(t)?`${e}(${this.regexToString(t)})`:s?`${e}(${this.quote(t)}, exact=True)`:`${e}(${this.quote(t)})`}toHasText(e){return Je(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return Je(e)?this.regexToString(e):this.quote(e)}quote(e){return yl(e,'"')}}class T0{generateLocator(e,t,s,o={}){let l;switch(e){case"page":l="Page";break;case"frame-locator":l="FrameLocator";break;case"locator":l="Locator";break}switch(t){case"default":return o.hasText!==void 0?`locator(${this.quote(s)}, new ${l}.LocatorOptions().setHasText(${this.toHasText(o.hasText)}))`:o.hasNotText!==void 0?`locator(${this.quote(s)}, new ${l}.LocatorOptions().setHasNotText(${this.toHasText(o.hasNotText)}))`:`locator(${this.quote(s)})`;case"frame-locator":return`frameLocator(${this.quote(s)})`;case"frame":return"contentFrame()";case"nth":return`nth(${s})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${l}.FilterOptions().setVisible(${s==="true"?"true":"false"}))`;case"role":const u=[];Je(o.name)?u.push(`.setName(${this.regexToString(o.name)})`):typeof o.name=="string"&&(u.push(`.setName(${this.quote(o.name)})`),o.exact&&u.push(".setExact(true)"));for(const{name:d,value:p}of o.attrs)u.push(`.set${rl(d)}(${typeof p=="string"?this.quote(p):p})`);const f=u.length?`, new ${l}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${Sg(s).toUpperCase()}${f})`;case"has-text":return`filter(new ${l}.FilterOptions().setHasText(${this.toHasText(s)}))`;case"has-not-text":return`filter(new ${l}.FilterOptions().setHasNotText(${this.toHasText(s)}))`;case"has":return`filter(new ${l}.FilterOptions().setHas(${s}))`;case"hasNot":return`filter(new ${l}.FilterOptions().setHasNot(${s}))`;case"and":return`and(${s})`;case"or":return`or(${s})`;case"chain":return`locator(${s})`;case"test-id":return`getByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact(l,"getByText",s,!!o.exact);case"alt":return this.toCallWithExact(l,"getByAltText",s,!!o.exact);case"placeholder":return this.toCallWithExact(l,"getByPlaceholder",s,!!o.exact);case"label":return this.toCallWithExact(l,"getByLabel",s,!!o.exact);case"title":return this.toCallWithExact(l,"getByTitle",s,!!o.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(wl(e.source))}${t})`}toCallWithExact(e,t,s,o){return Je(s)?`${t}(${this.regexToString(s)})`:o?`${t}(${this.quote(s)}, new ${e}.${rl(t)}Options().setExact(true))`:`${t}(${this.quote(s)})`}toHasText(e){return Je(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return Je(e)?this.regexToString(e):this.quote(e)}quote(e){return yl(e,'"')}}class C0{generateLocator(e,t,s,o={}){switch(t){case"default":return o.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(o.hasText)} })`:o.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(o.hasNotText)} })`:`Locator(${this.quote(s)})`;case"frame-locator":return`FrameLocator(${this.quote(s)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${s})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${s==="true"?"true":"false"} })`;case"role":const l=[];Je(o.name)?l.push(`NameRegex = ${this.regexToString(o.name)}`):typeof o.name=="string"&&(l.push(`Name = ${this.quote(o.name)}`),o.exact&&l.push("Exact = true"));for(const{name:f,value:d}of o.attrs)l.push(`${rl(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=l.length?`, new() { ${l.join(", ")} }`:"";return`GetByRole(AriaRole.${rl(s)}${u})`;case"has-text":return`Filter(new() { ${this.toHasText(s)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(s)} })`;case"has":return`Filter(new() { Has = ${s} })`;case"hasNot":return`Filter(new() { HasNot = ${s} })`;case"and":return`And(${s})`;case"or":return`Or(${s})`;case"chain":return`Locator(${s})`;case"test-id":return`GetByTestId(${this.toTestIdValue(s)})`;case"text":return this.toCallWithExact("GetByText",s,!!o.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!o.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!o.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!o.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!o.exact);default:throw new Error("Unknown selector kind "+t)}}chainLocators(e){return e.join(".")}regexToString(e){const t=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(wl(e.source))}${t})`}toCallWithExact(e,t,s){return Je(t)?`${e}(${this.regexToString(t)})`:s?`${e}(${this.quote(t)}, new() { Exact = true })`:`${e}(${this.quote(t)})`}toHasText(e){return Je(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return Je(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return Je(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return yl(e,'"')}}class N0{generateLocator(e,t,s,o={}){return JSON.stringify({kind:t,body:s,options:o})}chainLocators(e){const t=e.map(s=>JSON.parse(s));for(let s=0;s<t.length-1;++s)t[s].next=t[s+1];return JSON.stringify(t[0])}}const A0={javascript:x0,python:b0,java:T0,csharp:C0,jsonl:N0};function Je(n){return n instanceof RegExp}const Bn=te.forwardRef(function({children:e,title:t="",icon:s,disabled:o=!1,toggled:l=!1,onClick:u=()=>{},style:f,testId:d,className:p,ariaLabel:m},y){return C.jsxs("button",{ref:y,className:Gt(p,"toolbar-button",s,l&&"toggled"),onMouseDown:up,onClick:u,onDoubleClick:up,title:t,disabled:!!o,style:f,"data-testid":d,"aria-label":m||t,children:[s&&C.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),YE=({style:n})=>C.jsx("div",{className:"toolbar-separator",style:n}),up=n=>{n.stopPropagation(),n.preventDefault()},L0=({value:n,description:e})=>{const[t,s]=te.useState("copy"),o=te.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{s("check"),setTimeout(()=>{s("copy")},3e3)},()=>{s("close")})},()=>{s("close")})},[n]);return C.jsx(Bn,{title:e||"Copy",icon:t,onClick:o})},Mu=({value:n,description:e,copiedDescription:t=e,style:s})=>{const[o,l]=te.useState(!1),u=te.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),l(!0),setTimeout(()=>l(!1),3e3)},[n]);return C.jsx(Bn,{style:s,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:o?t:e})},kg=({text:n})=>C.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),cp=new Map;function vc({name:n,items:e=[],id:t,render:s,icon:o,isError:l,isWarning:u,isInfo:f,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:v,noItemsMessage:S,dataTestId:x,notSelectable:_}){const E=te.useRef(null),[L,O]=te.useState();return te.useEffect(()=>{y==null||y(L)},[y,L]),te.useEffect(()=>{const P=E.current;if(!P)return;const D=()=>{cp.set(n,P.scrollTop)};return P.addEventListener("scroll",D,{passive:!0}),()=>P.removeEventListener("scroll",D)},[n]),te.useEffect(()=>{E.current&&(E.current.scrollTop=cp.get(n)||0)},[n]),C.jsx("div",{className:Gt("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"data-testid":x||n+"-list",children:C.jsxs("div",{className:Gt("list-view-content",_&&"not-selectable"),tabIndex:0,onKeyDown:P=>{var Z;if(d&&P.key==="Enter"){p==null||p(d,e.indexOf(d));return}if(P.key!=="ArrowDown"&&P.key!=="ArrowUp")return;P.stopPropagation(),P.preventDefault();const D=d?e.indexOf(d):-1;let V=D;P.key==="ArrowDown"&&(D===-1?V=0:V=Math.min(D+1,e.length-1)),P.key==="ArrowUp"&&(D===-1?V=e.length-1:V=Math.max(D-1,0));const U=(Z=E.current)==null?void 0:Z.children.item(V);Ov(U||void 0),y==null||y(void 0),m==null||m(e[V],V),O(void 0)},ref:E,children:[S&&e.length===0&&C.jsx("div",{className:"list-view-empty",children:S}),e.map((P,D)=>{const V=s(P,D);return C.jsxs("div",{onDoubleClick:()=>p==null?void 0:p(P,D),role:"listitem",className:Gt("list-view-entry",d===P&&"selected",!_&&L===P&&"highlighted",(l==null?void 0:l(P,D))&&"error",(u==null?void 0:u(P,D))&&"warning",(f==null?void 0:f(P,D))&&"info"),onClick:()=>m==null?void 0:m(P,D),onMouseEnter:()=>O(P),onMouseLeave:()=>O(void 0),children:[o&&C.jsx("div",{className:"codicon "+(o(P,D)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:U=>{U.preventDefault(),U.stopPropagation()},onClick:U=>{U.stopPropagation(),U.preventDefault(),v==null||v(P,D)}}),typeof V=="string"?C.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:V}):V]},(t==null?void 0:t(P,D))||D)})]})})}function il(n,e){const t=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let o,l={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(o=t.exec(n))!==null;){const[,,p,,m]=o;if(p){const y=+p;switch(y){case 0:l={};break;case 1:l["font-weight"]="bold";break;case 2:l.opacity="0.8";break;case 3:l["font-style"]="italic";break;case 4:l["text-decoration"]="underline";break;case 7:u=!0;break;case 8:l.display="none";break;case 9:l["text-decoration"]="line-through";break;case 22:delete l["font-weight"],delete l["font-style"],delete l.opacity,delete l["text-decoration"];break;case 23:delete l["font-weight"],delete l["font-style"],delete l.opacity;break;case 24:delete l["text-decoration"];break;case 27:u=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:f=fp[y-30];break;case 39:f=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=fp[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:l["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:f=dp[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=dp[y-100];break}}else if(m){const y={...l},v=u?d:f;v!==void 0&&(y.color=v);const S=u?f:d;S!==void 0&&(y["background-color"]=S),s.push(`<span style="${O0(y)}">${I0(m)}</span>`)}}return s.join("")}const fp={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},dp={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function I0(n){return n.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function O0(n){return Object.entries(n).map(([e,t])=>`${e}: ${t}`).join("; ")}const $0=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:t,onPaneDoubleClick:s})=>(kt.useEffect(()=>{const o=document.createElement("div");return o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.bottom="0",o.style.left="0",o.style.zIndex="9999",o.style.cursor=n,document.body.appendChild(o),e&&o.addEventListener("mousemove",e),t&&o.addEventListener("mouseup",t),s&&document.body.addEventListener("dblclick",s),()=>{e&&o.removeEventListener("mousemove",e),t&&o.removeEventListener("mouseup",t),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(o)}},[n,e,t,s]),C.jsx(C.Fragment,{})),M0={position:"absolute",top:0,right:0,bottom:0,left:0},P0=({orientation:n,offsets:e,setOffsets:t,resizerColor:s,resizerWidth:o,minColumnWidth:l})=>{const u=l||0,[f,d]=kt.useState(null),[p,m]=gl(),y={position:"absolute",right:n==="horizontal"?void 0:0,bottom:n==="horizontal"?0:void 0,width:n==="horizontal"?7:void 0,height:n==="horizontal"?void 0:7,borderTopWidth:n==="horizontal"?void 0:(7-o)/2,borderRightWidth:n==="horizontal"?(7-o)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-o)/2,borderLeftWidth:n==="horizontal"?(7-o)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return C.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-o)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!f&&C.jsx($0,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:v=>{if(!v.buttons)d(null);else if(f){const S=n==="horizontal"?v.clientX-f.clientX:v.clientY-f.clientY,x=f.offset+S,_=f.index>0?e[f.index-1]:0,E=n==="horizontal"?p.width:p.height,L=Math.min(Math.max(_+u,x),E-u)-e[f.index];for(let O=f.index;O<e.length;++O)e[O]=e[O]+L;t([...e])}}}),e.map((v,S)=>C.jsx("div",{style:{...y,top:n==="horizontal"?0:v,left:n==="horizontal"?v:0,pointerEvents:"initial"},onMouseDown:x=>d({clientX:x.clientX,clientY:x.clientY,offset:v,index:S}),children:C.jsx("div",{style:{...M0,background:s}})},S))]})},R0="modulepreload",j0=function(n,e){return new URL(n,e).href},hp={},D0=function(e,t,s){let o=Promise.resolve();if(t&&t.length>0){const u=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),d=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(t.map(p=>{if(p=j0(p,s),p in hp)return;hp[p]=!0;const m=p.endsWith(".css"),y=m?'[rel="stylesheet"]':"";if(!!s)for(let x=u.length-1;x>=0;x--){const _=u[x];if(_.href===p&&(!m||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${y}`))return;const S=document.createElement("link");if(S.rel=m?"stylesheet":R0,m||(S.as="script"),S.crossOrigin="",S.href=p,d&&S.setAttribute("nonce",d),document.head.appendChild(S),m)return new Promise((x,_)=>{S.addEventListener("load",x),S.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&l(f.reason);return e().catch(l)})},XE=20,hi=({text:n,language:e,mimeType:t,linkify:s,readOnly:o,highlight:l,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:v,placeholder:S})=>{const[x,_]=gl(),[E]=te.useState(D0(()=>import("./codeMirrorModule-gU1OOCQO.js"),__vite__mapDeps([0,1]),import.meta.url).then(D=>D.default)),L=te.useRef(null),[O,P]=te.useState();return te.useEffect(()=>{(async()=>{var H,M;const D=await E;B0(D);const V=_.current;if(!V)return;const U=U0(e)||z0(t)||(s?"text/linkified":"");if(L.current&&U===L.current.cm.getOption("mode")&&!!o===L.current.cm.getOption("readOnly")&&f===L.current.cm.getOption("lineNumbers")&&m===L.current.cm.getOption("lineWrapping")&&S===L.current.cm.getOption("placeholder"))return;(M=(H=L.current)==null?void 0:H.cm)==null||M.getWrapperElement().remove();const Z=D(V,{value:"",mode:U,readOnly:!!o,lineNumbers:f,lineWrapping:m,placeholder:S});return L.current={cm:Z},d&&Z.focus(),P(Z),Z})()},[E,O,_,e,t,s,f,m,o,d,S]),te.useEffect(()=>{L.current&&L.current.cm.setSize(x.width,x.height)},[x]),te.useLayoutEffect(()=>{var U;if(!O)return;let D=!1;if(O.getValue()!==n&&(O.setValue(n),D=!0,p&&(O.execCommand("selectAll"),O.focus())),D||JSON.stringify(l)!==JSON.stringify(L.current.highlight)){for(const M of L.current.highlight||[])O.removeLineClass(M.line-1,"wrap");for(const M of l||[])O.addLineClass(M.line-1,"wrap",`source-line-${M.type}`);for(const M of L.current.widgets||[])O.removeLineWidget(M);for(const M of L.current.markers||[])M.clear();const Z=[],H=[];for(const M of l||[]){if(M.type!=="subtle-error"&&M.type!=="error")continue;const ue=(U=L.current)==null?void 0:U.cm.getLine(M.line-1);if(ue){const fe={};fe.title=M.message||"",H.push(O.markText({line:M.line-1,ch:0},{line:M.line-1,ch:M.column||ue.length},{className:"source-line-error-underline",attributes:fe}))}if(M.type==="error"){const fe=document.createElement("div");fe.innerHTML=il(M.message||""),fe.className="source-line-error-widget",Z.push(O.addLineWidget(M.line,fe,{above:!0,coverGutter:!1}))}}L.current.highlight=l,L.current.widgets=Z,L.current.markers=H}typeof u=="number"&&L.current.cm.lineCount()>=u&&O.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let V;return y&&(V=()=>y(O.getValue()),O.on("change",V)),()=>{V&&O.off("change",V)}},[O,n,l,u,p,y]),C.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:_,onClick:F0})};function F0(n){var t;if(!(n.target instanceof HTMLElement))return;let e;n.target.classList.contains("cm-linkified")?e=n.target.textContent:n.target.classList.contains("cm-link")&&((t=n.target.nextElementSibling)!=null&&t.classList.contains("cm-url"))&&(e=n.target.nextElementSibling.textContent.slice(1,-1)),e&&(n.preventDefault(),n.stopPropagation(),window.open(e,"_blank"))}let pp=!1;function B0(n){pp||(pp=!0,n.defineSimpleMode("text/linkified",{start:[{regex:$v,token:"linkified"}]}))}function z0(n){if(n){if(n.includes("javascript")||n.includes("json"))return"javascript";if(n.includes("python"))return"python";if(n.includes("csharp"))return"text/x-csharp";if(n.includes("java"))return"text/x-java";if(n.includes("markdown"))return"markdown";if(n.includes("html")||n.includes("svg"))return"htmlmixed";if(n.includes("css"))return"css"}}function U0(n){if(n)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[n]}const q0=vc;function ZE(n,e){const{entries:t}=te.useMemo(()=>{if(!n)return{entries:[]};const o=[];function l(f){var m,y,v,S,x,_;const d=o[o.length-1];d&&((m=f.browserMessage)==null?void 0:m.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((v=f.browserMessage)==null?void 0:v.location)===((S=d.browserMessage)==null?void 0:S.location)&&f.browserError===d.browserError&&((x=f.nodeMessage)==null?void 0:x.html)===((_=d.nodeMessage)==null?void 0:_.html)&&f.isError===d.isError&&f.isWarning===d.isWarning&&f.timestamp-d.timestamp<1e3?d.repeat++:o.push({...f,repeat:1})}const u=[...n.events,...n.stdio].sort((f,d)=>{const p="time"in f?f.time:f.timestamp,m="time"in d?d.time:d.timestamp;return p-m});for(const f of u){if(f.type==="console"){const d=f.args&&f.args.length?H0(f.args):xg(f.text),p=f.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${f.location.lineNumber}`;l({browserMessage:{body:d,bodyString:f.text,location:y},isError:f.messageType==="error",isWarning:f.messageType==="warning",timestamp:f.time})}if(f.type==="event"&&f.method==="pageError"&&l({browserError:f.params.error,isError:!0,isWarning:!1,timestamp:f.time}),f.type==="stderr"||f.type==="stdout"){let d="";f.text&&(d=il(f.text.trim())||""),f.base64&&(d=il(atob(f.base64).trim())||""),l({nodeMessage:{html:d},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:o}},[n]);return{entries:te.useMemo(()=>e?t.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):t,[t,e])}}const ek=({consoleModel:n,boundaries:e,onEntryHovered:t,onAccepted:s})=>n.entries.length?C.jsx("div",{className:"console-tab",children:C.jsx(q0,{name:"console",onAccepted:s,onHighlighted:t,items:n.entries,isError:o=>o.isError,isWarning:o=>o.isWarning,render:o=>{const l=di(o.timestamp-e.minimum),u=C.jsx("span",{className:"console-time",children:l}),f=o.isError?"status-error":o.isWarning?"status-warning":"status-none",d=o.browserMessage||o.browserError?C.jsx("span",{className:Gt("codicon","codicon-browser",f),title:"Browser message"}):C.jsx("span",{className:Gt("codicon","codicon-file",f),title:"Runner message"});let p,m,y,v;const{browserMessage:S,browserError:x,nodeMessage:_}=o;if(S&&(p=S.location,m=S.body),x){const{error:E,value:L}=x;E?(m=E.message,v=E.stack):m=String(L)}return _&&(y=_.html),C.jsxs("div",{className:"console-line",children:[u,d,p&&C.jsx("span",{className:"console-location",children:p}),o.repeat>1&&C.jsx("span",{className:"console-repeat",children:o.repeat}),m&&C.jsx("span",{className:"console-line-message",children:m}),y&&C.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),v&&C.jsx("div",{className:"console-stack",children:v})]})}})}):C.jsx(kg,{text:"No console entries"});function H0(n){if(n.length===1)return xg(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),t=e?n[0].value:"",s=e?n.slice(1):n;let o=0;const l=/%([%sdifoOc])/g;let u;const f=[];let d=[];f.push(C.jsx("span",{children:d}));let p=0;for(;(u=l.exec(t))!==null;){const m=t.substring(p,u.index);d.push(C.jsx("span",{children:m})),p=u.index+2;const y=u[0][1];if(y==="%")d.push(C.jsx("span",{children:"%"}));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const v=s[o++],S={};typeof(v==null?void 0:v.value)!="string"&&(S.color="var(--vscode-debugTokenExpression-number)"),d.push(C.jsx("span",{style:S,children:(v==null?void 0:v.preview)||""}))}else if(y==="c"){d=[];const v=s[o++],S=v?V0(v.preview):{};f.push(C.jsx("span",{style:S,children:d}))}}for(p<t.length&&d.push(C.jsx("span",{children:t.substring(p)}));o<s.length;o++){const m=s[o],y={};d.length&&d.push(C.jsx("span",{children:" "})),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(C.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""}))}return f}function xg(n){return[C.jsx("span",{dangerouslySetInnerHTML:{__html:il(n.trim())}})]}function V0(n){try{const e={},t=n.split(";");for(const s of t){const o=s.trim();if(!o)continue;let[l,u]=o.split(":");if(l=l.trim(),u=u.trim(),!W0(l))continue;const f=l.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function W0(n){return["background","border","color","font","line","margin","padding","text"].some(t=>n.startsWith(t))}const Sc=({noShadow:n,children:e,noMinHeight:t,className:s,sidebarBackground:o,onClick:l})=>C.jsx("div",{className:Gt("toolbar",n&&"no-shadow",t&&"no-min-height",s,o&&"toolbar-sidebar-background"),onClick:l,children:e}),K0=({tabs:n,selectedTab:e,setSelectedTab:t,leftToolbar:s,rightToolbar:o,dataTestId:l,mode:u})=>{const f=te.useId();return e||(e=n[0].id),u||(u="default"),C.jsx("div",{className:"tabbed-pane","data-testid":l,children:C.jsxs("div",{className:"vbox",children:[C.jsxs(Sc,{children:[s&&C.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...s]}),u==="default"&&C.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>C.jsx(bg,{id:d.id,ariaControls:`${f}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:t},d.id))]}),u==="select"&&C.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:C.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:d=>{t==null||t(n[d.currentTarget.selectedIndex].id)},children:n.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),C.jsxs("option",{value:d.id,selected:d.id===e,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,p]},d.id)})})}),o&&C.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...o]})]}),n.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return C.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,style:{display:e===d.id?"inherit":"none"},children:d.component},d.id);if(e===d.id)return C.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},bg=({id:n,title:e,count:t,errorCount:s,selected:o,onSelect:l,ariaControls:u})=>C.jsxs("div",{className:Gt("tabbed-pane-tab",o&&"selected"),onClick:()=>l==null?void 0:l(n),role:"tab",title:e,"aria-controls":u,children:[C.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!t&&C.jsx("div",{className:"tabbed-pane-tab-counter",children:t}),!!s&&C.jsx("div",{className:"tabbed-pane-tab-counter error",children:s})]});async function Q0(n){const e=navigator.platform.includes("Win")?"win":"unix";let t=[];const s=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(y){const v='^"';return v+y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
43
-
44
- `)+v}function l(y){function v(S){let _=S.charCodeAt(0).toString(16);for(;_.length<4;)_="0"+_;return"\\u"+_}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+y+"'"}const u=e==="win"?o:l;t.push(u(n.request.url).replace(/[[{}\]]/g,"\\$&"));let f="GET";const d=[],p=await Tg(n);p&&(d.push("--data-raw "+u(p)),s.add("content-length"),f="POST"),n.request.method!==f&&t.push("-X "+u(n.request.method));const m=n.request.headers;for(let y=0;y<m.length;y++){const v=m[y],S=v.name.replace(/^:/,"");s.has(S.toLowerCase())||(v.value.trim()?t.push("-H "+u(S+": "+v.value)):t.push("-H "+u(S+";")))}return t=t.concat(d),"curl "+t.join(t.length>=3?e==="win"?` ^
45
- `:` \\
46
- `:" ")}async function G0(n,e=0){const t=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),s=new Set(["cookie","authorization"]),o=JSON.stringify(n.request.url),l=n.request.headers,u=l.reduce((x,_)=>{const E=_.name;return!t.has(E.toLowerCase())&&!E.includes(":")&&x.append(E,_.value),x},new Headers),f={};for(const x of u)f[x[0]]=x[1];const d=n.request.cookies.length||l.some(({name:x})=>s.has(x.toLowerCase()))?"include":"omit",p=l.find(({name:x})=>x.toLowerCase()==="referer"),m=p?p.value:void 0,y=await Tg(n),v={headers:Object.keys(f).length?f:void 0,referrer:m,body:y,method:n.request.method,mode:"cors"};if(e===1){const x=l.find(E=>E.name.toLowerCase()==="cookie"),_={};delete v.mode,x&&(_.cookie=x.value),m&&(delete v.referrer,_.Referer=m),Object.keys(_).length&&(v.headers={...f,..._})}else v.credentials=d;const S=JSON.stringify(v,null,2);return`fetch(${o}, ${S});`}async function Tg(n){var e,t;return(e=n.request.postData)!=null&&e._sha1?await fetch(`sha1/${n.request.postData._sha1}`).then(s=>s.text()):(t=n.request.postData)==null?void 0:t.text}class J0{generatePlaywrightRequestCall(e,t){let s=e.method.toLowerCase();const o=new URL(e.url),l=`${o.origin}${o.pathname}`,u={};["delete","get","head","post","put","patch"].includes(s)||(u.method=s,s="fetch"),o.searchParams.size&&(u.params=Object.fromEntries(o.searchParams.entries())),t&&(u.data=t),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const f=[`'${l}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${s}(${f.join(", ")});`}prettyPrintObject(e,t=2,s=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(s*t),d=" ".repeat((s+1)*t);return`[
47
- ${e.map(m=>`${d}${this.prettyPrintObject(m,t,s+1)}`).join(`,
48
- `)}
49
- ${f}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(s*t),l=" ".repeat((s+1)*t);return`{
50
- ${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,t,s+1),m=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${l}${m}: ${p}`}).join(`,
51
- `)}
52
- ${o}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
53
- `)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class Y0{generatePlaywrightRequestCall(e,t){const s=new URL(e.url),l=[`"${`${s.origin}${s.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(l.push(`method="${u}"`),u="fetch"),s.searchParams.size&&l.push(`params=${this.prettyPrintObject(Object.fromEntries(s.searchParams.entries()))}`),t&&l.push(`data=${this.prettyPrintObject(t)}`),e.headers.length&&l.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const f=l.length===1?l[0]:`
54
- ${l.map(d=>this.indent(d,2)).join(`,
55
- `)}
56
- `;return`await page.request.${u}(${f})`}indent(e,t){return e.split(`
57
- `).map(s=>" ".repeat(t)+s).join(`
58
- `)}prettyPrintObject(e,t=2,s=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(s*t),d=" ".repeat((s+1)*t);return`[
59
- ${e.map(m=>`${d}${this.prettyPrintObject(m,t,s+1)}`).join(`,
60
- `)}
61
- ${f}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(s*t),l=" ".repeat((s+1)*t);return`{
62
- ${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,t,s+1);return`${l}${this.stringLiteral(f)}: ${p}`}).join(`,
63
- `)}
64
- ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class X0{generatePlaywrightRequestCall(e,t){const s=new URL(e.url),o=`${s.origin}${s.pathname}`,l={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(l.Method=f,f="fetch"),s.searchParams.size&&(l.Params=Object.fromEntries(s.searchParams.entries())),t&&(l.Data=t),e.headers.length&&(l.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${o}"`];return Object.keys(l).length>0&&d.push(this.prettyPrintObject(l)),`${u.join(`
65
- `)}${u.length?`
66
- `:""}await request.${this.toFunctionName(f)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,t=2,s=0){if(e===null||e===void 0)return"null";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"true":"false":String(e);if(Array.isArray(e)){if(e.length===0)return"new object[] {}";const f=" ".repeat(s*t),d=" ".repeat((s+1)*t);return`new object[] {
67
- ${e.map(m=>`${d}${this.prettyPrintObject(m,t,s+1)}`).join(`,
68
- `)}
69
- ${f}}`}if(Object.keys(e).length===0)return"new {}";const o=" ".repeat(s*t),l=" ".repeat((s+1)*t);return`new() {
70
- ${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,t,s+1),m=s===0?f:`[${this.stringLiteral(f)}]`;return`${l}${m} = ${p}`}).join(`,
71
- `)}
72
- ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class Z0{generatePlaywrightRequestCall(e,t){const s=new URL(e.url),o=[`"${s.origin}${s.pathname}"`],l=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(l.push(`setMethod("${u}")`),u="fetch");for(const[f,d]of s.searchParams)l.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(d)})`);t&&l.push(`setData(${this.stringLiteral(t)})`);for(const f of e.headers)l.push(`setHeader(${this.stringLiteral(f.name)}, ${this.stringLiteral(f.value)})`);return l.length>0&&o.push(`RequestOptions.create()
73
- .${l.join(`
74
- .`)}
75
- `),`request.${u}(${o.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function e1(n){if(n==="javascript")return new J0;if(n==="python")return new Y0;if(n==="csharp")return new X0;if(n==="java")return new Z0;throw new Error("Unsupported language: "+n)}const t1=({resource:n,sdkLanguage:e,startTimeOffset:t,onClose:s})=>{const[o,l]=te.useState("request");return C.jsx(K0,{dataTestId:"network-request-details",leftToolbar:[C.jsx(Bn,{icon:"close",title:"Close",onClick:s},"close")],tabs:[{id:"request",title:"Request",render:()=>C.jsx(n1,{resource:n,sdkLanguage:e,startTimeOffset:t})},{id:"response",title:"Response",render:()=>C.jsx(r1,{resource:n})},{id:"body",title:"Body",render:()=>C.jsx(s1,{resource:n})}],selectedTab:o,setSelectedTab:l})},n1=({resource:n,sdkLanguage:e,startTimeOffset:t})=>{const[s,o]=te.useState(null);return te.useEffect(()=>{(async()=>{if(n.request.postData){const u=n.request.headers.find(d=>d.name.toLowerCase()==="content-type"),f=u?u.value:"";if(n.request.postData._sha1){const d=await fetch(`sha1/${n.request.postData._sha1}`);o({text:ic(await d.text(),f),mimeType:f})}else o({text:ic(n.request.postData.text,f),mimeType:f})}else o(null)})()},[n]),C.jsxs("div",{className:"network-request-details-tab",children:[C.jsx("div",{className:"network-request-details-header",children:"General"}),C.jsx("div",{className:"network-request-details-url",children:`URL: ${n.request.url}`}),C.jsx("div",{className:"network-request-details-general",children:`Method: ${n.request.method}`}),n.response.status!==-1&&C.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",C.jsx("span",{className:o1(n.response.status),style:{display:"inline-flex"},children:`${n.response.status} ${n.response.statusText}`})]}),n.request.queryString.length?C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),C.jsx("div",{className:"network-request-details-headers",children:n.request.queryString.map(l=>`${l.name}: ${l.value}`).join(`
76
- `)})]}):null,C.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),C.jsx("div",{className:"network-request-details-headers",children:n.request.headers.map(l=>`${l.name}: ${l.value}`).join(`
77
- `)}),C.jsx("div",{className:"network-request-details-header",children:"Time"}),C.jsx("div",{className:"network-request-details-general",children:`Start: ${di(t)}`}),C.jsx("div",{className:"network-request-details-general",children:`Duration: ${di(n.time)}`}),C.jsxs("div",{className:"network-request-details-copy",children:[C.jsx(Mu,{description:"Copy as cURL",value:()=>Q0(n)}),C.jsx(Mu,{description:"Copy as Fetch",value:()=>G0(n)}),C.jsx(Mu,{description:"Copy as Playwright",value:async()=>e1(e).generatePlaywrightRequestCall(n.request,s==null?void 0:s.text)})]}),s&&C.jsx("div",{className:"network-request-details-header",children:"Request Body"}),s&&C.jsx(hi,{text:s.text,mimeType:s.mimeType,readOnly:!0,lineNumbers:!0})]})},r1=({resource:n})=>C.jsxs("div",{className:"network-request-details-tab",children:[C.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),C.jsx("div",{className:"network-request-details-headers",children:n.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
78
- `)})]}),s1=({resource:n})=>{const[e,t]=te.useState(null);return te.useEffect(()=>{(async()=>{if(n.response.content._sha1){const o=n.response.content.mimeType.includes("image"),l=n.response.content.mimeType.includes("font"),u=await fetch(`sha1/${n.response.content._sha1}`);if(o){const f=await u.blob(),d=new FileReader,p=new Promise(m=>d.onload=m);d.readAsDataURL(f),t({dataUrl:(await p).target.result})}else if(l){const f=await u.arrayBuffer();t({font:f})}else{const f=ic(await u.text(),n.response.content.mimeType);t({text:f,mimeType:n.response.content.mimeType})}}else t(null)})()},[n]),C.jsxs("div",{className:"network-request-details-tab",children:[!n.response.content._sha1&&C.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&C.jsx(i1,{font:e.font}),e&&e.dataUrl&&C.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&C.jsx(hi,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},i1=({font:n})=>{const[e,t]=te.useState(!1);return te.useEffect(()=>{let s;try{s=new FontFace("font-preview",n),s.status==="loaded"&&document.fonts.add(s),s.status==="error"&&t(!0)}catch{t(!0)}return()=>{document.fonts.delete(s)}},[n]),e?C.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):C.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",C.jsx("br",{}),"NOPQRSTUVWXYZ",C.jsx("br",{}),"abcdefghijklm",C.jsx("br",{}),"nopqrstuvwxyz",C.jsx("br",{}),"1234567890"]})};function o1(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}function ic(n,e){if(n===null)return"Loading...";const t=n;if(t==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(t):t}function l1(n){const[e,t]=te.useState([]);te.useEffect(()=>{const l=[];for(let u=0;u<n.columns.length-1;++u){const f=n.columns[u];l[u]=(l[u-1]||0)+n.columnWidths.get(f)}t(l)},[n.columns,n.columnWidths]);function s(l){const u=new Map(n.columnWidths.entries());for(let f=0;f<l.length;++f){const d=l[f]-(l[f-1]||0),p=n.columns[f];u.set(p,d)}n.setColumnWidths(u)}const o=te.useCallback(l=>{var u,f;(f=n.setSorting)==null||f.call(n,{by:l,negate:((u=n.sorting)==null?void 0:u.by)===l?!n.sorting.negate:!1})},[n]);return C.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[C.jsx(P0,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),C.jsxs("div",{className:"vbox",children:[C.jsx("div",{className:"grid-view-header",children:n.columns.map((l,u)=>C.jsxs("div",{className:"grid-view-header-cell "+a1(l,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(l):void 0},onClick:()=>n.setSorting&&o(l),children:[C.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(l)}),C.jsx("span",{className:"codicon codicon-triangle-up"}),C.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(l)))}),C.jsx(vc,{name:n.name,items:n.items,id:n.id,render:(l,u)=>C.jsx(C.Fragment,{children:n.columns.map((f,d)=>{const{body:p,title:m}=n.render(l,f,u);return C.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:m,style:{width:d<n.columns.length-1?n.columnWidths.get(f):void 0},children:p},n.columnTitle(f))})}),icon:n.icon,isError:n.isError,isWarning:n.isWarning,isInfo:n.isInfo,selectedItem:n.selectedItem,onAccepted:n.onAccepted,onSelected:n.onSelected,onHighlighted:n.onHighlighted,onIconClicked:n.onIconClicked,noItemsMessage:n.noItemsMessage,dataTestId:n.dataTestId,notSelectable:n.notSelectable})]})]})}function a1(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const u1=["All","Fetch","HTML","JS","CSS","Font","Image"],c1={searchValue:"",resourceType:"All"},f1=({filterState:n,onFilterStateChange:e})=>C.jsxs("div",{className:"network-filters",children:[C.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:t=>e({...n,searchValue:t.target.value})}),C.jsx("div",{className:"network-filters-resource-types",children:u1.map(t=>C.jsx("div",{title:t,onClick:()=>e({...n,resourceType:t}),className:`network-filters-resource-type ${n.resourceType===t?"selected":""}`,children:t},t))})]}),d1=l1;function tk(n,e){const t=te.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(u=>e?!!u._monotonicTime&&u._monotonicTime>=e.minimum&&u._monotonicTime<=e.maximum:!0),[n,e]),s=te.useMemo(()=>new y1(n),[n]);return{resources:t,contextIdMap:s}}const nk=({boundaries:n,networkModel:e,onEntryHovered:t,sdkLanguage:s})=>{const[o,l]=te.useState(void 0),[u,f]=te.useState(void 0),[d,p]=te.useState(c1),{renderedEntries:m}=te.useMemo(()=>{const _=e.resources.map(E=>w1(E,n,e.contextIdMap)).filter(k1(d));return o&&S1(_,o),{renderedEntries:_}},[e.resources,e.contextIdMap,d,o,n]),[y,v]=te.useState(()=>new Map(Cg().map(_=>[_,p1(_)]))),S=te.useCallback(_=>{p(_),f(void 0)},[]);if(!e.resources.length)return C.jsx(kg,{text:"No network calls"});const x=C.jsx(d1,{name:"network",items:m,selectedItem:u,onSelected:_=>f(_),onHighlighted:_=>t==null?void 0:t(_==null?void 0:_.resource),columns:g1(!!u,m),columnTitle:h1,columnWidths:y,setColumnWidths:v,isError:_=>_.status.code>=400||_.status.code===-1,isInfo:_=>!!_.route,render:(_,E)=>m1(_,E),sorting:o,setSorting:l});return C.jsxs(C.Fragment,{children:[C.jsx(f1,{filterState:d,onFilterStateChange:S}),!u&&x,u&&C.jsx(Xp,{sidebarSize:y.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:C.jsx(t1,{resource:u.resource,sdkLanguage:s,startTimeOffset:u.start,onClose:()=>f(void 0)}),sidebar:x})]})},h1=n=>n==="contextId"?"Source":n==="name"?"Name":n==="method"?"Method":n==="status"?"Status":n==="contentType"?"Content Type":n==="duration"?"Duration":n==="size"?"Size":n==="start"?"Start":n==="route"?"Route":"",p1=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function g1(n,e){if(n){const s=["name"];return gp(e)&&s.unshift("contextId"),s}let t=Cg();return gp(e)||(t=t.filter(s=>s!=="contextId")),t}function Cg(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const m1=(n,e)=>e==="contextId"?{body:n.contextId,title:n.name.url}:e==="name"?{body:n.name.name,title:n.name.url}:e==="method"?{body:n.method}:e==="status"?{body:n.status.code>0?n.status.code:"",title:n.status.text}:e==="contentType"?{body:n.contentType}:e==="duration"?{body:di(n.duration)}:e==="size"?{body:Lv(n.size)}:e==="start"?{body:di(n.start)}:e==="route"?{body:n.route}:{body:""};class y1{constructor(e){we(this,"_pagerefToShortId",new Map);we(this,"_contextToId",new Map);we(this,"_lastPageId",0);we(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let t=this._pagerefToShortId.get(e);return t||(++this._lastPageId,t="page#"+this._lastPageId,this._pagerefToShortId.set(e,t)),t}_apiRequestContextId(e){const t=nl(e);if(!t)return"";let s=this._contextToId.get(t);return s||(++this._lastApiRequestContextId,s="api#"+this._lastApiRequestContextId,this._contextToId.set(t,s)),s}}function gp(n){const e=new Set;for(const t of n)if(e.add(t.contextId),e.size>1)return!0;return!1}const w1=(n,e,t)=>{const s=v1(n);let o;try{const f=new URL(n.request.url);o=f.pathname.substring(f.pathname.lastIndexOf("/")+1),o||(o=f.host),f.search&&(o+=f.search)}catch{o=n.request.url}let l=n.response.content.mimeType;const u=l.match(/^(.*);\s*charset=.*$/);return u&&(l=u[1]),{name:{name:o,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:l,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:s,resource:n,contextId:t.contextId(n)}};function v1(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function S1(n,e){const t=_1(e==null?void 0:e.by);t&&n.sort(t),e.negate&&n.reverse()}function _1(n){if(n==="start")return(e,t)=>e.start-t.start;if(n==="duration")return(e,t)=>e.duration-t.duration;if(n==="status")return(e,t)=>e.status.code-t.status.code;if(n==="method")return(e,t)=>{const s=e.method,o=t.method;return s.localeCompare(o)};if(n==="size")return(e,t)=>e.size-t.size;if(n==="contentType")return(e,t)=>e.contentType.localeCompare(t.contentType);if(n==="name")return(e,t)=>e.name.name.localeCompare(t.name.name);if(n==="route")return(e,t)=>e.route.localeCompare(t.route);if(n==="contextId")return(e,t)=>e.contextId.localeCompare(t.contextId)}const E1={All:()=>!0,Fetch:n=>n==="application/json",HTML:n=>n==="text/html",CSS:n=>n==="text/css",JS:n=>n.includes("javascript"),Font:n=>n.includes("font"),Image:n=>n.includes("image")};function k1({searchValue:n,resourceType:e}){return t=>{const s=E1[e];return s(t.contentType)&&t.name.url.toLowerCase().includes(n.toLowerCase())}}function _c(n,e,t={}){var v;const s=new n.LineCounter,o={keepSourceTokens:!0,lineCounter:s,...t},l=n.parseDocument(e,o),u=[],f=S=>[s.linePos(S[0]),s.linePos(S[1])],d=S=>{u.push({message:S.message,range:[s.linePos(S.pos[0]),s.linePos(S.pos[1])]})},p=(S,x)=>{for(const _ of x.items){if(_ instanceof n.Scalar&&typeof _.value=="string"){const O=ol.parse(_,o,u);O&&(S.children=S.children||[],S.children.push(O));continue}if(_ instanceof n.YAMLMap){m(S,_);continue}u.push({message:"Sequence items should be strings or maps",range:f(_.range||x.range)})}},m=(S,x)=>{for(const _ of x.items){if(S.children=S.children||[],!(_.key instanceof n.Scalar&&typeof _.key.value=="string")){u.push({message:"Only string keys are supported",range:f(_.key.range||x.range)});continue}const L=_.key,O=_.value;if(L.value==="text"){if(!(O instanceof n.Scalar&&typeof O.value=="string")){u.push({message:"Text value should be a string",range:f(_.value.range||x.range)});continue}S.children.push({kind:"text",text:mp(O.value)});continue}const P=ol.parse(L,o,u);if(!P)continue;if(O instanceof n.Scalar){const U=typeof O.value;if(U!=="string"&&U!=="number"&&U!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(_.value.range||x.range)});continue}S.children.push({...P,children:[{kind:"text",text:mp(String(O.value))}]});continue}if(O instanceof n.YAMLSeq){S.children.push(P),p(P,O);continue}u.push({message:"Map values should be strings or sequences",range:f(_.value.range||x.range)})}},y={kind:"role",role:"fragment"};return l.errors.forEach(d),u.length?{errors:u,fragment:y}:(l.contents instanceof n.YAMLSeq||u.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:l.contents?f(l.contents.range):[{line:0,col:0},{line:0,col:0}]}),u.length?{errors:u,fragment:y}:(p(y,l.contents),u.length?{errors:u,fragment:x1}:((v=y.children)==null?void 0:v.length)===1?{fragment:y.children[0],errors:u}:{fragment:y,errors:u}))}const x1={kind:"role",role:"fragment"};function Ng(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function mp(n){return n.startsWith("/")&&n.endsWith("/")&&n.length>1?{pattern:n.slice(1,-1)}:Ng(n)}class ol{static parse(e,t,s){try{return new ol(e.value)._parse()}catch(o){if(o instanceof yp){const l=t.prettyErrors===!1?o.message:o.message+`:
79
-
80
- `+e.value+`
81
- `+" ".repeat(o.pos)+`^
82
- `;return s.push({message:l,range:[t.lineCounter.linePos(e.range[0]),t.lineCounter.linePos(e.range[0]+o.pos)]}),null}throw o}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||""}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const t=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(t,this._pos)}_readString(){let e="",t=!1;for(;!this._eof();){const s=this._next();if(t)e+=s,t=!1;else if(s==="\\")t=!0;else{if(s==='"')return e;e+=s}}this._throwError("Unterminated string")}_throwError(e,t=0){throw new yp(e,t||this._pos)}_readRegex(){let e="",t=!1,s=!1;for(;!this._eof();){const o=this._next();if(t)e+=o,t=!1;else if(o==="\\")t=!0,e+=o;else{if(o==="/"&&!s)return{pattern:e};o==="["?(s=!0,e+=o):o==="]"&&s?(e+=o,s=!1):e+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),Ng(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let t=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),t=this._pos;const s=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),t=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,o||"true",t)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const t=this._readStringOrRegex()||"",s={kind:"role",role:e,name:t};return this._readAttributes(s),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),s}_applyAttribute(e,t,s,o){if(t==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),e.checked=s==="true"?!0:s==="false"?!1:"mixed";return}if(t==="disabled"){this._assert(s==="true"||s==="false",'Value of "disabled" attribute must be a boolean',o),e.disabled=s==="true";return}if(t==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',o),e.expanded=s==="true";return}if(t==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',o),e.level=Number(s);return}if(t==="pressed"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),e.pressed=s==="true"?!0:s==="false"?!1:"mixed";return}if(t==="selected"){this._assert(s==="true"||s==="false",'Value of "selected" attribute must be a boolean',o),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${t}]`,o)}_assert(e,t,s){e||this._throwError(t||"Assertion error",s)}}class yp extends Error{constructor(e,t){super(e),this.pos=t}}let Ag="";function b1(n){Ag=n}function vl(n,e){for(;e;){if(n.contains(e))return!0;e=Ig(e)}return!1}function ut(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function Lg(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Ig(n){for(;n.parentElement;)n=n.parentElement;return ut(n)}function ii(n,e,t){for(;n;){const s=n.closest(e);if(t&&s!==t&&(s!=null&&s.contains(t)))return;if(s)return s;n=Ig(n)}}function cr(n,e){return n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0}function Og(n,e){if(e=e??cr(n),!e)return!0;if(Element.prototype.checkVisibility&&Ag!=="webkit"){if(!n.checkVisibility())return!1}else{const t=n.closest("details,summary");if(t!==n&&(t==null?void 0:t.nodeName)==="DETAILS"&&!t.open)return!1}return e.visibility==="visible"}function Yr(n){const e=cr(n);if(!e)return!0;if(e.display==="contents"){for(let s=n.firstChild;s;s=s.nextSibling)if(s.nodeType===1&&Yr(s)||s.nodeType===3&&$g(s))return!0;return!1}if(!Og(n,e))return!1;const t=n.getBoundingClientRect();return t.width>0&&t.height>0}function $g(n){const e=n.ownerDocument.createRange();e.selectNode(n);const t=e.getBoundingClientRect();return t.width>0&&t.height>0}function Ye(n){return n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}function wp(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const vp="article:not([role]), aside:not([role]), main:not([role]), nav:not([role]), section:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]",T1=new Map([["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-labelledby",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",new Set(["generic"])]]);function Mg(n,e){return[...T1].some(([t,s])=>!(s!=null&&s.has(e||""))&&n.hasAttribute(t))}function Pg(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function C1(n){return!Kg(n)&&(N1(n)||Pg(n))}function N1(n){const e=Ye(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const Pu={A:n=>n.hasAttribute("href")?"link":null,AREA:n=>n.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"dialog",DT:()=>"term",EM:()=>"emphasis",FIELDSET:()=>"group",FIGURE:()=>"figure",FOOTER:n=>ii(n,vp)?null:"contentinfo",FORM:n=>wp(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>ii(n,vp)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!Mg(n)&&!Pg(n)?"presentation":"img",INPUT:n=>{const e=n.type.toLowerCase();if(e==="search")return n.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const t=ss(n,n.getAttribute("list"))[0];return t&&Ye(t)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:U1[e]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SECTION:n=>wp(n)?"region":null,SELECT:n=>n.hasAttribute("multiple")||n.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:n=>{const e=ii(n,"table"),t=e?ll(e):"";return t==="grid"||t==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:n=>{if(n.getAttribute("scope")==="col")return"columnheader";if(n.getAttribute("scope")==="row")return"rowheader";const e=ii(n,"table"),t=e?ll(e):"";return t==="grid"||t==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},A1={DD:["DL","DIV"],DIV:["DL"],DT:["DL","DIV"],LI:["OL","UL"],TBODY:["TABLE"],TD:["TR"],TFOOT:["TABLE"],TH:["TR"],THEAD:["TABLE"],TR:["THEAD","TBODY","TFOOT","TABLE"]};function Sp(n){var s;const e=((s=Pu[Ye(n)])==null?void 0:s.call(Pu,n))||"";if(!e)return null;let t=n;for(;t;){const o=ut(t),l=A1[Ye(t)];if(!l||!o||!l.includes(Ye(o)))break;const u=ll(o);if((u==="none"||u==="presentation")&&!Rg(o,u))return u;t=o}return e}const L1=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function ll(n){return(n.getAttribute("role")||"").split(" ").map(t=>t.trim()).find(t=>L1.includes(t))||null}function Rg(n,e){return Mg(n,e)||C1(n)}function Ke(n){const e=ll(n);if(!e)return Sp(n);if(e==="none"||e==="presentation"){const t=Sp(n);if(Rg(n,t))return t}return e}function jg(n){return n===null?void 0:n.toLowerCase()==="true"}function Dg(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Ye(n))}function Rt(n){if(Dg(n))return!0;const e=cr(n),t=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!t){for(let o=n.firstChild;o;o=o.nextSibling)if(o.nodeType===1&&!Rt(o)||o.nodeType===3&&$g(o))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!t&&!Og(n,e)?!0:Fg(n)}function Fg(n){let e=jn==null?void 0:jn.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const t=cr(n);e=!t||t.display==="none"||jg(n.getAttribute("aria-hidden"))===!0}if(!e){const t=ut(n);t&&(e=Fg(t))}jn==null||jn.set(n,e)}return e}function ss(n,e){if(!e)return[];const t=Lg(n);if(!t)return[];try{const s=e.split(" ").filter(l=>!!l),o=new Set;for(const l of s){const u=t.querySelector("#"+CSS.escape(l));u&&o.add(u)}return[...o]}catch{return[]}}function pn(n){return n.trim()}function ui(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
83
- `).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function _p(n,e){const t=[...n.querySelectorAll(e)];for(const s of ss(n,n.getAttribute("aria-owns")))s.matches(e)&&t.push(s),t.push(...s.querySelectorAll(e));return t}function al(n,e){const t=e==="::before"?Oc:$c;if(t!=null&&t.has(n))return(t==null?void 0:t.get(n))||"";const s=cr(n,e),o=I1(n,s);return t&&t.set(n,o),o}function I1(n,e){if(!e||e.display==="none"||e.visibility==="hidden")return"";const t=e.content;let s;if(t[0]==="'"&&t[t.length-1]==="'"||t[0]==='"'&&t[t.length-1]==='"')s=t.substring(1,t.length-1);else if(t.startsWith("attr(")&&t.endsWith(")")){const o=t.substring(5,t.length-1).trim();s=n.getAttribute(o)||""}return s!==void 0?(e.display||"inline")!=="inline"?" "+s+" ":s:""}function Bg(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const t=ss(n,e);return t.length?t:null}function O1(n,e){const t=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),s=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(n);return t||s}function pi(n,e){const t=e?Ac:Nc;let s=t==null?void 0:t.get(n);return s===void 0&&(s="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(Ke(n)||"")||(s=ui(Qt(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),t==null||t.set(n,s)),s}function Ep(n,e){const t=e?Ic:Lc;let s=t==null?void 0:t.get(n);if(s===void 0){if(s="",n.hasAttribute("aria-describedby")){const o=ss(n,n.getAttribute("aria-describedby"));s=ui(o.map(l=>Qt(l,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:l,hidden:Rt(l)}})).join(" "))}else n.hasAttribute("aria-description")?s=ui(n.getAttribute("aria-description")||""):s=ui(n.getAttribute("title")||"");t==null||t.set(n,s)}return s}const $1=["application","checkbox","combobox","gridcell","listbox","radiogroup","slider","spinbutton","textbox","tree","columnheader","rowheader","searchbox","switch","treegrid"];function M1(n){const e=Ke(n)||"";if(!e||!$1.includes(e))return"false";const t=n.getAttribute("aria-invalid");return!t||t.trim()===""||t.toLocaleLowerCase()==="false"?"false":t==="true"||t==="grammar"||t==="spelling"?t:"true"}function P1(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function R1(n){const e=Hr;let t=Hr==null?void 0:Hr.get(n);if(t===void 0){t="";const s=M1(n)!=="false",o=P1(n);if(s||o){const l=n.getAttribute("aria-errormessage");t=ss(n,l).map(d=>ui(Qt(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:Rt(d)}}))).join(" ").trim()}e==null||e.set(n,t)}return t}function Qt(n,e){var d,p,m,y;if(e.visitedElements.has(n))return"";const t={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((m=e.embeddedInNativeTextAlternative)!=null&&m.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Dg(n)||!v&&Rt(n))return e.visitedElements.add(n),""}const s=Bg(n);if(!e.embeddedInLabelledBy){const v=(s||[]).map(S=>Qt(S,{...e,embeddedInLabelledBy:{element:S,hidden:Rt(S)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const o=Ke(n)||"",l=Ye(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...n.labels||[]].includes(n),S=(s||[]).includes(n);if(!v&&!S){if(o==="textbox")return e.visitedElements.add(n),l==="INPUT"||l==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(o)){e.visitedElements.add(n);let x;if(l==="SELECT")x=[...n.selectedOptions],!x.length&&n.options.length&&x.push(n.options[0]);else{const _=o==="combobox"?_p(n,"*").find(E=>Ke(E)==="listbox"):n;x=_?_p(_,'[aria-selected="true"]').filter(E=>Ke(E)==="option"):[]}return!x.length&&l==="INPUT"?n.value:x.map(_=>Qt(_,t)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(o))return e.visitedElements.add(n),n.hasAttribute("aria-valuetext")?n.getAttribute("aria-valuetext")||"":n.hasAttribute("aria-valuenow")?n.getAttribute("aria-valuenow")||"":n.getAttribute("value")||"";if(["menu"].includes(o))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if(pn(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(o)){if(l==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const v=n.value||"";return pn(v)?v:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(l==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const v=n.labels||[];if(v.length&&!e.embeddedInLabelledBy)return Mo(v,e);const S=n.getAttribute("alt")||"";if(pn(S))return S;const x=n.getAttribute("title")||"";return pn(x)?x:"Submit"}if(!s&&l==="BUTTON"){e.visitedElements.add(n);const v=n.labels||[];if(v.length)return Mo(v,e)}if(!s&&l==="OUTPUT"){e.visitedElements.add(n);const v=n.labels||[];return v.length?Mo(v,e):n.getAttribute("title")||""}if(!s&&(l==="TEXTAREA"||l==="SELECT"||l==="INPUT")){e.visitedElements.add(n);const v=n.labels||[];if(v.length)return Mo(v,e);const S=l==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||l==="TEXTAREA",x=n.getAttribute("placeholder")||"",_=n.getAttribute("title")||"";return!S||_?_:x}if(!s&&l==="FIELDSET"){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(Ye(S)==="LEGEND")return Qt(S,{...t,embeddedInNativeTextAlternative:{element:S,hidden:Rt(S)}});return n.getAttribute("title")||""}if(!s&&l==="FIGURE"){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(Ye(S)==="FIGCAPTION")return Qt(S,{...t,embeddedInNativeTextAlternative:{element:S,hidden:Rt(S)}});return n.getAttribute("title")||""}if(l==="IMG"){e.visitedElements.add(n);const v=n.getAttribute("alt")||"";return pn(v)?v:n.getAttribute("title")||""}if(l==="TABLE"){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(Ye(S)==="CAPTION")return Qt(S,{...t,embeddedInNativeTextAlternative:{element:S,hidden:Rt(S)}});const v=n.getAttribute("summary")||"";if(v)return v}if(l==="AREA"){e.visitedElements.add(n);const v=n.getAttribute("alt")||"";return pn(v)?v:n.getAttribute("title")||""}if(l==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let v=n.firstElementChild;v;v=v.nextElementSibling)if(Ye(v)==="TITLE"&&v.ownerSVGElement)return Qt(v,{...t,embeddedInLabelledBy:{element:v,hidden:Rt(v)}})}if(n.ownerSVGElement&&l==="A"){const v=n.getAttribute("xlink:title")||"";if(pn(v))return e.visitedElements.add(n),v}}const f=l==="SUMMARY"&&!["presentation","none"].includes(o);if(O1(o,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const v=j1(n,t);if(e.embeddedInTargetElement==="self"?pn(v):v)return v}if(!["presentation","none"].includes(o)||l==="IFRAME"){e.visitedElements.add(n);const v=n.getAttribute("title")||"";if(pn(v))return v}return e.visitedElements.add(n),""}function j1(n,e){const t=[],s=(l,u)=>{var f;if(!(u&&l.assignedSlot))if(l.nodeType===1){const d=((f=cr(l))==null?void 0:f.display)||"inline";let p=Qt(l,e);(d!=="inline"||l.nodeName==="BR")&&(p=" "+p+" "),t.push(p)}else l.nodeType===3&&t.push(l.textContent||"")};t.push(al(n,"::before"));const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const l of o)s(l,!1);else{for(let l=n.firstChild;l;l=l.nextSibling)s(l,!0);if(n.shadowRoot)for(let l=n.shadowRoot.firstChild;l;l=l.nextSibling)s(l,!0);for(const l of ss(n,n.getAttribute("aria-owns")))s(l,!0)}return t.push(al(n,"::after")),t.join("")}const Ec=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function zg(n){return Ye(n)==="OPTION"?n.selected:Ec.includes(Ke(n)||"")?jg(n.getAttribute("aria-selected"))===!0:!1}const kc=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Ug(n){const e=xc(n,!0);return e==="error"?!1:e}function D1(n){return xc(n,!0)}function F1(n){return xc(n,!1)}function xc(n,e){const t=Ye(n);if(e&&t==="INPUT"&&n.indeterminate)return"mixed";if(t==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(kc.includes(Ke(n)||"")){const s=n.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const B1=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function z1(n){const e=Ye(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):B1.includes(Ke(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const bc=["button"];function qg(n){if(bc.includes(Ke(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Tc=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Hg(n){if(Ye(n)==="DETAILS")return n.open;if(Tc.includes(Ke(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Cc=["heading","listitem","row","treeitem"];function Vg(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Ye(n)];if(e)return e;if(Cc.includes(Ke(n)||"")){const t=n.getAttribute("aria-level"),s=t===null?Number.NaN:Number(t);if(Number.isInteger(s)&&s>=1)return s}return 0}const Wg=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function ul(n){return Kg(n)||Gg(n)}function Kg(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(n.tagName)&&(n.hasAttribute("disabled")||Qg(n))}function Qg(n){return n?Ye(n)==="FIELDSET"&&n.hasAttribute("disabled")?!0:Qg(n.parentElement):!1}function Gg(n){if(!n)return!1;if(Wg.includes(Ke(n)||"")){const e=(n.getAttribute("aria-disabled")||"").toLowerCase();if(e==="true")return!0;if(e==="false")return!1}return Gg(ut(n))}function Mo(n,e){return[...n].map(t=>Qt(t,{...e,embeddedInLabel:{element:t,hidden:Rt(t)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(t=>!!t).join(" ")}let Nc,Ac,Lc,Ic,Hr,jn,Oc,$c,Jg=0;function Mc(){++Jg,Nc??(Nc=new Map),Ac??(Ac=new Map),Lc??(Lc=new Map),Ic??(Ic=new Map),Hr??(Hr=new Map),jn??(jn=new Map),Oc??(Oc=new Map),$c??($c=new Map)}function Pc(){--Jg||(Nc=void 0,Ac=void 0,Lc=void 0,Ic=void 0,Hr=void 0,jn=void 0,Oc=void 0,$c=void 0)}const U1={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function q1(n){return Yg(n)?"'"+n.replace(/'/g,"''")+"'":n}function kp(n){return Yg(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
84
- `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function Yg(n){return!!(n.length===0||/^\s|\s$/.test(n)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(n)||/^-/.test(n)||/[\n:](\s|$)/.test(n)||/\s#/.test(n)||/[\n\r]/.test(n)||/^[&*\],?!>|@"'#%]/.test(n)||/[{}`]/.test(n)||/^\[/.test(n)||!isNaN(Number(n))||["y","n","yes","no","true","false","on","off","null"].includes(n.toLowerCase()))}function cl(n){const e=new Set,t={root:{role:"fragment",name:"",children:[],element:n},elements:new Map,ids:new Map},s=u=>{const f=t.elements.size+1;t.elements.set(f,u),t.ids.set(u,f)};s(n);const o=(u,f)=>{if(e.has(f))return;if(e.add(f),f.nodeType===Node.TEXT_NODE&&f.nodeValue){const y=f.nodeValue;u.role!=="textbox"&&y&&u.children.push(f.nodeValue||"");return}if(f.nodeType!==Node.ELEMENT_NODE)return;const d=f;if(Rt(d))return;const p=[];if(d.hasAttribute("aria-owns")){const y=d.getAttribute("aria-owns").split(/\s+/);for(const v of y){const S=n.ownerDocument.getElementById(v);S&&p.push(S)}}s(d);const m=H1(d);m&&u.children.push(m),l(m||u,d,p)};function l(u,f,d=[]){var v;const m=(((v=cr(f))==null?void 0:v.display)||"inline")!=="inline"||f.nodeName==="BR"?" ":"";m&&u.children.push(m),u.children.push(al(f,"::before"));const y=f.nodeName==="SLOT"?f.assignedNodes():[];if(y.length)for(const S of y)o(u,S);else{for(let S=f.firstChild;S;S=S.nextSibling)S.assignedSlot||o(u,S);if(f.shadowRoot)for(let S=f.shadowRoot.firstChild;S;S=S.nextSibling)o(u,S)}for(const S of d)o(u,S);u.children.push(al(f,"::after")),m&&u.children.push(m),u.children.length===1&&u.name===u.children[0]&&(u.children=[])}Mc();try{o(t.root,n)}finally{Pc()}return V1(t.root),t}function H1(n){const e=Ke(n);if(!e||e==="presentation"||e==="none")return null;const t=ct(pi(n,!1)||""),s={role:e,name:t,children:[],element:n};return kc.includes(e)&&(s.checked=Ug(n)),Wg.includes(e)&&(s.disabled=ul(n)),Tc.includes(e)&&(s.expanded=Hg(n)),Cc.includes(e)&&(s.level=Vg(n)),bc.includes(e)&&(s.pressed=qg(n)),Ec.includes(e)&&(s.selected=zg(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&(s.children=[n.value]),s}function V1(n){const e=(s,o)=>{if(!s.length)return;const l=ct(s.join(""));l&&o.push(l),s.length=0},t=s=>{const o=[],l=[];for(const u of s.children||[])typeof u=="string"?l.push(u):(e(l,o),t(u),o.push(u));e(l,o),s.children=o.length?o:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};t(n)}function Xg(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function W1(n,e){return Xg(n,e.text)}function K1(n,e){return Xg(n,e.name)}function Q1(n,e){const t=cl(n).root;return{matches:em(t,e,!1),received:{raw:ci(t,{mode:"raw"}),regex:ci(t,{mode:"regex"})}}}function G1(n,e){const t=cl(n).root;return em(t,e,!0).map(o=>o.element)}function Zg(n,e,t){return typeof n=="string"&&e.kind==="text"?W1(n,e):n!==null&&typeof n=="object"&&e.kind==="role"?!(e.role!=="fragment"&&e.role!==n.role||e.checked!==void 0&&e.checked!==n.checked||e.disabled!==void 0&&e.disabled!==n.disabled||e.expanded!==void 0&&e.expanded!==n.expanded||e.level!==void 0&&e.level!==n.level||e.pressed!==void 0&&e.pressed!==n.pressed||e.selected!==void 0&&e.selected!==n.selected||!K1(n.name,e)||!J1(n.children||[],e.children||[])):!1}function J1(n,e,t){if(e.length>n.length)return!1;const s=n.slice(),o=e.slice();for(const l of o){let u=s.shift();for(;u&&!Zg(u,l);)u=s.shift();if(!u)return!1}return!0}function em(n,e,t){const s=[],o=(l,u)=>{if(Zg(l,e)){const f=typeof l=="string"?u:l;return f&&s.push(f),!t}if(typeof l=="string")return!1;for(const f of l.children||[])if(o(f,l))return!0;return!1};return o(n,null),s}function ci(n,e){const t=[],s=(e==null?void 0:e.mode)==="regex"?X1:()=>!0,o=(e==null?void 0:e.mode)==="regex"?Y1:u=>u,l=(u,f,d)=>{if(typeof u=="string"){if(f&&!s(f,u))return;const y=kp(o(u));y&&t.push(d+"- text: "+y);return}let p=u.role;if(u.name&&u.name.length<=900){const y=o(u.name);if(y){const v=y.startsWith("/")&&y.endsWith("/")?y:JSON.stringify(y);p+=" "+v}}if(u.checked==="mixed"&&(p+=" [checked=mixed]"),u.checked===!0&&(p+=" [checked]"),u.disabled&&(p+=" [disabled]"),u.expanded&&(p+=" [expanded]"),u.level&&(p+=` [level=${u.level}]`),u.pressed==="mixed"&&(p+=" [pressed=mixed]"),u.pressed===!0&&(p+=" [pressed]"),u.selected===!0&&(p+=" [selected]"),e!=null&&e.ids){const y=e==null?void 0:e.ids.get(u.element);y&&(p+=` [id=${y}]`)}const m=d+"- "+q1(p);if(!u.children.length)t.push(m);else if(u.children.length===1&&typeof u.children[0]=="string"){const y=s(u,u.children[0])?o(u.children[0]):null;y?t.push(m+": "+kp(y)):t.push(m)}else{t.push(m+":");for(const y of u.children||[])l(y,u,d+" ")}};if(n.role==="fragment")for(const u of n.children||[])l(u,n,"");else l(n,null,"");return t.join(`
85
- `)}function Y1(n){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let t="",s=0;const o=new RegExp(e.map(l=>"("+l.regex.source+")").join("|"),"g");return n.replace(o,(l,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);t+=sl(n.slice(s,f));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:m}=e[p];t+=m;break}return s=f+l.length,l}),t?(t+=sl(n.slice(s)),String(new RegExp(t))):n}function X1(n,e){if(!e.length)return!1;if(!n.name)return!0;if(n.name.length>e.length)return!1;const t=e.length<=200&&n.name.length<=200?E0(e,n.name):"";let s=e;for(;t&&s.includes(t);)s=s.replace(t,"");return s.trim().length/e.length>.1}const xp=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}";class Ru{constructor(e){this._highlightEntries=[],this._highlightOptions={},this._language="javascript",this._injectedScript=e;const t=e.document;this._isUnderTest=e.isUnderTest,this._glassPaneElement=t.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483646",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent";for(const s of["click","auxclick","dragstart","input","keydown","keyup","pointerdown","pointerup","mousedown","mouseup","mouseleave","focus","scroll"])this._glassPaneElement.addEventListener(s,o=>{o.stopPropagation(),o.stopImmediatePropagation(),o.type==="click"&&o.button===0&&this._highlightOptions.tooltipListItemSelected&&this._highlightOptions.tooltipListItemSelected(void 0)});if(this._actionPointElement=t.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const s=new this._injectedScript.window.CSSStyleSheet;s.replaceSync(xp),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=xp,this._glassPaneShadow.appendChild(s)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&!this._injectedScript.document.documentElement.contains(this._glassPaneElement)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this.updateHighlight(this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),{tooltipText:Jr(this._language,gn(e))}),this._rafRequest=this._injectedScript.builtinRequestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,t){this._actionPointElement.style.top=t+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,t;for(const s of this._highlightEntries)(e=s.highlightElement)==null||e.remove(),(t=s.tooltipElement)==null||t.remove();this._highlightEntries=[],this._highlightOptions={},this._glassPaneElement.style.pointerEvents="none"}updateHighlight(e,t){this._innerUpdateHighlight(e,t)}maskElements(e,t){this._innerUpdateHighlight(e,{color:t})}_innerUpdateHighlight(e,t){let s=t.color;if(s||(s=e.length>1?"#f6b26b7f":"#6fa8dc7f"),!this._highlightIsUpToDate(e,t)){this.clearHighlight(),this._highlightOptions=t,this._glassPaneElement.style.pointerEvents=t.tooltipListItemSelected?"initial":"none";for(let o=0;o<e.length;++o){const l=this._createHighlightElement();this._glassPaneShadow.appendChild(l);let u;if(t.tooltipList||t.tooltipText||t.tooltipFooter){u=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(u),u.style.top="0",u.style.left="0",u.style.display="flex";let f=[];if(t.tooltipList)f=t.tooltipList;else if(t.tooltipText){const d=e.length>1?` [${o+1} of ${e.length}]`:"";f=[t.tooltipText+d]}for(let d=0;d<f.length;d++){const p=this._injectedScript.document.createElement("x-pw-tooltip-line");p.textContent=f[d],u.appendChild(p),t.tooltipListItemSelected&&(p.classList.add("selectable"),p.addEventListener("click",()=>{var m;return(m=t.tooltipListItemSelected)==null?void 0:m.call(t,d)}))}if(t.tooltipFooter){const d=this._injectedScript.document.createElement("x-pw-tooltip-footer");d.textContent=t.tooltipFooter,u.appendChild(d)}}this._highlightEntries.push({targetElement:e[o],tooltipElement:u,highlightElement:l})}for(const o of this._highlightEntries){if(o.box=o.targetElement.getBoundingClientRect(),!o.tooltipElement)continue;const{anchorLeft:l,anchorTop:u}=this.tooltipPosition(o.box,o.tooltipElement);o.tooltipTop=u,o.tooltipLeft=l}for(const o of this._highlightEntries){o.tooltipElement&&(o.tooltipElement.style.top=o.tooltipTop+"px",o.tooltipElement.style.left=o.tooltipLeft+"px");const l=o.box;o.highlightElement.style.backgroundColor=s,o.highlightElement.style.left=l.x+"px",o.highlightElement.style.top=l.y+"px",o.highlightElement.style.width=l.width+"px",o.highlightElement.style.height=l.height+"px",o.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:l.x,y:l.y,width:l.width,height:l.height}))}}}firstBox(){var e;return(e=this._highlightEntries[0])==null?void 0:e.box}tooltipPosition(e,t){const s=t.offsetWidth,o=t.offsetHeight,l=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=e.left;f+s>l-5&&(f=l-s-5);let d=e.bottom+5;return d+o>u-5&&(e.top>o+5?d=e.top-o-5:d=u-5-o),{anchorLeft:f,anchorTop:d}}_highlightIsUpToDate(e,t){var s,o;if(t.tooltipText!==this._highlightOptions.tooltipText||t.tooltipListItemSelected!==this._highlightOptions.tooltipListItemSelected||t.tooltipFooter!==this._highlightOptions.tooltipFooter||((s=t.tooltipList)==null?void 0:s.length)!==((o=this._highlightOptions.tooltipList)==null?void 0:o.length))return!1;if(t.tooltipList&&this._highlightOptions.tooltipList){for(let l=0;l<t.tooltipList.length;l++)if(t.tooltipList[l]!==this._highlightOptions.tooltipList[l])return!1}if(e.length!==this._highlightEntries.length)return!1;for(let l=0;l<this._highlightEntries.length;++l){if(e[l]!==this._highlightEntries[l].targetElement)return!1;const u=this._highlightEntries[l].box;if(!u)return!1;const f=e[l].getBoundingClientRect();if(f.top!==u.top||f.right!==u.right||f.bottom!==u.bottom||f.left!==u.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}}function Z1(n,e,t){const s=n.left-e.right;if(!(s<0||t!==void 0&&s>t))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function eS(n,e,t){const s=e.left-n.right;if(!(s<0||t!==void 0&&s>t))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function tS(n,e,t){const s=e.top-n.bottom;if(!(s<0||t!==void 0&&s>t))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function nS(n,e,t){const s=n.top-e.bottom;if(!(s<0||t!==void 0&&s>t))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function rS(n,e,t){const s=t===void 0?50:t;let o=0;return n.left-e.right>=0&&(o+=n.left-e.right),e.left-n.right>=0&&(o+=e.left-n.right),e.top-n.bottom>=0&&(o+=e.top-n.bottom),n.top-e.bottom>=0&&(o+=n.top-e.bottom),o>s?void 0:o}const sS=["left-of","right-of","above","below","near"];function tm(n,e,t,s){const o=e.getBoundingClientRect(),l={"left-of":eS,"right-of":Z1,above:tS,below:nS,near:rS}[n];let u;for(const f of t){if(f===e)continue;const d=l(o,f.getBoundingClientRect(),s);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function nm(n,e){for(const t of e.jsonPath)n!=null&&(n=n[t]);return rm(n,e)}function rm(n,e){const t=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,s=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!t:e.op==="="?s instanceof RegExp?typeof t=="string"&&!!t.match(s):t===s:typeof t!="string"||typeof s!="string"?!1:e.op==="*="?t.includes(s):e.op==="^="?t.startsWith(s):e.op==="$="?t.endsWith(s):e.op==="|="?t===s||t.startsWith(s+"-"):e.op==="~="?t.split(" ").includes(s):!1}function Rc(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Et(n,e){let t=n.get(e);if(t===void 0){if(t={full:"",normalized:"",immediate:[]},!Rc(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))t={full:e.value,normalized:ct(e.value),immediate:[e.value]};else{for(let o=e.firstChild;o;o=o.nextSibling)if(o.nodeType===Node.TEXT_NODE)t.full+=o.nodeValue||"",s+=o.nodeValue||"";else{if(o.nodeType===Node.COMMENT_NODE)continue;s&&t.immediate.push(s),s="",o.nodeType===Node.ELEMENT_NODE&&(t.full+=Et(n,o).full)}s&&t.immediate.push(s),e.shadowRoot&&(t.full+=Et(n,e.shadowRoot).full),t.full&&(t.normalized=ct(t.full))}}n.set(e,t)}return t}function Sl(n,e,t){if(Rc(e)||!t(Et(n,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&t(Et(n,s)))return"selfAndChildren";return e.shadowRoot&&t(Et(n,e.shadowRoot))?"selfAndChildren":"self"}function sm(n,e){const t=Bg(e);if(t)return t.map(l=>Et(n,l));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:ct(s),immediate:[s]}];const o=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||o){const l=e.labels;if(l)return[...l].map(u=>Et(n,u))}return[]}function bp(n){return n.displayName||n.name||"Anonymous"}function iS(n){if(n.type)switch(typeof n.type){case"function":return bp(n.type);case"string":return n.type;case"object":return n.type.displayName||(n.type.render?bp(n.type.render):"")}if(n._currentElement){const e=n._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function oS(n){var e;return n.key??((e=n._currentElement)==null?void 0:e.key)}function lS(n){if(n.child){const t=[];for(let s=n.child;s;s=s.sibling)t.push(s);return t}if(!n._currentElement)return[];const e=t=>{var o;const s=(o=t._currentElement)==null?void 0:o.type;return typeof s=="function"||typeof s=="string"};if(n._renderedComponent){const t=n._renderedComponent;return e(t)?[t]:[]}return n._renderedChildren?[...Object.values(n._renderedChildren)].filter(e):[]}function aS(n){var s;const e=n.memoizedProps||((s=n._currentElement)==null?void 0:s.props);if(!e||typeof e=="string")return e;const t={...e};return delete t.children,t}function im(n){var s;const e={key:oS(n),name:iS(n),children:lS(n).map(im),rootElements:[],props:aS(n)},t=n.stateNode||n._hostNode||((s=n._renderedComponent)==null?void 0:s._hostNode);if(t instanceof Element)e.rootElements.push(t);else for(const o of e.children)e.rootElements.push(...o.rootElements);return e}function om(n,e,t=[]){e(n)&&t.push(n);for(const s of n.children)om(s,e,t);return t}function lm(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);do{const o=s.currentNode,l=o,u=Object.keys(l).find(d=>d.startsWith("__reactContainer")&&l[d]!==null);if(u)e.push(l[u].stateNode.current);else{const d="_reactRootContainer";l.hasOwnProperty(d)&&l[d]!==null&&e.push(l[d]._internalRoot.current)}if(o instanceof Element&&o.hasAttribute("data-reactroot"))for(const d of Object.keys(o))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(o[d]);const f=o instanceof Element?o.shadowRoot:null;f&&lm(f,e)}while(s.nextNode());return e}const uS={queryAll(n,e){const{name:t,attributes:s}=ar(e,!1),u=lm(n.ownerDocument||n).map(d=>im(d)).map(d=>om(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),t&&p.name!==t||p.rootElements.some(y=>!vl(n,y)))return!1;for(const y of s)if(!nm(m,y))return!1;return!0})).flat(),f=new Set;for(const d of u)for(const p of d.rootElements)f.add(p);return[...f]}},am=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];am.sort();function ei(n,e,t){if(!e.includes(t))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(s=>`"${s}"`).join(", ")}`)}function Dr(n,e){if(n.op!=="<truthy>"&&!e.includes(n.value))throw new Error(`"${n.name}" must be one of ${e.map(t=>JSON.stringify(t)).join(", ")}`)}function Fr(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function cS(n,e){const t={role:e};for(const s of n)switch(s.name){case"checked":{ei(s.name,kc,e),Dr(s,[!0,!1,"mixed"]),Fr(s,["<truthy>","="]),t.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{ei(s.name,bc,e),Dr(s,[!0,!1,"mixed"]),Fr(s,["<truthy>","="]),t.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{ei(s.name,Ec,e),Dr(s,[!0,!1]),Fr(s,["<truthy>","="]),t.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{ei(s.name,Tc,e),Dr(s,[!0,!1]),Fr(s,["<truthy>","="]),t.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(ei(s.name,Cc,e),typeof s.value=="string"&&(s.value=+s.value),s.op!=="="||typeof s.value!="number"||Number.isNaN(s.value))throw new Error('"level" attribute must be compared to a number');t.level=s.value;break}case"disabled":{Dr(s,[!0,!1]),Fr(s,["<truthy>","="]),t.disabled=s.op==="<truthy>"?!0:s.value;break}case"name":{if(s.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof s.value!="string"&&!(s.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');t.name=s.value,t.nameOp=s.op,t.exact=s.caseSensitive;break}case"include-hidden":{Dr(s,[!0,!1]),Fr(s,["<truthy>","="]),t.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${am.map(o=>`"${o}"`).join(", ")}.`)}return t}function fS(n,e,t){const s=[],o=u=>{if(Ke(u)===e.role&&!(e.selected!==void 0&&zg(u)!==e.selected)&&!(e.checked!==void 0&&Ug(u)!==e.checked)&&!(e.pressed!==void 0&&qg(u)!==e.pressed)&&!(e.expanded!==void 0&&Hg(u)!==e.expanded)&&!(e.level!==void 0&&Vg(u)!==e.level)&&!(e.disabled!==void 0&&ul(u)!==e.disabled)&&!(!e.includeHidden&&Rt(u))){if(e.name!==void 0){const f=ct(pi(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=ct(e.name)),t&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!rm(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}s.push(u)}},l=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const d of u.querySelectorAll("*"))o(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(l)};return l(n),s}function Tp(n){return{queryAll:(e,t)=>{const s=ar(t,!0),o=s.name.toLowerCase();if(!o)throw new Error("Role must not be empty");const l=cS(s.attributes,o);Mc();try{return fS(e,l,n)}finally{Pc()}}}}class dS{constructor(e){this._engines=new Map,this._cacheQueryCSS=new Map,this._cacheMatches=new Map,this._cacheQuery=new Map,this._cacheMatchesSimple=new Map,this._cacheMatchesParents=new Map,this._cacheCallMatches=new Map,this._cacheCallQuery=new Map,this._cacheQuerySimple=new Map,this._cacheText=new Map,this._retainCacheCounter=0;for(const[o,l]of e)this._engines.set(o,l);this._engines.set("not",gS),this._engines.set("is",oi),this._engines.set("where",oi),this._engines.set("has",hS),this._engines.set("scope",pS),this._engines.set("light",mS),this._engines.set("visible",yS),this._engines.set("text",wS),this._engines.set("text-is",vS),this._engines.set("text-matches",SS),this._engines.set("has-text",_S),this._engines.set("right-of",ti("right-of")),this._engines.set("left-of",ti("left-of")),this._engines.set("above",ti("above")),this._engines.set("below",ti("below")),this._engines.set("near",ti("near")),this._engines.set("nth-match",ES);const t=[...this._engines.keys()];t.sort();const s=[...vg];if(s.sort(),t.join("|")!==s.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${t.join("|")} vs ${s.join("|")}`)}begin(){++this._retainCacheCounter}end(){--this._retainCacheCounter,this._retainCacheCounter||(this._cacheQueryCSS.clear(),this._cacheMatches.clear(),this._cacheQuery.clear(),this._cacheMatchesSimple.clear(),this._cacheMatchesParents.clear(),this._cacheCallMatches.clear(),this._cacheCallQuery.clear(),this._cacheQuerySimple.clear(),this._cacheText.clear())}_cached(e,t,s,o){e.has(t)||e.set(t,[]);const l=e.get(t),u=l.find(d=>s.every((p,m)=>d.rest[m]===p));if(u)return u.result;const f=o();return l.push({rest:s,result:f}),f}_checkSelector(e){if(!(typeof e=="object"&&e&&(Array.isArray(e)||"simples"in e&&e.simples.length)))throw new Error(`Malformed selector "${e}"`);return e}matches(e,t,s){const o=this._checkSelector(t);this.begin();try{return this._cached(this._cacheMatches,e,[o,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(o)?this._matchesEngine(oi,e,o,s):(this._hasScopeClause(o)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,o.simples[o.simples.length-1].selector,s)?this._matchesParents(e,o,o.simples.length-2,s):!1))}finally{this.end()}}query(e,t){const s=this._checkSelector(t);this.begin();try{return this._cached(this._cacheQuery,s,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(s))return this._queryEngine(oi,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const o=this._scoreMap;this._scoreMap=new Map;let l=this._querySimple(e,s.simples[s.simples.length-1].selector);return l=l.filter(u=>this._matchesParents(u,s,s.simples.length-2,e)),this._scoreMap.size&&l.sort((u,f)=>{const d=this._scoreMap.get(u),p=this._scoreMap.get(f);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),this._scoreMap=o,l})}finally{this.end()}}_markScore(e,t){this._scoreMap&&this._scoreMap.set(e,t)}_hasScopeClause(e){return e.simples.some(t=>t.selector.functions.some(s=>s.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const t=ut(e.scope);return t?{...e,scope:t,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,t,s){return this._cached(this._cacheMatchesSimple,e,[t,s.scope,s.pierceShadow,s.originalScope],()=>{if(e===s.scope||t.css&&!this._matchesCSS(e,t.css))return!1;for(const o of t.functions)if(!this._matchesEngine(this._getEngine(o.name),e,o.args,s))return!1;return!0})}_querySimple(e,t){return t.functions.length?this._cached(this._cacheQuerySimple,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=t.css;const o=t.functions;s==="*"&&o.length&&(s=void 0);let l,u=-1;s!==void 0?l=this._queryCSS(e,s):(u=o.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),l=this._queryEngine(this._getEngine(o[u].name),e,o[u].args));for(let f=0;f<o.length;f++){if(f===u)continue;const d=this._getEngine(o[f].name);d.matches!==void 0&&(l=l.filter(p=>this._matchesEngine(d,p,o[f].args,e)))}for(let f=0;f<o.length;f++){if(f===u)continue;const d=this._getEngine(o[f].name);d.matches===void 0&&(l=l.filter(p=>this._matchesEngine(d,p,o[f].args,e)))}return l}):this._queryCSS(e,t.css||"*")}_matchesParents(e,t,s,o){return s<0?!0:this._cached(this._cacheMatchesParents,e,[t,s,o.scope,o.pierceShadow,o.originalScope],()=>{const{selector:l,combinator:u}=t.simples[s];if(u===">"){const f=Po(e,o);return!f||!this._matchesSimple(f,l,o)?!1:this._matchesParents(f,t,s-1,o)}if(u==="+"){const f=ju(e,o);return!f||!this._matchesSimple(f,l,o)?!1:this._matchesParents(f,t,s-1,o)}if(u===""){let f=Po(e,o);for(;f;){if(this._matchesSimple(f,l,o)){if(this._matchesParents(f,t,s-1,o))return!0;if(t.simples[s-1].combinator==="")break}f=Po(f,o)}return!1}if(u==="~"){let f=ju(e,o);for(;f;){if(this._matchesSimple(f,l,o)){if(this._matchesParents(f,t,s-1,o))return!0;if(t.simples[s-1].combinator==="~")break}f=ju(f,o)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,l,o)){if(this._matchesParents(f,t,s-1,o))return!0;if(t.simples[s-1].combinator==="")break}f=Po(f,o)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,t,s,o){if(e.matches)return this._callMatches(e,t,s,o);if(e.query)return this._callQuery(e,s,o).includes(t);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,t,s){if(e.query)return this._callQuery(e,s,t);if(e.matches)return this._queryCSS(t,"*").filter(o=>this._callMatches(e,o,s,t));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,t,s,o){return this._cached(this._cacheCallMatches,t,[e,o.scope,o.pierceShadow,o.originalScope,...s],()=>e.matches(t,s,o,this))}_callQuery(e,t,s){return this._cached(this._cacheCallQuery,e,[s.scope,s.pierceShadow,s.originalScope,...t],()=>e.query(s,t,this))}_matchesCSS(e,t){return e.matches(t)}_queryCSS(e,t){return this._cached(this._cacheQueryCSS,t,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=[];function o(l){if(s=s.concat([...l.querySelectorAll(t)]),!!e.pierceShadow){l.shadowRoot&&o(l.shadowRoot);for(const u of l.querySelectorAll("*"))u.shadowRoot&&o(u.shadowRoot)}}return o(e.scope),s})}_getEngine(e){const t=this._engines.get(e);if(!t)throw new Error(`Unknown selector engine "${e}"`);return t}}const oi={matches(n,e,t,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(o=>s.matches(n,o,t))},query(n,e,t){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const o of e)s=s.concat(t.query(n,o));return e.length===1?s:um(s)}},hS={matches(n,e,t,s){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return s.query({...t,scope:n},e).length>0}},pS={matches(n,e,t,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const o=t.originalScope||t.scope;return o.nodeType===9?n===o.documentElement:n===o},query(n,e,t){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;if(s.nodeType===9){const o=s.documentElement;return o?[o]:[]}return s.nodeType===1?[s]:[]}},gS={matches(n,e,t,s){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!s.matches(n,e,t)}},mS={query(n,e,t){return t.query({...n,pierceShadow:!1},e)},matches(n,e,t,s){return s.matches(n,e,{...t,pierceShadow:!1})}},yS={matches(n,e,t,s){if(e.length)throw new Error('"visible" engine expects no arguments');return Yr(n)}},wS={matches(n,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const o=ct(e[0]).toLowerCase(),l=u=>u.normalized.toLowerCase().includes(o);return Sl(s._cacheText,n,l)==="self"}},vS={matches(n,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const o=ct(e[0]),l=u=>!o&&!u.immediate.length?!0:u.immediate.some(f=>ct(f)===o);return Sl(s._cacheText,n,l)!=="none"}},SS={matches(n,e,t,s){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const o=new RegExp(e[0],e.length===2?e[1]:void 0),l=u=>o.test(u.full);return Sl(s._cacheText,n,l)==="self"}},_S={matches(n,e,t,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(Rc(n))return!1;const o=ct(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(o))(Et(s._cacheText,n))}};function ti(n){return{matches(e,t,s,o){const l=t.length&&typeof t[t.length-1]=="number"?t[t.length-1]:void 0,u=l===void 0?t:t.slice(0,t.length-1);if(t.length<1+(l===void 0?0:1))throw new Error(`"${n}" engine expects a selector list and optional maximum distance in pixels`);const f=o.query(s,u),d=tm(n,e,f,l);return d===void 0?!1:(o._markScore(e,d),!0)}}}const ES={query(n,e,t){let s=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof s!="number"||s<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const o=oi.query(n,e.slice(0,e.length-1),t);return s--,s<o.length?[o[s]]:[]}};function Po(n,e){if(n!==e.scope)return e.pierceShadow?ut(n):n.parentElement||void 0}function ju(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function um(n){const e=new Map,t=[],s=[];function o(u){let f=e.get(u);if(f)return f;const d=ut(u);return d?o(d).children.push(u):t.push(u),f={children:[],taken:!1},e.set(u,f),f}for(const u of n)o(u).taken=!0;function l(u){const f=e.get(u);if(f.taken&&s.push(u),f.children.length>1){const d=new Set(f.children);f.children=[];let p=u.firstElementChild;for(;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling;for(p=u.shadowRoot?u.shadowRoot.firstElementChild:null;p&&f.children.length<d.size;)d.has(p)&&f.children.push(p),p=p.nextElementSibling}f.children.forEach(l)}return t.forEach(l),s}const oc=new Map,lc=new Map,cm=10,is=cm/2,Cp=1,kS=2,xS=10,bS=50,fm=100,dm=120,hm=140,pm=160,Jo=180,gm=200,Np=250,TS=dm+is,CS=hm+is,NS=fm+is,AS=pm+is,LS=Jo+is,IS=gm+is,OS=300,$S=500,mm=510,Du=520,ym=530,wm=1e4,MS=1e7,PS=1e3;function Ap(n,e,t){n._evaluator.begin(),Mc();try{let s=[];if(t.forTextExpect){let u=Ro(n,e.ownerDocument.documentElement,t);for(let f=e;f;f=ut(f)){const d=Br(n,f,{...t,noText:!0});if(!d)continue;if(Dn(d)<=PS){u=d;break}}s=[Yo(u)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const u=ii(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",t.root);u&&Yr(u)&&(e=u)}if(t.multiple){const u=Br(n,e,t),f=Br(n,e,{...t,noText:!0});let d=[u,f];if(oc.clear(),lc.clear(),u&&Fu(u)&&d.push(Br(n,e,{...t,noCSSId:!0})),f&&Fu(f)&&d.push(Br(n,e,{...t,noText:!0,noCSSId:!0})),d=d.filter(Boolean),!d.length){const p=Ro(n,e,t);d.push(p),Fu(p)&&d.push(Ro(n,e,{...t,noCSSId:!0}))}s=[...new Set(d.map(p=>Yo(p)))]}else{const u=Br(n,e,t)||Ro(n,e,t);s=[Yo(u)]}}const o=s[0],l=n.parseSelector(o);return{selector:o,selectors:s,elements:n.querySelectorAll(l,t.root??e.ownerDocument)}}finally{oc.clear(),lc.clear(),Pc(),n._evaluator.end()}}function Lp(n){return n.filter(e=>e[0].selector[0]!=="/")}function Br(n,e,t){if(t.root&&!vl(t.root,e))throw new Error("Target element must belong to the root's subtree");if(e===t.root)return[{engine:"css",selector:":scope",score:1}];if(e.ownerDocument.documentElement===e)return[{engine:"css",selector:"html",score:1}];const s=(l,u)=>{const f=l===e;let d=u?jS(n,l,l===e):[];l!==e&&(d=Lp(d));const p=RS(n,l,t).filter(v=>!t.omitInternalEngines||!v.engine.startsWith("internal:")).map(v=>[v]);let m=Ip(n,t.root??e.ownerDocument,l,[...d,...p],f);d=Lp(d);const y=v=>{const S=u&&!v.length,x=[...v,...p].filter(E=>m?Dn(E)<Dn(m):!0);let _=x[0];if(_)for(let E=ut(l);E&&E!==t.root;E=ut(E)){const L=o(E,S);if(!L||m&&Dn([...L,..._])>=Dn(m))continue;if(_=Ip(n,E,l,x,f),!_)return;const O=[...L,..._];(!m||Dn(O)<Dn(m))&&(m=O)}};return y(d),l===e&&d.length&&y([]),m},o=(l,u)=>{const f=u?oc:lc;let d=f.get(l);return d===void 0&&(d=s(l,u),f.set(l,d)),d};return s(e,!t.noText)}function RS(n,e,t){const s=[];{for(const u of["data-testid","data-test-id","data-test"])u!==t.testIdAttributeName&&e.getAttribute(u)&&s.push({engine:"css",selector:`[${u}=${Xs(e.getAttribute(u))}]`,score:kS});if(!t.noCSSId){const u=e.getAttribute("id");u&&!DS(u)&&s.push({engine:"css",selector:vm(u),score:$S})}s.push({engine:"css",selector:jt(e.nodeName.toLowerCase()),score:ym})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&s.push({engine:"css",selector:`${jt(e.nodeName.toLowerCase())}[${u}=${Xs(e.getAttribute(u))}]`,score:xS});return e.getAttribute(t.testIdAttributeName)&&s.push({engine:"css",selector:`[${t.testIdAttributeName}=${Xs(e.getAttribute(t.testIdAttributeName))}]`,score:Cp}),ac([s]),s}if(e.getAttribute(t.testIdAttributeName)&&s.push({engine:"internal:testid",selector:`[${t.testIdAttributeName}=${at(e.getAttribute(t.testIdAttributeName),!0)}]`,score:Cp}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${at(u.placeholder,!0)}]`,score:TS});for(const f of Vr(u.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${at(f.text,!1)}]`,score:dm-f.scoreBonus})}}const o=sm(n._evaluator._cacheText,e);for(const u of o){const f=u.normalized;s.push({engine:"internal:label",selector:St(f,!0),score:CS});for(const d of Vr(f))s.push({engine:"internal:label",selector:St(d.text,!1),score:hm-d.scoreBonus})}const l=Ke(e);return l&&!["none","presentation"].includes(l)&&s.push({engine:"internal:role",selector:l,score:mm}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&s.push({engine:"css",selector:`${jt(e.nodeName.toLowerCase())}[name=${Xs(e.getAttribute("name"))}]`,score:Du}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${jt(e.nodeName.toLowerCase())}[type=${Xs(e.getAttribute("type"))}]`,score:Du}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:jt(e.nodeName.toLowerCase()),score:Du+1}),ac([s]),s}function jS(n,e,t){if(e.nodeName==="SELECT")return[];const s=[],o=e.getAttribute("title");if(o){s.push([{engine:"internal:attr",selector:`[title=${at(o,!0)}]`,score:IS}]);for(const p of Vr(o))s.push([{engine:"internal:attr",selector:`[title=${at(p.text,!1)}]`,score:gm-p.scoreBonus}])}const l=e.getAttribute("alt");if(l&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${at(l,!0)}]`,score:AS}]);for(const p of Vr(l))s.push([{engine:"internal:attr",selector:`[alt=${at(p.text,!1)}]`,score:pm-p.scoreBonus}])}const u=Et(n._evaluator._cacheText,e).normalized,f=u?Vr(u):[];if(u){if(t){u.length<=80&&s.push([{engine:"internal:text",selector:St(u,!0),score:LS}]);for(const m of f)s.push([{engine:"internal:text",selector:St(m.text,!1),score:Jo-m.scoreBonus}])}const p={engine:"css",selector:jt(e.nodeName.toLowerCase()),score:ym};for(const m of f)s.push([p,{engine:"internal:has-text",selector:St(m.text,!1),score:Jo-m.scoreBonus}]);if(u.length<=80){const m=new RegExp("^"+sl(u)+"$");s.push([p,{engine:"internal:has-text",selector:St(m,!1),score:Np}])}}const d=Ke(e);if(d&&!["none","presentation"].includes(d)){const p=pi(e,!1);if(p){const m={engine:"internal:role",selector:`${d}[name=${at(p,!0)}]`,score:NS};s.push([m]);for(const y of Vr(p))s.push([{engine:"internal:role",selector:`${d}[name=${at(y.text,!1)}]`,score:fm-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:mm};for(const y of f)s.push([m,{engine:"internal:has-text",selector:St(y.text,!1),score:Jo-y.scoreBonus}]);if(u.length<=80){const y=new RegExp("^"+sl(u)+"$");s.push([m,{engine:"internal:has-text",selector:St(y,!1),score:Np}])}}}return ac(s),s}function vm(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id="${jt(n)}"]`}function Fu(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Ro(n,e,t){const s=t.root??e.ownerDocument,o=[];function l(f){const d=o.slice();f&&d.unshift(f);const p=d.join(" > "),m=n.parseSelector(p);return n.querySelector(m,s,!1)===e?p:void 0}function u(f){const d={engine:"css",selector:f,score:MS},p=n.parseSelector(f),m=n.querySelectorAll(p,s);if(m.length===1)return[d];const y={engine:"nth",selector:String(m.indexOf(e)),score:wm};return[d,y]}for(let f=e;f&&f!==s;f=ut(f)){const d=f.nodeName.toLowerCase();let p="";if(f.id&&!t.noCSSId){const v=vm(f.id),S=l(v);if(S)return u(S);p=v}const m=f.parentNode,y=[...f.classList];for(let v=0;v<y.length;++v){const S="."+jt(y.slice(0,v+1).join(".")),x=l(S);if(x)return u(x);!p&&m&&m.querySelectorAll(S).length===1&&(p=S)}if(m){const v=[...m.children],x=v.filter(E=>E.nodeName.toLowerCase()===d).indexOf(f)===0?jt(d):`${jt(d)}:nth-child(${1+v.indexOf(f)})`,_=l(x);if(_)return u(_);p||(p=x)}else p||(p=jt(d));o.unshift(p)}return u(l())}function ac(n){for(const e of n)for(const t of e)t.score>bS&&t.score<OS&&(t.score+=Math.min(cm,t.selector.length/10|0))}function Yo(n){const e=[];let t="";for(const{engine:s,selector:o}of n)e.length&&(t!=="css"||s!=="css"||o.startsWith(":nth-match("))&&e.push(">>"),t=s,s==="css"?e.push(o):e.push(`${s}=${o}`);return e.join(" ")}function Dn(n){let e=0;for(let t=0;t<n.length;t++)e+=n[t].score*(n.length-t);return e}function Ip(n,e,t,s,o){const l=s.map(f=>({tokens:f,score:Dn(f)}));l.sort((f,d)=>f.score-d.score);let u=null;for(const{tokens:f}of l){const d=n.parseSelector(Yo(f)),p=n.querySelectorAll(d,e);if(p[0]===t&&p.length===1)return f;const m=p.indexOf(t);if(!o||u||m===-1||p.length>5)continue;const y={engine:"nth",selector:String(m),score:wm};u=[...f,y]}return u}function DS(n){let e,t=0;for(let s=0;s<n.length;++s){const o=n[s];let l;if(!(o==="-"||o==="_")){if(o>="a"&&o<="z"?l="lower":o>="A"&&o<="Z"?l="upper":o>="0"&&o<="9"?l="digit":l="other",l==="lower"&&e==="upper"){e=l;continue}e&&e!==l&&++t,e=l}}return t>=n.length/4}function jo(n,e){if(n.length<=e)return n;n=n.substring(0,e);const t=n.match(/^(.*)\b(.+?)$/);return t?t[1].trimEnd():""}function Vr(n){let e=[];{const t=n.match(/^([\d.,]+)[^.,\w]/),s=t?t[1].length:0;if(s){const o=jo(n.substring(s).trimStart(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}{const t=n.match(/[^.,\w]([\d.,]+)$/),s=t?t[1].length:0;if(s){const o=jo(n.substring(0,n.length-s).trimEnd(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:jo(n,80),scoreBonus:0}),e.push({text:jo(n,30),scoreBonus:1})),e=e.filter(t=>t.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function Sm(n,e){const t=n.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let s=t.substring(t.lastIndexOf("/")+1);return s.endsWith(e)&&(s=s.substring(0,s.length-e.length)),s}function FS(n,e){return e?e.toUpperCase():""}const BS=/(?:^|[-_/])(\w)/g,_m=n=>n&&n.replace(BS,FS);function zS(n){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const v=m.__file;if(v)return _m(Sm(v,".vue"))}function t(m,y){return m.type.__playwright_guessedName=y,y}function s(m){var v,S,x,_;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const E in(S=(v=m.parent)==null?void 0:v.type)==null?void 0:S.components)if(((x=m.parent)==null?void 0:x.type.components[E])===m.type)return t(m,E);for(const E in(_=m.appContext)==null?void 0:_.components)if(m.appContext.components[E]===m.type)return t(m,E);return"Anonymous Component"}function o(m){return m._isBeingDestroyed||m.isUnmounted}function l(m){return m.subTree.type.toString()==="Symbol(Fragment)"}function u(m){const y=[];return m.component&&y.push(m.component),m.suspense&&y.push(...u(m.suspense.activeBranch)),Array.isArray(m.children)&&m.children.forEach(v=>{v.component?y.push(v.component):y.push(...u(v))}),y.filter(v=>{var S;return!o(v)&&!((S=v.type.devtools)!=null&&S.hide)})}function f(m){return l(m)?d(m.subTree):[m.subTree.el]}function d(m){if(!m.children)return[];const y=[];for(let v=0,S=m.children.length;v<S;v++){const x=m.children[v];x.component?y.push(...f(x.component)):x.el&&y.push(x.el)}return y}function p(m){return{name:s(m),children:u(m.subTree).map(p),rootElements:f(m),props:m.props}}return p(n)}function US(n){function e(l){const u=l.displayName||l.name||l._componentTag;if(u)return u;const f=l.__file;if(f)return _m(Sm(f,".vue"))}function t(l){const u=e(l.$options||l.fnOptions||{});return u||(l.$root===l?"Root":"Anonymous Component")}function s(l){return l.$children?l.$children:Array.isArray(l.subTree.children)?l.subTree.children.filter(u=>!!u.component).map(u=>u.component):[]}function o(l){return{name:t(l),children:s(l).map(o),rootElements:[l.$el],props:l._props}}return o(n)}function Em(n,e,t=[]){e(n)&&t.push(n);for(const s of n.children)Em(s,e,t);return t}function km(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),o=new Set;do{const l=s.currentNode;l.__vue__&&o.add(l.__vue__.$root),l.__vue_app__&&l._vnode&&l._vnode.component&&e.push({root:l._vnode.component,version:3});const u=l instanceof Element?l.shadowRoot:null;u&&km(u,e)}while(s.nextNode());for(const l of o)e.push({version:2,root:l});return e}const qS={queryAll(n,e){const t=n.ownerDocument||n,{name:s,attributes:o}=ar(e,!1),f=km(t).map(p=>p.version===3?zS(p.root):US(p.root)).map(p=>Em(p,m=>{if(s&&m.name!==s||m.rootElements.some(y=>!vl(n,y)))return!1;for(const y of o)if(!nm(m.props,y))return!1;return!0})).flat(),d=new Set;for(const p of f)for(const m of p.rootElements)d.add(m);return[...d]}},Op={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const t=[],s=n.ownerDocument||n;if(!s)return t;const o=s.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let l=o.iterateNext();l;l=o.iterateNext())l.nodeType===Node.ELEMENT_NODE&&t.push(l);return t}};class xm{constructor(e,t,s,o,l,u,f){this.onGlobalListenersRemoved=new Set,this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Jr,cacheNormalizedWhitespaces:S0,elementText:Et,getAriaRole:Ke,getElementAccessibleDescription:Ep,getElementAccessibleName:pi,isElementVisible:Yr,isInsideScope:vl,normalizeWhiteSpace:ct,parseAriaSnapshot:_c},this.window=e,this.document=e.document,this.isUnderTest=t,this._sdkLanguage=s,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=o,this._evaluator=new dS(new Map),this._engines=new Map,this._engines.set("xpath",Op),this._engines.set("xpath:light",Op),this._engines.set("_react",uS),this._engines.set("_vue",qS),this._engines.set("role",Tp(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",Tp(!0)),this._engines.set("internal:aria-id",this._createAriaIdEngine());for(const{name:d,engine:p}of f)this._engines.set(d,p);this._stableRafCount=l,this._browserName=u,b1(u),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),t&&(this.window.__injectedScript=this)}builtinSetTimeout(e,t){var s;return(s=this.window.__pwClock)!=null&&s.builtin?this.window.__pwClock.builtin.setTimeout(e,t):this.window.setTimeout(e,t)}builtinClearTimeout(e){var t;return(t=this.window.__pwClock)!=null&&t.builtin?this.window.__pwClock.builtin.clearTimeout(e):this.window.clearTimeout(e)}builtinRequestAnimationFrame(e){var t;return(t=this.window.__pwClock)!=null&&t.builtin?this.window.__pwClock.builtin.requestAnimationFrame(e):this.window.requestAnimationFrame(e)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const t=ml(e);return y0(t,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),t}generateSelector(e,t){return Ap(this,e,t)}generateSelectorSimple(e,t){return Ap(this,e,{...t,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,t,s){const o=this.querySelectorAll(e,t);if(s&&o.length>1)throw this.strictModeViolationError(e,o);return o[0]}_queryNth(e,t){const s=[...e];let o=+t.body;return o===-1&&(o=s.length-1),new Set(s.slice(o,o+1))}_queryLayoutSelector(e,t,s){const o=t.name,l=t.body,u=[],f=this.querySelectorAll(l.parsed,s);for(const d of e){const p=tm(o,d,f,l.distance);p!==void 0&&u.push({element:d,score:p})}return u.sort((d,p)=>d.score-p.score),new Set(u.map(d=>d.element))}ariaSnapshot(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const s=cl(e);return this._ariaElementById=s.elements,ci(s.root,{...t,ids:t!=null&&t.id?s.ids:void 0})}ariaSnapshotAsObject(e){return cl(e)}ariaSnapshotElement(e,t){return e.elements.get(t)||null}renderAriaTree(e,t){return ci(e,t)}renderAriaSnapshotWithIds(e){return ci(e.root,{ids:e.ids})}getAllByAria(e,t){return G1(e.documentElement,t)}querySelectorAll(e,t){if(e.capture!==void 0){if(e.parts.some(o=>o.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const s={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const o={parts:e.parts.slice(e.capture+1)},l={name:"internal:has",body:{parsed:o},source:gn(o)};s.parts.push(l)}return this.querySelectorAll(s,t)}if(!t.querySelectorAll)throw this.createStacklessError("Node is not queryable.");if(e.capture!==void 0)throw this.createStacklessError("Internal error: there should not be a capture in the selector.");if(t.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[t];this._evaluator.begin();try{let s=new Set([t]);for(const o of e.parts)if(o.name==="nth")s=this._queryNth(s,o);else if(o.name==="internal:and"){const l=this.querySelectorAll(o.body.parsed,t);s=new Set(l.filter(u=>s.has(u)))}else if(o.name==="internal:or"){const l=this.querySelectorAll(o.body.parsed,t);s=new Set(um(new Set([...s,...l])))}else if(sS.includes(o.name))s=this._queryLayoutSelector(s,o,t);else{const l=new Set;for(const u of s){const f=this._queryEngineAll(o,u);for(const d of f)l.add(d)}s=l}return[...s]}finally{this._evaluator.end()}}_queryEngineAll(e,t){const s=this._engines.get(e.name).queryAll(t,e.body);for(const o of s)if(!("nodeName"in o))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(o)}`);return s}_createAttributeEngine(e,t){const s=o=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(o)}]`,functions:[]},combinator:""}]}];return{queryAll:(o,l)=>this._evaluator.query({scope:o,pierceShadow:t},s(l))}}_createCSSEngine(){return{queryAll:(e,t)=>this._evaluator.query({scope:e,pierceShadow:!0},t)}}_createTextEngine(e,t){return{queryAll:(o,l)=>{const{matcher:u,kind:f}=Fo(l,t),d=[];let p=null;const m=v=>{if(f==="lax"&&p&&p.contains(v))return!1;const S=Sl(this._evaluator._cacheText,v,u);S==="none"&&(p=v),(S==="self"||S==="selfAndChildren"&&f==="strict"&&!t)&&d.push(v)};o.nodeType===Node.ELEMENT_NODE&&m(o);const y=this._evaluator._queryCSS({scope:o,pierceShadow:e},"*");for(const v of y)m(v);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];const s=e,o=Et(this._evaluator._cacheText,s),{matcher:l}=Fo(t,!0);return l(o)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,t)=>{if(e.nodeType!==1)return[];const s=e,o=Et(this._evaluator._cacheText,s),{matcher:l}=Fo(t,!0);return l(o)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,t)=>{const{matcher:s}=Fo(t,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(l=>sm(this._evaluator._cacheText,l).some(u=>s(u)))}}}_createNamedAttributeEngine(){return{queryAll:(t,s)=>{const o=ar(s,!0);if(o.name||o.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:l,value:u,caseSensitive:f}=o.attributes[0],d=f?null:u.toLowerCase();let p;return u instanceof RegExp?p=y=>!!y.match(u):f?p=y=>y===u:p=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:t,pierceShadow:!0},`[${l}]`).filter(y=>p(y.getAttribute(l)))}}}_createControlEngine(){return{queryAll(e,t){if(t==="enter-frame")return[];if(t==="return-empty")return[];if(t==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${t}`)}}}_createHasEngine(){return{queryAll:(t,s)=>t.nodeType!==1?[]:!!this.querySelector(s.parsed,t,!1)?[t]:[]}}_createHasNotEngine(){return{queryAll:(t,s)=>t.nodeType!==1?[]:!!this.querySelector(s.parsed,t,!1)?[]:[t]}}_createVisibleEngine(){return{queryAll:(t,s)=>{if(t.nodeType!==1)return[];const o=s==="true";return Yr(t)===o?[t]:[]}}}_createInternalChainEngine(){return{queryAll:(t,s)=>this.querySelectorAll(s.parsed,t)}}extend(e,t){const s=this.window.eval(`
86
- (() => {
87
- const module = {};
88
- ${e}
89
- return module.exports.default();
90
- })()`);return new s(this,t)}async viewportRatio(e){return await new Promise(t=>{const s=new IntersectionObserver(o=>{t(o[0].intersectionRatio),s.disconnect()});s.observe(e),this.builtinRequestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const t=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(t.borderLeftWidth||"",10),top:parseInt(t.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const t=e.ownerDocument.defaultView;for(let o=e;o;o=ut(o))if(t.getComputedStyle(o).transform!=="none")return"transformed";const s=t.getComputedStyle(e);return{left:parseInt(s.borderLeftWidth||"",10)+parseInt(s.paddingLeft||"",10),top:parseInt(s.borderTopWidth||"",10)+parseInt(s.paddingTop||"",10)}}retarget(e,t){let s=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!s)return null;if(t==="none")return s;if(!s.matches("input, textarea, select")&&!s.isContentEditable&&(t==="button-link"?s=s.closest("button, [role=button], a, [role=link]")||s:s=s.closest("button, [role=button], [role=checkbox], [role=radio]")||s),t==="follow-label"&&!s.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!s.isContentEditable){const o=s.closest("label");o&&o.control&&(s=o.control)}return s}async checkElementStates(e,t){if(t.includes("stable")){const s=await this._checkElementIsStable(e);if(s===!1)return{missingState:"stable"};if(s==="error:notconnected")return"error:notconnected"}for(const s of t)if(s!=="stable"){const o=this.elementState(e,s);if(o.received==="error:notconnected")return"error:notconnected";if(!o.matches)return{missingState:s}}}async _checkElementIsStable(e){const t=Symbol("continuePolling");let s,o=0,l=0;const u=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const v=performance.now();if(this._stableRafCount>1&&v-l<15)return t;l=v;const S=y.getBoundingClientRect(),x={x:S.top,y:S.left,width:S.width,height:S.height};if(s){if(!(x.x===s.x&&x.y===s.y&&x.width===s.width&&x.height===s.height))return!1;if(++o>=this._stableRafCount)return!0}return s=x,t};let f,d;const p=new Promise((y,v)=>{f=y,d=v}),m=()=>{try{const y=u();y!==t?f(y):this.builtinRequestAnimationFrame(m)}catch(y){d(y)}};return this.builtinRequestAnimationFrame(m),p}_createAriaIdEngine(){return{queryAll:(t,s)=>{var u;const o=parseInt(s,10),l=(u=this._ariaElementById)==null?void 0:u.get(o);return l&&l.isConnected?[l]:[]}}}elementState(e,t){const s=this.retarget(e,["visible","hidden"].includes(t)?"none":"follow-label");if(!s||!s.isConnected)return t==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(t==="visible"||t==="hidden"){const o=Yr(s);return{matches:t==="visible"?o:!o,received:o?"visible":"hidden"}}if(t==="disabled"||t==="enabled"){const o=ul(s);return{matches:t==="disabled"?o:!o,received:o?"disabled":"enabled"}}if(t==="editable"){const o=ul(s),l=z1(s);if(l==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!o&&!l,received:o?"disabled":l?"readOnly":"editable"}}if(t==="checked"||t==="unchecked"){const o=t==="checked",l=F1(s);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o===l,received:l?"checked":"unchecked"}}if(t==="indeterminate"){const o=D1(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o==="mixed",received:o===!0?"checked":o===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${t}"`)}selectOptions(e,t){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const o=s,l=[...o.options],u=[];let f=t.slice();for(let d=0;d<l.length;d++){const p=l[d],m=y=>{if(y instanceof Node)return p===y;let v=!0;return y.valueOrLabel!==void 0&&(v=v&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(v=v&&y.value===p.value),y.label!==void 0&&(v=v&&y.label===p.label),y.index!==void 0&&(v=v&&y.index===d),v};if(f.some(m))if(u.push(p),o.multiple)f=f.filter(y=>!m(y));else{f=[];break}}return f.length?"error:optionsnotfound":(o.value=void 0,u.forEach(d=>d.selected=!0),o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})),u.map(d=>d.value))}fill(e,t){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()==="input"){const o=s,l=o.type.toLowerCase(),u=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(l)&&!u.has(l))throw this.createStacklessError(`Input of type "${l}" cannot be filled`);if(l==="number"&&(t=t.trim(),isNaN(Number(t))))throw this.createStacklessError("Cannot type text into input[type=number]");if(u.has(l)){if(t=t.trim(),o.focus(),o.value=t,o.value!==t)throw this.createStacklessError("Malformed value");return s.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(s.nodeName.toLowerCase()!=="textarea"){if(!s.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(s),"needsinput"}selectText(e){const t=this.retarget(e,"follow-label");if(!t)return"error:notconnected";if(t.nodeName.toLowerCase()==="input"){const l=t;return l.select(),l.focus(),"done"}if(t.nodeName.toLowerCase()==="textarea"){const l=t;return l.selectionStart=0,l.selectionEnd=l.value.length,l.focus(),"done"}const s=t.ownerDocument.createRange();s.selectNodeContents(t);const o=t.ownerDocument.defaultView.getSelection();return o&&(o.removeAllRanges(),o.addRange(s)),t.focus(),"done"}_activelyFocused(e){const t=e.getRootNode().activeElement,s=t===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:t,isFocused:s}}focusNode(e,t){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:s,isFocused:o}=this._activelyFocused(e);if(e.isContentEditable&&!o&&s&&s.blur&&s.blur(),e.focus(),e.focus(),t&&!o&&e.nodeName.toLowerCase()==="input")try{e.setSelectionRange(0,0)}catch{}return"done"}blurNode(e){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");return e.blur(),"done"}setInputFiles(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const s=e;if(s.nodeName!=="INPUT")return"Not an <input> element";const o=s;if((o.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=t.map(d=>{const p=Uint8Array.from(atob(d.buffer),m=>m.charCodeAt(0));return new File([p],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),f=new DataTransfer;for(const d of u)f.items.add(d);o.files=f.files,o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,t){const s=[];let o=t;for(;o;){const m=Lg(o);if(!m||(s.push(m),m.nodeType===9))break;o=m.host}let l;for(let m=s.length-1;m>=0;m--){const y=s[m],v=y.elementsFromPoint(e.x,e.y),S=y.elementFromPoint(e.x,e.y);if(S&&v[0]&&ut(S)===v[0]){const _=this.window.getComputedStyle(S);(_==null?void 0:_.display)==="contents"&&v.unshift(S)}v[0]&&v[0].shadowRoot===y&&v[1]===S&&v.shift();const x=v[0];if(!x||(l=x,m&&x!==s[m-1].host))break}const u=[];for(;l&&l!==t;)u.push(l),l=ut(l);if(l===t)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let d,p=t;for(;p;){const m=u.indexOf(p);if(m!==-1){m>1&&(d=this.previewNode(u[m-1]));break}p=ut(p)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,t,s,o){const l=this.retarget(e,"button-link");if(!l||!l.isConnected)return"error:notconnected";if(s){const m=this.expectHitTarget(s,l);if(m!=="done")return m.hitTargetDescription}if(t==="drag")return{stop:()=>"done"};const u={hover:bm,tap:Tm,mouse:Cm}[t];let f;const d=m=>{if(!u.has(m.type)||!m.isTrusted)return;const y=this.window.TouchEvent&&m instanceof this.window.TouchEvent?m.touches[0]:m;f===void 0&&y&&(f=this.expectHitTarget({x:y.clientX,y:y.clientY},l)),(o||f!=="done"&&f!==void 0)&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())},p=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),f||"done");return this._hitTargetInterceptor=d,{stop:p}}dispatchEvent(e,t,s){var u,f,d;let o;const l={bubbles:!0,cancelable:!0,composed:!0,...s};switch(WS.get(t)){case"mouse":o=new MouseEvent(t,l);break;case"keyboard":o=new KeyboardEvent(t,l);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var x,_;if(y instanceof Touch)return y;let v=y.pageX;v===void 0&&y.clientX!==void 0&&(v=y.clientX+(((x=this.document.scrollingElement)==null?void 0:x.scrollLeft)||0));let S=y.pageY;return S===void 0&&y.clientY!==void 0&&(S=y.clientY+(((_=this.document.scrollingElement)==null?void 0:_.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,v,S,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},m=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(p));l.target??(l.target=e),l.touches=m(l.touches),l.targetTouches=m(l.targetTouches),l.changedTouches=m(l.changedTouches),o=new TouchEvent(t,l)}else l.target??(l.target=e),l.touches=(u=l.touches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l.targetTouches=(f=l.targetTouches)==null?void 0:f.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l.changedTouches=(d=l.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o=new TouchEvent(t,l);break}case"pointer":o=new PointerEvent(t,l);break;case"focus":o=new FocusEvent(t,l);break;case"drag":o=new DragEvent(t,l);break;case"wheel":o=new WheelEvent(t,l);break;case"deviceorientation":try{o=new DeviceOrientationEvent(t,l)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:v,gamma:S,absolute:x}=l;o=this.document.createEvent("DeviceOrientationEvent"),o.initDeviceOrientationEvent(t,p,m,y,v,S,x)}break;case"devicemotion":try{o=new DeviceMotionEvent(t,l)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:v,rotationRate:S,interval:x}=l;o=this.document.createEvent("DeviceMotionEvent"),o.initDeviceMotionEvent(t,p,m,y,v,S,x)}break;default:o=new Event(t,l);break}e.dispatchEvent(o)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Do(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Do(`<${e.nodeName.toLowerCase()} />`);const t=e,s=[];for(let d=0;d<t.attributes.length;d++){const{name:p,value:m}=t.attributes[d];p!=="style"&&(!m&&VS.has(p)?s.push(` ${p}`):s.push(` ${p}="${m}"`))}s.sort((d,p)=>d.length-p.length);const o=ap(s.join(""),500);if(HS.has(t.nodeName))return Do(`<${t.nodeName.toLowerCase()}${o}/>`);const l=t.childNodes;let u=!1;if(l.length<=5){u=!0;for(let d=0;d<l.length;d++)u=u&&l[d].nodeType===Node.TEXT_NODE}const f=u?t.textContent||"":l.length?"…":"";return Do(`<${t.nodeName.toLowerCase()}${o}>${ap(f,50)}</${t.nodeName.toLowerCase()}>`)}strictModeViolationError(e,t){const s=t.slice(0,10).map(l=>({preview:this.previewNode(l),selector:this.generateSelectorSimple(l)})),o=s.map((l,u)=>`
91
- ${u+1}) ${l.preview} aka ${Jr(this._sdkLanguage,l.selector)}`);return s.length<t.length&&o.push(`
92
- ...`),this.createStacklessError(`strict mode violation: ${Jr(this._sdkLanguage,gn(e))} resolved to ${t.length} elements:${o.join("")}
93
- `)}createStacklessError(e){if(this._browserName==="firefox"){const s=new Error("Error: "+e);return s.stack="",s}const t=new Error(e);return delete t.stack,t}createHighlight(){return new Ru(this)}maskSelectors(e,t){this._highlight&&this.hideHighlight(),this._highlight=new Ru(this),this._highlight.install();const s=[];for(const o of e)s.push(this.querySelectorAll(o,this.document.documentElement));this._highlight.maskElements(s.flat(),t)}highlight(e){this._highlight||(this._highlight=new Ru(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,t){var u,f;((u=this._markedElements)==null?void 0:u.callId)!==t&&(this._markedElements=void 0);const s=((f=this._markedElements)==null?void 0:f.elements)||new Set,o=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:t,composed:!0});for(const d of s)e.has(d)||d.dispatchEvent(o);const l=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:t,composed:!0});for(const d of e)s.has(d)||d.dispatchEvent(l);this._markedElements={callId:t,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let t=!1;const s=()=>t=!0;this.window.addEventListener(e,s),new MutationObserver(o=>{if(o.some(u=>Array.from(u.addedNodes).includes(this.document.documentElement))&&(t=!1,this.window.dispatchEvent(new CustomEvent(e)),!t)){this.window.addEventListener(e,s);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=s=>{var o;return(o=this._hitTargetInterceptor)==null?void 0:o.call(this,s)},t=()=>{for(const s of KS)this.window.addEventListener(s,e,{capture:!0,passive:!1})};t(),this.onGlobalListenersRemoved.add(t)}async expect(e,t,s){return t.expression==="to.have.count"||t.expression.endsWith(".array")?this.expectArray(s,t):e?await this.expectSingleElement(e,t):!t.isNot&&t.expression==="to.be.hidden"?{matches:!0}:t.isNot&&t.expression==="to.be.visible"?{matches:!1}:!t.isNot&&t.expression==="to.be.detached"?{matches:!0}:t.isNot&&t.expression==="to.be.attached"?{matches:!1}:t.isNot&&t.expression==="to.be.in.viewport"?{matches:!1}:{matches:t.isNot,missingReceived:!0}}async expectSingleElement(e,t){var o;const s=t.expression;{let l;if(s==="to.have.attribute"){const u=e.hasAttribute(t.expressionArg);l={matches:u,received:u?"attribute present":"attribute not present"}}else if(s==="to.be.checked"){const{checked:u,indeterminate:f}=t.expectedValue;if(f){if(u!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");l=this.elementState(e,"indeterminate")}else l=this.elementState(e,u===!1?"unchecked":"checked")}else if(s==="to.be.disabled")l=this.elementState(e,"disabled");else if(s==="to.be.editable")l=this.elementState(e,"editable");else if(s==="to.be.readonly")l=this.elementState(e,"editable"),l.matches=!l.matches;else if(s==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e.value;l={matches:!u,received:u?"notEmpty":"empty"}}else{const u=(o=e.textContent)==null?void 0:o.trim();l={matches:!u,received:u?"notEmpty":"empty"}}else if(s==="to.be.enabled")l=this.elementState(e,"enabled");else if(s==="to.be.focused"){const u=this._activelyFocused(e).isFocused;l={matches:u,received:u?"focused":"inactive"}}else s==="to.be.hidden"?l=this.elementState(e,"hidden"):s==="to.be.visible"?l=this.elementState(e,"visible"):s==="to.be.attached"?l={matches:!0,received:"attached"}:s==="to.be.detached"&&(l={matches:!1,received:"attached"});if(l){if(l.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return l}}if(s==="to.have.property"){let l=e;const u=t.expressionArg.split(".");for(let p=0;p<u.length-1;p++){if(typeof l!="object"||!(u[p]in l))return{received:void 0,matches:!1};l=l[u[p]]}const f=l[u[u.length-1]],d=uc(f,t.expectedValue);return{received:f,matches:d}}if(s==="to.be.in.viewport"){const l=await this.viewportRatio(e);return{received:`viewport ratio ${l}`,matches:l>0&&l>(t.expectedNumber??0)-1e-9}}if(s==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");const l=[...e.selectedOptions].map(u=>u.value);return l.length!==t.expectedText.length?{received:l,matches:!1}:{received:l,matches:l.map((u,f)=>new Bu(t.expectedText[f]).matches(u)).every(Boolean)}}if(s==="to.match.aria"){const l=Q1(e,t.expectedValue);return{received:l.received,matches:!!l.matches.length}}{let l;if(s==="to.have.attribute.value"){const u=e.getAttribute(t.expressionArg);if(u===null)return{received:null,matches:!1};l=u}else if(s==="to.have.class")l=e.classList.toString();else if(s==="to.have.css")l=this.window.getComputedStyle(e).getPropertyValue(t.expressionArg);else if(s==="to.have.id")l=e.id;else if(s==="to.have.text")l=t.useInnerText?e.innerText:Et(new Map,e).full;else if(s==="to.have.accessible.name")l=pi(e,!1);else if(s==="to.have.accessible.description")l=Ep(e,!1);else if(s==="to.have.accessible.error.message")l=R1(e);else if(s==="to.have.role")l=Ke(e)||"";else if(s==="to.have.title")l=this.document.title;else if(s==="to.have.url")l=this.document.location.href;else if(s==="to.have.value"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"&&e.nodeName!=="SELECT")throw this.createStacklessError("Not an input element");l=e.value}if(l!==void 0&&t.expectedText){const u=new Bu(t.expectedText[0]);return{received:l,matches:u.matches(l)}}}throw this.createStacklessError("Unknown expect matcher: "+s)}expectArray(e,t){const s=t.expression;if(s==="to.have.count"){const l=e.length,u=l===t.expectedNumber;return{received:l,matches:u}}let o;if(s==="to.have.text.array"||s==="to.contain.text.array"?o=e.map(l=>t.useInnerText?l.innerText:Et(new Map,l).full):s==="to.have.class.array"&&(o=e.map(l=>l.classList.toString())),o&&t.expectedText){const l=s!=="to.contain.text.array";if(!(o.length===t.expectedText.length||!l))return{received:o,matches:!1};const f=t.expectedText.map(m=>new Bu(m));let d=0,p=0;for(;d<f.length&&p<o.length;)f[d].matches(o[p])&&++d,++p;return{received:o,matches:d===f.length}}throw this.createStacklessError("Unknown expect matcher: "+s)}}const HS=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),VS=new Set(["checked","selected","disabled","readonly","multiple"]);function Do(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}const WS=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),bm=new Set(["mousemove"]),Tm=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),Cm=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),KS=new Set([...bm,...Tm,...Cm]);function QS(n){if(n=n.substring(1,n.length-1),!n.includes("\\"))return n;const e=[];let t=0;for(;t<n.length;)n[t]==="\\"&&t+1<n.length&&t++,e.push(n[t++]);return e.join("")}function Fo(n,e){if(n[0]==="/"&&n.lastIndexOf("/")>0){const o=n.lastIndexOf("/"),l=new RegExp(n.substring(1,o),n.substring(o+1));return{matcher:u=>l.test(u.full),kind:"regex"}}const t=e?JSON.parse.bind(JSON):QS;let s=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=t(n),s=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=t(n.substring(0,n.length-1)),s=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=t(n.substring(0,n.length-1)),s=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=t(n),s=!0),n=ct(n),s?e?{kind:"strict",matcher:l=>l.normalized===n}:{matcher:l=>!n&&!l.immediate.length?!0:l.immediate.some(u=>ct(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:o=>o.normalized.toLowerCase().includes(n)})}class Bu{constructor(e){if(this._normalizeWhiteSpace=e.normalizeWhiteSpace,this._ignoreCase=e.ignoreCase,this._string=e.matchSubstring?void 0:this.normalize(e.string),this._substring=e.matchSubstring?this.normalize(e.string):void 0,e.regexSource){const t=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&t.delete("i"),e.ignoreCase===!0&&t.add("i"),this._regex=new RegExp(e.regexSource,[...t].join(""))}}matches(e){return this._regex||(e=this.normalize(e)),this._string!==void 0?e===this._string:this._substring!==void 0?e.includes(this._substring):this._regex?!!this._regex.test(e):!1}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=ct(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function uc(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(let s=0;s<n.length;++s)if(!uc(n[s],e[s]))return!1;return!0}if(n instanceof RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();const t=Object.keys(n);if(t.length!==Object.keys(e).length)return!1;for(let s=0;s<t.length;++s)if(!e.hasOwnProperty(t[s]))return!1;for(const s of t)if(!uc(n[s],e[s]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const GS={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-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"}}]}]}]};class $p{cursor(){return"default"}}class zu{constructor(e,t){this._hoveredModel=null,this._hoveredElement=null,this._hoveredSelectors=null,this._recorder=e,this._assertVisibility=t}cursor(){return"pointer"}cleanup(){this._hoveredModel=null,this._hoveredElement=null,this._hoveredSelectors=null}onClick(e){var t;Ae(e),e.button===0&&(t=this._hoveredModel)!=null&&t.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onContextMenu(e){if(this._hoveredModel&&!this._hoveredModel.tooltipListItemSelected&&this._hoveredSelectors&&this._hoveredSelectors.length>1){Ae(e);const t=this._hoveredSelectors,s=this._hoveredModel;this._hoveredModel.tooltipFooter=void 0,this._hoveredModel.tooltipList=t.map(o=>this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o)),this._hoveredModel.tooltipListItemSelected=o=>{o===void 0?this._reset(!0):this._commit(t[o],s)},this._recorder.updateHighlight(this._hoveredModel,!0)}}onPointerDown(e){Ae(e)}onPointerUp(e){Ae(e)}onMouseDown(e){Ae(e)}onMouseUp(e){Ae(e)}onMouseMove(e){var l;Ae(e);let t=this._recorder.deepEventTarget(e);if(t.isConnected||(t=null),this._hoveredElement===t)return;this._hoveredElement=t;let s=null,o=[];if(this._hoveredElement){const u=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});o=u.selectors,s={selector:u.selector,elements:u.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,u.selector),tooltipFooter:o.length>1?"Click to select, right-click for more options":void 0,color:this._assertVisibility?"#8acae480":void 0}}((l=this._hoveredModel)==null?void 0:l.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._hoveredSelectors=o,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){Ae(e)}onMouseLeave(e){Ae(e);const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){var t;Ae(e),e.key==="Escape"&&((t=this._hoveredModel)!=null&&t.tooltipListItemSelected?this._reset(!0):this._assertVisibility&&this._recorder.setMode("recording"))}onKeyUp(e){Ae(e)}onScroll(e){this._reset(!1)}_commit(e,t){var s;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(s=this._recorder.overlay)==null||s.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,t)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._hoveredSelectors=null,this._recorder.updateHighlight(null,e)}}class JS{constructor(e){this._performingActions=new Set,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._recorder=e}cursor(){return"pointer"}cleanup(){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1}onClick(e){if(Wu(this._hoveredElement)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;const t=Vu(this._recorder.deepEventTarget(e));if(t){this._performAction({name:t.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:Hu(e),signals:[],button:Mp(e),modifiers:qu(e),clickCount:e.detail},timeout:this._recorder.injectedScript.builtinSetTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){Wu(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Hu(e),signals:[],button:Mp(e),modifiers:qu(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._performAction({name:"click",selector:this._hoveredModel.selector,position:Hu(e),signals:[],button:"right",modifiers:0,clickCount:0})}onPointerDown(e){this._shouldIgnoreMouseEvent(e)||this._performingActions.size||Ae(e)}onPointerUp(e){this._shouldIgnoreMouseEvent(e)||this._performingActions.size||Ae(e)}onMouseDown(e){this._shouldIgnoreMouseEvent(e)||(this._performingActions.size||Ae(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._shouldIgnoreMouseEvent(e)||this._performingActions.size||Ae(e)}onMouseMove(e){const t=this._recorder.deepEventTarget(e);this._hoveredElement!==t&&(this._hoveredElement=t,this._updateModelForHoveredElement())}onMouseLeave(e){const t=this._recorder.injectedScript.window;t.top!==t&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._onFocus(!0)}onInput(e){const t=this._recorder.deepEventTarget(e);if(t.nodeName==="INPUT"&&t.type.toLowerCase()==="file"){this._recorder.recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...t.files||[]].map(s=>s.name)});return}if(Wu(t)){this._recorder.recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:t.value});return}if(["INPUT","TEXTAREA"].includes(t.nodeName)||t.isContentEditable){if(t.nodeName==="INPUT"&&["checkbox","radio"].includes(t.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recorder.recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:t.isContentEditable?t.innerText:t.value})}if(t.nodeName==="SELECT"){const s=t;if(this._actionInProgress(e))return;this._performAction({name:"select",selector:this._activeModel.selector,options:[...s.selectedOptions].map(o=>o.value),signals:[]})}}onKeyDown(e){if(this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const t=Vu(this._recorder.deepEventTarget(e));if(t){this._performAction({name:t.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:qu(e)})}}}onKeyUp(e){if(this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Ae(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._hoveredModel=null,this._hoveredElement=null,this._recorder.updateHighlight(null,!1)}_onFocus(e){const t=e_(this._recorder.document);if(e&&t===this._recorder.document.body)return;const s=t?this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=s&&s.selector?s:null,e&&(this._hoveredElement=t,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const t=this._recorder.deepEventTarget(e),s=t.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(t.type))}_actionInProgress(e){const t=e instanceof KeyboardEvent,s=e instanceof MouseEvent||e instanceof PointerEvent;for(const o of this._performingActions)if(t&&o.name==="press"&&e.key===o.key||s&&(o.name==="click"||o.name==="check"||o.name==="uncheck"))return!0;return Ae(e),!1}_consumedDueToNoModel(e,t){return t?!1:(Ae(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Ae(e),!0)}_performAction(e){this._hoveredElement=null,this._hoveredModel=null,this._activeModel=null,this._recorder.updateHighlight(null,!1),this._performingActions.add(e),this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1),this._recorder.injectedScript.isUnderTest&&console.error("Action performed for test: "+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))})}_shouldGenerateKeyPressFor(e){if(e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const t=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!t?!!Vu(this._recorder.deepEventTarget(e)):!0}_updateModelForHoveredElement(){if(this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._recorder.updateHighlight(null,!0);return}const{selector:e,elements:t}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:t,color:"#dc6f6f7f"}:null,this._recorder.updateHighlight(this._hoveredModel,!0))}}class Uu{constructor(e,t){this._hoverHighlight=null,this._action=null,this._textCache=new Map,this._recorder=e,this._kind=t,this._dialog=new ZS(e)}cursor(){return"pointer"}cleanup(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Ae(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const t=this._recorder.deepEventTarget(e);this._elementHasValue(t)&&e.preventDefault()}onPointerUp(e){var s;const t=(s=this._hoverHighlight)==null?void 0:s.elements[0];this._kind==="value"&&t&&(t.nodeName==="INPUT"||t.nodeName==="SELECT")&&t.disabled&&this._commitAssertValue()}onMouseMove(e){var s;if(this._dialog.isShowing())return;const t=this._recorder.deepEventTarget(e);((s=this._hoverHighlight)==null?void 0:s.elements[0])!==t&&(this._kind==="text"||this._kind==="snapshot"?this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,t).full?{elements:[t],selector:""}:null:this._hoverHighlight=this._elementHasValue(t)?this._recorder.injectedScript.generateSelector(t,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null,this._hoverHighlight&&(this._hoverHighlight.color="#8acae480"),this._recorder.updateHighlight(this._hoverHighlight,!0))}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Ae(e)}onScroll(e){this._recorder.updateHighlight(this._hoverHighlight,!1)}_elementHasValue(e){return e.nodeName==="TEXTAREA"||e.nodeName==="SELECT"||e.nodeName==="INPUT"&&!["button","image","reset","submit"].includes(e.type)}_generateAction(){var t;this._textCache.clear();const e=(t=this._hoverHighlight)==null?void 0:t.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:s}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:s,signals:[],checked:!e.checked}:{name:"assertValue",selector:s,signals:[],value:e.value}}else return this._kind==="snapshot"?(this._hoverHighlight=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0}),this._hoverHighlight.color="#8acae480",this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],snapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"regex"})}):(this._hoverHighlight=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0}),this._hoverHighlight.color="#8acae480",this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertText",selector:this._hoverHighlight.selector,signals:[],text:this._recorder.injectedScript.utils.elementText(this._textCache,e).normalized,substring:!0})}_renderValue(e){return(e==null?void 0:e.name)==="assertText"?this._recorder.injectedScript.utils.normalizeWhiteSpace(e.text):(e==null?void 0:e.name)==="assertChecked"?String(e.checked):(e==null?void 0:e.name)==="assertValue"?e.value:(e==null?void 0:e.name)==="assertSnapshot"?e.snapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"))}_showDialog(){var e,t,s,o;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((t=this._action)==null?void 0:t.name)==="assertText"?this._showTextDialog(this._action):((s=this._action)==null?void 0:s.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(o=this._recorder.overlay)==null||o.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const t=this._recorder.document.createElement("textarea");t.setAttribute("spellcheck","false"),t.value=this._renderValue(e),t.classList.add("text-editor");const s=()=>{var y;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(t.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=f;const p=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,m=f&&p.includes(f);t.classList.toggle("does-not-match",!m)};t.addEventListener("input",s);const l=this._dialog.show({label:"Assert that element contains text",body:t,onCommit:()=>this._commit()}),u=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),l);this._dialog.moveTo(u.anchorTop,u.anchorLeft),t.focus()}_commitAssertValue(){var t;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(t=this._recorder.overlay)==null||t.flashToolSucceeded("assertingValue"))}}class YS{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const t=this._recorder.document;this._overlayElement=t.createElement("x-pw-overlay");const s=t.createElement("x-pw-tools-list");this._overlayElement.appendChild(s),this._dragHandle=t.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(t.createElement("x-div")),s.appendChild(this._dragHandle),this._recordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._recordToggle.title="Record",this._recordToggle.classList.add("record"),this._recordToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._recordToggle),this._pickLocatorToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pickLocatorToggle.title="Pick locator",this._pickLocatorToggle.classList.add("pick-locator"),this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._pickLocatorToggle),this._assertVisibilityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVisibilityToggle.title="Assert visibility",this._assertVisibilityToggle.classList.add("visibility"),this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertVisibilityToggle),this._assertTextToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertTextToggle.title="Assert text",this._assertTextToggle.classList.add("text"),this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertTextToggle),this._assertValuesToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertValuesToggle.title="Assert value",this._assertValuesToggle.classList.add("value"),this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertValuesToggle),this._assertSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertSnapshotToggle.title="Assert snapshot",this._assertSnapshotToggle.classList.add("snapshot"),this._assertSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),s.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){Nm(this._listeners),this._listeners=[Ne(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),Ne(this._recordToggle,"click",()=>{this._recordToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="none"||this._recorder.state.mode==="standby"||this._recorder.state.mode==="inspecting"?"recording":"standby")}),Ne(this._pickLocatorToggle,"click",()=>{if(this._pickLocatorToggle.classList.contains("disabled"))return;const e={inspecting:"standby",none:"inspecting",standby:"inspecting",recording:"recording-inspecting","recording-inspecting":"recording",assertingText:"recording-inspecting",assertingVisibility:"recording-inspecting",assertingValue:"recording-inspecting",assertingSnapshot:"recording-inspecting"};this._recorder.setMode(e[this._recorder.state.mode])}),Ne(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),Ne(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),Ne(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),Ne(this._assertSnapshotToggle,"click",()=>{this._assertSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingSnapshot"?"recording":"assertingSnapshot")})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition()}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){this._recordToggle.classList.toggle("toggled",e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting"),this._pickLocatorToggle.classList.toggle("toggled",e.mode==="inspecting"||e.mode==="recording-inspecting"),this._assertVisibilityToggle.classList.toggle("toggled",e.mode==="assertingVisibility"),this._assertVisibilityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertTextToggle.classList.toggle("toggled",e.mode==="assertingText"),this._assertTextToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertValuesToggle.classList.toggle("toggled",e.mode==="assertingValue"),this._assertValuesToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertSnapshotToggle.classList.toggle("toggled",e.mode==="assertingSnapshot"),this._assertSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode==="none"?this._hideOverlay():this._showOverlay()}flashToolSucceeded(e){let t;e==="assertingVisibility"?t=this._assertVisibilityToggle:e==="assertingSnapshot"?t=this._assertSnapshotToggle:t=this._assertValuesToggle,t.classList.add("succeeded"),this._recorder.injectedScript.builtinSetTimeout(()=>t.classList.remove("succeeded"),2e3)}_hideOverlay(){this._overlayElement.setAttribute("hidden","true")}_showOverlay(){this._overlayElement.hasAttribute("hidden")&&(this._overlayElement.removeAttribute("hidden"),this._updateVisualPosition())}_updateVisualPosition(){this._measure=this._overlayElement.getBoundingClientRect(),this._overlayElement.style.left=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2+this._offsetX+"px"}onMouseMove(e){if(!e.buttons)return this._dragState=void 0,!1;if(this._dragState){this._offsetX=this._dragState.offsetX+e.clientX-this._dragState.dragStart.x;const t=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-t,Math.min(t,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Ae(e),!0}return!1}onMouseUp(e){return this._dragState?(Ae(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Ae(e),!0):!1}onDblClick(e){return!1}}class XS{constructor(e){this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.state={mode:"none",testIdAttributeName:"data-testid",language:"javascript",overlay:{offsetX:0}},this._delegate={},this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._tools={none:new $p,standby:new $p,inspecting:new zu(this,!1),recording:new JS(this),"recording-inspecting":new zu(this,!1),assertingText:new Uu(this,"text"),assertingVisibility:new zu(this,!0),assertingValue:new Uu(this,"value"),assertingSnapshot:new Uu(this,"snapshot")},this._currentTool=this._tools.none,e.window.top===e.window&&(this.overlay=new YS(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
94
- body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
95
- body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
96
- `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test")}installListeners(){var s;Nm(this._listeners),this._listeners=[Ne(this.document,"click",o=>this._onClick(o),!0),Ne(this.document,"auxclick",o=>this._onClick(o),!0),Ne(this.document,"dblclick",o=>this._onDblClick(o),!0),Ne(this.document,"contextmenu",o=>this._onContextMenu(o),!0),Ne(this.document,"dragstart",o=>this._onDragStart(o),!0),Ne(this.document,"input",o=>this._onInput(o),!0),Ne(this.document,"keydown",o=>this._onKeyDown(o),!0),Ne(this.document,"keyup",o=>this._onKeyUp(o),!0),Ne(this.document,"pointerdown",o=>this._onPointerDown(o),!0),Ne(this.document,"pointerup",o=>this._onPointerUp(o),!0),Ne(this.document,"mousedown",o=>this._onMouseDown(o),!0),Ne(this.document,"mouseup",o=>this._onMouseUp(o),!0),Ne(this.document,"mousemove",o=>this._onMouseMove(o),!0),Ne(this.document,"mouseleave",o=>this._onMouseLeave(o),!0),Ne(this.document,"mouseenter",o=>this._onMouseEnter(o),!0),Ne(this.document,"focus",o=>this._onFocus(o),!0),Ne(this.document,"scroll",o=>this._onScroll(o),!0)],this.highlight.install();let e;const t=()=>{this.highlight.install(),e=this.injectedScript.builtinSetTimeout(t,500)};e=this.injectedScript.builtinSetTimeout(t,500),this._listeners.push(()=>this.injectedScript.builtinClearTimeout(e)),this.highlight.appendChild(Am(this.document,GS)),(s=this.overlay)==null||s.install(),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var t,s,o;const e=this._tools[this.state.mode];e!==this._currentTool&&((s=(t=this._currentTool).cleanup)==null||s.call(t),this.clearHighlight(),this._currentTool=e,(o=this.injectedScript.document.body)==null||o.setAttribute("data-pw-cursor",e.cursor()))}setUIState(e,t){var l;this._delegate=t,e.actionPoint&&this.state.actionPoint&&e.actionPoint.x===this.state.actionPoint.x&&e.actionPoint.y===this.state.actionPoint.y||!e.actionPoint&&!this.state.actionPoint||(e.actionPoint?this.highlight.showActionPoint(e.actionPoint.x,e.actionPoint.y):this.highlight.hideActionPoint()),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(l=this.overlay)==null||l.setUIState(e);let s="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?t_(this.injectedScript,e.actionSelector,this.document):null;s=u!=null&&u.elements.length?u:"clear",this._lastHighlightedSelector=u!=null&&u.elements.length?e.actionSelector:void 0}const o=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==o){const u=e.ariaTemplate?this.injectedScript.getAllByAria(this.document,e.ariaTemplate):[];u.length?(s={elements:u},this._lastHighlightedAriaTemplateJSON=o):(this._lastHighlightedSelector||(s="clear"),this._lastHighlightedAriaTemplateJSON="undefined")}s==="clear"?this.clearHighlight():s!=="noop"&&this._updateHighlight(s,!1)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var t,s,o;e.isTrusted&&((t=this.overlay)!=null&&t.onClick(e)||this._ignoreOverlayEvent(e)||(o=(s=this._currentTool).onClick)==null||o.call(s,e))}_onDblClick(e){var t,s,o;e.isTrusted&&((t=this.overlay)!=null&&t.onDblClick(e)||this._ignoreOverlayEvent(e)||(o=(s=this._currentTool).onDblClick)==null||o.call(s,e))}_onContextMenu(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onContextMenu)==null||s.call(t,e))}_onDragStart(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onDragStart)==null||s.call(t,e))}_onPointerDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onPointerDown)==null||s.call(t,e))}_onPointerUp(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onPointerUp)==null||s.call(t,e))}_onMouseDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseDown)==null||s.call(t,e))}_onMouseUp(e){var t,s,o;e.isTrusted&&((t=this.overlay)!=null&&t.onMouseUp(e)||this._ignoreOverlayEvent(e)||(o=(s=this._currentTool).onMouseUp)==null||o.call(s,e))}_onMouseMove(e){var t,s,o;e.isTrusted&&((t=this.overlay)!=null&&t.onMouseMove(e)||this._ignoreOverlayEvent(e)||(o=(s=this._currentTool).onMouseMove)==null||o.call(s,e))}_onMouseEnter(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseEnter)==null||s.call(t,e))}_onMouseLeave(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onMouseLeave)==null||s.call(t,e))}_onFocus(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onFocus)==null||s.call(t,e))}_onScroll(e){var t,s;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(s=(t=this._currentTool).onScroll)==null||s.call(t,e))}_onInput(e){var t,s;this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onInput)==null||s.call(t,e)}_onKeyDown(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onKeyDown)==null||s.call(t,e))}_onKeyUp(e){var t,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(t=this._currentTool).onKeyUp)==null||s.call(t,e))}updateHighlight(e,t){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,t)}_updateHighlight(e,t){var o,l;let s=e==null?void 0:e.tooltipText;s===void 0&&!(e!=null&&e.tooltipList)&&(e!=null&&e.selector)&&(s=this.injectedScript.utils.asLocator(this.state.language,e.selector)),this.highlight.updateHighlight((e==null?void 0:e.elements)||[],{...e,tooltipText:s}),t&&((l=(o=this._delegate).highlightUpdated)==null||l.call(o))}_ignoreOverlayEvent(e){return e.composedPath().some(t=>(t.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var t;for(const s of e.composedPath())if(!((t=this.overlay)!=null&&t.contains(s)))return s;return e.composedPath()[0]}setMode(e){var t,s;(s=(t=this._delegate).setMode)==null||s.call(t,e)}async performAction(e){var t,s;await((s=(t=this._delegate).performAction)==null?void 0:s.call(t,e).catch(()=>{}))}recordAction(e){var t,s;(s=(t=this._delegate).recordAction)==null||s.call(t,e)}setOverlayState(e){var t,s;(s=(t=this._delegate).setOverlayState)==null||s.call(t,e)}elementPicked(e,t){var o,l;const s=this.injectedScript.ariaSnapshot(t.elements[0]);(l=(o=this._delegate).elementPicked)==null||l.call(o,{selector:e,ariaSnapshot:s})}}class ZS{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const t=this._recorder.document.createElement("x-pw-tool-item");t.title="Accept",t.classList.add("accept"),t.appendChild(this._recorder.document.createElement("x-div")),t.addEventListener("click",()=>e.onCommit());const s=this._recorder.document.createElement("x-pw-tool-item");s.title="Close",s.classList.add("cancel"),s.appendChild(this._recorder.document.createElement("x-div")),s.addEventListener("click",()=>{var f;this.close(),(f=e.onCancel)==null||f.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),this._keyboardListener=f=>{var d;if(f.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._recorder.document.addEventListener("keydown",this._keyboardListener,!0);const o=this._recorder.document.createElement("x-pw-tools-list"),l=this._recorder.document.createElement("label");l.textContent=e.label,o.appendChild(l),o.appendChild(this._recorder.document.createElement("x-spacer")),o.appendChild(t),o.appendChild(s),this._dialogElement.appendChild(o);const u=this._recorder.document.createElement("x-pw-dialog-body");return u.appendChild(e.body),this._dialogElement.appendChild(u),this._recorder.highlight.appendChild(this._dialogElement),this._dialogElement}moveTo(e,t){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=t+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}}function e_(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function qu(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function Mp(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Hu(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function Ae(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function Vu(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function Wu(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}function Ne(n,e,t,s){return n.addEventListener(e,t,s),()=>{n.removeEventListener(e,t,s)}}function Nm(n){for(const e of n)e();n.splice(0,n.length)}function t_(n,e,t){try{const s=n.parseSelector(e);return{selector:e,elements:n.querySelectorAll(s,t)}}catch{return{selector:e,elements:[]}}}function Am(n,{tagName:e,attrs:t,children:s}){const o=n.createElementNS("http://www.w3.org/2000/svg",e);if(t)for(const[l,u]of Object.entries(t))o.setAttribute(l,u);if(s)for(const l of s)o.appendChild(Am(n,l));return o}function jc(n,e,t){return`internal:attr=[${n}=${at(e,(t==null?void 0:t.exact)||!1)}]`}function n_(n,e){return`internal:testid=[${n}=${at(e,!0)}]`}function r_(n,e){return"internal:label="+St(n,!!(e!=null&&e.exact))}function s_(n,e){return jc("alt",n,e)}function i_(n,e){return jc("title",n,e)}function o_(n,e){return jc("placeholder",n,e)}function l_(n,e){return"internal:text="+St(n,!!(e!=null&&e.exact))}function a_(n,e={}){const t=[];return e.checked!==void 0&&t.push(["checked",String(e.checked)]),e.disabled!==void 0&&t.push(["disabled",String(e.disabled)]),e.selected!==void 0&&t.push(["selected",String(e.selected)]),e.expanded!==void 0&&t.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&t.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&t.push(["level",String(e.level)]),e.name!==void 0&&t.push(["name",at(e.name,!!e.exact)]),e.pressed!==void 0&&t.push(["pressed",String(e.pressed)]),`internal:role=${n}${t.map(([s,o])=>`[${s}=${o}]`).join("")}`}const ni=Symbol("selector"),u_=class li{constructor(e,t,s){if(s!=null&&s.hasText&&(t+=` >> internal:has-text=${St(s.hasText,!1)}`),s!=null&&s.hasNotText&&(t+=` >> internal:has-not-text=${St(s.hasNotText,!1)}`),s!=null&&s.has&&(t+=" >> internal:has="+JSON.stringify(s.has[ni])),s!=null&&s.hasNot&&(t+=" >> internal:has-not="+JSON.stringify(s.hasNot[ni])),(s==null?void 0:s.visible)!==void 0&&(t+=` >> visible=${s.visible?"true":"false"}`),this[ni]=t,t){const u=e.parseSelector(t);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const o=t,l=this;l.locator=(u,f)=>new li(e,o?o+" >> "+u:u,f),l.getByTestId=u=>l.locator(n_(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),l.getByAltText=(u,f)=>l.locator(s_(u,f)),l.getByLabel=(u,f)=>l.locator(r_(u,f)),l.getByPlaceholder=(u,f)=>l.locator(o_(u,f)),l.getByText=(u,f)=>l.locator(l_(u,f)),l.getByTitle=(u,f)=>l.locator(i_(u,f)),l.getByRole=(u,f={})=>l.locator(a_(u,f)),l.filter=u=>new li(e,t,u),l.first=()=>l.locator("nth=0"),l.last=()=>l.locator("nth=-1"),l.nth=u=>l.locator(`nth=${u}`),l.and=u=>new li(e,o+" >> internal:and="+JSON.stringify(u[ni])),l.or=u=>new li(e,o+" >> internal:or="+JSON.stringify(u[ni]))}};let c_=u_;class f_{constructor(e){this._injectedScript=e,!this._injectedScript.window.playwright&&(this._injectedScript.window.playwright={$:(t,s)=>this._querySelector(t,!!s),$$:t=>this._querySelectorAll(t),inspect:t=>this._inspect(t),selector:t=>this._selector(t),generateLocator:(t,s)=>this._generateLocator(t,s),ariaSnapshot:(t,s)=>this._injectedScript.ariaSnapshot(t||this._injectedScript.document.body,s),resume:()=>this._resume(),...new c_(e,"")},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.first,delete this._injectedScript.window.playwright.last,delete this._injectedScript.window.playwright.nth,delete this._injectedScript.window.playwright.and,delete this._injectedScript.window.playwright.or)}_querySelector(e,t){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const s=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(s,this._injectedScript.document,t)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const t=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(t,this._injectedScript.document)}_inspect(e){if(typeof e!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(e,!1))}_selector(e){if(!(e instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(e)}_generateLocator(e,t){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const s=this._injectedScript.generateSelectorSimple(e);return Jr(t||"javascript",s)}_resume(){this._injectedScript.window.__pw_resume().catch(()=>{})}}function d_(n,e){n=n.replace(/AriaRole\s*\.\s*([\w]+)/g,(l,u)=>u.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(l,u,f)=>`${u}(${f.toLowerCase()}`);const t=[];let s="";for(let l=0;l<n.length;++l){const u=n[l];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){s+=u;continue}const f=n[l-1]==="r"||n[l]==="/";++l;let d="";for(;l<n.length;){if(n[l]==="\\"){f?(n[l+1]!==u&&(d+=n[l]),++l,d+=n[l]):(++l,n[l]==="n"?d+=`
97
- `:n[l]==="r"?d+="\r":n[l]==="t"?d+=" ":d+=n[l]),++l;continue}if(n[l]!==u){d+=n[l++];continue}break}t.push({quote:u,text:d}),s+=(u==="/"?"r":"")+"$"+t.length}s=s.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const o=t.map(l=>l.quote).filter(l=>"'\"`".includes(l))[0];return{selector:Lm(s,t,e),preferredQuote:o}}function Pp(n){return[...n.matchAll(/\$\d+/g)].length}function Rp(n,e){return n.replace(/\$(\d+)/g,(t,s)=>`$${s-e}`)}function Lm(n,e,t){for(;;){const o=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!o)break;const l=o.index+o[0].length;let u=0,f=l;for(;f<n.length&&(n[f]==="("?u++:n[f]===")"&&u--,!(u<0));f++);let d=n.substring(0,l),p=0;["sethas(","sethasnot("].includes(o[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=Pp(n.substring(0,l)),y=Rp(n.substring(l,f),m),v=Pp(y),S=e.slice(m,m+v),x=JSON.stringify(Lm(y,S,t));n=d.replace(/=$/,"2=")+`$${m+1}`+Rp(n.substring(f+p),v-1);const _=e.slice(0,m),E=e.slice(m+v);e=_.concat([{quote:'"',text:x}]).concat(E)}n=n.replace(/\,set([\w]+)\(([^)]+)\)/g,(o,l,u)=>","+l.toLowerCase()+"="+u.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${t}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const s=n.split(".");for(let o=0;o<s.length-1;o++)if(s[o]==="internal:control=enter-frame"&&s[o+1].startsWith("nth=")){const[l]=s.splice(o,1);s.splice(o+1,0,l)}return s.map(o=>!o.startsWith("internal:")||o==="internal:control"?o.replace(/\$(\d+)/g,(l,u)=>e[+u-1].text):(o=o.includes("[")?o.replace(/\]/,"")+"]":o,o=o.replace(/(?:r)\$(\d+)(i)?/g,(l,u,f)=>{const d=e[+u-1];return o.startsWith("internal:attr")||o.startsWith("internal:testid")||o.startsWith("internal:role")?at(new RegExp(d.text),!1)+(f||""):St(new RegExp(d.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(l,u,f)=>{const d=e[+u-1];return o.startsWith("internal:has=")||o.startsWith("internal:has-not=")?d.text:o.startsWith("internal:testid")?at(d.text,!0):o.startsWith("internal:attr")||o.startsWith("internal:role")?at(d.text,f==="s"):St(d.text,f==="s")}),o)).join(" >> ")}function h_(n,e,t){try{return p_(n,e,t)}catch{return""}}function p_(n,e,t){try{return ml(e),e}catch{}const{selector:s,preferredQuote:o}=d_(e,t),l=Eg(n,s,void 0,void 0,o),u=jp(n,e);return l.some(f=>jp(n,f)===u)?s:""}function jp(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const g_=({url:n})=>C.jsxs("div",{className:"browser-frame-header",children:[C.jsxs("div",{style:{whiteSpace:"nowrap"},children:[C.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),C.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),C.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),C.jsx("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:n||"about:blank"}),C.jsx("div",{style:{marginLeft:"auto"},children:C.jsxs("div",{children:[C.jsx("span",{className:"browser-frame-menu-bar"}),C.jsx("span",{className:"browser-frame-menu-bar"}),C.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),Dc=Symbol.for("yaml.alias"),cc=Symbol.for("yaml.document"),Fn=Symbol.for("yaml.map"),Im=Symbol.for("yaml.pair"),rn=Symbol.for("yaml.scalar"),os=Symbol.for("yaml.seq"),Ft=Symbol.for("yaml.node.type"),fr=n=>!!n&&typeof n=="object"&&n[Ft]===Dc,dr=n=>!!n&&typeof n=="object"&&n[Ft]===cc,ls=n=>!!n&&typeof n=="object"&&n[Ft]===Fn,Le=n=>!!n&&typeof n=="object"&&n[Ft]===Im,ve=n=>!!n&&typeof n=="object"&&n[Ft]===rn,as=n=>!!n&&typeof n=="object"&&n[Ft]===os;function $e(n){if(n&&typeof n=="object")switch(n[Ft]){case Fn:case os:return!0}return!1}function Me(n){if(n&&typeof n=="object")switch(n[Ft]){case Dc:case Fn:case rn:case os:return!0}return!1}const m_=n=>(ve(n)||$e(n))&&!!n.anchor,_t=Symbol("break visit"),Om=Symbol("skip children"),nn=Symbol("remove node");function zn(n,e){const t=$m(e);dr(n)?Wr(null,n.contents,t,Object.freeze([n]))===nn&&(n.contents=null):Wr(null,n,t,Object.freeze([]))}zn.BREAK=_t;zn.SKIP=Om;zn.REMOVE=nn;function Wr(n,e,t,s){const o=Mm(n,e,t,s);if(Me(o)||Le(o))return Pm(n,s,o),Wr(n,o,t,s);if(typeof o!="symbol"){if($e(e)){s=Object.freeze(s.concat(e));for(let l=0;l<e.items.length;++l){const u=Wr(l,e.items[l],t,s);if(typeof u=="number")l=u-1;else{if(u===_t)return _t;u===nn&&(e.items.splice(l,1),l-=1)}}}else if(Le(e)){s=Object.freeze(s.concat(e));const l=Wr("key",e.key,t,s);if(l===_t)return _t;l===nn&&(e.key=null);const u=Wr("value",e.value,t,s);if(u===_t)return _t;u===nn&&(e.value=null)}}return o}async function _l(n,e){const t=$m(e);dr(n)?await Kr(null,n.contents,t,Object.freeze([n]))===nn&&(n.contents=null):await Kr(null,n,t,Object.freeze([]))}_l.BREAK=_t;_l.SKIP=Om;_l.REMOVE=nn;async function Kr(n,e,t,s){const o=await Mm(n,e,t,s);if(Me(o)||Le(o))return Pm(n,s,o),Kr(n,o,t,s);if(typeof o!="symbol"){if($e(e)){s=Object.freeze(s.concat(e));for(let l=0;l<e.items.length;++l){const u=await Kr(l,e.items[l],t,s);if(typeof u=="number")l=u-1;else{if(u===_t)return _t;u===nn&&(e.items.splice(l,1),l-=1)}}}else if(Le(e)){s=Object.freeze(s.concat(e));const l=await Kr("key",e.key,t,s);if(l===_t)return _t;l===nn&&(e.key=null);const u=await Kr("value",e.value,t,s);if(u===_t)return _t;u===nn&&(e.value=null)}}return o}function $m(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function Mm(n,e,t,s){var o,l,u,f,d;if(typeof t=="function")return t(n,e,s);if(ls(e))return(o=t.Map)==null?void 0:o.call(t,n,e,s);if(as(e))return(l=t.Seq)==null?void 0:l.call(t,n,e,s);if(Le(e))return(u=t.Pair)==null?void 0:u.call(t,n,e,s);if(ve(e))return(f=t.Scalar)==null?void 0:f.call(t,n,e,s);if(fr(e))return(d=t.Alias)==null?void 0:d.call(t,n,e,s)}function Pm(n,e,t){const s=e[e.length-1];if($e(s))s.items[n]=t;else if(Le(s))n==="key"?s.key=t:s.value=t;else if(dr(s))s.contents=t;else{const o=fr(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const y_={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},w_=n=>n.replace(/[!,[\]{}]/g,e=>y_[e]);class lt{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},lt.defaultYaml,e),this.tags=Object.assign({},lt.defaultTags,t)}clone(){const e=new lt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new lt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:lt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},lt.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:lt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},lt.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),o=s.shift();switch(o){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[l,u]=s;return this.tags[l]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[l]=s;if(l==="1.1"||l==="1.2")return this.yaml.version=l,!0;{const u=/^\d+\.\d+$/.test(l);return t(6,`Unsupported YAML version ${l}`,u),!1}}default:return t(0,`Unknown directive ${o}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const u=e.slice(2,-1);return u==="!"||u==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),u)}const[,s,o]=e.match(/^(.*!)([^!]*)$/s);o||t(`The ${e} tag has no suffix`);const l=this.tags[s];if(l)try{return l+decodeURIComponent(o)}catch(u){return t(String(u)),null}return s==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,s]of Object.entries(this.tags))if(e.startsWith(s))return t+w_(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let o;if(e&&s.length>0&&Me(e.contents)){const l={};zn(e.contents,(u,f)=>{Me(f)&&f.tag&&(l[f.tag]=!0)}),o=Object.keys(l)}else o=[];for(const[l,u]of s)l==="!!"&&u==="tag:yaml.org,2002:"||(!e||o.some(f=>f.startsWith(u)))&&t.push(`%TAG ${l} ${u}`);return t.join(`
98
- `)}}lt.defaultYaml={explicit:!1,version:"1.2"};lt.defaultTags={"!!":"tag:yaml.org,2002:"};function Rm(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(t)}return!0}function jm(n){const e=new Set;return zn(n,{Value(t,s){s.anchor&&e.add(s.anchor)}}),e}function Dm(n,e){for(let t=1;;++t){const s=`${n}${t}`;if(!e.has(s))return s}}function v_(n,e){const t=[],s=new Map;let o=null;return{onAnchor:l=>{t.push(l),o||(o=jm(n));const u=Dm(e,o);return o.add(u),u},setAnchors:()=>{for(const l of t){const u=s.get(l);if(typeof u=="object"&&u.anchor&&(ve(u.node)||$e(u.node)))u.node.anchor=u.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=l,f}}},sourceObjects:s}}function Qr(n,e,t,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let o=0,l=s.length;o<l;++o){const u=s[o],f=Qr(n,s,String(o),u);f===void 0?delete s[o]:f!==u&&(s[o]=f)}else if(s instanceof Map)for(const o of Array.from(s.keys())){const l=s.get(o),u=Qr(n,s,o,l);u===void 0?s.delete(o):u!==l&&s.set(o,u)}else if(s instanceof Set)for(const o of Array.from(s)){const l=Qr(n,s,o,o);l===void 0?s.delete(o):l!==o&&(s.delete(o),s.add(l))}else for(const[o,l]of Object.entries(s)){const u=Qr(n,s,o,l);u===void 0?delete s[o]:u!==l&&(s[o]=u)}return n.call(e,t,s)}function Dt(n,e,t){if(Array.isArray(n))return n.map((s,o)=>Dt(s,String(o),t));if(n&&typeof n.toJSON=="function"){if(!t||!m_(n))return n.toJSON(e,t);const s={aliasCount:0,count:1,res:void 0};t.anchors.set(n,s),t.onCreate=l=>{s.res=l,delete t.onCreate};const o=n.toJSON(e,t);return t.onCreate&&t.onCreate(o),o}return typeof n=="bigint"&&!(t!=null&&t.keep)?Number(n):n}class Fc{constructor(e){Object.defineProperty(this,Ft,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:s,onAnchor:o,reviver:l}={}){if(!dr(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=Dt(this,"",u);if(typeof o=="function")for(const{count:d,res:p}of u.anchors.values())o(p,d);return typeof l=="function"?Qr(l,{"":f},"",f):f}}class El extends Fc{constructor(e){super(Dc),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return zn(e,{Node:(s,o)=>{if(o===this)return zn.BREAK;o.anchor===this.source&&(t=o)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:s,doc:o,maxAliasCount:l}=t,u=this.resolve(o);if(!u){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=s.get(u);if(f||(Dt(u,null,t),f=s.get(u)),!f||f.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(l>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=Xo(o,u,s)),f.count*f.aliasCount>l)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(e,t,s){const o=`*${this.source}`;if(e){if(Rm(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(e.implicitKey)return`${o} `}return o}}function Xo(n,e,t){if(fr(e)){const s=e.resolve(n),o=t&&s&&t.get(s);return o?o.count*o.aliasCount:0}else if($e(e)){let s=0;for(const o of e.items){const l=Xo(n,o,t);l>s&&(s=l)}return s}else if(Le(e)){const s=Xo(n,e.key,t),o=Xo(n,e.value,t);return Math.max(s,o)}return 1}const Fm=n=>!n||typeof n!="function"&&typeof n!="object";class oe extends Fc{constructor(e){super(rn),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Dt(this.value,e,t)}toString(){return String(this.value)}}oe.BLOCK_FOLDED="BLOCK_FOLDED";oe.BLOCK_LITERAL="BLOCK_LITERAL";oe.PLAIN="PLAIN";oe.QUOTE_DOUBLE="QUOTE_DOUBLE";oe.QUOTE_SINGLE="QUOTE_SINGLE";const S_="tag:yaml.org,2002:";function __(n,e,t){if(e){const s=t.filter(l=>l.tag===e),o=s.find(l=>!l.format)??s[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return t.find(s=>{var o;return((o=s.identify)==null?void 0:o.call(s,n))&&!s.format})}function gi(n,e,t){var y,v,S;if(dr(n)&&(n=n.contents),Me(n))return n;if(Le(n)){const x=(v=(y=t.schema[Fn]).createNode)==null?void 0:v.call(y,t.schema,null,t);return x.items.push(n),x}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:o,onTagObj:l,schema:u,sourceObjects:f}=t;let d;if(s&&n&&typeof n=="object"){if(d=f.get(n),d)return d.anchor||(d.anchor=o(n)),new El(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=S_+e.slice(2));let p=__(n,e,u.tags);if(!p){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const x=new oe(n);return d&&(d.node=x),x}p=n instanceof Map?u[Fn]:Symbol.iterator in Object(n)?u[os]:u[Fn]}l&&(l(p),delete t.onTagObj);const m=p!=null&&p.createNode?p.createNode(t.schema,n,t):typeof((S=p==null?void 0:p.nodeClass)==null?void 0:S.from)=="function"?p.nodeClass.from(t.schema,n,t):new oe(n);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function fl(n,e,t){let s=t;for(let o=e.length-1;o>=0;--o){const l=e[o];if(typeof l=="number"&&Number.isInteger(l)&&l>=0){const u=[];u[l]=s,s=u}else s=new Map([[l,s]])}return gi(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const ai=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class Bm extends Fc{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(s=>Me(s)||Le(s)?s.clone(e):s),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ai(e))this.add(t);else{const[s,...o]=e,l=this.get(s,!0);if($e(l))l.addIn(o,t);else if(l===void 0&&this.schema)this.set(s,fl(this.schema,o,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`)}}deleteIn(e){const[t,...s]=e;if(s.length===0)return this.delete(t);const o=this.get(t,!0);if($e(o))return o.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(e,t){const[s,...o]=e,l=this.get(s,!0);return o.length===0?!t&&ve(l)?l.value:l:$e(l)?l.getIn(o,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Le(t))return!1;const s=t.value;return s==null||e&&ve(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[t,...s]=e;if(s.length===0)return this.has(t);const o=this.get(t,!0);return $e(o)?o.hasIn(s):!1}setIn(e,t){const[s,...o]=e;if(o.length===0)this.set(s,t);else{const l=this.get(s,!0);if($e(l))l.setIn(o,t);else if(l===void 0&&this.schema)this.set(s,fl(this.schema,o,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${o}`)}}}const E_=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function mn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const ir=(n,e,t)=>n.endsWith(`
99
- `)?mn(t,e):t.includes(`
100
- `)?`
101
- `+mn(t,e):(n.endsWith(" ")?"":" ")+t,zm="flow",fc="block",Zo="quoted";function kl(n,e,t="flow",{indentAtStart:s,lineWidth:o=80,minContentWidth:l=20,onFold:u,onOverflow:f}={}){if(!o||o<0)return n;o<l&&(l=0);const d=Math.max(1+l,1+o-e.length);if(n.length<=d)return n;const p=[],m={};let y=o-e.length;typeof s=="number"&&(s>o-Math.max(2,l)?p.push(0):y=o-s);let v,S,x=!1,_=-1,E=-1,L=-1;t===fc&&(_=Dp(n,_,e.length),_!==-1&&(y=_+d));for(let P;P=n[_+=1];){if(t===Zo&&P==="\\"){switch(E=_,n[_+1]){case"x":_+=3;break;case"u":_+=5;break;case"U":_+=9;break;default:_+=1}L=_}if(P===`
102
- `)t===fc&&(_=Dp(n,_,e.length)),y=_+e.length+d,v=void 0;else{if(P===" "&&S&&S!==" "&&S!==`
103
- `&&S!==" "){const D=n[_+1];D&&D!==" "&&D!==`
104
- `&&D!==" "&&(v=_)}if(_>=y)if(v)p.push(v),y=v+d,v=void 0;else if(t===Zo){for(;S===" "||S===" ";)S=P,P=n[_+=1],x=!0;const D=_>L+1?_-2:E-1;if(m[D])return n;p.push(D),m[D]=!0,y=D+d,v=void 0}else x=!0}S=P}if(x&&f&&f(),p.length===0)return n;u&&u();let O=n.slice(0,p[0]);for(let P=0;P<p.length;++P){const D=p[P],V=p[P+1]||n.length;D===0?O=`
105
- ${e}${n.slice(0,V)}`:(t===Zo&&m[D]&&(O+=`${n[D]}\\`),O+=`
106
- ${e}${n.slice(D+1,V)}`)}return O}function Dp(n,e,t){let s=e,o=e+1,l=n[o];for(;l===" "||l===" ";)if(e<o+t)l=n[++e];else{do l=n[++e];while(l&&l!==`
107
- `);s=e,o=e+1,l=n[o]}return s}const xl=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),bl=n=>/^(%|---|\.\.\.)/m.test(n);function k_(n,e,t){if(!e||e<0)return!1;const s=e-t,o=n.length;if(o<=s)return!1;for(let l=0,u=0;l<o;++l)if(n[l]===`
108
- `){if(l-u>s)return!0;if(u=l+1,o-u<=s)return!1}return!0}function fi(n,e){const t=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:s}=e,o=e.options.doubleQuotedMinMultiLineLength,l=e.indent||(bl(n)?" ":"");let u="",f=0;for(let d=0,p=t[d];p;p=t[++d])if(p===" "&&t[d+1]==="\\"&&t[d+2]==="n"&&(u+=t.slice(f,d)+"\\ ",d+=1,f=d,p="\\"),p==="\\")switch(t[d+1]){case"u":{u+=t.slice(f,d);const m=t.substr(d+2,4);switch(m){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:m.substr(0,2)==="00"?u+="\\x"+m.substr(2):u+=t.substr(d,6)}d+=5,f=d+1}break;case"n":if(s||t[d+2]==='"'||t.length<o)d+=1;else{for(u+=t.slice(f,d)+`
109
-
110
- `;t[d+2]==="\\"&&t[d+3]==="n"&&t[d+4]!=='"';)u+=`
111
- `,d+=2;u+=l,t[d+2]===" "&&(u+="\\"),d+=1,f=d+1}break;default:d+=1}return u=f?u+t.slice(f):t,s?u:kl(u,l,Zo,xl(e,!1))}function dc(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
112
- `)||/[ \t]\n|\n[ \t]/.test(n))return fi(n,e);const t=e.indent||(bl(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
113
- ${t}`)+"'";return e.implicitKey?s:kl(s,t,zm,xl(e,!1))}function Gr(n,e){const{singleQuote:t}=e.options;let s;if(t===!1)s=fi;else{const o=n.includes('"'),l=n.includes("'");o&&!l?s=dc:l&&!o?s=fi:s=t?dc:fi}return s(n,e)}let hc;try{hc=new RegExp(`(^|(?<!
114
- ))
115
- +(?!
116
- |$)`,"g")}catch{hc=/\n+(?!\n|$)/g}function el({comment:n,type:e,value:t},s,o,l){const{blockQuote:u,commentString:f,lineWidth:d}=s.options;if(!u||/\n[\t ]+$/.test(t)||/^\s*$/.test(t))return Gr(t,s);const p=s.indent||(s.forceBlockIndent||bl(t)?" ":""),m=u==="literal"?!0:u==="folded"||e===oe.BLOCK_FOLDED?!1:e===oe.BLOCK_LITERAL?!0:!k_(t,d,p.length);if(!t)return m?`|
117
- `:`>
118
- `;let y,v;for(v=t.length;v>0;--v){const U=t[v-1];if(U!==`
119
- `&&U!==" "&&U!==" ")break}let S=t.substring(v);const x=S.indexOf(`
120
- `);x===-1?y="-":t===S||x!==S.length-1?(y="+",l&&l()):y="",S&&(t=t.slice(0,-S.length),S[S.length-1]===`
121
- `&&(S=S.slice(0,-1)),S=S.replace(hc,`$&${p}`));let _=!1,E,L=-1;for(E=0;E<t.length;++E){const U=t[E];if(U===" ")_=!0;else if(U===`
122
- `)L=E;else break}let O=t.substring(0,L<E?L+1:E);O&&(t=t.substring(O.length),O=O.replace(/\n+/g,`$&${p}`));let D=(m?"|":">")+(_?p?"2":"1":"")+y;if(n&&(D+=" "+f(n.replace(/ ?[\r\n]+/g," ")),o&&o()),m)return t=t.replace(/\n+/g,`$&${p}`),`${D}
123
- ${p}${O}${t}${S}`;t=t.replace(/\n+/g,`
124
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const V=kl(`${O}${t}${S}`,p,fc,xl(s,!0));return`${D}
125
- ${p}${V}`}function x_(n,e,t,s){const{type:o,value:l}=n,{actualString:u,implicitKey:f,indent:d,indentStep:p,inFlow:m}=e;if(f&&l.includes(`
126
- `)||m&&/[[\]{},]/.test(l))return Gr(l,e);if(!l||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return f||m||!l.includes(`
127
- `)?Gr(l,e):el(n,e,t,s);if(!f&&!m&&o!==oe.PLAIN&&l.includes(`
128
- `))return el(n,e,t,s);if(bl(l)){if(d==="")return e.forceBlockIndent=!0,el(n,e,t,s);if(f&&d===p)return Gr(l,e)}const y=l.replace(/\n+/g,`$&
129
- ${d}`);if(u){const v=_=>{var E;return _.default&&_.tag!=="tag:yaml.org,2002:str"&&((E=_.test)==null?void 0:E.test(y))},{compat:S,tags:x}=e.doc.schema;if(x.some(v)||S!=null&&S.some(v))return Gr(l,e)}return f?y:kl(y,d,zm,xl(e,!1))}function vi(n,e,t,s){const{implicitKey:o,inFlow:l}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==oe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=oe.QUOTE_DOUBLE);const d=m=>{switch(m){case oe.BLOCK_FOLDED:case oe.BLOCK_LITERAL:return o||l?Gr(u.value,e):el(u,e,t,s);case oe.QUOTE_DOUBLE:return fi(u.value,e);case oe.QUOTE_SINGLE:return dc(u.value,e);case oe.PLAIN:return x_(u,e,t,s);default:return null}};let p=d(f);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,v=o&&m||y;if(p=d(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function Um(n,e){const t=Object.assign({blockQuote:!0,commentString:E_,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let s;switch(t.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:s,options:t}}function b_(n,e){var o;if(e.tag){const l=n.filter(u=>u.tag===e.tag);if(l.length>0)return l.find(u=>u.format===e.format)??l[0]}let t,s;if(ve(e)){s=e.value;let l=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,s)});if(l.length>1){const u=l.filter(f=>f.test);u.length>0&&(l=u)}t=l.find(u=>u.format===e.format)??l.find(u=>!u.format)}else s=e,t=n.find(l=>l.nodeClass&&s instanceof l.nodeClass);if(!t){const l=((o=s==null?void 0:s.constructor)==null?void 0:o.name)??typeof s;throw new Error(`Tag not resolved for ${l} value`)}return t}function T_(n,e,{anchors:t,doc:s}){if(!s.directives)return"";const o=[],l=(ve(n)||$e(n))&&n.anchor;l&&Rm(l)&&(t.add(l),o.push(`&${l}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&o.push(s.directives.tagString(u)),o.join(" ")}function es(n,e,t,s){var d;if(Le(n))return n.toString(e,t,s);if(fr(n)){if(e.doc.directives)return n.toString(e);if((d=e.resolvedAliases)!=null&&d.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let o;const l=Me(n)?n:e.doc.createNode(n,{onTagObj:p=>o=p});o||(o=b_(e.doc.schema.tags,l));const u=T_(l,o,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof o.stringify=="function"?o.stringify(l,e,t,s):ve(l)?vi(l,e,t,s):l.toString(e,t,s);return u?ve(l)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
130
- ${e.indent}${f}`:f}function C_({key:n,value:e},t,s,o){const{allNullValues:l,doc:u,indent:f,indentStep:d,options:{commentString:p,indentSeq:m,simpleKeys:y}}=t;let v=Me(n)&&n.comment||null;if(y){if(v)throw new Error("With simple keys, key nodes cannot have comments");if($e(n)||!Me(n)&&typeof n=="object"){const Z="With simple keys, collection cannot be used as a key value";throw new Error(Z)}}let S=!y&&(!n||v&&e==null&&!t.inFlow||$e(n)||(ve(n)?n.type===oe.BLOCK_FOLDED||n.type===oe.BLOCK_LITERAL:typeof n=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!S&&(y||!l),indent:f+d});let x=!1,_=!1,E=es(n,t,()=>x=!0,()=>_=!0);if(!S&&!t.inFlow&&E.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");S=!0}if(t.inFlow){if(l||e==null)return x&&s&&s(),E===""?"?":S?`? ${E}`:E}else if(l&&!y||e==null&&S)return E=`? ${E}`,v&&!x?E+=ir(E,t.indent,p(v)):_&&o&&o(),E;x&&(v=null),S?(v&&(E+=ir(E,t.indent,p(v))),E=`? ${E}
131
- ${f}:`):(E=`${E}:`,v&&(E+=ir(E,t.indent,p(v))));let L,O,P;Me(e)?(L=!!e.spaceBefore,O=e.commentBefore,P=e.comment):(L=!1,O=null,P=null,e&&typeof e=="object"&&(e=u.createNode(e))),t.implicitKey=!1,!S&&!v&&ve(e)&&(t.indentAtStart=E.length+1),_=!1,!m&&d.length>=2&&!t.inFlow&&!S&&as(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let D=!1;const V=es(e,t,()=>D=!0,()=>_=!0);let U=" ";if(v||L||O){if(U=L?`
132
- `:"",O){const Z=p(O);U+=`
133
- ${mn(Z,t.indent)}`}V===""&&!t.inFlow?U===`
134
- `&&(U=`
135
-
136
- `):U+=`
137
- ${t.indent}`}else if(!S&&$e(e)){const Z=V[0],H=V.indexOf(`
138
- `),M=H!==-1,ue=t.inFlow??e.flow??e.items.length===0;if(M||!ue){let fe=!1;if(M&&(Z==="&"||Z==="!")){let R=V.indexOf(" ");Z==="&"&&R!==-1&&R<H&&V[R+1]==="!"&&(R=V.indexOf(" ",R+1)),(R===-1||H<R)&&(fe=!0)}fe||(U=`
139
- ${t.indent}`)}}else(V===""||V[0]===`
140
- `)&&(U="");return E+=U+V,t.inFlow?D&&s&&s():P&&!D?E+=ir(E,t.indent,p(P)):_&&o&&o(),E}function qm(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Bo="<<",yn={identify:n=>n===Bo||typeof n=="symbol"&&n.description===Bo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new oe(Symbol(Bo)),{addToJSMap:Hm}),stringify:()=>Bo},N_=(n,e)=>(yn.identify(e)||ve(e)&&(!e.type||e.type===oe.PLAIN)&&yn.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(t=>t.tag===yn.tag&&t.default));function Hm(n,e,t){if(t=n&&fr(t)?t.resolve(n.doc):t,as(t))for(const s of t.items)Ku(n,e,s);else if(Array.isArray(t))for(const s of t)Ku(n,e,s);else Ku(n,e,t)}function Ku(n,e,t){const s=n&&fr(t)?t.resolve(n.doc):t;if(!ls(s))throw new Error("Merge sources must be maps or map aliases");const o=s.toJSON(null,n,Map);for(const[l,u]of o)e instanceof Map?e.has(l)||e.set(l,u):e instanceof Set?e.add(l):Object.prototype.hasOwnProperty.call(e,l)||Object.defineProperty(e,l,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}function Vm(n,e,{key:t,value:s}){if(Me(t)&&t.addToJSMap)t.addToJSMap(n,e,s);else if(N_(n,t))Hm(n,e,s);else{const o=Dt(t,"",n);if(e instanceof Map)e.set(o,Dt(s,o,n));else if(e instanceof Set)e.add(o);else{const l=A_(t,o,n),u=Dt(s,l,n);l in e?Object.defineProperty(e,l,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[l]=u}}return e}function A_(n,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Me(n)&&(t!=null&&t.doc)){const s=Um(t.doc,{});s.anchors=new Set;for(const l of t.anchors.keys())s.anchors.add(l.anchor);s.inFlow=!0,s.inStringifyKey=!0;const o=n.toString(s);if(!t.mapKeyWarned){let l=JSON.stringify(o);l.length>40&&(l=l.substring(0,36)+'..."'),qm(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return o}return JSON.stringify(e)}function Bc(n,e,t){const s=gi(n,void 0,t),o=gi(e,void 0,t);return new st(s,o)}class st{constructor(e,t=null){Object.defineProperty(this,Ft,{value:Im}),this.key=e,this.value=t}clone(e){let{key:t,value:s}=this;return Me(t)&&(t=t.clone(e)),Me(s)&&(s=s.clone(e)),new st(t,s)}toJSON(e,t){const s=t!=null&&t.mapAsMap?new Map:{};return Vm(t,s,this)}toString(e,t,s){return e!=null&&e.doc?C_(this,e,t,s):JSON.stringify(this)}}function Wm(n,e,t){return(e.inFlow??n.flow?I_:L_)(n,e,t)}function L_({comment:n,items:e},t,{blockItemPrefix:s,flowChars:o,itemIndent:l,onChompKeep:u,onComment:f}){const{indent:d,options:{commentString:p}}=t,m=Object.assign({},t,{indent:l,type:null});let y=!1;const v=[];for(let x=0;x<e.length;++x){const _=e[x];let E=null;if(Me(_))!y&&_.spaceBefore&&v.push(""),dl(t,v,_.commentBefore,y),_.comment&&(E=_.comment);else if(Le(_)){const O=Me(_.key)?_.key:null;O&&(!y&&O.spaceBefore&&v.push(""),dl(t,v,O.commentBefore,y))}y=!1;let L=es(_,m,()=>E=null,()=>y=!0);E&&(L+=ir(L,l,p(E))),y&&E&&(y=!1),v.push(s+L)}let S;if(v.length===0)S=o.start+o.end;else{S=v[0];for(let x=1;x<v.length;++x){const _=v[x];S+=_?`
141
- ${d}${_}`:`
142
- `}}return n?(S+=`
143
- `+mn(p(n),d),f&&f()):y&&u&&u(),S}function I_({items:n},e,{flowChars:t,itemIndent:s}){const{indent:o,indentStep:l,flowCollectionPadding:u,options:{commentString:f}}=e;s+=l;const d=Object.assign({},e,{indent:s,inFlow:!0,type:null});let p=!1,m=0;const y=[];for(let x=0;x<n.length;++x){const _=n[x];let E=null;if(Me(_))_.spaceBefore&&y.push(""),dl(e,y,_.commentBefore,!1),_.comment&&(E=_.comment);else if(Le(_)){const O=Me(_.key)?_.key:null;O&&(O.spaceBefore&&y.push(""),dl(e,y,O.commentBefore,!1),O.comment&&(p=!0));const P=Me(_.value)?_.value:null;P?(P.comment&&(E=P.comment),P.commentBefore&&(p=!0)):_.value==null&&(O!=null&&O.comment)&&(E=O.comment)}E&&(p=!0);let L=es(_,d,()=>E=null);x<n.length-1&&(L+=","),E&&(L+=ir(L,s,f(E))),!p&&(y.length>m||L.includes(`
144
- `))&&(p=!0),y.push(L),m=y.length}const{start:v,end:S}=t;if(y.length===0)return v+S;if(!p){const x=y.reduce((_,E)=>_+E.length+2,2);p=e.options.lineWidth>0&&x>e.options.lineWidth}if(p){let x=v;for(const _ of y)x+=_?`
145
- ${l}${o}${_}`:`
146
- `;return`${x}
147
- ${o}${S}`}else return`${v}${u}${y.join(" ")}${u}${S}`}function dl({indent:n,options:{commentString:e}},t,s,o){if(s&&o&&(s=s.replace(/^\n+/,"")),s){const l=mn(e(s),n);t.push(l.trimStart())}}function or(n,e){const t=ve(e)?e.value:e;for(const s of n)if(Le(s)&&(s.key===e||s.key===t||ve(s.key)&&s.key.value===t))return s}class At extends Bm{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Fn,e),this.items=[]}static from(e,t,s){const{keepUndefined:o,replacer:l}=s,u=new this(e),f=(d,p)=>{if(typeof l=="function")p=l.call(t,d,p);else if(Array.isArray(l)&&!l.includes(d))return;(p!==void 0||o)&&u.items.push(Bc(d,p,s))};if(t instanceof Map)for(const[d,p]of t)f(d,p);else if(t&&typeof t=="object")for(const d of Object.keys(t))f(d,t[d]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,t){var u;let s;Le(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new st(e,e==null?void 0:e.value):s=new st(e.key,e.value);const o=or(this.items,s.key),l=(u=this.schema)==null?void 0:u.sortMapEntries;if(o){if(!t)throw new Error(`Key ${s.key} already set`);ve(o.value)&&Fm(s.value)?o.value.value=s.value:o.value=s.value}else if(l){const f=this.items.findIndex(d=>l(s,d)<0);f===-1?this.items.push(s):this.items.splice(f,0,s)}else this.items.push(s)}delete(e){const t=or(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const s=or(this.items,e),o=s==null?void 0:s.value;return(!t&&ve(o)?o.value:o)??void 0}has(e){return!!or(this.items,e)}set(e,t){this.add(new st(e,t),!0)}toJSON(e,t,s){const o=s?new s:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(o);for(const l of this.items)Vm(t,o,l);return o}toString(e,t,s){if(!e)return JSON.stringify(this);for(const o of this.items)if(!Le(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Wm(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:t})}}const us={collection:"map",default:!0,nodeClass:At,tag:"tag:yaml.org,2002:map",resolve(n,e){return ls(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,t)=>At.from(n,e,t)};class Un extends Bm{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(os,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=zo(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const s=zo(e);if(typeof s!="number")return;const o=this.items[s];return!t&&ve(o)?o.value:o}has(e){const t=zo(e);return typeof t=="number"&&t<this.items.length}set(e,t){const s=zo(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[s];ve(o)&&Fm(t)?o.value=t:this.items[s]=t}toJSON(e,t){const s=[];t!=null&&t.onCreate&&t.onCreate(s);let o=0;for(const l of this.items)s.push(Dt(l,String(o++),t));return s}toString(e,t,s){return e?Wm(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:t}):JSON.stringify(this)}static from(e,t,s){const{replacer:o}=s,l=new this(e);if(t&&Symbol.iterator in Object(t)){let u=0;for(let f of t){if(typeof o=="function"){const d=t instanceof Set?f:String(u++);f=o.call(t,d,f)}l.items.push(gi(f,void 0,s))}}return l}}function zo(n){let e=ve(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const cs={collection:"seq",default:!0,nodeClass:Un,tag:"tag:yaml.org,2002:seq",resolve(n,e){return as(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,t)=>Un.from(n,e,t)},Tl={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,t,s){return e=Object.assign({actualString:!0},e),vi(n,e,t,s)}},Cl={identify:n=>n==null,createNode:()=>new oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new oe(null),stringify:({source:n},e)=>typeof n=="string"&&Cl.test.test(n)?n:e.options.nullStr},zc={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new oe(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},t){if(n&&zc.test.test(n)){const s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?t.options.trueStr:t.options.falseStr}};function Jt({format:n,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);const o=typeof s=="number"?s:Number(s);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let l=JSON.stringify(s);if(!n&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let u=l.indexOf(".");u<0&&(u=l.length,l+=".");let f=e-(l.length-u-1);for(;f-- >0;)l+="0"}return l}const Km={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Jt},Qm={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():Jt(n)}},Gm={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new oe(parseFloat(n)),t=n.indexOf(".");return t!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-t-1),e},stringify:Jt},Nl=n=>typeof n=="bigint"||Number.isInteger(n),Uc=(n,e,t,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),t);function Jm(n,e,t){const{value:s}=n;return Nl(s)&&s>=0?t+s.toString(e):Jt(n)}const Ym={identify:n=>Nl(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,t)=>Uc(n,2,8,t),stringify:n=>Jm(n,8,"0o")},Xm={identify:Nl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,t)=>Uc(n,0,10,t),stringify:Jt},Zm={identify:n=>Nl(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,t)=>Uc(n,2,16,t),stringify:n=>Jm(n,16,"0x")},O_=[us,cs,Tl,Cl,zc,Ym,Xm,Zm,Km,Qm,Gm];function Fp(n){return typeof n=="bigint"||Number.isInteger(n)}const Uo=({value:n})=>JSON.stringify(n),$_=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Uo},{identify:n=>n==null,createNode:()=>new oe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Uo},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:Uo},{identify:Fp,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:t})=>t?BigInt(n):parseInt(n,10),stringify:({value:n})=>Fp(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Uo}],M_={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},P_=[us,cs].concat($_,M_),qc={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){const t=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let o=0;o<t.length;++o)s[o]=t.charCodeAt(o);return s}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:t},s,o,l){const u=t;let f;if(typeof Buffer=="function")f=u instanceof Buffer?u.toString("base64"):Buffer.from(u.buffer).toString("base64");else if(typeof btoa=="function"){let d="";for(let p=0;p<u.length;++p)d+=String.fromCharCode(u[p]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=oe.BLOCK_LITERAL),e!==oe.QUOTE_DOUBLE){const d=Math.max(s.options.lineWidth-s.indent.length,s.options.minContentWidth),p=Math.ceil(f.length/d),m=new Array(p);for(let y=0,v=0;y<p;++y,v+=d)m[y]=f.substr(v,d);f=m.join(e===oe.BLOCK_LITERAL?`
148
- `:" ")}return vi({comment:n,type:e,value:f},s,o,l)}};function ey(n,e){if(as(n))for(let t=0;t<n.items.length;++t){let s=n.items[t];if(!Le(s)){if(ls(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const o=s.items[0]||new st(new oe(null));if(s.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${s.commentBefore}
149
- ${o.key.commentBefore}`:s.commentBefore),s.comment){const l=o.value??o.key;l.comment=l.comment?`${s.comment}
150
- ${l.comment}`:s.comment}s=o}n.items[t]=Le(s)?s:new st(s)}}else e("Expected a sequence for this tag");return n}function ty(n,e,t){const{replacer:s}=t,o=new Un(n);o.tag="tag:yaml.org,2002:pairs";let l=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof s=="function"&&(u=s.call(e,String(l++),u));let f,d;if(Array.isArray(u))if(u.length===2)f=u[0],d=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const p=Object.keys(u);if(p.length===1)f=p[0],d=u[f];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else f=u;o.items.push(Bc(f,d,t))}return o}const Hc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ey,createNode:ty};class Xr extends Un{constructor(){super(),this.add=At.prototype.add.bind(this),this.delete=At.prototype.delete.bind(this),this.get=At.prototype.get.bind(this),this.has=At.prototype.has.bind(this),this.set=At.prototype.set.bind(this),this.tag=Xr.tag}toJSON(e,t){if(!t)return super.toJSON(e);const s=new Map;t!=null&&t.onCreate&&t.onCreate(s);for(const o of this.items){let l,u;if(Le(o)?(l=Dt(o.key,"",t),u=Dt(o.value,l,t)):l=Dt(o,"",t),s.has(l))throw new Error("Ordered maps must not include duplicate keys");s.set(l,u)}return s}static from(e,t,s){const o=ty(e,t,s),l=new this;return l.items=o.items,l}}Xr.tag="tag:yaml.org,2002:omap";const Vc={collection:"seq",identify:n=>n instanceof Map,nodeClass:Xr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const t=ey(n,e),s=[];for(const{key:o}of t.items)ve(o)&&(s.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):s.push(o.value));return Object.assign(new Xr,t)},createNode:(n,e,t)=>Xr.from(n,e,t)};function ny({value:n,source:e},t){return e&&(n?ry:sy).test.test(e)?e:n?t.options.trueStr:t.options.falseStr}const ry={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new oe(!0),stringify:ny},sy={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new oe(!1),stringify:ny},R_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Jt},j_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():Jt(n)}},D_={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new oe(parseFloat(n.replace(/_/g,""))),t=n.indexOf(".");if(t!==-1){const s=n.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:Jt},Si=n=>typeof n=="bigint"||Number.isInteger(n);function Al(n,e,t,{intAsBigInt:s}){const o=n[0];if((o==="-"||o==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(t){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const u=BigInt(n);return o==="-"?BigInt(-1)*u:u}const l=parseInt(n,t);return o==="-"?-1*l:l}function Wc(n,e,t){const{value:s}=n;if(Si(s)){const o=s.toString(e);return s<0?"-"+t+o.substr(1):t+o}return Jt(n)}const F_={identify:Si,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,t)=>Al(n,2,2,t),stringify:n=>Wc(n,2,"0b")},B_={identify:Si,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,t)=>Al(n,1,8,t),stringify:n=>Wc(n,8,"0")},z_={identify:Si,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,t)=>Al(n,0,10,t),stringify:Jt},U_={identify:Si,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,t)=>Al(n,2,16,t),stringify:n=>Wc(n,16,"0x")};class Zr extends At{constructor(e){super(e),this.tag=Zr.tag}add(e){let t;Le(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new st(e.key,null):t=new st(e,null),or(this.items,t.key)||this.items.push(t)}get(e,t){const s=or(this.items,e);return!t&&Le(s)?ve(s.key)?s.key.value:s.key:s}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const s=or(this.items,e);s&&!t?this.items.splice(this.items.indexOf(s),1):!s&&t&&this.items.push(new st(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,s);throw new Error("Set items must all have null values")}static from(e,t,s){const{replacer:o}=s,l=new this(e);if(t&&Symbol.iterator in Object(t))for(let u of t)typeof o=="function"&&(u=o.call(t,u,u)),l.items.push(Bc(u,null,s));return l}}Zr.tag="tag:yaml.org,2002:set";const Kc={collection:"map",identify:n=>n instanceof Set,nodeClass:Zr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,t)=>Zr.from(n,e,t),resolve(n,e){if(ls(n)){if(n.hasAllNullValues(!0))return Object.assign(new Zr,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function Qc(n,e){const t=n[0],s=t==="-"||t==="+"?n.substring(1):n,o=u=>e?BigInt(u):Number(u),l=s.replace(/_/g,"").split(":").reduce((u,f)=>u*o(60)+o(f),o(0));return t==="-"?o(-1)*l:l}function iy(n){let{value:e}=n,t=u=>u;if(typeof e=="bigint")t=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return Jt(n);let s="";e<0&&(s="-",e*=t(-1));const o=t(60),l=[e%o];return e<60?l.unshift(0):(e=(e-l[0])/o,l.unshift(e%o),e>=60&&(e=(e-l[0])/o,l.unshift(e))),s+l.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const oy={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:t})=>Qc(n,t),stringify:iy},ly={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>Qc(n,!1),stringify:iy},Ll={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){const e=n.match(Ll.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,s,o,l,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(t,s-1,o,l||0,u||0,f||0,d);const m=e[8];if(m&&m!=="Z"){let y=Qc(m,!1);Math.abs(y)<30&&(y*=60),p-=6e4*y}return new Date(p)},stringify:({value:n})=>n.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Bp=[us,cs,Tl,Cl,ry,sy,F_,B_,z_,U_,R_,j_,D_,qc,yn,Vc,Hc,Kc,oy,ly,Ll],zp=new Map([["core",O_],["failsafe",[us,cs,Tl]],["json",P_],["yaml11",Bp],["yaml-1.1",Bp]]),Up={binary:qc,bool:zc,float:Gm,floatExp:Qm,floatNaN:Km,floatTime:ly,int:Xm,intHex:Zm,intOct:Ym,intTime:oy,map:us,merge:yn,null:Cl,omap:Vc,pairs:Hc,seq:cs,set:Kc,timestamp:Ll},q_={"tag:yaml.org,2002:binary":qc,"tag:yaml.org,2002:merge":yn,"tag:yaml.org,2002:omap":Vc,"tag:yaml.org,2002:pairs":Hc,"tag:yaml.org,2002:set":Kc,"tag:yaml.org,2002:timestamp":Ll};function Qu(n,e,t){const s=zp.get(e);if(s&&!n)return t&&!s.includes(yn)?s.concat(yn):s.slice();let o=s;if(!o)if(Array.isArray(n))o=[];else{const l=Array.from(zp.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${l} or define customTags array`)}if(Array.isArray(n))for(const l of n)o=o.concat(l);else typeof n=="function"&&(o=n(o.slice()));return t&&(o=o.concat(yn)),o.reduce((l,u)=>{const f=typeof u=="string"?Up[u]:u;if(!f){const d=JSON.stringify(u),p=Object.keys(Up).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return l.includes(f)||l.push(f),l},[])}const H_=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class Il{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:o,schema:l,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?Qu(e,"compat"):e?Qu(null,e):null,this.name=typeof l=="string"&&l||"core",this.knownTags=o?q_:{},this.tags=Qu(t,this.name,s),this.toStringOptions=f??null,Object.defineProperty(this,Fn,{value:us}),Object.defineProperty(this,rn,{value:Tl}),Object.defineProperty(this,os,{value:cs}),this.sortMapEntries=typeof u=="function"?u:u===!0?H_:null}clone(){const e=Object.create(Il.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function V_(n,e){var d;const t=[];let s=e.directives===!0;if(e.directives!==!1&&n.directives){const p=n.directives.toString(n);p?(t.push(p),s=!0):n.directives.docStart&&(s=!0)}s&&t.push("---");const o=Um(n,e),{commentString:l}=o.options;if(n.commentBefore){t.length!==1&&t.unshift("");const p=l(n.commentBefore);t.unshift(mn(p,""))}let u=!1,f=null;if(n.contents){if(Me(n.contents)){if(n.contents.spaceBefore&&s&&t.push(""),n.contents.commentBefore){const y=l(n.contents.commentBefore);t.push(mn(y,""))}o.forceBlockIndent=!!n.comment,f=n.contents.comment}const p=f?void 0:()=>u=!0;let m=es(n.contents,o,()=>f=null,p);f&&(m+=ir(m,"",l(f))),(m[0]==="|"||m[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${m}`:t.push(m)}else t.push(es(n.contents,o));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const p=l(n.comment);p.includes(`
151
- `)?(t.push("..."),t.push(mn(p,""))):t.push(`... ${p}`)}else t.push("...");else{let p=n.comment;p&&u&&(p=p.replace(/^\n+/,"")),p&&((!u||f)&&t[t.length-1]!==""&&t.push(""),t.push(mn(l(p),"")))}return t.join(`
152
- `)+`
153
- `}class fs{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ft,{value:cc});let o=null;typeof t=="function"||Array.isArray(t)?o=t:s===void 0&&t&&(s=t,t=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=l;let{version:u}=l;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new lt({version:u}),this.setSchema(u,s),this.contents=e===void 0?null:this.createNode(e,o,s)}clone(){const e=Object.create(fs.prototype,{[Ft]:{value:cc}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Me(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){zr(this.contents)&&this.contents.add(e)}addIn(e,t){zr(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=jm(this);e.anchor=!t||s.has(t)?Dm(t||"a",s):t}return new El(e.anchor)}createNode(e,t,s){let o;if(typeof t=="function")e=t.call({"":e},"",e),o=t;else if(Array.isArray(t)){const E=O=>typeof O=="number"||O instanceof String||O instanceof Number,L=t.filter(E).map(String);L.length>0&&(t=t.concat(L)),o=t}else s===void 0&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:l,anchorPrefix:u,flow:f,keepUndefined:d,onTagObj:p,tag:m}=s??{},{onAnchor:y,setAnchors:v,sourceObjects:S}=v_(this,u||"a"),x={aliasDuplicateObjects:l??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:S},_=gi(e,m,x);return f&&$e(_)&&(_.flow=!0),v(),_}createPair(e,t,s={}){const o=this.createNode(e,null,s),l=this.createNode(t,null,s);return new st(o,l)}delete(e){return zr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return ai(e)?this.contents==null?!1:(this.contents=null,!0):zr(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return $e(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return ai(e)?!t&&ve(this.contents)?this.contents.value:this.contents:$e(this.contents)?this.contents.getIn(e,t):void 0}has(e){return $e(this.contents)?this.contents.has(e):!1}hasIn(e){return ai(e)?this.contents!==void 0:$e(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=fl(this.schema,[e],t):zr(this.contents)&&this.contents.set(e,t)}setIn(e,t){ai(e)?this.contents=t:this.contents==null?this.contents=fl(this.schema,Array.from(e),t):zr(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new lt({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new lt({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Il(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:o,onAnchor:l,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},d=Dt(this.contents,t??"",f);if(typeof l=="function")for(const{count:p,res:m}of f.anchors.values())l(m,p);return typeof u=="function"?Qr(u,{"":d},"",d):d}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return V_(this,e)}}function zr(n){if($e(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Gc extends Error{constructor(e,t,s,o){super(),this.name=e,this.code=s,this.message=o,this.pos=t}}class lr extends Gc{constructor(e,t,s){super("YAMLParseError",e,t,s)}}class ay extends Gc{constructor(e,t,s){super("YAMLWarning",e,t,s)}}const hl=(n,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(f=>e.linePos(f));const{line:s,col:o}=t.linePos[0];t.message+=` at line ${s}, column ${o}`;let l=o-1,u=n.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(l>=60&&u.length>80){const f=Math.min(l-39,u.length-79);u="…"+u.substring(f),l-=f-1}if(u.length>80&&(u=u.substring(0,79)+"…"),s>1&&/^ *$/.test(u.substring(0,l))){let f=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);f.length>80&&(f=f.substring(0,79)+`…
154
- `),u=f+u}if(/[^ ]/.test(u)){let f=1;const d=t.linePos[1];d&&d.line===s&&d.col>o&&(f=Math.max(1,Math.min(d.col-o,80-l)));const p=" ".repeat(l)+"^".repeat(f);t.message+=`:
155
-
156
- ${u}
157
- ${p}
158
- `}};function ts(n,{flow:e,indicator:t,next:s,offset:o,onError:l,parentIndent:u,startOnNewline:f}){let d=!1,p=f,m=f,y="",v="",S=!1,x=!1,_=null,E=null,L=null,O=null,P=null,D=null,V=null;for(const H of n)switch(x&&(H.type!=="space"&&H.type!=="newline"&&H.type!=="comma"&&l(H.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x=!1),_&&(p&&H.type!=="comment"&&H.type!=="newline"&&l(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),_=null),H.type){case"space":!e&&(t!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&H.source.includes(" ")&&(_=H),m=!0;break;case"comment":{m||l(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const M=H.source.substring(1)||" ";y?y+=v+M:y=M,v="",p=!1;break}case"newline":p?y?y+=H.source:d=!0:v+=H.source,p=!0,S=!0,(E||L)&&(O=H),m=!0;break;case"anchor":E&&l(H,"MULTIPLE_ANCHORS","A node can have at most one anchor"),H.source.endsWith(":")&&l(H.offset+H.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=H,V===null&&(V=H.offset),p=!1,m=!1,x=!0;break;case"tag":{L&&l(H,"MULTIPLE_TAGS","A node can have at most one tag"),L=H,V===null&&(V=H.offset),p=!1,m=!1,x=!0;break}case t:(E||L)&&l(H,"BAD_PROP_ORDER",`Anchors and tags must be after the ${H.source} indicator`),D&&l(H,"UNEXPECTED_TOKEN",`Unexpected ${H.source} in ${e??"collection"}`),D=H,p=t==="seq-item-ind"||t==="explicit-key-ind",m=!1;break;case"comma":if(e){P&&l(H,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),P=H,p=!1,m=!1;break}default:l(H,"UNEXPECTED_TOKEN",`Unexpected ${H.type} token`),p=!1,m=!1}const U=n[n.length-1],Z=U?U.offset+U.source.length:o;return x&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&l(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),_&&(p&&_.indent<=u||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&l(_,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:P,found:D,spaceBefore:d,comment:y,hasNewline:S,anchor:E,tag:L,newlineAfterProp:O,end:Z,start:V??Z}}function mi(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
159
- `))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(mi(e.key)||mi(e.value))return!0}return!1;default:return!0}}function pc(n,e,t){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&mi(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function uy(n,e,t){const{uniqueKeys:s}=n.options;if(s===!1)return!1;const o=typeof s=="function"?s:(l,u)=>l===u||ve(l)&&ve(u)&&l.value===u.value;return e.some(l=>o(l.key,t))}const qp="All mapping items must start at the same column";function W_({composeNode:n,composeEmptyNode:e},t,s,o,l){var m;const u=(l==null?void 0:l.nodeClass)??At,f=new u(t.schema);t.atRoot&&(t.atRoot=!1);let d=s.offset,p=null;for(const y of s.items){const{start:v,key:S,sep:x,value:_}=y,E=ts(v,{indicator:"explicit-key-ind",next:S??(x==null?void 0:x[0]),offset:d,onError:o,parentIndent:s.indent,startOnNewline:!0}),L=!E.found;if(L){if(S&&(S.type==="block-seq"?o(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in S&&S.indent!==s.indent&&o(d,"BAD_INDENT",qp)),!E.anchor&&!E.tag&&!x){p=E.end,E.comment&&(f.comment?f.comment+=`
160
- `+E.comment:f.comment=E.comment);continue}(E.newlineAfterProp||mi(S))&&o(S??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=E.found)==null?void 0:m.indent)!==s.indent&&o(d,"BAD_INDENT",qp);t.atKey=!0;const O=E.end,P=S?n(t,S,E,o):e(t,O,v,null,E,o);t.schema.compat&&pc(s.indent,S,o),t.atKey=!1,uy(t,f.items,P)&&o(O,"DUPLICATE_KEY","Map keys must be unique");const D=ts(x??[],{indicator:"map-value-ind",next:_,offset:P.range[2],onError:o,parentIndent:s.indent,startOnNewline:!S||S.type==="block-scalar"});if(d=D.end,D.found){L&&((_==null?void 0:_.type)==="block-map"&&!D.hasNewline&&o(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&E.start<D.found.offset-1024&&o(P.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const V=_?n(t,_,D,o):e(t,d,x,null,D,o);t.schema.compat&&pc(s.indent,_,o),d=V.range[2];const U=new st(P,V);t.options.keepSourceTokens&&(U.srcToken=y),f.items.push(U)}else{L&&o(P.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),D.comment&&(P.comment?P.comment+=`
161
- `+D.comment:P.comment=D.comment);const V=new st(P);t.options.keepSourceTokens&&(V.srcToken=y),f.items.push(V)}}return p&&p<d&&o(p,"IMPOSSIBLE","Map comment with trailing content"),f.range=[s.offset,d,p??d],f}function K_({composeNode:n,composeEmptyNode:e},t,s,o,l){const u=(l==null?void 0:l.nodeClass)??Un,f=new u(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let d=s.offset,p=null;for(const{start:m,value:y}of s.items){const v=ts(m,{indicator:"seq-item-ind",next:y,offset:d,onError:o,parentIndent:s.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||y)y&&y.type==="block-seq"?o(v.end,"BAD_INDENT","All sequence items must start at the same column"):o(d,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(f.comment=v.comment);continue}const S=y?n(t,y,v,o):e(t,v.end,m,null,v,o);t.schema.compat&&pc(s.indent,y,o),d=S.range[2],f.items.push(S)}return f.range=[s.offset,d,p??d],f}function _i(n,e,t,s){let o="";if(n){let l=!1,u="";for(const f of n){const{source:d,type:p}=f;switch(p){case"space":l=!0;break;case"comment":{t&&!l&&s(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";o?o+=u+m:o=m,u="";break}case"newline":o&&(u+=d),l=!0;break;default:s(f,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:o,offset:e}}const Gu="Block collections are not allowed within flow collections",Ju=n=>n&&(n.type==="block-map"||n.type==="block-seq");function Q_({composeNode:n,composeEmptyNode:e},t,s,o,l){const u=s.start.source==="{",f=u?"flow map":"flow sequence",d=(l==null?void 0:l.nodeClass)??(u?At:Un),p=new d(t.schema);p.flow=!0;const m=t.atRoot;m&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let y=s.offset+s.start.source.length;for(let E=0;E<s.items.length;++E){const L=s.items[E],{start:O,key:P,sep:D,value:V}=L,U=ts(O,{flow:f,indicator:"explicit-key-ind",next:P??(D==null?void 0:D[0]),offset:y,onError:o,parentIndent:s.indent,startOnNewline:!1});if(!U.found){if(!U.anchor&&!U.tag&&!D&&!V){E===0&&U.comma?o(U.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):E<s.items.length-1&&o(U.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),U.comment&&(p.comment?p.comment+=`
162
- `+U.comment:p.comment=U.comment),y=U.end;continue}!u&&t.options.strict&&mi(P)&&o(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)U.comma&&o(U.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(U.comma||o(U.start,"MISSING_CHAR",`Missing , between ${f} items`),U.comment){let Z="";e:for(const H of O)switch(H.type){case"comma":case"space":break;case"comment":Z=H.source.substring(1);break e;default:break e}if(Z){let H=p.items[p.items.length-1];Le(H)&&(H=H.value??H.key),H.comment?H.comment+=`
163
- `+Z:H.comment=Z,U.comment=U.comment.substring(Z.length+1)}}if(!u&&!D&&!U.found){const Z=V?n(t,V,U,o):e(t,U.end,D,null,U,o);p.items.push(Z),y=Z.range[2],Ju(V)&&o(Z.range,"BLOCK_IN_FLOW",Gu)}else{t.atKey=!0;const Z=U.end,H=P?n(t,P,U,o):e(t,Z,O,null,U,o);Ju(P)&&o(H.range,"BLOCK_IN_FLOW",Gu),t.atKey=!1;const M=ts(D??[],{flow:f,indicator:"map-value-ind",next:V,offset:H.range[2],onError:o,parentIndent:s.indent,startOnNewline:!1});if(M.found){if(!u&&!U.found&&t.options.strict){if(D)for(const R of D){if(R===M.found)break;if(R.type==="newline"){o(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}U.start<M.found.offset-1024&&o(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else V&&("source"in V&&V.source&&V.source[0]===":"?o(V,"MISSING_CHAR",`Missing space after : in ${f}`):o(M.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const ue=V?n(t,V,M,o):M.found?e(t,M.end,D,null,M,o):null;ue?Ju(V)&&o(ue.range,"BLOCK_IN_FLOW",Gu):M.comment&&(H.comment?H.comment+=`
164
- `+M.comment:H.comment=M.comment);const fe=new st(H,ue);if(t.options.keepSourceTokens&&(fe.srcToken=L),u){const R=p;uy(t,R.items,H)&&o(Z,"DUPLICATE_KEY","Map keys must be unique"),R.items.push(fe)}else{const R=new At(t.schema);R.flow=!0,R.items.push(fe);const ee=(ue??H).range;R.range=[H.range[0],ee[1],ee[2]],p.items.push(R)}y=ue?ue.range[2]:M.end}}const v=u?"}":"]",[S,...x]=s.end;let _=y;if(S&&S.source===v)_=S.offset+S.source.length;else{const E=f[0].toUpperCase()+f.substring(1),L=m?`${E} must end with a ${v}`:`${E} in block collection must be sufficiently indented and end with a ${v}`;o(y,m?"MISSING_CHAR":"BAD_INDENT",L),S&&S.source.length!==1&&x.unshift(S)}if(x.length>0){const E=_i(x,_,t.options.strict,o);E.comment&&(p.comment?p.comment+=`
165
- `+E.comment:p.comment=E.comment),p.range=[s.offset,_,E.offset]}else p.range=[s.offset,_,_];return p}function Yu(n,e,t,s,o,l){const u=t.type==="block-map"?W_(n,e,t,s,l):t.type==="block-seq"?K_(n,e,t,s,l):Q_(n,e,t,s,l),f=u.constructor;return o==="!"||o===f.tagName?(u.tag=f.tagName,u):(o&&(u.tag=o),u)}function G_(n,e,t,s,o){var v;const l=s.tag,u=l?e.directives.tagName(l.source,S=>o(l,"TAG_RESOLVE_FAILED",S)):null;if(t.type==="block-seq"){const{anchor:S,newlineAfterProp:x}=s,_=S&&l?S.offset>l.offset?S:l:S??l;_&&(!x||x.offset<_.offset)&&o(_,"MISSING_CHAR","Missing newline after block sequence props")}const f=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!l||!u||u==="!"||u===At.tagName&&f==="map"||u===Un.tagName&&f==="seq")return Yu(n,e,t,o,u);let d=e.schema.tags.find(S=>S.tag===u&&S.collection===f);if(!d){const S=e.schema.knownTags[u];if(S&&S.collection===f)e.schema.tags.push(Object.assign({},S,{default:!1})),d=S;else return S!=null&&S.collection?o(l,"BAD_COLLECTION_TYPE",`${S.tag} used for ${f} collection, but expects ${S.collection}`,!0):o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),Yu(n,e,t,o,u)}const p=Yu(n,e,t,o,u,d),m=((v=d.resolve)==null?void 0:v.call(d,p,S=>o(l,"TAG_RESOLVE_FAILED",S),e.options))??p,y=Me(m)?m:new oe(m);return y.range=p.range,y.tag=u,d!=null&&d.format&&(y.format=d.format),y}function cy(n,e,t){const s=e.offset,o=J_(e,n.options.strict,t);if(!o)return{value:"",type:null,comment:"",range:[s,s,s]};const l=o.mode===">"?oe.BLOCK_FOLDED:oe.BLOCK_LITERAL,u=e.source?Y_(e.source):[];let f=u.length;for(let _=u.length-1;_>=0;--_){const E=u[_][1];if(E===""||E==="\r")f=_;else break}if(f===0){const _=o.chomp==="+"&&u.length>0?`
166
- `.repeat(Math.max(1,u.length-1)):"";let E=s+o.length;return e.source&&(E+=e.source.length),{value:_,type:l,comment:o.comment,range:[s,E,E]}}let d=e.indent+o.indent,p=e.offset+o.length,m=0;for(let _=0;_<f;++_){const[E,L]=u[_];if(L===""||L==="\r")o.indent===0&&E.length>d&&(d=E.length);else{E.length<d&&t(p+E.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(d=E.length),m=_,d===0&&!n.atRoot&&t(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=E.length+L.length+1}for(let _=u.length-1;_>=f;--_)u[_][0].length>d&&(f=_+1);let y="",v="",S=!1;for(let _=0;_<m;++_)y+=u[_][0].slice(d)+`
167
- `;for(let _=m;_<f;++_){let[E,L]=u[_];p+=E.length+L.length+1;const O=L[L.length-1]==="\r";if(O&&(L=L.slice(0,-1)),L&&E.length<d){const D=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;t(p-L.length-(O?2:1),"BAD_INDENT",D),E=""}l===oe.BLOCK_LITERAL?(y+=v+E.slice(d)+L,v=`
168
- `):E.length>d||L[0]===" "?(v===" "?v=`
169
- `:!S&&v===`
170
- `&&(v=`
171
-
172
- `),y+=v+E.slice(d)+L,v=`
173
- `,S=!0):L===""?v===`
174
- `?y+=`
175
- `:v=`
176
- `:(y+=v+L,v=" ",S=!1)}switch(o.chomp){case"-":break;case"+":for(let _=f;_<u.length;++_)y+=`
177
- `+u[_][0].slice(d);y[y.length-1]!==`
178
- `&&(y+=`
179
- `);break;default:y+=`
180
- `}const x=s+o.length+e.source.length;return{value:y,type:l,comment:o.comment,range:[s,x,x]}}function J_({offset:n,props:e},t,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=e[0],l=o[0];let u=0,f="",d=-1;for(let v=1;v<o.length;++v){const S=o[v];if(!f&&(S==="-"||S==="+"))f=S;else{const x=Number(S);!u&&x?u=x:d===-1&&(d=n+v)}}d!==-1&&s(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,m="",y=o.length;for(let v=1;v<e.length;++v){const S=e[v];switch(S.type){case"space":p=!0;case"newline":y+=S.source.length;break;case"comment":t&&!p&&s(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=S.source.length,m=S.source.substring(1);break;case"error":s(S,"UNEXPECTED_TOKEN",S.message),y+=S.source.length;break;default:{const x=`Unexpected token in block scalar header: ${S.type}`;s(S,"UNEXPECTED_TOKEN",x);const _=S.source;_&&typeof _=="string"&&(y+=_.length)}}}return{mode:l,indent:u,chomp:f,comment:m,length:y}}function Y_(n){const e=n.split(/\n( *)/),t=e[0],s=t.match(/^( *)/),l=[s!=null&&s[1]?[s[1],t.slice(s[1].length)]:["",t]];for(let u=1;u<e.length;u+=2)l.push([e[u],e[u+1]]);return l}function fy(n,e,t){const{offset:s,type:o,source:l,end:u}=n;let f,d;const p=(v,S,x)=>t(s+v,S,x);switch(o){case"scalar":f=oe.PLAIN,d=X_(l,p);break;case"single-quoted-scalar":f=oe.QUOTE_SINGLE,d=Z_(l,p);break;case"double-quoted-scalar":f=oe.QUOTE_DOUBLE,d=eE(l,p);break;default:return t(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[s,s+l.length,s+l.length]}}const m=s+l.length,y=_i(u,m,e,t);return{value:d,type:f,comment:y.comment,range:[s,m,y.offset]}}function X_(n,e){let t="";switch(n[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${n[0]}`;break}case"@":case"`":{t=`reserved character ${n[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),dy(n)}function Z_(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),dy(n.slice(1,-1)).replace(/''/g,"'")}function dy(n){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
181
- `,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
182
- `,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(n);if(!s)return n;let o=s[1],l=" ",u=e.lastIndex;for(t.lastIndex=u;s=t.exec(n);)s[1]===""?l===`
183
- `?o+=l:l=`
184
- `:(o+=l+s[1],l=" "),u=t.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,s=f.exec(n),o+l+((s==null?void 0:s[1])??"")}function eE(n,e){let t="";for(let s=1;s<n.length-1;++s){const o=n[s];if(!(o==="\r"&&n[s+1]===`
185
- `))if(o===`
186
- `){const{fold:l,offset:u}=tE(n,s);t+=l,s=u}else if(o==="\\"){let l=n[++s];const u=nE[l];if(u)t+=u;else if(l===`
187
- `)for(l=n[s+1];l===" "||l===" ";)l=n[++s+1];else if(l==="\r"&&n[s+1]===`
188
- `)for(l=n[++s+1];l===" "||l===" ";)l=n[++s+1];else if(l==="x"||l==="u"||l==="U"){const f={x:2,u:4,U:8}[l];t+=rE(n,s+1,f,e),s+=f}else{const f=n.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),t+=f}}else if(o===" "||o===" "){const l=s;let u=n[s+1];for(;u===" "||u===" ";)u=n[++s+1];u!==`
189
- `&&!(u==="\r"&&n[s+2]===`
190
- `)&&(t+=s>l?n.slice(l,s+1):o)}else t+=o}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),t}function tE(n,e){let t="",s=n[e+1];for(;(s===" "||s===" "||s===`
191
- `||s==="\r")&&!(s==="\r"&&n[e+2]!==`
192
- `);)s===`
193
- `&&(t+=`
194
- `),e+=1,s=n[e+1];return t||(t=" "),{fold:t,offset:e}}const nE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
195
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function rE(n,e,t,s){const o=n.substr(e,t),u=o.length===t&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(u)){const f=n.substr(e-2,t+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function hy(n,e,t,s){const{value:o,type:l,comment:u,range:f}=e.type==="block-scalar"?cy(n,e,s):fy(e,n.options.strict,s),d=t?n.directives.tagName(t.source,y=>s(t,"TAG_RESOLVE_FAILED",y)):null;let p;n.options.stringKeys&&n.atKey?p=n.schema[rn]:d?p=sE(n.schema,o,d,t,s):e.type==="scalar"?p=iE(n,o,e,s):p=n.schema[rn];let m;try{const y=p.resolve(o,v=>s(t??e,"TAG_RESOLVE_FAILED",v),n.options);m=ve(y)?y:new oe(y)}catch(y){const v=y instanceof Error?y.message:String(y);s(t??e,"TAG_RESOLVE_FAILED",v),m=new oe(o)}return m.range=f,m.source=o,l&&(m.type=l),d&&(m.tag=d),p.format&&(m.format=p.format),u&&(m.comment=u),m}function sE(n,e,t,s,o){var f;if(t==="!")return n[rn];const l=[];for(const d of n.tags)if(!d.collection&&d.tag===t)if(d.default&&d.test)l.push(d);else return d;for(const d of l)if((f=d.test)!=null&&f.test(e))return d;const u=n.knownTags[t];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(o(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),n[rn])}function iE({atKey:n,directives:e,schema:t},s,o,l){const u=t.tags.find(f=>{var d;return(f.default===!0||n&&f.default==="key")&&((d=f.test)==null?void 0:d.test(s))})||t[rn];if(t.compat){const f=t.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(s))})??t[rn];if(u.tag!==f.tag){const d=e.tagString(u.tag),p=e.tagString(f.tag),m=`Value may be parsed as either ${d} or ${p}`;l(o,"TAG_RESOLVE_FAILED",m,!0)}}return u}function oE(n,e,t){if(e){t===null&&(t=e.length);for(let s=t-1;s>=0;--s){let o=e[s];switch(o.type){case"space":case"comment":case"newline":n-=o.source.length;continue}for(o=e[++s];(o==null?void 0:o.type)==="space";)n+=o.source.length,o=e[++s];break}}return n}const lE={composeNode:py,composeEmptyNode:Jc};function py(n,e,t,s){const o=n.atKey,{spaceBefore:l,comment:u,anchor:f,tag:d}=t;let p,m=!0;switch(e.type){case"alias":p=aE(n,e,s),(f||d)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=hy(n,e,d,s),f&&(p.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=G_(lE,n,e,t,s),f&&(p.anchor=f.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",y),p=Jc(n,e.offset,void 0,null,t,s),m=!1}}return f&&p.anchor===""&&s(f,"BAD_ALIAS","Anchor cannot be an empty string"),o&&n.options.stringKeys&&(!ve(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&s(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(p.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?p.comment=u:p.commentBefore=u),n.options.keepSourceTokens&&m&&(p.srcToken=e),p}function Jc(n,e,t,s,{spaceBefore:o,comment:l,anchor:u,tag:f,end:d},p){const m={type:"scalar",offset:oE(e,t,s),indent:-1,source:""},y=hy(n,m,f,p);return u&&(y.anchor=u.source.substring(1),y.anchor===""&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(y.spaceBefore=!0),l&&(y.comment=l,y.range[2]=d),y}function aE({options:n},{offset:e,source:t,end:s},o){const l=new El(t.substring(1));l.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&o(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+t.length,f=_i(s,u,n.strict,o);return l.range=[e,u,f.offset],f.comment&&(l.comment=f.comment),l}function uE(n,e,{offset:t,start:s,value:o,end:l},u){const f=Object.assign({_directives:e},n),d=new fs(void 0,f),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=ts(s,{indicator:"doc-start",next:o??(l==null?void 0:l[0]),offset:t,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!m.hasNewline&&u(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=o?py(p,o,m,u):Jc(p,m.end,s,null,m,u);const y=d.contents.range[2],v=_i(l,y,!1,u);return v.comment&&(d.comment=v.comment),d.range=[t,y,v.offset],d}function ri(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:t}=n;return[e,e+(typeof t=="string"?t.length:1)]}function Hp(n){var o;let e="",t=!1,s=!1;for(let l=0;l<n.length;++l){const u=n[l];switch(u[0]){case"#":e+=(e===""?"":s?`
196
-
197
- `:`
198
- `)+(u.substring(1)||" "),t=!0,s=!1;break;case"%":((o=n[l+1])==null?void 0:o[0])!=="#"&&(l+=1),t=!1;break;default:t||(s=!0),t=!1}}return{comment:e,afterEmptyLine:s}}class Yc{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,s,o,l)=>{const u=ri(t);l?this.warnings.push(new ay(u,s,o)):this.errors.push(new lr(u,s,o))},this.directives=new lt({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:o}=Hp(this.prelude);if(s){const l=e.contents;if(t)e.comment=e.comment?`${e.comment}
199
- ${s}`:s;else if(o||e.directives.docStart||!l)e.commentBefore=s;else if($e(l)&&!l.flow&&l.items.length>0){let u=l.items[0];Le(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${s}
200
- ${f}`:s}else{const u=l.commentBefore;l.commentBefore=u?`${s}
201
- ${u}`:s}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Hp(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const o of e)yield*this.next(o);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,o)=>{const l=ri(e);l[0]+=t,this.onError(l,"BAD_DIRECTIVE",s,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=uE(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new lr(ri(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new lr(ri(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const t=_i(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
202
- ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new lr(ri(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),o=new fs(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,t,t],this.decorate(o,!1),yield o}}}function cE(n,e=!0,t){if(n){const s=(o,l,u)=>{const f=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(t)t(f,l,u);else throw new lr([f,f+1],l,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return fy(n,e,s);case"block-scalar":return cy({options:{strict:e}},n,s)}}return null}function fE(n,e){const{implicitKey:t=!1,indent:s,inFlow:o=!1,offset:l=-1,type:u="PLAIN"}=e,f=vi({type:u,value:n},{implicitKey:t,indent:s>0?" ".repeat(s):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:s,source:`
203
- `}];switch(f[0]){case"|":case">":{const p=f.indexOf(`
204
- `),m=f.substring(0,p),y=f.substring(p+1)+`
205
- `,v=[{type:"block-scalar-header",offset:l,indent:s,source:m}];return gy(v,d)||v.push({type:"newline",offset:-1,indent:s,source:`
206
- `}),{type:"block-scalar",offset:l,indent:s,props:v,source:y}}case'"':return{type:"double-quoted-scalar",offset:l,indent:s,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:l,indent:s,source:f,end:d};default:return{type:"scalar",offset:l,indent:s,source:f,end:d}}}function dE(n,e,t={}){let{afterKey:s=!1,implicitKey:o=!1,inFlow:l=!1,type:u}=t,f="indent"in n?n.indent:null;if(s&&typeof f=="number"&&(f+=2),!u)switch(n.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const p=n.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const d=vi({type:u,value:e},{implicitKey:o||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":hE(n,d);break;case'"':Xu(n,d,"double-quoted-scalar");break;case"'":Xu(n,d,"single-quoted-scalar");break;default:Xu(n,d,"scalar")}}function hE(n,e){const t=e.indexOf(`
207
- `),s=e.substring(0,t),o=e.substring(t+1)+`
208
- `;if(n.type==="block-scalar"){const l=n.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l.source=s,n.source=o}else{const{offset:l}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:l,indent:u,source:s}];gy(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
209
- `});for(const d of Object.keys(n))d!=="type"&&d!=="offset"&&delete n[d];Object.assign(n,{type:"block-scalar",indent:u,props:f,source:o})}}function gy(n,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":n.push(t);break;case"newline":return n.push(t),!0}return!1}function Xu(n,e,t){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=t,n.source=e;break;case"block-scalar":{const s=n.props.slice(1);let o=e.length;n.props[0].type==="block-scalar-header"&&(o-=n.props[0].source.length);for(const l of s)l.offset+=o;delete n.props,Object.assign(n,{type:t,source:e,end:s});break}case"block-map":case"block-seq":{const o={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
210
- `};delete n.items,Object.assign(n,{type:t,source:e,end:[o]});break}default:{const s="indent"in n?n.indent:-1,o="end"in n&&Array.isArray(n.end)?n.end.filter(l=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(const l of Object.keys(n))l!=="type"&&l!=="offset"&&delete n[l];Object.assign(n,{type:t,indent:s,source:e,end:o})}}}const pE=n=>"type"in n?pl(n):tl(n);function pl(n){switch(n.type){case"block-scalar":{let e="";for(const t of n.props)e+=pl(t);return e+n.source}case"block-map":case"block-seq":{let e="";for(const t of n.items)e+=tl(t);return e}case"flow-collection":{let e=n.start.source;for(const t of n.items)e+=tl(t);for(const t of n.end)e+=t.source;return e}case"document":{let e=tl(n);if(n.end)for(const t of n.end)e+=t.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const t of n.end)e+=t.source;return e}}}function tl({start:n,key:e,sep:t,value:s}){let o="";for(const l of n)o+=l.source;if(e&&(o+=pl(e)),t)for(const l of t)o+=l.source;return s&&(o+=pl(s)),o}const gc=Symbol("break visit"),gE=Symbol("skip children"),my=Symbol("remove item");function ur(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),yy(Object.freeze([]),n,e)}ur.BREAK=gc;ur.SKIP=gE;ur.REMOVE=my;ur.itemAtPath=(n,e)=>{let t=n;for(const[s,o]of e){const l=t==null?void 0:t[s];if(l&&"items"in l)t=l.items[o];else return}return t};ur.parentCollection=(n,e)=>{const t=ur.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],o=t==null?void 0:t[s];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function yy(n,e,t){let s=t(e,n);if(typeof s=="symbol")return s;for(const o of["key","value"]){const l=e[o];if(l&&"items"in l){for(let u=0;u<l.items.length;++u){const f=yy(Object.freeze(n.concat([[o,u]])),l.items[u],t);if(typeof f=="number")u=f-1;else{if(f===gc)return gc;f===my&&(l.items.splice(u,1),u-=1)}}typeof s=="function"&&o==="key"&&(s=s(e,n))}}return typeof s=="function"?s(e,n):s}const Ol="\uFEFF",$l="",Ml="",yi="",mE=n=>!!n&&"items"in n,yE=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function wE(n){switch(n){case Ol:return"<BOM>";case $l:return"<DOC>";case Ml:return"<FLOW_END>";case yi:return"<SCALAR>";default:return JSON.stringify(n)}}function wy(n){switch(n){case Ol:return"byte-order-mark";case $l:return"doc-mode";case Ml:return"flow-error-end";case yi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
211
- `:case`\r
212
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const vE=Object.freeze(Object.defineProperty({__proto__:null,BOM:Ol,DOCUMENT:$l,FLOW_END:Ml,SCALAR:yi,createScalarToken:fE,isCollection:mE,isScalar:yE,prettyToken:wE,resolveAsScalar:cE,setScalarValue:dE,stringify:pE,tokenType:wy,visit:ur},Symbol.toStringTag,{value:"Module"}));function Kt(n){switch(n){case void 0:case" ":case`
213
- `:case"\r":case" ":return!0;default:return!1}}const Vp=new Set("0123456789ABCDEFabcdef"),SE=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),qo=new Set(",[]{}"),_E=new Set(` ,[]{}
214
- \r `),Zu=n=>!n||_E.has(n);class vy{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let s=this.next??"stream";for(;s&&(t||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
215
- `?!0:t==="\r"?this.buffer[e+1]===`
216
- `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let s=0;for(;t===" ";)t=this.buffer[++s+e];if(t==="\r"){const o=this.buffer[s+e+1];if(o===`
217
- `||!o&&!this.atEnd)return e+s+1}return t===`
218
- `||s>=this.indentNext||!t&&!this.atEnd?e+s:-1}if(t==="-"||t==="."){const s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&Kt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
219
- `,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Ol&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,s=e.indexOf("#");for(;s!==-1;){const l=e[s-1];if(l===" "||l===" "){t=s-1;break}else s=e.indexOf("#",s+1)}for(;;){const l=e[t-1];if(l===" "||l===" ")t-=1;else break}const o=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield $l,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if((t==="---"||t==="...")&&Kt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Kt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Kt(t)){const s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Zu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,s=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=s=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&o[0]!=="#"||s===0&&(o.startsWith("---")||o.startsWith("..."))&&Kt(o[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield Ml,yield*this.parseLineStart();let l=0;for(;o[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),o[l]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-l),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Zu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||Kt(u)||u===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let l=0;for(;this.buffer[t-1-l]==="\\";)l+=1;if(l%2===0)break;t=this.buffer.indexOf('"',t+1)}const s=this.buffer.substring(0,t);let o=s.indexOf(`
220
- `,this.pos);if(o!==-1){for(;o!==-1;){const l=this.continueScalar(o+1);if(l===-1)break;o=s.indexOf(`
221
- `,l)}o!==-1&&(t=o-(s[o-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Kt(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,s;e:for(let l=this.pos;s=this.buffer[l];++l)switch(s){case" ":t+=1;break;case`
222
- `:e=l,t=0;break;case"\r":{const u=this.buffer[l+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
223
- `)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const l=this.continueScalar(e+1);if(l===-1)break;e=this.buffer.indexOf(`
224
- `,l)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let o=e+1;for(s=this.buffer[o];s===" ";)s=this.buffer[++o];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
225
- `;)s=this.buffer[++o];e=o-1}else if(!this.blockScalarKeep)do{let l=e-1,u=this.buffer[l];u==="\r"&&(u=this.buffer[--l]);const f=l;for(;u===" ";)u=this.buffer[--l];if(u===`
226
- `&&l>=this.pos&&l+1+t>f)e=l;else break}while(!0);return yield yi,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,s=this.pos-1,o;for(;o=this.buffer[++s];)if(o===":"){const l=this.buffer[s+1];if(Kt(l)||e&&qo.has(l))break;t=s}else if(Kt(o)){let l=this.buffer[s+1];if(o==="\r"&&(l===`
227
- `?(s+=1,o=`
228
- `,l=this.buffer[s+1]):t=s),l==="#"||e&&qo.has(l))break;if(o===`
229
- `){const u=this.continueScalar(s+1);if(u===-1)break;s=Math.max(s,u-2)}}else{if(e&&qo.has(o))break;t=s}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield yi,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Zu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(Kt(t)||e&&qo.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!Kt(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(SE.has(t))t=this.buffer[++e];else if(t==="%"&&Vp.has(this.buffer[e+1])&&Vp.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
230
- `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
231
- `?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,s;do s=this.buffer[++t];while(s===" "||e&&s===" ");const o=t-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=t),o}*pushUntil(e){let t=this.pos,s=this.buffer[t];for(;!e(s);)s=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class Sy{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t<s;){const l=t+s>>1;this.lineStarts[l]<e?t=l+1:s=l}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};const o=this.lineStarts[t-1];return{line:t,col:e-o+1}}}}function sr(n,e){for(let t=0;t<n.length;++t)if(n[t].type===e)return!0;return!1}function Wp(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function _y(n){switch(n==null?void 0:n.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ho(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function Ur(n){var t;if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=n[++e])==null?void 0:t.type)==="space";);return n.splice(e,n.length)}function Kp(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!sr(e.start,"explicit-key-ind")&&!sr(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,_y(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Xc{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new vy,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=wy(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Kp(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{const o=s.items[s.items.length-1];if(o.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=t;else{Object.assign(o,{key:t,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=s.items[s.items.length-1];o.value?s.items.push({start:[],value:t}):o.value=t;break}case"flow-collection":{const o=s.items[s.items.length-1];!o||o.value?s.items.push({start:[],key:t,sep:[]}):o.sep?o.value=t:Object.assign(o,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const o=t.items[t.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Wp(o.start)===-1&&(t.indent===0||o.start.every(l=>l.type!=="comment"||l.indent<t.indent))&&(s.type==="document"?s.end=o.start:s.items.push({start:o.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Wp(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const t=Ho(this.peek(2)),s=Ur(t);let o;e.end?(o=e.end,o.push(this.sourceToken),delete e.end):o=[this.sourceToken];const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
232
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
233
- `,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var s;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const o="end"in t.value?t.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const o=e.items[e.items.length-2],l=(s=o==null?void 0:o.value)==null?void 0:s.end;if(Array.isArray(l)){Array.prototype.push.apply(l,t.start),l.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent,l=o&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(l&&t.sep&&!t.value){const f=[];for(let d=0;d<t.sep.length;++d){const p=t.sep[d];switch(p.type){case"newline":f.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(u=t.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":l||t.value?(u.push(this.sourceToken),e.items.push({start:u}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):l||t.value?(u.push(this.sourceToken),e.items.push({start:u,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(sr(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(_y(t.key)&&!sr(t.sep,"newline")){const f=Ur(t.start),d=t.key,p=t.sep;p.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:p}]})}else u.length>0?t.sep=t.sep.concat(u,this.sourceToken):t.sep.push(this.sourceToken);else if(sr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const f=Ur(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||l?e.items.push({start:u,key:null,sep:[this.sourceToken]}):sr(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);l||t.value?(e.items.push({start:u,key:f,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(f):(Object.assign(t,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(e);if(f){o&&f.type!=="block-seq"&&e.items.push({start:u}),this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const o="end"in t.value?t.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const o=e.items[e.items.length-2],l=(s=o==null?void 0:o.value)==null?void 0:s.end;if(Array.isArray(l)){Array.prototype.push.apply(l,t.start),l.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||sr(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:o,sep:[]}):t.sep?this.stack.push(o):Object.assign(t,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const o=Ho(s),l=Ur(o);Kp(e);const u=e.end.splice(1,e.end.length);u.push(this.sourceToken);const f={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:l,key:e,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
234
- `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
235
- `,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Ho(e),s=Ur(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Ho(e),s=Ur(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Ey(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new Sy||null,prettyErrors:e}}function EE(n,e={}){const{lineCounter:t,prettyErrors:s}=Ey(e),o=new Xc(t==null?void 0:t.addNewLine),l=new Yc(e),u=Array.from(l.compose(o.parse(n)));if(s&&t)for(const f of u)f.errors.forEach(hl(n,t)),f.warnings.forEach(hl(n,t));return u.length>0?u:Object.assign([],{empty:!0},l.streamInfo())}function ky(n,e={}){const{lineCounter:t,prettyErrors:s}=Ey(e),o=new Xc(t==null?void 0:t.addNewLine),l=new Yc(e);let u=null;for(const f of l.compose(o.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new lr(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(u.errors.forEach(hl(n,t)),u.warnings.forEach(hl(n,t))),u}function kE(n,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);const o=ky(n,t);if(!o)return null;if(o.warnings.forEach(l=>qm(o.options.logLevel,l)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:s},t))}function xE(n,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const o=Math.round(t);t=o<1?void 0:o>8?{indent:8}:{indent:o}}if(n===void 0){const{keepUndefined:o}=t??e??{};if(!o)return}return dr(n)&&!s?n.toString(t):new fs(n,s,t).toString(t)}const xy=Object.freeze(Object.defineProperty({__proto__:null,Alias:El,CST:vE,Composer:Yc,Document:fs,Lexer:vy,LineCounter:Sy,Pair:st,Parser:Xc,Scalar:oe,Schema:Il,YAMLError:Gc,YAMLMap:At,YAMLParseError:lr,YAMLSeq:Un,YAMLWarning:ay,isAlias:fr,isCollection:$e,isDocument:dr,isMap:ls,isNode:Me,isPair:Le,isScalar:ve,isSeq:as,parse:kE,parseAllDocuments:EE,parseDocument:ky,stringify:xE,visit:zn,visitAsync:_l},Symbol.toStringTag,{value:"Module"})),rk=({action:n,sdkLanguage:e,testIdAttributeName:t,isInspecting:s,setIsInspecting:o,highlightedElement:l,setHighlightedElement:u})=>{const[f,d]=te.useState("action"),[p,m]=ec("shouldPopulateCanvasFromScreenshot",!1),y=te.useMemo(()=>NE(n),[n]),v=te.useMemo(()=>{const S=y[f];return S?LE(S,p):void 0},[y,f,p]);return C.jsxs("div",{className:"snapshot-tab vbox",children:[C.jsxs(Sc,{children:[C.jsx(Bn,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:s,onClick:()=>o(!s)}),["action","before","after"].map(S=>C.jsx(bg,{id:S,title:CE(S),selected:f===S,onSelect:()=>d(S)},S)),C.jsx("div",{style:{flex:"auto"}}),C.jsx(Bn,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(v!=null&&v.popoutUrl),onClick:()=>{const S=window.open((v==null?void 0:v.popoutUrl)||"","_blank");S==null||S.addEventListener("DOMContentLoaded",()=>{const x=new xm(S,!1,e,t,1,"chromium",[]);new f_(x)})}})]}),C.jsx(bE,{snapshotUrls:v,sdkLanguage:e,testIdAttributeName:t,isInspecting:s,setIsInspecting:o,highlightedElement:l,setHighlightedElement:u})]})},bE=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:t,isInspecting:s,setIsInspecting:o,highlightedElement:l,setHighlightedElement:u})=>{const f=te.useRef(null),d=te.useRef(null),[p,m]=te.useState({viewport:Ty,url:""}),y=te.useRef({iteration:0,visibleIframe:0});return te.useEffect(()=>{(async()=>{const v=y.current.iteration+1,S=1-y.current.visibleIframe;y.current.iteration=v;const x=await IE(n==null?void 0:n.snapshotInfoUrl);if(y.current.iteration!==v)return;const _=[f,d][S].current;if(_){let E=()=>{};const L=new Promise(O=>E=O);try{_.addEventListener("load",E),_.addEventListener("error",E);const O=(n==null?void 0:n.snapshotUrl)||OE;_.contentWindow?_.contentWindow.location.replace(O):_.src=O,await L}catch{}finally{_.removeEventListener("load",E),_.removeEventListener("error",E)}}y.current.iteration===v&&(y.current.visibleIframe=S,m(x))})()},[n]),C.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:v=>{v.key==="Escape"&&s&&o(!1)},children:[C.jsx(Qp,{isInspecting:s,sdkLanguage:e,testIdAttributeName:t,highlightedElement:l,setHighlightedElement:u,iframe:f.current,iteration:y.current.iteration}),C.jsx(Qp,{isInspecting:s,sdkLanguage:e,testIdAttributeName:t,highlightedElement:l,setHighlightedElement:u,iframe:d.current,iteration:y.current.iteration}),C.jsx(TE,{snapshotInfo:p,children:C.jsxs("div",{className:"snapshot-switcher",children:[C.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",className:Gt(y.current.visibleIframe===0&&"snapshot-visible")}),C.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Gt(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},TE=({snapshotInfo:n,children:e})=>{const[t,s]=gl(),l={width:n.viewport.width,height:n.viewport.height+40},u=Math.min(t.width/l.width,t.height/l.height,1),f={x:(t.width-l.width)/2,y:(t.height-l.height)/2};return C.jsx("div",{ref:s,className:"snapshot-wrapper",children:C.jsxs("div",{className:"snapshot-container",style:{width:l.width+"px",height:l.height+"px",transform:`translate(${f.x}px, ${f.y}px) scale(${u})`},children:[C.jsx(g_,{url:n.url}),e]})})};function CE(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const Qp=({iframe:n,isInspecting:e,sdkLanguage:t,testIdAttributeName:s,highlightedElement:o,setHighlightedElement:l,iteration:u})=>(te.useEffect(()=>{const f=[],d=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{by(f,t,s,d,"",n==null?void 0:n.contentWindow)}catch{}const p=o.lastEdited==="ariaSnapshot"&&o.ariaSnapshot?_c(xy,o.ariaSnapshot):void 0,m=o.lastEdited==="locator"&&o.locator?h_(t,o.locator,s):void 0;for(const{recorder:y,frameSelector:v}of f){const S=m!=null&&m.startsWith(v)?m.substring(v.length).trim():void 0,x=(p==null?void 0:p.errors.length)===0?p.fragment:void 0;y.setUIState({mode:e?"inspecting":"none",actionSelector:S,ariaTemplate:x,language:t,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(_){l({locator:Jr(t,v+_.selector),ariaSnapshot:_.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const _ of f)_.recorder!==y&&_.recorder.clearHighlight()}})}},[n,e,o,l,t,s,u]),C.jsx(C.Fragment,{}));function by(n,e,t,s,o,l){if(!l)return;const u=l;if(!u._recorder){const f=new xm(l,s,e,t,1,"chromium",[]),d=new XS(f);u._injectedScript=f,u._recorder={recorder:d,frameSelector:o},s&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(d)))}n.push(u._recorder);for(let f=0;f<l.frames.length;++f){const d=l.frames[f],p=d.frameElement?u._injectedScript.generateSelectorSimple(d.frameElement,{omitInternalEngines:!0,testIdAttributeName:t})+" >> internal:control=enter-frame >> ":"";by(n,e,t,s,o+p,d)}}function NE(n){if(!n)return{};let e=n.beforeSnapshot?{action:n,snapshotName:n.beforeSnapshot}:void 0,t=n;for(;!e&&t;)t=Gv(t),e=t!=null&&t.afterSnapshot?{action:t,snapshotName:t==null?void 0:t.afterSnapshot}:void 0;const s=n.afterSnapshot?{action:n,snapshotName:n.afterSnapshot}:e,o=n.inputSnapshot?{action:n,snapshotName:n.inputSnapshot,hasInputTarget:!0}:s;return o&&(o.point=n.point),{action:o,before:e,after:s}}const AE=new URLSearchParams(window.location.search).has("isUnderTest"),Gp=new URLSearchParams(window.location.search).get("server");function LE(n,e){const t=new URLSearchParams;t.set("trace",nl(n.action).traceUrl),t.set("name",n.snapshotName),AE&&t.set("isUnderTest","true"),n.point&&(t.set("pointX",String(n.point.x)),t.set("pointY",String(n.point.y)),n.hasInputTarget&&t.set("hasInputTarget","1")),e&&t.set("shouldPopulateCanvasFromScreenshot","1");const s=new URL(`snapshot/${n.action.pageId}?${t.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${n.action.pageId}?${t.toString()}`,window.location.href).toString(),l=new URLSearchParams;l.set("r",s),Gp&&l.set("server",Gp),l.set("trace",nl(n.action).traceUrl),n.point&&(l.set("pointX",String(n.point.x)),l.set("pointY",String(n.point.y)),n.hasInputTarget&&t.set("hasInputTarget","1"));const u=new URL(`snapshot.html?${l.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:s,popoutUrl:u}}async function IE(n){const e={url:"",viewport:Ty,timestamp:void 0,wallTime:void 0};if(n){const s=await(await fetch(n)).json();s.error||(e.url=s.url,e.viewport=s.viewport,e.timestamp=s.timestamp,e.wallTime=s.wallTime)}return e}const Ty={width:1280,height:720},OE='data:text/html,<body style="background: #ddd"></body>',$E=vc,ME=({stack:n,setSelectedFrame:e,selectedFrame:t})=>{const s=n||[];return C.jsx($E,{name:"stack-trace",items:s,selectedItem:s[t],render:o=>{const l=o.file[1]===":"?"\\":"/";return C.jsxs(C.Fragment,{children:[C.jsx("span",{className:"stack-trace-frame-function",children:o.function||"(anonymous)"}),C.jsx("span",{className:"stack-trace-frame-location",children:o.file.split(l).pop()}),C.jsx("span",{className:"stack-trace-frame-line",children:":"+o.line})]})},onSelected:o=>e(s.indexOf(o))})};function PE(n,e,t,s,o){return Av(async()=>{var S,x,_,E;const l=n==null?void 0:n[e],u=!(l!=null&&l.file);if(u&&!o)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const f=u?o.file:l.file;let d=t.get(f);d||(d={errors:((S=o==null?void 0:o.source)==null?void 0:S.errors)||[],content:(x=o==null?void 0:o.source)==null?void 0:x.content},t.set(f,d));const p=u?o:l,m=u?(o==null?void 0:o.line)||((_=d.errors[0])==null?void 0:_.line)||0:l.line,y=s&&f.startsWith(s)?f.substring(s.length+1):f,v=d.errors.map(L=>({type:"error",line:L.line,message:L.message}));if(v.push({line:m,type:"running"}),((E=o==null?void 0:o.source)==null?void 0:E.content)!==void 0)d.content=o.source.content;else if(d.content===void 0||u){const L=await RE(f);try{let O=await fetch(`sha1/src@${L}.txt`);O.status===404&&(O=await fetch(`file?path=${encodeURIComponent(f)}`)),O.status>=400?d.content=`<Unable to read "${f}">`:d.content=await O.text()}catch{d.content=`<Unable to read "${f}">`}}return{source:d,highlight:v,targetLine:m,fileName:y,location:p}},[n,e,s,o],{source:{errors:[],content:"Loading…"},highlight:[]})}const sk=({stack:n,sources:e,rootDir:t,fallbackLocation:s,stackFrameLocation:o,onOpenExternally:l})=>{const[u,f]=te.useState(),[d,p]=te.useState(0);te.useEffect(()=>{u!==n&&(f(n),p(0))},[n,u,f,p]);const{source:m,highlight:y,targetLine:v,fileName:S,location:x}=PE(n,d,e,t,s),_=te.useCallback(()=>{x&&(l?l(x):window.location.href=`vscode://file//${x.file}:${x.line}`)},[l,x]),E=((n==null?void 0:n.length)??0)>1,L=jE(S);return C.jsx(Xp,{sidebarSize:200,orientation:o==="bottom"?"vertical":"horizontal",sidebarHidden:!E,main:C.jsxs("div",{className:"vbox","data-testid":"source-code",children:[S&&C.jsxs(Sc,{children:[C.jsx("div",{className:"source-tab-file-name",title:S,children:C.jsx("div",{children:L})}),C.jsx(L0,{description:"Copy filename",value:L}),x&&C.jsx(Bn,{icon:"link-external",title:"Open in VS Code",onClick:_})]}),C.jsx(hi,{text:m.content||"",language:"javascript",highlight:y,revealLine:v,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:C.jsx(ME,{stack:n,selectedFrame:d,setSelectedFrame:p})})};async function RE(n){const e=new TextEncoder().encode(n),t=await crypto.subtle.digest("SHA-1",e),s=[],o=new DataView(t);for(let l=0;l<o.byteLength;l+=1){const u=o.getUint8(l).toString(16).padStart(2,"0");s.push(u)}return s.join("")}function jE(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const ik=({sdkLanguage:n,setIsInspecting:e,highlightedElement:t,setHighlightedElement:s})=>{const[o,l]=te.useState(),u=te.useCallback(f=>{const{errors:d}=_c(xy,f,{prettyErrors:!1}),p=d.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));l(p),s({...t,ariaSnapshot:f,lastEdited:"ariaSnapshot"}),e(!1)},[t,s,e]);return C.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[C.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[C.jsx("div",{style:{flex:"auto"},children:"Locator"}),C.jsx(Bn,{icon:"files",title:"Copy locator",onClick:()=>{Xh(t.locator||"")}})]}),C.jsx("div",{style:{height:50},children:C.jsx(hi,{text:t.locator||"",language:n,isFocused:!0,wrapLines:!0,onChange:f=>{s({...t,locator:f,lastEdited:"locator"}),e(!1)}})}),C.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[C.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),C.jsx(Bn,{icon:"files",title:"Copy snapshot",onClick:()=>{Xh(t.ariaSnapshot||"")}})]}),C.jsx("div",{style:{height:150},children:C.jsx(hi,{text:t.ariaSnapshot||"",language:"yaml",wrapLines:!1,highlight:o,onChange:u})})]})};export{Av as A,Mu as B,L0 as C,FE as D,ZE as E,tk as F,$0 as G,K0 as H,rk as I,ik as J,ek as K,vc as L,QE as M,nk as N,sk as O,kg as P,BE as Q,kt as R,Xp as S,Bn as T,YE as U,Xh as V,NE as W,LE as X,bE as Y,bv as Z,D0 as _,qE as a,tc as b,KE as c,HE as d,VE as e,Gt as f,Sc as g,ec as h,WE as i,C as j,Ov as k,GE as l,di as m,JE as n,Jr as o,il as p,UE as q,te as r,rr as s,Mv as t,gl as u,P0 as v,$v as w,zE as x,XE as y,hi as z};