@stablyai/internal-playwright-core 0.1.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.
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +3 -0
- package/ThirdPartyNotices.txt +1134 -0
- package/bin/install_media_pack.ps1 +5 -0
- package/bin/install_webkit_wsl.ps1 +35 -0
- package/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/browsers.json +80 -0
- package/cli.js +18 -0
- package/index.d.ts +17 -0
- package/index.js +32 -0
- package/index.mjs +28 -0
- package/lib/androidServerImpl.js +65 -0
- package/lib/browserServerImpl.js +120 -0
- package/lib/cli/cli.js +58 -0
- package/lib/cli/driver.js +97 -0
- package/lib/cli/program.js +634 -0
- package/lib/cli/programWithTestStub.js +74 -0
- package/lib/client/accessibility.js +49 -0
- package/lib/client/android.js +361 -0
- package/lib/client/api.js +137 -0
- package/lib/client/artifact.js +79 -0
- package/lib/client/browser.js +163 -0
- package/lib/client/browserContext.js +529 -0
- package/lib/client/browserType.js +184 -0
- package/lib/client/cdpSession.js +51 -0
- package/lib/client/channelOwner.js +194 -0
- package/lib/client/clientHelper.js +64 -0
- package/lib/client/clientInstrumentation.js +55 -0
- package/lib/client/clientStackTrace.js +69 -0
- package/lib/client/clock.js +68 -0
- package/lib/client/connection.js +314 -0
- package/lib/client/consoleMessage.js +54 -0
- package/lib/client/coverage.js +44 -0
- package/lib/client/dialog.js +56 -0
- package/lib/client/download.js +62 -0
- package/lib/client/electron.js +138 -0
- package/lib/client/elementHandle.js +281 -0
- package/lib/client/errors.js +77 -0
- package/lib/client/eventEmitter.js +314 -0
- package/lib/client/events.js +99 -0
- package/lib/client/fetch.js +369 -0
- package/lib/client/fileChooser.js +46 -0
- package/lib/client/fileUtils.js +34 -0
- package/lib/client/frame.js +408 -0
- package/lib/client/harRouter.js +87 -0
- package/lib/client/input.js +84 -0
- package/lib/client/jsHandle.js +109 -0
- package/lib/client/jsonPipe.js +39 -0
- package/lib/client/localUtils.js +60 -0
- package/lib/client/locator.js +368 -0
- package/lib/client/network.js +747 -0
- package/lib/client/page.js +721 -0
- package/lib/client/platform.js +74 -0
- package/lib/client/playwright.js +71 -0
- package/lib/client/selectors.js +55 -0
- package/lib/client/stream.js +39 -0
- package/lib/client/timeoutSettings.js +79 -0
- package/lib/client/tracing.js +117 -0
- package/lib/client/types.js +28 -0
- package/lib/client/video.js +59 -0
- package/lib/client/waiter.js +142 -0
- package/lib/client/webError.js +39 -0
- package/lib/client/webSocket.js +93 -0
- package/lib/client/worker.js +63 -0
- package/lib/client/writableStream.js +39 -0
- package/lib/common/debugLogger.js +90 -0
- package/lib/common/socksProxy.js +569 -0
- package/lib/common/timeoutSettings.js +73 -0
- package/lib/common/types.js +5 -0
- package/lib/generated/bindingsControllerSource.js +28 -0
- package/lib/generated/clockSource.js +28 -0
- package/lib/generated/consoleApiSource.js +28 -0
- package/lib/generated/injectedScriptSource.js +28 -0
- package/lib/generated/pollingRecorderSource.js +28 -0
- package/lib/generated/recorderSource.js +28 -0
- package/lib/generated/storageScriptSource.js +28 -0
- package/lib/generated/utilityScriptSource.js +28 -0
- package/lib/generated/webSocketMockSource.js +336 -0
- package/lib/image_tools/colorUtils.js +98 -0
- package/lib/image_tools/compare.js +108 -0
- package/lib/image_tools/imageChannel.js +70 -0
- package/lib/image_tools/stats.js +102 -0
- package/lib/inProcessFactory.js +60 -0
- package/lib/index.js +19 -0
- package/lib/inprocess.js +3 -0
- package/lib/outofprocess.js +76 -0
- package/lib/protocol/debug.js +27 -0
- package/lib/protocol/serializers.js +192 -0
- package/lib/protocol/transport.js +82 -0
- package/lib/protocol/validator.js +2919 -0
- package/lib/protocol/validatorPrimitives.js +193 -0
- package/lib/remote/playwrightConnection.js +129 -0
- package/lib/remote/playwrightServer.js +335 -0
- package/lib/server/accessibility.js +69 -0
- package/lib/server/android/android.js +465 -0
- package/lib/server/android/backendAdb.js +177 -0
- package/lib/server/artifact.js +127 -0
- package/lib/server/bidi/bidiBrowser.js +490 -0
- package/lib/server/bidi/bidiChromium.js +153 -0
- package/lib/server/bidi/bidiConnection.js +212 -0
- package/lib/server/bidi/bidiExecutionContext.js +221 -0
- package/lib/server/bidi/bidiFirefox.js +130 -0
- package/lib/server/bidi/bidiInput.js +146 -0
- package/lib/server/bidi/bidiNetworkManager.js +383 -0
- package/lib/server/bidi/bidiOverCdp.js +102 -0
- package/lib/server/bidi/bidiPage.js +552 -0
- package/lib/server/bidi/bidiPdf.js +106 -0
- package/lib/server/bidi/third_party/bidiCommands.d.js +22 -0
- package/lib/server/bidi/third_party/bidiDeserializer.js +98 -0
- package/lib/server/bidi/third_party/bidiKeyboard.js +256 -0
- package/lib/server/bidi/third_party/bidiProtocol.js +24 -0
- package/lib/server/bidi/third_party/bidiProtocolCore.js +179 -0
- package/lib/server/bidi/third_party/bidiProtocolPermissions.js +42 -0
- package/lib/server/bidi/third_party/bidiSerializer.js +148 -0
- package/lib/server/bidi/third_party/firefoxPrefs.js +259 -0
- package/lib/server/browser.js +149 -0
- package/lib/server/browserContext.js +695 -0
- package/lib/server/browserType.js +328 -0
- package/lib/server/callLog.js +82 -0
- package/lib/server/chromium/appIcon.png +0 -0
- package/lib/server/chromium/chromium.js +402 -0
- package/lib/server/chromium/chromiumSwitches.js +95 -0
- package/lib/server/chromium/crAccessibility.js +263 -0
- package/lib/server/chromium/crBrowser.js +501 -0
- package/lib/server/chromium/crConnection.js +202 -0
- package/lib/server/chromium/crCoverage.js +235 -0
- package/lib/server/chromium/crDevTools.js +113 -0
- package/lib/server/chromium/crDragDrop.js +131 -0
- package/lib/server/chromium/crExecutionContext.js +146 -0
- package/lib/server/chromium/crInput.js +187 -0
- package/lib/server/chromium/crNetworkManager.js +666 -0
- package/lib/server/chromium/crPage.js +1069 -0
- package/lib/server/chromium/crPdf.js +121 -0
- package/lib/server/chromium/crProtocolHelper.js +145 -0
- package/lib/server/chromium/crServiceWorker.js +123 -0
- package/lib/server/chromium/defaultFontFamilies.js +162 -0
- package/lib/server/chromium/protocol.d.js +16 -0
- package/lib/server/chromium/videoRecorder.js +113 -0
- package/lib/server/clock.js +149 -0
- package/lib/server/codegen/csharp.js +327 -0
- package/lib/server/codegen/java.js +274 -0
- package/lib/server/codegen/javascript.js +270 -0
- package/lib/server/codegen/jsonl.js +52 -0
- package/lib/server/codegen/language.js +132 -0
- package/lib/server/codegen/languages.js +68 -0
- package/lib/server/codegen/python.js +279 -0
- package/lib/server/codegen/types.js +16 -0
- package/lib/server/console.js +53 -0
- package/lib/server/cookieStore.js +206 -0
- package/lib/server/debugController.js +191 -0
- package/lib/server/debugger.js +119 -0
- package/lib/server/deviceDescriptors.js +39 -0
- package/lib/server/deviceDescriptorsSource.json +1779 -0
- package/lib/server/dialog.js +116 -0
- package/lib/server/dispatchers/androidDispatcher.js +325 -0
- package/lib/server/dispatchers/artifactDispatcher.js +118 -0
- package/lib/server/dispatchers/browserContextDispatcher.js +364 -0
- package/lib/server/dispatchers/browserDispatcher.js +118 -0
- package/lib/server/dispatchers/browserTypeDispatcher.js +64 -0
- package/lib/server/dispatchers/cdpSessionDispatcher.js +44 -0
- package/lib/server/dispatchers/debugControllerDispatcher.js +78 -0
- package/lib/server/dispatchers/dialogDispatcher.js +47 -0
- package/lib/server/dispatchers/dispatcher.js +371 -0
- package/lib/server/dispatchers/electronDispatcher.js +89 -0
- package/lib/server/dispatchers/elementHandlerDispatcher.js +181 -0
- package/lib/server/dispatchers/frameDispatcher.js +227 -0
- package/lib/server/dispatchers/jsHandleDispatcher.js +85 -0
- package/lib/server/dispatchers/jsonPipeDispatcher.js +58 -0
- package/lib/server/dispatchers/localUtilsDispatcher.js +149 -0
- package/lib/server/dispatchers/networkDispatchers.js +213 -0
- package/lib/server/dispatchers/pageDispatcher.js +401 -0
- package/lib/server/dispatchers/playwrightDispatcher.js +108 -0
- package/lib/server/dispatchers/selectorsDispatcher.js +36 -0
- package/lib/server/dispatchers/streamDispatcher.js +67 -0
- package/lib/server/dispatchers/tracingDispatcher.js +68 -0
- package/lib/server/dispatchers/webSocketRouteDispatcher.js +165 -0
- package/lib/server/dispatchers/writableStreamDispatcher.js +79 -0
- package/lib/server/dom.js +806 -0
- package/lib/server/download.js +70 -0
- package/lib/server/electron/electron.js +270 -0
- package/lib/server/electron/loader.js +29 -0
- package/lib/server/errors.js +69 -0
- package/lib/server/fetch.js +621 -0
- package/lib/server/fileChooser.js +43 -0
- package/lib/server/fileUploadUtils.js +84 -0
- package/lib/server/firefox/ffAccessibility.js +238 -0
- package/lib/server/firefox/ffBrowser.js +428 -0
- package/lib/server/firefox/ffConnection.js +147 -0
- package/lib/server/firefox/ffExecutionContext.js +150 -0
- package/lib/server/firefox/ffInput.js +159 -0
- package/lib/server/firefox/ffNetworkManager.js +256 -0
- package/lib/server/firefox/ffPage.js +503 -0
- package/lib/server/firefox/firefox.js +116 -0
- package/lib/server/firefox/protocol.d.js +16 -0
- package/lib/server/formData.js +147 -0
- package/lib/server/frameSelectors.js +156 -0
- package/lib/server/frames.js +1502 -0
- package/lib/server/har/harRecorder.js +147 -0
- package/lib/server/har/harTracer.js +607 -0
- package/lib/server/harBackend.js +157 -0
- package/lib/server/helper.js +96 -0
- package/lib/server/index.js +58 -0
- package/lib/server/input.js +273 -0
- package/lib/server/instrumentation.js +69 -0
- package/lib/server/isomorphic/utilityScriptSerializers.js +212 -0
- package/lib/server/javascript.js +291 -0
- package/lib/server/launchApp.js +128 -0
- package/lib/server/localUtils.js +218 -0
- package/lib/server/macEditingCommands.js +143 -0
- package/lib/server/network.js +629 -0
- package/lib/server/page.js +871 -0
- package/lib/server/pipeTransport.js +89 -0
- package/lib/server/playwright.js +69 -0
- package/lib/server/progress.js +112 -0
- package/lib/server/protocolError.js +52 -0
- package/lib/server/recorder/chat.js +161 -0
- package/lib/server/recorder/codeGenerator.js +153 -0
- package/lib/server/recorder/csharp.js +310 -0
- package/lib/server/recorder/java.js +248 -0
- package/lib/server/recorder/javascript.js +229 -0
- package/lib/server/recorder/jsonl.js +47 -0
- package/lib/server/recorder/language.js +44 -0
- package/lib/server/recorder/python.js +276 -0
- package/lib/server/recorder/recorderActions.js +5 -0
- package/lib/server/recorder/recorderApp.js +387 -0
- package/lib/server/recorder/recorderRunner.js +138 -0
- package/lib/server/recorder/recorderSignalProcessor.js +83 -0
- package/lib/server/recorder/recorderUtils.js +157 -0
- package/lib/server/recorder/throttledFile.js +57 -0
- package/lib/server/recorder/utils.js +45 -0
- package/lib/server/recorder.js +499 -0
- package/lib/server/registry/browserFetcher.js +175 -0
- package/lib/server/registry/dependencies.js +371 -0
- package/lib/server/registry/index.js +1331 -0
- package/lib/server/registry/nativeDeps.js +1280 -0
- package/lib/server/registry/oopDownloadBrowserMain.js +120 -0
- package/lib/server/screenshotter.js +333 -0
- package/lib/server/selectors.js +112 -0
- package/lib/server/socksClientCertificatesInterceptor.js +383 -0
- package/lib/server/socksInterceptor.js +95 -0
- package/lib/server/stably/ai-tools/http-request.js +70 -0
- package/lib/server/stably/ai-tools/stablyApiCaller.js +137 -0
- package/lib/server/stably/autohealing/elementHandleFromCoordinates.js +64 -0
- package/lib/server/stably/autohealing/healingService.js +228 -0
- package/lib/server/stably/autohealing/screenshotFrame.js +41 -0
- package/lib/server/stably/constants.js +31 -0
- package/lib/server/trace/recorder/snapshotter.js +147 -0
- package/lib/server/trace/recorder/snapshotterInjected.js +541 -0
- package/lib/server/trace/recorder/tracing.js +602 -0
- package/lib/server/trace/test/inMemorySnapshotter.js +87 -0
- package/lib/server/trace/viewer/traceViewer.js +240 -0
- package/lib/server/transport.js +181 -0
- package/lib/server/types.js +28 -0
- package/lib/server/usKeyboardLayout.js +145 -0
- package/lib/server/utils/ascii.js +44 -0
- package/lib/server/utils/comparators.js +161 -0
- package/lib/server/utils/crypto.js +216 -0
- package/lib/server/utils/debug.js +42 -0
- package/lib/server/utils/debugLogger.js +122 -0
- package/lib/server/utils/env.js +73 -0
- package/lib/server/utils/eventsHelper.js +39 -0
- package/lib/server/utils/expectUtils.js +38 -0
- package/lib/server/utils/fileUtils.js +191 -0
- package/lib/server/utils/happyEyeballs.js +207 -0
- package/lib/server/utils/hostPlatform.js +111 -0
- package/lib/server/utils/httpServer.js +218 -0
- package/lib/server/utils/image_tools/colorUtils.js +89 -0
- package/lib/server/utils/image_tools/compare.js +109 -0
- package/lib/server/utils/image_tools/imageChannel.js +78 -0
- package/lib/server/utils/image_tools/stats.js +102 -0
- package/lib/server/utils/linuxUtils.js +71 -0
- package/lib/server/utils/network.js +233 -0
- package/lib/server/utils/nodePlatform.js +148 -0
- package/lib/server/utils/pipeTransport.js +84 -0
- package/lib/server/utils/processLauncher.js +241 -0
- package/lib/server/utils/profiler.js +65 -0
- package/lib/server/utils/socksProxy.js +511 -0
- package/lib/server/utils/spawnAsync.js +41 -0
- package/lib/server/utils/task.js +51 -0
- package/lib/server/utils/userAgent.js +98 -0
- package/lib/server/utils/wsServer.js +121 -0
- package/lib/server/utils/zipFile.js +74 -0
- package/lib/server/utils/zones.js +57 -0
- package/lib/server/webkit/protocol.d.js +16 -0
- package/lib/server/webkit/webkit.js +119 -0
- package/lib/server/webkit/wkAccessibility.js +237 -0
- package/lib/server/webkit/wkBrowser.js +339 -0
- package/lib/server/webkit/wkConnection.js +149 -0
- package/lib/server/webkit/wkExecutionContext.js +154 -0
- package/lib/server/webkit/wkInput.js +181 -0
- package/lib/server/webkit/wkInterceptableRequest.js +169 -0
- package/lib/server/webkit/wkPage.js +1134 -0
- package/lib/server/webkit/wkProvisionalPage.js +83 -0
- package/lib/server/webkit/wkWorkers.js +104 -0
- package/lib/server/webkit/wsl/webkit-wsl-transport-client.js +74 -0
- package/lib/server/webkit/wsl/webkit-wsl-transport-server.js +113 -0
- package/lib/third_party/diff_match_patch.js +2222 -0
- package/lib/third_party/pixelmatch.js +255 -0
- package/lib/utils/ascii.js +31 -0
- package/lib/utils/comparators.js +171 -0
- package/lib/utils/crypto.js +33 -0
- package/lib/utils/debug.js +46 -0
- package/lib/utils/debugLogger.js +89 -0
- package/lib/utils/env.js +49 -0
- package/lib/utils/eventsHelper.js +38 -0
- package/lib/utils/fileUtils.js +205 -0
- package/lib/utils/glob.js +83 -0
- package/lib/utils/happy-eyeballs.js +160 -0
- package/lib/utils/headers.js +52 -0
- package/lib/utils/hostPlatform.js +128 -0
- package/lib/utils/httpServer.js +236 -0
- package/lib/utils/index.js +346 -0
- package/lib/utils/isomorphic/ariaSnapshot.js +392 -0
- package/lib/utils/isomorphic/assert.js +31 -0
- package/lib/utils/isomorphic/colors.js +72 -0
- package/lib/utils/isomorphic/cssParser.js +245 -0
- package/lib/utils/isomorphic/cssTokenizer.js +1051 -0
- package/lib/utils/isomorphic/headers.js +53 -0
- package/lib/utils/isomorphic/locatorGenerators.js +673 -0
- package/lib/utils/isomorphic/locatorParser.js +176 -0
- package/lib/utils/isomorphic/locatorUtils.js +81 -0
- package/lib/utils/isomorphic/manualPromise.js +114 -0
- package/lib/utils/isomorphic/mimeType.js +459 -0
- package/lib/utils/isomorphic/multimap.js +80 -0
- package/lib/utils/isomorphic/protocolFormatter.js +78 -0
- package/lib/utils/isomorphic/protocolMetainfo.js +321 -0
- package/lib/utils/isomorphic/rtti.js +43 -0
- package/lib/utils/isomorphic/selectorParser.js +386 -0
- package/lib/utils/isomorphic/semaphore.js +54 -0
- package/lib/utils/isomorphic/stackTrace.js +158 -0
- package/lib/utils/isomorphic/stringUtils.js +155 -0
- package/lib/utils/isomorphic/time.js +49 -0
- package/lib/utils/isomorphic/timeoutRunner.js +66 -0
- package/lib/utils/isomorphic/traceUtils.js +58 -0
- package/lib/utils/isomorphic/types.js +16 -0
- package/lib/utils/isomorphic/urlMatch.js +176 -0
- package/lib/utils/isomorphic/utilityScriptSerializers.js +251 -0
- package/lib/utils/linuxUtils.js +78 -0
- package/lib/utils/manualPromise.js +109 -0
- package/lib/utils/mimeType.js +29 -0
- package/lib/utils/multimap.js +75 -0
- package/lib/utils/network.js +188 -0
- package/lib/utils/processLauncher.js +248 -0
- package/lib/utils/profiler.js +53 -0
- package/lib/utils/rtti.js +44 -0
- package/lib/utils/semaphore.js +51 -0
- package/lib/utils/spawnAsync.js +45 -0
- package/lib/utils/stackTrace.js +121 -0
- package/lib/utils/task.js +58 -0
- package/lib/utils/time.js +37 -0
- package/lib/utils/timeoutRunner.js +66 -0
- package/lib/utils/traceUtils.js +44 -0
- package/lib/utils/userAgent.js +105 -0
- package/lib/utils/wsServer.js +127 -0
- package/lib/utils/zipFile.js +75 -0
- package/lib/utils/zones.js +62 -0
- package/lib/utils.js +107 -0
- package/lib/utilsBundle.js +109 -0
- package/lib/utilsBundleImpl/index.js +218 -0
- package/lib/utilsBundleImpl/xdg-open +1066 -0
- package/lib/vite/htmlReport/index.html +84 -0
- package/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +1 -0
- package/lib/vite/recorder/assets/codeMirrorModule-RJCXzfmE.js +24 -0
- package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/lib/vite/recorder/assets/index-Ri0uHF7I.css +1 -0
- package/lib/vite/recorder/assets/index-Y-X2TGJv.js +193 -0
- package/lib/vite/recorder/index.html +29 -0
- package/lib/vite/recorder/playwright-logo.svg +9 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-Bhnc5o2x.js +24 -0
- package/lib/vite/traceViewer/assets/defaultSettingsView-ClwvkA2N.js +265 -0
- package/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +9 -0
- package/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +1 -0
- package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/lib/vite/traceViewer/defaultSettingsView.TQ8_7ybu.css +1 -0
- package/lib/vite/traceViewer/index.DFO9NNF5.js +2 -0
- package/lib/vite/traceViewer/index.I8N9v4jT.css +1 -0
- package/lib/vite/traceViewer/index.html +43 -0
- package/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/lib/vite/traceViewer/snapshot.html +21 -0
- package/lib/vite/traceViewer/sw.bundle.js +3 -0
- package/lib/vite/traceViewer/uiMode.Btcz36p_.css +1 -0
- package/lib/vite/traceViewer/uiMode.Shu3QS-1.js +5 -0
- package/lib/vite/traceViewer/uiMode.html +17 -0
- package/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +32 -0
- package/lib/zipBundle.js +34 -0
- package/lib/zipBundleImpl.js +5 -0
- package/package.json +43 -0
- package/types/protocol.d.ts +23130 -0
- package/types/structs.d.ts +45 -0
- package/types/types.d.ts +22857 -0
@@ -0,0 +1,265 @@
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-Bhnc5o2x.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
|
2
|
+
var ww=Object.defineProperty;var xw=(n,e,i)=>e in n?ww(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var Ne=(n,e,i)=>xw(n,typeof e!="symbol"?e+"":e,i);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function _w(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Hf={exports:{}},_a={};/**
|
3
|
+
* @license React
|
4
|
+
* react-jsx-runtime.production.js
|
5
|
+
*
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and 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 cy;function Ew(){if(cy)return _a;cy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(s,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:n,type:s,key:u,ref:l!==void 0?l:null,props:o}}return _a.Fragment=e,_a.jsx=i,_a.jsxs=i,_a}var uy;function Tw(){return uy||(uy=1,Hf.exports=Ew()),Hf.exports}var v=Tw(),zf={exports:{}},he={};/**
|
11
|
+
* @license React
|
12
|
+
* react.production.js
|
13
|
+
*
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and 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 fy;function Aw(){if(fy)return he;fy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),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 b(C){return C===null||typeof C!="object"?null:(C=y&&C[y]||C["@@iterator"],typeof C=="function"?C:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,x={};function E(C,X,Q){this.props=C,this.context=X,this.refs=x,this.updater=Q||w}E.prototype.isReactComponent={},E.prototype.setState=function(C,X){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,X,"setState")},E.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function k(){}k.prototype=E.prototype;function N(C,X,Q){this.props=C,this.context=X,this.refs=x,this.updater=Q||w}var V=N.prototype=new k;V.constructor=N,T(V,E.prototype),V.isPureReactComponent=!0;var $=Array.isArray,B={H:null,A:null,T:null,S:null,V:null},Y=Object.prototype.hasOwnProperty;function J(C,X,Q,W,se,ve){return Q=ve.ref,{$$typeof:n,type:C,key:X,ref:Q!==void 0?Q:null,props:ve}}function I(C,X){return J(C.type,X,void 0,void 0,void 0,C.props)}function j(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function te(C){var X={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(Q){return X[Q]})}var re=/\/+/g;function L(C,X){return typeof C=="object"&&C!==null&&C.key!=null?te(""+C.key):X.toString(36)}function F(){}function ge(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(F,F):(C.status="pending",C.then(function(X){C.status==="pending"&&(C.status="fulfilled",C.value=X)},function(X){C.status==="pending"&&(C.status="rejected",C.reason=X)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function me(C,X,Q,W,se){var ve=typeof C;(ve==="undefined"||ve==="boolean")&&(C=null);var ue=!1;if(C===null)ue=!0;else switch(ve){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(C.$$typeof){case n:case e:ue=!0;break;case m:return ue=C._init,me(ue(C._payload),X,Q,W,se)}}if(ue)return se=se(C),ue=W===""?"."+L(C,0):W,$(se)?(Q="",ue!=null&&(Q=ue.replace(re,"$&/")+"/"),me(se,X,Q,"",function(gn){return gn})):se!=null&&(j(se)&&(se=I(se,Q+(se.key==null||C&&C.key===se.key?"":(""+se.key).replace(re,"$&/")+"/")+ue)),X.push(se)),1;ue=0;var We=W===""?".":W+":";if($(C))for(var xe=0;xe<C.length;xe++)W=C[xe],ve=We+L(W,xe),ue+=me(W,X,Q,ve,se);else if(xe=b(C),typeof xe=="function")for(C=xe.call(C),xe=0;!(W=C.next()).done;)W=W.value,ve=We+L(W,xe++),ue+=me(W,X,Q,ve,se);else if(ve==="object"){if(typeof C.then=="function")return me(ge(C),X,Q,W,se);throw X=String(C),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return ue}function z(C,X,Q){if(C==null)return C;var W=[],se=0;return me(C,W,"","",function(ve){return X.call(Q,ve,se++)}),W}function Z(C){if(C._status===-1){var X=C._result;X=X(),X.then(function(Q){(C._status===0||C._status===-1)&&(C._status=1,C._result=Q)},function(Q){(C._status===0||C._status===-1)&&(C._status=2,C._result=Q)}),C._status===-1&&(C._status=0,C._result=X)}if(C._status===1)return C._result.default;throw C._result}var ne=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)};function Se(){}return he.Children={map:z,forEach:function(C,X,Q){z(C,function(){X.apply(this,arguments)},Q)},count:function(C){var X=0;return z(C,function(){X++}),X},toArray:function(C){return z(C,function(X){return X})||[]},only:function(C){if(!j(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},he.Component=E,he.Fragment=i,he.Profiler=l,he.PureComponent=N,he.StrictMode=s,he.Suspense=d,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,he.__COMPILER_RUNTIME={__proto__:null,c:function(C){return B.H.useMemoCache(C)}},he.cache=function(C){return function(){return C.apply(null,arguments)}},he.cloneElement=function(C,X,Q){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var W=T({},C.props),se=C.key,ve=void 0;if(X!=null)for(ue in X.ref!==void 0&&(ve=void 0),X.key!==void 0&&(se=""+X.key),X)!Y.call(X,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&X.ref===void 0||(W[ue]=X[ue]);var ue=arguments.length-2;if(ue===1)W.children=Q;else if(1<ue){for(var We=Array(ue),xe=0;xe<ue;xe++)We[xe]=arguments[xe+2];W.children=We}return J(C.type,se,void 0,void 0,ve,W)},he.createContext=function(C){return C={$$typeof:u,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:o,_context:C},C},he.createElement=function(C,X,Q){var W,se={},ve=null;if(X!=null)for(W in X.key!==void 0&&(ve=""+X.key),X)Y.call(X,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(se[W]=X[W]);var ue=arguments.length-2;if(ue===1)se.children=Q;else if(1<ue){for(var We=Array(ue),xe=0;xe<ue;xe++)We[xe]=arguments[xe+2];se.children=We}if(C&&C.defaultProps)for(W in ue=C.defaultProps,ue)se[W]===void 0&&(se[W]=ue[W]);return J(C,ve,void 0,void 0,null,se)},he.createRef=function(){return{current:null}},he.forwardRef=function(C){return{$$typeof:f,render:C}},he.isValidElement=j,he.lazy=function(C){return{$$typeof:m,_payload:{_status:-1,_result:C},_init:Z}},he.memo=function(C,X){return{$$typeof:p,type:C,compare:X===void 0?null:X}},he.startTransition=function(C){var X=B.T,Q={};B.T=Q;try{var W=C(),se=B.S;se!==null&&se(Q,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(Se,ne)}catch(ve){ne(ve)}finally{B.T=X}},he.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},he.use=function(C){return B.H.use(C)},he.useActionState=function(C,X,Q){return B.H.useActionState(C,X,Q)},he.useCallback=function(C,X){return B.H.useCallback(C,X)},he.useContext=function(C){return B.H.useContext(C)},he.useDebugValue=function(){},he.useDeferredValue=function(C,X){return B.H.useDeferredValue(C,X)},he.useEffect=function(C,X,Q){var W=B.H;if(typeof Q=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return W.useEffect(C,X)},he.useId=function(){return B.H.useId()},he.useImperativeHandle=function(C,X,Q){return B.H.useImperativeHandle(C,X,Q)},he.useInsertionEffect=function(C,X){return B.H.useInsertionEffect(C,X)},he.useLayoutEffect=function(C,X){return B.H.useLayoutEffect(C,X)},he.useMemo=function(C,X){return B.H.useMemo(C,X)},he.useOptimistic=function(C,X){return B.H.useOptimistic(C,X)},he.useReducer=function(C,X,Q){return B.H.useReducer(C,X,Q)},he.useRef=function(C){return B.H.useRef(C)},he.useState=function(C){return B.H.useState(C)},he.useSyncExternalStore=function(C,X,Q){return B.H.useSyncExternalStore(C,X,Q)},he.useTransition=function(){return B.H.useTransition()},he.version="19.1.1",he}var hy;function Nh(){return hy||(hy=1,zf.exports=Aw()),zf.exports}var q=Nh();const Yt=_w(q);function qo(n,e,i,s){const[l,o]=Yt.useState(i);return Yt.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),l}function es(){const n=Yt.useRef(null);return[oh(n),n]}function oh(n){const[e,i]=Yt.useState(new DOMRect(0,0,10,10));return Yt.useLayoutEffect(()=>{const s=n==null?void 0:n.current;if(!s)return;const l=()=>i(s.getBoundingClientRect());l();const o=new ResizeObserver(l);return o.observe(s),window.addEventListener("resize",l),()=>{o.disconnect(),window.removeEventListener("resize",l)}},[n]),e}function _t(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 i=e/60;if(i<60)return i.toFixed(1)+"m";const s=i/60;return s<24?s.toFixed(1)+"h":(s/24).toFixed(1)+"d"}function Nw(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 i=e/1024;return i<1e3?i.toFixed(1)+"M":(i/1024).toFixed(1)+"G"}function v0(n,e,i,s,l){let o=0,u=n.length;for(;o<u;){const f=o+u>>1;i(e,n[f])>=0?o=f+1:u=f}return u}function dy(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 xn(n,e){n&&(e=Ki.getObject(n,e));const[i,s]=Yt.useState(e),l=Yt.useCallback(o=>{n?Ki.setObject(n,o):s(o)},[n,s]);return Yt.useEffect(()=>{if(n){const o=()=>s(Ki.getObject(n,e));return Ki.onChangeEmitter.addEventListener(n,o),()=>Ki.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,l]}class Cw{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var s;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var s;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(s=window.saveSettings)==null||s.call(window)}}const Ki=new Cw;function Ke(...n){return n.filter(Boolean).join(" ")}function S0(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const py="\\u0000-\\u0020\\u007f-\\u009f",w0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+py+'"]{2,}[^\\s'+py+`"')}\\],:;.!?]`,"ug");function kw(){const[n,e]=Yt.useState(!1),i=Yt.useCallback(()=>{const s=[];return e(l=>(s.push(setTimeout(()=>e(!1),1e3)),l?(s.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>s.forEach(clearTimeout)},[e]);return[n,i]}function zN(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",s=>{s.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",s=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";Ki.getString("theme",e)==="dark-mode"?document.documentElement.classList.add("dark-mode"):document.documentElement.classList.add("light-mode")}const Ch=new Set;function Mw(){const n=ch(),e=n==="dark-mode"?"light-mode":"dark-mode";document.documentElement.classList.remove(n),document.documentElement.classList.add(e),Ki.setString("theme",e);for(const i of Ch)i(e)}function qN(n){Ch.add(n)}function $N(n){Ch.delete(n)}function ch(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":"light-mode"}function Ow(){const[n,e]=Yt.useState(ch()==="dark-mode");return[n,i=>{ch()==="dark-mode"!==i&&Mw(),e(i)}]}var qf={exports:{}},Ea={},$f={exports:{}},If={};/**
|
19
|
+
* @license React
|
20
|
+
* scheduler.production.js
|
21
|
+
*
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and 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 gy;function Lw(){return gy||(gy=1,(function(n){function e(z,Z){var ne=z.length;z.push(Z);e:for(;0<ne;){var Se=ne-1>>>1,C=z[Se];if(0<l(C,Z))z[Se]=Z,z[ne]=C,ne=Se;else break e}}function i(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var Z=z[0],ne=z.pop();if(ne!==Z){z[0]=ne;e:for(var Se=0,C=z.length,X=C>>>1;Se<X;){var Q=2*(Se+1)-1,W=z[Q],se=Q+1,ve=z[se];if(0>l(W,ne))se<C&&0>l(ve,W)?(z[Se]=ve,z[se]=ne,Se=se):(z[Se]=W,z[Q]=ne,Se=Q);else if(se<C&&0>l(ve,ne))z[Se]=ve,z[se]=ne,Se=se;else break e}}return Z}function l(z,Z){var ne=z.sortIndex-Z.sortIndex;return ne!==0?ne:z.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var d=[],p=[],m=1,y=null,b=3,w=!1,T=!1,x=!1,E=!1,k=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function $(z){for(var Z=i(p);Z!==null;){if(Z.callback===null)s(p);else if(Z.startTime<=z)s(p),Z.sortIndex=Z.expirationTime,e(d,Z);else break;Z=i(p)}}function B(z){if(x=!1,$(z),!T)if(i(d)!==null)T=!0,Y||(Y=!0,L());else{var Z=i(p);Z!==null&&me(B,Z.startTime-z)}}var Y=!1,J=-1,I=5,j=-1;function te(){return E?!0:!(n.unstable_now()-j<I)}function re(){if(E=!1,Y){var z=n.unstable_now();j=z;var Z=!0;try{e:{T=!1,x&&(x=!1,N(J),J=-1),w=!0;var ne=b;try{t:{for($(z),y=i(d);y!==null&&!(y.expirationTime>z&&te());){var Se=y.callback;if(typeof Se=="function"){y.callback=null,b=y.priorityLevel;var C=Se(y.expirationTime<=z);if(z=n.unstable_now(),typeof C=="function"){y.callback=C,$(z),Z=!0;break t}y===i(d)&&s(d),$(z)}else s(d);y=i(d)}if(y!==null)Z=!0;else{var X=i(p);X!==null&&me(B,X.startTime-z),Z=!1}}break e}finally{y=null,b=ne,w=!1}Z=void 0}}finally{Z?L():Y=!1}}}var L;if(typeof V=="function")L=function(){V(re)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ge=F.port2;F.port1.onmessage=re,L=function(){ge.postMessage(null)}}else L=function(){k(re,0)};function me(z,Z){J=k(function(){z(n.unstable_now())},Z)}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(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(z){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var ne=b;b=Z;try{return z()}finally{b=ne}},n.unstable_requestPaint=function(){E=!0},n.unstable_runWithPriority=function(z,Z){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ne=b;b=z;try{return Z()}finally{b=ne}},n.unstable_scheduleCallback=function(z,Z,ne){var Se=n.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?Se+ne:Se):ne=Se,z){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=ne+C,z={id:m++,callback:Z,priorityLevel:z,startTime:ne,expirationTime:C,sortIndex:-1},ne>Se?(z.sortIndex=ne,e(p,z),i(d)===null&&z===i(p)&&(x?(N(J),J=-1):x=!0,me(B,ne-Se))):(z.sortIndex=C,e(d,z),T||w||(T=!0,Y||(Y=!0,L()))),z},n.unstable_shouldYield=te,n.unstable_wrapCallback=function(z){var Z=b;return function(){var ne=b;b=Z;try{return z.apply(this,arguments)}finally{b=ne}}}})(If)),If}var my;function jw(){return my||(my=1,$f.exports=Lw()),$f.exports}var Vf={exports:{}},mt={};/**
|
27
|
+
* @license React
|
28
|
+
* react-dom.production.js
|
29
|
+
*
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and 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 yy;function Rw(){if(yy)return mt;yy=1;var n=Nh();function e(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(d,p,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:d,containerInfo:p,implementation:m}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,mt.createPortal=function(d,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return o(d,p,null,m)},mt.flushSync=function(d){var p=u.T,m=s.p;try{if(u.T=null,s.p=2,d)return d()}finally{u.T=p,s.p=m,s.d.f()}},mt.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(d,p))},mt.prefetchDNS=function(d){typeof d=="string"&&s.d.D(d)},mt.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,w=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?s.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:w}):m==="script"&&s.d.X(d,{crossOrigin:y,integrity:b,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},mt.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);s.d.M(d,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(d)},mt.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,y=f(m,p.crossOrigin);s.d.L(d,m,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},mt.preloadModule=function(d,p){if(typeof d=="string")if(p){var m=f(p.as,p.crossOrigin);s.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(d)},mt.requestFormReset=function(d){s.d.r(d)},mt.unstable_batchedUpdates=function(d,p){return d(p)},mt.useFormState=function(d,p,m){return u.H.useFormState(d,p,m)},mt.useFormStatus=function(){return u.H.useHostTransitionStatus()},mt.version="19.1.1",mt}var by;function Dw(){if(by)return Vf.exports;by=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(),Vf.exports=Rw(),Vf.exports}/**
|
35
|
+
* @license React
|
36
|
+
* react-dom-client.production.js
|
37
|
+
*
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
39
|
+
*
|
40
|
+
* This source code is licensed under the MIT license found in the
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
42
|
+
*/var vy;function Bw(){if(vy)return Ea;vy=1;var n=jw(),e=Nh(),i=Dw();function s(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function u(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(o(t)!==t)throw Error(s(188))}function d(t){var r=t.alternate;if(!r){if(r=o(t),r===null)throw Error(s(188));return r!==t?null:t}for(var a=t,c=r;;){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 f(h),t;if(g===c)return f(h),r;g=g.sibling}throw Error(s(188))}if(a.return!==c.return)a=h,c=g;else{for(var S=!1,_=h.child;_;){if(_===a){S=!0,a=h,c=g;break}if(_===c){S=!0,c=h,a=g;break}_=_.sibling}if(!S){for(_=g.child;_;){if(_===a){S=!0,a=g,c=h;break}if(_===c){S=!0,c=g,a=h;break}_=_.sibling}if(!S)throw Error(s(189))}}if(a.alternate!==c)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?t:r}function p(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=p(t),r!==null)return r;t=t.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),N=Symbol.for("react.consumer"),V=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function L(t){return t===null||typeof t!="object"?null:(t=re&&t[re]||t["@@iterator"],typeof t=="function"?t:null)}var F=Symbol.for("react.client.reference");function ge(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===F?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case T:return"Fragment";case E:return"Profiler";case x:return"StrictMode";case B:return"Suspense";case Y:return"SuspenseList";case j:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case V:return(t.displayName||"Context")+".Provider";case N:return(t._context.displayName||"Context")+".Consumer";case $:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case J:return r=t.displayName||null,r!==null?r:ge(t.type)||"Memo";case I:r=t._payload,t=t._init;try{return ge(t(r))}catch{}}return null}var me=Array.isArray,z=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},Se=[],C=-1;function X(t){return{current:t}}function Q(t){0>C||(t.current=Se[C],Se[C]=null,C--)}function W(t,r){C++,Se[C]=t.current,t.current=r}var se=X(null),ve=X(null),ue=X(null),We=X(null);function xe(t,r){switch(W(ue,r),W(ve,t),W(se,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?Um(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=Um(r),t=Hm(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Q(se),W(se,t)}function gn(){Q(se),Q(ve),Q(ue)}function ss(t){t.memoizedState!==null&&W(We,t);var r=se.current,a=Hm(r,t.type);r!==a&&(W(ve,t),W(se,a))}function ht(t){ve.current===t&&(Q(se),Q(ve)),We.current===t&&(Q(We),ba._currentValue=ne)}var rs=Object.prototype.hasOwnProperty,xr=n.unstable_scheduleCallback,_r=n.unstable_cancelCallback,Er=n.unstable_shouldYield,sl=n.unstable_requestPaint,Ut=n.unstable_now,Xn=n.unstable_getCurrentPriorityLevel,rl=n.unstable_ImmediatePriority,al=n.unstable_UserBlockingPriority,as=n.unstable_NormalPriority,xc=n.unstable_LowPriority,Tr=n.unstable_IdlePriority,Ar=n.log,_c=n.unstable_setDisableYieldValue,_i=null,vt=null;function Tt(t){if(typeof Ar=="function"&&_c(t),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(_i,t)}catch{}}var rt=Math.clz32?Math.clz32:Tc,ls=Math.log,Ec=Math.LN2;function Tc(t){return t>>>=0,t===0?32:31-(ls(t)/Ec|0)|0}var Ei=256,le=4194304;function dt(t){var r=t&42;if(r!==0)return r;switch(t&-t){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:return 64;case 128:return 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 t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function At(t,r,a){var c=t.pendingLanes;if(c===0)return 0;var h=0,g=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var _=c&134217727;return _!==0?(c=_&~g,c!==0?h=dt(c):(S&=_,S!==0?h=dt(S):a||(a=_&~t,a!==0&&(h=dt(a))))):(_=c&~g,_!==0?h=dt(_):S!==0?h=dt(S):a||(a=c&~t,a!==0&&(h=dt(a)))),h===0?0:r!==0&&r!==h&&(r&g)===0&&(g=h&-h,a=r&-r,g>=a||g===32&&(a&4194048)!==0)?r:h}function Nr(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function oS(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sd(){var t=Ei;return Ei<<=1,(Ei&4194048)===0&&(Ei=256),t}function wd(){var t=le;return le<<=1,(le&62914560)===0&&(le=4194304),t}function Ac(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function Cr(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function cS(t,r,a,c,h,g){var S=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var _=t.entanglements,A=t.expirationTimes,D=t.hiddenUpdates;for(a=S&~a;0<a;){var G=31-rt(a),P=1<<G;_[G]=0,A[G]=-1;var U=D[G];if(U!==null)for(D[G]=null,G=0;G<U.length;G++){var H=U[G];H!==null&&(H.lane&=-536870913)}a&=~P}c!==0&&xd(t,c,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(S&~r))}function xd(t,r,a){t.pendingLanes|=r,t.suspendedLanes&=~r;var c=31-rt(r);t.entangledLanes|=r,t.entanglements[c]=t.entanglements[c]|1073741824|a&4194090}function _d(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var c=31-rt(a),h=1<<c;h&r|t[c]&r&&(t[c]|=r),a&=~h}}function Nc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Cc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ed(){var t=Z.p;return t!==0?t:(t=window.event,t===void 0?32:iy(t.type))}function uS(t,r){var a=Z.p;try{return Z.p=t,r()}finally{Z.p=a}}var Pn=Math.random().toString(36).slice(2),pt="__reactFiber$"+Pn,Nt="__reactProps$"+Pn,os="__reactContainer$"+Pn,kc="__reactEvents$"+Pn,fS="__reactListeners$"+Pn,hS="__reactHandles$"+Pn,Td="__reactResources$"+Pn,kr="__reactMarker$"+Pn;function Mc(t){delete t[pt],delete t[Nt],delete t[kc],delete t[fS],delete t[hS]}function cs(t){var r=t[pt];if(r)return r;for(var a=t.parentNode;a;){if(r=a[os]||a[pt]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=Im(t);t!==null;){if(a=t[pt])return a;t=Im(t)}return r}t=a,a=t.parentNode}return null}function us(t){if(t=t[pt]||t[os]){var r=t.tag;if(r===5||r===6||r===13||r===26||r===27||r===3)return t}return null}function Mr(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(s(33))}function fs(t){var r=t[Td];return r||(r=t[Td]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function et(t){t[kr]=!0}var Ad=new Set,Nd={};function Ti(t,r){hs(t,r),hs(t+"Capture",r)}function hs(t,r){for(Nd[t]=r,t=0;t<r.length;t++)Ad.add(r[t])}var dS=RegExp("^[: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]*$"),Cd={},kd={};function pS(t){return rs.call(kd,t)?!0:rs.call(Cd,t)?!1:dS.test(t)?kd[t]=!0:(Cd[t]=!0,!1)}function ll(t,r,a){if(pS(r))if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var c=r.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+a)}}function ol(t,r,a){if(a===null)t.removeAttribute(r);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+a)}}function Tn(t,r,a,c){if(c===null)t.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(r,a,""+c)}}var Oc,Md;function ds(t){if(Oc===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);Oc=r&&r[1]||"",Md=-1<a.stack.indexOf(`
|
43
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
44
|
+
`+Oc+t+Md}var Lc=!1;function jc(t,r){if(!t||Lc)return"";Lc=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(r){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(H){var U=H}Reflect.construct(t,[],P)}else{try{P.call()}catch(H){U=H}t.call(P.prototype)}}else{try{throw Error()}catch(H){U=H}(P=t())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(H){if(H&&U&&typeof H.stack=="string")return[H.stack,U.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),S=g[0],_=g[1];if(S&&_){var A=S.split(`
|
45
|
+
`),D=_.split(`
|
46
|
+
`);for(h=c=0;c<A.length&&!A[c].includes("DetermineComponentFrameRoot");)c++;for(;h<D.length&&!D[h].includes("DetermineComponentFrameRoot");)h++;if(c===A.length||h===D.length)for(c=A.length-1,h=D.length-1;1<=c&&0<=h&&A[c]!==D[h];)h--;for(;1<=c&&0<=h;c--,h--)if(A[c]!==D[h]){if(c!==1||h!==1)do if(c--,h--,0>h||A[c]!==D[h]){var G=`
|
47
|
+
`+A[c].replace(" at new "," at ");return t.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",t.displayName)),G}while(1<=c&&0<=h);break}}}finally{Lc=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?ds(a):""}function gS(t){switch(t.tag){case 26:case 27:case 5:return ds(t.type);case 16:return ds("Lazy");case 13:return ds("Suspense");case 19:return ds("SuspenseList");case 0:case 15:return jc(t.type,!1);case 11:return jc(t.type.render,!1);case 1:return jc(t.type,!0);case 31:return ds("Activity");default:return""}}function Od(t){try{var r="";do r+=gS(t),t=t.return;while(t);return r}catch(a){return`
|
48
|
+
Error generating stack: `+a.message+`
|
49
|
+
`+a.stack}}function Pt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ld(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function mS(t){var r=Ld(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,g=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return h.call(this)},set:function(S){c=""+S,g.call(this,S)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(S){c=""+S},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function cl(t){t._valueTracker||(t._valueTracker=mS(t))}function jd(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return t&&(c=Ld(t)?t.checked?"true":"false":t.value),t=c,t!==a?(r.setValue(t),!0):!1}function ul(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var yS=/[\n"\\]/g;function Ft(t){return t.replace(yS,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Rc(t,r,a,c,h,g,S,_){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),r!=null?S==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+Pt(r)):t.value!==""+Pt(r)&&(t.value=""+Pt(r)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),r!=null?Dc(t,S,Pt(r)):a!=null?Dc(t,S,Pt(a)):c!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Pt(_):t.removeAttribute("name")}function Rd(t,r,a,c,h,g,S,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),r!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||r!=null))return;a=a!=null?""+Pt(a):"",r=r!=null?""+Pt(r):a,_||r===t.value||(t.value=r),t.defaultValue=r}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=_?t.checked:!!c,t.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S)}function Dc(t,r,a){r==="number"&&ul(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function ps(t,r,a,c){if(t=t.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=r.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&c&&(t[a].defaultSelected=!0)}else{for(a=""+Pt(a),r=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}r!==null||t[h].disabled||(r=t[h])}r!==null&&(r.selected=!0)}}function Dd(t,r,a){if(r!=null&&(r=""+Pt(r),r!==t.value&&(t.value=r),a==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=a!=null?""+Pt(a):""}function Bd(t,r,a,c){if(r==null){if(c!=null){if(a!=null)throw Error(s(92));if(me(c)){if(1<c.length)throw Error(s(93));c=c[0]}a=c}a==null&&(a=""),r=a}a=Pt(r),t.defaultValue=a,c=t.textContent,c===a&&c!==""&&c!==null&&(t.value=c)}function gs(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var bS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ud(t,r,a){var c=r.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":c?t.setProperty(r,a):typeof a!="number"||a===0||bS.has(r)?r==="float"?t.cssFloat=a:t[r]=(""+a).trim():t[r]=a+"px"}function Hd(t,r,a){if(r!=null&&typeof r!="object")throw Error(s(62));if(t=t.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||r!=null&&r.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var h in r)c=r[h],r.hasOwnProperty(h)&&a[h]!==c&&Ud(t,h,c)}else for(var g in r)r.hasOwnProperty(g)&&Ud(t,g,r[g])}function Bc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 vS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),SS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fl(t){return SS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Uc=null;function Hc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ms=null,ys=null;function zd(t){var r=us(t);if(r&&(t=r.stateNode)){var a=t[Nt]||null;e:switch(t=r.stateNode,r.type){case"input":if(Rc(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ft(""+r)+'"][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==t&&c.form===t.form){var h=c[Nt]||null;if(!h)throw Error(s(90));Rc(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(r=0;r<a.length;r++)c=a[r],c.form===t.form&&jd(c)}break e;case"textarea":Dd(t,a.value,a.defaultValue);break e;case"select":r=a.value,r!=null&&ps(t,!!a.multiple,r,!1)}}}var zc=!1;function qd(t,r,a){if(zc)return t(r,a);zc=!0;try{var c=t(r);return c}finally{if(zc=!1,(ms!==null||ys!==null)&&(Ql(),ms&&(r=ms,t=ys,ys=ms=null,zd(r),t)))for(r=0;r<t.length;r++)zd(t[r])}}function Or(t,r){var a=t.stateNode;if(a===null)return null;var c=a[Nt]||null;if(c===null)return null;a=c[r];e:switch(r){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)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qc=!1;if(An)try{var Lr={};Object.defineProperty(Lr,"passive",{get:function(){qc=!0}}),window.addEventListener("test",Lr,Lr),window.removeEventListener("test",Lr,Lr)}catch{qc=!1}var Fn=null,$c=null,hl=null;function $d(){if(hl)return hl;var t,r=$c,a=r.length,c,h="value"in Fn?Fn.value:Fn.textContent,g=h.length;for(t=0;t<a&&r[t]===h[t];t++);var S=a-t;for(c=1;c<=S&&r[a-c]===h[g-c];c++);return hl=h.slice(t,1<c?1-c:void 0)}function dl(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function pl(){return!0}function Id(){return!1}function Ct(t){function r(a,c,h,g,S){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=g,this.target=S,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?pl:Id,this.isPropagationStopped=Id,this}return m(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=pl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=pl)},persist:function(){},isPersistent:pl}),r}var Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gl=Ct(Ai),jr=m({},Ai,{view:0,detail:0}),wS=Ct(jr),Ic,Vc,Rr,ml=m({},jr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Rr&&(Rr&&t.type==="mousemove"?(Ic=t.screenX-Rr.screenX,Vc=t.screenY-Rr.screenY):Vc=Ic=0,Rr=t),Ic)},movementY:function(t){return"movementY"in t?t.movementY:Vc}}),Vd=Ct(ml),xS=m({},ml,{dataTransfer:0}),_S=Ct(xS),ES=m({},jr,{relatedTarget:0}),Gc=Ct(ES),TS=m({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),AS=Ct(TS),NS=m({},Ai,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),CS=Ct(NS),kS=m({},Ai,{data:0}),Gd=Ct(kS),MS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},OS={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"},LS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jS(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=LS[t])?!!r[t]:!1}function Kc(){return jS}var RS=m({},jr,{key:function(t){if(t.key){var r=MS[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=dl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?OS[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kc,charCode:function(t){return t.type==="keypress"?dl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?dl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),DS=Ct(RS),BS=m({},ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kd=Ct(BS),US=m({},jr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kc}),HS=Ct(US),zS=m({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),qS=Ct(zS),$S=m({},ml,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),IS=Ct($S),VS=m({},Ai,{newState:0,oldState:0}),GS=Ct(VS),KS=[9,13,27,32],Yc=An&&"CompositionEvent"in window,Dr=null;An&&"documentMode"in document&&(Dr=document.documentMode);var YS=An&&"TextEvent"in window&&!Dr,Yd=An&&(!Yc||Dr&&8<Dr&&11>=Dr),Xd=" ",Pd=!1;function Fd(t,r){switch(t){case"keyup":return KS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var bs=!1;function XS(t,r){switch(t){case"compositionend":return Qd(r);case"keypress":return r.which!==32?null:(Pd=!0,Xd);case"textInput":return t=r.data,t===Xd&&Pd?null:t;default:return null}}function PS(t,r){if(bs)return t==="compositionend"||!Yc&&Fd(t,r)?(t=$d(),hl=$c=Fn=null,bs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Yd&&r.locale!=="ko"?null:r.data;default:return null}}var FS={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 Zd(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!FS[t.type]:r==="textarea"}function Jd(t,r,a,c){ms?ys?ys.push(c):ys=[c]:ms=c,r=no(r,"onChange"),0<r.length&&(a=new gl("onChange","change",null,a,c),t.push({event:a,listeners:r}))}var Br=null,Ur=null;function QS(t){Lm(t,0)}function yl(t){var r=Mr(t);if(jd(r))return t}function Wd(t,r){if(t==="change")return r}var ep=!1;if(An){var Xc;if(An){var Pc="oninput"in document;if(!Pc){var tp=document.createElement("div");tp.setAttribute("oninput","return;"),Pc=typeof tp.oninput=="function"}Xc=Pc}else Xc=!1;ep=Xc&&(!document.documentMode||9<document.documentMode)}function np(){Br&&(Br.detachEvent("onpropertychange",ip),Ur=Br=null)}function ip(t){if(t.propertyName==="value"&&yl(Ur)){var r=[];Jd(r,Ur,t,Hc(t)),qd(QS,r)}}function ZS(t,r,a){t==="focusin"?(np(),Br=r,Ur=a,Br.attachEvent("onpropertychange",ip)):t==="focusout"&&np()}function JS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return yl(Ur)}function WS(t,r){if(t==="click")return yl(r)}function e1(t,r){if(t==="input"||t==="change")return yl(r)}function t1(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Ht=typeof Object.is=="function"?Object.is:t1;function Hr(t,r){if(Ht(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!rs.call(r,h)||!Ht(t[h],r[h]))return!1}return!0}function sp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function rp(t,r){var a=sp(t);t=0;for(var c;a;){if(a.nodeType===3){if(c=t+a.textContent.length,t<=r&&c>=r)return{node:a,offset:r-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=sp(a)}}function ap(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?ap(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function lp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=ul(t.document);r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=ul(t.document)}return r}function Fc(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var n1=An&&"documentMode"in document&&11>=document.documentMode,vs=null,Qc=null,zr=null,Zc=!1;function op(t,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Zc||vs==null||vs!==ul(c)||(c=vs,"selectionStart"in c&&Fc(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}),zr&&Hr(zr,c)||(zr=c,c=no(Qc,"onSelect"),0<c.length&&(r=new gl("onSelect","select",null,r,a),t.push({event:r,listeners:c}),r.target=vs)))}function Ni(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var Ss={animationend:Ni("Animation","AnimationEnd"),animationiteration:Ni("Animation","AnimationIteration"),animationstart:Ni("Animation","AnimationStart"),transitionrun:Ni("Transition","TransitionRun"),transitionstart:Ni("Transition","TransitionStart"),transitioncancel:Ni("Transition","TransitionCancel"),transitionend:Ni("Transition","TransitionEnd")},Jc={},cp={};An&&(cp=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function Ci(t){if(Jc[t])return Jc[t];if(!Ss[t])return t;var r=Ss[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in cp)return Jc[t]=r[a];return t}var up=Ci("animationend"),fp=Ci("animationiteration"),hp=Ci("animationstart"),i1=Ci("transitionrun"),s1=Ci("transitionstart"),r1=Ci("transitioncancel"),dp=Ci("transitionend"),pp=new Map,Wc="abort auxClick beforeToggle 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(" ");Wc.push("scrollEnd");function cn(t,r){pp.set(t,r),Ti(r,[t])}var gp=new WeakMap;function Qt(t,r){if(typeof t=="object"&&t!==null){var a=gp.get(t);return a!==void 0?a:(r={value:t,source:r,stack:Od(r)},gp.set(t,r),r)}return{value:t,source:r,stack:Od(r)}}var Zt=[],ws=0,eu=0;function bl(){for(var t=ws,r=eu=ws=0;r<t;){var a=Zt[r];Zt[r++]=null;var c=Zt[r];Zt[r++]=null;var h=Zt[r];Zt[r++]=null;var g=Zt[r];if(Zt[r++]=null,c!==null&&h!==null){var S=c.pending;S===null?h.next=h:(h.next=S.next,S.next=h),c.pending=h}g!==0&&mp(a,h,g)}}function vl(t,r,a,c){Zt[ws++]=t,Zt[ws++]=r,Zt[ws++]=a,Zt[ws++]=c,eu|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function tu(t,r,a,c){return vl(t,r,a,c),Sl(t)}function xs(t,r){return vl(t,null,null,r),Sl(t)}function mp(t,r,a){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a);for(var h=!1,g=t.return;g!==null;)g.childLanes|=a,c=g.alternate,c!==null&&(c.childLanes|=a),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&r!==null&&(h=31-rt(a),t=g.hiddenUpdates,c=t[h],c===null?t[h]=[r]:c.push(r),r.lane=a|536870912),g):null}function Sl(t){if(50<ua)throw ua=0,of=null,Error(s(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var _s={};function a1(t,r,a,c){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,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 zt(t,r,a,c){return new a1(t,r,a,c)}function nu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Nn(t,r){var a=t.alternate;return a===null?(a=zt(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function yp(t,r){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,r=a.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function wl(t,r,a,c,h,g){var S=0;if(c=t,typeof t=="function")nu(t)&&(S=1);else if(typeof t=="string")S=ow(t,a,se.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case j:return t=zt(31,a,r,h),t.elementType=j,t.lanes=g,t;case T:return ki(a.children,h,g,r);case x:S=8,h|=24;break;case E:return t=zt(12,a,r,h|2),t.elementType=E,t.lanes=g,t;case B:return t=zt(13,a,r,h),t.elementType=B,t.lanes=g,t;case Y:return t=zt(19,a,r,h),t.elementType=Y,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case k:case V:S=10;break e;case N:S=9;break e;case $:S=11;break e;case J:S=14;break e;case I:S=16,c=null;break e}S=29,a=Error(s(130,t===null?"null":typeof t,"")),c=null}return r=zt(S,a,r,h),r.elementType=t,r.type=c,r.lanes=g,r}function ki(t,r,a,c){return t=zt(7,t,c,r),t.lanes=a,t}function iu(t,r,a){return t=zt(6,t,null,r),t.lanes=a,t}function su(t,r,a){return r=zt(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var Es=[],Ts=0,xl=null,_l=0,Jt=[],Wt=0,Mi=null,Cn=1,kn="";function Oi(t,r){Es[Ts++]=_l,Es[Ts++]=xl,xl=t,_l=r}function bp(t,r,a){Jt[Wt++]=Cn,Jt[Wt++]=kn,Jt[Wt++]=Mi,Mi=t;var c=Cn;t=kn;var h=32-rt(c)-1;c&=~(1<<h),a+=1;var g=32-rt(r)+h;if(30<g){var S=h-h%5;g=(c&(1<<S)-1).toString(32),c>>=S,h-=S,Cn=1<<32-rt(r)+h|a<<h|c,kn=g+t}else Cn=1<<g|a<<h|c,kn=t}function ru(t){t.return!==null&&(Oi(t,1),bp(t,1,0))}function au(t){for(;t===xl;)xl=Es[--Ts],Es[Ts]=null,_l=Es[--Ts],Es[Ts]=null;for(;t===Mi;)Mi=Jt[--Wt],Jt[Wt]=null,kn=Jt[--Wt],Jt[Wt]=null,Cn=Jt[--Wt],Jt[Wt]=null}var St=null,$e=null,Ee=!1,Li=null,mn=!1,lu=Error(s(519));function ji(t){var r=Error(s(418,""));throw Ir(Qt(r,t)),lu}function vp(t){var r=t.stateNode,a=t.type,c=t.memoizedProps;switch(r[pt]=t,r[Nt]=c,a){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(a=0;a<ha.length;a++)be(ha[a],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":be("invalid",r),Rd(r,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),cl(r);break;case"select":be("invalid",r);break;case"textarea":be("invalid",r),Bd(r,c.value,c.defaultValue,c.children),cl(r)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||r.textContent===""+a||c.suppressHydrationWarning===!0||Bm(r.textContent,a)?(c.popover!=null&&(be("beforetoggle",r),be("toggle",r)),c.onScroll!=null&&be("scroll",r),c.onScrollEnd!=null&&be("scrollend",r),c.onClick!=null&&(r.onclick=io),r=!0):r=!1,r||ji(t)}function Sp(t){for(St=t.return;St;)switch(St.tag){case 5:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:St=St.return}}function qr(t){if(t!==St)return!1;if(!Ee)return Sp(t),Ee=!0,!1;var r=t.tag,a;if((a=r!==3&&r!==27)&&((a=r===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Ef(t.type,t.memoizedProps)),a=!a),a&&$e&&ji(t),Sp(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8)if(a=t.data,a==="/$"){if(r===0){$e=fn(t.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++;t=t.nextSibling}$e=null}}else r===27?(r=$e,fi(t.type)?(t=Cf,Cf=null,$e=t):$e=r):$e=St?fn(t.stateNode.nextSibling):null;return!0}function $r(){$e=St=null,Ee=!1}function wp(){var t=Li;return t!==null&&(Ot===null?Ot=t:Ot.push.apply(Ot,t),Li=null),t}function Ir(t){Li===null?Li=[t]:Li.push(t)}var ou=X(null),Ri=null,Mn=null;function Qn(t,r,a){W(ou,r._currentValue),r._currentValue=a}function On(t){t._currentValue=ou.current,Q(ou)}function cu(t,r,a){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===a)break;t=t.return}}function uu(t,r,a,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var S=h.child;g=g.firstContext;e:for(;g!==null;){var _=g;g=h;for(var A=0;A<r.length;A++)if(_.context===r[A]){g.lanes|=a,_=g.alternate,_!==null&&(_.lanes|=a),cu(g.return,a,t),c||(S=null);break e}g=_.next}}else if(h.tag===18){if(S=h.return,S===null)throw Error(s(341));S.lanes|=a,g=S.alternate,g!==null&&(g.lanes|=a),cu(S,a,t),S=null}else S=h.child;if(S!==null)S.return=h;else for(S=h;S!==null;){if(S===t){S=null;break}if(h=S.sibling,h!==null){h.return=S.return,S=h;break}S=S.return}h=S}}function Vr(t,r,a,c){t=null;for(var h=r,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var S=h.alternate;if(S===null)throw Error(s(387));if(S=S.memoizedProps,S!==null){var _=h.type;Ht(h.pendingProps.value,S.value)||(t!==null?t.push(_):t=[_])}}else if(h===We.current){if(S=h.alternate,S===null)throw Error(s(387));S.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(ba):t=[ba])}h=h.return}t!==null&&uu(r,t,a,c),r.flags|=262144}function El(t){for(t=t.firstContext;t!==null;){if(!Ht(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Di(t){Ri=t,Mn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function gt(t){return xp(Ri,t)}function Tl(t,r){return Ri===null&&Di(t),xp(t,r)}function xp(t,r){var a=r._currentValue;if(r={context:r,memoizedValue:a,next:null},Mn===null){if(t===null)throw Error(s(308));Mn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Mn=Mn.next=r;return a}var l1=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(a,c){t.push(c)}};this.abort=function(){r.aborted=!0,t.forEach(function(a){return a()})}},o1=n.unstable_scheduleCallback,c1=n.unstable_NormalPriority,Qe={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fu(){return{controller:new l1,data:new Map,refCount:0}}function Gr(t){t.refCount--,t.refCount===0&&o1(c1,function(){t.controller.abort()})}var Kr=null,hu=0,As=0,Ns=null;function u1(t,r){if(Kr===null){var a=Kr=[];hu=0,As=gf(),Ns={status:"pending",value:void 0,then:function(c){a.push(c)}}}return hu++,r.then(_p,_p),r}function _p(){if(--hu===0&&Kr!==null){Ns!==null&&(Ns.status="fulfilled");var t=Kr;Kr=null,As=0,Ns=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function f1(t,r){var a=[],c={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return t.then(function(){c.status="fulfilled",c.value=r;for(var h=0;h<a.length;h++)(0,a[h])(r)},function(h){for(c.status="rejected",c.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),c}var Ep=z.S;z.S=function(t,r){typeof r=="object"&&r!==null&&typeof r.then=="function"&&u1(t,r),Ep!==null&&Ep(t,r)};var Bi=X(null);function du(){var t=Bi.current;return t!==null?t:je.pooledCache}function Al(t,r){r===null?W(Bi,Bi.current):W(Bi,r.pool)}function Tp(){var t=du();return t===null?null:{parent:Qe._currentValue,pool:t}}var Yr=Error(s(460)),Ap=Error(s(474)),Nl=Error(s(542)),pu={then:function(){}};function Np(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Cl(){}function Cp(t,r,a){switch(a=t[a],a===void 0?t.push(r):a!==r&&(r.then(Cl,Cl),r=a),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Mp(t),t;default:if(typeof r.status=="string")r.then(Cl,Cl);else{if(t=je,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=r,t.status="pending",t.then(function(c){if(r.status==="pending"){var h=r;h.status="fulfilled",h.value=c}},function(c){if(r.status==="pending"){var h=r;h.status="rejected",h.reason=c}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Mp(t),t}throw Xr=r,Yr}}var Xr=null;function kp(){if(Xr===null)throw Error(s(459));var t=Xr;return Xr=null,t}function Mp(t){if(t===Yr||t===Nl)throw Error(s(483))}var Zn=!1;function gu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mu(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Jn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Wn(t,r,a){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Te&2)!==0){var h=c.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),c.pending=r,r=Sl(t),mp(t,null,a),r}return vl(t,c,r,a),Sl(t)}function Pr(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194048)!==0)){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,_d(t,a)}}function yu(t,r){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?h=g=S:g=g.next=S,a=a.next}while(a!==null);g===null?h=g=r:g=g.next=r}else h=g=r;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}var bu=!1;function Fr(){if(bu){var t=Ns;if(t!==null)throw t}}function Qr(t,r,a,c){bu=!1;var h=t.updateQueue;Zn=!1;var g=h.firstBaseUpdate,S=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var A=_,D=A.next;A.next=null,S===null?g=D:S.next=D,S=A;var G=t.alternate;G!==null&&(G=G.updateQueue,_=G.lastBaseUpdate,_!==S&&(_===null?G.firstBaseUpdate=D:_.next=D,G.lastBaseUpdate=A))}if(g!==null){var P=h.baseState;S=0,G=D=A=null,_=g;do{var U=_.lane&-536870913,H=U!==_.lane;if(H?(we&U)===U:(c&U)===U){U!==0&&U===As&&(bu=!0),G!==null&&(G=G.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ce=t,ae=_;U=r;var Me=a;switch(ae.tag){case 1:if(ce=ae.payload,typeof ce=="function"){P=ce.call(Me,P,U);break e}P=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ae.payload,U=typeof ce=="function"?ce.call(Me,P,U):ce,U==null)break e;P=m({},P,U);break e;case 2:Zn=!0}}U=_.callback,U!==null&&(t.flags|=64,H&&(t.flags|=8192),H=h.callbacks,H===null?h.callbacks=[U]:H.push(U))}else H={lane:U,tag:_.tag,payload:_.payload,callback:_.callback,next:null},G===null?(D=G=H,A=P):G=G.next=H,S|=U;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;H=_,_=H.next,H.next=null,h.lastBaseUpdate=H,h.shared.pending=null}}while(!0);G===null&&(A=P),h.baseState=A,h.firstBaseUpdate=D,h.lastBaseUpdate=G,g===null&&(h.shared.lanes=0),li|=S,t.lanes=S,t.memoizedState=P}}function Op(t,r){if(typeof t!="function")throw Error(s(191,t));t.call(r)}function Lp(t,r){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Op(a[t],r)}var Cs=X(null),kl=X(0);function jp(t,r){t=Hn,W(kl,t),W(Cs,r),Hn=t|r.baseLanes}function vu(){W(kl,Hn),W(Cs,Cs.current)}function Su(){Hn=kl.current,Q(Cs),Q(kl)}var ei=0,de=null,Ce=null,Xe=null,Ml=!1,ks=!1,Ui=!1,Ol=0,Zr=0,Ms=null,h1=0;function Ve(){throw Error(s(321))}function wu(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!Ht(t[a],r[a]))return!1;return!0}function xu(t,r,a,c,h,g){return ei=g,de=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,z.H=t===null||t.memoizedState===null?mg:yg,Ui=!1,g=a(c,h),Ui=!1,ks&&(g=Dp(r,a,c,h)),Rp(t),g}function Rp(t){z.H=Ul;var r=Ce!==null&&Ce.next!==null;if(ei=0,Xe=Ce=de=null,Ml=!1,Zr=0,Ms=null,r)throw Error(s(300));t===null||tt||(t=t.dependencies,t!==null&&El(t)&&(tt=!0))}function Dp(t,r,a,c){de=t;var h=0;do{if(ks&&(Ms=null),Zr=0,ks=!1,25<=h)throw Error(s(301));if(h+=1,Xe=Ce=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}z.H=v1,g=r(a,c)}while(ks);return g}function d1(){var t=z.H,r=t.useState()[0];return r=typeof r.then=="function"?Jr(r):r,t=t.useState()[0],(Ce!==null?Ce.memoizedState:null)!==t&&(de.flags|=1024),r}function _u(){var t=Ol!==0;return Ol=0,t}function Eu(t,r,a){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~a}function Tu(t){if(Ml){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}Ml=!1}ei=0,Xe=Ce=de=null,ks=!1,Zr=Ol=0,Ms=null}function kt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?de.memoizedState=Xe=t:Xe=Xe.next=t,Xe}function Pe(){if(Ce===null){var t=de.alternate;t=t!==null?t.memoizedState:null}else t=Ce.next;var r=Xe===null?de.memoizedState:Xe.next;if(r!==null)Xe=r,Ce=t;else{if(t===null)throw de.alternate===null?Error(s(467)):Error(s(310));Ce=t,t={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Xe===null?de.memoizedState=Xe=t:Xe=Xe.next=t}return Xe}function Au(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Jr(t){var r=Zr;return Zr+=1,Ms===null&&(Ms=[]),t=Cp(Ms,t,r),r=de,(Xe===null?r.memoizedState:Xe.next)===null&&(r=r.alternate,z.H=r===null||r.memoizedState===null?mg:yg),t}function Ll(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Jr(t);if(t.$$typeof===V)return gt(t)}throw Error(s(438,String(t)))}function Nu(t){var r=null,a=de.updateQueue;if(a!==null&&(r=a.memoCache),r==null){var c=de.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(r={data:c.data.map(function(h){return h.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),a===null&&(a=Au(),de.updateQueue=a),a.memoCache=r,a=r.data[r.index],a===void 0)for(a=r.data[r.index]=Array(t),c=0;c<t;c++)a[c]=te;return r.index++,a}function Ln(t,r){return typeof r=="function"?r(t):r}function jl(t){var r=Pe();return Cu(r,Ce,t)}function Cu(t,r,a){var c=t.queue;if(c===null)throw Error(s(311));c.lastRenderedReducer=a;var h=t.baseQueue,g=c.pending;if(g!==null){if(h!==null){var S=h.next;h.next=g.next,g.next=S}r.baseQueue=h=g,c.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{r=h.next;var _=S=null,A=null,D=r,G=!1;do{var P=D.lane&-536870913;if(P!==D.lane?(we&P)===P:(ei&P)===P){var U=D.revertLane;if(U===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),P===As&&(G=!0);else if((ei&U)===U){D=D.next,U===As&&(G=!0);continue}else P={lane:0,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=P,S=g):A=A.next=P,de.lanes|=U,li|=U;P=D.action,Ui&&a(g,P),g=D.hasEagerState?D.eagerState:a(g,P)}else U={lane:P,revertLane:D.revertLane,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},A===null?(_=A=U,S=g):A=A.next=U,de.lanes|=P,li|=P;D=D.next}while(D!==null&&D!==r);if(A===null?S=g:A.next=_,!Ht(g,t.memoizedState)&&(tt=!0,G&&(a=Ns,a!==null)))throw a;t.memoizedState=g,t.baseState=S,t.baseQueue=A,c.lastRenderedState=g}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function ku(t){var r=Pe(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=t;var c=a.dispatch,h=a.pending,g=r.memoizedState;if(h!==null){a.pending=null;var S=h=h.next;do g=t(g,S.action),S=S.next;while(S!==h);Ht(g,r.memoizedState)||(tt=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),a.lastRenderedState=g}return[g,c]}function Bp(t,r,a){var c=de,h=Pe(),g=Ee;if(g){if(a===void 0)throw Error(s(407));a=a()}else a=r();var S=!Ht((Ce||h).memoizedState,a);S&&(h.memoizedState=a,tt=!0),h=h.queue;var _=zp.bind(null,c,h,t);if(Wr(2048,8,_,[t]),h.getSnapshot!==r||S||Xe!==null&&Xe.memoizedState.tag&1){if(c.flags|=2048,Os(9,Rl(),Hp.bind(null,c,h,a,r),null),je===null)throw Error(s(349));g||(ei&124)!==0||Up(c,r,a)}return a}function Up(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=de.updateQueue,r===null?(r=Au(),de.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function Hp(t,r,a,c){r.value=a,r.getSnapshot=c,qp(r)&&$p(t)}function zp(t,r,a){return a(function(){qp(r)&&$p(t)})}function qp(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!Ht(t,a)}catch{return!0}}function $p(t){var r=xs(t,2);r!==null&&Gt(r,t,2)}function Mu(t){var r=kt();if(typeof t=="function"){var a=t;if(t=a(),Ui){Tt(!0);try{a()}finally{Tt(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:t},r}function Ip(t,r,a,c){return t.baseState=a,Cu(t,Ce,typeof c=="function"?c:Ln)}function p1(t,r,a,c,h){if(Bl(t))throw Error(s(485));if(t=r.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){g.listeners.push(S)}};z.T!==null?a(!0):g.isTransition=!1,c(g),a=r.pending,a===null?(g.next=r.pending=g,Vp(r,g)):(g.next=a.next,r.pending=a.next=g)}}function Vp(t,r){var a=r.action,c=r.payload,h=t.state;if(r.isTransition){var g=z.T,S={};z.T=S;try{var _=a(h,c),A=z.S;A!==null&&A(S,_),Gp(t,r,_)}catch(D){Ou(t,r,D)}finally{z.T=g}}else try{g=a(h,c),Gp(t,r,g)}catch(D){Ou(t,r,D)}}function Gp(t,r,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){Kp(t,r,c)},function(c){return Ou(t,r,c)}):Kp(t,r,a)}function Kp(t,r,a){r.status="fulfilled",r.value=a,Yp(r),t.state=a,r=t.pending,r!==null&&(a=r.next,a===r?t.pending=null:(a=a.next,r.next=a,Vp(t,a)))}function Ou(t,r,a){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do r.status="rejected",r.reason=a,Yp(r),r=r.next;while(r!==c)}t.action=null}function Yp(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Xp(t,r){return r}function Pp(t,r){if(Ee){var a=je.formState;if(a!==null){e:{var c=de;if(Ee){if($e){t:{for(var h=$e,g=mn;h.nodeType!==8;){if(!g){h=null;break t}if(h=fn(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){$e=fn(h.nextSibling),c=h.data==="F!";break e}}ji(c)}c=!1}c&&(r=a[0])}}return a=kt(),a.memoizedState=a.baseState=r,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xp,lastRenderedState:r},a.queue=c,a=dg.bind(null,de,c),c.dispatch=a,c=Mu(!1),g=Bu.bind(null,de,!1,c.queue),c=kt(),h={state:r,dispatch:null,action:t,pending:null},c.queue=h,a=p1.bind(null,de,h,g,a),h.dispatch=a,c.memoizedState=t,[r,a,!1]}function Fp(t){var r=Pe();return Qp(r,Ce,t)}function Qp(t,r,a){if(r=Cu(t,r,Xp)[0],t=jl(Ln)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var c=Jr(r)}catch(S){throw S===Yr?Nl:S}else c=r;r=Pe();var h=r.queue,g=h.dispatch;return a!==r.memoizedState&&(de.flags|=2048,Os(9,Rl(),g1.bind(null,h,a),null)),[c,g,t]}function g1(t,r){t.action=r}function Zp(t){var r=Pe(),a=Ce;if(a!==null)return Qp(r,a,t);Pe(),r=r.memoizedState,a=Pe();var c=a.queue.dispatch;return a.memoizedState=t,[r,c,!1]}function Os(t,r,a,c){return t={tag:t,create:a,deps:c,inst:r,next:null},r=de.updateQueue,r===null&&(r=Au(),de.updateQueue=r),a=r.lastEffect,a===null?r.lastEffect=t.next=t:(c=a.next,a.next=t,t.next=c,r.lastEffect=t),t}function Rl(){return{destroy:void 0,resource:void 0}}function Jp(){return Pe().memoizedState}function Dl(t,r,a,c){var h=kt();c=c===void 0?null:c,de.flags|=t,h.memoizedState=Os(1|r,Rl(),a,c)}function Wr(t,r,a,c){var h=Pe();c=c===void 0?null:c;var g=h.memoizedState.inst;Ce!==null&&c!==null&&wu(c,Ce.memoizedState.deps)?h.memoizedState=Os(r,g,a,c):(de.flags|=t,h.memoizedState=Os(1|r,g,a,c))}function Wp(t,r){Dl(8390656,8,t,r)}function eg(t,r){Wr(2048,8,t,r)}function tg(t,r){return Wr(4,2,t,r)}function ng(t,r){return Wr(4,4,t,r)}function ig(t,r){if(typeof r=="function"){t=t();var a=r(t);return function(){typeof a=="function"?a():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function sg(t,r,a){a=a!=null?a.concat([t]):null,Wr(4,4,ig.bind(null,r,t),a)}function Lu(){}function rg(t,r){var a=Pe();r=r===void 0?null:r;var c=a.memoizedState;return r!==null&&wu(r,c[1])?c[0]:(a.memoizedState=[t,r],t)}function ag(t,r){var a=Pe();r=r===void 0?null:r;var c=a.memoizedState;if(r!==null&&wu(r,c[1]))return c[0];if(c=t(),Ui){Tt(!0);try{t()}finally{Tt(!1)}}return a.memoizedState=[c,r],c}function ju(t,r,a){return a===void 0||(ei&1073741824)!==0?t.memoizedState=r:(t.memoizedState=a,t=cm(),de.lanes|=t,li|=t,a)}function lg(t,r,a,c){return Ht(a,r)?a:Cs.current!==null?(t=ju(t,a,c),Ht(t,r)||(tt=!0),t):(ei&42)===0?(tt=!0,t.memoizedState=a):(t=cm(),de.lanes|=t,li|=t,r)}function og(t,r,a,c,h){var g=Z.p;Z.p=g!==0&&8>g?g:8;var S=z.T,_={};z.T=_,Bu(t,!1,r,a);try{var A=h(),D=z.S;if(D!==null&&D(_,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var G=f1(A,c);ea(t,r,G,Vt(t))}else ea(t,r,c,Vt(t))}catch(P){ea(t,r,{then:function(){},status:"rejected",reason:P},Vt())}finally{Z.p=g,z.T=S}}function m1(){}function Ru(t,r,a,c){if(t.tag!==5)throw Error(s(476));var h=cg(t).queue;og(t,h,r,ne,a===null?m1:function(){return ug(t),a(c)})}function cg(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:ne},next:null};var a={};return r.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:a},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function ug(t){var r=cg(t).next.queue;ea(t,r,{},Vt())}function Du(){return gt(ba)}function fg(){return Pe().memoizedState}function hg(){return Pe().memoizedState}function y1(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var a=Vt();t=Jn(a);var c=Wn(r,t,a);c!==null&&(Gt(c,r,a),Pr(c,r,a)),r={cache:fu()},t.payload=r;return}r=r.return}}function b1(t,r,a){var c=Vt();a={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Bl(t)?pg(r,a):(a=tu(t,r,a,c),a!==null&&(Gt(a,t,c),gg(a,r,c)))}function dg(t,r,a){var c=Vt();ea(t,r,a,c)}function ea(t,r,a,c){var h={lane:c,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Bl(t))pg(r,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var S=r.lastRenderedState,_=g(S,a);if(h.hasEagerState=!0,h.eagerState=_,Ht(_,S))return vl(t,r,h,0),je===null&&bl(),!1}catch{}finally{}if(a=tu(t,r,h,c),a!==null)return Gt(a,t,c),gg(a,r,c),!0}return!1}function Bu(t,r,a,c){if(c={lane:2,revertLane:gf(),action:c,hasEagerState:!1,eagerState:null,next:null},Bl(t)){if(r)throw Error(s(479))}else r=tu(t,a,c,2),r!==null&&Gt(r,t,2)}function Bl(t){var r=t.alternate;return t===de||r!==null&&r===de}function pg(t,r){ks=Ml=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function gg(t,r,a){if((a&4194048)!==0){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,_d(t,a)}}var Ul={readContext:gt,use:Ll,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve},mg={readContext:gt,use:Ll,useCallback:function(t,r){return kt().memoizedState=[t,r===void 0?null:r],t},useContext:gt,useEffect:Wp,useImperativeHandle:function(t,r,a){a=a!=null?a.concat([t]):null,Dl(4194308,4,ig.bind(null,r,t),a)},useLayoutEffect:function(t,r){return Dl(4194308,4,t,r)},useInsertionEffect:function(t,r){Dl(4,2,t,r)},useMemo:function(t,r){var a=kt();r=r===void 0?null:r;var c=t();if(Ui){Tt(!0);try{t()}finally{Tt(!1)}}return a.memoizedState=[c,r],c},useReducer:function(t,r,a){var c=kt();if(a!==void 0){var h=a(r);if(Ui){Tt(!0);try{a(r)}finally{Tt(!1)}}}else h=r;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=b1.bind(null,de,t),[c.memoizedState,t]},useRef:function(t){var r=kt();return t={current:t},r.memoizedState=t},useState:function(t){t=Mu(t);var r=t.queue,a=dg.bind(null,de,r);return r.dispatch=a,[t.memoizedState,a]},useDebugValue:Lu,useDeferredValue:function(t,r){var a=kt();return ju(a,t,r)},useTransition:function(){var t=Mu(!1);return t=og.bind(null,de,t.queue,!0,!1),kt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,a){var c=de,h=kt();if(Ee){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),je===null)throw Error(s(349));(we&124)!==0||Up(c,r,a)}h.memoizedState=a;var g={value:a,getSnapshot:r};return h.queue=g,Wp(zp.bind(null,c,g,t),[t]),c.flags|=2048,Os(9,Rl(),Hp.bind(null,c,g,a,r),null),a},useId:function(){var t=kt(),r=je.identifierPrefix;if(Ee){var a=kn,c=Cn;a=(c&~(1<<32-rt(c)-1)).toString(32)+a,r="«"+r+"R"+a,a=Ol++,0<a&&(r+="H"+a.toString(32)),r+="»"}else a=h1++,r="«"+r+"r"+a.toString(32)+"»";return t.memoizedState=r},useHostTransitionStatus:Du,useFormState:Pp,useActionState:Pp,useOptimistic:function(t){var r=kt();r.memoizedState=r.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=a,r=Bu.bind(null,de,!0,a),a.dispatch=r,[t,r]},useMemoCache:Nu,useCacheRefresh:function(){return kt().memoizedState=y1.bind(null,de)}},yg={readContext:gt,use:Ll,useCallback:rg,useContext:gt,useEffect:eg,useImperativeHandle:sg,useInsertionEffect:tg,useLayoutEffect:ng,useMemo:ag,useReducer:jl,useRef:Jp,useState:function(){return jl(Ln)},useDebugValue:Lu,useDeferredValue:function(t,r){var a=Pe();return lg(a,Ce.memoizedState,t,r)},useTransition:function(){var t=jl(Ln)[0],r=Pe().memoizedState;return[typeof t=="boolean"?t:Jr(t),r]},useSyncExternalStore:Bp,useId:fg,useHostTransitionStatus:Du,useFormState:Fp,useActionState:Fp,useOptimistic:function(t,r){var a=Pe();return Ip(a,Ce,t,r)},useMemoCache:Nu,useCacheRefresh:hg},v1={readContext:gt,use:Ll,useCallback:rg,useContext:gt,useEffect:eg,useImperativeHandle:sg,useInsertionEffect:tg,useLayoutEffect:ng,useMemo:ag,useReducer:ku,useRef:Jp,useState:function(){return ku(Ln)},useDebugValue:Lu,useDeferredValue:function(t,r){var a=Pe();return Ce===null?ju(a,t,r):lg(a,Ce.memoizedState,t,r)},useTransition:function(){var t=ku(Ln)[0],r=Pe().memoizedState;return[typeof t=="boolean"?t:Jr(t),r]},useSyncExternalStore:Bp,useId:fg,useHostTransitionStatus:Du,useFormState:Zp,useActionState:Zp,useOptimistic:function(t,r){var a=Pe();return Ce!==null?Ip(a,Ce,t,r):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Nu,useCacheRefresh:hg},Ls=null,ta=0;function Hl(t){var r=ta;return ta+=1,Ls===null&&(Ls=[]),Cp(Ls,t,r)}function na(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function zl(t,r){throw r.$$typeof===y?Error(s(525)):(t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function bg(t){var r=t._init;return r(t._payload)}function vg(t){function r(O,M){if(t){var R=O.deletions;R===null?(O.deletions=[M],O.flags|=16):R.push(M)}}function a(O,M){if(!t)return null;for(;M!==null;)r(O,M),M=M.sibling;return null}function c(O){for(var M=new Map;O!==null;)O.key!==null?M.set(O.key,O):M.set(O.index,O),O=O.sibling;return M}function h(O,M){return O=Nn(O,M),O.index=0,O.sibling=null,O}function g(O,M,R){return O.index=R,t?(R=O.alternate,R!==null?(R=R.index,R<M?(O.flags|=67108866,M):R):(O.flags|=67108866,M)):(O.flags|=1048576,M)}function S(O){return t&&O.alternate===null&&(O.flags|=67108866),O}function _(O,M,R,K){return M===null||M.tag!==6?(M=iu(R,O.mode,K),M.return=O,M):(M=h(M,R),M.return=O,M)}function A(O,M,R,K){var ee=R.type;return ee===T?G(O,M,R.props.children,K,R.key):M!==null&&(M.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===I&&bg(ee)===M.type)?(M=h(M,R.props),na(M,R),M.return=O,M):(M=wl(R.type,R.key,R.props,null,O.mode,K),na(M,R),M.return=O,M)}function D(O,M,R,K){return M===null||M.tag!==4||M.stateNode.containerInfo!==R.containerInfo||M.stateNode.implementation!==R.implementation?(M=su(R,O.mode,K),M.return=O,M):(M=h(M,R.children||[]),M.return=O,M)}function G(O,M,R,K,ee){return M===null||M.tag!==7?(M=ki(R,O.mode,K,ee),M.return=O,M):(M=h(M,R),M.return=O,M)}function P(O,M,R){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=iu(""+M,O.mode,R),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return R=wl(M.type,M.key,M.props,null,O.mode,R),na(R,M),R.return=O,R;case w:return M=su(M,O.mode,R),M.return=O,M;case I:var K=M._init;return M=K(M._payload),P(O,M,R)}if(me(M)||L(M))return M=ki(M,O.mode,R,null),M.return=O,M;if(typeof M.then=="function")return P(O,Hl(M),R);if(M.$$typeof===V)return P(O,Tl(O,M),R);zl(O,M)}return null}function U(O,M,R,K){var ee=M!==null?M.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ee!==null?null:_(O,M,""+R,K);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case b:return R.key===ee?A(O,M,R,K):null;case w:return R.key===ee?D(O,M,R,K):null;case I:return ee=R._init,R=ee(R._payload),U(O,M,R,K)}if(me(R)||L(R))return ee!==null?null:G(O,M,R,K,null);if(typeof R.then=="function")return U(O,M,Hl(R),K);if(R.$$typeof===V)return U(O,M,Tl(O,R),K);zl(O,R)}return null}function H(O,M,R,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return O=O.get(R)||null,_(M,O,""+K,ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return O=O.get(K.key===null?R:K.key)||null,A(M,O,K,ee);case w:return O=O.get(K.key===null?R:K.key)||null,D(M,O,K,ee);case I:var pe=K._init;return K=pe(K._payload),H(O,M,R,K,ee)}if(me(K)||L(K))return O=O.get(R)||null,G(M,O,K,ee,null);if(typeof K.then=="function")return H(O,M,R,Hl(K),ee);if(K.$$typeof===V)return H(O,M,R,Tl(M,K),ee);zl(M,K)}return null}function ce(O,M,R,K){for(var ee=null,pe=null,ie=M,oe=M=0,it=null;ie!==null&&oe<R.length;oe++){ie.index>oe?(it=ie,ie=null):it=ie.sibling;var _e=U(O,ie,R[oe],K);if(_e===null){ie===null&&(ie=it);break}t&&ie&&_e.alternate===null&&r(O,ie),M=g(_e,M,oe),pe===null?ee=_e:pe.sibling=_e,pe=_e,ie=it}if(oe===R.length)return a(O,ie),Ee&&Oi(O,oe),ee;if(ie===null){for(;oe<R.length;oe++)ie=P(O,R[oe],K),ie!==null&&(M=g(ie,M,oe),pe===null?ee=ie:pe.sibling=ie,pe=ie);return Ee&&Oi(O,oe),ee}for(ie=c(ie);oe<R.length;oe++)it=H(ie,O,oe,R[oe],K),it!==null&&(t&&it.alternate!==null&&ie.delete(it.key===null?oe:it.key),M=g(it,M,oe),pe===null?ee=it:pe.sibling=it,pe=it);return t&&ie.forEach(function(mi){return r(O,mi)}),Ee&&Oi(O,oe),ee}function ae(O,M,R,K){if(R==null)throw Error(s(151));for(var ee=null,pe=null,ie=M,oe=M=0,it=null,_e=R.next();ie!==null&&!_e.done;oe++,_e=R.next()){ie.index>oe?(it=ie,ie=null):it=ie.sibling;var mi=U(O,ie,_e.value,K);if(mi===null){ie===null&&(ie=it);break}t&&ie&&mi.alternate===null&&r(O,ie),M=g(mi,M,oe),pe===null?ee=mi:pe.sibling=mi,pe=mi,ie=it}if(_e.done)return a(O,ie),Ee&&Oi(O,oe),ee;if(ie===null){for(;!_e.done;oe++,_e=R.next())_e=P(O,_e.value,K),_e!==null&&(M=g(_e,M,oe),pe===null?ee=_e:pe.sibling=_e,pe=_e);return Ee&&Oi(O,oe),ee}for(ie=c(ie);!_e.done;oe++,_e=R.next())_e=H(ie,O,oe,_e.value,K),_e!==null&&(t&&_e.alternate!==null&&ie.delete(_e.key===null?oe:_e.key),M=g(_e,M,oe),pe===null?ee=_e:pe.sibling=_e,pe=_e);return t&&ie.forEach(function(Sw){return r(O,Sw)}),Ee&&Oi(O,oe),ee}function Me(O,M,R,K){if(typeof R=="object"&&R!==null&&R.type===T&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case b:e:{for(var ee=R.key;M!==null;){if(M.key===ee){if(ee=R.type,ee===T){if(M.tag===7){a(O,M.sibling),K=h(M,R.props.children),K.return=O,O=K;break e}}else if(M.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===I&&bg(ee)===M.type){a(O,M.sibling),K=h(M,R.props),na(K,R),K.return=O,O=K;break e}a(O,M);break}else r(O,M);M=M.sibling}R.type===T?(K=ki(R.props.children,O.mode,K,R.key),K.return=O,O=K):(K=wl(R.type,R.key,R.props,null,O.mode,K),na(K,R),K.return=O,O=K)}return S(O);case w:e:{for(ee=R.key;M!==null;){if(M.key===ee)if(M.tag===4&&M.stateNode.containerInfo===R.containerInfo&&M.stateNode.implementation===R.implementation){a(O,M.sibling),K=h(M,R.children||[]),K.return=O,O=K;break e}else{a(O,M);break}else r(O,M);M=M.sibling}K=su(R,O.mode,K),K.return=O,O=K}return S(O);case I:return ee=R._init,R=ee(R._payload),Me(O,M,R,K)}if(me(R))return ce(O,M,R,K);if(L(R)){if(ee=L(R),typeof ee!="function")throw Error(s(150));return R=ee.call(R),ae(O,M,R,K)}if(typeof R.then=="function")return Me(O,M,Hl(R),K);if(R.$$typeof===V)return Me(O,M,Tl(O,R),K);zl(O,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,M!==null&&M.tag===6?(a(O,M.sibling),K=h(M,R),K.return=O,O=K):(a(O,M),K=iu(R,O.mode,K),K.return=O,O=K),S(O)):a(O,M)}return function(O,M,R,K){try{ta=0;var ee=Me(O,M,R,K);return Ls=null,ee}catch(ie){if(ie===Yr||ie===Nl)throw ie;var pe=zt(29,ie,null,O.mode);return pe.lanes=K,pe.return=O,pe}finally{}}}var js=vg(!0),Sg=vg(!1),en=X(null),yn=null;function ti(t){var r=t.alternate;W(Ze,Ze.current&1),W(en,t),yn===null&&(r===null||Cs.current!==null||r.memoizedState!==null)&&(yn=t)}function wg(t){if(t.tag===22){if(W(Ze,Ze.current),W(en,t),yn===null){var r=t.alternate;r!==null&&r.memoizedState!==null&&(yn=t)}}else ni()}function ni(){W(Ze,Ze.current),W(en,en.current)}function jn(t){Q(en),yn===t&&(yn=null),Q(Ze)}var Ze=X(0);function ql(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Nf(a)))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}function Uu(t,r,a,c){r=t.memoizedState,a=a(c,r),a=a==null?r:m({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Hu={enqueueSetState:function(t,r,a){t=t._reactInternals;var c=Vt(),h=Jn(c);h.payload=r,a!=null&&(h.callback=a),r=Wn(t,h,c),r!==null&&(Gt(r,t,c),Pr(r,t,c))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var c=Vt(),h=Jn(c);h.tag=1,h.payload=r,a!=null&&(h.callback=a),r=Wn(t,h,c),r!==null&&(Gt(r,t,c),Pr(r,t,c))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=Vt(),c=Jn(a);c.tag=2,r!=null&&(c.callback=r),r=Wn(t,c,a),r!==null&&(Gt(r,t,a),Pr(r,t,a))}};function xg(t,r,a,c,h,g,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,S):r.prototype&&r.prototype.isPureReactComponent?!Hr(a,c)||!Hr(h,g):!0}function _g(t,r,a,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==t&&Hu.enqueueReplaceState(r,r.state,null)}function Hi(t,r){var a=r;if("ref"in r){a={};for(var c in r)c!=="ref"&&(a[c]=r[c])}if(t=t.defaultProps){a===r&&(a=m({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}var $l=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Eg(t){$l(t)}function Tg(t){console.error(t)}function Ag(t){$l(t)}function Il(t,r){try{var a=t.onUncaughtError;a(r.value,{componentStack:r.stack})}catch(c){setTimeout(function(){throw c})}}function Ng(t,r,a){try{var c=t.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function zu(t,r,a){return a=Jn(a),a.tag=3,a.payload={element:null},a.callback=function(){Il(t,r)},a}function Cg(t){return t=Jn(t),t.tag=3,t}function kg(t,r,a,c){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var g=c.value;t.payload=function(){return h(g)},t.callback=function(){Ng(r,a,c)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){Ng(r,a,c),typeof h!="function"&&(oi===null?oi=new Set([this]):oi.add(this));var _=c.stack;this.componentDidCatch(c.value,{componentStack:_!==null?_:""})})}function S1(t,r,a,c,h){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(r=a.alternate,r!==null&&Vr(r,a,h,!0),a=en.current,a!==null){switch(a.tag){case 13:return yn===null?uf():a.alternate===null&&Ie===0&&(Ie=3),a.flags&=-257,a.flags|=65536,a.lanes=h,c===pu?a.flags|=16384:(r=a.updateQueue,r===null?a.updateQueue=new Set([c]):r.add(c),hf(t,c,h)),!1;case 22:return a.flags|=65536,c===pu?a.flags|=16384:(r=a.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=r):(a=r.retryQueue,a===null?r.retryQueue=new Set([c]):a.add(c)),hf(t,c,h)),!1}throw Error(s(435,a.tag))}return hf(t,c,h),uf(),!1}if(Ee)return r=en.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=h,c!==lu&&(t=Error(s(422),{cause:c}),Ir(Qt(t,a)))):(c!==lu&&(r=Error(s(423),{cause:c}),Ir(Qt(r,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=Qt(c,a),h=zu(t.stateNode,c,h),yu(t,h),Ie!==4&&(Ie=2)),!1;var g=Error(s(520),{cause:c});if(g=Qt(g,a),ca===null?ca=[g]:ca.push(g),Ie!==4&&(Ie=2),r===null)return!0;c=Qt(c,a),a=r;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=zu(a.stateNode,c,t),yu(a,t),!1;case 1:if(r=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(oi===null||!oi.has(g))))return a.flags|=65536,h&=-h,a.lanes|=h,h=Cg(h),kg(h,t,a,c),yu(a,h),!1}a=a.return}while(a!==null);return!1}var Mg=Error(s(461)),tt=!1;function at(t,r,a,c){r.child=t===null?Sg(r,null,a,c):js(r,t.child,a,c)}function Og(t,r,a,c,h){a=a.render;var g=r.ref;if("ref"in c){var S={};for(var _ in c)_!=="ref"&&(S[_]=c[_])}else S=c;return Di(r),c=xu(t,r,a,S,g,h),_=_u(),t!==null&&!tt?(Eu(t,r,h),Rn(t,r,h)):(Ee&&_&&ru(r),r.flags|=1,at(t,r,c,h),r.child)}function Lg(t,r,a,c,h){if(t===null){var g=a.type;return typeof g=="function"&&!nu(g)&&g.defaultProps===void 0&&a.compare===null?(r.tag=15,r.type=g,jg(t,r,g,c,h)):(t=wl(a.type,null,c,r,r.mode,h),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,!Xu(t,h)){var S=g.memoizedProps;if(a=a.compare,a=a!==null?a:Hr,a(S,c)&&t.ref===r.ref)return Rn(t,r,h)}return r.flags|=1,t=Nn(g,c),t.ref=r.ref,t.return=r,r.child=t}function jg(t,r,a,c,h){if(t!==null){var g=t.memoizedProps;if(Hr(g,c)&&t.ref===r.ref)if(tt=!1,r.pendingProps=c=g,Xu(t,h))(t.flags&131072)!==0&&(tt=!0);else return r.lanes=t.lanes,Rn(t,r,h)}return qu(t,r,a,c,h)}function Rg(t,r,a){var c=r.pendingProps,h=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden"){if((r.flags&128)!==0){if(c=g!==null?g.baseLanes|a:a,t!==null){for(h=r.child=t.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;r.childLanes=g&~c}else r.childLanes=0,r.child=null;return Dg(t,r,c,a)}if((a&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&Al(r,g!==null?g.cachePool:null),g!==null?jp(r,g):vu(),wg(r);else return r.lanes=r.childLanes=536870912,Dg(t,r,g!==null?g.baseLanes|a:a,a)}else g!==null?(Al(r,g.cachePool),jp(r,g),ni(),r.memoizedState=null):(t!==null&&Al(r,null),vu(),ni());return at(t,r,h,a),r.child}function Dg(t,r,a,c){var h=du();return h=h===null?null:{parent:Qe._currentValue,pool:h},r.memoizedState={baseLanes:a,cachePool:h},t!==null&&Al(r,null),vu(),wg(r),t!==null&&Vr(t,r,c,!0),null}function Vl(t,r){var a=r.ref;if(a===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(t===null||t.ref!==a)&&(r.flags|=4194816)}}function qu(t,r,a,c,h){return Di(r),a=xu(t,r,a,c,void 0,h),c=_u(),t!==null&&!tt?(Eu(t,r,h),Rn(t,r,h)):(Ee&&c&&ru(r),r.flags|=1,at(t,r,a,h),r.child)}function Bg(t,r,a,c,h,g){return Di(r),r.updateQueue=null,a=Dp(r,c,a,h),Rp(t),c=_u(),t!==null&&!tt?(Eu(t,r,g),Rn(t,r,g)):(Ee&&c&&ru(r),r.flags|=1,at(t,r,a,g),r.child)}function Ug(t,r,a,c,h){if(Di(r),r.stateNode===null){var g=_s,S=a.contextType;typeof S=="object"&&S!==null&&(g=gt(S)),g=new a(c,g),r.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Hu,r.stateNode=g,g._reactInternals=r,g=r.stateNode,g.props=c,g.state=r.memoizedState,g.refs={},gu(r),S=a.contextType,g.context=typeof S=="object"&&S!==null?gt(S):_s,g.state=r.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&(Uu(r,a,S,c),g.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&Hu.enqueueReplaceState(g,g.state,null),Qr(r,c,g,h),Fr(),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!0}else if(t===null){g=r.stateNode;var _=r.memoizedProps,A=Hi(a,_);g.props=A;var D=g.context,G=a.contextType;S=_s,typeof G=="object"&&G!==null&&(S=gt(G));var P=a.getDerivedStateFromProps;G=typeof P=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=r.pendingProps!==_,G||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||D!==S)&&_g(r,g,c,S),Zn=!1;var U=r.memoizedState;g.state=U,Qr(r,c,g,h),Fr(),D=r.memoizedState,_||U!==D||Zn?(typeof P=="function"&&(Uu(r,a,P,c),D=r.memoizedState),(A=Zn||xg(r,a,A,c,U,D,S))?(G||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(r.flags|=4194308)):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=D),g.props=c,g.state=D,g.context=S,c=A):(typeof g.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{g=r.stateNode,mu(t,r),S=r.memoizedProps,G=Hi(a,S),g.props=G,P=r.pendingProps,U=g.context,D=a.contextType,A=_s,typeof D=="object"&&D!==null&&(A=gt(D)),_=a.getDerivedStateFromProps,(D=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==P||U!==A)&&_g(r,g,c,A),Zn=!1,U=r.memoizedState,g.state=U,Qr(r,c,g,h),Fr();var H=r.memoizedState;S!==P||U!==H||Zn||t!==null&&t.dependencies!==null&&El(t.dependencies)?(typeof _=="function"&&(Uu(r,a,_,c),H=r.memoizedState),(G=Zn||xg(r,a,G,c,U,H,A)||t!==null&&t.dependencies!==null&&El(t.dependencies))?(D||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,H,A),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,H,A)),typeof g.componentDidUpdate=="function"&&(r.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=H),g.props=c,g.state=H,g.context=A,c=G):(typeof g.componentDidUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(r.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(r.flags|=1024),c=!1)}return g=c,Vl(t,r),c=(r.flags&128)!==0,g||c?(g=r.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:g.render(),r.flags|=1,t!==null&&c?(r.child=js(r,t.child,null,h),r.child=js(r,null,a,h)):at(t,r,a,h),r.memoizedState=g.state,t=r.child):t=Rn(t,r,h),t}function Hg(t,r,a,c){return $r(),r.flags|=256,at(t,r,a,c),r.child}var $u={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Iu(t){return{baseLanes:t,cachePool:Tp()}}function Vu(t,r,a){return t=t!==null?t.childLanes&~a:0,r&&(t|=tn),t}function zg(t,r,a){var c=r.pendingProps,h=!1,g=(r.flags&128)!==0,S;if((S=g)||(S=t!==null&&t.memoizedState===null?!1:(Ze.current&2)!==0),S&&(h=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,t===null){if(Ee){if(h?ti(r):ni(),Ee){var _=$e,A;if(A=_){e:{for(A=_,_=mn;A.nodeType!==8;){if(!_){_=null;break e}if(A=fn(A.nextSibling),A===null){_=null;break e}}_=A}_!==null?(r.memoizedState={dehydrated:_,treeContext:Mi!==null?{id:Cn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},A=zt(18,null,null,0),A.stateNode=_,A.return=r,r.child=A,St=r,$e=null,A=!0):A=!1}A||ji(r)}if(_=r.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return Nf(_)?r.lanes=32:r.lanes=536870912,null;jn(r)}return _=c.children,c=c.fallback,h?(ni(),h=r.mode,_=Gl({mode:"hidden",children:_},h),c=ki(c,h,a,null),_.return=r,c.return=r,_.sibling=c,r.child=_,h=r.child,h.memoizedState=Iu(a),h.childLanes=Vu(t,S,a),r.memoizedState=$u,c):(ti(r),Gu(r,_))}if(A=t.memoizedState,A!==null&&(_=A.dehydrated,_!==null)){if(g)r.flags&256?(ti(r),r.flags&=-257,r=Ku(t,r,a)):r.memoizedState!==null?(ni(),r.child=t.child,r.flags|=128,r=null):(ni(),h=c.fallback,_=r.mode,c=Gl({mode:"visible",children:c.children},_),h=ki(h,_,a,null),h.flags|=2,c.return=r,h.return=r,c.sibling=h,r.child=c,js(r,t.child,null,a),c=r.child,c.memoizedState=Iu(a),c.childLanes=Vu(t,S,a),r.memoizedState=$u,r=h);else if(ti(r),Nf(_)){if(S=_.nextSibling&&_.nextSibling.dataset,S)var D=S.dgst;S=D,c=Error(s(419)),c.stack="",c.digest=S,Ir({value:c,source:null,stack:null}),r=Ku(t,r,a)}else if(tt||Vr(t,r,a,!1),S=(a&t.childLanes)!==0,tt||S){if(S=je,S!==null&&(c=a&-a,c=(c&42)!==0?1:Nc(c),c=(c&(S.suspendedLanes|a))!==0?0:c,c!==0&&c!==A.retryLane))throw A.retryLane=c,xs(t,c),Gt(S,t,c),Mg;_.data==="$?"||uf(),r=Ku(t,r,a)}else _.data==="$?"?(r.flags|=192,r.child=t.child,r=null):(t=A.treeContext,$e=fn(_.nextSibling),St=r,Ee=!0,Li=null,mn=!1,t!==null&&(Jt[Wt++]=Cn,Jt[Wt++]=kn,Jt[Wt++]=Mi,Cn=t.id,kn=t.overflow,Mi=r),r=Gu(r,c.children),r.flags|=4096);return r}return h?(ni(),h=c.fallback,_=r.mode,A=t.child,D=A.sibling,c=Nn(A,{mode:"hidden",children:c.children}),c.subtreeFlags=A.subtreeFlags&65011712,D!==null?h=Nn(D,h):(h=ki(h,_,a,null),h.flags|=2),h.return=r,c.return=r,c.sibling=h,r.child=c,c=h,h=r.child,_=t.child.memoizedState,_===null?_=Iu(a):(A=_.cachePool,A!==null?(D=Qe._currentValue,A=A.parent!==D?{parent:D,pool:D}:A):A=Tp(),_={baseLanes:_.baseLanes|a,cachePool:A}),h.memoizedState=_,h.childLanes=Vu(t,S,a),r.memoizedState=$u,c):(ti(r),a=t.child,t=a.sibling,a=Nn(a,{mode:"visible",children:c.children}),a.return=r,a.sibling=null,t!==null&&(S=r.deletions,S===null?(r.deletions=[t],r.flags|=16):S.push(t)),r.child=a,r.memoizedState=null,a)}function Gu(t,r){return r=Gl({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Gl(t,r){return t=zt(22,t,null,r),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Ku(t,r,a){return js(r,t.child,null,a),t=Gu(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function qg(t,r,a){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),cu(t.return,r,a)}function Yu(t,r,a,c,h){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=h)}function $g(t,r,a){var c=r.pendingProps,h=c.revealOrder,g=c.tail;if(at(t,r,c.children,a),c=Ze.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&qg(t,a,r);else if(t.tag===19)qg(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}switch(W(Ze,c),h){case"forwards":for(a=r.child,h=null;a!==null;)t=a.alternate,t!==null&&ql(t)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),Yu(r,!1,h,a,g);break;case"backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(t=h.alternate,t!==null&&ql(t)===null){r.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}Yu(r,!0,a,null,g);break;case"together":Yu(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Rn(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),li|=r.lanes,(a&r.childLanes)===0)if(t!==null){if(Vr(t,r,a,!1),(a&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,a=Nn(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=Nn(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function Xu(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&El(t)))}function w1(t,r,a){switch(r.tag){case 3:xe(r,r.stateNode.containerInfo),Qn(r,Qe,t.memoizedState.cache),$r();break;case 27:case 5:ss(r);break;case 4:xe(r,r.stateNode.containerInfo);break;case 10:Qn(r,r.type,r.memoizedProps.value);break;case 13:var c=r.memoizedState;if(c!==null)return c.dehydrated!==null?(ti(r),r.flags|=128,null):(a&r.child.childLanes)!==0?zg(t,r,a):(ti(r),t=Rn(t,r,a),t!==null?t.sibling:null);ti(r);break;case 19:var h=(t.flags&128)!==0;if(c=(a&r.childLanes)!==0,c||(Vr(t,r,a,!1),c=(a&r.childLanes)!==0),h){if(c)return $g(t,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),W(Ze,Ze.current),c)break;return null;case 22:case 23:return r.lanes=0,Rg(t,r,a);case 24:Qn(r,Qe,t.memoizedState.cache)}return Rn(t,r,a)}function Ig(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps)tt=!0;else{if(!Xu(t,a)&&(r.flags&128)===0)return tt=!1,w1(t,r,a);tt=(t.flags&131072)!==0}else tt=!1,Ee&&(r.flags&1048576)!==0&&bp(r,_l,r.index);switch(r.lanes=0,r.tag){case 16:e:{t=r.pendingProps;var c=r.elementType,h=c._init;if(c=h(c._payload),r.type=c,typeof c=="function")nu(c)?(t=Hi(c,t),r.tag=1,r=Ug(null,r,c,t,a)):(r.tag=0,r=qu(null,r,c,t,a));else{if(c!=null){if(h=c.$$typeof,h===$){r.tag=11,r=Og(null,r,c,t,a);break e}else if(h===J){r.tag=14,r=Lg(null,r,c,t,a);break e}}throw r=ge(c)||c,Error(s(306,r,""))}}return r;case 0:return qu(t,r,r.type,r.pendingProps,a);case 1:return c=r.type,h=Hi(c,r.pendingProps),Ug(t,r,c,h,a);case 3:e:{if(xe(r,r.stateNode.containerInfo),t===null)throw Error(s(387));c=r.pendingProps;var g=r.memoizedState;h=g.element,mu(t,r),Qr(r,c,null,a);var S=r.memoizedState;if(c=S.cache,Qn(r,Qe,c),c!==g.cache&&uu(r,[Qe],a,!0),Fr(),c=S.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){r=Hg(t,r,c,a);break e}else if(c!==h){h=Qt(Error(s(424)),r),Ir(h),r=Hg(t,r,c,a);break e}else{switch(t=r.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for($e=fn(t.firstChild),St=r,Ee=!0,Li=null,mn=!0,a=Sg(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if($r(),c===h){r=Rn(t,r,a);break e}at(t,r,c,a)}r=r.child}return r;case 26:return Vl(t,r),t===null?(a=Ym(r.type,null,r.pendingProps,null))?r.memoizedState=a:Ee||(a=r.type,t=r.pendingProps,c=so(ue.current).createElement(a),c[pt]=r,c[Nt]=t,ot(c,a,t),et(c),r.stateNode=c):r.memoizedState=Ym(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return ss(r),t===null&&Ee&&(c=r.stateNode=Vm(r.type,r.pendingProps,ue.current),St=r,mn=!0,h=$e,fi(r.type)?(Cf=h,$e=fn(c.firstChild)):$e=h),at(t,r,r.pendingProps.children,a),Vl(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Ee&&((h=c=$e)&&(c=F1(c,r.type,r.pendingProps,mn),c!==null?(r.stateNode=c,St=r,$e=fn(c.firstChild),mn=!1,h=!0):h=!1),h||ji(r)),ss(r),h=r.type,g=r.pendingProps,S=t!==null?t.memoizedProps:null,c=g.children,Ef(h,g)?c=null:S!==null&&Ef(h,S)&&(r.flags|=32),r.memoizedState!==null&&(h=xu(t,r,d1,null,null,a),ba._currentValue=h),Vl(t,r),at(t,r,c,a),r.child;case 6:return t===null&&Ee&&((t=a=$e)&&(a=Q1(a,r.pendingProps,mn),a!==null?(r.stateNode=a,St=r,$e=null,t=!0):t=!1),t||ji(r)),null;case 13:return zg(t,r,a);case 4:return xe(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=js(r,null,c,a):at(t,r,c,a),r.child;case 11:return Og(t,r,r.type,r.pendingProps,a);case 7:return at(t,r,r.pendingProps,a),r.child;case 8:return at(t,r,r.pendingProps.children,a),r.child;case 12:return at(t,r,r.pendingProps.children,a),r.child;case 10:return c=r.pendingProps,Qn(r,r.type,c.value),at(t,r,c.children,a),r.child;case 9:return h=r.type._context,c=r.pendingProps.children,Di(r),h=gt(h),c=c(h),r.flags|=1,at(t,r,c,a),r.child;case 14:return Lg(t,r,r.type,r.pendingProps,a);case 15:return jg(t,r,r.type,r.pendingProps,a);case 19:return $g(t,r,a);case 31:return c=r.pendingProps,a=r.mode,c={mode:c.mode,children:c.children},t===null?(a=Gl(c,a),a.ref=r.ref,r.child=a,a.return=r,r=a):(a=Nn(t.child,c),a.ref=r.ref,r.child=a,a.return=r,r=a),r;case 22:return Rg(t,r,a);case 24:return Di(r),c=gt(Qe),t===null?(h=du(),h===null&&(h=je,g=fu(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=a),h=g),r.memoizedState={parent:c,cache:h},gu(r),Qn(r,Qe,h)):((t.lanes&a)!==0&&(mu(t,r),Qr(r,null,null,a),Fr()),h=t.memoizedState,g=r.memoizedState,h.parent!==c?(h={parent:c,cache:c},r.memoizedState=h,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=h),Qn(r,Qe,c)):(c=g.cache,Qn(r,Qe,c),c!==h.cache&&uu(r,[Qe],a,!0))),at(t,r,r.pendingProps.children,a),r.child;case 29:throw r.pendingProps}throw Error(s(156,r.tag))}function Dn(t){t.flags|=4}function Vg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Zm(r)){if(r=en.current,r!==null&&((we&4194048)===we?yn!==null:(we&62914560)!==we&&(we&536870912)===0||r!==yn))throw Xr=pu,Ap;t.flags|=8192}}function Kl(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?wd():536870912,t.lanes|=r,Us|=r)}function ia(t,r){if(!Ee)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Ue(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,c=0;if(r)for(var h=t.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=a,r}function x1(t,r,a){var c=r.pendingProps;switch(au(r),r.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(r),null;case 1:return Ue(r),null;case 3:return a=r.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),r.memoizedState.cache!==c&&(r.flags|=2048),On(Qe),gn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(qr(r)?Dn(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,wp())),Ue(r),null;case 26:return a=r.memoizedState,t===null?(Dn(r),a!==null?(Ue(r),Vg(r,a)):(Ue(r),r.flags&=-16777217)):a?a!==t.memoizedState?(Dn(r),Ue(r),Vg(r,a)):(Ue(r),r.flags&=-16777217):(t.memoizedProps!==c&&Dn(r),Ue(r),r.flags&=-16777217),null;case 27:ht(r),a=ue.current;var h=r.type;if(t!==null&&r.stateNode!=null)t.memoizedProps!==c&&Dn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}t=se.current,qr(r)?vp(r):(t=Vm(h,c,a),r.stateNode=t,Dn(r))}return Ue(r),null;case 5:if(ht(r),a=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==c&&Dn(r);else{if(!c){if(r.stateNode===null)throw Error(s(166));return Ue(r),null}if(t=se.current,qr(r))vp(r);else{switch(h=so(ue.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":t=h.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof c.is=="string"?h.createElement("select",{is:c.is}):h.createElement("select"),c.multiple?t.multiple=!0:c.size&&(t.size=c.size);break;default:t=typeof c.is=="string"?h.createElement(a,{is:c.is}):h.createElement(a)}}t[pt]=r,t[Nt]=c;e:for(h=r.child;h!==null;){if(h.tag===5||h.tag===6)t.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===r)break e;for(;h.sibling===null;){if(h.return===null||h.return===r)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}r.stateNode=t;e:switch(ot(t,a,c),a){case"button":case"input":case"select":case"textarea":t=!!c.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&Dn(r)}}return Ue(r),r.flags&=-16777217,null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==c&&Dn(r);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(t=ue.current,qr(r)){if(t=r.stateNode,a=r.memoizedProps,c=null,h=St,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[pt]=r,t=!!(t.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||Bm(t.nodeValue,a)),t||ji(r)}else t=so(t).createTextNode(c),t[pt]=r,r.stateNode=t}return Ue(r),null;case 13:if(c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=qr(r),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(s(318));if(h=r.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(s(317));h[pt]=r}else $r(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Ue(r),h=!1}else h=wp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return r.flags&256?(jn(r),r):(jn(r),null)}if(jn(r),(r.flags&128)!==0)return r.lanes=a,r;if(a=c!==null,t=t!==null&&t.memoizedState!==null,a){c=r.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool);var g=null;c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==h&&(c.flags|=2048)}return a!==t&&a&&(r.child.flags|=8192),Kl(r,r.updateQueue),Ue(r),null;case 4:return gn(),t===null&&vf(r.stateNode.containerInfo),Ue(r),null;case 10:return On(r.type),Ue(r),null;case 19:if(Q(Ze),h=r.memoizedState,h===null)return Ue(r),null;if(c=(r.flags&128)!==0,g=h.rendering,g===null)if(c)ia(h,!1);else{if(Ie!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(g=ql(t),g!==null){for(r.flags|=128,ia(h,!1),t=g.updateQueue,r.updateQueue=t,Kl(r,t),r.subtreeFlags=0,t=a,a=r.child;a!==null;)yp(a,t),a=a.sibling;return W(Ze,Ze.current&1|2),r.child}t=t.sibling}h.tail!==null&&Ut()>Pl&&(r.flags|=128,c=!0,ia(h,!1),r.lanes=4194304)}else{if(!c)if(t=ql(g),t!==null){if(r.flags|=128,c=!0,t=t.updateQueue,r.updateQueue=t,Kl(r,t),ia(h,!0),h.tail===null&&h.tailMode==="hidden"&&!g.alternate&&!Ee)return Ue(r),null}else 2*Ut()-h.renderingStartTime>Pl&&a!==536870912&&(r.flags|=128,c=!0,ia(h,!1),r.lanes=4194304);h.isBackwards?(g.sibling=r.child,r.child=g):(t=h.last,t!==null?t.sibling=g:r.child=g,h.last=g)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=Ut(),r.sibling=null,t=Ze.current,W(Ze,c?t&1|2:t&1),r):(Ue(r),null);case 22:case 23:return jn(r),Su(),c=r.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(r.flags|=8192):c&&(r.flags|=8192),c?(a&536870912)!==0&&(r.flags&128)===0&&(Ue(r),r.subtreeFlags&6&&(r.flags|=8192)):Ue(r),a=r.updateQueue,a!==null&&Kl(r,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==a&&(r.flags|=2048),t!==null&&Q(Bi),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),r.memoizedState.cache!==a&&(r.flags|=2048),On(Qe),Ue(r),null;case 25:return null;case 30:return null}throw Error(s(156,r.tag))}function _1(t,r){switch(au(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return On(Qe),gn(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return ht(r),null;case 13:if(jn(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));$r()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Q(Ze),null;case 4:return gn(),null;case 10:return On(r.type),null;case 22:case 23:return jn(r),Su(),t!==null&&Q(Bi),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return On(Qe),null;case 25:return null;default:return null}}function Gg(t,r){switch(au(r),r.tag){case 3:On(Qe),gn();break;case 26:case 27:case 5:ht(r);break;case 4:gn();break;case 13:jn(r);break;case 19:Q(Ze);break;case 10:On(r.type);break;case 22:case 23:jn(r),Su(),t!==null&&Q(Bi);break;case 24:On(Qe)}}function sa(t,r){try{var a=r.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var h=c.next;a=h;do{if((a.tag&t)===t){c=void 0;var g=a.create,S=a.inst;c=g(),S.destroy=c}a=a.next}while(a!==h)}}catch(_){Oe(r,r.return,_)}}function ii(t,r,a){try{var c=r.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var g=h.next;c=g;do{if((c.tag&t)===t){var S=c.inst,_=S.destroy;if(_!==void 0){S.destroy=void 0,h=r;var A=a,D=_;try{D()}catch(G){Oe(h,A,G)}}}c=c.next}while(c!==g)}}catch(G){Oe(r,r.return,G)}}function Kg(t){var r=t.updateQueue;if(r!==null){var a=t.stateNode;try{Lp(r,a)}catch(c){Oe(t,t.return,c)}}}function Yg(t,r,a){a.props=Hi(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(c){Oe(t,r,c)}}function ra(t,r){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof a=="function"?t.refCleanup=a(c):a.current=c}}catch(h){Oe(t,r,h)}}function bn(t,r){var a=t.ref,c=t.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(h){Oe(t,r,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Oe(t,r,h)}else a.current=null}function Xg(t){var r=t.type,a=t.memoizedProps,c=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(h){Oe(t,t.return,h)}}function Pu(t,r,a){try{var c=t.stateNode;G1(c,t.type,a,r),c[Nt]=r}catch(h){Oe(t,t.return,h)}}function Pg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&fi(t.type)||t.tag===4}function Fu(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Pg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&fi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Qu(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,r):(r=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,r.appendChild(t),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=io));else if(c!==4&&(c===27&&fi(t.type)&&(a=t.stateNode,r=null),t=t.child,t!==null))for(Qu(t,r,a),t=t.sibling;t!==null;)Qu(t,r,a),t=t.sibling}function Yl(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(c!==4&&(c===27&&fi(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Yl(t,r,a),t=t.sibling;t!==null;)Yl(t,r,a),t=t.sibling}function Fg(t){var r=t.stateNode,a=t.memoizedProps;try{for(var c=t.type,h=r.attributes;h.length;)r.removeAttributeNode(h[0]);ot(r,c,a),r[pt]=t,r[Nt]=a}catch(g){Oe(t,t.return,g)}}var Bn=!1,Ge=!1,Zu=!1,Qg=typeof WeakSet=="function"?WeakSet:Set,nt=null;function E1(t,r){if(t=t.containerInfo,xf=uo,t=lp(t),Fc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.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 S=0,_=-1,A=-1,D=0,G=0,P=t,U=null;t:for(;;){for(var H;P!==a||h!==0&&P.nodeType!==3||(_=S+h),P!==g||c!==0&&P.nodeType!==3||(A=S+c),P.nodeType===3&&(S+=P.nodeValue.length),(H=P.firstChild)!==null;)U=P,P=H;for(;;){if(P===t)break t;if(U===a&&++D===h&&(_=S),U===g&&++G===c&&(A=S),(H=P.nextSibling)!==null)break;P=U,U=P.parentNode}P=H}a=_===-1||A===-1?null:{start:_,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(_f={focusedElem:t,selectionRange:a},uo=!1,nt=r;nt!==null;)if(r=nt,t=r.child,(r.subtreeFlags&1024)!==0&&t!==null)t.return=r,nt=t;else for(;nt!==null;){switch(r=nt,g=r.alternate,t=r.flags,r.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,a=r,h=g.memoizedProps,g=g.memoizedState,c=a.stateNode;try{var ce=Hi(a.type,h,a.elementType===a.type);t=c.getSnapshotBeforeUpdate(ce,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(ae){Oe(a,a.return,ae)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,a=t.nodeType,a===9)Af(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Af(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=r.sibling,t!==null){t.return=r.return,nt=t;break}nt=r.return}}function Zg(t,r,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:si(t,a),c&4&&sa(5,a);break;case 1:if(si(t,a),c&4)if(t=a.stateNode,r===null)try{t.componentDidMount()}catch(S){Oe(a,a.return,S)}else{var h=Hi(a.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(h,r,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Oe(a,a.return,S)}}c&64&&Kg(a),c&512&&ra(a,a.return);break;case 3:if(si(t,a),c&64&&(t=a.updateQueue,t!==null)){if(r=null,a.child!==null)switch(a.child.tag){case 27:case 5:r=a.child.stateNode;break;case 1:r=a.child.stateNode}try{Lp(t,r)}catch(S){Oe(a,a.return,S)}}break;case 27:r===null&&c&4&&Fg(a);case 26:case 5:si(t,a),r===null&&c&4&&Xg(a),c&512&&ra(a,a.return);break;case 12:si(t,a);break;case 13:si(t,a),c&4&&em(t,a),c&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=j1.bind(null,a),Z1(t,a))));break;case 22:if(c=a.memoizedState!==null||Bn,!c){r=r!==null&&r.memoizedState!==null||Ge,h=Bn;var g=Ge;Bn=c,(Ge=r)&&!g?ri(t,a,(a.subtreeFlags&8772)!==0):si(t,a),Bn=h,Ge=g}break;case 30:break;default:si(t,a)}}function Jg(t){var r=t.alternate;r!==null&&(t.alternate=null,Jg(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&Mc(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Re=null,Mt=!1;function Un(t,r,a){for(a=a.child;a!==null;)Wg(t,r,a),a=a.sibling}function Wg(t,r,a){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(_i,a)}catch{}switch(a.tag){case 26:Ge||bn(a,r),Un(t,r,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ge||bn(a,r);var c=Re,h=Mt;fi(a.type)&&(Re=a.stateNode,Mt=!1),Un(t,r,a),pa(a.stateNode),Re=c,Mt=h;break;case 5:Ge||bn(a,r);case 6:if(c=Re,h=Mt,Re=null,Un(t,r,a),Re=c,Mt=h,Re!==null)if(Mt)try{(Re.nodeType===9?Re.body:Re.nodeName==="HTML"?Re.ownerDocument.body:Re).removeChild(a.stateNode)}catch(g){Oe(a,r,g)}else try{Re.removeChild(a.stateNode)}catch(g){Oe(a,r,g)}break;case 18:Re!==null&&(Mt?(t=Re,$m(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),xa(t)):$m(Re,a.stateNode));break;case 4:c=Re,h=Mt,Re=a.stateNode.containerInfo,Mt=!0,Un(t,r,a),Re=c,Mt=h;break;case 0:case 11:case 14:case 15:Ge||ii(2,a,r),Ge||ii(4,a,r),Un(t,r,a);break;case 1:Ge||(bn(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"&&Yg(a,r,c)),Un(t,r,a);break;case 21:Un(t,r,a);break;case 22:Ge=(c=Ge)||a.memoizedState!==null,Un(t,r,a),Ge=c;break;default:Un(t,r,a)}}function em(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{xa(t)}catch(a){Oe(r,r.return,a)}}function T1(t){switch(t.tag){case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Qg),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Qg),r;default:throw Error(s(435,t.tag))}}function Ju(t,r){var a=T1(t);r.forEach(function(c){var h=R1.bind(null,t,c);a.has(c)||(a.add(c),c.then(h,h))})}function qt(t,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c],g=t,S=r,_=S;e:for(;_!==null;){switch(_.tag){case 27:if(fi(_.type)){Re=_.stateNode,Mt=!1;break e}break;case 5:Re=_.stateNode,Mt=!1;break e;case 3:case 4:Re=_.stateNode.containerInfo,Mt=!0;break e}_=_.return}if(Re===null)throw Error(s(160));Wg(g,S,h),Re=null,Mt=!1,g=h.alternate,g!==null&&(g.return=null),h.return=null}if(r.subtreeFlags&13878)for(r=r.child;r!==null;)tm(r,t),r=r.sibling}var un=null;function tm(t,r){var a=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:qt(r,t),$t(t),c&4&&(ii(3,t,t.return),sa(3,t),ii(5,t,t.return));break;case 1:qt(r,t),$t(t),c&512&&(Ge||a===null||bn(a,a.return)),c&64&&Bn&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?c:a.concat(c))));break;case 26:var h=un;if(qt(r,t),$t(t),c&512&&(Ge||a===null||bn(a,a.return)),c&4){var g=a!==null?a.memoizedState:null;if(c=t.memoizedState,a===null)if(c===null)if(t.stateNode===null){e:{c=t.type,a=t.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":g=h.getElementsByTagName("title")[0],(!g||g[kr]||g[pt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=h.createElement(c),h.head.insertBefore(g,h.querySelector("head > title"))),ot(g,c,a),g[pt]=t,et(g),c=g;break e;case"link":var S=Fm("link","href",h).get(c+(a.href||""));if(S){for(var _=0;_<S.length;_++)if(g=S[_],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){S.splice(_,1);break t}}g=h.createElement(c),ot(g,c,a),h.head.appendChild(g);break;case"meta":if(S=Fm("meta","content",h).get(c+(a.content||""))){for(_=0;_<S.length;_++)if(g=S[_],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){S.splice(_,1);break t}}g=h.createElement(c),ot(g,c,a),h.head.appendChild(g);break;default:throw Error(s(468,c))}g[pt]=t,et(g),c=g}t.stateNode=c}else Qm(h,t.type,t.stateNode);else t.stateNode=Pm(h,c,t.memoizedProps);else g!==c?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,c===null?Qm(h,t.type,t.stateNode):Pm(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&Pu(t,t.memoizedProps,a.memoizedProps)}break;case 27:qt(r,t),$t(t),c&512&&(Ge||a===null||bn(a,a.return)),a!==null&&c&4&&Pu(t,t.memoizedProps,a.memoizedProps);break;case 5:if(qt(r,t),$t(t),c&512&&(Ge||a===null||bn(a,a.return)),t.flags&32){h=t.stateNode;try{gs(h,"")}catch(H){Oe(t,t.return,H)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,Pu(t,h,a!==null?a.memoizedProps:h)),c&1024&&(Zu=!0);break;case 6:if(qt(r,t),$t(t),c&4){if(t.stateNode===null)throw Error(s(162));c=t.memoizedProps,a=t.stateNode;try{a.nodeValue=c}catch(H){Oe(t,t.return,H)}}break;case 3:if(lo=null,h=un,un=ro(r.containerInfo),qt(r,t),un=h,$t(t),c&4&&a!==null&&a.memoizedState.isDehydrated)try{xa(r.containerInfo)}catch(H){Oe(t,t.return,H)}Zu&&(Zu=!1,nm(t));break;case 4:c=un,un=ro(t.stateNode.containerInfo),qt(r,t),$t(t),un=c;break;case 12:qt(r,t),$t(t);break;case 13:qt(r,t),$t(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(rf=Ut()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Ju(t,c)));break;case 22:h=t.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,D=Bn,G=Ge;if(Bn=D||h,Ge=G||A,qt(r,t),Ge=G,Bn=D,$t(t),c&8192)e:for(r=t.stateNode,r._visibility=h?r._visibility&-2:r._visibility|1,h&&(a===null||A||Bn||Ge||zi(t)),a=null,r=t;;){if(r.tag===5||r.tag===26){if(a===null){A=a=r;try{if(g=A.stateNode,h)S=g.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{_=A.stateNode;var P=A.memoizedProps.style,U=P!=null&&P.hasOwnProperty("display")?P.display:null;_.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(H){Oe(A,A.return,H)}}}else if(r.tag===6){if(a===null){A=r;try{A.stateNode.nodeValue=h?"":A.memoizedProps}catch(H){Oe(A,A.return,H)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;a===r&&(a=null),r=r.return}a===r&&(a=null),r.sibling.return=r.return,r=r.sibling}c&4&&(c=t.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,Ju(t,a))));break;case 19:qt(r,t),$t(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Ju(t,c)));break;case 30:break;case 21:break;default:qt(r,t),$t(t)}}function $t(t){var r=t.flags;if(r&2){try{for(var a,c=t.return;c!==null;){if(Pg(c)){a=c;break}c=c.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var h=a.stateNode,g=Fu(t);Yl(t,g,h);break;case 5:var S=a.stateNode;a.flags&32&&(gs(S,""),a.flags&=-33);var _=Fu(t);Yl(t,_,S);break;case 3:case 4:var A=a.stateNode.containerInfo,D=Fu(t);Qu(t,D,A);break;default:throw Error(s(161))}}catch(G){Oe(t,t.return,G)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function nm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;nm(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function si(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Zg(t,r.alternate,r),r=r.sibling}function zi(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:ii(4,r,r.return),zi(r);break;case 1:bn(r,r.return);var a=r.stateNode;typeof a.componentWillUnmount=="function"&&Yg(r,r.return,a),zi(r);break;case 27:pa(r.stateNode);case 26:case 5:bn(r,r.return),zi(r);break;case 22:r.memoizedState===null&&zi(r);break;case 30:zi(r);break;default:zi(r)}t=t.sibling}}function ri(t,r,a){for(a=a&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var c=r.alternate,h=t,g=r,S=g.flags;switch(g.tag){case 0:case 11:case 15:ri(h,g,a),sa(4,g);break;case 1:if(ri(h,g,a),c=g,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(D){Oe(c,c.return,D)}if(c=g,h=c.updateQueue,h!==null){var _=c.stateNode;try{var A=h.shared.hiddenCallbacks;if(A!==null)for(h.shared.hiddenCallbacks=null,h=0;h<A.length;h++)Op(A[h],_)}catch(D){Oe(c,c.return,D)}}a&&S&64&&Kg(g),ra(g,g.return);break;case 27:Fg(g);case 26:case 5:ri(h,g,a),a&&c===null&&S&4&&Xg(g),ra(g,g.return);break;case 12:ri(h,g,a);break;case 13:ri(h,g,a),a&&S&4&&em(h,g);break;case 22:g.memoizedState===null&&ri(h,g,a),ra(g,g.return);break;case 30:break;default:ri(h,g,a)}r=r.sibling}}function Wu(t,r){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Gr(a))}function ef(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Gr(t))}function vn(t,r,a,c){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)im(t,r,a,c),r=r.sibling}function im(t,r,a,c){var h=r.flags;switch(r.tag){case 0:case 11:case 15:vn(t,r,a,c),h&2048&&sa(9,r);break;case 1:vn(t,r,a,c);break;case 3:vn(t,r,a,c),h&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Gr(t)));break;case 12:if(h&2048){vn(t,r,a,c),t=r.stateNode;try{var g=r.memoizedProps,S=g.id,_=g.onPostCommit;typeof _=="function"&&_(S,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(A){Oe(r,r.return,A)}}else vn(t,r,a,c);break;case 13:vn(t,r,a,c);break;case 23:break;case 22:g=r.stateNode,S=r.alternate,r.memoizedState!==null?g._visibility&2?vn(t,r,a,c):aa(t,r):g._visibility&2?vn(t,r,a,c):(g._visibility|=2,Rs(t,r,a,c,(r.subtreeFlags&10256)!==0)),h&2048&&Wu(S,r);break;case 24:vn(t,r,a,c),h&2048&&ef(r.alternate,r);break;default:vn(t,r,a,c)}}function Rs(t,r,a,c,h){for(h=h&&(r.subtreeFlags&10256)!==0,r=r.child;r!==null;){var g=t,S=r,_=a,A=c,D=S.flags;switch(S.tag){case 0:case 11:case 15:Rs(g,S,_,A,h),sa(8,S);break;case 23:break;case 22:var G=S.stateNode;S.memoizedState!==null?G._visibility&2?Rs(g,S,_,A,h):aa(g,S):(G._visibility|=2,Rs(g,S,_,A,h)),h&&D&2048&&Wu(S.alternate,S);break;case 24:Rs(g,S,_,A,h),h&&D&2048&&ef(S.alternate,S);break;default:Rs(g,S,_,A,h)}r=r.sibling}}function aa(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var a=t,c=r,h=c.flags;switch(c.tag){case 22:aa(a,c),h&2048&&Wu(c.alternate,c);break;case 24:aa(a,c),h&2048&&ef(c.alternate,c);break;default:aa(a,c)}r=r.sibling}}var la=8192;function Ds(t){if(t.subtreeFlags&la)for(t=t.child;t!==null;)sm(t),t=t.sibling}function sm(t){switch(t.tag){case 26:Ds(t),t.flags&la&&t.memoizedState!==null&&uw(un,t.memoizedState,t.memoizedProps);break;case 5:Ds(t);break;case 3:case 4:var r=un;un=ro(t.stateNode.containerInfo),Ds(t),un=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=la,la=16777216,Ds(t),la=r):Ds(t));break;default:Ds(t)}}function rm(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function oa(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];nt=c,lm(c,t)}rm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)am(t),t=t.sibling}function am(t){switch(t.tag){case 0:case 11:case 15:oa(t),t.flags&2048&&ii(9,t,t.return);break;case 3:oa(t);break;case 12:oa(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Xl(t)):oa(t);break;default:oa(t)}}function Xl(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var a=0;a<r.length;a++){var c=r[a];nt=c,lm(c,t)}rm(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:ii(8,r,r.return),Xl(r);break;case 22:a=r.stateNode,a._visibility&2&&(a._visibility&=-3,Xl(r));break;default:Xl(r)}t=t.sibling}}function lm(t,r){for(;nt!==null;){var a=nt;switch(a.tag){case 0:case 11:case 15:ii(8,a,r);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Gr(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,nt=c;else e:for(a=t;nt!==null;){c=nt;var h=c.sibling,g=c.return;if(Jg(c),c===a){nt=null;break e}if(h!==null){h.return=g,nt=h;break e}nt=g}}}var A1={getCacheForType:function(t){var r=gt(Qe),a=r.data.get(t);return a===void 0&&(a=t(),r.data.set(t,a)),a}},N1=typeof WeakMap=="function"?WeakMap:Map,Te=0,je=null,ye=null,we=0,Ae=0,It=null,ai=!1,Bs=!1,tf=!1,Hn=0,Ie=0,li=0,qi=0,nf=0,tn=0,Us=0,ca=null,Ot=null,sf=!1,rf=0,Pl=1/0,Fl=null,oi=null,lt=0,ci=null,Hs=null,zs=0,af=0,lf=null,om=null,ua=0,of=null;function Vt(){if((Te&2)!==0&&we!==0)return we&-we;if(z.T!==null){var t=As;return t!==0?t:gf()}return Ed()}function cm(){tn===0&&(tn=(we&536870912)===0||Ee?Sd():536870912);var t=en.current;return t!==null&&(t.flags|=32),tn}function Gt(t,r,a){(t===je&&(Ae===2||Ae===9)||t.cancelPendingCommit!==null)&&(qs(t,0),ui(t,we,tn,!1)),Cr(t,a),((Te&2)===0||t!==je)&&(t===je&&((Te&2)===0&&(qi|=a),Ie===4&&ui(t,we,tn,!1)),Sn(t))}function um(t,r,a){if((Te&6)!==0)throw Error(s(327));var c=!a&&(r&124)===0&&(r&t.expiredLanes)===0||Nr(t,r),h=c?M1(t,r):ff(t,r,!0),g=c;do{if(h===0){Bs&&!c&&ui(t,r,0,!1);break}else{if(a=t.current.alternate,g&&!C1(a)){h=ff(t,r,!1),g=!1;continue}if(h===2){if(g=r,t.errorRecoveryDisabledLanes&g)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var _=t;h=ca;var A=_.current.memoizedState.isDehydrated;if(A&&(qs(_,S).flags|=256),S=ff(_,S,!1),S!==2){if(tf&&!A){_.errorRecoveryDisabledLanes|=g,qi|=g,h=4;break e}g=Ot,Ot=h,g!==null&&(Ot===null?Ot=g:Ot.push.apply(Ot,g))}h=S}if(g=!1,h!==2)continue}}if(h===1){qs(t,0),ui(t,r,0,!0);break}e:{switch(c=t,g=h,g){case 0:case 1:throw Error(s(345));case 4:if((r&4194048)!==r)break;case 6:ui(c,r,tn,!ai);break e;case 2:Ot=null;break;case 3:case 5:break;default:throw Error(s(329))}if((r&62914560)===r&&(h=rf+300-Ut(),10<h)){if(ui(c,r,tn,!ai),At(c,0,!0)!==0)break e;c.timeoutHandle=zm(fm.bind(null,c,a,Ot,Fl,sf,r,tn,qi,Us,ai,g,2,-0,0),h);break e}fm(c,a,Ot,Fl,sf,r,tn,qi,Us,ai,g,0,-0,0)}}break}while(!0);Sn(t)}function fm(t,r,a,c,h,g,S,_,A,D,G,P,U,H){if(t.timeoutHandle=-1,P=r.subtreeFlags,(P&8192||(P&16785408)===16785408)&&(ya={stylesheets:null,count:0,unsuspend:cw},sm(r),P=fw(),P!==null)){t.cancelPendingCommit=P(bm.bind(null,t,r,g,a,c,h,S,_,A,G,1,U,H)),ui(t,g,S,!D);return}bm(t,r,g,a,c,h,S,_,A)}function C1(t){for(var r=t;;){var a=r.tag;if((a===0||a===11||a===15)&&r.flags&16384&&(a=r.updateQueue,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(!Ht(g(),h))return!1}catch{return!1}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function ui(t,r,a,c){r&=~nf,r&=~qi,t.suspendedLanes|=r,t.pingedLanes&=~r,c&&(t.warmLanes|=r),c=t.expirationTimes;for(var h=r;0<h;){var g=31-rt(h),S=1<<g;c[g]=-1,h&=~S}a!==0&&xd(t,a,r)}function Ql(){return(Te&6)===0?(fa(0),!1):!0}function cf(){if(ye!==null){if(Ae===0)var t=ye.return;else t=ye,Mn=Ri=null,Tu(t),Ls=null,ta=0,t=ye;for(;t!==null;)Gg(t.alternate,t),t=t.return;ye=null}}function qs(t,r){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Y1(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),cf(),je=t,ye=a=Nn(t.current,null),we=r,Ae=0,It=null,ai=!1,Bs=Nr(t,r),tf=!1,Us=tn=nf=qi=li=Ie=0,Ot=ca=null,sf=!1,(r&8)!==0&&(r|=r&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=r;0<c;){var h=31-rt(c),g=1<<h;r|=t[h],c&=~g}return Hn=r,bl(),a}function hm(t,r){de=null,z.H=Ul,r===Yr||r===Nl?(r=kp(),Ae=3):r===Ap?(r=kp(),Ae=4):Ae=r===Mg?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,It=r,ye===null&&(Ie=1,Il(t,Qt(r,t.current)))}function dm(){var t=z.H;return z.H=Ul,t===null?Ul:t}function pm(){var t=z.A;return z.A=A1,t}function uf(){Ie=4,ai||(we&4194048)!==we&&en.current!==null||(Bs=!0),(li&134217727)===0&&(qi&134217727)===0||je===null||ui(je,we,tn,!1)}function ff(t,r,a){var c=Te;Te|=2;var h=dm(),g=pm();(je!==t||we!==r)&&(Fl=null,qs(t,r)),r=!1;var S=Ie;e:do try{if(Ae!==0&&ye!==null){var _=ye,A=It;switch(Ae){case 8:cf(),S=6;break e;case 3:case 2:case 9:case 6:en.current===null&&(r=!0);var D=Ae;if(Ae=0,It=null,$s(t,_,A,D),a&&Bs){S=0;break e}break;default:D=Ae,Ae=0,It=null,$s(t,_,A,D)}}k1(),S=Ie;break}catch(G){hm(t,G)}while(!0);return r&&t.shellSuspendCounter++,Mn=Ri=null,Te=c,z.H=h,z.A=g,ye===null&&(je=null,we=0,bl()),S}function k1(){for(;ye!==null;)gm(ye)}function M1(t,r){var a=Te;Te|=2;var c=dm(),h=pm();je!==t||we!==r?(Fl=null,Pl=Ut()+500,qs(t,r)):Bs=Nr(t,r);e:do try{if(Ae!==0&&ye!==null){r=ye;var g=It;t:switch(Ae){case 1:Ae=0,It=null,$s(t,r,g,1);break;case 2:case 9:if(Np(g)){Ae=0,It=null,mm(r);break}r=function(){Ae!==2&&Ae!==9||je!==t||(Ae=7),Sn(t)},g.then(r,r);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:Np(g)?(Ae=0,It=null,mm(r)):(Ae=0,It=null,$s(t,r,g,7));break;case 5:var S=null;switch(ye.tag){case 26:S=ye.memoizedState;case 5:case 27:var _=ye;if(!S||Zm(S)){Ae=0,It=null;var A=_.sibling;if(A!==null)ye=A;else{var D=_.return;D!==null?(ye=D,Zl(D)):ye=null}break t}}Ae=0,It=null,$s(t,r,g,5);break;case 6:Ae=0,It=null,$s(t,r,g,6);break;case 8:cf(),Ie=6;break e;default:throw Error(s(462))}}O1();break}catch(G){hm(t,G)}while(!0);return Mn=Ri=null,z.H=c,z.A=h,Te=a,ye!==null?0:(je=null,we=0,bl(),Ie)}function O1(){for(;ye!==null&&!Er();)gm(ye)}function gm(t){var r=Ig(t.alternate,t,Hn);t.memoizedProps=t.pendingProps,r===null?Zl(t):ye=r}function mm(t){var r=t,a=r.alternate;switch(r.tag){case 15:case 0:r=Bg(a,r,r.pendingProps,r.type,void 0,we);break;case 11:r=Bg(a,r,r.pendingProps,r.type.render,r.ref,we);break;case 5:Tu(r);default:Gg(a,r),r=ye=yp(r,Hn),r=Ig(a,r,Hn)}t.memoizedProps=t.pendingProps,r===null?Zl(t):ye=r}function $s(t,r,a,c){Mn=Ri=null,Tu(r),Ls=null,ta=0;var h=r.return;try{if(S1(t,h,r,a,we)){Ie=1,Il(t,Qt(a,t.current)),ye=null;return}}catch(g){if(h!==null)throw ye=h,g;Ie=1,Il(t,Qt(a,t.current)),ye=null;return}r.flags&32768?(Ee||c===1?t=!0:Bs||(we&536870912)!==0?t=!1:(ai=t=!0,(c===2||c===9||c===3||c===6)&&(c=en.current,c!==null&&c.tag===13&&(c.flags|=16384))),ym(r,t)):Zl(r)}function Zl(t){var r=t;do{if((r.flags&32768)!==0){ym(r,ai);return}t=r.return;var a=x1(r.alternate,r,Hn);if(a!==null){ye=a;return}if(r=r.sibling,r!==null){ye=r;return}ye=r=t}while(r!==null);Ie===0&&(Ie=5)}function ym(t,r){do{var a=_1(t.alternate,t);if(a!==null){a.flags&=32767,ye=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!r&&(t=t.sibling,t!==null)){ye=t;return}ye=t=a}while(t!==null);Ie=6,ye=null}function bm(t,r,a,c,h,g,S,_,A){t.cancelPendingCommit=null;do Jl();while(lt!==0);if((Te&6)!==0)throw Error(s(327));if(r!==null){if(r===t.current)throw Error(s(177));if(g=r.lanes|r.childLanes,g|=eu,cS(t,a,g,S,_,A),t===je&&(ye=je=null,we=0),Hs=r,ci=t,zs=a,af=g,lf=h,om=c,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,D1(as,function(){return _m(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||c){c=z.T,z.T=null,h=Z.p,Z.p=2,S=Te,Te|=4;try{E1(t,r,a)}finally{Te=S,Z.p=h,z.T=c}}lt=1,vm(),Sm(),wm()}}function vm(){if(lt===1){lt=0;var t=ci,r=Hs,a=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||a){a=z.T,z.T=null;var c=Z.p;Z.p=2;var h=Te;Te|=4;try{tm(r,t);var g=_f,S=lp(t.containerInfo),_=g.focusedElem,A=g.selectionRange;if(S!==_&&_&&_.ownerDocument&&ap(_.ownerDocument.documentElement,_)){if(A!==null&&Fc(_)){var D=A.start,G=A.end;if(G===void 0&&(G=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(G,_.value.length);else{var P=_.ownerDocument||document,U=P&&P.defaultView||window;if(U.getSelection){var H=U.getSelection(),ce=_.textContent.length,ae=Math.min(A.start,ce),Me=A.end===void 0?ae:Math.min(A.end,ce);!H.extend&&ae>Me&&(S=Me,Me=ae,ae=S);var O=rp(_,ae),M=rp(_,Me);if(O&&M&&(H.rangeCount!==1||H.anchorNode!==O.node||H.anchorOffset!==O.offset||H.focusNode!==M.node||H.focusOffset!==M.offset)){var R=P.createRange();R.setStart(O.node,O.offset),H.removeAllRanges(),ae>Me?(H.addRange(R),H.extend(M.node,M.offset)):(R.setEnd(M.node,M.offset),H.addRange(R))}}}}for(P=[],H=_;H=H.parentNode;)H.nodeType===1&&P.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<P.length;_++){var K=P[_];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}uo=!!xf,_f=xf=null}finally{Te=h,Z.p=c,z.T=a}}t.current=r,lt=2}}function Sm(){if(lt===2){lt=0;var t=ci,r=Hs,a=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||a){a=z.T,z.T=null;var c=Z.p;Z.p=2;var h=Te;Te|=4;try{Zg(t,r.alternate,r)}finally{Te=h,Z.p=c,z.T=a}}lt=3}}function wm(){if(lt===4||lt===3){lt=0,sl();var t=ci,r=Hs,a=zs,c=om;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?lt=5:(lt=0,Hs=ci=null,xm(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(oi=null),Cc(a),r=r.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(_i,r,void 0,(r.current.flags&128)===128)}catch{}if(c!==null){r=z.T,h=Z.p,Z.p=2,z.T=null;try{for(var g=t.onRecoverableError,S=0;S<c.length;S++){var _=c[S];g(_.value,{componentStack:_.stack})}}finally{z.T=r,Z.p=h}}(zs&3)!==0&&Jl(),Sn(t),h=t.pendingLanes,(a&4194090)!==0&&(h&42)!==0?t===of?ua++:(ua=0,of=t):ua=0,fa(0)}}function xm(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Gr(r)))}function Jl(t){return vm(),Sm(),wm(),_m()}function _m(){if(lt!==5)return!1;var t=ci,r=af;af=0;var a=Cc(zs),c=z.T,h=Z.p;try{Z.p=32>a?32:a,z.T=null,a=lf,lf=null;var g=ci,S=zs;if(lt=0,Hs=ci=null,zs=0,(Te&6)!==0)throw Error(s(331));var _=Te;if(Te|=4,am(g.current),im(g,g.current,S,a),Te=_,fa(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(_i,g)}catch{}return!0}finally{Z.p=h,z.T=c,xm(t,r)}}function Em(t,r,a){r=Qt(a,r),r=zu(t.stateNode,r,2),t=Wn(t,r,2),t!==null&&(Cr(t,2),Sn(t))}function Oe(t,r,a){if(t.tag===3)Em(t,t,a);else for(;r!==null;){if(r.tag===3){Em(r,t,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(oi===null||!oi.has(c))){t=Qt(a,t),a=Cg(2),c=Wn(r,a,2),c!==null&&(kg(a,c,r,t),Cr(c,2),Sn(c));break}}r=r.return}}function hf(t,r,a){var c=t.pingCache;if(c===null){c=t.pingCache=new N1;var h=new Set;c.set(r,h)}else h=c.get(r),h===void 0&&(h=new Set,c.set(r,h));h.has(a)||(tf=!0,h.add(a),t=L1.bind(null,t,r,a),r.then(t,t))}function L1(t,r,a){var c=t.pingCache;c!==null&&c.delete(r),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,je===t&&(we&a)===a&&(Ie===4||Ie===3&&(we&62914560)===we&&300>Ut()-rf?(Te&2)===0&&qs(t,0):nf|=a,Us===we&&(Us=0)),Sn(t)}function Tm(t,r){r===0&&(r=wd()),t=xs(t,r),t!==null&&(Cr(t,r),Sn(t))}function j1(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),Tm(t,a)}function R1(t,r){var a=0;switch(t.tag){case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(s(314))}c!==null&&c.delete(r),Tm(t,a)}function D1(t,r){return xr(t,r)}var Wl=null,Is=null,df=!1,eo=!1,pf=!1,$i=0;function Sn(t){t!==Is&&t.next===null&&(Is===null?Wl=Is=t:Is=Is.next=t),eo=!0,df||(df=!0,U1())}function fa(t,r){if(!pf&&eo){pf=!0;do for(var a=!1,c=Wl;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var g=0;else{var S=c.suspendedLanes,_=c.pingedLanes;g=(1<<31-rt(42|t)+1)-1,g&=h&~(S&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,km(c,g))}else g=we,g=At(c,c===je?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Nr(c,g)||(a=!0,km(c,g));c=c.next}while(a);pf=!1}}function B1(){Am()}function Am(){eo=df=!1;var t=0;$i!==0&&(K1()&&(t=$i),$i=0);for(var r=Ut(),a=null,c=Wl;c!==null;){var h=c.next,g=Nm(c,r);g===0?(c.next=null,a===null?Wl=h:a.next=h,h===null&&(Is=a)):(a=c,(t!==0||(g&3)!==0)&&(eo=!0)),c=h}fa(t)}function Nm(t,r){for(var a=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var S=31-rt(g),_=1<<S,A=h[S];A===-1?((_&a)===0||(_&c)!==0)&&(h[S]=oS(_,r)):A<=r&&(t.expiredLanes|=_),g&=~_}if(r=je,a=we,a=At(t,t===r?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,a===0||t===r&&(Ae===2||Ae===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&_r(c),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||Nr(t,a)){if(r=a&-a,r===t.callbackPriority)return r;switch(c!==null&&_r(c),Cc(a)){case 2:case 8:a=al;break;case 32:a=as;break;case 268435456:a=Tr;break;default:a=as}return c=Cm.bind(null,t),a=xr(a,c),t.callbackPriority=r,t.callbackNode=a,r}return c!==null&&c!==null&&_r(c),t.callbackPriority=2,t.callbackNode=null,2}function Cm(t,r){if(lt!==0&<!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Jl()&&t.callbackNode!==a)return null;var c=we;return c=At(t,t===je?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(um(t,c,r),Nm(t,Ut()),t.callbackNode!=null&&t.callbackNode===a?Cm.bind(null,t):null)}function km(t,r){if(Jl())return null;um(t,r,!0)}function U1(){X1(function(){(Te&6)!==0?xr(rl,B1):Am()})}function gf(){return $i===0&&($i=Sd()),$i}function Mm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:fl(""+t)}function Om(t,r){var a=r.ownerDocument.createElement("input");return a.name=r.name,a.value=r.value,t.id&&a.setAttribute("form",t.id),r.parentNode.insertBefore(a,r),t=new FormData(t),a.parentNode.removeChild(a),t}function H1(t,r,a,c,h){if(r==="submit"&&a&&a.stateNode===h){var g=Mm((h[Nt]||null).action),S=c.submitter;S&&(r=(r=S[Nt]||null)?Mm(r.formAction):S.getAttribute("formAction"),r!==null&&(g=r,S=null));var _=new gl("action","action",null,c,h);t.push({event:_,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if($i!==0){var A=S?Om(h,S):new FormData(h);Ru(a,{pending:!0,data:A,method:h.method,action:g},null,A)}}else typeof g=="function"&&(_.preventDefault(),A=S?Om(h,S):new FormData(h),Ru(a,{pending:!0,data:A,method:h.method,action:g},g,A))},currentTarget:h}]})}}for(var mf=0;mf<Wc.length;mf++){var yf=Wc[mf],z1=yf.toLowerCase(),q1=yf[0].toUpperCase()+yf.slice(1);cn(z1,"on"+q1)}cn(up,"onAnimationEnd"),cn(fp,"onAnimationIteration"),cn(hp,"onAnimationStart"),cn("dblclick","onDoubleClick"),cn("focusin","onFocus"),cn("focusout","onBlur"),cn(i1,"onTransitionRun"),cn(s1,"onTransitionStart"),cn(r1,"onTransitionCancel"),cn(dp,"onTransitionEnd"),hs("onMouseEnter",["mouseout","mouseover"]),hs("onMouseLeave",["mouseout","mouseover"]),hs("onPointerEnter",["pointerout","pointerover"]),hs("onPointerLeave",["pointerout","pointerover"]),Ti("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ti("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ti("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ti("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ti("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ti("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ha="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(" "),$1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ha));function Lm(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var c=t[a],h=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var S=c.length-1;0<=S;S--){var _=c[S],A=_.instance,D=_.currentTarget;if(_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(G){$l(G)}h.currentTarget=null,g=A}else for(S=0;S<c.length;S++){if(_=c[S],A=_.instance,D=_.currentTarget,_=_.listener,A!==g&&h.isPropagationStopped())break e;g=_,h.currentTarget=D;try{g(h)}catch(G){$l(G)}h.currentTarget=null,g=A}}}}function be(t,r){var a=r[kc];a===void 0&&(a=r[kc]=new Set);var c=t+"__bubble";a.has(c)||(jm(r,t,2,!1),a.add(c))}function bf(t,r,a){var c=0;r&&(c|=4),jm(a,t,c,r)}var to="_reactListening"+Math.random().toString(36).slice(2);function vf(t){if(!t[to]){t[to]=!0,Ad.forEach(function(a){a!=="selectionchange"&&($1.has(a)||bf(a,!1,t),bf(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[to]||(r[to]=!0,bf("selectionchange",!1,r))}}function jm(t,r,a,c){switch(iy(r)){case 2:var h=pw;break;case 8:h=gw;break;default:h=jf}a=h.bind(null,r,a,t),h=void 0,!qc||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(r,a,{capture:!0,passive:h}):t.addEventListener(r,a,!0):h!==void 0?t.addEventListener(r,a,{passive:h}):t.addEventListener(r,a,!1)}function Sf(t,r,a,c,h){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var _=c.stateNode.containerInfo;if(_===h)break;if(S===4)for(S=c.return;S!==null;){var A=S.tag;if((A===3||A===4)&&S.stateNode.containerInfo===h)return;S=S.return}for(;_!==null;){if(S=cs(_),S===null)return;if(A=S.tag,A===5||A===6||A===26||A===27){c=g=S;continue e}_=_.parentNode}}c=c.return}qd(function(){var D=g,G=Hc(a),P=[];e:{var U=pp.get(t);if(U!==void 0){var H=gl,ce=t;switch(t){case"keypress":if(dl(a)===0)break e;case"keydown":case"keyup":H=DS;break;case"focusin":ce="focus",H=Gc;break;case"focusout":ce="blur",H=Gc;break;case"beforeblur":case"afterblur":H=Gc;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":H=Vd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=_S;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=HS;break;case up:case fp:case hp:H=AS;break;case dp:H=qS;break;case"scroll":case"scrollend":H=wS;break;case"wheel":H=IS;break;case"copy":case"cut":case"paste":H=CS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Kd;break;case"toggle":case"beforetoggle":H=GS}var ae=(r&4)!==0,Me=!ae&&(t==="scroll"||t==="scrollend"),O=ae?U!==null?U+"Capture":null:U;ae=[];for(var M=D,R;M!==null;){var K=M;if(R=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||R===null||O===null||(K=Or(M,O),K!=null&&ae.push(da(M,K,R))),Me)break;M=M.return}0<ae.length&&(U=new H(U,ce,null,a,G),P.push({event:U,listeners:ae}))}}if((r&7)===0){e:{if(U=t==="mouseover"||t==="pointerover",H=t==="mouseout"||t==="pointerout",U&&a!==Uc&&(ce=a.relatedTarget||a.fromElement)&&(cs(ce)||ce[os]))break e;if((H||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,H?(ce=a.relatedTarget||a.toElement,H=D,ce=ce?cs(ce):null,ce!==null&&(Me=o(ce),ae=ce.tag,ce!==Me||ae!==5&&ae!==27&&ae!==6)&&(ce=null)):(H=null,ce=D),H!==ce)){if(ae=Vd,K="onMouseLeave",O="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(ae=Kd,K="onPointerLeave",O="onPointerEnter",M="pointer"),Me=H==null?U:Mr(H),R=ce==null?U:Mr(ce),U=new ae(K,M+"leave",H,a,G),U.target=Me,U.relatedTarget=R,K=null,cs(G)===D&&(ae=new ae(O,M+"enter",ce,a,G),ae.target=R,ae.relatedTarget=Me,K=ae),Me=K,H&&ce)t:{for(ae=H,O=ce,M=0,R=ae;R;R=Vs(R))M++;for(R=0,K=O;K;K=Vs(K))R++;for(;0<M-R;)ae=Vs(ae),M--;for(;0<R-M;)O=Vs(O),R--;for(;M--;){if(ae===O||O!==null&&ae===O.alternate)break t;ae=Vs(ae),O=Vs(O)}ae=null}else ae=null;H!==null&&Rm(P,U,H,ae,!1),ce!==null&&Me!==null&&Rm(P,Me,ce,ae,!0)}}e:{if(U=D?Mr(D):window,H=U.nodeName&&U.nodeName.toLowerCase(),H==="select"||H==="input"&&U.type==="file")var ee=Wd;else if(Zd(U))if(ep)ee=e1;else{ee=JS;var pe=ZS}else H=U.nodeName,!H||H.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&Bc(D.elementType)&&(ee=Wd):ee=WS;if(ee&&(ee=ee(t,D))){Jd(P,ee,a,G);break e}pe&&pe(t,U,D),t==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&Dc(U,"number",U.value)}switch(pe=D?Mr(D):window,t){case"focusin":(Zd(pe)||pe.contentEditable==="true")&&(vs=pe,Qc=D,zr=null);break;case"focusout":zr=Qc=vs=null;break;case"mousedown":Zc=!0;break;case"contextmenu":case"mouseup":case"dragend":Zc=!1,op(P,a,G);break;case"selectionchange":if(n1)break;case"keydown":case"keyup":op(P,a,G)}var ie;if(Yc)e:{switch(t){case"compositionstart":var oe="onCompositionStart";break e;case"compositionend":oe="onCompositionEnd";break e;case"compositionupdate":oe="onCompositionUpdate";break e}oe=void 0}else bs?Fd(t,a)&&(oe="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(oe="onCompositionStart");oe&&(Yd&&a.locale!=="ko"&&(bs||oe!=="onCompositionStart"?oe==="onCompositionEnd"&&bs&&(ie=$d()):(Fn=G,$c="value"in Fn?Fn.value:Fn.textContent,bs=!0)),pe=no(D,oe),0<pe.length&&(oe=new Gd(oe,t,null,a,G),P.push({event:oe,listeners:pe}),ie?oe.data=ie:(ie=Qd(a),ie!==null&&(oe.data=ie)))),(ie=YS?XS(t,a):PS(t,a))&&(oe=no(D,"onBeforeInput"),0<oe.length&&(pe=new Gd("onBeforeInput","beforeinput",null,a,G),P.push({event:pe,listeners:oe}),pe.data=ie)),H1(P,t,D,a,G)}Lm(P,r)})}function da(t,r,a){return{instance:t,listener:r,currentTarget:a}}function no(t,r){for(var a=r+"Capture",c=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Or(t,a),h!=null&&c.unshift(da(t,h,g)),h=Or(t,r),h!=null&&c.push(da(t,h,g))),t.tag===3)return c;t=t.return}return[]}function Vs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Rm(t,r,a,c,h){for(var g=r._reactName,S=[];a!==null&&a!==c;){var _=a,A=_.alternate,D=_.stateNode;if(_=_.tag,A!==null&&A===c)break;_!==5&&_!==26&&_!==27||D===null||(A=D,h?(D=Or(a,g),D!=null&&S.unshift(da(a,D,A))):h||(D=Or(a,g),D!=null&&S.push(da(a,D,A)))),a=a.return}S.length!==0&&t.push({event:r,listeners:S})}var I1=/\r\n?/g,V1=/\u0000|\uFFFD/g;function Dm(t){return(typeof t=="string"?t:""+t).replace(I1,`
|
50
|
+
`).replace(V1,"")}function Bm(t,r){return r=Dm(r),Dm(t)===r}function io(){}function ke(t,r,a,c,h,g){switch(a){case"children":typeof c=="string"?r==="body"||r==="textarea"&&c===""||gs(t,c):(typeof c=="number"||typeof c=="bigint")&&r!=="body"&&gs(t,""+c);break;case"className":ol(t,"class",c);break;case"tabIndex":ol(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ol(t,a,c);break;case"style":Hd(t,c,g);break;case"data":if(r!=="object"){ol(t,"data",c);break}case"src":case"href":if(c===""&&(r!=="a"||a!=="href")){t.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=fl(""+c),t.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(a==="formAction"?(r!=="input"&&ke(t,r,"name",h.name,h,null),ke(t,r,"formEncType",h.formEncType,h,null),ke(t,r,"formMethod",h.formMethod,h,null),ke(t,r,"formTarget",h.formTarget,h,null)):(ke(t,r,"encType",h.encType,h,null),ke(t,r,"method",h.method,h,null),ke(t,r,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(a);break}c=fl(""+c),t.setAttribute(a,c);break;case"onClick":c!=null&&(t.onclick=io);break;case"onScroll":c!=null&&be("scroll",t);break;case"onScrollEnd":c!=null&&be("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=a}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}a=fl(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,""+c):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":c===!0?t.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(a,c):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(a,c):t.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(a):t.setAttribute(a,c);break;case"popover":be("beforetoggle",t),be("toggle",t),ll(t,"popover",c);break;case"xlinkActuate":Tn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Tn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Tn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Tn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Tn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Tn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Tn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Tn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Tn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":ll(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=vS.get(a)||a,ll(t,a,c))}}function wf(t,r,a,c,h,g){switch(a){case"style":Hd(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(s(61));if(a=c.__html,a!=null){if(h.children!=null)throw Error(s(60));t.innerHTML=a}}break;case"children":typeof c=="string"?gs(t,c):(typeof c=="number"||typeof c=="bigint")&&gs(t,""+c);break;case"onScroll":c!=null&&be("scroll",t);break;case"onScrollEnd":c!=null&&be("scrollend",t);break;case"onClick":c!=null&&(t.onclick=io);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),r=a.slice(2,h?a.length-7:void 0),g=t[Nt]||null,g=g!=null?g[a]:null,typeof g=="function"&&t.removeEventListener(r,g,h),typeof c=="function")){typeof g!="function"&&g!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(r,c,h);break e}a in t?t[a]=c:c===!0?t.setAttribute(a,""):ll(t,a,c)}}}function ot(t,r,a){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",t),be("load",t);var c=!1,h=!1,g;for(g in a)if(a.hasOwnProperty(g)){var S=a[g];if(S!=null)switch(g){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ke(t,r,g,S,a,null)}}h&&ke(t,r,"srcSet",a.srcSet,a,null),c&&ke(t,r,"src",a.src,a,null);return;case"input":be("invalid",t);var _=g=S=h=null,A=null,D=null;for(c in a)if(a.hasOwnProperty(c)){var G=a[c];if(G!=null)switch(c){case"name":h=G;break;case"type":S=G;break;case"checked":A=G;break;case"defaultChecked":D=G;break;case"value":g=G;break;case"defaultValue":_=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(s(137,r));break;default:ke(t,r,c,G,a,null)}}Rd(t,g,_,A,D,S,h,!1),cl(t);return;case"select":be("invalid",t),c=S=g=null;for(h in a)if(a.hasOwnProperty(h)&&(_=a[h],_!=null))switch(h){case"value":g=_;break;case"defaultValue":S=_;break;case"multiple":c=_;default:ke(t,r,h,_,a,null)}r=g,a=S,t.multiple=!!c,r!=null?ps(t,!!c,r,!1):a!=null&&ps(t,!!c,a,!0);return;case"textarea":be("invalid",t),g=h=c=null;for(S in a)if(a.hasOwnProperty(S)&&(_=a[S],_!=null))switch(S){case"value":c=_;break;case"defaultValue":h=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(91));break;default:ke(t,r,S,_,a,null)}Bd(t,c,h,g),cl(t);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(c=a[A],c!=null))switch(A){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:ke(t,r,A,c,a,null)}return;case"dialog":be("beforetoggle",t),be("toggle",t),be("cancel",t),be("close",t);break;case"iframe":case"object":be("load",t);break;case"video":case"audio":for(c=0;c<ha.length;c++)be(ha[c],t);break;case"image":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"embed":case"source":case"link":be("error",t),be("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(c=a[D],c!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,r));default:ke(t,r,D,c,a,null)}return;default:if(Bc(r)){for(G in a)a.hasOwnProperty(G)&&(c=a[G],c!==void 0&&wf(t,r,G,c,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(c=a[_],c!=null&&ke(t,r,_,c,a,null))}function G1(t,r,a,c){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,S=null,_=null,A=null,D=null,G=null;for(H in a){var P=a[H];if(a.hasOwnProperty(H)&&P!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":A=P;default:c.hasOwnProperty(H)||ke(t,r,H,null,c,P)}}for(var U in c){var H=c[U];if(P=a[U],c.hasOwnProperty(U)&&(H!=null||P!=null))switch(U){case"type":g=H;break;case"name":h=H;break;case"checked":D=H;break;case"defaultChecked":G=H;break;case"value":S=H;break;case"defaultValue":_=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(s(137,r));break;default:H!==P&&ke(t,r,U,H,c,P)}}Rc(t,S,_,A,D,G,g,h);return;case"select":H=S=_=U=null;for(g in a)if(A=a[g],a.hasOwnProperty(g)&&A!=null)switch(g){case"value":break;case"multiple":H=A;default:c.hasOwnProperty(g)||ke(t,r,g,null,c,A)}for(h in c)if(g=c[h],A=a[h],c.hasOwnProperty(h)&&(g!=null||A!=null))switch(h){case"value":U=g;break;case"defaultValue":_=g;break;case"multiple":S=g;default:g!==A&&ke(t,r,h,g,c,A)}r=_,a=S,c=H,U!=null?ps(t,!!a,U,!1):!!c!=!!a&&(r!=null?ps(t,!!a,r,!0):ps(t,!!a,a?[]:"",!1));return;case"textarea":H=U=null;for(_ in a)if(h=a[_],a.hasOwnProperty(_)&&h!=null&&!c.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ke(t,r,_,null,c,h)}for(S in c)if(h=c[S],g=a[S],c.hasOwnProperty(S)&&(h!=null||g!=null))switch(S){case"value":U=h;break;case"defaultValue":H=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(s(91));break;default:h!==g&&ke(t,r,S,h,c,g)}Dd(t,U,H);return;case"option":for(var ce in a)if(U=a[ce],a.hasOwnProperty(ce)&&U!=null&&!c.hasOwnProperty(ce))switch(ce){case"selected":t.selected=!1;break;default:ke(t,r,ce,null,c,U)}for(A in c)if(U=c[A],H=a[A],c.hasOwnProperty(A)&&U!==H&&(U!=null||H!=null))switch(A){case"selected":t.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:ke(t,r,A,U,c,H)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ae in a)U=a[ae],a.hasOwnProperty(ae)&&U!=null&&!c.hasOwnProperty(ae)&&ke(t,r,ae,null,c,U);for(D in c)if(U=c[D],H=a[D],c.hasOwnProperty(D)&&U!==H&&(U!=null||H!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,r));break;default:ke(t,r,D,U,c,H)}return;default:if(Bc(r)){for(var Me in a)U=a[Me],a.hasOwnProperty(Me)&&U!==void 0&&!c.hasOwnProperty(Me)&&wf(t,r,Me,void 0,c,U);for(G in c)U=c[G],H=a[G],!c.hasOwnProperty(G)||U===H||U===void 0&&H===void 0||wf(t,r,G,U,c,H);return}}for(var O in a)U=a[O],a.hasOwnProperty(O)&&U!=null&&!c.hasOwnProperty(O)&&ke(t,r,O,null,c,U);for(P in c)U=c[P],H=a[P],!c.hasOwnProperty(P)||U===H||U==null&&H==null||ke(t,r,P,U,c,H)}var xf=null,_f=null;function so(t){return t.nodeType===9?t:t.ownerDocument}function Um(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hm(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function Ef(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Tf=null;function K1(){var t=window.event;return t&&t.type==="popstate"?t===Tf?!1:(Tf=t,!0):(Tf=null,!1)}var zm=typeof setTimeout=="function"?setTimeout:void 0,Y1=typeof clearTimeout=="function"?clearTimeout:void 0,qm=typeof Promise=="function"?Promise:void 0,X1=typeof queueMicrotask=="function"?queueMicrotask:typeof qm<"u"?function(t){return qm.resolve(null).then(t).catch(P1)}:zm;function P1(t){setTimeout(function(){throw t})}function fi(t){return t==="head"}function $m(t,r){var a=r,c=0,h=0;do{var g=a.nextSibling;if(t.removeChild(a),g&&g.nodeType===8)if(a=g.data,a==="/$"){if(0<c&&8>c){a=c;var S=t.ownerDocument;if(a&1&&pa(S.documentElement),a&2&&pa(S.body),a&4)for(a=S.head,pa(a),S=a.firstChild;S;){var _=S.nextSibling,A=S.nodeName;S[kr]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&S.rel.toLowerCase()==="stylesheet"||a.removeChild(S),S=_}}if(h===0){t.removeChild(g),xa(r);return}h--}else a==="$"||a==="$?"||a==="$!"?h++:c=a.charCodeAt(0)-48;else c=0;a=g}while(a);xa(r)}function Af(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var a=r;switch(r=r.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Af(a),Mc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function F1(t,r,a,c){for(;t.nodeType===1;){var h=a;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[kr])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=fn(t.nextSibling),t===null)break}return null}function Q1(t,r,a){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=fn(t.nextSibling),t===null))return null;return t}function Nf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function Z1(t,r){var a=t.ownerDocument;if(t.data!=="$?"||a.readyState==="complete")r();else{var c=function(){r(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function fn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="F!"||r==="F")break;if(r==="/$")return null}}return t}var Cf=null;function Im(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return t;r--}else a==="/$"&&r++}t=t.previousSibling}return null}function Vm(t,r,a){switch(r=so(a),t){case"html":if(t=r.documentElement,!t)throw Error(s(452));return t;case"head":if(t=r.head,!t)throw Error(s(453));return t;case"body":if(t=r.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}function pa(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Mc(t)}var nn=new Map,Gm=new Set;function ro(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var zn=Z.d;Z.d={f:J1,r:W1,D:ew,C:tw,L:nw,m:iw,X:rw,S:sw,M:aw};function J1(){var t=zn.f(),r=Ql();return t||r}function W1(t){var r=us(t);r!==null&&r.tag===5&&r.type==="form"?ug(r):zn.r(t)}var Gs=typeof document>"u"?null:document;function Km(t,r,a){var c=Gs;if(c&&typeof r=="string"&&r){var h=Ft(r);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),Gm.has(h)||(Gm.add(h),t={rel:t,crossOrigin:a,href:r},c.querySelector(h)===null&&(r=c.createElement("link"),ot(r,"link",t),et(r),c.head.appendChild(r)))}}function ew(t){zn.D(t),Km("dns-prefetch",t,null)}function tw(t,r){zn.C(t,r),Km("preconnect",t,r)}function nw(t,r,a){zn.L(t,r,a);var c=Gs;if(c&&t&&r){var h='link[rel="preload"][as="'+Ft(r)+'"]';r==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Ft(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Ft(a.imageSizes)+'"]')):h+='[href="'+Ft(t)+'"]';var g=h;switch(r){case"style":g=Ks(t);break;case"script":g=Ys(t)}nn.has(g)||(t=m({rel:"preload",href:r==="image"&&a&&a.imageSrcSet?void 0:t,as:r},a),nn.set(g,t),c.querySelector(h)!==null||r==="style"&&c.querySelector(ga(g))||r==="script"&&c.querySelector(ma(g))||(r=c.createElement("link"),ot(r,"link",t),et(r),c.head.appendChild(r)))}}function iw(t,r){zn.m(t,r);var a=Gs;if(a&&t){var c=r&&typeof r.as=="string"?r.as:"script",h='link[rel="modulepreload"][as="'+Ft(c)+'"][href="'+Ft(t)+'"]',g=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Ys(t)}if(!nn.has(g)&&(t=m({rel:"modulepreload",href:t},r),nn.set(g,t),a.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ma(g)))return}c=a.createElement("link"),ot(c,"link",t),et(c),a.head.appendChild(c)}}}function sw(t,r,a){zn.S(t,r,a);var c=Gs;if(c&&t){var h=fs(c).hoistableStyles,g=Ks(t);r=r||"default";var S=h.get(g);if(!S){var _={loading:0,preload:null};if(S=c.querySelector(ga(g)))_.loading=5;else{t=m({rel:"stylesheet",href:t,"data-precedence":r},a),(a=nn.get(g))&&kf(t,a);var A=S=c.createElement("link");et(A),ot(A,"link",t),A._p=new Promise(function(D,G){A.onload=D,A.onerror=G}),A.addEventListener("load",function(){_.loading|=1}),A.addEventListener("error",function(){_.loading|=2}),_.loading|=4,ao(S,r,c)}S={type:"stylesheet",instance:S,count:1,state:_},h.set(g,S)}}}function rw(t,r){zn.X(t,r);var a=Gs;if(a&&t){var c=fs(a).hoistableScripts,h=Ys(t),g=c.get(h);g||(g=a.querySelector(ma(h)),g||(t=m({src:t,async:!0},r),(r=nn.get(h))&&Mf(t,r),g=a.createElement("script"),et(g),ot(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function aw(t,r){zn.M(t,r);var a=Gs;if(a&&t){var c=fs(a).hoistableScripts,h=Ys(t),g=c.get(h);g||(g=a.querySelector(ma(h)),g||(t=m({src:t,async:!0,type:"module"},r),(r=nn.get(h))&&Mf(t,r),g=a.createElement("script"),et(g),ot(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(h,g))}}function Ym(t,r,a,c){var h=(h=ue.current)?ro(h):null;if(!h)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(r=Ks(a.href),a=fs(h).hoistableStyles,c=a.get(r),c||(c={type:"style",instance:null,count:0,state:null},a.set(r,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Ks(a.href);var g=fs(h).hoistableStyles,S=g.get(t);if(S||(h=h.ownerDocument||h,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,S),(g=h.querySelector(ga(t)))&&!g._p&&(S.instance=g,S.state.loading=5),nn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},nn.set(t,a),g||lw(h,t,a,S.state))),r&&c===null)throw Error(s(528,""));return S}if(r&&c!==null)throw Error(s(529,""));return null;case"script":return r=a.async,a=a.src,typeof a=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Ys(a),a=fs(h).hoistableScripts,c=a.get(r),c||(c={type:"script",instance:null,count:0,state:null},a.set(r,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Ks(t){return'href="'+Ft(t)+'"'}function ga(t){return'link[rel="stylesheet"]['+t+"]"}function Xm(t){return m({},t,{"data-precedence":t.precedence,precedence:null})}function lw(t,r,a,c){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?c.loading=1:(r=t.createElement("link"),c.preload=r,r.addEventListener("load",function(){return c.loading|=1}),r.addEventListener("error",function(){return c.loading|=2}),ot(r,"link",a),et(r),t.head.appendChild(r))}function Ys(t){return'[src="'+Ft(t)+'"]'}function ma(t){return"script[async]"+t}function Pm(t,r,a){if(r.count++,r.instance===null)switch(r.type){case"style":var c=t.querySelector('style[data-href~="'+Ft(a.href)+'"]');if(c)return r.instance=c,et(c),c;var h=m({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),et(c),ot(c,"style",h),ao(c,a.precedence,t),r.instance=c;case"stylesheet":h=Ks(a.href);var g=t.querySelector(ga(h));if(g)return r.state.loading|=4,r.instance=g,et(g),g;c=Xm(a),(h=nn.get(h))&&kf(c,h),g=(t.ownerDocument||t).createElement("link"),et(g);var S=g;return S._p=new Promise(function(_,A){S.onload=_,S.onerror=A}),ot(g,"link",c),r.state.loading|=4,ao(g,a.precedence,t),r.instance=g;case"script":return g=Ys(a.src),(h=t.querySelector(ma(g)))?(r.instance=h,et(h),h):(c=a,(h=nn.get(g))&&(c=m({},a),Mf(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),et(h),ot(h,"link",c),t.head.appendChild(h),r.instance=h);case"void":return null;default:throw Error(s(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(c=r.instance,r.state.loading|=4,ao(c,a.precedence,t));return r.instance}function ao(t,r,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,g=h,S=0;S<c.length;S++){var _=c[S];if(_.dataset.precedence===r)g=_;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(r=a.nodeType===9?a.head:a,r.insertBefore(t,r.firstChild))}function kf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function Mf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var lo=null;function Fm(t,r,a){if(lo===null){var c=new Map,h=lo=new Map;h.set(a,c)}else h=lo,c=h.get(a),c||(c=new Map,h.set(a,c));if(c.has(t))return c;for(c.set(t,null),a=a.getElementsByTagName(t),h=0;h<a.length;h++){var g=a[h];if(!(g[kr]||g[pt]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(r)||"";S=t+S;var _=c.get(S);_?_.push(g):c.set(S,[g])}}return c}function Qm(t,r,a){t=t.ownerDocument||t,t.head.insertBefore(a,r==="title"?t.querySelector("head > title"):null)}function ow(t,r,a){if(a===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return t=r.disabled,typeof r.precedence=="string"&&t==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Zm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var ya=null;function cw(){}function uw(t,r,a){if(ya===null)throw Error(s(475));var c=ya;if(r.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=Ks(a.href),g=t.querySelector(ga(h));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(c.count++,c=oo.bind(c),t.then(c,c)),r.state.loading|=4,r.instance=g,et(g);return}g=t.ownerDocument||t,a=Xm(a),(h=nn.get(h))&&kf(a,h),g=g.createElement("link"),et(g);var S=g;S._p=new Promise(function(_,A){S.onload=_,S.onerror=A}),ot(g,"link",a),r.instance=g}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(c.count++,r=oo.bind(c),t.addEventListener("load",r),t.addEventListener("error",r))}}function fw(){if(ya===null)throw Error(s(475));var t=ya;return t.stylesheets&&t.count===0&&Of(t,t.stylesheets),0<t.count?function(r){var a=setTimeout(function(){if(t.stylesheets&&Of(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4);return t.unsuspend=r,function(){t.unsuspend=null,clearTimeout(a)}}:null}function oo(){if(this.count--,this.count===0){if(this.stylesheets)Of(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var co=null;function Of(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,co=new Map,r.forEach(hw,t),co=null,oo.call(t))}function hw(t,r){if(!(r.state.loading&4)){var a=co.get(t);if(a)var c=a.get(null);else{a=new Map,co.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var S=h[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),c=S)}c&&a.set(null,c)}h=r.instance,S=h.getAttribute("data-precedence"),g=a.get(S)||c,g===c&&a.set(null,h),a.set(S,h),this.count++,c=oo.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),r.state.loading|=4}}var ba={$$typeof:V,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function dw(t,r,a,c,h,g,S,_){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ac(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ac(0),this.hiddenUpdates=Ac(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Jm(t,r,a,c,h,g,S,_,A,D,G,P){return t=new dw(t,r,a,S,_,A,D,P),r=1,g===!0&&(r|=24),g=zt(3,null,null,r),t.current=g,g.stateNode=t,r=fu(),r.refCount++,t.pooledCache=r,r.refCount++,g.memoizedState={element:c,isDehydrated:a,cache:r},gu(g),t}function Wm(t){return t?(t=_s,t):_s}function ey(t,r,a,c,h,g){h=Wm(h),c.context===null?c.context=h:c.pendingContext=h,c=Jn(r),c.payload={element:a},g=g===void 0?null:g,g!==null&&(c.callback=g),a=Wn(t,c,r),a!==null&&(Gt(a,t,r),Pr(a,t,r))}function ty(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function Lf(t,r){ty(t,r),(t=t.alternate)&&ty(t,r)}function ny(t){if(t.tag===13){var r=xs(t,67108864);r!==null&&Gt(r,t,67108864),Lf(t,67108864)}}var uo=!0;function pw(t,r,a,c){var h=z.T;z.T=null;var g=Z.p;try{Z.p=2,jf(t,r,a,c)}finally{Z.p=g,z.T=h}}function gw(t,r,a,c){var h=z.T;z.T=null;var g=Z.p;try{Z.p=8,jf(t,r,a,c)}finally{Z.p=g,z.T=h}}function jf(t,r,a,c){if(uo){var h=Rf(c);if(h===null)Sf(t,r,c,fo,a),sy(t,c);else if(yw(h,t,r,a,c))c.stopPropagation();else if(sy(t,c),r&4&&-1<mw.indexOf(t)){for(;h!==null;){var g=us(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=dt(g.pendingLanes);if(S!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;S;){var A=1<<31-rt(S);_.entanglements[1]|=A,S&=~A}Sn(g),(Te&6)===0&&(Pl=Ut()+500,fa(0))}}break;case 13:_=xs(g,2),_!==null&&Gt(_,g,2),Ql(),Lf(g,2)}if(g=Rf(c),g===null&&Sf(t,r,c,fo,a),g===h)break;h=g}h!==null&&c.stopPropagation()}else Sf(t,r,c,null,a)}}function Rf(t){return t=Hc(t),Df(t)}var fo=null;function Df(t){if(fo=null,t=cs(t),t!==null){var r=o(t);if(r===null)t=null;else{var a=r.tag;if(a===13){if(t=u(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return fo=t,null}function iy(t){switch(t){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Xn()){case rl:return 2;case al:return 8;case as:case xc:return 32;case Tr:return 268435456;default:return 32}default:return 32}}var Bf=!1,hi=null,di=null,pi=null,va=new Map,Sa=new Map,gi=[],mw="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".split(" ");function sy(t,r){switch(t){case"focusin":case"focusout":hi=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":pi=null;break;case"pointerover":case"pointerout":va.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sa.delete(r.pointerId)}}function wa(t,r,a,c,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[h]},r!==null&&(r=us(r),r!==null&&ny(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),t)}function yw(t,r,a,c,h){switch(r){case"focusin":return hi=wa(hi,t,r,a,c,h),!0;case"dragenter":return di=wa(di,t,r,a,c,h),!0;case"mouseover":return pi=wa(pi,t,r,a,c,h),!0;case"pointerover":var g=h.pointerId;return va.set(g,wa(va.get(g)||null,t,r,a,c,h)),!0;case"gotpointercapture":return g=h.pointerId,Sa.set(g,wa(Sa.get(g)||null,t,r,a,c,h)),!0}return!1}function ry(t){var r=cs(t.target);if(r!==null){var a=o(r);if(a!==null){if(r=a.tag,r===13){if(r=u(a),r!==null){t.blockedOn=r,uS(t.priority,function(){if(a.tag===13){var c=Vt();c=Nc(c);var h=xs(a,c);h!==null&&Gt(h,a,c),Lf(a,c)}});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ho(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Rf(t.nativeEvent);if(a===null){a=t.nativeEvent;var c=new a.constructor(a.type,a);Uc=c,a.target.dispatchEvent(c),Uc=null}else return r=us(a),r!==null&&ny(r),t.blockedOn=a,!1;r.shift()}return!0}function ay(t,r,a){ho(t)&&a.delete(r)}function bw(){Bf=!1,hi!==null&&ho(hi)&&(hi=null),di!==null&&ho(di)&&(di=null),pi!==null&&ho(pi)&&(pi=null),va.forEach(ay),Sa.forEach(ay)}function po(t,r){t.blockedOn===r&&(t.blockedOn=null,Bf||(Bf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,bw)))}var go=null;function ly(t){go!==t&&(go=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){go===t&&(go=null);for(var r=0;r<t.length;r+=3){var a=t[r],c=t[r+1],h=t[r+2];if(typeof c!="function"){if(Df(c||a)===null)continue;break}var g=us(a);g!==null&&(t.splice(r,3),r-=3,Ru(g,{pending:!0,data:h,method:a.method,action:c},c,h))}}))}function xa(t){function r(A){return po(A,t)}hi!==null&&po(hi,t),di!==null&&po(di,t),pi!==null&&po(pi,t),va.forEach(r),Sa.forEach(r);for(var a=0;a<gi.length;a++){var c=gi[a];c.blockedOn===t&&(c.blockedOn=null)}for(;0<gi.length&&(a=gi[0],a.blockedOn===null);)ry(a),a.blockedOn===null&&gi.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var h=a[c],g=a[c+1],S=h[Nt]||null;if(typeof g=="function")S||ly(a);else if(S){var _=null;if(g&&g.hasAttribute("formAction")){if(h=g,S=g[Nt]||null)_=S.formAction;else if(Df(h)!==null)continue}else _=S.action;typeof _=="function"?a[c+1]=_:(a.splice(c,3),c-=3),ly(a)}}}function Uf(t){this._internalRoot=t}mo.prototype.render=Uf.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));var a=r.current,c=Vt();ey(a,c,t,r,null,null)},mo.prototype.unmount=Uf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;ey(t.current,2,null,t,null,null),Ql(),r[os]=null}};function mo(t){this._internalRoot=t}mo.prototype.unstable_scheduleHydration=function(t){if(t){var r=Ed();t={blockedOn:null,target:t,priority:r};for(var a=0;a<gi.length&&r!==0&&r<gi[a].priority;a++);gi.splice(a,0,t),a===0&&ry(t)}};var oy=e.version;if(oy!=="19.1.1")throw Error(s(527,oy,"19.1.1"));Z.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=d(r),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var vw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yo.isDisabled&&yo.supportsFiber)try{_i=yo.inject(vw),vt=yo}catch{}}return Ea.createRoot=function(t,r){if(!l(t))throw Error(s(299));var a=!1,c="",h=Eg,g=Tg,S=Ag,_=null;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(g=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError),r.unstable_transitionCallbacks!==void 0&&(_=r.unstable_transitionCallbacks)),r=Jm(t,1,!1,null,null,a,c,h,g,S,_,null),t[os]=r.current,vf(t),new Uf(r)},Ea.hydrateRoot=function(t,r,a){if(!l(t))throw Error(s(299));var c=!1,h="",g=Eg,S=Tg,_=Ag,A=null,D=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(A=a.unstable_transitionCallbacks),a.formState!==void 0&&(D=a.formState)),r=Jm(t,1,!0,r,a??null,c,h,g,S,_,A,D),r.context=Wm(null),a=r.current,c=Vt(),c=Nc(c),h=Jn(c),h.callback=null,Wn(a,h,c),a=c,r.current.lanes=a,Cr(r,a),Sn(r),t[os]=r.current,vf(t),new mo(r)},Ea.version="19.1.1",Ea}var Sy;function Uw(){if(Sy)return qf.exports;Sy=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(),qf.exports=Bw(),qf.exports}var IN=Uw();const x0=new Map([["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["Browser.close",{title:"Close browser",pausesBeforeAction:!0}],["Browser.killForTests",{internal:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{title:"Create CDP session",group:"configuration"}],["Browser.startTracing",{title:"Start browser tracing",group:"configuration"}],["Browser.stopTracing",{title:"Stop browser tracing",group:"configuration"}],["EventTarget.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["Page.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["WebSocket.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["ElectronApplication.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["AndroidDevice.waitForEventInfo",{title:'Wait for event "{info.event}"',snapshot:!0}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pausesBeforeAction:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.harStart",{internal:!0}],["BrowserContext.harExport",{internal:!0}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pausesBeforeAction:!0}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pausesBeforeAction:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Page.accessibilitySnapshot",{title:"Accessibility snapshot",group:"getter"}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.snapshotForAI",{internal:!0}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pausesBeforeAction:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",snapshot:!0,pausesBeforeAction:!0}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.content",{title:"Get content",snapshot:!0,pausesBeforeAction:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{title:"Highlight element",group:"configuration"}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pausesBeforeAction:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pausesBeforeAction:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pausesBeforeAction:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pausesBeforeAction:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["JSHandle.dispose",{internal:!0}],["ElementHandle.dispose",{internal:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pausesBeforeAction:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pausesBeforeInput:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pausesBeforeAction:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.sizes",{internal:!0}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",group:"configuration"}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}]]);function Hw(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const l=new URL(n[i]);return l.protocol==="data:"?l.protocol:l.protocol==="about:"?n[i]:l.pathname+l.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const s=zw(n,i);if(s!==void 0)return s}}function zw(n,e){const i=e.split(".");let s=n;for(const l of i){if(typeof s!="object"||s===null)return;s=s[l]}if(s!==void 0)return String(s)}function qw(n){var e;return(e=x0.get(n.type+"."+n.method))==null?void 0:e.group}const ja=Symbol("context"),_0=Symbol("nextInContext"),E0=Symbol("prevByEndTime"),T0=Symbol("nextByStartTime"),wy=Symbol("events");class VN{constructor(e,i){Ne(this,"startTime");Ne(this,"endTime");Ne(this,"browserName");Ne(this,"channel");Ne(this,"platform");Ne(this,"wallTime");Ne(this,"title");Ne(this,"options");Ne(this,"pages");Ne(this,"actions");Ne(this,"attachments");Ne(this,"visibleAttachments");Ne(this,"events");Ne(this,"stdio");Ne(this,"errors");Ne(this,"errorDescriptors");Ne(this,"hasSource");Ne(this,"hasStepData");Ne(this,"sdkLanguage");Ne(this,"testIdAttributeName");Ne(this,"sources");Ne(this,"resources");Ne(this,"actionCounters");Ne(this,"traceUrl");i.forEach(l=>$w(l));const s=i.find(l=>l.origin==="library");this.traceUrl=e,this.browserName=(s==null?void 0:s.browserName)||"",this.sdkLanguage=s==null?void 0:s.sdkLanguage,this.channel=s==null?void 0:s.channel,this.testIdAttributeName=s==null?void 0:s.testIdAttributeName,this.platform=(s==null?void 0:s.platform)||"",this.title=(s==null?void 0:s.title)||"",this.options=(s==null?void 0:s.options)||{},this.actions=Iw(i),this.pages=[].concat(...i.map(l=>l.pages)),this.wallTime=i.map(l=>l.wallTime).reduce((l,o)=>Math.min(l||Number.MAX_VALUE,o),Number.MAX_VALUE),this.startTime=i.map(l=>l.startTime).reduce((l,o)=>Math.min(l,o),Number.MAX_VALUE),this.endTime=i.map(l=>l.endTime).reduce((l,o)=>Math.max(l,o),Number.MIN_VALUE),this.events=[].concat(...i.map(l=>l.events)),this.stdio=[].concat(...i.map(l=>l.stdio)),this.errors=[].concat(...i.map(l=>l.errors)),this.hasSource=i.some(l=>l.hasSource),this.hasStepData=i.some(l=>l.origin==="testRunner"),this.resources=[...i.map(l=>l.resources)].flat(),this.attachments=this.actions.flatMap(l=>{var o;return((o=l.attachments)==null?void 0:o.map(u=>({...u,traceUrl:e})))??[]}),this.visibleAttachments=this.attachments.filter(l=>!l.name.startsWith("_")),this.events.sort((l,o)=>l.time-o.time),this.resources.sort((l,o)=>l._monotonicTime-o._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Qw(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const l of this.actions)l.group=l.group??qw({type:l.class,method:l.method}),l.group&&this.actionCounters.set(l.group,1+(this.actionCounters.get(l.group)||0))}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(s=>!s.group||i.has(s.group))}_errorDescriptorsFromActions(){var i;const e=[];for(const s of this.actions||[])(i=s.error)!=null&&i.message&&e.push({action:s,stack:s.stack,message:s.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function $w(n){for(const i of n.pages)i[ja]=n;for(let i=0;i<n.actions.length;++i){const s=n.actions[i];s[ja]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const s=n.actions[i];s[_0]=e,s.class!=="Route"&&(e=s)}for(const i of n.events)i[ja]=n;for(const i of n.resources)i[ja]=n}function Iw(n){const e=[],i=Vw(n);e.push(...i),e.sort((s,l)=>l.parentId===s.callId?1:s.parentId===l.callId?-1:s.endTime-l.endTime);for(let s=1;s<e.length;++s)e[s][E0]=e[s-1];e.sort((s,l)=>l.parentId===s.callId?-1:s.parentId===l.callId?1:s.startTime-l.startTime);for(let s=0;s+1<e.length;++s)e[s][T0]=e[s+1];return e}let xy=0;function Vw(n){const e=new Map,i=n.filter(u=>u.origin==="library"),s=n.filter(u=>u.origin==="testRunner");if(!s.length||!i.length)return n.map(u=>u.actions.map(f=>({...f,context:u}))).flat();for(const u of i)for(const f of u.actions)e.set(f.stepId||`tmp-step@${++xy}`,{...f,context:u});const l=Kw(s,e);l&&Gw(i,l);const o=new Map;for(const u of s)for(const f of u.actions){const d=f.stepId&&e.get(f.stepId);if(d){o.set(f.callId,d.callId),f.error&&(d.error=f.error),f.attachments&&(d.attachments=f.attachments),f.annotations&&(d.annotations=f.annotations),f.parentId&&(d.parentId=o.get(f.parentId)??f.parentId),f.group&&(d.group=f.group),d.startTime=f.startTime,d.endTime=f.endTime;continue}f.parentId&&(f.parentId=o.get(f.parentId)??f.parentId),e.set(f.stepId||`tmp-step@${++xy}`,{...f,context:u})}return[...e.values()]}function Gw(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const s of i.actions)s.startTime&&(s.startTime+=e),s.endTime&&(s.endTime+=e);for(const s of i.events)s.time+=e;for(const s of i.stdio)s.timestamp+=e;for(const s of i.pages)for(const l of s.screencastFrames)l.timestamp+=e;for(const s of i.resources)s._monotonicTime&&(s._monotonicTime+=e)}}function Kw(n,e){for(const i of n)for(const s of i.actions){if(!s.startTime)continue;const l=s.stepId?e.get(s.stepId):void 0;if(l)return s.startTime-l.startTime}return 0}function Yw(n){const e=new Map;for(const s of n)e.set(s.callId,{id:s.callId,parent:void 0,children:[],action:s});const i={id:"",parent:void 0,children:[]};for(const s of e.values()){const l=s.action.parentId&&e.get(s.action.parentId)||i;l.children.push(s),s.parent=l}return{rootItem:i,itemMap:e}}function A0(n){return n[ja]}function Xw(n){return n[_0]}function _y(n){return n[E0]}function Ey(n){return n[T0]}function Pw(n){let e=0,i=0;for(const s of Fw(n)){if(s.type==="console"){const l=s.messageType;l==="warning"?++i:l==="error"&&++e}s.type==="event"&&s.method==="pageError"&&++e}return{errors:e,warnings:i}}function Fw(n){let e=n[wy];if(e)return e;const i=Xw(n);return e=A0(n).events.filter(s=>s.time>=n.startTime&&(!i||s.time<i.startTime)),n[wy]=e,e}function Qw(n,e){var s;const i=new Map;for(const l of n)for(const o of l.stack||[]){let u=i.get(o.file);u||(u={errors:[],content:void 0},i.set(o.file,u))}for(const l of e){const{action:o,stack:u,message:f}=l;!o||!u||(s=i.get(u[0].file))==null||s.errors.push({line:u[0].line||0,message:f})}return i}const Zw=50,$o=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:s="vertical",minSidebarSize:l=Zw,settingName:o,sidebar:u,main:f})=>{const d=Math.max(l,n)*window.devicePixelRatio,[p,m]=xn(o?o+"."+s+":size":void 0,d),[y,b]=xn(o?o+"."+s+":size":void 0,d),[w,T]=q.useState(null),[x,E]=es();let k;s==="vertical"?(k=y/window.devicePixelRatio,x&&x.height<k&&(k=x.height-10)):(k=p/window.devicePixelRatio,x&&x.width<k&&(k=x.width-10)),document.body.style.userSelect=w?"none":"inherit";let N={};return s==="vertical"?i?N={top:w?0:k-4,bottom:w?0:void 0,height:w?"initial":8}:N={bottom:w?0:k-4,top:w?0:void 0,height:w?"initial":8}:i?N={left:w?0:k-4,right:w?0:void 0,width:w?"initial":8}:N={right:w?0:k-4,left:w?0:void 0,width:w?"initial":8},v.jsxs("div",{className:Ke("split-view",s,i&&"sidebar-first"),ref:E,children:[v.jsx("div",{className:"split-view-main",children:f}),!e&&v.jsx("div",{style:{flexBasis:k},className:"split-view-sidebar",children:u}),!e&&v.jsx("div",{style:N,className:"split-view-resizer",onMouseDown:V=>T({offset:s==="vertical"?V.clientY:V.clientX,size:k}),onMouseUp:()=>T(null),onMouseMove:V=>{if(!V.buttons)T(null);else if(w){const B=(s==="vertical"?V.clientY:V.clientX)-w.offset,Y=i?w.size+B:w.size-B,I=V.target.parentElement.getBoundingClientRect(),j=Math.min(Math.max(l,Y),(s==="vertical"?I.height:I.width)-l);s==="vertical"?b(j*window.devicePixelRatio):m(j*window.devicePixelRatio)}}})]})},Fe=function(n,e,i){return n>=e&&n<=i};function Lt(n){return Fe(n,48,57)}function Ty(n){return Lt(n)||Fe(n,65,70)||Fe(n,97,102)}function Jw(n){return Fe(n,65,90)}function Ww(n){return Fe(n,97,122)}function ex(n){return Jw(n)||Ww(n)}function tx(n){return n>=128}function No(n){return ex(n)||tx(n)||n===95}function Ay(n){return No(n)||Lt(n)||n===45}function nx(n){return Fe(n,0,8)||n===11||Fe(n,14,31)||n===127}function Co(n){return n===10}function qn(n){return Co(n)||n===9||n===32}const ix=1114111;class kh extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function sx(n){const e=[];for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===13&&n.charCodeAt(i+1)===10&&(s=10,i++),(s===13||s===12)&&(s=10),s===0&&(s=65533),Fe(s,55296,56319)&&Fe(n.charCodeAt(i+1),56320,57343)){const l=s-55296,o=n.charCodeAt(i+1)-56320;s=Math.pow(2,16)+l*Math.pow(2,10)+o,i++}e.push(s)}return e}function Je(n){if(n<=65535)return String.fromCharCode(n);n-=Math.pow(2,16);const e=Math.floor(n/Math.pow(2,10))+55296,i=n%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(i)}function N0(n){const e=sx(n);let i=-1;const s=[];let l;const o=function(L){return L>=e.length?-1:e[L]},u=function(L){if(L===void 0&&(L=1),L>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+L)},f=function(L){return L===void 0&&(L=1),i+=L,l=o(i),!0},d=function(){return i-=1,!0},p=function(L){return L===void 0&&(L=l),L===-1},m=function(){if(y(),f(),qn(l)){for(;qn(u());)f();return new Io}else{if(l===34)return T();if(l===35)if(Ay(u())||k(u(1),u(2))){const L=new q0("");return V(u(1),u(2),u(3))&&(L.type="id"),L.value=J(),L}else return new ct(l);else return l===36?u()===61?(f(),new ox):new ct(l):l===39?T():l===40?new U0:l===41?new Mh:l===42?u()===61?(f(),new cx):new ct(l):l===43?Y()?(d(),b()):new ct(l):l===44?new j0:l===45?Y()?(d(),b()):u(1)===45&&u(2)===62?(f(2),new M0):$()?(d(),w()):new ct(l):l===46?Y()?(d(),b()):new ct(l):l===58?new O0:l===59?new L0:l===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new k0):new ct(l):l===64?V(u(1),u(2),u(3))?new z0(J()):new ct(l):l===91?new B0:l===92?N()?(d(),w()):new ct(l):l===93?new uh:l===94?u()===61?(f(),new lx):new ct(l):l===123?new R0:l===124?u()===61?(f(),new ax):u()===124?(f(),new H0):new ct(l):l===125?new D0:l===126?u()===61?(f(),new rx):new ct(l):Lt(l)?(d(),b()):No(l)?(d(),w()):p()?new Mo:new ct(l)}},y=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),l===42&&u()===47){f();break}else if(p())return},b=function(){const L=I();if(V(u(1),u(2),u(3))){const F=new ux;return F.value=L.value,F.repr=L.repr,F.type=L.type,F.unit=J(),F}else if(u()===37){f();const F=new V0;return F.value=L.value,F.repr=L.repr,F}else{const F=new I0;return F.value=L.value,F.repr=L.repr,F.type=L.type,F}},w=function(){const L=J();if(L.toLowerCase()==="url"&&u()===40){for(f();qn(u(1))&&qn(u(2));)f();return u()===34||u()===39?new za(L):qn(u())&&(u(2)===34||u(2)===39)?new za(L):x()}else return u()===40?(f(),new za(L)):new Oh(L)},T=function(L){L===void 0&&(L=l);let F="";for(;f();){if(l===L||p())return new Lh(F);if(Co(l))return d(),new C0;l===92?p(u())||(Co(u())?f():F+=Je(E())):F+=Je(l)}throw new Error("Internal error")},x=function(){const L=new $0("");for(;qn(u());)f();if(p(u()))return L;for(;f();){if(l===41||p())return L;if(qn(l)){for(;qn(u());)f();return u()===41||p(u())?(f(),L):(te(),new ko)}else{if(l===34||l===39||l===40||nx(l))return te(),new ko;if(l===92)if(N())L.value+=Je(E());else return te(),new ko;else L.value+=Je(l)}}throw new Error("Internal error")},E=function(){if(f(),Ty(l)){const L=[l];for(let ge=0;ge<5&&Ty(u());ge++)f(),L.push(l);qn(u())&&f();let F=parseInt(L.map(function(ge){return String.fromCharCode(ge)}).join(""),16);return F>ix&&(F=65533),F}else return p()?65533:l},k=function(L,F){return!(L!==92||Co(F))},N=function(){return k(l,u())},V=function(L,F,ge){return L===45?No(F)||F===45||k(F,ge):No(L)?!0:L===92?k(L,F):!1},$=function(){return V(l,u(1),u(2))},B=function(L,F,ge){return L===43||L===45?!!(Lt(F)||F===46&&Lt(ge)):L===46?!!Lt(F):!!Lt(L)},Y=function(){return B(l,u(1),u(2))},J=function(){let L="";for(;f();)if(Ay(l))L+=Je(l);else if(N())L+=Je(E());else return d(),L;throw new Error("Internal parse error")},I=function(){let L="",F="integer";for((u()===43||u()===45)&&(f(),L+=Je(l));Lt(u());)f(),L+=Je(l);if(u(1)===46&&Lt(u(2)))for(f(),L+=Je(l),f(),L+=Je(l),F="number";Lt(u());)f(),L+=Je(l);const ge=u(1),me=u(2),z=u(3);if((ge===69||ge===101)&&Lt(me))for(f(),L+=Je(l),f(),L+=Je(l),F="number";Lt(u());)f(),L+=Je(l);else if((ge===69||ge===101)&&(me===43||me===45)&&Lt(z))for(f(),L+=Je(l),f(),L+=Je(l),f(),L+=Je(l),F="number";Lt(u());)f(),L+=Je(l);const Z=j(L);return{type:F,value:Z,repr:L}},j=function(L){return+L},te=function(){for(;f();){if(l===41||p())return;N()&&E()}};let re=0;for(;!p(u());)if(s.push(m()),re++,re>e.length*2)throw new Error("I'm infinite-looping!");return s}class Ye{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class C0 extends Ye{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class ko extends Ye{constructor(){super(...arguments),this.tokenType="BADURL"}}class Io extends Ye{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class k0 extends Ye{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class M0 extends Ye{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class O0 extends Ye{constructor(){super(...arguments),this.tokenType=":"}}class L0 extends Ye{constructor(){super(...arguments),this.tokenType=";"}}class j0 extends Ye{constructor(){super(...arguments),this.tokenType=","}}class hr extends Ye{constructor(){super(...arguments),this.value="",this.mirror=""}}class R0 extends hr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class D0 extends hr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class B0 extends hr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class uh extends hr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class U0 extends hr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class Mh extends hr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class rx extends Ye{constructor(){super(...arguments),this.tokenType="~="}}class ax extends Ye{constructor(){super(...arguments),this.tokenType="|="}}class lx extends Ye{constructor(){super(...arguments),this.tokenType="^="}}class ox extends Ye{constructor(){super(...arguments),this.tokenType="$="}}class cx extends Ye{constructor(){super(...arguments),this.tokenType="*="}}class H0 extends Ye{constructor(){super(...arguments),this.tokenType="||"}}class Mo extends Ye{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ct extends Ye{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=Je(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==="\\"?`\\
|
51
|
+
`:this.value}}class dr extends Ye{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 Oh extends dr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return Wa(this.value)}}class za extends dr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Wa(this.value)+"("}}class z0 extends dr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+Wa(this.value)}}class q0 extends dr{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"?"#"+Wa(this.value):"#"+fx(this.value)}}class Lh extends dr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+G0(this.value)+'"'}}class $0 extends dr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+G0(this.value)+'")'}}class I0 extends Ye{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 V0 extends Ye{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 ux extends Ye{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 i=Wa(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||Fe(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function Wa(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let s=0;s<n.length;s++){const l=n.charCodeAt(s);if(l===0)throw new kh("Invalid character: the input contains U+0000.");Fe(l,1,31)||l===127||s===0&&Fe(l,48,57)||s===1&&Fe(l,48,57)&&i===45?e+="\\"+l.toString(16)+" ":l>=128||l===45||l===95||Fe(l,48,57)||Fe(l,65,90)||Fe(l,97,122)?e+=n[s]:e+="\\"+n[s]}return e}function fx(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new kh("Invalid character: the input contains U+0000.");s>=128||s===45||s===95||Fe(s,48,57)||Fe(s,65,90)||Fe(s,97,122)?e+=n[i]:e+="\\"+s.toString(16)+" "}return e}function G0(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);if(s===0)throw new kh("Invalid character: the input contains U+0000.");Fe(s,1,31)||s===127?e+="\\"+s.toString(16)+" ":s===34||s===92?e+="\\"+n[i]:e+=n[i]}return e}class jt extends Error{}function hx(n,e){let i;try{i=N0(n),i[i.length-1]instanceof Mo||i.push(new Mo)}catch(j){const te=j.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,re=(j.stack||"").indexOf(j.message);throw re!==-1&&(j.stack=j.stack.substring(0,re)+te+j.stack.substring(re+j.message.length)),j.message=te,j}const s=i.find(j=>j instanceof z0||j instanceof C0||j instanceof ko||j instanceof H0||j instanceof k0||j instanceof M0||j instanceof L0||j instanceof R0||j instanceof D0||j instanceof $0||j instanceof V0);if(s)throw new jt(`Unsupported token "${s.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let l=0;const o=new Set;function u(){return new jt(`Unexpected token "${i[l].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[l]instanceof Io;)l++}function d(j=l){return i[j]instanceof Oh}function p(j=l){return i[j]instanceof Lh}function m(j=l){return i[j]instanceof I0}function y(j=l){return i[j]instanceof j0}function b(j=l){return i[j]instanceof U0}function w(j=l){return i[j]instanceof Mh}function T(j=l){return i[j]instanceof za}function x(j=l){return i[j]instanceof ct&&i[j].value==="*"}function E(j=l){return i[j]instanceof Mo}function k(j=l){return i[j]instanceof ct&&[">","+","~"].includes(i[j].value)}function N(j=l){return y(j)||w(j)||E(j)||k(j)||i[j]instanceof Io}function V(){const j=[$()];for(;f(),!!y();)l++,j.push($());return j}function $(){return f(),m()||p()?i[l++].value:B()}function B(){const j={simples:[]};for(f(),k()?j.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):j.simples.push({selector:Y(),combinator:""});;){if(f(),k())j.simples[j.simples.length-1].combinator=i[l++].value,f();else if(N())break;j.simples.push({combinator:"",selector:Y()})}return j}function Y(){let j="";const te=[];for(;!N();)if(d()||x())j+=i[l++].toSource();else if(i[l]instanceof q0)j+=i[l++].toSource();else if(i[l]instanceof ct&&i[l].value===".")if(l++,d())j+="."+i[l++].toSource();else throw u();else if(i[l]instanceof O0)if(l++,d())if(!e.has(i[l].value.toLowerCase()))j+=":"+i[l++].toSource();else{const re=i[l++].value.toLowerCase();te.push({name:re,args:[]}),o.add(re)}else if(T()){const re=i[l++].value.toLowerCase();if(e.has(re)?(te.push({name:re,args:V()}),o.add(re)):j+=`:${re}(${J()})`,f(),!w())throw u();l++}else throw u();else if(i[l]instanceof B0){for(j+="[",l++;!(i[l]instanceof uh)&&!E();)j+=i[l++].toSource();if(!(i[l]instanceof uh))throw u();j+="]",l++}else throw u();if(!j&&!te.length)throw u();return{css:j||void 0,functions:te}}function J(){let j="",te=1;for(;!E()&&((b()||T())&&te++,w()&&te--,!!te);)j+=i[l++].toSource();return j}const I=V();if(!E())throw u();if(I.some(j=>typeof j!="object"||!("simples"in j)))throw new jt(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:I,names:Array.from(o)}}const fh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),dx=new Set(["left-of","right-of","above","below","near"]),K0=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 el(n){const e=mx(n),i=[];for(const s of e.parts){if(s.name==="css"||s.name==="css:light"){s.name==="css:light"&&(s.body=":light("+s.body+")");const l=hx(s.body,K0);i.push({name:"css",body:l.selector,source:s.body});continue}if(fh.has(s.name)){let l,o;try{const p=JSON.parse("["+s.body+"]");if(!Array.isArray(p)||p.length<1||p.length>2||typeof p[0]!="string")throw new jt(`Malformed selector: ${s.name}=`+s.body);if(l=p[0],p.length===2){if(typeof p[1]!="number"||!dx.has(s.name))throw new jt(`Malformed selector: ${s.name}=`+s.body);o=p[1]}}catch{throw new jt(`Malformed selector: ${s.name}=`+s.body)}const u={name:s.name,source:s.body,body:{parsed:el(l),distance:o}},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&&px(u.body.parsed.parts.slice(0,d+1),i.slice(0,d+1))&&u.body.parsed.parts.splice(0,d+1),i.push(u);continue}i.push({...s,source:s.body})}if(fh.has(i[0].name))throw new jt(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function px(n,e){return Gn({parts:n})===Gn({parts:e})}function Gn(n,e){return typeof n=="string"?n:n.parts.map((i,s)=>{let l=!0;!e&&s!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(l=!1);const o=l?i.name+"=":"";return`${s===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function gx(n,e){const i=(s,l)=>{for(const o of s.parts)e(o,l),fh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function mx(n){let e=0,i,s=0;const l={parts:[]},o=()=>{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)),l.parts.push({name:p,body:m}),y){if(l.capture!==void 0)throw new jt("Only one of the selectors can capture using * modifier");l.capture=l.parts.length-1}};if(!n.includes(">>"))return e=n.length,o(),l;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===i?(i=void 0,e++):!i&&(f==='"'||f==="'"||f==="`")&&!u()?(i=f,e++):!i&&f===">"&&n[e+1]===">"?(o(),e+=2,s=e):e++}return o(),l}function Zi(n,e){let i=0,s=n.length===0;const l=()=>n[i]||"",o=()=>{const E=l();return++i,s=i>=n.length,E},u=E=>{throw s?new jt(`Unexpected end of selector while parsing selector \`${n}\``):new jt(`Error while parsing selector \`${n}\` - unexpected symbol "${l()}" at position ${i}`+(E?" during "+E:""))};function f(){for(;!s&&/\s/.test(l());)o()}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(l());)E+=o();return E}function m(E){let k=o();for(k!==E&&u("parsing quoted string");!s&&l()!==E;)l()==="\\"&&o(),k+=o();return l()!==E&&u("parsing quoted string"),k+=o(),k}function y(){o()!=="/"&&u("parsing regular expression");let E="",k=!1;for(;!s;){if(l()==="\\")E+=o(),s&&u("parsing regular expression");else if(k&&l()==="]")k=!1;else if(!k&&l()==="[")k=!0;else if(!k&&l()==="/")break;E+=o()}o()!=="/"&&u("parsing regular expression");let N="";for(;!s&&l().match(/[dgimsuy]/);)N+=o();try{return new RegExp(E,N)}catch(V){throw new jt(`Error while parsing selector \`${n}\`: ${V.message}`)}}function b(){let E="";return f(),l()==="'"||l()==='"'?E=m(l()).slice(1,-1):E=p(),E||u("parsing property path"),E}function w(){f();let E="";return s||(E+=o()),!s&&E!=="="&&(E+=o()),["=","*=","^=","$=","|=","~="].includes(E)||u("parsing operator"),E}function T(){o();const E=[];for(E.push(b()),f();l()===".";)o(),E.push(b()),f();if(l()==="]")return o(),{name:E.join("."),jsonPath:E,op:"<truthy>",value:null,caseSensitive:!1};const k=w();let N,V=!0;if(f(),l()==="/"){if(k!=="=")throw new jt(`Error while parsing selector \`${n}\` - cannot use ${k} in attribute with regular expression`);N=y()}else if(l()==="'"||l()==='"')N=m(l()).slice(1,-1),f(),l()==="i"||l()==="I"?(V=!1,o()):(l()==="s"||l()==="S")&&(V=!0,o());else{for(N="";!s&&(d(l())||l()==="+"||l()===".");)N+=o();N==="true"?N=!0:N==="false"?N=!1:e||(N=+N,Number.isNaN(N)&&u("parsing attribute value"))}if(f(),l()!=="]"&&u("parsing attribute value"),o(),k!=="="&&typeof N!="string")throw new jt(`Error while parsing selector \`${n}\` - cannot use ${k} in attribute with non-string matching value - ${N}`);return{name:E.join("."),jsonPath:E,op:k,value:N,caseSensitive:V}}const x={name:"",attributes:[]};for(x.name=p(),f();l()==="[";)x.attributes.push(T()),f();if(s||u(void 0),!x.name&&!x.attributes.length)throw new jt(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function tc(n,e="'"){const i=JSON.stringify(n),s=i.substring(1,i.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 Vo(n){return n.charAt(0).toUpperCase()+n.substring(1)}function Y0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function Js(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let Ii;function yx(){Ii=new Map}function Et(n){let e=Ii==null?void 0:Ii.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),Ii==null||Ii.set(n,e)),e}function nc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function X0(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Rt(n,e){return typeof n!="string"?X0(n):`${JSON.stringify(n)}${e?"s":"i"}`}function xt(n,e){return typeof n!="string"?X0(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function bx(n,e,i=""){if(n.length<=e)return n;const s=[...n];return s.length>e?s.slice(0,e-i.length).join("")+i:s.join("")}function Ny(n,e){return bx(n,e,"…")}function Go(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vx(n,e){const i=n.length,s=e.length;let l=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(s+1).fill(0));for(let f=1;f<=i;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]>l&&(l=u[f][d],o=f));return n.slice(o-l,o)}function Sx(n,e){try{const i=el(e),s=i.parts[i.parts.length-1];if((s==null?void 0:s.name)==="internal:describe"){const l=JSON.parse(s.body);if(typeof l=="string")return l}return Yi(new F0[n],i,!1,1)[0]}catch{return e}}function Ji(n,e,i=!1){return P0(n,e,i,1)[0]}function P0(n,e,i=!1,s=20,l){try{return Yi(new F0[n](l),el(e),i,s)}catch{return[e]}}function Yi(n,e,i=!1,s=20){const l=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<l.length;f++){const d=l[f],p=u;if(u="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?o.push([n.generateLocator(p,"first",""),n.generateLocator(p,"nth","0")]):d.body==="-1"?o.push([n.generateLocator(p,"last",""),n.generateLocator(p,"nth","-1")]):o.push([n.generateLocator(p,"nth",d.body)]);continue}if(d.name==="visible"){o.push([n.generateLocator(p,"visible",d.body),n.generateLocator(p,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:T,text:x}=Ta(d.body);o.push([n.generateLocator(p,"text",x,{exact:T})]);continue}if(d.name==="internal:has-text"){const{exact:T,text:x}=Ta(d.body);if(!T){o.push([n.generateLocator(p,"has-text",x,{exact:T})]);continue}}if(d.name==="internal:has-not-text"){const{exact:T,text:x}=Ta(d.body);if(!T){o.push([n.generateLocator(p,"has-not-text",x,{exact:T})]);continue}}if(d.name==="internal:has"){const T=Yi(n,d.body.parsed,!1,s);o.push(T.map(x=>n.generateLocator(p,"has",x)));continue}if(d.name==="internal:has-not"){const T=Yi(n,d.body.parsed,!1,s);o.push(T.map(x=>n.generateLocator(p,"hasNot",x)));continue}if(d.name==="internal:and"){const T=Yi(n,d.body.parsed,!1,s);o.push(T.map(x=>n.generateLocator(p,"and",x)));continue}if(d.name==="internal:or"){const T=Yi(n,d.body.parsed,!1,s);o.push(T.map(x=>n.generateLocator(p,"or",x)));continue}if(d.name==="internal:chain"){const T=Yi(n,d.body.parsed,!1,s);o.push(T.map(x=>n.generateLocator(p,"chain",x)));continue}if(d.name==="internal:label"){const{exact:T,text:x}=Ta(d.body);o.push([n.generateLocator(p,"label",x,{exact:T})]);continue}if(d.name==="internal:role"){const T=Zi(d.body,!0),x={attrs:[]};for(const E of T.attributes)E.name==="name"?(x.exact=E.caseSensitive,x.name=E.value):(E.name==="level"&&typeof E.value=="string"&&(E.value=+E.value),x.attrs.push({name:E.name==="include-hidden"?"includeHidden":E.name,value:E.value}));o.push([n.generateLocator(p,"role",T.name,x)]);continue}if(d.name==="internal:testid"){const T=Zi(d.body,!0),{value:x}=T.attributes[0];o.push([n.generateLocator(p,"test-id",x)]);continue}if(d.name==="internal:attr"){const T=Zi(d.body,!0),{name:x,value:E,caseSensitive:k}=T.attributes[0],N=E,V=!!k;if(x==="placeholder"){o.push([n.generateLocator(p,"placeholder",N,{exact:V})]);continue}if(x==="alt"){o.push([n.generateLocator(p,"alt",N,{exact:V})]);continue}if(x==="title"){o.push([n.generateLocator(p,"title",N,{exact:V})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const T=o[o.length-1],x=l[f-1],E=T.map(k=>n.chainLocators([k,n.generateLocator(p,"frame","")]));["xpath","css"].includes(x.name)&&E.push(n.generateLocator(p,"frame-locator",Gn({parts:[x]})),n.generateLocator(p,"frame-locator",Gn({parts:[x]},!0))),T.splice(0,T.length,...E),u="frame-locator";continue}const m=l[f+1],y=Gn({parts:[d]}),b=n.generateLocator(p,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:T,text:x}=Ta(m.body);if(!T){const E=n.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:T}),k={};m.name==="internal:has-text"?k.hasText=x:k.hasNotText=x;const N=n.generateLocator(p,"default",y,k);o.push([n.chainLocators([b,E]),N]),f++;continue}}let w;if(["xpath","css"].includes(d.name)){const T=Gn({parts:[d]},!0);w=n.generateLocator(p,"default",T)}o.push([b,w].filter(Boolean))}return wx(n,o,s)}function wx(n,e,i){const s=e.map(()=>""),l=[],o=u=>{if(u===e.length)return l.push(n.chainLocators(s)),l.length<i;for(const f of e[u])if(s[u]=f,!o(u+1))return!1;return!0};return o(0),l}function Ta(n){let e=!1;const i=n.match(/^\/(.*)\/([igm]*)$/);return i?{text:new RegExp(i[1],i[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 xx{constructor(e){this.preferredQuote=e}generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(s)}, { hasText: ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`locator(${this.quote(s)}, { hasNotText: ${this.toHasText(l.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 o=[];ut(l.name)?o.push(`name: ${this.regexToSourceString(l.name)}`):typeof l.name=="string"&&(o.push(`name: ${this.quote(l.name)}`),l.exact&&o.push("exact: true"));for(const{name:f,value:d}of l.attrs)o.push(`${f}: ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, { ${o.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,!!l.exact);case"alt":return this.toCallWithExact("getByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact("getByLabel",s,!!l.exact);case"title":return this.toCallWithExact("getByTitle",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return nc(String(e))}toCallWithExact(e,i,s){return ut(i)?`${e}(${this.regexToSourceString(i)})`:s?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return ut(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return ut(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return tc(e,this.preferredQuote??"'")}}class _x{generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(s)}, has_text=${this.toHasText(l.hasText)})`:l.hasNotText!==void 0?`locator(${this.quote(s)}, has_not_text=${this.toHasText(l.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 o=[];ut(l.name)?o.push(`name=${this.regexToString(l.name)}`):typeof l.name=="string"&&(o.push(`name=${this.quote(l.name)}`),l.exact&&o.push("exact=True"));for(const{name:f,value:d}of l.attrs){let p=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(p=d?"True":"False"),o.push(`${Y0(f)}=${p}`)}const u=o.length?`, ${o.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,!!l.exact);case"alt":return this.toCallWithExact("get_by_alt_text",s,!!l.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",s,!!l.exact);case"label":return this.toCallWithExact("get_by_label",s,!!l.exact);case"title":return this.toCallWithExact("get_by_title",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${nc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,s){return ut(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return ut(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return ut(e)?this.regexToString(e):this.quote(e)}quote(e){return tc(e,'"')}}class Ex{generateLocator(e,i,s,l={}){let o;switch(e){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(i){case"default":return l.hasText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(l.hasText)}))`:l.hasNotText!==void 0?`locator(${this.quote(s)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(l.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 ${o}.FilterOptions().setVisible(${s==="true"?"true":"false"}))`;case"role":const u=[];ut(l.name)?u.push(`.setName(${this.regexToString(l.name)})`):typeof l.name=="string"&&(u.push(`.setName(${this.quote(l.name)})`),l.exact&&u.push(".setExact(true)"));for(const{name:d,value:p}of l.attrs)u.push(`.set${Vo(d)}(${typeof p=="string"?this.quote(p):p})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${Y0(s).toUpperCase()}${f})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(s)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(s)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${s}))`;case"hasNot":return`filter(new ${o}.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(o,"getByText",s,!!l.exact);case"alt":return this.toCallWithExact(o,"getByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact(o,"getByLabel",s,!!l.exact);case"title":return this.toCallWithExact(o,"getByTitle",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(nc(e.source))}${i})`}toCallWithExact(e,i,s,l){return ut(s)?`${i}(${this.regexToString(s)})`:l?`${i}(${this.quote(s)}, new ${e}.${Vo(i)}Options().setExact(true))`:`${i}(${this.quote(s)})`}toHasText(e){return ut(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return ut(e)?this.regexToString(e):this.quote(e)}quote(e){return tc(e,'"')}}class Tx{generateLocator(e,i,s,l={}){switch(i){case"default":return l.hasText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasText(l.hasText)} })`:l.hasNotText!==void 0?`Locator(${this.quote(s)}, new() { ${this.toHasNotText(l.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 o=[];ut(l.name)?o.push(`NameRegex = ${this.regexToString(l.name)}`):typeof l.name=="string"&&(o.push(`Name = ${this.quote(l.name)}`),l.exact&&o.push("Exact = true"));for(const{name:f,value:d}of l.attrs)o.push(`${Vo(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${Vo(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,!!l.exact);case"alt":return this.toCallWithExact("GetByAltText",s,!!l.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",s,!!l.exact);case"label":return this.toCallWithExact("GetByLabel",s,!!l.exact);case"title":return this.toCallWithExact("GetByTitle",s,!!l.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(nc(e.source))}${i})`}toCallWithExact(e,i,s){return ut(i)?`${e}(${this.regexToString(i)})`:s?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return ut(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return ut(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return ut(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return tc(e,'"')}}class Ax{generateLocator(e,i,s,l={}){return JSON.stringify({kind:i,body:s,options:l})}chainLocators(e){const i=e.map(s=>JSON.parse(s));for(let s=0;s<i.length-1;++s)i[s].next=i[s+1];return JSON.stringify(i[0])}}const F0={javascript:xx,python:_x,java:Ex,csharp:Tx,jsonl:Ax};function ut(n){return n instanceof RegExp}const Cy=new Map;function Nx({name:n,rootItem:e,render:i,title:s,icon:l,isError:o,isVisible:u,selectedItem:f,onAccepted:d,onSelected:p,onHighlighted:m,treeState:y,setTreeState:b,noItemsMessage:w,dataTestId:T,autoExpandDepth:x}){const E=q.useMemo(()=>Cx(e,f,y.expandedItems,x||0,u),[e,f,y,x,u]),k=q.useRef(null),[N,V]=q.useState(),[$,B]=q.useState(!1);q.useEffect(()=>{m==null||m(N)},[m,N]),q.useEffect(()=>{const I=k.current;if(!I)return;const j=()=>{Cy.set(n,I.scrollTop)};return I.addEventListener("scroll",j,{passive:!0}),()=>I.removeEventListener("scroll",j)},[n]),q.useEffect(()=>{k.current&&(k.current.scrollTop=Cy.get(n)||0)},[n]);const Y=q.useCallback(I=>{const{expanded:j}=E.get(I);if(j){for(let te=f;te;te=te.parent)if(te===I){p==null||p(I);break}y.expandedItems.set(I.id,!1)}else y.expandedItems.set(I.id,!0);b({...y})},[E,f,p,y,b]),J=q.useCallback(I=>{const{expanded:j}=E.get(I),te=[I];for(;te.length;){const re=te.pop();te.push(...re.children),y.expandedItems.set(re.id,!j)}b({...y})},[E,y,b]);return v.jsx("div",{className:Ke("tree-view vbox",n+"-tree-view"),role:"tree","data-testid":T||n+"-tree",children:v.jsxs("div",{className:Ke("tree-view-content"),tabIndex:0,onKeyDown:I=>{if(f&&I.key==="Enter"){d==null||d(f);return}if(I.key!=="ArrowDown"&&I.key!=="ArrowUp"&&I.key!=="ArrowLeft"&&I.key!=="ArrowRight")return;if(I.stopPropagation(),I.preventDefault(),f&&I.key==="ArrowLeft"){const{expanded:te,parent:re}=E.get(f);te?(y.expandedItems.set(f.id,!1),b({...y})):re&&(p==null||p(re));return}if(f&&I.key==="ArrowRight"){f.children.length&&(y.expandedItems.set(f.id,!0),b({...y}));return}let j=f;if(I.key==="ArrowDown"&&(f?j=E.get(f).next:E.size&&(j=[...E.keys()][0])),I.key==="ArrowUp"){if(f)j=E.get(f).prev;else if(E.size){const te=[...E.keys()];j=te[te.length-1]}}m==null||m(void 0),j&&(B(!0),p==null||p(j)),V(void 0)},ref:k,children:[w&&E.size===0&&v.jsx("div",{className:"tree-view-empty",children:w}),e.children.map(I=>E.get(I)&&v.jsx(Q0,{item:I,treeItems:E,selectedItem:f,onSelected:p,onAccepted:d,isError:o,toggleExpanded:Y,toggleSubtree:J,highlightedItem:N,setHighlightedItem:V,render:i,icon:l,title:s,isKeyboardNavigation:$,setIsKeyboardNavigation:B},I.id))]})})}function Q0({item:n,treeItems:e,selectedItem:i,onSelected:s,highlightedItem:l,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:p,render:m,title:y,icon:b,isKeyboardNavigation:w,setIsKeyboardNavigation:T}){const x=q.useId(),E=q.useRef(null);q.useEffect(()=>{i===n&&w&&E.current&&(S0(E.current),T(!1))},[n,i,w,T]);const k=e.get(n),N=k.depth,V=k.expanded;let $="codicon-blank";typeof V=="boolean"&&($=V?"codicon-chevron-down":"codicon-chevron-right");const B=m(n),Y=V&&n.children.length?n.children:[],J=y==null?void 0:y(n),I=(b==null?void 0:b(n))||"codicon-blank";return v.jsxs("div",{ref:E,role:"treeitem","aria-selected":n===i,"aria-expanded":V,"aria-controls":x,title:J,className:"vbox",style:{flex:"none"},children:[v.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:Ke("tree-view-entry",i===n&&"selected",l===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>s==null?void 0:s(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[N?new Array(N).fill(0).map((j,te)=>v.jsx("div",{className:"tree-view-indent"},"indent-"+te)):void 0,v.jsx("div",{"aria-hidden":"true",className:"codicon "+$,style:{minWidth:16,marginRight:4},onDoubleClick:j=>{j.preventDefault(),j.stopPropagation()},onClick:j=>{j.stopPropagation(),j.preventDefault(),j.altKey?p(n):d(n)}}),b&&v.jsx("div",{className:"codicon "+I,style:{minWidth:16,marginRight:4},"aria-label":"["+I.replace("codicon","icon")+"]"}),typeof B=="string"?v.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:B}):B]}),!!Y.length&&v.jsx("div",{id:x,role:"group",children:Y.map(j=>e.get(j)&&v.jsx(Q0,{item:j,treeItems:e,selectedItem:i,onSelected:s,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:p,highlightedItem:l,setHighlightedItem:o,render:m,title:y,icon:b,isKeyboardNavigation:w,setIsKeyboardNavigation:T},j.id))})]})}function Cx(n,e,i,s,l=()=>!0){if(!l(n))return new Map;const o=new Map,u=new Set;for(let p=e==null?void 0:e.parent;p;p=p.parent)u.add(p.id);let f=null;const d=(p,m)=>{for(const y of p.children){if(!l(y))continue;const b=u.has(y.id)||i.get(y.id),w=s>m&&o.size<25&&b!==!1,T=y.children.length?b??w:void 0,x={depth:m,expanded:T,parent:n===p?null:p,next:null,prev:f};f&&(o.get(f).next=y),f=y,o.set(y,x),T&&d(y,m+1)}};return d(n,0),o}const Xt=q.forwardRef(function({children:e,title:i="",icon:s,disabled:l=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:p,ariaLabel:m},y){return v.jsxs("button",{ref:y,className:Ke(p,"toolbar-button",s,o&&"toggled"),onMouseDown:ky,onClick:u,onDoubleClick:ky,title:i,disabled:!!l,style:f,"data-testid":d,"aria-label":m||i,children:[s&&v.jsx("span",{className:`codicon codicon-${s}`,style:e?{marginRight:5}:{}}),e]})}),ky=n=>{n.stopPropagation(),n.preventDefault()};function Z0(n){return n==="scheduled"?"codicon-clock":n==="running"?"codicon-loading":n==="failed"?"codicon-error":n==="passed"?"codicon-check":n==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function kx(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const Mx=Nx,Ox=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:s,sdkLanguage:l,onSelected:o,onHighlighted:u,revealConsole:f,revealAttachment:d,isLive:p})=>{const[m,y]=q.useState({expandedItems:new Map}),{rootItem:b,itemMap:w}=q.useMemo(()=>Yw(n),[n]),{selectedItem:T}=q.useMemo(()=>({selectedItem:e?w.get(e.callId):void 0}),[w,e]),x=q.useCallback(B=>{var Y,J;return!!((J=(Y=B.action)==null?void 0:Y.error)!=null&&J.message)},[]),E=q.useCallback(B=>s({minimum:B.action.startTime,maximum:B.action.endTime}),[s]),k=q.useCallback(B=>jh(B.action,{sdkLanguage:l,revealConsole:f,revealAttachment:d,isLive:p,showDuration:!0,showBadges:!0}),[p,f,d,l]),N=q.useCallback(B=>!i||!B.action||B.action.startTime<=i.maximum&&B.action.endTime>=i.minimum,[i]),V=q.useCallback(B=>{o==null||o(B.action)},[o]),$=q.useCallback(B=>{u==null||u(B==null?void 0:B.action)},[u]);return v.jsxs("div",{className:"vbox",children:[i&&v.jsxs("div",{className:"action-list-show-all",onClick:()=>s(void 0),children:[v.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),v.jsx(Mx,{name:"actions",rootItem:b,treeState:m,setTreeState:y,selectedItem:T,onSelected:V,onHighlighted:$,onAccepted:E,isError:x,isVisible:N,render:k})]})},jh=(n,e)=>{var E,k;const{sdkLanguage:i,revealConsole:s,revealAttachment:l,isLive:o,showDuration:u,showBadges:f}=e,{errors:d,warnings:p}=Pw(n),m=!!((E=n.attachments)!=null&&E.length)&&!!l,y=n.params.selector?Sx(i||"javascript",n.params.selector):void 0,b=n.class==="Test"&&n.method==="test.step"&&((k=n.annotations)==null?void 0:k.some(N=>N.type==="skip"));let w="";n.endTime?w=_t(n.endTime-n.startTime):n.error?w="Timed out":o||(w="-");const{elements:T,title:x}=Lx(n);return v.jsxs("div",{className:"action-title vbox",children:[v.jsxs("div",{className:"hbox",children:[v.jsx("span",{className:"action-title-method",title:x,children:T}),(u||f||m||b)&&v.jsx("div",{className:"spacer"}),m&&v.jsx(Xt,{icon:"attach",title:"Open Attachment",onClick:()=>l(n.attachments[0])}),u&&!b&&v.jsx("div",{className:"action-duration",children:w||v.jsx("span",{className:"codicon codicon-loading"})}),b&&v.jsx("span",{className:Ke("action-skipped","codicon",Z0("skipped")),title:"skipped"}),f&&v.jsxs("div",{className:"action-icons",onClick:()=>s==null?void 0:s(),children:[!!d&&v.jsxs("div",{className:"action-icon",children:[v.jsx("span",{className:"codicon codicon-error"}),v.jsx("span",{className:"action-icon-value",children:d})]}),!!p&&v.jsxs("div",{className:"action-icon",children:[v.jsx("span",{className:"codicon codicon-warning"}),v.jsx("span",{className:"action-icon-value",children:p})]})]})]}),y&&v.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function Lx(n){var f;const e=n.title??((f=x0.get(n.class+"."+n.method))==null?void 0:f.title)??n.method,i=[],s=[];let l=0;const o=/\{([^}]+)\}/g;let u;for(;(u=o.exec(e))!==null;){const[d,p]=u,m=e.slice(l,u.index);i.push(m),s.push(m);const y=Hw(n.params,p);y===void 0?(i.push(d),s.push(d)):u.index===0?(i.push(y),s.push(y)):(i.push(v.jsx("span",{className:"action-title-param",children:y})),s.push(y)),l=u.index+d.length}if(l<e.length){const d=e.slice(l);i.push(d),s.push(d)}return{elements:i,title:s.join("")}}const Rh=({value:n,description:e})=>{const[i,s]=q.useState("copy"),l=q.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 v.jsx(Xt,{title:e||"Copy",icon:i,onClick:l})},Oo=({value:n,description:e,copiedDescription:i=e,style:s})=>{const[l,o]=q.useState(!1),u=q.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),3e3)},[n]);return v.jsx(Xt,{style:s,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:l?i:e})},ts=({text:n})=>v.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),jx=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const s=q.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(u=>u!=="info"),[n]);if(!n)return v.jsx(ts,{text:"No action selected"});const l=n.startTime-e,o=_t(l);return v.jsxs("div",{className:"call-tab",children:[v.jsx("div",{className:"call-line",children:n.title}),v.jsx("div",{className:"call-section",children:"Time"}),v.jsx(My,{name:"start:",value:o}),v.jsx(My,{name:"duration:",value:Rx(n)}),!!s.length&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",children:"Parameters"}),s.map(u=>Oy(Ly(n,u,n.params[u],i)))]}),!!n.result&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(u=>Oy(Ly(n,u,n.result[u],i)))]})]})},My=({name:n,value:e})=>v.jsxs("div",{className:"call-line",children:[n,v.jsx("span",{className:"call-value datetime",title:e,children:e})]});function Rx(n){return n.endTime?_t(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function Oy(n){let e=n.text.replace(/\n/g,"↵");return n.type==="string"&&(e=`"${e}"`),v.jsxs("div",{className:"call-line",children:[n.name,":",v.jsx("span",{className:Ke("call-value",n.type),title:n.text,children:e}),["string","number","object","locator"].includes(n.type)&&v.jsx(Rh,{value:n.text})]},n.name)}function Ly(n,e,i,s){const l=n.method.includes("eval")||n.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&l)&&(i=Ko(i.value,new Array(10).fill({handle:"<handle>"}))),(e==="value"&&l||e==="received"&&n.method==="expect")&&(i=Ko(i,new Array(10).fill({handle:"<handle>"}))),e==="selector")return{text:Ji(s||"javascript",n.params.selector),type:"locator",name:"locator"};const o=typeof i;return o!=="object"||i===null?{text:String(i),type:o,name:e}:i.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(i).slice(0,1e3),type:"object",name:e}}function Ko(n,e){if(n.n!==void 0)return n.n;if(n.s!==void 0)return n.s;if(n.b!==void 0)return n.b;if(n.v!==void 0){if(n.v==="undefined")return;if(n.v==="null")return null;if(n.v==="NaN")return NaN;if(n.v==="Infinity")return 1/0;if(n.v==="-Infinity")return-1/0;if(n.v==="-0")return-0}if(n.d!==void 0)return new Date(n.d);if(n.r!==void 0)return new RegExp(n.r.p,n.r.f);if(n.a!==void 0)return n.a.map(i=>Ko(i,e));if(n.o!==void 0){const i={};for(const{k:s,v:l}of n.o)i[s]=Ko(l,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const jy=new Map;function ic({name:n,items:e=[],id:i,render:s,icon:l,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:p,onSelected:m,onHighlighted:y,onIconClicked:b,noItemsMessage:w,dataTestId:T,notSelectable:x,ariaLabel:E}){const k=q.useRef(null),[N,V]=q.useState();return q.useEffect(()=>{y==null||y(N)},[y,N]),q.useEffect(()=>{const $=k.current;if(!$)return;const B=()=>{jy.set(n,$.scrollTop)};return $.addEventListener("scroll",B,{passive:!0}),()=>$.removeEventListener("scroll",B)},[n]),q.useEffect(()=>{k.current&&(k.current.scrollTop=jy.get(n)||0)},[n]),v.jsx("div",{className:Ke("list-view vbox",n+"-list-view"),role:e.length>0?"list":void 0,"aria-label":E,children:v.jsxs("div",{className:Ke("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:$=>{var I;if(d&&$.key==="Enter"){p==null||p(d,e.indexOf(d));return}if($.key!=="ArrowDown"&&$.key!=="ArrowUp")return;$.stopPropagation(),$.preventDefault();const B=d?e.indexOf(d):-1;let Y=B;$.key==="ArrowDown"&&(B===-1?Y=0:Y=Math.min(B+1,e.length-1)),$.key==="ArrowUp"&&(B===-1?Y=e.length-1:Y=Math.max(B-1,0));const J=(I=k.current)==null?void 0:I.children.item(Y);S0(J||void 0),y==null||y(void 0),m==null||m(e[Y],Y),V(void 0)},ref:k,children:[w&&e.length===0&&v.jsx("div",{className:"list-view-empty",children:w}),e.map(($,B)=>{const Y=s($,B);return v.jsxs("div",{onDoubleClick:()=>p==null?void 0:p($,B),role:"listitem",className:Ke("list-view-entry",d===$&&"selected",!x&&N===$&&"highlighted",(o==null?void 0:o($,B))&&"error",(u==null?void 0:u($,B))&&"warning",(f==null?void 0:f($,B))&&"info"),"aria-selected":d===$,onClick:()=>m==null?void 0:m($,B),onMouseEnter:()=>V($),onMouseLeave:()=>V(void 0),children:[l&&v.jsx("div",{className:"codicon "+(l($,B)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:J=>{J.preventDefault(),J.stopPropagation()},onClick:J=>{J.stopPropagation(),J.preventDefault(),b==null||b($,B)}}),typeof Y=="string"?v.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:Y}):Y]},(i==null?void 0:i($,B))||B)})]})})}const Dx=ic,Bx=({action:n,isLive:e})=>{const i=q.useMemo(()=>{var u;if(!n||!n.log.length)return[];const s=n.log,l=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f<s.length;++f){let d="";if(s[f].time!==-1){const p=(u=s[f])==null?void 0:u.time;f+1<s.length?d=_t(s[f+1].time-p):n.endTime>0?d=_t(n.endTime-p):e?d=_t(Date.now()-l-p):d="-"}o.push({message:s[f].message,time:d})}return o},[n,e]);return i.length?v.jsx(Dx,{name:"log",ariaLabel:"Log entries",items:i,render:s=>v.jsxs("div",{className:"log-list-item",children:[v.jsx("span",{className:"log-list-duration",children:s.time}),s.message]}),notSelectable:!0}):v.jsx(ts,{text:"No log entries"})};function Xa(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,s=[];let l,o={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(l=i.exec(n))!==null;){const[,,p,,m]=l;if(p){const y=+p;switch(y){case 0:o={};break;case 1:o["font-weight"]="bold";break;case 2:o.opacity="0.8";break;case 3:o["font-style"]="italic";break;case 4:o["text-decoration"]="underline";break;case 7:u=!0;break;case 8:o.display="none";break;case 9:o["text-decoration"]="line-through";break;case 22:delete o["font-weight"],delete o["font-style"],delete o.opacity,delete o["text-decoration"];break;case 23:delete o["font-weight"],delete o["font-style"],delete o.opacity;break;case 24:delete o["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=Ry[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=Ry[y-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:o["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:f=Dy[y-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=Dy[y-100];break}}else if(m){const y={...o},b=u?d:f;b!==void 0&&(y.color=b);const w=u?f:d;w!==void 0&&(y["background-color"]=w),s.push(`<span style="${Hx(y)}">${Ux(m)}</span>`)}}return s.join("")}const Ry={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)"},Dy={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 Ux(n){return n.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function Hx(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const zx=({error:n})=>{const e=q.useMemo(()=>Xa(n),[n]);return v.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},J0=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:s})=>(Yt.useEffect(()=>{const l=document.createElement("div");return l.style.position="fixed",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.left="0",l.style.zIndex="9999",l.style.cursor=n,document.body.appendChild(l),e&&l.addEventListener("mousemove",e),i&&l.addEventListener("mouseup",i),s&&document.body.addEventListener("dblclick",s),()=>{e&&l.removeEventListener("mousemove",e),i&&l.removeEventListener("mouseup",i),s&&document.body.removeEventListener("dblclick",s),document.body.removeChild(l)}},[n,e,i,s]),v.jsx(v.Fragment,{})),qx={position:"absolute",top:0,right:0,bottom:0,left:0},W0=({orientation:n,offsets:e,setOffsets:i,resizerColor:s,resizerWidth:l,minColumnWidth:o})=>{const u=o||0,[f,d]=Yt.useState(null),[p,m]=es(),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-l)/2,borderRightWidth:n==="horizontal"?(7-l)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-l)/2,borderLeftWidth:n==="horizontal"?(7-l)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return v.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-l)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!f&&v.jsx(J0,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:b=>{if(!b.buttons)d(null);else if(f){const w=n==="horizontal"?b.clientX-f.clientX:b.clientY-f.clientY,T=f.offset+w,x=f.index>0?e[f.index-1]:0,E=n==="horizontal"?p.width:p.height,k=Math.min(Math.max(x+u,T),E-u)-e[f.index];for(let N=f.index;N<e.length;++N)e[N]=e[N]+k;i([...e])}}}),e.map((b,w)=>v.jsx("div",{style:{...y,top:n==="horizontal"?0:b,left:n==="horizontal"?b:0,pointerEvents:"initial"},onMouseDown:T=>d({clientX:T.clientX,clientY:T.clientY,offset:b,index:w}),children:v.jsx("div",{style:{...qx,background:s}})},w))]})};async function Gf(n){const e=new Image;return n&&(e.src=n,await new Promise((i,s)=>{e.onload=i,e.onerror=i})),e}const hh={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
|
52
|
+
linear-gradient(-45deg, #80808020 25%, transparent 25%),
|
53
|
+
linear-gradient(45deg, transparent 75%, #80808020 75%),
|
54
|
+
linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
|
55
|
+
rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
|
56
|
+
rgb(0 0 0 / 10%) 0px -2px 4px,
|
57
|
+
rgb(0 0 0 / 15%) 0px -6.1px 12px,
|
58
|
+
rgb(0 0 0 / 25%) 0px 6px 12px`},$x=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[s,l]=q.useState(n.diff?"diff":"actual"),[o,u]=q.useState(!1),[f,d]=q.useState(null),[p,m]=q.useState("Expected"),[y,b]=q.useState(null),[w,T]=q.useState(null),[x,E]=es();q.useEffect(()=>{(async()=>{var j,te,re,L;d(await Gf((j=n.expected)==null?void 0:j.attachment.path)),m(((te=n.expected)==null?void 0:te.title)||"Expected"),b(await Gf((re=n.actual)==null?void 0:re.attachment.path)),T(await Gf((L=n.diff)==null?void 0:L.attachment.path))})()},[n]);const k=f&&y&&w,N=k?Math.max(f.naturalWidth,y.naturalWidth,200):500,V=k?Math.max(f.naturalHeight,y.naturalHeight,200):500,$=Math.min(1,(x.width-30)/N),B=Math.min(1,(x.width-50)/N/2),Y=N*$,J=V*$,I={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return v.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:E,children:k&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&v.jsx("div",{style:{...I,fontWeight:s==="diff"?600:"initial"},onClick:()=>l("diff"),children:"Diff"}),v.jsx("div",{style:{...I,fontWeight:s==="actual"?600:"initial"},onClick:()=>l("actual"),children:"Actual"}),v.jsx("div",{style:{...I,fontWeight:s==="expected"?600:"initial"},onClick:()=>l("expected"),children:p}),v.jsx("div",{style:{...I,fontWeight:s==="sxs"?600:"initial"},onClick:()=>l("sxs"),children:"Side by side"}),v.jsx("div",{style:{...I,fontWeight:s==="slider"?600:"initial"},onClick:()=>l("slider"),children:"Slider"})]}),v.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:J+60},children:[n.diff&&s==="diff"&&v.jsx($n,{image:w,alt:"Diff",hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),n.diff&&s==="actual"&&v.jsx($n,{image:y,alt:"Actual",hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),n.diff&&s==="expected"&&v.jsx($n,{image:f,alt:p,hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),n.diff&&s==="slider"&&v.jsx(Ix,{expectedImage:f,actualImage:y,hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$,expectedTitle:p}),n.diff&&s==="sxs"&&v.jsxs("div",{style:{display:"flex"},children:[v.jsx($n,{image:f,title:p,hideSize:i,canvasWidth:B*N,canvasHeight:B*V,scale:B}),v.jsx($n,{image:o?w:y,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:B*N,canvasHeight:B*V,scale:B})]}),!n.diff&&s==="actual"&&v.jsx($n,{image:y,title:"Actual",hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),!n.diff&&s==="expected"&&v.jsx($n,{image:f,title:p,hideSize:i,canvasWidth:Y,canvasHeight:J,scale:$}),!n.diff&&s==="sxs"&&v.jsxs("div",{style:{display:"flex"},children:[v.jsx($n,{image:f,title:p,canvasWidth:B*N,canvasHeight:B*V,scale:B}),v.jsx($n,{image:y,title:"Actual",canvasWidth:B*N,canvasHeight:B*V,scale:B})]})]}),!i&&v.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[v.jsx("div",{children:n.diff&&v.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),v.jsx("div",{children:v.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),v.jsx("div",{children:v.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},Ix=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:s,scale:l,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[d,p]=q.useState(i/2),m=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&v.jsxs("div",{style:{margin:5},children:[!m&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),v.jsx("span",{children:n.naturalWidth}),v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),v.jsx("span",{children:n.naturalHeight}),!m&&v.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!m&&v.jsx("span",{children:e.naturalWidth}),!m&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&v.jsx("span",{children:e.naturalHeight})]}),v.jsxs("div",{style:{position:"relative",width:i,height:s,margin:15,...hh},children:[v.jsx(W0,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),v.jsx("img",{alt:o,style:{width:n.naturalWidth*l,height:n.naturalHeight*l},draggable:"false",src:n.src}),v.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:d,...hh},children:v.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*l,height:e.naturalHeight*l},draggable:"false",src:e.src})})]})]})},$n=({image:n,title:e,alt:i,hideSize:s,canvasWidth:l,canvasHeight:o,scale:u,onClick:f})=>v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!s&&v.jsxs("div",{style:{margin:5},children:[e&&v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),v.jsx("span",{children:n.naturalWidth}),v.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),v.jsx("span",{children:n.naturalHeight})]}),v.jsx("div",{style:{display:"flex",flex:"none",width:l,height:o,margin:15,...hh},children:v.jsx("img",{width:n.naturalWidth*u,height:n.naturalHeight*u,alt:e||i,style:{cursor:f?"pointer":"initial"},draggable:"false",src:n.src,onClick:f})})]}),Vx="modulepreload",Gx=function(n,e){return new URL(n,e).href},By={},Kx=function(e,i,s){let l=Promise.resolve();if(i&&i.length>0){let u=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};const f=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));l=u(i.map(m=>{if(m=Gx(m,s),m in By)return;By[m]=!0;const y=m.endsWith(".css"),b=y?'[rel="stylesheet"]':"";if(!!s)for(let x=f.length-1;x>=0;x--){const E=f[x];if(E.href===m&&(!y||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${b}`))return;const T=document.createElement("link");if(T.rel=y?"stylesheet":Vx,y||(T.as="script"),T.crossOrigin="",T.href=m,p&&T.setAttribute("nonce",p),document.head.appendChild(T),y)return new Promise((x,E)=>{T.addEventListener("load",x),T.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return l.then(u=>{for(const f of u||[])f.status==="rejected"&&o(f.reason);return e().catch(o)})},Yx=20,cr=({text:n,highlighter:e,mimeType:i,linkify:s,readOnly:l,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:p,wrapLines:m,onChange:y,dataTestId:b,placeholder:w})=>{const[T,x]=es(),[E]=q.useState(Kx(()=>import("./codeMirrorModule-Bhnc5o2x.js"),__vite__mapDeps([0,1]),import.meta.url).then($=>$.default)),k=q.useRef(null),[N,V]=q.useState();return q.useEffect(()=>{(async()=>{var I,j;const $=await E;Px($);const B=x.current;if(!B)return;const Y=Qx(e)||Fx(i)||(s?"text/linkified":"");if(k.current&&Y===k.current.cm.getOption("mode")&&!!l===k.current.cm.getOption("readOnly")&&f===k.current.cm.getOption("lineNumbers")&&m===k.current.cm.getOption("lineWrapping")&&w===k.current.cm.getOption("placeholder"))return;(j=(I=k.current)==null?void 0:I.cm)==null||j.getWrapperElement().remove();const J=$(B,{value:"",mode:Y,readOnly:!!l,lineNumbers:f,lineWrapping:m,placeholder:w});return k.current={cm:J},d&&J.focus(),V(J),J})()},[E,N,x,e,i,s,f,m,l,d,w]),q.useEffect(()=>{k.current&&k.current.cm.setSize(T.width,T.height)},[T]),q.useLayoutEffect(()=>{var Y;if(!N)return;let $=!1;if(N.getValue()!==n&&(N.setValue(n),$=!0,p&&(N.execCommand("selectAll"),N.focus())),$||JSON.stringify(o)!==JSON.stringify(k.current.highlight)){for(const j of k.current.highlight||[])N.removeLineClass(j.line-1,"wrap");for(const j of o||[])N.addLineClass(j.line-1,"wrap",`source-line-${j.type}`);for(const j of k.current.widgets||[])N.removeLineWidget(j);for(const j of k.current.markers||[])j.clear();const J=[],I=[];for(const j of o||[]){if(j.type!=="subtle-error"&&j.type!=="error")continue;const te=(Y=k.current)==null?void 0:Y.cm.getLine(j.line-1);if(te){const re={};re.title=j.message||"",I.push(N.markText({line:j.line-1,ch:0},{line:j.line-1,ch:j.column||te.length},{className:"source-line-error-underline",attributes:re}))}if(j.type==="error"){const re=document.createElement("div");re.innerHTML=Xa(j.message||""),re.className="source-line-error-widget",J.push(N.addLineWidget(j.line,re,{above:!0,coverGutter:!1}))}}k.current.highlight=o,k.current.widgets=J,k.current.markers=I}typeof u=="number"&&k.current.cm.lineCount()>=u&&N.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let B;return y&&(B=()=>y(N.getValue()),N.on("change",B)),()=>{B&&N.off("change",B)}},[N,n,o,u,p,y]),v.jsx("div",{"data-testid":b,className:"cm-wrapper",ref:x,onClick:Xx})};function Xx(n){var i;if(!(n.target instanceof HTMLElement))return;let e;n.target.classList.contains("cm-linkified")?e=n.target.textContent:n.target.classList.contains("cm-link")&&((i=n.target.nextElementSibling)!=null&&i.classList.contains("cm-url"))&&(e=n.target.nextElementSibling.textContent.slice(1,-1)),e&&(n.preventDefault(),n.stopPropagation(),window.open(e,"_blank"))}let Uy=!1;function Px(n){Uy||(Uy=!0,n.defineSimpleMode("text/linkified",{start:[{regex:w0,token:"linkified"}]}))}function Fx(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 Qx(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]}function Zx(n){return!!n.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const Jx=({title:n,children:e,setExpanded:i,expanded:s,expandOnTitleClick:l})=>{const o=q.useId();return v.jsxs("div",{className:Ke("expandable",s&&"expanded"),children:[v.jsxs("div",{role:"button","aria-expanded":s,"aria-controls":o,className:"expandable-title",onClick:()=>l&&i(!s),children:[v.jsx("div",{className:Ke("codicon",s?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!l&&i(!s)}),n]}),s&&v.jsx("div",{id:o,role:"region",style:{marginLeft:25},children:e})]})};function eb(n){const e=[];let i=0,s;for(;(s=w0.exec(n))!==null;){const o=n.substring(i,s.index);o&&e.push(o);const u=s[0];e.push(Wx(u)),i=s.index+u.length}const l=n.substring(i);return l&&e.push(l),e}function Wx(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),v.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const e_=({attachment:n,reveal:e})=>{const[i,s]=q.useState(!1),[l,o]=q.useState(null),[u,f]=q.useState(null),[d,p]=kw(),m=q.useRef(null),y=Zx(n.contentType),b=!!n.sha1||!!n.path;q.useEffect(()=>{var x;if(e)return(x=m.current)==null||x.scrollIntoView({behavior:"smooth"}),p()},[e,p]),q.useEffect(()=>{i&&l===null&&u===null&&(f("Loading ..."),fetch(sc(n)).then(x=>x.text()).then(x=>{o(x),f(null)}).catch(x=>{f("Failed to load: "+x.message)}))},[i,l,u,n]);const w=q.useMemo(()=>{const x=l?l.split(`
|
59
|
+
`).length:0;return Math.min(Math.max(5,x),20)*Yx},[l]),T=v.jsxs("span",{style:{marginLeft:5},ref:m,"aria-label":n.name,children:[v.jsx("span",{children:eb(n.name)}),b&&v.jsx("a",{style:{marginLeft:5},href:Lo(n),children:"download"})]});return!y||!b?v.jsx("div",{style:{marginLeft:20},children:T}):v.jsxs("div",{className:Ke(d&&"yellow-flash"),children:[v.jsx(Jx,{title:T,expanded:i,setExpanded:s,expandOnTitleClick:!0,children:u&&v.jsx("i",{children:u})}),i&&l!==null&&v.jsx("div",{className:"vbox",style:{height:w},children:v.jsx(cr,{text:l,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},t_=({model:n,revealedAttachment:e})=>{const{diffMap:i,screenshots:s,attachments:l}=q.useMemo(()=>{const o=new Set((n==null?void 0:n.visibleAttachments)??[]),u=new Set,f=new Map;for(const d of o){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const m=p[1],y=p[2],b=f.get(m)||{expected:void 0,actual:void 0,diff:void 0};b[y]=d,f.set(m,b),o.delete(d)}else d.contentType.startsWith("image/")&&(u.add(d),o.delete(d))}return{diffMap:f,attachments:o,screenshots:u}},[n]);return!i.size&&!s.size&&!l.size?v.jsx(ts,{text:"No attachments"}):v.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>v.jsxs(v.Fragment,{children:[o&&u&&v.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&v.jsx($x,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:Lo(o)},title:"Expected"},actual:{attachment:{...u,path:Lo(u)}},diff:f?{attachment:{...f,path:Lo(f)}}:void 0}})]})),s.size?v.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...s.values()].map((o,u)=>{const f=sc(o);return v.jsxs("div",{className:"attachment-item",children:[v.jsx("div",{children:v.jsx("img",{draggable:"false",src:f})}),v.jsx("div",{children:v.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),l.size?v.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...l.values()].map((o,u)=>v.jsx("div",{className:"attachment-item",children:v.jsx(e_,{attachment:o,reveal:e&&n_(o,e[0])?e:void 0})},i_(o,u)))]})};function n_(n,e){return n.name===e.name&&n.path===e.path&&n.sha1===e.sha1}function sc(n,e={}){const i=new URLSearchParams(e);return n.sha1?(i.set("trace",n.traceUrl),"sha1/"+n.sha1+"?"+i.toString()):(i.set("path",n.path),"file?"+i.toString())}function Lo(n){const e={dn:n.name};return n.contentType&&(e.dct=n.contentType),sc(n,e)}function i_(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const s_=`
|
60
|
+
# Instructions
|
61
|
+
|
62
|
+
- Following Playwright test failed.
|
63
|
+
- Explain why, be concise, respect Playwright best practices.
|
64
|
+
- Provide a snippet of code with the fix, if possible.
|
65
|
+
`.trimStart();async function r_({testInfo:n,metadata:e,errorContext:i,errors:s,buildCodeFrame:l,stdout:o,stderr:u}){var y;const f=new Set(s.filter(b=>b.message&&!b.message.includes(`
|
66
|
+
`)).map(b=>b.message));for(const b of s)for(const w of f.keys())(y=b.message)!=null&&y.includes(w)&&f.delete(w);const d=s.filter(b=>!(!b.message||!b.message.includes(`
|
67
|
+
`)&&!f.has(b.message)));if(!d.length)return;const p=[s_,"# Test info","",n];o&&p.push("","# Stdout","","```",jo(o),"```"),u&&p.push("","# Stderr","","```",jo(u),"```"),p.push("","# Error details");for(const b of d)p.push("","```",jo(b.message||""),"```");i&&p.push(i);const m=await l(d[d.length-1]);return m&&p.push("","# Test source","","```ts",m,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
|
68
|
+
`)}const a_=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function jo(n){return n.replace(a_,"")}const l_=ic,o_=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const s=n||[];return v.jsx(l_,{name:"stack-trace",ariaLabel:"Stack trace",items:s,selectedItem:s[i],render:l=>{const o=l.file[1]===":"?"\\":"/";return v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"stack-trace-frame-function",children:l.function||"(anonymous)"}),v.jsx("span",{className:"stack-trace-frame-location",children:l.file.split(o).pop()}),v.jsx("span",{className:"stack-trace-frame-line",children:":"+l.line})]})},onSelected:l=>e(s.indexOf(l))})},Dh=({noShadow:n,children:e,noMinHeight:i,className:s,sidebarBackground:l,onClick:o})=>v.jsx("div",{className:Ke("toolbar",n&&"no-shadow",i&&"no-min-height",s,l&&"toolbar-sidebar-background"),onClick:o,children:e});function c_(n,e,i,s,l){return qo(async()=>{var b,w,T,x;const o=n==null?void 0:n[e],u=o!=null&&o.file?o:l;if(!u)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const f=u.file;let d=i.get(f);d||(d={errors:((b=l==null?void 0:l.source)==null?void 0:b.errors)||[],content:(w=l==null?void 0:l.source)==null?void 0:w.content},i.set(f,d));const p=(u==null?void 0:u.line)||((T=d.errors[0])==null?void 0:T.line)||0,m=s&&f.startsWith(s)?f.substring(s.length+1):f,y=d.errors.map(E=>({type:"error",line:E.line,message:E.message}));if(y.push({line:p,type:"running"}),((x=l==null?void 0:l.source)==null?void 0:x.content)!==void 0)d.content=l.source.content;else if(d.content===void 0||u===l){const E=await tb(f);try{let k=await fetch(`sha1/src@${E}.txt`);k.status===404&&(k=await fetch(`file?path=${encodeURIComponent(f)}`)),k.status>=400?d.content=`<Unable to read "${f}">`:d.content=await k.text()}catch{d.content=`<Unable to read "${f}">`}}return{source:d,highlight:y,targetLine:p,fileName:m,location:u}},[n,e,s,l],{source:{errors:[],content:"Loading…"},highlight:[]})}const u_=({stack:n,sources:e,rootDir:i,fallbackLocation:s,stackFrameLocation:l,onOpenExternally:o})=>{const[u,f]=q.useState(),[d,p]=q.useState(0);q.useEffect(()=>{u!==n&&(f(n),p(0))},[n,u,f,p]);const{source:m,highlight:y,targetLine:b,fileName:w,location:T}=c_(n,d,e,i,s),x=q.useCallback(()=>{T&&(o?o(T):window.location.href=`vscode://file//${T.file}:${T.line}`)},[o,T]),E=((n==null?void 0:n.length)??0)>1,k=f_(w);return v.jsx($o,{sidebarSize:200,orientation:l==="bottom"?"vertical":"horizontal",sidebarHidden:!E,main:v.jsxs("div",{className:"vbox","data-testid":"source-code",children:[w&&v.jsxs(Dh,{children:[v.jsx("div",{className:"source-tab-file-name",title:w,children:v.jsx("div",{children:k})}),v.jsx(Rh,{description:"Copy filename",value:k}),T&&v.jsx(Xt,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),v.jsx(cr,{text:m.content||"",highlighter:"javascript",highlight:y,revealLine:b,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:v.jsx(o_,{stack:n,selectedFrame:d,setSelectedFrame:p})})};async function tb(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),s=[],l=new DataView(i);for(let o=0;o<l.byteLength;o+=1){const u=l.getUint8(o).toString(16).padStart(2,"0");s.push(u)}return s.join("")}function f_(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const h_=({prompt:n})=>v.jsx(Oo,{value:n,description:"Copy prompt",copiedDescription:v.jsxs(v.Fragment,{children:["Copied ",v.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function d_(n){return q.useMemo(()=>{if(!n)return{errors:new Map};const e=new Map;for(const i of n.errorDescriptors)e.set(i.message,i);return{errors:e}},[n])}function p_({message:n,error:e,sdkLanguage:i,revealInSource:s}){var f;let l,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(l=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.line),v.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[v.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&jh(e.action,{sdkLanguage:i}),l&&v.jsxs("div",{className:"action-location",children:["@ ",v.jsx("span",{title:o,onClick:()=>s(e),children:l})]})]}),v.jsx(zx,{error:n})]})}const g_=({errorsModel:n,model:e,sdkLanguage:i,revealInSource:s,wallTime:l,testRunMetadata:o})=>{const u=qo(async()=>{const p=e==null?void 0:e.attachments.find(m=>m.name==="error-context");if(p)return await fetch(sc(p)).then(m=>m.text())},[e],void 0),f=q.useCallback(async p=>{var w;const m=(w=p.stack)==null?void 0:w[0];if(!m)return;let y=await fetch(`sha1/src@${await tb(m.file)}.txt`);if(y.status===404&&(y=await fetch(`file?path=${encodeURIComponent(m.file)}`)),y.status>=400)return;const b=await y.text();return m_({source:b,message:jo(p.message).split(`
|
69
|
+
`)[0]||void 0,location:m,linesAbove:100,linesBelow:100})},[]),d=qo(()=>r_({testInfo:(e==null?void 0:e.title)??"",metadata:o,errorContext:u,errors:(e==null?void 0:e.errorDescriptors)??[],buildCodeFrame:f}),[u,o,e,f],void 0);return n.errors.size?v.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[v.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&v.jsx(h_,{prompt:d})}),[...n.errors.entries()].map(([p,m])=>{const y=`error-${l}-${p}`;return v.jsx(p_,{message:p,error:m,revealInSource:s,sdkLanguage:i},y)})]}):v.jsx(ts,{text:"No errors"})};function m_({source:n,message:e,location:i,linesAbove:s,linesBelow:l}){const o=n.split(`
|
70
|
+
`).slice(),u=Math.max(0,i.line-s-1),f=Math.min(o.length,i.line+l),d=o.slice(u,f),p=String(f).length,m=d.map((y,b)=>`${u+b+1===i.line?"> ":" "}${(u+b+1).toString().padEnd(p," ")} | ${y}`);return e&&m.splice(i.line-u,0,`${" ".repeat(p+2)} | ${" ".repeat(i.column-2)} ^ ${e}`),m.join(`
|
71
|
+
`)}const y_=ic;function b_(n,e){const{entries:i}=q.useMemo(()=>{if(!n)return{entries:[]};const l=[];function o(f){var m,y,b,w,T,x;const d=l[l.length-1];d&&((m=f.browserMessage)==null?void 0:m.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((b=f.browserMessage)==null?void 0:b.location)===((w=d.browserMessage)==null?void 0:w.location)&&f.browserError===d.browserError&&((T=f.nodeMessage)==null?void 0:T.html)===((x=d.nodeMessage)==null?void 0:x.html)&&f.isError===d.isError&&f.isWarning===d.isWarning&&f.timestamp-d.timestamp<1e3?d.repeat++:l.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?S_(f.args):nb(f.text),p=f.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${f.location.lineNumber}`;o({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"&&o({browserError:f.params.error,isError:!0,isWarning:!1,timestamp:f.time}),f.type==="stderr"||f.type==="stdout"){let d="";f.text&&(d=Xa(f.text.trim())||""),f.base64&&(d=Xa(atob(f.base64).trim())||""),o({nodeMessage:{html:d},isError:f.type==="stderr",isWarning:!1,timestamp:f.timestamp})}}return{entries:l}},[n]);return{entries:q.useMemo(()=>e?i.filter(l=>l.timestamp>=e.minimum&&l.timestamp<=e.maximum):i,[i,e])}}const v_=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:s})=>n.entries.length?v.jsx("div",{className:"console-tab",children:v.jsx(y_,{name:"console",onAccepted:s,onHighlighted:i,items:n.entries,isError:l=>l.isError,isWarning:l=>l.isWarning,render:l=>{const o=_t(l.timestamp-e.minimum),u=v.jsx("span",{className:"console-time",children:o}),f=l.isError?"status-error":l.isWarning?"status-warning":"status-none",d=l.browserMessage||l.browserError?v.jsx("span",{className:Ke("codicon","codicon-browser",f),title:"Browser message"}):v.jsx("span",{className:Ke("codicon","codicon-file",f),title:"Runner message"});let p,m,y,b;const{browserMessage:w,browserError:T,nodeMessage:x}=l;if(w&&(p=w.location,m=w.body),T){const{error:E,value:k}=T;E?(m=E.message,b=E.stack):m=String(k)}return x&&(y=x.html),v.jsxs("div",{className:"console-line",children:[u,d,p&&v.jsx("span",{className:"console-location",children:p}),l.repeat>1&&v.jsx("span",{className:"console-repeat",children:l.repeat}),m&&v.jsx("span",{className:"console-line-message",children:m}),y&&v.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),b&&v.jsx("div",{className:"console-stack",children:b})]})}})}):v.jsx(ts,{text:"No console entries"});function S_(n){if(n.length===1)return nb(n[0].preview);const e=typeof n[0].value=="string"&&n[0].value.includes("%"),i=e?n[0].value:"",s=e?n.slice(1):n;let l=0;const o=/%([%sdifoOc])/g;let u;const f=[];let d=[];f.push(v.jsx("span",{children:d},f.length+1));let p=0;for(;(u=o.exec(i))!==null;){const m=i.substring(p,u.index);d.push(v.jsx("span",{children:m},d.length+1)),p=u.index+2;const y=u[0][1];if(y==="%")d.push(v.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const b=s[l++],w={};typeof(b==null?void 0:b.value)!="string"&&(w.color="var(--vscode-debugTokenExpression-number)"),d.push(v.jsx("span",{style:w,children:(b==null?void 0:b.preview)||""},d.length+1))}else if(y==="c"){d=[];const b=s[l++],w=b?w_(b.preview):{};f.push(v.jsx("span",{style:w,children:d},f.length+1))}}for(p<i.length&&d.push(v.jsx("span",{children:i.substring(p)},d.length+1));l<s.length;l++){const m=s[l],y={};d.length&&d.push(v.jsx("span",{children:" "},d.length+1)),typeof(m==null?void 0:m.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(v.jsx("span",{style:y,children:(m==null?void 0:m.preview)||""},d.length+1))}return f}function nb(n){return[v.jsx("span",{dangerouslySetInnerHTML:{__html:Xa(n.trim())}})]}function w_(n){try{const e={},i=n.split(";");for(const s of i){const l=s.trim();if(!l)continue;let[o,u]=l.split(":");if(o=o.trim(),u=u.trim(),!x_(o))continue;const f=o.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function x_(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const dh=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:s,rightToolbar:l,dataTestId:o,mode:u})=>{const f=q.useId();return e||(e=n[0].id),u||(u="default"),v.jsx("div",{className:"tabbed-pane","data-testid":o,children:v.jsxs("div",{className:"vbox",children:[v.jsxs(Dh,{children:[s&&v.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...s]}),u==="default"&&v.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...n.map(d=>v.jsx(ib,{id:d.id,ariaControls:`${f}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selected:e===d.id,onSelect:i},d.id))]}),u==="select"&&v.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:v.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:d=>{i==null||i(n[d.currentTarget.selectedIndex].id)},children:n.map(d=>{let p="";return d.count&&(p=` (${d.count})`),d.errorCount&&(p=` (${d.errorCount})`),v.jsxs("option",{value:d.id,role:"tab","aria-controls":`${f}-${d.id}`,children:[d.title,p]},d.id)})})}),l&&v.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...l]})]}),n.map(d=>{const p="tab-content tab-"+d.id;if(d.component)return v.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 v.jsx("div",{id:`${f}-${d.id}`,role:"tabpanel","aria-label":d.title,className:p,children:d.render()},d.id)})]})})},ib=({id:n,title:e,count:i,errorCount:s,selected:l,onSelect:o,ariaControls:u})=>v.jsxs("div",{className:Ke("tabbed-pane-tab",l&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,"aria-controls":u,children:[v.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&v.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!s&&v.jsx("div",{className:"tabbed-pane-tab-counter error",children:s})]});async function __(n){const e=navigator.platform.includes("Win")?"win":"unix";let i=[];const s=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function l(y){return'^"'+y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^
|
72
|
+
|
73
|
+
`)+'^"'}function o(y){function b(w){let x=w.charCodeAt(0).toString(16);for(;x.length<4;)x="0"+x;return"\\u"+x}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,b)+"'":"'"+y+"'"}const u=e==="win"?l:o;i.push(u(n.request.url).replace(/[[{}\]]/g,"\\$&"));let f="GET";const d=[],p=await sb(n);p&&(d.push("--data-raw "+u(p)),s.add("content-length"),f="POST"),n.request.method!==f&&i.push("-X "+u(n.request.method));const m=n.request.headers;for(let y=0;y<m.length;y++){const b=m[y],w=b.name.replace(/^:/,"");s.has(w.toLowerCase())||(b.value.trim()?i.push("-H "+u(w+": "+b.value)):i.push("-H "+u(w+";")))}return i=i.concat(d),"curl "+i.join(i.length>=3?e==="win"?` ^
|
74
|
+
`:` \\
|
75
|
+
`:" ")}async function E_(n,e=0){const i=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"]),l=JSON.stringify(n.request.url),o=n.request.headers,u=o.reduce((T,x)=>{const E=x.name;return!i.has(E.toLowerCase())&&!E.includes(":")&&T.append(E,x.value),T},new Headers),f={};for(const T of u)f[T[0]]=T[1];const d=n.request.cookies.length||o.some(({name:T})=>s.has(T.toLowerCase()))?"include":"omit",p=o.find(({name:T})=>T.toLowerCase()==="referer"),m=p?p.value:void 0,y=await sb(n),b={headers:Object.keys(f).length?f:void 0,referrer:m,body:y,method:n.request.method,mode:"cors"};if(e===1){const T=o.find(E=>E.name.toLowerCase()==="cookie"),x={};delete b.mode,T&&(x.cookie=T.value),m&&(delete b.referrer,x.Referer=m),Object.keys(x).length&&(b.headers={...f,...x})}else b.credentials=d;const w=JSON.stringify(b,null,2);return`fetch(${l}, ${w});`}async function sb(n){var e,i;return(e=n.request.postData)!=null&&e._sha1?await fetch(`sha1/${n.request.postData._sha1}`).then(s=>s.text()):(i=n.request.postData)==null?void 0:i.text}class T_{generatePlaywrightRequestCall(e,i){let s=e.method.toLowerCase();const l=new URL(e.url),o=`${l.origin}${l.pathname}`,u={};["delete","get","head","post","put","patch"].includes(s)||(u.method=s,s="fetch"),l.searchParams.size&&(u.params=Object.fromEntries(l.searchParams.entries())),i&&(u.data=i),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${s}(${f.join(", ")});`}prettyPrintObject(e,i=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*i),d=" ".repeat((s+1)*i);return`[
|
76
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
77
|
+
`)}
|
78
|
+
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
|
79
|
+
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1),m=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${m}: ${p}`}).join(`,
|
80
|
+
`)}
|
81
|
+
${l}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
|
82
|
+
`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class A_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),o=[`"${`${s.origin}${s.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),s.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(s.searchParams.entries()))}`),i&&o.push(`data=${this.prettyPrintObject(i)}`),e.headers.length&&o.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const f=o.length===1?o[0]:`
|
83
|
+
${o.map(d=>this.indent(d,2)).join(`,
|
84
|
+
`)}
|
85
|
+
`;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
|
86
|
+
`).map(s=>" ".repeat(i)+s).join(`
|
87
|
+
`)}prettyPrintObject(e,i=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*i),d=" ".repeat((s+1)*i);return`[
|
88
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
89
|
+
`)}
|
90
|
+
${f}]`}if(Object.keys(e).length===0)return"{}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`{
|
91
|
+
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1);return`${o}${this.stringLiteral(f)}: ${p}`}).join(`,
|
92
|
+
`)}
|
93
|
+
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class N_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),l=`${s.origin}${s.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),s.searchParams.size&&(o.Params=Object.fromEntries(s.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${l}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(`
|
94
|
+
`)}${u.length?`
|
95
|
+
`:""}await request.${this.toFunctionName(f)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=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*i),d=" ".repeat((s+1)*i);return`new object[] {
|
96
|
+
${e.map(m=>`${d}${this.prettyPrintObject(m,i,s+1)}`).join(`,
|
97
|
+
`)}
|
98
|
+
${f}}`}if(Object.keys(e).length===0)return"new {}";const l=" ".repeat(s*i),o=" ".repeat((s+1)*i);return`new() {
|
99
|
+
${Object.entries(e).map(([f,d])=>{const p=this.prettyPrintObject(d,i,s+1),m=s===0?f:`[${this.stringLiteral(f)}]`;return`${o}${m} = ${p}`}).join(`,
|
100
|
+
`)}
|
101
|
+
${l}}`}stringLiteral(e){return JSON.stringify(e)}}class C_{generatePlaywrightRequestCall(e,i){const s=new URL(e.url),l=[`"${s.origin}${s.pathname}"`],o=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`setMethod("${u}")`),u="fetch");for(const[f,d]of s.searchParams)o.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(d)})`);i&&o.push(`setData(${this.stringLiteral(i)})`);for(const f of e.headers)o.push(`setHeader(${this.stringLiteral(f.name)}, ${this.stringLiteral(f.value)})`);return o.length>0&&l.push(`RequestOptions.create()
|
102
|
+
.${o.join(`
|
103
|
+
.`)}
|
104
|
+
`),`request.${u}(${l.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function k_(n){if(n==="javascript")return new T_;if(n==="python")return new A_;if(n==="csharp")return new N_;if(n==="java")return new C_;throw new Error("Unsupported language: "+n)}const M_=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:s})=>{const[l,o]=q.useState("request"),u=qo(async()=>{if(n.request.postData){const f=n.request.headers.find(p=>p.name.toLowerCase()==="content-type"),d=f?f.value:"";if(n.request.postData._sha1){const p=await fetch(`sha1/${n.request.postData._sha1}`);return{text:ph(await p.text(),d),mimeType:d}}else return{text:ph(n.request.postData.text,d),mimeType:d}}else return null},[n],null);return v.jsx(dh,{dataTestId:"network-request-details",leftToolbar:[v.jsx(Xt,{icon:"close",title:"Close",onClick:s},"close")],rightToolbar:[v.jsx(O_,{requestBody:u,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>v.jsx(L_,{resource:n,startTimeOffset:i,requestBody:u})},{id:"response",title:"Response",render:()=>v.jsx(j_,{resource:n})},{id:"body",title:"Body",render:()=>v.jsx(R_,{resource:n})}],selectedTab:l,setSelectedTab:o})},O_=({resource:n,sdkLanguage:e,requestBody:i})=>{const s=v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),l=async()=>k_(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return v.jsxs("div",{className:"copy-request-dropdown",children:[v.jsxs(Xt,{className:"copy-request-dropdown-toggle",children:[v.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",v.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),v.jsxs("div",{className:"copy-request-dropdown-menu",children:[v.jsx(Oo,{description:"Copy as cURL",copiedDescription:s,value:()=>__(n)}),v.jsx(Oo,{description:"Copy as Fetch",copiedDescription:s,value:()=>E_(n)}),v.jsx(Oo,{description:"Copy as Playwright",copiedDescription:s,value:l})]})]})},L_=({resource:n,startTimeOffset:e,requestBody:i})=>v.jsxs("div",{className:"network-request-details-tab",children:[v.jsx("div",{className:"network-request-details-header",children:"General"}),v.jsx("div",{className:"network-request-details-url",children:`URL: ${n.request.url}`}),v.jsx("div",{className:"network-request-details-general",children:`Method: ${n.request.method}`}),n.response.status!==-1&&v.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",v.jsx("span",{className:B_(n.response.status),style:{display:"inline-flex"},children:`${n.response.status} ${n.response.statusText}`})]}),n.request.queryString.length?v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),v.jsx("div",{className:"network-request-details-headers",children:n.request.queryString.map(s=>`${s.name}: ${s.value}`).join(`
|
105
|
+
`)})]}):null,v.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),v.jsx("div",{className:"network-request-details-headers",children:n.request.headers.map(s=>`${s.name}: ${s.value}`).join(`
|
106
|
+
`)}),v.jsx("div",{className:"network-request-details-header",children:"Time"}),v.jsx("div",{className:"network-request-details-general",children:`Start: ${_t(e)}`}),v.jsx("div",{className:"network-request-details-general",children:`Duration: ${_t(n.time)}`}),i&&v.jsx("div",{className:"network-request-details-header",children:"Request Body"}),i&&v.jsx(cr,{text:i.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0})]}),j_=({resource:n})=>v.jsxs("div",{className:"network-request-details-tab",children:[v.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),v.jsx("div",{className:"network-request-details-headers",children:n.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
|
107
|
+
`)})]}),R_=({resource:n})=>{const[e,i]=q.useState(null);return q.useEffect(()=>{(async()=>{if(n.response.content._sha1){const l=n.response.content.mimeType.includes("image"),o=n.response.content.mimeType.includes("font"),u=await fetch(`sha1/${n.response.content._sha1}`);if(l){const f=await u.blob(),d=new FileReader,p=new Promise(m=>d.onload=m);d.readAsDataURL(f),i({dataUrl:(await p).target.result})}else if(o){const f=await u.arrayBuffer();i({font:f})}else{const f=ph(await u.text(),n.response.content.mimeType);i({text:f,mimeType:n.response.content.mimeType})}}else i(null)})()},[n]),v.jsxs("div",{className:"network-request-details-tab",children:[!n.response.content._sha1&&v.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&v.jsx(D_,{font:e.font}),e&&e.dataUrl&&v.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&v.jsx(cr,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},D_=({font:n})=>{const[e,i]=q.useState(!1);return q.useEffect(()=>{let s;try{s=new FontFace("font-preview",n),s.status==="loaded"&&document.fonts.add(s),s.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(s)}},[n]),e?v.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):v.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",v.jsx("br",{}),"NOPQRSTUVWXYZ",v.jsx("br",{}),"abcdefghijklm",v.jsx("br",{}),"nopqrstuvwxyz",v.jsx("br",{}),"1234567890"]})};function B_(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}function ph(n,e){if(n===null)return"Loading...";const i=n;if(i==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(i):i}function U_(n){const[e,i]=q.useState([]);q.useEffect(()=>{const o=[];for(let u=0;u<n.columns.length-1;++u){const f=n.columns[u];o[u]=(o[u-1]||0)+n.columnWidths.get(f)}i(o)},[n.columns,n.columnWidths]);function s(o){const u=new Map(n.columnWidths.entries());for(let f=0;f<o.length;++f){const d=o[f]-(o[f-1]||0),p=n.columns[f];u.set(p,d)}n.setColumnWidths(u)}const l=q.useCallback(o=>{var u,f;(f=n.setSorting)==null||f.call(n,{by:o,negate:((u=n.sorting)==null?void 0:u.by)===o?!n.sorting.negate:!1})},[n]);return v.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[v.jsx(W0,{orientation:"horizontal",offsets:e,setOffsets:s,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),v.jsxs("div",{className:"vbox",children:[v.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>v.jsxs("div",{className:"grid-view-header-cell "+H_(o,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(o):void 0},onClick:()=>n.setSorting&&l(o),children:[v.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),v.jsx("span",{className:"codicon codicon-triangle-up"}),v.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),v.jsx(ic,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>v.jsx(v.Fragment,{children:n.columns.map((f,d)=>{const{body:p,title:m}=n.render(o,f,u);return v.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 H_(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const z_=["All","Fetch","HTML","JS","CSS","Font","Image"],q_={searchValue:"",resourceType:"All"},$_=({filterState:n,onFilterStateChange:e})=>v.jsxs("div",{className:"network-filters",children:[v.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),v.jsx("div",{className:"network-filters-resource-types",children:z_.map(i=>v.jsx("div",{title:i,onClick:()=>e({...n,resourceType:i}),className:`network-filters-resource-type ${n.resourceType===i?"selected":""}`,children:i},i))})]}),I_=U_;function V_(n,e){const i=q.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(u=>e?!!u._monotonicTime&&u._monotonicTime>=e.minimum&&u._monotonicTime<=e.maximum:!0),[n,e]),s=q.useMemo(()=>new F_(n),[n]);return{resources:i,contextIdMap:s}}const G_=({boundaries:n,networkModel:e,onEntryHovered:i,sdkLanguage:s})=>{const[l,o]=q.useState(void 0),[u,f]=q.useState(void 0),[d,p]=q.useState(q_),{renderedEntries:m,renderedEntryMap:y}=q.useMemo(()=>{const N=e.resources.map($=>Q_($,n,e.contextIdMap)).filter(tE(d));l&&J_(N,l);const V=new Map(N.map(($,B)=>[`${$.frameref}:${B}`,$]));return{renderedEntries:N,renderedEntryMap:V}},[e.resources,e.contextIdMap,d,l,n]),b=u?y.get(u):void 0,[w,T]=q.useState(()=>new Map(rb().map(N=>[N,Y_(N)]))),x=q.useCallback(N=>{const V=m.indexOf(N);f(V!==-1?`${N.frameref}:${V}`:void 0)},[m]),E=q.useCallback(N=>{p(N),f(void 0)},[]);if(!e.resources.length)return v.jsx(ts,{text:"No network calls"});const k=v.jsx(I_,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:b,onSelected:x,onHighlighted:N=>i==null?void 0:i(N==null?void 0:N.resource),columns:X_(!!b,m),columnTitle:K_,columnWidths:w,setColumnWidths:T,isError:N=>N.status.code>=400||N.status.code===-1,isInfo:N=>!!N.route,render:(N,V)=>P_(N,V),sorting:l,setSorting:o});return v.jsxs(v.Fragment,{children:[v.jsx($_,{filterState:d,onFilterStateChange:E}),!b&&k,b&&v.jsx($o,{sidebarSize:w.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:v.jsx(M_,{resource:b.resource,sdkLanguage:s,startTimeOffset:b.start,onClose:()=>f(void 0)}),sidebar:k})]})},K_=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":"",Y_=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function X_(n,e){if(n){const s=["name"];return Hy(e)&&s.unshift("contextId"),s}let i=rb();return Hy(e)||(i=i.filter(s=>s!=="contextId")),i}function rb(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const P_=(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:_t(n.duration)}:e==="size"?{body:Nw(n.size)}:e==="start"?{body:_t(n.start)}:e==="route"?{body:n.route}:{body:""};class F_{constructor(e){Ne(this,"_pagerefToShortId",new Map);Ne(this,"_contextToId",new Map);Ne(this,"_lastPageId",0);Ne(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let i=this._pagerefToShortId.get(e);return i||(++this._lastPageId,i="page#"+this._lastPageId,this._pagerefToShortId.set(e,i)),i}_apiRequestContextId(e){const i=A0(e);if(!i)return"";let s=this._contextToId.get(i);return s||(++this._lastApiRequestContextId,s="api#"+this._lastApiRequestContextId,this._contextToId.set(i,s)),s}}function Hy(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const Q_=(n,e,i)=>{const s=Z_(n);let l;try{const f=new URL(n.request.url);l=f.pathname.substring(f.pathname.lastIndexOf("/")+1),l||(l=f.host),f.search&&(l+=f.search)}catch{l=n.request.url}let o=n.response.content.mimeType;const u=o.match(/^(.*);\s*charset=.*$/);return u&&(o=u[1]),{name:{name:l,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:o,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:s,resource:n,contextId:i.contextId(n),frameref:n._frameref}};function Z_(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function J_(n,e){const i=W_(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function W_(n){if(n==="start")return(e,i)=>e.start-i.start;if(n==="duration")return(e,i)=>e.duration-i.duration;if(n==="status")return(e,i)=>e.status.code-i.status.code;if(n==="method")return(e,i)=>{const s=e.method,l=i.method;return s.localeCompare(l)};if(n==="size")return(e,i)=>e.size-i.size;if(n==="contentType")return(e,i)=>e.contentType.localeCompare(i.contentType);if(n==="name")return(e,i)=>e.name.name.localeCompare(i.name.name);if(n==="route")return(e,i)=>e.route.localeCompare(i.route);if(n==="contextId")return(e,i)=>e.contextId.localeCompare(i.contextId)}const eE={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 tE({searchValue:n,resourceType:e}){return i=>{const s=eE[e];return s(i.contentType)&&i.name.url.toLowerCase().includes(n.toLowerCase())}}function Bh(n,e,i={}){var b;const s=new n.LineCounter,l={keepSourceTokens:!0,lineCounter:s,...i},o=n.parseDocument(e,l),u=[],f=w=>[s.linePos(w[0]),s.linePos(w[1])],d=w=>{u.push({message:w.message,range:[s.linePos(w.pos[0]),s.linePos(w.pos[1])]})},p=(w,T)=>{for(const x of T.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const N=Yo.parse(x,l,u);N&&(w.children=w.children||[],w.children.push(N));continue}if(x instanceof n.YAMLMap){m(w,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||T.range)})}},m=(w,T)=>{for(const x of T.items){if(w.children=w.children||[],!(x.key instanceof n.Scalar&&typeof x.key.value=="string")){u.push({message:"Only string keys are supported",range:f(x.key.range||T.range)});continue}const k=x.key,N=x.value;if(k.value==="text"){if(!(N instanceof n.Scalar&&typeof N.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||T.range)});continue}w.children.push({kind:"text",text:Kf(N.value)});continue}if(k.value==="/children"){if(!(N instanceof n.Scalar&&typeof N.value=="string")||N.value!=="contain"&&N.value!=="equal"&&N.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||T.range)});continue}w.containerMode=N.value;continue}if(k.value.startsWith("/")){if(!(N instanceof n.Scalar&&typeof N.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||T.range)});continue}w.props=w.props??{},w.props[k.value.slice(1)]=Kf(N.value);continue}const V=Yo.parse(k,l,u);if(!V)continue;if(N instanceof n.Scalar){const Y=typeof N.value;if(Y!=="string"&&Y!=="number"&&Y!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||T.range)});continue}w.children.push({...V,children:[{kind:"text",text:Kf(String(N.value))}]});continue}if(N instanceof n.YAMLSeq){w.children.push(V),p(V,N);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||T.range)})}},y={kind:"role",role:"fragment"};return o.errors.forEach(d),u.length?{errors:u,fragment:y}:(o.contents instanceof n.YAMLSeq||u.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?f(o.contents.range):[{line:0,col:0},{line:0,col:0}]}),u.length?{errors:u,fragment:y}:(p(y,o.contents),u.length?{errors:u,fragment:nE}:((b=y.children)==null?void 0:b.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const nE={kind:"role",role:"fragment"};function ab(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function Kf(n){return{raw:n,normalized:ab(n)}}class Yo{static parse(e,i,s){try{return new Yo(e.value)._parse()}catch(l){if(l instanceof zy){const o=i.prettyErrors===!1?l.message:l.message+`:
|
108
|
+
|
109
|
+
`+e.value+`
|
110
|
+
`+" ".repeat(l.pos)+`^
|
111
|
+
`;return s.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+l.pos)]}),null}throw l}}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 i=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(i,this._pos)}_readString(){let e="",i=!1;for(;!this._eof();){const s=this._next();if(i)e+=s,i=!1;else if(s==="\\")i=!0;else{if(s==='"')return e;e+=s}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new zy(e,i||this._pos)}_readRegex(){let e="",i=!1,s=!1;for(;!this._eof();){const l=this._next();if(i)e+=l,i=!1;else if(l==="\\")i=!0,e+=l;else{if(l==="/"&&!s)return{pattern:e};l==="["?(s=!0,e+=l):l==="]"&&s?(e+=l,s=!1):e+=l}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),ab(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let i=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),i=this._pos;const s=this._readIdentifier("attribute");this._skipWhitespace();let l="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)l+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,s,l||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",s={kind:"role",role:e,name:i};return this._readAttributes(s),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),s}_applyAttribute(e,i,s,l){if(i==="checked"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',l),e.checked=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(s==="true"||s==="false",'Value of "disabled" attribute must be a boolean',l),e.disabled=s==="true";return}if(i==="expanded"){this._assert(s==="true"||s==="false",'Value of "expanded" attribute must be a boolean',l),e.expanded=s==="true";return}if(i==="active"){this._assert(s==="true"||s==="false",'Value of "active" attribute must be a boolean',l),e.active=s==="true";return}if(i==="level"){this._assert(!isNaN(Number(s)),'Value of "level" attribute must be a number',l),e.level=Number(s);return}if(i==="pressed"){this._assert(s==="true"||s==="false"||s==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',l),e.pressed=s==="true"?!0:s==="false"?!1:"mixed";return}if(i==="selected"){this._assert(s==="true"||s==="false",'Value of "selected" attribute must be a boolean',l),e.selected=s==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,l)}_assert(e,i,s){e||this._throwError(i||"Assertion error",s)}}class zy extends Error{constructor(e,i){super(e),this.pos=i}}let lb={};function iE(n){lb=n}function Pa(n,e){for(;e;){if(n.contains(e))return!0;e=cb(e)}return!1}function yt(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function ob(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function cb(n){for(;n.parentElement;)n=n.parentElement;return yt(n)}function Ra(n,e,i){for(;n;){const s=n.closest(e);if(i&&s!==i&&(s!=null&&s.contains(i)))return;if(s)return s;n=cb(n)}}function xi(n,e){const i=e==="::before"?Hh:e==="::after"?zh:Uh;if(i&&i.has(n))return i.get(n);const s=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,s),s}function ub(n,e){if(e=e??xi(n),!e)return!0;if(Element.prototype.checkVisibility&&lb.browserNameForWorkarounds!=="webkit"){if(!n.checkVisibility())return!1}else{const i=n.closest("details,summary");if(i!==n&&(i==null?void 0:i.nodeName)==="DETAILS"&&!i.open)return!1}return e.visibility==="visible"}function Xo(n){const e=xi(n);if(!e)return{visible:!0,inline:!1};if(e.display==="contents"){for(let s=n.firstChild;s;s=s.nextSibling){if(s.nodeType===1&&bi(s))return{visible:!0,inline:!1,style:e};if(s.nodeType===3&&fb(s))return{visible:!0,inline:!0,style:e}}return{visible:!1,inline:!1,style:e}}if(!ub(n,e))return{style:e,visible:!1,inline:!1};const i=n.getBoundingClientRect();return{rect:i,style:e,visible:i.width>0&&i.height>0,inline:e.display==="inline"}}function bi(n){return Xo(n).visible}function fb(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function st(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let Uh,Hh,zh,hb=0;function qh(){++hb,Uh??(Uh=new Map),Hh??(Hh=new Map),zh??(zh=new Map)}function $h(){--hb||(Uh=void 0,Hh=void 0,zh=void 0)}function qy(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const $y="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]",sE=[["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",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-labelledby",["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",["generic"]]];function db(n,e){return sE.some(([i,s])=>!(s!=null&&s.includes(e||""))&&n.hasAttribute(i))}function pb(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function rE(n){return!Ab(n)&&(aE(n)||pb(n))}function aE(n){const e=st(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const Yf={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=>Ra(n,$y)?null:"contentinfo",FORM:n=>qy(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>Ra(n,$y)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!db(n)&&!pb(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 i=pr(n,n.getAttribute("list"))[0];return i&&st(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":xE[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",SEARCH:()=>"search",SECTION:n=>qy(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=Ra(n,"table"),i=e?Po(e):"";return i==="grid"||i==="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=Ra(n,"table"),i=e?Po(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},lE={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 Iy(n){var s;const e=((s=Yf[st(n)])==null?void 0:s.call(Yf,n))||"";if(!e)return null;let i=n;for(;i;){const l=yt(i),o=lE[st(i)];if(!o||!l||!o.includes(st(l)))break;const u=Po(l);if((u==="none"||u==="presentation")&&!gb(l,u))return u;i=l}return e}const oE=["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 Po(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>oE.includes(i))||null}function gb(n,e){return db(n,e)||rE(n)}function ft(n){const e=Po(n);if(!e)return Iy(n);if(e==="none"||e==="presentation"){const i=Iy(n);if(gb(n,i))return i}return e}function mb(n){return n===null?void 0:n.toLowerCase()==="true"}function yb(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(st(n))}function rn(n){if(yb(n))return!0;const e=xi(n),i=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!i){for(let l=n.firstChild;l;l=l.nextSibling)if(l.nodeType===1&&!rn(l)||l.nodeType===3&&fb(l))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!ub(n,e)?!0:bb(n)}function bb(n){let e=yi==null?void 0:yi.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=xi(n);e=!i||i.display==="none"||mb(n.getAttribute("aria-hidden"))===!0}if(!e){const i=yt(n);i&&(e=bb(i))}yi==null||yi.set(n,e)}return e}function pr(n,e){if(!e)return[];const i=ob(n);if(!i)return[];try{const s=e.split(" ").filter(o=>!!o),l=[];for(const o of s){const u=i.querySelector("#"+CSS.escape(o));u&&!l.includes(u)&&l.push(u)}return l}catch{return[]}}function In(n){return n.trim()}function qa(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
|
112
|
+
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function Vy(n,e){const i=[...n.querySelectorAll(e)];for(const s of pr(n,n.getAttribute("aria-owns")))s.matches(e)&&i.push(s),i.push(...s.querySelectorAll(e));return i}function $a(n,e){const i=e==="::before"?Wh:e==="::after"?ed:Jh;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const s=xi(n,e);let l;if(s){const o=s.content;o&&o!=="none"&&o!=="normal"&&s.display!=="none"&&s.visibility!=="hidden"&&(l=cE(n,o,!!e))}return e&&l!==void 0&&((s==null?void 0:s.display)||"inline")!=="inline"&&(l=" "+l+" "),i&&i.set(n,l),l}function cE(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let s=N0(e).filter(f=>!(f instanceof Io));const l=s.findIndex(f=>f instanceof ct&&f.value==="/");if(l!==-1)s=s.slice(l+1);else if(!i)return;const o=[];let u=0;for(;u<s.length;)if(s[u]instanceof Lh)o.push(s[u].value),u++;else if(u+2<s.length&&s[u]instanceof za&&s[u].value==="attr"&&s[u+1]instanceof Oh&&s[u+2]instanceof Mh){const f=s[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function vb(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=pr(n,e);return i.length?i:null}function uE(n,e){const i=["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 i||s}function Fa(n,e){const i=e?Fh:Ph;let s=i==null?void 0:i.get(n);return s===void 0&&(s="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ft(n)||"")||(s=qa(dn(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,s)),s}function Gy(n,e){const i=e?Zh:Qh;let s=i==null?void 0:i.get(n);if(s===void 0){if(s="",n.hasAttribute("aria-describedby")){const l=pr(n,n.getAttribute("aria-describedby"));s=qa(l.map(o=>dn(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:rn(o)}})).join(" "))}else n.hasAttribute("aria-description")?s=qa(n.getAttribute("aria-description")||""):s=qa(n.getAttribute("title")||"");i==null||i.set(n,s)}return s}function fE(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function hE(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function dE(n){const e=er;let i=er==null?void 0:er.get(n);if(i===void 0){i="";const s=fE(n)!=="false",l=hE(n);if(s||l){const o=n.getAttribute("aria-errormessage");i=pr(n,o).map(d=>qa(dn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:rn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function dn(n,e){var d,p,m,y;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const b=!!((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(yb(n)||!b&&rn(n))return e.visitedElements.add(n),""}const s=vb(n);if(!e.embeddedInLabelledBy){const b=(s||[]).map(w=>dn(w,{...e,embeddedInLabelledBy:{element:w,hidden:rn(w)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(b)return b}const l=ft(n)||"",o=st(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const b=[...n.labels||[]].includes(n),w=(s||[]).includes(n);if(!b&&!w){if(l==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(l)){e.visitedElements.add(n);let T;if(o==="SELECT")T=[...n.selectedOptions],!T.length&&n.options.length&&T.push(n.options[0]);else{const x=l==="combobox"?Vy(n,"*").find(E=>ft(E)==="listbox"):n;T=x?Vy(x,'[aria-selected="true"]').filter(E=>ft(E)==="option"):[]}return!T.length&&o==="INPUT"?n.value:T.map(x=>dn(x,i)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(l))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(l))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if(In(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(l)){if(o==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const b=n.value||"";return In(b)?b:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const b=n.labels||[];return b.length&&!e.embeddedInLabelledBy?Aa(b,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const b=n.labels||[];if(b.length&&!e.embeddedInLabelledBy)return Aa(b,e);const w=n.getAttribute("alt")||"";if(In(w))return w;const T=n.getAttribute("title")||"";return In(T)?T:"Submit"}if(!s&&o==="BUTTON"){e.visitedElements.add(n);const b=n.labels||[];if(b.length)return Aa(b,e)}if(!s&&o==="OUTPUT"){e.visitedElements.add(n);const b=n.labels||[];return b.length?Aa(b,e):n.getAttribute("title")||""}if(!s&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const b=n.labels||[];if(b.length)return Aa(b,e);const w=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",T=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!w||x?x:T}if(!s&&o==="FIELDSET"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(st(w)==="LEGEND")return dn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:rn(w)}});return n.getAttribute("title")||""}if(!s&&o==="FIGURE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(st(w)==="FIGCAPTION")return dn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:rn(w)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const b=n.getAttribute("alt")||"";return In(b)?b:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(st(w)==="CAPTION")return dn(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:rn(w)}});const b=n.getAttribute("summary")||"";if(b)return b}if(o==="AREA"){e.visitedElements.add(n);const b=n.getAttribute("alt")||"";return In(b)?b:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let b=n.firstElementChild;b;b=b.nextElementSibling)if(st(b)==="TITLE"&&b.ownerSVGElement)return dn(b,{...i,embeddedInLabelledBy:{element:b,hidden:rn(b)}})}if(n.ownerSVGElement&&o==="A"){const b=n.getAttribute("xlink:title")||"";if(In(b))return e.visitedElements.add(n),b}}const f=o==="SUMMARY"&&!["presentation","none"].includes(l);if(uE(l,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const b=pE(n,i);if(e.embeddedInTargetElement==="self"?In(b):b)return b}if(!["presentation","none"].includes(l)||o==="IFRAME"){e.visitedElements.add(n);const b=n.getAttribute("title")||"";if(In(b))return b}return e.visitedElements.add(n),""}function pE(n,e){const i=[],s=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=xi(o))==null?void 0:f.display)||"inline";let p=dn(o,e);(d!=="inline"||o.nodeName==="BR")&&(p=" "+p+" "),i.push(p)}else o.nodeType===3&&i.push(o.textContent||"")};i.push($a(n,"::before")||"");const l=$a(n);if(l!==void 0)i.push(l);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)s(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)s(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)s(u,!0);for(const u of pr(n,n.getAttribute("aria-owns")))s(u,!0)}}return i.push($a(n,"::after")||""),i.join("")}const Ih=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Sb(n){return st(n)==="OPTION"?n.selected:Ih.includes(ft(n)||"")?mb(n.getAttribute("aria-selected"))===!0:!1}const Vh=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function wb(n){const e=Gh(n,!0);return e==="error"?!1:e}function gE(n){return Gh(n,!0)}function mE(n){return Gh(n,!1)}function Gh(n,e){const i=st(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(Vh.includes(ft(n)||"")){const s=n.getAttribute("aria-checked");return s==="true"?!0:e&&s==="mixed"?"mixed":!1}return"error"}const yE=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function bE(n){const e=st(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):yE.includes(ft(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const Kh=["button"];function xb(n){if(Kh.includes(ft(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Yh=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function _b(n){if(st(n)==="DETAILS")return n.open;if(Yh.includes(ft(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Xh=["heading","listitem","row","treeitem"];function Eb(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[st(n)];if(e)return e;if(Xh.includes(ft(n)||"")){const i=n.getAttribute("aria-level"),s=i===null?Number.NaN:Number(i);if(Number.isInteger(s)&&s>=1)return s}return 0}const Tb=["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 Fo(n){return Ab(n)||Nb(n)}function Ab(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(st(n))&&(n.hasAttribute("disabled")||vE(n)||SE(n))}function vE(n){return st(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function SE(n){const e=n==null?void 0:n.closest("FIELDSET[DISABLED]");if(!e)return!1;const i=e.querySelector(":scope > LEGEND");return!i||!i.contains(n)}function Nb(n,e=!1){if(!n)return!1;if(e||Tb.includes(ft(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:Nb(yt(n),!0)}return!1}function Aa(n,e){return[...n].map(i=>dn(i,{...e,embeddedInLabel:{element:i,hidden:rn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function wE(n){const e=td;let i=n,s;const l=[];for(;i;i=yt(i)){const o=e.get(i);if(o!==void 0){s=o;break}l.push(i);const u=xi(i);if(!u){s=!0;break}const f=u.pointerEvents;if(f){s=f!=="none";break}}s===void 0&&(s=!0);for(const o of l)e.set(o,s);return s}let Ph,Fh,Qh,Zh,er,yi,Jh,Wh,ed,td,Cb=0;function rc(){qh(),++Cb,Ph??(Ph=new Map),Fh??(Fh=new Map),Qh??(Qh=new Map),Zh??(Zh=new Map),er??(er=new Map),yi??(yi=new Map),Jh??(Jh=new Map),Wh??(Wh=new Map),ed??(ed=new Map),td??(td=new Map)}function ac(){--Cb||(Ph=void 0,Fh=void 0,Qh=void 0,Zh=void 0,er=void 0,yi=void 0,Jh=void 0,Wh=void 0,ed=void 0,td=void 0),$h()}const xE={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function _E(n){return kb(n)?"'"+n.replace(/'/g,"''")+"'":n}function Xf(n){return kb(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
|
113
|
+
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function kb(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()))}let EE=0;function Mb(n){return n.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:n.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:n.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:n.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function Ia(n,e){const i=Mb(e),s=new Set,l={root:{role:"fragment",name:"",children:[],element:n,props:{},box:Xo(n),receivesPointerEvents:!0},elements:new Map,refs:new Map},o=(f,d,p)=>{if(s.has(d))return;if(s.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const x=d.nodeValue;f.role!=="textbox"&&x&&f.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const m=d,y=!rn(m);let b=y;if(i.visibility==="ariaOrVisible"&&(b=y||bi(m)),i.visibility==="ariaAndVisible"&&(b=y&&bi(m)),i.visibility==="aria"&&!b)return;const w=[];if(m.hasAttribute("aria-owns")){const x=m.getAttribute("aria-owns").split(/\s+/);for(const E of x){const k=n.ownerDocument.getElementById(E);k&&w.push(k)}}const T=b?TE(m,i):null;T&&(T.ref&&(l.elements.set(T.ref,m),l.refs.set(m,T.ref)),f.children.push(T)),u(T||f,m,w,b)};function u(f,d,p,m){var T;const b=(((T=xi(d))==null?void 0:T.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";b&&f.children.push(b),f.children.push($a(d,"::before")||"");const w=d.nodeName==="SLOT"?d.assignedNodes():[];if(w.length)for(const x of w)o(f,x,m);else{for(let x=d.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,m);if(d.shadowRoot)for(let x=d.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,m)}for(const x of p)o(f,x,m);if(f.children.push($a(d,"::after")||""),b&&f.children.push(b),f.children.length===1&&f.name===f.children[0]&&(f.children=[]),f.role==="link"&&d.hasAttribute("href")){const x=d.getAttribute("href");f.props.url=x}if(f.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==f.name){const x=d.getAttribute("placeholder");f.props.placeholder=x}}rc();try{o(l.root,n,!0)}finally{ac()}return NE(l.root),AE(l.root),l}function Ky(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;let i;i=n.element._ariaRef,(!i||i.role!==n.role||i.name!==n.name)&&(i={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++EE},n.element._ariaRef=i),n.ref=i.ref}function TE(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const p={role:"iframe",name:"",children:[],props:{},element:n,box:Xo(n),receivesPointerEvents:!0,active:i};return Ky(p,e),p}const s=e.includeGenericRole?"generic":null,l=ft(n)??s;if(!l||l==="presentation"||l==="none")return null;const o=Et(Fa(n,!1)||""),u=wE(n),f=Xo(n);if(l==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:l,name:o,children:[],props:{},element:n,box:f,receivesPointerEvents:u,active:i};return Ky(d,e),Vh.includes(l)&&(d.checked=wb(n)),Tb.includes(l)&&(d.disabled=Fo(n)),Yh.includes(l)&&(d.expanded=_b(n)),Xh.includes(l)&&(d.level=Eb(n)),Kh.includes(l)&&(d.pressed=xb(n)),Ih.includes(l)&&(d.selected=Sb(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function AE(n){const e=i=>{const s=[];for(const o of i.children||[]){if(typeof o=="string"){s.push(o);continue}const u=e(o);s.push(...u)}return i.role==="generic"&&!i.name&&s.length<=1&&s.every(o=>typeof o!="string"&&!!o.ref)?s:(i.children=s,[i])};e(n)}function NE(n){const e=(s,l)=>{if(!s.length)return;const o=Et(s.join(""));o&&l.push(o),s.length=0},i=s=>{const l=[],o=[];for(const u of s.children||[])typeof u=="string"?o.push(u):(e(o,l),i(u),l.push(u));e(o,l),s.children=l.length?l:[],s.children.length===1&&s.children[0]===s.name&&(s.children=[])};i(n)}function CE(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function Yy(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=kE(e);return i?!!n.match(i):!1}const Pf=Symbol("cachedRegex");function kE(n){if(n[Pf]!==void 0)return n[Pf];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let s;try{s=i?new RegExp(e.slice(1,-1)):null}catch{s=null}return n[Pf]=s,s}function ME(n,e){const i=Ia(n,{mode:"expect"});return{matches:Ob(i.root,e,!1,!1),received:{raw:Qo(i,{mode:"expect"}),regex:Qo(i,{mode:"codegen"})}}}function OE(n,e){const i=Ia(n,{mode:"expect"}).root;return Ob(i,e,!0,!1).map(l=>l.element)}function nd(n,e,i){var s;return typeof n=="string"&&e.kind==="text"?Yy(n,e.text):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||!CE(n.name,e.name)||!Yy(n.props.url,(s=e.props)==null?void 0:s.url)?!1:e.containerMode==="contain"?Py(n.children||[],e.children||[]):e.containerMode==="equal"?Xy(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?Xy(n.children||[],e.children||[],!0):Py(n.children||[],e.children||[])}function Xy(n,e,i){if(e.length!==n.length)return!1;for(let s=0;s<e.length;++s)if(!nd(n[s],e[s],i))return!1;return!0}function Py(n,e){if(e.length>n.length)return!1;const i=n.slice(),s=e.slice();for(const l of s){let o=i.shift();for(;o&&!nd(o,l,!1);)o=i.shift();if(!o)return!1}return!0}function Ob(n,e,i,s){const l=[],o=(u,f)=>{if(nd(u,e,s)){const d=typeof u=="string"?f:u;return d&&l.push(d),!i}if(typeof u=="string")return!1;for(const d of u.children||[])if(o(d,u))return!0;return!1};return o(n,null),l}function Qo(n,e){const i=Mb(e),s=[],l=i.renderStringsAsRegex?jE:()=>!0,o=i.renderStringsAsRegex?LE:d=>d,u=(d,p,m,y)=>{if(typeof d=="string"){if(p&&!l(p,d))return;const E=Xf(o(d));E&&s.push(m+"- text: "+E);return}let b=d.role;if(d.name&&d.name.length<=900){const E=o(d.name);if(E){const k=E.startsWith("/")&&E.endsWith("/")?E:JSON.stringify(E);b+=" "+k}}d.checked==="mixed"&&(b+=" [checked=mixed]"),d.checked===!0&&(b+=" [checked]"),d.disabled&&(b+=" [disabled]"),d.expanded&&(b+=" [expanded]"),d.active&&i.renderActive&&(b+=" [active]"),d.level&&(b+=` [level=${d.level}]`),d.pressed==="mixed"&&(b+=" [pressed=mixed]"),d.pressed===!0&&(b+=" [pressed]"),d.selected===!0&&(b+=" [selected]");let w=!1;d.ref&&(b+=` [ref=${d.ref}]`,y&&RE(d)&&(w=!0,b+=" [cursor=pointer]"));const T=m+"- "+_E(b),x=!!Object.keys(d.props).length;if(!d.children.length&&!x)s.push(T);else if(d.children.length===1&&typeof d.children[0]=="string"&&!x){const E=l(d,d.children[0])?o(d.children[0]):null;E?s.push(T+": "+Xf(E)):s.push(T)}else{s.push(T+":");for(const[E,k]of Object.entries(d.props))s.push(m+" - /"+E+": "+Xf(k));for(const E of d.children||[])u(E,d,m+" ",y&&!w)}},f=n.root;if(f.role==="fragment")for(const d of f.children||[])u(d,f,"",!!i.renderCursorPointer);else u(f,null,"",!!i.renderCursorPointer);return s.join(`
|
114
|
+
`)}function LE(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 i="",s=0;const l=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(l,(o,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);i+=Go(n.slice(s,f));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:m}=e[p];i+=m;break}return s=f+o.length,o}),i?(i+=Go(n.slice(s)),String(new RegExp(i))):n}function jE(n,e){if(!e.length)return!1;if(!n.name)return!0;if(n.name.length>e.length)return!1;const i=e.length<=200&&n.name.length<=200?vx(e,n.name):"";let s=e;for(;i&&s.includes(i);)s=s.replace(i,"");return s.trim().length/e.length>.1}function RE(n){var e;return((e=n.box.style)==null?void 0:e.cursor)==="pointer"}const Fy=":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-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;z-index:10;font-size:13px}x-pw-dialog:not(.autosize){width:400px;height:150px}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.record.toggled>x-div{clip-path:url(#icon-stop-circle)}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}x-pw-action-list{flex:auto;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}x-pw-action-item{padding:6px 10px;cursor:pointer;overflow:hidden}x-pw-action-item:hover{background-color:#f2f2f2}x-pw-action-item:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}";class Ff{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const i=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=i.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="2147483647",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent",this._actionPointElement=i.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(Fy),this._glassPaneShadow.adoptedStyleSheets.push(s)}else{const s=this._injectedScript.document.createElement("style");s.textContent=Fy,this._glassPaneShadow.appendChild(s)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const i=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),s=Ji(this._language,Gn(e)),l=i.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(i.map((o,u)=>{const f=i.length>1?` [${u+1} of ${i.length}]`:"";return{element:o,color:l,tooltipText:s+f}})),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,i){this._actionPointElement.style.top=i+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,i;for(const s of this._renderedEntries)(e=s.highlightElement)==null||e.remove(),(i=s.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(s=>({element:s,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const s=this._createHighlightElement();this._glassPaneShadow.appendChild(s);let l;if(i.tooltipText){l=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(l),l.style.top="0",l.style.left="0",l.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=i.tooltipText,l.appendChild(o)}this._renderedEntries.push({targetElement:i.element,color:i.color,tooltipElement:l,highlightElement:s})}for(const i of this._renderedEntries){if(i.box=i.targetElement.getBoundingClientRect(),!i.tooltipElement)continue;const{anchorLeft:s,anchorTop:l}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=l,i.tooltipLeft=s}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const s=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=s.x+"px",i.highlightElement.style.top=s.y+"px",i.highlightElement.style.width=s.width+"px",i.highlightElement.style.height=s.height+"px",i.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:s.x,y:s.y,width:s.width,height:s.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}firstTooltipBox(){const e=this._renderedEntries[0];if(!(!e||!e.tooltipElement||e.tooltipLeft===void 0||e.tooltipTop===void 0))return{x:e.tooltipLeft,y:e.tooltipTop,left:e.tooltipLeft,top:e.tooltipTop,width:e.tooltipElement.offsetWidth,height:e.tooltipElement.offsetHeight,bottom:e.tooltipTop+e.tooltipElement.offsetHeight,right:e.tooltipLeft+e.tooltipElement.offsetWidth,toJSON:()=>{}}}tooltipPosition(e,i){const s=i.offsetWidth,l=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+s>o-5&&(f=o-s-5);let d=Math.max(0,e.bottom)+5;return d+l>u-5&&(Math.max(0,e.top)>l+5?d=Math.max(0,e.top)-l-5:d=u-5-l),{anchorLeft:f,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let i=0;i<this._renderedEntries.length;++i){if(e[i].element!==this._renderedEntries[i].targetElement||e[i].color!==this._renderedEntries[i].color)return!1;const s=this._renderedEntries[i].box;if(!s)return!1;const l=e[i].element.getBoundingClientRect();if(l.top!==s.top||l.right!==s.right||l.bottom!==s.bottom||l.left!==s.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}onGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="auto",this._glassPaneElement.style.backgroundColor="rgba(0, 0, 0, 0.3)",this._glassPaneElement.addEventListener("click",e)}offGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.backgroundColor="transparent",this._glassPaneElement.removeEventListener("click",e)}}function DE(n,e,i){const s=n.left-e.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function BE(n,e,i){const s=e.left-n.right;if(!(s<0||i!==void 0&&s>i))return s+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function UE(n,e,i){const s=e.top-n.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function HE(n,e,i){const s=n.top-e.bottom;if(!(s<0||i!==void 0&&s>i))return s+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function zE(n,e,i){const s=i===void 0?50:i;let l=0;return n.left-e.right>=0&&(l+=n.left-e.right),e.left-n.right>=0&&(l+=e.left-n.right),e.top-n.bottom>=0&&(l+=e.top-n.bottom),n.top-e.bottom>=0&&(l+=n.top-e.bottom),l>s?void 0:l}const qE=["left-of","right-of","above","below","near"];function Lb(n,e,i,s){const l=e.getBoundingClientRect(),o={"left-of":BE,"right-of":DE,above:UE,below:HE,near:zE}[n];let u;for(const f of i){if(f===e)continue;const d=o(l,f.getBoundingClientRect(),s);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function jb(n,e){for(const i of e.jsonPath)n!=null&&(n=n[i]);return Rb(n,e)}function Rb(n,e){const i=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,s=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!i:e.op==="="?s instanceof RegExp?typeof i=="string"&&!!i.match(s):i===s:typeof i!="string"||typeof s!="string"?!1:e.op==="*="?i.includes(s):e.op==="^="?i.startsWith(s):e.op==="$="?i.endsWith(s):e.op==="|="?i===s||i.startsWith(s+"-"):e.op==="~="?i.split(" ").includes(s):!1}function id(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Bt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!id(e)){let s="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:Et(e.value),immediate:[e.value]};else{for(let l=e.firstChild;l;l=l.nextSibling)if(l.nodeType===Node.TEXT_NODE)i.full+=l.nodeValue||"",s+=l.nodeValue||"";else{if(l.nodeType===Node.COMMENT_NODE)continue;s&&i.immediate.push(s),s="",l.nodeType===Node.ELEMENT_NODE&&(i.full+=Bt(n,l).full)}s&&i.immediate.push(s),e.shadowRoot&&(i.full+=Bt(n,e.shadowRoot).full),i.full&&(i.normalized=Et(i.full))}}n.set(e,i)}return i}function lc(n,e,i){if(id(e)||!i(Bt(n,e)))return"none";for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.ELEMENT_NODE&&i(Bt(n,s)))return"selfAndChildren";return e.shadowRoot&&i(Bt(n,e.shadowRoot))?"selfAndChildren":"self"}function Db(n,e){const i=vb(e);if(i)return i.map(o=>Bt(n,o));const s=e.getAttribute("aria-label");if(s!==null&&s.trim())return[{full:s,normalized:Et(s),immediate:[s]}];const l=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||l){const o=e.labels;if(o)return[...o].map(u=>Bt(n,u))}return[]}function Qy(n){return n.displayName||n.name||"Anonymous"}function $E(n){if(n.type)switch(typeof n.type){case"function":return Qy(n.type);case"string":return n.type;case"object":return n.type.displayName||(n.type.render?Qy(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 IE(n){var e;return n.key??((e=n._currentElement)==null?void 0:e.key)}function VE(n){if(n.child){const i=[];for(let s=n.child;s;s=s.sibling)i.push(s);return i}if(!n._currentElement)return[];const e=i=>{var l;const s=(l=i._currentElement)==null?void 0:l.type;return typeof s=="function"||typeof s=="string"};if(n._renderedComponent){const i=n._renderedComponent;return e(i)?[i]:[]}return n._renderedChildren?[...Object.values(n._renderedChildren)].filter(e):[]}function GE(n){var s;const e=n.memoizedProps||((s=n._currentElement)==null?void 0:s.props);if(!e||typeof e=="string")return e;const i={...e};return delete i.children,i}function Bb(n){var s;const e={key:IE(n),name:$E(n),children:VE(n).map(Bb),rootElements:[],props:GE(n)},i=n.stateNode||n._hostNode||((s=n._renderedComponent)==null?void 0:s._hostNode);if(i instanceof Element)e.rootElements.push(i);else for(const l of e.children)e.rootElements.push(...l.rootElements);return e}function Ub(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)Ub(s,e,i);return i}function Hb(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT);do{const l=s.currentNode,o=l,u=Object.keys(o).find(d=>d.startsWith("__reactContainer")&&o[d]!==null);if(u)e.push(o[u].stateNode.current);else{const d="_reactRootContainer";o.hasOwnProperty(d)&&o[d]!==null&&e.push(o[d]._internalRoot.current)}if(l instanceof Element&&l.hasAttribute("data-reactroot"))for(const d of Object.keys(l))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(l[d]);const f=l instanceof Element?l.shadowRoot:null;f&&Hb(f,e)}while(s.nextNode());return e}const KE=()=>({queryAll(n,e){const{name:i,attributes:s}=Zi(e,!1),u=Hb(n.ownerDocument||n).map(d=>Bb(d)).map(d=>Ub(d,p=>{const m=p.props??{};if(p.key!==void 0&&(m.key=p.key),i&&p.name!==i||p.rootElements.some(y=>!Pa(n,y)))return!1;for(const y of s)if(!jb(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]}}),zb=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];zb.sort();function Na(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(s=>`"${s}"`).join(", ")}`)}function Xs(n,e){if(n.op!=="<truthy>"&&!e.includes(n.value))throw new Error(`"${n.name}" must be one of ${e.map(i=>JSON.stringify(i)).join(", ")}`)}function Ps(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function YE(n,e){const i={role:e};for(const s of n)switch(s.name){case"checked":{Na(s.name,Vh,e),Xs(s,[!0,!1,"mixed"]),Ps(s,["<truthy>","="]),i.checked=s.op==="<truthy>"?!0:s.value;break}case"pressed":{Na(s.name,Kh,e),Xs(s,[!0,!1,"mixed"]),Ps(s,["<truthy>","="]),i.pressed=s.op==="<truthy>"?!0:s.value;break}case"selected":{Na(s.name,Ih,e),Xs(s,[!0,!1]),Ps(s,["<truthy>","="]),i.selected=s.op==="<truthy>"?!0:s.value;break}case"expanded":{Na(s.name,Yh,e),Xs(s,[!0,!1]),Ps(s,["<truthy>","="]),i.expanded=s.op==="<truthy>"?!0:s.value;break}case"level":{if(Na(s.name,Xh,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');i.level=s.value;break}case"disabled":{Xs(s,[!0,!1]),Ps(s,["<truthy>","="]),i.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');i.name=s.value,i.nameOp=s.op,i.exact=s.caseSensitive;break}case"include-hidden":{Xs(s,[!0,!1]),Ps(s,["<truthy>","="]),i.includeHidden=s.op==="<truthy>"?!0:s.value;break}default:throw new Error(`Unknown attribute "${s.name}", must be one of ${zb.map(l=>`"${l}"`).join(", ")}.`)}return i}function XE(n,e,i){const s=[],l=u=>{if(ft(u)===e.role&&!(e.selected!==void 0&&Sb(u)!==e.selected)&&!(e.checked!==void 0&&wb(u)!==e.checked)&&!(e.pressed!==void 0&&xb(u)!==e.pressed)&&!(e.expanded!==void 0&&_b(u)!==e.expanded)&&!(e.level!==void 0&&Eb(u)!==e.level)&&!(e.disabled!==void 0&&Fo(u)!==e.disabled)&&!(!e.includeHidden&&rn(u))){if(e.name!==void 0){const f=Et(Fa(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=Et(e.name)),i&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!Rb(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}s.push(u)}},o=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const d of u.querySelectorAll("*"))l(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(o)};return o(n),s}function Zy(n){return{queryAll:(e,i)=>{const s=Zi(i,!0),l=s.name.toLowerCase();if(!l)throw new Error("Role must not be empty");const o=YE(s.attributes,l);rc();try{return XE(e,o,n)}finally{ac()}}}}class PE{constructor(){this._retainCacheCounter=0,this._cacheText=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._engines=new Map,this._engines.set("not",ZE),this._engines.set("is",Da),this._engines.set("where",Da),this._engines.set("has",FE),this._engines.set("scope",QE),this._engines.set("light",JE),this._engines.set("visible",WE),this._engines.set("text",eT),this._engines.set("text-is",tT),this._engines.set("text-matches",nT),this._engines.set("has-text",iT),this._engines.set("right-of",Ca("right-of")),this._engines.set("left-of",Ca("left-of")),this._engines.set("above",Ca("above")),this._engines.set("below",Ca("below")),this._engines.set("near",Ca("near")),this._engines.set("nth-match",sT);const e=[...this._engines.keys()];e.sort();const i=[...K0];if(i.sort(),e.join("|")!==i.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${i.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,i,s,l){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(d=>s.every((p,m)=>d.rest[m]===p));if(u)return u.result;const f=l();return o.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,i,s){const l=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[l,s.scope,s.pierceShadow,s.originalScope],()=>Array.isArray(l)?this._matchesEngine(Da,e,l,s):(this._hasScopeClause(l)&&(s=this._expandContextForScopeMatching(s)),this._matchesSimple(e,l.simples[l.simples.length-1].selector,s)?this._matchesParents(e,l,l.simples.length-2,s):!1))}finally{this.end()}}query(e,i){const s=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,s,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(s))return this._queryEngine(Da,e,s);this._hasScopeClause(s)&&(e=this._expandContextForScopeMatching(e));const l=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,s.simples[s.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,s,s.simples.length-2,e)),this._scoreMap.size&&o.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=l,o})}finally{this.end()}}_markScore(e,i){this._scoreMap&&this._scoreMap.set(e,i)}_hasScopeClause(e){return e.simples.some(i=>i.selector.functions.some(s=>s.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=yt(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,s){return this._cached(this._cacheMatchesSimple,e,[i,s.scope,s.pierceShadow,s.originalScope],()=>{if(e===s.scope||i.css&&!this._matchesCSS(e,i.css))return!1;for(const l of i.functions)if(!this._matchesEngine(this._getEngine(l.name),e,l.args,s))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=i.css;const l=i.functions;s==="*"&&l.length&&(s=void 0);let o,u=-1;s!==void 0?o=this._queryCSS(e,s):(u=l.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),o=this._queryEngine(this._getEngine(l[u].name),e,l[u].args));for(let f=0;f<l.length;f++){if(f===u)continue;const d=this._getEngine(l[f].name);d.matches!==void 0&&(o=o.filter(p=>this._matchesEngine(d,p,l[f].args,e)))}for(let f=0;f<l.length;f++){if(f===u)continue;const d=this._getEngine(l[f].name);d.matches===void 0&&(o=o.filter(p=>this._matchesEngine(d,p,l[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,s,l){return s<0?!0:this._cached(this._cacheMatchesParents,e,[i,s,l.scope,l.pierceShadow,l.originalScope],()=>{const{selector:o,combinator:u}=i.simples[s];if(u===">"){const f=bo(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,s-1,l)}if(u==="+"){const f=Qf(e,l);return!f||!this._matchesSimple(f,o,l)?!1:this._matchesParents(f,i,s-1,l)}if(u===""){let f=bo(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="")break}f=bo(f,l)}return!1}if(u==="~"){let f=Qf(e,l);for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="~")break}f=Qf(f,l)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,l)){if(this._matchesParents(f,i,s-1,l))return!0;if(i.simples[s-1].combinator==="")break}f=bo(f,l)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,s,l){if(e.matches)return this._callMatches(e,i,s,l);if(e.query)return this._callQuery(e,s,l).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,s){if(e.query)return this._callQuery(e,s,i);if(e.matches)return this._queryCSS(i,"*").filter(l=>this._callMatches(e,l,s,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,s,l){return this._cached(this._cacheCallMatches,i,[e,l.scope,l.pierceShadow,l.originalScope,...s],()=>e.matches(i,s,l,this))}_callQuery(e,i,s){return this._cached(this._cacheCallQuery,e,[s.scope,s.pierceShadow,s.originalScope,...i],()=>e.query(s,i,this))}_matchesCSS(e,i){return e.matches(i)}_queryCSS(e,i){return this._cached(this._cacheQueryCSS,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let s=[];function l(o){if(s=s.concat([...o.querySelectorAll(i)]),!!e.pierceShadow){o.shadowRoot&&l(o.shadowRoot);for(const u of o.querySelectorAll("*"))u.shadowRoot&&l(u.shadowRoot)}}return l(e.scope),s})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const Da={matches(n,e,i,s){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(l=>s.matches(n,l,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let s=[];for(const l of e)s=s.concat(i.query(n,l));return e.length===1?s:qb(s)}},FE={matches(n,e,i,s){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return s.query({...i,scope:n},e).length>0}},QE={matches(n,e,i,s){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const l=i.originalScope||i.scope;return l.nodeType===9?n===l.documentElement:n===l},query(n,e,i){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;if(s.nodeType===9){const l=s.documentElement;return l?[l]:[]}return s.nodeType===1?[s]:[]}},ZE={matches(n,e,i,s){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!s.matches(n,e,i)}},JE={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,s){return s.matches(n,e,{...i,pierceShadow:!1})}},WE={matches(n,e,i,s){if(e.length)throw new Error('"visible" engine expects no arguments');return bi(n)}},eT={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const l=Et(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(l);return lc(s._cacheText,n,o)==="self"}},tT={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const l=Et(e[0]),o=u=>!l&&!u.immediate.length?!0:u.immediate.some(f=>Et(f)===l);return lc(s._cacheText,n,o)!=="none"}},nT={matches(n,e,i,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 l=new RegExp(e[0],e.length===2?e[1]:void 0),o=u=>l.test(u.full);return lc(s._cacheText,n,o)==="self"}},iT={matches(n,e,i,s){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(id(n))return!1;const l=Et(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(l))(Bt(s._cacheText,n))}};function Ca(n){return{matches(e,i,s,l){const o=i.length&&typeof i[i.length-1]=="number"?i[i.length-1]:void 0,u=o===void 0?i:i.slice(0,i.length-1);if(i.length<1+(o===void 0?0:1))throw new Error(`"${n}" engine expects a selector list and optional maximum distance in pixels`);const f=l.query(s,u),d=Lb(n,e,f,o);return d===void 0?!1:(l._markScore(e,d),!0)}}}const sT={query(n,e,i){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 l=Da.query(n,e.slice(0,e.length-1),i);return s--,s<l.length?[l[s]]:[]}};function bo(n,e){if(n!==e.scope)return e.pierceShadow?yt(n):n.parentElement||void 0}function Qf(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function qb(n){const e=new Map,i=[],s=[];function l(u){let f=e.get(u);if(f)return f;const d=yt(u);return d?l(d).children.push(u):i.push(u),f={children:[],taken:!1},e.set(u,f),f}for(const u of n)l(u).taken=!0;function o(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(o)}return i.forEach(o),s}const $b=10,gr=$b/2,Jy=1,rT=2,aT=10,lT=50,Ib=100,Vb=120,Gb=140,Kb=160,Ro=180,Yb=200,Wy=250,oT=Vb+gr,cT=Gb+gr,uT=Ib+gr,fT=Kb+gr,hT=Ro+gr,dT=Yb+gr,pT=300,gT=500,Xb=510,Zf=520,Pb=530,gh=1e4,mT=1e7,yT=1e3;function e0(n,e,i){n._evaluator.begin();const s={allowText:new Map,disallowText:new Map};rc(),qh();try{let l=[];if(i.forTextExpect){let f=Ba(n,e.ownerDocument.documentElement,i);for(let d=e;d;d=yt(d)){const p=Vi(s,n,d,{...i,noText:!0});if(!p)continue;if(Gi(p)<=yT){f=p;break}}l=[Do(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=Ra(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&bi(f)&&(e=f)}if(i.multiple){const f=Vi(s,n,e,i),d=Vi(s,n,e,{...i,noText:!0});let p=[f,d];if(s.allowText.clear(),s.disallowText.clear(),f&&Jf(f)&&p.push(Vi(s,n,e,{...i,noCSSId:!0})),d&&Jf(d)&&p.push(Vi(s,n,e,{...i,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const m=Ba(n,e,i);p.push(m),Jf(m)&&p.push(Ba(n,e,{...i,noCSSId:!0}))}l=[...new Set(p.map(m=>Do(m)))]}else{const f=Vi(s,n,e,i)||Ba(n,e,i);l=[Do(f)]}}const o=l[0],u=n.parseSelector(o);return{selector:o,selectors:l,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{$h(),ac(),n._evaluator.end()}}function Vi(n,e,i,s){if(s.root&&!Pa(s.root,i))throw new Error("Target element must belong to the root's subtree");if(i===s.root)return[{engine:"css",selector:":scope",score:1}];if(i.ownerDocument.documentElement===i)return[{engine:"css",selector:"html",score:1}];let l=null;const o=f=>{(!l||Gi(f)<Gi(l))&&(l=f)},u=[];if(!s.noText)for(const f of vT(e,i,!s.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of bT(e,i,s))s.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,d)=>Gi(f.candidate)-Gi(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const p=e.querySelectorAll(e.parseSelector(Do(f)),s.root??i.ownerDocument);if(!p.includes(i))continue;if(p.length===1){o(f);break}const m=p.indexOf(i);if(!(m>5)&&(o([...f,{engine:"nth",selector:String(m),score:gh}]),!s.isRecursive))for(let y=yt(i);y&&y!==s.root;y=yt(y)){const b=p.filter(V=>Pa(y,V)&&V!==y),w=b.indexOf(i);if(b.length>5||w===-1||w===m&&b.length>1)continue;const T=b.length===1?f:[...f,{engine:"nth",selector:String(w),score:gh}];if(l&&Gi([{engine:"",selector:"",score:1},...T])>=Gi(l))continue;const E=!!s.noText||d,k=E?n.disallowText:n.allowText;let N=k.get(y);N===void 0&&(N=Vi(n,e,y,{...s,isRecursive:!0,noText:E})||Ba(e,y,s),k.set(y,N)),N&&o([...N,...T])}}return l}function bT(n,e,i){const s=[];{for(const u of["data-testid","data-test-id","data-test"])u!==i.testIdAttributeName&&e.getAttribute(u)&&s.push({engine:"css",selector:`[${u}=${Js(e.getAttribute(u))}]`,score:rT});if(!i.noCSSId){const u=e.getAttribute("id");u&&!ST(u)&&s.push({engine:"css",selector:Fb(u),score:gT})}s.push({engine:"css",selector:Vn(e),score:Pb})}if(e.nodeName==="IFRAME"){for(const u of["name","title"])e.getAttribute(u)&&s.push({engine:"css",selector:`${Vn(e)}[${u}=${Js(e.getAttribute(u))}]`,score:aT});return e.getAttribute(i.testIdAttributeName)&&s.push({engine:"css",selector:`[${i.testIdAttributeName}=${Js(e.getAttribute(i.testIdAttributeName))}]`,score:Jy}),mh([s]),s}if(e.getAttribute(i.testIdAttributeName)&&s.push({engine:"internal:testid",selector:`[${i.testIdAttributeName}=${xt(e.getAttribute(i.testIdAttributeName),!0)}]`,score:Jy}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e;if(u.placeholder){s.push({engine:"internal:attr",selector:`[placeholder=${xt(u.placeholder,!0)}]`,score:oT});for(const f of tr(u.placeholder))s.push({engine:"internal:attr",selector:`[placeholder=${xt(f.text,!1)}]`,score:Vb-f.scoreBonus})}}const l=Db(n._evaluator._cacheText,e);for(const u of l){const f=u.normalized;s.push({engine:"internal:label",selector:Rt(f,!0),score:cT});for(const d of tr(f))s.push({engine:"internal:label",selector:Rt(d.text,!1),score:Gb-d.scoreBonus})}const o=ft(e);return o&&!["none","presentation"].includes(o)&&s.push({engine:"internal:role",selector:o,score:Xb}),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:`${Vn(e)}[name=${Js(e.getAttribute("name"))}]`,score:Zf}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&s.push({engine:"css",selector:`${Vn(e)}[type=${Js(e.getAttribute("type"))}]`,score:Zf}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&s.push({engine:"css",selector:Vn(e),score:Zf+1}),mh([s]),s}function vT(n,e,i){if(e.nodeName==="SELECT")return[];const s=[],l=e.getAttribute("title");if(l){s.push([{engine:"internal:attr",selector:`[title=${xt(l,!0)}]`,score:dT}]);for(const p of tr(l))s.push([{engine:"internal:attr",selector:`[title=${xt(p.text,!1)}]`,score:Yb-p.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){s.push([{engine:"internal:attr",selector:`[alt=${xt(o,!0)}]`,score:fT}]);for(const p of tr(o))s.push([{engine:"internal:attr",selector:`[alt=${xt(p.text,!1)}]`,score:Kb-p.scoreBonus}])}const u=Bt(n._evaluator._cacheText,e).normalized,f=u?tr(u):[];if(u){if(i){u.length<=80&&s.push([{engine:"internal:text",selector:Rt(u,!0),score:hT}]);for(const m of f)s.push([{engine:"internal:text",selector:Rt(m.text,!1),score:Ro-m.scoreBonus}])}const p={engine:"css",selector:Vn(e),score:Pb};for(const m of f)s.push([p,{engine:"internal:has-text",selector:Rt(m.text,!1),score:Ro-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+Go(u)+"$");s.push([p,{engine:"internal:has-text",selector:Rt(m,!1),score:Wy}])}}const d=ft(e);if(d&&!["none","presentation"].includes(d)){const p=Fa(e,!1);if(p){const m={engine:"internal:role",selector:`${d}[name=${xt(p,!0)}]`,score:uT};s.push([m]);for(const y of tr(p))s.push([{engine:"internal:role",selector:`${d}[name=${xt(y.text,!1)}]`,score:Ib-y.scoreBonus}])}else{const m={engine:"internal:role",selector:`${d}`,score:Xb};for(const y of f)s.push([m,{engine:"internal:has-text",selector:Rt(y.text,!1),score:Ro-y.scoreBonus}]);if(i&&u.length<=80){const y=new RegExp("^"+Go(u)+"$");s.push([m,{engine:"internal:has-text",selector:Rt(y,!1),score:Wy}])}}}return mh(s),s}function Fb(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${Js(n)}]`}function Jf(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Ba(n,e,i){const s=i.root??e.ownerDocument,l=[];function o(f){const d=l.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:mT},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:gh};return[d,y]}for(let f=e;f&&f!==s;f=yt(f)){let d="";if(f.id&&!i.noCSSId){const y=Fb(f.id),b=o(y);if(b)return u(b);d=y}const p=f.parentNode,m=[...f.classList].map(wT);for(let y=0;y<m.length;++y){const b="."+m.slice(0,y+1).join("."),w=o(b);if(w)return u(w);!d&&p&&p.querySelectorAll(b).length===1&&(d=b)}if(p){const y=[...p.children],b=f.nodeName,T=y.filter(E=>E.nodeName===b).indexOf(f)===0?Vn(f):`${Vn(f)}:nth-child(${1+y.indexOf(f)})`,x=o(T);if(x)return u(x);d||(d=T)}else d||(d=Vn(f));l.unshift(d)}return u(o())}function mh(n){for(const e of n)for(const i of e)i.score>lT&&i.score<pT&&(i.score+=Math.min($b,i.selector.length/10|0))}function Do(n){const e=[];let i="";for(const{engine:s,selector:l}of n)e.length&&(i!=="css"||s!=="css"||l.startsWith(":nth-match("))&&e.push(">>"),i=s,s==="css"?e.push(l):e.push(`${s}=${l}`);return e.join(" ")}function Gi(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function ST(n){let e,i=0;for(let s=0;s<n.length;++s){const l=n[s];let o;if(!(l==="-"||l==="_")){if(l>="a"&&l<="z"?o="lower":l>="A"&&l<="Z"?o="upper":l>="0"&&l<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++i,e=o}}return i>=n.length/4}function vo(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function tr(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),s=i?i[1].length:0;if(s){const l=vo(n.substring(s).trimStart(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),s=i?i[1].length:0;if(s){const l=vo(n.substring(0,n.length-s).trimEnd(),80);e.push({text:l,scoreBonus:l.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:vo(n,80),scoreBonus:0}),e.push({text:vo(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function Vn(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function wT(n){let e="";for(let i=0;i<n.length;i++)e+=xT(n,i);return e}function xT(n,e){const i=n.charCodeAt(e);return i===0?"�":i>=1&&i<=31||i>=48&&i<=57&&(e===0||e===1&&n.charCodeAt(0)===45)?"\\"+i.toString(16)+" ":e===0&&i===45&&n.length===1?"\\"+n.charAt(e):i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n.charAt(e):"\\"+n.charAt(e)}function Qb(n,e){const i=n.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let s=i.substring(i.lastIndexOf("/")+1);return s.endsWith(e)&&(s=s.substring(0,s.length-e.length)),s}function _T(n,e){return e?e.toUpperCase():""}const ET=/(?:^|[-_/])(\w)/g,Zb=n=>n&&n.replace(ET,_T);function TT(n){function e(m){const y=m.name||m._componentTag||m.__playwright_guessedName;if(y)return y;const b=m.__file;if(b)return Zb(Qb(b,".vue"))}function i(m,y){return m.type.__playwright_guessedName=y,y}function s(m){var b,w,T,x;const y=e(m.type||{});if(y)return y;if(m.root===m)return"Root";for(const E in(w=(b=m.parent)==null?void 0:b.type)==null?void 0:w.components)if(((T=m.parent)==null?void 0:T.type.components[E])===m.type)return i(m,E);for(const E in(x=m.appContext)==null?void 0:x.components)if(m.appContext.components[E]===m.type)return i(m,E);return"Anonymous Component"}function l(m){return m._isBeingDestroyed||m.isUnmounted}function o(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(b=>{b.component?y.push(b.component):y.push(...u(b))}),y.filter(b=>{var w;return!l(b)&&!((w=b.type.devtools)!=null&&w.hide)})}function f(m){return o(m)?d(m.subTree):[m.subTree.el]}function d(m){if(!m.children)return[];const y=[];for(let b=0,w=m.children.length;b<w;b++){const T=m.children[b];T.component?y.push(...f(T.component)):T.el&&y.push(T.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 AT(n){function e(o){const u=o.displayName||o.name||o._componentTag;if(u)return u;const f=o.__file;if(f)return Zb(Qb(f,".vue"))}function i(o){const u=e(o.$options||o.fnOptions||{});return u||(o.$root===o?"Root":"Anonymous Component")}function s(o){return o.$children?o.$children:Array.isArray(o.subTree.children)?o.subTree.children.filter(u=>!!u.component).map(u=>u.component):[]}function l(o){return{name:i(o),children:s(o).map(l),rootElements:[o.$el],props:o._props}}return l(n)}function Jb(n,e,i=[]){e(n)&&i.push(n);for(const s of n.children)Jb(s,e,i);return i}function Wb(n,e=[]){const s=(n.ownerDocument||n).createTreeWalker(n,NodeFilter.SHOW_ELEMENT),l=new Set;do{const o=s.currentNode;o.__vue__&&l.add(o.__vue__.$root),o.__vue_app__&&o._vnode&&o._vnode.component&&e.push({root:o._vnode.component,version:3});const u=o instanceof Element?o.shadowRoot:null;u&&Wb(u,e)}while(s.nextNode());for(const o of l)e.push({version:2,root:o});return e}const NT=()=>({queryAll(n,e){const i=n.ownerDocument||n,{name:s,attributes:l}=Zi(e,!1),f=Wb(i).map(p=>p.version===3?TT(p.root):AT(p.root)).map(p=>Jb(p,m=>{if(s&&m.name!==s||m.rootElements.some(y=>!Pa(n,y)))return!1;for(const y of l)if(!jb(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]}}),t0={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],s=n.ownerDocument||n;if(!s)return i;const l=s.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=l.iterateNext();o;o=l.iterateNext())o.nodeType===Node.ELEMENT_NODE&&i.push(o);return i}};function sd(n,e,i){return`internal:attr=[${n}=${xt(e,(i==null?void 0:i.exact)||!1)}]`}function CT(n,e){return`internal:testid=[${n}=${xt(e,!0)}]`}function kT(n,e){return"internal:label="+Rt(n,!!(e!=null&&e.exact))}function MT(n,e){return sd("alt",n,e)}function OT(n,e){return sd("title",n,e)}function LT(n,e){return sd("placeholder",n,e)}function jT(n,e){return"internal:text="+Rt(n,!!(e!=null&&e.exact))}function RT(n,e={}){const i=[];return e.checked!==void 0&&i.push(["checked",String(e.checked)]),e.disabled!==void 0&&i.push(["disabled",String(e.disabled)]),e.selected!==void 0&&i.push(["selected",String(e.selected)]),e.expanded!==void 0&&i.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&i.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&i.push(["level",String(e.level)]),e.name!==void 0&&i.push(["name",xt(e.name,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([s,l])=>`[${s}=${l}]`).join("")}`}const ka=Symbol("selector"),DT=class Ua{constructor(e,i,s){if(s!=null&&s.hasText&&(i+=` >> internal:has-text=${Rt(s.hasText,!1)}`),s!=null&&s.hasNotText&&(i+=` >> internal:has-not-text=${Rt(s.hasNotText,!1)}`),s!=null&&s.has&&(i+=" >> internal:has="+JSON.stringify(s.has[ka])),s!=null&&s.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(s.hasNot[ka])),(s==null?void 0:s.visible)!==void 0&&(i+=` >> visible=${s.visible?"true":"false"}`),this[ka]=i,i){const u=e.parseSelector(i);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const l=i,o=this;o.locator=(u,f)=>new Ua(e,l?l+" >> "+u:u,f),o.getByTestId=u=>o.locator(CT(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(MT(u,f)),o.getByLabel=(u,f)=>o.locator(kT(u,f)),o.getByPlaceholder=(u,f)=>o.locator(LT(u,f)),o.getByText=(u,f)=>o.locator(jT(u,f)),o.getByTitle=(u,f)=>o.locator(OT(u,f)),o.getByRole=(u,f={})=>o.locator(RT(u,f)),o.filter=u=>new Ua(e,i,u),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=u=>o.locator(`nth=${u}`),o.and=u=>new Ua(e,l+" >> internal:and="+JSON.stringify(u[ka])),o.or=u=>new Ua(e,l+" >> internal:or="+JSON.stringify(u[ka]))}};let BT=DT;class UT{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,i)=>this._querySelector(e,!!i),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,i)=>this._generateLocator(e,i),ariaSnapshot:(e,i)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,i||{mode:"expect"}),resume:()=>this._resume(),...new BT(this._injectedScript,"")},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,i){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,i)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const i=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(i,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,i){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const s=this._injectedScript.generateSelectorSimple(e);return Ji(i||"javascript",s)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function HT(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function zT(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function qT(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function $T(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function IT(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}const ev={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function VT(n){if("toBase64"in n)return n.toBase64();const e=Array.from(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(i=>String.fromCharCode(i)).join("");return btoa(e)}function GT(n,e){const i=atob(n),s=new Uint8Array(i.length);for(let l=0;l<i.length;l++)s[l]=i.charCodeAt(l);return new e(s.buffer)}function yh(n,e=[],i=new Map){if(!Object.is(n,void 0)){if(typeof n=="object"&&n){if("ref"in n)return i.get(n.ref);if("v"in n)return n.v==="undefined"?void 0:n.v==="null"?null:n.v==="NaN"?NaN:n.v==="Infinity"?1/0:n.v==="-Infinity"?-1/0:n.v==="-0"?-0:void 0;if("d"in n)return new Date(n.d);if("u"in n)return new URL(n.u);if("bi"in n)return BigInt(n.bi);if("e"in n){const s=new Error(n.e.m);return s.name=n.e.n,s.stack=n.e.s,s}if("r"in n)return new RegExp(n.r.p,n.r.f);if("a"in n){const s=[];i.set(n.id,s);for(const l of n.a)s.push(yh(l,e,i));return s}if("o"in n){const s={};i.set(n.id,s);for(const{k:l,v:o}of n.o)l!=="__proto__"&&(s[l]=yh(o,e,i));return s}if("h"in n)return e[n.h];if("ta"in n)return GT(n.ta.b,ev[n.ta.k])}return n}}function KT(n,e){return bh(n,e,{visited:new Map,lastId:0})}function bh(n,e,i){if(n&&typeof n=="object"){if(typeof globalThis.Window=="function"&&n instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&n instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&n instanceof globalThis.Node)return"ref: <Node>"}return tv(n,e,i)}function tv(n,e,i){var o;const s=e(n);if("fallThrough"in s)n=s.fallThrough;else return s;if(typeof n=="symbol")return{v:"undefined"};if(Object.is(n,void 0))return{v:"undefined"};if(Object.is(n,null))return{v:"null"};if(Object.is(n,NaN))return{v:"NaN"};if(Object.is(n,1/0))return{v:"Infinity"};if(Object.is(n,-1/0))return{v:"-Infinity"};if(Object.is(n,-0))return{v:"-0"};if(typeof n=="boolean"||typeof n=="number"||typeof n=="string")return n;if(typeof n=="bigint")return{bi:n.toString()};if($T(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message}
|
115
|
+
${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(zT(n))return{d:n.toJSON()};if(qT(n))return{u:n.toJSON()};if(HT(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(ev))if(IT(n,f))return{ta:{b:VT(n),k:u}};const l=i.visited.get(n);if(l)return{ref:l};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let d=0;d<n.length;++d)u.push(bh(n[d],e,i));return{a:u,id:f}}if(typeof n=="object"){const u=[],f=++i.lastId;i.visited.set(n,f);for(const p of Object.keys(n)){let m;try{m=n[p]}catch{continue}p==="toJSON"&&typeof m=="function"?u.push({k:p,v:{o:[],id:0}}):u.push({k:p,v:bh(m,e,i)})}let d;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(d={value:n.toJSON()})}catch{}return d?tv(d.value,e,i):{o:u,id:f}}}class YT{constructor(e,i){var s,l,o,u,f,d,p,m;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(s=e.setTimeout)==null?void 0:s.bind(e),clearTimeout:(l=e.clearTimeout)==null?void 0:l.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(u=e.clearInterval)==null?void 0:u.bind(e),requestAnimationFrame:(f=e.requestAnimationFrame)==null?void 0:f.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(m=e.cancelIdleCallback)==null?void 0:m.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,s,l,...o){const u=o.slice(0,l),f=o.slice(l),d=[];for(let m=0;m<u.length;m++)d[m]=yh(u[m],f);let p=this.global.eval(s);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),i?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,i){if(i!==void 0)return KT(i,s=>({fallThrough:s}))}_promiseAwareJsonValueNoThrow(e){const i=s=>{try{return this.jsonValue(!0,s)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const s=await e;return i(s)})():i(e)}}class nv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Ji,cacheNormalizedWhitespaces:yx,elementText:Bt,getAriaRole:ft,getElementAccessibleDescription:Gy,getElementAccessibleName:Fa,isElementVisible:bi,isInsideScope:Pa,normalizeWhiteSpace:Et,parseAriaSnapshot:Bh,generateAriaTree:Ia,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new YT(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new PE,this.consoleApi=new UT(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=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"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemove"]),this._tapHitTargetInterceptorEvents=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),this._mouseHitTargetInterceptorEvents=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set("xpath",t0),this._engines.set("xpath:light",t0),this._engines.set("_react",KE()),this._engines.set("_vue",NT()),this._engines.set("role",Zy(!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",Zy(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:s,source:l}of i.customEngines)this._engines.set(s,this.eval(l));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._isUtilityWorld=!!i.isUtilityWorld,iE({browserNameForWorkarounds:i.browserName}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const i=el(e);return gx(i,s=>{if(!this._engines.has(s.name))throw this.createStacklessError(`Unknown engine "${s.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return e0(this,e,i)}generateSelectorSimple(e,i){return e0(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,s){const l=this.querySelectorAll(e,i);if(s&&l.length>1)throw this.strictModeViolationError(e,l);return l[0]}_queryNth(e,i){const s=[...e];let l=+i.body;return l===-1&&(l=s.length-1),new Set(s.slice(l,l+1))}_queryLayoutSelector(e,i,s){const l=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,s);for(const d of e){const p=Lb(l,d,f,o.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,i){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");return this._lastAriaSnapshot=Ia(e,i),Qo(this._lastAriaSnapshot,i)}ariaSnapshotForRecorder(){const e=Ia(this.document.body,{mode:"ai"});return{ariaSnapshot:Qo(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return OE(e.documentElement,i)}querySelectorAll(e,i){if(e.capture!==void 0){if(e.parts.some(l=>l.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 l={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:l},source:Gn(l)};s.parts.push(o)}return this.querySelectorAll(s,i)}if(!i.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(i.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[i];this._evaluator.begin();try{let s=new Set([i]);for(const l of e.parts)if(l.name==="nth")s=this._queryNth(s,l);else if(l.name==="internal:and"){const o=this.querySelectorAll(l.body.parsed,i);s=new Set(o.filter(u=>s.has(u)))}else if(l.name==="internal:or"){const o=this.querySelectorAll(l.body.parsed,i);s=new Set(qb(new Set([...s,...o])))}else if(qE.includes(l.name))s=this._queryLayoutSelector(s,l,i);else{const o=new Set;for(const u of s){const f=this._queryEngineAll(l,u);for(const d of f)o.add(d)}s=o}return[...s]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const s=this._engines.get(e.name).queryAll(i,e.body);for(const l of s)if(!("nodeName"in l))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(l)}`);return s}_createAttributeEngine(e,i){const s=l=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(l)}]`,functions:[]},combinator:""}]}];return{queryAll:(l,o)=>this._evaluator.query({scope:l,pierceShadow:i},s(o))}}_createCSSEngine(){return{queryAll:(e,i)=>this._evaluator.query({scope:e,pierceShadow:!0},i)}}_createTextEngine(e,i){return{queryAll:(l,o)=>{const{matcher:u,kind:f}=wo(o,i),d=[];let p=null;const m=b=>{if(f==="lax"&&p&&p.contains(b))return!1;const w=lc(this._evaluator._cacheText,b,u);w==="none"&&(p=b),(w==="self"||w==="selfAndChildren"&&f==="strict"&&!i)&&d.push(b)};l.nodeType===Node.ELEMENT_NODE&&m(l);const y=this._evaluator._queryCSS({scope:l,pierceShadow:e},"*");for(const b of y)m(b);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,l=Bt(this._evaluator._cacheText,s),{matcher:o}=wo(i,!0);return o(l)?[s]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const s=e,l=Bt(this._evaluator._cacheText,s),{matcher:o}=wo(i,!0);return o(l)?[]:[s]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:s}=wo(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>Db(this._evaluator._cacheText,o).some(u=>s(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,s)=>{const l=Zi(s,!0);if(l.name||l.attributes.length!==1)throw new Error("Malformed attribute selector: "+s);const{name:o,value:u,caseSensitive:f}=l.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:i,pierceShadow:!0},`[${o}]`).filter(y=>p(y.getAttribute(o)))}}}_createDescribeEngine(){return{queryAll:i=>i.nodeType!==1?[]:[i]}}_createControlEngine(){return{queryAll(e,i){if(i==="enter-frame")return[];if(i==="return-empty")return[];if(i==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${i}`)}}}_createHasEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,s)=>i.nodeType!==1?[]:!!this.querySelector(s.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,s)=>{if(i.nodeType!==1)return[];const l=s==="true";return bi(i)===l?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,s)=>this.querySelectorAll(s.parsed,i)}}extend(e,i){const s=this.window.eval(`
|
116
|
+
(() => {
|
117
|
+
const module = {};
|
118
|
+
${e}
|
119
|
+
return module.exports.default();
|
120
|
+
})()`);return new s(this,i)}async viewportRatio(e){return await new Promise(i=>{const s=new IntersectionObserver(l=>{i(l[0].intersectionRatio),s.disconnect()});s.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const i=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(i.borderLeftWidth||"",10),top:parseInt(i.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const i=e.ownerDocument.defaultView;for(let l=e;l;l=yt(l))if(i.getComputedStyle(l).transform!=="none")return"transformed";const s=i.getComputedStyle(e);return{left:parseInt(s.borderLeftWidth||"",10)+parseInt(s.paddingLeft||"",10),top:parseInt(s.borderTopWidth||"",10)+parseInt(s.paddingTop||"",10)}}retarget(e,i){let s=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!s)return null;if(i==="none")return s;if(!s.matches("input, textarea, select")&&!s.isContentEditable&&(i==="button-link"?s=s.closest("button, [role=button], a, [role=link]")||s:s=s.closest("button, [role=button], [role=checkbox], [role=radio]")||s),i==="follow-label"&&!s.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!s.isContentEditable){const l=s.closest("label");l&&l.control&&(s=l.control)}return s}async checkElementStates(e,i){if(i.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 i)if(s!=="stable"){const l=this.elementState(e,s);if(l.received==="error:notconnected")return"error:notconnected";if(!l.matches)return{missingState:s}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let s,l=0,o=0;const u=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const b=this.utils.builtins.performance.now();if(this._stableRafCount>1&&b-o<15)return i;o=b;const w=y.getBoundingClientRect(),T={x:w.top,y:w.left,width:w.width,height:w.height};if(s){if(!(T.x===s.x&&T.y===s.y&&T.width===s.width&&T.height===s.height))return!1;if(++l>=this._stableRafCount)return!0}return s=T,i};let f,d;const p=new Promise((y,b)=>{f=y,d=b}),m=()=>{try{const y=u();y!==i?f(y):this.utils.builtins.requestAnimationFrame(m)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(m),p}_createAriaRefEngine(){return{queryAll:(i,s)=>{var o,u;const l=(u=(o=this._lastAriaSnapshot)==null?void 0:o.elements)==null?void 0:u.get(s);return l&&l.isConnected?[l]:[]}}}elementState(e,i){const s=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!s||!s.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const l=bi(s);return{matches:i==="visible"?l:!l,received:l?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const l=Fo(s);return{matches:i==="disabled"?l:!l,received:l?"disabled":"enabled"}}if(i==="editable"){const l=Fo(s),o=bE(s);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!l&&!o,received:l?"disabled":o?"readOnly":"editable"}}if(i==="checked"||i==="unchecked"){const l=i==="checked",o=mE(s);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=s.nodeName==="INPUT"&&s.type==="radio";return{matches:l===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const l=gE(s);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:l==="mixed",received:l===!0?"checked":l===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${i}"`)}selectOptions(e,i){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 l=s,o=[...l.options],u=[];let f=i.slice();for(let d=0;d<o.length;d++){const p=o[d],m=y=>{if(y instanceof Node)return p===y;let b=!0;return y.valueOrLabel!==void 0&&(b=b&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(b=b&&y.value===p.value),y.label!==void 0&&(b=b&&y.label===p.label),y.index!==void 0&&(b=b&&y.index===d),b};if(f.some(m)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(u.push(p),l.multiple)f=f.filter(y=>!m(y));else{f=[];break}}}return f.length?"error:optionsnotfound":(l.value=void 0,u.forEach(d=>d.selected=!0),l.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),l.dispatchEvent(new Event("change",{bubbles:!0})),u.map(d=>d.value))}fill(e,i){const s=this.retarget(e,"follow-label");if(!s)return"error:notconnected";if(s.nodeName.toLowerCase()==="input"){const l=s,o=l.type.toLowerCase(),u=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(o)&&!u.has(o))throw this.createStacklessError(`Input of type "${o}" cannot be filled`);if(o==="number"&&(i=i.trim(),isNaN(Number(i))))throw this.createStacklessError("Cannot type text into input[type=number]");if(u.has(o)){if(i=i.trim(),l.focus(),l.value=i,l.value!==i)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 i=this.retarget(e,"follow-label");if(!i)return"error:notconnected";if(i.nodeName.toLowerCase()==="input"){const o=i;return o.select(),o.focus(),"done"}if(i.nodeName.toLowerCase()==="textarea"){const o=i;return o.selectionStart=0,o.selectionEnd=o.value.length,o.focus(),"done"}const s=i.ownerDocument.createRange();s.selectNodeContents(i);const l=i.ownerDocument.defaultView.getSelection();return l&&(l.removeAllRanges(),l.addRange(s)),i.focus(),"done"}_activelyFocused(e){const i=e.getRootNode().activeElement,s=i===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:i,isFocused:s}}focusNode(e,i){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:s,isFocused:l}=this._activelyFocused(e);if(e.isContentEditable&&!l&&s&&s.blur&&s.blur(),e.focus(),e.focus(),i&&!l&&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,i){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 l=s;if((l.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=i.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);l.files=f.files,l.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),l.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,i){const s=[];let l=i;for(;l;){const m=ob(l);if(!m||(s.push(m),m.nodeType===9))break;l=m.host}let o;for(let m=s.length-1;m>=0;m--){const y=s[m],b=y.elementsFromPoint(e.x,e.y),w=y.elementFromPoint(e.x,e.y);if(w&&b[0]&&yt(w)===b[0]){const x=this.window.getComputedStyle(w);(x==null?void 0:x.display)==="contents"&&b.unshift(w)}b[0]&&b[0].shadowRoot===y&&b[1]===w&&b.shift();const T=b[0];if(!T||(o=T,m&&T!==s[m-1].host))break}const u=[];for(;o&&o!==i;)u.push(o),o=yt(o);if(o===i)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let d,p=i;for(;p;){const m=u.indexOf(p);if(m!==-1){m>1&&(d=this.previewNode(u[m-1]));break}p=yt(p)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,s,l){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(s){const m=this.expectHitTarget(s,o);if(m!=="done")return m.hitTargetDescription}if(i==="drag")return{stop:()=>"done"};const u={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[i];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},o)),(l||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,i,s){var u,f,d;let l;const o={bubbles:!0,cancelable:!0,composed:!0,...s};switch(this._eventTypes.get(i)){case"mouse":l=new MouseEvent(i,o);break;case"keyboard":l=new KeyboardEvent(i,o);break;case"touch":{if(this._browserName==="webkit"){const p=y=>{var T,x;if(y instanceof Touch)return y;let b=y.pageX;b===void 0&&y.clientX!==void 0&&(b=y.clientX+(((T=this.document.scrollingElement)==null?void 0:T.scrollLeft)||0));let w=y.pageY;return w===void 0&&y.clientY!==void 0&&(w=y.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,b,w,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));o.target??(o.target=e),o.touches=m(o.touches),o.targetTouches=m(o.targetTouches),o.changedTouches=m(o.changedTouches),l=new TouchEvent(i,o)}else o.target??(o.target=e),o.touches=(u=o.touches)==null?void 0:u.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.targetTouches=(f=o.targetTouches)==null?void 0:f.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),o.changedTouches=(d=o.changedTouches)==null?void 0:d.map(p=>p instanceof Touch?p:new Touch({...p,target:p.target??e})),l=new TouchEvent(i,o);break}case"pointer":l=new PointerEvent(i,o);break;case"focus":l=new FocusEvent(i,o);break;case"drag":l=new DragEvent(i,o);break;case"wheel":l=new WheelEvent(i,o);break;case"deviceorientation":try{l=new DeviceOrientationEvent(i,o)}catch{const{bubbles:p,cancelable:m,alpha:y,beta:b,gamma:w,absolute:T}=o;l=this.document.createEvent("DeviceOrientationEvent"),l.initDeviceOrientationEvent(i,p,m,y,b,w,T)}break;case"devicemotion":try{l=new DeviceMotionEvent(i,o)}catch{const{bubbles:p,cancelable:m,acceleration:y,accelerationIncludingGravity:b,rotationRate:w,interval:T}=o;l=this.document.createEvent("DeviceMotionEvent"),l.initDeviceMotionEvent(i,p,m,y,b,w,T)}break;default:l=new Event(i,o);break}e.dispatchEvent(l)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return So(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return So(`<${e.nodeName.toLowerCase()} />`);const i=e,s=[];for(let d=0;d<i.attributes.length;d++){const{name:p,value:m}=i.attributes[d];p!=="style"&&(!m&&this._booleanAttributes.has(p)?s.push(` ${p}`):s.push(` ${p}="${m}"`))}s.sort((d,p)=>d.length-p.length);const l=Ny(s.join(""),500);if(this._autoClosingTags.has(i.nodeName))return So(`<${i.nodeName.toLowerCase()}${l}/>`);const o=i.childNodes;let u=!1;if(o.length<=5){u=!0;for(let d=0;d<o.length;d++)u=u&&o[d].nodeType===Node.TEXT_NODE}const f=u?i.textContent||"":o.length?"…":"";return So(`<${i.nodeName.toLowerCase()}${l}>${Ny(f,50)}</${i.nodeName.toLowerCase()}>`)}strictModeViolationError(e,i){this._evaluator.begin(),rc(),qh();try{const s=this._isUtilityWorld&&this._browserName==="firefox"?2:10,l=i.slice(0,s).map(u=>({preview:this.previewNode(u),selector:this.generateSelectorSimple(u)})),o=l.map((u,f)=>`
|
121
|
+
${f+1}) ${u.preview} aka ${Ji(this._sdkLanguage,u.selector)}`);return l.length<i.length&&o.push(`
|
122
|
+
...`),this.createStacklessError(`strict mode violation: ${Ji(this._sdkLanguage,Gn(e))} resolved to ${i.length} elements:${o.join("")}
|
123
|
+
`)}finally{$h(),ac(),this._evaluator.end()}}createStacklessError(e){if(this._browserName==="firefox"){const s=new Error("Error: "+e);return s.stack="",s}const i=new Error(e);return delete i.stack,i}createHighlight(){return new Ff(this)}maskSelectors(e,i){this._highlight&&this.hideHighlight(),this._highlight=new Ff(this),this._highlight.install();const s=[];for(const l of e)s.push(this.querySelectorAll(l,this.document.documentElement));this._highlight.maskElements(s.flat(),i)}highlight(e){this._highlight||(this._highlight=new Ff(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,i){var u,f;((u=this._markedElements)==null?void 0:u.callId)!==i&&(this._markedElements=void 0);const s=((f=this._markedElements)==null?void 0:f.elements)||new Set,l=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of s)e.has(d)||d.dispatchEvent(l);const o=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:i,composed:!0});for(const d of e)s.has(d)||d.dispatchEvent(o);this._markedElements={callId:i,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const s=()=>i=!0;this.window.addEventListener(e,s),new MutationObserver(l=>{if(l.some(u=>Array.from(u.addedNodes).includes(this.document.documentElement))&&(i=!1,this.window.dispatchEvent(new CustomEvent(e)),!i)){this.window.addEventListener(e,s);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=s=>{var l;return(l=this._hitTargetInterceptor)==null?void 0:l.call(this,s)},i=()=>{for(const s of this._allHitTargetInterceptorEvents)this.window.addEventListener(s,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,s){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(s,i);if(!e){if(!i.isNot&&i.expression==="to.be.hidden")return{matches:!0};if(i.isNot&&i.expression==="to.be.visible")return{matches:!1};if(!i.isNot&&i.expression==="to.be.detached")return{matches:!0};if(i.isNot&&i.expression==="to.be.attached")return{matches:!1};if(i.isNot&&i.expression==="to.be.in.viewport")return{matches:!1};if(i.expression==="to.have.title"&&((o=i==null?void 0:i.expectedText)!=null&&o[0])){const f=new Fs(i.expectedText[0]),d=this.document.title;return{received:d,matches:f.matches(d)}}if(i.expression==="to.have.url"&&((u=i==null?void 0:i.expectedText)!=null&&u[0])){const f=new Fs(i.expectedText[0]),d=this.document.location.href;return{received:d,matches:f.matches(d)}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var l;const s=i.expression;{let o;if(s==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(s==="to.be.checked"){const{checked:u,indeterminate:f}=i.expectedValue;if(f){if(u!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,u===!1?"unchecked":"checked")}else if(s==="to.be.disabled")o=this.elementState(e,"disabled");else if(s==="to.be.editable")o=this.elementState(e,"editable");else if(s==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(s==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e.value;o={matches:!u,received:u?"notEmpty":"empty"}}else{const u=(l=e.textContent)==null?void 0:l.trim();o={matches:!u,received:u?"notEmpty":"empty"}}else if(s==="to.be.enabled")o=this.elementState(e,"enabled");else if(s==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else s==="to.be.hidden"?o=this.elementState(e,"hidden"):s==="to.be.visible"?o=this.elementState(e,"visible"):s==="to.be.attached"?o={matches:!0,received:"attached"}:s==="to.be.detached"&&(o={matches:!1,received:"attached"});if(o){if(o.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return o}}if(s==="to.have.property"){let o=e;const u=i.expressionArg.split(".");for(let p=0;p<u.length-1;p++){if(typeof o!="object"||!(u[p]in o))return{received:void 0,matches:!1};o=o[u[p]]}const f=o[u[u.length-1]],d=vh(f,i.expectedValue);return{received:f,matches:d}}if(s==="to.be.in.viewport"){const o=await this.viewportRatio(e);return{received:`viewport ratio ${o}`,matches:o>0&&o>(i.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 o=[...e.selectedOptions].map(u=>u.value);return o.length!==i.expectedText.length?{received:o,matches:!1}:{received:o,matches:o.map((u,f)=>new Fs(i.expectedText[f]).matches(u)).every(Boolean)}}if(s==="to.match.aria"){const o=ME(e,i.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(s==="to.have.attribute.value"){const u=e.getAttribute(i.expressionArg);if(u===null)return{received:null,matches:!1};o=u}else if(["to.have.class","to.contain.class"].includes(s)){if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);return{received:e.classList.toString(),matches:new Fs(i.expectedText[0]).matchesClassList(this,e.classList,s==="to.contain.class")}}else if(s==="to.have.css")o=this.window.getComputedStyle(e).getPropertyValue(i.expressionArg);else if(s==="to.have.id")o=e.id;else if(s==="to.have.text")o=i.useInnerText?e.innerText:Bt(new Map,e).full;else if(s==="to.have.accessible.name")o=Fa(e,!1);else if(s==="to.have.accessible.description")o=Gy(e,!1);else if(s==="to.have.accessible.error.message")o=dE(e);else if(s==="to.have.role")o=ft(e)||"";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");o=e.value}if(o!==void 0&&i.expectedText){const u=new Fs(i.expectedText[0]);return{received:o,matches:u.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+s)}expectArray(e,i){const s=i.expression;if(s==="to.have.count"){const d=e.length,p=d===i.expectedNumber;return{received:d,matches:p}}if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+s);if(["to.have.class.array","to.contain.class.array"].includes(s)){const d=e.map(y=>y.classList),p=d.map(String);if(d.length!==i.expectedText.length)return{received:p,matches:!1};const m=this._matchSequentially(i.expectedText,d,(y,b)=>y.matchesClassList(this,b,s==="to.contain.class.array"));return{received:p,matches:m}}if(!["to.contain.text.array","to.have.text.array"].includes(s))throw this.createStacklessError("Unknown expect matcher: "+s);const l=e.map(d=>i.useInnerText?d.innerText:Bt(new Map,d).full),o=s!=="to.contain.text.array";if(!(l.length===i.expectedText.length||!o))return{received:l,matches:!1};const f=this._matchSequentially(i.expectedText,l,(d,p)=>d.matches(p));return{received:l,matches:f}}_matchSequentially(e,i,s){const l=e.map(f=>new Fs(f));let o=0,u=0;for(;o<l.length&&u<i.length;)s(l[o],i[u])&&++o,++u;return o===l.length}}function So(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function XT(n){if(n=n.substring(1,n.length-1),!n.includes("\\"))return n;const e=[];let i=0;for(;i<n.length;)n[i]==="\\"&&i+1<n.length&&i++,e.push(n[i++]);return e.join("")}function wo(n,e){if(n[0]==="/"&&n.lastIndexOf("/")>0){const l=n.lastIndexOf("/"),o=new RegExp(n.substring(1,l),n.substring(l+1));return{matcher:u=>o.test(u.full),kind:"regex"}}const i=e?JSON.parse.bind(JSON):XT;let s=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=i(n),s=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=i(n.substring(0,n.length-1)),s=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=i(n.substring(0,n.length-1)),s=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=i(n),s=!0),n=Et(n),s?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>Et(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:l=>l.normalized.toLowerCase().includes(n)})}class Fs{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 i=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&i.delete("i"),e.ignoreCase===!0&&i.add("i"),this._regex=new RegExp(e.regexSource,[...i].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}matchesClassList(e,i,s){if(s){if(this._regex)throw e.createStacklessError("Partial matching does not support regular expressions. Please provide a string value.");return this._string.split(/\s+/g).filter(Boolean).every(l=>i.contains(l))}return this.matches(i.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=Et(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function vh(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(!vh(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 i=Object.keys(n);if(i.length!==Object.keys(e).length)return!1;for(let s=0;s<i.length;++s)if(!e.hasOwnProperty(i[s]))return!1;for(const s of i)if(!vh(n[s],e[s]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const PT={tagName:"svg",children:[{tagName:"defs",children:[{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gripper"},children:[{tagName:"path",attrs:{d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-circle-large-filled"},children:[{tagName:"path",attrs:{d:"M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-stop-circle"},children:[{tagName:"path",attrs:{d:"M6 6h4v4H6z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-inspect"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-whole-word"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 11H1V13H15V11H16V14H15H1H0V11Z"}},{tagName:"path",attrs:{d:"M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z"}},{tagName:"path",attrs:{d:"M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eye"},children:[{tagName:"path",attrs:{d:"M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-symbol-constant"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 6h8v1H4V6zm8 3H4v1h8V9z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-check"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-close"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-pass"},children:[{tagName:"path",attrs:{d:"M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gist"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.57 1.14l3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13l.5-.5h7.72l.35.14zM10 5h3l-3-3v3zM3 2v12h10V6H9.5L9 5.5V2H3zm2.062 7.533l1.817-1.828L6.17 7 4 9.179v.707l2.171 2.174.707-.707-1.816-1.82zM8.8 7.714l.7-.709 2.189 2.175v.709L9.5 12.062l-.705-.709 1.831-1.82L8.8 7.714z"}}]}]}]},an={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class n0{}class Wf{constructor(e,i){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=i}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var i;He(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){He(e)}onPointerUp(e){He(e)}onMouseDown(e){He(e)}onMouseUp(e){He(e)}onMouseMove(e){var l;He(e);let i=this._recorder.deepEventTarget(e);if(i.isConnected||(i=null),this._hoveredElement===i)return;this._hoveredElement=i;let s=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});s={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),color:this._assertVisibility?an.assert:an.single}}((l=this._hoveredModel)==null?void 0:l.selector)!==(s==null?void 0:s.selector)&&(this._hoveredModel=s,this._recorder.updateHighlight(s,!0))}onMouseEnter(e){He(e)}onMouseLeave(e){He(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){He(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){He(e)}onScroll(e){this._reset(!1)}_commit(e,i){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,i)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class FT{constructor(e){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._observer=null,this._recorder=e,this._performingActions=new Set,this._dialog=new iv(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(i=>{if(this._hoveredElement)for(const s of i)for(const l of s.removedNodes)(l===this._hoveredElement||l.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){var e;(e=this._observer)==null||e.disconnect(),this._observer=null,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._dialog.close()}onClick(e){if(this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&He(e);return}if(Ka(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const i=Ga(this._recorder.deepEventTarget(e));if(i&&e.detail===1){this._performAction({name:i.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:Va(e),signals:[],button:Sh(e),modifiers:ar(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||Ka(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Va(e),signals:[],button:Sh(e),modifiers:ar(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){He(e);return}this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._showActionListDialog(this._hoveredModel,e)}onPointerDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onPointerUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||(this._consumeWhenAboutToPerform(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseMove(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);this._hoveredElement!==i&&(this._hoveredElement=i,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._dialog.isShowing()||this._onFocus(!0)}onInput(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(i.nodeName==="INPUT"&&i.type.toLowerCase()==="file"){this._recordAction({name:"setInputFiles",selector:this._activeModel.selector,signals:[],files:[...i.files||[]].map(s=>s.name)});return}if(Ka(i)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:i.isContentEditable?i.innerText:i.value})}if(i.nodeName==="SELECT"){const s=i;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...s.selectedOptions].map(l=>l.value),signals:[]})}}onKeyDown(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const i=Ga(this._recorder.deepEventTarget(e));if(i&&e.detail===0){this._performAction({name:i.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:ar(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){He(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){He(i);const s=Va(i),l=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:0})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"right",modifiers:0,clickCount:0})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:s,signals:[],button:"left",modifiers:0,clickCount:2})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:s,signals:[]})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const p of l){const m=this._recorder.document.createElement("x-pw-action-item");m.setAttribute("role","listitem"),m.textContent=p.title,m.setAttribute("aria-label",p.title),m.addEventListener("click",()=>{this._dialog.close(),p.cb()}),o.appendChild(m)}const u=this._dialog.show({label:"Choose action",body:o,autosize:!0}),f=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),d=this._recorder.highlight.tooltipPosition(f,u);this._dialog.moveTo(d.anchorTop,d.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const i=WT(this._recorder.document);if(e&&i===this._recorder.document.body)return;const s=i?this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=s&&s.selector?{...s,color:an.action}:null,e&&(this._hoveredElement=i,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_actionInProgress(e){const i=e instanceof KeyboardEvent,s=e instanceof MouseEvent||e instanceof PointerEvent;for(const l of this._performingActions)if(i&&l.name==="press"&&e.key===l.key||s&&(l.name==="click"||l.name==="hover"||l.name==="check"||l.name==="uncheck"))return!0;return He(e),!1}_consumedDueToNoModel(e,i){return i?!1:(He(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(He(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||He(e)}_recordAction(e){this._recorder.recordAction(e)}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e);const i=this._recorder.performAction(e).then(()=>{this._performingActions.delete(e),this._onFocus(!1)});this._recorder.injectedScript.isUnderTest&&i.then(()=>{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(typeof e.key!="string"||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 i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!!Ga(this._recorder.deepEventTarget(e)):!0}_updateModelForHoveredElement(){if(this._installObserverIfNeeded(),this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!0);return}const{selector:e,elements:i}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:i,color:an.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class QT{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const i=this._recorder.deepEventTarget(e);if(Ka(i)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const s=Ga(i),{ariaSnapshot:l,selector:o,ref:u}=this._ariaSnapshot(i);if(s&&e.detail===1){this._recorder.recordAction({name:s.checked?"check":"uncheck",selector:o,ref:u,signals:[],ariaSnapshot:l});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:l,position:Va(e),signals:[],button:Sh(e),modifiers:ar(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:l,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:l,ref:o,ariaSnapshot:s,position:Va(e),signals:[],button:"right",modifiers:ar(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:l,ref:o}=this._ariaSnapshot(i);if(Ka(i)){this._recorder.recordAction({name:"fill",selector:l,ref:o,ariaSnapshot:s,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:o,selector:l,ariaSnapshot:s,signals:[],text:i.isContentEditable?i.innerText:i.value});return}if(i.nodeName==="SELECT"){const u=i;this._recorder.recordAction({name:"select",selector:l,ref:o,ariaSnapshot:s,options:[...u.selectedOptions].map(f=>f.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const i=this._recorder.deepEventTarget(e),{ariaSnapshot:s,selector:l,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=Ga(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:l,ref:o,ariaSnapshot:s,signals:[]});return}}this._recorder.recordAction({name:"press",selector:l,ref:o,ariaSnapshot:s,signals:[],key:e.key,modifiers:ar(e)})}_shouldIgnoreMouseEvent(e){const i=this._recorder.deepEventTarget(e),s=i.nodeName;return!!(s==="SELECT"||s==="OPTION"||s==="INPUT"&&["date","range"].includes(i.type))}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||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 i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:i,refs:s}=this._recorder.injectedScript.ariaSnapshotForRecorder(),l=e?s.get(e):void 0,o=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;return{ariaSnapshot:i,selector:o==null?void 0:o.selector,ref:l}}}class eh{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new iv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){He(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const i=this._recorder.deepEventTarget(e);this._elementHasValue(i)&&e.preventDefault()}onPointerUp(e){var s;const i=(s=this._hoverHighlight)==null?void 0:s.elements[0];this._kind==="value"&&i&&(i.nodeName==="INPUT"||i.nodeName==="SELECT")&&i.disabled&&this._commitAssertValue()}onMouseMove(e){var s;if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(((s=this._hoverHighlight)==null?void 0:s.elements[0])!==i){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,i).full?{elements:[i],selector:"",color:an.assert}:null;else if(this._elementHasValue(i)){const l=this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:l.selector,elements:l.elements,color:an.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),He(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 i;this._textCache.clear();const e=(i=this._hoverHighlight)==null?void 0:i.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 if(this._kind==="snapshot"){const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:an.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"})}}else{const s=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:s.selector,elements:s.elements,color:an.assert},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.ariaSnapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"))}_showDialog(){var e,i,s,l;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((i=this._action)==null?void 0:i.name)==="assertText"?this._showTextDialog(this._action):((s=this._action)==null?void 0:s.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(l=this._recorder.overlay)==null||l.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const i=this._recorder.document.createElement("textarea");i.setAttribute("spellcheck","false"),i.value=this._renderValue(e),i.classList.add("text-editor");const s=()=>{var y;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(i.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);i.classList.toggle("does-not-match",!m)};i.addEventListener("input",s);const o=this._dialog.show({label:"Assert that element contains text",body:i,onCommit:()=>this._commit()}),u=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),o);this._dialog.moveTo(u.anchorTop,u.anchorLeft),i.focus()}_commitAssertValue(){var i;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(i=this._recorder.overlay)==null||i.flashToolSucceeded("assertingValue"))}}class ZT{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const i=this._recorder.document;this._overlayElement=i.createElement("x-pw-overlay");const s=i.createElement("x-pw-tools-list");this._overlayElement.appendChild(s),this._dragHandle=i.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(i.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(){sv(this._listeners),this._listeners=[De(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),De(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")}),De(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])}),De(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),De(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),De(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),De(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){const i=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting";this._recordToggle.classList.toggle("toggled",i),this._recordToggle.title=i?"Stop Recording":"Start Recording",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 i;e==="assertingVisibility"?i=this._assertVisibilityToggle:e==="assertingSnapshot"?i=this._assertSnapshotToggle:i=this._assertValuesToggle,i.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>i.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 i=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-i,Math.min(i,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),He(e),!0}return!1}onMouseUp(e){return this._dragState?(He(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,He(e),!0):!1}onDblClick(e){return!1}}class JT{constructor(e,i){var s,l;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 n0,standby:new n0,inspecting:new Wf(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new QT(this):new FT(this),"recording-inspecting":new Wf(this,!1),assertingText:new eh(this,"text"),assertingVisibility:new Wf(this,!0),assertingValue:new eh(this,"value"),assertingSnapshot:new eh(this,"snapshot")},this._currentTool=this._tools.none,(l=(s=this._currentTool).install)==null||l.call(s),e.window.top===e.window&&(this.overlay=new ZT(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
|
124
|
+
body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
|
125
|
+
body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
|
126
|
+
`),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var s,l,o;sv(this._listeners),this._listeners=[De(this.document,"click",u=>this._onClick(u),!0),De(this.document,"auxclick",u=>this._onClick(u),!0),De(this.document,"dblclick",u=>this._onDblClick(u),!0),De(this.document,"contextmenu",u=>this._onContextMenu(u),!0),De(this.document,"dragstart",u=>this._onDragStart(u),!0),De(this.document,"input",u=>this._onInput(u),!0),De(this.document,"keydown",u=>this._onKeyDown(u),!0),De(this.document,"keyup",u=>this._onKeyUp(u),!0),De(this.document,"pointerdown",u=>this._onPointerDown(u),!0),De(this.document,"pointerup",u=>this._onPointerUp(u),!0),De(this.document,"mousedown",u=>this._onMouseDown(u),!0),De(this.document,"mouseup",u=>this._onMouseUp(u),!0),De(this.document,"mousemove",u=>this._onMouseMove(u),!0),De(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),De(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),De(this.document,"focus",u=>this._onFocus(u),!0),De(this.document,"scroll",u=>this._onScroll(u),!0)],this.highlight.install();let e;const i=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(i,500)};e=this.injectedScript.utils.builtins.setTimeout(i,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(rv(this.document,PT)),(s=this.overlay)==null||s.install(),(o=(l=this._currentTool)==null?void 0:l.install)==null||o.call(l),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var s,l,o,u,f,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(l=(s=this._currentTool).uninstall)==null||l.call(s),this.clearHighlight(),this._currentTool=e,(u=(o=this._currentTool).install)==null||u.call(o);const i=(f=e.cursor)==null?void 0:f.call(e);i&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",i))}setUIState(e,i){var o;this._delegate=i,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(),(o=this.overlay)==null||o.setUIState(e);let s="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?eA(this.injectedScript,e.language,e.actionSelector,this.document):null;s=u!=null&&u.length?u:"clear",this._lastHighlightedSelector=u!=null&&u.length?e.actionSelector:void 0}const l=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==l){const u=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(u.length){const f=u.length>1?an.multiple:an.single;s=u.map(d=>({element:d,color:f})),this._lastHighlightedAriaTemplateJSON=l}else this._lastHighlightedSelector||(s="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}s==="clear"?this.highlight.clearHighlight():s!=="noop"&&this.highlight.updateHighlight(s)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onClick)==null||l.call(s,e))}_onDblClick(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onDblClick)==null||l.call(s,e))}_onContextMenu(e){var i,s;e.isTrusted&&((s=(i=this._currentTool).onContextMenu)==null||s.call(i,e))}_onDragStart(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onDragStart)==null||s.call(i,e))}_onPointerDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerDown)==null||s.call(i,e))}_onPointerUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onPointerUp)==null||s.call(i,e))}_onMouseDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseDown)==null||s.call(i,e))}_onMouseUp(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onMouseUp)==null||l.call(s,e))}_onMouseMove(e){var i,s,l;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(l=(s=this._currentTool).onMouseMove)==null||l.call(s,e))}_onMouseEnter(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseEnter)==null||s.call(i,e))}_onMouseLeave(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onMouseLeave)==null||s.call(i,e))}_onFocus(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onFocus)==null||s.call(i,e))}_onScroll(e){var i,s;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(s=(i=this._currentTool).onScroll)==null||s.call(i,e))}_onInput(e){var i,s;this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onInput)==null||s.call(i,e)}_onKeyDown(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyDown)==null||s.call(i,e))}_onKeyUp(e){var i,s;e.isTrusted&&(this._ignoreOverlayEvent(e)||(s=(i=this._currentTool).onKeyUp)==null||s.call(i,e))}updateHighlight(e,i){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,i)}_updateHighlight(e,i){var l,o;let s=e==null?void 0:e.tooltipText;s===void 0&&(e!=null&&e.selector)&&(s=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(u=>({element:u,color:e.color,tooltipText:s}))):this.highlight.clearHighlight(),i&&((o=(l=this._delegate).highlightUpdated)==null||o.call(l))}_ignoreOverlayEvent(e){return e.composedPath().some(i=>(i.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var i;for(const s of e.composedPath())if(!((i=this.overlay)!=null&&i.contains(s)))return s;return e.composedPath()[0]}setMode(e){var i,s;(s=(i=this._delegate).setMode)==null||s.call(i,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var s,l;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!tA(e)&&this._lastActionAutoexpectSnapshot){const o=nA(i,this._lastActionAutoexpectSnapshot);e.preconditionSelector=o?this.injectedScript.generateSelector(o,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((l=(s=this._delegate).performAction)==null?void 0:l.call(s,e).catch(()=>{}))}recordAction(e){var i,s;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),(s=(i=this._delegate).recordAction)==null||s.call(i,e)}setOverlayState(e){var i,s;(s=(i=this._delegate).setOverlayState)==null||s.call(i,e)}elementPicked(e,i){var l,o;const s=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"expect"});(o=(l=this._delegate).elementPicked)==null||o.call(l,{selector:e,ariaSnapshot:s})}}let iv=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const i=this._recorder.document.createElement("x-pw-tool-item");i.title="Accept",i.classList.add("accept"),i.appendChild(this._recorder.document.createElement("x-div")),i.addEventListener("click",()=>{var f;return(f=e.onCommit)==null?void 0:f.call(e)});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"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=f=>{var d;if(f.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=f=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)};const l=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,l.appendChild(o),l.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&l.appendChild(i),l.appendChild(s),this._dialogElement.appendChild(l);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._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,i){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=i+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function WT(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function ar(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function Sh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Va(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function He(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function Ga(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function Ka(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}function De(n,e,i,s){return n.addEventListener(e,i,s),()=>{n.removeEventListener(e,i,s)}}function sv(n){for(const e of n)e();n.splice(0,n.length)}function eA(n,e,i,s){try{const l=n.parseSelector(i),o=n.querySelectorAll(l,s),u=o.length>1?an.multiple:an.single,f=n.utils.asLocator(e,i);return o.map((d,p)=>{const m=o.length>1?` [${p+1} of ${o.length}]`:"";return{element:d,color:u,tooltipText:f+m}})}catch{return[]}}function rv(n,{tagName:e,attrs:i,children:s}){const l=n.createElementNS("http://www.w3.org/2000/svg",e);if(i)for(const[o,u]of Object.entries(i))l.setAttribute(o,u);if(s)for(const o of s)l.appendChild(rv(n,o));return l}function tA(n){return n.name.startsWith("assert")}function nA(n,e){var u,f;function i(d,p,m){let y=1,b=m+y;for(const w of d.children||[])typeof w=="string"?(y++,b++):(y+=i(w,p,b),b+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let w=p.get(d.role);w||(w=new Map,p.set(d.role,w));const T=w.get(d.name),x=y*100-m;(!T||T.sizeAndPosition<x)&&w.set(d.name,{node:d,sizeAndPosition:x})}return y}const s=new Map;n&&i(n.root,s,0);const l=new Map;i(e.root,l,0);const o=[];for(const[d,p]of l)for(const[m,y]of p)((u=s.get(d))==null?void 0:u.get(m))||o.push(y);return o.sort((d,p)=>p.sizeAndPosition-d.sizeAndPosition),(f=o[0])==null?void 0:f.node.element}function iA(n,e){n=n.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,u)=>u.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,u,f)=>`${u}(${f.toLowerCase()}`);const i=[];let s="";for(let o=0;o<n.length;++o){const u=n[o];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){s+=u;continue}const f=n[o-1]==="r"||n[o]==="/";++o;let d="";for(;o<n.length;){if(n[o]==="\\"){f?(n[o+1]!==u&&(d+=n[o]),++o,d+=n[o]):(++o,n[o]==="n"?d+=`
|
127
|
+
`:n[o]==="r"?d+="\r":n[o]==="t"?d+=" ":d+=n[o]),++o;continue}if(n[o]!==u){d+=n[o++];continue}break}i.push({quote:u,text:d}),s+=(u==="/"?"r":"")+"$"+i.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 l=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:av(s,i,e),preferredQuote:l}}function i0(n){return[...n.matchAll(/\$\d+/g)].length}function s0(n,e){return n.replace(/\$(\d+)/g,(i,s)=>`$${s-e}`)}function av(n,e,i){for(;;){const l=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!l)break;const o=l.index+l[0].length;let u=0,f=o;for(;f<n.length&&(n[f]==="("?u++:n[f]===")"&&u--,!(u<0));f++);let d=n.substring(0,o),p=0;["sethas(","sethasnot("].includes(l[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=i0(n.substring(0,o)),y=s0(n.substring(o,f),m),b=i0(y),w=e.slice(m,m+b),T=JSON.stringify(av(y,w,i));n=d.replace(/=$/,"2=")+`$${m+1}`+s0(n.substring(f+p),b-1);const x=e.slice(0,m),E=e.slice(m+b);e=x.concat([{quote:'"',text:T}]).concat(E)}n=n.replace(/\,set([\w]+)\(([^)]+)\)/g,(l,o,u)=>","+o.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=[${i}=$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 l=0;l<s.length-1;l++)if(s[l]==="internal:control=enter-frame"&&s[l+1].startsWith("nth=")){const[o]=s.splice(l,1);s.splice(l+1,0,o)}return s.map(l=>!l.startsWith("internal:")||l==="internal:control"?l.replace(/\$(\d+)/g,(o,u)=>e[+u-1].text):(l=l.includes("[")?l.replace(/\]/,"")+"]":l,l=l.replace(/(?:r)\$(\d+)(i)?/g,(o,u,f)=>{const d=e[+u-1];return l.startsWith("internal:attr")||l.startsWith("internal:testid")||l.startsWith("internal:role")?xt(new RegExp(d.text),!1)+(f||""):Rt(new RegExp(d.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(o,u,f)=>{const d=e[+u-1];return l.startsWith("internal:has=")||l.startsWith("internal:has-not=")?d.text:l.startsWith("internal:testid")?xt(d.text,!0):l.startsWith("internal:attr")||l.startsWith("internal:role")?xt(d.text,f==="s"):Rt(d.text,f==="s")}),l)).join(" >> ")}function sA(n,e,i){try{return rA(n,e,i)}catch{return""}}function rA(n,e,i){try{return el(e),e}catch{}const{selector:s,preferredQuote:l}=iA(e,i),o=P0(n,s,void 0,void 0,l),u=r0(n,e);return o.some(f=>r0(n,f)===u)?s:""}function r0(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const aA=({url:n})=>v.jsxs("div",{className:"browser-frame-header",children:[v.jsxs("div",{className:"browser-traffic-lights",children:[v.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),v.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),v.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),v.jsxs("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:[n||"about:blank",n&&v.jsx(Rh,{value:n})]}),v.jsx("div",{style:{marginLeft:"auto"},children:v.jsxs("div",{children:[v.jsx("span",{className:"browser-frame-menu-bar"}),v.jsx("span",{className:"browser-frame-menu-bar"}),v.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),rd=Symbol.for("yaml.alias"),wh=Symbol.for("yaml.document"),vi=Symbol.for("yaml.map"),lv=Symbol.for("yaml.pair"),En=Symbol.for("yaml.scalar"),mr=Symbol.for("yaml.seq"),on=Symbol.for("yaml.node.type"),ns=n=>!!n&&typeof n=="object"&&n[on]===rd,is=n=>!!n&&typeof n=="object"&&n[on]===wh,yr=n=>!!n&&typeof n=="object"&&n[on]===vi,Be=n=>!!n&&typeof n=="object"&&n[on]===lv,Le=n=>!!n&&typeof n=="object"&&n[on]===En,br=n=>!!n&&typeof n=="object"&&n[on]===mr;function ze(n){if(n&&typeof n=="object")switch(n[on]){case vi:case mr:return!0}return!1}function qe(n){if(n&&typeof n=="object")switch(n[on]){case rd:case vi:case En:case mr:return!0}return!1}const lA=n=>(Le(n)||ze(n))&&!!n.anchor,Dt=Symbol("break visit"),ov=Symbol("skip children"),_n=Symbol("remove node");function Si(n,e){const i=cv(e);is(n)?nr(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):nr(null,n,i,Object.freeze([]))}Si.BREAK=Dt;Si.SKIP=ov;Si.REMOVE=_n;function nr(n,e,i,s){const l=uv(n,e,i,s);if(qe(l)||Be(l))return fv(n,s,l),nr(n,l,i,s);if(typeof l!="symbol"){if(ze(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=nr(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===Dt)return Dt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=nr("key",e.key,i,s);if(o===Dt)return Dt;o===_n&&(e.key=null);const u=nr("value",e.value,i,s);if(u===Dt)return Dt;u===_n&&(e.value=null)}}return l}async function oc(n,e){const i=cv(e);is(n)?await ir(null,n.contents,i,Object.freeze([n]))===_n&&(n.contents=null):await ir(null,n,i,Object.freeze([]))}oc.BREAK=Dt;oc.SKIP=ov;oc.REMOVE=_n;async function ir(n,e,i,s){const l=await uv(n,e,i,s);if(qe(l)||Be(l))return fv(n,s,l),ir(n,l,i,s);if(typeof l!="symbol"){if(ze(e)){s=Object.freeze(s.concat(e));for(let o=0;o<e.items.length;++o){const u=await ir(o,e.items[o],i,s);if(typeof u=="number")o=u-1;else{if(u===Dt)return Dt;u===_n&&(e.items.splice(o,1),o-=1)}}}else if(Be(e)){s=Object.freeze(s.concat(e));const o=await ir("key",e.key,i,s);if(o===Dt)return Dt;o===_n&&(e.key=null);const u=await ir("value",e.value,i,s);if(u===Dt)return Dt;u===_n&&(e.value=null)}}return l}function cv(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 uv(n,e,i,s){var l,o,u,f,d;if(typeof i=="function")return i(n,e,s);if(yr(e))return(l=i.Map)==null?void 0:l.call(i,n,e,s);if(br(e))return(o=i.Seq)==null?void 0:o.call(i,n,e,s);if(Be(e))return(u=i.Pair)==null?void 0:u.call(i,n,e,s);if(Le(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,s);if(ns(e))return(d=i.Alias)==null?void 0:d.call(i,n,e,s)}function fv(n,e,i){const s=e[e.length-1];if(ze(s))s.items[n]=i;else if(Be(s))n==="key"?s.key=i:s.value=i;else if(is(s))s.contents=i;else{const l=ns(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const oA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},cA=n=>n.replace(/[!,[\]{}]/g,e=>oA[e]);class wt{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},wt.defaultYaml,e),this.tags=Object.assign({},wt.defaultTags,i)}clone(){const e=new wt(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new wt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:wt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},wt.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:wt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},wt.defaultTags),this.atNextDocument=!1);const s=e.trim().split(/[ \t]+/),l=s.shift();switch(l){case"%TAG":{if(s.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;const[o,u]=s;return this.tags[o]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const u=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,u),!1}}default:return i(0,`Unknown directive ${l}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const u=e.slice(2,-1);return u==="!"||u==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),u)}const[,s,l]=e.match(/^(.*!)([^!]*)$/s);l||i(`The ${e} tag has no suffix`);const o=this.tags[s];if(o)try{return o+decodeURIComponent(l)}catch(u){return i(String(u)),null}return s==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,s]of Object.entries(this.tags))if(e.startsWith(s))return i+cA(e.substring(s.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags);let l;if(e&&s.length>0&&qe(e.contents)){const o={};Si(e.contents,(u,f)=>{qe(f)&&f.tag&&(o[f.tag]=!0)}),l=Object.keys(o)}else l=[];for(const[o,u]of s)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||l.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
|
128
|
+
`)}}wt.defaultYaml={explicit:!1,version:"1.2"};wt.defaultTags={"!!":"tag:yaml.org,2002:"};function hv(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(i)}return!0}function dv(n){const e=new Set;return Si(n,{Value(i,s){s.anchor&&e.add(s.anchor)}}),e}function pv(n,e){for(let i=1;;++i){const s=`${n}${i}`;if(!e.has(s))return s}}function uA(n,e){const i=[],s=new Map;let l=null;return{onAnchor:o=>{i.push(o),l||(l=dv(n));const u=pv(e,l);return l.add(u),u},setAnchors:()=>{for(const o of i){const u=s.get(o);if(typeof u=="object"&&u.anchor&&(Le(u.node)||ze(u.node)))u.node.anchor=u.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:s}}function sr(n,e,i,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let l=0,o=s.length;l<o;++l){const u=s[l],f=sr(n,s,String(l),u);f===void 0?delete s[l]:f!==u&&(s[l]=f)}else if(s instanceof Map)for(const l of Array.from(s.keys())){const o=s.get(l),u=sr(n,s,l,o);u===void 0?s.delete(l):u!==o&&s.set(l,u)}else if(s instanceof Set)for(const l of Array.from(s)){const o=sr(n,s,l,l);o===void 0?s.delete(l):o!==l&&(s.delete(l),s.add(o))}else for(const[l,o]of Object.entries(s)){const u=sr(n,s,l,o);u===void 0?delete s[l]:u!==o&&(s[l]=u)}return n.call(e,i,s)}function ln(n,e,i){if(Array.isArray(n))return n.map((s,l)=>ln(s,String(l),i));if(n&&typeof n.toJSON=="function"){if(!i||!lA(n))return n.toJSON(e,i);const s={aliasCount:0,count:1,res:void 0};i.anchors.set(n,s),i.onCreate=o=>{s.res=o,delete i.onCreate};const l=n.toJSON(e,i);return i.onCreate&&i.onCreate(l),l}return typeof n=="bigint"&&!(i!=null&&i.keep)?Number(n):n}class ad{constructor(e){Object.defineProperty(this,on,{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:i,maxAliasCount:s,onAnchor:l,reviver:o}={}){if(!is(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=ln(this,"",u);if(typeof l=="function")for(const{count:d,res:p}of u.anchors.values())l(p,d);return typeof o=="function"?sr(o,{"":f},"",f):f}}class cc extends ad{constructor(e){super(rd),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return Si(e,{Node:(s,l)=>{if(l===this)return Si.BREAK;l.anchor===this.source&&(i=l)}}),i}toJSON(e,i){if(!i)return{source:this.source};const{anchors:s,doc:l,maxAliasCount:o}=i,u=this.resolve(l);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||(ln(u,null,i),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(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=Bo(l,u,s)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(e,i,s){const l=`*${this.source}`;if(e){if(hv(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${l} `}return l}}function Bo(n,e,i){if(ns(e)){const s=e.resolve(n),l=i&&s&&i.get(s);return l?l.count*l.aliasCount:0}else if(ze(e)){let s=0;for(const l of e.items){const o=Bo(n,l,i);o>s&&(s=o)}return s}else if(Be(e)){const s=Bo(n,e.key,i),l=Bo(n,e.value,i);return Math.max(s,l)}return 1}const gv=n=>!n||typeof n!="function"&&typeof n!="object";class fe extends ad{constructor(e){super(En),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:ln(this.value,e,i)}toString(){return String(this.value)}}fe.BLOCK_FOLDED="BLOCK_FOLDED";fe.BLOCK_LITERAL="BLOCK_LITERAL";fe.PLAIN="PLAIN";fe.QUOTE_DOUBLE="QUOTE_DOUBLE";fe.QUOTE_SINGLE="QUOTE_SINGLE";const fA="tag:yaml.org,2002:";function hA(n,e,i){if(e){const s=i.filter(o=>o.tag===e),l=s.find(o=>!o.format)??s[0];if(!l)throw new Error(`Tag ${e} not found`);return l}return i.find(s=>{var l;return((l=s.identify)==null?void 0:l.call(s,n))&&!s.format})}function Qa(n,e,i){var y,b,w;if(is(n)&&(n=n.contents),qe(n))return n;if(Be(n)){const T=(b=(y=i.schema[vi]).createNode)==null?void 0:b.call(y,i.schema,null,i);return T.items.push(n),T}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:s,onAnchor:l,onTagObj:o,schema:u,sourceObjects:f}=i;let d;if(s&&n&&typeof n=="object"){if(d=f.get(n),d)return d.anchor||(d.anchor=l(n)),new cc(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=fA+e.slice(2));let p=hA(n,e,u.tags);if(!p){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const T=new fe(n);return d&&(d.node=T),T}p=n instanceof Map?u[vi]:Symbol.iterator in Object(n)?u[mr]:u[vi]}o&&(o(p),delete i.onTagObj);const m=p!=null&&p.createNode?p.createNode(i.schema,n,i):typeof((w=p==null?void 0:p.nodeClass)==null?void 0:w.from)=="function"?p.nodeClass.from(i.schema,n,i):new fe(n);return e?m.tag=e:p.default||(m.tag=p.tag),d&&(d.node=m),m}function Zo(n,e,i){let s=i;for(let l=e.length-1;l>=0;--l){const o=e[l];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const u=[];u[o]=s,s=u}else s=new Map([[o,s]])}return Qa(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 Ha=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class mv extends ad{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(s=>qe(s)||Be(s)?s.clone(e):s),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(Ha(e))this.add(i);else{const[s,...l]=e,o=this.get(s,!0);if(ze(o))o.addIn(l,i);else if(o===void 0&&this.schema)this.set(s,Zo(this.schema,l,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${l}`)}}deleteIn(e){const[i,...s]=e;if(s.length===0)return this.delete(i);const l=this.get(i,!0);if(ze(l))return l.deleteIn(s);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${s}`)}getIn(e,i){const[s,...l]=e,o=this.get(s,!0);return l.length===0?!i&&Le(o)?o.value:o:ze(o)?o.getIn(l,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!Be(i))return!1;const s=i.value;return s==null||e&&Le(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(e){const[i,...s]=e;if(s.length===0)return this.has(i);const l=this.get(i,!0);return ze(l)?l.hasIn(s):!1}setIn(e,i){const[s,...l]=e;if(l.length===0)this.set(s,i);else{const o=this.get(s,!0);if(ze(o))o.setIn(l,i);else if(o===void 0&&this.schema)this.set(s,Zo(this.schema,l,i));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${l}`)}}}const dA=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function Kn(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const Pi=(n,e,i)=>n.endsWith(`
|
129
|
+
`)?Kn(i,e):i.includes(`
|
130
|
+
`)?`
|
131
|
+
`+Kn(i,e):(n.endsWith(" ")?"":" ")+i,yv="flow",xh="block",Uo="quoted";function uc(n,e,i="flow",{indentAtStart:s,lineWidth:l=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!l||l<0)return n;l<o&&(o=0);const d=Math.max(1+o,1+l-e.length);if(n.length<=d)return n;const p=[],m={};let y=l-e.length;typeof s=="number"&&(s>l-Math.max(2,o)?p.push(0):y=l-s);let b,w,T=!1,x=-1,E=-1,k=-1;i===xh&&(x=a0(n,x,e.length),x!==-1&&(y=x+d));for(let V;V=n[x+=1];){if(i===Uo&&V==="\\"){switch(E=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}k=x}if(V===`
|
132
|
+
`)i===xh&&(x=a0(n,x,e.length)),y=x+e.length+d,b=void 0;else{if(V===" "&&w&&w!==" "&&w!==`
|
133
|
+
`&&w!==" "){const $=n[x+1];$&&$!==" "&&$!==`
|
134
|
+
`&&$!==" "&&(b=x)}if(x>=y)if(b)p.push(b),y=b+d,b=void 0;else if(i===Uo){for(;w===" "||w===" ";)w=V,V=n[x+=1],T=!0;const $=x>k+1?x-2:E-1;if(m[$])return n;p.push($),m[$]=!0,y=$+d,b=void 0}else T=!0}w=V}if(T&&f&&f(),p.length===0)return n;u&&u();let N=n.slice(0,p[0]);for(let V=0;V<p.length;++V){const $=p[V],B=p[V+1]||n.length;$===0?N=`
|
135
|
+
${e}${n.slice(0,B)}`:(i===Uo&&m[$]&&(N+=`${n[$]}\\`),N+=`
|
136
|
+
${e}${n.slice($+1,B)}`)}return N}function a0(n,e,i){let s=e,l=e+1,o=n[l];for(;o===" "||o===" ";)if(e<l+i)o=n[++e];else{do o=n[++e];while(o&&o!==`
|
137
|
+
`);s=e,l=e+1,o=n[l]}return s}const fc=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),hc=n=>/^(%|---|\.\.\.)/m.test(n);function pA(n,e,i){if(!e||e<0)return!1;const s=e-i,l=n.length;if(l<=s)return!1;for(let o=0,u=0;o<l;++o)if(n[o]===`
|
138
|
+
`){if(o-u>s)return!0;if(u=o+1,l-u<=s)return!1}return!0}function Ya(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:s}=e,l=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(hc(n)?" ":"");let u="",f=0;for(let d=0,p=i[d];p;p=i[++d])if(p===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(u+=i.slice(f,d)+"\\ ",d+=1,f=d,p="\\"),p==="\\")switch(i[d+1]){case"u":{u+=i.slice(f,d);const m=i.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+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(s||i[d+2]==='"'||i.length<l)d+=1;else{for(u+=i.slice(f,d)+`
|
139
|
+
|
140
|
+
`;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)u+=`
|
141
|
+
`,d+=2;u+=o,i[d+2]===" "&&(u+="\\"),d+=1,f=d+1}break;default:d+=1}return u=f?u+i.slice(f):i,s?u:uc(u,o,Uo,fc(e,!1))}function _h(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
|
142
|
+
`)||/[ \t]\n|\n[ \t]/.test(n))return Ya(n,e);const i=e.indent||(hc(n)?" ":""),s="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
|
143
|
+
${i}`)+"'";return e.implicitKey?s:uc(s,i,yv,fc(e,!1))}function rr(n,e){const{singleQuote:i}=e.options;let s;if(i===!1)s=Ya;else{const l=n.includes('"'),o=n.includes("'");l&&!o?s=_h:o&&!l?s=Ya:s=i?_h:Ya}return s(n,e)}let Eh;try{Eh=new RegExp(`(^|(?<!
|
144
|
+
))
|
145
|
+
+(?!
|
146
|
+
|$)`,"g")}catch{Eh=/\n+(?!\n|$)/g}function Ho({comment:n,type:e,value:i},s,l,o){const{blockQuote:u,commentString:f,lineWidth:d}=s.options;if(!u||/\n[\t ]+$/.test(i)||/^\s*$/.test(i))return rr(i,s);const p=s.indent||(s.forceBlockIndent||hc(i)?" ":""),m=u==="literal"?!0:u==="folded"||e===fe.BLOCK_FOLDED?!1:e===fe.BLOCK_LITERAL?!0:!pA(i,d,p.length);if(!i)return m?`|
|
147
|
+
`:`>
|
148
|
+
`;let y,b;for(b=i.length;b>0;--b){const Y=i[b-1];if(Y!==`
|
149
|
+
`&&Y!==" "&&Y!==" ")break}let w=i.substring(b);const T=w.indexOf(`
|
150
|
+
`);T===-1?y="-":i===w||T!==w.length-1?(y="+",o&&o()):y="",w&&(i=i.slice(0,-w.length),w[w.length-1]===`
|
151
|
+
`&&(w=w.slice(0,-1)),w=w.replace(Eh,`$&${p}`));let x=!1,E,k=-1;for(E=0;E<i.length;++E){const Y=i[E];if(Y===" ")x=!0;else if(Y===`
|
152
|
+
`)k=E;else break}let N=i.substring(0,k<E?k+1:E);N&&(i=i.substring(N.length),N=N.replace(/\n+/g,`$&${p}`));let $=(m?"|":">")+(x?p?"2":"1":"")+y;if(n&&($+=" "+f(n.replace(/ ?[\r\n]+/g," ")),l&&l()),m)return i=i.replace(/\n+/g,`$&${p}`),`${$}
|
153
|
+
${p}${N}${i}${w}`;i=i.replace(/\n+/g,`
|
154
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const B=uc(`${N}${i}${w}`,p,xh,fc(s,!0));return`${$}
|
155
|
+
${p}${B}`}function gA(n,e,i,s){const{type:l,value:o}=n,{actualString:u,implicitKey:f,indent:d,indentStep:p,inFlow:m}=e;if(f&&o.includes(`
|
156
|
+
`)||m&&/[[\]{},]/.test(o))return rr(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||m||!o.includes(`
|
157
|
+
`)?rr(o,e):Ho(n,e,i,s);if(!f&&!m&&l!==fe.PLAIN&&o.includes(`
|
158
|
+
`))return Ho(n,e,i,s);if(hc(o)){if(d==="")return e.forceBlockIndent=!0,Ho(n,e,i,s);if(f&&d===p)return rr(o,e)}const y=o.replace(/\n+/g,`$&
|
159
|
+
${d}`);if(u){const b=x=>{var E;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((E=x.test)==null?void 0:E.test(y))},{compat:w,tags:T}=e.doc.schema;if(T.some(b)||w!=null&&w.some(b))return rr(o,e)}return f?y:uc(y,d,yv,fc(e,!1))}function tl(n,e,i,s){const{implicitKey:l,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==fe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=fe.QUOTE_DOUBLE);const d=m=>{switch(m){case fe.BLOCK_FOLDED:case fe.BLOCK_LITERAL:return l||o?rr(u.value,e):Ho(u,e,i,s);case fe.QUOTE_DOUBLE:return Ya(u.value,e);case fe.QUOTE_SINGLE:return _h(u.value,e);case fe.PLAIN:return gA(u,e,i,s);default:return null}};let p=d(f);if(p===null){const{defaultKeyType:m,defaultStringType:y}=e.options,b=l&&m||y;if(p=d(b),p===null)throw new Error(`Unsupported default string type ${b}`)}return p}function bv(n,e){const i=Object.assign({blockQuote:!0,commentString:dA,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(i.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:s,options:i}}function mA(n,e){var l;if(e.tag){const o=n.filter(u=>u.tag===e.tag);if(o.length>0)return o.find(u=>u.format===e.format)??o[0]}let i,s;if(Le(e)){s=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,s)});if(o.length>1){const u=o.filter(f=>f.test);u.length>0&&(o=u)}i=o.find(u=>u.format===e.format)??o.find(u=>!u.format)}else s=e,i=n.find(o=>o.nodeClass&&s instanceof o.nodeClass);if(!i){const o=((l=s==null?void 0:s.constructor)==null?void 0:l.name)??typeof s;throw new Error(`Tag not resolved for ${o} value`)}return i}function yA(n,e,{anchors:i,doc:s}){if(!s.directives)return"";const l=[],o=(Le(n)||ze(n))&&n.anchor;o&&hv(o)&&(i.add(o),l.push(`&${o}`));const u=n.tag?n.tag:e.default?null:e.tag;return u&&l.push(s.directives.tagString(u)),l.join(" ")}function ur(n,e,i,s){var d;if(Be(n))return n.toString(e,i,s);if(ns(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 l;const o=qe(n)?n:e.doc.createNode(n,{onTagObj:p=>l=p});l||(l=mA(e.doc.schema.tags,o));const u=yA(o,l,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof l.stringify=="function"?l.stringify(o,e,i,s):Le(o)?tl(o,e,i,s):o.toString(e,i,s);return u?Le(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
|
160
|
+
${e.indent}${f}`:f}function bA({key:n,value:e},i,s,l){const{allNullValues:o,doc:u,indent:f,indentStep:d,options:{commentString:p,indentSeq:m,simpleKeys:y}}=i;let b=qe(n)&&n.comment||null;if(y){if(b)throw new Error("With simple keys, key nodes cannot have comments");if(ze(n)||!qe(n)&&typeof n=="object"){const J="With simple keys, collection cannot be used as a key value";throw new Error(J)}}let w=!y&&(!n||b&&e==null&&!i.inFlow||ze(n)||(Le(n)?n.type===fe.BLOCK_FOLDED||n.type===fe.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!w&&(y||!o),indent:f+d});let T=!1,x=!1,E=ur(n,i,()=>T=!0,()=>x=!0);if(!w&&!i.inFlow&&E.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");w=!0}if(i.inFlow){if(o||e==null)return T&&s&&s(),E===""?"?":w?`? ${E}`:E}else if(o&&!y||e==null&&w)return E=`? ${E}`,b&&!T?E+=Pi(E,i.indent,p(b)):x&&l&&l(),E;T&&(b=null),w?(b&&(E+=Pi(E,i.indent,p(b))),E=`? ${E}
|
161
|
+
${f}:`):(E=`${E}:`,b&&(E+=Pi(E,i.indent,p(b))));let k,N,V;qe(e)?(k=!!e.spaceBefore,N=e.commentBefore,V=e.comment):(k=!1,N=null,V=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!w&&!b&&Le(e)&&(i.indentAtStart=E.length+1),x=!1,!m&&d.length>=2&&!i.inFlow&&!w&&br(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let $=!1;const B=ur(e,i,()=>$=!0,()=>x=!0);let Y=" ";if(b||k||N){if(Y=k?`
|
162
|
+
`:"",N){const J=p(N);Y+=`
|
163
|
+
${Kn(J,i.indent)}`}B===""&&!i.inFlow?Y===`
|
164
|
+
`&&(Y=`
|
165
|
+
|
166
|
+
`):Y+=`
|
167
|
+
${i.indent}`}else if(!w&&ze(e)){const J=B[0],I=B.indexOf(`
|
168
|
+
`),j=I!==-1,te=i.inFlow??e.flow??e.items.length===0;if(j||!te){let re=!1;if(j&&(J==="&"||J==="!")){let L=B.indexOf(" ");J==="&"&&L!==-1&&L<I&&B[L+1]==="!"&&(L=B.indexOf(" ",L+1)),(L===-1||I<L)&&(re=!0)}re||(Y=`
|
169
|
+
${i.indent}`)}}else(B===""||B[0]===`
|
170
|
+
`)&&(Y="");return E+=Y+B,i.inFlow?$&&s&&s():V&&!$?E+=Pi(E,i.indent,p(V)):x&&l&&l(),E}function vv(n,e){(n==="debug"||n==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const xo="<<",Yn={identify:n=>n===xo||typeof n=="symbol"&&n.description===xo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new fe(Symbol(xo)),{addToJSMap:Sv}),stringify:()=>xo},vA=(n,e)=>(Yn.identify(e)||Le(e)&&(!e.type||e.type===fe.PLAIN)&&Yn.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===Yn.tag&&i.default));function Sv(n,e,i){if(i=n&&ns(i)?i.resolve(n.doc):i,br(i))for(const s of i.items)th(n,e,s);else if(Array.isArray(i))for(const s of i)th(n,e,s);else th(n,e,i)}function th(n,e,i){const s=n&&ns(i)?i.resolve(n.doc):i;if(!yr(s))throw new Error("Merge sources must be maps or map aliases");const l=s.toJSON(null,n,Map);for(const[o,u]of l)e instanceof Map?e.has(o)||e.set(o,u):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}function wv(n,e,{key:i,value:s}){if(qe(i)&&i.addToJSMap)i.addToJSMap(n,e,s);else if(vA(n,i))Sv(n,e,s);else{const l=ln(i,"",n);if(e instanceof Map)e.set(l,ln(s,l,n));else if(e instanceof Set)e.add(l);else{const o=SA(i,l,n),u=ln(s,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function SA(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(qe(n)&&(i!=null&&i.doc)){const s=bv(i.doc,{});s.anchors=new Set;for(const o of i.anchors.keys())s.anchors.add(o.anchor);s.inFlow=!0,s.inStringifyKey=!0;const l=n.toString(s);if(!i.mapKeyWarned){let o=JSON.stringify(l);o.length>40&&(o=o.substring(0,36)+'..."'),vv(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return l}return JSON.stringify(e)}function ld(n,e,i){const s=Qa(n,void 0,i),l=Qa(e,void 0,i);return new bt(s,l)}class bt{constructor(e,i=null){Object.defineProperty(this,on,{value:lv}),this.key=e,this.value=i}clone(e){let{key:i,value:s}=this;return qe(i)&&(i=i.clone(e)),qe(s)&&(s=s.clone(e)),new bt(i,s)}toJSON(e,i){const s=i!=null&&i.mapAsMap?new Map:{};return wv(i,s,this)}toString(e,i,s){return e!=null&&e.doc?bA(this,e,i,s):JSON.stringify(this)}}function xv(n,e,i){return(e.inFlow??n.flow?xA:wA)(n,e,i)}function wA({comment:n,items:e},i,{blockItemPrefix:s,flowChars:l,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:d,options:{commentString:p}}=i,m=Object.assign({},i,{indent:o,type:null});let y=!1;const b=[];for(let T=0;T<e.length;++T){const x=e[T];let E=null;if(qe(x))!y&&x.spaceBefore&&b.push(""),Jo(i,b,x.commentBefore,y),x.comment&&(E=x.comment);else if(Be(x)){const N=qe(x.key)?x.key:null;N&&(!y&&N.spaceBefore&&b.push(""),Jo(i,b,N.commentBefore,y))}y=!1;let k=ur(x,m,()=>E=null,()=>y=!0);E&&(k+=Pi(k,o,p(E))),y&&E&&(y=!1),b.push(s+k)}let w;if(b.length===0)w=l.start+l.end;else{w=b[0];for(let T=1;T<b.length;++T){const x=b[T];w+=x?`
|
171
|
+
${d}${x}`:`
|
172
|
+
`}}return n?(w+=`
|
173
|
+
`+Kn(p(n),d),f&&f()):y&&u&&u(),w}function xA({items:n},e,{flowChars:i,itemIndent:s}){const{indent:l,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;s+=o;const d=Object.assign({},e,{indent:s,inFlow:!0,type:null});let p=!1,m=0;const y=[];for(let T=0;T<n.length;++T){const x=n[T];let E=null;if(qe(x))x.spaceBefore&&y.push(""),Jo(e,y,x.commentBefore,!1),x.comment&&(E=x.comment);else if(Be(x)){const N=qe(x.key)?x.key:null;N&&(N.spaceBefore&&y.push(""),Jo(e,y,N.commentBefore,!1),N.comment&&(p=!0));const V=qe(x.value)?x.value:null;V?(V.comment&&(E=V.comment),V.commentBefore&&(p=!0)):x.value==null&&(N!=null&&N.comment)&&(E=N.comment)}E&&(p=!0);let k=ur(x,d,()=>E=null);T<n.length-1&&(k+=","),E&&(k+=Pi(k,s,f(E))),!p&&(y.length>m||k.includes(`
|
174
|
+
`))&&(p=!0),y.push(k),m=y.length}const{start:b,end:w}=i;if(y.length===0)return b+w;if(!p){const T=y.reduce((x,E)=>x+E.length+2,2);p=e.options.lineWidth>0&&T>e.options.lineWidth}if(p){let T=b;for(const x of y)T+=x?`
|
175
|
+
${o}${l}${x}`:`
|
176
|
+
`;return`${T}
|
177
|
+
${l}${w}`}else return`${b}${u}${y.join(" ")}${u}${w}`}function Jo({indent:n,options:{commentString:e}},i,s,l){if(s&&l&&(s=s.replace(/^\n+/,"")),s){const o=Kn(e(s),n);i.push(o.trimStart())}}function Fi(n,e){const i=Le(e)?e.value:e;for(const s of n)if(Be(s)&&(s.key===e||s.key===i||Le(s.key)&&s.key.value===i))return s}class Kt extends mv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(vi,e),this.items=[]}static from(e,i,s){const{keepUndefined:l,replacer:o}=s,u=new this(e),f=(d,p)=>{if(typeof o=="function")p=o.call(i,d,p);else if(Array.isArray(o)&&!o.includes(d))return;(p!==void 0||l)&&u.items.push(ld(d,p,s))};if(i instanceof Map)for(const[d,p]of i)f(d,p);else if(i&&typeof i=="object")for(const d of Object.keys(i))f(d,i[d]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,i){var u;let s;Be(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new bt(e,e==null?void 0:e.value):s=new bt(e.key,e.value);const l=Fi(this.items,s.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(l){if(!i)throw new Error(`Key ${s.key} already set`);Le(l.value)&&gv(s.value)?l.value.value=s.value:l.value=s.value}else if(o){const f=this.items.findIndex(d=>o(s,d)<0);f===-1?this.items.push(s):this.items.splice(f,0,s)}else this.items.push(s)}delete(e){const i=Fi(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const s=Fi(this.items,e),l=s==null?void 0:s.value;return(!i&&Le(l)?l.value:l)??void 0}has(e){return!!Fi(this.items,e)}set(e,i){this.add(new bt(e,i),!0)}toJSON(e,i,s){const l=s?new s:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(l);for(const o of this.items)wv(i,l,o);return l}toString(e,i,s){if(!e)return JSON.stringify(this);for(const l of this.items)if(!Be(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),xv(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:i})}}const vr={collection:"map",default:!0,nodeClass:Kt,tag:"tag:yaml.org,2002:map",resolve(n,e){return yr(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>Kt.from(n,e,i)};class wi extends mv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(mr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=_o(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const s=_o(e);if(typeof s!="number")return;const l=this.items[s];return!i&&Le(l)?l.value:l}has(e){const i=_o(e);return typeof i=="number"&&i<this.items.length}set(e,i){const s=_o(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);const l=this.items[s];Le(l)&&gv(i)?l.value=i:this.items[s]=i}toJSON(e,i){const s=[];i!=null&&i.onCreate&&i.onCreate(s);let l=0;for(const o of this.items)s.push(ln(o,String(l++),i));return s}toString(e,i,s){return e?xv(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:i}):JSON.stringify(this)}static from(e,i,s){const{replacer:l}=s,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof l=="function"){const d=i instanceof Set?f:String(u++);f=l.call(i,d,f)}o.items.push(Qa(f,void 0,s))}}return o}}function _o(n){let e=Le(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Sr={collection:"seq",default:!0,nodeClass:wi,tag:"tag:yaml.org,2002:seq",resolve(n,e){return br(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>wi.from(n,e,i)},dc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,s){return e=Object.assign({actualString:!0},e),tl(n,e,i,s)}},pc={identify:n=>n==null,createNode:()=>new fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new fe(null),stringify:({source:n},e)=>typeof n=="string"&&pc.test.test(n)?n:e.options.nullStr},od={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new fe(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},i){if(n&&od.test.test(n)){const s=n[0]==="t"||n[0]==="T";if(e===s)return n}return e?i.options.trueStr:i.options.falseStr}};function pn({format:n,minFractionDigits:e,tag:i,value:s}){if(typeof s=="bigint")return String(s);const l=typeof s=="number"?s:Number(s);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let o=JSON.stringify(s);if(!n&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let u=o.indexOf(".");u<0&&(u=o.length,o+=".");let f=e-(o.length-u-1);for(;f-- >0;)o+="0"}return o}const _v={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:pn},Ev={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():pn(n)}},Tv={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 fe(parseFloat(n)),i=n.indexOf(".");return i!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-i-1),e},stringify:pn},gc=n=>typeof n=="bigint"||Number.isInteger(n),cd=(n,e,i,{intAsBigInt:s})=>s?BigInt(n):parseInt(n.substring(e),i);function Av(n,e,i){const{value:s}=n;return gc(s)&&s>=0?i+s.toString(e):pn(n)}const Nv={identify:n=>gc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>cd(n,2,8,i),stringify:n=>Av(n,8,"0o")},Cv={identify:gc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>cd(n,0,10,i),stringify:pn},kv={identify:n=>gc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>cd(n,2,16,i),stringify:n=>Av(n,16,"0x")},_A=[vr,Sr,dc,pc,od,Nv,Cv,kv,_v,Ev,Tv];function l0(n){return typeof n=="bigint"||Number.isInteger(n)}const Eo=({value:n})=>JSON.stringify(n),EA=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Eo},{identify:n=>n==null,createNode:()=>new fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Eo},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:n=>n==="true",stringify:Eo},{identify:l0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:i})=>i?BigInt(n):parseInt(n,10),stringify:({value:n})=>l0(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:Eo}],TA={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},AA=[vr,Sr].concat(EA,TA),ud={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 i=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(i.length);for(let l=0;l<i.length;++l)s[l]=i.charCodeAt(l);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:i},s,l,o){const u=i;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=fe.BLOCK_LITERAL),e!==fe.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,b=0;y<p;++y,b+=d)m[y]=f.substr(b,d);f=m.join(e===fe.BLOCK_LITERAL?`
|
178
|
+
`:" ")}return tl({comment:n,type:e,value:f},s,l,o)}};function Mv(n,e){if(br(n))for(let i=0;i<n.items.length;++i){let s=n.items[i];if(!Be(s)){if(yr(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");const l=s.items[0]||new bt(new fe(null));if(s.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${s.commentBefore}
|
179
|
+
${l.key.commentBefore}`:s.commentBefore),s.comment){const o=l.value??l.key;o.comment=o.comment?`${s.comment}
|
180
|
+
${o.comment}`:s.comment}s=l}n.items[i]=Be(s)?s:new bt(s)}}else e("Expected a sequence for this tag");return n}function Ov(n,e,i){const{replacer:s}=i,l=new wi(n);l.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof s=="function"&&(u=s.call(e,String(o++),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;l.items.push(ld(f,d,i))}return l}const fd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Mv,createNode:Ov};class lr extends wi{constructor(){super(),this.add=Kt.prototype.add.bind(this),this.delete=Kt.prototype.delete.bind(this),this.get=Kt.prototype.get.bind(this),this.has=Kt.prototype.has.bind(this),this.set=Kt.prototype.set.bind(this),this.tag=lr.tag}toJSON(e,i){if(!i)return super.toJSON(e);const s=new Map;i!=null&&i.onCreate&&i.onCreate(s);for(const l of this.items){let o,u;if(Be(l)?(o=ln(l.key,"",i),u=ln(l.value,o,i)):o=ln(l,"",i),s.has(o))throw new Error("Ordered maps must not include duplicate keys");s.set(o,u)}return s}static from(e,i,s){const l=Ov(e,i,s),o=new this;return o.items=l.items,o}}lr.tag="tag:yaml.org,2002:omap";const hd={collection:"seq",identify:n=>n instanceof Map,nodeClass:lr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=Mv(n,e),s=[];for(const{key:l}of i.items)Le(l)&&(s.includes(l.value)?e(`Ordered maps must not include duplicate keys: ${l.value}`):s.push(l.value));return Object.assign(new lr,i)},createNode:(n,e,i)=>lr.from(n,e,i)};function Lv({value:n,source:e},i){return e&&(n?jv:Rv).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const jv={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 fe(!0),stringify:Lv},Rv={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 fe(!1),stringify:Lv},NA={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:pn},CA={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():pn(n)}},kA={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 fe(parseFloat(n.replace(/_/g,""))),i=n.indexOf(".");if(i!==-1){const s=n.substring(i+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:pn},nl=n=>typeof n=="bigint"||Number.isInteger(n);function mc(n,e,i,{intAsBigInt:s}){const l=n[0];if((l==="-"||l==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),s){switch(i){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const u=BigInt(n);return l==="-"?BigInt(-1)*u:u}const o=parseInt(n,i);return l==="-"?-1*o:o}function dd(n,e,i){const{value:s}=n;if(nl(s)){const l=s.toString(e);return s<0?"-"+i+l.substr(1):i+l}return pn(n)}const MA={identify:nl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>mc(n,2,2,i),stringify:n=>dd(n,2,"0b")},OA={identify:nl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>mc(n,1,8,i),stringify:n=>dd(n,8,"0")},LA={identify:nl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>mc(n,0,10,i),stringify:pn},jA={identify:nl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>mc(n,2,16,i),stringify:n=>dd(n,16,"0x")};class or extends Kt{constructor(e){super(e),this.tag=or.tag}add(e){let i;Be(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new bt(e.key,null):i=new bt(e,null),Fi(this.items,i.key)||this.items.push(i)}get(e,i){const s=Fi(this.items,e);return!i&&Be(s)?Le(s.key)?s.key.value:s.key:s}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const s=Fi(this.items,e);s&&!i?this.items.splice(this.items.indexOf(s),1):!s&&i&&this.items.push(new bt(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,s);throw new Error("Set items must all have null values")}static from(e,i,s){const{replacer:l}=s,o=new this(e);if(i&&Symbol.iterator in Object(i))for(let u of i)typeof l=="function"&&(u=l.call(i,u,u)),o.items.push(ld(u,null,s));return o}}or.tag="tag:yaml.org,2002:set";const pd={collection:"map",identify:n=>n instanceof Set,nodeClass:or,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>or.from(n,e,i),resolve(n,e){if(yr(n)){if(n.hasAllNullValues(!0))return Object.assign(new or,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function gd(n,e){const i=n[0],s=i==="-"||i==="+"?n.substring(1):n,l=u=>e?BigInt(u):Number(u),o=s.replace(/_/g,"").split(":").reduce((u,f)=>u*l(60)+l(f),l(0));return i==="-"?l(-1)*o:o}function Dv(n){let{value:e}=n,i=u=>u;if(typeof e=="bigint")i=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return pn(n);let s="";e<0&&(s="-",e*=i(-1));const l=i(60),o=[e%l];return e<60?o.unshift(0):(e=(e-o[0])/l,o.unshift(e%l),e>=60&&(e=(e-o[0])/l,o.unshift(e))),s+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Bv={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:i})=>gd(n,i),stringify:Dv},Uv={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=>gd(n,!1),stringify:Dv},yc={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(yc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,s,l,o,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let p=Date.UTC(i,s-1,l,o||0,u||0,f||0,d);const m=e[8];if(m&&m!=="Z"){let y=gd(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$/,"")},o0=[vr,Sr,dc,pc,jv,Rv,MA,OA,LA,jA,NA,CA,kA,ud,Yn,hd,fd,pd,Bv,Uv,yc],c0=new Map([["core",_A],["failsafe",[vr,Sr,dc]],["json",AA],["yaml11",o0],["yaml-1.1",o0]]),u0={binary:ud,bool:od,float:Tv,floatExp:Ev,floatNaN:_v,floatTime:Uv,int:Cv,intHex:kv,intOct:Nv,intTime:Bv,map:vr,merge:Yn,null:pc,omap:hd,pairs:fd,seq:Sr,set:pd,timestamp:yc},RA={"tag:yaml.org,2002:binary":ud,"tag:yaml.org,2002:merge":Yn,"tag:yaml.org,2002:omap":hd,"tag:yaml.org,2002:pairs":fd,"tag:yaml.org,2002:set":pd,"tag:yaml.org,2002:timestamp":yc};function nh(n,e,i){const s=c0.get(e);if(s&&!n)return i&&!s.includes(Yn)?s.concat(Yn):s.slice();let l=s;if(!l)if(Array.isArray(n))l=[];else{const o=Array.from(c0.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(n))for(const o of n)l=l.concat(o);else typeof n=="function"&&(l=n(l.slice()));return i&&(l=l.concat(Yn)),l.reduce((o,u)=>{const f=typeof u=="string"?u0[u]:u;if(!f){const d=JSON.stringify(u),p=Object.keys(u0).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${p}`)}return o.includes(f)||o.push(f),o},[])}const DA=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class bc{constructor({compat:e,customTags:i,merge:s,resolveKnownTags:l,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?nh(e,"compat"):e?nh(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=l?RA:{},this.tags=nh(i,this.name,s),this.toStringOptions=f??null,Object.defineProperty(this,vi,{value:vr}),Object.defineProperty(this,En,{value:dc}),Object.defineProperty(this,mr,{value:Sr}),this.sortMapEntries=typeof u=="function"?u:u===!0?DA:null}clone(){const e=Object.create(bc.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function BA(n,e){var d;const i=[];let s=e.directives===!0;if(e.directives!==!1&&n.directives){const p=n.directives.toString(n);p?(i.push(p),s=!0):n.directives.docStart&&(s=!0)}s&&i.push("---");const l=bv(n,e),{commentString:o}=l.options;if(n.commentBefore){i.length!==1&&i.unshift("");const p=o(n.commentBefore);i.unshift(Kn(p,""))}let u=!1,f=null;if(n.contents){if(qe(n.contents)){if(n.contents.spaceBefore&&s&&i.push(""),n.contents.commentBefore){const y=o(n.contents.commentBefore);i.push(Kn(y,""))}l.forceBlockIndent=!!n.comment,f=n.contents.comment}const p=f?void 0:()=>u=!0;let m=ur(n.contents,l,()=>f=null,p);f&&(m+=Pi(m,"",o(f))),(m[0]==="|"||m[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${m}`:i.push(m)}else i.push(ur(n.contents,l));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const p=o(n.comment);p.includes(`
|
181
|
+
`)?(i.push("..."),i.push(Kn(p,""))):i.push(`... ${p}`)}else i.push("...");else{let p=n.comment;p&&u&&(p=p.replace(/^\n+/,"")),p&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(Kn(o(p),"")))}return i.join(`
|
182
|
+
`)+`
|
183
|
+
`}class wr{constructor(e,i,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,on,{value:wh});let l=null;typeof i=="function"||Array.isArray(i)?l=i:s===void 0&&i&&(s=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=o;let{version:u}=o;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new wt({version:u}),this.setSchema(u,s),this.contents=e===void 0?null:this.createNode(e,l,s)}clone(){const e=Object.create(wr.prototype,{[on]:{value:wh}});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=qe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Qs(this.contents)&&this.contents.add(e)}addIn(e,i){Qs(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const s=dv(this);e.anchor=!i||s.has(i)?pv(i||"a",s):i}return new cc(e.anchor)}createNode(e,i,s){let l;if(typeof i=="function")e=i.call({"":e},"",e),l=i;else if(Array.isArray(i)){const E=N=>typeof N=="number"||N instanceof String||N instanceof Number,k=i.filter(E).map(String);k.length>0&&(i=i.concat(k)),l=i}else s===void 0&&i&&(s=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:d,onTagObj:p,tag:m}=s??{},{onAnchor:y,setAnchors:b,sourceObjects:w}=uA(this,u||"a"),T={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:l,schema:this.schema,sourceObjects:w},x=Qa(e,m,T);return f&&ze(x)&&(x.flow=!0),b(),x}createPair(e,i,s={}){const l=this.createNode(e,null,s),o=this.createNode(i,null,s);return new bt(l,o)}delete(e){return Qs(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ha(e)?this.contents==null?!1:(this.contents=null,!0):Qs(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return ze(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Ha(e)?!i&&Le(this.contents)?this.contents.value:this.contents:ze(this.contents)?this.contents.getIn(e,i):void 0}has(e){return ze(this.contents)?this.contents.has(e):!1}hasIn(e){return Ha(e)?this.contents!==void 0:ze(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=Zo(this.schema,[e],i):Qs(this.contents)&&this.contents.set(e,i)}setIn(e,i){Ha(e)?this.contents=i:this.contents==null?this.contents=Zo(this.schema,Array.from(e),i):Qs(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new wt({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 wt({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const l=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(s)this.schema=new bc(Object.assign(s,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:s,maxAliasCount:l,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},d=ln(this.contents,i??"",f);if(typeof o=="function")for(const{count:p,res:m}of f.anchors.values())o(m,p);return typeof u=="function"?sr(u,{"":d},"",d):d}toJSON(e,i){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:i})}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 i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return BA(this,e)}}function Qs(n){if(ze(n))return!0;throw new Error("Expected a YAML collection as document contents")}class md extends Error{constructor(e,i,s,l){super(),this.name=e,this.code=s,this.message=l,this.pos=i}}class Qi extends md{constructor(e,i,s){super("YAMLParseError",e,i,s)}}class Hv extends md{constructor(e,i,s){super("YAMLWarning",e,i,s)}}const Wo=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:s,col:l}=i.linePos[0];i.message+=` at line ${s}, column ${l}`;let o=l-1,u=n.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(o>=60&&u.length>80){const f=Math.min(o-39,u.length-79);u="…"+u.substring(f),o-=f-1}if(u.length>80&&(u=u.substring(0,79)+"…"),s>1&&/^ *$/.test(u.substring(0,o))){let f=n.substring(e.lineStarts[s-2],e.lineStarts[s-1]);f.length>80&&(f=f.substring(0,79)+`…
|
184
|
+
`),u=f+u}if(/[^ ]/.test(u)){let f=1;const d=i.linePos[1];d&&d.line===s&&d.col>l&&(f=Math.max(1,Math.min(d.col-l,80-o)));const p=" ".repeat(o)+"^".repeat(f);i.message+=`:
|
185
|
+
|
186
|
+
${u}
|
187
|
+
${p}
|
188
|
+
`}};function fr(n,{flow:e,indicator:i,next:s,offset:l,onError:o,parentIndent:u,startOnNewline:f}){let d=!1,p=f,m=f,y="",b="",w=!1,T=!1,x=null,E=null,k=null,N=null,V=null,$=null,B=null;for(const I of n)switch(T&&(I.type!=="space"&&I.type!=="newline"&&I.type!=="comma"&&o(I.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),T=!1),x&&(p&&I.type!=="comment"&&I.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),I.type){case"space":!e&&(i!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&I.source.includes(" ")&&(x=I),m=!0;break;case"comment":{m||o(I,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const j=I.source.substring(1)||" ";y?y+=b+j:y=j,b="",p=!1;break}case"newline":p?y?y+=I.source:d=!0:b+=I.source,p=!0,w=!0,(E||k)&&(N=I),m=!0;break;case"anchor":E&&o(I,"MULTIPLE_ANCHORS","A node can have at most one anchor"),I.source.endsWith(":")&&o(I.offset+I.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),E=I,B===null&&(B=I.offset),p=!1,m=!1,T=!0;break;case"tag":{k&&o(I,"MULTIPLE_TAGS","A node can have at most one tag"),k=I,B===null&&(B=I.offset),p=!1,m=!1,T=!0;break}case i:(E||k)&&o(I,"BAD_PROP_ORDER",`Anchors and tags must be after the ${I.source} indicator`),$&&o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.source} in ${e??"collection"}`),$=I,p=i==="seq-item-ind"||i==="explicit-key-ind",m=!1;break;case"comma":if(e){V&&o(I,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),V=I,p=!1,m=!1;break}default:o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.type} token`),p=!1,m=!1}const Y=n[n.length-1],J=Y?Y.offset+Y.source.length:l;return T&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(p&&x.indent<=u||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:V,found:$,spaceBefore:d,comment:y,hasNewline:w,anchor:E,tag:k,newlineAfterProp:N,end:J,start:B??J}}function Za(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
|
189
|
+
`))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 i of e.start)if(i.type==="newline")return!0;if(e.sep){for(const i of e.sep)if(i.type==="newline")return!0}if(Za(e.key)||Za(e.value))return!0}return!1;default:return!0}}function Th(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===n&&(s.source==="]"||s.source==="}")&&Za(e)&&i(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function zv(n,e,i){const{uniqueKeys:s}=n.options;if(s===!1)return!1;const l=typeof s=="function"?s:(o,u)=>o===u||Le(o)&&Le(u)&&o.value===u.value;return e.some(o=>l(o.key,i))}const f0="All mapping items must start at the same column";function UA({composeNode:n,composeEmptyNode:e},i,s,l,o){var m;const u=(o==null?void 0:o.nodeClass)??Kt,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let d=s.offset,p=null;for(const y of s.items){const{start:b,key:w,sep:T,value:x}=y,E=fr(b,{indicator:"explicit-key-ind",next:w??(T==null?void 0:T[0]),offset:d,onError:l,parentIndent:s.indent,startOnNewline:!0}),k=!E.found;if(k){if(w&&(w.type==="block-seq"?l(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in w&&w.indent!==s.indent&&l(d,"BAD_INDENT",f0)),!E.anchor&&!E.tag&&!T){p=E.end,E.comment&&(f.comment?f.comment+=`
|
190
|
+
`+E.comment:f.comment=E.comment);continue}(E.newlineAfterProp||Za(w))&&l(w??b[b.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&&l(d,"BAD_INDENT",f0);i.atKey=!0;const N=E.end,V=w?n(i,w,E,l):e(i,N,b,null,E,l);i.schema.compat&&Th(s.indent,w,l),i.atKey=!1,zv(i,f.items,V)&&l(N,"DUPLICATE_KEY","Map keys must be unique");const $=fr(T??[],{indicator:"map-value-ind",next:x,offset:V.range[2],onError:l,parentIndent:s.indent,startOnNewline:!w||w.type==="block-scalar"});if(d=$.end,$.found){k&&((x==null?void 0:x.type)==="block-map"&&!$.hasNewline&&l(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&E.start<$.found.offset-1024&&l(V.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const B=x?n(i,x,$,l):e(i,d,T,null,$,l);i.schema.compat&&Th(s.indent,x,l),d=B.range[2];const Y=new bt(V,B);i.options.keepSourceTokens&&(Y.srcToken=y),f.items.push(Y)}else{k&&l(V.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),$.comment&&(V.comment?V.comment+=`
|
191
|
+
`+$.comment:V.comment=$.comment);const B=new bt(V);i.options.keepSourceTokens&&(B.srcToken=y),f.items.push(B)}}return p&&p<d&&l(p,"IMPOSSIBLE","Map comment with trailing content"),f.range=[s.offset,d,p??d],f}function HA({composeNode:n,composeEmptyNode:e},i,s,l,o){const u=(o==null?void 0:o.nodeClass)??wi,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=s.offset,p=null;for(const{start:m,value:y}of s.items){const b=fr(m,{indicator:"seq-item-ind",next:y,offset:d,onError:l,parentIndent:s.indent,startOnNewline:!0});if(!b.found)if(b.anchor||b.tag||y)y&&y.type==="block-seq"?l(b.end,"BAD_INDENT","All sequence items must start at the same column"):l(d,"MISSING_CHAR","Sequence item without - indicator");else{p=b.end,b.comment&&(f.comment=b.comment);continue}const w=y?n(i,y,b,l):e(i,b.end,m,null,b,l);i.schema.compat&&Th(s.indent,y,l),d=w.range[2],f.items.push(w)}return f.range=[s.offset,d,p??d],f}function il(n,e,i,s){let l="";if(n){let o=!1,u="";for(const f of n){const{source:d,type:p}=f;switch(p){case"space":o=!0;break;case"comment":{i&&!o&&s(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";l?l+=u+m:l=m,u="";break}case"newline":l&&(u+=d),o=!0;break;default:s(f,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:l,offset:e}}const ih="Block collections are not allowed within flow collections",sh=n=>n&&(n.type==="block-map"||n.type==="block-seq");function zA({composeNode:n,composeEmptyNode:e},i,s,l,o){const u=s.start.source==="{",f=u?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(u?Kt:wi),p=new d(i.schema);p.flow=!0;const m=i.atRoot;m&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let y=s.offset+s.start.source.length;for(let E=0;E<s.items.length;++E){const k=s.items[E],{start:N,key:V,sep:$,value:B}=k,Y=fr(N,{flow:f,indicator:"explicit-key-ind",next:V??($==null?void 0:$[0]),offset:y,onError:l,parentIndent:s.indent,startOnNewline:!1});if(!Y.found){if(!Y.anchor&&!Y.tag&&!$&&!B){E===0&&Y.comma?l(Y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):E<s.items.length-1&&l(Y.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),Y.comment&&(p.comment?p.comment+=`
|
192
|
+
`+Y.comment:p.comment=Y.comment),y=Y.end;continue}!u&&i.options.strict&&Za(V)&&l(V,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)Y.comma&&l(Y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(Y.comma||l(Y.start,"MISSING_CHAR",`Missing , between ${f} items`),Y.comment){let J="";e:for(const I of N)switch(I.type){case"comma":case"space":break;case"comment":J=I.source.substring(1);break e;default:break e}if(J){let I=p.items[p.items.length-1];Be(I)&&(I=I.value??I.key),I.comment?I.comment+=`
|
193
|
+
`+J:I.comment=J,Y.comment=Y.comment.substring(J.length+1)}}if(!u&&!$&&!Y.found){const J=B?n(i,B,Y,l):e(i,Y.end,$,null,Y,l);p.items.push(J),y=J.range[2],sh(B)&&l(J.range,"BLOCK_IN_FLOW",ih)}else{i.atKey=!0;const J=Y.end,I=V?n(i,V,Y,l):e(i,J,N,null,Y,l);sh(V)&&l(I.range,"BLOCK_IN_FLOW",ih),i.atKey=!1;const j=fr($??[],{flow:f,indicator:"map-value-ind",next:B,offset:I.range[2],onError:l,parentIndent:s.indent,startOnNewline:!1});if(j.found){if(!u&&!Y.found&&i.options.strict){if($)for(const L of $){if(L===j.found)break;if(L.type==="newline"){l(L,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}Y.start<j.found.offset-1024&&l(j.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else B&&("source"in B&&B.source&&B.source[0]===":"?l(B,"MISSING_CHAR",`Missing space after : in ${f}`):l(j.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const te=B?n(i,B,j,l):j.found?e(i,j.end,$,null,j,l):null;te?sh(B)&&l(te.range,"BLOCK_IN_FLOW",ih):j.comment&&(I.comment?I.comment+=`
|
194
|
+
`+j.comment:I.comment=j.comment);const re=new bt(I,te);if(i.options.keepSourceTokens&&(re.srcToken=k),u){const L=p;zv(i,L.items,I)&&l(J,"DUPLICATE_KEY","Map keys must be unique"),L.items.push(re)}else{const L=new Kt(i.schema);L.flow=!0,L.items.push(re);const F=(te??I).range;L.range=[I.range[0],F[1],F[2]],p.items.push(L)}y=te?te.range[2]:j.end}}const b=u?"}":"]",[w,...T]=s.end;let x=y;if(w&&w.source===b)x=w.offset+w.source.length;else{const E=f[0].toUpperCase()+f.substring(1),k=m?`${E} must end with a ${b}`:`${E} in block collection must be sufficiently indented and end with a ${b}`;l(y,m?"MISSING_CHAR":"BAD_INDENT",k),w&&w.source.length!==1&&T.unshift(w)}if(T.length>0){const E=il(T,x,i.options.strict,l);E.comment&&(p.comment?p.comment+=`
|
195
|
+
`+E.comment:p.comment=E.comment),p.range=[s.offset,x,E.offset]}else p.range=[s.offset,x,x];return p}function rh(n,e,i,s,l,o){const u=i.type==="block-map"?UA(n,e,i,s,o):i.type==="block-seq"?HA(n,e,i,s,o):zA(n,e,i,s,o),f=u.constructor;return l==="!"||l===f.tagName?(u.tag=f.tagName,u):(l&&(u.tag=l),u)}function qA(n,e,i,s,l){var b;const o=s.tag,u=o?e.directives.tagName(o.source,w=>l(o,"TAG_RESOLVE_FAILED",w)):null;if(i.type==="block-seq"){const{anchor:w,newlineAfterProp:T}=s,x=w&&o?w.offset>o.offset?w:o:w??o;x&&(!T||T.offset<x.offset)&&l(x,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!u||u==="!"||u===Kt.tagName&&f==="map"||u===wi.tagName&&f==="seq")return rh(n,e,i,l,u);let d=e.schema.tags.find(w=>w.tag===u&&w.collection===f);if(!d){const w=e.schema.knownTags[u];if(w&&w.collection===f)e.schema.tags.push(Object.assign({},w,{default:!1})),d=w;else return w!=null&&w.collection?l(o,"BAD_COLLECTION_TYPE",`${w.tag} used for ${f} collection, but expects ${w.collection}`,!0):l(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),rh(n,e,i,l,u)}const p=rh(n,e,i,l,u,d),m=((b=d.resolve)==null?void 0:b.call(d,p,w=>l(o,"TAG_RESOLVE_FAILED",w),e.options))??p,y=qe(m)?m:new fe(m);return y.range=p.range,y.tag=u,d!=null&&d.format&&(y.format=d.format),y}function qv(n,e,i){const s=e.offset,l=$A(e,n.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[s,s,s]};const o=l.mode===">"?fe.BLOCK_FOLDED:fe.BLOCK_LITERAL,u=e.source?IA(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const E=u[x][1];if(E===""||E==="\r")f=x;else break}if(f===0){const x=l.chomp==="+"&&u.length>0?`
|
196
|
+
`.repeat(Math.max(1,u.length-1)):"";let E=s+l.length;return e.source&&(E+=e.source.length),{value:x,type:o,comment:l.comment,range:[s,E,E]}}let d=e.indent+l.indent,p=e.offset+l.length,m=0;for(let x=0;x<f;++x){const[E,k]=u[x];if(k===""||k==="\r")l.indent===0&&E.length>d&&(d=E.length);else{E.length<d&&i(p+E.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(d=E.length),m=x,d===0&&!n.atRoot&&i(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=E.length+k.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>d&&(f=x+1);let y="",b="",w=!1;for(let x=0;x<m;++x)y+=u[x][0].slice(d)+`
|
197
|
+
`;for(let x=m;x<f;++x){let[E,k]=u[x];p+=E.length+k.length+1;const N=k[k.length-1]==="\r";if(N&&(k=k.slice(0,-1)),k&&E.length<d){const $=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(p-k.length-(N?2:1),"BAD_INDENT",$),E=""}o===fe.BLOCK_LITERAL?(y+=b+E.slice(d)+k,b=`
|
198
|
+
`):E.length>d||k[0]===" "?(b===" "?b=`
|
199
|
+
`:!w&&b===`
|
200
|
+
`&&(b=`
|
201
|
+
|
202
|
+
`),y+=b+E.slice(d)+k,b=`
|
203
|
+
`,w=!0):k===""?b===`
|
204
|
+
`?y+=`
|
205
|
+
`:b=`
|
206
|
+
`:(y+=b+k,b=" ",w=!1)}switch(l.chomp){case"-":break;case"+":for(let x=f;x<u.length;++x)y+=`
|
207
|
+
`+u[x][0].slice(d);y[y.length-1]!==`
|
208
|
+
`&&(y+=`
|
209
|
+
`);break;default:y+=`
|
210
|
+
`}const T=s+l.length+e.source.length;return{value:y,type:o,comment:l.comment,range:[s,T,T]}}function $A({offset:n,props:e},i,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=e[0],o=l[0];let u=0,f="",d=-1;for(let b=1;b<l.length;++b){const w=l[b];if(!f&&(w==="-"||w==="+"))f=w;else{const T=Number(w);!u&&T?u=T:d===-1&&(d=n+b)}}d!==-1&&s(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let p=!1,m="",y=l.length;for(let b=1;b<e.length;++b){const w=e[b];switch(w.type){case"space":p=!0;case"newline":y+=w.source.length;break;case"comment":i&&!p&&s(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=w.source.length,m=w.source.substring(1);break;case"error":s(w,"UNEXPECTED_TOKEN",w.message),y+=w.source.length;break;default:{const T=`Unexpected token in block scalar header: ${w.type}`;s(w,"UNEXPECTED_TOKEN",T);const x=w.source;x&&typeof x=="string"&&(y+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:m,length:y}}function IA(n){const e=n.split(/\n( *)/),i=e[0],s=i.match(/^( *)/),o=[s!=null&&s[1]?[s[1],i.slice(s[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function $v(n,e,i){const{offset:s,type:l,source:o,end:u}=n;let f,d;const p=(b,w,T)=>i(s+b,w,T);switch(l){case"scalar":f=fe.PLAIN,d=VA(o,p);break;case"single-quoted-scalar":f=fe.QUOTE_SINGLE,d=GA(o,p);break;case"double-quoted-scalar":f=fe.QUOTE_DOUBLE,d=KA(o,p);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[s,s+o.length,s+o.length]}}const m=s+o.length,y=il(u,m,e,i);return{value:d,type:f,comment:y.comment,range:[s,m,y.offset]}}function VA(n,e){let i="";switch(n[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${n[0]}`;break}case"@":case"`":{i=`reserved character ${n[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),Iv(n)}function GA(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),Iv(n.slice(1,-1)).replace(/''/g,"'")}function Iv(n){let e,i;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
211
|
+
`,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
212
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(n);if(!s)return n;let l=s[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;s=i.exec(n);)s[1]===""?o===`
|
213
|
+
`?l+=o:o=`
|
214
|
+
`:(l+=o+s[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,s=f.exec(n),l+o+((s==null?void 0:s[1])??"")}function KA(n,e){let i="";for(let s=1;s<n.length-1;++s){const l=n[s];if(!(l==="\r"&&n[s+1]===`
|
215
|
+
`))if(l===`
|
216
|
+
`){const{fold:o,offset:u}=YA(n,s);i+=o,s=u}else if(l==="\\"){let o=n[++s];const u=XA[o];if(u)i+=u;else if(o===`
|
217
|
+
`)for(o=n[s+1];o===" "||o===" ";)o=n[++s+1];else if(o==="\r"&&n[s+1]===`
|
218
|
+
`)for(o=n[++s+1];o===" "||o===" ";)o=n[++s+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=PA(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}`),i+=f}}else if(l===" "||l===" "){const o=s;let u=n[s+1];for(;u===" "||u===" ";)u=n[++s+1];u!==`
|
219
|
+
`&&!(u==="\r"&&n[s+2]===`
|
220
|
+
`)&&(i+=s>o?n.slice(o,s+1):l)}else i+=l}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function YA(n,e){let i="",s=n[e+1];for(;(s===" "||s===" "||s===`
|
221
|
+
`||s==="\r")&&!(s==="\r"&&n[e+2]!==`
|
222
|
+
`);)s===`
|
223
|
+
`&&(i+=`
|
224
|
+
`),e+=1,s=n[e+1];return i||(i=" "),{fold:i,offset:e}}const XA={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
225
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function PA(n,e,i,s){const l=n.substr(e,i),u=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,16):NaN;if(isNaN(u)){const f=n.substr(e-2,i+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function Vv(n,e,i,s){const{value:l,type:o,comment:u,range:f}=e.type==="block-scalar"?qv(n,e,s):$v(e,n.options.strict,s),d=i?n.directives.tagName(i.source,y=>s(i,"TAG_RESOLVE_FAILED",y)):null;let p;n.options.stringKeys&&n.atKey?p=n.schema[En]:d?p=FA(n.schema,l,d,i,s):e.type==="scalar"?p=QA(n,l,e,s):p=n.schema[En];let m;try{const y=p.resolve(l,b=>s(i??e,"TAG_RESOLVE_FAILED",b),n.options);m=Le(y)?y:new fe(y)}catch(y){const b=y instanceof Error?y.message:String(y);s(i??e,"TAG_RESOLVE_FAILED",b),m=new fe(l)}return m.range=f,m.source=l,o&&(m.type=o),d&&(m.tag=d),p.format&&(m.format=p.format),u&&(m.comment=u),m}function FA(n,e,i,s,l){var f;if(i==="!")return n[En];const o=[];for(const d of n.tags)if(!d.collection&&d.tag===i)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(e))return d;const u=n.knownTags[i];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(l(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[En])}function QA({atKey:n,directives:e,schema:i},s,l,o){const u=i.tags.find(f=>{var d;return(f.default===!0||n&&f.default==="key")&&((d=f.test)==null?void 0:d.test(s))})||i[En];if(i.compat){const f=i.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(s))})??i[En];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}`;o(l,"TAG_RESOLVE_FAILED",m,!0)}}return u}function ZA(n,e,i){if(e){i===null&&(i=e.length);for(let s=i-1;s>=0;--s){let l=e[s];switch(l.type){case"space":case"comment":case"newline":n-=l.source.length;continue}for(l=e[++s];(l==null?void 0:l.type)==="space";)n+=l.source.length,l=e[++s];break}}return n}const JA={composeNode:Gv,composeEmptyNode:yd};function Gv(n,e,i,s){const l=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:d}=i;let p,m=!0;switch(e.type){case"alias":p=WA(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=Vv(n,e,d,s),f&&(p.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=qA(JA,n,e,i,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=yd(n,e.offset,void 0,null,i,s),m=!1}}return f&&p.anchor===""&&s(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&n.options.stringKeys&&(!Le(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"),o&&(p.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?p.comment=u:p.commentBefore=u),n.options.keepSourceTokens&&m&&(p.srcToken=e),p}function yd(n,e,i,s,{spaceBefore:l,comment:o,anchor:u,tag:f,end:d},p){const m={type:"scalar",offset:ZA(e,i,s),indent:-1,source:""},y=Vv(n,m,f,p);return u&&(y.anchor=u.source.substring(1),y.anchor===""&&p(u,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(y.spaceBefore=!0),o&&(y.comment=o,y.range[2]=d),y}function WA({options:n},{offset:e,source:i,end:s},l){const o=new cc(i.substring(1));o.source===""&&l(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&l(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+i.length,f=il(s,u,n.strict,l);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function eN(n,e,{offset:i,start:s,value:l,end:o},u){const f=Object.assign({_directives:e},n),d=new wr(void 0,f),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=fr(s,{indicator:"doc-start",next:l??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!m.hasNewline&&u(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=l?Gv(p,l,m,u):yd(p,m.end,s,null,m,u);const y=d.contents.range[2],b=il(o,y,!1,u);return b.comment&&(d.comment=b.comment),d.range=[i,y,b.offset],d}function Ma(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:i}=n;return[e,e+(typeof i=="string"?i.length:1)]}function h0(n){var l;let e="",i=!1,s=!1;for(let o=0;o<n.length;++o){const u=n[o];switch(u[0]){case"#":e+=(e===""?"":s?`
|
226
|
+
|
227
|
+
`:`
|
228
|
+
`)+(u.substring(1)||" "),i=!0,s=!1;break;case"%":((l=n[o+1])==null?void 0:l[0])!=="#"&&(o+=1),i=!1;break;default:i||(s=!0),i=!1}}return{comment:e,afterEmptyLine:s}}class bd{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,s,l,o)=>{const u=Ma(i);o?this.warnings.push(new Hv(u,s,l)):this.errors.push(new Qi(u,s,l))},this.directives=new wt({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:s,afterEmptyLine:l}=h0(this.prelude);if(s){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
|
229
|
+
${s}`:s;else if(l||e.directives.docStart||!o)e.commentBefore=s;else if(ze(o)&&!o.flow&&o.items.length>0){let u=o.items[0];Be(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${s}
|
230
|
+
${f}`:s}else{const u=o.commentBefore;o.commentBefore=u?`${s}
|
231
|
+
${u}`:s}}i?(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:h0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,s=-1){for(const l of e)yield*this.next(l);yield*this.end(i,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,s,l)=>{const o=Ma(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",s,l)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=eN(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new Qi(Ma(e),"UNEXPECTED_TOKEN",i);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 Qi(Ma(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const i=il(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const s=this.doc.comment;this.doc.comment=s?`${s}
|
232
|
+
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Qi(Ma(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-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),l=new wr(void 0,s);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}function tN(n,e=!0,i){if(n){const s=(l,o,u)=>{const f=typeof l=="number"?l:Array.isArray(l)?l[0]:l.offset;if(i)i(f,o,u);else throw new Qi([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return $v(n,e,s);case"block-scalar":return qv({options:{strict:e}},n,s)}}return null}function nN(n,e){const{implicitKey:i=!1,indent:s,inFlow:l=!1,offset:o=-1,type:u="PLAIN"}=e,f=tl({type:u,value:n},{implicitKey:i,indent:s>0?" ".repeat(s):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:s,source:`
|
233
|
+
`}];switch(f[0]){case"|":case">":{const p=f.indexOf(`
|
234
|
+
`),m=f.substring(0,p),y=f.substring(p+1)+`
|
235
|
+
`,b=[{type:"block-scalar-header",offset:o,indent:s,source:m}];return Kv(b,d)||b.push({type:"newline",offset:-1,indent:s,source:`
|
236
|
+
`}),{type:"block-scalar",offset:o,indent:s,props:b,source:y}}case'"':return{type:"double-quoted-scalar",offset:o,indent:s,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:s,source:f,end:d};default:return{type:"scalar",offset:o,indent:s,source:f,end:d}}}function iN(n,e,i={}){let{afterKey:s=!1,implicitKey:l=!1,inFlow:o=!1,type:u}=i,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=tl({type:u,value:e},{implicitKey:l||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":sN(n,d);break;case'"':ah(n,d,"double-quoted-scalar");break;case"'":ah(n,d,"single-quoted-scalar");break;default:ah(n,d,"scalar")}}function sN(n,e){const i=e.indexOf(`
|
237
|
+
`),s=e.substring(0,i),l=e.substring(i+1)+`
|
238
|
+
`;if(n.type==="block-scalar"){const o=n.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=s,n.source=l}else{const{offset:o}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:u,source:s}];Kv(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
|
239
|
+
`});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:l})}}function Kv(n,e){if(e)for(const i of e)switch(i.type){case"space":case"comment":n.push(i);break;case"newline":return n.push(i),!0}return!1}function ah(n,e,i){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=i,n.source=e;break;case"block-scalar":{const s=n.props.slice(1);let l=e.length;n.props[0].type==="block-scalar-header"&&(l-=n.props[0].source.length);for(const o of s)o.offset+=l;delete n.props,Object.assign(n,{type:i,source:e,end:s});break}case"block-map":case"block-seq":{const l={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
|
240
|
+
`};delete n.items,Object.assign(n,{type:i,source:e,end:[l]});break}default:{const s="indent"in n?n.indent:-1,l="end"in n&&Array.isArray(n.end)?n.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(n))o!=="type"&&o!=="offset"&&delete n[o];Object.assign(n,{type:i,indent:s,source:e,end:l})}}}const rN=n=>"type"in n?ec(n):zo(n);function ec(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=ec(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=zo(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=zo(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=zo(n);if(n.end)for(const i of n.end)e+=i.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const i of n.end)e+=i.source;return e}}}function zo({start:n,key:e,sep:i,value:s}){let l="";for(const o of n)l+=o.source;if(e&&(l+=ec(e)),i)for(const o of i)l+=o.source;return s&&(l+=ec(s)),l}const Ah=Symbol("break visit"),aN=Symbol("skip children"),Yv=Symbol("remove item");function Wi(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),Xv(Object.freeze([]),n,e)}Wi.BREAK=Ah;Wi.SKIP=aN;Wi.REMOVE=Yv;Wi.itemAtPath=(n,e)=>{let i=n;for(const[s,l]of e){const o=i==null?void 0:i[s];if(o&&"items"in o)i=o.items[l];else return}return i};Wi.parentCollection=(n,e)=>{const i=Wi.itemAtPath(n,e.slice(0,-1)),s=e[e.length-1][0],l=i==null?void 0:i[s];if(l&&"items"in l)return l;throw new Error("Parent collection not found")};function Xv(n,e,i){let s=i(e,n);if(typeof s=="symbol")return s;for(const l of["key","value"]){const o=e[l];if(o&&"items"in o){for(let u=0;u<o.items.length;++u){const f=Xv(Object.freeze(n.concat([[l,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Ah)return Ah;f===Yv&&(o.items.splice(u,1),u-=1)}}typeof s=="function"&&l==="key"&&(s=s(e,n))}}return typeof s=="function"?s(e,n):s}const vc="\uFEFF",Sc="",wc="",Ja="",lN=n=>!!n&&"items"in n,oN=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function cN(n){switch(n){case vc:return"<BOM>";case Sc:return"<DOC>";case wc:return"<FLOW_END>";case Ja:return"<SCALAR>";default:return JSON.stringify(n)}}function Pv(n){switch(n){case vc:return"byte-order-mark";case Sc:return"doc-mode";case wc:return"flow-error-end";case Ja:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
241
|
+
`:case`\r
|
242
|
+
`: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 uN=Object.freeze(Object.defineProperty({__proto__:null,BOM:vc,DOCUMENT:Sc,FLOW_END:wc,SCALAR:Ja,createScalarToken:nN,isCollection:lN,isScalar:oN,prettyToken:cN,resolveAsScalar:tN,setScalarValue:iN,stringify:rN,tokenType:Pv,visit:Wi},Symbol.toStringTag,{value:"Module"}));function hn(n){switch(n){case void 0:case" ":case`
|
243
|
+
`:case"\r":case" ":return!0;default:return!1}}const d0=new Set("0123456789ABCDEFabcdef"),fN=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),To=new Set(",[]{}"),hN=new Set(` ,[]{}
|
244
|
+
\r `),lh=n=>!n||hN.has(n);class Fv{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,i=!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=!i;let s=this.next??"stream";for(;s&&(i||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i===" ";)i=this.buffer[++e];return!i||i==="#"||i===`
|
245
|
+
`?!0:i==="\r"?this.buffer[e+1]===`
|
246
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let s=0;for(;i===" ";)i=this.buffer[++s+e];if(i==="\r"){const l=this.buffer[s+e+1];if(l===`
|
247
|
+
`||!l&&!this.atEnd)return e+s+1}return i===`
|
248
|
+
`||s>=this.indentNext||!i&&!this.atEnd?e+s:-1}if(i==="-"||i==="."){const s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&hn(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(`
|
249
|
+
`,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]===vc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,s=e.indexOf("#");for(;s!==-1;){const o=e[s-1];if(o===" "||o===" "){i=s-1;break}else s=e.indexOf("#",s+1)}for(;;){const o=e[i-1];if(o===" "||o===" ")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-l),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-i),yield*this.pushNewline(),"stream"}return yield Sc,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 i=this.peek(3);if((i==="---"||i==="...")&&hn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!hn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&hn(i)){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 i=yield*this.pushIndicators();switch(e[i]){case"#":yield*this.pushCount(e.length-i);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(lh),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,i,s=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=s=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&l[0]!=="#"||s===0&&(l.startsWith("---")||l.startsWith("..."))&&hn(l[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield wc,yield*this.parseLineStart();let o=0;for(;l[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),l[o]){case void 0:return"flow";case"#":return yield*this.pushCount(l.length-o),"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(lh),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||hn(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 i=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let o=0;for(;this.buffer[i-1-o]==="\\";)o+=1;if(o%2===0)break;i=this.buffer.indexOf('"',i+1)}const s=this.buffer.substring(0,i);let l=s.indexOf(`
|
250
|
+
`,this.pos);if(l!==-1){for(;l!==-1;){const o=this.continueScalar(l+1);if(o===-1)break;l=s.indexOf(`
|
251
|
+
`,o)}l!==-1&&(i=l-(s[l-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const i=this.buffer[++e];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>hn(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,s;e:for(let o=this.pos;s=this.buffer[o];++o)switch(s){case" ":i+=1;break;case`
|
252
|
+
`:e=o,i=0;break;case"\r":{const u=this.buffer[o+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
|
253
|
+
`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
|
254
|
+
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let l=e+1;for(s=this.buffer[l];s===" ";)s=this.buffer[++l];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
|
255
|
+
`;)s=this.buffer[++l];e=l-1}else if(!this.blockScalarKeep)do{let o=e-1,u=this.buffer[o];u==="\r"&&(u=this.buffer[--o]);const f=o;for(;u===" ";)u=this.buffer[--o];if(u===`
|
256
|
+
`&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield Ja,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,s=this.pos-1,l;for(;l=this.buffer[++s];)if(l===":"){const o=this.buffer[s+1];if(hn(o)||e&&To.has(o))break;i=s}else if(hn(l)){let o=this.buffer[s+1];if(l==="\r"&&(o===`
|
257
|
+
`?(s+=1,l=`
|
258
|
+
`,o=this.buffer[s+1]):i=s),o==="#"||e&&To.has(o))break;if(l===`
|
259
|
+
`){const u=this.continueScalar(s+1);if(u===-1)break;s=Math.max(s,u-2)}}else{if(e&&To.has(l))break;i=s}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield Ja,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){const s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(lh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(hn(i)||e&&To.has(i))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,i=this.buffer[e];for(;!hn(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(fN.has(i))i=this.buffer[++e];else if(i==="%"&&d0.has(this.buffer[e+1])&&d0.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
260
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
261
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,s;do s=this.buffer[++i];while(s===" "||e&&s===" ");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(e){let i=this.pos,s=this.buffer[i];for(;!e(s);)s=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class Qv{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,s=this.lineStarts.length;for(;i<s;){const o=i+s>>1;this.lineStarts[o]<e?i=o+1:s=o}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};const l=this.lineStarts[i-1];return{line:i,col:e-l+1}}}}function Xi(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function p0(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 Zv(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 Ao(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 Zs(n){var i;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(;((i=n[++e])==null?void 0:i.type)==="space";);return n.splice(e,n.length)}function g0(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!Xi(e.start,"explicit-key-ind")&&!Xi(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Zv(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 vd{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 Fv,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,i))yield*this.next(s);i||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const i=Pv(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){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 i=e??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const s=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in s?s.indent:0:i.type==="flow-collection"&&s.type==="document"&&(i.indent=0),i.type==="flow-collection"&&g0(i),s.type){case"document":s.value=i;break;case"block-scalar":s.props.push(i);break;case"block-map":{const l=s.items[s.items.length-1];if(l.value){s.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(l.sep)l.value=i;else{Object.assign(l,{key:i,sep:[]}),this.onKeyLine=!l.explicitKey;return}break}case"block-seq":{const l=s.items[s.items.length-1];l.value?s.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=s.items[s.items.length-1];!l||l.value?s.items.push({start:[],key:i,sep:[]}):l.sep?l.value=i:Object.assign(l,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const l=i.items[i.items.length-1];l&&!l.sep&&!l.value&&l.start.length>0&&p0(l.start)===-1&&(i.indent===0||l.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(s.type==="document"?s.end=l.start:s.items.push({start:l.start}),i.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":{p0(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 i=this.startBlockValue(e);i?this.stack.push(i):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 i=Ao(this.peek(2)),s=Zs(i);let l;e.end?(l=e.end,l.push(this.sourceToken),delete e.end):l=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}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 i=this.source.indexOf(`
|
262
|
+
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
263
|
+
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var s;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){const l=e.items[e.items.length-2],o=(s=l==null?void 0:l.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const l=!this.onKeyLine&&this.indent===e.indent,o=l&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&i.sep&&!i.value){const f=[];for(let d=0;d<i.sep.length;++d){const p=i.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=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(u.push(this.sourceToken),e.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.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(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Xi(i.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(Zv(i.key)&&!Xi(i.sep,"newline")){const f=Zs(i.start),d=i.key,p=i.sep;p.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:p}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(Xi(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=Zs(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?e.items.push({start:u,key:null,sep:[this.sourceToken]}):Xi(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{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);o||i.value?(e.items.push({start:u,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(e);if(f){l&&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 i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){const l=e.items[e.items.length-2],o=(s=l==null?void 0:l.value)==null?void 0:s.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;i.value||Xi(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){const l=this.startBlockValue(e);if(l){this.stack.push(l);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const i=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":!i||i.sep?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?e.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:l,sep:[]}):i.sep?this.stack.push(l):Object.assign(i,{key:l,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 l=Ao(s),o=Zs(l);g0(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:o,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 i=this.source.indexOf(`
|
264
|
+
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
265
|
+
`,i)+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 i=Ao(e),s=Zs(i);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 i=Ao(e),s=Zs(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!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 Jv(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new Qv||null,prettyErrors:e}}function dN(n,e={}){const{lineCounter:i,prettyErrors:s}=Jv(e),l=new vd(i==null?void 0:i.addNewLine),o=new bd(e),u=Array.from(o.compose(l.parse(n)));if(s&&i)for(const f of u)f.errors.forEach(Wo(n,i)),f.warnings.forEach(Wo(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function Wv(n,e={}){const{lineCounter:i,prettyErrors:s}=Jv(e),l=new vd(i==null?void 0:i.addNewLine),o=new bd(e);let u=null;for(const f of o.compose(l.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new Qi(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&i&&(u.errors.forEach(Wo(n,i)),u.warnings.forEach(Wo(n,i))),u}function pN(n,e,i){let s;typeof e=="function"?s=e:i===void 0&&e&&typeof e=="object"&&(i=e);const l=Wv(n,i);if(!l)return null;if(l.warnings.forEach(o=>vv(l.options.logLevel,o)),l.errors.length>0){if(l.options.logLevel!=="silent")throw l.errors[0];l.errors=[]}return l.toJS(Object.assign({reviver:s},i))}function gN(n,e,i){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){const l=Math.round(i);i=l<1?void 0:l>8?{indent:8}:{indent:l}}if(n===void 0){const{keepUndefined:l}=i??e??{};if(!l)return}return is(n)&&!s?n.toString(i):new wr(n,s,i).toString(i)}const eS=Object.freeze(Object.defineProperty({__proto__:null,Alias:cc,CST:uN,Composer:bd,Document:wr,Lexer:Fv,LineCounter:Qv,Pair:bt,Parser:vd,Scalar:fe,Schema:bc,YAMLError:md,YAMLMap:Kt,YAMLParseError:Qi,YAMLSeq:wi,YAMLWarning:Hv,isAlias:ns,isCollection:ze,isDocument:is,isMap:yr,isNode:qe,isPair:Be,isScalar:Le,isSeq:br,parse:pN,parseAllDocuments:dN,parseDocument:Wv,stringify:gN,visit:Si,visitAsync:oc},Symbol.toStringTag,{value:"Module"})),mN=({action:n,model:e,sdkLanguage:i,testIdAttributeName:s,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})=>{const[d,p]=q.useState("action"),[m]=xn("shouldPopulateCanvasFromScreenshot",!1),y=q.useMemo(()=>SN(n),[n]),{snapshotInfoUrl:b,snapshotUrl:w,popoutUrl:T}=q.useMemo(()=>{const E=y[d];return e&&E?wN(e.traceUrl,E,m):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[y,d,m,e]),x=q.useMemo(()=>b!==void 0?{snapshotInfoUrl:b,snapshotUrl:w,popoutUrl:T}:void 0,[b,w,T]);return v.jsxs("div",{className:"snapshot-tab vbox",children:[v.jsxs(Dh,{children:[v.jsx(Xt,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:l,onClick:()=>o(!l)}),["action","before","after"].map(E=>v.jsx(ib,{id:E,title:vN(E),selected:d===E,onSelect:()=>p(E)},E)),v.jsx("div",{style:{flex:"auto"}}),v.jsx(Xt,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(x!=null&&x.popoutUrl),onClick:()=>{const E=window.open((x==null?void 0:x.popoutUrl)||"","_blank");E==null||E.addEventListener("DOMContentLoaded",()=>{new nv(E,{isUnderTest:nS,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),v.jsx(yN,{snapshotUrls:x,sdkLanguage:i,testIdAttributeName:s,isInspecting:l,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})]})},yN=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:s,setIsInspecting:l,highlightedElement:o,setHighlightedElement:u})=>{const f=q.useRef(null),d=q.useRef(null),[p,m]=q.useState({viewport:iS,url:""}),y=q.useRef({iteration:0,visibleIframe:0});return q.useEffect(()=>{(async()=>{const b=y.current.iteration+1,w=1-y.current.visibleIframe;y.current.iteration=b;const T=await xN(n==null?void 0:n.snapshotInfoUrl);if(y.current.iteration!==b)return;const x=[f,d][w].current;if(x){let E=()=>{};const k=new Promise(N=>E=N);try{x.addEventListener("load",E),x.addEventListener("error",E);const N=(n==null?void 0:n.snapshotUrl)||_N;x.contentWindow?x.contentWindow.location.replace(N):x.src=N,await k}catch{}finally{x.removeEventListener("load",E),x.removeEventListener("error",E)}}y.current.iteration===b&&(y.current.visibleIframe=w,m(T))})()},[n]),v.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:b=>{b.key==="Escape"&&s&&l(!1)},children:[v.jsx(m0,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:y.current.iteration}),v.jsx(m0,{isInspecting:s,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:d.current,iteration:y.current.iteration}),v.jsx(bN,{snapshotInfo:p,children:v.jsxs("div",{className:"snapshot-switcher",children:[v.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",className:Ke(y.current.visibleIframe===0&&"snapshot-visible")}),v.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",className:Ke(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},bN=({snapshotInfo:n,children:e})=>{const[i,s]=es(),l=40,o={width:n.viewport.width,height:n.viewport.height},u={width:Math.max(o.width,480),height:Math.max(o.height+l,320)},f=Math.min(i.width/u.width,i.height/u.height,1),d={x:(i.width-u.width)/2,y:(i.height-u.height)/2};return v.jsx("div",{ref:s,className:"snapshot-wrapper",children:v.jsxs("div",{className:"snapshot-container",style:{width:u.width+"px",height:u.height+"px",transform:`translate(${d.x}px, ${d.y}px) scale(${f})`},children:[v.jsx(aA,{url:n.url}),v.jsx("div",{className:"snapshot-browser-body",children:v.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function vN(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const m0=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:s,highlightedElement:l,setHighlightedElement:o,iteration:u})=>(q.useEffect(()=>{const f=l.lastEdited==="ariaSnapshot"?l.ariaSnapshot:void 0,d=l.lastEdited==="locator"?l.locator:void 0,p=!!f||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{tS(m,p,i,s,y,"",n==null?void 0:n.contentWindow)}catch{}const b=f?Bh(eS,f):void 0,w=d?sA(i,d,s):void 0;for(const{recorder:T,frameSelector:x}of m){const E=w!=null&&w.startsWith(x)?w.substring(x.length).trim():void 0,k=(b==null?void 0:b.errors.length)===0?b.fragment:void 0;T.setUIState({mode:e?"inspecting":"none",actionSelector:E,ariaTemplate:k,language:i,testIdAttributeName:s,overlay:{offsetX:0}},{async elementPicked(N){o({locator:Ji(i,x+N.selector),ariaSnapshot:N.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const N of m)N.recorder!==T&&N.recorder.clearHighlight()}})}},[n,e,l,o,i,s,u]),v.jsx(v.Fragment,{}));function tS(n,e,i,s,l,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const d=new nv(u,{isUnderTest:l,sdkLanguage:i,testIdAttributeName:s,stableRafCount:1,browserName:"chromium",customEngines:[]}),p=new JT(d);f._injectedScript=d,f._recorder={recorder:p,frameSelector:o},l&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(p)))}f._recorder&&n.push(f._recorder);for(let d=0;d<u.frames.length;++d){const p=u.frames[d],m=p.frameElement?f._injectedScript.generateSelectorSimple(p.frameElement,{omitInternalEngines:!0,testIdAttributeName:s})+" >> internal:control=enter-frame >> ":"";tS(n,e,i,s,l,o+m,p)}}const Oa=(n,e,i=!1)=>{if(!n)return;const s=n[e];if(s){if(!n.pageId){console.error("snapshot action must have a pageId");return}return{action:n,snapshotName:s,pageId:n.pageId,point:n.point,hasInputTarget:i}}};function SN(n){if(!n)return{};let e=Oa(n,"beforeSnapshot");if(!e){for(let l=_y(n);l;l=_y(l))if(l.endTime<=n.startTime&&l.afterSnapshot){e=Oa(l,"afterSnapshot");break}}let i=Oa(n,"afterSnapshot");if(!i){let l;for(let o=Ey(n);o&&o.startTime<=n.endTime;o=Ey(o))o.endTime>n.endTime||!o.afterSnapshot||l&&l.endTime>o.endTime||(l=o);l?i=Oa(l,"afterSnapshot"):i=e}const s=Oa(n,"inputSnapshot",!0)??i;return s&&(s.point=n.point),{action:s,before:e,after:i}}const nS=new URLSearchParams(window.location.search).has("isUnderTest"),y0=new URLSearchParams(window.location.search).get("server");function wN(n,e,i){const s=new URLSearchParams;s.set("trace",n),s.set("name",e.snapshotName),nS&&s.set("isUnderTest","true"),e.point&&(s.set("pointX",String(e.point.x)),s.set("pointY",String(e.point.y)),e.hasInputTarget&&s.set("hasInputTarget","1")),i&&s.set("shouldPopulateCanvasFromScreenshot","1");const l=new URL(`snapshot/${e.pageId}?${s.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${s.toString()}`,window.location.href).toString(),u=new URLSearchParams;u.set("r",l),y0&&u.set("server",y0),u.set("trace",n),e.point&&(u.set("pointX",String(e.point.x)),u.set("pointY",String(e.point.y)),e.hasInputTarget&&s.set("hasInputTarget","1"));const f=new URL(`snapshot.html?${u.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:l,popoutUrl:f}}async function xN(n){const e={url:"",viewport:iS,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 iS={width:1280,height:720},_N='data:text/html,<body style="background: #ddd"></body>',sS={width:200,height:45},Ws=2.5,EN=sS.height+Ws*2,TN=({model:n,boundaries:e,previewPoint:i})=>{var m,y;const[s,l]=es(),o=q.useRef(null);let u=0;if(o.current&&i){const b=o.current.getBoundingClientRect();u=(i.clientY-b.top+o.current.scrollTop)/EN|0}const f=(y=(m=n==null?void 0:n.pages)==null?void 0:m[u])==null?void 0:y.screencastFrames;let d,p;if(i!==void 0&&f&&f.length){const b=e.minimum+(e.maximum-e.minimum)*i.x/s.width;d=f[v0(f,b,rS)-1];const w={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};p=d?aS({width:d.width,height:d.height},w):void 0}return v.jsxs("div",{className:"film-strip",ref:l,children:[v.jsx("div",{className:"film-strip-lanes",ref:o,children:n==null?void 0:n.pages.map((b,w)=>b.screencastFrames.length?v.jsx(AN,{boundaries:e,page:b,width:s.width},w):null)}),(i==null?void 0:i.x)!==void 0&&v.jsxs("div",{className:"film-strip-hover",style:{top:s.bottom+5,left:Math.min(i.x,s.width-(p?p.width:0)-10)},children:[i.action&&v.jsx("div",{className:"film-strip-hover-title",children:jh(i.action,i)}),d&&p&&v.jsx("div",{style:{width:p.width,height:p.height},children:v.jsx("img",{src:`sha1/${d.sha1}`,width:p.width,height:p.height})})]})]})},AN=({boundaries:n,page:e,width:i})=>{const s={width:0,height:0},l=e.screencastFrames;for(const x of l)s.width=Math.max(s.width,x.width),s.height=Math.max(s.height,x.height);const o=aS(s,sS),u=l[0].timestamp,f=l[l.length-1].timestamp,d=n.maximum-n.minimum,p=(u-n.minimum)/d*i,m=(n.maximum-f)/d*i,b=(f-u)/d*i/(o.width+2*Ws)|0,w=(f-u)/b,T=[];for(let x=0;u&&w&&x<b;++x){const E=u+w*x,k=v0(l,E,rS)-1;T.push(v.jsx("div",{className:"film-strip-frame",style:{width:o.width,height:o.height,backgroundImage:`url(sha1/${l[k].sha1})`,backgroundSize:`${o.width}px ${o.height}px`,margin:Ws,marginRight:Ws}},x))}return T.push(v.jsx("div",{className:"film-strip-frame",style:{width:o.width,height:o.height,backgroundImage:`url(sha1/${l[l.length-1].sha1})`,backgroundSize:`${o.width}px ${o.height}px`,margin:Ws,marginRight:Ws}},T.length)),v.jsx("div",{className:"film-strip-lane",style:{marginLeft:p+"px",marginRight:m+"px"},children:T})};function rS(n,e){return n-e.timestamp}function aS(n,e){const i=Math.max(n.width/e.width,n.height/e.height);return{width:n.width/i|0,height:n.height/i|0}}const NN=({model:n,boundaries:e,consoleEntries:i,onSelected:s,highlightedAction:l,highlightedEntry:o,highlightedConsoleEntry:u,selectedTime:f,setSelectedTime:d,sdkLanguage:p})=>{const[m,y]=es(),[b,w]=q.useState(),[T,x]=q.useState(),[E]=xn("actionsFilter",[]),{offsets:k,curtainLeft:N,curtainRight:V}=q.useMemo(()=>{let L=f||e;if(b&&b.startX!==b.endX){const z=wn(m.width,e,b.startX),Z=wn(m.width,e,b.endX);L={minimum:Math.min(z,Z),maximum:Math.max(z,Z)}}const F=sn(m.width,e,L.minimum),me=sn(m.width,e,e.maximum)-sn(m.width,e,L.maximum);return{offsets:CN(m.width,e),curtainLeft:F,curtainRight:me}},[f,e,b,m]),$=q.useMemo(()=>n==null?void 0:n.filteredActions(E),[n,E]),B=q.useMemo(()=>{const L=[];for(const F of $||[])L.push({action:F,leftTime:F.startTime,rightTime:F.endTime||e.maximum,leftPosition:sn(m.width,e,F.startTime),rightPosition:sn(m.width,e,F.endTime||e.maximum),active:!1,error:!!F.error});for(const F of(n==null?void 0:n.resources)||[]){const ge=F._monotonicTime,me=F._monotonicTime+F.time;L.push({resource:F,leftTime:ge,rightTime:me,leftPosition:sn(m.width,e,ge),rightPosition:sn(m.width,e,me),active:!1,error:!1})}for(const F of i||[])L.push({consoleMessage:F,leftTime:F.timestamp,rightTime:F.timestamp,leftPosition:sn(m.width,e,F.timestamp),rightPosition:sn(m.width,e,F.timestamp),active:!1,error:F.isError});return L},[n,$,i,e,m]);q.useMemo(()=>{for(const L of B)l?L.active=L.action===l:o?L.active=L.resource===o:u?L.active=L.consoleMessage===u:L.active=!1},[B,l,o,u]);const Y=q.useCallback(L=>{if(x(void 0),!y.current)return;const F=L.clientX-y.current.getBoundingClientRect().left,ge=wn(m.width,e,F),me=f?sn(m.width,e,f.minimum):0,z=f?sn(m.width,e,f.maximum):0;f&&Math.abs(F-me)<10?w({startX:z,endX:F,type:"resize"}):f&&Math.abs(F-z)<10?w({startX:me,endX:F,type:"resize"}):f&&ge>f.minimum&&ge<f.maximum&&L.clientY-y.current.getBoundingClientRect().top<20?w({startX:me,endX:z,pivot:F,type:"move"}):w({startX:F,endX:F,type:"resize"})},[e,m,y,f]),J=q.useCallback(L=>{if(!y.current)return;const F=L.clientX-y.current.getBoundingClientRect().left,ge=wn(m.width,e,F),me=$==null?void 0:$.findLast(Se=>Se.startTime<=ge);if(!L.buttons){w(void 0);return}if(me&&s(me),!b)return;let z=b;if(b.type==="resize")z={...b,endX:F};else{const Se=F-b.pivot;let C=b.startX+Se,X=b.endX+Se;C<0&&(C=0,X=C+(b.endX-b.startX)),X>m.width&&(X=m.width,C=X-(b.endX-b.startX)),z={...b,startX:C,endX:X,pivot:F}}w(z);const Z=wn(m.width,e,z.startX),ne=wn(m.width,e,z.endX);Z!==ne&&d({minimum:Math.min(Z,ne),maximum:Math.max(Z,ne)})},[e,b,m,$,s,y,d]),I=q.useCallback(()=>{if(x(void 0),!!b){if(b.startX!==b.endX){const L=wn(m.width,e,b.startX),F=wn(m.width,e,b.endX);d({minimum:Math.min(L,F),maximum:Math.max(L,F)})}else{const L=wn(m.width,e,b.startX),F=$==null?void 0:$.findLast(ge=>ge.startTime<=L);F&&s(F),d(void 0)}w(void 0)}},[e,b,m,$,d,s]),j=q.useCallback(L=>{if(!y.current)return;const F=L.clientX-y.current.getBoundingClientRect().left,ge=wn(m.width,e,F),me=$==null?void 0:$.findLast(z=>z.startTime<=ge);x({x:F,clientY:L.clientY,action:me,sdkLanguage:p})},[e,m,$,y,p]),te=q.useCallback(()=>{x(void 0)},[]),re=q.useCallback(()=>{d(void 0)},[d]);return v.jsxs("div",{className:"timeline-view-container",children:[!!b&&v.jsx(J0,{cursor:(b==null?void 0:b.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:I,onPaneMouseMove:J,onPaneDoubleClick:re}),v.jsxs("div",{ref:y,className:"timeline-view",onMouseDown:Y,onMouseMove:j,onMouseLeave:te,children:[v.jsx("div",{className:"timeline-grid",children:k.map((L,F)=>v.jsx("div",{className:"timeline-divider",style:{left:L.position+"px"},children:v.jsx("div",{className:"timeline-time",children:_t(L.time-e.minimum)})},F))}),v.jsx("div",{style:{height:8}}),v.jsx(TN,{model:n,boundaries:e,previewPoint:T}),v.jsx("div",{className:"timeline-bars",children:B.filter(L=>!L.action||L.action.class!=="Test").map((L,F)=>v.jsx("div",{className:Ke("timeline-bar",L.action&&"action",L.resource&&"network",L.consoleMessage&&"console-message",L.active&&"active",L.error&&"error"),style:{left:L.leftPosition,width:Math.max(5,L.rightPosition-L.leftPosition),top:kN(L),bottom:0}},F))}),v.jsx("div",{className:"timeline-marker",style:{display:T!==void 0?"block":"none",left:((T==null?void 0:T.x)||0)+"px"}}),f&&v.jsxs("div",{className:"timeline-window",children:[v.jsx("div",{className:"timeline-window-curtain left",style:{width:N}}),v.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),v.jsx("div",{className:"timeline-window-center",children:v.jsx("div",{className:"timeline-window-drag"})}),v.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),v.jsx("div",{className:"timeline-window-curtain right",style:{width:V}})]})]})]})};function CN(n,e){let s=n/64;const l=e.maximum-e.minimum,o=n/l;let u=l/s;const f=Math.ceil(Math.log(u)/Math.LN10);u=Math.pow(10,f),u*o>=320&&(u=u/5),u*o>=128&&(u=u/2);const d=e.minimum;let p=e.maximum;p+=64/o,s=Math.ceil((p-d)/u),u||(s=0);const m=[];for(let y=0;y<s;++y){const b=d+u*y;m.push({position:sn(n,e,b),time:b})}return m}function sn(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function wn(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}function kN(n){return n.resource?25:20}const MN=({model:n})=>{var i,s;if(!n)return v.jsx(v.Fragment,{});const e=n.wallTime!==void 0?new Date(n.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return v.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[v.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&v.jsxs("div",{className:"call-line",children:["start time:",v.jsx("span",{className:"call-value datetime",title:e,children:e})]}),v.jsxs("div",{className:"call-line",children:["duration:",v.jsx("span",{className:"call-value number",title:_t(n.endTime-n.startTime),children:_t(n.endTime-n.startTime)})]}),v.jsx("div",{className:"call-section",children:"Browser"}),v.jsxs("div",{className:"call-line",children:["engine:",v.jsx("span",{className:"call-value string",title:n.browserName,children:n.browserName})]}),n.channel&&v.jsxs("div",{className:"call-line",children:["channel:",v.jsx("span",{className:"call-value string",title:n.channel,children:n.channel})]}),n.platform&&v.jsxs("div",{className:"call-line",children:["platform:",v.jsx("span",{className:"call-value string",title:n.platform,children:n.platform})]}),n.options.userAgent&&v.jsxs("div",{className:"call-line",children:["user agent:",v.jsx("span",{className:"call-value datetime",title:n.options.userAgent,children:n.options.userAgent})]}),n.options.baseURL&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),v.jsxs("div",{className:"call-line",children:["baseURL:",v.jsx("a",{className:"call-value string",href:n.options.baseURL,title:n.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:n.options.baseURL})]})]}),v.jsx("div",{className:"call-section",children:"Viewport"}),n.options.viewport&&v.jsxs("div",{className:"call-line",children:["width:",v.jsx("span",{className:"call-value number",title:String(!!((i=n.options.viewport)!=null&&i.width)),children:n.options.viewport.width})]}),n.options.viewport&&v.jsxs("div",{className:"call-line",children:["height:",v.jsx("span",{className:"call-value number",title:String(!!((s=n.options.viewport)!=null&&s.height)),children:n.options.viewport.height})]}),v.jsxs("div",{className:"call-line",children:["is mobile:",v.jsx("span",{className:"call-value boolean",title:String(!!n.options.isMobile),children:String(!!n.options.isMobile)})]}),n.options.deviceScaleFactor&&v.jsxs("div",{className:"call-line",children:["device scale:",v.jsx("span",{className:"call-value number",title:String(n.options.deviceScaleFactor),children:String(n.options.deviceScaleFactor)})]}),v.jsx("div",{className:"call-section",children:"Counts"}),v.jsxs("div",{className:"call-line",children:["pages:",v.jsx("span",{className:"call-value number",children:n.pages.length})]}),v.jsxs("div",{className:"call-line",children:["actions:",v.jsx("span",{className:"call-value number",children:n.actions.length})]}),v.jsxs("div",{className:"call-line",children:["events:",v.jsx("span",{className:"call-value number",children:n.events.length})]})]})},ON=({annotations:n})=>n.length?v.jsx("div",{className:"annotations-tab",children:n.map((e,i)=>v.jsxs("div",{className:"annotation-item",children:[v.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&v.jsxs("span",{children:[": ",eb(e.description)]})]},`annotation-${i}`))}):v.jsx(ts,{text:"No annotations"}),LN=({sdkLanguage:n,setIsInspecting:e,highlightedElement:i,setHighlightedElement:s})=>{const[l,o]=q.useState(),u=q.useCallback(f=>{const{errors:d}=Bh(eS,f,{prettyErrors:!1}),p=d.map(m=>({message:m.message,line:m.range[1].line,column:m.range[1].col,type:"subtle-error"}));o(p),s({...i,ariaSnapshot:f,lastEdited:"ariaSnapshot"}),e(!1)},[i,s,e]);return v.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[v.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[v.jsx("div",{style:{flex:"auto"},children:"Locator"}),v.jsx(Xt,{icon:"files",title:"Copy locator",onClick:()=>{dy(i.locator||"")}})]}),v.jsx("div",{style:{height:50},children:v.jsx(cr,{text:i.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:f=>{s({...i,locator:f,lastEdited:"locator"}),e(!1)}})}),v.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[v.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),v.jsx(Xt,{icon:"files",title:"Copy snapshot",onClick:()=>{dy(i.ariaSnapshot||"")}})]}),v.jsx("div",{style:{height:150},children:v.jsx(cr,{text:i.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:l,onChange:u})})]})},jN=({className:n,style:e,open:i,isModal:s,minWidth:l,verticalOffset:o,requestClose:u,anchor:f,dataTestId:d,children:p})=>{const m=q.useRef(null),[y,b]=q.useState(0),w=oh(m),T=oh(f),x=RN(w,T,o);return q.useEffect(()=>{const E=N=>{!m.current||!(N.target instanceof Node)||m.current.contains(N.target)||u==null||u()},k=N=>{N.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",E),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",k)}):()=>{}},[i,u]),q.useEffect(()=>{const E=()=>b(k=>k+1);return window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)}},[]),q.useLayoutEffect(()=>{m.current&&(i?s?m.current.showModal():m.current.show():m.current.close())},[i,s]),v.jsx("dialog",{ref:m,style:{position:"fixed",margin:0,zIndex:110,top:x.top,left:x.left,minWidth:l||0,...e},className:n,"data-testid":d,children:p})};function RN(n,e,i=4,s=4){let l=Math.max(s,e.left);l+n.width>window.innerWidth-s&&(l=window.innerWidth-n.width-s);let o=Math.max(0,e.bottom)+i;return o+n.height>window.innerHeight-i&&(Math.max(0,e.top)>n.height+i?o=Math.max(0,e.top)-n.height-i:o=window.innerHeight-i-n.height),{left:l,top:o}}const DN=({title:n,icon:e,dialogDataTestId:i,children:s})=>{const l=q.useRef(null),[o,u]=q.useState(!1);return v.jsxs(v.Fragment,{children:[v.jsx(Xt,{ref:l,icon:e,title:n,onClick:()=>u(f=>!f)}),v.jsx(jN,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:o,verticalOffset:8,requestClose:()=>u(!1),anchor:l,dataTestId:i,children:s})]})},lS=({settings:n})=>v.jsx("div",{className:"vbox settings-view",children:n.map(e=>{const i=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return v.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:BN(e,i)},e.name)})}),BN=(n,e)=>{switch(n.type){case"check":return v.jsxs(v.Fragment,{children:[v.jsx("input",{type:"checkbox",id:e,checked:n.value,onChange:()=>n.set(!n.value)}),v.jsxs("label",{htmlFor:e,children:[n.name,!!n.count&&v.jsx("span",{className:"setting-counter",children:n.count})]})]});case"select":return v.jsxs(v.Fragment,{children:[v.jsxs("label",{htmlFor:e,children:[n.name,":",!!n.count&&v.jsx("span",{className:"setting-counter",children:n.count})]}),v.jsx("select",{id:e,value:n.value,onChange:i=>n.set(i.target.value),children:n.options.map(i=>v.jsx("option",{value:i.value,children:i.label},i.value))})]});default:return null}},KN=({model:n,showSourcesFirst:e,rootDir:i,fallbackLocation:s,isLive:l,hideTimeline:o,status:u,annotations:f,inert:d,onOpenExternally:p,revealSource:m,testRunMetadata:y})=>{var Ei;const[b,w]=q.useState(void 0),[T,x]=q.useState(void 0),[E,k]=q.useState(void 0),[N,V]=q.useState(),[$,B]=q.useState(),[Y,J]=q.useState(),[I,j]=q.useState("actions"),[te,re]=xn("propertiesTab",e?"source":"call"),[L,F]=q.useState(!1),[ge,me]=q.useState({lastEdited:"none"}),[z,Z]=q.useState(),[ne,Se]=xn("propertiesSidebarLocation","bottom"),[C]=xn("actionsFilter",[]),X=q.useCallback(le=>{w(le==null?void 0:le.callId),x(void 0)},[]),Q=q.useMemo(()=>n==null?void 0:n.filteredActions(C),[n,C]),W=((n==null?void 0:n.actions.length)??0)-((Q==null?void 0:Q.length)??0),se=q.useMemo(()=>Q==null?void 0:Q.find(le=>le.callId===N),[Q,N]),ve=q.useCallback(le=>{V(le==null?void 0:le.callId)},[]),ue=q.useMemo(()=>(n==null?void 0:n.sources)||new Map,[n]);q.useEffect(()=>{Z(void 0),x(void 0)},[n]);const We=q.useMemo(()=>{if(b){const dt=Q==null?void 0:Q.find(At=>At.callId===b);if(dt)return dt}const le=n==null?void 0:n.failedAction();if(le)return le;if(Q!=null&&Q.length){let dt=Q.length-1;for(let At=0;At<Q.length;++At)if(Q[At].title==="After Hooks"&&At){dt=At-1;break}return Q[dt]}},[n,Q,b]),xe=q.useMemo(()=>se||We,[We,se]),gn=q.useMemo(()=>T?T.stack:xe==null?void 0:xe.stack,[xe,T]),ss=q.useCallback(le=>{X(le),ve(void 0)},[X,ve]),ht=q.useCallback(le=>{re(le),le!=="inspector"&&F(!1)},[re]),rs=q.useCallback(le=>{!L&&le&&ht("inspector"),F(le)},[F,ht,L]),xr=q.useCallback(le=>{me(le),ht("inspector")},[ht]),_r=q.useCallback(le=>{ht("attachments"),k(dt=>{if(!dt)return[le,0];const At=dt[1];return[le,At+1]})},[ht]);q.useEffect(()=>{m&&ht("source")},[m,ht]);const Er=b_(n,z),sl=V_(n,z),Ut=d_(n),Xn=(n==null?void 0:n.sdkLanguage)||"javascript",rl={id:"inspector",title:"Locator",render:()=>v.jsx(LN,{sdkLanguage:Xn,setIsInspecting:rs,highlightedElement:ge,setHighlightedElement:me})},al={id:"call",title:"Call",render:()=>v.jsx(jx,{action:xe,startTimeOffset:(n==null?void 0:n.startTime)??0,sdkLanguage:Xn})},as={id:"log",title:"Log",render:()=>v.jsx(Bx,{action:xe,isLive:l})},xc={id:"errors",title:"Errors",errorCount:Ut.errors.size,render:()=>v.jsx(g_,{errorsModel:Ut,model:n,testRunMetadata:y,sdkLanguage:Xn,revealInSource:le=>{le.action?X(le.action):x(le),ht("source")},wallTime:(n==null?void 0:n.wallTime)??0})};let Tr;!We&&s&&(Tr=(Ei=s.source)==null?void 0:Ei.errors.length);const Ar={id:"source",title:"Source",errorCount:Tr,render:()=>v.jsx(u_,{stack:gn,sources:ue,rootDir:i,stackFrameLocation:ne==="bottom"?"right":"bottom",fallbackLocation:s,onOpenExternally:p})},_c={id:"console",title:"Console",count:Er.entries.length,render:()=>v.jsx(v_,{consoleModel:Er,boundaries:rt,selectedTime:z,onAccepted:le=>Z({minimum:le.timestamp,maximum:le.timestamp}),onEntryHovered:J})},_i={id:"network",title:"Network",count:sl.resources.length,render:()=>v.jsx(G_,{boundaries:rt,networkModel:sl,onEntryHovered:B,sdkLanguage:(n==null?void 0:n.sdkLanguage)??"javascript"})},vt={id:"attachments",title:"Attachments",count:n==null?void 0:n.visibleAttachments.length,render:()=>v.jsx(t_,{model:n,revealedAttachment:E})},Tt=[rl,al,as,xc,_c,_i,Ar,vt];if(f!==void 0){const le={id:"annotations",title:"Annotations",count:f.length,render:()=>v.jsx(ON,{annotations:f})};Tt.push(le)}if(e){const le=Tt.indexOf(Ar);Tt.splice(le,1),Tt.splice(1,0,Ar)}const{boundaries:rt}=q.useMemo(()=>{const le={minimum:(n==null?void 0:n.startTime)||0,maximum:(n==null?void 0:n.endTime)||3e4};return le.minimum>le.maximum&&(le.minimum=0,le.maximum=3e4),le.maximum+=(le.maximum-le.minimum)/20,{boundaries:le}},[n]);let ls=0;!l&&n&&n.endTime>=0?ls=n.endTime-n.startTime:n&&n.wallTime&&(ls=Date.now()-n.wallTime);const Ec={id:"actions",title:"Actions",component:v.jsxs("div",{className:"vbox",children:[u&&v.jsxs("div",{className:"workbench-run-status",children:[v.jsx("span",{className:Ke("codicon",Z0(u))}),v.jsx("div",{children:kx(u)}),v.jsx("div",{className:"spacer"}),v.jsx("div",{className:"workbench-run-duration",children:ls?_t(ls):""})]}),v.jsx(Ox,{sdkLanguage:Xn,actions:Q||[],selectedAction:n?We:void 0,selectedTime:z,setSelectedTime:Z,onSelected:ss,onHighlighted:ve,revealAttachment:_r,revealConsole:()=>ht("console"),isLive:l}),v.jsxs("div",{className:"workbench-actions-status-bar",children:[!!W&&v.jsxs("span",{className:"workbench-actions-hidden-count",title:W+" actions hidden by filters",children:[W," hidden"]}),v.jsx(UN,{counters:n==null?void 0:n.actionCounters})]})]})},Tc={id:"metadata",title:"Metadata",component:v.jsx(MN,{model:n})};return v.jsxs("div",{className:"vbox workbench",...d?{inert:!0}:{},children:[!o&&v.jsx(NN,{model:n,consoleEntries:Er.entries,boundaries:rt,highlightedAction:se,highlightedEntry:$,highlightedConsoleEntry:Y,onSelected:ss,sdkLanguage:Xn,selectedTime:z,setSelectedTime:Z}),v.jsx($o,{sidebarSize:250,orientation:ne==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:v.jsx($o,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:v.jsx(mN,{action:xe,model:n,sdkLanguage:Xn,testIdAttributeName:(n==null?void 0:n.testIdAttributeName)||"data-testid",isInspecting:L,setIsInspecting:rs,highlightedElement:ge,setHighlightedElement:xr}),sidebar:v.jsx(dh,{tabs:[Ec,Tc],selectedTab:I,setSelectedTab:j})}),sidebar:v.jsx(dh,{tabs:Tt,selectedTab:te,setSelectedTab:ht,rightToolbar:[ne==="bottom"?v.jsx(Xt,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{Se("right")}}):v.jsx(Xt,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{Se("bottom")}})],mode:ne==="bottom"?"default":"select"})})]})},UN=({counters:n})=>{const[e,i]=xn("actionsFilter",[]);return v.jsx(DN,{icon:"filter",title:"Filter actions",dialogDataTestId:"actions-filter-dialog",children:v.jsx(lS,{settings:[{type:"check",value:e.includes("getter"),set:s=>i(s?[...e,"getter"]:e.filter(l=>l!=="getter")),name:"Getters",count:n==null?void 0:n.get("getter")},{type:"check",value:e.includes("route"),set:s=>i(s?[...e,"route"]:e.filter(l=>l!=="route")),name:"Network routes",count:n==null?void 0:n.get("route")},{type:"check",value:e.includes("configuration"),set:s=>i(s?[...e,"configuration"]:e.filter(l=>l!=="configuration")),name:"Configuration",count:n==null?void 0:n.get("configuration")}]})})};var b0;(n=>{function e(i){for(const s of i.splice(0))s.dispose()}n.disposeAll=e})(b0||(b0={}));class La{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let s=!1;const l=this,o={dispose(){s||(s=!0,l._listeners.delete(e))}};return i&&i.push(o),o}}fire(e){const i=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const s of this._listeners)this._deliveryQueue.push({listener:s,event:e});if(i){for(let s=0;s<this._deliveryQueue.length;s++){const{listener:l,event:o}=this._deliveryQueue[s];l.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class YN{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",i=>e(i.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class XN{constructor(e){this._onCloseEmitter=new La,this._onReportEmitter=new La,this._onStdioEmitter=new La,this._onTestFilesChangedEmitter=new La,this._onLoadTraceRequestedEmitter=new La,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this._transport=e,this._transport.onmessage(s=>{const l=JSON.parse(s),{id:o,result:u,error:f,method:d,params:p}=l;if(o){const m=this._callbacks.get(o);if(!m)return;this._callbacks.delete(o),f?m.reject(new Error(f)):m.resolve(u)}else this._dispatchEvent(d,p)});const i=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((s,l)=>{this._transport.onopen(s),this._transport.onerror(l)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(i)})}isClosed(){return this._isClosed}async _sendMessage(e,i){const s=globalThis.__logForTest;s==null||s({method:e,params:i}),await this._connectedPromise;const l=++this._lastId,o={id:l,method:e,params:i};return this._transport.send(JSON.stringify(o)),new Promise((u,f)=>{this._callbacks.set(l,{resolve:u,reject:f})})}_sendMessageNoReply(e,i){this._sendMessage(e,i).catch(()=>{})}_dispatchEvent(e,i){e==="report"?this._onReportEmitter.fire(i):e==="stdio"?this._onStdioEmitter.fire(i):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(i):e==="loadTraceRequested"&&this._onLoadTraceRequestedEmitter.fire(i)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async startDevServer(e){return await this._sendMessage("startDevServer",e)}async stopDevServer(e){return await this._sendMessage("stopDevServer",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const PN=()=>{const[n,e]=xn("shouldPopulateCanvasFromScreenshot",!1),[i,s]=Ow(),[l,o]=xn("mergeFiles",!1);return v.jsx(lS,{settings:[{type:"check",value:i,set:s,name:"Dark mode"},{type:"check",value:l,set:o,name:"Merge files"},{type:"check",value:n,set:e,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{DN as D,Jx as E,VN as M,Yt as R,$o as S,XN as T,YN as W,Kx as _,PN as a,KN as b,jN as c,zN as d,IN as e,ch as f,qN as g,$N as h,Ke as i,v as j,Nx as k,Dh as l,_t as m,Xt as n,xn as o,lS as p,_w as q,q as r,Ki as s,Z0 as t,es as u};
|