From 9169e5177e29a705583c7c312741e696a7cc11e5 Mon Sep 17 00:00:00 2001 From: Aetherinox Date: Sat, 5 Apr 2025 07:25:36 -0700 Subject: [PATCH] build: bump to v1.1.1 --- tvapp2/node_modules/.package-lock.json | 3267 ++++++++++++++++- .../playwright-core/browsers.json | 32 +- tvapp2/node_modules/playwright-core/index.js | 1 - .../playwright-core/lib/androidServerImpl.js | 8 +- .../playwright-core/lib/browserServerImpl.js | 27 +- .../playwright-core/lib/cli/driver.js | 12 +- .../playwright-core/lib/cli/program.js | 18 +- .../lib/cli/programWithTestStub.js | 3 +- .../playwright-core/lib/client/android.js | 95 +- .../playwright-core/lib/client/artifact.js | 11 +- .../playwright-core/lib/client/browser.js | 29 +- .../lib/client/browserContext.js | 133 +- .../playwright-core/lib/client/browserType.js | 94 +- .../lib/client/channelOwner.js | 43 +- .../lib/client/clientHelper.js | 10 +- .../playwright-core/lib/client/connection.js | 85 +- .../lib/client/consoleMessage.js | 11 +- .../playwright-core/lib/client/electron.js | 20 +- .../lib/client/elementHandle.js | 65 +- .../playwright-core/lib/client/errors.js | 4 +- .../lib/client/eventEmitter.js | 13 +- .../playwright-core/lib/client/fetch.js | 121 +- .../playwright-core/lib/client/frame.js | 51 +- .../playwright-core/lib/client/harRouter.js | 16 +- .../playwright-core/lib/client/jsHandle.js | 7 +- .../playwright-core/lib/client/localUtils.js | 24 + .../playwright-core/lib/client/locator.js | 33 +- .../playwright-core/lib/client/network.js | 82 +- .../playwright-core/lib/client/page.js | 85 +- .../playwright-core/lib/client/playwright.js | 22 +- .../playwright-core/lib/client/selectors.js | 10 +- .../playwright-core/lib/client/stream.js | 23 +- .../playwright-core/lib/client/tracing.js | 17 +- .../playwright-core/lib/client/video.js | 4 +- .../playwright-core/lib/client/waiter.js | 11 +- .../playwright-core/lib/client/worker.js | 8 +- .../lib/client/writableStream.js | 23 +- .../playwright-core/lib/common/socksProxy.js | 569 --- .../lib/common/timeoutSettings.js | 73 - .../playwright-core/lib/common/types.js | 5 - .../lib/generated/consoleApiSource.js | 2 +- .../lib/generated/injectedScriptSource.js | 2 +- .../lib/image_tools/colorUtils.js | 98 - .../lib/image_tools/compare.js | 108 - .../lib/image_tools/imageChannel.js | 70 - .../playwright-core/lib/image_tools/stats.js | 102 - .../playwright-core/lib/inProcessFactory.js | 11 +- .../playwright-core/lib/outofprocess.js | 20 +- .../playwright-core/lib/protocol/transport.js | 82 - .../playwright-core/lib/protocol/validator.js | 59 +- .../lib/protocol/validatorPrimitives.js | 3 +- .../lib/remote/playwrightConnection.js | 30 +- .../lib/remote/playwrightServer.js | 27 +- .../lib/server/android/android.js | 35 +- .../lib/server/android/backendAdb.js | 28 +- .../playwright-core/lib/server/artifact.js | 6 +- .../lib/server/bidi/bidiBrowser.js | 4 +- .../lib/server/bidi/bidiChromium.js | 7 +- .../lib/server/bidi/bidiConnection.js | 2 +- .../lib/server/bidi/bidiExecutionContext.js | 110 +- .../lib/server/bidi/bidiFirefox.js | 7 +- .../lib/server/bidi/bidiInput.js | 13 +- .../lib/server/bidi/bidiNetworkManager.js | 6 +- .../lib/server/bidi/bidiOverCdp.js | 4 +- .../lib/server/bidi/bidiPage.js | 82 +- .../server/bidi/third_party/firefoxPrefs.js | 22 +- .../playwright-core/lib/server/browser.js | 4 +- .../lib/server/browserContext.js | 77 +- .../playwright-core/lib/server/browserType.js | 35 +- .../lib/server/chromium/chromium.js | 28 +- .../lib/server/chromium/chromiumSwitches.js | 41 +- .../lib/server/chromium/crBrowser.js | 29 +- .../lib/server/chromium/crConnection.js | 4 +- .../lib/server/chromium/crCoverage.js | 2 +- .../lib/server/chromium/crDevTools.js | 2 +- .../lib/server/chromium/crDragDrop.js | 2 +- .../lib/server/chromium/crExecutionContext.js | 42 +- .../lib/server/chromium/crInput.js | 4 +- .../lib/server/chromium/crNetworkManager.js | 8 +- .../lib/server/chromium/crPage.js | 41 +- .../lib/server/chromium/crPdf.js | 2 +- .../lib/server/chromium/crProtocolHelper.js | 6 +- .../lib/server/chromium/crServiceWorker.js | 4 +- .../lib/server/chromium/videoRecorder.js | 6 +- .../playwright-core/lib/server/clock.js | 2 +- .../lib/server/codegen/javascript.js | 2 +- .../lib/server/codegen/languages.js | 4 +- .../lib/server/debugController.js | 8 +- .../lib/server/deviceDescriptors.js | 2 +- .../lib/server/deviceDescriptorsSource.json | 274 +- .../server/dispatchers/androidDispatcher.js | 2 +- .../server/dispatchers/artifactDispatcher.js | 6 +- .../dispatchers/browserContextDispatcher.js | 44 +- .../dispatchers/browserTypeDispatcher.js | 2 +- .../dispatchers/cdpSessionDispatcher.js | 2 +- .../lib/server/dispatchers/dispatcher.js | 52 +- .../server/dispatchers/electronDispatcher.js | 6 +- .../dispatchers/elementHandlerDispatcher.js | 11 +- .../lib/server/dispatchers/frameDispatcher.js | 2 - .../server/dispatchers/jsonPipeDispatcher.js | 4 +- .../dispatchers/localUtilsDispatcher.js | 323 +- .../server/dispatchers/networkDispatchers.js | 6 +- .../lib/server/dispatchers/pageDispatcher.js | 18 +- .../dispatchers/playwrightDispatcher.js | 10 +- .../server/dispatchers/streamDispatcher.js | 7 +- .../dispatchers/webSocketRouteDispatcher.js | 15 +- .../dispatchers/writableStreamDispatcher.js | 11 +- .../playwright-core/lib/server/dom.js | 30 +- .../playwright-core/lib/server/download.js | 2 +- .../lib/server/electron/electron.js | 33 +- .../playwright-core/lib/server/errors.js | 2 +- .../playwright-core/lib/server/fetch.js | 61 +- .../lib/server/fileUploadUtils.js | 11 +- .../lib/server/firefox/ffBrowser.js | 10 +- .../lib/server/firefox/ffConnection.js | 2 +- .../lib/server/firefox/ffExecutionContext.js | 42 +- .../lib/server/firefox/ffNetworkManager.js | 4 +- .../lib/server/firefox/ffPage.js | 36 +- .../lib/server/firefox/firefox.js | 16 +- .../lib/server/frameSelectors.js | 2 +- .../playwright-core/lib/server/frames.js | 27 +- .../lib/server/har/harRecorder.js | 8 +- .../lib/server/har/harTracer.js | 15 +- .../playwright-core/lib/server/helper.js | 4 +- .../playwright-core/lib/server/index.js | 9 +- .../playwright-core/lib/server/input.js | 2 +- .../lib/server/instrumentation.js | 4 +- .../isomorphic/utilityScriptSerializers.js | 3 + .../playwright-core/lib/server/javascript.js | 53 +- .../playwright-core/lib/server/launchApp.js | 4 +- .../playwright-core/lib/server/network.js | 6 +- .../playwright-core/lib/server/page.js | 45 +- .../lib/server/pipeTransport.js | 2 +- .../playwright-core/lib/server/playwright.js | 16 +- .../playwright-core/lib/server/progress.js | 2 +- .../lib/server/protocolError.js | 2 +- .../playwright-core/lib/server/recorder.js | 12 +- .../lib/server/recorder/contextRecorder.js | 6 +- .../lib/server/recorder/recorderApp.js | 30 +- .../lib/server/recorder/recorderCollection.js | 6 +- .../lib/server/recorder/throttledFile.js | 7 +- .../lib/server/registry/browserFetcher.js | 16 +- .../lib/server/registry/dependencies.js | 30 +- .../lib/server/registry/index.js | 82 +- .../server/registry/oopDownloadBrowserMain.js | 6 +- .../lib/server/screenshotter.js | 2 +- .../playwright-core/lib/server/selectors.js | 6 +- .../socksClientCertificatesInterceptor.js | 20 +- .../lib/server/socksInterceptor.js | 13 +- .../lib/server/trace/recorder/snapshotter.js | 17 +- .../lib/server/trace/recorder/tracing.js | 71 +- .../server/trace/test/inMemorySnapshotter.js | 8 +- .../lib/server/trace/viewer/traceViewer.js | 18 +- .../playwright-core/lib/server/transport.js | 4 +- .../lib/server/webkit/webkit.js | 8 +- .../lib/server/webkit/wkBrowser.js | 8 +- .../lib/server/webkit/wkConnection.js | 2 +- .../lib/server/webkit/wkExecutionContext.js | 42 +- .../lib/server/webkit/wkInput.js | 4 +- .../server/webkit/wkInterceptableRequest.js | 4 +- .../lib/server/webkit/wkPage.js | 81 +- .../lib/server/webkit/wkProvisionalPage.js | 2 +- .../lib/server/webkit/wkWorkers.js | 4 +- .../playwright-core/lib/utils/ascii.js | 31 - .../playwright-core/lib/utils/comparators.js | 159 - .../playwright-core/lib/utils/crypto.js | 171 - .../playwright-core/lib/utils/debug.js | 46 - .../playwright-core/lib/utils/debugLogger.js | 93 - .../playwright-core/lib/utils/env.js | 49 - .../playwright-core/lib/utils/eventsHelper.js | 38 - .../playwright-core/lib/utils/expectUtils.js | 33 - .../playwright-core/lib/utils/fileUtils.js | 205 -- .../lib/utils/happy-eyeballs.js | 194 - .../playwright-core/lib/utils/headers.js | 52 - .../playwright-core/lib/utils/hostPlatform.js | 145 - .../playwright-core/lib/utils/httpServer.js | 233 -- .../playwright-core/lib/utils/index.js | 368 -- .../lib/utils/isomorphic/ariaSnapshot.js | 3 +- .../lib/utils/isomorphic/cssParser.js | 2 +- .../lib/utils/isomorphic/locatorGenerators.js | 14 +- .../lib/utils/isomorphic/locatorParser.js | 4 +- .../lib/utils/isomorphic/mimeType.js | 14 +- .../lib/utils/isomorphic/stringUtils.js | 2 +- .../lib/utils/isomorphic/traceUtils.js | 23 + .../playwright-core/lib/utils/linuxUtils.js | 78 - .../lib/utils/manualPromise.js | 109 - .../playwright-core/lib/utils/multimap.js | 75 - .../playwright-core/lib/utils/network.js | 160 - .../lib/utils/processLauncher.js | 248 -- .../playwright-core/lib/utils/profiler.js | 53 - .../playwright-core/lib/utils/rtti.js | 44 - .../playwright-core/lib/utils/semaphore.js | 51 - .../playwright-core/lib/utils/sequence.js | 64 - .../playwright-core/lib/utils/spawnAsync.js | 45 - .../playwright-core/lib/utils/stackTrace.js | 134 - .../playwright-core/lib/utils/task.js | 58 - .../playwright-core/lib/utils/time.js | 37 - .../lib/utils/timeoutRunner.js | 66 - .../playwright-core/lib/utils/traceUtils.js | 44 - .../playwright-core/lib/utils/userAgent.js | 105 - .../playwright-core/lib/utils/wsServer.js | 128 - .../playwright-core/lib/utils/zipFile.js | 75 - .../playwright-core/lib/utils/zones.js | 69 - .../playwright-core/lib/utilsBundle.js | 26 +- .../lib/utilsBundleImpl/index.js | 230 +- .../lib/vite/htmlReport/index.html | 40 +- .../assets/codeMirrorModule-D5R_qtw3.js | 24 - .../vite/recorder/assets/index-DsR8Oo9k.js | 184 - .../lib/vite/recorder/index.html | 2 +- .../assets/codeMirrorModule-CyuxU5C-.js | 24 - .../assets/defaultSettingsView-5nVJRt0A.js | 243 -- .../assets/xtermModule-c-SNdYZy.js | 9 - .../defaultSettingsView.2xeEXCXv.css | 1 - .../lib/vite/traceViewer/index.html | 6 +- .../lib/vite/traceViewer/index.qVn2ZnpC.js | 2 - .../lib/vite/traceViewer/sw.bundle.js | 6 +- .../lib/vite/traceViewer/uiMode.html | 6 +- .../lib/vite/traceViewer/uiMode.m4IPRPOd.js | 5 - .../playwright-core/lib/zipBundleImpl.js | 8 +- .../node_modules/playwright-core/package.json | 14 +- .../playwright-core/types/protocol.d.ts | 222 +- .../playwright-core/types/types.d.ts | 128 +- tvapp2/node_modules/playwright/.eslintrc.js | 6 - tvapp2/node_modules/playwright/README.md | 8 +- .../playwright/lib/common/config.js | 18 +- .../playwright/lib/common/configLoader.js | 31 +- .../playwright/lib/common/esmLoaderHost.js | 4 +- .../playwright/lib/common/expectBundleImpl.js | 66 +- .../playwright/lib/common/fixtures.js | 7 +- .../node_modules/playwright/lib/common/ipc.js | 5 +- .../playwright/lib/common/suiteUtils.js | 7 +- .../playwright/lib/common/testLoader.js | 8 +- .../playwright/lib/common/testType.js | 25 +- tvapp2/node_modules/playwright/lib/index.js | 242 +- .../playwright/lib/internalsForTest.js | 2 +- .../playwright/lib/isomorphic/teleReceiver.js | 8 +- .../lib/isomorphic/testServerConnection.js | 2 +- .../playwright/lib/loader/loaderMain.js | 4 +- .../playwright/lib/matchers/expect.js | 114 +- .../playwright/lib/matchers/matcherHint.js | 3 +- .../playwright/lib/matchers/matchers.js | 10 +- .../playwright/lib/matchers/toEqual.js | 2 +- .../lib/matchers/toMatchAriaSnapshot.js | 19 +- .../lib/matchers/toMatchSnapshot.js | 46 +- .../playwright/lib/matchers/toMatchText.js | 6 +- .../lib/plugins/gitCommitInfoPlugin.js | 192 +- .../playwright/lib/plugins/index.js | 9 +- .../playwright/lib/plugins/webServerPlugin.js | 8 +- tvapp2/node_modules/playwright/lib/program.js | 68 +- .../playwright/lib/reporters/base.js | 115 +- .../playwright/lib/reporters/blob.js | 6 +- .../playwright/lib/reporters/github.js | 10 +- .../playwright/lib/reporters/html.js | 40 +- .../lib/reporters/internalReporter.js | 8 +- .../playwright/lib/reporters/json.js | 5 +- .../playwright/lib/reporters/junit.js | 9 +- .../playwright/lib/reporters/line.js | 4 +- .../playwright/lib/reporters/list.js | 5 +- .../playwright/lib/reporters/markdown.js | 2 +- .../playwright/lib/reporters/merge.js | 10 +- .../playwright/lib/reporters/teleEmitter.js | 13 +- .../playwright/lib/runner/dispatcher.js | 9 +- .../playwright/lib/runner/lastRun.js | 2 +- .../playwright/lib/runner/loadUtils.js | 8 +- .../playwright/lib/runner/loaderHost.js | 6 +- .../playwright/lib/runner/processHost.js | 6 +- .../playwright/lib/runner/projectUtils.js | 4 +- .../playwright/lib/runner/rebase.js | 10 +- .../playwright/lib/runner/reporters.js | 11 +- .../playwright/lib/runner/runner.js | 10 +- .../playwright/lib/runner/sigIntWatcher.js | 14 +- .../playwright/lib/runner/taskRunner.js | 4 +- .../playwright/lib/runner/tasks.js | 20 +- .../playwright/lib/runner/testServer.js | 20 +- .../node_modules/playwright/lib/runner/vcs.js | 4 +- .../playwright/lib/runner/watchMode.js | 67 +- .../playwright/lib/runner/workerHost.js | 8 +- .../lib/third_party/tsconfig-loader.js | 23 +- .../lib/transform/babelBundleImpl.js | 6 +- .../lib/transform/compilationCache.js | 4 +- .../playwright/lib/transform/esmLoader.js | 10 +- .../playwright/lib/transform/esmUtils.js | 2 +- .../playwright/lib/transform/transform.js | 17 +- tvapp2/node_modules/playwright/lib/util.js | 37 +- .../playwright/lib/utilsBundleImpl.js | 4 +- .../playwright/lib/worker/fixtureRunner.js | 39 +- .../playwright/lib/worker/testInfo.js | 139 +- .../playwright/lib/worker/testTracing.js | 49 +- .../playwright/lib/worker/timeoutManager.js | 12 +- .../playwright/lib/worker/workerMain.js | 160 +- tvapp2/node_modules/playwright/package.json | 4 +- .../node_modules/playwright/types/test.d.ts | 238 +- .../playwright/types/testReporter.d.ts | 16 + tvapp2/node_modules/user-agents/dist/index.js | 2 +- .../user-agents/dist/index.js.map | 2 +- tvapp2/node_modules/user-agents/package.json | 2 +- .../user-agents/src/user-agents.json.gz | Bin 157864 -> 212099 bytes tvapp2/package-lock.json | 4 +- tvapp2/package.json | 2 +- 299 files changed, 6759 insertions(+), 8282 deletions(-) delete mode 100755 tvapp2/node_modules/playwright-core/lib/common/socksProxy.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/common/timeoutSettings.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/common/types.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/image_tools/colorUtils.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/image_tools/compare.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/image_tools/imageChannel.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/image_tools/stats.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/protocol/transport.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/ascii.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/comparators.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/crypto.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/debug.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/debugLogger.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/env.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/eventsHelper.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/expectUtils.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/fileUtils.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/happy-eyeballs.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/headers.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/hostPlatform.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/httpServer.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/index.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/linuxUtils.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/manualPromise.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/multimap.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/network.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/processLauncher.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/profiler.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/rtti.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/semaphore.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/sequence.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/spawnAsync.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/stackTrace.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/task.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/time.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/timeoutRunner.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/traceUtils.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/userAgent.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/wsServer.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/zipFile.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/utils/zones.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-D5R_qtw3.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/vite/recorder/assets/index-DsR8Oo9k.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-CyuxU5C-.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-5nVJRt0A.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-c-SNdYZy.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.2xeEXCXv.css delete mode 100755 tvapp2/node_modules/playwright-core/lib/vite/traceViewer/index.qVn2ZnpC.js delete mode 100755 tvapp2/node_modules/playwright-core/lib/vite/traceViewer/uiMode.m4IPRPOd.js delete mode 100755 tvapp2/node_modules/playwright/.eslintrc.js diff --git a/tvapp2/node_modules/.package-lock.json b/tvapp2/node_modules/.package-lock.json index 4c2670bb..450c2a86 100755 --- a/tvapp2/node_modules/.package-lock.json +++ b/tvapp2/node_modules/.package-lock.json @@ -1,13 +1,13 @@ { "name": "tvapp2", - "version": "1.0.0", + "version": "1.1.1", "lockfileVersion": 3, "requires": true, "packages": { "node_modules/@babel/runtime": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz", - "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.0.tgz", + "integrity": "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==", "dev": true, "license": "MIT", "dependencies": { @@ -17,6 +17,258 @@ "node": ">=6.9.0" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.5.1.tgz", + "integrity": "sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz", + "integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz", + "integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.12.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz", + "integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", + "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@stylistic/eslint-plugin-js": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-3.1.0.tgz", + "integrity": "sha512-lQktsOiCr8S6StG29C5fzXYxLOD6ID1rp4j6TRS+E/qY1xd59Fm7dy5qm9UauJIEoSTlYx6yGsCHYh5UkgXPyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/uuid": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-10.0.0.tgz", @@ -24,6 +276,46 @@ "dev": true, "license": "MIT" }, + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/all-contributors-cli": { "version": "6.26.1", "resolved": "https://registry.npmjs.org/all-contributors-cli/-/all-contributors-cli-6.26.1.tgz", @@ -52,6 +344,23 @@ "prettier": "^2" } }, + "node_modules/all-contributors-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -82,7 +391,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -94,13 +402,241 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", + "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, "license": "MIT" }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -112,17 +648,12 @@ } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -174,7 +705,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -187,7 +717,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, "license": "MIT" }, "node_modules/commander": { @@ -200,6 +729,12 @@ "node": ">= 6" } }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -215,6 +750,78 @@ "node": ">= 8" } }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -225,6 +832,49 @@ "node": ">=0.10.0" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -232,6 +882,49 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -239,6 +932,20 @@ "dev": true, "license": "MIT" }, + "node_modules/enhanced-resolve": { + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/env-cmd": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/env-cmd/-/env-cmd-10.1.0.tgz", @@ -256,14 +963,589 @@ "node": ">=8.0.0" } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/es-abstract": { + "version": "1.23.9", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.9.tgz", + "integrity": "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.0", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.18" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.8.0" + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", + "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.17.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-compat-utils": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", + "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "eslint": ">=6.0.0" + } + }, + "node_modules/eslint-compat-utils/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-chai-friendly": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-1.0.1.tgz", + "integrity": "sha512-dxD/uz1YKJ8U4yah1i+V/p/u+kHRy3YxTPe2nJGqb5lCR+ucan/KIexfZ5+q4X+tkllyMe86EBbAkdlwxNy3oQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "eslint": ">=3.0.0" + } + }, + "node_modules/eslint-plugin-es-x": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz", + "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/ota-meshi", + "https://opencollective.com/eslint" + ], + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.1.2", + "@eslint-community/regexpp": "^4.11.0", + "eslint-compat-utils": "^0.5.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": ">=8" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-n": { + "version": "17.15.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.15.0.tgz", + "integrity": "sha512-xF3zJkOfLlFOm5TvmqmsnA9/fO+/z2pYs0dkuKXKN/ymS6UB1yEcaoIkqxLKQ9Dw/WmLX/Tdh6/5ZS5azVixFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.1", + "enhanced-resolve": "^5.17.1", + "eslint-plugin-es-x": "^7.8.0", + "get-tsconfig": "^4.8.1", + "globals": "^15.11.0", + "ignore": "^5.3.2", + "minimatch": "^9.0.5", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": ">=8.23.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/eslint-plugin-n/node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-n/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/eslint-plugin-n/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-promise": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz", + "integrity": "sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" } }, "node_modules/external-editor": { @@ -281,6 +1563,27 @@ "node": ">=4" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -297,18 +1600,152 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "locate-path": "^5.0.0", + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-caller-file": { @@ -321,16 +1758,232 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", + "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -344,6 +1997,43 @@ "node": ">=0.10.0" } }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inquirer": { "version": "7.3.3", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", @@ -369,6 +2059,199 @@ "node": ">=8.0.0" } }, + "node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -379,6 +2262,220 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", + "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -386,6 +2483,60 @@ "dev": true, "license": "ISC" }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, "node_modules/json-fixer": { "version": "1.6.15", "resolved": "https://registry.npmjs.org/json-fixer/-/json-fixer-1.6.15.tgz", @@ -401,17 +2552,88 @@ "node": ">=10" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/json-fixer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "p-locate": "^4.1.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { @@ -423,8 +2645,24 @@ }, "node_modules/lodash.clonedeep": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } }, "node_modules/mimic-fn": { "version": "2.1.0", @@ -436,6 +2674,44 @@ "node": ">=6" } }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", @@ -443,6 +2719,13 @@ "dev": true, "license": "ISC" }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -464,6 +2747,103 @@ } } }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -480,6 +2860,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -490,33 +2888,54 @@ "node": ">=0.10.0" } }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", "dev": true, "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" }, "engines": { - "node": ">=6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "license": "MIT", "dependencies": { - "p-limit": "^2.2.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-try": { @@ -529,6 +2948,19 @@ "node": ">=6" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -549,6 +2981,13 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, "node_modules/pegjs": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz", @@ -576,12 +3015,12 @@ } }, "node_modules/playwright": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz", - "integrity": "sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==", + "version": "1.51.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.51.1.tgz", + "integrity": "sha512-kkx+MB2KQRkyxjYPc3a0wLZZoDczmppyGJIvQ43l+aZihkaVvmu/21kiyaHeHjiFxjxNNFnUncKmcGIyOojsaw==", "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.50.1" + "playwright-core": "1.51.1" }, "bin": { "playwright": "cli.js" @@ -594,9 +3033,9 @@ } }, "node_modules/playwright-core": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz", - "integrity": "sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==", + "version": "1.51.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.51.1.tgz", + "integrity": "sha512-/crRMj8+j/Nq5s8QcvegseuyeZPxpQCZb6HNk3Sos3BlZyAknRjoyJPFWkpNn8v0+P3WiwqFF8P+zQo4eqiNuw==", "license": "Apache-2.0", "bin": { "playwright-core": "cli.js" @@ -605,6 +3044,26 @@ "node": ">=18" } }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", @@ -622,6 +3081,39 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regenerator-runtime": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", @@ -629,6 +3121,27 @@ "dev": true, "license": "MIT" }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -646,6 +3159,47 @@ "dev": true, "license": "ISC" }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -683,6 +3237,61 @@ "npm": ">=2.0.0" } }, + "node_modules/safe-array-concat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -690,6 +3299,16 @@ "dev": true, "license": "MIT" }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -697,6 +3316,55 @@ "dev": true, "license": "ISC" }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -720,6 +3388,82 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -742,6 +3486,65 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -755,11 +3558,33 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" @@ -768,6 +3593,29 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -795,6 +3643,19 @@ "dev": true, "license": "MIT" }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -802,6 +3663,19 @@ "dev": true, "license": "0BSD" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", @@ -815,10 +3689,117 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/user-agents": { - "version": "1.1.457", - "resolved": "https://registry.npmjs.org/user-agents/-/user-agents-1.1.457.tgz", - "integrity": "sha512-hQvZvQYUiaeAmq0qP71DRnxTd8lLkyokP/MOgN/klwnQoCECQJjVpXH901fb3JXda9qwLIFfmmPbaO18+3zovg==", + "version": "1.1.497", + "resolved": "https://registry.npmjs.org/user-agents/-/user-agents-1.1.497.tgz", + "integrity": "sha512-HF4bW97dI25MWBYY6U07OzGICTmtUfz2UK5KfgP/4DLtupQgCDe6WlL2WQfLk4I6hYDcv45/7ngTmJExYRdHiw==", "license": "BSD-2-Clause", "dependencies": { "lodash.clonedeep": "^4.5.0" @@ -872,6 +3853,73 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/which-module": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", @@ -879,6 +3927,38 @@ "dev": true, "license": "ISC" }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -937,6 +4017,75 @@ "engines": { "node": ">=6" } + }, + "node_modules/yargs/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/tvapp2/node_modules/playwright-core/browsers.json b/tvapp2/node_modules/playwright-core/browsers.json index 0895f005..d21a5aa1 100755 --- a/tvapp2/node_modules/playwright-core/browsers.json +++ b/tvapp2/node_modules/playwright-core/browsers.json @@ -3,31 +3,43 @@ "browsers": [ { "name": "chromium", - "revision": "1155", + "revision": "1161", "installByDefault": true, - "browserVersion": "133.0.6943.16" + "browserVersion": "134.0.6998.35" + }, + { + "name": "chromium-headless-shell", + "revision": "1161", + "installByDefault": true, + "browserVersion": "134.0.6998.35" }, { "name": "chromium-tip-of-tree", - "revision": "1293", + "revision": "1304", "installByDefault": false, - "browserVersion": "133.0.6943.0" + "browserVersion": "135.0.7021.0" + }, + { + "name": "chromium-tip-of-tree-headless-shell", + "revision": "1304", + "installByDefault": false, + "browserVersion": "135.0.7021.0" }, { "name": "firefox", - "revision": "1471", + "revision": "1475", "installByDefault": true, - "browserVersion": "134.0" + "browserVersion": "135.0" }, { "name": "firefox-beta", - "revision": "1467", + "revision": "1471", "installByDefault": false, - "browserVersion": "133.0b9" + "browserVersion": "136.0b4" }, { "name": "webkit", - "revision": "2123", + "revision": "2140", "installByDefault": true, "revisionOverrides": { "debian11-x64": "2105", @@ -41,7 +53,7 @@ "ubuntu20.04-x64": "2092", "ubuntu20.04-arm64": "2092" }, - "browserVersion": "18.2" + "browserVersion": "18.4" }, { "name": "ffmpeg", diff --git a/tvapp2/node_modules/playwright-core/index.js b/tvapp2/node_modules/playwright-core/index.js index 3d246e9f..f8fc62fb 100755 --- a/tvapp2/node_modules/playwright-core/index.js +++ b/tvapp2/node_modules/playwright-core/index.js @@ -19,7 +19,6 @@ const semver = currentNodeVersion.split('.'); const [major] = [+semver[0]]; if (major < minimumMajorNodeVersion) { - // eslint-disable-next-line no-console console.error( 'You are running Node.js ' + currentNodeVersion + diff --git a/tvapp2/node_modules/playwright-core/lib/androidServerImpl.js b/tvapp2/node_modules/playwright-core/lib/androidServerImpl.js index 74ff7794..dca0711b 100755 --- a/tvapp2/node_modules/playwright-core/lib/androidServerImpl.js +++ b/tvapp2/node_modules/playwright-core/lib/androidServerImpl.js @@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.AndroidServerLauncherImpl = void 0; -var _utilsBundle = require("./utilsBundle"); -var _utils = require("./utils"); -var _playwright = require("./server/playwright"); var _playwrightServer = require("./remote/playwrightServer"); +var _playwright = require("./server/playwright"); +var _crypto = require("./server/utils/crypto"); +var _utilsBundle = require("./utilsBundle"); /** * Copyright (c) Microsoft Corporation. * @@ -43,7 +43,7 @@ class AndroidServerLauncherImpl { } if (devices.length > 1) throw new Error(`More than one device found. Please specify deviceSerialNumber`); const device = devices[0]; - const path = options.wsPath ? options.wsPath.startsWith('/') ? options.wsPath : `/${options.wsPath}` : `/${(0, _utils.createGuid)()}`; + const path = options.wsPath ? options.wsPath.startsWith('/') ? options.wsPath : `/${options.wsPath}` : `/${(0, _crypto.createGuid)()}`; // 2. Start the server const server = new _playwrightServer.PlaywrightServer({ diff --git a/tvapp2/node_modules/playwright-core/lib/browserServerImpl.js b/tvapp2/node_modules/playwright-core/lib/browserServerImpl.js index f6101fe3..df7fb530 100755 --- a/tvapp2/node_modules/playwright-core/lib/browserServerImpl.js +++ b/tvapp2/node_modules/playwright-core/lib/browserServerImpl.js @@ -4,15 +4,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.BrowserServerLauncherImpl = void 0; -var _utilsBundle = require("./utilsBundle"); -var _clientHelper = require("./client/clientHelper"); -var _utils = require("./utils"); -var _instrumentation = require("./server/instrumentation"); -var _playwright = require("./server/playwright"); +var _socksProxy = require("./server/utils/socksProxy"); var _playwrightServer = require("./remote/playwrightServer"); var _helper = require("./server/helper"); -var _stackTrace = require("./utils/stackTrace"); -var _socksProxy = require("./common/socksProxy"); +var _instrumentation = require("./server/instrumentation"); +var _playwright = require("./server/playwright"); +var _crypto = require("./server/utils/crypto"); +var _stackTrace = require("./utils/isomorphic/stackTrace"); +var _utilsBundle = require("./utilsBundle"); /** * Copyright (c) Microsoft Corporation. * @@ -49,13 +48,13 @@ class BrowserServerLauncherImpl { ...options, ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined, ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs), - env: options.env ? (0, _clientHelper.envObjectToArray)(options.env) : undefined + env: options.env ? envObjectToArray(options.env) : undefined }, toProtocolLogger(options.logger)).catch(e => { const log = _helper.helper.formatBrowserLogs(metadata.log); (0, _stackTrace.rewriteErrorMessage)(e, `${e.message} Failed to launch browser.${log}`); throw e; }); - const path = options.wsPath ? options.wsPath.startsWith('/') ? options.wsPath : `/${options.wsPath}` : `/${(0, _utils.createGuid)()}`; + const path = options.wsPath ? options.wsPath.startsWith('/') ? options.wsPath : `/${options.wsPath}` : `/${(0, _crypto.createGuid)()}`; // 2. Start the server const server = new _playwrightServer.PlaywrightServer({ @@ -89,4 +88,14 @@ function toProtocolLogger(logger) { return logger ? (direction, message) => { if (logger.isEnabled('protocol', 'verbose')) logger.log('protocol', 'verbose', (direction === 'send' ? 'SEND ► ' : '◀ RECV ') + JSON.stringify(message), [], {}); } : undefined; +} +function envObjectToArray(env) { + const result = []; + for (const name in env) { + if (!Object.is(env[name], undefined)) result.push({ + name, + value: String(env[name]) + }); + } + return result; } \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/cli/driver.js b/tvapp2/node_modules/playwright-core/lib/cli/driver.js index ddbf3e5d..37572259 100755 --- a/tvapp2/node_modules/playwright-core/lib/cli/driver.js +++ b/tvapp2/node_modules/playwright-core/lib/cli/driver.js @@ -9,13 +9,13 @@ exports.runDriver = runDriver; exports.runServer = runServer; var _fs = _interopRequireDefault(require("fs")); var playwright = _interopRequireWildcard(require("../..")); -var _server = require("../server"); -var _transport = require("../protocol/transport"); +var _pipeTransport = require("../server/utils/pipeTransport"); var _playwrightServer = require("../remote/playwrightServer"); -var _processLauncher = require("../utils/processLauncher"); +var _server = require("../server"); +var _processLauncher = require("../server/utils/processLauncher"); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * Copyright (c) Microsoft Corporation. * @@ -48,7 +48,7 @@ function runDriver() { }); return new _server.PlaywrightDispatcher(rootScope, playwright); }); - const transport = new _transport.PipeTransport(process.stdout, process.stdin); + const transport = new _pipeTransport.PipeTransport(process.stdout, process.stdin); transport.onmessage = message => dispatcherConnection.dispatch(JSON.parse(message)); // Certain Language Binding JSON parsers (e.g. .NET) do not like strings with lone surrogates. const isJavaScriptLanguageBinding = !process.env.PW_LANG_NAME || process.env.PW_LANG_NAME === 'javascript'; diff --git a/tvapp2/node_modules/playwright-core/lib/cli/program.js b/tvapp2/node_modules/playwright-core/lib/cli/program.js index c7afd791..465dbd75 100755 --- a/tvapp2/node_modules/playwright-core/lib/cli/program.js +++ b/tvapp2/node_modules/playwright-core/lib/cli/program.js @@ -12,16 +12,16 @@ Object.defineProperty(exports, "program", { var _fs = _interopRequireDefault(require("fs")); var _os = _interopRequireDefault(require("os")); var _path = _interopRequireDefault(require("path")); -var _utilsBundle = require("../utilsBundle"); -var _driver = require("./driver"); -var _traceViewer = require("../server/trace/viewer/traceViewer"); var playwright = _interopRequireWildcard(require("../..")); -var _utils = require("../utils"); +var _driver = require("./driver"); var _server = require("../server"); -var _errors = require("../client/errors"); +var _utils = require("../utils"); +var _traceViewer = require("../server/trace/viewer/traceViewer"); +var _ascii = require("../server/utils/ascii"); +var _utilsBundle = require("../utilsBundle"); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * Copyright (c) Microsoft Corporation. * @@ -97,7 +97,7 @@ _utilsBundle.program.command('install [browser...]').description('ensure browser // For '--no-shell' option, commander sets `shell: false` instead. if (options.shell === false) options.noShell = true; if ((0, _utils.isLikelyNpxGlobal)()) { - console.error((0, _utils.wrapInASCIIBox)([`WARNING: It looks like you are running 'npx playwright install' without first`, `installing your project's dependencies.`, ``, `To avoid unexpected behavior, please install your dependencies first, and`, `then run Playwright's install command:`, ``, ` npm install`, ` npx playwright install`, ``, `If your project does not yet depend on Playwright, first install the`, `applicable npm package (most commonly @playwright/test), and`, `then run Playwright's install command to download the browsers:`, ``, ` npm install @playwright/test`, ` npx playwright install`, ``].join('\n'), 1)); + console.error((0, _ascii.wrapInASCIIBox)([`WARNING: It looks like you are running 'npx playwright install' without first`, `installing your project's dependencies.`, ``, `To avoid unexpected behavior, please install your dependencies first, and`, `then run Playwright's install command:`, ``, ` npm install`, ` npx playwright install`, ``, `If your project does not yet depend on Playwright, first install the`, `applicable npm package (most commonly @playwright/test), and`, `then run Playwright's install command to download the browsers:`, ``, ` npm install @playwright/test`, ` npx playwright install`, ``].join('\n'), 1)); } try { const hasNoArguments = !args.length; @@ -408,7 +408,7 @@ async function openPage(context, url) { if (url) { if (_fs.default.existsSync(url)) url = 'file://' + _path.default.resolve(url);else if (!url.startsWith('http') && !url.startsWith('file://') && !url.startsWith('about:') && !url.startsWith('data:')) url = 'http://' + url; await page.goto(url).catch(error => { - if (process.env.PWTEST_CLI_AUTO_EXIT_WHEN && (0, _errors.isTargetClosedError)(error)) { + if (process.env.PWTEST_CLI_AUTO_EXIT_WHEN) { // Tests with PWTEST_CLI_AUTO_EXIT_WHEN might close page too fast, resulting // in a stray navigation aborted error. We should ignore it. } else { diff --git a/tvapp2/node_modules/playwright-core/lib/cli/programWithTestStub.js b/tvapp2/node_modules/playwright-core/lib/cli/programWithTestStub.js index bbb43e72..48fc8c69 100755 --- a/tvapp2/node_modules/playwright-core/lib/cli/programWithTestStub.js +++ b/tvapp2/node_modules/playwright-core/lib/cli/programWithTestStub.js @@ -9,6 +9,7 @@ Object.defineProperty(exports, "program", { return _program.program; } }); +var _processLauncher = require("../server/utils/processLauncher"); var _utils = require("../utils"); var _program = require("./program"); /** @@ -60,7 +61,7 @@ function addExternalPlaywrightTestCommands() { playwrightTest.description(`${description} Available in @playwright/test package.`); playwrightTest.action(async () => { printPlaywrightTestError(command); - (0, _utils.gracefullyProcessExitDoNotHang)(1); + (0, _processLauncher.gracefullyProcessExitDoNotHang)(1); }); } } diff --git a/tvapp2/node_modules/playwright-core/lib/client/android.js b/tvapp2/node_modules/playwright-core/lib/client/android.js index 337de92e..1f7665ff 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/android.js +++ b/tvapp2/node_modules/playwright-core/lib/client/android.js @@ -4,18 +4,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.AndroidWebView = exports.AndroidSocket = exports.AndroidInput = exports.AndroidDevice = exports.Android = void 0; -var _fs = _interopRequireDefault(require("fs")); -var _utils = require("../utils"); -var _events = require("./events"); +var _eventEmitter = require("./eventEmitter"); var _browserContext = require("./browserContext"); var _channelOwner = require("./channelOwner"); -var _timeoutSettings = require("../common/timeoutSettings"); -var _waiter = require("./waiter"); -var _events2 = require("events"); -var _connection = require("./connection"); var _errors = require("./errors"); -var _timeoutRunner = require("../utils/timeoutRunner"); -let _Symbol$asyncDispose; +var _events = require("./events"); +var _waiter = require("./waiter"); +var _timeoutSettings = require("./timeoutSettings"); +var _rtti = require("../utils/isomorphic/rtti"); +var _time = require("../utils/isomorphic/time"); +var _timeoutRunner = require("../utils/isomorphic/timeoutRunner"); +var _webSocket = require("./webSocket"); /** * Copyright (c) Microsoft Corporation. * @@ -31,7 +30,7 @@ let _Symbol$asyncDispose; * See the License for the specific language governing permissions and * limitations under the License. */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + class Android extends _channelOwner.ChannelOwner { static from(android) { return android._object; @@ -40,13 +39,15 @@ class Android extends _channelOwner.ChannelOwner { super(parent, type, guid, initializer); this._timeoutSettings = void 0; this._serverLauncher = void 0; - this._timeoutSettings = new _timeoutSettings.TimeoutSettings(); + this._timeoutSettings = new _timeoutSettings.TimeoutSettings(this._platform); } setDefaultTimeout(timeout) { this._timeoutSettings.setDefaultTimeout(timeout); - this._channel.setDefaultTimeoutNoReply({ - timeout - }); + this._wrapApiCall(async () => { + await this._channel.setDefaultTimeoutNoReply({ + timeout + }); + }, true).catch(() => {}); } async devices(options = {}) { const { @@ -60,68 +61,44 @@ class Android extends _channelOwner.ChannelOwner { } async connect(wsEndpoint, options = {}) { return await this._wrapApiCall(async () => { - const deadline = options.timeout ? (0, _utils.monotonicTime)() + options.timeout : 0; + const deadline = options.timeout ? (0, _time.monotonicTime)() + options.timeout : 0; const headers = { 'x-playwright-browser': 'android', ...options.headers }; - const localUtils = this._connection.localUtils(); const connectParams = { wsEndpoint, headers, slowMo: options.slowMo, timeout: options.timeout }; - const { - pipe - } = await localUtils._channel.connect(connectParams); - const closePipe = () => pipe.close().catch(() => {}); - const connection = new _connection.Connection(localUtils, this._instrumentation); - connection.markAsRemote(); - connection.on('close', closePipe); + const connection = await (0, _webSocket.connectOverWebSocket)(this._connection, connectParams); let device; - let closeError; - const onPipeClosed = () => { + connection.on('close', () => { var _device; (_device = device) === null || _device === void 0 || _device._didClose(); - connection.close(closeError); - }; - pipe.on('closed', onPipeClosed); - connection.onmessage = message => pipe.send({ - message - }).catch(onPipeClosed); - pipe.on('message', ({ - message - }) => { - try { - connection.dispatch(message); - } catch (e) { - closeError = String(e); - closePipe(); - } }); const result = await (0, _timeoutRunner.raceAgainstDeadline)(async () => { const playwright = await connection.initializePlaywright(); if (!playwright._initializer.preConnectedAndroidDevice) { - closePipe(); + connection.close(); throw new Error('Malformed endpoint. Did you use Android.launchServer method?'); } device = AndroidDevice.from(playwright._initializer.preConnectedAndroidDevice); device._shouldCloseConnectionOnClose = true; - device.on(_events.Events.AndroidDevice.Close, closePipe); + device.on(_events.Events.AndroidDevice.Close, () => connection.close()); return device; }, deadline); if (!result.timedOut) { return result.result; } else { - closePipe(); + connection.close(); throw new Error(`Timeout ${options.timeout}ms exceeded`); } }); } } exports.Android = Android; -_Symbol$asyncDispose = Symbol.asyncDispose; class AndroidDevice extends _channelOwner.ChannelOwner { static from(androidDevice) { return androidDevice._object; @@ -133,7 +110,7 @@ class AndroidDevice extends _channelOwner.ChannelOwner { this._shouldCloseConnectionOnClose = false; this.input = void 0; this.input = new AndroidInput(this); - this._timeoutSettings = new _timeoutSettings.TimeoutSettings(parent._timeoutSettings); + this._timeoutSettings = new _timeoutSettings.TimeoutSettings(this._platform, parent._timeoutSettings); this._channel.on('webViewAdded', ({ webView }) => this._onWebViewAdded(webView)); @@ -154,9 +131,11 @@ class AndroidDevice extends _channelOwner.ChannelOwner { } setDefaultTimeout(timeout) { this._timeoutSettings.setDefaultTimeout(timeout); - this._channel.setDefaultTimeoutNoReply({ - timeout - }); + this._wrapApiCall(async () => { + await this._channel.setDefaultTimeoutNoReply({ + timeout + }); + }, true).catch(() => {}); } serial() { return this._initializer.serial; @@ -262,10 +241,10 @@ class AndroidDevice extends _channelOwner.ChannelOwner { const { binary } = await this._channel.screenshot(); - if (options.path) await _fs.default.promises.writeFile(options.path, binary); + if (options.path) await this._platform.fs().promises.writeFile(options.path, binary); return binary; } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.close(); } async close() { @@ -294,19 +273,19 @@ class AndroidDevice extends _channelOwner.ChannelOwner { } async installApk(file, options) { await this._channel.installApk({ - file: await loadFile(file), + file: await loadFile(this._platform, file), args: options && options.args }); } async push(file, path, options) { await this._channel.push({ - file: await loadFile(file), + file: await loadFile(this._platform, file), path, mode: options ? options.mode : undefined }); } async launchBrowser(options = {}) { - const contextOptions = await (0, _browserContext.prepareBrowserContextParams)(options); + const contextOptions = await (0, _browserContext.prepareBrowserContextParams)(this._platform, options); const result = await this._channel.launchBrowser(contextOptions); const context = _browserContext.BrowserContext.from(result.context); context._setOptions(contextOptions, {}); @@ -350,8 +329,8 @@ class AndroidSocket extends _channelOwner.ChannelOwner { } } exports.AndroidSocket = AndroidSocket; -async function loadFile(file) { - if ((0, _utils.isString)(file)) return await _fs.default.promises.readFile(file); +async function loadFile(platform, file) { + if ((0, _rtti.isString)(file)) return await platform.fs().promises.readFile(file); return file; } class AndroidInput { @@ -411,7 +390,7 @@ function toSelectorChannel(selector) { } = selector; const toRegex = value => { if (value === undefined) return undefined; - if ((0, _utils.isRegExp)(value)) return value.source; + if ((0, _rtti.isRegExp)(value)) return value.source; return '^' + value.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d') + '$'; }; return { @@ -439,9 +418,9 @@ function toSelectorChannel(selector) { selected }; } -class AndroidWebView extends _events2.EventEmitter { +class AndroidWebView extends _eventEmitter.EventEmitter { constructor(device, data) { - super(); + super(device._platform); this._device = void 0; this._data = void 0; this._pagePromise = void 0; diff --git a/tvapp2/node_modules/playwright-core/lib/client/artifact.js b/tvapp2/node_modules/playwright-core/lib/client/artifact.js index 91385902..938805a6 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/artifact.js +++ b/tvapp2/node_modules/playwright-core/lib/client/artifact.js @@ -4,12 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Artifact = void 0; -var fs = _interopRequireWildcard(require("fs")); -var _stream = require("./stream"); -var _fileUtils = require("../utils/fileUtils"); var _channelOwner = require("./channelOwner"); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } +var _stream = require("./stream"); +var _fileUtils = require("./fileUtils"); /** * Copyright (c) Microsoft Corporation. * @@ -43,9 +40,9 @@ class Artifact extends _channelOwner.ChannelOwner { } const result = await this._channel.saveAsStream(); const stream = _stream.Stream.from(result.stream); - await (0, _fileUtils.mkdirIfNeeded)(path); + await (0, _fileUtils.mkdirIfNeeded)(this._platform, path); await new Promise((resolve, reject) => { - stream.stream().pipe(fs.createWriteStream(path)).on('finish', resolve).on('error', reject); + stream.stream().pipe(this._platform.fs().createWriteStream(path)).on('finish', resolve).on('error', reject); }); } async failure() { diff --git a/tvapp2/node_modules/playwright-core/lib/client/browser.js b/tvapp2/node_modules/playwright-core/lib/client/browser.js index 3cdbd03a..4b148224 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/browser.js +++ b/tvapp2/node_modules/playwright-core/lib/client/browser.js @@ -4,15 +4,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Browser = void 0; -var _fs = _interopRequireDefault(require("fs")); -var _browserContext = require("./browserContext"); -var _channelOwner = require("./channelOwner"); -var _events = require("./events"); -var _errors = require("./errors"); -var _cdpSession = require("./cdpSession"); var _artifact = require("./artifact"); -var _utils = require("../utils"); -let _Symbol$asyncDispose; +var _browserContext = require("./browserContext"); +var _cdpSession = require("./cdpSession"); +var _channelOwner = require("./channelOwner"); +var _errors = require("./errors"); +var _events = require("./events"); +var _fileUtils = require("./fileUtils"); /** * Copyright (c) Microsoft Corporation. * @@ -28,8 +26,7 @@ let _Symbol$asyncDispose; * See the License for the specific language governing permissions and * limitations under the License. */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -_Symbol$asyncDispose = Symbol.asyncDispose; + class Browser extends _channelOwner.ChannelOwner { static from(browser) { return browser._object; @@ -44,8 +41,6 @@ class Browser extends _channelOwner.ChannelOwner { this._options = {}; this._name = void 0; this._path = void 0; - // Used from @playwright/test fixtures. - this._connectHeaders = void 0; this._closeReason = void 0; this._name = initializer.name; this._channel.on('close', () => this._didClose()); @@ -76,10 +71,10 @@ class Browser extends _channelOwner.ChannelOwner { } async _innerNewContext(options = {}, forReuse) { options = { - ...this._browserType._defaultContextOptions, + ...this._browserType._playwright._defaultContextOptions, ...options }; - const contextOptions = await (0, _browserContext.prepareBrowserContextParams)(options); + const contextOptions = await (0, _browserContext.prepareBrowserContextParams)(this._platform, options); const response = forReuse ? await this._channel.newContextForReuse(contextOptions) : await this._channel.newContext(contextOptions); const context = _browserContext.BrowserContext.from(response.context); await this._browserType._didCreateContext(context, contextOptions, this._options, options.logger || this._logger); @@ -118,13 +113,13 @@ class Browser extends _channelOwner.ChannelOwner { const buffer = await artifact.readIntoBuffer(); await artifact.delete(); if (this._path) { - await (0, _utils.mkdirIfNeeded)(this._path); - await _fs.default.promises.writeFile(this._path, buffer); + await (0, _fileUtils.mkdirIfNeeded)(this._platform, this._path); + await this._platform.fs().promises.writeFile(this._path, buffer); this._path = undefined; } return buffer; } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.close(); } async close(options = {}) { diff --git a/tvapp2/node_modules/playwright-core/lib/client/browserContext.js b/tvapp2/node_modules/playwright-core/lib/client/browserContext.js index b1bc34d1..95cf5210 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/browserContext.js +++ b/tvapp2/node_modules/playwright-core/lib/client/browserContext.js @@ -6,31 +6,33 @@ Object.defineProperty(exports, "__esModule", { exports.BrowserContext = void 0; exports.prepareBrowserContextParams = prepareBrowserContextParams; exports.toClientCertificatesProtocol = toClientCertificatesProtocol; -var _page = require("./page"); -var _frame = require("./frame"); -var network = _interopRequireWildcard(require("./network")); -var _fs = _interopRequireDefault(require("fs")); -var _path = _interopRequireDefault(require("path")); +var _artifact = require("./artifact"); +var _browser = require("./browser"); +var _cdpSession = require("./cdpSession"); var _channelOwner = require("./channelOwner"); var _clientHelper = require("./clientHelper"); -var _browser = require("./browser"); -var _worker = require("./worker"); -var _events = require("./events"); -var _timeoutSettings = require("../common/timeoutSettings"); -var _waiter = require("./waiter"); -var _utils = require("../utils"); -var _cdpSession = require("./cdpSession"); -var _tracing = require("./tracing"); -var _artifact = require("./artifact"); -var _fetch = require("./fetch"); -var _stackTrace = require("../utils/stackTrace"); -var _harRouter = require("./harRouter"); +var _clock = require("./clock"); var _consoleMessage = require("./consoleMessage"); var _dialog = require("./dialog"); -var _webError = require("./webError"); var _errors = require("./errors"); -var _clock = require("./clock"); -let _Symbol$asyncDispose; +var _events = require("./events"); +var _fetch = require("./fetch"); +var _frame = require("./frame"); +var _harRouter = require("./harRouter"); +var network = _interopRequireWildcard(require("./network")); +var _page = require("./page"); +var _tracing = require("./tracing"); +var _waiter = require("./waiter"); +var _webError = require("./webError"); +var _worker = require("./worker"); +var _timeoutSettings = require("./timeoutSettings"); +var _fileUtils = require("./fileUtils"); +var _headers = require("../utils/isomorphic/headers"); +var _urlMatch = require("../utils/isomorphic/urlMatch"); +var _rtti = require("../utils/isomorphic/rtti"); +var _stackTrace = require("../utils/isomorphic/stackTrace"); +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /** * Copyright 2017 Google Inc. All rights reserved. * Modifications copyright (c) Microsoft Corporation. @@ -47,10 +49,7 @@ let _Symbol$asyncDispose; * See the License for the specific language governing permissions and * limitations under the License. */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -_Symbol$asyncDispose = Symbol.asyncDispose; + class BrowserContext extends _channelOwner.ChannelOwner { static from(context) { return context._object; @@ -67,7 +66,7 @@ class BrowserContext extends _channelOwner.ChannelOwner { this._browser = null; this._browserType = void 0; this._bindings = new Map(); - this._timeoutSettings = new _timeoutSettings.TimeoutSettings(); + this._timeoutSettings = void 0; this._ownerPage = void 0; this._closedPromise = void 0; this._options = {}; @@ -81,6 +80,7 @@ class BrowserContext extends _channelOwner.ChannelOwner { this._closeWasCalled = false; this._closeReason = void 0; this._harRouters = []; + this._timeoutSettings = new _timeoutSettings.TimeoutSettings(this._platform); if (parent instanceof _browser.Browser) this._browser = parent; (_this$_browser = this._browser) === null || _this$_browser === void 0 || _this$_browser._contexts.add(this); this._isChromium = ((_this$_browser2 = this._browser) === null || _this$_browser2 === void 0 ? void 0 : _this$_browser2._name) === 'chromium'; @@ -116,7 +116,7 @@ class BrowserContext extends _channelOwner.ChannelOwner { this.emit(_events.Events.BrowserContext.ServiceWorker, serviceWorker); }); this._channel.on('console', event => { - const consoleMessage = new _consoleMessage.ConsoleMessage(event); + const consoleMessage = new _consoleMessage.ConsoleMessage(this._platform, event); this.emit(_events.Events.BrowserContext.Console, consoleMessage); const page = consoleMessage.page(); if (page) page.emit(_events.Events.Page.Console, consoleMessage); @@ -233,18 +233,18 @@ class BrowserContext extends _channelOwner.ChannelOwner { setDefaultNavigationTimeout(timeout) { this._timeoutSettings.setDefaultNavigationTimeout(timeout); this._wrapApiCall(async () => { - this._channel.setDefaultNavigationTimeoutNoReply({ + await this._channel.setDefaultNavigationTimeoutNoReply({ timeout - }).catch(() => {}); - }, true); + }); + }, true).catch(() => {}); } setDefaultTimeout(timeout) { this._timeoutSettings.setDefaultTimeout(timeout); this._wrapApiCall(async () => { - this._channel.setDefaultTimeoutNoReply({ + await this._channel.setDefaultTimeoutNoReply({ timeout - }).catch(() => {}); - }, true); + }); + }, true).catch(() => {}); } browser() { return this._browser; @@ -270,15 +270,15 @@ class BrowserContext extends _channelOwner.ChannelOwner { } async clearCookies(options = {}) { await this._channel.clearCookies({ - name: (0, _utils.isString)(options.name) ? options.name : undefined, - nameRegexSource: (0, _utils.isRegExp)(options.name) ? options.name.source : undefined, - nameRegexFlags: (0, _utils.isRegExp)(options.name) ? options.name.flags : undefined, - domain: (0, _utils.isString)(options.domain) ? options.domain : undefined, - domainRegexSource: (0, _utils.isRegExp)(options.domain) ? options.domain.source : undefined, - domainRegexFlags: (0, _utils.isRegExp)(options.domain) ? options.domain.flags : undefined, - path: (0, _utils.isString)(options.path) ? options.path : undefined, - pathRegexSource: (0, _utils.isRegExp)(options.path) ? options.path.source : undefined, - pathRegexFlags: (0, _utils.isRegExp)(options.path) ? options.path.flags : undefined + name: (0, _rtti.isString)(options.name) ? options.name : undefined, + nameRegexSource: (0, _rtti.isRegExp)(options.name) ? options.name.source : undefined, + nameRegexFlags: (0, _rtti.isRegExp)(options.name) ? options.name.flags : undefined, + domain: (0, _rtti.isString)(options.domain) ? options.domain : undefined, + domainRegexSource: (0, _rtti.isRegExp)(options.domain) ? options.domain.source : undefined, + domainRegexFlags: (0, _rtti.isRegExp)(options.domain) ? options.domain.flags : undefined, + path: (0, _rtti.isString)(options.path) ? options.path : undefined, + pathRegexSource: (0, _rtti.isRegExp)(options.path) ? options.path.source : undefined, + pathRegexFlags: (0, _rtti.isRegExp)(options.path) ? options.path.flags : undefined }); } async grantPermissions(permissions, options) { @@ -298,7 +298,7 @@ class BrowserContext extends _channelOwner.ChannelOwner { async setExtraHTTPHeaders(headers) { network.validateHeaders(headers); await this._channel.setExtraHTTPHeaders({ - headers: (0, _utils.headersObjectToArray)(headers) + headers: (0, _headers.headersObjectToArray)(headers) }); } async setOffline(offline) { @@ -312,7 +312,7 @@ class BrowserContext extends _channelOwner.ChannelOwner { }); } async addInitScript(script, arg) { - const source = await (0, _clientHelper.evaluationScript)(script, arg); + const source = await (0, _clientHelper.evaluationScript)(this._platform, script, arg); await this._channel.addInitScript({ source }); @@ -332,7 +332,7 @@ class BrowserContext extends _channelOwner.ChannelOwner { this._bindings.set(name, binding); } async route(url, handler, options = {}) { - this._routes.unshift(new network.RouteHandler(this._options.baseURL, url, handler, options.times)); + this._routes.unshift(new network.RouteHandler(this._platform, this._options.baseURL, url, handler, options.times)); await this._updateInterceptionPatterns(); } async routeWebSocket(url, handler) { @@ -358,11 +358,13 @@ class BrowserContext extends _channelOwner.ChannelOwner { }); } async routeFromHAR(har, options = {}) { + const localUtils = this._connection.localUtils(); + if (!localUtils) throw new Error('Route from har is not supported in thin clients'); if (options.update) { await this._recordIntoHAR(har, null, options); return; } - const harRouter = await _harRouter.HarRouter.create(this._connection.localUtils(), har, options.notFound || 'abort', { + const harRouter = await _harRouter.HarRouter.create(localUtils, har, options.notFound || 'abort', { urlMatch: options.url }); this._harRouters.push(harRouter); @@ -380,7 +382,7 @@ class BrowserContext extends _channelOwner.ChannelOwner { const removed = []; const remaining = []; for (const route of this._routes) { - if ((0, _utils.urlMatchesEqual)(route.url, url) && (!handler || route.handler === handler)) removed.push(route);else remaining.push(route); + if ((0, _urlMatch.urlMatchesEqual)(route.url, url) && (!handler || route.handler === handler)) removed.push(route);else remaining.push(route); } await this._unrouteInternal(removed, remaining, 'default'); } @@ -420,10 +422,12 @@ class BrowserContext extends _channelOwner.ChannelOwner { }); } async storageState(options = {}) { - const state = await this._channel.storageState(); + const state = await this._channel.storageState({ + indexedDB: options.indexedDB + }); if (options.path) { - await (0, _utils.mkdirIfNeeded)(options.path); - await _fs.default.promises.writeFile(options.path, JSON.stringify(state, undefined, 2), 'utf8'); + await (0, _fileUtils.mkdirIfNeeded)(this._platform, options.path); + await this._platform.fs().promises.writeFile(options.path, JSON.stringify(state, undefined, 2), 'utf8'); } return state; } @@ -451,7 +455,7 @@ class BrowserContext extends _channelOwner.ChannelOwner { this.tracing._resetStackCounter(); this.emit(_events.Events.BrowserContext.Close, this); } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.close(); } async close(options = {}) { @@ -473,8 +477,10 @@ class BrowserContext extends _channelOwner.ChannelOwner { const isCompressed = harParams.content === 'attach' || harParams.path.endsWith('.zip'); const needCompressed = harParams.path.endsWith('.zip'); if (isCompressed && !needCompressed) { + const localUtils = this._connection.localUtils(); + if (!localUtils) throw new Error('Uncompressed har is not supported in thin clients'); await artifact.saveAs(harParams.path + '.tmp'); - await this._connection.localUtils()._channel.harUnzip({ + await localUtils.harUnzip({ zipFile: harParams.path + '.tmp', harFile: harParams.path }); @@ -492,10 +498,10 @@ class BrowserContext extends _channelOwner.ChannelOwner { } } exports.BrowserContext = BrowserContext; -async function prepareStorageState(options) { +async function prepareStorageState(platform, options) { if (typeof options.storageState !== 'string') return options.storageState; try { - return JSON.parse(await _fs.default.promises.readFile(options.storageState, 'utf8')); + return JSON.parse(await platform.fs().promises.readFile(options.storageState, 'utf8')); } catch (e) { (0, _stackTrace.rewriteErrorMessage)(e, `Error reading storage state from ${options.storageState}:\n` + e.message); throw e; @@ -506,28 +512,29 @@ function prepareRecordHarOptions(options) { return { path: options.path, content: options.content || (options.omitContent ? 'omit' : undefined), - urlGlob: (0, _utils.isString)(options.urlFilter) ? options.urlFilter : undefined, - urlRegexSource: (0, _utils.isRegExp)(options.urlFilter) ? options.urlFilter.source : undefined, - urlRegexFlags: (0, _utils.isRegExp)(options.urlFilter) ? options.urlFilter.flags : undefined, + urlGlob: (0, _rtti.isString)(options.urlFilter) ? options.urlFilter : undefined, + urlRegexSource: (0, _rtti.isRegExp)(options.urlFilter) ? options.urlFilter.source : undefined, + urlRegexFlags: (0, _rtti.isRegExp)(options.urlFilter) ? options.urlFilter.flags : undefined, mode: options.mode }; } -async function prepareBrowserContextParams(options) { +async function prepareBrowserContextParams(platform, options) { if (options.videoSize && !options.videosPath) throw new Error(`"videoSize" option requires "videosPath" to be specified`); if (options.extraHTTPHeaders) network.validateHeaders(options.extraHTTPHeaders); const contextParams = { ...options, viewport: options.viewport === null ? undefined : options.viewport, noDefaultViewport: options.viewport === null, - extraHTTPHeaders: options.extraHTTPHeaders ? (0, _utils.headersObjectToArray)(options.extraHTTPHeaders) : undefined, - storageState: await prepareStorageState(options), + extraHTTPHeaders: options.extraHTTPHeaders ? (0, _headers.headersObjectToArray)(options.extraHTTPHeaders) : undefined, + storageState: await prepareStorageState(platform, options), serviceWorkers: options.serviceWorkers, recordHar: prepareRecordHarOptions(options.recordHar), colorScheme: options.colorScheme === null ? 'no-override' : options.colorScheme, reducedMotion: options.reducedMotion === null ? 'no-override' : options.reducedMotion, forcedColors: options.forcedColors === null ? 'no-override' : options.forcedColors, + contrast: options.contrast === null ? 'no-override' : options.contrast, acceptDownloads: toAcceptDownloadsProtocol(options.acceptDownloads), - clientCertificates: await toClientCertificatesProtocol(options.clientCertificates) + clientCertificates: await toClientCertificatesProtocol(platform, options.clientCertificates) }; if (!contextParams.recordVideo && options.videosPath) { contextParams.recordVideo = { @@ -535,7 +542,7 @@ async function prepareBrowserContextParams(options) { size: options.videoSize }; } - if (contextParams.recordVideo && contextParams.recordVideo.dir) contextParams.recordVideo.dir = _path.default.resolve(process.cwd(), contextParams.recordVideo.dir); + if (contextParams.recordVideo && contextParams.recordVideo.dir) contextParams.recordVideo.dir = platform.path().resolve(contextParams.recordVideo.dir); return contextParams; } function toAcceptDownloadsProtocol(acceptDownloads) { @@ -543,11 +550,11 @@ function toAcceptDownloadsProtocol(acceptDownloads) { if (acceptDownloads) return 'accept'; return 'deny'; } -async function toClientCertificatesProtocol(certs) { +async function toClientCertificatesProtocol(platform, certs) { if (!certs) return undefined; const bufferizeContent = async (value, path) => { if (value) return value; - if (path) return await _fs.default.promises.readFile(path); + if (path) return await platform.fs().promises.readFile(path); }; return await Promise.all(certs.map(async cert => ({ origin: cert.origin, diff --git a/tvapp2/node_modules/playwright-core/lib/client/browserType.js b/tvapp2/node_modules/playwright-core/lib/client/browserType.js index 130e89b0..69e33ea0 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/browserType.js +++ b/tvapp2/node_modules/playwright-core/lib/client/browserType.js @@ -7,11 +7,13 @@ exports.BrowserType = void 0; var _browser3 = require("./browser"); var _browserContext = require("./browserContext"); var _channelOwner = require("./channelOwner"); -var _connection = require("./connection"); -var _events = require("./events"); var _clientHelper = require("./clientHelper"); -var _utils = require("../utils"); -var _timeoutRunner = require("../utils/timeoutRunner"); +var _events = require("./events"); +var _assert = require("../utils/isomorphic/assert"); +var _headers = require("../utils/isomorphic/headers"); +var _time = require("../utils/isomorphic/time"); +var _timeoutRunner = require("../utils/isomorphic/timeoutRunner"); +var _webSocket = require("./webSocket"); /** * Copyright (c) Microsoft Corporation. * @@ -36,11 +38,6 @@ class BrowserType extends _channelOwner.ChannelOwner { this._serverLauncher = void 0; this._contexts = new Set(); this._playwright = void 0; - // Instrumentation. - this._defaultContextOptions = void 0; - this._defaultContextTimeout = void 0; - this._defaultContextNavigationTimeout = void 0; - this._defaultLaunchOptions = void 0; } static from(browserType) { return browserType._object; @@ -53,12 +50,12 @@ class BrowserType extends _channelOwner.ChannelOwner { return this._initializer.name; } async launch(options = {}) { - var _this$_defaultLaunchO; - (0, _utils.assert)(!options.userDataDir, 'userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistentContext` instead'); - (0, _utils.assert)(!options.port, 'Cannot specify a port without launching as a server.'); - const logger = options.logger || ((_this$_defaultLaunchO = this._defaultLaunchOptions) === null || _this$_defaultLaunchO === void 0 ? void 0 : _this$_defaultLaunchO.logger); + var _this$_playwright$_de; + (0, _assert.assert)(!options.userDataDir, 'userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistentContext` instead'); + (0, _assert.assert)(!options.port, 'Cannot specify a port without launching as a server.'); + const logger = options.logger || ((_this$_playwright$_de = this._playwright._defaultLaunchOptions) === null || _this$_playwright$_de === void 0 ? void 0 : _this$_playwright$_de.logger); options = { - ...this._defaultLaunchOptions, + ...this._playwright._defaultLaunchOptions, ...options }; const launchOptions = { @@ -76,28 +73,28 @@ class BrowserType extends _channelOwner.ChannelOwner { async launchServer(options = {}) { if (!this._serverLauncher) throw new Error('Launching server is not supported'); options = { - ...this._defaultLaunchOptions, + ...this._playwright._defaultLaunchOptions, ...options }; return await this._serverLauncher.launchServer(options); } async launchPersistentContext(userDataDir, options = {}) { - var _this$_defaultLaunchO2; - const logger = options.logger || ((_this$_defaultLaunchO2 = this._defaultLaunchOptions) === null || _this$_defaultLaunchO2 === void 0 ? void 0 : _this$_defaultLaunchO2.logger); - (0, _utils.assert)(!options.port, 'Cannot specify a port without launching as a server.'); + var _this$_playwright$_de2; + const logger = options.logger || ((_this$_playwright$_de2 = this._playwright._defaultLaunchOptions) === null || _this$_playwright$_de2 === void 0 ? void 0 : _this$_playwright$_de2.logger); + (0, _assert.assert)(!options.port, 'Cannot specify a port without launching as a server.'); options = { - ...this._defaultLaunchOptions, - ...this._defaultContextOptions, + ...this._playwright._defaultLaunchOptions, + ...this._playwright._defaultContextOptions, ...options }; - const contextParams = await (0, _browserContext.prepareBrowserContextParams)(options); + const contextParams = await (0, _browserContext.prepareBrowserContextParams)(this._platform, options); const persistentParams = { ...contextParams, ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined, ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs), env: options.env ? (0, _clientHelper.envObjectToArray)(options.env) : undefined, channel: options.channel, - userDataDir + userDataDir: this._platform.path().isAbsolute(userDataDir) || !userDataDir ? userDataDir : this._platform.path().resolve(userDataDir) }; return await this._wrapApiCall(async () => { const result = await this._channel.launchPersistentContext(persistentParams); @@ -111,19 +108,18 @@ class BrowserType extends _channelOwner.ChannelOwner { ...options, wsEndpoint: optionsOrWsEndpoint }); - (0, _utils.assert)(optionsOrWsEndpoint.wsEndpoint, 'options.wsEndpoint is required'); + (0, _assert.assert)(optionsOrWsEndpoint.wsEndpoint, 'options.wsEndpoint is required'); return await this._connect(optionsOrWsEndpoint); } async _connect(params) { const logger = params.logger; return await this._wrapApiCall(async () => { var _params$exposeNetwork; - const deadline = params.timeout ? (0, _utils.monotonicTime)() + params.timeout : 0; + const deadline = params.timeout ? (0, _time.monotonicTime)() + params.timeout : 0; const headers = { 'x-playwright-browser': this.name(), ...params.headers }; - const localUtils = this._connection.localUtils(); const connectParams = { wsEndpoint: params.wsEndpoint, headers, @@ -132,69 +128,39 @@ class BrowserType extends _channelOwner.ChannelOwner { timeout: params.timeout }; if (params.__testHookRedirectPortForwarding) connectParams.socksProxyRedirectPortForTest = params.__testHookRedirectPortForwarding; - const { - pipe, - headers: connectHeaders - } = await localUtils._channel.connect(connectParams); - const closePipe = () => pipe.close().catch(() => {}); - const connection = new _connection.Connection(localUtils, this._instrumentation); - connection.markAsRemote(); - connection.on('close', closePipe); + const connection = await (0, _webSocket.connectOverWebSocket)(this._connection, connectParams); let browser; - let closeError; - const onPipeClosed = reason => { + connection.on('close', () => { // Emulate all pages, contexts and the browser closing upon disconnect. for (const context of ((_browser = browser) === null || _browser === void 0 ? void 0 : _browser.contexts()) || []) { var _browser; for (const page of context.pages()) page._onClose(); context._onClose(); } - connection.close(reason || closeError); - // Give a chance to any API call promises to reject upon page/context closure. - // This happens naturally when we receive page.onClose and browser.onClose from the server - // in separate tasks. However, upon pipe closure we used to dispatch them all synchronously - // here and promises did not have a chance to reject. - // The order of rejects vs closure is a part of the API contract and our test runner - // relies on it to attribute rejections to the right test. setTimeout(() => { var _browser2; return (_browser2 = browser) === null || _browser2 === void 0 ? void 0 : _browser2._didClose(); }, 0); - }; - pipe.on('closed', params => onPipeClosed(params.reason)); - connection.onmessage = message => this._wrapApiCall(() => pipe.send({ - message - }).catch(() => onPipeClosed()), /* isInternal */true); - pipe.on('message', ({ - message - }) => { - try { - connection.dispatch(message); - } catch (e) { - closeError = String(e); - closePipe(); - } }); const result = await (0, _timeoutRunner.raceAgainstDeadline)(async () => { // For tests. if (params.__testHookBeforeCreateBrowser) await params.__testHookBeforeCreateBrowser(); const playwright = await connection.initializePlaywright(); if (!playwright._initializer.preLaunchedBrowser) { - closePipe(); + connection.close(); throw new Error('Malformed endpoint. Did you use BrowserType.launchServer method?'); } playwright._setSelectors(this._playwright.selectors); browser = _browser3.Browser.from(playwright._initializer.preLaunchedBrowser); this._didLaunchBrowser(browser, {}, logger); browser._shouldCloseConnectionOnClose = true; - browser._connectHeaders = connectHeaders; - browser.on(_events.Events.Browser.Disconnected, () => this._wrapApiCall(() => closePipe(), /* isInternal */true)); + browser.on(_events.Events.Browser.Disconnected, () => connection.close()); return browser; }, deadline); if (!result.timedOut) { return result.result; } else { - closePipe(); + connection.close(); throw new Error(`Timeout ${params.timeout}ms exceeded`); } }); @@ -202,12 +168,12 @@ class BrowserType extends _channelOwner.ChannelOwner { async connectOverCDP(endpointURLOrOptions, options) { if (typeof endpointURLOrOptions === 'string') return await this._connectOverCDP(endpointURLOrOptions, options); const endpointURL = 'endpointURL' in endpointURLOrOptions ? endpointURLOrOptions.endpointURL : endpointURLOrOptions.wsEndpoint; - (0, _utils.assert)(endpointURL, 'Cannot connect over CDP without wsEndpoint.'); + (0, _assert.assert)(endpointURL, 'Cannot connect over CDP without wsEndpoint.'); return await this.connectOverCDP(endpointURL, endpointURLOrOptions); } async _connectOverCDP(endpointURL, params = {}) { if (this.name() !== 'chromium') throw new Error('Connecting over CDP is only supported in Chromium.'); - const headers = params.headers ? (0, _utils.headersObjectToArray)(params.headers) : undefined; + const headers = params.headers ? (0, _headers.headersObjectToArray)(params.headers) : undefined; const result = await this._channel.connectOverCDP({ endpointURL, headers, @@ -229,8 +195,8 @@ class BrowserType extends _channelOwner.ChannelOwner { context._browserType = this; this._contexts.add(context); context._setOptions(contextOptions, browserOptions); - if (this._defaultContextTimeout !== undefined) context.setDefaultTimeout(this._defaultContextTimeout); - if (this._defaultContextNavigationTimeout !== undefined) context.setDefaultNavigationTimeout(this._defaultContextNavigationTimeout); + if (this._playwright._defaultContextTimeout !== undefined) context.setDefaultTimeout(this._playwright._defaultContextTimeout); + if (this._playwright._defaultContextNavigationTimeout !== undefined) context.setDefaultNavigationTimeout(this._playwright._defaultContextNavigationTimeout); await this._instrumentation.runAfterCreateBrowserContext(context); } async _willCloseContext(context) { diff --git a/tvapp2/node_modules/playwright-core/lib/client/channelOwner.js b/tvapp2/node_modules/playwright-core/lib/client/channelOwner.js index db46b790..87ab2d2b 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/channelOwner.js +++ b/tvapp2/node_modules/playwright-core/lib/client/channelOwner.js @@ -6,10 +6,8 @@ Object.defineProperty(exports, "__esModule", { exports.ChannelOwner = void 0; var _eventEmitter = require("./eventEmitter"); var _validator = require("../protocol/validator"); -var _debugLogger = require("../utils/debugLogger"); -var _stackTrace = require("../utils/stackTrace"); -var _utils = require("../utils"); -var _zones = require("../utils/zones"); +var _clientStackTrace = require("./clientStackTrace"); +var _stackTrace = require("../utils/isomorphic/stackTrace"); /** * Copyright (c) Microsoft Corporation. * @@ -28,7 +26,8 @@ var _zones = require("../utils/zones"); class ChannelOwner extends _eventEmitter.EventEmitter { constructor(parent, type, guid, initializer) { - super(); + const connection = parent instanceof ChannelOwner ? parent._connection : parent; + super(connection._platform); this._connection = void 0; this._parent = void 0; this._objects = new Map(); @@ -42,7 +41,7 @@ class ChannelOwner extends _eventEmitter.EventEmitter { this._isInternalType = false; this._wasCollected = false; this.setMaxListeners(0); - this._connection = parent instanceof ChannelOwner ? parent._connection : parent; + this._connection = connection; this._type = type; this._guid = guid; this._parent = parent instanceof ChannelOwner ? parent : undefined; @@ -52,7 +51,7 @@ class ChannelOwner extends _eventEmitter.EventEmitter { this._parent._objects.set(guid, this); this._logger = this._parent._logger; } - this._channel = this._createChannel(new _eventEmitter.EventEmitter()); + this._channel = this._createChannel(new _eventEmitter.EventEmitter(connection._platform)); this._initializer = initializer; } markAsInternalType() { @@ -118,6 +117,13 @@ class ChannelOwner extends _eventEmitter.EventEmitter { objects: Array.from(this._objects.values()).map(o => o._debugScopeState()) }; } + _validatorToWireContext() { + return { + tChannelImpl: tChannelImplToWire, + binary: this._connection.rawBuffers() ? 'buffer' : 'toBase64', + isUnderTest: () => this._platform.isUnderTest() + }; + } _createChannel(base) { const channel = new Proxy(base, { get: (obj, prop) => { @@ -126,16 +132,13 @@ class ChannelOwner extends _eventEmitter.EventEmitter { if (validator) { return async params => { return await this._wrapApiCall(async apiZone => { - const validatedParams = validator(params, '', { - tChannelImpl: tChannelImplToWire, - binary: this._connection.rawBuffers() ? 'buffer' : 'toBase64' - }); + const validatedParams = validator(params, '', this._validatorToWireContext()); if (!apiZone.isInternal && !apiZone.reported) { // Reporting/tracing/logging this api call for the first time. apiZone.params = params; apiZone.reported = true; this._instrumentation.onApiCallBegin(apiZone); - logApiCall(this._logger, `=> ${apiZone.apiName} started`); + logApiCall(this._platform, this._logger, `=> ${apiZone.apiName} started`); return await this._connection.sendMessageToServer(this, prop, validatedParams, apiZone.apiName, apiZone.frames, apiZone.stepId); } // Since this api call is either internal, or has already been reported/traced once, @@ -153,10 +156,10 @@ class ChannelOwner extends _eventEmitter.EventEmitter { } async _wrapApiCall(func, isInternal) { const logger = this._logger; - const existingApiZone = _zones.zones.zoneData('apiZone'); + const existingApiZone = this._platform.zones.current().data(); if (existingApiZone) return await func(existingApiZone); if (isInternal === undefined) isInternal = this._isInternalType; - const stackTrace = (0, _stackTrace.captureLibraryStackTrace)(); + const stackTrace = (0, _clientStackTrace.captureLibraryStackTrace)(this._platform); const apiZone = { apiName: stackTrace.apiName, frames: stackTrace.frames, @@ -166,20 +169,20 @@ class ChannelOwner extends _eventEmitter.EventEmitter { stepId: undefined }; try { - const result = await _zones.zones.run('apiZone', apiZone, async () => await func(apiZone)); + const result = await this._platform.zones.current().push(apiZone).run(async () => await func(apiZone)); if (!isInternal) { - logApiCall(logger, `<= ${apiZone.apiName} succeeded`); + logApiCall(this._platform, logger, `<= ${apiZone.apiName} succeeded`); this._instrumentation.onApiCallEnd(apiZone); } return result; } catch (e) { - const innerError = (process.env.PWDEBUGIMPL || (0, _utils.isUnderTest)()) && e.stack ? '\n\n' + e.stack : ''; + const innerError = (this._platform.showInternalStackFrames() || this._platform.isUnderTest()) && e.stack ? '\n\n' + e.stack : ''; if (apiZone.apiName && !apiZone.apiName.includes('')) e.message = apiZone.apiName + ': ' + e.message; const stackFrames = '\n' + (0, _stackTrace.stringifyStackFrames)(stackTrace.frames).join('\n') + innerError; if (stackFrames.trim()) e.stack = e.message + stackFrames;else e.stack = ''; if (!isInternal) { apiZone.error = e; - logApiCall(logger, `<= ${apiZone.apiName} failed`); + logApiCall(this._platform, logger, `<= ${apiZone.apiName} failed`); this._instrumentation.onApiCallEnd(apiZone); } throw e; @@ -201,11 +204,11 @@ class ChannelOwner extends _eventEmitter.EventEmitter { } } exports.ChannelOwner = ChannelOwner; -function logApiCall(logger, message) { +function logApiCall(platform, logger, message) { if (logger && logger.isEnabled('api', 'info')) logger.log('api', 'info', message, [], { color: 'cyan' }); - _debugLogger.debugLogger.log('api', message); + platform.log('api', message); } function tChannelImplToWire(names, arg, path, context) { if (arg._object instanceof ChannelOwner && (names === '*' || names.includes(arg._object._type))) return { diff --git a/tvapp2/node_modules/playwright-core/lib/client/clientHelper.js b/tvapp2/node_modules/playwright-core/lib/client/clientHelper.js index 033e5302..d02ffbd5 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/clientHelper.js +++ b/tvapp2/node_modules/playwright-core/lib/client/clientHelper.js @@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.addSourceUrlToScript = addSourceUrlToScript; exports.envObjectToArray = envObjectToArray; exports.evaluationScript = evaluationScript; -var _fs = _interopRequireDefault(require("fs")); -var _utils = require("../utils"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _rtti = require("../utils/isomorphic/rtti"); /** * Copyright 2017 Google Inc. All rights reserved. * Modifications copyright (c) Microsoft Corporation. @@ -36,17 +34,17 @@ function envObjectToArray(env) { } return result; } -async function evaluationScript(fun, arg, addSourceUrl = true) { +async function evaluationScript(platform, fun, arg, addSourceUrl = true) { if (typeof fun === 'function') { const source = fun.toString(); const argString = Object.is(arg, undefined) ? 'undefined' : JSON.stringify(arg); return `(${source})(${argString})`; } if (arg !== undefined) throw new Error('Cannot evaluate a string with arguments'); - if ((0, _utils.isString)(fun)) return fun; + if ((0, _rtti.isString)(fun)) return fun; if (fun.content !== undefined) return fun.content; if (fun.path !== undefined) { - let source = await _fs.default.promises.readFile(fun.path, 'utf8'); + let source = await platform.fs().promises.readFile(fun.path, 'utf8'); if (addSourceUrl) source = addSourceUrlToScript(source, fun.path); return source; } diff --git a/tvapp2/node_modules/playwright-core/lib/client/connection.js b/tvapp2/node_modules/playwright-core/lib/client/connection.js index e4be4324..1dd9f617 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/connection.js +++ b/tvapp2/node_modules/playwright-core/lib/client/connection.js @@ -4,35 +4,34 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Connection = void 0; +var _eventEmitter = require("./eventEmitter"); +var _android = require("./android"); +var _artifact = require("./artifact"); var _browser = require("./browser"); var _browserContext = require("./browserContext"); var _browserType = require("./browserType"); +var _cdpSession = require("./cdpSession"); var _channelOwner = require("./channelOwner"); +var _clientInstrumentation = require("./clientInstrumentation"); +var _dialog = require("./dialog"); +var _electron = require("./electron"); var _elementHandle = require("./elementHandle"); +var _errors = require("./errors"); +var _fetch = require("./fetch"); var _frame = require("./frame"); var _jsHandle = require("./jsHandle"); +var _jsonPipe = require("./jsonPipe"); +var _localUtils = require("./localUtils"); var _network = require("./network"); var _page = require("./page"); -var _worker = require("./worker"); -var _dialog = require("./dialog"); -var _errors = require("./errors"); -var _cdpSession = require("./cdpSession"); var _playwright = require("./playwright"); -var _electron = require("./electron"); -var _stream = require("./stream"); -var _writableStream = require("./writableStream"); -var _debugLogger = require("../utils/debugLogger"); var _selectors = require("./selectors"); -var _android = require("./android"); -var _artifact = require("./artifact"); -var _events = require("events"); -var _jsonPipe = require("./jsonPipe"); -var _fetch = require("./fetch"); -var _localUtils = require("./localUtils"); +var _stream = require("./stream"); var _tracing = require("./tracing"); +var _worker = require("./worker"); +var _writableStream = require("./writableStream"); var _validator = require("../protocol/validator"); -var _clientInstrumentation = require("./clientInstrumentation"); -var _utils = require("../utils"); +var _stackTrace = require("../utils/isomorphic/stackTrace"); /** * Copyright (c) Microsoft Corporation. * @@ -60,9 +59,9 @@ class Root extends _channelOwner.ChannelOwner { } } class DummyChannelOwner extends _channelOwner.ChannelOwner {} -class Connection extends _events.EventEmitter { - constructor(localUtils, instrumentation) { - super(); +class Connection extends _eventEmitter.EventEmitter { + constructor(platform, localUtils, instrumentation, headers = []) { + super(platform); this._objects = new Map(); this.onmessage = message => {}; this._lastId = 0; @@ -76,9 +75,12 @@ class Connection extends _events.EventEmitter { this.toImpl = void 0; this._tracingCount = 0; this._instrumentation = void 0; + // Used from @playwright/test fixtures -> TODO remove? + this.headers = void 0; this._instrumentation = instrumentation || (0, _clientInstrumentation.createInstrumentation)(); this._localUtils = localUtils; this._rootObject = new Root(this); + this.headers = headers; } markAsRemote() { this._isRemote = true; @@ -117,9 +119,9 @@ class Connection extends _events.EventEmitter { method, params }; - if (_debugLogger.debugLogger.isEnabled('channel')) { + if (this._platform.isLogEnabled('channel')) { // Do not include metadata in debug logs to avoid noise. - _debugLogger.debugLogger.log('channel', 'SEND> ' + JSON.stringify(message)); + this._platform.log('channel', 'SEND> ' + JSON.stringify(message)); } const location = frames[0] ? { file: frames[0].file, @@ -132,7 +134,7 @@ class Connection extends _events.EventEmitter { internal: !apiName, stepId }; - if (this._tracingCount && frames && type !== 'LocalUtils') (_this$_localUtils = this._localUtils) === null || _this$_localUtils === void 0 || _this$_localUtils._channel.addStackToTracingNoReply({ + if (this._tracingCount && frames && type !== 'LocalUtils') (_this$_localUtils = this._localUtils) === null || _this$_localUtils === void 0 || _this$_localUtils.addStackToTracingNoReply({ callData: { stack: frames, id @@ -140,7 +142,7 @@ class Connection extends _events.EventEmitter { }).catch(() => {}); // We need to exit zones before calling into the server, otherwise // when we receive events from the server, we would be in an API zone. - _utils.zones.empty().run(() => this.onmessage({ + this._platform.zones.empty.run(() => this.onmessage({ ...message, metadata })); @@ -152,6 +154,13 @@ class Connection extends _events.EventEmitter { method })); } + _validatorFromWireContext() { + return { + tChannelImpl: this._tChannelImplFromWire.bind(this), + binary: this._rawBuffers ? 'buffer' : 'fromBase64', + isUnderTest: () => this._platform.isUnderTest() + }; + } dispatch(message) { if (this._closedError) return; const { @@ -164,24 +173,21 @@ class Connection extends _events.EventEmitter { log } = message; if (id) { - if (_debugLogger.debugLogger.isEnabled('channel')) _debugLogger.debugLogger.log('channel', ' !!l)) return ''; + return ` +Call log: +${platform.colors.dim(log.join('\n'))} +`; +} \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/client/consoleMessage.js b/tvapp2/node_modules/playwright-core/lib/client/consoleMessage.js index 1100442e..1e990bdd 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/consoleMessage.js +++ b/tvapp2/node_modules/playwright-core/lib/client/consoleMessage.js @@ -4,10 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.ConsoleMessage = void 0; -var util = _interopRequireWildcard(require("util")); var _jsHandle = require("./jsHandle"); var _page = require("./page"); -let _util$inspect$custom; /** * Copyright (c) Microsoft Corporation. * @@ -23,15 +21,14 @@ let _util$inspect$custom; * See the License for the specific language governing permissions and * limitations under the License. */ -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -_util$inspect$custom = util.inspect.custom; + class ConsoleMessage { - constructor(event) { + constructor(platform, event) { this._page = void 0; this._event = void 0; this._page = 'page' in event && event.page ? _page.Page.from(event.page) : null; this._event = event; + if (platform.inspectCustom) this[platform.inspectCustom] = () => this._inspect(); } page() { return this._page; @@ -48,7 +45,7 @@ class ConsoleMessage { location() { return this._event.location; } - [_util$inspect$custom]() { + _inspect() { return this.text(); } } diff --git a/tvapp2/node_modules/playwright-core/lib/client/electron.js b/tvapp2/node_modules/playwright-core/lib/client/electron.js index de7fa93b..c2205f18 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/electron.js +++ b/tvapp2/node_modules/playwright-core/lib/client/electron.js @@ -4,16 +4,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.ElectronApplication = exports.Electron = void 0; -var _timeoutSettings = require("../common/timeoutSettings"); var _browserContext = require("./browserContext"); var _channelOwner = require("./channelOwner"); var _clientHelper = require("./clientHelper"); +var _consoleMessage = require("./consoleMessage"); +var _errors = require("./errors"); var _events = require("./events"); var _jsHandle = require("./jsHandle"); -var _consoleMessage = require("./consoleMessage"); var _waiter = require("./waiter"); -var _errors = require("./errors"); -let _Symbol$asyncDispose; +var _timeoutSettings = require("./timeoutSettings"); /** * Copyright (c) Microsoft Corporation. * @@ -29,6 +28,7 @@ let _Symbol$asyncDispose; * See the License for the specific language governing permissions and * limitations under the License. */ + class Electron extends _channelOwner.ChannelOwner { static from(electron) { return electron._object; @@ -38,8 +38,8 @@ class Electron extends _channelOwner.ChannelOwner { } async launch(options = {}) { const params = { - ...(await (0, _browserContext.prepareBrowserContextParams)(options)), - env: (0, _clientHelper.envObjectToArray)(options.env ? options.env : process.env), + ...(await (0, _browserContext.prepareBrowserContextParams)(this._platform, options)), + env: (0, _clientHelper.envObjectToArray)(options.env ? options.env : this._platform.env), tracesDir: options.tracesDir }; const app = ElectronApplication.from((await this._channel.launch(params)).electronApplication); @@ -48,7 +48,6 @@ class Electron extends _channelOwner.ChannelOwner { } } exports.Electron = Electron; -_Symbol$asyncDispose = Symbol.asyncDispose; class ElectronApplication extends _channelOwner.ChannelOwner { static from(electronApplication) { return electronApplication._object; @@ -57,14 +56,15 @@ class ElectronApplication extends _channelOwner.ChannelOwner { super(parent, type, guid, initializer); this._context = void 0; this._windows = new Set(); - this._timeoutSettings = new _timeoutSettings.TimeoutSettings(); + this._timeoutSettings = void 0; + this._timeoutSettings = new _timeoutSettings.TimeoutSettings(this._platform); this._context = _browserContext.BrowserContext.from(initializer.context); for (const page of this._context._pages) this._onPage(page); this._context.on(_events.Events.BrowserContext.Page, page => this._onPage(page)); this._channel.on('close', () => { this.emit(_events.Events.ElectronApplication.Close); }); - this._channel.on('console', event => this.emit(_events.Events.ElectronApplication.Console, new _consoleMessage.ConsoleMessage(event))); + this._channel.on('console', event => this.emit(_events.Events.ElectronApplication.Console, new _consoleMessage.ConsoleMessage(this._platform, event))); this._setEventToSubscriptionMapping(new Map([[_events.Events.ElectronApplication.Console, 'console']])); } process() { @@ -86,7 +86,7 @@ class ElectronApplication extends _channelOwner.ChannelOwner { context() { return this._context; } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.close(); } async close() { diff --git a/tvapp2/node_modules/playwright-core/lib/client/elementHandle.js b/tvapp2/node_modules/playwright-core/lib/client/elementHandle.js index 3cdcb94f..ce8786b8 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/elementHandle.js +++ b/tvapp2/node_modules/playwright-core/lib/client/elementHandle.js @@ -9,15 +9,11 @@ exports.convertSelectOptionValues = convertSelectOptionValues; exports.determineScreenshotType = determineScreenshotType; var _frame = require("./frame"); var _jsHandle = require("./jsHandle"); -var _fs = _interopRequireDefault(require("fs")); -var _utilsBundle = require("../utilsBundle"); -var _path = _interopRequireDefault(require("path")); -var _utils = require("../utils"); -var _fileUtils = require("../utils/fileUtils"); +var _assert = require("../utils/isomorphic/assert"); +var _fileUtils = require("./fileUtils"); +var _rtti = require("../utils/isomorphic/rtti"); var _writableStream = require("./writableStream"); -var _stream = require("stream"); -var _util = require("util"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var _mimeType = require("../utils/isomorphic/mimeType"); /** * Copyright (c) Microsoft Corporation. * @@ -34,7 +30,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * limitations under the License. */ -const pipelineAsync = (0, _util.promisify)(_stream.pipeline); class ElementHandle extends _jsHandle.JSHandle { static from(handle) { return handle._object; @@ -56,6 +51,10 @@ class ElementHandle extends _jsHandle.JSHandle { async contentFrame() { return _frame.Frame.fromNullable((await this._elementChannel.contentFrame()).frame); } + async _generateLocatorString() { + const value = (await this._elementChannel.generateLocatorString()).value; + return value === undefined ? null : value; + } async getAttribute(name) { const value = (await this._elementChannel.getAttribute({ name @@ -133,7 +132,7 @@ class ElementHandle extends _jsHandle.JSHandle { async setInputFiles(files, options = {}) { const frame = await this.ownerFrame(); if (!frame) throw new Error('Cannot set input files to detached element'); - const converted = await convertInputFiles(files, frame.page().context()); + const converted = await convertInputFiles(this._platform, files, frame.page().context()); await this._elementChannel.setInputFiles({ ...converted, ...options @@ -168,21 +167,22 @@ class ElementHandle extends _jsHandle.JSHandle { return value === undefined ? null : value; } async screenshot(options = {}) { + const mask = options.mask; const copy = { ...options, mask: undefined }; if (!copy.type) copy.type = determineScreenshotType(options); - if (options.mask) { - copy.mask = options.mask.map(locator => ({ + if (mask) { + copy.mask = mask.map(locator => ({ frame: locator._frame._channel, selector: locator._selector })); } const result = await this._elementChannel.screenshot(copy); if (options.path) { - await (0, _fileUtils.mkdirIfNeeded)(options.path); - await _fs.default.promises.writeFile(options.path, result.binary); + await (0, _fileUtils.mkdirIfNeeded)(this._platform, options.path); + await this._platform.fs().promises.writeFile(options.path, result.binary); } return result.binary; } @@ -234,11 +234,11 @@ function convertSelectOptionValues(values) { if (values === null) return {}; if (!Array.isArray(values)) values = [values]; if (!values.length) return {}; - for (let i = 0; i < values.length; i++) (0, _utils.assert)(values[i] !== null, `options[${i}]: expected object, got null`); + for (let i = 0; i < values.length; i++) (0, _assert.assert)(values[i] !== null, `options[${i}]: expected object, got null`); if (values[0] instanceof ElementHandle) return { elements: values.map(v => v._elementChannel) }; - if ((0, _utils.isString)(values[0])) return { + if ((0, _rtti.isString)(values[0])) return { options: values.map(valueOrLabel => ({ valueOrLabel })) @@ -250,50 +250,49 @@ function convertSelectOptionValues(values) { function filePayloadExceedsSizeLimit(payloads) { return payloads.reduce((size, item) => size + (item.buffer ? item.buffer.byteLength : 0), 0) >= _fileUtils.fileUploadSizeLimit; } -async function resolvePathsAndDirectoryForInputFiles(items) { - var _localPaths2; +async function resolvePathsAndDirectoryForInputFiles(platform, items) { + var _localPaths; let localPaths; let localDirectory; for (const item of items) { - const stat = await _fs.default.promises.stat(item); + const stat = await platform.fs().promises.stat(item); if (stat.isDirectory()) { if (localDirectory) throw new Error('Multiple directories are not supported'); - localDirectory = _path.default.resolve(item); + localDirectory = platform.path().resolve(item); } else { - var _localPaths; - (_localPaths = localPaths) !== null && _localPaths !== void 0 ? _localPaths : localPaths = []; - localPaths.push(_path.default.resolve(item)); + localPaths !== null && localPaths !== void 0 ? localPaths : localPaths = []; + localPaths.push(platform.path().resolve(item)); } } - if ((_localPaths2 = localPaths) !== null && _localPaths2 !== void 0 && _localPaths2.length && localDirectory) throw new Error('File paths must be all files or a single directory'); + if ((_localPaths = localPaths) !== null && _localPaths !== void 0 && _localPaths.length && localDirectory) throw new Error('File paths must be all files or a single directory'); return [localPaths, localDirectory]; } -async function convertInputFiles(files, context) { +async function convertInputFiles(platform, files, context) { const items = Array.isArray(files) ? files.slice() : [files]; if (items.some(item => typeof item === 'string')) { if (!items.every(item => typeof item === 'string')) throw new Error('File paths cannot be mixed with buffers'); - const [localPaths, localDirectory] = await resolvePathsAndDirectoryForInputFiles(items); + const [localPaths, localDirectory] = await resolvePathsAndDirectoryForInputFiles(platform, items); if (context._connection.isRemote()) { - const files = localDirectory ? (await _fs.default.promises.readdir(localDirectory, { + const files = localDirectory ? (await platform.fs().promises.readdir(localDirectory, { withFileTypes: true, recursive: true - })).filter(f => f.isFile()).map(f => _path.default.join(f.path, f.name)) : localPaths; + })).filter(f => f.isFile()).map(f => platform.path().join(f.path, f.name)) : localPaths; const { writableStreams, rootDir } = await context._wrapApiCall(async () => context._channel.createTempFiles({ - rootDirName: localDirectory ? _path.default.basename(localDirectory) : undefined, + rootDirName: localDirectory ? platform.path().basename(localDirectory) : undefined, items: await Promise.all(files.map(async file => { - const lastModifiedMs = (await _fs.default.promises.stat(file)).mtimeMs; + const lastModifiedMs = (await platform.fs().promises.stat(file)).mtimeMs; return { - name: localDirectory ? _path.default.relative(localDirectory, file) : _path.default.basename(file), + name: localDirectory ? platform.path().relative(localDirectory, file) : platform.path().basename(file), lastModifiedMs }; })) }), true); for (let i = 0; i < files.length; i++) { const writable = _writableStream.WritableStream.from(writableStreams[i]); - await pipelineAsync(_fs.default.createReadStream(files[i]), writable.stream()); + await platform.streamFile(files[i], writable.stream()); } return { directoryStream: rootDir, @@ -313,7 +312,7 @@ async function convertInputFiles(files, context) { } function determineScreenshotType(options) { if (options.path) { - const mimeType = _utilsBundle.mime.getType(options.path); + const mimeType = (0, _mimeType.getMimeTypeForPath)(options.path); if (mimeType === 'image/png') return 'png';else if (mimeType === 'image/jpeg') return 'jpeg'; throw new Error(`path: unsupported mime type "${mimeType}"`); } diff --git a/tvapp2/node_modules/playwright-core/lib/client/errors.js b/tvapp2/node_modules/playwright-core/lib/client/errors.js index 2e6b7610..af117833 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/errors.js +++ b/tvapp2/node_modules/playwright-core/lib/client/errors.js @@ -7,8 +7,8 @@ exports.TimeoutError = exports.TargetClosedError = void 0; exports.isTargetClosedError = isTargetClosedError; exports.parseError = parseError; exports.serializeError = serializeError; -var _utils = require("../utils"); var _serializers = require("../protocol/serializers"); +var _rtti = require("../utils/isomorphic/rtti"); /** * Copyright (c) Microsoft Corporation. * @@ -42,7 +42,7 @@ function isTargetClosedError(error) { return error instanceof TargetClosedError; } function serializeError(e) { - if ((0, _utils.isError)(e)) return { + if ((0, _rtti.isError)(e)) return { error: { message: e.message, stack: e.stack, diff --git a/tvapp2/node_modules/playwright-core/lib/client/eventEmitter.js b/tvapp2/node_modules/playwright-core/lib/client/eventEmitter.js index ff1a16d0..a98ce998 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/eventEmitter.js +++ b/tvapp2/node_modules/playwright-core/lib/client/eventEmitter.js @@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.EventEmitter = void 0; -var _events = require("events"); -var _utils = require("../utils"); /** * Copyright Joyent, Inc. and other Node contributors. * Modifications copyright (c) Microsoft Corporation. @@ -31,12 +29,14 @@ var _utils = require("../utils"); */ class EventEmitter { - constructor() { + constructor(platform) { this._events = undefined; this._eventsCount = 0; this._maxListeners = undefined; this._pendingHandlers = new Map(); this._rejectionHandler = void 0; + this._platform = void 0; + this._platform = platform; if (this._events === undefined || this._events === Object.getPrototypeOf(this)._events) { this._events = Object.create(null); this._eventsCount = 0; @@ -51,7 +51,7 @@ class EventEmitter { return this; } getMaxListeners() { - return this._maxListeners === undefined ? _events.EventEmitter.defaultMaxListeners : this._maxListeners; + return this._maxListeners === undefined ? this._platform.defaultMaxListeners() : this._maxListeners; } emit(type, ...args) { const events = this._events; @@ -130,7 +130,7 @@ class EventEmitter { w.emitter = this; w.type = type; w.count = existing.length; - if (!(0, _utils.isUnderTest)()) { + if (!this._platform.isUnderTest()) { // eslint-disable-next-line no-console console.warn(w); } @@ -191,14 +191,11 @@ class EventEmitter { if (options.behavior === 'wait') { const errors = []; this._rejectionHandler = error => errors.push(error); - // eslint-disable-next-line internal-playwright/await-promise-in-class-returns return this._waitFor(type).then(() => { if (errors.length) throw errors[0]; }); } if (options.behavior === 'ignoreErrors') this._rejectionHandler = () => {}; - - // eslint-disable-next-line internal-playwright/await-promise-in-class-returns return Promise.resolve(); } _removeAllListeners(type) { diff --git a/tvapp2/node_modules/playwright-core/lib/client/fetch.js b/tvapp2/node_modules/playwright-core/lib/client/fetch.js index 50a8de81..308f5b37 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/fetch.js +++ b/tvapp2/node_modules/playwright-core/lib/client/fetch.js @@ -4,17 +4,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.APIResponse = exports.APIRequestContext = exports.APIRequest = void 0; -var _fs = _interopRequireDefault(require("fs")); -var _path = _interopRequireDefault(require("path")); -var util = _interopRequireWildcard(require("util")); -var _utils = require("../utils"); -var _fileUtils = require("../utils/fileUtils"); +var _browserContext = require("./browserContext"); var _channelOwner = require("./channelOwner"); +var _errors = require("./errors"); var _network = require("./network"); var _tracing = require("./tracing"); -var _errors = require("./errors"); -var _browserContext = require("./browserContext"); -let _Symbol$asyncDispose, _Symbol$asyncDispose2, _util$inspect$custom; +var _assert = require("../utils/isomorphic/assert"); +var _fileUtils = require("./fileUtils"); +var _headers = require("../utils/isomorphic/headers"); +var _rtti = require("../utils/isomorphic/rtti"); /** * Copyright (c) Microsoft Corporation. * @@ -30,42 +28,37 @@ let _Symbol$asyncDispose, _Symbol$asyncDispose2, _util$inspect$custom; * See the License for the specific language governing permissions and * limitations under the License. */ -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + class APIRequest { constructor(playwright) { this._playwright = void 0; this._contexts = new Set(); - // Instrumentation. - this._defaultContextOptions = void 0; this._playwright = playwright; } async newContext(options = {}) { - var _this$_defaultContext; + var _this$_playwright$_de, _this$_playwright$_de2; options = { - ...this._defaultContextOptions, + ...this._playwright._defaultContextOptions, + timeout: this._playwright._defaultContextTimeout, ...options }; - const storageState = typeof options.storageState === 'string' ? JSON.parse(await _fs.default.promises.readFile(options.storageState, 'utf8')) : options.storageState; - // We do not expose tracesDir in the API, so do not allow options to accidentally override it. - const tracesDir = (_this$_defaultContext = this._defaultContextOptions) === null || _this$_defaultContext === void 0 ? void 0 : _this$_defaultContext.tracesDir; + const storageState = typeof options.storageState === 'string' ? JSON.parse(await this._playwright._platform.fs().promises.readFile(options.storageState, 'utf8')) : options.storageState; const context = APIRequestContext.from((await this._playwright._channel.newRequest({ ...options, - extraHTTPHeaders: options.extraHTTPHeaders ? (0, _utils.headersObjectToArray)(options.extraHTTPHeaders) : undefined, + extraHTTPHeaders: options.extraHTTPHeaders ? (0, _headers.headersObjectToArray)(options.extraHTTPHeaders) : undefined, storageState, - tracesDir, - clientCertificates: await (0, _browserContext.toClientCertificatesProtocol)(options.clientCertificates) + tracesDir: (_this$_playwright$_de = this._playwright._defaultLaunchOptions) === null || _this$_playwright$_de === void 0 ? void 0 : _this$_playwright$_de.tracesDir, + // We do not expose tracesDir in the API, so do not allow options to accidentally override it. + clientCertificates: await (0, _browserContext.toClientCertificatesProtocol)(this._playwright._platform, options.clientCertificates) })).request); this._contexts.add(context); context._request = this; - context._tracing._tracesDir = tracesDir; + context._tracing._tracesDir = (_this$_playwright$_de2 = this._playwright._defaultLaunchOptions) === null || _this$_playwright$_de2 === void 0 ? void 0 : _this$_playwright$_de2.tracesDir; await context._instrumentation.runAfterCreateRequestContext(context); return context; } } exports.APIRequest = APIRequest; -_Symbol$asyncDispose = Symbol.asyncDispose; class APIRequestContext extends _channelOwner.ChannelOwner { static from(channel) { return channel._object; @@ -77,7 +70,7 @@ class APIRequestContext extends _channelOwner.ChannelOwner { this._closeReason = void 0; this._tracing = _tracing.Tracing.from(initializer.tracing); } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.dispose(); } async dispose(options = {}) { @@ -130,8 +123,8 @@ class APIRequestContext extends _channelOwner.ChannelOwner { }); } async fetch(urlOrRequest, options = {}) { - const url = (0, _utils.isString)(urlOrRequest) ? urlOrRequest : undefined; - const request = (0, _utils.isString)(urlOrRequest) ? undefined : urlOrRequest; + const url = (0, _rtti.isString)(urlOrRequest) ? urlOrRequest : undefined; + const request = (0, _rtti.isString)(urlOrRequest) ? undefined : urlOrRequest; return await this._innerFetch({ url, request, @@ -142,23 +135,23 @@ class APIRequestContext extends _channelOwner.ChannelOwner { return await this._wrapApiCall(async () => { var _options$request, _options$request2, _options$request3; if (this._closeReason) throw new _errors.TargetClosedError(this._closeReason); - (0, _utils.assert)(options.request || typeof options.url === 'string', 'First argument must be either URL string or Request'); - (0, _utils.assert)((options.data === undefined ? 0 : 1) + (options.form === undefined ? 0 : 1) + (options.multipart === undefined ? 0 : 1) <= 1, `Only one of 'data', 'form' or 'multipart' can be specified`); - (0, _utils.assert)(options.maxRedirects === undefined || options.maxRedirects >= 0, `'maxRedirects' must be greater than or equal to '0'`); - (0, _utils.assert)(options.maxRetries === undefined || options.maxRetries >= 0, `'maxRetries' must be greater than or equal to '0'`); + (0, _assert.assert)(options.request || typeof options.url === 'string', 'First argument must be either URL string or Request'); + (0, _assert.assert)((options.data === undefined ? 0 : 1) + (options.form === undefined ? 0 : 1) + (options.multipart === undefined ? 0 : 1) <= 1, `Only one of 'data', 'form' or 'multipart' can be specified`); + (0, _assert.assert)(options.maxRedirects === undefined || options.maxRedirects >= 0, `'maxRedirects' must be greater than or equal to '0'`); + (0, _assert.assert)(options.maxRetries === undefined || options.maxRetries >= 0, `'maxRetries' must be greater than or equal to '0'`); const url = options.url !== undefined ? options.url : options.request.url(); const method = options.method || ((_options$request = options.request) === null || _options$request === void 0 ? void 0 : _options$request.method()); let encodedParams = undefined; if (typeof options.params === 'string') encodedParams = options.params;else if (options.params instanceof URLSearchParams) encodedParams = options.params.toString(); // Cannot call allHeaders() here as the request may be paused inside route handler. const headersObj = options.headers || ((_options$request2 = options.request) === null || _options$request2 === void 0 ? void 0 : _options$request2.headers()); - const headers = headersObj ? (0, _utils.headersObjectToArray)(headersObj) : undefined; + const headers = headersObj ? (0, _headers.headersObjectToArray)(headersObj) : undefined; let jsonData; let formData; let multipartData; let postDataBuffer; if (options.data !== undefined) { - if ((0, _utils.isString)(options.data)) { + if ((0, _rtti.isString)(options.data)) { if (isJsonContentType(headers)) jsonData = isJsonParsable(options.data) ? options.data : JSON.stringify(options.data);else postDataBuffer = Buffer.from(options.data, 'utf8'); } else if (Buffer.isBuffer(options.data)) { postDataBuffer = options.data; @@ -185,7 +178,7 @@ class APIRequestContext extends _channelOwner.ChannelOwner { if (globalThis.FormData && options.multipart instanceof FormData) { const form = options.multipart; for (const [name, value] of form.entries()) { - if ((0, _utils.isString)(value)) { + if ((0, _rtti.isString)(value)) { multipartData.push({ name, value @@ -204,7 +197,7 @@ class APIRequestContext extends _channelOwner.ChannelOwner { } } else { // Convert file-like values to ServerFilePayload structs. - for (const [name, value] of Object.entries(options.multipart)) multipartData.push(await toFormField(name, value)); + for (const [name, value] of Object.entries(options.multipart)) multipartData.push(await toFormField(this._platform, name, value)); } } if (postDataBuffer === undefined && jsonData === undefined && formData === undefined && multipartData === undefined) postDataBuffer = ((_options$request3 = options.request) === null || _options$request3 === void 0 ? void 0 : _options$request3.postDataBuffer()) || undefined; @@ -232,16 +225,19 @@ class APIRequestContext extends _channelOwner.ChannelOwner { }); } async storageState(options = {}) { - const state = await this._channel.storageState(); + const state = await this._channel.storageState({ + indexedDB: options.indexedDB + }); if (options.path) { - await (0, _fileUtils.mkdirIfNeeded)(options.path); - await _fs.default.promises.writeFile(options.path, JSON.stringify(state, undefined, 2), 'utf8'); + await (0, _fileUtils.mkdirIfNeeded)(this._platform, options.path); + await this._platform.fs().promises.writeFile(options.path, JSON.stringify(state, undefined, 2), 'utf8'); } return state; } } exports.APIRequestContext = APIRequestContext; -async function toFormField(name, value) { +async function toFormField(platform, name, value) { + const typeOfValue = typeof value; if (isFilePayload(value)) { const payload = value; if (!Buffer.isBuffer(payload.buffer)) throw new Error(`Unexpected buffer type of 'data.${name}'`); @@ -249,15 +245,15 @@ async function toFormField(name, value) { name, file: filePayloadToJson(payload) }; - } else if (value instanceof _fs.default.ReadStream) { + } else if (typeOfValue === 'string' || typeOfValue === 'number' || typeOfValue === 'boolean') { return { name, - file: await readStreamToJson(value) + value: String(value) }; } else { return { name, - value: String(value) + file: await readStreamToJson(platform, value) }; } } @@ -270,8 +266,6 @@ function isJsonParsable(value) { if (e instanceof SyntaxError) return false;else throw e; } } -_Symbol$asyncDispose2 = Symbol.asyncDispose; -_util$inspect$custom = util.inspect.custom; class APIResponse { constructor(context, initializer) { this._initializer = void 0; @@ -280,6 +274,7 @@ class APIResponse { this._request = context; this._initializer = initializer; this._headers = new _network.RawHeaders(this._initializer.headers); + if (context._platform.inspectCustom) this[context._platform.inspectCustom] = () => this._inspect(); } ok() { return this._initializer.status >= 200 && this._initializer.status <= 299; @@ -300,16 +295,18 @@ class APIResponse { return this._headers.headersArray(); } async body() { - try { - const result = await this._request._channel.fetchResponseBody({ - fetchUid: this._fetchUid() - }); - if (result.binary === undefined) throw new Error('Response has been disposed'); - return result.binary; - } catch (e) { - if ((0, _errors.isTargetClosedError)(e)) throw new Error('Response has been disposed'); - throw e; - } + return await this._request._wrapApiCall(async () => { + try { + const result = await this._request._channel.fetchResponseBody({ + fetchUid: this._fetchUid() + }); + if (result.binary === undefined) throw new Error('Response has been disposed'); + return result.binary; + } catch (e) { + if ((0, _errors.isTargetClosedError)(e)) throw new Error('Response has been disposed'); + throw e; + } + }, true); } async text() { const content = await this.body(); @@ -319,7 +316,7 @@ class APIResponse { const content = await this.text(); return JSON.parse(content); } - async [_Symbol$asyncDispose2]() { + async [Symbol.asyncDispose]() { await this.dispose(); } async dispose() { @@ -327,7 +324,7 @@ class APIResponse { fetchUid: this._fetchUid() }); } - [_util$inspect$custom]() { + _inspect() { const headers = this.headersArray().map(({ name, value @@ -354,7 +351,7 @@ function filePayloadToJson(payload) { buffer: payload.buffer }; } -async function readStreamToJson(stream) { +async function readStreamToJson(platform, stream) { const buffer = await new Promise((resolve, reject) => { const chunks = []; stream.on('data', chunk => chunks.push(chunk)); @@ -363,7 +360,7 @@ async function readStreamToJson(stream) { }); const streamPath = Buffer.isBuffer(stream.path) ? stream.path.toString('utf8') : stream.path; return { - name: _path.default.basename(streamPath), + name: platform.path().basename(streamPath), buffer }; } @@ -380,10 +377,12 @@ function isJsonContentType(headers) { function objectToArray(map) { if (!map) return undefined; const result = []; - for (const [name, value] of Object.entries(map)) result.push({ - name, - value: String(value) - }); + for (const [name, value] of Object.entries(map)) { + if (value !== undefined) result.push({ + name, + value: String(value) + }); + } return result; } function isFilePayload(value) { diff --git a/tvapp2/node_modules/playwright-core/lib/client/frame.js b/tvapp2/node_modules/playwright-core/lib/client/frame.js index 9b04ac31..f43d9c15 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/frame.js +++ b/tvapp2/node_modules/playwright-core/lib/client/frame.js @@ -5,22 +5,21 @@ Object.defineProperty(exports, "__esModule", { }); exports.Frame = void 0; exports.verifyLoadState = verifyLoadState; -var _utils = require("../utils"); +var _eventEmitter = require("./eventEmitter"); var _channelOwner = require("./channelOwner"); -var _locator = require("./locator"); -var _locatorUtils = require("../utils/isomorphic/locatorUtils"); -var _elementHandle = require("./elementHandle"); -var _jsHandle = require("./jsHandle"); -var _fs = _interopRequireDefault(require("fs")); -var network = _interopRequireWildcard(require("./network")); -var _events = require("events"); -var _waiter = require("./waiter"); -var _events2 = require("./events"); -var _types = require("./types"); var _clientHelper = require("./clientHelper"); +var _elementHandle = require("./elementHandle"); +var _events = require("./events"); +var _jsHandle = require("./jsHandle"); +var _locator = require("./locator"); +var network = _interopRequireWildcard(require("./network")); +var _types = require("./types"); +var _waiter = require("./waiter"); +var _assert = require("../utils/isomorphic/assert"); +var _locatorUtils = require("../utils/isomorphic/locatorUtils"); +var _urlMatch = require("../utils/isomorphic/urlMatch"); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /** * Copyright 2017 Google Inc. All rights reserved. * Modifications copyright (c) Microsoft Corporation. @@ -55,7 +54,7 @@ class Frame extends _channelOwner.ChannelOwner { this._detached = false; this._childFrames = new Set(); this._page = void 0; - this._eventEmitter = new _events.EventEmitter(); + this._eventEmitter = new _eventEmitter.EventEmitter(parent._platform); this._eventEmitter.setMaxListeners(0); this._parentFrame = Frame.fromNullable(initializer.parentFrame); if (this._parentFrame) this._parentFrame._childFrames.add(this); @@ -68,14 +67,14 @@ class Frame extends _channelOwner.ChannelOwner { this._eventEmitter.emit('loadstate', event.add); } if (event.remove) this._loadStates.delete(event.remove); - if (!this._parentFrame && event.add === 'load' && this._page) this._page.emit(_events2.Events.Page.Load, this._page); - if (!this._parentFrame && event.add === 'domcontentloaded' && this._page) this._page.emit(_events2.Events.Page.DOMContentLoaded, this._page); + if (!this._parentFrame && event.add === 'load' && this._page) this._page.emit(_events.Events.Page.Load, this._page); + if (!this._parentFrame && event.add === 'domcontentloaded' && this._page) this._page.emit(_events.Events.Page.DOMContentLoaded, this._page); }); this._channel.on('navigated', event => { this._url = event.url; this._name = event.name; this._eventEmitter.emit('navigated', event); - if (!event.error && this._page) this._page.emit(_events2.Events.Page.FrameNavigated, this); + if (!event.error && this._page) this._page.emit(_events.Events.Page.FrameNavigated, this); }); } page() { @@ -92,9 +91,9 @@ class Frame extends _channelOwner.ChannelOwner { _setupNavigationWaiter(options) { const waiter = new _waiter.Waiter(this._page, ''); if (this._page.isClosed()) waiter.rejectImmediately(this._page._closeErrorWithReason()); - waiter.rejectOnEvent(this._page, _events2.Events.Page.Close, () => this._page._closeErrorWithReason()); - waiter.rejectOnEvent(this._page, _events2.Events.Page.Crash, new Error('Navigation failed because page crashed!')); - waiter.rejectOnEvent(this._page, _events2.Events.Page.FrameDetached, new Error('Navigating frame was detached!'), frame => frame === this); + waiter.rejectOnEvent(this._page, _events.Events.Page.Close, () => this._page._closeErrorWithReason()); + waiter.rejectOnEvent(this._page, _events.Events.Page.Crash, new Error('Navigation failed because page crashed!')); + waiter.rejectOnEvent(this._page, _events.Events.Page.FrameDetached, new Error('Navigating frame was detached!'), frame => frame === this); const timeout = this._page._timeoutSettings.navigationTimeout(options); waiter.rejectOnTimeout(timeout, `Timeout ${timeout}ms exceeded.`); return waiter; @@ -110,7 +109,7 @@ class Frame extends _channelOwner.ChannelOwner { // Any failed navigation results in a rejection. if (event.error) return true; waiter.log(` navigated to "${event.url}"`); - return (0, _utils.urlMatches)((_this$_page = this._page) === null || _this$_page === void 0 ? void 0 : _this$_page.context()._options.baseURL, event.url, options.url); + return (0, _urlMatch.urlMatches)((_this$_page = this._page) === null || _this$_page === void 0 ? void 0 : _this$_page.context()._options.baseURL, event.url, options.url); }); if (navigatedEvent.error) { const e = new Error(navigatedEvent.error); @@ -146,7 +145,7 @@ class Frame extends _channelOwner.ChannelOwner { } async waitForURL(url, options = {}) { var _this$_page2; - if ((0, _utils.urlMatches)((_this$_page2 = this._page) === null || _this$_page2 === void 0 ? void 0 : _this$_page2.context()._options.baseURL, this.url(), url)) return await this.waitForLoadState(options.waitUntil, options); + if ((0, _urlMatch.urlMatches)((_this$_page2 = this._page) === null || _this$_page2 === void 0 ? void 0 : _this$_page2.context()._options.baseURL, this.url(), url)) return await this.waitForLoadState(options.waitUntil, options); await this.waitForNavigation({ url, ...options @@ -268,7 +267,7 @@ class Frame extends _channelOwner.ChannelOwner { ...options }; if (copy.path) { - copy.content = (await _fs.default.promises.readFile(copy.path)).toString(); + copy.content = (await this._platform.fs().promises.readFile(copy.path)).toString(); copy.content = (0, _clientHelper.addSourceUrlToScript)(copy.content, copy.path); } return _elementHandle.ElementHandle.from((await this._channel.addScriptTag({ @@ -280,7 +279,7 @@ class Frame extends _channelOwner.ChannelOwner { ...options }; if (copy.path) { - copy.content = (await _fs.default.promises.readFile(copy.path)).toString(); + copy.content = (await this._platform.fs().promises.readFile(copy.path)).toString(); copy.content += '/*# sourceURL=' + copy.path.replace(/\n/g, '') + '*/'; } return _elementHandle.ElementHandle.from((await this._channel.addStyleTag({ @@ -440,7 +439,7 @@ class Frame extends _channelOwner.ChannelOwner { })).values; } async setInputFiles(selector, files, options = {}) { - const converted = await (0, _elementHandle.convertInputFiles)(files, this.page().context()); + const converted = await (0, _elementHandle.convertInputFiles)(this._platform, files, this.page().context()); await this._channel.setInputFiles({ selector, ...converted, @@ -482,7 +481,7 @@ class Frame extends _channelOwner.ChannelOwner { }); } async waitForFunction(pageFunction, arg, options = {}) { - if (typeof options.polling === 'string') (0, _utils.assert)(options.polling === 'raf', 'Unknown polling option: ' + options.polling); + if (typeof options.polling === 'string') (0, _assert.assert)(options.polling === 'raf', 'Unknown polling option: ' + options.polling); const result = await this._channel.waitForFunction({ ...options, pollingInterval: options.polling === 'raf' ? undefined : options.polling, diff --git a/tvapp2/node_modules/playwright-core/lib/client/harRouter.js b/tvapp2/node_modules/playwright-core/lib/client/harRouter.js index 632115f8..3f65287c 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/harRouter.js +++ b/tvapp2/node_modules/playwright-core/lib/client/harRouter.js @@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.HarRouter = void 0; -var _debugLogger = require("../utils/debugLogger"); -let _Symbol$asyncDispose; /** * Copyright (c) Microsoft Corporation. * @@ -21,13 +19,13 @@ let _Symbol$asyncDispose; * See the License for the specific language governing permissions and * limitations under the License. */ -_Symbol$asyncDispose = Symbol.asyncDispose; + class HarRouter { static async create(localUtils, file, notFoundAction, options) { const { harId, error - } = await localUtils._channel.harOpen({ + } = await localUtils.harOpen({ file }); if (error) throw new Error(error); @@ -45,7 +43,7 @@ class HarRouter { } async _handle(route) { const request = route.request(); - const response = await this._localUtils._channel.harLookup({ + const response = await this._localUtils.harLookup({ harId: this._harId, url: request.url(), method: request.method(), @@ -54,7 +52,7 @@ class HarRouter { isNavigationRequest: request.isNavigationRequest() }); if (response.action === 'redirect') { - _debugLogger.debugLogger.log('api', `HAR: ${route.request().url()} redirected to ${response.redirectURL}`); + route._platform.log('api', `HAR: ${route.request().url()} redirected to ${response.redirectURL}`); await route._redirectNavigationRequest(response.redirectURL); return; } @@ -72,7 +70,7 @@ class HarRouter { }); return; } - if (response.action === 'error') _debugLogger.debugLogger.log('api', 'HAR: ' + response.message); + if (response.action === 'error') route._platform.log('api', 'HAR: ' + response.message); // Report the error, but fall through to the default handler. if (this._notFoundAction === 'abort') { @@ -87,11 +85,11 @@ class HarRouter { async addPageRoute(page) { await page.route(this._options.urlMatch || '**/*', route => this._handle(route)); } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.dispose(); } dispose() { - this._localUtils._channel.harClose({ + this._localUtils.harClose({ harId: this._harId }).catch(() => {}); } diff --git a/tvapp2/node_modules/playwright-core/lib/client/jsHandle.js b/tvapp2/node_modules/playwright-core/lib/client/jsHandle.js index 2d24bec1..f3edad76 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/jsHandle.js +++ b/tvapp2/node_modules/playwright-core/lib/client/jsHandle.js @@ -8,9 +8,8 @@ exports.assertMaxArguments = assertMaxArguments; exports.parseResult = parseResult; exports.serializeArgument = serializeArgument; var _channelOwner = require("./channelOwner"); -var _serializers = require("../protocol/serializers"); var _errors = require("./errors"); -let _Symbol$asyncDispose; +var _serializers = require("../protocol/serializers"); /** * Copyright (c) Microsoft Corporation. * @@ -26,7 +25,7 @@ let _Symbol$asyncDispose; * See the License for the specific language governing permissions and * limitations under the License. */ -_Symbol$asyncDispose = Symbol.asyncDispose; + class JSHandle extends _channelOwner.ChannelOwner { static from(handle) { return handle._object; @@ -75,7 +74,7 @@ class JSHandle extends _channelOwner.ChannelOwner { asElement() { return null; } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.dispose(); } async dispose() { diff --git a/tvapp2/node_modules/playwright-core/lib/client/localUtils.js b/tvapp2/node_modules/playwright-core/lib/client/localUtils.js index b5473652..f369ec76 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/localUtils.js +++ b/tvapp2/node_modules/playwright-core/lib/client/localUtils.js @@ -32,5 +32,29 @@ class LocalUtils extends _channelOwner.ChannelOwner { descriptor } of initializer.deviceDescriptors) this.devices[name] = descriptor; } + async zip(params) { + return await this._channel.zip(params); + } + async harOpen(params) { + return await this._channel.harOpen(params); + } + async harLookup(params) { + return await this._channel.harLookup(params); + } + async harClose(params) { + return await this._channel.harClose(params); + } + async harUnzip(params) { + return await this._channel.harUnzip(params); + } + async tracingStarted(params) { + return await this._channel.tracingStarted(params); + } + async traceDiscarded(params) { + return await this._channel.traceDiscarded(params); + } + async addStackToTracingNoReply(params) { + return await this._channel.addStackToTracingNoReply(params); + } } exports.LocalUtils = LocalUtils; \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/client/locator.js b/tvapp2/node_modules/playwright-core/lib/client/locator.js index 72f7e780..6a1e195b 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/locator.js +++ b/tvapp2/node_modules/playwright-core/lib/client/locator.js @@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", { exports.Locator = exports.FrameLocator = void 0; exports.setTestIdAttribute = setTestIdAttribute; exports.testIdAttributeName = testIdAttributeName; -var util = _interopRequireWildcard(require("util")); -var _utils = require("../utils"); var _elementHandle = require("./elementHandle"); var _jsHandle = require("./jsHandle"); -var _stringUtils = require("../utils/isomorphic/stringUtils"); +var _locatorGenerators = require("../utils/isomorphic/locatorGenerators"); var _locatorUtils = require("../utils/isomorphic/locatorUtils"); -let _util$inspect$custom; +var _stringUtils = require("../utils/isomorphic/stringUtils"); +var _rtti = require("../utils/isomorphic/rtti"); +var _time = require("../utils/isomorphic/time"); /** * Copyright (c) Microsoft Corporation. * @@ -28,9 +28,7 @@ let _util$inspect$custom; * See the License for the specific language governing permissions and * limitations under the License. */ -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -_util$inspect$custom = util.inspect.custom; + class Locator { constructor(frame, selector, options) { this._frame = void 0; @@ -49,12 +47,14 @@ class Locator { if (locator._frame !== frame) throw new Error(`Inner "hasNot" locator must belong to the same frame.`); this._selector += ` >> internal:has-not=` + JSON.stringify(locator._selector); } + if ((options === null || options === void 0 ? void 0 : options.visible) !== undefined) this._selector += ` >> visible=${options.visible ? 'true' : 'false'}`; + if (this._frame._platform.inspectCustom) this[this._frame._platform.inspectCustom] = () => this._inspect(); } async _withElement(task, timeout) { timeout = this._frame.page()._timeoutSettings.timeout({ timeout }); - const deadline = timeout ? (0, _utils.monotonicTime)() + timeout : 0; + const deadline = timeout ? (0, _time.monotonicTime)() + timeout : 0; return await this._frame._wrapApiCall(async () => { const result = await this._frame._channel.waitForSelector({ selector: this._selector, @@ -65,7 +65,7 @@ class Locator { const handle = _elementHandle.ElementHandle.fromNullable(result.element); if (!handle) throw new Error(`Could not resolve ${this._selector} to DOM Element`); try { - return await task(handle, deadline ? deadline - (0, _utils.monotonicTime)() : 0); + return await task(handle, deadline ? deadline - (0, _time.monotonicTime)() : 0); } finally { await handle.dispose(); } @@ -136,7 +136,7 @@ class Locator { return await this._frame._highlight(this._selector); } locator(selectorOrLocator, options) { - if ((0, _utils.isString)(selectorOrLocator)) return new Locator(this._frame, this._selector + ' >> ' + selectorOrLocator, options); + if ((0, _rtti.isString)(selectorOrLocator)) return new Locator(this._frame, this._selector + ' >> ' + selectorOrLocator, options); if (selectorOrLocator._frame !== this._frame) throw new Error(`Locators must belong to the same frame.`); return new Locator(this._frame, this._selector + ' >> internal:chain=' + JSON.stringify(selectorOrLocator._selector), options); } @@ -213,6 +213,9 @@ class Locator { async count() { return await this._frame._queryCount(this._selector); } + async _generateLocatorString() { + return await this._withElement(h => h._generateLocatorString()); + } async getAttribute(name, options) { return await this._frame.getAttribute(this._selector, name, { strict: true, @@ -286,14 +289,18 @@ class Locator { }); } async screenshot(options = {}) { + const mask = options.mask; return await this._withElement((h, timeout) => h.screenshot({ ...options, + mask, timeout }), options.timeout); } async ariaSnapshot(options) { const result = await this._frame._channel.ariaSnapshot({ ...options, + id: options === null || options === void 0 ? void 0 : options._id, + mode: options === null || options === void 0 ? void 0 : options._mode, selector: this._selector }); return result.snapshot; @@ -381,11 +388,11 @@ class Locator { if (result.received !== undefined) result.received = (0, _jsHandle.parseResult)(result.received); return result; } - [_util$inspect$custom]() { + _inspect() { return this.toString(); } toString() { - return (0, _utils.asLocator)('javascript', this._selector); + return (0, _locatorGenerators.asLocator)('javascript', this._selector); } } exports.Locator = Locator; @@ -397,7 +404,7 @@ class FrameLocator { this._frameSelector = selector; } locator(selectorOrLocator, options) { - if ((0, _utils.isString)(selectorOrLocator)) return new Locator(this._frame, this._frameSelector + ' >> internal:control=enter-frame >> ' + selectorOrLocator, options); + if ((0, _rtti.isString)(selectorOrLocator)) return new Locator(this._frame, this._frameSelector + ' >> internal:control=enter-frame >> ' + selectorOrLocator, options); if (selectorOrLocator._frame !== this._frame) throw new Error(`Locators must belong to the same frame.`); return new Locator(this._frame, this._frameSelector + ' >> internal:control=enter-frame >> ' + selectorOrLocator._selector, options); } diff --git a/tvapp2/node_modules/playwright-core/lib/client/network.js b/tvapp2/node_modules/playwright-core/lib/client/network.js index 364ebef8..fd4691b0 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/network.js +++ b/tvapp2/node_modules/playwright-core/lib/client/network.js @@ -5,19 +5,21 @@ Object.defineProperty(exports, "__esModule", { }); exports.WebSocketRouteHandler = exports.WebSocketRoute = exports.WebSocket = exports.RouteHandler = exports.Route = exports.Response = exports.Request = exports.RawHeaders = void 0; exports.validateHeaders = validateHeaders; -var _url = require("url"); var _channelOwner = require("./channelOwner"); -var _frame = require("./frame"); -var _worker = require("./worker"); -var _fs = _interopRequireDefault(require("fs")); -var _utilsBundle = require("../utilsBundle"); -var _utils = require("../utils"); -var _manualPromise = require("../utils/manualPromise"); -var _events = require("./events"); -var _waiter = require("./waiter"); -var _fetch = require("./fetch"); var _errors = require("./errors"); -let _Symbol$asyncDispose; +var _events = require("./events"); +var _fetch = require("./fetch"); +var _frame = require("./frame"); +var _waiter = require("./waiter"); +var _worker = require("./worker"); +var _assert = require("../utils/isomorphic/assert"); +var _headers = require("../utils/isomorphic/headers"); +var _urlMatch = require("../utils/isomorphic/urlMatch"); +var _manualPromise = require("../utils/isomorphic/manualPromise"); +var _multimap = require("../utils/isomorphic/multimap"); +var _rtti = require("../utils/isomorphic/rtti"); +var _stackTrace = require("../utils/isomorphic/stackTrace"); +var _mimeType = require("../utils/isomorphic/mimeType"); /** * Copyright (c) Microsoft Corporation. * @@ -33,7 +35,7 @@ let _Symbol$asyncDispose; * See the License for the specific language governing permissions and * limitations under the License. */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + class Request extends _channelOwner.ChannelOwner { static from(request) { return request._object; @@ -88,7 +90,7 @@ class Request extends _channelOwner.ChannelOwner { const contentType = this.headers()['content-type']; if (contentType !== null && contentType !== void 0 && contentType.includes('application/x-www-form-urlencoded')) { const entries = {}; - const parsed = new _url.URLSearchParams(postData); + const parsed = new URLSearchParams(postData); for (const [k, v] of parsed.entries()) entries[k] = v; return entries; } @@ -134,7 +136,7 @@ class Request extends _channelOwner.ChannelOwner { } frame() { if (!this._initializer.frame) { - (0, _utils.assert)(this.serviceWorker()); + (0, _assert.assert)(this.serviceWorker()); throw new Error('Service Worker requests do not have an associated frame.'); } const frame = _frame.Frame.from(this._initializer.frame); @@ -184,7 +186,7 @@ class Request extends _channelOwner.ChannelOwner { if (overrides.url) this._fallbackOverrides.url = overrides.url; if (overrides.method) this._fallbackOverrides.method = overrides.method; if (overrides.headers) this._fallbackOverrides.headers = overrides.headers; - if ((0, _utils.isString)(overrides.postData)) this._fallbackOverrides.postDataBuffer = Buffer.from(overrides.postData, 'utf-8');else if (overrides.postData instanceof Buffer) this._fallbackOverrides.postDataBuffer = overrides.postData;else if (overrides.postData) this._fallbackOverrides.postDataBuffer = Buffer.from(JSON.stringify(overrides.postData), 'utf-8'); + if ((0, _rtti.isString)(overrides.postData)) this._fallbackOverrides.postDataBuffer = Buffer.from(overrides.postData, 'utf-8');else if (overrides.postData instanceof Buffer) this._fallbackOverrides.postDataBuffer = overrides.postData;else if (overrides.postData) this._fallbackOverrides.postDataBuffer = Buffer.from(JSON.stringify(overrides.postData), 'utf-8'); } _fallbackOverridesForContinue() { return this._fallbackOverrides; @@ -272,13 +274,12 @@ class Route extends _channelOwner.ChannelOwner { body } = options; if (options.json !== undefined) { - (0, _utils.assert)(options.body === undefined, 'Can specify either body or json parameters'); + (0, _assert.assert)(options.body === undefined, 'Can specify either body or json parameters'); body = JSON.stringify(options.json); } if (options.response instanceof _fetch.APIResponse) { - var _statusOption, _headersOption; - (_statusOption = statusOption) !== null && _statusOption !== void 0 ? _statusOption : statusOption = options.response.status(); - (_headersOption = headersOption) !== null && _headersOption !== void 0 ? _headersOption : headersOption = options.response.headers(); + statusOption !== null && statusOption !== void 0 ? statusOption : statusOption = options.response.status(); + headersOption !== null && headersOption !== void 0 ? headersOption : headersOption = options.response.headers(); if (body === undefined && options.path === undefined) { if (options.response._request._connection === this._connection) fetchResponseUid = options.response._fetchUid();else body = await options.response.body(); } @@ -286,11 +287,11 @@ class Route extends _channelOwner.ChannelOwner { let isBase64 = false; let length = 0; if (options.path) { - const buffer = await _fs.default.promises.readFile(options.path); + const buffer = await this._platform.fs().promises.readFile(options.path); body = buffer.toString('base64'); isBase64 = true; length = buffer.length; - } else if ((0, _utils.isString)(body)) { + } else if ((0, _rtti.isString)(body)) { isBase64 = false; length = Buffer.byteLength(body); } else if (body) { @@ -300,11 +301,11 @@ class Route extends _channelOwner.ChannelOwner { } const headers = {}; for (const header of Object.keys(headersOption || {})) headers[header.toLowerCase()] = String(headersOption[header]); - if (options.contentType) headers['content-type'] = String(options.contentType);else if (options.json) headers['content-type'] = 'application/json';else if (options.path) headers['content-type'] = _utilsBundle.mime.getType(options.path) || 'application/octet-stream'; + if (options.contentType) headers['content-type'] = String(options.contentType);else if (options.json) headers['content-type'] = 'application/json';else if (options.path) headers['content-type'] = (0, _mimeType.getMimeTypeForPath)(options.path) || 'application/octet-stream'; if (length && !('content-length' in headers)) headers['content-length'] = String(length); await this._raceWithTargetClose(this._channel.fulfill({ status: statusOption || 200, - headers: (0, _utils.headersObjectToArray)(headers), + headers: (0, _headers.headersObjectToArray)(headers), body, isBase64, fetchResponseUid @@ -329,14 +330,13 @@ class Route extends _channelOwner.ChannelOwner { return await this._raceWithTargetClose(this._channel.continue({ url: options.url, method: options.method, - headers: options.headers ? (0, _utils.headersObjectToArray)(options.headers) : undefined, + headers: options.headers ? (0, _headers.headersObjectToArray)(options.headers) : undefined, postData: options.postDataBuffer, isFallback })); } } exports.Route = Route; -_Symbol$asyncDispose = Symbol.asyncDispose; class WebSocketRoute extends _channelOwner.ChannelOwner { static from(route) { return route._object; @@ -370,7 +370,7 @@ class WebSocketRoute extends _channelOwner.ChannelOwner { }).catch(() => {}); }, send: message => { - if ((0, _utils.isString)(message)) this._channel.sendToServer({ + if ((0, _rtti.isString)(message)) this._channel.sendToServer({ message, isBase64: false }).catch(() => {});else this._channel.sendToServer({ @@ -439,7 +439,7 @@ class WebSocketRoute extends _channelOwner.ChannelOwner { return this._server; } send(message) { - if ((0, _utils.isString)(message)) this._channel.sendToPage({ + if ((0, _rtti.isString)(message)) this._channel.sendToPage({ message, isBase64: false }).catch(() => {});else this._channel.sendToPage({ @@ -453,7 +453,7 @@ class WebSocketRoute extends _channelOwner.ChannelOwner { onClose(handler) { this._onPageClose = handler; } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.close(); } async _afterHandle() { @@ -476,9 +476,9 @@ class WebSocketRouteHandler { const patterns = []; let all = false; for (const handler of handlers) { - if ((0, _utils.isString)(handler.url)) patterns.push({ + if ((0, _rtti.isString)(handler.url)) patterns.push({ glob: handler.url - });else if ((0, _utils.isRegExp)(handler.url)) patterns.push({ + });else if ((0, _rtti.isRegExp)(handler.url)) patterns.push({ regexSource: handler.url.source, regexFlags: handler.url.flags });else all = true; @@ -489,7 +489,7 @@ class WebSocketRouteHandler { return patterns; } matches(wsURL) { - return (0, _utils.urlMatches)(this._baseURL, wsURL, this.url); + return (0, _urlMatch.urlMatches)(this._baseURL, wsURL, this.url); } async handle(webSocketRoute) { const handler = this.handler; @@ -644,11 +644,11 @@ exports.WebSocket = WebSocket; function validateHeaders(headers) { for (const key of Object.keys(headers)) { const value = headers[key]; - if (!Object.is(value, undefined) && !(0, _utils.isString)(value)) throw new Error(`Expected value of header "${key}" to be String, but "${typeof value}" is found.`); + if (!Object.is(value, undefined) && !(0, _rtti.isString)(value)) throw new Error(`Expected value of header "${key}" to be String, but "${typeof value}" is found.`); } } class RouteHandler { - constructor(baseURL, url, handler, times = Number.MAX_SAFE_INTEGER) { + constructor(platform, baseURL, url, handler, times = Number.MAX_SAFE_INTEGER) { this.handledCount = 0; this._baseURL = void 0; this._times = void 0; @@ -656,20 +656,20 @@ class RouteHandler { this.handler = void 0; this._ignoreException = false; this._activeInvocations = new Set(); - this._svedZone = void 0; + this._savedZone = void 0; this._baseURL = baseURL; this._times = times; this.url = url; this.handler = handler; - this._svedZone = _utils.zones.current().without('apiZone'); + this._savedZone = platform.zones.current().pop(); } static prepareInterceptionPatterns(handlers) { const patterns = []; let all = false; for (const handler of handlers) { - if ((0, _utils.isString)(handler.url)) patterns.push({ + if ((0, _rtti.isString)(handler.url)) patterns.push({ glob: handler.url - });else if ((0, _utils.isRegExp)(handler.url)) patterns.push({ + });else if ((0, _rtti.isRegExp)(handler.url)) patterns.push({ regexSource: handler.url.source, regexFlags: handler.url.flags });else all = true; @@ -680,10 +680,10 @@ class RouteHandler { return patterns; } matches(requestURL) { - return (0, _utils.urlMatches)(this._baseURL, requestURL, this.url); + return (0, _urlMatch.urlMatches)(this._baseURL, requestURL, this.url); } async handle(route) { - return await this._svedZone.run(async () => this._handleImpl(route)); + return await this._savedZone.run(async () => this._handleImpl(route)); } async _handleImpl(route) { const handlerInvocation = { @@ -699,7 +699,7 @@ class RouteHandler { if ((0, _errors.isTargetClosedError)(e)) { // We are failing in the handler because the target close closed. // Give user a hint! - (0, _utils.rewriteErrorMessage)(e, `"${e.message}" while running route callback.\nConsider awaiting \`await page.unrouteAll({ behavior: 'ignoreErrors' })\`\nbefore the end of the test to ignore remaining routes in flight.`); + (0, _stackTrace.rewriteErrorMessage)(e, `"${e.message}" while running route callback.\nConsider awaiting \`await page.unrouteAll({ behavior: 'ignoreErrors' })\`\nbefore the end of the test to ignore remaining routes in flight.`); } throw e; } finally { @@ -745,7 +745,7 @@ class RawHeaders { } constructor(headers) { this._headersArray = void 0; - this._headersMap = new _utils.MultiMap(); + this._headersMap = new _multimap.MultiMap(); this._headersArray = headers; for (const header of headers) this._headersMap.set(header.name.toLowerCase(), header.value); } diff --git a/tvapp2/node_modules/playwright-core/lib/client/page.js b/tvapp2/node_modules/playwright-core/lib/client/page.js index b18ceb45..5da460f4 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/page.js +++ b/tvapp2/node_modules/playwright-core/lib/client/page.js @@ -4,11 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Page = exports.BindingCall = void 0; -var _fs = _interopRequireDefault(require("fs")); -var _path = _interopRequireDefault(require("path")); -var _errors = require("./errors"); -var _timeoutSettings = require("../common/timeoutSettings"); -var _utils = require("../utils"); var _accessibility = require("./accessibility"); var _artifact = require("./artifact"); var _channelOwner = require("./channelOwner"); @@ -16,17 +11,25 @@ var _clientHelper = require("./clientHelper"); var _coverage = require("./coverage"); var _download = require("./download"); var _elementHandle = require("./elementHandle"); +var _errors = require("./errors"); var _events = require("./events"); var _fileChooser = require("./fileChooser"); var _frame = require("./frame"); +var _harRouter = require("./harRouter"); var _input = require("./input"); var _jsHandle = require("./jsHandle"); var _network = require("./network"); var _video = require("./video"); var _waiter = require("./waiter"); var _worker = require("./worker"); -var _harRouter = require("./harRouter"); -let _Symbol$asyncDispose; +var _timeoutSettings = require("./timeoutSettings"); +var _assert = require("../utils/isomorphic/assert"); +var _fileUtils = require("./fileUtils"); +var _headers = require("../utils/isomorphic/headers"); +var _stringUtils = require("../utils/isomorphic/stringUtils"); +var _urlMatch = require("../utils/isomorphic/urlMatch"); +var _manualPromise = require("../utils/isomorphic/manualPromise"); +var _rtti = require("../utils/isomorphic/rtti"); /** * Copyright 2017 Google Inc. All rights reserved. * Modifications copyright (c) Microsoft Corporation. @@ -43,8 +46,7 @@ let _Symbol$asyncDispose; * See the License for the specific language governing permissions and * limitations under the License. */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -_Symbol$asyncDispose = Symbol.asyncDispose; + class Page extends _channelOwner.ChannelOwner { static from(page) { return page._object; @@ -60,7 +62,7 @@ class Page extends _channelOwner.ChannelOwner { this._frames = new Set(); this._workers = new Set(); this._closed = false; - this._closedOrCrashedScope = new _utils.LongStandingScope(); + this._closedOrCrashedScope = new _manualPromise.LongStandingScope(); this._viewportSize = void 0; this._routes = []; this._webSocketRoutes = []; @@ -80,7 +82,7 @@ class Page extends _channelOwner.ChannelOwner { this._harRouters = []; this._locatorHandlers = new Map(); this._browserContext = parent; - this._timeoutSettings = new _timeoutSettings.TimeoutSettings(this._browserContext._timeoutSettings); + this._timeoutSettings = new _timeoutSettings.TimeoutSettings(this._platform, this._browserContext._timeoutSettings); this.accessibility = new _accessibility.Accessibility(this._channel); this.keyboard = new _input.Keyboard(this); this.mouse = new _input.Mouse(this); @@ -208,12 +210,12 @@ class Page extends _channelOwner.ChannelOwner { return this._mainFrame; } frame(frameSelector) { - const name = (0, _utils.isString)(frameSelector) ? frameSelector : frameSelector.name; - const url = (0, _utils.isObject)(frameSelector) ? frameSelector.url : undefined; - (0, _utils.assert)(name || url, 'Either name or url matcher should be specified'); + const name = (0, _rtti.isString)(frameSelector) ? frameSelector : frameSelector.name; + const url = (0, _rtti.isObject)(frameSelector) ? frameSelector.url : undefined; + (0, _assert.assert)(name || url, 'Either name or url matcher should be specified'); return this.frames().find(f => { if (name) return f.name() === name; - return (0, _utils.urlMatches)(this._browserContext._options.baseURL, f.url(), url); + return (0, _urlMatch.urlMatches)(this._browserContext._options.baseURL, f.url(), url); }) || null; } frames() { @@ -222,18 +224,18 @@ class Page extends _channelOwner.ChannelOwner { setDefaultNavigationTimeout(timeout) { this._timeoutSettings.setDefaultNavigationTimeout(timeout); this._wrapApiCall(async () => { - this._channel.setDefaultNavigationTimeoutNoReply({ + await this._channel.setDefaultNavigationTimeoutNoReply({ timeout - }).catch(() => {}); - }, true); + }); + }, true).catch(() => {}); } setDefaultTimeout(timeout) { this._timeoutSettings.setDefaultTimeout(timeout); this._wrapApiCall(async () => { - this._channel.setDefaultTimeoutNoReply({ + await this._channel.setDefaultTimeoutNoReply({ timeout - }).catch(() => {}); - }, true); + }); + }, true).catch(() => {}); } _forceVideo() { if (!this._video) this._video = new _video.Video(this, this._connection); @@ -293,7 +295,7 @@ class Page extends _channelOwner.ChannelOwner { async setExtraHTTPHeaders(headers) { (0, _network.validateHeaders)(headers); await this._channel.setExtraHTTPHeaders({ - headers: (0, _utils.headersObjectToArray)(headers) + headers: (0, _headers.headersObjectToArray)(headers) }); } url() { @@ -368,7 +370,7 @@ class Page extends _channelOwner.ChannelOwner { } async waitForRequest(urlOrPredicate, options = {}) { const predicate = async request => { - if ((0, _utils.isString)(urlOrPredicate) || (0, _utils.isRegExp)(urlOrPredicate)) return (0, _utils.urlMatches)(this._browserContext._options.baseURL, request.url(), urlOrPredicate); + if ((0, _rtti.isString)(urlOrPredicate) || (0, _rtti.isRegExp)(urlOrPredicate)) return (0, _urlMatch.urlMatches)(this._browserContext._options.baseURL, request.url(), urlOrPredicate); return await urlOrPredicate(request); }; const trimmedUrl = trimUrl(urlOrPredicate); @@ -380,7 +382,7 @@ class Page extends _channelOwner.ChannelOwner { } async waitForResponse(urlOrPredicate, options = {}) { const predicate = async response => { - if ((0, _utils.isString)(urlOrPredicate) || (0, _utils.isRegExp)(urlOrPredicate)) return (0, _utils.urlMatches)(this._browserContext._options.baseURL, response.url(), urlOrPredicate); + if ((0, _rtti.isString)(urlOrPredicate) || (0, _rtti.isRegExp)(urlOrPredicate)) return (0, _urlMatch.urlMatches)(this._browserContext._options.baseURL, response.url(), urlOrPredicate); return await urlOrPredicate(response); }; const trimmedUrl = trimUrl(urlOrPredicate); @@ -432,7 +434,8 @@ class Page extends _channelOwner.ChannelOwner { media: options.media === null ? 'no-override' : options.media, colorScheme: options.colorScheme === null ? 'no-override' : options.colorScheme, reducedMotion: options.reducedMotion === null ? 'no-override' : options.reducedMotion, - forcedColors: options.forcedColors === null ? 'no-override' : options.forcedColors + forcedColors: options.forcedColors === null ? 'no-override' : options.forcedColors, + contrast: options.contrast === null ? 'no-override' : options.contrast }); } async setViewportSize(viewportSize) { @@ -449,21 +452,23 @@ class Page extends _channelOwner.ChannelOwner { return await this._mainFrame.evaluate(pageFunction, arg); } async addInitScript(script, arg) { - const source = await (0, _clientHelper.evaluationScript)(script, arg); + const source = await (0, _clientHelper.evaluationScript)(this._platform, script, arg); await this._channel.addInitScript({ source }); } async route(url, handler, options = {}) { - this._routes.unshift(new _network.RouteHandler(this._browserContext._options.baseURL, url, handler, options.times)); + this._routes.unshift(new _network.RouteHandler(this._platform, this._browserContext._options.baseURL, url, handler, options.times)); await this._updateInterceptionPatterns(); } async routeFromHAR(har, options = {}) { + const localUtils = this._connection.localUtils(); + if (!localUtils) throw new Error('Route from har is not supported in thin clients'); if (options.update) { await this._browserContext._recordIntoHAR(har, this, options); return; } - const harRouter = await _harRouter.HarRouter.create(this._connection.localUtils(), har, options.notFound || 'abort', { + const harRouter = await _harRouter.HarRouter.create(localUtils, har, options.notFound || 'abort', { urlMatch: options.url }); this._harRouters.push(harRouter); @@ -485,7 +490,7 @@ class Page extends _channelOwner.ChannelOwner { const removed = []; const remaining = []; for (const route of this._routes) { - if ((0, _utils.urlMatchesEqual)(route.url, url) && (!handler || route.handler === handler)) removed.push(route);else remaining.push(route); + if ((0, _urlMatch.urlMatchesEqual)(route.url, url) && (!handler || route.handler === handler)) removed.push(route);else remaining.push(route); } await this._unrouteInternal(removed, remaining, 'default'); } @@ -509,21 +514,22 @@ class Page extends _channelOwner.ChannelOwner { }); } async screenshot(options = {}) { + const mask = options.mask; const copy = { ...options, mask: undefined }; if (!copy.type) copy.type = (0, _elementHandle.determineScreenshotType)(options); - if (options.mask) { - copy.mask = options.mask.map(locator => ({ + if (mask) { + copy.mask = mask.map(locator => ({ frame: locator._frame._channel, selector: locator._selector })); } const result = await this._channel.screenshot(copy); if (options.path) { - await (0, _utils.mkdirIfNeeded)(options.path); - await _fs.default.promises.writeFile(options.path, result.binary); + await (0, _fileUtils.mkdirIfNeeded)(this._platform, options.path); + await this._platform.fs().promises.writeFile(options.path, result.binary); } return result.binary; } @@ -549,7 +555,7 @@ class Page extends _channelOwner.ChannelOwner { async bringToFront() { await this._channel.bringToFront(); } - async [_Symbol$asyncDispose]() { + async [Symbol.asyncDispose]() { await this.close(); } async close(options = {}) { @@ -678,7 +684,7 @@ class Page extends _channelOwner.ChannelOwner { } async pause(_options) { var _this$_instrumentatio; - if (require('inspector').url()) return; + if (this._platform.isJSDebuggerAttached()) return; const defaultNavigationTimeout = this._browserContext._timeoutSettings.defaultNavigationTimeout(); const defaultTimeout = this._browserContext._timeoutSettings.defaultTimeout(); this._browserContext.setDefaultNavigationTimeout(0); @@ -705,10 +711,11 @@ class Page extends _channelOwner.ChannelOwner { } const result = await this._channel.pdf(transportOptions); if (options.path) { - await _fs.default.promises.mkdir(_path.default.dirname(options.path), { + const platform = this._platform; + await platform.fs().promises.mkdir(platform.path().dirname(options.path), { recursive: true }); - await _fs.default.promises.writeFile(options.path, result.pdf); + await platform.fs().promises.writeFile(options.path, result.pdf); } return result.pdf; } @@ -743,6 +750,6 @@ class BindingCall extends _channelOwner.ChannelOwner { } exports.BindingCall = BindingCall; function trimUrl(param) { - if ((0, _utils.isRegExp)(param)) return `/${(0, _utils.trimStringWithEllipsis)(param.source, 50)}/${param.flags}`; - if ((0, _utils.isString)(param)) return `"${(0, _utils.trimStringWithEllipsis)(param, 50)}"`; + if ((0, _rtti.isRegExp)(param)) return `/${(0, _stringUtils.trimStringWithEllipsis)(param.source, 50)}/${param.flags}`; + if ((0, _rtti.isString)(param)) return `"${(0, _stringUtils.trimStringWithEllipsis)(param, 50)}"`; } \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/client/playwright.js b/tvapp2/node_modules/playwright-core/lib/client/playwright.js index c290605b..3d3d2114 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/playwright.js +++ b/tvapp2/node_modules/playwright-core/lib/client/playwright.js @@ -4,11 +4,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Playwright = void 0; -var _errors = require("./errors"); var _android = require("./android"); +var _browser = require("./browser"); var _browserType = require("./browserType"); var _channelOwner = require("./channelOwner"); var _electron = require("./electron"); +var _errors = require("./errors"); var _fetch = require("./fetch"); var _selectors = require("./selectors"); /** @@ -42,6 +43,11 @@ class Playwright extends _channelOwner.ChannelOwner { this.selectors = void 0; this.request = void 0; this.errors = void 0; + // Instrumentation. + this._defaultLaunchOptions = void 0; + this._defaultContextOptions = void 0; + this._defaultContextTimeout = void 0; + this._defaultContextNavigationTimeout = void 0; this.request = new _fetch.APIRequest(this); this.chromium = _browserType.BrowserType.from(initializer.chromium); this.chromium._playwright = this; @@ -76,5 +82,19 @@ class Playwright extends _channelOwner.ChannelOwner { static from(channel) { return channel._object; } + _browserTypes() { + return [this.chromium, this.firefox, this.webkit, this._bidiChromium, this._bidiFirefox]; + } + _preLaunchedBrowser() { + const browser = _browser.Browser.from(this._initializer.preLaunchedBrowser); + browser._browserType = this[browser._name]; + return browser; + } + _allContexts() { + return this._browserTypes().flatMap(type => [...type._contexts]); + } + _allPages() { + return this._allContexts().flatMap(context => context.pages()); + } } exports.Playwright = Playwright; \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/client/selectors.js b/tvapp2/node_modules/playwright-core/lib/client/selectors.js index 9c98c120..2f782ad5 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/selectors.js +++ b/tvapp2/node_modules/playwright-core/lib/client/selectors.js @@ -4,9 +4,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.SelectorsOwner = exports.Selectors = void 0; -var _clientHelper = require("./clientHelper"); +exports.setPlatformForSelectors = setPlatformForSelectors; var _channelOwner = require("./channelOwner"); +var _clientHelper = require("./clientHelper"); var _locator = require("./locator"); +var _platform = require("./platform"); /** * Copyright (c) Microsoft Corporation. * @@ -23,13 +25,17 @@ var _locator = require("./locator"); * limitations under the License. */ +let platform = _platform.emptyPlatform; +function setPlatformForSelectors(p) { + platform = p; +} class Selectors { constructor() { this._channels = new Set(); this._registrations = []; } async register(name, script, options = {}) { - const source = await (0, _clientHelper.evaluationScript)(script, undefined, false); + const source = await (0, _clientHelper.evaluationScript)(platform, script, undefined, false); const params = { ...options, name, diff --git a/tvapp2/node_modules/playwright-core/lib/client/stream.js b/tvapp2/node_modules/playwright-core/lib/client/stream.js index 17ac46b5..82ba06c8 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/stream.js +++ b/tvapp2/node_modules/playwright-core/lib/client/stream.js @@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Stream = void 0; -var _stream = require("stream"); var _channelOwner = require("./channelOwner"); /** * Copyright (c) Microsoft Corporation. @@ -30,25 +29,7 @@ class Stream extends _channelOwner.ChannelOwner { super(parent, type, guid, initializer); } stream() { - return new StreamImpl(this._channel); + return this._platform.streamReadable(this._channel); } } -exports.Stream = Stream; -class StreamImpl extends _stream.Readable { - constructor(channel) { - super(); - this._channel = void 0; - this._channel = channel; - } - async _read() { - const result = await this._channel.read({ - size: 1024 * 1024 - }); - if (result.binary.byteLength) this.push(result.binary);else this.push(null); - } - _destroy(error, callback) { - // Stream might be destroyed after the connection was closed. - this._channel.close().catch(e => null); - super._destroy(error, callback); - } -} \ No newline at end of file +exports.Stream = Stream; \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/client/tracing.js b/tvapp2/node_modules/playwright-core/lib/client/tracing.js index 928fe27d..96f69487 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/tracing.js +++ b/tvapp2/node_modules/playwright-core/lib/client/tracing.js @@ -70,15 +70,16 @@ class Tracing extends _channelOwner.ChannelOwner { }, false); } async _startCollectingStacks(traceName) { + var _this$_connection$loc; if (!this._isTracing) { this._isTracing = true; this._connection.setIsTracing(true); } - const result = await this._connection.localUtils()._channel.tracingStarted({ + const result = await ((_this$_connection$loc = this._connection.localUtils()) === null || _this$_connection$loc === void 0 ? void 0 : _this$_connection$loc.tracingStarted({ tracesDir: this._tracesDir, traceName - }); - this._stacksId = result.stacksId; + })); + this._stacksId = result === null || result === void 0 ? void 0 : result.stacksId; } async stopChunk(options = {}) { await this._doStopChunk(options.path); @@ -94,17 +95,19 @@ class Tracing extends _channelOwner.ChannelOwner { await this._channel.tracingStopChunk({ mode: 'discard' }); - if (this._stacksId) await this._connection.localUtils()._channel.traceDiscarded({ + if (this._stacksId) await this._connection.localUtils().traceDiscarded({ stacksId: this._stacksId }); return; } + const localUtils = this._connection.localUtils(); + if (!localUtils) throw new Error('Cannot save trace in thin clients'); const isLocal = !this._connection.isRemote(); if (isLocal) { const result = await this._channel.tracingStopChunk({ mode: 'entries' }); - await this._connection.localUtils()._channel.zip({ + await localUtils.zip({ zipFile: filePath, entries: result.entries, mode: 'write', @@ -119,7 +122,7 @@ class Tracing extends _channelOwner.ChannelOwner { // The artifact may be missing if the browser closed while stopping tracing. if (!result.artifact) { - if (this._stacksId) await this._connection.localUtils()._channel.traceDiscarded({ + if (this._stacksId) await localUtils.traceDiscarded({ stacksId: this._stacksId }); return; @@ -129,7 +132,7 @@ class Tracing extends _channelOwner.ChannelOwner { const artifact = _artifact.Artifact.from(result.artifact); await artifact.saveAs(filePath); await artifact.delete(); - await this._connection.localUtils()._channel.zip({ + await localUtils.zip({ zipFile: filePath, entries: [], mode: 'append', diff --git a/tvapp2/node_modules/playwright-core/lib/client/video.js b/tvapp2/node_modules/playwright-core/lib/client/video.js index 42198719..2458ee10 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/video.js +++ b/tvapp2/node_modules/playwright-core/lib/client/video.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Video = void 0; -var _utils = require("../utils"); +var _manualPromise = require("../utils/isomorphic/manualPromise"); /** * Copyright (c) Microsoft Corporation. * @@ -24,7 +24,7 @@ var _utils = require("../utils"); class Video { constructor(page, connection) { this._artifact = null; - this._artifactReadyPromise = new _utils.ManualPromise(); + this._artifactReadyPromise = new _manualPromise.ManualPromise(); this._isRemote = false; this._isRemote = connection.isRemote(); this._artifact = page._closedOrCrashedScope.safeRace(this._artifactReadyPromise); diff --git a/tvapp2/node_modules/playwright-core/lib/client/waiter.js b/tvapp2/node_modules/playwright-core/lib/client/waiter.js index a5ed61f3..1cd7d5e6 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/waiter.js +++ b/tvapp2/node_modules/playwright-core/lib/client/waiter.js @@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Waiter = void 0; -var _stackTrace = require("../utils/stackTrace"); var _errors = require("./errors"); -var _utils = require("../utils"); +var _stackTrace = require("../utils/isomorphic/stackTrace"); /** * Copyright (c) Microsoft Corporation. * @@ -33,9 +32,9 @@ class Waiter { this._waitId = void 0; this._error = void 0; this._savedZone = void 0; - this._waitId = (0, _utils.createGuid)(); + this._waitId = channelOwner._platform.createGuid(); this._channelOwner = channelOwner; - this._savedZone = _utils.zones.current().without('apiZone'); + this._savedZone = channelOwner._platform.zones.current().pop(); this._channelOwner._channel.waitForEventInfo({ info: { waitId: this._waitId, @@ -111,8 +110,8 @@ class Waiter { phase: 'log', message: s } - }).catch(() => {}); - }, true); + }); + }, true).catch(() => {}); } _rejectOn(promise, dispose) { this._failures.push(promise); diff --git a/tvapp2/node_modules/playwright-core/lib/client/worker.js b/tvapp2/node_modules/playwright-core/lib/client/worker.js index 15176dbd..cc8cc7fc 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/worker.js +++ b/tvapp2/node_modules/playwright-core/lib/client/worker.js @@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Worker = void 0; -var _events = require("./events"); var _channelOwner = require("./channelOwner"); -var _jsHandle = require("./jsHandle"); -var _utils = require("../utils"); var _errors = require("./errors"); +var _events = require("./events"); +var _jsHandle = require("./jsHandle"); +var _manualPromise = require("../utils/isomorphic/manualPromise"); /** * Copyright (c) Microsoft Corporation. * @@ -35,7 +35,7 @@ class Worker extends _channelOwner.ChannelOwner { // Set for web workers. this._context = void 0; // Set for service workers. - this._closedScope = new _utils.LongStandingScope(); + this._closedScope = new _manualPromise.LongStandingScope(); this._channel.on('close', () => { if (this._page) this._page._workers.delete(this); if (this._context) this._context._serviceWorkers.delete(this); diff --git a/tvapp2/node_modules/playwright-core/lib/client/writableStream.js b/tvapp2/node_modules/playwright-core/lib/client/writableStream.js index f9e7de7b..834ab2a6 100755 --- a/tvapp2/node_modules/playwright-core/lib/client/writableStream.js +++ b/tvapp2/node_modules/playwright-core/lib/client/writableStream.js @@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.WritableStream = void 0; -var _stream = require("stream"); var _channelOwner = require("./channelOwner"); /** * Copyright (c) Microsoft Corporation. @@ -30,25 +29,7 @@ class WritableStream extends _channelOwner.ChannelOwner { super(parent, type, guid, initializer); } stream() { - return new WritableStreamImpl(this._channel); + return this._platform.streamWritable(this._channel); } } -exports.WritableStream = WritableStream; -class WritableStreamImpl extends _stream.Writable { - constructor(channel) { - super(); - this._channel = void 0; - this._channel = channel; - } - async _write(chunk, encoding, callback) { - const error = await this._channel.write({ - binary: typeof chunk === 'string' ? Buffer.from(chunk) : chunk - }).catch(e => e); - callback(error || null); - } - async _final(callback) { - // Stream might be destroyed after the connection was closed. - const error = await this._channel.close().catch(e => e); - callback(error || null); - } -} \ No newline at end of file +exports.WritableStream = WritableStream; \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/common/socksProxy.js b/tvapp2/node_modules/playwright-core/lib/common/socksProxy.js deleted file mode 100755 index 23362696..00000000 --- a/tvapp2/node_modules/playwright-core/lib/common/socksProxy.js +++ /dev/null @@ -1,569 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SocksProxyHandler = exports.SocksProxy = void 0; -exports.parsePattern = parsePattern; -var _events = _interopRequireDefault(require("events")); -var _net = _interopRequireDefault(require("net")); -var _debugLogger = require("../utils/debugLogger"); -var _happyEyeballs = require("../utils/happy-eyeballs"); -var _utils = require("../utils"); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// https://tools.ietf.org/html/rfc1928 -var SocksAuth = /*#__PURE__*/function (SocksAuth) { - SocksAuth[SocksAuth["NO_AUTHENTICATION_REQUIRED"] = 0] = "NO_AUTHENTICATION_REQUIRED"; - SocksAuth[SocksAuth["GSSAPI"] = 1] = "GSSAPI"; - SocksAuth[SocksAuth["USERNAME_PASSWORD"] = 2] = "USERNAME_PASSWORD"; - SocksAuth[SocksAuth["NO_ACCEPTABLE_METHODS"] = 255] = "NO_ACCEPTABLE_METHODS"; - return SocksAuth; -}(SocksAuth || {}); -var SocksAddressType = /*#__PURE__*/function (SocksAddressType) { - SocksAddressType[SocksAddressType["IPv4"] = 1] = "IPv4"; - SocksAddressType[SocksAddressType["FqName"] = 3] = "FqName"; - SocksAddressType[SocksAddressType["IPv6"] = 4] = "IPv6"; - return SocksAddressType; -}(SocksAddressType || {}); -var SocksCommand = /*#__PURE__*/function (SocksCommand) { - SocksCommand[SocksCommand["CONNECT"] = 1] = "CONNECT"; - SocksCommand[SocksCommand["BIND"] = 2] = "BIND"; - SocksCommand[SocksCommand["UDP_ASSOCIATE"] = 3] = "UDP_ASSOCIATE"; - return SocksCommand; -}(SocksCommand || {}); -var SocksReply = /*#__PURE__*/function (SocksReply) { - SocksReply[SocksReply["Succeeded"] = 0] = "Succeeded"; - SocksReply[SocksReply["GeneralServerFailure"] = 1] = "GeneralServerFailure"; - SocksReply[SocksReply["NotAllowedByRuleSet"] = 2] = "NotAllowedByRuleSet"; - SocksReply[SocksReply["NetworkUnreachable"] = 3] = "NetworkUnreachable"; - SocksReply[SocksReply["HostUnreachable"] = 4] = "HostUnreachable"; - SocksReply[SocksReply["ConnectionRefused"] = 5] = "ConnectionRefused"; - SocksReply[SocksReply["TtlExpired"] = 6] = "TtlExpired"; - SocksReply[SocksReply["CommandNotSupported"] = 7] = "CommandNotSupported"; - SocksReply[SocksReply["AddressTypeNotSupported"] = 8] = "AddressTypeNotSupported"; - return SocksReply; -}(SocksReply || {}); -class SocksConnection { - constructor(uid, socket, client) { - this._buffer = Buffer.from([]); - this._offset = 0; - this._fence = 0; - this._fenceCallback = void 0; - this._socket = void 0; - this._boundOnData = void 0; - this._uid = void 0; - this._client = void 0; - this._uid = uid; - this._socket = socket; - this._client = client; - this._boundOnData = this._onData.bind(this); - socket.on('data', this._boundOnData); - socket.on('close', () => this._onClose()); - socket.on('end', () => this._onClose()); - socket.on('error', () => this._onClose()); - this._run().catch(() => this._socket.end()); - } - async _run() { - (0, _utils.assert)(await this._authenticate()); - const { - command, - host, - port - } = await this._parseRequest(); - if (command !== SocksCommand.CONNECT) { - this._writeBytes(Buffer.from([0x05, SocksReply.CommandNotSupported, 0x00, - // RSV - 0x01, - // IPv4 - 0x00, 0x00, 0x00, 0x00, - // Address - 0x00, 0x00 // Port - ])); - return; - } - this._socket.off('data', this._boundOnData); - this._client.onSocketRequested({ - uid: this._uid, - host, - port - }); - } - async _authenticate() { - // Request: - // +----+----------+----------+ - // |VER | NMETHODS | METHODS | - // +----+----------+----------+ - // | 1 | 1 | 1 to 255 | - // +----+----------+----------+ - - // Response: - // +----+--------+ - // |VER | METHOD | - // +----+--------+ - // | 1 | 1 | - // +----+--------+ - - const version = await this._readByte(); - (0, _utils.assert)(version === 0x05, 'The VER field must be set to x05 for this version of the protocol, was ' + version); - const nMethods = await this._readByte(); - (0, _utils.assert)(nMethods, 'No authentication methods specified'); - const methods = await this._readBytes(nMethods); - for (const method of methods) { - if (method === 0) { - this._writeBytes(Buffer.from([version, method])); - return true; - } - } - this._writeBytes(Buffer.from([version, SocksAuth.NO_ACCEPTABLE_METHODS])); - return false; - } - async _parseRequest() { - // Request. - // +----+-----+-------+------+----------+----------+ - // |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT | - // +----+-----+-------+------+----------+----------+ - // | 1 | 1 | X'00' | 1 | Variable | 2 | - // +----+-----+-------+------+----------+----------+ - - // Response. - // +----+-----+-------+------+----------+----------+ - // |VER | REP | RSV | ATYP | BND.ADDR | BND.PORT | - // +----+-----+-------+------+----------+----------+ - // | 1 | 1 | X'00' | 1 | Variable | 2 | - // +----+-----+-------+------+----------+----------+ - - const version = await this._readByte(); - (0, _utils.assert)(version === 0x05, 'The VER field must be set to x05 for this version of the protocol, was ' + version); - const command = await this._readByte(); - await this._readByte(); // skip reserved. - const addressType = await this._readByte(); - let host = ''; - switch (addressType) { - case SocksAddressType.IPv4: - host = (await this._readBytes(4)).join('.'); - break; - case SocksAddressType.FqName: - const length = await this._readByte(); - host = (await this._readBytes(length)).toString(); - break; - case SocksAddressType.IPv6: - const bytes = await this._readBytes(16); - const tokens = []; - for (let i = 0; i < 8; ++i) tokens.push(bytes.readUInt16BE(i * 2).toString(16)); - host = tokens.join(':'); - break; - } - const port = (await this._readBytes(2)).readUInt16BE(0); - this._buffer = Buffer.from([]); - this._offset = 0; - this._fence = 0; - return { - command, - host, - port - }; - } - async _readByte() { - const buffer = await this._readBytes(1); - return buffer[0]; - } - async _readBytes(length) { - this._fence = this._offset + length; - if (!this._buffer || this._buffer.length < this._fence) await new Promise(f => this._fenceCallback = f); - this._offset += length; - return this._buffer.slice(this._offset - length, this._offset); - } - _writeBytes(buffer) { - if (this._socket.writable) this._socket.write(buffer); - } - _onClose() { - this._client.onSocketClosed({ - uid: this._uid - }); - } - _onData(buffer) { - this._buffer = Buffer.concat([this._buffer, buffer]); - if (this._fenceCallback && this._buffer.length >= this._fence) { - const callback = this._fenceCallback; - this._fenceCallback = undefined; - callback(); - } - } - socketConnected(host, port) { - this._writeBytes(Buffer.from([0x05, SocksReply.Succeeded, 0x00, - // RSV - ...ipToSocksAddress(host), - // ATYP, Address - port >> 8, port & 0xFF // Port - ])); - this._socket.on('data', data => this._client.onSocketData({ - uid: this._uid, - data - })); - } - socketFailed(errorCode) { - const buffer = Buffer.from([0x05, 0, 0x00, - // RSV - ...ipToSocksAddress('0.0.0.0'), - // ATYP, Address - 0, 0 // Port - ]); - switch (errorCode) { - case 'ENOENT': - case 'ENOTFOUND': - case 'ETIMEDOUT': - case 'EHOSTUNREACH': - buffer[1] = SocksReply.HostUnreachable; - break; - case 'ENETUNREACH': - buffer[1] = SocksReply.NetworkUnreachable; - break; - case 'ECONNREFUSED': - buffer[1] = SocksReply.ConnectionRefused; - break; - case 'ERULESET': - buffer[1] = SocksReply.NotAllowedByRuleSet; - break; - } - this._writeBytes(buffer); - this._socket.end(); - } - sendData(data) { - this._socket.write(data); - } - end() { - this._socket.end(); - } - error(error) { - this._socket.destroy(new Error(error)); - } -} -function hexToNumber(hex) { - // Note: parseInt has a few issues including ignoring trailing characters and allowing leading 0x. - return [...hex].reduce((value, digit) => { - const code = digit.charCodeAt(0); - if (code >= 48 && code <= 57) - // 0..9 - return value + code; - if (code >= 97 && code <= 102) - // a..f - return value + (code - 97) + 10; - if (code >= 65 && code <= 70) - // A..F - return value + (code - 65) + 10; - throw new Error('Invalid IPv6 token ' + hex); - }, 0); -} -function ipToSocksAddress(address) { - if (_net.default.isIPv4(address)) { - return [0x01, - // IPv4 - ...address.split('.', 4).map(t => +t & 0xFF) // Address - ]; - } - if (_net.default.isIPv6(address)) { - const result = [0x04]; // IPv6 - const tokens = address.split(':', 8); - while (tokens.length < 8) tokens.unshift(''); - for (const token of tokens) { - const value = hexToNumber(token); - result.push(value >> 8 & 0xFF, value & 0xFF); // Big-endian - } - return result; - } - throw new Error('Only IPv4 and IPv6 addresses are supported'); -} -function starMatchToRegex(pattern) { - const source = pattern.split('*').map(s => { - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping - return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - }).join('.*'); - return new RegExp('^' + source + '$'); -} - -// This follows "Proxy bypass rules" syntax without implicit and negative rules. -// https://source.chromium.org/chromium/chromium/src/+/main:net/docs/proxy.md;l=331 -function parsePattern(pattern) { - if (!pattern) return () => false; - const matchers = pattern.split(',').map(token => { - const match = token.match(/^(.*?)(?::(\d+))?$/); - if (!match) throw new Error(`Unsupported token "${token}" in pattern "${pattern}"`); - const tokenPort = match[2] ? +match[2] : undefined; - const portMatches = port => tokenPort === undefined || tokenPort === port; - let tokenHost = match[1]; - if (tokenHost === '') { - return (host, port) => { - if (!portMatches(port)) return false; - return host === 'localhost' || host.endsWith('.localhost') || host === '127.0.0.1' || host === '[::1]'; - }; - } - if (tokenHost === '*') return (host, port) => portMatches(port); - if (_net.default.isIPv4(tokenHost) || _net.default.isIPv6(tokenHost)) return (host, port) => host === tokenHost && portMatches(port); - if (tokenHost[0] === '.') tokenHost = '*' + tokenHost; - const tokenRegex = starMatchToRegex(tokenHost); - return (host, port) => { - if (!portMatches(port)) return false; - if (_net.default.isIPv4(host) || _net.default.isIPv6(host)) return false; - return !!host.match(tokenRegex); - }; - }); - return (host, port) => matchers.some(matcher => matcher(host, port)); -} -class SocksProxy extends _events.default { - constructor() { - super(); - this._server = void 0; - this._connections = new Map(); - this._sockets = new Set(); - this._closed = false; - this._port = void 0; - this._patternMatcher = () => false; - this._directSockets = new Map(); - this._server = new _net.default.Server(socket => { - const uid = (0, _utils.createGuid)(); - const connection = new SocksConnection(uid, socket, this); - this._connections.set(uid, connection); - }); - this._server.on('connection', socket => { - if (this._closed) { - socket.destroy(); - return; - } - this._sockets.add(socket); - socket.once('close', () => this._sockets.delete(socket)); - }); - } - setPattern(pattern) { - try { - this._patternMatcher = parsePattern(pattern); - } catch (e) { - this._patternMatcher = () => false; - } - } - async _handleDirect(request) { - try { - var _this$_connections$ge4; - const socket = await (0, _happyEyeballs.createSocket)(request.host, request.port); - socket.on('data', data => { - var _this$_connections$ge; - return (_this$_connections$ge = this._connections.get(request.uid)) === null || _this$_connections$ge === void 0 ? void 0 : _this$_connections$ge.sendData(data); - }); - socket.on('error', error => { - var _this$_connections$ge2; - (_this$_connections$ge2 = this._connections.get(request.uid)) === null || _this$_connections$ge2 === void 0 || _this$_connections$ge2.error(error.message); - this._directSockets.delete(request.uid); - }); - socket.on('end', () => { - var _this$_connections$ge3; - (_this$_connections$ge3 = this._connections.get(request.uid)) === null || _this$_connections$ge3 === void 0 || _this$_connections$ge3.end(); - this._directSockets.delete(request.uid); - }); - const localAddress = socket.localAddress; - const localPort = socket.localPort; - this._directSockets.set(request.uid, socket); - (_this$_connections$ge4 = this._connections.get(request.uid)) === null || _this$_connections$ge4 === void 0 || _this$_connections$ge4.socketConnected(localAddress, localPort); - } catch (error) { - var _this$_connections$ge5; - (_this$_connections$ge5 = this._connections.get(request.uid)) === null || _this$_connections$ge5 === void 0 || _this$_connections$ge5.socketFailed(error.code); - } - } - port() { - return this._port; - } - async listen(port, hostname) { - return new Promise(f => { - this._server.listen(port, hostname, () => { - const port = this._server.address().port; - this._port = port; - f(port); - }); - }); - } - async close() { - if (this._closed) return; - this._closed = true; - for (const socket of this._sockets) socket.destroy(); - this._sockets.clear(); - await new Promise(f => this._server.close(f)); - } - onSocketRequested(payload) { - if (!this._patternMatcher(payload.host, payload.port)) { - this._handleDirect(payload); - return; - } - this.emit(SocksProxy.Events.SocksRequested, payload); - } - onSocketData(payload) { - const direct = this._directSockets.get(payload.uid); - if (direct) { - direct.write(payload.data); - return; - } - this.emit(SocksProxy.Events.SocksData, payload); - } - onSocketClosed(payload) { - const direct = this._directSockets.get(payload.uid); - if (direct) { - direct.destroy(); - this._directSockets.delete(payload.uid); - return; - } - this.emit(SocksProxy.Events.SocksClosed, payload); - } - socketConnected({ - uid, - host, - port - }) { - var _this$_connections$ge6; - (_this$_connections$ge6 = this._connections.get(uid)) === null || _this$_connections$ge6 === void 0 || _this$_connections$ge6.socketConnected(host, port); - } - socketFailed({ - uid, - errorCode - }) { - var _this$_connections$ge7; - (_this$_connections$ge7 = this._connections.get(uid)) === null || _this$_connections$ge7 === void 0 || _this$_connections$ge7.socketFailed(errorCode); - } - sendSocketData({ - uid, - data - }) { - var _this$_connections$ge8; - (_this$_connections$ge8 = this._connections.get(uid)) === null || _this$_connections$ge8 === void 0 || _this$_connections$ge8.sendData(data); - } - sendSocketEnd({ - uid - }) { - var _this$_connections$ge9; - (_this$_connections$ge9 = this._connections.get(uid)) === null || _this$_connections$ge9 === void 0 || _this$_connections$ge9.end(); - } - sendSocketError({ - uid, - error - }) { - var _this$_connections$ge10; - (_this$_connections$ge10 = this._connections.get(uid)) === null || _this$_connections$ge10 === void 0 || _this$_connections$ge10.error(error); - } -} -exports.SocksProxy = SocksProxy; -SocksProxy.Events = { - SocksRequested: 'socksRequested', - SocksData: 'socksData', - SocksClosed: 'socksClosed' -}; -class SocksProxyHandler extends _events.default { - constructor(pattern, redirectPortForTest) { - super(); - this._sockets = new Map(); - this._patternMatcher = () => false; - this._redirectPortForTest = void 0; - this._patternMatcher = parsePattern(pattern); - this._redirectPortForTest = redirectPortForTest; - } - cleanup() { - for (const uid of this._sockets.keys()) this.socketClosed({ - uid - }); - } - async socketRequested({ - uid, - host, - port - }) { - _debugLogger.debugLogger.log('socks', `[${uid}] => request ${host}:${port}`); - if (!this._patternMatcher(host, port)) { - const payload = { - uid, - errorCode: 'ERULESET' - }; - _debugLogger.debugLogger.log('socks', `[${uid}] <= pattern error ${payload.errorCode}`); - this.emit(SocksProxyHandler.Events.SocksFailed, payload); - return; - } - if (host === 'local.playwright') host = 'localhost'; - try { - if (this._redirectPortForTest) port = this._redirectPortForTest; - const socket = await (0, _happyEyeballs.createSocket)(host, port); - socket.on('data', data => { - const payload = { - uid, - data - }; - this.emit(SocksProxyHandler.Events.SocksData, payload); - }); - socket.on('error', error => { - const payload = { - uid, - error: error.message - }; - _debugLogger.debugLogger.log('socks', `[${uid}] <= network socket error ${payload.error}`); - this.emit(SocksProxyHandler.Events.SocksError, payload); - this._sockets.delete(uid); - }); - socket.on('end', () => { - const payload = { - uid - }; - _debugLogger.debugLogger.log('socks', `[${uid}] <= network socket closed`); - this.emit(SocksProxyHandler.Events.SocksEnd, payload); - this._sockets.delete(uid); - }); - const localAddress = socket.localAddress; - const localPort = socket.localPort; - this._sockets.set(uid, socket); - const payload = { - uid, - host: localAddress, - port: localPort - }; - _debugLogger.debugLogger.log('socks', `[${uid}] <= connected to network ${payload.host}:${payload.port}`); - this.emit(SocksProxyHandler.Events.SocksConnected, payload); - } catch (error) { - const payload = { - uid, - errorCode: error.code - }; - _debugLogger.debugLogger.log('socks', `[${uid}] <= connect error ${payload.errorCode}`); - this.emit(SocksProxyHandler.Events.SocksFailed, payload); - } - } - sendSocketData({ - uid, - data - }) { - var _this$_sockets$get; - (_this$_sockets$get = this._sockets.get(uid)) === null || _this$_sockets$get === void 0 || _this$_sockets$get.write(data); - } - socketClosed({ - uid - }) { - var _this$_sockets$get2; - _debugLogger.debugLogger.log('socks', `[${uid}] <= browser socket closed`); - (_this$_sockets$get2 = this._sockets.get(uid)) === null || _this$_sockets$get2 === void 0 || _this$_sockets$get2.destroy(); - this._sockets.delete(uid); - } -} -exports.SocksProxyHandler = SocksProxyHandler; -SocksProxyHandler.Events = { - SocksConnected: 'socksConnected', - SocksData: 'socksData', - SocksError: 'socksError', - SocksFailed: 'socksFailed', - SocksEnd: 'socksEnd' -}; \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/common/timeoutSettings.js b/tvapp2/node_modules/playwright-core/lib/common/timeoutSettings.js deleted file mode 100755 index ef8b9189..00000000 --- a/tvapp2/node_modules/playwright-core/lib/common/timeoutSettings.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TimeoutSettings = exports.DEFAULT_TIMEOUT = exports.DEFAULT_LAUNCH_TIMEOUT = void 0; -var _utils = require("../utils"); -/** - * Copyright 2019 Google Inc. All rights reserved. - * Modifications copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const DEFAULT_TIMEOUT = exports.DEFAULT_TIMEOUT = 30000; -const DEFAULT_LAUNCH_TIMEOUT = exports.DEFAULT_LAUNCH_TIMEOUT = 3 * 60 * 1000; // 3 minutes - -class TimeoutSettings { - constructor(parent) { - this._parent = void 0; - this._defaultTimeout = void 0; - this._defaultNavigationTimeout = void 0; - this._parent = parent; - } - setDefaultTimeout(timeout) { - this._defaultTimeout = timeout; - } - setDefaultNavigationTimeout(timeout) { - this._defaultNavigationTimeout = timeout; - } - defaultNavigationTimeout() { - return this._defaultNavigationTimeout; - } - defaultTimeout() { - return this._defaultTimeout; - } - navigationTimeout(options) { - if (typeof options.timeout === 'number') return options.timeout; - if (this._defaultNavigationTimeout !== undefined) return this._defaultNavigationTimeout; - if ((0, _utils.debugMode)()) return 0; - if (this._defaultTimeout !== undefined) return this._defaultTimeout; - if (this._parent) return this._parent.navigationTimeout(options); - return DEFAULT_TIMEOUT; - } - timeout(options) { - if (typeof options.timeout === 'number') return options.timeout; - if ((0, _utils.debugMode)()) return 0; - if (this._defaultTimeout !== undefined) return this._defaultTimeout; - if (this._parent) return this._parent.timeout(options); - return DEFAULT_TIMEOUT; - } - static timeout(options) { - if (typeof options.timeout === 'number') return options.timeout; - if ((0, _utils.debugMode)()) return 0; - return DEFAULT_TIMEOUT; - } - static launchTimeout(options) { - if (typeof options.timeout === 'number') return options.timeout; - if ((0, _utils.debugMode)()) return 0; - return DEFAULT_LAUNCH_TIMEOUT; - } -} -exports.TimeoutSettings = TimeoutSettings; \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/common/types.js b/tvapp2/node_modules/playwright-core/lib/common/types.js deleted file mode 100755 index 430afc16..00000000 --- a/tvapp2/node_modules/playwright-core/lib/common/types.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/generated/consoleApiSource.js b/tvapp2/node_modules/playwright-core/lib/generated/consoleApiSource.js index 9a0326ae..bc734f00 100755 --- a/tvapp2/node_modules/playwright-core/lib/generated/consoleApiSource.js +++ b/tvapp2/node_modules/playwright-core/lib/generated/consoleApiSource.js @@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.source = void 0; -const source = exports.source = "\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n for (const name in obj) { fn = obj[name]; break; }\n const module = { exports: {} };\n fn(module.exports, module);\n result = module.exports;\n }\n return result;\n }\n};\nvar __export = (target, all) => {for (var name in all) target[name] = all[name];};\nvar __toESM = mod => ({ ...mod, 'default': mod });\nvar __toCommonJS = mod => ({ ...mod, __esModule: true });\n\n\n// packages/playwright-core/src/server/injected/consoleApi.ts\nvar consoleApi_exports = {};\n__export(consoleApi_exports, {\n default: () => consoleApi_default\n});\nmodule.exports = __toCommonJS(consoleApi_exports);\n\n// packages/playwright-core/src/utils/isomorphic/stringUtils.ts\nfunction escapeWithQuotes(text, char = \"'\") {\n const stringified = JSON.stringify(text);\n const escapedText = stringified.substring(1, stringified.length - 1).replace(/\\\\\"/g, '\"');\n if (char === \"'\")\n return char + escapedText.replace(/[']/g, \"\\\\'\") + char;\n if (char === '\"')\n return char + escapedText.replace(/[\"]/g, '\\\\\"') + char;\n if (char === \"`\")\n return char + escapedText.replace(/[`]/g, \"`\") + char;\n throw new Error(\"Invalid escape char\");\n}\nfunction toTitleCase(name) {\n return name.charAt(0).toUpperCase() + name.substring(1);\n}\nfunction toSnakeCase(name) {\n return name.replace(/([a-z0-9])([A-Z])/g, \"$1_$2\").replace(/([A-Z])([A-Z][a-z])/g, \"$1_$2\").toLowerCase();\n}\nfunction normalizeEscapedRegexQuotes(source) {\n return source.replace(/(^|[^\\\\])(\\\\\\\\)*\\\\(['\"`])/g, \"$1$2$3\");\n}\nfunction escapeRegexForSelector(re) {\n if (re.unicode || re.unicodeSets)\n return String(re);\n return String(re).replace(/(^|[^\\\\])(\\\\\\\\)*([\"'`])/g, \"$1$2\\\\$3\").replace(/>>/g, \"\\\\>\\\\>\");\n}\nfunction escapeForTextSelector(text, exact) {\n if (typeof text !== \"string\")\n return escapeRegexForSelector(text);\n return `${JSON.stringify(text)}${exact ? \"s\" : \"i\"}`;\n}\nfunction escapeForAttributeSelector(value, exact) {\n if (typeof value !== \"string\")\n return escapeRegexForSelector(value);\n return `\"${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/[\"]/g, '\\\\\"')}\"${exact ? \"s\" : \"i\"}`;\n}\n\n// packages/playwright-core/src/utils/isomorphic/locatorUtils.ts\nfunction getByAttributeTextSelector(attrName, text, options) {\n return `internal:attr=[${attrName}=${escapeForAttributeSelector(text, (options == null ? void 0 : options.exact) || false)}]`;\n}\nfunction getByTestIdSelector(testIdAttributeName, testId) {\n return `internal:testid=[${testIdAttributeName}=${escapeForAttributeSelector(testId, true)}]`;\n}\nfunction getByLabelSelector(text, options) {\n return \"internal:label=\" + escapeForTextSelector(text, !!(options == null ? void 0 : options.exact));\n}\nfunction getByAltTextSelector(text, options) {\n return getByAttributeTextSelector(\"alt\", text, options);\n}\nfunction getByTitleSelector(text, options) {\n return getByAttributeTextSelector(\"title\", text, options);\n}\nfunction getByPlaceholderSelector(text, options) {\n return getByAttributeTextSelector(\"placeholder\", text, options);\n}\nfunction getByTextSelector(text, options) {\n return \"internal:text=\" + escapeForTextSelector(text, !!(options == null ? void 0 : options.exact));\n}\nfunction getByRoleSelector(role, options = {}) {\n const props = [];\n if (options.checked !== void 0)\n props.push([\"checked\", String(options.checked)]);\n if (options.disabled !== void 0)\n props.push([\"disabled\", String(options.disabled)]);\n if (options.selected !== void 0)\n props.push([\"selected\", String(options.selected)]);\n if (options.expanded !== void 0)\n props.push([\"expanded\", String(options.expanded)]);\n if (options.includeHidden !== void 0)\n props.push([\"include-hidden\", String(options.includeHidden)]);\n if (options.level !== void 0)\n props.push([\"level\", String(options.level)]);\n if (options.name !== void 0)\n props.push([\"name\", escapeForAttributeSelector(options.name, !!options.exact)]);\n if (options.pressed !== void 0)\n props.push([\"pressed\", String(options.pressed)]);\n return `internal:role=${role}${props.map(([n, v]) => `[${n}=${v}]`).join(\"\")}`;\n}\n\n// packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts\nvar between = function(num, first, last) {\n return num >= first && num <= last;\n};\nfunction digit(code) {\n return between(code, 48, 57);\n}\nfunction hexdigit(code) {\n return digit(code) || between(code, 65, 70) || between(code, 97, 102);\n}\nfunction uppercaseletter(code) {\n return between(code, 65, 90);\n}\nfunction lowercaseletter(code) {\n return between(code, 97, 122);\n}\nfunction letter(code) {\n return uppercaseletter(code) || lowercaseletter(code);\n}\nfunction nonascii(code) {\n return code >= 128;\n}\nfunction namestartchar(code) {\n return letter(code) || nonascii(code) || code === 95;\n}\nfunction namechar(code) {\n return namestartchar(code) || digit(code) || code === 45;\n}\nfunction nonprintable(code) {\n return between(code, 0, 8) || code === 11 || between(code, 14, 31) || code === 127;\n}\nfunction newline(code) {\n return code === 10;\n}\nfunction whitespace(code) {\n return newline(code) || code === 9 || code === 32;\n}\nvar maximumallowedcodepoint = 1114111;\nvar InvalidCharacterError = class extends Error {\n constructor(message) {\n super(message);\n this.name = \"InvalidCharacterError\";\n }\n};\nfunction preprocess(str) {\n const codepoints = [];\n for (let i = 0; i < str.length; i++) {\n let code = str.charCodeAt(i);\n if (code === 13 && str.charCodeAt(i + 1) === 10) {\n code = 10;\n i++;\n }\n if (code === 13 || code === 12)\n code = 10;\n if (code === 0)\n code = 65533;\n if (between(code, 55296, 56319) && between(str.charCodeAt(i + 1), 56320, 57343)) {\n const lead = code - 55296;\n const trail = str.charCodeAt(i + 1) - 56320;\n code = Math.pow(2, 16) + lead * Math.pow(2, 10) + trail;\n i++;\n }\n codepoints.push(code);\n }\n return codepoints;\n}\nfunction stringFromCode(code) {\n if (code <= 65535)\n return String.fromCharCode(code);\n code -= Math.pow(2, 16);\n const lead = Math.floor(code / Math.pow(2, 10)) + 55296;\n const trail = code % Math.pow(2, 10) + 56320;\n return String.fromCharCode(lead) + String.fromCharCode(trail);\n}\nfunction tokenize(str1) {\n const str = preprocess(str1);\n let i = -1;\n const tokens = [];\n let code;\n let line = 0;\n let column = 0;\n let lastLineLength = 0;\n const incrLineno = function() {\n line += 1;\n lastLineLength = column;\n column = 0;\n };\n const locStart = { line, column };\n const codepoint = function(i2) {\n if (i2 >= str.length)\n return -1;\n return str[i2];\n };\n const next = function(num) {\n if (num === void 0)\n num = 1;\n if (num > 3)\n throw \"Spec Error: no more than three codepoints of lookahead.\";\n return codepoint(i + num);\n };\n const consume = function(num) {\n if (num === void 0)\n num = 1;\n i += num;\n code = codepoint(i);\n if (newline(code))\n incrLineno();\n else\n column += num;\n return true;\n };\n const reconsume = function() {\n i -= 1;\n if (newline(code)) {\n line -= 1;\n column = lastLineLength;\n } else {\n column -= 1;\n }\n locStart.line = line;\n locStart.column = column;\n return true;\n };\n const eof = function(codepoint2) {\n if (codepoint2 === void 0)\n codepoint2 = code;\n return codepoint2 === -1;\n };\n const donothing = function() {\n };\n const parseerror = function() {\n };\n const consumeAToken = function() {\n consumeComments();\n consume();\n if (whitespace(code)) {\n while (whitespace(next()))\n consume();\n return new WhitespaceToken();\n } else if (code === 34) {\n return consumeAStringToken();\n } else if (code === 35) {\n if (namechar(next()) || areAValidEscape(next(1), next(2))) {\n const token = new HashToken(\"\");\n if (wouldStartAnIdentifier(next(1), next(2), next(3)))\n token.type = \"id\";\n token.value = consumeAName();\n return token;\n } else {\n return new DelimToken(code);\n }\n } else if (code === 36) {\n if (next() === 61) {\n consume();\n return new SuffixMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 39) {\n return consumeAStringToken();\n } else if (code === 40) {\n return new OpenParenToken();\n } else if (code === 41) {\n return new CloseParenToken();\n } else if (code === 42) {\n if (next() === 61) {\n consume();\n return new SubstringMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 43) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 44) {\n return new CommaToken();\n } else if (code === 45) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else if (next(1) === 45 && next(2) === 62) {\n consume(2);\n return new CDCToken();\n } else if (startsWithAnIdentifier()) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 46) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 58) {\n return new ColonToken();\n } else if (code === 59) {\n return new SemicolonToken();\n } else if (code === 60) {\n if (next(1) === 33 && next(2) === 45 && next(3) === 45) {\n consume(3);\n return new CDOToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 64) {\n if (wouldStartAnIdentifier(next(1), next(2), next(3)))\n return new AtKeywordToken(consumeAName());\n else\n return new DelimToken(code);\n } else if (code === 91) {\n return new OpenSquareToken();\n } else if (code === 92) {\n if (startsWithAValidEscape()) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else {\n parseerror();\n return new DelimToken(code);\n }\n } else if (code === 93) {\n return new CloseSquareToken();\n } else if (code === 94) {\n if (next() === 61) {\n consume();\n return new PrefixMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 123) {\n return new OpenCurlyToken();\n } else if (code === 124) {\n if (next() === 61) {\n consume();\n return new DashMatchToken();\n } else if (next() === 124) {\n consume();\n return new ColumnToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 125) {\n return new CloseCurlyToken();\n } else if (code === 126) {\n if (next() === 61) {\n consume();\n return new IncludeMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (digit(code)) {\n reconsume();\n return consumeANumericToken();\n } else if (namestartchar(code)) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else if (eof()) {\n return new EOFToken();\n } else {\n return new DelimToken(code);\n }\n };\n const consumeComments = function() {\n while (next(1) === 47 && next(2) === 42) {\n consume(2);\n while (true) {\n consume();\n if (code === 42 && next() === 47) {\n consume();\n break;\n } else if (eof()) {\n parseerror();\n return;\n }\n }\n }\n };\n const consumeANumericToken = function() {\n const num = consumeANumber();\n if (wouldStartAnIdentifier(next(1), next(2), next(3))) {\n const token = new DimensionToken();\n token.value = num.value;\n token.repr = num.repr;\n token.type = num.type;\n token.unit = consumeAName();\n return token;\n } else if (next() === 37) {\n consume();\n const token = new PercentageToken();\n token.value = num.value;\n token.repr = num.repr;\n return token;\n } else {\n const token = new NumberToken();\n token.value = num.value;\n token.repr = num.repr;\n token.type = num.type;\n return token;\n }\n };\n const consumeAnIdentlikeToken = function() {\n const str2 = consumeAName();\n if (str2.toLowerCase() === \"url\" && next() === 40) {\n consume();\n while (whitespace(next(1)) && whitespace(next(2)))\n consume();\n if (next() === 34 || next() === 39)\n return new FunctionToken(str2);\n else if (whitespace(next()) && (next(2) === 34 || next(2) === 39))\n return new FunctionToken(str2);\n else\n return consumeAURLToken();\n } else if (next() === 40) {\n consume();\n return new FunctionToken(str2);\n } else {\n return new IdentToken(str2);\n }\n };\n const consumeAStringToken = function(endingCodePoint) {\n if (endingCodePoint === void 0)\n endingCodePoint = code;\n let string = \"\";\n while (consume()) {\n if (code === endingCodePoint || eof()) {\n return new StringToken(string);\n } else if (newline(code)) {\n parseerror();\n reconsume();\n return new BadStringToken();\n } else if (code === 92) {\n if (eof(next()))\n donothing();\n else if (newline(next()))\n consume();\n else\n string += stringFromCode(consumeEscape());\n } else {\n string += stringFromCode(code);\n }\n }\n throw new Error(\"Internal error\");\n };\n const consumeAURLToken = function() {\n const token = new URLToken(\"\");\n while (whitespace(next()))\n consume();\n if (eof(next()))\n return token;\n while (consume()) {\n if (code === 41 || eof()) {\n return token;\n } else if (whitespace(code)) {\n while (whitespace(next()))\n consume();\n if (next() === 41 || eof(next())) {\n consume();\n return token;\n } else {\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n }\n } else if (code === 34 || code === 39 || code === 40 || nonprintable(code)) {\n parseerror();\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n } else if (code === 92) {\n if (startsWithAValidEscape()) {\n token.value += stringFromCode(consumeEscape());\n } else {\n parseerror();\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n }\n } else {\n token.value += stringFromCode(code);\n }\n }\n throw new Error(\"Internal error\");\n };\n const consumeEscape = function() {\n consume();\n if (hexdigit(code)) {\n const digits = [code];\n for (let total = 0; total < 5; total++) {\n if (hexdigit(next())) {\n consume();\n digits.push(code);\n } else {\n break;\n }\n }\n if (whitespace(next()))\n consume();\n let value = parseInt(digits.map(function(x) {\n return String.fromCharCode(x);\n }).join(\"\"), 16);\n if (value > maximumallowedcodepoint)\n value = 65533;\n return value;\n } else if (eof()) {\n return 65533;\n } else {\n return code;\n }\n };\n const areAValidEscape = function(c1, c2) {\n if (c1 !== 92)\n return false;\n if (newline(c2))\n return false;\n return true;\n };\n const startsWithAValidEscape = function() {\n return areAValidEscape(code, next());\n };\n const wouldStartAnIdentifier = function(c1, c2, c3) {\n if (c1 === 45)\n return namestartchar(c2) || c2 === 45 || areAValidEscape(c2, c3);\n else if (namestartchar(c1))\n return true;\n else if (c1 === 92)\n return areAValidEscape(c1, c2);\n else\n return false;\n };\n const startsWithAnIdentifier = function() {\n return wouldStartAnIdentifier(code, next(1), next(2));\n };\n const wouldStartANumber = function(c1, c2, c3) {\n if (c1 === 43 || c1 === 45) {\n if (digit(c2))\n return true;\n if (c2 === 46 && digit(c3))\n return true;\n return false;\n } else if (c1 === 46) {\n if (digit(c2))\n return true;\n return false;\n } else if (digit(c1)) {\n return true;\n } else {\n return false;\n }\n };\n const startsWithANumber = function() {\n return wouldStartANumber(code, next(1), next(2));\n };\n const consumeAName = function() {\n let result = \"\";\n while (consume()) {\n if (namechar(code)) {\n result += stringFromCode(code);\n } else if (startsWithAValidEscape()) {\n result += stringFromCode(consumeEscape());\n } else {\n reconsume();\n return result;\n }\n }\n throw new Error(\"Internal parse error\");\n };\n const consumeANumber = function() {\n let repr = \"\";\n let type = \"integer\";\n if (next() === 43 || next() === 45) {\n consume();\n repr += stringFromCode(code);\n }\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n if (next(1) === 46 && digit(next(2))) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n }\n const c1 = next(1), c2 = next(2), c3 = next(3);\n if ((c1 === 69 || c1 === 101) && digit(c2)) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n } else if ((c1 === 69 || c1 === 101) && (c2 === 43 || c2 === 45) && digit(c3)) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n }\n const value = convertAStringToANumber(repr);\n return { type, value, repr };\n };\n const convertAStringToANumber = function(string) {\n return +string;\n };\n const consumeTheRemnantsOfABadURL = function() {\n while (consume()) {\n if (code === 41 || eof()) {\n return;\n } else if (startsWithAValidEscape()) {\n consumeEscape();\n donothing();\n } else {\n donothing();\n }\n }\n };\n let iterationCount = 0;\n while (!eof(next())) {\n tokens.push(consumeAToken());\n iterationCount++;\n if (iterationCount > str.length * 2)\n throw new Error(\"I'm infinite-looping!\");\n }\n return tokens;\n}\nvar CSSParserToken = class {\n constructor() {\n this.tokenType = \"\";\n }\n toJSON() {\n return { token: this.tokenType };\n }\n toString() {\n return this.tokenType;\n }\n toSource() {\n return \"\" + this;\n }\n};\nvar BadStringToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"BADSTRING\";\n }\n};\nvar BadURLToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"BADURL\";\n }\n};\nvar WhitespaceToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"WHITESPACE\";\n }\n toString() {\n return \"WS\";\n }\n toSource() {\n return \" \";\n }\n};\nvar CDOToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"CDO\";\n }\n toSource() {\n return \"\";\n }\n};\nvar ColonToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \":\";\n }\n};\nvar SemicolonToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \";\";\n }\n};\nvar CommaToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \",\";\n }\n};\nvar GroupingToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.value = \"\";\n this.mirror = \"\";\n }\n};\nvar OpenCurlyToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"{\";\n this.value = \"{\";\n this.mirror = \"}\";\n }\n};\nvar CloseCurlyToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"}\";\n this.value = \"}\";\n this.mirror = \"{\";\n }\n};\nvar OpenSquareToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"[\";\n this.value = \"[\";\n this.mirror = \"]\";\n }\n};\nvar CloseSquareToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"]\";\n this.value = \"]\";\n this.mirror = \"[\";\n }\n};\nvar OpenParenToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"(\";\n this.value = \"(\";\n this.mirror = \")\";\n }\n};\nvar CloseParenToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \")\";\n this.value = \")\";\n this.mirror = \"(\";\n }\n};\nvar IncludeMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"~=\";\n }\n};\nvar DashMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"|=\";\n }\n};\nvar PrefixMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"^=\";\n }\n};\nvar SuffixMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"$=\";\n }\n};\nvar SubstringMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"*=\";\n }\n};\nvar ColumnToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"||\";\n }\n};\nvar EOFToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"EOF\";\n }\n toSource() {\n return \"\";\n }\n};\nvar DelimToken = class extends CSSParserToken {\n constructor(code) {\n super();\n this.tokenType = \"DELIM\";\n this.value = \"\";\n this.value = stringFromCode(code);\n }\n toString() {\n return \"DELIM(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n return json;\n }\n toSource() {\n if (this.value === \"\\\\\")\n return \"\\\\\\n\";\n else\n return this.value;\n }\n};\nvar StringValuedToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.value = \"\";\n }\n ASCIIMatch(str) {\n return this.value.toLowerCase() === str.toLowerCase();\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n return json;\n }\n};\nvar IdentToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"IDENT\";\n this.value = val;\n }\n toString() {\n return \"IDENT(\" + this.value + \")\";\n }\n toSource() {\n return escapeIdent(this.value);\n }\n};\nvar FunctionToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"FUNCTION\";\n this.value = val;\n this.mirror = \")\";\n }\n toString() {\n return \"FUNCTION(\" + this.value + \")\";\n }\n toSource() {\n return escapeIdent(this.value) + \"(\";\n }\n};\nvar AtKeywordToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"AT-KEYWORD\";\n this.value = val;\n }\n toString() {\n return \"AT(\" + this.value + \")\";\n }\n toSource() {\n return \"@\" + escapeIdent(this.value);\n }\n};\nvar HashToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"HASH\";\n this.value = val;\n this.type = \"unrestricted\";\n }\n toString() {\n return \"HASH(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.type = this.type;\n return json;\n }\n toSource() {\n if (this.type === \"id\")\n return \"#\" + escapeIdent(this.value);\n else\n return \"#\" + escapeHash(this.value);\n }\n};\nvar StringToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"STRING\";\n this.value = val;\n }\n toString() {\n return '\"' + escapeString(this.value) + '\"';\n }\n};\nvar URLToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"URL\";\n this.value = val;\n }\n toString() {\n return \"URL(\" + this.value + \")\";\n }\n toSource() {\n return 'url(\"' + escapeString(this.value) + '\")';\n }\n};\nvar NumberToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"NUMBER\";\n this.type = \"integer\";\n this.repr = \"\";\n }\n toString() {\n if (this.type === \"integer\")\n return \"INT(\" + this.value + \")\";\n return \"NUMBER(\" + this.value + \")\";\n }\n toJSON() {\n const json = super.toJSON();\n json.value = this.value;\n json.type = this.type;\n json.repr = this.repr;\n return json;\n }\n toSource() {\n return this.repr;\n }\n};\nvar PercentageToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"PERCENTAGE\";\n this.repr = \"\";\n }\n toString() {\n return \"PERCENTAGE(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.repr = this.repr;\n return json;\n }\n toSource() {\n return this.repr + \"%\";\n }\n};\nvar DimensionToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"DIMENSION\";\n this.type = \"integer\";\n this.repr = \"\";\n this.unit = \"\";\n }\n toString() {\n return \"DIM(\" + this.value + \",\" + this.unit + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.type = this.type;\n json.repr = this.repr;\n json.unit = this.unit;\n return json;\n }\n toSource() {\n const source = this.repr;\n let unit = escapeIdent(this.unit);\n if (unit[0].toLowerCase() === \"e\" && (unit[1] === \"-\" || between(unit.charCodeAt(1), 48, 57))) {\n unit = \"\\\\65 \" + unit.slice(1, unit.length);\n }\n return source + unit;\n }\n};\nfunction escapeIdent(string) {\n string = \"\" + string;\n let result = \"\";\n const firstcode = string.charCodeAt(0);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (between(code, 1, 31) || code === 127 || i === 0 && between(code, 48, 57) || i === 1 && between(code, 48, 57) && firstcode === 45)\n result += \"\\\\\" + code.toString(16) + \" \";\n else if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))\n result += string[i];\n else\n result += \"\\\\\" + string[i];\n }\n return result;\n}\nfunction escapeHash(string) {\n string = \"\" + string;\n let result = \"\";\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))\n result += string[i];\n else\n result += \"\\\\\" + code.toString(16) + \" \";\n }\n return result;\n}\nfunction escapeString(string) {\n string = \"\" + string;\n let result = \"\";\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (between(code, 1, 31) || code === 127)\n result += \"\\\\\" + code.toString(16) + \" \";\n else if (code === 34 || code === 92)\n result += \"\\\\\" + string[i];\n else\n result += string[i];\n }\n return result;\n}\n\n// packages/playwright-core/src/utils/isomorphic/cssParser.ts\nvar InvalidSelectorError = class extends Error {\n};\nfunction parseCSS(selector, customNames) {\n let tokens;\n try {\n tokens = tokenize(selector);\n if (!(tokens[tokens.length - 1] instanceof EOFToken))\n tokens.push(new EOFToken());\n } catch (e) {\n const newMessage = e.message + ` while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`;\n const index = (e.stack || \"\").indexOf(e.message);\n if (index !== -1)\n e.stack = e.stack.substring(0, index) + newMessage + e.stack.substring(index + e.message.length);\n e.message = newMessage;\n throw e;\n }\n const unsupportedToken = tokens.find((token) => {\n return token instanceof AtKeywordToken || token instanceof BadStringToken || token instanceof BadURLToken || token instanceof ColumnToken || token instanceof CDOToken || token instanceof CDCToken || token instanceof SemicolonToken || // TODO: Consider using these for something, e.g. to escape complex strings.\n // For example :xpath{ (//div/bar[@attr=\"foo\"])[2]/baz }\n // Or this way :xpath( {complex-xpath-goes-here(\"hello\")} )\n token instanceof OpenCurlyToken || token instanceof CloseCurlyToken || // TODO: Consider treating these as strings?\n token instanceof URLToken || token instanceof PercentageToken;\n });\n if (unsupportedToken)\n throw new InvalidSelectorError(`Unsupported token \"${unsupportedToken.toSource()}\" while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n let pos = 0;\n const names = /* @__PURE__ */ new Set();\n function unexpected() {\n return new InvalidSelectorError(`Unexpected token \"${tokens[pos].toSource()}\" while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n }\n function skipWhitespace() {\n while (tokens[pos] instanceof WhitespaceToken)\n pos++;\n }\n function isIdent(p = pos) {\n return tokens[p] instanceof IdentToken;\n }\n function isString(p = pos) {\n return tokens[p] instanceof StringToken;\n }\n function isNumber(p = pos) {\n return tokens[p] instanceof NumberToken;\n }\n function isComma(p = pos) {\n return tokens[p] instanceof CommaToken;\n }\n function isOpenParen(p = pos) {\n return tokens[p] instanceof OpenParenToken;\n }\n function isCloseParen(p = pos) {\n return tokens[p] instanceof CloseParenToken;\n }\n function isFunction(p = pos) {\n return tokens[p] instanceof FunctionToken;\n }\n function isStar(p = pos) {\n return tokens[p] instanceof DelimToken && tokens[p].value === \"*\";\n }\n function isEOF(p = pos) {\n return tokens[p] instanceof EOFToken;\n }\n function isClauseCombinator(p = pos) {\n return tokens[p] instanceof DelimToken && [\">\", \"+\", \"~\"].includes(tokens[p].value);\n }\n function isSelectorClauseEnd(p = pos) {\n return isComma(p) || isCloseParen(p) || isEOF(p) || isClauseCombinator(p) || tokens[p] instanceof WhitespaceToken;\n }\n function consumeFunctionArguments() {\n const result2 = [consumeArgument()];\n while (true) {\n skipWhitespace();\n if (!isComma())\n break;\n pos++;\n result2.push(consumeArgument());\n }\n return result2;\n }\n function consumeArgument() {\n skipWhitespace();\n if (isNumber())\n return tokens[pos++].value;\n if (isString())\n return tokens[pos++].value;\n return consumeComplexSelector();\n }\n function consumeComplexSelector() {\n const result2 = { simples: [] };\n skipWhitespace();\n if (isClauseCombinator()) {\n result2.simples.push({ selector: { functions: [{ name: \"scope\", args: [] }] }, combinator: \"\" });\n } else {\n result2.simples.push({ selector: consumeSimpleSelector(), combinator: \"\" });\n }\n while (true) {\n skipWhitespace();\n if (isClauseCombinator()) {\n result2.simples[result2.simples.length - 1].combinator = tokens[pos++].value;\n skipWhitespace();\n } else if (isSelectorClauseEnd()) {\n break;\n }\n result2.simples.push({ combinator: \"\", selector: consumeSimpleSelector() });\n }\n return result2;\n }\n function consumeSimpleSelector() {\n let rawCSSString = \"\";\n const functions = [];\n while (!isSelectorClauseEnd()) {\n if (isIdent() || isStar()) {\n rawCSSString += tokens[pos++].toSource();\n } else if (tokens[pos] instanceof HashToken) {\n rawCSSString += tokens[pos++].toSource();\n } else if (tokens[pos] instanceof DelimToken && tokens[pos].value === \".\") {\n pos++;\n if (isIdent())\n rawCSSString += \".\" + tokens[pos++].toSource();\n else\n throw unexpected();\n } else if (tokens[pos] instanceof ColonToken) {\n pos++;\n if (isIdent()) {\n if (!customNames.has(tokens[pos].value.toLowerCase())) {\n rawCSSString += \":\" + tokens[pos++].toSource();\n } else {\n const name = tokens[pos++].value.toLowerCase();\n functions.push({ name, args: [] });\n names.add(name);\n }\n } else if (isFunction()) {\n const name = tokens[pos++].value.toLowerCase();\n if (!customNames.has(name)) {\n rawCSSString += `:${name}(${consumeBuiltinFunctionArguments()})`;\n } else {\n functions.push({ name, args: consumeFunctionArguments() });\n names.add(name);\n }\n skipWhitespace();\n if (!isCloseParen())\n throw unexpected();\n pos++;\n } else {\n throw unexpected();\n }\n } else if (tokens[pos] instanceof OpenSquareToken) {\n rawCSSString += \"[\";\n pos++;\n while (!(tokens[pos] instanceof CloseSquareToken) && !isEOF())\n rawCSSString += tokens[pos++].toSource();\n if (!(tokens[pos] instanceof CloseSquareToken))\n throw unexpected();\n rawCSSString += \"]\";\n pos++;\n } else {\n throw unexpected();\n }\n }\n if (!rawCSSString && !functions.length)\n throw unexpected();\n return { css: rawCSSString || void 0, functions };\n }\n function consumeBuiltinFunctionArguments() {\n let s = \"\";\n let balance = 1;\n while (!isEOF()) {\n if (isOpenParen() || isFunction())\n balance++;\n if (isCloseParen())\n balance--;\n if (!balance)\n break;\n s += tokens[pos++].toSource();\n }\n return s;\n }\n const result = consumeFunctionArguments();\n if (!isEOF())\n throw unexpected();\n if (result.some((arg) => typeof arg !== \"object\" || !(\"simples\" in arg)))\n throw new InvalidSelectorError(`Error while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n return { selector: result, names: Array.from(names) };\n}\n\n// packages/playwright-core/src/utils/isomorphic/selectorParser.ts\nvar kNestedSelectorNames = /* @__PURE__ */ new Set([\"internal:has\", \"internal:has-not\", \"internal:and\", \"internal:or\", \"internal:chain\", \"left-of\", \"right-of\", \"above\", \"below\", \"near\"]);\nvar kNestedSelectorNamesWithDistance = /* @__PURE__ */ new Set([\"left-of\", \"right-of\", \"above\", \"below\", \"near\"]);\nvar customCSSNames = /* @__PURE__ */ 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\"]);\nfunction parseSelector(selector) {\n const parsedStrings = parseSelectorString(selector);\n const parts = [];\n for (const part of parsedStrings.parts) {\n if (part.name === \"css\" || part.name === \"css:light\") {\n if (part.name === \"css:light\")\n part.body = \":light(\" + part.body + \")\";\n const parsedCSS = parseCSS(part.body, customCSSNames);\n parts.push({\n name: \"css\",\n body: parsedCSS.selector,\n source: part.body\n });\n continue;\n }\n if (kNestedSelectorNames.has(part.name)) {\n let innerSelector;\n let distance;\n try {\n const unescaped = JSON.parse(\"[\" + part.body + \"]\");\n if (!Array.isArray(unescaped) || unescaped.length < 1 || unescaped.length > 2 || typeof unescaped[0] !== \"string\")\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n innerSelector = unescaped[0];\n if (unescaped.length === 2) {\n if (typeof unescaped[1] !== \"number\" || !kNestedSelectorNamesWithDistance.has(part.name))\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n distance = unescaped[1];\n }\n } catch (e) {\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n }\n const nested = { name: part.name, source: part.body, body: { parsed: parseSelector(innerSelector), distance } };\n const lastFrame = [...nested.body.parsed.parts].reverse().find((part2) => part2.name === \"internal:control\" && part2.body === \"enter-frame\");\n const lastFrameIndex = lastFrame ? nested.body.parsed.parts.indexOf(lastFrame) : -1;\n if (lastFrameIndex !== -1 && selectorPartsEqual(nested.body.parsed.parts.slice(0, lastFrameIndex + 1), parts.slice(0, lastFrameIndex + 1)))\n nested.body.parsed.parts.splice(0, lastFrameIndex + 1);\n parts.push(nested);\n continue;\n }\n parts.push({ ...part, source: part.body });\n }\n if (kNestedSelectorNames.has(parts[0].name))\n throw new InvalidSelectorError(`\"${parts[0].name}\" selector cannot be first`);\n return {\n capture: parsedStrings.capture,\n parts\n };\n}\nfunction selectorPartsEqual(list1, list2) {\n return stringifySelector({ parts: list1 }) === stringifySelector({ parts: list2 });\n}\nfunction stringifySelector(selector, forceEngineName) {\n if (typeof selector === \"string\")\n return selector;\n return selector.parts.map((p, i) => {\n let includeEngine = true;\n if (!forceEngineName && i !== selector.capture) {\n if (p.name === \"css\")\n includeEngine = false;\n else if (p.name === \"xpath\" && p.source.startsWith(\"//\") || p.source.startsWith(\"..\"))\n includeEngine = false;\n }\n const prefix = includeEngine ? p.name + \"=\" : \"\";\n return `${i === selector.capture ? \"*\" : \"\"}${prefix}${p.source}`;\n }).join(\" >> \");\n}\nfunction parseSelectorString(selector) {\n let index = 0;\n let quote;\n let start = 0;\n const result = { parts: [] };\n const append = () => {\n const part = selector.substring(start, index).trim();\n const eqIndex = part.indexOf(\"=\");\n let name;\n let body;\n if (eqIndex !== -1 && part.substring(0, eqIndex).trim().match(/^[a-zA-Z_0-9-+:*]+$/)) {\n name = part.substring(0, eqIndex).trim();\n body = part.substring(eqIndex + 1);\n } else if (part.length > 1 && part[0] === '\"' && part[part.length - 1] === '\"') {\n name = \"text\";\n body = part;\n } else if (part.length > 1 && part[0] === \"'\" && part[part.length - 1] === \"'\") {\n name = \"text\";\n body = part;\n } else if (/^\\(*\\/\\//.test(part) || part.startsWith(\"..\")) {\n name = \"xpath\";\n body = part;\n } else {\n name = \"css\";\n body = part;\n }\n let capture = false;\n if (name[0] === \"*\") {\n capture = true;\n name = name.substring(1);\n }\n result.parts.push({ name, body });\n if (capture) {\n if (result.capture !== void 0)\n throw new InvalidSelectorError(`Only one of the selectors can capture using * modifier`);\n result.capture = result.parts.length - 1;\n }\n };\n if (!selector.includes(\">>\")) {\n index = selector.length;\n append();\n return result;\n }\n const shouldIgnoreTextSelectorQuote = () => {\n const prefix = selector.substring(start, index);\n const match = prefix.match(/^\\s*text\\s*=(.*)$/);\n return !!match && !!match[1];\n };\n while (index < selector.length) {\n const c = selector[index];\n if (c === \"\\\\\" && index + 1 < selector.length) {\n index += 2;\n } else if (c === quote) {\n quote = void 0;\n index++;\n } else if (!quote && (c === '\"' || c === \"'\" || c === \"`\") && !shouldIgnoreTextSelectorQuote()) {\n quote = c;\n index++;\n } else if (!quote && c === \">\" && selector[index + 1] === \">\") {\n append();\n index += 2;\n start = index;\n } else {\n index++;\n }\n }\n append();\n return result;\n}\nfunction parseAttributeSelector(selector, allowUnquotedStrings) {\n let wp = 0;\n let EOL = selector.length === 0;\n const next = () => selector[wp] || \"\";\n const eat1 = () => {\n const result2 = next();\n ++wp;\n EOL = wp >= selector.length;\n return result2;\n };\n const syntaxError = (stage) => {\n if (EOL)\n throw new InvalidSelectorError(`Unexpected end of selector while parsing selector \\`${selector}\\``);\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - unexpected symbol \"${next()}\" at position ${wp}` + (stage ? \" during \" + stage : \"\"));\n };\n function skipSpaces() {\n while (!EOL && /\\s/.test(next()))\n eat1();\n }\n function isCSSNameChar(char) {\n return char >= \"\\x80\" || char >= \"0\" && char <= \"9\" || char >= \"A\" && char <= \"Z\" || char >= \"a\" && char <= \"z\" || char >= \"0\" && char <= \"9\" || char === \"_\" || char === \"-\";\n }\n function readIdentifier() {\n let result2 = \"\";\n skipSpaces();\n while (!EOL && isCSSNameChar(next()))\n result2 += eat1();\n return result2;\n }\n function readQuotedString(quote) {\n let result2 = eat1();\n if (result2 !== quote)\n syntaxError(\"parsing quoted string\");\n while (!EOL && next() !== quote) {\n if (next() === \"\\\\\")\n eat1();\n result2 += eat1();\n }\n if (next() !== quote)\n syntaxError(\"parsing quoted string\");\n result2 += eat1();\n return result2;\n }\n function readRegularExpression() {\n if (eat1() !== \"/\")\n syntaxError(\"parsing regular expression\");\n let source = \"\";\n let inClass = false;\n while (!EOL) {\n if (next() === \"\\\\\") {\n source += eat1();\n if (EOL)\n syntaxError(\"parsing regular expression\");\n } else if (inClass && next() === \"]\") {\n inClass = false;\n } else if (!inClass && next() === \"[\") {\n inClass = true;\n } else if (!inClass && next() === \"/\") {\n break;\n }\n source += eat1();\n }\n if (eat1() !== \"/\")\n syntaxError(\"parsing regular expression\");\n let flags = \"\";\n while (!EOL && next().match(/[dgimsuy]/))\n flags += eat1();\n try {\n return new RegExp(source, flags);\n } catch (e) {\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\`: ${e.message}`);\n }\n }\n function readAttributeToken() {\n let token = \"\";\n skipSpaces();\n if (next() === `'` || next() === `\"`)\n token = readQuotedString(next()).slice(1, -1);\n else\n token = readIdentifier();\n if (!token)\n syntaxError(\"parsing property path\");\n return token;\n }\n function readOperator() {\n skipSpaces();\n let op = \"\";\n if (!EOL)\n op += eat1();\n if (!EOL && op !== \"=\")\n op += eat1();\n if (![\"=\", \"*=\", \"^=\", \"$=\", \"|=\", \"~=\"].includes(op))\n syntaxError(\"parsing operator\");\n return op;\n }\n function readAttribute() {\n eat1();\n const jsonPath = [];\n jsonPath.push(readAttributeToken());\n skipSpaces();\n while (next() === \".\") {\n eat1();\n jsonPath.push(readAttributeToken());\n skipSpaces();\n }\n if (next() === \"]\") {\n eat1();\n return { name: jsonPath.join(\".\"), jsonPath, op: \"\", value: null, caseSensitive: false };\n }\n const operator = readOperator();\n let value = void 0;\n let caseSensitive = true;\n skipSpaces();\n if (next() === \"/\") {\n if (operator !== \"=\")\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - cannot use ${operator} in attribute with regular expression`);\n value = readRegularExpression();\n } else if (next() === `'` || next() === `\"`) {\n value = readQuotedString(next()).slice(1, -1);\n skipSpaces();\n if (next() === \"i\" || next() === \"I\") {\n caseSensitive = false;\n eat1();\n } else if (next() === \"s\" || next() === \"S\") {\n caseSensitive = true;\n eat1();\n }\n } else {\n value = \"\";\n while (!EOL && (isCSSNameChar(next()) || next() === \"+\" || next() === \".\"))\n value += eat1();\n if (value === \"true\") {\n value = true;\n } else if (value === \"false\") {\n value = false;\n } else {\n if (!allowUnquotedStrings) {\n value = +value;\n if (Number.isNaN(value))\n syntaxError(\"parsing attribute value\");\n }\n }\n }\n skipSpaces();\n if (next() !== \"]\")\n syntaxError(\"parsing attribute value\");\n eat1();\n if (operator !== \"=\" && typeof value !== \"string\")\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - cannot use ${operator} in attribute with non-string matching value - ${value}`);\n return { name: jsonPath.join(\".\"), jsonPath, op: operator, value, caseSensitive };\n }\n const result = {\n name: \"\",\n attributes: []\n };\n result.name = readIdentifier();\n skipSpaces();\n while (next() === \"[\") {\n result.attributes.push(readAttribute());\n skipSpaces();\n }\n if (!EOL)\n syntaxError(void 0);\n if (!result.name && !result.attributes.length)\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - selector cannot be empty`);\n return result;\n}\n\n// packages/playwright-core/src/utils/isomorphic/locatorGenerators.ts\nfunction asLocator(lang, selector, isFrameLocator = false) {\n return asLocators(lang, selector, isFrameLocator, 1)[0];\n}\nfunction asLocators(lang, selector, isFrameLocator = false, maxOutputSize = 20, preferredQuote) {\n try {\n return innerAsLocators(new generators[lang](preferredQuote), parseSelector(selector), isFrameLocator, maxOutputSize);\n } catch (e) {\n return [selector];\n }\n}\nfunction innerAsLocators(factory, parsed, isFrameLocator = false, maxOutputSize = 20) {\n const parts = [...parsed.parts];\n const tokens = [];\n let nextBase = isFrameLocator ? \"frame-locator\" : \"page\";\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const base = nextBase;\n nextBase = \"locator\";\n if (part.name === \"nth\") {\n if (part.body === \"0\")\n tokens.push([factory.generateLocator(base, \"first\", \"\"), factory.generateLocator(base, \"nth\", \"0\")]);\n else if (part.body === \"-1\")\n tokens.push([factory.generateLocator(base, \"last\", \"\"), factory.generateLocator(base, \"nth\", \"-1\")]);\n else\n tokens.push([factory.generateLocator(base, \"nth\", part.body)]);\n continue;\n }\n if (part.name === \"internal:text\") {\n const { exact, text } = detectExact(part.body);\n tokens.push([factory.generateLocator(base, \"text\", text, { exact })]);\n continue;\n }\n if (part.name === \"internal:has-text\") {\n const { exact, text } = detectExact(part.body);\n if (!exact) {\n tokens.push([factory.generateLocator(base, \"has-text\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:has-not-text\") {\n const { exact, text } = detectExact(part.body);\n if (!exact) {\n tokens.push([factory.generateLocator(base, \"has-not-text\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:has\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"has\", inner)));\n continue;\n }\n if (part.name === \"internal:has-not\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"hasNot\", inner)));\n continue;\n }\n if (part.name === \"internal:and\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"and\", inner)));\n continue;\n }\n if (part.name === \"internal:or\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"or\", inner)));\n continue;\n }\n if (part.name === \"internal:chain\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"chain\", inner)));\n continue;\n }\n if (part.name === \"internal:label\") {\n const { exact, text } = detectExact(part.body);\n tokens.push([factory.generateLocator(base, \"label\", text, { exact })]);\n continue;\n }\n if (part.name === \"internal:role\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const options = { attrs: [] };\n for (const attr of attrSelector.attributes) {\n if (attr.name === \"name\") {\n options.exact = attr.caseSensitive;\n options.name = attr.value;\n } else {\n if (attr.name === \"level\" && typeof attr.value === \"string\")\n attr.value = +attr.value;\n options.attrs.push({ name: attr.name === \"include-hidden\" ? \"includeHidden\" : attr.name, value: attr.value });\n }\n }\n tokens.push([factory.generateLocator(base, \"role\", attrSelector.name, options)]);\n continue;\n }\n if (part.name === \"internal:testid\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const { value } = attrSelector.attributes[0];\n tokens.push([factory.generateLocator(base, \"test-id\", value)]);\n continue;\n }\n if (part.name === \"internal:attr\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const { name, value, caseSensitive } = attrSelector.attributes[0];\n const text = value;\n const exact = !!caseSensitive;\n if (name === \"placeholder\") {\n tokens.push([factory.generateLocator(base, \"placeholder\", text, { exact })]);\n continue;\n }\n if (name === \"alt\") {\n tokens.push([factory.generateLocator(base, \"alt\", text, { exact })]);\n continue;\n }\n if (name === \"title\") {\n tokens.push([factory.generateLocator(base, \"title\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:control\" && part.body === \"enter-frame\") {\n const lastTokens = tokens[tokens.length - 1];\n const lastPart = parts[index - 1];\n const transformed = lastTokens.map((token) => factory.chainLocators([token, factory.generateLocator(base, \"frame\", \"\")]));\n if ([\"xpath\", \"css\"].includes(lastPart.name)) {\n transformed.push(\n factory.generateLocator(base, \"frame-locator\", stringifySelector({ parts: [lastPart] })),\n factory.generateLocator(base, \"frame-locator\", stringifySelector({ parts: [lastPart] }, true))\n );\n }\n lastTokens.splice(0, lastTokens.length, ...transformed);\n nextBase = \"frame-locator\";\n continue;\n }\n const nextPart = parts[index + 1];\n const selectorPart = stringifySelector({ parts: [part] });\n const locatorPart = factory.generateLocator(base, \"default\", selectorPart);\n if (nextPart && [\"internal:has-text\", \"internal:has-not-text\"].includes(nextPart.name)) {\n const { exact, text } = detectExact(nextPart.body);\n if (!exact) {\n const nextLocatorPart = factory.generateLocator(\"locator\", nextPart.name === \"internal:has-text\" ? \"has-text\" : \"has-not-text\", text, { exact });\n const options = {};\n if (nextPart.name === \"internal:has-text\")\n options.hasText = text;\n else\n options.hasNotText = text;\n const combinedPart = factory.generateLocator(base, \"default\", selectorPart, options);\n tokens.push([factory.chainLocators([locatorPart, nextLocatorPart]), combinedPart]);\n index++;\n continue;\n }\n }\n let locatorPartWithEngine;\n if ([\"xpath\", \"css\"].includes(part.name)) {\n const selectorPart2 = stringifySelector(\n { parts: [part] },\n /* forceEngineName */\n true\n );\n locatorPartWithEngine = factory.generateLocator(base, \"default\", selectorPart2);\n }\n tokens.push([locatorPart, locatorPartWithEngine].filter(Boolean));\n }\n return combineTokens(factory, tokens, maxOutputSize);\n}\nfunction combineTokens(factory, tokens, maxOutputSize) {\n const currentTokens = tokens.map(() => \"\");\n const result = [];\n const visit = (index) => {\n if (index === tokens.length) {\n result.push(factory.chainLocators(currentTokens));\n return result.length < maxOutputSize;\n }\n for (const taken of tokens[index]) {\n currentTokens[index] = taken;\n if (!visit(index + 1))\n return false;\n }\n return true;\n };\n visit(0);\n return result;\n}\nfunction detectExact(text) {\n let exact = false;\n const match = text.match(/^\\/(.*)\\/([igm]*)$/);\n if (match)\n return { text: new RegExp(match[1], match[2]) };\n if (text.endsWith('\"')) {\n text = JSON.parse(text);\n exact = true;\n } else if (text.endsWith('\"s')) {\n text = JSON.parse(text.substring(0, text.length - 1));\n exact = true;\n } else if (text.endsWith('\"i')) {\n text = JSON.parse(text.substring(0, text.length - 1));\n exact = false;\n }\n return { exact, text };\n}\nvar JavaScriptLocatorFactory = class {\n constructor(preferredQuote) {\n this.preferredQuote = preferredQuote;\n }\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, { hasText: ${this.toHasText(options.hasText)} })`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, { hasNotText: ${this.toHasText(options.hasNotText)} })`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frameLocator(${this.quote(body)})`;\n case \"frame\":\n return `contentFrame()`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first()`;\n case \"last\":\n return `last()`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`name: ${this.regexToSourceString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`name: ${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`exact: true`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`${name}: ${typeof value === \"string\" ? this.quote(value) : value}`);\n const attrString = attrs.length ? `, { ${attrs.join(\", \")} }` : \"\";\n return `getByRole(${this.quote(body)}${attrString})`;\n case \"has-text\":\n return `filter({ hasText: ${this.toHasText(body)} })`;\n case \"has-not-text\":\n return `filter({ hasNotText: ${this.toHasText(body)} })`;\n case \"has\":\n return `filter({ has: ${body} })`;\n case \"hasNot\":\n return `filter({ hasNot: ${body} })`;\n case \"and\":\n return `and(${body})`;\n case \"or\":\n return `or(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `getByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"getByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"getByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"getByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"getByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"getByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToSourceString(re) {\n return normalizeEscapedRegexQuotes(String(re));\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToSourceString(body)})`;\n return exact ? `${method}(${this.quote(body)}, { exact: true })` : `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToSourceString(body);\n return this.quote(body);\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToSourceString(value);\n return this.quote(value);\n }\n quote(text) {\n var _a;\n return escapeWithQuotes(text, (_a = this.preferredQuote) != null ? _a : \"'\");\n }\n};\nvar PythonLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, has_text=${this.toHasText(options.hasText)})`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, has_not_text=${this.toHasText(options.hasNotText)})`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frame_locator(${this.quote(body)})`;\n case \"frame\":\n return `content_frame`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first`;\n case \"last\":\n return `last`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`name=${this.regexToString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`name=${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`exact=True`);\n }\n for (const { name, value } of options.attrs) {\n let valueString = typeof value === \"string\" ? this.quote(value) : value;\n if (typeof value === \"boolean\")\n valueString = value ? \"True\" : \"False\";\n attrs.push(`${toSnakeCase(name)}=${valueString}`);\n }\n const attrString = attrs.length ? `, ${attrs.join(\", \")}` : \"\";\n return `get_by_role(${this.quote(body)}${attrString})`;\n case \"has-text\":\n return `filter(has_text=${this.toHasText(body)})`;\n case \"has-not-text\":\n return `filter(has_not_text=${this.toHasText(body)})`;\n case \"has\":\n return `filter(has=${body})`;\n case \"hasNot\":\n return `filter(has_not=${body})`;\n case \"and\":\n return `and_(${body})`;\n case \"or\":\n return `or_(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `get_by_test_id(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"get_by_text\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"get_by_alt_text\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"get_by_placeholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"get_by_label\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"get_by_title\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", re.IGNORECASE\" : \"\";\n return `re.compile(r\"${normalizeEscapedRegexQuotes(body.source).replace(/\\\\\\//, \"/\").replace(/\"/g, '\\\\\"')}\"${suffix})`;\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, exact=True)`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToString(body);\n return `${this.quote(body)}`;\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar JavaLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n let clazz;\n switch (base) {\n case \"page\":\n clazz = \"Page\";\n break;\n case \"frame-locator\":\n clazz = \"FrameLocator\";\n break;\n case \"locator\":\n clazz = \"Locator\";\n break;\n }\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, new ${clazz}.LocatorOptions().setHasText(${this.toHasText(options.hasText)}))`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, new ${clazz}.LocatorOptions().setHasNotText(${this.toHasText(options.hasNotText)}))`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frameLocator(${this.quote(body)})`;\n case \"frame\":\n return `contentFrame()`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first()`;\n case \"last\":\n return `last()`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`.setName(${this.regexToString(options.name)})`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`.setName(${this.quote(options.name)})`);\n if (options.exact)\n attrs.push(`.setExact(true)`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`.set${toTitleCase(name)}(${typeof value === \"string\" ? this.quote(value) : value})`);\n const attrString = attrs.length ? `, new ${clazz}.GetByRoleOptions()${attrs.join(\"\")}` : \"\";\n return `getByRole(AriaRole.${toSnakeCase(body).toUpperCase()}${attrString})`;\n case \"has-text\":\n return `filter(new ${clazz}.FilterOptions().setHasText(${this.toHasText(body)}))`;\n case \"has-not-text\":\n return `filter(new ${clazz}.FilterOptions().setHasNotText(${this.toHasText(body)}))`;\n case \"has\":\n return `filter(new ${clazz}.FilterOptions().setHas(${body}))`;\n case \"hasNot\":\n return `filter(new ${clazz}.FilterOptions().setHasNot(${body}))`;\n case \"and\":\n return `and(${body})`;\n case \"or\":\n return `or(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `getByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(clazz, \"getByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(clazz, \"getByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(clazz, \"getByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(clazz, \"getByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(clazz, \"getByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", Pattern.CASE_INSENSITIVE\" : \"\";\n return `Pattern.compile(${this.quote(normalizeEscapedRegexQuotes(body.source))}${suffix})`;\n }\n toCallWithExact(clazz, method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, new ${clazz}.${toTitleCase(method)}Options().setExact(true))`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToString(body);\n return this.quote(body);\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar CSharpLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `Locator(${this.quote(body)}, new() { ${this.toHasText(options.hasText)} })`;\n if (options.hasNotText !== void 0)\n return `Locator(${this.quote(body)}, new() { ${this.toHasNotText(options.hasNotText)} })`;\n return `Locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `FrameLocator(${this.quote(body)})`;\n case \"frame\":\n return `ContentFrame`;\n case \"nth\":\n return `Nth(${body})`;\n case \"first\":\n return `First`;\n case \"last\":\n return `Last`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`NameRegex = ${this.regexToString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`Name = ${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`Exact = true`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`${toTitleCase(name)} = ${typeof value === \"string\" ? this.quote(value) : value}`);\n const attrString = attrs.length ? `, new() { ${attrs.join(\", \")} }` : \"\";\n return `GetByRole(AriaRole.${toTitleCase(body)}${attrString})`;\n case \"has-text\":\n return `Filter(new() { ${this.toHasText(body)} })`;\n case \"has-not-text\":\n return `Filter(new() { ${this.toHasNotText(body)} })`;\n case \"has\":\n return `Filter(new() { Has = ${body} })`;\n case \"hasNot\":\n return `Filter(new() { HasNot = ${body} })`;\n case \"and\":\n return `And(${body})`;\n case \"or\":\n return `Or(${body})`;\n case \"chain\":\n return `Locator(${body})`;\n case \"test-id\":\n return `GetByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"GetByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"GetByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"GetByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"GetByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"GetByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", RegexOptions.IgnoreCase\" : \"\";\n return `new Regex(${this.quote(normalizeEscapedRegexQuotes(body.source))}${suffix})`;\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, new() { Exact = true })`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return `HasTextRegex = ${this.regexToString(body)}`;\n return `HasText = ${this.quote(body)}`;\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n toHasNotText(body) {\n if (isRegExp(body))\n return `HasNotTextRegex = ${this.regexToString(body)}`;\n return `HasNotText = ${this.quote(body)}`;\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar JsonlLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n return JSON.stringify({\n kind,\n body,\n options\n });\n }\n chainLocators(locators) {\n const objects = locators.map((l) => JSON.parse(l));\n for (let i = 0; i < objects.length - 1; ++i)\n objects[i].next = objects[i + 1];\n return JSON.stringify(objects[0]);\n }\n};\nvar generators = {\n javascript: JavaScriptLocatorFactory,\n python: PythonLocatorFactory,\n java: JavaLocatorFactory,\n csharp: CSharpLocatorFactory,\n jsonl: JsonlLocatorFactory\n};\nfunction isRegExp(obj) {\n return obj instanceof RegExp;\n}\n\n// packages/playwright-core/src/server/injected/consoleApi.ts\nvar selectorSymbol = Symbol(\"selector\");\nvar _Locator = class _Locator {\n constructor(injectedScript, selector, options) {\n if (options == null ? void 0 : options.hasText)\n selector += ` >> internal:has-text=${escapeForTextSelector(options.hasText, false)}`;\n if (options == null ? void 0 : options.hasNotText)\n selector += ` >> internal:has-not-text=${escapeForTextSelector(options.hasNotText, false)}`;\n if (options == null ? void 0 : options.has)\n selector += ` >> internal:has=` + JSON.stringify(options.has[selectorSymbol]);\n if (options == null ? void 0 : options.hasNot)\n selector += ` >> internal:has-not=` + JSON.stringify(options.hasNot[selectorSymbol]);\n this[selectorSymbol] = selector;\n if (selector) {\n const parsed = injectedScript.parseSelector(selector);\n this.element = injectedScript.querySelector(parsed, injectedScript.document, false);\n this.elements = injectedScript.querySelectorAll(parsed, injectedScript.document);\n }\n const selectorBase = selector;\n const self = this;\n self.locator = (selector2, options2) => {\n return new _Locator(injectedScript, selectorBase ? selectorBase + \" >> \" + selector2 : selector2, options2);\n };\n self.getByTestId = (testId) => self.locator(getByTestIdSelector(injectedScript.testIdAttributeNameForStrictErrorAndConsoleCodegen(), testId));\n self.getByAltText = (text, options2) => self.locator(getByAltTextSelector(text, options2));\n self.getByLabel = (text, options2) => self.locator(getByLabelSelector(text, options2));\n self.getByPlaceholder = (text, options2) => self.locator(getByPlaceholderSelector(text, options2));\n self.getByText = (text, options2) => self.locator(getByTextSelector(text, options2));\n self.getByTitle = (text, options2) => self.locator(getByTitleSelector(text, options2));\n self.getByRole = (role, options2 = {}) => self.locator(getByRoleSelector(role, options2));\n self.filter = (options2) => new _Locator(injectedScript, selector, options2);\n self.first = () => self.locator(\"nth=0\");\n self.last = () => self.locator(\"nth=-1\");\n self.nth = (index) => self.locator(`nth=${index}`);\n self.and = (locator) => new _Locator(injectedScript, selectorBase + ` >> internal:and=` + JSON.stringify(locator[selectorSymbol]));\n self.or = (locator) => new _Locator(injectedScript, selectorBase + ` >> internal:or=` + JSON.stringify(locator[selectorSymbol]));\n }\n};\nselectorSymbol;\nvar Locator = _Locator;\nvar ConsoleAPI = class {\n constructor(injectedScript) {\n this._injectedScript = injectedScript;\n if (this._injectedScript.window.playwright)\n return;\n this._injectedScript.window.playwright = {\n $: (selector, strict) => this._querySelector(selector, !!strict),\n $$: (selector) => this._querySelectorAll(selector),\n inspect: (selector) => this._inspect(selector),\n selector: (element) => this._selector(element),\n generateLocator: (element, language) => this._generateLocator(element, language),\n ariaSnapshot: (element) => {\n const snapshot = this._injectedScript.ariaSnapshot(element || this._injectedScript.document.body);\n console.log(snapshot);\n },\n resume: () => this._resume(),\n ...new Locator(injectedScript, \"\")\n };\n delete this._injectedScript.window.playwright.filter;\n delete this._injectedScript.window.playwright.first;\n delete this._injectedScript.window.playwright.last;\n delete this._injectedScript.window.playwright.nth;\n delete this._injectedScript.window.playwright.and;\n delete this._injectedScript.window.playwright.or;\n }\n _querySelector(selector, strict) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.query('Playwright >> selector').`);\n const parsed = this._injectedScript.parseSelector(selector);\n return this._injectedScript.querySelector(parsed, this._injectedScript.document, strict);\n }\n _querySelectorAll(selector) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.$$('Playwright >> selector').`);\n const parsed = this._injectedScript.parseSelector(selector);\n return this._injectedScript.querySelectorAll(parsed, this._injectedScript.document);\n }\n _inspect(selector) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.inspect('Playwright >> selector').`);\n this._injectedScript.window.inspect(this._querySelector(selector, false));\n }\n _selector(element) {\n if (!(element instanceof Element))\n throw new Error(`Usage: playwright.selector(element).`);\n return this._injectedScript.generateSelectorSimple(element);\n }\n _generateLocator(element, language) {\n if (!(element instanceof Element))\n throw new Error(`Usage: playwright.locator(element).`);\n const selector = this._injectedScript.generateSelectorSimple(element);\n return asLocator(language || \"javascript\", selector);\n }\n _resume() {\n this._injectedScript.window.__pw_resume().catch(() => {\n });\n }\n};\nvar consoleApi_default = ConsoleAPI;\n"; \ No newline at end of file +const source = exports.source = "\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n for (const name in obj) { fn = obj[name]; break; }\n const module = { exports: {} };\n fn(module.exports, module);\n result = module.exports;\n }\n return result;\n }\n};\nvar __export = (target, all) => {for (var name in all) target[name] = all[name];};\nvar __toESM = mod => ({ ...mod, 'default': mod });\nvar __toCommonJS = mod => ({ ...mod, __esModule: true });\n\n\n// packages/playwright-core/src/server/injected/consoleApi.ts\nvar consoleApi_exports = {};\n__export(consoleApi_exports, {\n default: () => consoleApi_default\n});\nmodule.exports = __toCommonJS(consoleApi_exports);\n\n// packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts\nvar between = function(num, first, last) {\n return num >= first && num <= last;\n};\nfunction digit(code) {\n return between(code, 48, 57);\n}\nfunction hexdigit(code) {\n return digit(code) || between(code, 65, 70) || between(code, 97, 102);\n}\nfunction uppercaseletter(code) {\n return between(code, 65, 90);\n}\nfunction lowercaseletter(code) {\n return between(code, 97, 122);\n}\nfunction letter(code) {\n return uppercaseletter(code) || lowercaseletter(code);\n}\nfunction nonascii(code) {\n return code >= 128;\n}\nfunction namestartchar(code) {\n return letter(code) || nonascii(code) || code === 95;\n}\nfunction namechar(code) {\n return namestartchar(code) || digit(code) || code === 45;\n}\nfunction nonprintable(code) {\n return between(code, 0, 8) || code === 11 || between(code, 14, 31) || code === 127;\n}\nfunction newline(code) {\n return code === 10;\n}\nfunction whitespace(code) {\n return newline(code) || code === 9 || code === 32;\n}\nvar maximumallowedcodepoint = 1114111;\nvar InvalidCharacterError = class extends Error {\n constructor(message) {\n super(message);\n this.name = \"InvalidCharacterError\";\n }\n};\nfunction preprocess(str) {\n const codepoints = [];\n for (let i = 0; i < str.length; i++) {\n let code = str.charCodeAt(i);\n if (code === 13 && str.charCodeAt(i + 1) === 10) {\n code = 10;\n i++;\n }\n if (code === 13 || code === 12)\n code = 10;\n if (code === 0)\n code = 65533;\n if (between(code, 55296, 56319) && between(str.charCodeAt(i + 1), 56320, 57343)) {\n const lead = code - 55296;\n const trail = str.charCodeAt(i + 1) - 56320;\n code = Math.pow(2, 16) + lead * Math.pow(2, 10) + trail;\n i++;\n }\n codepoints.push(code);\n }\n return codepoints;\n}\nfunction stringFromCode(code) {\n if (code <= 65535)\n return String.fromCharCode(code);\n code -= Math.pow(2, 16);\n const lead = Math.floor(code / Math.pow(2, 10)) + 55296;\n const trail = code % Math.pow(2, 10) + 56320;\n return String.fromCharCode(lead) + String.fromCharCode(trail);\n}\nfunction tokenize(str1) {\n const str = preprocess(str1);\n let i = -1;\n const tokens = [];\n let code;\n let line = 0;\n let column = 0;\n let lastLineLength = 0;\n const incrLineno = function() {\n line += 1;\n lastLineLength = column;\n column = 0;\n };\n const locStart = { line, column };\n const codepoint = function(i2) {\n if (i2 >= str.length)\n return -1;\n return str[i2];\n };\n const next = function(num) {\n if (num === void 0)\n num = 1;\n if (num > 3)\n throw \"Spec Error: no more than three codepoints of lookahead.\";\n return codepoint(i + num);\n };\n const consume = function(num) {\n if (num === void 0)\n num = 1;\n i += num;\n code = codepoint(i);\n if (newline(code))\n incrLineno();\n else\n column += num;\n return true;\n };\n const reconsume = function() {\n i -= 1;\n if (newline(code)) {\n line -= 1;\n column = lastLineLength;\n } else {\n column -= 1;\n }\n locStart.line = line;\n locStart.column = column;\n return true;\n };\n const eof = function(codepoint2) {\n if (codepoint2 === void 0)\n codepoint2 = code;\n return codepoint2 === -1;\n };\n const donothing = function() {\n };\n const parseerror = function() {\n };\n const consumeAToken = function() {\n consumeComments();\n consume();\n if (whitespace(code)) {\n while (whitespace(next()))\n consume();\n return new WhitespaceToken();\n } else if (code === 34) {\n return consumeAStringToken();\n } else if (code === 35) {\n if (namechar(next()) || areAValidEscape(next(1), next(2))) {\n const token = new HashToken(\"\");\n if (wouldStartAnIdentifier(next(1), next(2), next(3)))\n token.type = \"id\";\n token.value = consumeAName();\n return token;\n } else {\n return new DelimToken(code);\n }\n } else if (code === 36) {\n if (next() === 61) {\n consume();\n return new SuffixMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 39) {\n return consumeAStringToken();\n } else if (code === 40) {\n return new OpenParenToken();\n } else if (code === 41) {\n return new CloseParenToken();\n } else if (code === 42) {\n if (next() === 61) {\n consume();\n return new SubstringMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 43) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 44) {\n return new CommaToken();\n } else if (code === 45) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else if (next(1) === 45 && next(2) === 62) {\n consume(2);\n return new CDCToken();\n } else if (startsWithAnIdentifier()) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 46) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 58) {\n return new ColonToken();\n } else if (code === 59) {\n return new SemicolonToken();\n } else if (code === 60) {\n if (next(1) === 33 && next(2) === 45 && next(3) === 45) {\n consume(3);\n return new CDOToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 64) {\n if (wouldStartAnIdentifier(next(1), next(2), next(3)))\n return new AtKeywordToken(consumeAName());\n else\n return new DelimToken(code);\n } else if (code === 91) {\n return new OpenSquareToken();\n } else if (code === 92) {\n if (startsWithAValidEscape()) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else {\n parseerror();\n return new DelimToken(code);\n }\n } else if (code === 93) {\n return new CloseSquareToken();\n } else if (code === 94) {\n if (next() === 61) {\n consume();\n return new PrefixMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 123) {\n return new OpenCurlyToken();\n } else if (code === 124) {\n if (next() === 61) {\n consume();\n return new DashMatchToken();\n } else if (next() === 124) {\n consume();\n return new ColumnToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 125) {\n return new CloseCurlyToken();\n } else if (code === 126) {\n if (next() === 61) {\n consume();\n return new IncludeMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (digit(code)) {\n reconsume();\n return consumeANumericToken();\n } else if (namestartchar(code)) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else if (eof()) {\n return new EOFToken();\n } else {\n return new DelimToken(code);\n }\n };\n const consumeComments = function() {\n while (next(1) === 47 && next(2) === 42) {\n consume(2);\n while (true) {\n consume();\n if (code === 42 && next() === 47) {\n consume();\n break;\n } else if (eof()) {\n parseerror();\n return;\n }\n }\n }\n };\n const consumeANumericToken = function() {\n const num = consumeANumber();\n if (wouldStartAnIdentifier(next(1), next(2), next(3))) {\n const token = new DimensionToken();\n token.value = num.value;\n token.repr = num.repr;\n token.type = num.type;\n token.unit = consumeAName();\n return token;\n } else if (next() === 37) {\n consume();\n const token = new PercentageToken();\n token.value = num.value;\n token.repr = num.repr;\n return token;\n } else {\n const token = new NumberToken();\n token.value = num.value;\n token.repr = num.repr;\n token.type = num.type;\n return token;\n }\n };\n const consumeAnIdentlikeToken = function() {\n const str2 = consumeAName();\n if (str2.toLowerCase() === \"url\" && next() === 40) {\n consume();\n while (whitespace(next(1)) && whitespace(next(2)))\n consume();\n if (next() === 34 || next() === 39)\n return new FunctionToken(str2);\n else if (whitespace(next()) && (next(2) === 34 || next(2) === 39))\n return new FunctionToken(str2);\n else\n return consumeAURLToken();\n } else if (next() === 40) {\n consume();\n return new FunctionToken(str2);\n } else {\n return new IdentToken(str2);\n }\n };\n const consumeAStringToken = function(endingCodePoint) {\n if (endingCodePoint === void 0)\n endingCodePoint = code;\n let string = \"\";\n while (consume()) {\n if (code === endingCodePoint || eof()) {\n return new StringToken(string);\n } else if (newline(code)) {\n parseerror();\n reconsume();\n return new BadStringToken();\n } else if (code === 92) {\n if (eof(next()))\n donothing();\n else if (newline(next()))\n consume();\n else\n string += stringFromCode(consumeEscape());\n } else {\n string += stringFromCode(code);\n }\n }\n throw new Error(\"Internal error\");\n };\n const consumeAURLToken = function() {\n const token = new URLToken(\"\");\n while (whitespace(next()))\n consume();\n if (eof(next()))\n return token;\n while (consume()) {\n if (code === 41 || eof()) {\n return token;\n } else if (whitespace(code)) {\n while (whitespace(next()))\n consume();\n if (next() === 41 || eof(next())) {\n consume();\n return token;\n } else {\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n }\n } else if (code === 34 || code === 39 || code === 40 || nonprintable(code)) {\n parseerror();\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n } else if (code === 92) {\n if (startsWithAValidEscape()) {\n token.value += stringFromCode(consumeEscape());\n } else {\n parseerror();\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n }\n } else {\n token.value += stringFromCode(code);\n }\n }\n throw new Error(\"Internal error\");\n };\n const consumeEscape = function() {\n consume();\n if (hexdigit(code)) {\n const digits = [code];\n for (let total = 0; total < 5; total++) {\n if (hexdigit(next())) {\n consume();\n digits.push(code);\n } else {\n break;\n }\n }\n if (whitespace(next()))\n consume();\n let value = parseInt(digits.map(function(x) {\n return String.fromCharCode(x);\n }).join(\"\"), 16);\n if (value > maximumallowedcodepoint)\n value = 65533;\n return value;\n } else if (eof()) {\n return 65533;\n } else {\n return code;\n }\n };\n const areAValidEscape = function(c1, c2) {\n if (c1 !== 92)\n return false;\n if (newline(c2))\n return false;\n return true;\n };\n const startsWithAValidEscape = function() {\n return areAValidEscape(code, next());\n };\n const wouldStartAnIdentifier = function(c1, c2, c3) {\n if (c1 === 45)\n return namestartchar(c2) || c2 === 45 || areAValidEscape(c2, c3);\n else if (namestartchar(c1))\n return true;\n else if (c1 === 92)\n return areAValidEscape(c1, c2);\n else\n return false;\n };\n const startsWithAnIdentifier = function() {\n return wouldStartAnIdentifier(code, next(1), next(2));\n };\n const wouldStartANumber = function(c1, c2, c3) {\n if (c1 === 43 || c1 === 45) {\n if (digit(c2))\n return true;\n if (c2 === 46 && digit(c3))\n return true;\n return false;\n } else if (c1 === 46) {\n if (digit(c2))\n return true;\n return false;\n } else if (digit(c1)) {\n return true;\n } else {\n return false;\n }\n };\n const startsWithANumber = function() {\n return wouldStartANumber(code, next(1), next(2));\n };\n const consumeAName = function() {\n let result = \"\";\n while (consume()) {\n if (namechar(code)) {\n result += stringFromCode(code);\n } else if (startsWithAValidEscape()) {\n result += stringFromCode(consumeEscape());\n } else {\n reconsume();\n return result;\n }\n }\n throw new Error(\"Internal parse error\");\n };\n const consumeANumber = function() {\n let repr = \"\";\n let type = \"integer\";\n if (next() === 43 || next() === 45) {\n consume();\n repr += stringFromCode(code);\n }\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n if (next(1) === 46 && digit(next(2))) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n }\n const c1 = next(1), c2 = next(2), c3 = next(3);\n if ((c1 === 69 || c1 === 101) && digit(c2)) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n } else if ((c1 === 69 || c1 === 101) && (c2 === 43 || c2 === 45) && digit(c3)) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n }\n const value = convertAStringToANumber(repr);\n return { type, value, repr };\n };\n const convertAStringToANumber = function(string) {\n return +string;\n };\n const consumeTheRemnantsOfABadURL = function() {\n while (consume()) {\n if (code === 41 || eof()) {\n return;\n } else if (startsWithAValidEscape()) {\n consumeEscape();\n donothing();\n } else {\n donothing();\n }\n }\n };\n let iterationCount = 0;\n while (!eof(next())) {\n tokens.push(consumeAToken());\n iterationCount++;\n if (iterationCount > str.length * 2)\n throw new Error(\"I'm infinite-looping!\");\n }\n return tokens;\n}\nvar CSSParserToken = class {\n constructor() {\n this.tokenType = \"\";\n }\n toJSON() {\n return { token: this.tokenType };\n }\n toString() {\n return this.tokenType;\n }\n toSource() {\n return \"\" + this;\n }\n};\nvar BadStringToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"BADSTRING\";\n }\n};\nvar BadURLToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"BADURL\";\n }\n};\nvar WhitespaceToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"WHITESPACE\";\n }\n toString() {\n return \"WS\";\n }\n toSource() {\n return \" \";\n }\n};\nvar CDOToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"CDO\";\n }\n toSource() {\n return \"\";\n }\n};\nvar ColonToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \":\";\n }\n};\nvar SemicolonToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \";\";\n }\n};\nvar CommaToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \",\";\n }\n};\nvar GroupingToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.value = \"\";\n this.mirror = \"\";\n }\n};\nvar OpenCurlyToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"{\";\n this.value = \"{\";\n this.mirror = \"}\";\n }\n};\nvar CloseCurlyToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"}\";\n this.value = \"}\";\n this.mirror = \"{\";\n }\n};\nvar OpenSquareToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"[\";\n this.value = \"[\";\n this.mirror = \"]\";\n }\n};\nvar CloseSquareToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"]\";\n this.value = \"]\";\n this.mirror = \"[\";\n }\n};\nvar OpenParenToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"(\";\n this.value = \"(\";\n this.mirror = \")\";\n }\n};\nvar CloseParenToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \")\";\n this.value = \")\";\n this.mirror = \"(\";\n }\n};\nvar IncludeMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"~=\";\n }\n};\nvar DashMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"|=\";\n }\n};\nvar PrefixMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"^=\";\n }\n};\nvar SuffixMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"$=\";\n }\n};\nvar SubstringMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"*=\";\n }\n};\nvar ColumnToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"||\";\n }\n};\nvar EOFToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"EOF\";\n }\n toSource() {\n return \"\";\n }\n};\nvar DelimToken = class extends CSSParserToken {\n constructor(code) {\n super();\n this.tokenType = \"DELIM\";\n this.value = \"\";\n this.value = stringFromCode(code);\n }\n toString() {\n return \"DELIM(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n return json;\n }\n toSource() {\n if (this.value === \"\\\\\")\n return \"\\\\\\n\";\n else\n return this.value;\n }\n};\nvar StringValuedToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.value = \"\";\n }\n ASCIIMatch(str) {\n return this.value.toLowerCase() === str.toLowerCase();\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n return json;\n }\n};\nvar IdentToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"IDENT\";\n this.value = val;\n }\n toString() {\n return \"IDENT(\" + this.value + \")\";\n }\n toSource() {\n return escapeIdent(this.value);\n }\n};\nvar FunctionToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"FUNCTION\";\n this.value = val;\n this.mirror = \")\";\n }\n toString() {\n return \"FUNCTION(\" + this.value + \")\";\n }\n toSource() {\n return escapeIdent(this.value) + \"(\";\n }\n};\nvar AtKeywordToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"AT-KEYWORD\";\n this.value = val;\n }\n toString() {\n return \"AT(\" + this.value + \")\";\n }\n toSource() {\n return \"@\" + escapeIdent(this.value);\n }\n};\nvar HashToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"HASH\";\n this.value = val;\n this.type = \"unrestricted\";\n }\n toString() {\n return \"HASH(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.type = this.type;\n return json;\n }\n toSource() {\n if (this.type === \"id\")\n return \"#\" + escapeIdent(this.value);\n else\n return \"#\" + escapeHash(this.value);\n }\n};\nvar StringToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"STRING\";\n this.value = val;\n }\n toString() {\n return '\"' + escapeString(this.value) + '\"';\n }\n};\nvar URLToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"URL\";\n this.value = val;\n }\n toString() {\n return \"URL(\" + this.value + \")\";\n }\n toSource() {\n return 'url(\"' + escapeString(this.value) + '\")';\n }\n};\nvar NumberToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"NUMBER\";\n this.type = \"integer\";\n this.repr = \"\";\n }\n toString() {\n if (this.type === \"integer\")\n return \"INT(\" + this.value + \")\";\n return \"NUMBER(\" + this.value + \")\";\n }\n toJSON() {\n const json = super.toJSON();\n json.value = this.value;\n json.type = this.type;\n json.repr = this.repr;\n return json;\n }\n toSource() {\n return this.repr;\n }\n};\nvar PercentageToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"PERCENTAGE\";\n this.repr = \"\";\n }\n toString() {\n return \"PERCENTAGE(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.repr = this.repr;\n return json;\n }\n toSource() {\n return this.repr + \"%\";\n }\n};\nvar DimensionToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"DIMENSION\";\n this.type = \"integer\";\n this.repr = \"\";\n this.unit = \"\";\n }\n toString() {\n return \"DIM(\" + this.value + \",\" + this.unit + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.type = this.type;\n json.repr = this.repr;\n json.unit = this.unit;\n return json;\n }\n toSource() {\n const source = this.repr;\n let unit = escapeIdent(this.unit);\n if (unit[0].toLowerCase() === \"e\" && (unit[1] === \"-\" || between(unit.charCodeAt(1), 48, 57))) {\n unit = \"\\\\65 \" + unit.slice(1, unit.length);\n }\n return source + unit;\n }\n};\nfunction escapeIdent(string) {\n string = \"\" + string;\n let result = \"\";\n const firstcode = string.charCodeAt(0);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (between(code, 1, 31) || code === 127 || i === 0 && between(code, 48, 57) || i === 1 && between(code, 48, 57) && firstcode === 45)\n result += \"\\\\\" + code.toString(16) + \" \";\n else if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))\n result += string[i];\n else\n result += \"\\\\\" + string[i];\n }\n return result;\n}\nfunction escapeHash(string) {\n string = \"\" + string;\n let result = \"\";\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))\n result += string[i];\n else\n result += \"\\\\\" + code.toString(16) + \" \";\n }\n return result;\n}\nfunction escapeString(string) {\n string = \"\" + string;\n let result = \"\";\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (between(code, 1, 31) || code === 127)\n result += \"\\\\\" + code.toString(16) + \" \";\n else if (code === 34 || code === 92)\n result += \"\\\\\" + string[i];\n else\n result += string[i];\n }\n return result;\n}\n\n// packages/playwright-core/src/utils/isomorphic/cssParser.ts\nvar InvalidSelectorError = class extends Error {\n};\nfunction parseCSS(selector, customNames) {\n let tokens;\n try {\n tokens = tokenize(selector);\n if (!(tokens[tokens.length - 1] instanceof EOFToken))\n tokens.push(new EOFToken());\n } catch (e) {\n const newMessage = e.message + ` while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`;\n const index = (e.stack || \"\").indexOf(e.message);\n if (index !== -1)\n e.stack = e.stack.substring(0, index) + newMessage + e.stack.substring(index + e.message.length);\n e.message = newMessage;\n throw e;\n }\n const unsupportedToken = tokens.find((token) => {\n return token instanceof AtKeywordToken || token instanceof BadStringToken || token instanceof BadURLToken || token instanceof ColumnToken || token instanceof CDOToken || token instanceof CDCToken || token instanceof SemicolonToken || // TODO: Consider using these for something, e.g. to escape complex strings.\n // For example :xpath{ (//div/bar[@attr=\"foo\"])[2]/baz }\n // Or this way :xpath( {complex-xpath-goes-here(\"hello\")} )\n token instanceof OpenCurlyToken || token instanceof CloseCurlyToken || // TODO: Consider treating these as strings?\n token instanceof URLToken || token instanceof PercentageToken;\n });\n if (unsupportedToken)\n throw new InvalidSelectorError(`Unsupported token \"${unsupportedToken.toSource()}\" while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n let pos = 0;\n const names = /* @__PURE__ */ new Set();\n function unexpected() {\n return new InvalidSelectorError(`Unexpected token \"${tokens[pos].toSource()}\" while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n }\n function skipWhitespace() {\n while (tokens[pos] instanceof WhitespaceToken)\n pos++;\n }\n function isIdent(p = pos) {\n return tokens[p] instanceof IdentToken;\n }\n function isString(p = pos) {\n return tokens[p] instanceof StringToken;\n }\n function isNumber(p = pos) {\n return tokens[p] instanceof NumberToken;\n }\n function isComma(p = pos) {\n return tokens[p] instanceof CommaToken;\n }\n function isOpenParen(p = pos) {\n return tokens[p] instanceof OpenParenToken;\n }\n function isCloseParen(p = pos) {\n return tokens[p] instanceof CloseParenToken;\n }\n function isFunction(p = pos) {\n return tokens[p] instanceof FunctionToken;\n }\n function isStar(p = pos) {\n return tokens[p] instanceof DelimToken && tokens[p].value === \"*\";\n }\n function isEOF(p = pos) {\n return tokens[p] instanceof EOFToken;\n }\n function isClauseCombinator(p = pos) {\n return tokens[p] instanceof DelimToken && [\">\", \"+\", \"~\"].includes(tokens[p].value);\n }\n function isSelectorClauseEnd(p = pos) {\n return isComma(p) || isCloseParen(p) || isEOF(p) || isClauseCombinator(p) || tokens[p] instanceof WhitespaceToken;\n }\n function consumeFunctionArguments() {\n const result2 = [consumeArgument()];\n while (true) {\n skipWhitespace();\n if (!isComma())\n break;\n pos++;\n result2.push(consumeArgument());\n }\n return result2;\n }\n function consumeArgument() {\n skipWhitespace();\n if (isNumber())\n return tokens[pos++].value;\n if (isString())\n return tokens[pos++].value;\n return consumeComplexSelector();\n }\n function consumeComplexSelector() {\n const result2 = { simples: [] };\n skipWhitespace();\n if (isClauseCombinator()) {\n result2.simples.push({ selector: { functions: [{ name: \"scope\", args: [] }] }, combinator: \"\" });\n } else {\n result2.simples.push({ selector: consumeSimpleSelector(), combinator: \"\" });\n }\n while (true) {\n skipWhitespace();\n if (isClauseCombinator()) {\n result2.simples[result2.simples.length - 1].combinator = tokens[pos++].value;\n skipWhitespace();\n } else if (isSelectorClauseEnd()) {\n break;\n }\n result2.simples.push({ combinator: \"\", selector: consumeSimpleSelector() });\n }\n return result2;\n }\n function consumeSimpleSelector() {\n let rawCSSString = \"\";\n const functions = [];\n while (!isSelectorClauseEnd()) {\n if (isIdent() || isStar()) {\n rawCSSString += tokens[pos++].toSource();\n } else if (tokens[pos] instanceof HashToken) {\n rawCSSString += tokens[pos++].toSource();\n } else if (tokens[pos] instanceof DelimToken && tokens[pos].value === \".\") {\n pos++;\n if (isIdent())\n rawCSSString += \".\" + tokens[pos++].toSource();\n else\n throw unexpected();\n } else if (tokens[pos] instanceof ColonToken) {\n pos++;\n if (isIdent()) {\n if (!customNames.has(tokens[pos].value.toLowerCase())) {\n rawCSSString += \":\" + tokens[pos++].toSource();\n } else {\n const name = tokens[pos++].value.toLowerCase();\n functions.push({ name, args: [] });\n names.add(name);\n }\n } else if (isFunction()) {\n const name = tokens[pos++].value.toLowerCase();\n if (!customNames.has(name)) {\n rawCSSString += `:${name}(${consumeBuiltinFunctionArguments()})`;\n } else {\n functions.push({ name, args: consumeFunctionArguments() });\n names.add(name);\n }\n skipWhitespace();\n if (!isCloseParen())\n throw unexpected();\n pos++;\n } else {\n throw unexpected();\n }\n } else if (tokens[pos] instanceof OpenSquareToken) {\n rawCSSString += \"[\";\n pos++;\n while (!(tokens[pos] instanceof CloseSquareToken) && !isEOF())\n rawCSSString += tokens[pos++].toSource();\n if (!(tokens[pos] instanceof CloseSquareToken))\n throw unexpected();\n rawCSSString += \"]\";\n pos++;\n } else {\n throw unexpected();\n }\n }\n if (!rawCSSString && !functions.length)\n throw unexpected();\n return { css: rawCSSString || void 0, functions };\n }\n function consumeBuiltinFunctionArguments() {\n let s = \"\";\n let balance = 1;\n while (!isEOF()) {\n if (isOpenParen() || isFunction())\n balance++;\n if (isCloseParen())\n balance--;\n if (!balance)\n break;\n s += tokens[pos++].toSource();\n }\n return s;\n }\n const result = consumeFunctionArguments();\n if (!isEOF())\n throw unexpected();\n if (result.some((arg) => typeof arg !== \"object\" || !(\"simples\" in arg)))\n throw new InvalidSelectorError(`Error while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n return { selector: result, names: Array.from(names) };\n}\n\n// packages/playwright-core/src/utils/isomorphic/selectorParser.ts\nvar kNestedSelectorNames = /* @__PURE__ */ new Set([\"internal:has\", \"internal:has-not\", \"internal:and\", \"internal:or\", \"internal:chain\", \"left-of\", \"right-of\", \"above\", \"below\", \"near\"]);\nvar kNestedSelectorNamesWithDistance = /* @__PURE__ */ new Set([\"left-of\", \"right-of\", \"above\", \"below\", \"near\"]);\nvar customCSSNames = /* @__PURE__ */ 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\"]);\nfunction parseSelector(selector) {\n const parsedStrings = parseSelectorString(selector);\n const parts = [];\n for (const part of parsedStrings.parts) {\n if (part.name === \"css\" || part.name === \"css:light\") {\n if (part.name === \"css:light\")\n part.body = \":light(\" + part.body + \")\";\n const parsedCSS = parseCSS(part.body, customCSSNames);\n parts.push({\n name: \"css\",\n body: parsedCSS.selector,\n source: part.body\n });\n continue;\n }\n if (kNestedSelectorNames.has(part.name)) {\n let innerSelector;\n let distance;\n try {\n const unescaped = JSON.parse(\"[\" + part.body + \"]\");\n if (!Array.isArray(unescaped) || unescaped.length < 1 || unescaped.length > 2 || typeof unescaped[0] !== \"string\")\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n innerSelector = unescaped[0];\n if (unescaped.length === 2) {\n if (typeof unescaped[1] !== \"number\" || !kNestedSelectorNamesWithDistance.has(part.name))\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n distance = unescaped[1];\n }\n } catch (e) {\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n }\n const nested = { name: part.name, source: part.body, body: { parsed: parseSelector(innerSelector), distance } };\n const lastFrame = [...nested.body.parsed.parts].reverse().find((part2) => part2.name === \"internal:control\" && part2.body === \"enter-frame\");\n const lastFrameIndex = lastFrame ? nested.body.parsed.parts.indexOf(lastFrame) : -1;\n if (lastFrameIndex !== -1 && selectorPartsEqual(nested.body.parsed.parts.slice(0, lastFrameIndex + 1), parts.slice(0, lastFrameIndex + 1)))\n nested.body.parsed.parts.splice(0, lastFrameIndex + 1);\n parts.push(nested);\n continue;\n }\n parts.push({ ...part, source: part.body });\n }\n if (kNestedSelectorNames.has(parts[0].name))\n throw new InvalidSelectorError(`\"${parts[0].name}\" selector cannot be first`);\n return {\n capture: parsedStrings.capture,\n parts\n };\n}\nfunction selectorPartsEqual(list1, list2) {\n return stringifySelector({ parts: list1 }) === stringifySelector({ parts: list2 });\n}\nfunction stringifySelector(selector, forceEngineName) {\n if (typeof selector === \"string\")\n return selector;\n return selector.parts.map((p, i) => {\n let includeEngine = true;\n if (!forceEngineName && i !== selector.capture) {\n if (p.name === \"css\")\n includeEngine = false;\n else if (p.name === \"xpath\" && p.source.startsWith(\"//\") || p.source.startsWith(\"..\"))\n includeEngine = false;\n }\n const prefix = includeEngine ? p.name + \"=\" : \"\";\n return `${i === selector.capture ? \"*\" : \"\"}${prefix}${p.source}`;\n }).join(\" >> \");\n}\nfunction parseSelectorString(selector) {\n let index = 0;\n let quote;\n let start = 0;\n const result = { parts: [] };\n const append = () => {\n const part = selector.substring(start, index).trim();\n const eqIndex = part.indexOf(\"=\");\n let name;\n let body;\n if (eqIndex !== -1 && part.substring(0, eqIndex).trim().match(/^[a-zA-Z_0-9-+:*]+$/)) {\n name = part.substring(0, eqIndex).trim();\n body = part.substring(eqIndex + 1);\n } else if (part.length > 1 && part[0] === '\"' && part[part.length - 1] === '\"') {\n name = \"text\";\n body = part;\n } else if (part.length > 1 && part[0] === \"'\" && part[part.length - 1] === \"'\") {\n name = \"text\";\n body = part;\n } else if (/^\\(*\\/\\//.test(part) || part.startsWith(\"..\")) {\n name = \"xpath\";\n body = part;\n } else {\n name = \"css\";\n body = part;\n }\n let capture = false;\n if (name[0] === \"*\") {\n capture = true;\n name = name.substring(1);\n }\n result.parts.push({ name, body });\n if (capture) {\n if (result.capture !== void 0)\n throw new InvalidSelectorError(`Only one of the selectors can capture using * modifier`);\n result.capture = result.parts.length - 1;\n }\n };\n if (!selector.includes(\">>\")) {\n index = selector.length;\n append();\n return result;\n }\n const shouldIgnoreTextSelectorQuote = () => {\n const prefix = selector.substring(start, index);\n const match = prefix.match(/^\\s*text\\s*=(.*)$/);\n return !!match && !!match[1];\n };\n while (index < selector.length) {\n const c = selector[index];\n if (c === \"\\\\\" && index + 1 < selector.length) {\n index += 2;\n } else if (c === quote) {\n quote = void 0;\n index++;\n } else if (!quote && (c === '\"' || c === \"'\" || c === \"`\") && !shouldIgnoreTextSelectorQuote()) {\n quote = c;\n index++;\n } else if (!quote && c === \">\" && selector[index + 1] === \">\") {\n append();\n index += 2;\n start = index;\n } else {\n index++;\n }\n }\n append();\n return result;\n}\nfunction parseAttributeSelector(selector, allowUnquotedStrings) {\n let wp = 0;\n let EOL = selector.length === 0;\n const next = () => selector[wp] || \"\";\n const eat1 = () => {\n const result2 = next();\n ++wp;\n EOL = wp >= selector.length;\n return result2;\n };\n const syntaxError = (stage) => {\n if (EOL)\n throw new InvalidSelectorError(`Unexpected end of selector while parsing selector \\`${selector}\\``);\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - unexpected symbol \"${next()}\" at position ${wp}` + (stage ? \" during \" + stage : \"\"));\n };\n function skipSpaces() {\n while (!EOL && /\\s/.test(next()))\n eat1();\n }\n function isCSSNameChar(char) {\n return char >= \"\\x80\" || char >= \"0\" && char <= \"9\" || char >= \"A\" && char <= \"Z\" || char >= \"a\" && char <= \"z\" || char >= \"0\" && char <= \"9\" || char === \"_\" || char === \"-\";\n }\n function readIdentifier() {\n let result2 = \"\";\n skipSpaces();\n while (!EOL && isCSSNameChar(next()))\n result2 += eat1();\n return result2;\n }\n function readQuotedString(quote) {\n let result2 = eat1();\n if (result2 !== quote)\n syntaxError(\"parsing quoted string\");\n while (!EOL && next() !== quote) {\n if (next() === \"\\\\\")\n eat1();\n result2 += eat1();\n }\n if (next() !== quote)\n syntaxError(\"parsing quoted string\");\n result2 += eat1();\n return result2;\n }\n function readRegularExpression() {\n if (eat1() !== \"/\")\n syntaxError(\"parsing regular expression\");\n let source = \"\";\n let inClass = false;\n while (!EOL) {\n if (next() === \"\\\\\") {\n source += eat1();\n if (EOL)\n syntaxError(\"parsing regular expression\");\n } else if (inClass && next() === \"]\") {\n inClass = false;\n } else if (!inClass && next() === \"[\") {\n inClass = true;\n } else if (!inClass && next() === \"/\") {\n break;\n }\n source += eat1();\n }\n if (eat1() !== \"/\")\n syntaxError(\"parsing regular expression\");\n let flags = \"\";\n while (!EOL && next().match(/[dgimsuy]/))\n flags += eat1();\n try {\n return new RegExp(source, flags);\n } catch (e) {\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\`: ${e.message}`);\n }\n }\n function readAttributeToken() {\n let token = \"\";\n skipSpaces();\n if (next() === `'` || next() === `\"`)\n token = readQuotedString(next()).slice(1, -1);\n else\n token = readIdentifier();\n if (!token)\n syntaxError(\"parsing property path\");\n return token;\n }\n function readOperator() {\n skipSpaces();\n let op = \"\";\n if (!EOL)\n op += eat1();\n if (!EOL && op !== \"=\")\n op += eat1();\n if (![\"=\", \"*=\", \"^=\", \"$=\", \"|=\", \"~=\"].includes(op))\n syntaxError(\"parsing operator\");\n return op;\n }\n function readAttribute() {\n eat1();\n const jsonPath = [];\n jsonPath.push(readAttributeToken());\n skipSpaces();\n while (next() === \".\") {\n eat1();\n jsonPath.push(readAttributeToken());\n skipSpaces();\n }\n if (next() === \"]\") {\n eat1();\n return { name: jsonPath.join(\".\"), jsonPath, op: \"\", value: null, caseSensitive: false };\n }\n const operator = readOperator();\n let value = void 0;\n let caseSensitive = true;\n skipSpaces();\n if (next() === \"/\") {\n if (operator !== \"=\")\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - cannot use ${operator} in attribute with regular expression`);\n value = readRegularExpression();\n } else if (next() === `'` || next() === `\"`) {\n value = readQuotedString(next()).slice(1, -1);\n skipSpaces();\n if (next() === \"i\" || next() === \"I\") {\n caseSensitive = false;\n eat1();\n } else if (next() === \"s\" || next() === \"S\") {\n caseSensitive = true;\n eat1();\n }\n } else {\n value = \"\";\n while (!EOL && (isCSSNameChar(next()) || next() === \"+\" || next() === \".\"))\n value += eat1();\n if (value === \"true\") {\n value = true;\n } else if (value === \"false\") {\n value = false;\n } else {\n if (!allowUnquotedStrings) {\n value = +value;\n if (Number.isNaN(value))\n syntaxError(\"parsing attribute value\");\n }\n }\n }\n skipSpaces();\n if (next() !== \"]\")\n syntaxError(\"parsing attribute value\");\n eat1();\n if (operator !== \"=\" && typeof value !== \"string\")\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - cannot use ${operator} in attribute with non-string matching value - ${value}`);\n return { name: jsonPath.join(\".\"), jsonPath, op: operator, value, caseSensitive };\n }\n const result = {\n name: \"\",\n attributes: []\n };\n result.name = readIdentifier();\n skipSpaces();\n while (next() === \"[\") {\n result.attributes.push(readAttribute());\n skipSpaces();\n }\n if (!EOL)\n syntaxError(void 0);\n if (!result.name && !result.attributes.length)\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - selector cannot be empty`);\n return result;\n}\n\n// packages/playwright-core/src/utils/isomorphic/stringUtils.ts\nfunction escapeWithQuotes(text, char = \"'\") {\n const stringified = JSON.stringify(text);\n const escapedText = stringified.substring(1, stringified.length - 1).replace(/\\\\\"/g, '\"');\n if (char === \"'\")\n return char + escapedText.replace(/[']/g, \"\\\\'\") + char;\n if (char === '\"')\n return char + escapedText.replace(/[\"]/g, '\\\\\"') + char;\n if (char === \"`\")\n return char + escapedText.replace(/[`]/g, \"`\") + char;\n throw new Error(\"Invalid escape char\");\n}\nfunction toTitleCase(name) {\n return name.charAt(0).toUpperCase() + name.substring(1);\n}\nfunction toSnakeCase(name) {\n return name.replace(/([a-z0-9])([A-Z])/g, \"$1_$2\").replace(/([A-Z])([A-Z][a-z])/g, \"$1_$2\").toLowerCase();\n}\nfunction normalizeEscapedRegexQuotes(source) {\n return source.replace(/(^|[^\\\\])(\\\\\\\\)*\\\\(['\"`])/g, \"$1$2$3\");\n}\nfunction escapeRegexForSelector(re) {\n if (re.unicode || re.unicodeSets)\n return String(re);\n return String(re).replace(/(^|[^\\\\])(\\\\\\\\)*([\"'`])/g, \"$1$2\\\\$3\").replace(/>>/g, \"\\\\>\\\\>\");\n}\nfunction escapeForTextSelector(text, exact) {\n if (typeof text !== \"string\")\n return escapeRegexForSelector(text);\n return `${JSON.stringify(text)}${exact ? \"s\" : \"i\"}`;\n}\nfunction escapeForAttributeSelector(value, exact) {\n if (typeof value !== \"string\")\n return escapeRegexForSelector(value);\n return `\"${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/[\"]/g, '\\\\\"')}\"${exact ? \"s\" : \"i\"}`;\n}\n\n// packages/playwright-core/src/utils/isomorphic/locatorGenerators.ts\nfunction asLocator(lang, selector, isFrameLocator = false) {\n return asLocators(lang, selector, isFrameLocator, 1)[0];\n}\nfunction asLocators(lang, selector, isFrameLocator = false, maxOutputSize = 20, preferredQuote) {\n try {\n return innerAsLocators(new generators[lang](preferredQuote), parseSelector(selector), isFrameLocator, maxOutputSize);\n } catch (e) {\n return [selector];\n }\n}\nfunction innerAsLocators(factory, parsed, isFrameLocator = false, maxOutputSize = 20) {\n const parts = [...parsed.parts];\n const tokens = [];\n let nextBase = isFrameLocator ? \"frame-locator\" : \"page\";\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const base = nextBase;\n nextBase = \"locator\";\n if (part.name === \"nth\") {\n if (part.body === \"0\")\n tokens.push([factory.generateLocator(base, \"first\", \"\"), factory.generateLocator(base, \"nth\", \"0\")]);\n else if (part.body === \"-1\")\n tokens.push([factory.generateLocator(base, \"last\", \"\"), factory.generateLocator(base, \"nth\", \"-1\")]);\n else\n tokens.push([factory.generateLocator(base, \"nth\", part.body)]);\n continue;\n }\n if (part.name === \"visible\") {\n tokens.push([factory.generateLocator(base, \"visible\", part.body), factory.generateLocator(base, \"default\", `visible=${part.body}`)]);\n continue;\n }\n if (part.name === \"internal:text\") {\n const { exact, text } = detectExact(part.body);\n tokens.push([factory.generateLocator(base, \"text\", text, { exact })]);\n continue;\n }\n if (part.name === \"internal:has-text\") {\n const { exact, text } = detectExact(part.body);\n if (!exact) {\n tokens.push([factory.generateLocator(base, \"has-text\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:has-not-text\") {\n const { exact, text } = detectExact(part.body);\n if (!exact) {\n tokens.push([factory.generateLocator(base, \"has-not-text\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:has\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"has\", inner)));\n continue;\n }\n if (part.name === \"internal:has-not\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"hasNot\", inner)));\n continue;\n }\n if (part.name === \"internal:and\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"and\", inner)));\n continue;\n }\n if (part.name === \"internal:or\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"or\", inner)));\n continue;\n }\n if (part.name === \"internal:chain\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"chain\", inner)));\n continue;\n }\n if (part.name === \"internal:label\") {\n const { exact, text } = detectExact(part.body);\n tokens.push([factory.generateLocator(base, \"label\", text, { exact })]);\n continue;\n }\n if (part.name === \"internal:role\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const options = { attrs: [] };\n for (const attr of attrSelector.attributes) {\n if (attr.name === \"name\") {\n options.exact = attr.caseSensitive;\n options.name = attr.value;\n } else {\n if (attr.name === \"level\" && typeof attr.value === \"string\")\n attr.value = +attr.value;\n options.attrs.push({ name: attr.name === \"include-hidden\" ? \"includeHidden\" : attr.name, value: attr.value });\n }\n }\n tokens.push([factory.generateLocator(base, \"role\", attrSelector.name, options)]);\n continue;\n }\n if (part.name === \"internal:testid\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const { value } = attrSelector.attributes[0];\n tokens.push([factory.generateLocator(base, \"test-id\", value)]);\n continue;\n }\n if (part.name === \"internal:attr\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const { name, value, caseSensitive } = attrSelector.attributes[0];\n const text = value;\n const exact = !!caseSensitive;\n if (name === \"placeholder\") {\n tokens.push([factory.generateLocator(base, \"placeholder\", text, { exact })]);\n continue;\n }\n if (name === \"alt\") {\n tokens.push([factory.generateLocator(base, \"alt\", text, { exact })]);\n continue;\n }\n if (name === \"title\") {\n tokens.push([factory.generateLocator(base, \"title\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:control\" && part.body === \"enter-frame\") {\n const lastTokens = tokens[tokens.length - 1];\n const lastPart = parts[index - 1];\n const transformed = lastTokens.map((token) => factory.chainLocators([token, factory.generateLocator(base, \"frame\", \"\")]));\n if ([\"xpath\", \"css\"].includes(lastPart.name)) {\n transformed.push(\n factory.generateLocator(base, \"frame-locator\", stringifySelector({ parts: [lastPart] })),\n factory.generateLocator(base, \"frame-locator\", stringifySelector({ parts: [lastPart] }, true))\n );\n }\n lastTokens.splice(0, lastTokens.length, ...transformed);\n nextBase = \"frame-locator\";\n continue;\n }\n const nextPart = parts[index + 1];\n const selectorPart = stringifySelector({ parts: [part] });\n const locatorPart = factory.generateLocator(base, \"default\", selectorPart);\n if (nextPart && [\"internal:has-text\", \"internal:has-not-text\"].includes(nextPart.name)) {\n const { exact, text } = detectExact(nextPart.body);\n if (!exact) {\n const nextLocatorPart = factory.generateLocator(\"locator\", nextPart.name === \"internal:has-text\" ? \"has-text\" : \"has-not-text\", text, { exact });\n const options = {};\n if (nextPart.name === \"internal:has-text\")\n options.hasText = text;\n else\n options.hasNotText = text;\n const combinedPart = factory.generateLocator(base, \"default\", selectorPart, options);\n tokens.push([factory.chainLocators([locatorPart, nextLocatorPart]), combinedPart]);\n index++;\n continue;\n }\n }\n let locatorPartWithEngine;\n if ([\"xpath\", \"css\"].includes(part.name)) {\n const selectorPart2 = stringifySelector(\n { parts: [part] },\n /* forceEngineName */\n true\n );\n locatorPartWithEngine = factory.generateLocator(base, \"default\", selectorPart2);\n }\n tokens.push([locatorPart, locatorPartWithEngine].filter(Boolean));\n }\n return combineTokens(factory, tokens, maxOutputSize);\n}\nfunction combineTokens(factory, tokens, maxOutputSize) {\n const currentTokens = tokens.map(() => \"\");\n const result = [];\n const visit = (index) => {\n if (index === tokens.length) {\n result.push(factory.chainLocators(currentTokens));\n return result.length < maxOutputSize;\n }\n for (const taken of tokens[index]) {\n currentTokens[index] = taken;\n if (!visit(index + 1))\n return false;\n }\n return true;\n };\n visit(0);\n return result;\n}\nfunction detectExact(text) {\n let exact = false;\n const match = text.match(/^\\/(.*)\\/([igm]*)$/);\n if (match)\n return { text: new RegExp(match[1], match[2]) };\n if (text.endsWith('\"')) {\n text = JSON.parse(text);\n exact = true;\n } else if (text.endsWith('\"s')) {\n text = JSON.parse(text.substring(0, text.length - 1));\n exact = true;\n } else if (text.endsWith('\"i')) {\n text = JSON.parse(text.substring(0, text.length - 1));\n exact = false;\n }\n return { exact, text };\n}\nvar JavaScriptLocatorFactory = class {\n constructor(preferredQuote) {\n this.preferredQuote = preferredQuote;\n }\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, { hasText: ${this.toHasText(options.hasText)} })`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, { hasNotText: ${this.toHasText(options.hasNotText)} })`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frameLocator(${this.quote(body)})`;\n case \"frame\":\n return `contentFrame()`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first()`;\n case \"last\":\n return `last()`;\n case \"visible\":\n return `filter({ visible: ${body === \"true\" ? \"true\" : \"false\"} })`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`name: ${this.regexToSourceString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`name: ${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`exact: true`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`${name}: ${typeof value === \"string\" ? this.quote(value) : value}`);\n const attrString = attrs.length ? `, { ${attrs.join(\", \")} }` : \"\";\n return `getByRole(${this.quote(body)}${attrString})`;\n case \"has-text\":\n return `filter({ hasText: ${this.toHasText(body)} })`;\n case \"has-not-text\":\n return `filter({ hasNotText: ${this.toHasText(body)} })`;\n case \"has\":\n return `filter({ has: ${body} })`;\n case \"hasNot\":\n return `filter({ hasNot: ${body} })`;\n case \"and\":\n return `and(${body})`;\n case \"or\":\n return `or(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `getByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"getByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"getByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"getByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"getByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"getByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToSourceString(re) {\n return normalizeEscapedRegexQuotes(String(re));\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToSourceString(body)})`;\n return exact ? `${method}(${this.quote(body)}, { exact: true })` : `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToSourceString(body);\n return this.quote(body);\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToSourceString(value);\n return this.quote(value);\n }\n quote(text) {\n var _a;\n return escapeWithQuotes(text, (_a = this.preferredQuote) != null ? _a : \"'\");\n }\n};\nvar PythonLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, has_text=${this.toHasText(options.hasText)})`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, has_not_text=${this.toHasText(options.hasNotText)})`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frame_locator(${this.quote(body)})`;\n case \"frame\":\n return `content_frame`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first`;\n case \"last\":\n return `last`;\n case \"visible\":\n return `filter(visible=${body === \"true\" ? \"True\" : \"False\"})`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`name=${this.regexToString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`name=${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`exact=True`);\n }\n for (const { name, value } of options.attrs) {\n let valueString = typeof value === \"string\" ? this.quote(value) : value;\n if (typeof value === \"boolean\")\n valueString = value ? \"True\" : \"False\";\n attrs.push(`${toSnakeCase(name)}=${valueString}`);\n }\n const attrString = attrs.length ? `, ${attrs.join(\", \")}` : \"\";\n return `get_by_role(${this.quote(body)}${attrString})`;\n case \"has-text\":\n return `filter(has_text=${this.toHasText(body)})`;\n case \"has-not-text\":\n return `filter(has_not_text=${this.toHasText(body)})`;\n case \"has\":\n return `filter(has=${body})`;\n case \"hasNot\":\n return `filter(has_not=${body})`;\n case \"and\":\n return `and_(${body})`;\n case \"or\":\n return `or_(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `get_by_test_id(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"get_by_text\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"get_by_alt_text\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"get_by_placeholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"get_by_label\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"get_by_title\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", re.IGNORECASE\" : \"\";\n return `re.compile(r\"${normalizeEscapedRegexQuotes(body.source).replace(/\\\\\\//, \"/\").replace(/\"/g, '\\\\\"')}\"${suffix})`;\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, exact=True)`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToString(body);\n return `${this.quote(body)}`;\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar JavaLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n let clazz;\n switch (base) {\n case \"page\":\n clazz = \"Page\";\n break;\n case \"frame-locator\":\n clazz = \"FrameLocator\";\n break;\n case \"locator\":\n clazz = \"Locator\";\n break;\n }\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, new ${clazz}.LocatorOptions().setHasText(${this.toHasText(options.hasText)}))`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, new ${clazz}.LocatorOptions().setHasNotText(${this.toHasText(options.hasNotText)}))`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frameLocator(${this.quote(body)})`;\n case \"frame\":\n return `contentFrame()`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first()`;\n case \"last\":\n return `last()`;\n case \"visible\":\n return `filter(new ${clazz}.FilterOptions().setVisible(${body === \"true\" ? \"true\" : \"false\"}))`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`.setName(${this.regexToString(options.name)})`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`.setName(${this.quote(options.name)})`);\n if (options.exact)\n attrs.push(`.setExact(true)`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`.set${toTitleCase(name)}(${typeof value === \"string\" ? this.quote(value) : value})`);\n const attrString = attrs.length ? `, new ${clazz}.GetByRoleOptions()${attrs.join(\"\")}` : \"\";\n return `getByRole(AriaRole.${toSnakeCase(body).toUpperCase()}${attrString})`;\n case \"has-text\":\n return `filter(new ${clazz}.FilterOptions().setHasText(${this.toHasText(body)}))`;\n case \"has-not-text\":\n return `filter(new ${clazz}.FilterOptions().setHasNotText(${this.toHasText(body)}))`;\n case \"has\":\n return `filter(new ${clazz}.FilterOptions().setHas(${body}))`;\n case \"hasNot\":\n return `filter(new ${clazz}.FilterOptions().setHasNot(${body}))`;\n case \"and\":\n return `and(${body})`;\n case \"or\":\n return `or(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `getByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(clazz, \"getByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(clazz, \"getByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(clazz, \"getByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(clazz, \"getByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(clazz, \"getByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", Pattern.CASE_INSENSITIVE\" : \"\";\n return `Pattern.compile(${this.quote(normalizeEscapedRegexQuotes(body.source))}${suffix})`;\n }\n toCallWithExact(clazz, method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, new ${clazz}.${toTitleCase(method)}Options().setExact(true))`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToString(body);\n return this.quote(body);\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar CSharpLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `Locator(${this.quote(body)}, new() { ${this.toHasText(options.hasText)} })`;\n if (options.hasNotText !== void 0)\n return `Locator(${this.quote(body)}, new() { ${this.toHasNotText(options.hasNotText)} })`;\n return `Locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `FrameLocator(${this.quote(body)})`;\n case \"frame\":\n return `ContentFrame`;\n case \"nth\":\n return `Nth(${body})`;\n case \"first\":\n return `First`;\n case \"last\":\n return `Last`;\n case \"visible\":\n return `Filter(new() { Visible = ${body === \"true\" ? \"true\" : \"false\"} })`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`NameRegex = ${this.regexToString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`Name = ${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`Exact = true`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`${toTitleCase(name)} = ${typeof value === \"string\" ? this.quote(value) : value}`);\n const attrString = attrs.length ? `, new() { ${attrs.join(\", \")} }` : \"\";\n return `GetByRole(AriaRole.${toTitleCase(body)}${attrString})`;\n case \"has-text\":\n return `Filter(new() { ${this.toHasText(body)} })`;\n case \"has-not-text\":\n return `Filter(new() { ${this.toHasNotText(body)} })`;\n case \"has\":\n return `Filter(new() { Has = ${body} })`;\n case \"hasNot\":\n return `Filter(new() { HasNot = ${body} })`;\n case \"and\":\n return `And(${body})`;\n case \"or\":\n return `Or(${body})`;\n case \"chain\":\n return `Locator(${body})`;\n case \"test-id\":\n return `GetByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"GetByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"GetByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"GetByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"GetByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"GetByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", RegexOptions.IgnoreCase\" : \"\";\n return `new Regex(${this.quote(normalizeEscapedRegexQuotes(body.source))}${suffix})`;\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, new() { Exact = true })`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return `HasTextRegex = ${this.regexToString(body)}`;\n return `HasText = ${this.quote(body)}`;\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n toHasNotText(body) {\n if (isRegExp(body))\n return `HasNotTextRegex = ${this.regexToString(body)}`;\n return `HasNotText = ${this.quote(body)}`;\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar JsonlLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n return JSON.stringify({\n kind,\n body,\n options\n });\n }\n chainLocators(locators) {\n const objects = locators.map((l) => JSON.parse(l));\n for (let i = 0; i < objects.length - 1; ++i)\n objects[i].next = objects[i + 1];\n return JSON.stringify(objects[0]);\n }\n};\nvar generators = {\n javascript: JavaScriptLocatorFactory,\n python: PythonLocatorFactory,\n java: JavaLocatorFactory,\n csharp: CSharpLocatorFactory,\n jsonl: JsonlLocatorFactory\n};\nfunction isRegExp(obj) {\n return obj instanceof RegExp;\n}\n\n// packages/playwright-core/src/utils/isomorphic/locatorUtils.ts\nfunction getByAttributeTextSelector(attrName, text, options) {\n return `internal:attr=[${attrName}=${escapeForAttributeSelector(text, (options == null ? void 0 : options.exact) || false)}]`;\n}\nfunction getByTestIdSelector(testIdAttributeName, testId) {\n return `internal:testid=[${testIdAttributeName}=${escapeForAttributeSelector(testId, true)}]`;\n}\nfunction getByLabelSelector(text, options) {\n return \"internal:label=\" + escapeForTextSelector(text, !!(options == null ? void 0 : options.exact));\n}\nfunction getByAltTextSelector(text, options) {\n return getByAttributeTextSelector(\"alt\", text, options);\n}\nfunction getByTitleSelector(text, options) {\n return getByAttributeTextSelector(\"title\", text, options);\n}\nfunction getByPlaceholderSelector(text, options) {\n return getByAttributeTextSelector(\"placeholder\", text, options);\n}\nfunction getByTextSelector(text, options) {\n return \"internal:text=\" + escapeForTextSelector(text, !!(options == null ? void 0 : options.exact));\n}\nfunction getByRoleSelector(role, options = {}) {\n const props = [];\n if (options.checked !== void 0)\n props.push([\"checked\", String(options.checked)]);\n if (options.disabled !== void 0)\n props.push([\"disabled\", String(options.disabled)]);\n if (options.selected !== void 0)\n props.push([\"selected\", String(options.selected)]);\n if (options.expanded !== void 0)\n props.push([\"expanded\", String(options.expanded)]);\n if (options.includeHidden !== void 0)\n props.push([\"include-hidden\", String(options.includeHidden)]);\n if (options.level !== void 0)\n props.push([\"level\", String(options.level)]);\n if (options.name !== void 0)\n props.push([\"name\", escapeForAttributeSelector(options.name, !!options.exact)]);\n if (options.pressed !== void 0)\n props.push([\"pressed\", String(options.pressed)]);\n return `internal:role=${role}${props.map(([n, v]) => `[${n}=${v}]`).join(\"\")}`;\n}\n\n// packages/playwright-core/src/server/injected/consoleApi.ts\nvar selectorSymbol = Symbol(\"selector\");\nselectorSymbol;\nvar _Locator = class _Locator {\n constructor(injectedScript, selector, options) {\n if (options == null ? void 0 : options.hasText)\n selector += ` >> internal:has-text=${escapeForTextSelector(options.hasText, false)}`;\n if (options == null ? void 0 : options.hasNotText)\n selector += ` >> internal:has-not-text=${escapeForTextSelector(options.hasNotText, false)}`;\n if (options == null ? void 0 : options.has)\n selector += ` >> internal:has=` + JSON.stringify(options.has[selectorSymbol]);\n if (options == null ? void 0 : options.hasNot)\n selector += ` >> internal:has-not=` + JSON.stringify(options.hasNot[selectorSymbol]);\n if ((options == null ? void 0 : options.visible) !== void 0)\n selector += ` >> visible=${options.visible ? \"true\" : \"false\"}`;\n this[selectorSymbol] = selector;\n if (selector) {\n const parsed = injectedScript.parseSelector(selector);\n this.element = injectedScript.querySelector(parsed, injectedScript.document, false);\n this.elements = injectedScript.querySelectorAll(parsed, injectedScript.document);\n }\n const selectorBase = selector;\n const self = this;\n self.locator = (selector2, options2) => {\n return new _Locator(injectedScript, selectorBase ? selectorBase + \" >> \" + selector2 : selector2, options2);\n };\n self.getByTestId = (testId) => self.locator(getByTestIdSelector(injectedScript.testIdAttributeNameForStrictErrorAndConsoleCodegen(), testId));\n self.getByAltText = (text, options2) => self.locator(getByAltTextSelector(text, options2));\n self.getByLabel = (text, options2) => self.locator(getByLabelSelector(text, options2));\n self.getByPlaceholder = (text, options2) => self.locator(getByPlaceholderSelector(text, options2));\n self.getByText = (text, options2) => self.locator(getByTextSelector(text, options2));\n self.getByTitle = (text, options2) => self.locator(getByTitleSelector(text, options2));\n self.getByRole = (role, options2 = {}) => self.locator(getByRoleSelector(role, options2));\n self.filter = (options2) => new _Locator(injectedScript, selector, options2);\n self.first = () => self.locator(\"nth=0\");\n self.last = () => self.locator(\"nth=-1\");\n self.nth = (index) => self.locator(`nth=${index}`);\n self.and = (locator) => new _Locator(injectedScript, selectorBase + ` >> internal:and=` + JSON.stringify(locator[selectorSymbol]));\n self.or = (locator) => new _Locator(injectedScript, selectorBase + ` >> internal:or=` + JSON.stringify(locator[selectorSymbol]));\n }\n};\nvar Locator = _Locator;\nvar ConsoleAPI = class {\n constructor(injectedScript) {\n this._injectedScript = injectedScript;\n if (this._injectedScript.window.playwright)\n return;\n this._injectedScript.window.playwright = {\n $: (selector, strict) => this._querySelector(selector, !!strict),\n $$: (selector) => this._querySelectorAll(selector),\n inspect: (selector) => this._inspect(selector),\n selector: (element) => this._selector(element),\n generateLocator: (element, language) => this._generateLocator(element, language),\n ariaSnapshot: (element, options) => {\n return this._injectedScript.ariaSnapshot(element || this._injectedScript.document.body, options);\n },\n resume: () => this._resume(),\n ...new Locator(injectedScript, \"\")\n };\n delete this._injectedScript.window.playwright.filter;\n delete this._injectedScript.window.playwright.first;\n delete this._injectedScript.window.playwright.last;\n delete this._injectedScript.window.playwright.nth;\n delete this._injectedScript.window.playwright.and;\n delete this._injectedScript.window.playwright.or;\n }\n _querySelector(selector, strict) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.query('Playwright >> selector').`);\n const parsed = this._injectedScript.parseSelector(selector);\n return this._injectedScript.querySelector(parsed, this._injectedScript.document, strict);\n }\n _querySelectorAll(selector) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.$$('Playwright >> selector').`);\n const parsed = this._injectedScript.parseSelector(selector);\n return this._injectedScript.querySelectorAll(parsed, this._injectedScript.document);\n }\n _inspect(selector) {\n if (typeof selector !== \"string\")\n throw new Error(`Usage: playwright.inspect('Playwright >> selector').`);\n this._injectedScript.window.inspect(this._querySelector(selector, false));\n }\n _selector(element) {\n if (!(element instanceof Element))\n throw new Error(`Usage: playwright.selector(element).`);\n return this._injectedScript.generateSelectorSimple(element);\n }\n _generateLocator(element, language) {\n if (!(element instanceof Element))\n throw new Error(`Usage: playwright.locator(element).`);\n const selector = this._injectedScript.generateSelectorSimple(element);\n return asLocator(language || \"javascript\", selector);\n }\n _resume() {\n this._injectedScript.window.__pw_resume().catch(() => {\n });\n }\n};\nvar consoleApi_default = ConsoleAPI;\n"; \ No newline at end of file diff --git a/tvapp2/node_modules/playwright-core/lib/generated/injectedScriptSource.js b/tvapp2/node_modules/playwright-core/lib/generated/injectedScriptSource.js index 0b7515f4..ac591f07 100755 --- a/tvapp2/node_modules/playwright-core/lib/generated/injectedScriptSource.js +++ b/tvapp2/node_modules/playwright-core/lib/generated/injectedScriptSource.js @@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.source = void 0; -const source = exports.source = "\nvar __commonJS = obj => {\n let required = false;\n let result;\n return function __require() {\n if (!required) {\n required = true;\n let fn;\n for (const name in obj) { fn = obj[name]; break; }\n const module = { exports: {} };\n fn(module.exports, module);\n result = module.exports;\n }\n return result;\n }\n};\nvar __export = (target, all) => {for (var name in all) target[name] = all[name];};\nvar __toESM = mod => ({ ...mod, 'default': mod });\nvar __toCommonJS = mod => ({ ...mod, __esModule: true });\n\n\n// packages/playwright-core/src/server/injected/injectedScript.ts\nvar injectedScript_exports = {};\n__export(injectedScript_exports, {\n InjectedScript: () => InjectedScript\n});\nmodule.exports = __toCommonJS(injectedScript_exports);\n\n// packages/playwright-core/src/server/injected/xpathSelectorEngine.ts\nvar XPathEngine = {\n queryAll(root, selector) {\n if (selector.startsWith(\"/\") && root.nodeType !== Node.DOCUMENT_NODE)\n selector = \".\" + selector;\n const result = [];\n const document = root.ownerDocument || root;\n if (!document)\n return result;\n const it = document.evaluate(selector, root, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE);\n for (let node = it.iterateNext(); node; node = it.iterateNext()) {\n if (node.nodeType === Node.ELEMENT_NODE)\n result.push(node);\n }\n return result;\n }\n};\n\n// packages/playwright-core/src/server/injected/domUtils.ts\nvar browserNameForWorkarounds = \"\";\nfunction setBrowserName(name) {\n browserNameForWorkarounds = name;\n}\nfunction isInsideScope(scope, element) {\n while (element) {\n if (scope.contains(element))\n return true;\n element = enclosingShadowHost(element);\n }\n return false;\n}\nfunction parentElementOrShadowHost(element) {\n if (element.parentElement)\n return element.parentElement;\n if (!element.parentNode)\n return;\n if (element.parentNode.nodeType === 11 && element.parentNode.host)\n return element.parentNode.host;\n}\nfunction enclosingShadowRootOrDocument(element) {\n let node = element;\n while (node.parentNode)\n node = node.parentNode;\n if (node.nodeType === 11 || node.nodeType === 9)\n return node;\n}\nfunction enclosingShadowHost(element) {\n while (element.parentElement)\n element = element.parentElement;\n return parentElementOrShadowHost(element);\n}\nfunction closestCrossShadow(element, css, scope) {\n while (element) {\n const closest = element.closest(css);\n if (scope && closest !== scope && (closest == null ? void 0 : closest.contains(scope)))\n return;\n if (closest)\n return closest;\n element = enclosingShadowHost(element);\n }\n}\nfunction getElementComputedStyle(element, pseudo) {\n return element.ownerDocument && element.ownerDocument.defaultView ? element.ownerDocument.defaultView.getComputedStyle(element, pseudo) : void 0;\n}\nfunction isElementStyleVisibilityVisible(element, style) {\n style = style != null ? style : getElementComputedStyle(element);\n if (!style)\n return true;\n if (Element.prototype.checkVisibility && browserNameForWorkarounds !== \"webkit\") {\n if (!element.checkVisibility())\n return false;\n } else {\n const detailsOrSummary = element.closest(\"details,summary\");\n if (detailsOrSummary !== element && (detailsOrSummary == null ? void 0 : detailsOrSummary.nodeName) === \"DETAILS\" && !detailsOrSummary.open)\n return false;\n }\n if (style.visibility !== \"visible\")\n return false;\n return true;\n}\nfunction isElementVisible(element) {\n const style = getElementComputedStyle(element);\n if (!style)\n return true;\n if (style.display === \"contents\") {\n for (let child = element.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 1 && isElementVisible(child))\n return true;\n if (child.nodeType === 3 && isVisibleTextNode(child))\n return true;\n }\n return false;\n }\n if (!isElementStyleVisibilityVisible(element, style))\n return false;\n const rect = element.getBoundingClientRect();\n return rect.width > 0 && rect.height > 0;\n}\nfunction isVisibleTextNode(node) {\n const range = node.ownerDocument.createRange();\n range.selectNode(node);\n const rect = range.getBoundingClientRect();\n return rect.width > 0 && rect.height > 0;\n}\nfunction elementSafeTagName(element) {\n if (element instanceof HTMLFormElement)\n return \"FORM\";\n return element.tagName.toUpperCase();\n}\n\n// packages/playwright-core/src/utils/isomorphic/stringUtils.ts\nfunction escapeWithQuotes(text, char = \"'\") {\n const stringified = JSON.stringify(text);\n const escapedText = stringified.substring(1, stringified.length - 1).replace(/\\\\\"/g, '\"');\n if (char === \"'\")\n return char + escapedText.replace(/[']/g, \"\\\\'\") + char;\n if (char === '\"')\n return char + escapedText.replace(/[\"]/g, '\\\\\"') + char;\n if (char === \"`\")\n return char + escapedText.replace(/[`]/g, \"`\") + char;\n throw new Error(\"Invalid escape char\");\n}\nfunction toTitleCase(name) {\n return name.charAt(0).toUpperCase() + name.substring(1);\n}\nfunction toSnakeCase(name) {\n return name.replace(/([a-z0-9])([A-Z])/g, \"$1_$2\").replace(/([A-Z])([A-Z][a-z])/g, \"$1_$2\").toLowerCase();\n}\nfunction cssEscape(s) {\n let result = \"\";\n for (let i = 0; i < s.length; i++)\n result += cssEscapeOne(s, i);\n return result;\n}\nfunction quoteCSSAttributeValue(text) {\n return `\"${cssEscape(text).replace(/\\\\ /g, \" \")}\"`;\n}\nfunction cssEscapeOne(s, i) {\n const c = s.charCodeAt(i);\n if (c === 0)\n return \"\\uFFFD\";\n if (c >= 1 && c <= 31 || c >= 48 && c <= 57 && (i === 0 || i === 1 && s.charCodeAt(0) === 45))\n return \"\\\\\" + c.toString(16) + \" \";\n if (i === 0 && c === 45 && s.length === 1)\n return \"\\\\\" + s.charAt(i);\n if (c >= 128 || c === 45 || c === 95 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122)\n return s.charAt(i);\n return \"\\\\\" + s.charAt(i);\n}\nvar normalizedWhitespaceCache;\nfunction cacheNormalizedWhitespaces() {\n normalizedWhitespaceCache = /* @__PURE__ */ new Map();\n}\nfunction normalizeWhiteSpace(text) {\n let result = normalizedWhitespaceCache == null ? void 0 : normalizedWhitespaceCache.get(text);\n if (result === void 0) {\n result = text.replace(/\\u200b/g, \"\").trim().replace(/\\s+/g, \" \");\n normalizedWhitespaceCache == null ? void 0 : normalizedWhitespaceCache.set(text, result);\n }\n return result;\n}\nfunction normalizeEscapedRegexQuotes(source) {\n return source.replace(/(^|[^\\\\])(\\\\\\\\)*\\\\(['\"`])/g, \"$1$2$3\");\n}\nfunction escapeRegexForSelector(re) {\n if (re.unicode || re.unicodeSets)\n return String(re);\n return String(re).replace(/(^|[^\\\\])(\\\\\\\\)*([\"'`])/g, \"$1$2\\\\$3\").replace(/>>/g, \"\\\\>\\\\>\");\n}\nfunction escapeForTextSelector(text, exact) {\n if (typeof text !== \"string\")\n return escapeRegexForSelector(text);\n return `${JSON.stringify(text)}${exact ? \"s\" : \"i\"}`;\n}\nfunction escapeForAttributeSelector(value, exact) {\n if (typeof value !== \"string\")\n return escapeRegexForSelector(value);\n return `\"${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/[\"]/g, '\\\\\"')}\"${exact ? \"s\" : \"i\"}`;\n}\nfunction trimString(input, cap, suffix = \"\") {\n if (input.length <= cap)\n return input;\n const chars = [...input];\n if (chars.length > cap)\n return chars.slice(0, cap - suffix.length).join(\"\") + suffix;\n return chars.join(\"\");\n}\nfunction trimStringWithEllipsis(input, cap) {\n return trimString(input, cap, \"\\u2026\");\n}\nfunction escapeRegExp(s) {\n return s.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nfunction longestCommonSubstring(s1, s2) {\n const n = s1.length;\n const m = s2.length;\n let maxLen = 0;\n let endingIndex = 0;\n const dp = Array(n + 1).fill(null).map(() => Array(m + 1).fill(0));\n for (let i = 1; i <= n; i++) {\n for (let j = 1; j <= m; j++) {\n if (s1[i - 1] === s2[j - 1]) {\n dp[i][j] = dp[i - 1][j - 1] + 1;\n if (dp[i][j] > maxLen) {\n maxLen = dp[i][j];\n endingIndex = i;\n }\n }\n }\n }\n return s1.slice(endingIndex - maxLen, endingIndex);\n}\n\n// packages/playwright-core/src/server/injected/roleUtils.ts\nfunction hasExplicitAccessibleName(e) {\n return e.hasAttribute(\"aria-label\") || e.hasAttribute(\"aria-labelledby\");\n}\nvar kAncestorPreventingLandmark = \"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]\";\nvar kGlobalAriaAttributes = /* @__PURE__ */ new Map([\n [\"aria-atomic\", void 0],\n [\"aria-busy\", void 0],\n [\"aria-controls\", void 0],\n [\"aria-current\", void 0],\n [\"aria-describedby\", void 0],\n [\"aria-details\", void 0],\n // Global use deprecated in ARIA 1.2\n // ['aria-disabled', undefined],\n [\"aria-dropeffect\", void 0],\n // Global use deprecated in ARIA 1.2\n // ['aria-errormessage', undefined],\n [\"aria-flowto\", void 0],\n [\"aria-grabbed\", void 0],\n // Global use deprecated in ARIA 1.2\n // ['aria-haspopup', undefined],\n [\"aria-hidden\", void 0],\n // Global use deprecated in ARIA 1.2\n // ['aria-invalid', undefined],\n [\"aria-keyshortcuts\", void 0],\n [\"aria-label\", /* @__PURE__ */ new Set([\"caption\", \"code\", \"deletion\", \"emphasis\", \"generic\", \"insertion\", \"paragraph\", \"presentation\", \"strong\", \"subscript\", \"superscript\"])],\n [\"aria-labelledby\", /* @__PURE__ */ new Set([\"caption\", \"code\", \"deletion\", \"emphasis\", \"generic\", \"insertion\", \"paragraph\", \"presentation\", \"strong\", \"subscript\", \"superscript\"])],\n [\"aria-live\", void 0],\n [\"aria-owns\", void 0],\n [\"aria-relevant\", void 0],\n [\"aria-roledescription\", /* @__PURE__ */ new Set([\"generic\"])]\n]);\nfunction hasGlobalAriaAttribute(element, forRole) {\n return [...kGlobalAriaAttributes].some(([attr, prohibited]) => {\n return !(prohibited == null ? void 0 : prohibited.has(forRole || \"\")) && element.hasAttribute(attr);\n });\n}\nfunction hasTabIndex(element) {\n return !Number.isNaN(Number(String(element.getAttribute(\"tabindex\"))));\n}\nfunction isFocusable(element) {\n return !isNativelyDisabled(element) && (isNativelyFocusable(element) || hasTabIndex(element));\n}\nfunction isNativelyFocusable(element) {\n const tagName = elementSafeTagName(element);\n if ([\"BUTTON\", \"DETAILS\", \"SELECT\", \"TEXTAREA\"].includes(tagName))\n return true;\n if (tagName === \"A\" || tagName === \"AREA\")\n return element.hasAttribute(\"href\");\n if (tagName === \"INPUT\")\n return !element.hidden;\n return false;\n}\nvar kImplicitRoleByTagName = {\n \"A\": (e) => {\n return e.hasAttribute(\"href\") ? \"link\" : null;\n },\n \"AREA\": (e) => {\n return e.hasAttribute(\"href\") ? \"link\" : null;\n },\n \"ARTICLE\": () => \"article\",\n \"ASIDE\": () => \"complementary\",\n \"BLOCKQUOTE\": () => \"blockquote\",\n \"BUTTON\": () => \"button\",\n \"CAPTION\": () => \"caption\",\n \"CODE\": () => \"code\",\n \"DATALIST\": () => \"listbox\",\n \"DD\": () => \"definition\",\n \"DEL\": () => \"deletion\",\n \"DETAILS\": () => \"group\",\n \"DFN\": () => \"term\",\n \"DIALOG\": () => \"dialog\",\n \"DT\": () => \"term\",\n \"EM\": () => \"emphasis\",\n \"FIELDSET\": () => \"group\",\n \"FIGURE\": () => \"figure\",\n \"FOOTER\": (e) => closestCrossShadow(e, kAncestorPreventingLandmark) ? null : \"contentinfo\",\n \"FORM\": (e) => hasExplicitAccessibleName(e) ? \"form\" : null,\n \"H1\": () => \"heading\",\n \"H2\": () => \"heading\",\n \"H3\": () => \"heading\",\n \"H4\": () => \"heading\",\n \"H5\": () => \"heading\",\n \"H6\": () => \"heading\",\n \"HEADER\": (e) => closestCrossShadow(e, kAncestorPreventingLandmark) ? null : \"banner\",\n \"HR\": () => \"separator\",\n \"HTML\": () => \"document\",\n \"IMG\": (e) => e.getAttribute(\"alt\") === \"\" && !e.getAttribute(\"title\") && !hasGlobalAriaAttribute(e) && !hasTabIndex(e) ? \"presentation\" : \"img\",\n \"INPUT\": (e) => {\n const type = e.type.toLowerCase();\n if (type === \"search\")\n return e.hasAttribute(\"list\") ? \"combobox\" : \"searchbox\";\n if ([\"email\", \"tel\", \"text\", \"url\", \"\"].includes(type)) {\n const list = getIdRefs(e, e.getAttribute(\"list\"))[0];\n return list && elementSafeTagName(list) === \"DATALIST\" ? \"combobox\" : \"textbox\";\n }\n if (type === \"hidden\")\n return null;\n return inputTypeToRole[type] || \"textbox\";\n },\n \"INS\": () => \"insertion\",\n \"LI\": () => \"listitem\",\n \"MAIN\": () => \"main\",\n \"MARK\": () => \"mark\",\n \"MATH\": () => \"math\",\n \"MENU\": () => \"list\",\n \"METER\": () => \"meter\",\n \"NAV\": () => \"navigation\",\n \"OL\": () => \"list\",\n \"OPTGROUP\": () => \"group\",\n \"OPTION\": () => \"option\",\n \"OUTPUT\": () => \"status\",\n \"P\": () => \"paragraph\",\n \"PROGRESS\": () => \"progressbar\",\n \"SECTION\": (e) => hasExplicitAccessibleName(e) ? \"region\" : null,\n \"SELECT\": (e) => e.hasAttribute(\"multiple\") || e.size > 1 ? \"listbox\" : \"combobox\",\n \"STRONG\": () => \"strong\",\n \"SUB\": () => \"subscript\",\n \"SUP\": () => \"superscript\",\n // For we default to Chrome behavior:\n // - Chrome reports 'img'.\n // - Firefox reports 'diagram' that is not in official ARIA spec yet.\n // - Safari reports 'no role', but still computes accessible name.\n \"SVG\": () => \"img\",\n \"TABLE\": () => \"table\",\n \"TBODY\": () => \"rowgroup\",\n \"TD\": (e) => {\n const table = closestCrossShadow(e, \"table\");\n const role = table ? getExplicitAriaRole(table) : \"\";\n return role === \"grid\" || role === \"treegrid\" ? \"gridcell\" : \"cell\";\n },\n \"TEXTAREA\": () => \"textbox\",\n \"TFOOT\": () => \"rowgroup\",\n \"TH\": (e) => {\n if (e.getAttribute(\"scope\") === \"col\")\n return \"columnheader\";\n if (e.getAttribute(\"scope\") === \"row\")\n return \"rowheader\";\n const table = closestCrossShadow(e, \"table\");\n const role = table ? getExplicitAriaRole(table) : \"\";\n return role === \"grid\" || role === \"treegrid\" ? \"gridcell\" : \"cell\";\n },\n \"THEAD\": () => \"rowgroup\",\n \"TIME\": () => \"time\",\n \"TR\": () => \"row\",\n \"UL\": () => \"list\"\n};\nvar kPresentationInheritanceParents = {\n \"DD\": [\"DL\", \"DIV\"],\n \"DIV\": [\"DL\"],\n \"DT\": [\"DL\", \"DIV\"],\n \"LI\": [\"OL\", \"UL\"],\n \"TBODY\": [\"TABLE\"],\n \"TD\": [\"TR\"],\n \"TFOOT\": [\"TABLE\"],\n \"TH\": [\"TR\"],\n \"THEAD\": [\"TABLE\"],\n \"TR\": [\"THEAD\", \"TBODY\", \"TFOOT\", \"TABLE\"]\n};\nfunction getImplicitAriaRole(element) {\n var _a;\n const implicitRole = ((_a = kImplicitRoleByTagName[elementSafeTagName(element)]) == null ? void 0 : _a.call(kImplicitRoleByTagName, element)) || \"\";\n if (!implicitRole)\n return null;\n let ancestor = element;\n while (ancestor) {\n const parent = parentElementOrShadowHost(ancestor);\n const parents = kPresentationInheritanceParents[elementSafeTagName(ancestor)];\n if (!parents || !parent || !parents.includes(elementSafeTagName(parent)))\n break;\n const parentExplicitRole = getExplicitAriaRole(parent);\n if ((parentExplicitRole === \"none\" || parentExplicitRole === \"presentation\") && !hasPresentationConflictResolution(parent, parentExplicitRole))\n return parentExplicitRole;\n ancestor = parent;\n }\n return implicitRole;\n}\nvar validRoles = [\n \"alert\",\n \"alertdialog\",\n \"application\",\n \"article\",\n \"banner\",\n \"blockquote\",\n \"button\",\n \"caption\",\n \"cell\",\n \"checkbox\",\n \"code\",\n \"columnheader\",\n \"combobox\",\n \"complementary\",\n \"contentinfo\",\n \"definition\",\n \"deletion\",\n \"dialog\",\n \"directory\",\n \"document\",\n \"emphasis\",\n \"feed\",\n \"figure\",\n \"form\",\n \"generic\",\n \"grid\",\n \"gridcell\",\n \"group\",\n \"heading\",\n \"img\",\n \"insertion\",\n \"link\",\n \"list\",\n \"listbox\",\n \"listitem\",\n \"log\",\n \"main\",\n \"mark\",\n \"marquee\",\n \"math\",\n \"meter\",\n \"menu\",\n \"menubar\",\n \"menuitem\",\n \"menuitemcheckbox\",\n \"menuitemradio\",\n \"navigation\",\n \"none\",\n \"note\",\n \"option\",\n \"paragraph\",\n \"presentation\",\n \"progressbar\",\n \"radio\",\n \"radiogroup\",\n \"region\",\n \"row\",\n \"rowgroup\",\n \"rowheader\",\n \"scrollbar\",\n \"search\",\n \"searchbox\",\n \"separator\",\n \"slider\",\n \"spinbutton\",\n \"status\",\n \"strong\",\n \"subscript\",\n \"superscript\",\n \"switch\",\n \"tab\",\n \"table\",\n \"tablist\",\n \"tabpanel\",\n \"term\",\n \"textbox\",\n \"time\",\n \"timer\",\n \"toolbar\",\n \"tooltip\",\n \"tree\",\n \"treegrid\",\n \"treeitem\"\n];\nfunction getExplicitAriaRole(element) {\n const roles = (element.getAttribute(\"role\") || \"\").split(\" \").map((role) => role.trim());\n return roles.find((role) => validRoles.includes(role)) || null;\n}\nfunction hasPresentationConflictResolution(element, role) {\n return hasGlobalAriaAttribute(element, role) || isFocusable(element);\n}\nfunction getAriaRole(element) {\n const explicitRole = getExplicitAriaRole(element);\n if (!explicitRole)\n return getImplicitAriaRole(element);\n if (explicitRole === \"none\" || explicitRole === \"presentation\") {\n const implicitRole = getImplicitAriaRole(element);\n if (hasPresentationConflictResolution(element, implicitRole))\n return implicitRole;\n }\n return explicitRole;\n}\nfunction getAriaBoolean(attr) {\n return attr === null ? void 0 : attr.toLowerCase() === \"true\";\n}\nfunction isElementIgnoredForAria(element) {\n return [\"STYLE\", \"SCRIPT\", \"NOSCRIPT\", \"TEMPLATE\"].includes(elementSafeTagName(element));\n}\nfunction isElementHiddenForAria(element) {\n if (isElementIgnoredForAria(element))\n return true;\n const style = getElementComputedStyle(element);\n const isSlot = element.nodeName === \"SLOT\";\n if ((style == null ? void 0 : style.display) === \"contents\" && !isSlot) {\n for (let child = element.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === 1 && !isElementHiddenForAria(child))\n return false;\n if (child.nodeType === 3 && isVisibleTextNode(child))\n return false;\n }\n return true;\n }\n const isOptionInsideSelect = element.nodeName === \"OPTION\" && !!element.closest(\"select\");\n if (!isOptionInsideSelect && !isSlot && !isElementStyleVisibilityVisible(element, style))\n return true;\n return belongsToDisplayNoneOrAriaHiddenOrNonSlotted(element);\n}\nfunction belongsToDisplayNoneOrAriaHiddenOrNonSlotted(element) {\n let hidden = cacheIsHidden == null ? void 0 : cacheIsHidden.get(element);\n if (hidden === void 0) {\n hidden = false;\n if (element.parentElement && element.parentElement.shadowRoot && !element.assignedSlot)\n hidden = true;\n if (!hidden) {\n const style = getElementComputedStyle(element);\n hidden = !style || style.display === \"none\" || getAriaBoolean(element.getAttribute(\"aria-hidden\")) === true;\n }\n if (!hidden) {\n const parent = parentElementOrShadowHost(element);\n if (parent)\n hidden = belongsToDisplayNoneOrAriaHiddenOrNonSlotted(parent);\n }\n cacheIsHidden == null ? void 0 : cacheIsHidden.set(element, hidden);\n }\n return hidden;\n}\nfunction getIdRefs(element, ref) {\n if (!ref)\n return [];\n const root = enclosingShadowRootOrDocument(element);\n if (!root)\n return [];\n try {\n const ids = ref.split(\" \").filter((id) => !!id);\n const set = /* @__PURE__ */ new Set();\n for (const id of ids) {\n const firstElement = root.querySelector(\"#\" + CSS.escape(id));\n if (firstElement)\n set.add(firstElement);\n }\n return [...set];\n } catch (e) {\n return [];\n }\n}\nfunction trimFlatString(s) {\n return s.trim();\n}\nfunction asFlatString(s) {\n return s.split(\"\\xA0\").map((chunk) => chunk.replace(/\\r\\n/g, \"\\n\").replace(/\\s\\s*/g, \" \")).join(\"\\xA0\").trim();\n}\nfunction queryInAriaOwned(element, selector) {\n const result = [...element.querySelectorAll(selector)];\n for (const owned of getIdRefs(element, element.getAttribute(\"aria-owns\"))) {\n if (owned.matches(selector))\n result.push(owned);\n result.push(...owned.querySelectorAll(selector));\n }\n return result;\n}\nfunction getPseudoContent(element, pseudo) {\n const cache = pseudo === \"::before\" ? cachePseudoContentBefore : cachePseudoContentAfter;\n if (cache == null ? void 0 : cache.has(element))\n return (cache == null ? void 0 : cache.get(element)) || \"\";\n const pseudoStyle = getElementComputedStyle(element, pseudo);\n const content = getPseudoContentImpl(element, pseudoStyle);\n if (cache)\n cache.set(element, content);\n return content;\n}\nfunction getPseudoContentImpl(element, pseudoStyle) {\n if (!pseudoStyle || pseudoStyle.display === \"none\" || pseudoStyle.visibility === \"hidden\")\n return \"\";\n const content = pseudoStyle.content;\n let resolvedContent;\n if (content[0] === \"'\" && content[content.length - 1] === \"'\" || content[0] === '\"' && content[content.length - 1] === '\"') {\n resolvedContent = content.substring(1, content.length - 1);\n } else if (content.startsWith(\"attr(\") && content.endsWith(\")\")) {\n const attrName = content.substring(\"attr(\".length, content.length - 1).trim();\n resolvedContent = element.getAttribute(attrName) || \"\";\n }\n if (resolvedContent !== void 0) {\n const display = pseudoStyle.display || \"inline\";\n if (display !== \"inline\")\n return \" \" + resolvedContent + \" \";\n return resolvedContent;\n }\n return \"\";\n}\nfunction getAriaLabelledByElements(element) {\n const ref = element.getAttribute(\"aria-labelledby\");\n if (ref === null)\n return null;\n const refs = getIdRefs(element, ref);\n return refs.length ? refs : null;\n}\nfunction allowsNameFromContent(role, targetDescendant) {\n const alwaysAllowsNameFromContent = [\"button\", \"cell\", \"checkbox\", \"columnheader\", \"gridcell\", \"heading\", \"link\", \"menuitem\", \"menuitemcheckbox\", \"menuitemradio\", \"option\", \"radio\", \"row\", \"rowheader\", \"switch\", \"tab\", \"tooltip\", \"treeitem\"].includes(role);\n const descendantAllowsNameFromContent = targetDescendant && [\"\", \"caption\", \"code\", \"contentinfo\", \"definition\", \"deletion\", \"emphasis\", \"insertion\", \"list\", \"listitem\", \"mark\", \"none\", \"paragraph\", \"presentation\", \"region\", \"row\", \"rowgroup\", \"section\", \"strong\", \"subscript\", \"superscript\", \"table\", \"term\", \"time\"].includes(role);\n return alwaysAllowsNameFromContent || descendantAllowsNameFromContent;\n}\nfunction getElementAccessibleName(element, includeHidden) {\n const cache = includeHidden ? cacheAccessibleNameHidden : cacheAccessibleName;\n let accessibleName = cache == null ? void 0 : cache.get(element);\n if (accessibleName === void 0) {\n accessibleName = \"\";\n const elementProhibitsNaming = [\"caption\", \"code\", \"definition\", \"deletion\", \"emphasis\", \"generic\", \"insertion\", \"mark\", \"paragraph\", \"presentation\", \"strong\", \"subscript\", \"suggestion\", \"superscript\", \"term\", \"time\"].includes(getAriaRole(element) || \"\");\n if (!elementProhibitsNaming) {\n accessibleName = asFlatString(getTextAlternativeInternal(element, {\n includeHidden,\n visitedElements: /* @__PURE__ */ new Set(),\n embeddedInTargetElement: \"self\"\n }));\n }\n cache == null ? void 0 : cache.set(element, accessibleName);\n }\n return accessibleName;\n}\nfunction getElementAccessibleDescription(element, includeHidden) {\n const cache = includeHidden ? cacheAccessibleDescriptionHidden : cacheAccessibleDescription;\n let accessibleDescription = cache == null ? void 0 : cache.get(element);\n if (accessibleDescription === void 0) {\n accessibleDescription = \"\";\n if (element.hasAttribute(\"aria-describedby\")) {\n const describedBy = getIdRefs(element, element.getAttribute(\"aria-describedby\"));\n accessibleDescription = asFlatString(describedBy.map((ref) => getTextAlternativeInternal(ref, {\n includeHidden,\n visitedElements: /* @__PURE__ */ new Set(),\n embeddedInDescribedBy: { element: ref, hidden: isElementHiddenForAria(ref) }\n })).join(\" \"));\n } else if (element.hasAttribute(\"aria-description\")) {\n accessibleDescription = asFlatString(element.getAttribute(\"aria-description\") || \"\");\n } else {\n accessibleDescription = asFlatString(element.getAttribute(\"title\") || \"\");\n }\n cache == null ? void 0 : cache.set(element, accessibleDescription);\n }\n return accessibleDescription;\n}\nvar kAriaInvalidRoles = [\"application\", \"checkbox\", \"combobox\", \"gridcell\", \"listbox\", \"radiogroup\", \"slider\", \"spinbutton\", \"textbox\", \"tree\", \"columnheader\", \"rowheader\", \"searchbox\", \"switch\", \"treegrid\"];\nfunction getAriaInvalid(element) {\n const role = getAriaRole(element) || \"\";\n if (!role || !kAriaInvalidRoles.includes(role))\n return \"false\";\n const ariaInvalid = element.getAttribute(\"aria-invalid\");\n if (!ariaInvalid || ariaInvalid.trim() === \"\" || ariaInvalid.toLocaleLowerCase() === \"false\")\n return \"false\";\n if (ariaInvalid === \"true\" || ariaInvalid === \"grammar\" || ariaInvalid === \"spelling\")\n return ariaInvalid;\n return \"true\";\n}\nfunction getValidityInvalid(element) {\n if (\"validity\" in element) {\n const validity = element.validity;\n return (validity == null ? void 0 : validity.valid) === false;\n }\n return false;\n}\nfunction getElementAccessibleErrorMessage(element) {\n const cache = cacheAccessibleErrorMessage;\n let accessibleErrorMessage = cacheAccessibleErrorMessage == null ? void 0 : cacheAccessibleErrorMessage.get(element);\n if (accessibleErrorMessage === void 0) {\n accessibleErrorMessage = \"\";\n const isAriaInvalid = getAriaInvalid(element) !== \"false\";\n const isValidityInvalid = getValidityInvalid(element);\n if (isAriaInvalid || isValidityInvalid) {\n const errorMessageId = element.getAttribute(\"aria-errormessage\");\n const errorMessages = getIdRefs(element, errorMessageId);\n const parts = errorMessages.map((errorMessage) => asFlatString(\n getTextAlternativeInternal(errorMessage, {\n visitedElements: /* @__PURE__ */ new Set(),\n embeddedInDescribedBy: { element: errorMessage, hidden: isElementHiddenForAria(errorMessage) }\n })\n ));\n accessibleErrorMessage = parts.join(\" \").trim();\n }\n cache == null ? void 0 : cache.set(element, accessibleErrorMessage);\n }\n return accessibleErrorMessage;\n}\nfunction getTextAlternativeInternal(element, options) {\n var _a, _b, _c, _d;\n if (options.visitedElements.has(element))\n return \"\";\n const childOptions = {\n ...options,\n embeddedInTargetElement: options.embeddedInTargetElement === \"self\" ? \"descendant\" : options.embeddedInTargetElement\n };\n if (!options.includeHidden) {\n const isEmbeddedInHiddenReferenceTraversal = !!((_a = options.embeddedInLabelledBy) == null ? void 0 : _a.hidden) || !!((_b = options.embeddedInDescribedBy) == null ? void 0 : _b.hidden) || !!((_c = options.embeddedInNativeTextAlternative) == null ? void 0 : _c.hidden) || !!((_d = options.embeddedInLabel) == null ? void 0 : _d.hidden);\n if (isElementIgnoredForAria(element) || !isEmbeddedInHiddenReferenceTraversal && isElementHiddenForAria(element)) {\n options.visitedElements.add(element);\n return \"\";\n }\n }\n const labelledBy = getAriaLabelledByElements(element);\n if (!options.embeddedInLabelledBy) {\n const accessibleName = (labelledBy || []).map((ref) => getTextAlternativeInternal(ref, {\n ...options,\n embeddedInLabelledBy: { element: ref, hidden: isElementHiddenForAria(ref) },\n embeddedInDescribedBy: void 0,\n embeddedInTargetElement: void 0,\n embeddedInLabel: void 0,\n embeddedInNativeTextAlternative: void 0\n })).join(\" \");\n if (accessibleName)\n return accessibleName;\n }\n const role = getAriaRole(element) || \"\";\n const tagName = elementSafeTagName(element);\n if (!!options.embeddedInLabel || !!options.embeddedInLabelledBy || options.embeddedInTargetElement === \"descendant\") {\n const isOwnLabel = [...element.labels || []].includes(element);\n const isOwnLabelledBy = (labelledBy || []).includes(element);\n if (!isOwnLabel && !isOwnLabelledBy) {\n if (role === \"textbox\") {\n options.visitedElements.add(element);\n if (tagName === \"INPUT\" || tagName === \"TEXTAREA\")\n return element.value;\n return element.textContent || \"\";\n }\n if ([\"combobox\", \"listbox\"].includes(role)) {\n options.visitedElements.add(element);\n let selectedOptions;\n if (tagName === \"SELECT\") {\n selectedOptions = [...element.selectedOptions];\n if (!selectedOptions.length && element.options.length)\n selectedOptions.push(element.options[0]);\n } else {\n const listbox = role === \"combobox\" ? queryInAriaOwned(element, \"*\").find((e) => getAriaRole(e) === \"listbox\") : element;\n selectedOptions = listbox ? queryInAriaOwned(listbox, '[aria-selected=\"true\"]').filter((e) => getAriaRole(e) === \"option\") : [];\n }\n if (!selectedOptions.length && tagName === \"INPUT\") {\n return element.value;\n }\n return selectedOptions.map((option) => getTextAlternativeInternal(option, childOptions)).join(\" \");\n }\n if ([\"progressbar\", \"scrollbar\", \"slider\", \"spinbutton\", \"meter\"].includes(role)) {\n options.visitedElements.add(element);\n if (element.hasAttribute(\"aria-valuetext\"))\n return element.getAttribute(\"aria-valuetext\") || \"\";\n if (element.hasAttribute(\"aria-valuenow\"))\n return element.getAttribute(\"aria-valuenow\") || \"\";\n return element.getAttribute(\"value\") || \"\";\n }\n if ([\"menu\"].includes(role)) {\n options.visitedElements.add(element);\n return \"\";\n }\n }\n }\n const ariaLabel = element.getAttribute(\"aria-label\") || \"\";\n if (trimFlatString(ariaLabel)) {\n options.visitedElements.add(element);\n return ariaLabel;\n }\n if (![\"presentation\", \"none\"].includes(role)) {\n if (tagName === \"INPUT\" && [\"button\", \"submit\", \"reset\"].includes(element.type)) {\n options.visitedElements.add(element);\n const value = element.value || \"\";\n if (trimFlatString(value))\n return value;\n if (element.type === \"submit\")\n return \"Submit\";\n if (element.type === \"reset\")\n return \"Reset\";\n const title = element.getAttribute(\"title\") || \"\";\n return title;\n }\n if (tagName === \"INPUT\" && element.type === \"image\") {\n options.visitedElements.add(element);\n const labels = element.labels || [];\n if (labels.length && !options.embeddedInLabelledBy)\n return getAccessibleNameFromAssociatedLabels(labels, options);\n const alt = element.getAttribute(\"alt\") || \"\";\n if (trimFlatString(alt))\n return alt;\n const title = element.getAttribute(\"title\") || \"\";\n if (trimFlatString(title))\n return title;\n return \"Submit\";\n }\n if (!labelledBy && tagName === \"BUTTON\") {\n options.visitedElements.add(element);\n const labels = element.labels || [];\n if (labels.length)\n return getAccessibleNameFromAssociatedLabels(labels, options);\n }\n if (!labelledBy && tagName === \"OUTPUT\") {\n options.visitedElements.add(element);\n const labels = element.labels || [];\n if (labels.length)\n return getAccessibleNameFromAssociatedLabels(labels, options);\n return element.getAttribute(\"title\") || \"\";\n }\n if (!labelledBy && (tagName === \"TEXTAREA\" || tagName === \"SELECT\" || tagName === \"INPUT\")) {\n options.visitedElements.add(element);\n const labels = element.labels || [];\n if (labels.length)\n return getAccessibleNameFromAssociatedLabels(labels, options);\n const usePlaceholder = tagName === \"INPUT\" && [\"text\", \"password\", \"search\", \"tel\", \"email\", \"url\"].includes(element.type) || tagName === \"TEXTAREA\";\n const placeholder = element.getAttribute(\"placeholder\") || \"\";\n const title = element.getAttribute(\"title\") || \"\";\n if (!usePlaceholder || title)\n return title;\n return placeholder;\n }\n if (!labelledBy && tagName === \"FIELDSET\") {\n options.visitedElements.add(element);\n for (let child = element.firstElementChild; child; child = child.nextElementSibling) {\n if (elementSafeTagName(child) === \"LEGEND\") {\n return getTextAlternativeInternal(child, {\n ...childOptions,\n embeddedInNativeTextAlternative: { element: child, hidden: isElementHiddenForAria(child) }\n });\n }\n }\n const title = element.getAttribute(\"title\") || \"\";\n return title;\n }\n if (!labelledBy && tagName === \"FIGURE\") {\n options.visitedElements.add(element);\n for (let child = element.firstElementChild; child; child = child.nextElementSibling) {\n if (elementSafeTagName(child) === \"FIGCAPTION\") {\n return getTextAlternativeInternal(child, {\n ...childOptions,\n embeddedInNativeTextAlternative: { element: child, hidden: isElementHiddenForAria(child) }\n });\n }\n }\n const title = element.getAttribute(\"title\") || \"\";\n return title;\n }\n if (tagName === \"IMG\") {\n options.visitedElements.add(element);\n const alt = element.getAttribute(\"alt\") || \"\";\n if (trimFlatString(alt))\n return alt;\n const title = element.getAttribute(\"title\") || \"\";\n return title;\n }\n if (tagName === \"TABLE\") {\n options.visitedElements.add(element);\n for (let child = element.firstElementChild; child; child = child.nextElementSibling) {\n if (elementSafeTagName(child) === \"CAPTION\") {\n return getTextAlternativeInternal(child, {\n ...childOptions,\n embeddedInNativeTextAlternative: { element: child, hidden: isElementHiddenForAria(child) }\n });\n }\n }\n const summary = element.getAttribute(\"summary\") || \"\";\n if (summary)\n return summary;\n }\n if (tagName === \"AREA\") {\n options.visitedElements.add(element);\n const alt = element.getAttribute(\"alt\") || \"\";\n if (trimFlatString(alt))\n return alt;\n const title = element.getAttribute(\"title\") || \"\";\n return title;\n }\n if (tagName === \"SVG\" || element.ownerSVGElement) {\n options.visitedElements.add(element);\n for (let child = element.firstElementChild; child; child = child.nextElementSibling) {\n if (elementSafeTagName(child) === \"TITLE\" && child.ownerSVGElement) {\n return getTextAlternativeInternal(child, {\n ...childOptions,\n embeddedInLabelledBy: { element: child, hidden: isElementHiddenForAria(child) }\n });\n }\n }\n }\n if (element.ownerSVGElement && tagName === \"A\") {\n const title = element.getAttribute(\"xlink:title\") || \"\";\n if (trimFlatString(title)) {\n options.visitedElements.add(element);\n return title;\n }\n }\n }\n const shouldNameFromContentForSummary = tagName === \"SUMMARY\" && ![\"presentation\", \"none\"].includes(role);\n if (allowsNameFromContent(role, options.embeddedInTargetElement === \"descendant\") || shouldNameFromContentForSummary || !!options.embeddedInLabelledBy || !!options.embeddedInDescribedBy || !!options.embeddedInLabel || !!options.embeddedInNativeTextAlternative) {\n options.visitedElements.add(element);\n const accessibleName = innerAccumulatedElementText(element, childOptions);\n const maybeTrimmedAccessibleName = options.embeddedInTargetElement === \"self\" ? trimFlatString(accessibleName) : accessibleName;\n if (maybeTrimmedAccessibleName)\n return accessibleName;\n }\n if (![\"presentation\", \"none\"].includes(role) || tagName === \"IFRAME\") {\n options.visitedElements.add(element);\n const title = element.getAttribute(\"title\") || \"\";\n if (trimFlatString(title))\n return title;\n }\n options.visitedElements.add(element);\n return \"\";\n}\nfunction innerAccumulatedElementText(element, options) {\n const tokens = [];\n const visit = (node, skipSlotted) => {\n var _a;\n if (skipSlotted && node.assignedSlot)\n return;\n if (node.nodeType === 1) {\n const display = ((_a = getElementComputedStyle(node)) == null ? void 0 : _a.display) || \"inline\";\n let token = getTextAlternativeInternal(node, options);\n if (display !== \"inline\" || node.nodeName === \"BR\")\n token = \" \" + token + \" \";\n tokens.push(token);\n } else if (node.nodeType === 3) {\n tokens.push(node.textContent || \"\");\n }\n };\n tokens.push(getPseudoContent(element, \"::before\"));\n const assignedNodes = element.nodeName === \"SLOT\" ? element.assignedNodes() : [];\n if (assignedNodes.length) {\n for (const child of assignedNodes)\n visit(child, false);\n } else {\n for (let child = element.firstChild; child; child = child.nextSibling)\n visit(child, true);\n if (element.shadowRoot) {\n for (let child = element.shadowRoot.firstChild; child; child = child.nextSibling)\n visit(child, true);\n }\n for (const owned of getIdRefs(element, element.getAttribute(\"aria-owns\")))\n visit(owned, true);\n }\n tokens.push(getPseudoContent(element, \"::after\"));\n return tokens.join(\"\");\n}\nvar kAriaSelectedRoles = [\"gridcell\", \"option\", \"row\", \"tab\", \"rowheader\", \"columnheader\", \"treeitem\"];\nfunction getAriaSelected(element) {\n if (elementSafeTagName(element) === \"OPTION\")\n return element.selected;\n if (kAriaSelectedRoles.includes(getAriaRole(element) || \"\"))\n return getAriaBoolean(element.getAttribute(\"aria-selected\")) === true;\n return false;\n}\nvar kAriaCheckedRoles = [\"checkbox\", \"menuitemcheckbox\", \"option\", \"radio\", \"switch\", \"menuitemradio\", \"treeitem\"];\nfunction getAriaChecked(element) {\n const result = getChecked(element, true);\n return result === \"error\" ? false : result;\n}\nfunction getCheckedAllowMixed(element) {\n return getChecked(element, true);\n}\nfunction getCheckedWithoutMixed(element) {\n const result = getChecked(element, false);\n return result;\n}\nfunction getChecked(element, allowMixed) {\n const tagName = elementSafeTagName(element);\n if (allowMixed && tagName === \"INPUT\" && element.indeterminate)\n return \"mixed\";\n if (tagName === \"INPUT\" && [\"checkbox\", \"radio\"].includes(element.type))\n return element.checked;\n if (kAriaCheckedRoles.includes(getAriaRole(element) || \"\")) {\n const checked = element.getAttribute(\"aria-checked\");\n if (checked === \"true\")\n return true;\n if (allowMixed && checked === \"mixed\")\n return \"mixed\";\n return false;\n }\n return \"error\";\n}\nvar kAriaReadonlyRoles = [\"checkbox\", \"combobox\", \"grid\", \"gridcell\", \"listbox\", \"radiogroup\", \"slider\", \"spinbutton\", \"textbox\", \"columnheader\", \"rowheader\", \"searchbox\", \"switch\", \"treegrid\"];\nfunction getReadonly(element) {\n const tagName = elementSafeTagName(element);\n if ([\"INPUT\", \"TEXTAREA\", \"SELECT\"].includes(tagName))\n return element.hasAttribute(\"readonly\");\n if (kAriaReadonlyRoles.includes(getAriaRole(element) || \"\"))\n return element.getAttribute(\"aria-readonly\") === \"true\";\n if (element.isContentEditable)\n return false;\n return \"error\";\n}\nvar kAriaPressedRoles = [\"button\"];\nfunction getAriaPressed(element) {\n if (kAriaPressedRoles.includes(getAriaRole(element) || \"\")) {\n const pressed = element.getAttribute(\"aria-pressed\");\n if (pressed === \"true\")\n return true;\n if (pressed === \"mixed\")\n return \"mixed\";\n }\n return false;\n}\nvar kAriaExpandedRoles = [\"application\", \"button\", \"checkbox\", \"combobox\", \"gridcell\", \"link\", \"listbox\", \"menuitem\", \"row\", \"rowheader\", \"tab\", \"treeitem\", \"columnheader\", \"menuitemcheckbox\", \"menuitemradio\", \"rowheader\", \"switch\"];\nfunction getAriaExpanded(element) {\n if (elementSafeTagName(element) === \"DETAILS\")\n return element.open;\n if (kAriaExpandedRoles.includes(getAriaRole(element) || \"\")) {\n const expanded = element.getAttribute(\"aria-expanded\");\n if (expanded === null)\n return void 0;\n if (expanded === \"true\")\n return true;\n return false;\n }\n return void 0;\n}\nvar kAriaLevelRoles = [\"heading\", \"listitem\", \"row\", \"treeitem\"];\nfunction getAriaLevel(element) {\n const native = { \"H1\": 1, \"H2\": 2, \"H3\": 3, \"H4\": 4, \"H5\": 5, \"H6\": 6 }[elementSafeTagName(element)];\n if (native)\n return native;\n if (kAriaLevelRoles.includes(getAriaRole(element) || \"\")) {\n const attr = element.getAttribute(\"aria-level\");\n const value = attr === null ? Number.NaN : Number(attr);\n if (Number.isInteger(value) && value >= 1)\n return value;\n }\n return 0;\n}\nvar kAriaDisabledRoles = [\"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\"];\nfunction getAriaDisabled(element) {\n return isNativelyDisabled(element) || hasExplicitAriaDisabled(element);\n}\nfunction isNativelyDisabled(element) {\n const isNativeFormControl = [\"BUTTON\", \"INPUT\", \"SELECT\", \"TEXTAREA\", \"OPTION\", \"OPTGROUP\"].includes(element.tagName);\n return isNativeFormControl && (element.hasAttribute(\"disabled\") || belongsToDisabledFieldSet(element));\n}\nfunction belongsToDisabledFieldSet(element) {\n if (!element)\n return false;\n if (elementSafeTagName(element) === \"FIELDSET\" && element.hasAttribute(\"disabled\"))\n return true;\n return belongsToDisabledFieldSet(element.parentElement);\n}\nfunction hasExplicitAriaDisabled(element) {\n if (!element)\n return false;\n if (kAriaDisabledRoles.includes(getAriaRole(element) || \"\")) {\n const attribute = (element.getAttribute(\"aria-disabled\") || \"\").toLowerCase();\n if (attribute === \"true\")\n return true;\n if (attribute === \"false\")\n return false;\n }\n return hasExplicitAriaDisabled(parentElementOrShadowHost(element));\n}\nfunction getAccessibleNameFromAssociatedLabels(labels, options) {\n return [...labels].map((label) => getTextAlternativeInternal(label, {\n ...options,\n embeddedInLabel: { element: label, hidden: isElementHiddenForAria(label) },\n embeddedInNativeTextAlternative: void 0,\n embeddedInLabelledBy: void 0,\n embeddedInDescribedBy: void 0,\n embeddedInTargetElement: void 0\n })).filter((accessibleName) => !!accessibleName).join(\" \");\n}\nvar cacheAccessibleName;\nvar cacheAccessibleNameHidden;\nvar cacheAccessibleDescription;\nvar cacheAccessibleDescriptionHidden;\nvar cacheAccessibleErrorMessage;\nvar cacheIsHidden;\nvar cachePseudoContentBefore;\nvar cachePseudoContentAfter;\nvar cachesCounter = 0;\nfunction beginAriaCaches() {\n ++cachesCounter;\n cacheAccessibleName != null ? cacheAccessibleName : cacheAccessibleName = /* @__PURE__ */ new Map();\n cacheAccessibleNameHidden != null ? cacheAccessibleNameHidden : cacheAccessibleNameHidden = /* @__PURE__ */ new Map();\n cacheAccessibleDescription != null ? cacheAccessibleDescription : cacheAccessibleDescription = /* @__PURE__ */ new Map();\n cacheAccessibleDescriptionHidden != null ? cacheAccessibleDescriptionHidden : cacheAccessibleDescriptionHidden = /* @__PURE__ */ new Map();\n cacheAccessibleErrorMessage != null ? cacheAccessibleErrorMessage : cacheAccessibleErrorMessage = /* @__PURE__ */ new Map();\n cacheIsHidden != null ? cacheIsHidden : cacheIsHidden = /* @__PURE__ */ new Map();\n cachePseudoContentBefore != null ? cachePseudoContentBefore : cachePseudoContentBefore = /* @__PURE__ */ new Map();\n cachePseudoContentAfter != null ? cachePseudoContentAfter : cachePseudoContentAfter = /* @__PURE__ */ new Map();\n}\nfunction endAriaCaches() {\n if (!--cachesCounter) {\n cacheAccessibleName = void 0;\n cacheAccessibleNameHidden = void 0;\n cacheAccessibleDescription = void 0;\n cacheAccessibleDescriptionHidden = void 0;\n cacheAccessibleErrorMessage = void 0;\n cacheIsHidden = void 0;\n cachePseudoContentBefore = void 0;\n cachePseudoContentAfter = void 0;\n }\n}\nvar inputTypeToRole = {\n \"button\": \"button\",\n \"checkbox\": \"checkbox\",\n \"image\": \"button\",\n \"number\": \"spinbutton\",\n \"radio\": \"radio\",\n \"range\": \"slider\",\n \"reset\": \"button\",\n \"submit\": \"button\"\n};\n\n// packages/playwright-core/src/server/injected/selectorUtils.ts\nfunction matchesComponentAttribute(obj, attr) {\n for (const token of attr.jsonPath) {\n if (obj !== void 0 && obj !== null)\n obj = obj[token];\n }\n return matchesAttributePart(obj, attr);\n}\nfunction matchesAttributePart(value, attr) {\n const objValue = typeof value === \"string\" && !attr.caseSensitive ? value.toUpperCase() : value;\n const attrValue = typeof attr.value === \"string\" && !attr.caseSensitive ? attr.value.toUpperCase() : attr.value;\n if (attr.op === \"\")\n return !!objValue;\n if (attr.op === \"=\") {\n if (attrValue instanceof RegExp)\n return typeof objValue === \"string\" && !!objValue.match(attrValue);\n return objValue === attrValue;\n }\n if (typeof objValue !== \"string\" || typeof attrValue !== \"string\")\n return false;\n if (attr.op === \"*=\")\n return objValue.includes(attrValue);\n if (attr.op === \"^=\")\n return objValue.startsWith(attrValue);\n if (attr.op === \"$=\")\n return objValue.endsWith(attrValue);\n if (attr.op === \"|=\")\n return objValue === attrValue || objValue.startsWith(attrValue + \"-\");\n if (attr.op === \"~=\")\n return objValue.split(\" \").includes(attrValue);\n return false;\n}\nfunction shouldSkipForTextMatching(element) {\n const document = element.ownerDocument;\n return element.nodeName === \"SCRIPT\" || element.nodeName === \"NOSCRIPT\" || element.nodeName === \"STYLE\" || document.head && document.head.contains(element);\n}\nfunction elementText(cache, root) {\n let value = cache.get(root);\n if (value === void 0) {\n value = { full: \"\", normalized: \"\", immediate: [] };\n if (!shouldSkipForTextMatching(root)) {\n let currentImmediate = \"\";\n if (root instanceof HTMLInputElement && (root.type === \"submit\" || root.type === \"button\")) {\n value = { full: root.value, normalized: normalizeWhiteSpace(root.value), immediate: [root.value] };\n } else {\n for (let child = root.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === Node.TEXT_NODE) {\n value.full += child.nodeValue || \"\";\n currentImmediate += child.nodeValue || \"\";\n } else if (child.nodeType === Node.COMMENT_NODE) {\n continue;\n } else {\n if (currentImmediate)\n value.immediate.push(currentImmediate);\n currentImmediate = \"\";\n if (child.nodeType === Node.ELEMENT_NODE)\n value.full += elementText(cache, child).full;\n }\n }\n if (currentImmediate)\n value.immediate.push(currentImmediate);\n if (root.shadowRoot)\n value.full += elementText(cache, root.shadowRoot).full;\n if (value.full)\n value.normalized = normalizeWhiteSpace(value.full);\n }\n }\n cache.set(root, value);\n }\n return value;\n}\nfunction elementMatchesText(cache, element, matcher) {\n if (shouldSkipForTextMatching(element))\n return \"none\";\n if (!matcher(elementText(cache, element)))\n return \"none\";\n for (let child = element.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === Node.ELEMENT_NODE && matcher(elementText(cache, child)))\n return \"selfAndChildren\";\n }\n if (element.shadowRoot && matcher(elementText(cache, element.shadowRoot)))\n return \"selfAndChildren\";\n return \"self\";\n}\nfunction getElementLabels(textCache, element) {\n const labels = getAriaLabelledByElements(element);\n if (labels)\n return labels.map((label) => elementText(textCache, label));\n const ariaLabel = element.getAttribute(\"aria-label\");\n if (ariaLabel !== null && !!ariaLabel.trim())\n return [{ full: ariaLabel, normalized: normalizeWhiteSpace(ariaLabel), immediate: [ariaLabel] }];\n const isNonHiddenInput = element.nodeName === \"INPUT\" && element.type !== \"hidden\";\n if ([\"BUTTON\", \"METER\", \"OUTPUT\", \"PROGRESS\", \"SELECT\", \"TEXTAREA\"].includes(element.nodeName) || isNonHiddenInput) {\n const labels2 = element.labels;\n if (labels2)\n return [...labels2].map((label) => elementText(textCache, label));\n }\n return [];\n}\n\n// packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts\nvar between = function(num, first, last) {\n return num >= first && num <= last;\n};\nfunction digit(code) {\n return between(code, 48, 57);\n}\nfunction hexdigit(code) {\n return digit(code) || between(code, 65, 70) || between(code, 97, 102);\n}\nfunction uppercaseletter(code) {\n return between(code, 65, 90);\n}\nfunction lowercaseletter(code) {\n return between(code, 97, 122);\n}\nfunction letter(code) {\n return uppercaseletter(code) || lowercaseletter(code);\n}\nfunction nonascii(code) {\n return code >= 128;\n}\nfunction namestartchar(code) {\n return letter(code) || nonascii(code) || code === 95;\n}\nfunction namechar(code) {\n return namestartchar(code) || digit(code) || code === 45;\n}\nfunction nonprintable(code) {\n return between(code, 0, 8) || code === 11 || between(code, 14, 31) || code === 127;\n}\nfunction newline(code) {\n return code === 10;\n}\nfunction whitespace(code) {\n return newline(code) || code === 9 || code === 32;\n}\nvar maximumallowedcodepoint = 1114111;\nvar InvalidCharacterError = class extends Error {\n constructor(message) {\n super(message);\n this.name = \"InvalidCharacterError\";\n }\n};\nfunction preprocess(str) {\n const codepoints = [];\n for (let i = 0; i < str.length; i++) {\n let code = str.charCodeAt(i);\n if (code === 13 && str.charCodeAt(i + 1) === 10) {\n code = 10;\n i++;\n }\n if (code === 13 || code === 12)\n code = 10;\n if (code === 0)\n code = 65533;\n if (between(code, 55296, 56319) && between(str.charCodeAt(i + 1), 56320, 57343)) {\n const lead = code - 55296;\n const trail = str.charCodeAt(i + 1) - 56320;\n code = Math.pow(2, 16) + lead * Math.pow(2, 10) + trail;\n i++;\n }\n codepoints.push(code);\n }\n return codepoints;\n}\nfunction stringFromCode(code) {\n if (code <= 65535)\n return String.fromCharCode(code);\n code -= Math.pow(2, 16);\n const lead = Math.floor(code / Math.pow(2, 10)) + 55296;\n const trail = code % Math.pow(2, 10) + 56320;\n return String.fromCharCode(lead) + String.fromCharCode(trail);\n}\nfunction tokenize(str1) {\n const str = preprocess(str1);\n let i = -1;\n const tokens = [];\n let code;\n let line = 0;\n let column = 0;\n let lastLineLength = 0;\n const incrLineno = function() {\n line += 1;\n lastLineLength = column;\n column = 0;\n };\n const locStart = { line, column };\n const codepoint = function(i2) {\n if (i2 >= str.length)\n return -1;\n return str[i2];\n };\n const next = function(num) {\n if (num === void 0)\n num = 1;\n if (num > 3)\n throw \"Spec Error: no more than three codepoints of lookahead.\";\n return codepoint(i + num);\n };\n const consume = function(num) {\n if (num === void 0)\n num = 1;\n i += num;\n code = codepoint(i);\n if (newline(code))\n incrLineno();\n else\n column += num;\n return true;\n };\n const reconsume = function() {\n i -= 1;\n if (newline(code)) {\n line -= 1;\n column = lastLineLength;\n } else {\n column -= 1;\n }\n locStart.line = line;\n locStart.column = column;\n return true;\n };\n const eof = function(codepoint2) {\n if (codepoint2 === void 0)\n codepoint2 = code;\n return codepoint2 === -1;\n };\n const donothing = function() {\n };\n const parseerror = function() {\n };\n const consumeAToken = function() {\n consumeComments();\n consume();\n if (whitespace(code)) {\n while (whitespace(next()))\n consume();\n return new WhitespaceToken();\n } else if (code === 34) {\n return consumeAStringToken();\n } else if (code === 35) {\n if (namechar(next()) || areAValidEscape(next(1), next(2))) {\n const token = new HashToken(\"\");\n if (wouldStartAnIdentifier(next(1), next(2), next(3)))\n token.type = \"id\";\n token.value = consumeAName();\n return token;\n } else {\n return new DelimToken(code);\n }\n } else if (code === 36) {\n if (next() === 61) {\n consume();\n return new SuffixMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 39) {\n return consumeAStringToken();\n } else if (code === 40) {\n return new OpenParenToken();\n } else if (code === 41) {\n return new CloseParenToken();\n } else if (code === 42) {\n if (next() === 61) {\n consume();\n return new SubstringMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 43) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 44) {\n return new CommaToken();\n } else if (code === 45) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else if (next(1) === 45 && next(2) === 62) {\n consume(2);\n return new CDCToken();\n } else if (startsWithAnIdentifier()) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 46) {\n if (startsWithANumber()) {\n reconsume();\n return consumeANumericToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 58) {\n return new ColonToken();\n } else if (code === 59) {\n return new SemicolonToken();\n } else if (code === 60) {\n if (next(1) === 33 && next(2) === 45 && next(3) === 45) {\n consume(3);\n return new CDOToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 64) {\n if (wouldStartAnIdentifier(next(1), next(2), next(3)))\n return new AtKeywordToken(consumeAName());\n else\n return new DelimToken(code);\n } else if (code === 91) {\n return new OpenSquareToken();\n } else if (code === 92) {\n if (startsWithAValidEscape()) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else {\n parseerror();\n return new DelimToken(code);\n }\n } else if (code === 93) {\n return new CloseSquareToken();\n } else if (code === 94) {\n if (next() === 61) {\n consume();\n return new PrefixMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 123) {\n return new OpenCurlyToken();\n } else if (code === 124) {\n if (next() === 61) {\n consume();\n return new DashMatchToken();\n } else if (next() === 124) {\n consume();\n return new ColumnToken();\n } else {\n return new DelimToken(code);\n }\n } else if (code === 125) {\n return new CloseCurlyToken();\n } else if (code === 126) {\n if (next() === 61) {\n consume();\n return new IncludeMatchToken();\n } else {\n return new DelimToken(code);\n }\n } else if (digit(code)) {\n reconsume();\n return consumeANumericToken();\n } else if (namestartchar(code)) {\n reconsume();\n return consumeAnIdentlikeToken();\n } else if (eof()) {\n return new EOFToken();\n } else {\n return new DelimToken(code);\n }\n };\n const consumeComments = function() {\n while (next(1) === 47 && next(2) === 42) {\n consume(2);\n while (true) {\n consume();\n if (code === 42 && next() === 47) {\n consume();\n break;\n } else if (eof()) {\n parseerror();\n return;\n }\n }\n }\n };\n const consumeANumericToken = function() {\n const num = consumeANumber();\n if (wouldStartAnIdentifier(next(1), next(2), next(3))) {\n const token = new DimensionToken();\n token.value = num.value;\n token.repr = num.repr;\n token.type = num.type;\n token.unit = consumeAName();\n return token;\n } else if (next() === 37) {\n consume();\n const token = new PercentageToken();\n token.value = num.value;\n token.repr = num.repr;\n return token;\n } else {\n const token = new NumberToken();\n token.value = num.value;\n token.repr = num.repr;\n token.type = num.type;\n return token;\n }\n };\n const consumeAnIdentlikeToken = function() {\n const str2 = consumeAName();\n if (str2.toLowerCase() === \"url\" && next() === 40) {\n consume();\n while (whitespace(next(1)) && whitespace(next(2)))\n consume();\n if (next() === 34 || next() === 39)\n return new FunctionToken(str2);\n else if (whitespace(next()) && (next(2) === 34 || next(2) === 39))\n return new FunctionToken(str2);\n else\n return consumeAURLToken();\n } else if (next() === 40) {\n consume();\n return new FunctionToken(str2);\n } else {\n return new IdentToken(str2);\n }\n };\n const consumeAStringToken = function(endingCodePoint) {\n if (endingCodePoint === void 0)\n endingCodePoint = code;\n let string = \"\";\n while (consume()) {\n if (code === endingCodePoint || eof()) {\n return new StringToken(string);\n } else if (newline(code)) {\n parseerror();\n reconsume();\n return new BadStringToken();\n } else if (code === 92) {\n if (eof(next()))\n donothing();\n else if (newline(next()))\n consume();\n else\n string += stringFromCode(consumeEscape());\n } else {\n string += stringFromCode(code);\n }\n }\n throw new Error(\"Internal error\");\n };\n const consumeAURLToken = function() {\n const token = new URLToken(\"\");\n while (whitespace(next()))\n consume();\n if (eof(next()))\n return token;\n while (consume()) {\n if (code === 41 || eof()) {\n return token;\n } else if (whitespace(code)) {\n while (whitespace(next()))\n consume();\n if (next() === 41 || eof(next())) {\n consume();\n return token;\n } else {\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n }\n } else if (code === 34 || code === 39 || code === 40 || nonprintable(code)) {\n parseerror();\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n } else if (code === 92) {\n if (startsWithAValidEscape()) {\n token.value += stringFromCode(consumeEscape());\n } else {\n parseerror();\n consumeTheRemnantsOfABadURL();\n return new BadURLToken();\n }\n } else {\n token.value += stringFromCode(code);\n }\n }\n throw new Error(\"Internal error\");\n };\n const consumeEscape = function() {\n consume();\n if (hexdigit(code)) {\n const digits = [code];\n for (let total = 0; total < 5; total++) {\n if (hexdigit(next())) {\n consume();\n digits.push(code);\n } else {\n break;\n }\n }\n if (whitespace(next()))\n consume();\n let value = parseInt(digits.map(function(x) {\n return String.fromCharCode(x);\n }).join(\"\"), 16);\n if (value > maximumallowedcodepoint)\n value = 65533;\n return value;\n } else if (eof()) {\n return 65533;\n } else {\n return code;\n }\n };\n const areAValidEscape = function(c1, c2) {\n if (c1 !== 92)\n return false;\n if (newline(c2))\n return false;\n return true;\n };\n const startsWithAValidEscape = function() {\n return areAValidEscape(code, next());\n };\n const wouldStartAnIdentifier = function(c1, c2, c3) {\n if (c1 === 45)\n return namestartchar(c2) || c2 === 45 || areAValidEscape(c2, c3);\n else if (namestartchar(c1))\n return true;\n else if (c1 === 92)\n return areAValidEscape(c1, c2);\n else\n return false;\n };\n const startsWithAnIdentifier = function() {\n return wouldStartAnIdentifier(code, next(1), next(2));\n };\n const wouldStartANumber = function(c1, c2, c3) {\n if (c1 === 43 || c1 === 45) {\n if (digit(c2))\n return true;\n if (c2 === 46 && digit(c3))\n return true;\n return false;\n } else if (c1 === 46) {\n if (digit(c2))\n return true;\n return false;\n } else if (digit(c1)) {\n return true;\n } else {\n return false;\n }\n };\n const startsWithANumber = function() {\n return wouldStartANumber(code, next(1), next(2));\n };\n const consumeAName = function() {\n let result = \"\";\n while (consume()) {\n if (namechar(code)) {\n result += stringFromCode(code);\n } else if (startsWithAValidEscape()) {\n result += stringFromCode(consumeEscape());\n } else {\n reconsume();\n return result;\n }\n }\n throw new Error(\"Internal parse error\");\n };\n const consumeANumber = function() {\n let repr = \"\";\n let type = \"integer\";\n if (next() === 43 || next() === 45) {\n consume();\n repr += stringFromCode(code);\n }\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n if (next(1) === 46 && digit(next(2))) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n }\n const c1 = next(1), c2 = next(2), c3 = next(3);\n if ((c1 === 69 || c1 === 101) && digit(c2)) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n } else if ((c1 === 69 || c1 === 101) && (c2 === 43 || c2 === 45) && digit(c3)) {\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n consume();\n repr += stringFromCode(code);\n type = \"number\";\n while (digit(next())) {\n consume();\n repr += stringFromCode(code);\n }\n }\n const value = convertAStringToANumber(repr);\n return { type, value, repr };\n };\n const convertAStringToANumber = function(string) {\n return +string;\n };\n const consumeTheRemnantsOfABadURL = function() {\n while (consume()) {\n if (code === 41 || eof()) {\n return;\n } else if (startsWithAValidEscape()) {\n consumeEscape();\n donothing();\n } else {\n donothing();\n }\n }\n };\n let iterationCount = 0;\n while (!eof(next())) {\n tokens.push(consumeAToken());\n iterationCount++;\n if (iterationCount > str.length * 2)\n throw new Error(\"I'm infinite-looping!\");\n }\n return tokens;\n}\nvar CSSParserToken = class {\n constructor() {\n this.tokenType = \"\";\n }\n toJSON() {\n return { token: this.tokenType };\n }\n toString() {\n return this.tokenType;\n }\n toSource() {\n return \"\" + this;\n }\n};\nvar BadStringToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"BADSTRING\";\n }\n};\nvar BadURLToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"BADURL\";\n }\n};\nvar WhitespaceToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"WHITESPACE\";\n }\n toString() {\n return \"WS\";\n }\n toSource() {\n return \" \";\n }\n};\nvar CDOToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"CDO\";\n }\n toSource() {\n return \"\";\n }\n};\nvar ColonToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \":\";\n }\n};\nvar SemicolonToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \";\";\n }\n};\nvar CommaToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \",\";\n }\n};\nvar GroupingToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.value = \"\";\n this.mirror = \"\";\n }\n};\nvar OpenCurlyToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"{\";\n this.value = \"{\";\n this.mirror = \"}\";\n }\n};\nvar CloseCurlyToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"}\";\n this.value = \"}\";\n this.mirror = \"{\";\n }\n};\nvar OpenSquareToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"[\";\n this.value = \"[\";\n this.mirror = \"]\";\n }\n};\nvar CloseSquareToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"]\";\n this.value = \"]\";\n this.mirror = \"[\";\n }\n};\nvar OpenParenToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \"(\";\n this.value = \"(\";\n this.mirror = \")\";\n }\n};\nvar CloseParenToken = class extends GroupingToken {\n constructor() {\n super();\n this.tokenType = \")\";\n this.value = \")\";\n this.mirror = \"(\";\n }\n};\nvar IncludeMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"~=\";\n }\n};\nvar DashMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"|=\";\n }\n};\nvar PrefixMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"^=\";\n }\n};\nvar SuffixMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"$=\";\n }\n};\nvar SubstringMatchToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"*=\";\n }\n};\nvar ColumnToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"||\";\n }\n};\nvar EOFToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.tokenType = \"EOF\";\n }\n toSource() {\n return \"\";\n }\n};\nvar DelimToken = class extends CSSParserToken {\n constructor(code) {\n super();\n this.tokenType = \"DELIM\";\n this.value = \"\";\n this.value = stringFromCode(code);\n }\n toString() {\n return \"DELIM(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n return json;\n }\n toSource() {\n if (this.value === \"\\\\\")\n return \"\\\\\\n\";\n else\n return this.value;\n }\n};\nvar StringValuedToken = class extends CSSParserToken {\n constructor() {\n super(...arguments);\n this.value = \"\";\n }\n ASCIIMatch(str) {\n return this.value.toLowerCase() === str.toLowerCase();\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n return json;\n }\n};\nvar IdentToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"IDENT\";\n this.value = val;\n }\n toString() {\n return \"IDENT(\" + this.value + \")\";\n }\n toSource() {\n return escapeIdent(this.value);\n }\n};\nvar FunctionToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"FUNCTION\";\n this.value = val;\n this.mirror = \")\";\n }\n toString() {\n return \"FUNCTION(\" + this.value + \")\";\n }\n toSource() {\n return escapeIdent(this.value) + \"(\";\n }\n};\nvar AtKeywordToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"AT-KEYWORD\";\n this.value = val;\n }\n toString() {\n return \"AT(\" + this.value + \")\";\n }\n toSource() {\n return \"@\" + escapeIdent(this.value);\n }\n};\nvar HashToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"HASH\";\n this.value = val;\n this.type = \"unrestricted\";\n }\n toString() {\n return \"HASH(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.type = this.type;\n return json;\n }\n toSource() {\n if (this.type === \"id\")\n return \"#\" + escapeIdent(this.value);\n else\n return \"#\" + escapeHash(this.value);\n }\n};\nvar StringToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"STRING\";\n this.value = val;\n }\n toString() {\n return '\"' + escapeString(this.value) + '\"';\n }\n};\nvar URLToken = class extends StringValuedToken {\n constructor(val) {\n super();\n this.tokenType = \"URL\";\n this.value = val;\n }\n toString() {\n return \"URL(\" + this.value + \")\";\n }\n toSource() {\n return 'url(\"' + escapeString(this.value) + '\")';\n }\n};\nvar NumberToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"NUMBER\";\n this.type = \"integer\";\n this.repr = \"\";\n }\n toString() {\n if (this.type === \"integer\")\n return \"INT(\" + this.value + \")\";\n return \"NUMBER(\" + this.value + \")\";\n }\n toJSON() {\n const json = super.toJSON();\n json.value = this.value;\n json.type = this.type;\n json.repr = this.repr;\n return json;\n }\n toSource() {\n return this.repr;\n }\n};\nvar PercentageToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"PERCENTAGE\";\n this.repr = \"\";\n }\n toString() {\n return \"PERCENTAGE(\" + this.value + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.repr = this.repr;\n return json;\n }\n toSource() {\n return this.repr + \"%\";\n }\n};\nvar DimensionToken = class extends CSSParserToken {\n constructor() {\n super();\n this.tokenType = \"DIMENSION\";\n this.type = \"integer\";\n this.repr = \"\";\n this.unit = \"\";\n }\n toString() {\n return \"DIM(\" + this.value + \",\" + this.unit + \")\";\n }\n toJSON() {\n const json = this.constructor.prototype.constructor.prototype.toJSON.call(this);\n json.value = this.value;\n json.type = this.type;\n json.repr = this.repr;\n json.unit = this.unit;\n return json;\n }\n toSource() {\n const source = this.repr;\n let unit = escapeIdent(this.unit);\n if (unit[0].toLowerCase() === \"e\" && (unit[1] === \"-\" || between(unit.charCodeAt(1), 48, 57))) {\n unit = \"\\\\65 \" + unit.slice(1, unit.length);\n }\n return source + unit;\n }\n};\nfunction escapeIdent(string) {\n string = \"\" + string;\n let result = \"\";\n const firstcode = string.charCodeAt(0);\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (between(code, 1, 31) || code === 127 || i === 0 && between(code, 48, 57) || i === 1 && between(code, 48, 57) && firstcode === 45)\n result += \"\\\\\" + code.toString(16) + \" \";\n else if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))\n result += string[i];\n else\n result += \"\\\\\" + string[i];\n }\n return result;\n}\nfunction escapeHash(string) {\n string = \"\" + string;\n let result = \"\";\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (code >= 128 || code === 45 || code === 95 || between(code, 48, 57) || between(code, 65, 90) || between(code, 97, 122))\n result += string[i];\n else\n result += \"\\\\\" + code.toString(16) + \" \";\n }\n return result;\n}\nfunction escapeString(string) {\n string = \"\" + string;\n let result = \"\";\n for (let i = 0; i < string.length; i++) {\n const code = string.charCodeAt(i);\n if (code === 0)\n throw new InvalidCharacterError(\"Invalid character: the input contains U+0000.\");\n if (between(code, 1, 31) || code === 127)\n result += \"\\\\\" + code.toString(16) + \" \";\n else if (code === 34 || code === 92)\n result += \"\\\\\" + string[i];\n else\n result += string[i];\n }\n return result;\n}\n\n// packages/playwright-core/src/utils/isomorphic/cssParser.ts\nvar InvalidSelectorError = class extends Error {\n};\nfunction parseCSS(selector, customNames) {\n let tokens;\n try {\n tokens = tokenize(selector);\n if (!(tokens[tokens.length - 1] instanceof EOFToken))\n tokens.push(new EOFToken());\n } catch (e) {\n const newMessage = e.message + ` while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`;\n const index = (e.stack || \"\").indexOf(e.message);\n if (index !== -1)\n e.stack = e.stack.substring(0, index) + newMessage + e.stack.substring(index + e.message.length);\n e.message = newMessage;\n throw e;\n }\n const unsupportedToken = tokens.find((token) => {\n return token instanceof AtKeywordToken || token instanceof BadStringToken || token instanceof BadURLToken || token instanceof ColumnToken || token instanceof CDOToken || token instanceof CDCToken || token instanceof SemicolonToken || // TODO: Consider using these for something, e.g. to escape complex strings.\n // For example :xpath{ (//div/bar[@attr=\"foo\"])[2]/baz }\n // Or this way :xpath( {complex-xpath-goes-here(\"hello\")} )\n token instanceof OpenCurlyToken || token instanceof CloseCurlyToken || // TODO: Consider treating these as strings?\n token instanceof URLToken || token instanceof PercentageToken;\n });\n if (unsupportedToken)\n throw new InvalidSelectorError(`Unsupported token \"${unsupportedToken.toSource()}\" while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n let pos = 0;\n const names = /* @__PURE__ */ new Set();\n function unexpected() {\n return new InvalidSelectorError(`Unexpected token \"${tokens[pos].toSource()}\" while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n }\n function skipWhitespace() {\n while (tokens[pos] instanceof WhitespaceToken)\n pos++;\n }\n function isIdent(p = pos) {\n return tokens[p] instanceof IdentToken;\n }\n function isString(p = pos) {\n return tokens[p] instanceof StringToken;\n }\n function isNumber(p = pos) {\n return tokens[p] instanceof NumberToken;\n }\n function isComma(p = pos) {\n return tokens[p] instanceof CommaToken;\n }\n function isOpenParen(p = pos) {\n return tokens[p] instanceof OpenParenToken;\n }\n function isCloseParen(p = pos) {\n return tokens[p] instanceof CloseParenToken;\n }\n function isFunction(p = pos) {\n return tokens[p] instanceof FunctionToken;\n }\n function isStar(p = pos) {\n return tokens[p] instanceof DelimToken && tokens[p].value === \"*\";\n }\n function isEOF(p = pos) {\n return tokens[p] instanceof EOFToken;\n }\n function isClauseCombinator(p = pos) {\n return tokens[p] instanceof DelimToken && [\">\", \"+\", \"~\"].includes(tokens[p].value);\n }\n function isSelectorClauseEnd(p = pos) {\n return isComma(p) || isCloseParen(p) || isEOF(p) || isClauseCombinator(p) || tokens[p] instanceof WhitespaceToken;\n }\n function consumeFunctionArguments() {\n const result2 = [consumeArgument()];\n while (true) {\n skipWhitespace();\n if (!isComma())\n break;\n pos++;\n result2.push(consumeArgument());\n }\n return result2;\n }\n function consumeArgument() {\n skipWhitespace();\n if (isNumber())\n return tokens[pos++].value;\n if (isString())\n return tokens[pos++].value;\n return consumeComplexSelector();\n }\n function consumeComplexSelector() {\n const result2 = { simples: [] };\n skipWhitespace();\n if (isClauseCombinator()) {\n result2.simples.push({ selector: { functions: [{ name: \"scope\", args: [] }] }, combinator: \"\" });\n } else {\n result2.simples.push({ selector: consumeSimpleSelector(), combinator: \"\" });\n }\n while (true) {\n skipWhitespace();\n if (isClauseCombinator()) {\n result2.simples[result2.simples.length - 1].combinator = tokens[pos++].value;\n skipWhitespace();\n } else if (isSelectorClauseEnd()) {\n break;\n }\n result2.simples.push({ combinator: \"\", selector: consumeSimpleSelector() });\n }\n return result2;\n }\n function consumeSimpleSelector() {\n let rawCSSString = \"\";\n const functions = [];\n while (!isSelectorClauseEnd()) {\n if (isIdent() || isStar()) {\n rawCSSString += tokens[pos++].toSource();\n } else if (tokens[pos] instanceof HashToken) {\n rawCSSString += tokens[pos++].toSource();\n } else if (tokens[pos] instanceof DelimToken && tokens[pos].value === \".\") {\n pos++;\n if (isIdent())\n rawCSSString += \".\" + tokens[pos++].toSource();\n else\n throw unexpected();\n } else if (tokens[pos] instanceof ColonToken) {\n pos++;\n if (isIdent()) {\n if (!customNames.has(tokens[pos].value.toLowerCase())) {\n rawCSSString += \":\" + tokens[pos++].toSource();\n } else {\n const name = tokens[pos++].value.toLowerCase();\n functions.push({ name, args: [] });\n names.add(name);\n }\n } else if (isFunction()) {\n const name = tokens[pos++].value.toLowerCase();\n if (!customNames.has(name)) {\n rawCSSString += `:${name}(${consumeBuiltinFunctionArguments()})`;\n } else {\n functions.push({ name, args: consumeFunctionArguments() });\n names.add(name);\n }\n skipWhitespace();\n if (!isCloseParen())\n throw unexpected();\n pos++;\n } else {\n throw unexpected();\n }\n } else if (tokens[pos] instanceof OpenSquareToken) {\n rawCSSString += \"[\";\n pos++;\n while (!(tokens[pos] instanceof CloseSquareToken) && !isEOF())\n rawCSSString += tokens[pos++].toSource();\n if (!(tokens[pos] instanceof CloseSquareToken))\n throw unexpected();\n rawCSSString += \"]\";\n pos++;\n } else {\n throw unexpected();\n }\n }\n if (!rawCSSString && !functions.length)\n throw unexpected();\n return { css: rawCSSString || void 0, functions };\n }\n function consumeBuiltinFunctionArguments() {\n let s = \"\";\n let balance = 1;\n while (!isEOF()) {\n if (isOpenParen() || isFunction())\n balance++;\n if (isCloseParen())\n balance--;\n if (!balance)\n break;\n s += tokens[pos++].toSource();\n }\n return s;\n }\n const result = consumeFunctionArguments();\n if (!isEOF())\n throw unexpected();\n if (result.some((arg) => typeof arg !== \"object\" || !(\"simples\" in arg)))\n throw new InvalidSelectorError(`Error while parsing css selector \"${selector}\". Did you mean to CSS.escape it?`);\n return { selector: result, names: Array.from(names) };\n}\n\n// packages/playwright-core/src/utils/isomorphic/selectorParser.ts\nvar kNestedSelectorNames = /* @__PURE__ */ new Set([\"internal:has\", \"internal:has-not\", \"internal:and\", \"internal:or\", \"internal:chain\", \"left-of\", \"right-of\", \"above\", \"below\", \"near\"]);\nvar kNestedSelectorNamesWithDistance = /* @__PURE__ */ new Set([\"left-of\", \"right-of\", \"above\", \"below\", \"near\"]);\nvar customCSSNames = /* @__PURE__ */ 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\"]);\nfunction parseSelector(selector) {\n const parsedStrings = parseSelectorString(selector);\n const parts = [];\n for (const part of parsedStrings.parts) {\n if (part.name === \"css\" || part.name === \"css:light\") {\n if (part.name === \"css:light\")\n part.body = \":light(\" + part.body + \")\";\n const parsedCSS = parseCSS(part.body, customCSSNames);\n parts.push({\n name: \"css\",\n body: parsedCSS.selector,\n source: part.body\n });\n continue;\n }\n if (kNestedSelectorNames.has(part.name)) {\n let innerSelector;\n let distance;\n try {\n const unescaped = JSON.parse(\"[\" + part.body + \"]\");\n if (!Array.isArray(unescaped) || unescaped.length < 1 || unescaped.length > 2 || typeof unescaped[0] !== \"string\")\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n innerSelector = unescaped[0];\n if (unescaped.length === 2) {\n if (typeof unescaped[1] !== \"number\" || !kNestedSelectorNamesWithDistance.has(part.name))\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n distance = unescaped[1];\n }\n } catch (e) {\n throw new InvalidSelectorError(`Malformed selector: ${part.name}=` + part.body);\n }\n const nested = { name: part.name, source: part.body, body: { parsed: parseSelector(innerSelector), distance } };\n const lastFrame = [...nested.body.parsed.parts].reverse().find((part2) => part2.name === \"internal:control\" && part2.body === \"enter-frame\");\n const lastFrameIndex = lastFrame ? nested.body.parsed.parts.indexOf(lastFrame) : -1;\n if (lastFrameIndex !== -1 && selectorPartsEqual(nested.body.parsed.parts.slice(0, lastFrameIndex + 1), parts.slice(0, lastFrameIndex + 1)))\n nested.body.parsed.parts.splice(0, lastFrameIndex + 1);\n parts.push(nested);\n continue;\n }\n parts.push({ ...part, source: part.body });\n }\n if (kNestedSelectorNames.has(parts[0].name))\n throw new InvalidSelectorError(`\"${parts[0].name}\" selector cannot be first`);\n return {\n capture: parsedStrings.capture,\n parts\n };\n}\nfunction selectorPartsEqual(list1, list2) {\n return stringifySelector({ parts: list1 }) === stringifySelector({ parts: list2 });\n}\nfunction stringifySelector(selector, forceEngineName) {\n if (typeof selector === \"string\")\n return selector;\n return selector.parts.map((p, i) => {\n let includeEngine = true;\n if (!forceEngineName && i !== selector.capture) {\n if (p.name === \"css\")\n includeEngine = false;\n else if (p.name === \"xpath\" && p.source.startsWith(\"//\") || p.source.startsWith(\"..\"))\n includeEngine = false;\n }\n const prefix = includeEngine ? p.name + \"=\" : \"\";\n return `${i === selector.capture ? \"*\" : \"\"}${prefix}${p.source}`;\n }).join(\" >> \");\n}\nfunction visitAllSelectorParts(selector, visitor) {\n const visit = (selector2, nested) => {\n for (const part of selector2.parts) {\n visitor(part, nested);\n if (kNestedSelectorNames.has(part.name))\n visit(part.body.parsed, true);\n }\n };\n visit(selector, false);\n}\nfunction parseSelectorString(selector) {\n let index = 0;\n let quote;\n let start = 0;\n const result = { parts: [] };\n const append = () => {\n const part = selector.substring(start, index).trim();\n const eqIndex = part.indexOf(\"=\");\n let name;\n let body;\n if (eqIndex !== -1 && part.substring(0, eqIndex).trim().match(/^[a-zA-Z_0-9-+:*]+$/)) {\n name = part.substring(0, eqIndex).trim();\n body = part.substring(eqIndex + 1);\n } else if (part.length > 1 && part[0] === '\"' && part[part.length - 1] === '\"') {\n name = \"text\";\n body = part;\n } else if (part.length > 1 && part[0] === \"'\" && part[part.length - 1] === \"'\") {\n name = \"text\";\n body = part;\n } else if (/^\\(*\\/\\//.test(part) || part.startsWith(\"..\")) {\n name = \"xpath\";\n body = part;\n } else {\n name = \"css\";\n body = part;\n }\n let capture = false;\n if (name[0] === \"*\") {\n capture = true;\n name = name.substring(1);\n }\n result.parts.push({ name, body });\n if (capture) {\n if (result.capture !== void 0)\n throw new InvalidSelectorError(`Only one of the selectors can capture using * modifier`);\n result.capture = result.parts.length - 1;\n }\n };\n if (!selector.includes(\">>\")) {\n index = selector.length;\n append();\n return result;\n }\n const shouldIgnoreTextSelectorQuote = () => {\n const prefix = selector.substring(start, index);\n const match = prefix.match(/^\\s*text\\s*=(.*)$/);\n return !!match && !!match[1];\n };\n while (index < selector.length) {\n const c = selector[index];\n if (c === \"\\\\\" && index + 1 < selector.length) {\n index += 2;\n } else if (c === quote) {\n quote = void 0;\n index++;\n } else if (!quote && (c === '\"' || c === \"'\" || c === \"`\") && !shouldIgnoreTextSelectorQuote()) {\n quote = c;\n index++;\n } else if (!quote && c === \">\" && selector[index + 1] === \">\") {\n append();\n index += 2;\n start = index;\n } else {\n index++;\n }\n }\n append();\n return result;\n}\nfunction parseAttributeSelector(selector, allowUnquotedStrings) {\n let wp = 0;\n let EOL = selector.length === 0;\n const next = () => selector[wp] || \"\";\n const eat1 = () => {\n const result2 = next();\n ++wp;\n EOL = wp >= selector.length;\n return result2;\n };\n const syntaxError = (stage) => {\n if (EOL)\n throw new InvalidSelectorError(`Unexpected end of selector while parsing selector \\`${selector}\\``);\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - unexpected symbol \"${next()}\" at position ${wp}` + (stage ? \" during \" + stage : \"\"));\n };\n function skipSpaces() {\n while (!EOL && /\\s/.test(next()))\n eat1();\n }\n function isCSSNameChar(char) {\n return char >= \"\\x80\" || char >= \"0\" && char <= \"9\" || char >= \"A\" && char <= \"Z\" || char >= \"a\" && char <= \"z\" || char >= \"0\" && char <= \"9\" || char === \"_\" || char === \"-\";\n }\n function readIdentifier() {\n let result2 = \"\";\n skipSpaces();\n while (!EOL && isCSSNameChar(next()))\n result2 += eat1();\n return result2;\n }\n function readQuotedString(quote) {\n let result2 = eat1();\n if (result2 !== quote)\n syntaxError(\"parsing quoted string\");\n while (!EOL && next() !== quote) {\n if (next() === \"\\\\\")\n eat1();\n result2 += eat1();\n }\n if (next() !== quote)\n syntaxError(\"parsing quoted string\");\n result2 += eat1();\n return result2;\n }\n function readRegularExpression() {\n if (eat1() !== \"/\")\n syntaxError(\"parsing regular expression\");\n let source = \"\";\n let inClass = false;\n while (!EOL) {\n if (next() === \"\\\\\") {\n source += eat1();\n if (EOL)\n syntaxError(\"parsing regular expression\");\n } else if (inClass && next() === \"]\") {\n inClass = false;\n } else if (!inClass && next() === \"[\") {\n inClass = true;\n } else if (!inClass && next() === \"/\") {\n break;\n }\n source += eat1();\n }\n if (eat1() !== \"/\")\n syntaxError(\"parsing regular expression\");\n let flags = \"\";\n while (!EOL && next().match(/[dgimsuy]/))\n flags += eat1();\n try {\n return new RegExp(source, flags);\n } catch (e) {\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\`: ${e.message}`);\n }\n }\n function readAttributeToken() {\n let token = \"\";\n skipSpaces();\n if (next() === `'` || next() === `\"`)\n token = readQuotedString(next()).slice(1, -1);\n else\n token = readIdentifier();\n if (!token)\n syntaxError(\"parsing property path\");\n return token;\n }\n function readOperator() {\n skipSpaces();\n let op = \"\";\n if (!EOL)\n op += eat1();\n if (!EOL && op !== \"=\")\n op += eat1();\n if (![\"=\", \"*=\", \"^=\", \"$=\", \"|=\", \"~=\"].includes(op))\n syntaxError(\"parsing operator\");\n return op;\n }\n function readAttribute() {\n eat1();\n const jsonPath = [];\n jsonPath.push(readAttributeToken());\n skipSpaces();\n while (next() === \".\") {\n eat1();\n jsonPath.push(readAttributeToken());\n skipSpaces();\n }\n if (next() === \"]\") {\n eat1();\n return { name: jsonPath.join(\".\"), jsonPath, op: \"\", value: null, caseSensitive: false };\n }\n const operator = readOperator();\n let value = void 0;\n let caseSensitive = true;\n skipSpaces();\n if (next() === \"/\") {\n if (operator !== \"=\")\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - cannot use ${operator} in attribute with regular expression`);\n value = readRegularExpression();\n } else if (next() === `'` || next() === `\"`) {\n value = readQuotedString(next()).slice(1, -1);\n skipSpaces();\n if (next() === \"i\" || next() === \"I\") {\n caseSensitive = false;\n eat1();\n } else if (next() === \"s\" || next() === \"S\") {\n caseSensitive = true;\n eat1();\n }\n } else {\n value = \"\";\n while (!EOL && (isCSSNameChar(next()) || next() === \"+\" || next() === \".\"))\n value += eat1();\n if (value === \"true\") {\n value = true;\n } else if (value === \"false\") {\n value = false;\n } else {\n if (!allowUnquotedStrings) {\n value = +value;\n if (Number.isNaN(value))\n syntaxError(\"parsing attribute value\");\n }\n }\n }\n skipSpaces();\n if (next() !== \"]\")\n syntaxError(\"parsing attribute value\");\n eat1();\n if (operator !== \"=\" && typeof value !== \"string\")\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - cannot use ${operator} in attribute with non-string matching value - ${value}`);\n return { name: jsonPath.join(\".\"), jsonPath, op: operator, value, caseSensitive };\n }\n const result = {\n name: \"\",\n attributes: []\n };\n result.name = readIdentifier();\n skipSpaces();\n while (next() === \"[\") {\n result.attributes.push(readAttribute());\n skipSpaces();\n }\n if (!EOL)\n syntaxError(void 0);\n if (!result.name && !result.attributes.length)\n throw new InvalidSelectorError(`Error while parsing selector \\`${selector}\\` - selector cannot be empty`);\n return result;\n}\n\n// packages/playwright-core/src/server/injected/reactSelectorEngine.ts\nfunction getFunctionComponentName(component) {\n return component.displayName || component.name || \"Anonymous\";\n}\nfunction getComponentName(reactElement) {\n if (reactElement.type) {\n switch (typeof reactElement.type) {\n case \"function\":\n return getFunctionComponentName(reactElement.type);\n case \"string\":\n return reactElement.type;\n case \"object\":\n return reactElement.type.displayName || (reactElement.type.render ? getFunctionComponentName(reactElement.type.render) : \"\");\n }\n }\n if (reactElement._currentElement) {\n const elementType = reactElement._currentElement.type;\n if (typeof elementType === \"string\")\n return elementType;\n if (typeof elementType === \"function\")\n return elementType.displayName || elementType.name || \"Anonymous\";\n }\n return \"\";\n}\nfunction getComponentKey(reactElement) {\n var _a, _b;\n return (_b = reactElement.key) != null ? _b : (_a = reactElement._currentElement) == null ? void 0 : _a.key;\n}\nfunction getChildren(reactElement) {\n if (reactElement.child) {\n const children = [];\n for (let child = reactElement.child; child; child = child.sibling)\n children.push(child);\n return children;\n }\n if (!reactElement._currentElement)\n return [];\n const isKnownElement = (reactElement2) => {\n var _a;\n const elementType = (_a = reactElement2._currentElement) == null ? void 0 : _a.type;\n return typeof elementType === \"function\" || typeof elementType === \"string\";\n };\n if (reactElement._renderedComponent) {\n const child = reactElement._renderedComponent;\n return isKnownElement(child) ? [child] : [];\n }\n if (reactElement._renderedChildren)\n return [...Object.values(reactElement._renderedChildren)].filter(isKnownElement);\n return [];\n}\nfunction getProps(reactElement) {\n var _a;\n const props = (\n // React 16+\n reactElement.memoizedProps || // React 15\n ((_a = reactElement._currentElement) == null ? void 0 : _a.props)\n );\n if (!props || typeof props === \"string\")\n return props;\n const result = { ...props };\n delete result.children;\n return result;\n}\nfunction buildComponentsTree(reactElement) {\n var _a;\n const treeNode = {\n key: getComponentKey(reactElement),\n name: getComponentName(reactElement),\n children: getChildren(reactElement).map(buildComponentsTree),\n rootElements: [],\n props: getProps(reactElement)\n };\n const rootElement = (\n // React 16+\n // @see https://github.com/baruchvlz/resq/blob/5c15a5e04d3f7174087248f5a158c3d6dcc1ec72/src/utils.js#L29\n reactElement.stateNode || // React 15\n reactElement._hostNode || ((_a = reactElement._renderedComponent) == null ? void 0 : _a._hostNode)\n );\n if (rootElement instanceof Element) {\n treeNode.rootElements.push(rootElement);\n } else {\n for (const child of treeNode.children)\n treeNode.rootElements.push(...child.rootElements);\n }\n return treeNode;\n}\nfunction filterComponentsTree(treeNode, searchFn, result = []) {\n if (searchFn(treeNode))\n result.push(treeNode);\n for (const child of treeNode.children)\n filterComponentsTree(child, searchFn, result);\n return result;\n}\nfunction findReactRoots(root, roots = []) {\n const document = root.ownerDocument || root;\n const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT);\n do {\n const node = walker.currentNode;\n const reactNode = node;\n const rootKey = Object.keys(reactNode).find((key) => key.startsWith(\"__reactContainer\") && reactNode[key] !== null);\n if (rootKey) {\n roots.push(reactNode[rootKey].stateNode.current);\n } else {\n const legacyRootKey = \"_reactRootContainer\";\n if (reactNode.hasOwnProperty(legacyRootKey) && reactNode[legacyRootKey] !== null) {\n roots.push(reactNode[legacyRootKey]._internalRoot.current);\n }\n }\n if (node instanceof Element && node.hasAttribute(\"data-reactroot\")) {\n for (const key of Object.keys(node)) {\n if (key.startsWith(\"__reactInternalInstance\") || key.startsWith(\"__reactFiber\"))\n roots.push(node[key]);\n }\n }\n const shadowRoot = node instanceof Element ? node.shadowRoot : null;\n if (shadowRoot)\n findReactRoots(shadowRoot, roots);\n } while (walker.nextNode());\n return roots;\n}\nvar ReactEngine = {\n queryAll(scope, selector) {\n const { name, attributes } = parseAttributeSelector(selector, false);\n const reactRoots = findReactRoots(scope.ownerDocument || scope);\n const trees = reactRoots.map((reactRoot) => buildComponentsTree(reactRoot));\n const treeNodes = trees.map((tree) => filterComponentsTree(tree, (treeNode) => {\n var _a;\n const props = (_a = treeNode.props) != null ? _a : {};\n if (treeNode.key !== void 0)\n props.key = treeNode.key;\n if (name && treeNode.name !== name)\n return false;\n if (treeNode.rootElements.some((domNode) => !isInsideScope(scope, domNode)))\n return false;\n for (const attr of attributes) {\n if (!matchesComponentAttribute(props, attr))\n return false;\n }\n return true;\n })).flat();\n const allRootElements = /* @__PURE__ */ new Set();\n for (const treeNode of treeNodes) {\n for (const domNode of treeNode.rootElements)\n allRootElements.add(domNode);\n }\n return [...allRootElements];\n }\n};\n\n// packages/playwright-core/src/server/injected/vueSelectorEngine.ts\nfunction basename(filename, ext) {\n const normalized = filename.replace(/^[a-zA-Z]:/, \"\").replace(/\\\\/g, \"/\");\n let result = normalized.substring(normalized.lastIndexOf(\"/\") + 1);\n if (ext && result.endsWith(ext))\n result = result.substring(0, result.length - ext.length);\n return result;\n}\nfunction toUpper(_, c) {\n return c ? c.toUpperCase() : \"\";\n}\nvar classifyRE = /(?:^|[-_/])(\\w)/g;\nvar classify = (str) => {\n return str && str.replace(classifyRE, toUpper);\n};\nfunction buildComponentsTreeVue3(instance) {\n function getComponentTypeName(options) {\n const name = options.name || options._componentTag || options.__playwright_guessedName;\n if (name)\n return name;\n const file = options.__file;\n if (file)\n return classify(basename(file, \".vue\"));\n }\n function saveComponentName(instance2, key) {\n instance2.type.__playwright_guessedName = key;\n return key;\n }\n function getInstanceName(instance2) {\n var _a, _b, _c, _d;\n const name = getComponentTypeName(instance2.type || {});\n if (name)\n return name;\n if (instance2.root === instance2)\n return \"Root\";\n for (const key in (_b = (_a = instance2.parent) == null ? void 0 : _a.type) == null ? void 0 : _b.components) {\n if (((_c = instance2.parent) == null ? void 0 : _c.type.components[key]) === instance2.type)\n return saveComponentName(instance2, key);\n }\n for (const key in (_d = instance2.appContext) == null ? void 0 : _d.components) {\n if (instance2.appContext.components[key] === instance2.type)\n return saveComponentName(instance2, key);\n }\n return \"Anonymous Component\";\n }\n function isBeingDestroyed(instance2) {\n return instance2._isBeingDestroyed || instance2.isUnmounted;\n }\n function isFragment(instance2) {\n return instance2.subTree.type.toString() === \"Symbol(Fragment)\";\n }\n function getInternalInstanceChildren(subTree) {\n const list = [];\n if (subTree.component)\n list.push(subTree.component);\n if (subTree.suspense)\n list.push(...getInternalInstanceChildren(subTree.suspense.activeBranch));\n if (Array.isArray(subTree.children)) {\n subTree.children.forEach((childSubTree) => {\n if (childSubTree.component)\n list.push(childSubTree.component);\n else\n list.push(...getInternalInstanceChildren(childSubTree));\n });\n }\n return list.filter((child) => {\n var _a;\n return !isBeingDestroyed(child) && !((_a = child.type.devtools) == null ? void 0 : _a.hide);\n });\n }\n function getRootElementsFromComponentInstance(instance2) {\n if (isFragment(instance2))\n return getFragmentRootElements(instance2.subTree);\n return [instance2.subTree.el];\n }\n function getFragmentRootElements(vnode) {\n if (!vnode.children)\n return [];\n const list = [];\n for (let i = 0, l = vnode.children.length; i < l; i++) {\n const childVnode = vnode.children[i];\n if (childVnode.component)\n list.push(...getRootElementsFromComponentInstance(childVnode.component));\n else if (childVnode.el)\n list.push(childVnode.el);\n }\n return list;\n }\n function buildComponentsTree2(instance2) {\n return {\n name: getInstanceName(instance2),\n children: getInternalInstanceChildren(instance2.subTree).map(buildComponentsTree2),\n rootElements: getRootElementsFromComponentInstance(instance2),\n props: instance2.props\n };\n }\n return buildComponentsTree2(instance);\n}\nfunction buildComponentsTreeVue2(instance) {\n function getComponentName2(options) {\n const name = options.displayName || options.name || options._componentTag;\n if (name)\n return name;\n const file = options.__file;\n if (file)\n return classify(basename(file, \".vue\"));\n }\n function getInstanceName(instance2) {\n const name = getComponentName2(instance2.$options || instance2.fnOptions || {});\n if (name)\n return name;\n return instance2.$root === instance2 ? \"Root\" : \"Anonymous Component\";\n }\n function getInternalInstanceChildren(instance2) {\n if (instance2.$children)\n return instance2.$children;\n if (Array.isArray(instance2.subTree.children))\n return instance2.subTree.children.filter((vnode) => !!vnode.component).map((vnode) => vnode.component);\n return [];\n }\n function buildComponentsTree2(instance2) {\n return {\n name: getInstanceName(instance2),\n children: getInternalInstanceChildren(instance2).map(buildComponentsTree2),\n rootElements: [instance2.$el],\n props: instance2._props\n };\n }\n return buildComponentsTree2(instance);\n}\nfunction filterComponentsTree2(treeNode, searchFn, result = []) {\n if (searchFn(treeNode))\n result.push(treeNode);\n for (const child of treeNode.children)\n filterComponentsTree2(child, searchFn, result);\n return result;\n}\nfunction findVueRoots(root, roots = []) {\n const document = root.ownerDocument || root;\n const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT);\n const vue2Roots = /* @__PURE__ */ new Set();\n do {\n const node = walker.currentNode;\n if (node.__vue__)\n vue2Roots.add(node.__vue__.$root);\n if (node.__vue_app__ && node._vnode && node._vnode.component)\n roots.push({ root: node._vnode.component, version: 3 });\n const shadowRoot = node instanceof Element ? node.shadowRoot : null;\n if (shadowRoot)\n findVueRoots(shadowRoot, roots);\n } while (walker.nextNode());\n for (const vue2root of vue2Roots) {\n roots.push({\n version: 2,\n root: vue2root\n });\n }\n return roots;\n}\nvar VueEngine = {\n queryAll(scope, selector) {\n const document = scope.ownerDocument || scope;\n const { name, attributes } = parseAttributeSelector(selector, false);\n const vueRoots = findVueRoots(document);\n const trees = vueRoots.map((vueRoot) => vueRoot.version === 3 ? buildComponentsTreeVue3(vueRoot.root) : buildComponentsTreeVue2(vueRoot.root));\n const treeNodes = trees.map((tree) => filterComponentsTree2(tree, (treeNode) => {\n if (name && treeNode.name !== name)\n return false;\n if (treeNode.rootElements.some((rootElement) => !isInsideScope(scope, rootElement)))\n return false;\n for (const attr of attributes) {\n if (!matchesComponentAttribute(treeNode.props, attr))\n return false;\n }\n return true;\n })).flat();\n const allRootElements = /* @__PURE__ */ new Set();\n for (const treeNode of treeNodes) {\n for (const rootElement of treeNode.rootElements)\n allRootElements.add(rootElement);\n }\n return [...allRootElements];\n }\n};\n\n// packages/playwright-core/src/server/injected/roleSelectorEngine.ts\nvar kSupportedAttributes = [\"selected\", \"checked\", \"pressed\", \"expanded\", \"level\", \"disabled\", \"name\", \"include-hidden\"];\nkSupportedAttributes.sort();\nfunction validateSupportedRole(attr, roles, role) {\n if (!roles.includes(role))\n throw new Error(`\"${attr}\" attribute is only supported for roles: ${roles.slice().sort().map((role2) => `\"${role2}\"`).join(\", \")}`);\n}\nfunction validateSupportedValues(attr, values) {\n if (attr.op !== \"\" && !values.includes(attr.value))\n throw new Error(`\"${attr.name}\" must be one of ${values.map((v) => JSON.stringify(v)).join(\", \")}`);\n}\nfunction validateSupportedOp(attr, ops) {\n if (!ops.includes(attr.op))\n throw new Error(`\"${attr.name}\" does not support \"${attr.op}\" matcher`);\n}\nfunction validateAttributes(attrs, role) {\n const options = { role };\n for (const attr of attrs) {\n switch (attr.name) {\n case \"checked\": {\n validateSupportedRole(attr.name, kAriaCheckedRoles, role);\n validateSupportedValues(attr, [true, false, \"mixed\"]);\n validateSupportedOp(attr, [\"\", \"=\"]);\n options.checked = attr.op === \"\" ? true : attr.value;\n break;\n }\n case \"pressed\": {\n validateSupportedRole(attr.name, kAriaPressedRoles, role);\n validateSupportedValues(attr, [true, false, \"mixed\"]);\n validateSupportedOp(attr, [\"\", \"=\"]);\n options.pressed = attr.op === \"\" ? true : attr.value;\n break;\n }\n case \"selected\": {\n validateSupportedRole(attr.name, kAriaSelectedRoles, role);\n validateSupportedValues(attr, [true, false]);\n validateSupportedOp(attr, [\"\", \"=\"]);\n options.selected = attr.op === \"\" ? true : attr.value;\n break;\n }\n case \"expanded\": {\n validateSupportedRole(attr.name, kAriaExpandedRoles, role);\n validateSupportedValues(attr, [true, false]);\n validateSupportedOp(attr, [\"\", \"=\"]);\n options.expanded = attr.op === \"\" ? true : attr.value;\n break;\n }\n case \"level\": {\n validateSupportedRole(attr.name, kAriaLevelRoles, role);\n if (typeof attr.value === \"string\")\n attr.value = +attr.value;\n if (attr.op !== \"=\" || typeof attr.value !== \"number\" || Number.isNaN(attr.value))\n throw new Error(`\"level\" attribute must be compared to a number`);\n options.level = attr.value;\n break;\n }\n case \"disabled\": {\n validateSupportedValues(attr, [true, false]);\n validateSupportedOp(attr, [\"\", \"=\"]);\n options.disabled = attr.op === \"\" ? true : attr.value;\n break;\n }\n case \"name\": {\n if (attr.op === \"\")\n throw new Error(`\"name\" attribute must have a value`);\n if (typeof attr.value !== \"string\" && !(attr.value instanceof RegExp))\n throw new Error(`\"name\" attribute must be a string or a regular expression`);\n options.name = attr.value;\n options.nameOp = attr.op;\n options.exact = attr.caseSensitive;\n break;\n }\n case \"include-hidden\": {\n validateSupportedValues(attr, [true, false]);\n validateSupportedOp(attr, [\"\", \"=\"]);\n options.includeHidden = attr.op === \"\" ? true : attr.value;\n break;\n }\n default: {\n throw new Error(`Unknown attribute \"${attr.name}\", must be one of ${kSupportedAttributes.map((a) => `\"${a}\"`).join(\", \")}.`);\n }\n }\n }\n return options;\n}\nfunction queryRole(scope, options, internal) {\n const result = [];\n const match = (element) => {\n if (getAriaRole(element) !== options.role)\n return;\n if (options.selected !== void 0 && getAriaSelected(element) !== options.selected)\n return;\n if (options.checked !== void 0 && getAriaChecked(element) !== options.checked)\n return;\n if (options.pressed !== void 0 && getAriaPressed(element) !== options.pressed)\n return;\n if (options.expanded !== void 0 && getAriaExpanded(element) !== options.expanded)\n return;\n if (options.level !== void 0 && getAriaLevel(element) !== options.level)\n return;\n if (options.disabled !== void 0 && getAriaDisabled(element) !== options.disabled)\n return;\n if (!options.includeHidden) {\n const isHidden = isElementHiddenForAria(element);\n if (isHidden)\n return;\n }\n if (options.name !== void 0) {\n const accessibleName = normalizeWhiteSpace(getElementAccessibleName(element, !!options.includeHidden));\n if (typeof options.name === \"string\")\n options.name = normalizeWhiteSpace(options.name);\n if (internal && !options.exact && options.nameOp === \"=\")\n options.nameOp = \"*=\";\n if (!matchesAttributePart(accessibleName, { name: \"\", jsonPath: [], op: options.nameOp || \"=\", value: options.name, caseSensitive: !!options.exact }))\n return;\n }\n result.push(element);\n };\n const query = (root) => {\n const shadows = [];\n if (root.shadowRoot)\n shadows.push(root.shadowRoot);\n for (const element of root.querySelectorAll(\"*\")) {\n match(element);\n if (element.shadowRoot)\n shadows.push(element.shadowRoot);\n }\n shadows.forEach(query);\n };\n query(scope);\n return result;\n}\nfunction createRoleEngine(internal) {\n return {\n queryAll: (scope, selector) => {\n const parsed = parseAttributeSelector(selector, true);\n const role = parsed.name.toLowerCase();\n if (!role)\n throw new Error(`Role must not be empty`);\n const options = validateAttributes(parsed.attributes, role);\n beginAriaCaches();\n try {\n return queryRole(scope, options, internal);\n } finally {\n endAriaCaches();\n }\n }\n };\n}\n\n// packages/playwright-core/src/server/injected/layoutSelectorUtils.ts\nfunction boxRightOf(box1, box2, maxDistance) {\n const distance = box1.left - box2.right;\n if (distance < 0 || maxDistance !== void 0 && distance > maxDistance)\n return;\n return distance + Math.max(box2.bottom - box1.bottom, 0) + Math.max(box1.top - box2.top, 0);\n}\nfunction boxLeftOf(box1, box2, maxDistance) {\n const distance = box2.left - box1.right;\n if (distance < 0 || maxDistance !== void 0 && distance > maxDistance)\n return;\n return distance + Math.max(box2.bottom - box1.bottom, 0) + Math.max(box1.top - box2.top, 0);\n}\nfunction boxAbove(box1, box2, maxDistance) {\n const distance = box2.top - box1.bottom;\n if (distance < 0 || maxDistance !== void 0 && distance > maxDistance)\n return;\n return distance + Math.max(box1.left - box2.left, 0) + Math.max(box2.right - box1.right, 0);\n}\nfunction boxBelow(box1, box2, maxDistance) {\n const distance = box1.top - box2.bottom;\n if (distance < 0 || maxDistance !== void 0 && distance > maxDistance)\n return;\n return distance + Math.max(box1.left - box2.left, 0) + Math.max(box2.right - box1.right, 0);\n}\nfunction boxNear(box1, box2, maxDistance) {\n const kThreshold = maxDistance === void 0 ? 50 : maxDistance;\n let score = 0;\n if (box1.left - box2.right >= 0)\n score += box1.left - box2.right;\n if (box2.left - box1.right >= 0)\n score += box2.left - box1.right;\n if (box2.top - box1.bottom >= 0)\n score += box2.top - box1.bottom;\n if (box1.top - box2.bottom >= 0)\n score += box1.top - box2.bottom;\n return score > kThreshold ? void 0 : score;\n}\nvar kLayoutSelectorNames = [\"left-of\", \"right-of\", \"above\", \"below\", \"near\"];\nfunction layoutSelectorScore(name, element, inner, maxDistance) {\n const box = element.getBoundingClientRect();\n const scorer = { \"left-of\": boxLeftOf, \"right-of\": boxRightOf, \"above\": boxAbove, \"below\": boxBelow, \"near\": boxNear }[name];\n let bestScore;\n for (const e of inner) {\n if (e === element)\n continue;\n const score = scorer(box, e.getBoundingClientRect(), maxDistance);\n if (score === void 0)\n continue;\n if (bestScore === void 0 || score < bestScore)\n bestScore = score;\n }\n return bestScore;\n}\n\n// packages/playwright-core/src/server/injected/selectorEvaluator.ts\nvar SelectorEvaluatorImpl = class {\n constructor(extraEngines) {\n this._engines = /* @__PURE__ */ new Map();\n this._cacheQueryCSS = /* @__PURE__ */ new Map();\n this._cacheMatches = /* @__PURE__ */ new Map();\n this._cacheQuery = /* @__PURE__ */ new Map();\n this._cacheMatchesSimple = /* @__PURE__ */ new Map();\n this._cacheMatchesParents = /* @__PURE__ */ new Map();\n this._cacheCallMatches = /* @__PURE__ */ new Map();\n this._cacheCallQuery = /* @__PURE__ */ new Map();\n this._cacheQuerySimple = /* @__PURE__ */ new Map();\n this._cacheText = /* @__PURE__ */ new Map();\n this._retainCacheCounter = 0;\n for (const [name, engine] of extraEngines)\n this._engines.set(name, engine);\n this._engines.set(\"not\", notEngine);\n this._engines.set(\"is\", isEngine);\n this._engines.set(\"where\", isEngine);\n this._engines.set(\"has\", hasEngine);\n this._engines.set(\"scope\", scopeEngine);\n this._engines.set(\"light\", lightEngine);\n this._engines.set(\"visible\", visibleEngine);\n this._engines.set(\"text\", textEngine);\n this._engines.set(\"text-is\", textIsEngine);\n this._engines.set(\"text-matches\", textMatchesEngine);\n this._engines.set(\"has-text\", hasTextEngine);\n this._engines.set(\"right-of\", createLayoutEngine(\"right-of\"));\n this._engines.set(\"left-of\", createLayoutEngine(\"left-of\"));\n this._engines.set(\"above\", createLayoutEngine(\"above\"));\n this._engines.set(\"below\", createLayoutEngine(\"below\"));\n this._engines.set(\"near\", createLayoutEngine(\"near\"));\n this._engines.set(\"nth-match\", nthMatchEngine);\n const allNames = [...this._engines.keys()];\n allNames.sort();\n const parserNames = [...customCSSNames];\n parserNames.sort();\n if (allNames.join(\"|\") !== parserNames.join(\"|\"))\n throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${allNames.join(\"|\")} vs ${parserNames.join(\"|\")}`);\n }\n begin() {\n ++this._retainCacheCounter;\n }\n end() {\n --this._retainCacheCounter;\n if (!this._retainCacheCounter) {\n this._cacheQueryCSS.clear();\n this._cacheMatches.clear();\n this._cacheQuery.clear();\n this._cacheMatchesSimple.clear();\n this._cacheMatchesParents.clear();\n this._cacheCallMatches.clear();\n this._cacheCallQuery.clear();\n this._cacheQuerySimple.clear();\n this._cacheText.clear();\n }\n }\n _cached(cache, main, rest, cb) {\n if (!cache.has(main))\n cache.set(main, []);\n const entries = cache.get(main);\n const entry = entries.find((e) => rest.every((value, index) => e.rest[index] === value));\n if (entry)\n return entry.result;\n const result = cb();\n entries.push({ rest, result });\n return result;\n }\n _checkSelector(s) {\n const wellFormed = typeof s === \"object\" && s && (Array.isArray(s) || \"simples\" in s && s.simples.length);\n if (!wellFormed)\n throw new Error(`Malformed selector \"${s}\"`);\n return s;\n }\n matches(element, s, context) {\n const selector = this._checkSelector(s);\n this.begin();\n try {\n return this._cached(this._cacheMatches, element, [selector, context.scope, context.pierceShadow, context.originalScope], () => {\n if (Array.isArray(selector))\n return this._matchesEngine(isEngine, element, selector, context);\n if (this._hasScopeClause(selector))\n context = this._expandContextForScopeMatching(context);\n if (!this._matchesSimple(element, selector.simples[selector.simples.length - 1].selector, context))\n return false;\n return this._matchesParents(element, selector, selector.simples.length - 2, context);\n });\n } finally {\n this.end();\n }\n }\n query(context, s) {\n const selector = this._checkSelector(s);\n this.begin();\n try {\n return this._cached(this._cacheQuery, selector, [context.scope, context.pierceShadow, context.originalScope], () => {\n if (Array.isArray(selector))\n return this._queryEngine(isEngine, context, selector);\n if (this._hasScopeClause(selector))\n context = this._expandContextForScopeMatching(context);\n const previousScoreMap = this._scoreMap;\n this._scoreMap = /* @__PURE__ */ new Map();\n let elements = this._querySimple(context, selector.simples[selector.simples.length - 1].selector);\n elements = elements.filter((element) => this._matchesParents(element, selector, selector.simples.length - 2, context));\n if (this._scoreMap.size) {\n elements.sort((a, b) => {\n const aScore = this._scoreMap.get(a);\n const bScore = this._scoreMap.get(b);\n if (aScore === bScore)\n return 0;\n if (aScore === void 0)\n return 1;\n if (bScore === void 0)\n return -1;\n return aScore - bScore;\n });\n }\n this._scoreMap = previousScoreMap;\n return elements;\n });\n } finally {\n this.end();\n }\n }\n _markScore(element, score) {\n if (this._scoreMap)\n this._scoreMap.set(element, score);\n }\n _hasScopeClause(selector) {\n return selector.simples.some((simple) => simple.selector.functions.some((f) => f.name === \"scope\"));\n }\n _expandContextForScopeMatching(context) {\n if (context.scope.nodeType !== 1)\n return context;\n const scope = parentElementOrShadowHost(context.scope);\n if (!scope)\n return context;\n return { ...context, scope, originalScope: context.originalScope || context.scope };\n }\n _matchesSimple(element, simple, context) {\n return this._cached(this._cacheMatchesSimple, element, [simple, context.scope, context.pierceShadow, context.originalScope], () => {\n if (element === context.scope)\n return false;\n if (simple.css && !this._matchesCSS(element, simple.css))\n return false;\n for (const func of simple.functions) {\n if (!this._matchesEngine(this._getEngine(func.name), element, func.args, context))\n return false;\n }\n return true;\n });\n }\n _querySimple(context, simple) {\n if (!simple.functions.length)\n return this._queryCSS(context, simple.css || \"*\");\n return this._cached(this._cacheQuerySimple, simple, [context.scope, context.pierceShadow, context.originalScope], () => {\n let css = simple.css;\n const funcs = simple.functions;\n if (css === \"*\" && funcs.length)\n css = void 0;\n let elements;\n let firstIndex = -1;\n if (css !== void 0) {\n elements = this._queryCSS(context, css);\n } else {\n firstIndex = funcs.findIndex((func) => this._getEngine(func.name).query !== void 0);\n if (firstIndex === -1)\n firstIndex = 0;\n elements = this._queryEngine(this._getEngine(funcs[firstIndex].name), context, funcs[firstIndex].args);\n }\n for (let i = 0; i < funcs.length; i++) {\n if (i === firstIndex)\n continue;\n const engine = this._getEngine(funcs[i].name);\n if (engine.matches !== void 0)\n elements = elements.filter((e) => this._matchesEngine(engine, e, funcs[i].args, context));\n }\n for (let i = 0; i < funcs.length; i++) {\n if (i === firstIndex)\n continue;\n const engine = this._getEngine(funcs[i].name);\n if (engine.matches === void 0)\n elements = elements.filter((e) => this._matchesEngine(engine, e, funcs[i].args, context));\n }\n return elements;\n });\n }\n _matchesParents(element, complex, index, context) {\n if (index < 0)\n return true;\n return this._cached(this._cacheMatchesParents, element, [complex, index, context.scope, context.pierceShadow, context.originalScope], () => {\n const { selector: simple, combinator } = complex.simples[index];\n if (combinator === \">\") {\n const parent = parentElementOrShadowHostInContext(element, context);\n if (!parent || !this._matchesSimple(parent, simple, context))\n return false;\n return this._matchesParents(parent, complex, index - 1, context);\n }\n if (combinator === \"+\") {\n const previousSibling = previousSiblingInContext(element, context);\n if (!previousSibling || !this._matchesSimple(previousSibling, simple, context))\n return false;\n return this._matchesParents(previousSibling, complex, index - 1, context);\n }\n if (combinator === \"\") {\n let parent = parentElementOrShadowHostInContext(element, context);\n while (parent) {\n if (this._matchesSimple(parent, simple, context)) {\n if (this._matchesParents(parent, complex, index - 1, context))\n return true;\n if (complex.simples[index - 1].combinator === \"\")\n break;\n }\n parent = parentElementOrShadowHostInContext(parent, context);\n }\n return false;\n }\n if (combinator === \"~\") {\n let previousSibling = previousSiblingInContext(element, context);\n while (previousSibling) {\n if (this._matchesSimple(previousSibling, simple, context)) {\n if (this._matchesParents(previousSibling, complex, index - 1, context))\n return true;\n if (complex.simples[index - 1].combinator === \"~\")\n break;\n }\n previousSibling = previousSiblingInContext(previousSibling, context);\n }\n return false;\n }\n if (combinator === \">=\") {\n let parent = element;\n while (parent) {\n if (this._matchesSimple(parent, simple, context)) {\n if (this._matchesParents(parent, complex, index - 1, context))\n return true;\n if (complex.simples[index - 1].combinator === \"\")\n break;\n }\n parent = parentElementOrShadowHostInContext(parent, context);\n }\n return false;\n }\n throw new Error(`Unsupported combinator \"${combinator}\"`);\n });\n }\n _matchesEngine(engine, element, args, context) {\n if (engine.matches)\n return this._callMatches(engine, element, args, context);\n if (engine.query)\n return this._callQuery(engine, args, context).includes(element);\n throw new Error(`Selector engine should implement \"matches\" or \"query\"`);\n }\n _queryEngine(engine, context, args) {\n if (engine.query)\n return this._callQuery(engine, args, context);\n if (engine.matches)\n return this._queryCSS(context, \"*\").filter((element) => this._callMatches(engine, element, args, context));\n throw new Error(`Selector engine should implement \"matches\" or \"query\"`);\n }\n _callMatches(engine, element, args, context) {\n return this._cached(this._cacheCallMatches, element, [engine, context.scope, context.pierceShadow, context.originalScope, ...args], () => {\n return engine.matches(element, args, context, this);\n });\n }\n _callQuery(engine, args, context) {\n return this._cached(this._cacheCallQuery, engine, [context.scope, context.pierceShadow, context.originalScope, ...args], () => {\n return engine.query(context, args, this);\n });\n }\n _matchesCSS(element, css) {\n return element.matches(css);\n }\n _queryCSS(context, css) {\n return this._cached(this._cacheQueryCSS, css, [context.scope, context.pierceShadow, context.originalScope], () => {\n let result = [];\n function query(root) {\n result = result.concat([...root.querySelectorAll(css)]);\n if (!context.pierceShadow)\n return;\n if (root.shadowRoot)\n query(root.shadowRoot);\n for (const element of root.querySelectorAll(\"*\")) {\n if (element.shadowRoot)\n query(element.shadowRoot);\n }\n }\n query(context.scope);\n return result;\n });\n }\n _getEngine(name) {\n const engine = this._engines.get(name);\n if (!engine)\n throw new Error(`Unknown selector engine \"${name}\"`);\n return engine;\n }\n};\nvar isEngine = {\n matches(element, args, context, evaluator) {\n if (args.length === 0)\n throw new Error(`\"is\" engine expects non-empty selector list`);\n return args.some((selector) => evaluator.matches(element, selector, context));\n },\n query(context, args, evaluator) {\n if (args.length === 0)\n throw new Error(`\"is\" engine expects non-empty selector list`);\n let elements = [];\n for (const arg of args)\n elements = elements.concat(evaluator.query(context, arg));\n return args.length === 1 ? elements : sortInDOMOrder(elements);\n }\n};\nvar hasEngine = {\n matches(element, args, context, evaluator) {\n if (args.length === 0)\n throw new Error(`\"has\" engine expects non-empty selector list`);\n return evaluator.query({ ...context, scope: element }, args).length > 0;\n }\n // TODO: we can implement efficient \"query\" by matching \"args\" and returning\n // all parents/descendants, just have to be careful with the \":scope\" matching.\n};\nvar scopeEngine = {\n matches(element, args, context, evaluator) {\n if (args.length !== 0)\n throw new Error(`\"scope\" engine expects no arguments`);\n const actualScope = context.originalScope || context.scope;\n if (actualScope.nodeType === 9)\n return element === actualScope.documentElement;\n return element === actualScope;\n },\n query(context, args, evaluator) {\n if (args.length !== 0)\n throw new Error(`\"scope\" engine expects no arguments`);\n const actualScope = context.originalScope || context.scope;\n if (actualScope.nodeType === 9) {\n const root = actualScope.documentElement;\n return root ? [root] : [];\n }\n if (actualScope.nodeType === 1)\n return [actualScope];\n return [];\n }\n};\nvar notEngine = {\n matches(element, args, context, evaluator) {\n if (args.length === 0)\n throw new Error(`\"not\" engine expects non-empty selector list`);\n return !evaluator.matches(element, args, context);\n }\n};\nvar lightEngine = {\n query(context, args, evaluator) {\n return evaluator.query({ ...context, pierceShadow: false }, args);\n },\n matches(element, args, context, evaluator) {\n return evaluator.matches(element, args, { ...context, pierceShadow: false });\n }\n};\nvar visibleEngine = {\n matches(element, args, context, evaluator) {\n if (args.length)\n throw new Error(`\"visible\" engine expects no arguments`);\n return isElementVisible(element);\n }\n};\nvar textEngine = {\n matches(element, args, context, evaluator) {\n if (args.length !== 1 || typeof args[0] !== \"string\")\n throw new Error(`\"text\" engine expects a single string`);\n const text = normalizeWhiteSpace(args[0]).toLowerCase();\n const matcher = (elementText2) => elementText2.normalized.toLowerCase().includes(text);\n return elementMatchesText(evaluator._cacheText, element, matcher) === \"self\";\n }\n};\nvar textIsEngine = {\n matches(element, args, context, evaluator) {\n if (args.length !== 1 || typeof args[0] !== \"string\")\n throw new Error(`\"text-is\" engine expects a single string`);\n const text = normalizeWhiteSpace(args[0]);\n const matcher = (elementText2) => {\n if (!text && !elementText2.immediate.length)\n return true;\n return elementText2.immediate.some((s) => normalizeWhiteSpace(s) === text);\n };\n return elementMatchesText(evaluator._cacheText, element, matcher) !== \"none\";\n }\n};\nvar textMatchesEngine = {\n matches(element, args, context, evaluator) {\n if (args.length === 0 || typeof args[0] !== \"string\" || args.length > 2 || args.length === 2 && typeof args[1] !== \"string\")\n throw new Error(`\"text-matches\" engine expects a regexp body and optional regexp flags`);\n const re = new RegExp(args[0], args.length === 2 ? args[1] : void 0);\n const matcher = (elementText2) => re.test(elementText2.full);\n return elementMatchesText(evaluator._cacheText, element, matcher) === \"self\";\n }\n};\nvar hasTextEngine = {\n matches(element, args, context, evaluator) {\n if (args.length !== 1 || typeof args[0] !== \"string\")\n throw new Error(`\"has-text\" engine expects a single string`);\n if (shouldSkipForTextMatching(element))\n return false;\n const text = normalizeWhiteSpace(args[0]).toLowerCase();\n const matcher = (elementText2) => elementText2.normalized.toLowerCase().includes(text);\n return matcher(elementText(evaluator._cacheText, element));\n }\n};\nfunction createLayoutEngine(name) {\n return {\n matches(element, args, context, evaluator) {\n const maxDistance = args.length && typeof args[args.length - 1] === \"number\" ? args[args.length - 1] : void 0;\n const queryArgs = maxDistance === void 0 ? args : args.slice(0, args.length - 1);\n if (args.length < 1 + (maxDistance === void 0 ? 0 : 1))\n throw new Error(`\"${name}\" engine expects a selector list and optional maximum distance in pixels`);\n const inner = evaluator.query(context, queryArgs);\n const score = layoutSelectorScore(name, element, inner, maxDistance);\n if (score === void 0)\n return false;\n evaluator._markScore(element, score);\n return true;\n }\n };\n}\nvar nthMatchEngine = {\n query(context, args, evaluator) {\n let index = args[args.length - 1];\n if (args.length < 2)\n throw new Error(`\"nth-match\" engine expects non-empty selector list and an index argument`);\n if (typeof index !== \"number\" || index < 1)\n throw new Error(`\"nth-match\" engine expects a one-based index as the last argument`);\n const elements = isEngine.query(context, args.slice(0, args.length - 1), evaluator);\n index--;\n return index < elements.length ? [elements[index]] : [];\n }\n};\nfunction parentElementOrShadowHostInContext(element, context) {\n if (element === context.scope)\n return;\n if (!context.pierceShadow)\n return element.parentElement || void 0;\n return parentElementOrShadowHost(element);\n}\nfunction previousSiblingInContext(element, context) {\n if (element === context.scope)\n return;\n return element.previousElementSibling || void 0;\n}\nfunction sortInDOMOrder(elements) {\n const elementToEntry = /* @__PURE__ */ new Map();\n const roots = [];\n const result = [];\n function append(element) {\n let entry = elementToEntry.get(element);\n if (entry)\n return entry;\n const parent = parentElementOrShadowHost(element);\n if (parent) {\n const parentEntry = append(parent);\n parentEntry.children.push(element);\n } else {\n roots.push(element);\n }\n entry = { children: [], taken: false };\n elementToEntry.set(element, entry);\n return entry;\n }\n for (const e of elements)\n append(e).taken = true;\n function visit(element) {\n const entry = elementToEntry.get(element);\n if (entry.taken)\n result.push(element);\n if (entry.children.length > 1) {\n const set = new Set(entry.children);\n entry.children = [];\n let child = element.firstElementChild;\n while (child && entry.children.length < set.size) {\n if (set.has(child))\n entry.children.push(child);\n child = child.nextElementSibling;\n }\n child = element.shadowRoot ? element.shadowRoot.firstElementChild : null;\n while (child && entry.children.length < set.size) {\n if (set.has(child))\n entry.children.push(child);\n child = child.nextElementSibling;\n }\n }\n entry.children.forEach(visit);\n }\n roots.forEach(visit);\n return result;\n}\n\n// packages/playwright-core/src/server/injected/selectorGenerator.ts\nvar cacheAllowText = /* @__PURE__ */ new Map();\nvar cacheDisallowText = /* @__PURE__ */ new Map();\nvar kTextScoreRange = 10;\nvar kExactPenalty = kTextScoreRange / 2;\nvar kTestIdScore = 1;\nvar kOtherTestIdScore = 2;\nvar kIframeByAttributeScore = 10;\nvar kBeginPenalizedScore = 50;\nvar kRoleWithNameScore = 100;\nvar kPlaceholderScore = 120;\nvar kLabelScore = 140;\nvar kAltTextScore = 160;\nvar kTextScore = 180;\nvar kTitleScore = 200;\nvar kTextScoreRegex = 250;\nvar kPlaceholderScoreExact = kPlaceholderScore + kExactPenalty;\nvar kLabelScoreExact = kLabelScore + kExactPenalty;\nvar kRoleWithNameScoreExact = kRoleWithNameScore + kExactPenalty;\nvar kAltTextScoreExact = kAltTextScore + kExactPenalty;\nvar kTextScoreExact = kTextScore + kExactPenalty;\nvar kTitleScoreExact = kTitleScore + kExactPenalty;\nvar kEndPenalizedScore = 300;\nvar kCSSIdScore = 500;\nvar kRoleWithoutNameScore = 510;\nvar kCSSInputTypeNameScore = 520;\nvar kCSSTagNameScore = 530;\nvar kNthScore = 1e4;\nvar kCSSFallbackScore = 1e7;\nvar kScoreThresholdForTextExpect = 1e3;\nfunction generateSelector(injectedScript, targetElement, options) {\n var _a;\n injectedScript._evaluator.begin();\n beginAriaCaches();\n try {\n let selectors = [];\n if (options.forTextExpect) {\n let targetTokens = cssFallback(injectedScript, targetElement.ownerDocument.documentElement, options);\n for (let element = targetElement; element; element = parentElementOrShadowHost(element)) {\n const tokens = generateSelectorFor(injectedScript, element, { ...options, noText: true });\n if (!tokens)\n continue;\n const score = combineScores(tokens);\n if (score <= kScoreThresholdForTextExpect) {\n targetTokens = tokens;\n break;\n }\n }\n selectors = [joinTokens(targetTokens)];\n } else {\n if (!targetElement.matches(\"input,textarea,select\") && !targetElement.isContentEditable) {\n const interactiveParent = closestCrossShadow(targetElement, \"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]\", options.root);\n if (interactiveParent && isElementVisible(interactiveParent))\n targetElement = interactiveParent;\n }\n if (options.multiple) {\n const withText = generateSelectorFor(injectedScript, targetElement, options);\n const withoutText = generateSelectorFor(injectedScript, targetElement, { ...options, noText: true });\n let tokens = [withText, withoutText];\n cacheAllowText.clear();\n cacheDisallowText.clear();\n if (withText && hasCSSIdToken(withText))\n tokens.push(generateSelectorFor(injectedScript, targetElement, { ...options, noCSSId: true }));\n if (withoutText && hasCSSIdToken(withoutText))\n tokens.push(generateSelectorFor(injectedScript, targetElement, { ...options, noText: true, noCSSId: true }));\n tokens = tokens.filter(Boolean);\n if (!tokens.length) {\n const css = cssFallback(injectedScript, targetElement, options);\n tokens.push(css);\n if (hasCSSIdToken(css))\n tokens.push(cssFallback(injectedScript, targetElement, { ...options, noCSSId: true }));\n }\n selectors = [...new Set(tokens.map((t) => joinTokens(t)))];\n } else {\n const targetTokens = generateSelectorFor(injectedScript, targetElement, options) || cssFallback(injectedScript, targetElement, options);\n selectors = [joinTokens(targetTokens)];\n }\n }\n const selector = selectors[0];\n const parsedSelector = injectedScript.parseSelector(selector);\n return {\n selector,\n selectors,\n elements: injectedScript.querySelectorAll(parsedSelector, (_a = options.root) != null ? _a : targetElement.ownerDocument)\n };\n } finally {\n cacheAllowText.clear();\n cacheDisallowText.clear();\n endAriaCaches();\n injectedScript._evaluator.end();\n }\n}\nfunction filterRegexTokens(textCandidates) {\n return textCandidates.filter((c) => c[0].selector[0] !== \"/\");\n}\nfunction generateSelectorFor(injectedScript, targetElement, options) {\n if (options.root && !isInsideScope(options.root, targetElement))\n throw new Error(`Target element must belong to the root's subtree`);\n if (targetElement === options.root)\n return [{ engine: \"css\", selector: \":scope\", score: 1 }];\n if (targetElement.ownerDocument.documentElement === targetElement)\n return [{ engine: \"css\", selector: \"html\", score: 1 }];\n const calculate = (element, allowText) => {\n var _a;\n const allowNthMatch = element === targetElement;\n let textCandidates = allowText ? buildTextCandidates(injectedScript, element, element === targetElement) : [];\n if (element !== targetElement) {\n textCandidates = filterRegexTokens(textCandidates);\n }\n const noTextCandidates = buildNoTextCandidates(injectedScript, element, options).filter((token) => !options.omitInternalEngines || !token.engine.startsWith(\"internal:\")).map((token) => [token]);\n let result = chooseFirstSelector(injectedScript, (_a = options.root) != null ? _a : targetElement.ownerDocument, element, [...textCandidates, ...noTextCandidates], allowNthMatch);\n textCandidates = filterRegexTokens(textCandidates);\n const checkWithText = (textCandidatesToUse) => {\n const allowParentText = allowText && !textCandidatesToUse.length;\n const candidates = [...textCandidatesToUse, ...noTextCandidates].filter((c) => {\n if (!result)\n return true;\n return combineScores(c) < combineScores(result);\n });\n let bestPossibleInParent = candidates[0];\n if (!bestPossibleInParent)\n return;\n for (let parent = parentElementOrShadowHost(element); parent && parent !== options.root; parent = parentElementOrShadowHost(parent)) {\n const parentTokens = calculateCached(parent, allowParentText);\n if (!parentTokens)\n continue;\n if (result && combineScores([...parentTokens, ...bestPossibleInParent]) >= combineScores(result))\n continue;\n bestPossibleInParent = chooseFirstSelector(injectedScript, parent, element, candidates, allowNthMatch);\n if (!bestPossibleInParent)\n return;\n const combined = [...parentTokens, ...bestPossibleInParent];\n if (!result || combineScores(combined) < combineScores(result))\n result = combined;\n }\n };\n checkWithText(textCandidates);\n if (element === targetElement && textCandidates.length)\n checkWithText([]);\n return result;\n };\n const calculateCached = (element, allowText) => {\n const cache = allowText ? cacheAllowText : cacheDisallowText;\n let value = cache.get(element);\n if (value === void 0) {\n value = calculate(element, allowText);\n cache.set(element, value);\n }\n return value;\n };\n return calculate(targetElement, !options.noText);\n}\nfunction buildNoTextCandidates(injectedScript, element, options) {\n const candidates = [];\n {\n for (const attr of [\"data-testid\", \"data-test-id\", \"data-test\"]) {\n if (attr !== options.testIdAttributeName && element.getAttribute(attr))\n candidates.push({ engine: \"css\", selector: `[${attr}=${quoteCSSAttributeValue(element.getAttribute(attr))}]`, score: kOtherTestIdScore });\n }\n if (!options.noCSSId) {\n const idAttr = element.getAttribute(\"id\");\n if (idAttr && !isGuidLike(idAttr))\n candidates.push({ engine: \"css\", selector: makeSelectorForId(idAttr), score: kCSSIdScore });\n }\n candidates.push({ engine: \"css\", selector: cssEscape(element.nodeName.toLowerCase()), score: kCSSTagNameScore });\n }\n if (element.nodeName === \"IFRAME\") {\n for (const attribute of [\"name\", \"title\"]) {\n if (element.getAttribute(attribute))\n candidates.push({ engine: \"css\", selector: `${cssEscape(element.nodeName.toLowerCase())}[${attribute}=${quoteCSSAttributeValue(element.getAttribute(attribute))}]`, score: kIframeByAttributeScore });\n }\n if (element.getAttribute(options.testIdAttributeName))\n candidates.push({ engine: \"css\", selector: `[${options.testIdAttributeName}=${quoteCSSAttributeValue(element.getAttribute(options.testIdAttributeName))}]`, score: kTestIdScore });\n penalizeScoreForLength([candidates]);\n return candidates;\n }\n if (element.getAttribute(options.testIdAttributeName))\n candidates.push({ engine: \"internal:testid\", selector: `[${options.testIdAttributeName}=${escapeForAttributeSelector(element.getAttribute(options.testIdAttributeName), true)}]`, score: kTestIdScore });\n if (element.nodeName === \"INPUT\" || element.nodeName === \"TEXTAREA\") {\n const input = element;\n if (input.placeholder) {\n candidates.push({ engine: \"internal:attr\", selector: `[placeholder=${escapeForAttributeSelector(input.placeholder, true)}]`, score: kPlaceholderScoreExact });\n for (const alternative of suitableTextAlternatives(input.placeholder))\n candidates.push({ engine: \"internal:attr\", selector: `[placeholder=${escapeForAttributeSelector(alternative.text, false)}]`, score: kPlaceholderScore - alternative.scoreBonus });\n }\n }\n const labels = getElementLabels(injectedScript._evaluator._cacheText, element);\n for (const label of labels) {\n const labelText = label.normalized;\n candidates.push({ engine: \"internal:label\", selector: escapeForTextSelector(labelText, true), score: kLabelScoreExact });\n for (const alternative of suitableTextAlternatives(labelText))\n candidates.push({ engine: \"internal:label\", selector: escapeForTextSelector(alternative.text, false), score: kLabelScore - alternative.scoreBonus });\n }\n const ariaRole = getAriaRole(element);\n if (ariaRole && ![\"none\", \"presentation\"].includes(ariaRole))\n candidates.push({ engine: \"internal:role\", selector: ariaRole, score: kRoleWithoutNameScore });\n if (element.getAttribute(\"name\") && [\"BUTTON\", \"FORM\", \"FIELDSET\", \"FRAME\", \"IFRAME\", \"INPUT\", \"KEYGEN\", \"OBJECT\", \"OUTPUT\", \"SELECT\", \"TEXTAREA\", \"MAP\", \"META\", \"PARAM\"].includes(element.nodeName))\n candidates.push({ engine: \"css\", selector: `${cssEscape(element.nodeName.toLowerCase())}[name=${quoteCSSAttributeValue(element.getAttribute(\"name\"))}]`, score: kCSSInputTypeNameScore });\n if ([\"INPUT\", \"TEXTAREA\"].includes(element.nodeName) && element.getAttribute(\"type\") !== \"hidden\") {\n if (element.getAttribute(\"type\"))\n candidates.push({ engine: \"css\", selector: `${cssEscape(element.nodeName.toLowerCase())}[type=${quoteCSSAttributeValue(element.getAttribute(\"type\"))}]`, score: kCSSInputTypeNameScore });\n }\n if ([\"INPUT\", \"TEXTAREA\", \"SELECT\"].includes(element.nodeName) && element.getAttribute(\"type\") !== \"hidden\")\n candidates.push({ engine: \"css\", selector: cssEscape(element.nodeName.toLowerCase()), score: kCSSInputTypeNameScore + 1 });\n penalizeScoreForLength([candidates]);\n return candidates;\n}\nfunction buildTextCandidates(injectedScript, element, isTargetNode) {\n if (element.nodeName === \"SELECT\")\n return [];\n const candidates = [];\n const title = element.getAttribute(\"title\");\n if (title) {\n candidates.push([{ engine: \"internal:attr\", selector: `[title=${escapeForAttributeSelector(title, true)}]`, score: kTitleScoreExact }]);\n for (const alternative of suitableTextAlternatives(title))\n candidates.push([{ engine: \"internal:attr\", selector: `[title=${escapeForAttributeSelector(alternative.text, false)}]`, score: kTitleScore - alternative.scoreBonus }]);\n }\n const alt = element.getAttribute(\"alt\");\n if (alt && [\"APPLET\", \"AREA\", \"IMG\", \"INPUT\"].includes(element.nodeName)) {\n candidates.push([{ engine: \"internal:attr\", selector: `[alt=${escapeForAttributeSelector(alt, true)}]`, score: kAltTextScoreExact }]);\n for (const alternative of suitableTextAlternatives(alt))\n candidates.push([{ engine: \"internal:attr\", selector: `[alt=${escapeForAttributeSelector(alternative.text, false)}]`, score: kAltTextScore - alternative.scoreBonus }]);\n }\n const text = elementText(injectedScript._evaluator._cacheText, element).normalized;\n const textAlternatives = text ? suitableTextAlternatives(text) : [];\n if (text) {\n if (isTargetNode) {\n if (text.length <= 80)\n candidates.push([{ engine: \"internal:text\", selector: escapeForTextSelector(text, true), score: kTextScoreExact }]);\n for (const alternative of textAlternatives)\n candidates.push([{ engine: \"internal:text\", selector: escapeForTextSelector(alternative.text, false), score: kTextScore - alternative.scoreBonus }]);\n }\n const cssToken = { engine: \"css\", selector: cssEscape(element.nodeName.toLowerCase()), score: kCSSTagNameScore };\n for (const alternative of textAlternatives)\n candidates.push([cssToken, { engine: \"internal:has-text\", selector: escapeForTextSelector(alternative.text, false), score: kTextScore - alternative.scoreBonus }]);\n if (text.length <= 80) {\n const re = new RegExp(\"^\" + escapeRegExp(text) + \"$\");\n candidates.push([cssToken, { engine: \"internal:has-text\", selector: escapeForTextSelector(re, false), score: kTextScoreRegex }]);\n }\n }\n const ariaRole = getAriaRole(element);\n if (ariaRole && ![\"none\", \"presentation\"].includes(ariaRole)) {\n const ariaName = getElementAccessibleName(element, false);\n if (ariaName) {\n const roleToken = { engine: \"internal:role\", selector: `${ariaRole}[name=${escapeForAttributeSelector(ariaName, true)}]`, score: kRoleWithNameScoreExact };\n candidates.push([roleToken]);\n for (const alternative of suitableTextAlternatives(ariaName))\n candidates.push([{ engine: \"internal:role\", selector: `${ariaRole}[name=${escapeForAttributeSelector(alternative.text, false)}]`, score: kRoleWithNameScore - alternative.scoreBonus }]);\n } else {\n const roleToken = { engine: \"internal:role\", selector: `${ariaRole}`, score: kRoleWithoutNameScore };\n for (const alternative of textAlternatives)\n candidates.push([roleToken, { engine: \"internal:has-text\", selector: escapeForTextSelector(alternative.text, false), score: kTextScore - alternative.scoreBonus }]);\n if (text.length <= 80) {\n const re = new RegExp(\"^\" + escapeRegExp(text) + \"$\");\n candidates.push([roleToken, { engine: \"internal:has-text\", selector: escapeForTextSelector(re, false), score: kTextScoreRegex }]);\n }\n }\n }\n penalizeScoreForLength(candidates);\n return candidates;\n}\nfunction makeSelectorForId(id) {\n return /^[a-zA-Z][a-zA-Z0-9\\-\\_]+$/.test(id) ? \"#\" + id : `[id=\"${cssEscape(id)}\"]`;\n}\nfunction hasCSSIdToken(tokens) {\n return tokens.some((token) => token.engine === \"css\" && (token.selector.startsWith(\"#\") || token.selector.startsWith('[id=\"')));\n}\nfunction cssFallback(injectedScript, targetElement, options) {\n var _a;\n const root = (_a = options.root) != null ? _a : targetElement.ownerDocument;\n const tokens = [];\n function uniqueCSSSelector(prefix) {\n const path = tokens.slice();\n if (prefix)\n path.unshift(prefix);\n const selector = path.join(\" > \");\n const parsedSelector = injectedScript.parseSelector(selector);\n const node = injectedScript.querySelector(parsedSelector, root, false);\n return node === targetElement ? selector : void 0;\n }\n function makeStrict(selector) {\n const token = { engine: \"css\", selector, score: kCSSFallbackScore };\n const parsedSelector = injectedScript.parseSelector(selector);\n const elements = injectedScript.querySelectorAll(parsedSelector, root);\n if (elements.length === 1)\n return [token];\n const nth = { engine: \"nth\", selector: String(elements.indexOf(targetElement)), score: kNthScore };\n return [token, nth];\n }\n for (let element = targetElement; element && element !== root; element = parentElementOrShadowHost(element)) {\n const nodeName = element.nodeName.toLowerCase();\n let bestTokenForLevel = \"\";\n if (element.id && !options.noCSSId) {\n const token = makeSelectorForId(element.id);\n const selector = uniqueCSSSelector(token);\n if (selector)\n return makeStrict(selector);\n bestTokenForLevel = token;\n }\n const parent = element.parentNode;\n const classes = [...element.classList];\n for (let i = 0; i < classes.length; ++i) {\n const token = \".\" + cssEscape(classes.slice(0, i + 1).join(\".\"));\n const selector = uniqueCSSSelector(token);\n if (selector)\n return makeStrict(selector);\n if (!bestTokenForLevel && parent) {\n const sameClassSiblings = parent.querySelectorAll(token);\n if (sameClassSiblings.length === 1)\n bestTokenForLevel = token;\n }\n }\n if (parent) {\n const siblings = [...parent.children];\n const sameTagSiblings = siblings.filter((sibling) => sibling.nodeName.toLowerCase() === nodeName);\n const token = sameTagSiblings.indexOf(element) === 0 ? cssEscape(nodeName) : `${cssEscape(nodeName)}:nth-child(${1 + siblings.indexOf(element)})`;\n const selector = uniqueCSSSelector(token);\n if (selector)\n return makeStrict(selector);\n if (!bestTokenForLevel)\n bestTokenForLevel = token;\n } else if (!bestTokenForLevel) {\n bestTokenForLevel = cssEscape(nodeName);\n }\n tokens.unshift(bestTokenForLevel);\n }\n return makeStrict(uniqueCSSSelector());\n}\nfunction penalizeScoreForLength(groups) {\n for (const group of groups) {\n for (const token of group) {\n if (token.score > kBeginPenalizedScore && token.score < kEndPenalizedScore)\n token.score += Math.min(kTextScoreRange, token.selector.length / 10 | 0);\n }\n }\n}\nfunction joinTokens(tokens) {\n const parts = [];\n let lastEngine = \"\";\n for (const { engine, selector } of tokens) {\n if (parts.length && (lastEngine !== \"css\" || engine !== \"css\" || selector.startsWith(\":nth-match(\")))\n parts.push(\">>\");\n lastEngine = engine;\n if (engine === \"css\")\n parts.push(selector);\n else\n parts.push(`${engine}=${selector}`);\n }\n return parts.join(\" \");\n}\nfunction combineScores(tokens) {\n let score = 0;\n for (let i = 0; i < tokens.length; i++)\n score += tokens[i].score * (tokens.length - i);\n return score;\n}\nfunction chooseFirstSelector(injectedScript, scope, targetElement, selectors, allowNthMatch) {\n const joined = selectors.map((tokens) => ({ tokens, score: combineScores(tokens) }));\n joined.sort((a, b) => a.score - b.score);\n let bestWithIndex = null;\n for (const { tokens } of joined) {\n const parsedSelector = injectedScript.parseSelector(joinTokens(tokens));\n const result = injectedScript.querySelectorAll(parsedSelector, scope);\n if (result[0] === targetElement && result.length === 1) {\n return tokens;\n }\n const index = result.indexOf(targetElement);\n if (!allowNthMatch || bestWithIndex || index === -1 || result.length > 5)\n continue;\n const nth = { engine: \"nth\", selector: String(index), score: kNthScore };\n bestWithIndex = [...tokens, nth];\n }\n return bestWithIndex;\n}\nfunction isGuidLike(id) {\n let lastCharacterType;\n let transitionCount = 0;\n for (let i = 0; i < id.length; ++i) {\n const c = id[i];\n let characterType;\n if (c === \"-\" || c === \"_\")\n continue;\n if (c >= \"a\" && c <= \"z\")\n characterType = \"lower\";\n else if (c >= \"A\" && c <= \"Z\")\n characterType = \"upper\";\n else if (c >= \"0\" && c <= \"9\")\n characterType = \"digit\";\n else\n characterType = \"other\";\n if (characterType === \"lower\" && lastCharacterType === \"upper\") {\n lastCharacterType = characterType;\n continue;\n }\n if (lastCharacterType && lastCharacterType !== characterType)\n ++transitionCount;\n lastCharacterType = characterType;\n }\n return transitionCount >= id.length / 4;\n}\nfunction trimWordBoundary(text, maxLength) {\n if (text.length <= maxLength)\n return text;\n text = text.substring(0, maxLength);\n const match = text.match(/^(.*)\\b(.+?)$/);\n if (!match)\n return \"\";\n return match[1].trimEnd();\n}\nfunction suitableTextAlternatives(text) {\n let result = [];\n {\n const match = text.match(/^([\\d.,]+)[^.,\\w]/);\n const leadingNumberLength = match ? match[1].length : 0;\n if (leadingNumberLength) {\n const alt = trimWordBoundary(text.substring(leadingNumberLength).trimStart(), 80);\n result.push({ text: alt, scoreBonus: alt.length <= 30 ? 2 : 1 });\n }\n }\n {\n const match = text.match(/[^.,\\w]([\\d.,]+)$/);\n const trailingNumberLength = match ? match[1].length : 0;\n if (trailingNumberLength) {\n const alt = trimWordBoundary(text.substring(0, text.length - trailingNumberLength).trimEnd(), 80);\n result.push({ text: alt, scoreBonus: alt.length <= 30 ? 2 : 1 });\n }\n }\n if (text.length <= 30) {\n result.push({ text, scoreBonus: 0 });\n } else {\n result.push({ text: trimWordBoundary(text, 80), scoreBonus: 0 });\n result.push({ text: trimWordBoundary(text, 30), scoreBonus: 1 });\n }\n result = result.filter((r) => r.text);\n if (!result.length)\n result.push({ text: text.substring(0, 80), scoreBonus: 0 });\n return result;\n}\n\n// packages/playwright-core/src/utils/isomorphic/locatorGenerators.ts\nfunction asLocator(lang, selector, isFrameLocator = false) {\n return asLocators(lang, selector, isFrameLocator, 1)[0];\n}\nfunction asLocators(lang, selector, isFrameLocator = false, maxOutputSize = 20, preferredQuote) {\n try {\n return innerAsLocators(new generators[lang](preferredQuote), parseSelector(selector), isFrameLocator, maxOutputSize);\n } catch (e) {\n return [selector];\n }\n}\nfunction innerAsLocators(factory, parsed, isFrameLocator = false, maxOutputSize = 20) {\n const parts = [...parsed.parts];\n const tokens = [];\n let nextBase = isFrameLocator ? \"frame-locator\" : \"page\";\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const base = nextBase;\n nextBase = \"locator\";\n if (part.name === \"nth\") {\n if (part.body === \"0\")\n tokens.push([factory.generateLocator(base, \"first\", \"\"), factory.generateLocator(base, \"nth\", \"0\")]);\n else if (part.body === \"-1\")\n tokens.push([factory.generateLocator(base, \"last\", \"\"), factory.generateLocator(base, \"nth\", \"-1\")]);\n else\n tokens.push([factory.generateLocator(base, \"nth\", part.body)]);\n continue;\n }\n if (part.name === \"internal:text\") {\n const { exact, text } = detectExact(part.body);\n tokens.push([factory.generateLocator(base, \"text\", text, { exact })]);\n continue;\n }\n if (part.name === \"internal:has-text\") {\n const { exact, text } = detectExact(part.body);\n if (!exact) {\n tokens.push([factory.generateLocator(base, \"has-text\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:has-not-text\") {\n const { exact, text } = detectExact(part.body);\n if (!exact) {\n tokens.push([factory.generateLocator(base, \"has-not-text\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:has\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"has\", inner)));\n continue;\n }\n if (part.name === \"internal:has-not\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"hasNot\", inner)));\n continue;\n }\n if (part.name === \"internal:and\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"and\", inner)));\n continue;\n }\n if (part.name === \"internal:or\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"or\", inner)));\n continue;\n }\n if (part.name === \"internal:chain\") {\n const inners = innerAsLocators(factory, part.body.parsed, false, maxOutputSize);\n tokens.push(inners.map((inner) => factory.generateLocator(base, \"chain\", inner)));\n continue;\n }\n if (part.name === \"internal:label\") {\n const { exact, text } = detectExact(part.body);\n tokens.push([factory.generateLocator(base, \"label\", text, { exact })]);\n continue;\n }\n if (part.name === \"internal:role\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const options = { attrs: [] };\n for (const attr of attrSelector.attributes) {\n if (attr.name === \"name\") {\n options.exact = attr.caseSensitive;\n options.name = attr.value;\n } else {\n if (attr.name === \"level\" && typeof attr.value === \"string\")\n attr.value = +attr.value;\n options.attrs.push({ name: attr.name === \"include-hidden\" ? \"includeHidden\" : attr.name, value: attr.value });\n }\n }\n tokens.push([factory.generateLocator(base, \"role\", attrSelector.name, options)]);\n continue;\n }\n if (part.name === \"internal:testid\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const { value } = attrSelector.attributes[0];\n tokens.push([factory.generateLocator(base, \"test-id\", value)]);\n continue;\n }\n if (part.name === \"internal:attr\") {\n const attrSelector = parseAttributeSelector(part.body, true);\n const { name, value, caseSensitive } = attrSelector.attributes[0];\n const text = value;\n const exact = !!caseSensitive;\n if (name === \"placeholder\") {\n tokens.push([factory.generateLocator(base, \"placeholder\", text, { exact })]);\n continue;\n }\n if (name === \"alt\") {\n tokens.push([factory.generateLocator(base, \"alt\", text, { exact })]);\n continue;\n }\n if (name === \"title\") {\n tokens.push([factory.generateLocator(base, \"title\", text, { exact })]);\n continue;\n }\n }\n if (part.name === \"internal:control\" && part.body === \"enter-frame\") {\n const lastTokens = tokens[tokens.length - 1];\n const lastPart = parts[index - 1];\n const transformed = lastTokens.map((token) => factory.chainLocators([token, factory.generateLocator(base, \"frame\", \"\")]));\n if ([\"xpath\", \"css\"].includes(lastPart.name)) {\n transformed.push(\n factory.generateLocator(base, \"frame-locator\", stringifySelector({ parts: [lastPart] })),\n factory.generateLocator(base, \"frame-locator\", stringifySelector({ parts: [lastPart] }, true))\n );\n }\n lastTokens.splice(0, lastTokens.length, ...transformed);\n nextBase = \"frame-locator\";\n continue;\n }\n const nextPart = parts[index + 1];\n const selectorPart = stringifySelector({ parts: [part] });\n const locatorPart = factory.generateLocator(base, \"default\", selectorPart);\n if (nextPart && [\"internal:has-text\", \"internal:has-not-text\"].includes(nextPart.name)) {\n const { exact, text } = detectExact(nextPart.body);\n if (!exact) {\n const nextLocatorPart = factory.generateLocator(\"locator\", nextPart.name === \"internal:has-text\" ? \"has-text\" : \"has-not-text\", text, { exact });\n const options = {};\n if (nextPart.name === \"internal:has-text\")\n options.hasText = text;\n else\n options.hasNotText = text;\n const combinedPart = factory.generateLocator(base, \"default\", selectorPart, options);\n tokens.push([factory.chainLocators([locatorPart, nextLocatorPart]), combinedPart]);\n index++;\n continue;\n }\n }\n let locatorPartWithEngine;\n if ([\"xpath\", \"css\"].includes(part.name)) {\n const selectorPart2 = stringifySelector(\n { parts: [part] },\n /* forceEngineName */\n true\n );\n locatorPartWithEngine = factory.generateLocator(base, \"default\", selectorPart2);\n }\n tokens.push([locatorPart, locatorPartWithEngine].filter(Boolean));\n }\n return combineTokens(factory, tokens, maxOutputSize);\n}\nfunction combineTokens(factory, tokens, maxOutputSize) {\n const currentTokens = tokens.map(() => \"\");\n const result = [];\n const visit = (index) => {\n if (index === tokens.length) {\n result.push(factory.chainLocators(currentTokens));\n return result.length < maxOutputSize;\n }\n for (const taken of tokens[index]) {\n currentTokens[index] = taken;\n if (!visit(index + 1))\n return false;\n }\n return true;\n };\n visit(0);\n return result;\n}\nfunction detectExact(text) {\n let exact = false;\n const match = text.match(/^\\/(.*)\\/([igm]*)$/);\n if (match)\n return { text: new RegExp(match[1], match[2]) };\n if (text.endsWith('\"')) {\n text = JSON.parse(text);\n exact = true;\n } else if (text.endsWith('\"s')) {\n text = JSON.parse(text.substring(0, text.length - 1));\n exact = true;\n } else if (text.endsWith('\"i')) {\n text = JSON.parse(text.substring(0, text.length - 1));\n exact = false;\n }\n return { exact, text };\n}\nvar JavaScriptLocatorFactory = class {\n constructor(preferredQuote) {\n this.preferredQuote = preferredQuote;\n }\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, { hasText: ${this.toHasText(options.hasText)} })`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, { hasNotText: ${this.toHasText(options.hasNotText)} })`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frameLocator(${this.quote(body)})`;\n case \"frame\":\n return `contentFrame()`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first()`;\n case \"last\":\n return `last()`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`name: ${this.regexToSourceString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`name: ${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`exact: true`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`${name}: ${typeof value === \"string\" ? this.quote(value) : value}`);\n const attrString = attrs.length ? `, { ${attrs.join(\", \")} }` : \"\";\n return `getByRole(${this.quote(body)}${attrString})`;\n case \"has-text\":\n return `filter({ hasText: ${this.toHasText(body)} })`;\n case \"has-not-text\":\n return `filter({ hasNotText: ${this.toHasText(body)} })`;\n case \"has\":\n return `filter({ has: ${body} })`;\n case \"hasNot\":\n return `filter({ hasNot: ${body} })`;\n case \"and\":\n return `and(${body})`;\n case \"or\":\n return `or(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `getByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"getByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"getByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"getByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"getByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"getByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToSourceString(re) {\n return normalizeEscapedRegexQuotes(String(re));\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToSourceString(body)})`;\n return exact ? `${method}(${this.quote(body)}, { exact: true })` : `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToSourceString(body);\n return this.quote(body);\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToSourceString(value);\n return this.quote(value);\n }\n quote(text) {\n var _a;\n return escapeWithQuotes(text, (_a = this.preferredQuote) != null ? _a : \"'\");\n }\n};\nvar PythonLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, has_text=${this.toHasText(options.hasText)})`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, has_not_text=${this.toHasText(options.hasNotText)})`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frame_locator(${this.quote(body)})`;\n case \"frame\":\n return `content_frame`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first`;\n case \"last\":\n return `last`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`name=${this.regexToString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`name=${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`exact=True`);\n }\n for (const { name, value } of options.attrs) {\n let valueString = typeof value === \"string\" ? this.quote(value) : value;\n if (typeof value === \"boolean\")\n valueString = value ? \"True\" : \"False\";\n attrs.push(`${toSnakeCase(name)}=${valueString}`);\n }\n const attrString = attrs.length ? `, ${attrs.join(\", \")}` : \"\";\n return `get_by_role(${this.quote(body)}${attrString})`;\n case \"has-text\":\n return `filter(has_text=${this.toHasText(body)})`;\n case \"has-not-text\":\n return `filter(has_not_text=${this.toHasText(body)})`;\n case \"has\":\n return `filter(has=${body})`;\n case \"hasNot\":\n return `filter(has_not=${body})`;\n case \"and\":\n return `and_(${body})`;\n case \"or\":\n return `or_(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `get_by_test_id(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"get_by_text\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"get_by_alt_text\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"get_by_placeholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"get_by_label\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"get_by_title\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", re.IGNORECASE\" : \"\";\n return `re.compile(r\"${normalizeEscapedRegexQuotes(body.source).replace(/\\\\\\//, \"/\").replace(/\"/g, '\\\\\"')}\"${suffix})`;\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, exact=True)`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToString(body);\n return `${this.quote(body)}`;\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar JavaLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n let clazz;\n switch (base) {\n case \"page\":\n clazz = \"Page\";\n break;\n case \"frame-locator\":\n clazz = \"FrameLocator\";\n break;\n case \"locator\":\n clazz = \"Locator\";\n break;\n }\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `locator(${this.quote(body)}, new ${clazz}.LocatorOptions().setHasText(${this.toHasText(options.hasText)}))`;\n if (options.hasNotText !== void 0)\n return `locator(${this.quote(body)}, new ${clazz}.LocatorOptions().setHasNotText(${this.toHasText(options.hasNotText)}))`;\n return `locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `frameLocator(${this.quote(body)})`;\n case \"frame\":\n return `contentFrame()`;\n case \"nth\":\n return `nth(${body})`;\n case \"first\":\n return `first()`;\n case \"last\":\n return `last()`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`.setName(${this.regexToString(options.name)})`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`.setName(${this.quote(options.name)})`);\n if (options.exact)\n attrs.push(`.setExact(true)`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`.set${toTitleCase(name)}(${typeof value === \"string\" ? this.quote(value) : value})`);\n const attrString = attrs.length ? `, new ${clazz}.GetByRoleOptions()${attrs.join(\"\")}` : \"\";\n return `getByRole(AriaRole.${toSnakeCase(body).toUpperCase()}${attrString})`;\n case \"has-text\":\n return `filter(new ${clazz}.FilterOptions().setHasText(${this.toHasText(body)}))`;\n case \"has-not-text\":\n return `filter(new ${clazz}.FilterOptions().setHasNotText(${this.toHasText(body)}))`;\n case \"has\":\n return `filter(new ${clazz}.FilterOptions().setHas(${body}))`;\n case \"hasNot\":\n return `filter(new ${clazz}.FilterOptions().setHasNot(${body}))`;\n case \"and\":\n return `and(${body})`;\n case \"or\":\n return `or(${body})`;\n case \"chain\":\n return `locator(${body})`;\n case \"test-id\":\n return `getByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(clazz, \"getByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(clazz, \"getByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(clazz, \"getByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(clazz, \"getByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(clazz, \"getByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", Pattern.CASE_INSENSITIVE\" : \"\";\n return `Pattern.compile(${this.quote(normalizeEscapedRegexQuotes(body.source))}${suffix})`;\n }\n toCallWithExact(clazz, method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, new ${clazz}.${toTitleCase(method)}Options().setExact(true))`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return this.regexToString(body);\n return this.quote(body);\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar CSharpLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n switch (kind) {\n case \"default\":\n if (options.hasText !== void 0)\n return `Locator(${this.quote(body)}, new() { ${this.toHasText(options.hasText)} })`;\n if (options.hasNotText !== void 0)\n return `Locator(${this.quote(body)}, new() { ${this.toHasNotText(options.hasNotText)} })`;\n return `Locator(${this.quote(body)})`;\n case \"frame-locator\":\n return `FrameLocator(${this.quote(body)})`;\n case \"frame\":\n return `ContentFrame`;\n case \"nth\":\n return `Nth(${body})`;\n case \"first\":\n return `First`;\n case \"last\":\n return `Last`;\n case \"role\":\n const attrs = [];\n if (isRegExp(options.name)) {\n attrs.push(`NameRegex = ${this.regexToString(options.name)}`);\n } else if (typeof options.name === \"string\") {\n attrs.push(`Name = ${this.quote(options.name)}`);\n if (options.exact)\n attrs.push(`Exact = true`);\n }\n for (const { name, value } of options.attrs)\n attrs.push(`${toTitleCase(name)} = ${typeof value === \"string\" ? this.quote(value) : value}`);\n const attrString = attrs.length ? `, new() { ${attrs.join(\", \")} }` : \"\";\n return `GetByRole(AriaRole.${toTitleCase(body)}${attrString})`;\n case \"has-text\":\n return `Filter(new() { ${this.toHasText(body)} })`;\n case \"has-not-text\":\n return `Filter(new() { ${this.toHasNotText(body)} })`;\n case \"has\":\n return `Filter(new() { Has = ${body} })`;\n case \"hasNot\":\n return `Filter(new() { HasNot = ${body} })`;\n case \"and\":\n return `And(${body})`;\n case \"or\":\n return `Or(${body})`;\n case \"chain\":\n return `Locator(${body})`;\n case \"test-id\":\n return `GetByTestId(${this.toTestIdValue(body)})`;\n case \"text\":\n return this.toCallWithExact(\"GetByText\", body, !!options.exact);\n case \"alt\":\n return this.toCallWithExact(\"GetByAltText\", body, !!options.exact);\n case \"placeholder\":\n return this.toCallWithExact(\"GetByPlaceholder\", body, !!options.exact);\n case \"label\":\n return this.toCallWithExact(\"GetByLabel\", body, !!options.exact);\n case \"title\":\n return this.toCallWithExact(\"GetByTitle\", body, !!options.exact);\n default:\n throw new Error(\"Unknown selector kind \" + kind);\n }\n }\n chainLocators(locators) {\n return locators.join(\".\");\n }\n regexToString(body) {\n const suffix = body.flags.includes(\"i\") ? \", RegexOptions.IgnoreCase\" : \"\";\n return `new Regex(${this.quote(normalizeEscapedRegexQuotes(body.source))}${suffix})`;\n }\n toCallWithExact(method, body, exact) {\n if (isRegExp(body))\n return `${method}(${this.regexToString(body)})`;\n if (exact)\n return `${method}(${this.quote(body)}, new() { Exact = true })`;\n return `${method}(${this.quote(body)})`;\n }\n toHasText(body) {\n if (isRegExp(body))\n return `HasTextRegex = ${this.regexToString(body)}`;\n return `HasText = ${this.quote(body)}`;\n }\n toTestIdValue(value) {\n if (isRegExp(value))\n return this.regexToString(value);\n return this.quote(value);\n }\n toHasNotText(body) {\n if (isRegExp(body))\n return `HasNotTextRegex = ${this.regexToString(body)}`;\n return `HasNotText = ${this.quote(body)}`;\n }\n quote(text) {\n return escapeWithQuotes(text, '\"');\n }\n};\nvar JsonlLocatorFactory = class {\n generateLocator(base, kind, body, options = {}) {\n return JSON.stringify({\n kind,\n body,\n options\n });\n }\n chainLocators(locators) {\n const objects = locators.map((l) => JSON.parse(l));\n for (let i = 0; i < objects.length - 1; ++i)\n objects[i].next = objects[i + 1];\n return JSON.stringify(objects[0]);\n }\n};\nvar generators = {\n javascript: JavaScriptLocatorFactory,\n python: PythonLocatorFactory,\n java: JavaLocatorFactory,\n csharp: CSharpLocatorFactory,\n jsonl: JsonlLocatorFactory\n};\nfunction isRegExp(obj) {\n return obj instanceof RegExp;\n}\n\n// packages/playwright-core/src/server/injected/highlight.css?inline\nvar highlight_default = \":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{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;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:rgb(148 148 148 / 90%)}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;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}\\n\";\n\n// packages/playwright-core/src/server/injected/highlight.ts\nvar Highlight = class {\n constructor(injectedScript) {\n this._highlightEntries = [];\n this._highlightOptions = {};\n this._language = \"javascript\";\n this._injectedScript = injectedScript;\n const document = injectedScript.document;\n this._isUnderTest = injectedScript.isUnderTest;\n this._glassPaneElement = document.createElement(\"x-pw-glass\");\n this._glassPaneElement.style.position = \"fixed\";\n this._glassPaneElement.style.top = \"0\";\n this._glassPaneElement.style.right = \"0\";\n this._glassPaneElement.style.bottom = \"0\";\n this._glassPaneElement.style.left = \"0\";\n this._glassPaneElement.style.zIndex = \"2147483646\";\n this._glassPaneElement.style.pointerEvents = \"none\";\n this._glassPaneElement.style.display = \"flex\";\n this._glassPaneElement.style.backgroundColor = \"transparent\";\n for (const eventName of [\"click\", \"auxclick\", \"dragstart\", \"input\", \"keydown\", \"keyup\", \"pointerdown\", \"pointerup\", \"mousedown\", \"mouseup\", \"mouseleave\", \"focus\", \"scroll\"]) {\n this._glassPaneElement.addEventListener(eventName, (e) => {\n e.stopPropagation();\n e.stopImmediatePropagation();\n if (e.type === \"click\" && e.button === 0 && this._highlightOptions.tooltipListItemSelected)\n this._highlightOptions.tooltipListItemSelected(void 0);\n });\n }\n this._actionPointElement = document.createElement(\"x-pw-action-point\");\n this._actionPointElement.setAttribute(\"hidden\", \"true\");\n this._glassPaneShadow = this._glassPaneElement.attachShadow({ mode: this._isUnderTest ? \"open\" : \"closed\" });\n if (typeof this._glassPaneShadow.adoptedStyleSheets.push === \"function\") {\n const sheet = new this._injectedScript.window.CSSStyleSheet();\n sheet.replaceSync(highlight_default);\n this._glassPaneShadow.adoptedStyleSheets.push(sheet);\n } else {\n const styleElement = this._injectedScript.document.createElement(\"style\");\n styleElement.textContent = highlight_default;\n this._glassPaneShadow.appendChild(styleElement);\n }\n this._glassPaneShadow.appendChild(this._actionPointElement);\n }\n install() {\n if (this._injectedScript.document.documentElement && !this._injectedScript.document.documentElement.contains(this._glassPaneElement))\n this._injectedScript.document.documentElement.appendChild(this._glassPaneElement);\n }\n setLanguage(language) {\n this._language = language;\n }\n runHighlightOnRaf(selector) {\n if (this._rafRequest)\n cancelAnimationFrame(this._rafRequest);\n this.updateHighlight(this._injectedScript.querySelectorAll(selector, this._injectedScript.document.documentElement), { tooltipText: asLocator(this._language, stringifySelector(selector)) });\n this._rafRequest = this._injectedScript.builtinRequestAnimationFrame(() => this.runHighlightOnRaf(selector));\n }\n uninstall() {\n if (this._rafRequest)\n cancelAnimationFrame(this._rafRequest);\n this._glassPaneElement.remove();\n }\n showActionPoint(x, y) {\n this._actionPointElement.style.top = y + \"px\";\n this._actionPointElement.style.left = x + \"px\";\n this._actionPointElement.hidden = false;\n }\n hideActionPoint() {\n this._actionPointElement.hidden = true;\n }\n clearHighlight() {\n var _a, _b;\n for (const entry of this._highlightEntries) {\n (_a = entry.highlightElement) == null ? void 0 : _a.remove();\n (_b = entry.tooltipElement) == null ? void 0 : _b.remove();\n }\n this._highlightEntries = [];\n this._highlightOptions = {};\n this._glassPaneElement.style.pointerEvents = \"none\";\n }\n updateHighlight(elements, options) {\n this._innerUpdateHighlight(elements, options);\n }\n maskElements(elements, color) {\n this._innerUpdateHighlight(elements, { color });\n }\n _innerUpdateHighlight(elements, options) {\n let color = options.color;\n if (!color)\n color = elements.length > 1 ? \"#f6b26b7f\" : \"#6fa8dc7f\";\n if (this._highlightIsUpToDate(elements, options))\n return;\n this.clearHighlight();\n this._highlightOptions = options;\n this._glassPaneElement.style.pointerEvents = options.tooltipListItemSelected ? \"initial\" : \"none\";\n for (let i = 0; i < elements.length; ++i) {\n const highlightElement = this._createHighlightElement();\n this._glassPaneShadow.appendChild(highlightElement);\n let tooltipElement;\n if (options.tooltipList || options.tooltipText || options.tooltipFooter) {\n tooltipElement = this._injectedScript.document.createElement(\"x-pw-tooltip\");\n this._glassPaneShadow.appendChild(tooltipElement);\n tooltipElement.style.top = \"0\";\n tooltipElement.style.left = \"0\";\n tooltipElement.style.display = \"flex\";\n let lines = [];\n if (options.tooltipList) {\n lines = options.tooltipList;\n } else if (options.tooltipText) {\n const suffix = elements.length > 1 ? ` [${i + 1} of ${elements.length}]` : \"\";\n lines = [options.tooltipText + suffix];\n }\n for (let index = 0; index < lines.length; index++) {\n const element = this._injectedScript.document.createElement(\"x-pw-tooltip-line\");\n element.textContent = lines[index];\n tooltipElement.appendChild(element);\n if (options.tooltipListItemSelected) {\n element.classList.add(\"selectable\");\n element.addEventListener(\"click\", () => {\n var _a;\n return (_a = options.tooltipListItemSelected) == null ? void 0 : _a.call(options, index);\n });\n }\n }\n if (options.tooltipFooter) {\n const footer = this._injectedScript.document.createElement(\"x-pw-tooltip-footer\");\n footer.textContent = options.tooltipFooter;\n tooltipElement.appendChild(footer);\n }\n }\n this._highlightEntries.push({ targetElement: elements[i], tooltipElement, highlightElement });\n }\n for (const entry of this._highlightEntries) {\n entry.box = entry.targetElement.getBoundingClientRect();\n if (!entry.tooltipElement)\n continue;\n const { anchorLeft, anchorTop } = this.tooltipPosition(entry.box, entry.tooltipElement);\n entry.tooltipTop = anchorTop;\n entry.tooltipLeft = anchorLeft;\n }\n for (const entry of this._highlightEntries) {\n if (entry.tooltipElement) {\n entry.tooltipElement.style.top = entry.tooltipTop + \"px\";\n entry.tooltipElement.style.left = entry.tooltipLeft + \"px\";\n }\n const box = entry.box;\n entry.highlightElement.style.backgroundColor = color;\n entry.highlightElement.style.left = box.x + \"px\";\n entry.highlightElement.style.top = box.y + \"px\";\n entry.highlightElement.style.width = box.width + \"px\";\n entry.highlightElement.style.height = box.height + \"px\";\n entry.highlightElement.style.display = \"block\";\n if (this._isUnderTest)\n console.error(\"Highlight box for test: \" + JSON.stringify({ x: box.x, y: box.y, width: box.width, height: box.height }));\n }\n }\n firstBox() {\n var _a;\n return (_a = this._highlightEntries[0]) == null ? void 0 : _a.box;\n }\n tooltipPosition(box, tooltipElement) {\n const tooltipWidth = tooltipElement.offsetWidth;\n const tooltipHeight = tooltipElement.offsetHeight;\n const totalWidth = this._glassPaneElement.offsetWidth;\n const totalHeight = this._glassPaneElement.offsetHeight;\n let anchorLeft = box.left;\n if (anchorLeft + tooltipWidth > totalWidth - 5)\n anchorLeft = totalWidth - tooltipWidth - 5;\n let anchorTop = box.bottom + 5;\n if (anchorTop + tooltipHeight > totalHeight - 5) {\n if (box.top > tooltipHeight + 5) {\n anchorTop = box.top - tooltipHeight - 5;\n } else {\n anchorTop = totalHeight - 5 - tooltipHeight;\n }\n }\n return { anchorLeft, anchorTop };\n }\n _highlightIsUpToDate(elements, options) {\n var _a, _b;\n if (options.tooltipText !== this._highlightOptions.tooltipText)\n return false;\n if (options.tooltipListItemSelected !== this._highlightOptions.tooltipListItemSelected)\n return false;\n if (options.tooltipFooter !== this._highlightOptions.tooltipFooter)\n return false;\n if (((_a = options.tooltipList) == null ? void 0 : _a.length) !== ((_b = this._highlightOptions.tooltipList) == null ? void 0 : _b.length))\n return false;\n if (options.tooltipList && this._highlightOptions.tooltipList) {\n for (let i = 0; i < options.tooltipList.length; i++) {\n if (options.tooltipList[i] !== this._highlightOptions.tooltipList[i])\n return false;\n }\n }\n if (elements.length !== this._highlightEntries.length)\n return false;\n for (let i = 0; i < this._highlightEntries.length; ++i) {\n if (elements[i] !== this._highlightEntries[i].targetElement)\n return false;\n const oldBox = this._highlightEntries[i].box;\n if (!oldBox)\n return false;\n const box = elements[i].getBoundingClientRect();\n if (box.top !== oldBox.top || box.right !== oldBox.right || box.bottom !== oldBox.bottom || box.left !== oldBox.left)\n return false;\n }\n return true;\n }\n _createHighlightElement() {\n return this._injectedScript.document.createElement(\"x-pw-highlight\");\n }\n appendChild(element) {\n this._glassPaneShadow.appendChild(element);\n }\n};\n\n// packages/playwright-core/src/server/injected/yaml.ts\nfunction yamlEscapeKeyIfNeeded(str) {\n if (!yamlStringNeedsQuotes(str))\n return str;\n return `'` + str.replace(/'/g, `''`) + `'`;\n}\nfunction yamlEscapeValueIfNeeded(str) {\n if (!yamlStringNeedsQuotes(str))\n return str;\n return '\"' + str.replace(/[\\\\\"\\x00-\\x1f\\x7f-\\x9f]/g, (c) => {\n switch (c) {\n case \"\\\\\":\n return \"\\\\\\\\\";\n case '\"':\n return '\\\\\"';\n case \"\\b\":\n return \"\\\\b\";\n case \"\\f\":\n return \"\\\\f\";\n case \"\\n\":\n return \"\\\\n\";\n case \"\\r\":\n return \"\\\\r\";\n case \"\t\":\n return \"\\\\t\";\n default:\n const code = c.charCodeAt(0);\n return \"\\\\x\" + code.toString(16).padStart(2, \"0\");\n }\n }) + '\"';\n}\nfunction yamlStringNeedsQuotes(str) {\n if (str.length === 0)\n return true;\n if (/^\\s|\\s$/.test(str))\n return true;\n if (/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f-\\x9f]/.test(str))\n return true;\n if (/^-/.test(str))\n return true;\n if (/[\\n:](\\s|$)/.test(str))\n return true;\n if (/\\s#/.test(str))\n return true;\n if (/[\\n\\r]/.test(str))\n return true;\n if (/^[&*\\],?!>|@\"'#%]/.test(str))\n return true;\n if (/[{}`]/.test(str))\n return true;\n if (/^\\[/.test(str))\n return true;\n if (!isNaN(Number(str)) || [\"y\", \"n\", \"yes\", \"no\", \"true\", \"false\", \"on\", \"off\", \"null\"].includes(str.toLowerCase()))\n return true;\n return false;\n}\n\n// packages/playwright-core/src/server/injected/ariaSnapshot.ts\nfunction generateAriaTree(rootElement) {\n const visited = /* @__PURE__ */ new Set();\n const snapshot = {\n root: { role: \"fragment\", name: \"\", children: [], element: rootElement },\n elements: /* @__PURE__ */ new Map(),\n ids: /* @__PURE__ */ new Map()\n };\n const addElement = (element) => {\n const id = snapshot.elements.size + 1;\n snapshot.elements.set(id, element);\n snapshot.ids.set(element, id);\n };\n addElement(rootElement);\n const visit = (ariaNode, node) => {\n if (visited.has(node))\n return;\n visited.add(node);\n if (node.nodeType === Node.TEXT_NODE && node.nodeValue) {\n const text = node.nodeValue;\n if (ariaNode.role !== \"textbox\" && text)\n ariaNode.children.push(node.nodeValue || \"\");\n return;\n }\n if (node.nodeType !== Node.ELEMENT_NODE)\n return;\n const element = node;\n if (isElementHiddenForAria(element))\n return;\n const ariaChildren = [];\n if (element.hasAttribute(\"aria-owns\")) {\n const ids = element.getAttribute(\"aria-owns\").split(/\\s+/);\n for (const id of ids) {\n const ownedElement = rootElement.ownerDocument.getElementById(id);\n if (ownedElement)\n ariaChildren.push(ownedElement);\n }\n }\n addElement(element);\n const childAriaNode = toAriaNode(element);\n if (childAriaNode)\n ariaNode.children.push(childAriaNode);\n processElement(childAriaNode || ariaNode, element, ariaChildren);\n };\n function processElement(ariaNode, element, ariaChildren = []) {\n var _a;\n const display = ((_a = getElementComputedStyle(element)) == null ? void 0 : _a.display) || \"inline\";\n const treatAsBlock = display !== \"inline\" || element.nodeName === \"BR\" ? \" \" : \"\";\n if (treatAsBlock)\n ariaNode.children.push(treatAsBlock);\n ariaNode.children.push(getPseudoContent(element, \"::before\"));\n const assignedNodes = element.nodeName === \"SLOT\" ? element.assignedNodes() : [];\n if (assignedNodes.length) {\n for (const child of assignedNodes)\n visit(ariaNode, child);\n } else {\n for (let child = element.firstChild; child; child = child.nextSibling) {\n if (!child.assignedSlot)\n visit(ariaNode, child);\n }\n if (element.shadowRoot) {\n for (let child = element.shadowRoot.firstChild; child; child = child.nextSibling)\n visit(ariaNode, child);\n }\n }\n for (const child of ariaChildren)\n visit(ariaNode, child);\n ariaNode.children.push(getPseudoContent(element, \"::after\"));\n if (treatAsBlock)\n ariaNode.children.push(treatAsBlock);\n if (ariaNode.children.length === 1 && ariaNode.name === ariaNode.children[0])\n ariaNode.children = [];\n }\n beginAriaCaches();\n try {\n visit(snapshot.root, rootElement);\n } finally {\n endAriaCaches();\n }\n normalizeStringChildren(snapshot.root);\n return snapshot;\n}\nfunction toAriaNode(element) {\n const role = getAriaRole(element);\n if (!role || role === \"presentation\" || role === \"none\")\n return null;\n const name = normalizeWhiteSpace(getElementAccessibleName(element, false) || \"\");\n const result = { role, name, children: [], element };\n if (kAriaCheckedRoles.includes(role))\n result.checked = getAriaChecked(element);\n if (kAriaDisabledRoles.includes(role))\n result.disabled = getAriaDisabled(element);\n if (kAriaExpandedRoles.includes(role))\n result.expanded = getAriaExpanded(element);\n if (kAriaLevelRoles.includes(role))\n result.level = getAriaLevel(element);\n if (kAriaPressedRoles.includes(role))\n result.pressed = getAriaPressed(element);\n if (kAriaSelectedRoles.includes(role))\n result.selected = getAriaSelected(element);\n if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) {\n if (element.type !== \"checkbox\" && element.type !== \"radio\")\n result.children = [element.value];\n }\n return result;\n}\nfunction normalizeStringChildren(rootA11yNode) {\n const flushChildren = (buffer, normalizedChildren) => {\n if (!buffer.length)\n return;\n const text = normalizeWhiteSpace(buffer.join(\"\"));\n if (text)\n normalizedChildren.push(text);\n buffer.length = 0;\n };\n const visit = (ariaNode) => {\n const normalizedChildren = [];\n const buffer = [];\n for (const child of ariaNode.children || []) {\n if (typeof child === \"string\") {\n buffer.push(child);\n } else {\n flushChildren(buffer, normalizedChildren);\n visit(child);\n normalizedChildren.push(child);\n }\n }\n flushChildren(buffer, normalizedChildren);\n ariaNode.children = normalizedChildren.length ? normalizedChildren : [];\n if (ariaNode.children.length === 1 && ariaNode.children[0] === ariaNode.name)\n ariaNode.children = [];\n };\n visit(rootA11yNode);\n}\nfunction matchesText(text, template) {\n if (!template)\n return true;\n if (!text)\n return false;\n if (typeof template === \"string\")\n return text === template;\n return !!text.match(new RegExp(template.pattern));\n}\nfunction matchesTextNode(text, template) {\n return matchesText(text, template.text);\n}\nfunction matchesName(text, template) {\n return matchesText(text, template.name);\n}\nfunction matchesAriaTree(rootElement, template) {\n const root = generateAriaTree(rootElement).root;\n const matches = matchesNodeDeep(root, template, false);\n return {\n matches,\n received: {\n raw: renderAriaTree(root, { mode: \"raw\" }),\n regex: renderAriaTree(root, { mode: \"regex\" })\n }\n };\n}\nfunction getAllByAria(rootElement, template) {\n const root = generateAriaTree(rootElement).root;\n const matches = matchesNodeDeep(root, template, true);\n return matches.map((n) => n.element);\n}\nfunction matchesNode(node, template, depth) {\n if (typeof node === \"string\" && template.kind === \"text\")\n return matchesTextNode(node, template);\n if (node !== null && typeof node === \"object\" && template.kind === \"role\") {\n if (template.role !== \"fragment\" && template.role !== node.role)\n return false;\n if (template.checked !== void 0 && template.checked !== node.checked)\n return false;\n if (template.disabled !== void 0 && template.disabled !== node.disabled)\n return false;\n if (template.expanded !== void 0 && template.expanded !== node.expanded)\n return false;\n if (template.level !== void 0 && template.level !== node.level)\n return false;\n if (template.pressed !== void 0 && template.pressed !== node.pressed)\n return false;\n if (template.selected !== void 0 && template.selected !== node.selected)\n return false;\n if (!matchesName(node.name, template))\n return false;\n if (!containsList(node.children || [], template.children || [], depth))\n return false;\n return true;\n }\n return false;\n}\nfunction containsList(children, template, depth) {\n if (template.length > children.length)\n return false;\n const cc = children.slice();\n const tt = template.slice();\n for (const t of tt) {\n let c = cc.shift();\n while (c) {\n if (matchesNode(c, t, depth + 1))\n break;\n c = cc.shift();\n }\n if (!c)\n return false;\n }\n return true;\n}\nfunction matchesNodeDeep(root, template, collectAll) {\n const results = [];\n const visit = (node, parent) => {\n if (matchesNode(node, template, 0)) {\n const result = typeof node === \"string\" ? parent : node;\n if (result)\n results.push(result);\n return !collectAll;\n }\n if (typeof node === \"string\")\n return false;\n for (const child of node.children || []) {\n if (visit(child, node))\n return true;\n }\n return false;\n };\n visit(root, null);\n return results;\n}\nfunction renderAriaTree(ariaNode, options) {\n const lines = [];\n const includeText = (options == null ? void 0 : options.mode) === \"regex\" ? textContributesInfo : () => true;\n const renderString = (options == null ? void 0 : options.mode) === \"regex\" ? convertToBestGuessRegex : (str) => str;\n const visit = (ariaNode2, parentAriaNode, indent) => {\n if (typeof ariaNode2 === \"string\") {\n if (parentAriaNode && !includeText(parentAriaNode, ariaNode2))\n return;\n const text = yamlEscapeValueIfNeeded(renderString(ariaNode2));\n if (text)\n lines.push(indent + \"- text: \" + text);\n return;\n }\n let key = ariaNode2.role;\n if (ariaNode2.name && ariaNode2.name.length <= 900) {\n const name = renderString(ariaNode2.name);\n if (name) {\n const stringifiedName = name.startsWith(\"/\") && name.endsWith(\"/\") ? name : JSON.stringify(name);\n key += \" \" + stringifiedName;\n }\n }\n if (ariaNode2.checked === \"mixed\")\n key += ` [checked=mixed]`;\n if (ariaNode2.checked === true)\n key += ` [checked]`;\n if (ariaNode2.disabled)\n key += ` [disabled]`;\n if (ariaNode2.expanded)\n key += ` [expanded]`;\n if (ariaNode2.level)\n key += ` [level=${ariaNode2.level}]`;\n if (ariaNode2.pressed === \"mixed\")\n key += ` [pressed=mixed]`;\n if (ariaNode2.pressed === true)\n key += ` [pressed]`;\n if (ariaNode2.selected === true)\n key += ` [selected]`;\n if (options == null ? void 0 : options.ids) {\n const id = options == null ? void 0 : options.ids.get(ariaNode2.element);\n if (id)\n key += ` [id=${id}]`;\n }\n const escapedKey = indent + \"- \" + yamlEscapeKeyIfNeeded(key);\n if (!ariaNode2.children.length) {\n lines.push(escapedKey);\n } else if (ariaNode2.children.length === 1 && typeof ariaNode2.children[0] === \"string\") {\n const text = includeText(ariaNode2, ariaNode2.children[0]) ? renderString(ariaNode2.children[0]) : null;\n if (text)\n lines.push(escapedKey + \": \" + yamlEscapeValueIfNeeded(text));\n else\n lines.push(escapedKey);\n } else {\n lines.push(escapedKey + \":\");\n for (const child of ariaNode2.children || [])\n visit(child, ariaNode2, indent + \" \");\n }\n };\n if (ariaNode.role === \"fragment\") {\n for (const child of ariaNode.children || [])\n visit(child, ariaNode, \"\");\n } else {\n visit(ariaNode, null, \"\");\n }\n return lines.join(\"\\n\");\n}\nfunction convertToBestGuessRegex(text) {\n const dynamicContent = [\n // 2mb\n { regex: /\\b[\\d,.]+[bkmBKM]+\\b/, replacement: \"[\\\\d,.]+[bkmBKM]+\" },\n // 2ms, 20s\n { regex: /\\b\\d+[hmsp]+\\b/, replacement: \"\\\\d+[hmsp]+\" },\n { regex: /\\b[\\d,.]+[hmsp]+\\b/, replacement: \"[\\\\d,.]+[hmsp]+\" },\n // Do not replace single digits with regex by default.\n // 2+ digits: [Issue 22, 22.3, 2.33, 2,333]\n { regex: /\\b\\d+,\\d+\\b/, replacement: \"\\\\d+,\\\\d+\" },\n { regex: /\\b\\d+\\.\\d{2,}\\b/, replacement: \"\\\\d+\\\\.\\\\d+\" },\n { regex: /\\b\\d{2,}\\.\\d+\\b/, replacement: \"\\\\d+\\\\.\\\\d+\" },\n { regex: /\\b\\d{2,}\\b/, replacement: \"\\\\d+\" }\n ];\n let pattern = \"\";\n let lastIndex = 0;\n const combinedRegex = new RegExp(dynamicContent.map((r) => \"(\" + r.regex.source + \")\").join(\"|\"), \"g\");\n text.replace(combinedRegex, (match, ...args) => {\n const offset = args[args.length - 2];\n const groups = args.slice(0, -2);\n pattern += escapeRegExp(text.slice(lastIndex, offset));\n for (let i = 0; i < groups.length; i++) {\n if (groups[i]) {\n const { replacement } = dynamicContent[i];\n pattern += replacement;\n break;\n }\n }\n lastIndex = offset + match.length;\n return match;\n });\n if (!pattern)\n return text;\n pattern += escapeRegExp(text.slice(lastIndex));\n return String(new RegExp(pattern));\n}\nfunction textContributesInfo(node, text) {\n if (!text.length)\n return false;\n if (!node.name)\n return true;\n if (node.name.length > text.length)\n return false;\n const substr = text.length <= 200 && node.name.length <= 200 ? longestCommonSubstring(text, node.name) : \"\";\n let filtered = text;\n while (substr && filtered.includes(substr))\n filtered = filtered.replace(substr, \"\");\n return filtered.trim().length / text.length > 0.1;\n}\n\n// packages/playwright-core/src/utils/isomorphic/ariaSnapshot.ts\nfunction parseAriaSnapshot(yaml, text, options = {}) {\n var _a;\n const lineCounter = new yaml.LineCounter();\n const parseOptions = {\n keepSourceTokens: true,\n lineCounter,\n ...options\n };\n const yamlDoc = yaml.parseDocument(text, parseOptions);\n const errors = [];\n const convertRange = (range) => {\n return [lineCounter.linePos(range[0]), lineCounter.linePos(range[1])];\n };\n const addError = (error) => {\n errors.push({\n message: error.message,\n range: [lineCounter.linePos(error.pos[0]), lineCounter.linePos(error.pos[1])]\n });\n };\n const convertSeq = (container, seq) => {\n for (const item of seq.items) {\n const itemIsString = item instanceof yaml.Scalar && typeof item.value === \"string\";\n if (itemIsString) {\n const childNode = KeyParser.parse(item, parseOptions, errors);\n if (childNode) {\n container.children = container.children || [];\n container.children.push(childNode);\n }\n continue;\n }\n const itemIsMap = item instanceof yaml.YAMLMap;\n if (itemIsMap) {\n convertMap(container, item);\n continue;\n }\n errors.push({\n message: \"Sequence items should be strings or maps\",\n range: convertRange(item.range || seq.range)\n });\n }\n };\n const convertMap = (container, map) => {\n for (const entry of map.items) {\n container.children = container.children || [];\n const keyIsString = entry.key instanceof yaml.Scalar && typeof entry.key.value === \"string\";\n if (!keyIsString) {\n errors.push({\n message: \"Only string keys are supported\",\n range: convertRange(entry.key.range || map.range)\n });\n continue;\n }\n const key = entry.key;\n const value = entry.value;\n if (key.value === \"text\") {\n const valueIsString = value instanceof yaml.Scalar && typeof value.value === \"string\";\n if (!valueIsString) {\n errors.push({\n message: \"Text value should be a string\",\n range: convertRange(entry.value.range || map.range)\n });\n continue;\n }\n container.children.push({\n kind: \"text\",\n text: valueOrRegex(value.value)\n });\n continue;\n }\n const childNode = KeyParser.parse(key, parseOptions, errors);\n if (!childNode)\n continue;\n const valueIsScalar = value instanceof yaml.Scalar;\n if (valueIsScalar) {\n const type = typeof value.value;\n if (type !== \"string\" && type !== \"number\" && type !== \"boolean\") {\n errors.push({\n message: \"Node value should be a string or a sequence\",\n range: convertRange(entry.value.range || map.range)\n });\n continue;\n }\n container.children.push({\n ...childNode,\n children: [{\n kind: \"text\",\n text: valueOrRegex(String(value.value))\n }]\n });\n continue;\n }\n const valueIsSequence = value instanceof yaml.YAMLSeq;\n if (valueIsSequence) {\n container.children.push(childNode);\n convertSeq(childNode, value);\n continue;\n }\n errors.push({\n message: \"Map values should be strings or sequences\",\n range: convertRange(entry.value.range || map.range)\n });\n }\n };\n const fragment = { kind: \"role\", role: \"fragment\" };\n yamlDoc.errors.forEach(addError);\n if (errors.length)\n return { errors, fragment };\n if (!(yamlDoc.contents instanceof yaml.YAMLSeq)) {\n errors.push({\n message: 'Aria snapshot must be a YAML sequence, elements starting with \" -\"',\n range: yamlDoc.contents ? convertRange(yamlDoc.contents.range) : [{ line: 0, col: 0 }, { line: 0, col: 0 }]\n });\n }\n if (errors.length)\n return { errors, fragment };\n convertSeq(fragment, yamlDoc.contents);\n if (errors.length)\n return { errors, fragment: emptyFragment };\n if (((_a = fragment.children) == null ? void 0 : _a.length) === 1)\n return { fragment: fragment.children[0], errors };\n return { fragment, errors };\n}\nvar emptyFragment = { kind: \"role\", role: \"fragment\" };\nfunction normalizeWhitespace(text) {\n return text.replace(/[\\r\\n\\s\\t]+/g, \" \").trim();\n}\nfunction valueOrRegex(value) {\n return value.startsWith(\"/\") && value.endsWith(\"/\") && value.length > 1 ? { pattern: value.slice(1, -1) } : normalizeWhitespace(value);\n}\nvar KeyParser = class _KeyParser {\n static parse(text, options, errors) {\n try {\n return new _KeyParser(text.value)._parse();\n } catch (e) {\n if (e instanceof ParserError) {\n const message = options.prettyErrors === false ? e.message : e.message + \":\\n\\n\" + text.value + \"\\n\" + \" \".repeat(e.pos) + \"^\\n\";\n errors.push({\n message,\n range: [options.lineCounter.linePos(text.range[0]), options.lineCounter.linePos(text.range[0] + e.pos)]\n });\n return null;\n }\n throw e;\n }\n }\n constructor(input) {\n this._input = input;\n this._pos = 0;\n this._length = input.length;\n }\n _peek() {\n return this._input[this._pos] || \"\";\n }\n _next() {\n if (this._pos < this._length)\n return this._input[this._pos++];\n return null;\n }\n _eof() {\n return this._pos >= this._length;\n }\n _isWhitespace() {\n return !this._eof() && /\\s/.test(this._peek());\n }\n _skipWhitespace() {\n while (this._isWhitespace())\n this._pos++;\n }\n _readIdentifier(type) {\n if (this._eof())\n this._throwError(`Unexpected end of input when expecting ${type}`);\n const start = this._pos;\n while (!this._eof() && /[a-zA-Z]/.test(this._peek()))\n this._pos++;\n return this._input.slice(start, this._pos);\n }\n _readString() {\n let result = \"\";\n let escaped = false;\n while (!this._eof()) {\n const ch = this._next();\n if (escaped) {\n result += ch;\n escaped = false;\n } else if (ch === \"\\\\\") {\n escaped = true;\n } else if (ch === '\"') {\n return result;\n } else {\n result += ch;\n }\n }\n this._throwError(\"Unterminated string\");\n }\n _throwError(message, offset = 0) {\n throw new ParserError(message, offset || this._pos);\n }\n _readRegex() {\n let result = \"\";\n let escaped = false;\n let insideClass = false;\n while (!this._eof()) {\n const ch = this._next();\n if (escaped) {\n result += ch;\n escaped = false;\n } else if (ch === \"\\\\\") {\n escaped = true;\n result += ch;\n } else if (ch === \"/\" && !insideClass) {\n return { pattern: result };\n } else if (ch === \"[\") {\n insideClass = true;\n result += ch;\n } else if (ch === \"]\" && insideClass) {\n result += ch;\n insideClass = false;\n } else {\n result += ch;\n }\n }\n this._throwError(\"Unterminated regex\");\n }\n _readStringOrRegex() {\n const ch = this._peek();\n if (ch === '\"') {\n this._next();\n return normalizeWhitespace(this._readString());\n }\n if (ch === \"/\") {\n this._next();\n return this._readRegex();\n }\n return null;\n }\n _readAttributes(result) {\n let errorPos = this._pos;\n while (true) {\n this._skipWhitespace();\n if (this._peek() === \"[\") {\n this._next();\n this._skipWhitespace();\n errorPos = this._pos;\n const flagName = this._readIdentifier(\"attribute\");\n this._skipWhitespace();\n let flagValue = \"\";\n if (this._peek() === \"=\") {\n this._next();\n this._skipWhitespace();\n errorPos = this._pos;\n while (this._peek() !== \"]\" && !this._isWhitespace() && !this._eof())\n flagValue += this._next();\n }\n this._skipWhitespace();\n if (this._peek() !== \"]\")\n this._throwError(\"Expected ]\");\n this._next();\n this._applyAttribute(result, flagName, flagValue || \"true\", errorPos);\n } else {\n break;\n }\n }\n }\n _parse() {\n this._skipWhitespace();\n const role = this._readIdentifier(\"role\");\n this._skipWhitespace();\n const name = this._readStringOrRegex() || \"\";\n const result = { kind: \"role\", role, name };\n this._readAttributes(result);\n this._skipWhitespace();\n if (!this._eof())\n this._throwError(\"Unexpected input\");\n return result;\n }\n _applyAttribute(node, key, value, errorPos) {\n if (key === \"checked\") {\n this._assert(value === \"true\" || value === \"false\" || value === \"mixed\", 'Value of \"checked\" attribute must be a boolean or \"mixed\"', errorPos);\n node.checked = value === \"true\" ? true : value === \"false\" ? false : \"mixed\";\n return;\n }\n if (key === \"disabled\") {\n this._assert(value === \"true\" || value === \"false\", 'Value of \"disabled\" attribute must be a boolean', errorPos);\n node.disabled = value === \"true\";\n return;\n }\n if (key === \"expanded\") {\n this._assert(value === \"true\" || value === \"false\", 'Value of \"expanded\" attribute must be a boolean', errorPos);\n node.expanded = value === \"true\";\n return;\n }\n if (key === \"level\") {\n this._assert(!isNaN(Number(value)), 'Value of \"level\" attribute must be a number', errorPos);\n node.level = Number(value);\n return;\n }\n if (key === \"pressed\") {\n this._assert(value === \"true\" || value === \"false\" || value === \"mixed\", 'Value of \"pressed\" attribute must be a boolean or \"mixed\"', errorPos);\n node.pressed = value === \"true\" ? true : value === \"false\" ? false : \"mixed\";\n return;\n }\n if (key === \"selected\") {\n this._assert(value === \"true\" || value === \"false\", 'Value of \"selected\" attribute must be a boolean', errorPos);\n node.selected = value === \"true\";\n return;\n }\n this._assert(false, `Unsupported attribute [${key}]`, errorPos);\n }\n _assert(value, message, valuePos) {\n if (!value)\n this._throwError(message || \"Assertion error\", valuePos);\n }\n};\nvar ParserError = class extends Error {\n constructor(message, pos) {\n super(message);\n this.pos = pos;\n }\n};\n\n// packages/playwright-core/src/server/injected/injectedScript.ts\nvar InjectedScript = class {\n // eslint-disable-next-line no-restricted-globals\n constructor(window, isUnderTest, sdkLanguage, testIdAttributeNameForStrictErrorAndConsoleCodegen, stableRafCount, browserName, customEngines) {\n this.onGlobalListenersRemoved = /* @__PURE__ */ new Set();\n this._testIdAttributeNameForStrictErrorAndConsoleCodegen = \"data-testid\";\n // Recorder must use any external dependencies through InjectedScript.\n // Otherwise it will end up with a copy of all modules it uses, and any\n // module-level globals will be duplicated, which leads to subtle bugs.\n this.utils = {\n asLocator,\n cacheNormalizedWhitespaces,\n elementText,\n getAriaRole,\n getElementAccessibleDescription,\n getElementAccessibleName,\n isElementVisible,\n isInsideScope,\n normalizeWhiteSpace,\n parseAriaSnapshot\n };\n this.window = window;\n this.document = window.document;\n this.isUnderTest = isUnderTest;\n this._sdkLanguage = sdkLanguage;\n this._testIdAttributeNameForStrictErrorAndConsoleCodegen = testIdAttributeNameForStrictErrorAndConsoleCodegen;\n this._evaluator = new SelectorEvaluatorImpl(/* @__PURE__ */ new Map());\n this._engines = /* @__PURE__ */ new Map();\n this._engines.set(\"xpath\", XPathEngine);\n this._engines.set(\"xpath:light\", XPathEngine);\n this._engines.set(\"_react\", ReactEngine);\n this._engines.set(\"_vue\", VueEngine);\n this._engines.set(\"role\", createRoleEngine(false));\n this._engines.set(\"text\", this._createTextEngine(true, false));\n this._engines.set(\"text:light\", this._createTextEngine(false, false));\n this._engines.set(\"id\", this._createAttributeEngine(\"id\", true));\n this._engines.set(\"id:light\", this._createAttributeEngine(\"id\", false));\n this._engines.set(\"data-testid\", this._createAttributeEngine(\"data-testid\", true));\n this._engines.set(\"data-testid:light\", this._createAttributeEngine(\"data-testid\", false));\n this._engines.set(\"data-test-id\", this._createAttributeEngine(\"data-test-id\", true));\n this._engines.set(\"data-test-id:light\", this._createAttributeEngine(\"data-test-id\", false));\n this._engines.set(\"data-test\", this._createAttributeEngine(\"data-test\", true));\n this._engines.set(\"data-test:light\", this._createAttributeEngine(\"data-test\", false));\n this._engines.set(\"css\", this._createCSSEngine());\n this._engines.set(\"nth\", { queryAll: () => [] });\n this._engines.set(\"visible\", this._createVisibleEngine());\n this._engines.set(\"internal:control\", this._createControlEngine());\n this._engines.set(\"internal:has\", this._createHasEngine());\n this._engines.set(\"internal:has-not\", this._createHasNotEngine());\n this._engines.set(\"internal:and\", { queryAll: () => [] });\n this._engines.set(\"internal:or\", { queryAll: () => [] });\n this._engines.set(\"internal:chain\", this._createInternalChainEngine());\n this._engines.set(\"internal:label\", this._createInternalLabelEngine());\n this._engines.set(\"internal:text\", this._createTextEngine(true, true));\n this._engines.set(\"internal:has-text\", this._createInternalHasTextEngine());\n this._engines.set(\"internal:has-not-text\", this._createInternalHasNotTextEngine());\n this._engines.set(\"internal:attr\", this._createNamedAttributeEngine());\n this._engines.set(\"internal:testid\", this._createNamedAttributeEngine());\n this._engines.set(\"internal:role\", createRoleEngine(true));\n for (const { name, engine } of customEngines)\n this._engines.set(name, engine);\n this._stableRafCount = stableRafCount;\n this._browserName = browserName;\n setBrowserName(browserName);\n this._setupGlobalListenersRemovalDetection();\n this._setupHitTargetInterceptors();\n if (isUnderTest)\n this.window.__injectedScript = this;\n }\n builtinSetTimeout(callback, timeout) {\n var _a;\n if ((_a = this.window.__pwClock) == null ? void 0 : _a.builtin)\n return this.window.__pwClock.builtin.setTimeout(callback, timeout);\n return this.window.setTimeout(callback, timeout);\n }\n builtinClearTimeout(timeout) {\n var _a;\n if ((_a = this.window.__pwClock) == null ? void 0 : _a.builtin)\n return this.window.__pwClock.builtin.clearTimeout(timeout);\n return this.window.clearTimeout(timeout);\n }\n builtinRequestAnimationFrame(callback) {\n var _a;\n if ((_a = this.window.__pwClock) == null ? void 0 : _a.builtin)\n return this.window.__pwClock.builtin.requestAnimationFrame(callback);\n return this.window.requestAnimationFrame(callback);\n }\n eval(expression) {\n return this.window.eval(expression);\n }\n testIdAttributeNameForStrictErrorAndConsoleCodegen() {\n return this._testIdAttributeNameForStrictErrorAndConsoleCodegen;\n }\n parseSelector(selector) {\n const result = parseSelector(selector);\n visitAllSelectorParts(result, (part) => {\n if (!this._engines.has(part.name))\n throw this.createStacklessError(`Unknown engine \"${part.name}\" while parsing selector ${selector}`);\n });\n return result;\n }\n generateSelector(targetElement, options) {\n return generateSelector(this, targetElement, options);\n }\n generateSelectorSimple(targetElement, options) {\n return generateSelector(this, targetElement, { ...options, testIdAttributeName: this._testIdAttributeNameForStrictErrorAndConsoleCodegen }).selector;\n }\n querySelector(selector, root, strict) {\n const result = this.querySelectorAll(selector, root);\n if (strict && result.length > 1)\n throw this.strictModeViolationError(selector, result);\n return result[0];\n }\n _queryNth(elements, part) {\n const list = [...elements];\n let nth = +part.body;\n if (nth === -1)\n nth = list.length - 1;\n return new Set(list.slice(nth, nth + 1));\n }\n _queryLayoutSelector(elements, part, originalRoot) {\n const name = part.name;\n const body = part.body;\n const result = [];\n const inner = this.querySelectorAll(body.parsed, originalRoot);\n for (const element of elements) {\n const score = layoutSelectorScore(name, element, inner, body.distance);\n if (score !== void 0)\n result.push({ element, score });\n }\n result.sort((a, b) => a.score - b.score);\n return new Set(result.map((r) => r.element));\n }\n ariaSnapshot(node, options) {\n if (node.nodeType !== Node.ELEMENT_NODE)\n throw this.createStacklessError(\"Can only capture aria snapshot of Element nodes.\");\n const ariaSnapshot = generateAriaTree(node);\n return renderAriaTree(ariaSnapshot.root, options);\n }\n ariaSnapshotAsObject(node) {\n return generateAriaTree(node);\n }\n ariaSnapshotElement(snapshot, elementId) {\n return snapshot.elements.get(elementId) || null;\n }\n renderAriaTree(ariaNode, options) {\n return renderAriaTree(ariaNode, options);\n }\n renderAriaSnapshotWithIds(ariaSnapshot) {\n return renderAriaTree(ariaSnapshot.root, { ids: ariaSnapshot.ids });\n }\n getAllByAria(document, template) {\n return getAllByAria(document.documentElement, template);\n }\n querySelectorAll(selector, root) {\n if (selector.capture !== void 0) {\n if (selector.parts.some((part) => part.name === \"nth\"))\n throw this.createStacklessError(`Can't query n-th element in a request with the capture.`);\n const withHas = { parts: selector.parts.slice(0, selector.capture + 1) };\n if (selector.capture < selector.parts.length - 1) {\n const parsed = { parts: selector.parts.slice(selector.capture + 1) };\n const has = { name: \"internal:has\", body: { parsed }, source: stringifySelector(parsed) };\n withHas.parts.push(has);\n }\n return this.querySelectorAll(withHas, root);\n }\n if (!root[\"querySelectorAll\"])\n throw this.createStacklessError(\"Node is not queryable.\");\n if (selector.capture !== void 0) {\n throw this.createStacklessError(\"Internal error: there should not be a capture in the selector.\");\n }\n if (root.nodeType === 11 && selector.parts.length === 1 && selector.parts[0].name === \"css\" && selector.parts[0].source === \":scope\")\n return [root];\n this._evaluator.begin();\n try {\n let roots = /* @__PURE__ */ new Set([root]);\n for (const part of selector.parts) {\n if (part.name === \"nth\") {\n roots = this._queryNth(roots, part);\n } else if (part.name === \"internal:and\") {\n const andElements = this.querySelectorAll(part.body.parsed, root);\n roots = new Set(andElements.filter((e) => roots.has(e)));\n } else if (part.name === \"internal:or\") {\n const orElements = this.querySelectorAll(part.body.parsed, root);\n roots = new Set(sortInDOMOrder(/* @__PURE__ */ new Set([...roots, ...orElements])));\n } else if (kLayoutSelectorNames.includes(part.name)) {\n roots = this._queryLayoutSelector(roots, part, root);\n } else {\n const next = /* @__PURE__ */ new Set();\n for (const root2 of roots) {\n const all = this._queryEngineAll(part, root2);\n for (const one of all)\n next.add(one);\n }\n roots = next;\n }\n }\n return [...roots];\n } finally {\n this._evaluator.end();\n }\n }\n _queryEngineAll(part, root) {\n const result = this._engines.get(part.name).queryAll(root, part.body);\n for (const element of result) {\n if (!(\"nodeName\" in element))\n throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(element)}`);\n }\n return result;\n }\n _createAttributeEngine(attribute, shadow) {\n const toCSS = (selector) => {\n const css = `[${attribute}=${JSON.stringify(selector)}]`;\n return [{ simples: [{ selector: { css, functions: [] }, combinator: \"\" }] }];\n };\n return {\n queryAll: (root, selector) => {\n return this._evaluator.query({ scope: root, pierceShadow: shadow }, toCSS(selector));\n }\n };\n }\n _createCSSEngine() {\n return {\n queryAll: (root, body) => {\n return this._evaluator.query({ scope: root, pierceShadow: true }, body);\n }\n };\n }\n _createTextEngine(shadow, internal) {\n const queryAll = (root, selector) => {\n const { matcher, kind } = createTextMatcher(selector, internal);\n const result = [];\n let lastDidNotMatchSelf = null;\n const appendElement = (element) => {\n if (kind === \"lax\" && lastDidNotMatchSelf && lastDidNotMatchSelf.contains(element))\n return false;\n const matches = elementMatchesText(this._evaluator._cacheText, element, matcher);\n if (matches === \"none\")\n lastDidNotMatchSelf = element;\n if (matches === \"self\" || matches === \"selfAndChildren\" && kind === \"strict\" && !internal)\n result.push(element);\n };\n if (root.nodeType === Node.ELEMENT_NODE)\n appendElement(root);\n const elements = this._evaluator._queryCSS({ scope: root, pierceShadow: shadow }, \"*\");\n for (const element of elements)\n appendElement(element);\n return result;\n };\n return { queryAll };\n }\n _createInternalHasTextEngine() {\n return {\n queryAll: (root, selector) => {\n if (root.nodeType !== 1)\n return [];\n const element = root;\n const text = elementText(this._evaluator._cacheText, element);\n const { matcher } = createTextMatcher(selector, true);\n return matcher(text) ? [element] : [];\n }\n };\n }\n _createInternalHasNotTextEngine() {\n return {\n queryAll: (root, selector) => {\n if (root.nodeType !== 1)\n return [];\n const element = root;\n const text = elementText(this._evaluator._cacheText, element);\n const { matcher } = createTextMatcher(selector, true);\n return matcher(text) ? [] : [element];\n }\n };\n }\n _createInternalLabelEngine() {\n return {\n queryAll: (root, selector) => {\n const { matcher } = createTextMatcher(selector, true);\n const allElements = this._evaluator._queryCSS({ scope: root, pierceShadow: true }, \"*\");\n return allElements.filter((element) => {\n return getElementLabels(this._evaluator._cacheText, element).some((label) => matcher(label));\n });\n }\n };\n }\n _createNamedAttributeEngine() {\n const queryAll = (root, selector) => {\n const parsed = parseAttributeSelector(selector, true);\n if (parsed.name || parsed.attributes.length !== 1)\n throw new Error(\"Malformed attribute selector: \" + selector);\n const { name, value, caseSensitive } = parsed.attributes[0];\n const lowerCaseValue = caseSensitive ? null : value.toLowerCase();\n let matcher;\n if (value instanceof RegExp)\n matcher = (s) => !!s.match(value);\n else if (caseSensitive)\n matcher = (s) => s === value;\n else\n matcher = (s) => s.toLowerCase().includes(lowerCaseValue);\n const elements = this._evaluator._queryCSS({ scope: root, pierceShadow: true }, `[${name}]`);\n return elements.filter((e) => matcher(e.getAttribute(name)));\n };\n return { queryAll };\n }\n _createControlEngine() {\n return {\n queryAll(root, body) {\n if (body === \"enter-frame\")\n return [];\n if (body === \"return-empty\")\n return [];\n if (body === \"component\") {\n if (root.nodeType !== 1)\n return [];\n return [root.childElementCount === 1 ? root.firstElementChild : root];\n }\n throw new Error(`Internal error, unknown internal:control selector ${body}`);\n }\n };\n }\n _createHasEngine() {\n const queryAll = (root, body) => {\n if (root.nodeType !== 1)\n return [];\n const has = !!this.querySelector(body.parsed, root, false);\n return has ? [root] : [];\n };\n return { queryAll };\n }\n _createHasNotEngine() {\n const queryAll = (root, body) => {\n if (root.nodeType !== 1)\n return [];\n const has = !!this.querySelector(body.parsed, root, false);\n return has ? [] : [root];\n };\n return { queryAll };\n }\n _createVisibleEngine() {\n const queryAll = (root, body) => {\n if (root.nodeType !== 1)\n return [];\n const visible = body === \"true\";\n return isElementVisible(root) === visible ? [root] : [];\n };\n return { queryAll };\n }\n _createInternalChainEngine() {\n const queryAll = (root, body) => {\n return this.querySelectorAll(body.parsed, root);\n };\n return { queryAll };\n }\n extend(source, params) {\n const constrFunction = this.window.eval(`\n (() => {\n const module = {};\n ${source}\n return module.exports.default();\n })()`);\n return new constrFunction(this, params);\n }\n async viewportRatio(element) {\n return await new Promise((resolve) => {\n const observer = new IntersectionObserver((entries) => {\n resolve(entries[0].intersectionRatio);\n observer.disconnect();\n });\n observer.observe(element);\n this.builtinRequestAnimationFrame(() => {\n });\n });\n }\n getElementBorderWidth(node) {\n if (node.nodeType !== Node.ELEMENT_NODE || !node.ownerDocument || !node.ownerDocument.defaultView)\n return { left: 0, top: 0 };\n const style = node.ownerDocument.defaultView.getComputedStyle(node);\n return { left: parseInt(style.borderLeftWidth || \"\", 10), top: parseInt(style.borderTopWidth || \"\", 10) };\n }\n describeIFrameStyle(iframe) {\n if (!iframe.ownerDocument || !iframe.ownerDocument.defaultView)\n return \"error:notconnected\";\n const defaultView = iframe.ownerDocument.defaultView;\n for (let e = iframe; e; e = parentElementOrShadowHost(e)) {\n if (defaultView.getComputedStyle(e).transform !== \"none\")\n return \"transformed\";\n }\n const iframeStyle = defaultView.getComputedStyle(iframe);\n return {\n left: parseInt(iframeStyle.borderLeftWidth || \"\", 10) + parseInt(iframeStyle.paddingLeft || \"\", 10),\n top: parseInt(iframeStyle.borderTopWidth || \"\", 10) + parseInt(iframeStyle.paddingTop || \"\", 10)\n };\n }\n retarget(node, behavior) {\n let element = node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement;\n if (!element)\n return null;\n if (behavior === \"none\")\n return element;\n if (!element.matches(\"input, textarea, select\") && !element.isContentEditable) {\n if (behavior === \"button-link\")\n element = element.closest(\"button, [role=button], a, [role=link]\") || element;\n else\n element = element.closest(\"button, [role=button], [role=checkbox], [role=radio]\") || element;\n }\n if (behavior === \"follow-label\") {\n if (!element.matches(\"a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]\") && !element.isContentEditable) {\n const enclosingLabel = element.closest(\"label\");\n if (enclosingLabel && enclosingLabel.control)\n element = enclosingLabel.control;\n }\n }\n return element;\n }\n async checkElementStates(node, states) {\n if (states.includes(\"stable\")) {\n const stableResult = await this._checkElementIsStable(node);\n if (stableResult === false)\n return { missingState: \"stable\" };\n if (stableResult === \"error:notconnected\")\n return \"error:notconnected\";\n }\n for (const state of states) {\n if (state !== \"stable\") {\n const result = this.elementState(node, state);\n if (result.received === \"error:notconnected\")\n return \"error:notconnected\";\n if (!result.matches)\n return { missingState: state };\n }\n }\n }\n async _checkElementIsStable(node) {\n const continuePolling = Symbol(\"continuePolling\");\n let lastRect;\n let stableRafCounter = 0;\n let lastTime = 0;\n const check = () => {\n const element = this.retarget(node, \"no-follow-label\");\n if (!element)\n return \"error:notconnected\";\n const time = performance.now();\n if (this._stableRafCount > 1 && time - lastTime < 15)\n return continuePolling;\n lastTime = time;\n const clientRect = element.getBoundingClientRect();\n const rect = { x: clientRect.top, y: clientRect.left, width: clientRect.width, height: clientRect.height };\n if (lastRect) {\n const samePosition = rect.x === lastRect.x && rect.y === lastRect.y && rect.width === lastRect.width && rect.height === lastRect.height;\n if (!samePosition)\n return false;\n if (++stableRafCounter >= this._stableRafCount)\n return true;\n }\n lastRect = rect;\n return continuePolling;\n };\n let fulfill;\n let reject;\n const result = new Promise((f, r) => {\n fulfill = f;\n reject = r;\n });\n const raf = () => {\n try {\n const success = check();\n if (success !== continuePolling)\n fulfill(success);\n else\n this.builtinRequestAnimationFrame(raf);\n } catch (e) {\n reject(e);\n }\n };\n this.builtinRequestAnimationFrame(raf);\n return result;\n }\n elementState(node, state) {\n const element = this.retarget(node, [\"visible\", \"hidden\"].includes(state) ? \"none\" : \"follow-label\");\n if (!element || !element.isConnected) {\n if (state === \"hidden\")\n return { matches: true, received: \"hidden\" };\n return { matches: false, received: \"error:notconnected\" };\n }\n if (state === \"visible\" || state === \"hidden\") {\n const visible = isElementVisible(element);\n return {\n matches: state === \"visible\" ? visible : !visible,\n received: visible ? \"visible\" : \"hidden\"\n };\n }\n if (state === \"disabled\" || state === \"enabled\") {\n const disabled = getAriaDisabled(element);\n return {\n matches: state === \"disabled\" ? disabled : !disabled,\n received: disabled ? \"disabled\" : \"enabled\"\n };\n }\n if (state === \"editable\") {\n const disabled = getAriaDisabled(element);\n const readonly = getReadonly(element);\n if (readonly === \"error\")\n throw this.createStacklessError(\"Element is not an %s.%s',e.slice(0,2).join("."),e.slice(2,4).join(".")))}};Gt.Address4=Vl});var Gl=w(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.RE_URL_WITH_PORT=Fe.RE_URL=Fe.RE_ZONE_STRING=Fe.RE_SUBNET_STRING=Fe.RE_BAD_ADDRESS=Fe.RE_BAD_CHARACTERS=Fe.TYPES=Fe.SCOPES=Fe.GROUPS=Fe.BITS=void 0;Fe.BITS=128;Fe.GROUPS=8;Fe.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};Fe.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};Fe.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;Fe.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;Fe.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;Fe.RE_ZONE_STRING=/%.*$/;Fe.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);Fe.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var Yl=w(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.simpleGroup=Yt.spanLeadingZeroes=Yt.spanAll=Yt.spanAllZeroes=void 0;var wm=fn();function xm(t){return t.replace(/(0+)/g,'$1')}Yt.spanAllZeroes=xm;function gS(t,e=0){return t.split("").map((r,n)=>(0,wm.sprintf)('%s',r,n+e,xm(r))).join("")}Yt.spanAll=gS;function Sm(t){return t.replace(/^(0+)/,'$1')}function vS(t){return t.split(":").map(i=>Sm(i)).join(":")}Yt.spanLeadingZeroes=vS;function yS(t,e=0){return t.split(":").map((r,n)=>/group-v4/.test(r)?r:(0,wm.sprintf)('%s',n+e,Sm(r)))}Yt.simpleGroup=yS});var Em=w(ze=>{"use strict";var bS=ze&&ze.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),_S=ze&&ze.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),wS=ze&&ze.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&bS(e,t,i);return _S(e,t),e};Object.defineProperty(ze,"__esModule",{value:!0});ze.possibleElisions=ze.simpleRegularExpression=ze.ADDRESS_BOUNDARY=ze.padGroup=ze.groupPossibilities=void 0;var xS=wS(Gl()),Lr=fn();function Hs(t){return(0,Lr.sprintf)("(%s)",t.join("|"))}ze.groupPossibilities=Hs;function Vs(t){return t.length<4?(0,Lr.sprintf)("0{0,%d}%s",4-t.length,t):t}ze.padGroup=Vs;ze.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function SS(t){let e=[];t.forEach((r,n)=>{parseInt(r,16)===0&&e.push(n)});let i=e.map(r=>t.map((n,s)=>{if(s===r){let o=s===0||s===xS.GROUPS-1?":":"";return Hs([Vs(n),o])}return Vs(n)}).join(":"));return i.push(t.map(Vs).join(":")),Hs(i)}ze.simpleRegularExpression=SS;function ES(t,e,i){let r=e?"":":",n=i?"":":",s=[];!e&&!i&&s.push("::"),e&&i&&s.push(""),(i&&!e||!i&&e)&&s.push(":"),s.push((0,Lr.sprintf)("%s(:0{1,4}){1,%d}",r,t-1)),s.push((0,Lr.sprintf)("(0{1,4}:){1,%d}%s",t-1,n)),s.push((0,Lr.sprintf)("(0{1,4}:){%d}0{1,4}",t-1));for(let o=1;o{"use strict";var kS=Wt&&Wt.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),OS=Wt&&Wt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ys=Wt&&Wt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&kS(e,t,i);return OS(e,t),e};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.Address6=void 0;var km=Ys(Dl()),Wl=Ys(jl()),Le=Ys(Gl()),zl=Ys(Yl()),Yi=Hl(),Wi=Em(),ni=js(),lt=$l(),ct=fn();function Gs(t){if(!t)throw new Error("Assertion failed.")}function CS(t){let e=/(\d+)(\d{3})/;for(;e.test(t);)t=t.replace(e,"$1,$2");return t}function TS(t){return t=t.replace(/^(0{1,})([1-9]+)$/,'$1$2'),t=t.replace(/^(0{1,})(0)$/,'$1$2'),t}function AS(t,e){let i=[],r=[],n;for(n=0;ne[1]&&r.push(t[n]);return i.concat(["compact"]).concat(r)}function Om(t){return(0,ct.sprintf)("%04x",parseInt(t,16))}function Cm(t){return t&255}var Kl=class t{constructor(e,i){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=km.isInSubnet,this.isCorrect=km.isCorrect(Le.BITS),i===void 0?this.groups=Le.GROUPS:this.groups=i,this.address=e;let r=Le.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>Le.BITS)throw new ni.AddressError("Invalid subnet mask.");e=e.replace(Le.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new ni.AddressError("Invalid subnet mask.");let n=Le.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(Le.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new t(e),!0}catch{return!1}}static fromBigInteger(e){let i=e.toString(16).padStart(32,"0"),r=[],n;for(n=0;n65536)&&(r=null)):r=null,{address:new t(i),port:r}}static fromAddress4(e){let i=new Yi.Address4(e),r=Le.BITS-(Wl.BITS-i.subnetMask);return new t(`::ffff:${i.correctForm()}/${r}`)}static fromArpa(e){let i=e.replace(/(\.ip6\.arpa)?\.$/,""),r=7;if(i.length!==63)throw new ni.AddressError("Invalid 'ip6.arpa' form.");let n=i.split(".").reverse();for(let s=r;s>0;s--){let o=s*4;n.splice(o,0,":")}return i=n.join(""),new t(i)}microsoftTranscription(){return(0,ct.sprintf)("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let i=Le.BITS-this.subnetMask,r=Math.abs(e-Le.BITS),n=i-r;return n<0?"0":CS(new lt.BigInteger("2",10).pow(n).toString(10))}_startAddress(){return new lt.BigInteger(this.mask()+"0".repeat(Le.BITS-this.subnetMask),2)}startAddress(){return t.fromBigInteger(this._startAddress())}startAddressExclusive(){let e=new lt.BigInteger("1");return t.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new lt.BigInteger(this.mask()+"1".repeat(Le.BITS-this.subnetMask),2)}endAddress(){return t.fromBigInteger(this._endAddress())}endAddressExclusive(){let e=new lt.BigInteger("1");return t.fromBigInteger(this._endAddress().subtract(e))}getScope(){let e=Le.SCOPES[this.getBits(12,16).intValue()];return this.getType()==="Global unicast"&&e!=="Link local"&&(e="Global"),e||"Unknown"}getType(){for(let e of Object.keys(Le.TYPES))if(this.isInSubnet(new t(e)))return Le.TYPES[e];return"Global unicast"}getBits(e,i){return new lt.BigInteger(this.getBitsBase2(e,i),2)}getBitsBase2(e,i){return this.binaryZeroPad().slice(e,i)}getBitsBase16(e,i){let r=i-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,i).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,Le.BITS)}reverseForm(e){e||(e={});let i=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,i).reverse().join(".");return i>0?e.omitSuffix?r:(0,ct.sprintf)("%s.ip6.arpa.",r):e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,i=[],r=0,n=[];for(e=0;e0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let s=n.map(a=>a[1]-a[0]+1);if(n.length>0){let a=s.indexOf(Math.max(...s));i=AS(this.parsedAddress,n[a])}else i=this.parsedAddress;for(e=0;e1?"s":"",i.join("")),e.replace(Le.RE_BAD_CHARACTERS,'$1'));let r=e.match(Le.RE_BAD_ADDRESS);if(r)throw new ni.AddressError((0,ct.sprintf)("Address failed regex: %s",r.join("")),e.replace(Le.RE_BAD_ADDRESS,'$1'));let n=[],s=e.split("::");if(s.length===2){let o=s[0].split(":"),a=s[1].split(":");o.length===1&&o[0]===""&&(o=[]),a.length===1&&a[0]===""&&(a=[]);let l=this.groups-(o.length+a.length);if(!l)throw new ni.AddressError("Error parsing groups");this.elidedGroups=l,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,n=n.concat(o);for(let c=0;c(0,ct.sprintf)("%x",parseInt(o,16))),n.length!==this.groups)throw new ni.AddressError("Incorrect number of groups found");return n}canonicalForm(){return this.parsedAddress.map(Om).join(":")}decimal(){return this.parsedAddress.map(e=>(0,ct.sprintf)("%05d",parseInt(e,16))).join(":")}bigInteger(){return new lt.BigInteger(this.parsedAddress.map(Om).join(""),16)}to4(){let e=this.binaryZeroPad().split("");return Yi.Address4.fromHex(new lt.BigInteger(e.slice(96,128).join(""),2).toString(16))}to4in6(){let e=this.to4(),r=new t(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),n="";return/:$/.test(r)||(n=":"),r+n+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),i=this.getBits(80,96).xor(new lt.BigInteger("ffff",16)).toString(),r=Yi.Address4.fromHex(this.getBitsBase16(32,64)),n=Yi.Address4.fromHex(this.getBits(96,128).xor(new lt.BigInteger("ffffffff",16)).toString(16)),s=this.getBits(64,80),o=this.getBitsBase2(64,80),a=s.testBit(15),l=s.testBit(14),c=s.testBit(8),u=s.testBit(9),f=new lt.BigInteger(o.slice(2,6)+o.slice(8,16),2).toString(10);return{prefix:(0,ct.sprintf)("%s:%s",e.slice(0,4),e.slice(4,8)),server4:r.address,client4:n.address,flags:o,coneNat:a,microsoft:{reserved:l,universalLocal:u,groupIndividual:c,nonce:f},udpPort:i}}inspect6to4(){let e=this.getBitsBase16(0,16),i=Yi.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:(0,ct.sprintf)("%s",e.slice(0,4)),gateway:i.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new t(e)}toByteArray(){let e=this.bigInteger().toByteArray();return e.length===17&&e[0]===0?e.slice(1):e}toUnsignedByteArray(){return this.toByteArray().map(Cm)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(Cm))}static fromUnsignedByteArray(e){let i=new lt.BigInteger("256",10),r=new lt.BigInteger("0",10),n=new lt.BigInteger("1",10);for(let s=e.length-1;s>=0;s--)r=r.add(n.multiply(new lt.BigInteger(e[s].toString(10),10))),n=n.multiply(i);return t.fromBigInteger(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new t("2001::/32"))}is6to4(){return this.isInSubnet(new t("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(e){return e===void 0?e="":e=(0,ct.sprintf)(":%s",e),(0,ct.sprintf)("http://[%s]%s/",this.correctForm(),e)}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let i=this.correctForm;return e.v4&&(i=this.to4in6),e.className?(0,ct.sprintf)('%2$s',e.prefix,i.call(this),e.className):(0,ct.sprintf)('%2$s',e.prefix,i.call(this))}group(){if(this.elidedGroups===0)return zl.simpleGroup(this.address).join(":");Gs(typeof this.elidedGroups=="number"),Gs(typeof this.elisionBegin=="number");let e=[],[i,r]=this.address.split("::");i.length?e.push(...zl.simpleGroup(i)):e.push("");let n=["hover-group"];for(let s=this.elisionBegin;s',n.join(" "))),r.length?e.push(...zl.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(Gs(this.address4 instanceof Yi.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let i=[],r=new t(this.correctForm());if(r.elidedGroups===0)i.push((0,Wi.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===Le.GROUPS)i.push((0,Wi.possibleElisions)(Le.GROUPS));else{let n=r.address.split("::");n[0].length&&i.push((0,Wi.simpleRegularExpression)(n[0].split(":"))),Gs(typeof r.elidedGroups=="number"),i.push((0,Wi.possibleElisions)(r.elidedGroups,n[0].length!==0,n[1].length!==0)),n[1].length&&i.push((0,Wi.simpleRegularExpression)(n[1].split(":"))),i=[i.join(":")]}return e||(i=["(?=^|",Wi.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...i,")(?=[^\\w\\:]|",Wi.ADDRESS_BOUNDARY,"|$)"]),i.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};Wt.Address6=Kl});var Jl=w(rt=>{"use strict";var IS=rt&&rt.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),NS=rt&&rt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),LS=rt&&rt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&IS(e,t,i);return NS(e,t),e};Object.defineProperty(rt,"__esModule",{value:!0});rt.v6=rt.AddressError=rt.Address6=rt.Address4=void 0;var BS=Hl();Object.defineProperty(rt,"Address4",{enumerable:!0,get:function(){return BS.Address4}});var RS=Tm();Object.defineProperty(rt,"Address6",{enumerable:!0,get:function(){return RS.Address6}});var PS=js();Object.defineProperty(rt,"AddressError",{enumerable:!0,get:function(){return PS.AddressError}});var MS=LS(Yl());rt.v6={helpers:MS}});var Rm=w(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.ipToBuffer=Tt.int32ToIpv4=Tt.ipv4ToInt32=Tt.validateSocksClientChainOptions=Tt.validateSocksClientOptions=void 0;var ut=ql(),Ke=Ml(),FS=require("stream"),Zl=Jl(),Am=require("net");function qS(t,e=["connect","bind","associate"]){if(!Ke.SocksCommand[t.command])throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksCommand,t);if(e.indexOf(t.command)===-1)throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksCommandForOperation,t);if(!Nm(t.destination))throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsDestination,t);if(!Lm(t.proxy))throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsProxy,t);if(Im(t.proxy,t),t.timeout&&!Bm(t.timeout))throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsTimeout,t);if(t.existing_socket&&!(t.existing_socket instanceof FS.Duplex))throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsExistingSocket,t)}Tt.validateSocksClientOptions=qS;function DS(t){if(t.command!=="connect")throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksCommandChain,t);if(!Nm(t.destination))throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsDestination,t);if(!(t.proxies&&Array.isArray(t.proxies)&&t.proxies.length>=2))throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsProxiesLength,t);if(t.proxies.forEach(e=>{if(!Lm(e))throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsProxy,t);Im(e,t)}),t.timeout&&!Bm(t.timeout))throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsTimeout,t)}Tt.validateSocksClientChainOptions=DS;function Im(t,e){if(t.custom_auth_method!==void 0){if(t.custom_auth_methodKe.SOCKS5_CUSTOM_AUTH_END)throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(t.custom_auth_request_handler===void 0||typeof t.custom_auth_request_handler!="function")throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(t.custom_auth_response_size===void 0)throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(t.custom_auth_response_handler===void 0||typeof t.custom_auth_response_handler!="function")throw new ut.SocksClientError(Ke.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}function Nm(t){return t&&typeof t.host=="string"&&typeof t.port=="number"&&t.port>=0&&t.port<=65535}function Lm(t){return t&&(typeof t.host=="string"||typeof t.ipaddress=="string")&&typeof t.port=="number"&&t.port>=0&&t.port<=65535&&(t.type===4||t.type===5)}function Bm(t){return typeof t=="number"&&t>0}function jS(t){return new Zl.Address4(t).toArray().reduce((i,r)=>(i<<8)+r,0)}Tt.ipv4ToInt32=jS;function US(t){let e=t>>>24&255,i=t>>>16&255,r=t>>>8&255,n=t&255;return[e,i,r,n].join(".")}Tt.int32ToIpv4=US;function $S(t){if(Am.isIPv4(t)){let e=new Zl.Address4(t);return Buffer.from(e.toArray())}else if(Am.isIPv6(t)){let e=new Zl.Address6(t);return Buffer.from(e.canonicalForm().split(":").map(i=>i.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}Tt.ipToBuffer=$S});var Pm=w(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.ReceiveBuffer=void 0;var Ql=class{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let i=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),i.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let i=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(i),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,i}};Ws.ReceiveBuffer=Ql});var Mm=w(gi=>{"use strict";var Br=gi&&gi.__awaiter||function(t,e,i,r){function n(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):n(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(gi,"__esModule",{value:!0});gi.SocksClientError=gi.SocksClient=void 0;var VS=require("events"),Rr=require("net"),dt=um(),F=Ml(),xt=Rm(),HS=Pm(),ec=ql();Object.defineProperty(gi,"SocksClientError",{enumerable:!0,get:function(){return ec.SocksClientError}});var Xl=Jl(),tc=class t extends VS.EventEmitter{constructor(e){super(),this.options=Object.assign({},e),(0,xt.validateSocksClientOptions)(e),this.setState(F.SocksClientState.Created)}static createConnection(e,i){return new Promise((r,n)=>{try{(0,xt.validateSocksClientOptions)(e,["connect"])}catch(o){return typeof i=="function"?(i(o),r(o)):n(o)}let s=new t(e);s.connect(e.existing_socket),s.once("established",o=>{s.removeAllListeners(),typeof i=="function"&&i(null,o),r(o)}),s.once("error",o=>{s.removeAllListeners(),typeof i=="function"?(i(o),r(o)):n(o)})})}static createConnectionChain(e,i){return new Promise((r,n)=>Br(this,void 0,void 0,function*(){try{(0,xt.validateSocksClientChainOptions)(e)}catch(s){return typeof i=="function"?(i(s),r(s)):n(s)}e.randomizeChain&&(0,ec.shuffleArray)(e.proxies);try{let s;for(let o=0;othis.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let i=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||F.DEFAULT_TIMEOUT);i.unref&&typeof i.unref=="function"&&i.unref(),e?this.socket=e:this.socket=new Rr.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(F.SocksClientState.Connecting),this.receiveBuffer=new HS.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let n=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",n)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==F.SocksClientState.Established&&this.state!==F.SocksClientState.BoundWaitingForConnection&&this.closeSocket(F.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(F.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(F.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==F.SocksClientState.Established&&this.state!==F.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===F.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===F.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===F.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===F.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(F.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(F.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==F.SocksClientState.Error&&(this.setState(F.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new ec.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",i=new dt.SmartBuffer;i.writeUInt8(4),i.writeUInt8(F.SocksCommand[this.options.command]),i.writeUInt16BE(this.options.destination.port),Rr.isIPv4(this.options.destination.host)?(i.writeBuffer((0,xt.ipToBuffer)(this.options.destination.host)),i.writeStringNT(e)):(i.writeUInt8(0),i.writeUInt8(0),i.writeUInt8(0),i.writeUInt8(1),i.writeStringNT(e),i.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(i.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==F.Socks4Response.Granted)this.closeSocket(`${F.ERRORS.Socks4ProxyRejectedConnection} - (${F.Socks4Response[e[1]]})`);else if(F.SocksCommand[this.options.command]===F.SocksCommand.bind){let i=dt.SmartBuffer.fromBuffer(e);i.readOffset=2;let r={port:i.readUInt16BE(),host:(0,xt.int32ToIpv4)(i.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(F.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==F.Socks4Response.Granted)this.closeSocket(`${F.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${F.Socks4Response[e[1]]})`);else{let i=dt.SmartBuffer.fromBuffer(e);i.readOffset=2;let r={port:i.readUInt16BE(),host:(0,xt.int32ToIpv4)(i.readUInt32BE())};this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new dt.SmartBuffer,i=[F.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&i.push(F.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&i.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(i.length);for(let r of i)e.writeUInt8(r);this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(F.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(F.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===F.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(F.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===F.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=F.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===F.Socks5Auth.UserPass?(this.socks5ChosenAuthType=F.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(F.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",i=this.options.proxy.password||"",r=new dt.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(i)),r.writeString(i),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(F.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return Br(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(F.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return Br(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return Br(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return Br(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return Br(this,void 0,void 0,function*(){this.setState(F.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===F.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===F.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(F.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new dt.SmartBuffer;e.writeUInt8(5),e.writeUInt8(F.SocksCommand[this.options.command]),e.writeUInt8(0),Rr.isIPv4(this.options.destination.host)?(e.writeUInt8(F.Socks5HostType.IPv4),e.writeBuffer((0,xt.ipToBuffer)(this.options.destination.host))):Rr.isIPv6(this.options.destination.host)?(e.writeUInt8(F.Socks5HostType.IPv6),e.writeBuffer((0,xt.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(F.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(F.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==F.Socks5Response.Granted)this.closeSocket(`${F.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${F.Socks5Response[e[1]]}`);else{let i=e[3],r,n;if(i===F.Socks5HostType.IPv4){let s=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length{"use strict";var GS=zi&&zi.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),YS=zi&&zi.__exportStar||function(t,e){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(e,i)&&GS(e,t,i)};Object.defineProperty(zi,"__esModule",{value:!0});YS(Mm(),zi)});var qm=w(Ki=>{"use strict";var WS=Ki&&Ki.__awaiter||function(t,e,i,r){function n(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):n(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})},zs=Ki&&Ki.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ki,"__esModule",{value:!0});var zS=zs(require("dns")),KS=zs(require("tls")),JS=zs(require("url")),ZS=zs(br()),QS=ja(),XS=Fm(),ic=ZS.default("socks-proxy-agent");function eE(t){return new Promise((e,i)=>{zS.default.lookup(t,(r,n)=>{r?i(r):e(n)})})}function tE(t){let e=0,i=!1,r=5,n=t.hostname||t.host;if(!n)throw new TypeError('No "host"');if(typeof t.port=="number"?e=t.port:typeof t.port=="string"&&(e=parseInt(t.port,10)),e||(e=1080),t.protocol)switch(t.protocol.replace(":","")){case"socks4":i=!0;case"socks4a":r=4;break;case"socks5":i=!0;case"socks":case"socks5h":r=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${t.protocol}`)}if(typeof t.type!="undefined")if(t.type===4||t.type===5)r=t.type;else throw new TypeError(`"type" must be 4 or 5, got: ${t.type}`);let s={host:n,port:e,type:r},o=t.userId||t.username,a=t.password;if(t.auth){let l=t.auth.split(":");o=l[0],a=l[1]}return o&&Object.defineProperty(s,"userId",{value:o,enumerable:!1}),a&&Object.defineProperty(s,"password",{value:a,enumerable:!1}),{lookup:i,proxy:s}}var rc=class extends QS.Agent{constructor(e){let i;if(typeof e=="string"?i=JS.default.parse(e):i=e,!i)throw new TypeError("a SOCKS proxy server `host` and `port` must be specified!");super(i);let r=tE(i);this.lookup=r.lookup,this.proxy=r.proxy,this.tlsConnectionOptions=i.tls||{}}callback(e,i){return WS(this,void 0,void 0,function*(){let{lookup:r,proxy:n}=this,{host:s,port:o,timeout:a}=i;if(!s)throw new Error("No `host` defined!");r&&(s=yield eE(s));let l={proxy:n,destination:{host:s,port:o},command:"connect",timeout:a};ic("Creating socks proxy connection: %o",l);let{socket:c}=yield XS.SocksClient.createConnection(l);if(ic("Successfully created socks proxy connection"),i.secureEndpoint){ic("Upgrading socket connection to TLS");let u=i.servername||i.host;return KS.default.connect(Object.assign(Object.assign(Object.assign({},iE(i,"host","hostname","path","port")),{socket:c,servername:u}),this.tlsConnectionOptions))}return c})}};Ki.default=rc;function iE(t,...e){let i={},r;for(r in t)e.includes(r)||(i[r]=t[r]);return i}});var jm=w((oc,Dm)=>{"use strict";var rE=oc&&oc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},nc=rE(qm());function sc(t){return new nc.default(t)}(function(t){t.SocksProxyAgent=nc.default,t.prototype=nc.default.prototype})(sc||(sc={}));Dm.exports=sc});var $m=w((oN,Um)=>{"use strict";var nE=/[|\\{}()[\]^$+*?.-]/g;Um.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(nE,"\\$&")}});var Ym=w((aN,Gm)=>{"use strict";var sE=$m(),oE=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",Hm=[].concat(require("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));Hm.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var ac=class t{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=t.nodeInternals()),"cwd"in e||(e.cwd=oE),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,aE(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...Hm]}clean(e,i=0){i=" ".repeat(i),Array.isArray(e)||(e=e.split(` -`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let r=!1,n=null,s=[];return e.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(l=>l.test(o)))return;let a=/^\s*at /.test(o);r?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),a&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(a?(n&&(s.push(n),n=null),s.push(o)):(r=!0,n=o))}),s.map(o=>`${i}${o} -`).join("")}captureString(e,i=this.captureString){typeof e=="function"&&(i=e,e=1/0);let{stackTraceLimit:r}=Error;e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,i);let{stack:s}=n;return Error.stackTraceLimit=r,this.clean(s)}capture(e,i=this.capture){typeof e=="function"&&(i=e,e=1/0);let{prepareStackTrace:r,stackTraceLimit:n}=Error;Error.prepareStackTrace=(a,l)=>this._wrapCallSite?l.map(this._wrapCallSite):l,e&&(Error.stackTraceLimit=e);let s={};Error.captureStackTrace(s,i);let{stack:o}=s;return Object.assign(Error,{prepareStackTrace:r,stackTraceLimit:n}),o}at(e=this.at){let[i]=this.capture(1,e);if(!i)return{};let r={line:i.getLineNumber(),column:i.getColumnNumber()};Vm(r,i.getFileName(),this._cwd),i.isConstructor()&&(r.constructor=!0),i.isEval()&&(r.evalOrigin=i.getEvalOrigin()),i.isNative()&&(r.native=!0);let n;try{n=i.getTypeName()}catch{}n&&n!=="Object"&&n!=="[object Object]"&&(r.type=n);let s=i.getFunctionName();s&&(r.function=s);let o=i.getMethodName();return o&&s!==o&&(r.method=o),r}parseLine(e){let i=e&&e.match(lE);if(!i)return null;let r=i[1]==="new",n=i[2],s=i[3],o=i[4],a=Number(i[5]),l=Number(i[6]),c=i[7],u=i[8],f=i[9],d=i[10]==="native",g=i[11]===")",m,v={};if(u&&(v.line=Number(u)),f&&(v.column=Number(f)),g&&c){let b=0;for(let _=c.length-1;_>0;_--)if(c.charAt(_)===")")b++;else if(c.charAt(_)==="("&&c.charAt(_-1)===" "&&(b--,b===-1&&c.charAt(_-1)===" ")){let S=c.slice(0,_-1);c=c.slice(_+1),n+=` (${S}`;break}}if(n){let b=n.match(cE);b&&(n=b[1],m=b[2])}return Vm(v,c,this._cwd),r&&(v.constructor=!0),s&&(v.evalOrigin=s,v.evalLine=a,v.evalColumn=l,v.evalFile=o&&o.replace(/\\/g,"/")),d&&(v.native=!0),n&&(v.function=n),m&&n!==m&&(v.method=m),v}};function Vm(t,e,i){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${i}/`)&&(e=e.slice(i.length+1)),t.file=e)}function aE(t){if(t.length===0)return[];let e=t.map(i=>sE(i));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var lE=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),cE=/^(.*?) \[as (.*?)\]$/;Gm.exports=ac});var Se=w(Xe=>{"use strict";var lc=Symbol.for("yaml.alias"),Wm=Symbol.for("yaml.document"),Ks=Symbol.for("yaml.map"),zm=Symbol.for("yaml.pair"),cc=Symbol.for("yaml.scalar"),Js=Symbol.for("yaml.seq"),si=Symbol.for("yaml.node.type"),uE=t=>!!t&&typeof t=="object"&&t[si]===lc,fE=t=>!!t&&typeof t=="object"&&t[si]===Wm,hE=t=>!!t&&typeof t=="object"&&t[si]===Ks,pE=t=>!!t&&typeof t=="object"&&t[si]===zm,Km=t=>!!t&&typeof t=="object"&&t[si]===cc,dE=t=>!!t&&typeof t=="object"&&t[si]===Js;function Jm(t){if(t&&typeof t=="object")switch(t[si]){case Ks:case Js:return!0}return!1}function mE(t){if(t&&typeof t=="object")switch(t[si]){case lc:case Ks:case cc:case Js:return!0}return!1}var gE=t=>(Km(t)||Jm(t))&&!!t.anchor;Xe.ALIAS=lc;Xe.DOC=Wm;Xe.MAP=Ks;Xe.NODE_TYPE=si;Xe.PAIR=zm;Xe.SCALAR=cc;Xe.SEQ=Js;Xe.hasAnchor=gE;Xe.isAlias=uE;Xe.isCollection=Jm;Xe.isDocument=fE;Xe.isMap=hE;Xe.isNode=mE;Xe.isPair=pE;Xe.isScalar=Km;Xe.isSeq=dE});var pn=w(uc=>{"use strict";var He=Se(),mt=Symbol("break visit"),Zm=Symbol("skip children"),zt=Symbol("remove node");function Zs(t,e){let i=Qm(e);He.isDocument(t)?Pr(null,t.contents,i,Object.freeze([t]))===zt&&(t.contents=null):Pr(null,t,i,Object.freeze([]))}Zs.BREAK=mt;Zs.SKIP=Zm;Zs.REMOVE=zt;function Pr(t,e,i,r){let n=Xm(t,e,i,r);if(He.isNode(n)||He.isPair(n))return eg(t,r,n),Pr(t,n,i,r);if(typeof n!="symbol"){if(He.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s{"use strict";var tg=Se(),vE=pn(),yE={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},bE=t=>t.replace(/[!,[\]{}]/g,e=>yE[e]),dn=class t{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,i)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let o=/^\d+\.\d+$/.test(s);return i(6,`Unsupported YAML version ${s}`,o),!1}}default:return i(0,`Unknown directive ${n}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),o)}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||i(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(o){return i(String(o)),null}return r==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[i,r]of Object.entries(this.tags))if(e.startsWith(r))return i+bE(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&tg.isNode(e.contents)){let s={};vE.visit(e.contents,(o,a)=>{tg.isNode(a)&&a.tag&&(s[a.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(o)))&&i.push(`%TAG ${s} ${o}`);return i.join(` -`)}};dn.defaultYaml={explicit:!1,version:"1.2"};dn.defaultTags={"!!":"tag:yaml.org,2002:"};ig.Directives=dn});var Xs=w(mn=>{"use strict";var rg=Se(),_E=pn();function wE(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(i)}return!0}function ng(t){let e=new Set;return _E.visit(t,{Value(i,r){r.anchor&&e.add(r.anchor)}}),e}function sg(t,e){for(let i=1;;++i){let r=`${t}${i}`;if(!e.has(r))return r}}function xE(t,e){let i=[],r=new Map,n=null;return{onAnchor:s=>{i.push(s),n||(n=ng(t));let o=sg(e,n);return n.add(o),o},setAnchors:()=>{for(let s of i){let o=r.get(s);if(typeof o=="object"&&o.anchor&&(rg.isScalar(o.node)||rg.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}mn.anchorIsValid=wE;mn.anchorNames=ng;mn.createNodeAnchors=xE;mn.findNewAnchor=sg});var hc=w(og=>{"use strict";function gn(t,e,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let n=0,s=r.length;n{"use strict";var SE=Se();function ag(t,e,i){if(Array.isArray(t))return t.map((r,n)=>ag(r,String(n),i));if(t&&typeof t.toJSON=="function"){if(!i||!SE.hasAnchor(t))return t.toJSON(e,i);let r={aliasCount:0,count:1,res:void 0};i.anchors.set(t,r),i.onCreate=s=>{r.res=s,delete i.onCreate};let n=t.toJSON(e,i);return i.onCreate&&i.onCreate(n),n}return typeof t=="bigint"&&!(i!=null&&i.keep)?Number(t):t}lg.toJS=ag});var eo=w(ug=>{"use strict";var EE=hc(),cg=Se(),kE=vi(),pc=class{constructor(e){Object.defineProperty(this,cg.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!cg.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=kE.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof s=="function"?EE.applyReviver(s,{"":a},"",a):a}};ug.NodeBase=pc});var vn=w(hg=>{"use strict";var OE=Xs(),fg=pn(),to=Se(),CE=eo(),TE=vi(),dc=class extends CE.NodeBase{constructor(e){super(to.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return fg.visit(e,{Node:(r,n)=>{if(n===this)return fg.visit.BREAK;n.anchor===this.source&&(i=n)}}),i}toJSON(e,i){if(!i)return{source:this.source};let{anchors:r,doc:n,maxAliasCount:s}=i,o=this.resolve(n);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(TE.toJS(o,null,i),a=r.get(o)),!a||a.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=io(n,o,r)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,i,r){let n=`*${this.source}`;if(e){if(OE.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function io(t,e,i){if(to.isAlias(e)){let r=e.resolve(t),n=i&&r&&i.get(r);return n?n.count*n.aliasCount:0}else if(to.isCollection(e)){let r=0;for(let n of e.items){let s=io(t,n,i);s>r&&(r=s)}return r}else if(to.isPair(e)){let r=io(t,e.key,i),n=io(t,e.value,i);return Math.max(r,n)}return 1}hg.Alias=dc});var je=w(mc=>{"use strict";var AE=Se(),IE=eo(),NE=vi(),LE=t=>!t||typeof t!="function"&&typeof t!="object",yi=class extends IE.NodeBase{constructor(e){super(AE.SCALAR),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:NE.toJS(this.value,e,i)}toString(){return String(this.value)}};yi.BLOCK_FOLDED="BLOCK_FOLDED";yi.BLOCK_LITERAL="BLOCK_LITERAL";yi.PLAIN="PLAIN";yi.QUOTE_DOUBLE="QUOTE_DOUBLE";yi.QUOTE_SINGLE="QUOTE_SINGLE";mc.Scalar=yi;mc.isScalarValue=LE});var yn=w(dg=>{"use strict";var BE=vn(),Ji=Se(),pg=je(),RE="tag:yaml.org,2002:";function PE(t,e,i){var r;if(e){let n=i.filter(o=>o.tag===e),s=(r=n.find(o=>!o.format))!=null?r:n[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return i.find(n=>{var s;return((s=n.identify)==null?void 0:s.call(n,t))&&!n.format})}function ME(t,e,i){var f,d,g;if(Ji.isDocument(t)&&(t=t.contents),Ji.isNode(t))return t;if(Ji.isPair(t)){let m=(d=(f=i.schema[Ji.MAP]).createNode)==null?void 0:d.call(f,i.schema,null,i);return m.items.push(t),m}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt!="undefined"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:r,onAnchor:n,onTagObj:s,schema:o,sourceObjects:a}=i,l;if(r&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor||(l.anchor=n(t)),new BE.Alias(l.anchor);l={anchor:null,node:null},a.set(t,l)}e!=null&&e.startsWith("!!")&&(e=RE+e.slice(2));let c=PE(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let m=new pg.Scalar(t);return l&&(l.node=m),m}c=t instanceof Map?o[Ji.MAP]:Symbol.iterator in Object(t)?o[Ji.SEQ]:o[Ji.MAP]}s&&(s(c),delete i.onTagObj);let u=c!=null&&c.createNode?c.createNode(i.schema,t,i):typeof((g=c==null?void 0:c.nodeClass)==null?void 0:g.from)=="function"?c.nodeClass.from(i.schema,t,i):new pg.Scalar(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}dg.createNode=ME});var no=w(ro=>{"use strict";var FE=yn(),Kt=Se(),qE=eo();function gc(t,e,i){let r=i;for(let n=e.length-1;n>=0;--n){let s=e[n];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return FE.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var mg=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,vc=class extends qE.NodeBase{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){let i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(r=>Kt.isNode(r)||Kt.isPair(r)?r.clone(e):r),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(mg(e))this.add(i);else{let[r,...n]=e,s=this.get(r,!0);if(Kt.isCollection(s))s.addIn(n,i);else if(s===void 0&&this.schema)this.set(r,gc(this.schema,n,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[i,...r]=e;if(r.length===0)return this.delete(i);let n=this.get(i,!0);if(Kt.isCollection(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(e,i){let[r,...n]=e,s=this.get(r,!0);return n.length===0?!i&&Kt.isScalar(s)?s.value:s:Kt.isCollection(s)?s.getIn(n,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!Kt.isPair(i))return!1;let r=i.value;return r==null||e&&Kt.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[i,...r]=e;if(r.length===0)return this.has(i);let n=this.get(i,!0);return Kt.isCollection(n)?n.hasIn(r):!1}setIn(e,i){let[r,...n]=e;if(n.length===0)this.set(r,i);else{let s=this.get(r,!0);if(Kt.isCollection(s))s.setIn(n,i);else if(s===void 0&&this.schema)this.set(r,gc(this.schema,n,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}};ro.Collection=vc;ro.collectionFromPath=gc;ro.isEmptyPath=mg});var bn=w(so=>{"use strict";var DE=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function yc(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var jE=(t,e,i)=>t.endsWith(` -`)?yc(i,e):i.includes(` +`)}),this}};function Yd(t,e){t._hasHelpOption&&e.find(r=>r===t._helpLongFlag||r===t._helpShortFlag)&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"))}function Wd(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let i,r="127.0.0.1",n="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?i=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(i=s[1],/^\d+$/.test(s[3])?n=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(i=s[1],r=s[3],n=s[4]),i&&n!=="0"?`${i}=${r}:${parseInt(n)+1}`:e})}function Ll(t){let e=[];for(let i=t;i;i=i.parent)e.push(i);return e}Kd.Command=Bl});var Xd=_((qt,Qd)=>{var{Argument:$x}=qs(),{Command:Jd}=zd(),{CommanderError:Vx,InvalidArgumentError:Zd}=cn(),{Help:Hx}=kl(),{Option:Gx}=Tl();qt=Qd.exports=new Jd;qt.program=qt;qt.Argument=$x;qt.Command=Jd;qt.CommanderError=Vx;qt.Help=Hx;qt.InvalidArgumentError=Zd;qt.InvalidOptionArgumentError=Zd;qt.Option=Gx});var im=_((em,tm)=>{em=tm.exports=Cr;function Cr(t,e){if(this.stream=e.stream||process.stderr,typeof e=="number"){var i=e;e={},e.total=i}else{if(e=e||{},typeof t!="string")throw new Error("format required");if(typeof e.total!="number")throw new Error("total required")}this.fmt=t,this.curr=e.curr||0,this.total=e.total,this.width=e.width||this.total,this.clear=e.clear,this.chars={complete:e.complete||"=",incomplete:e.incomplete||"-",head:e.head||e.complete||"="},this.renderThrottle=e.renderThrottle!==0?e.renderThrottle||16:0,this.lastRender=-1/0,this.callback=e.callback||function(){},this.tokens={},this.lastDraw=""}Cr.prototype.tick=function(t,e){if(t!==0&&(t=t||1),typeof t=="object"&&(e=t,t=1),e&&(this.tokens=e),this.curr==0&&(this.start=new Date),this.curr+=t,this.render(),this.curr>=this.total){this.render(void 0,!0),this.complete=!0,this.terminate(),this.callback(this);return}};Cr.prototype.render=function(t,e){if(e=e!==void 0?e:!1,t&&(this.tokens=t),!!this.stream.isTTY){var i=Date.now(),r=i-this.lastRender;if(!(!e&&r0&&(a=a.slice(0,-1)+this.chars.head),d=d.replace(":bar",a+o),this.tokens)for(var y in this.tokens)d=d.replace(":"+y,this.tokens[y]);this.lastDraw!==d&&(this.stream.cursorTo(0),this.stream.write(d),this.stream.clearLine(1),this.lastDraw=d)}}};Cr.prototype.update=function(t,e){var i=Math.floor(t*this.total),r=i-this.curr;this.tick(r,e)};Cr.prototype.interrupt=function(t){this.stream.clearLine(),this.stream.cursorTo(0),this.stream.write(t),this.stream.write(` +`),this.stream.write(this.lastDraw)};Cr.prototype.terminate=function(){this.clear?this.stream.clearLine&&(this.stream.clearLine(),this.stream.cursorTo(0)):this.stream.write(` +`)}});var nm=_((C2,rm)=>{rm.exports=im()});var lm=_(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});var sm=require("buffer"),Gi={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};ri.ERRORS=Gi;function Yx(t){if(!sm.Buffer.isEncoding(t))throw new Error(Gi.INVALID_ENCODING)}ri.checkEncoding=Yx;function om(t){return typeof t=="number"&&isFinite(t)&&Jx(t)}ri.isFiniteInteger=om;function am(t,e){if(typeof t=="number"){if(!om(t)||t<0)throw new Error(e?Gi.INVALID_OFFSET:Gi.INVALID_LENGTH)}else throw new Error(e?Gi.INVALID_OFFSET_NON_NUMBER:Gi.INVALID_LENGTH_NON_NUMBER)}function Wx(t){am(t,!1)}ri.checkLengthValue=Wx;function Kx(t){am(t,!0)}ri.checkOffsetValue=Kx;function zx(t,e){if(t<0||t>e.length)throw new Error(Gi.INVALID_TARGET_OFFSET)}ri.checkTargetOffset=zx;function Jx(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function Zx(t){if(typeof BigInt=="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof sm.Buffer.prototype[t]=="undefined")throw new Error(`Platform does not support Buffer.prototype.${t}.`)}ri.bigIntAndBufferInt64Check=Zx});var um=_(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var pe=lm(),cm=4096,Qx="utf8",Rl=class t{constructor(e){if(this.length=0,this._encoding=Qx,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(pe.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(pe.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(cm);else{if(typeof e!="undefined")throw new Error(pe.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(cm)}}static fromSize(e,i){return new this({size:e,encoding:i})}static fromBuffer(e,i){return new this({buff:e,encoding:i})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let i=e;return i&&(i.encoding!==void 0||i.size!==void 0||i.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return pe.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return pe.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,i){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,i),this}insertInt8(e,i){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,i)}writeInt16BE(e,i){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,i)}insertInt16BE(e,i){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,i)}writeInt16LE(e,i){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,i)}insertInt16LE(e,i){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,i)}writeInt32BE(e,i){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,i)}insertInt32BE(e,i){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,i)}writeInt32LE(e,i){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,i)}insertInt32LE(e,i){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,i)}writeBigInt64BE(e,i){return pe.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,i)}insertBigInt64BE(e,i){return pe.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,i)}writeBigInt64LE(e,i){return pe.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,i)}insertBigInt64LE(e,i){return pe.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,i)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return pe.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return pe.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,i){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,i)}insertUInt8(e,i){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,i)}writeUInt16BE(e,i){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,i)}insertUInt16BE(e,i){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,i)}writeUInt16LE(e,i){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,i)}insertUInt16LE(e,i){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,i)}writeUInt32BE(e,i){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,i)}insertUInt32BE(e,i){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,i)}writeUInt32LE(e,i){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,i)}insertUInt32LE(e,i){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,i)}writeBigUInt64BE(e,i){return pe.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,i)}insertBigUInt64BE(e,i){return pe.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,i)}writeBigUInt64LE(e,i){return pe.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,i)}insertBigUInt64LE(e,i){return pe.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,i)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,i){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,i)}insertFloatBE(e,i){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,i)}writeFloatLE(e,i){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,i)}insertFloatLE(e,i){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,i)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,i){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,i)}insertDoubleBE(e,i){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,i)}writeDoubleLE(e,i){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,i)}insertDoubleLE(e,i){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,i)}readString(e,i){let r;typeof e=="number"?(pe.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(i=e,r=this.length-this._readOffset),typeof i!="undefined"&&pe.checkEncoding(i);let n=this._buff.slice(this._readOffset,this._readOffset+r).toString(i||this._encoding);return this._readOffset+=r,n}insertString(e,i,r){return pe.checkOffsetValue(i),this._handleString(e,!0,i,r)}writeString(e,i,r){return this._handleString(e,!1,i,r)}readStringNT(e){typeof e!="undefined"&&pe.checkEncoding(e);let i=this.length;for(let n=this._readOffset;nthis.length)throw new Error(pe.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,i){pe.checkOffsetValue(i),this._ensureCapacity(this.length+e),ithis.length?this.length=i+e:this.length+=e}_ensureWriteable(e,i){let r=typeof i=="number"?i:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){let i=this._buff.length;if(e>i){let r=this._buff,n=i*3/2+1;n{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.SOCKS5_NO_ACCEPTABLE_AUTH=Ne.SOCKS5_CUSTOM_AUTH_END=Ne.SOCKS5_CUSTOM_AUTH_START=Ne.SOCKS_INCOMING_PACKET_SIZES=Ne.SocksClientState=Ne.Socks5Response=Ne.Socks5HostType=Ne.Socks5Auth=Ne.Socks4Response=Ne.SocksCommand=Ne.ERRORS=Ne.DEFAULT_TIMEOUT=void 0;var Xx=3e4;Ne.DEFAULT_TIMEOUT=Xx;var eS={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};Ne.ERRORS=eS;var tS={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:t=>t+7,Socks4Response:8};Ne.SOCKS_INCOMING_PACKET_SIZES=tS;var fm;(function(t){t[t.connect=1]="connect",t[t.bind=2]="bind",t[t.associate=3]="associate"})(fm||(Ne.SocksCommand=fm={}));var hm;(function(t){t[t.Granted=90]="Granted",t[t.Failed=91]="Failed",t[t.Rejected=92]="Rejected",t[t.RejectedIdent=93]="RejectedIdent"})(hm||(Ne.Socks4Response=hm={}));var pm;(function(t){t[t.NoAuth=0]="NoAuth",t[t.GSSApi=1]="GSSApi",t[t.UserPass=2]="UserPass"})(pm||(Ne.Socks5Auth=pm={}));var iS=128;Ne.SOCKS5_CUSTOM_AUTH_START=iS;var rS=254;Ne.SOCKS5_CUSTOM_AUTH_END=rS;var nS=255;Ne.SOCKS5_NO_ACCEPTABLE_AUTH=nS;var dm;(function(t){t[t.Granted=0]="Granted",t[t.Failure=1]="Failure",t[t.NotAllowed=2]="NotAllowed",t[t.NetworkUnreachable=3]="NetworkUnreachable",t[t.HostUnreachable=4]="HostUnreachable",t[t.ConnectionRefused=5]="ConnectionRefused",t[t.TTLExpired=6]="TTLExpired",t[t.CommandNotSupported=7]="CommandNotSupported",t[t.AddressNotSupported=8]="AddressNotSupported"})(dm||(Ne.Socks5Response=dm={}));var mm;(function(t){t[t.IPv4=1]="IPv4",t[t.Hostname=3]="Hostname",t[t.IPv6=4]="IPv6"})(mm||(Ne.Socks5HostType=mm={}));var gm;(function(t){t[t.Created=0]="Created",t[t.Connecting=1]="Connecting",t[t.Connected=2]="Connected",t[t.SentInitialHandshake=3]="SentInitialHandshake",t[t.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",t[t.SentAuthentication=5]="SentAuthentication",t[t.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",t[t.SentFinalHandshake=7]="SentFinalHandshake",t[t.ReceivedFinalResponse=8]="ReceivedFinalResponse",t[t.BoundWaitingForConnection=9]="BoundWaitingForConnection",t[t.Established=10]="Established",t[t.Disconnected=11]="Disconnected",t[t.Error=99]="Error"})(gm||(Ne.SocksClientState=gm={}))});var ql=_(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.shuffleArray=Tr.SocksClientError=void 0;var Fl=class extends Error{constructor(e,i){super(e),this.options=i}};Tr.SocksClientError=Fl;function sS(t){for(let e=t.length-1;e>0;e--){let i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}}Tr.shuffleArray=sS});var Dl=_(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.isCorrect=Ar.isInSubnet=void 0;function oS(t){return this.subnetMask{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.RE_SUBNET_STRING=Ht.RE_ADDRESS=Ht.GROUPS=Ht.BITS=void 0;Ht.BITS=32;Ht.GROUPS=4;Ht.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;Ht.RE_SUBNET_STRING=/\/\d{1,2}$/});var js=_(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.AddressError=void 0;var Ul=class extends Error{constructor(e,i){super(e),this.name="AddressError",i!==null&&(this.parseMessage=i)}};Ds.AddressError=Ul});var $l=_((Us,vm)=>{(function(){var t,e=0xdeadbeefcafe,i=(e&16777215)==15715070;function r(h,p,v){h!=null&&(typeof h=="number"?this.fromNumber(h,p,v):p==null&&typeof h!="string"?this.fromString(h,256):this.fromString(h,p))}function n(){return new r(null)}function s(h,p,v,w,B,M){for(;--M>=0;){var G=p*this[h++]+v[w]+B;B=Math.floor(G/67108864),v[w++]=G&67108863}return B}function o(h,p,v,w,B,M){for(var G=p&32767,K=p>>15;--M>=0;){var Re=this[h]&32767,Ye=this[h++]>>15,kt=K*Re+Ye*G;Re=G*Re+((kt&32767)<<15)+v[w]+(B&1073741823),B=(Re>>>30)+(kt>>>15)+K*Ye+(B>>>30),v[w++]=Re&1073741823}return B}function a(h,p,v,w,B,M){for(var G=p&16383,K=p>>14;--M>=0;){var Re=this[h]&16383,Ye=this[h++]>>14,kt=K*Re+Ye*G;Re=G*Re+((kt&16383)<<14)+v[w]+B,B=(Re>>28)+(kt>>14)+K*Ye,v[w++]=Re&268435455}return B}var l=typeof navigator!="undefined";l&&i&&navigator.appName=="Microsoft Internet Explorer"?(r.prototype.am=o,t=30):l&&i&&navigator.appName!="Netscape"?(r.prototype.am=s,t=26):(r.prototype.am=a,t=28),r.prototype.DB=t,r.prototype.DM=(1<=0;--p)h[p]=this[p];h.t=this.t,h.s=this.s}function x(h){this.t=1,this.s=h<0?-1:0,h>0?this[0]=h:h<-1?this[0]=h+this.DV:this.t=0}function E(h){var p=n();return p.fromInt(h),p}function O(h,p){var v;if(p==16)v=4;else if(p==8)v=3;else if(p==256)v=8;else if(p==2)v=1;else if(p==32)v=5;else if(p==4)v=2;else{this.fromRadix(h,p);return}this.t=0,this.s=0;for(var w=h.length,B=!1,M=0;--w>=0;){var G=v==8?h[w]&255:y(h,w);if(G<0){h.charAt(w)=="-"&&(B=!0);continue}B=!1,M==0?this[this.t++]=G:M+v>this.DB?(this[this.t-1]|=(G&(1<>this.DB-M):this[this.t-1]|=G<=this.DB&&(M-=this.DB)}v==8&&(h[0]&128)!=0&&(this.s=-1,M>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==h;)--this.t}function S(h){if(this.s<0)return"-"+this.negate().toString(h);var p;if(h==16)p=4;else if(h==8)p=3;else if(h==2)p=1;else if(h==32)p=5;else if(h==4)p=2;else return this.toRadix(h);var v=(1<0)for(K>K)>0&&(B=!0,M=m(w));G>=0;)K>(K+=this.DB-p)):(w=this[G]>>(K-=p)&v,K<=0&&(K+=this.DB,--G)),w>0&&(B=!0),B&&(M+=m(w));return B?M:"0"}function R(){var h=n();return r.ZERO.subTo(this,h),h}function T(){return this.s<0?this.negate():this}function A(h){var p=this.s-h.s;if(p!=0)return p;var v=this.t;if(p=v-h.t,p!=0)return this.s<0?-p:p;for(;--v>=0;)if((p=this[v]-h[v])!=0)return p;return 0}function C(h){var p=1,v;return(v=h>>>16)!=0&&(h=v,p+=16),(v=h>>8)!=0&&(h=v,p+=8),(v=h>>4)!=0&&(h=v,p+=4),(v=h>>2)!=0&&(h=v,p+=2),(v=h>>1)!=0&&(h=v,p+=1),p}function L(){return this.t<=0?0:this.DB*(this.t-1)+C(this[this.t-1]^this.s&this.DM)}function P(h,p){var v;for(v=this.t-1;v>=0;--v)p[v+h]=this[v];for(v=h-1;v>=0;--v)p[v]=0;p.t=this.t+h,p.s=this.s}function U(h,p){for(var v=h;v=0;--K)p[K+M+1]=this[K]>>w|G,G=(this[K]&B)<=0;--K)p[K]=0;p[M]=G,p.t=this.t+M+1,p.s=this.s,p.clamp()}function H(h,p){p.s=this.s;var v=Math.floor(h/this.DB);if(v>=this.t){p.t=0;return}var w=h%this.DB,B=this.DB-w,M=(1<>w;for(var G=v+1;G>w;w>0&&(p[this.t-v-1]|=(this.s&M)<>=this.DB;if(h.t>=this.DB;w+=this.s}else{for(w+=this.s;v>=this.DB;w-=h.s}p.s=w<0?-1:0,w<-1?p[v++]=this.DV+w:w>0&&(p[v++]=w),p.t=v,p.clamp()}function V(h,p){var v=this.abs(),w=h.abs(),B=v.t;for(p.t=B+w.t;--B>=0;)p[B]=0;for(B=0;B=0;)h[v]=0;for(v=0;v=p.DV&&(h[v+p.t]-=p.DV,h[v+p.t+1]=1)}h.t>0&&(h[h.t-1]+=p.am(v,p[v],h,2*v,0,1)),h.s=0,h.clamp()}function Q(h,p,v){var w=h.abs();if(!(w.t<=0)){var B=this.abs();if(B.t0?(w.lShiftTo(Re,M),B.lShiftTo(Re,v)):(w.copyTo(M),B.copyTo(v));var Ye=M.t,kt=M[Ye-1];if(kt!=0){var bt=kt*(1<1?M[Ye-2]>>this.F2:0),ei=this.FV/bt,hs=(1<=0&&(v[v.t++]=1,v.subTo(hi,v)),r.ONE.dlShiftTo(Ye,hi),hi.subTo(M,M);M.t=0;){var _a=v[--Pt]==kt?this.DM:Math.floor(v[Pt]*ei+(v[Pt-1]+Rt)*hs);if((v[Pt]+=M.am(0,_a,v,ps,0,Ye))<_a)for(M.dlShiftTo(ps,hi),v.subTo(hi,v);v[Pt]<--_a;)v.subTo(hi,v)}p!=null&&(v.drShiftTo(Ye,p),G!=K&&r.ZERO.subTo(p,p)),v.t=Ye,v.clamp(),Re>0&&v.rShiftTo(Re,v),G<0&&r.ZERO.subTo(v,v)}}}function Y(h){var p=n();return this.abs().divRemTo(h,null,p),this.s<0&&p.compareTo(r.ZERO)>0&&h.subTo(p,p),p}function de(h){this.m=h}function ae(h){return h.s<0||h.compareTo(this.m)>=0?h.mod(this.m):h}function ne(h){return h}function ue(h){h.divRemTo(this.m,null,h)}function N(h,p,v){h.multiplyTo(p,v),this.reduce(v)}function X(h,p){h.squareTo(p),this.reduce(p)}de.prototype.convert=ae,de.prototype.revert=ne,de.prototype.reduce=ue,de.prototype.mulTo=N,de.prototype.sqrTo=X;function ke(){if(this.t<1)return 0;var h=this[0];if((h&1)==0)return 0;var p=h&3;return p=p*(2-(h&15)*p)&15,p=p*(2-(h&255)*p)&255,p=p*(2-((h&65535)*p&65535))&65535,p=p*(2-h*p%this.DV)%this.DV,p>0?this.DV-p:-p}function be(h){this.m=h,this.mp=h.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(p,p),p}function ve(h){var p=n();return h.copyTo(p),this.reduce(p),p}function fe(h){for(;h.t<=this.mt2;)h[h.t++]=0;for(var p=0;p>15)*this.mpl&this.um)<<15)&h.DM;for(v=p+this.m.t,h[v]+=this.m.am(0,w,h,p,0,this.m.t);h[v]>=h.DV;)h[v]-=h.DV,h[++v]++}h.clamp(),h.drShiftTo(this.m.t,h),h.compareTo(this.m)>=0&&h.subTo(this.m,h)}function z(h,p){h.squareTo(p),this.reduce(p)}function $(h,p,v){h.multiplyTo(p,v),this.reduce(v)}be.prototype.convert=ge,be.prototype.revert=ve,be.prototype.reduce=fe,be.prototype.mulTo=$,be.prototype.sqrTo=z;function Ce(){return(this.t>0?this[0]&1:this.s)==0}function re(h,p){if(h>4294967295||h<1)return r.ONE;var v=n(),w=n(),B=p.convert(this),M=C(h)-1;for(B.copyTo(v);--M>=0;)if(p.sqrTo(v,w),(h&1<0)p.mulTo(w,B,v);else{var G=v;v=w,w=G}return p.revert(v)}function he(h,p){var v;return h<256||p.isEven()?v=new de(p):v=new be(p),this.exp(h,v)}r.prototype.copyTo=b,r.prototype.fromInt=x,r.prototype.fromString=O,r.prototype.clamp=k,r.prototype.dlShiftTo=P,r.prototype.drShiftTo=U,r.prototype.lShiftTo=q,r.prototype.rShiftTo=H,r.prototype.subTo=j,r.prototype.multiplyTo=V,r.prototype.squareTo=W,r.prototype.divRemTo=Q,r.prototype.invDigit=ke,r.prototype.isEven=Ce,r.prototype.exp=re,r.prototype.toString=S,r.prototype.negate=R,r.prototype.abs=T,r.prototype.compareTo=A,r.prototype.bitLength=L,r.prototype.mod=Y,r.prototype.modPowInt=he,r.ZERO=E(0),r.ONE=E(1);function ft(){var h=n();return this.copyTo(h),h}function vt(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<>24}function Z(){return this.t==0?this.s:this[0]<<16>>16}function te(h){return Math.floor(Math.LN2*this.DB/Math.log(h))}function ee(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function le(h){if(h==null&&(h=10),this.signum()==0||h<2||h>36)return"0";var p=this.chunkSize(h),v=Math.pow(h,p),w=E(v),B=n(),M=n(),G="";for(this.divRemTo(w,B,M);B.signum()>0;)G=(v+M.intValue()).toString(h).substr(1)+G,B.divRemTo(w,B,M);return M.intValue().toString(h)+G}function ce(h,p){this.fromInt(0),p==null&&(p=10);for(var v=this.chunkSize(p),w=Math.pow(p,v),B=!1,M=0,G=0,K=0;K=v&&(this.dMultiply(w),this.dAddOffset(G,0),M=0,G=0)}M>0&&(this.dMultiply(Math.pow(p,M)),this.dAddOffset(G,0)),B&&r.ZERO.subTo(this,this)}function _e(h,p,v){if(typeof p=="number")if(h<2)this.fromInt(1);else for(this.fromNumber(h,v),this.testBit(h-1)||this.bitwiseTo(r.ONE.shiftLeft(h-1),oe,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(p);)this.dAddOffset(2,0),this.bitLength()>h&&this.subTo(r.ONE.shiftLeft(h-1),this);else{var w=new Array,B=h&7;w.length=(h>>3)+1,p.nextBytes(w),B>0?w[0]&=(1<0)for(v>v)!=(this.s&this.DM)>>v&&(p[B++]=w|this.s<=0;)v<8?(w=(this[h]&(1<>(v+=this.DB-8)):(w=this[h]>>(v-=8)&255,v<=0&&(v+=this.DB,--h)),(w&128)!=0&&(w|=-256),B==0&&(this.s&128)!=(w&128)&&++B,(B>0||w!=this.s)&&(p[B++]=w);return p}function Be(h){return this.compareTo(h)==0}function Te(h){return this.compareTo(h)<0?this:h}function D(h){return this.compareTo(h)>0?this:h}function J(h,p,v){var w,B,M=Math.min(h.t,this.t);for(w=0;w>=16,p+=16),(h&255)==0&&(h>>=8,p+=8),(h&15)==0&&(h>>=4,p+=4),(h&3)==0&&(h>>=2,p+=2),(h&1)==0&&++p,p}function ui(){for(var h=0;h=this.t?this.s!=0:(this[p]&1<>=this.DB;if(h.t>=this.DB;w+=this.s}else{for(w+=this.s;v>=this.DB;w+=h.s}p.s=w<0?-1:0,w>0?p[v++]=w:w<-1&&(p[v++]=this.DV+w),p.t=v,p.clamp()}function Xn(h){var p=n();return this.addTo(h,p),p}function Qr(h){var p=n();return this.subTo(h,p),p}function es(h){var p=n();return this.multiplyTo(h,p),p}function ts(){var h=n();return this.squareTo(h),h}function is(h){var p=n();return this.divRemTo(h,p,null),p}function rs(h){var p=n();return this.divRemTo(h,null,p),p}function ns(h){var p=n(),v=n();return this.divRemTo(h,p,v),new Array(p,v)}function ga(h){this[this.t]=this.am(0,h-1,this,0,0,this.t),++this.t,this.clamp()}function Fi(h,p){if(h!=0){for(;this.t<=p;)this[this.t++]=0;for(this[p]+=h;this[p]>=this.DV;)this[p]-=this.DV,++p>=this.t&&(this[this.t++]=0),++this[p]}}function Xt(){}function qi(h){return h}function hr(h,p,v){h.multiplyTo(p,v)}function ss(h,p){h.squareTo(p)}Xt.prototype.convert=qi,Xt.prototype.revert=qi,Xt.prototype.mulTo=hr,Xt.prototype.sqrTo=ss;function os(h){return this.exp(h,new Xt)}function as(h,p,v){var w=Math.min(this.t+h.t,p);for(v.s=0,v.t=w;w>0;)v[--w]=0;var B;for(B=v.t-this.t;w=0;)v[w]=0;for(w=Math.max(p-this.t,0);w2*this.m.t)return h.mod(this.m);if(h.compareTo(this.m)<0)return h;var p=n();return h.copyTo(p),this.reduce(p),p}function us(h){return h}function pr(h){for(h.drShiftTo(this.m.t-1,this.r2),h.t>this.m.t+1&&(h.t=this.m.t+1,h.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);h.compareTo(this.r2)<0;)h.dAddOffset(1,this.m.t+1);for(h.subTo(this.r2,h);h.compareTo(this.m)>=0;)h.subTo(this.m,h)}function xb(h,p){h.squareTo(p),this.reduce(p)}function Sb(h,p,v){h.multiplyTo(p,v),this.reduce(v)}$t.prototype.convert=cs,$t.prototype.revert=us,$t.prototype.reduce=pr,$t.prototype.mulTo=Sb,$t.prototype.sqrTo=xb;function Eb(h,p){var v=h.bitLength(),w,B=E(1),M;if(v<=0)return B;v<18?w=1:v<48?w=3:v<144?w=4:v<768?w=5:w=6,v<8?M=new de(p):p.isEven()?M=new $t(p):M=new be(p);var G=new Array,K=3,Re=w-1,Ye=(1<1){var kt=n();for(M.sqrTo(G[1],kt);K<=Ye;)G[K]=n(),M.mulTo(kt,G[K-2],G[K]),K+=2}var bt=h.t-1,ei,hs=!0,Rt=n(),Pt;for(v=C(h[bt])-1;bt>=0;){for(v>=Re?ei=h[bt]>>v-Re&Ye:(ei=(h[bt]&(1<0&&(ei|=h[bt-1]>>this.DB+v-Re)),K=w;(ei&1)==0;)ei>>=1,--K;if((v-=K)<0&&(v+=this.DB,--bt),hs)G[ei].copyTo(B),hs=!1;else{for(;K>1;)M.sqrTo(B,Rt),M.sqrTo(Rt,B),K-=2;K>0?M.sqrTo(B,Rt):(Pt=B,B=Rt,Rt=Pt),M.mulTo(Rt,G[ei],B)}for(;bt>=0&&(h[bt]&1<0&&(p.rShiftTo(M,p),v.rShiftTo(M,v));p.signum()>0;)(B=p.getLowestSetBit())>0&&p.rShiftTo(B,p),(B=v.getLowestSetBit())>0&&v.rShiftTo(B,v),p.compareTo(v)>=0?(p.subTo(v,p),p.rShiftTo(1,p)):(v.subTo(p,v),v.rShiftTo(1,v));return M>0&&v.lShiftTo(M,v),v}function Ob(h){if(h<=0)return 0;var p=this.DV%h,v=this.s<0?h-1:0;if(this.t>0)if(p==0)v=this[0]%h;else for(var w=this.t-1;w>=0;--w)v=(p*v+this[w])%h;return v}function Cb(h){var p=h.isEven();if(this.isEven()&&p||h.signum()==0)return r.ZERO;for(var v=h.clone(),w=this.clone(),B=E(1),M=E(0),G=E(0),K=E(1);v.signum()!=0;){for(;v.isEven();)v.rShiftTo(1,v),p?((!B.isEven()||!M.isEven())&&(B.addTo(this,B),M.subTo(h,M)),B.rShiftTo(1,B)):M.isEven()||M.subTo(h,M),M.rShiftTo(1,M);for(;w.isEven();)w.rShiftTo(1,w),p?((!G.isEven()||!K.isEven())&&(G.addTo(this,G),K.subTo(h,K)),G.rShiftTo(1,G)):K.isEven()||K.subTo(h,K),K.rShiftTo(1,K);v.compareTo(w)>=0?(v.subTo(w,v),p&&B.subTo(G,B),M.subTo(K,M)):(w.subTo(v,w),p&&G.subTo(B,G),K.subTo(M,K))}if(w.compareTo(r.ONE)!=0)return r.ZERO;if(K.compareTo(h)>=0)return K.subtract(h);if(K.signum()<0)K.addTo(h,K);else return K;return K.signum()<0?K.add(h):K}var st=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Tb=(1<<26)/st[st.length-1];function Ab(h){var p,v=this.abs();if(v.t==1&&v[0]<=st[st.length-1]){for(p=0;p>1,h>st.length&&(h=st.length);for(var B=n(),M=0;M>8&255,yt[Ge++]^=h>>16&255,yt[Ge++]^=h>>24&255,Ge>=ba&&(Ge-=ba)}function _f(){Nb(new Date().getTime())}if(yt==null){yt=new Array,Ge=0;var Bt;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var wf=new Uint8Array(32);for(window.crypto.getRandomValues(wf),Bt=0;Bt<32;++Bt)yt[Ge++]=wf[Bt]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var xf=window.crypto.random(32);for(Bt=0;Bt>>8,yt[Ge++]=Bt&255;Ge=0,_f()}function Lb(){if(fs==null){for(_f(),fs=Mb(),fs.init(yt),Ge=0;Ge{(function(){"use strict";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(o){return r(s(o),arguments)}function i(o,a){return e.apply(null,[o].concat(a||[]))}function r(o,a){var l=1,c=o.length,u,f="",d,g,m,y,b,x,E,O;for(d=0;d=0),m.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,m.width?parseInt(m.width):0);break;case"e":u=m.precision?parseFloat(u).toExponential(m.precision):parseFloat(u).toExponential();break;case"f":u=m.precision?parseFloat(u).toFixed(m.precision):parseFloat(u);break;case"g":u=m.precision?String(Number(u.toPrecision(m.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=m.precision?u.substring(0,m.precision):u;break;case"t":u=String(!!u),u=m.precision?u.substring(0,m.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=m.precision?u.substring(0,m.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=m.precision?u.substring(0,m.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase();break}t.json.test(m.type)?f+=u:(t.number.test(m.type)&&(!E||m.sign)?(O=E?"+":"-",u=u.toString().replace(t.sign,"")):O="",b=m.pad_char?m.pad_char==="0"?"0":m.pad_char.charAt(1):" ",x=m.width-(O+u).length,y=m.width&&x>0?b.repeat(x):"",f+=m.align?O+u+y:b==="0"?O+y+u:y+O+u)}return f}var n=Object.create(null);function s(o){if(n[o])return n[o];for(var a=o,l,c=[],u=0;a;){if((l=t.text.exec(a))!==null)c.push(l[0]);else if((l=t.modulo.exec(a))!==null)c.push("%");else if((l=t.placeholder.exec(a))!==null){if(l[2]){u|=1;var f=[],d=l[2],g=[];if((g=t.key.exec(d))!==null)for(f.push(g[1]);(d=d.substring(g[0].length))!=="";)if((g=t.key_access.exec(d))!==null)f.push(g[1]);else if((g=t.index_access.exec(d))!==null)f.push(g[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=f}else u|=2;if(u===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");a=a.substring(l[0].length)}return n[o]=c}typeof $s!="undefined"&&($s.sprintf=e,$s.vsprintf=i),typeof window!="undefined"&&(window.sprintf=e,window.vsprintf=i,typeof define=="function"&&define.amd&&define(function(){return{sprintf:e,vsprintf:i}}))})()});var Hl=_(Gt=>{"use strict";var lS=Gt&&Gt.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),cS=Gt&&Gt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_m=Gt&&Gt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&lS(e,t,i);return cS(e,t),e};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.Address4=void 0;var ym=_m(Dl()),Dt=_m(jl()),bm=js(),fn=$l(),Ir=un(),Vl=class t{constructor(e){this.groups=Dt.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=ym.isCorrect(Dt.BITS),this.isInSubnet=ym.isInSubnet,this.address=e;let i=Dt.RE_SUBNET_STRING.exec(e);if(i){if(this.parsedSubnet=i[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>Dt.BITS)throw new bm.AddressError("Invalid subnet mask.");e=e.replace(Dt.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new t(e),!0}catch{return!1}}parse(e){let i=e.split(".");if(!e.match(Dt.RE_ADDRESS))throw new bm.AddressError("Invalid IPv4 address.");return i}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromHex(e){let i=e.replace(/:/g,"").padStart(8,"0"),r=[],n;for(n=0;n<8;n+=2){let s=i.slice(n,n+2);r.push(parseInt(s,16))}return new t(r.join("."))}static fromInteger(e){return t.fromHex(e.toString(16))}static fromArpa(e){let r=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new t(r)}toHex(){return this.parsedAddress.map(e=>(0,Ir.sprintf)("%02x",parseInt(e,10))).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],i;for(i=0;i(0,Ir.sprintf)("%02x",parseInt(e,10))).join(""),16)}_startAddress(){return new fn.BigInteger(this.mask()+"0".repeat(Dt.BITS-this.subnetMask),2)}startAddress(){return t.fromBigInteger(this._startAddress())}startAddressExclusive(){let e=new fn.BigInteger("1");return t.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new fn.BigInteger(this.mask()+"1".repeat(Dt.BITS-this.subnetMask),2)}endAddress(){return t.fromBigInteger(this._endAddress())}endAddressExclusive(){let e=new fn.BigInteger("1");return t.fromBigInteger(this._endAddress().subtract(e))}static fromBigInteger(e){return t.fromInteger(parseInt(e.toString(),10))}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,i){return this.binaryZeroPad().slice(e,i)}reverseForm(e){e||(e={});let i=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?i:(0,Ir.sprintf)("%s.in-addr.arpa.",i)}isMulticast(){return this.isInSubnet(new t("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(Dt.BITS,"0")}groupForV6(){let e=this.parsedAddress;return this.address.replace(Dt.RE_ADDRESS,(0,Ir.sprintf)('%s.%s',e.slice(0,2).join("."),e.slice(2,4).join(".")))}};Gt.Address4=Vl});var Gl=_(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.RE_URL_WITH_PORT=Fe.RE_URL=Fe.RE_ZONE_STRING=Fe.RE_SUBNET_STRING=Fe.RE_BAD_ADDRESS=Fe.RE_BAD_CHARACTERS=Fe.TYPES=Fe.SCOPES=Fe.GROUPS=Fe.BITS=void 0;Fe.BITS=128;Fe.GROUPS=8;Fe.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};Fe.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};Fe.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;Fe.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;Fe.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;Fe.RE_ZONE_STRING=/%.*$/;Fe.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);Fe.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var Yl=_(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.simpleGroup=Yt.spanLeadingZeroes=Yt.spanAll=Yt.spanAllZeroes=void 0;var wm=un();function xm(t){return t.replace(/(0+)/g,'$1')}Yt.spanAllZeroes=xm;function uS(t,e=0){return t.split("").map((r,n)=>(0,wm.sprintf)('%s',r,n+e,xm(r))).join("")}Yt.spanAll=uS;function Sm(t){return t.replace(/^(0+)/,'$1')}function fS(t){return t.split(":").map(i=>Sm(i)).join(":")}Yt.spanLeadingZeroes=fS;function hS(t,e=0){return t.split(":").map((r,n)=>/group-v4/.test(r)?r:(0,wm.sprintf)('%s',n+e,Sm(r)))}Yt.simpleGroup=hS});var Em=_(ze=>{"use strict";var pS=ze&&ze.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),dS=ze&&ze.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mS=ze&&ze.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&pS(e,t,i);return dS(e,t),e};Object.defineProperty(ze,"__esModule",{value:!0});ze.possibleElisions=ze.simpleRegularExpression=ze.ADDRESS_BOUNDARY=ze.padGroup=ze.groupPossibilities=void 0;var gS=mS(Gl()),Nr=un();function Hs(t){return(0,Nr.sprintf)("(%s)",t.join("|"))}ze.groupPossibilities=Hs;function Vs(t){return t.length<4?(0,Nr.sprintf)("0{0,%d}%s",4-t.length,t):t}ze.padGroup=Vs;ze.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function vS(t){let e=[];t.forEach((r,n)=>{parseInt(r,16)===0&&e.push(n)});let i=e.map(r=>t.map((n,s)=>{if(s===r){let o=s===0||s===gS.GROUPS-1?":":"";return Hs([Vs(n),o])}return Vs(n)}).join(":"));return i.push(t.map(Vs).join(":")),Hs(i)}ze.simpleRegularExpression=vS;function yS(t,e,i){let r=e?"":":",n=i?"":":",s=[];!e&&!i&&s.push("::"),e&&i&&s.push(""),(i&&!e||!i&&e)&&s.push(":"),s.push((0,Nr.sprintf)("%s(:0{1,4}){1,%d}",r,t-1)),s.push((0,Nr.sprintf)("(0{1,4}:){1,%d}%s",t-1,n)),s.push((0,Nr.sprintf)("(0{1,4}:){%d}0{1,4}",t-1));for(let o=1;o{"use strict";var bS=Wt&&Wt.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),_S=Wt&&Wt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ys=Wt&&Wt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&bS(e,t,i);return _S(e,t),e};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.Address6=void 0;var km=Ys(Dl()),Wl=Ys(jl()),Le=Ys(Gl()),Kl=Ys(Yl()),Yi=Hl(),Wi=Em(),ni=js(),lt=$l(),ct=un();function Gs(t){if(!t)throw new Error("Assertion failed.")}function wS(t){let e=/(\d+)(\d{3})/;for(;e.test(t);)t=t.replace(e,"$1,$2");return t}function xS(t){return t=t.replace(/^(0{1,})([1-9]+)$/,'$1$2'),t=t.replace(/^(0{1,})(0)$/,'$1$2'),t}function SS(t,e){let i=[],r=[],n;for(n=0;ne[1]&&r.push(t[n]);return i.concat(["compact"]).concat(r)}function Om(t){return(0,ct.sprintf)("%04x",parseInt(t,16))}function Cm(t){return t&255}var zl=class t{constructor(e,i){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=km.isInSubnet,this.isCorrect=km.isCorrect(Le.BITS),i===void 0?this.groups=Le.GROUPS:this.groups=i,this.address=e;let r=Le.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>Le.BITS)throw new ni.AddressError("Invalid subnet mask.");e=e.replace(Le.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new ni.AddressError("Invalid subnet mask.");let n=Le.RE_ZONE_STRING.exec(e);n&&(this.zone=n[0],e=e.replace(Le.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new t(e),!0}catch{return!1}}static fromBigInteger(e){let i=e.toString(16).padStart(32,"0"),r=[],n;for(n=0;n65536)&&(r=null)):r=null,{address:new t(i),port:r}}static fromAddress4(e){let i=new Yi.Address4(e),r=Le.BITS-(Wl.BITS-i.subnetMask);return new t(`::ffff:${i.correctForm()}/${r}`)}static fromArpa(e){let i=e.replace(/(\.ip6\.arpa)?\.$/,""),r=7;if(i.length!==63)throw new ni.AddressError("Invalid 'ip6.arpa' form.");let n=i.split(".").reverse();for(let s=r;s>0;s--){let o=s*4;n.splice(o,0,":")}return i=n.join(""),new t(i)}microsoftTranscription(){return(0,ct.sprintf)("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let i=Le.BITS-this.subnetMask,r=Math.abs(e-Le.BITS),n=i-r;return n<0?"0":wS(new lt.BigInteger("2",10).pow(n).toString(10))}_startAddress(){return new lt.BigInteger(this.mask()+"0".repeat(Le.BITS-this.subnetMask),2)}startAddress(){return t.fromBigInteger(this._startAddress())}startAddressExclusive(){let e=new lt.BigInteger("1");return t.fromBigInteger(this._startAddress().add(e))}_endAddress(){return new lt.BigInteger(this.mask()+"1".repeat(Le.BITS-this.subnetMask),2)}endAddress(){return t.fromBigInteger(this._endAddress())}endAddressExclusive(){let e=new lt.BigInteger("1");return t.fromBigInteger(this._endAddress().subtract(e))}getScope(){let e=Le.SCOPES[this.getBits(12,16).intValue()];return this.getType()==="Global unicast"&&e!=="Link local"&&(e="Global"),e||"Unknown"}getType(){for(let e of Object.keys(Le.TYPES))if(this.isInSubnet(new t(e)))return Le.TYPES[e];return"Global unicast"}getBits(e,i){return new lt.BigInteger(this.getBitsBase2(e,i),2)}getBitsBase2(e,i){return this.binaryZeroPad().slice(e,i)}getBitsBase16(e,i){let r=i-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,i).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,Le.BITS)}reverseForm(e){e||(e={});let i=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,i).reverse().join(".");return i>0?e.omitSuffix?r:(0,ct.sprintf)("%s.ip6.arpa.",r):e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,i=[],r=0,n=[];for(e=0;e0&&(r>1&&n.push([e-r,e-1]),r=0)}r>1&&n.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let s=n.map(a=>a[1]-a[0]+1);if(n.length>0){let a=s.indexOf(Math.max(...s));i=SS(this.parsedAddress,n[a])}else i=this.parsedAddress;for(e=0;e1?"s":"",i.join("")),e.replace(Le.RE_BAD_CHARACTERS,'$1'));let r=e.match(Le.RE_BAD_ADDRESS);if(r)throw new ni.AddressError((0,ct.sprintf)("Address failed regex: %s",r.join("")),e.replace(Le.RE_BAD_ADDRESS,'$1'));let n=[],s=e.split("::");if(s.length===2){let o=s[0].split(":"),a=s[1].split(":");o.length===1&&o[0]===""&&(o=[]),a.length===1&&a[0]===""&&(a=[]);let l=this.groups-(o.length+a.length);if(!l)throw new ni.AddressError("Error parsing groups");this.elidedGroups=l,this.elisionBegin=o.length,this.elisionEnd=o.length+this.elidedGroups,n=n.concat(o);for(let c=0;c(0,ct.sprintf)("%x",parseInt(o,16))),n.length!==this.groups)throw new ni.AddressError("Incorrect number of groups found");return n}canonicalForm(){return this.parsedAddress.map(Om).join(":")}decimal(){return this.parsedAddress.map(e=>(0,ct.sprintf)("%05d",parseInt(e,16))).join(":")}bigInteger(){return new lt.BigInteger(this.parsedAddress.map(Om).join(""),16)}to4(){let e=this.binaryZeroPad().split("");return Yi.Address4.fromHex(new lt.BigInteger(e.slice(96,128).join(""),2).toString(16))}to4in6(){let e=this.to4(),r=new t(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),n="";return/:$/.test(r)||(n=":"),r+n+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),i=this.getBits(80,96).xor(new lt.BigInteger("ffff",16)).toString(),r=Yi.Address4.fromHex(this.getBitsBase16(32,64)),n=Yi.Address4.fromHex(this.getBits(96,128).xor(new lt.BigInteger("ffffffff",16)).toString(16)),s=this.getBits(64,80),o=this.getBitsBase2(64,80),a=s.testBit(15),l=s.testBit(14),c=s.testBit(8),u=s.testBit(9),f=new lt.BigInteger(o.slice(2,6)+o.slice(8,16),2).toString(10);return{prefix:(0,ct.sprintf)("%s:%s",e.slice(0,4),e.slice(4,8)),server4:r.address,client4:n.address,flags:o,coneNat:a,microsoft:{reserved:l,universalLocal:u,groupIndividual:c,nonce:f},udpPort:i}}inspect6to4(){let e=this.getBitsBase16(0,16),i=Yi.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:(0,ct.sprintf)("%s",e.slice(0,4)),gateway:i.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new t(e)}toByteArray(){let e=this.bigInteger().toByteArray();return e.length===17&&e[0]===0?e.slice(1):e}toUnsignedByteArray(){return this.toByteArray().map(Cm)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(Cm))}static fromUnsignedByteArray(e){let i=new lt.BigInteger("256",10),r=new lt.BigInteger("0",10),n=new lt.BigInteger("1",10);for(let s=e.length-1;s>=0;s--)r=r.add(n.multiply(new lt.BigInteger(e[s].toString(10),10))),n=n.multiply(i);return t.fromBigInteger(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new t("2001::/32"))}is6to4(){return this.isInSubnet(new t("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(e){return e===void 0?e="":e=(0,ct.sprintf)(":%s",e),(0,ct.sprintf)("http://[%s]%s/",this.correctForm(),e)}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let i=this.correctForm;return e.v4&&(i=this.to4in6),e.className?(0,ct.sprintf)('%2$s',e.prefix,i.call(this),e.className):(0,ct.sprintf)('%2$s',e.prefix,i.call(this))}group(){if(this.elidedGroups===0)return Kl.simpleGroup(this.address).join(":");Gs(typeof this.elidedGroups=="number"),Gs(typeof this.elisionBegin=="number");let e=[],[i,r]=this.address.split("::");i.length?e.push(...Kl.simpleGroup(i)):e.push("");let n=["hover-group"];for(let s=this.elisionBegin;s',n.join(" "))),r.length?e.push(...Kl.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(Gs(this.address4 instanceof Yi.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let i=[],r=new t(this.correctForm());if(r.elidedGroups===0)i.push((0,Wi.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===Le.GROUPS)i.push((0,Wi.possibleElisions)(Le.GROUPS));else{let n=r.address.split("::");n[0].length&&i.push((0,Wi.simpleRegularExpression)(n[0].split(":"))),Gs(typeof r.elidedGroups=="number"),i.push((0,Wi.possibleElisions)(r.elidedGroups,n[0].length!==0,n[1].length!==0)),n[1].length&&i.push((0,Wi.simpleRegularExpression)(n[1].split(":"))),i=[i.join(":")]}return e||(i=["(?=^|",Wi.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...i,")(?=[^\\w\\:]|",Wi.ADDRESS_BOUNDARY,"|$)"]),i.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};Wt.Address6=zl});var Jl=_(rt=>{"use strict";var ES=rt&&rt.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),kS=rt&&rt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),OS=rt&&rt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var i in t)i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)&&ES(e,t,i);return kS(e,t),e};Object.defineProperty(rt,"__esModule",{value:!0});rt.v6=rt.AddressError=rt.Address6=rt.Address4=void 0;var CS=Hl();Object.defineProperty(rt,"Address4",{enumerable:!0,get:function(){return CS.Address4}});var TS=Tm();Object.defineProperty(rt,"Address6",{enumerable:!0,get:function(){return TS.Address6}});var AS=js();Object.defineProperty(rt,"AddressError",{enumerable:!0,get:function(){return AS.AddressError}});var IS=OS(Yl());rt.v6={helpers:IS}});var Rm=_(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.ipToBuffer=At.int32ToIpv4=At.ipv4ToInt32=At.validateSocksClientChainOptions=At.validateSocksClientOptions=void 0;var ut=ql(),Je=Ml(),NS=require("stream"),Zl=Jl(),Am=require("net");function LS(t,e=["connect","bind","associate"]){if(!Je.SocksCommand[t.command])throw new ut.SocksClientError(Je.ERRORS.InvalidSocksCommand,t);if(e.indexOf(t.command)===-1)throw new ut.SocksClientError(Je.ERRORS.InvalidSocksCommandForOperation,t);if(!Nm(t.destination))throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsDestination,t);if(!Lm(t.proxy))throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsProxy,t);if(Im(t.proxy,t),t.timeout&&!Bm(t.timeout))throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsTimeout,t);if(t.existing_socket&&!(t.existing_socket instanceof NS.Duplex))throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsExistingSocket,t)}At.validateSocksClientOptions=LS;function BS(t){if(t.command!=="connect")throw new ut.SocksClientError(Je.ERRORS.InvalidSocksCommandChain,t);if(!Nm(t.destination))throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsDestination,t);if(!(t.proxies&&Array.isArray(t.proxies)&&t.proxies.length>=2))throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsProxiesLength,t);if(t.proxies.forEach(e=>{if(!Lm(e))throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsProxy,t);Im(e,t)}),t.timeout&&!Bm(t.timeout))throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsTimeout,t)}At.validateSocksClientChainOptions=BS;function Im(t,e){if(t.custom_auth_method!==void 0){if(t.custom_auth_methodJe.SOCKS5_CUSTOM_AUTH_END)throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(t.custom_auth_request_handler===void 0||typeof t.custom_auth_request_handler!="function")throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(t.custom_auth_response_size===void 0)throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(t.custom_auth_response_handler===void 0||typeof t.custom_auth_response_handler!="function")throw new ut.SocksClientError(Je.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}function Nm(t){return t&&typeof t.host=="string"&&typeof t.port=="number"&&t.port>=0&&t.port<=65535}function Lm(t){return t&&(typeof t.host=="string"||typeof t.ipaddress=="string")&&typeof t.port=="number"&&t.port>=0&&t.port<=65535&&(t.type===4||t.type===5)}function Bm(t){return typeof t=="number"&&t>0}function RS(t){return new Zl.Address4(t).toArray().reduce((i,r)=>(i<<8)+r,0)}At.ipv4ToInt32=RS;function PS(t){let e=t>>>24&255,i=t>>>16&255,r=t>>>8&255,n=t&255;return[e,i,r,n].join(".")}At.int32ToIpv4=PS;function MS(t){if(Am.isIPv4(t)){let e=new Zl.Address4(t);return Buffer.from(e.toArray())}else if(Am.isIPv6(t)){let e=new Zl.Address6(t);return Buffer.from(e.canonicalForm().split(":").map(i=>i.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}At.ipToBuffer=MS});var Pm=_(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.ReceiveBuffer=void 0;var Ql=class{constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let i=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),i.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let i=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(i),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,i}};Ws.ReceiveBuffer=Ql});var Mm=_(gi=>{"use strict";var Lr=gi&&gi.__awaiter||function(t,e,i,r){function n(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):n(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(gi,"__esModule",{value:!0});gi.SocksClientError=gi.SocksClient=void 0;var FS=require("events"),Br=require("net"),dt=um(),F=Ml(),xt=Rm(),qS=Pm(),ec=ql();Object.defineProperty(gi,"SocksClientError",{enumerable:!0,get:function(){return ec.SocksClientError}});var Xl=Jl(),tc=class t extends FS.EventEmitter{constructor(e){super(),this.options=Object.assign({},e),(0,xt.validateSocksClientOptions)(e),this.setState(F.SocksClientState.Created)}static createConnection(e,i){return new Promise((r,n)=>{try{(0,xt.validateSocksClientOptions)(e,["connect"])}catch(o){return typeof i=="function"?(i(o),r(o)):n(o)}let s=new t(e);s.connect(e.existing_socket),s.once("established",o=>{s.removeAllListeners(),typeof i=="function"&&i(null,o),r(o)}),s.once("error",o=>{s.removeAllListeners(),typeof i=="function"?(i(o),r(o)):n(o)})})}static createConnectionChain(e,i){return new Promise((r,n)=>Lr(this,void 0,void 0,function*(){try{(0,xt.validateSocksClientChainOptions)(e)}catch(s){return typeof i=="function"?(i(s),r(s)):n(s)}e.randomizeChain&&(0,ec.shuffleArray)(e.proxies);try{let s;for(let o=0;othis.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let i=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||F.DEFAULT_TIMEOUT);i.unref&&typeof i.unref=="function"&&i.unref(),e?this.socket=e:this.socket=new Br.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(F.SocksClientState.Connecting),this.receiveBuffer=new qS.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let n=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",n)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==F.SocksClientState.Established&&this.state!==F.SocksClientState.BoundWaitingForConnection&&this.closeSocket(F.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(F.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(F.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==F.SocksClientState.Established&&this.state!==F.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===F.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===F.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===F.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===F.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(F.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(F.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==F.SocksClientState.Error&&(this.setState(F.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new ec.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",i=new dt.SmartBuffer;i.writeUInt8(4),i.writeUInt8(F.SocksCommand[this.options.command]),i.writeUInt16BE(this.options.destination.port),Br.isIPv4(this.options.destination.host)?(i.writeBuffer((0,xt.ipToBuffer)(this.options.destination.host)),i.writeStringNT(e)):(i.writeUInt8(0),i.writeUInt8(0),i.writeUInt8(0),i.writeUInt8(1),i.writeStringNT(e),i.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(i.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==F.Socks4Response.Granted)this.closeSocket(`${F.ERRORS.Socks4ProxyRejectedConnection} - (${F.Socks4Response[e[1]]})`);else if(F.SocksCommand[this.options.command]===F.SocksCommand.bind){let i=dt.SmartBuffer.fromBuffer(e);i.readOffset=2;let r={port:i.readUInt16BE(),host:(0,xt.int32ToIpv4)(i.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(F.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==F.Socks4Response.Granted)this.closeSocket(`${F.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${F.Socks4Response[e[1]]})`);else{let i=dt.SmartBuffer.fromBuffer(e);i.readOffset=2;let r={port:i.readUInt16BE(),host:(0,xt.int32ToIpv4)(i.readUInt32BE())};this.setState(F.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new dt.SmartBuffer,i=[F.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&i.push(F.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&i.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(i.length);for(let r of i)e.writeUInt8(r);this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(F.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(F.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===F.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(F.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===F.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=F.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===F.Socks5Auth.UserPass?(this.socks5ChosenAuthType=F.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(F.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",i=this.options.proxy.password||"",r=new dt.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(i)),r.writeString(i),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(F.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return Lr(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(F.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return Lr(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return Lr(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return Lr(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return Lr(this,void 0,void 0,function*(){this.setState(F.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===F.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===F.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(F.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new dt.SmartBuffer;e.writeUInt8(5),e.writeUInt8(F.SocksCommand[this.options.command]),e.writeUInt8(0),Br.isIPv4(this.options.destination.host)?(e.writeUInt8(F.Socks5HostType.IPv4),e.writeBuffer((0,xt.ipToBuffer)(this.options.destination.host))):Br.isIPv6(this.options.destination.host)?(e.writeUInt8(F.Socks5HostType.IPv6),e.writeBuffer((0,xt.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(F.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(F.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==F.Socks5Response.Granted)this.closeSocket(`${F.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${F.Socks5Response[e[1]]}`);else{let i=e[3],r,n;if(i===F.Socks5HostType.IPv4){let s=F.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length{"use strict";var DS=Ki&&Ki.__createBinding||(Object.create?function(t,e,i,r){r===void 0&&(r=i);var n=Object.getOwnPropertyDescriptor(e,i);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,r,n)}:function(t,e,i,r){r===void 0&&(r=i),t[r]=e[i]}),jS=Ki&&Ki.__exportStar||function(t,e){for(var i in t)i!=="default"&&!Object.prototype.hasOwnProperty.call(e,i)&&DS(e,t,i)};Object.defineProperty(Ki,"__esModule",{value:!0});jS(Mm(),Ki)});var qm=_(zi=>{"use strict";var US=zi&&zi.__awaiter||function(t,e,i,r){function n(s){return s instanceof i?s:new i(function(o){o(s)})}return new(i||(i=Promise))(function(s,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):n(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})},Ks=zi&&zi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zi,"__esModule",{value:!0});var $S=Ks(require("dns")),VS=Ks(require("tls")),HS=Ks(require("url")),GS=Ks(yr()),YS=ja(),WS=Fm(),ic=GS.default("socks-proxy-agent");function KS(t){return new Promise((e,i)=>{$S.default.lookup(t,(r,n)=>{r?i(r):e(n)})})}function zS(t){let e=0,i=!1,r=5,n=t.hostname||t.host;if(!n)throw new TypeError('No "host"');if(typeof t.port=="number"?e=t.port:typeof t.port=="string"&&(e=parseInt(t.port,10)),e||(e=1080),t.protocol)switch(t.protocol.replace(":","")){case"socks4":i=!0;case"socks4a":r=4;break;case"socks5":i=!0;case"socks":case"socks5h":r=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${t.protocol}`)}if(typeof t.type!="undefined")if(t.type===4||t.type===5)r=t.type;else throw new TypeError(`"type" must be 4 or 5, got: ${t.type}`);let s={host:n,port:e,type:r},o=t.userId||t.username,a=t.password;if(t.auth){let l=t.auth.split(":");o=l[0],a=l[1]}return o&&Object.defineProperty(s,"userId",{value:o,enumerable:!1}),a&&Object.defineProperty(s,"password",{value:a,enumerable:!1}),{lookup:i,proxy:s}}var rc=class extends YS.Agent{constructor(e){let i;if(typeof e=="string"?i=HS.default.parse(e):i=e,!i)throw new TypeError("a SOCKS proxy server `host` and `port` must be specified!");super(i);let r=zS(i);this.lookup=r.lookup,this.proxy=r.proxy,this.tlsConnectionOptions=i.tls||{}}callback(e,i){return US(this,void 0,void 0,function*(){let{lookup:r,proxy:n}=this,{host:s,port:o,timeout:a}=i;if(!s)throw new Error("No `host` defined!");r&&(s=yield KS(s));let l={proxy:n,destination:{host:s,port:o},command:"connect",timeout:a};ic("Creating socks proxy connection: %o",l);let{socket:c}=yield WS.SocksClient.createConnection(l);if(ic("Successfully created socks proxy connection"),i.secureEndpoint){ic("Upgrading socket connection to TLS");let u=i.servername||i.host;return VS.default.connect(Object.assign(Object.assign(Object.assign({},JS(i,"host","hostname","path","port")),{socket:c,servername:u}),this.tlsConnectionOptions))}return c})}};zi.default=rc;function JS(t,...e){let i={},r;for(r in t)e.includes(r)||(i[r]=t[r]);return i}});var jm=_((oc,Dm)=>{"use strict";var ZS=oc&&oc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},nc=ZS(qm());function sc(t){return new nc.default(t)}(function(t){t.SocksProxyAgent=nc.default,t.prototype=nc.default.prototype})(sc||(sc={}));Dm.exports=sc});var Se=_(et=>{"use strict";var ac=Symbol.for("yaml.alias"),Um=Symbol.for("yaml.document"),zs=Symbol.for("yaml.map"),$m=Symbol.for("yaml.pair"),lc=Symbol.for("yaml.scalar"),Js=Symbol.for("yaml.seq"),si=Symbol.for("yaml.node.type"),QS=t=>!!t&&typeof t=="object"&&t[si]===ac,XS=t=>!!t&&typeof t=="object"&&t[si]===Um,eE=t=>!!t&&typeof t=="object"&&t[si]===zs,tE=t=>!!t&&typeof t=="object"&&t[si]===$m,Vm=t=>!!t&&typeof t=="object"&&t[si]===lc,iE=t=>!!t&&typeof t=="object"&&t[si]===Js;function Hm(t){if(t&&typeof t=="object")switch(t[si]){case zs:case Js:return!0}return!1}function rE(t){if(t&&typeof t=="object")switch(t[si]){case ac:case zs:case lc:case Js:return!0}return!1}var nE=t=>(Vm(t)||Hm(t))&&!!t.anchor;et.ALIAS=ac;et.DOC=Um;et.MAP=zs;et.NODE_TYPE=si;et.PAIR=$m;et.SCALAR=lc;et.SEQ=Js;et.hasAnchor=nE;et.isAlias=QS;et.isCollection=Hm;et.isDocument=XS;et.isMap=eE;et.isNode=rE;et.isPair=tE;et.isScalar=Vm;et.isSeq=iE});var hn=_(cc=>{"use strict";var He=Se(),mt=Symbol("break visit"),Gm=Symbol("skip children"),Kt=Symbol("remove node");function Zs(t,e){let i=Ym(e);He.isDocument(t)?Rr(null,t.contents,i,Object.freeze([t]))===Kt&&(t.contents=null):Rr(null,t,i,Object.freeze([]))}Zs.BREAK=mt;Zs.SKIP=Gm;Zs.REMOVE=Kt;function Rr(t,e,i,r){let n=Wm(t,e,i,r);if(He.isNode(n)||He.isPair(n))return Km(t,r,n),Rr(t,n,i,r);if(typeof n!="symbol"){if(He.isCollection(e)){r=Object.freeze(r.concat(e));for(let s=0;s{"use strict";var zm=Se(),sE=hn(),oE={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},aE=t=>t.replace(/[!,[\]{}]/g,e=>oE[e]),pn=class t{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,i)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[s,o]=r;return this.tags[s]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;let[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let o=/^\d+\.\d+$/.test(s);return i(6,`Unsupported YAML version ${s}`,o),!1}}default:return i(0,`Unknown directive ${n}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),o)}let[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||i(`The ${e} tag has no suffix`);let s=this.tags[r];if(s)try{return s+decodeURIComponent(n)}catch(o){return i(String(o)),null}return r==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[i,r]of Object.entries(this.tags))if(e.startsWith(r))return i+aE(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),n;if(e&&r.length>0&&zm.isNode(e.contents)){let s={};sE.visit(e.contents,(o,a)=>{zm.isNode(a)&&a.tag&&(s[a.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[s,o]of r)s==="!!"&&o==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(o)))&&i.push(`%TAG ${s} ${o}`);return i.join(` +`)}};pn.defaultYaml={explicit:!1,version:"1.2"};pn.defaultTags={"!!":"tag:yaml.org,2002:"};Jm.Directives=pn});var Xs=_(dn=>{"use strict";var Zm=Se(),lE=hn();function cE(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(i)}return!0}function Qm(t){let e=new Set;return lE.visit(t,{Value(i,r){r.anchor&&e.add(r.anchor)}}),e}function Xm(t,e){for(let i=1;;++i){let r=`${t}${i}`;if(!e.has(r))return r}}function uE(t,e){let i=[],r=new Map,n=null;return{onAnchor:s=>{i.push(s),n||(n=Qm(t));let o=Xm(e,n);return n.add(o),o},setAnchors:()=>{for(let s of i){let o=r.get(s);if(typeof o=="object"&&o.anchor&&(Zm.isScalar(o.node)||Zm.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=s,a}}},sourceObjects:r}}dn.anchorIsValid=cE;dn.anchorNames=Qm;dn.createNodeAnchors=uE;dn.findNewAnchor=Xm});var fc=_(eg=>{"use strict";function mn(t,e,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let n=0,s=r.length;n{"use strict";var fE=Se();function tg(t,e,i){if(Array.isArray(t))return t.map((r,n)=>tg(r,String(n),i));if(t&&typeof t.toJSON=="function"){if(!i||!fE.hasAnchor(t))return t.toJSON(e,i);let r={aliasCount:0,count:1,res:void 0};i.anchors.set(t,r),i.onCreate=s=>{r.res=s,delete i.onCreate};let n=t.toJSON(e,i);return i.onCreate&&i.onCreate(n),n}return typeof t=="bigint"&&!(i!=null&&i.keep)?Number(t):t}ig.toJS=tg});var eo=_(ng=>{"use strict";var hE=fc(),rg=Se(),pE=vi(),hc=class{constructor(e){Object.defineProperty(this,rg.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:r,onAnchor:n,reviver:s}={}){if(!rg.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=pE.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof s=="function"?hE.applyReviver(s,{"":a},"",a):a}};ng.NodeBase=hc});var gn=_(og=>{"use strict";var dE=Xs(),sg=hn(),to=Se(),mE=eo(),gE=vi(),pc=class extends mE.NodeBase{constructor(e){super(to.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let i;return sg.visit(e,{Node:(r,n)=>{if(n===this)return sg.visit.BREAK;n.anchor===this.source&&(i=n)}}),i}toJSON(e,i){if(!i)return{source:this.source};let{anchors:r,doc:n,maxAliasCount:s}=i,o=this.resolve(n);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(gE.toJS(o,null,i),a=r.get(o)),!a||a.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=io(n,o,r)),a.count*a.aliasCount>s)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,i,r){let n=`*${this.source}`;if(e){if(dE.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function io(t,e,i){if(to.isAlias(e)){let r=e.resolve(t),n=i&&r&&i.get(r);return n?n.count*n.aliasCount:0}else if(to.isCollection(e)){let r=0;for(let n of e.items){let s=io(t,n,i);s>r&&(r=s)}return r}else if(to.isPair(e)){let r=io(t,e.key,i),n=io(t,e.value,i);return Math.max(r,n)}return 1}og.Alias=pc});var De=_(dc=>{"use strict";var vE=Se(),yE=eo(),bE=vi(),_E=t=>!t||typeof t!="function"&&typeof t!="object",yi=class extends yE.NodeBase{constructor(e){super(vE.SCALAR),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:bE.toJS(this.value,e,i)}toString(){return String(this.value)}};yi.BLOCK_FOLDED="BLOCK_FOLDED";yi.BLOCK_LITERAL="BLOCK_LITERAL";yi.PLAIN="PLAIN";yi.QUOTE_DOUBLE="QUOTE_DOUBLE";yi.QUOTE_SINGLE="QUOTE_SINGLE";dc.Scalar=yi;dc.isScalarValue=_E});var vn=_(lg=>{"use strict";var wE=gn(),Ji=Se(),ag=De(),xE="tag:yaml.org,2002:";function SE(t,e,i){var r;if(e){let n=i.filter(o=>o.tag===e),s=(r=n.find(o=>!o.format))!=null?r:n[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return i.find(n=>{var s;return((s=n.identify)==null?void 0:s.call(n,t))&&!n.format})}function EE(t,e,i){var f,d,g;if(Ji.isDocument(t)&&(t=t.contents),Ji.isNode(t))return t;if(Ji.isPair(t)){let m=(d=(f=i.schema[Ji.MAP]).createNode)==null?void 0:d.call(f,i.schema,null,i);return m.items.push(t),m}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt!="undefined"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:r,onAnchor:n,onTagObj:s,schema:o,sourceObjects:a}=i,l;if(r&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor||(l.anchor=n(t)),new wE.Alias(l.anchor);l={anchor:null,node:null},a.set(t,l)}e!=null&&e.startsWith("!!")&&(e=xE+e.slice(2));let c=SE(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let m=new ag.Scalar(t);return l&&(l.node=m),m}c=t instanceof Map?o[Ji.MAP]:Symbol.iterator in Object(t)?o[Ji.SEQ]:o[Ji.MAP]}s&&(s(c),delete i.onTagObj);let u=c!=null&&c.createNode?c.createNode(i.schema,t,i):typeof((g=c==null?void 0:c.nodeClass)==null?void 0:g.from)=="function"?c.nodeClass.from(i.schema,t,i):new ag.Scalar(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}lg.createNode=EE});var no=_(ro=>{"use strict";var kE=vn(),zt=Se(),OE=eo();function mc(t,e,i){let r=i;for(let n=e.length-1;n>=0;--n){let s=e[n];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return kE.createNode(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var cg=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,gc=class extends OE.NodeBase{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){let i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(r=>zt.isNode(r)||zt.isPair(r)?r.clone(e):r),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(cg(e))this.add(i);else{let[r,...n]=e,s=this.get(r,!0);if(zt.isCollection(s))s.addIn(n,i);else if(s===void 0&&this.schema)this.set(r,mc(this.schema,n,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){let[i,...r]=e;if(r.length===0)return this.delete(i);let n=this.get(i,!0);if(zt.isCollection(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(e,i){let[r,...n]=e,s=this.get(r,!0);return n.length===0?!i&&zt.isScalar(s)?s.value:s:zt.isCollection(s)?s.getIn(n,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!zt.isPair(i))return!1;let r=i.value;return r==null||e&&zt.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[i,...r]=e;if(r.length===0)return this.has(i);let n=this.get(i,!0);return zt.isCollection(n)?n.hasIn(r):!1}setIn(e,i){let[r,...n]=e;if(n.length===0)this.set(r,i);else{let s=this.get(r,!0);if(zt.isCollection(s))s.setIn(n,i);else if(s===void 0&&this.schema)this.set(r,mc(this.schema,n,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}};ro.Collection=gc;ro.collectionFromPath=mc;ro.isEmptyPath=cg});var yn=_(so=>{"use strict";var CE=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function vc(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var TE=(t,e,i)=>t.endsWith(` +`)?vc(i,e):i.includes(` `)?` -`+yc(i,e):(t.endsWith(" ")?"":" ")+i;so.indentComment=yc;so.lineComment=jE;so.stringifyComment=DE});var vg=w(_n=>{"use strict";var UE="flow",bc="block",oo="quoted";function $E(t,e,i="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return t;nn-Math.max(2,s)?c.push(0):f=n-r);let d,g,m=!1,v=-1,b=-1,_=-1;i===bc&&(v=gg(t,v,e.length),v!==-1&&(f=v+l));for(let O;O=t[v+=1];){if(i===oo&&O==="\\"){switch(b=v,t[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}_=v}if(O===` -`)i===bc&&(v=gg(t,v,e.length)),f=v+e.length+l,d=void 0;else{if(O===" "&&g&&g!==" "&&g!==` -`&&g!==" "){let k=t[v+1];k&&k!==" "&&k!==` -`&&k!==" "&&(d=v)}if(v>=f)if(d)c.push(d),f=d+l,d=void 0;else if(i===oo){for(;g===" "||g===" ";)g=O,O=t[v+=1],m=!0;let k=v>_+1?v-2:b-1;if(u[k])return t;c.push(k),u[k]=!0,f=k+l,d=void 0}else m=!0}g=O}if(m&&a&&a(),c.length===0)return t;o&&o();let S=t.slice(0,c[0]);for(let O=0;O{"use strict";var Jt=je(),bi=vg(),lo=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),co=t=>/^(%|---|\.\.\.)/m.test(t);function VE(t,e,i){if(!e||e<0)return!1;let r=e-i,n=t.length;if(n<=r)return!1;for(let s=0,o=0;sr)return!0;if(o=s+1,n-o<=r)return!1}return!0}function wn(t,e){let i=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return i;let{implicitKey:r}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(co(t)?" ":""),o="",a=0;for(let l=0,c=i[l];c;c=i[++l])if(c===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(o+=i.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(i[l+1]){case"u":{o+=i.slice(a,l);let u=i.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=i.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||i[l+2]==='"'||i.length{"use strict";var AE="flow",yc="block",oo="quoted";function IE(t,e,i="flow",{indentAtStart:r,lineWidth:n=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return t;nn-Math.max(2,s)?c.push(0):f=n-r);let d,g,m=!1,y=-1,b=-1,x=-1;i===yc&&(y=ug(t,y,e.length),y!==-1&&(f=y+l));for(let O;O=t[y+=1];){if(i===oo&&O==="\\"){switch(b=y,t[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}x=y}if(O===` +`)i===yc&&(y=ug(t,y,e.length)),f=y+e.length+l,d=void 0;else{if(O===" "&&g&&g!==" "&&g!==` +`&&g!==" "){let k=t[y+1];k&&k!==" "&&k!==` +`&&k!==" "&&(d=y)}if(y>=f)if(d)c.push(d),f=d+l,d=void 0;else if(i===oo){for(;g===" "||g===" ";)g=O,O=t[y+=1],m=!0;let k=y>x+1?y-2:b-1;if(u[k])return t;c.push(k),u[k]=!0,f=k+l,d=void 0}else m=!0}g=O}if(m&&a&&a(),c.length===0)return t;o&&o();let E=t.slice(0,c[0]);for(let O=0;O{"use strict";var Jt=De(),bi=fg(),lo=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),co=t=>/^(%|---|\.\.\.)/m.test(t);function NE(t,e,i){if(!e||e<0)return!1;let r=e-i,n=t.length;if(n<=r)return!1;for(let s=0,o=0;sr)return!0;if(o=s+1,n-o<=r)return!1}return!0}function _n(t,e){let i=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return i;let{implicitKey:r}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(co(t)?" ":""),o="",a=0;for(let l=0,c=i[l];c;c=i[++l])if(c===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(o+=i.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(i[l+1]){case"u":{o+=i.slice(a,l);let u=i.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=i.substr(l,6)}l+=5,a=l+1}break;case"n":if(r||i[l+2]==='"'||i.length `;let f,d;for(d=i.length;d>0;--d){let R=i[d-1];if(R!==` `&&R!==" "&&R!==" ")break}let g=i.substring(d),m=g.indexOf(` `);m===-1?f="-":i===g||m!==g.length-1?(f="+",s&&s()):f="",g&&(i=i.slice(0,-g.length),g[g.length-1]===` -`&&(g=g.slice(0,-1)),g=g.replace(wc,`$&${c}`));let v=!1,b,_=-1;for(b=0;b")+(v?c?"2":"1":"")+f;if(t&&(k+=" "+a(t.replace(/ ?[\r\n]+/g," ")),n&&n()),u)return i=i.replace(/\n+/g,`$&${c}`),`${k} -${c}${S}${i}${g}`;i=i.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let E=bi.foldFlowLines(`${S}${i}${g}`,c,bi.FOLD_BLOCK,lo(r,!0));return`${k} -${c}${E}`}function HE(t,e,i,r){let{type:n,value:s}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(` -`)||u&&/[[\]{},]/.test(s))return Fr(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(` -`)?Fr(s,e):ao(t,e,i,r);if(!a&&!u&&n!==Jt.Scalar.PLAIN&&s.includes(` -`))return ao(t,e,i,r);if(co(s)){if(l==="")return e.forceBlockIndent=!0,ao(t,e,i,r);if(a&&l===c)return Fr(s,e)}let f=s.replace(/\n+/g,`$& -${l}`);if(o){let d=v=>{var b;return v.default&&v.tag!=="tag:yaml.org,2002:str"&&((b=v.test)==null?void 0:b.test(f))},{compat:g,tags:m}=e.doc.schema;if(m.some(d)||g!=null&&g.some(d))return Fr(s,e)}return a?f:bi.foldFlowLines(f,l,bi.FOLD_FLOW,lo(e,!1))}function GE(t,e,i,r){let{implicitKey:n,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==Jt.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Jt.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case Jt.Scalar.BLOCK_FOLDED:case Jt.Scalar.BLOCK_LITERAL:return n||s?Fr(o.value,e):ao(o,e,i,r);case Jt.Scalar.QUOTE_DOUBLE:return wn(o.value,e);case Jt.Scalar.QUOTE_SINGLE:return _c(o.value,e);case Jt.Scalar.PLAIN:return HE(o,e,i,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=n&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}yg.stringifyString=GE});var Sn=w(xc=>{"use strict";var YE=Xs(),_i=Se(),WE=bn(),zE=xn();function KE(t,e){let i=Object.assign({blockQuote:!0,commentString:WE.stringifyComment,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},t.schema.toStringOptions,e),r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function JE(t,e){var n,s,o,a;if(e.tag){let l=t.filter(c=>c.tag===e.tag);if(l.length>0)return(n=l.find(c=>c.format===e.format))!=null?n:l[0]}let i,r;if(_i.isScalar(e)){r=e.value;let l=t.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){let c=l.filter(u=>u.test);c.length>0&&(l=c)}i=(s=l.find(c=>c.format===e.format))!=null?s:l.find(c=>!c.format)}else r=e,i=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!i){let l=(a=(o=r==null?void 0:r.constructor)==null?void 0:o.name)!=null?a:typeof r;throw new Error(`Tag not resolved for ${l} value`)}return i}function ZE(t,e,{anchors:i,doc:r}){if(!r.directives)return"";let n=[],s=(_i.isScalar(t)||_i.isCollection(t))&&t.anchor;s&&YE.anchorIsValid(s)&&(i.add(s),n.push(`&${s}`));let o=t.tag?t.tag:e.default?null:e.tag;return o&&n.push(r.directives.tagString(o)),n.join(" ")}function QE(t,e,i,r){var l,c;if(_i.isPair(t))return t.toString(e,i,r);if(_i.isAlias(t)){if(e.doc.directives)return t.toString(e);if((l=e.resolvedAliases)!=null&&l.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,s=_i.isNode(t)?t:e.doc.createNode(t,{onTagObj:u=>n=u});n||(n=JE(e.doc.schema.tags,s));let o=ZE(s,n,e);o.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(s,e,i,r):_i.isScalar(s)?zE.stringifyString(s,e,i,r):s.toString(e,i,r);return o?_i.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o} -${e.indent}${a}`:a}xc.createStringifyContext=KE;xc.stringify=QE});var xg=w(wg=>{"use strict";var oi=Se(),bg=je(),_g=Sn(),En=bn();function XE({key:t,value:e},i,r,n){var T,A;let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=i,d=oi.isNode(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(oi.isCollection(t)||!oi.isNode(t)&&typeof t=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let g=!f&&(!t||d&&e==null&&!i.inFlow||oi.isCollection(t)||(oi.isScalar(t)?t.type===bg.Scalar.BLOCK_FOLDED||t.type===bg.Scalar.BLOCK_LITERAL:typeof t=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!g&&(f||!s),indent:a+l});let m=!1,v=!1,b=_g.stringify(t,i,()=>m=!0,()=>v=!0);if(!g&&!i.inFlow&&b.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(i.inFlow){if(s||e==null)return m&&r&&r(),b===""?"?":g?`? ${b}`:b}else if(s&&!f||e==null&&g)return b=`? ${b}`,d&&!m?b+=En.lineComment(b,i.indent,c(d)):v&&n&&n(),b;m&&(d=null),g?(d&&(b+=En.lineComment(b,i.indent,c(d))),b=`? ${b} -${a}:`):(b=`${b}:`,d&&(b+=En.lineComment(b,i.indent,c(d))));let _,S,O;oi.isNode(e)?(_=!!e.spaceBefore,S=e.commentBefore,O=e.comment):(_=!1,S=null,O=null,e&&typeof e=="object"&&(e=o.createNode(e))),i.implicitKey=!1,!g&&!d&&oi.isScalar(e)&&(i.indentAtStart=b.length+1),v=!1,!u&&l.length>=2&&!i.inFlow&&!g&&oi.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let k=!1,E=_g.stringify(e,i,()=>k=!0,()=>v=!0),R=" ";if(d||_||S){if(R=_?` -`:"",S){let C=c(S);R+=` -${En.indentComment(C,i.indent)}`}E===""&&!i.inFlow?R===` +`&&(g=g.slice(0,-1)),g=g.replace(_c,`$&${c}`));let y=!1,b,x=-1;for(b=0;b")+(y?c?"2":"1":"")+f;if(t&&(k+=" "+a(t.replace(/ ?[\r\n]+/g," ")),n&&n()),u)return i=i.replace(/\n+/g,`$&${c}`),`${k} +${c}${E}${i}${g}`;i=i.replace(/\n+/g,` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let S=bi.foldFlowLines(`${E}${i}${g}`,c,bi.FOLD_BLOCK,lo(r,!0));return`${k} +${c}${S}`}function LE(t,e,i,r){let{type:n,value:s}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&s.includes(` +`)||u&&/[[\]{},]/.test(s))return Mr(s,e);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return a||u||!s.includes(` +`)?Mr(s,e):ao(t,e,i,r);if(!a&&!u&&n!==Jt.Scalar.PLAIN&&s.includes(` +`))return ao(t,e,i,r);if(co(s)){if(l==="")return e.forceBlockIndent=!0,ao(t,e,i,r);if(a&&l===c)return Mr(s,e)}let f=s.replace(/\n+/g,`$& +${l}`);if(o){let d=y=>{var b;return y.default&&y.tag!=="tag:yaml.org,2002:str"&&((b=y.test)==null?void 0:b.test(f))},{compat:g,tags:m}=e.doc.schema;if(m.some(d)||g!=null&&g.some(d))return Mr(s,e)}return a?f:bi.foldFlowLines(f,l,bi.FOLD_FLOW,lo(e,!1))}function BE(t,e,i,r){let{implicitKey:n,inFlow:s}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==Jt.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=Jt.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case Jt.Scalar.BLOCK_FOLDED:case Jt.Scalar.BLOCK_LITERAL:return n||s?Mr(o.value,e):ao(o,e,i,r);case Jt.Scalar.QUOTE_DOUBLE:return _n(o.value,e);case Jt.Scalar.QUOTE_SINGLE:return bc(o.value,e);case Jt.Scalar.PLAIN:return LE(o,e,i,r);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=n&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}hg.stringifyString=BE});var xn=_(wc=>{"use strict";var RE=Xs(),_i=Se(),PE=yn(),ME=wn();function FE(t,e){let i=Object.assign({blockQuote:!0,commentString:PE.stringifyComment,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},t.schema.toStringOptions,e),r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function qE(t,e){var n,s,o,a;if(e.tag){let l=t.filter(c=>c.tag===e.tag);if(l.length>0)return(n=l.find(c=>c.format===e.format))!=null?n:l[0]}let i,r;if(_i.isScalar(e)){r=e.value;let l=t.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){let c=l.filter(u=>u.test);c.length>0&&(l=c)}i=(s=l.find(c=>c.format===e.format))!=null?s:l.find(c=>!c.format)}else r=e,i=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!i){let l=(a=(o=r==null?void 0:r.constructor)==null?void 0:o.name)!=null?a:typeof r;throw new Error(`Tag not resolved for ${l} value`)}return i}function DE(t,e,{anchors:i,doc:r}){if(!r.directives)return"";let n=[],s=(_i.isScalar(t)||_i.isCollection(t))&&t.anchor;s&&RE.anchorIsValid(s)&&(i.add(s),n.push(`&${s}`));let o=t.tag?t.tag:e.default?null:e.tag;return o&&n.push(r.directives.tagString(o)),n.join(" ")}function jE(t,e,i,r){var l,c;if(_i.isPair(t))return t.toString(e,i,r);if(_i.isAlias(t)){if(e.doc.directives)return t.toString(e);if((l=e.resolvedAliases)!=null&&l.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,s=_i.isNode(t)?t:e.doc.createNode(t,{onTagObj:u=>n=u});n||(n=qE(e.doc.schema.tags,s));let o=DE(s,n,e);o.length>0&&(e.indentAtStart=((c=e.indentAtStart)!=null?c:0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(s,e,i,r):_i.isScalar(s)?ME.stringifyString(s,e,i,r):s.toString(e,i,r);return o?_i.isScalar(s)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o} +${e.indent}${a}`:a}wc.createStringifyContext=FE;wc.stringify=jE});var gg=_(mg=>{"use strict";var oi=Se(),pg=De(),dg=xn(),Sn=yn();function UE({key:t,value:e},i,r,n){var T,A;let{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=i,d=oi.isNode(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(oi.isCollection(t)||!oi.isNode(t)&&typeof t=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let g=!f&&(!t||d&&e==null&&!i.inFlow||oi.isCollection(t)||(oi.isScalar(t)?t.type===pg.Scalar.BLOCK_FOLDED||t.type===pg.Scalar.BLOCK_LITERAL:typeof t=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!g&&(f||!s),indent:a+l});let m=!1,y=!1,b=dg.stringify(t,i,()=>m=!0,()=>y=!0);if(!g&&!i.inFlow&&b.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(i.inFlow){if(s||e==null)return m&&r&&r(),b===""?"?":g?`? ${b}`:b}else if(s&&!f||e==null&&g)return b=`? ${b}`,d&&!m?b+=Sn.lineComment(b,i.indent,c(d)):y&&n&&n(),b;m&&(d=null),g?(d&&(b+=Sn.lineComment(b,i.indent,c(d))),b=`? ${b} +${a}:`):(b=`${b}:`,d&&(b+=Sn.lineComment(b,i.indent,c(d))));let x,E,O;oi.isNode(e)?(x=!!e.spaceBefore,E=e.commentBefore,O=e.comment):(x=!1,E=null,O=null,e&&typeof e=="object"&&(e=o.createNode(e))),i.implicitKey=!1,!g&&!d&&oi.isScalar(e)&&(i.indentAtStart=b.length+1),y=!1,!u&&l.length>=2&&!i.inFlow&&!g&&oi.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let k=!1,S=dg.stringify(e,i,()=>k=!0,()=>y=!0),R=" ";if(d||x||E){if(R=x?` +`:"",E){let C=c(E);R+=` +${Sn.indentComment(C,i.indent)}`}S===""&&!i.inFlow?R===` `&&(R=` `):R+=` -${i.indent}`}else if(!g&&oi.isCollection(e)){let C=E[0],L=E.indexOf(` -`),P=L!==-1,U=(A=(T=i.inFlow)!=null?T:e.flow)!=null?A:e.items.length===0;if(P||!U){let q=!1;if(P&&(C==="&"||C==="!")){let H=E.indexOf(" ");C==="&"&&H!==-1&&H{"use strict";function ek(t,...e){t==="debug"&&console.log(...e)}function tk(t,e){(t==="debug"||t==="warn")&&(typeof process!="undefined"&&process.emitWarning?process.emitWarning(e):console.warn(e))}Sc.debug=ek;Sc.warn=tk});var po=w(ho=>{"use strict";var kn=Se(),Sg=je(),uo="<<",fo={identify:t=>t===uo||typeof t=="symbol"&&t.description===uo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Sg.Scalar(Symbol(uo)),{addToJSMap:Eg}),stringify:()=>uo},ik=(t,e)=>(fo.identify(e)||kn.isScalar(e)&&(!e.type||e.type===Sg.Scalar.PLAIN)&&fo.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(i=>i.tag===fo.tag&&i.default));function Eg(t,e,i){if(i=t&&kn.isAlias(i)?i.resolve(t.doc):i,kn.isSeq(i))for(let r of i.items)kc(t,e,r);else if(Array.isArray(i))for(let r of i)kc(t,e,r);else kc(t,e,i)}function kc(t,e,i){let r=t&&kn.isAlias(i)?i.resolve(t.doc):i;if(!kn.isMap(r))throw new Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,t,Map);for(let[s,o]of n)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}ho.addMergeToJSMap=Eg;ho.isMergeKey=ik;ho.merge=fo});var Cc=w(Cg=>{"use strict";var rk=Ec(),kg=po(),nk=Sn(),Og=Se(),Oc=vi();function sk(t,e,{key:i,value:r}){if(Og.isNode(i)&&i.addToJSMap)i.addToJSMap(t,e,r);else if(kg.isMergeKey(t,i))kg.addMergeToJSMap(t,e,r);else{let n=Oc.toJS(i,"",t);if(e instanceof Map)e.set(n,Oc.toJS(r,n,t));else if(e instanceof Set)e.add(n);else{let s=ok(i,n,t),o=Oc.toJS(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function ok(t,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(Og.isNode(t)&&(i!=null&&i.doc)){let r=nk.createStringifyContext(i.doc,{});r.anchors=new Set;for(let s of i.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=t.toString(r);if(!i.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),rk.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return n}return JSON.stringify(e)}Cg.addPairToJSMap=sk});var wi=w(Tc=>{"use strict";var Tg=yn(),ak=xg(),lk=Cc(),mo=Se();function ck(t,e,i){let r=Tg.createNode(t,void 0,i),n=Tg.createNode(e,void 0,i);return new go(r,n)}var go=class t{constructor(e,i=null){Object.defineProperty(this,mo.NODE_TYPE,{value:mo.PAIR}),this.key=e,this.value=i}clone(e){let{key:i,value:r}=this;return mo.isNode(i)&&(i=i.clone(e)),mo.isNode(r)&&(r=r.clone(e)),new t(i,r)}toJSON(e,i){let r=i!=null&&i.mapAsMap?new Map:{};return lk.addPairToJSMap(i,r,this)}toString(e,i,r){return e!=null&&e.doc?ak.stringifyPair(this,e,i,r):JSON.stringify(this)}};Tc.Pair=go;Tc.createPair=ck});var Ac=w(Ig=>{"use strict";var Zi=Se(),Ag=Sn(),vo=bn();function uk(t,e,i){var s;return(((s=e.inFlow)!=null?s:t.flow)?hk:fk)(t,e,i)}function fk({comment:t,items:e},i,{blockItemPrefix:r,flowChars:n,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=i,u=Object.assign({},i,{indent:s,type:null}),f=!1,d=[];for(let m=0;mb=null,()=>f=!0);b&&(_+=vo.lineComment(_,s,c(b))),f&&b&&(f=!1),d.push(r+_)}let g;if(d.length===0)g=n.start+n.end;else{g=d[0];for(let m=1;m{"use strict";function $E(t,...e){t==="debug"&&console.log(...e)}function VE(t,e){(t==="debug"||t==="warn")&&(typeof process!="undefined"&&process.emitWarning?process.emitWarning(e):console.warn(e))}xc.debug=$E;xc.warn=VE});var po=_(ho=>{"use strict";var En=Se(),vg=De(),uo="<<",fo={identify:t=>t===uo||typeof t=="symbol"&&t.description===uo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new vg.Scalar(Symbol(uo)),{addToJSMap:yg}),stringify:()=>uo},HE=(t,e)=>(fo.identify(e)||En.isScalar(e)&&(!e.type||e.type===vg.Scalar.PLAIN)&&fo.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(i=>i.tag===fo.tag&&i.default));function yg(t,e,i){if(i=t&&En.isAlias(i)?i.resolve(t.doc):i,En.isSeq(i))for(let r of i.items)Ec(t,e,r);else if(Array.isArray(i))for(let r of i)Ec(t,e,r);else Ec(t,e,i)}function Ec(t,e,i){let r=t&&En.isAlias(i)?i.resolve(t.doc):i;if(!En.isMap(r))throw new Error("Merge sources must be maps or map aliases");let n=r.toJSON(null,t,Map);for(let[s,o]of n)e instanceof Map?e.has(s)||e.set(s,o):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}ho.addMergeToJSMap=yg;ho.isMergeKey=HE;ho.merge=fo});var Oc=_(wg=>{"use strict";var GE=Sc(),bg=po(),YE=xn(),_g=Se(),kc=vi();function WE(t,e,{key:i,value:r}){if(_g.isNode(i)&&i.addToJSMap)i.addToJSMap(t,e,r);else if(bg.isMergeKey(t,i))bg.addMergeToJSMap(t,e,r);else{let n=kc.toJS(i,"",t);if(e instanceof Map)e.set(n,kc.toJS(r,n,t));else if(e instanceof Set)e.add(n);else{let s=KE(i,n,t),o=kc.toJS(r,s,t);s in e?Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[s]=o}}return e}function KE(t,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(_g.isNode(t)&&(i!=null&&i.doc)){let r=YE.createStringifyContext(i.doc,{});r.anchors=new Set;for(let s of i.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;let n=t.toString(r);if(!i.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),GE.warn(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return n}return JSON.stringify(e)}wg.addPairToJSMap=WE});var wi=_(Cc=>{"use strict";var xg=vn(),zE=gg(),JE=Oc(),mo=Se();function ZE(t,e,i){let r=xg.createNode(t,void 0,i),n=xg.createNode(e,void 0,i);return new go(r,n)}var go=class t{constructor(e,i=null){Object.defineProperty(this,mo.NODE_TYPE,{value:mo.PAIR}),this.key=e,this.value=i}clone(e){let{key:i,value:r}=this;return mo.isNode(i)&&(i=i.clone(e)),mo.isNode(r)&&(r=r.clone(e)),new t(i,r)}toJSON(e,i){let r=i!=null&&i.mapAsMap?new Map:{};return JE.addPairToJSMap(i,r,this)}toString(e,i,r){return e!=null&&e.doc?zE.stringifyPair(this,e,i,r):JSON.stringify(this)}};Cc.Pair=go;Cc.createPair=ZE});var Tc=_(Eg=>{"use strict";var Zi=Se(),Sg=xn(),vo=yn();function QE(t,e,i){var s;return(((s=e.inFlow)!=null?s:t.flow)?ek:XE)(t,e,i)}function XE({comment:t,items:e},i,{blockItemPrefix:r,flowChars:n,itemIndent:s,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=i,u=Object.assign({},i,{indent:s,type:null}),f=!1,d=[];for(let m=0;mb=null,()=>f=!0);b&&(x+=vo.lineComment(x,s,c(b))),f&&b&&(f=!1),d.push(r+x)}let g;if(d.length===0)g=n.start+n.end;else{g=d[0];for(let m=1;mb=null);mu||_.includes(` -`))&&(c=!0),f.push(_),u=f.length}let{start:d,end:g}=i;if(f.length===0)return d+g;if(!c){let m=f.reduce((v,b)=>v+b.length+2,2);c=e.options.lineWidth>0&&m>e.options.lineWidth}if(c){let m=d;for(let v of f)m+=v?` -${s}${n}${v}`:` +`+vo.indentComment(c(t),l),a&&a()):f&&o&&o(),g}function ek({items:t},e,{flowChars:i,itemIndent:r}){let{indent:n,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=e;r+=s;let l=Object.assign({},e,{indent:r,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let m=0;mb=null);mu||x.includes(` +`))&&(c=!0),f.push(x),u=f.length}let{start:d,end:g}=i;if(f.length===0)return d+g;if(!c){let m=f.reduce((y,b)=>y+b.length+2,2);c=e.options.lineWidth>0&&m>e.options.lineWidth}if(c){let m=d;for(let y of f)m+=y?` +${s}${n}${y}`:` `;return`${m} -${n}${g}`}else return`${d}${o}${f.join(" ")}${o}${g}`}function yo({indent:t,options:{commentString:e}},i,r,n){if(r&&n&&(r=r.replace(/^\n+/,"")),r){let s=vo.indentComment(e(r),t);i.push(s.trimStart())}}Ig.stringifyCollection=uk});var Si=w(Nc=>{"use strict";var pk=Ac(),dk=Cc(),mk=no(),xi=Se(),bo=wi(),gk=je();function On(t,e){let i=xi.isScalar(e)?e.value:e;for(let r of t)if(xi.isPair(r)&&(r.key===e||r.key===i||xi.isScalar(r.key)&&r.key.value===i))return r}var Ic=class extends mk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(xi.MAP,e),this.items=[]}static from(e,i,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(i,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||n)&&o.items.push(bo.createPair(l,c,r))};if(i instanceof Map)for(let[l,c]of i)a(l,c);else if(i&&typeof i=="object")for(let l of Object.keys(i))a(l,i[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,i){var o;let r;xi.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new bo.Pair(e,e==null?void 0:e.value):r=new bo.Pair(e.key,e.value);let n=On(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(n){if(!i)throw new Error(`Key ${r.key} already set`);xi.isScalar(n.value)&&gk.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(s){let a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(e){let i=On(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){var s;let r=On(this.items,e),n=r==null?void 0:r.value;return(s=!i&&xi.isScalar(n)?n.value:n)!=null?s:void 0}has(e){return!!On(this.items,e)}set(e,i){this.add(new bo.Pair(e,i),!0)}toJSON(e,i,r){let n=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(n);for(let s of this.items)dk.addPairToJSMap(i,n,s);return n}toString(e,i,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!xi.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),pk.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:i})}};Nc.YAMLMap=Ic;Nc.findPair=On});var qr=w(Lg=>{"use strict";var vk=Se(),Ng=Si(),yk={collection:"map",default:!0,nodeClass:Ng.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return vk.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,i)=>Ng.YAMLMap.from(t,e,i)};Lg.map=yk});var Ei=w(Bg=>{"use strict";var bk=yn(),_k=Ac(),wk=no(),wo=Se(),xk=je(),Sk=vi(),Lc=class extends wk.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(wo.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let i=_o(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){let r=_o(e);if(typeof r!="number")return;let n=this.items[r];return!i&&wo.isScalar(n)?n.value:n}has(e){let i=_o(e);return typeof i=="number"&&i=0?e:null}Bg.YAMLSeq=Lc});var Dr=w(Pg=>{"use strict";var Ek=Se(),Rg=Ei(),kk={collection:"seq",default:!0,nodeClass:Rg.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return Ek.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,i)=>Rg.YAMLSeq.from(t,e,i)};Pg.seq=kk});var Cn=w(Mg=>{"use strict";var Ok=xn(),Ck={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,i,r){return e=Object.assign({actualString:!0},e),Ok.stringifyString(t,e,i,r)}};Mg.string=Ck});var xo=w(Dg=>{"use strict";var Fg=je(),qg={identify:t=>t==null,createNode:()=>new Fg.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Fg.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&qg.test.test(t)?t:e.options.nullStr};Dg.nullTag=qg});var Bc=w(Ug=>{"use strict";var Tk=je(),jg={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Tk.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},i){if(t&&jg.test.test(t)){let r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?i.options.trueStr:i.options.falseStr}};Ug.boolTag=jg});var jr=w($g=>{"use strict";function Ak({format:t,minFractionDigits:e,tag:i,value:r}){if(typeof r=="bigint")return String(r);let n=typeof r=="number"?r:Number(r);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}$g.stringifyNumber=Ak});var Pc=w(So=>{"use strict";var Ik=je(),Rc=jr(),Nk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Rc.stringifyNumber},Lk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Rc.stringifyNumber(t)}},Bk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new Ik.Scalar(parseFloat(t)),i=t.indexOf(".");return i!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-i-1),e},stringify:Rc.stringifyNumber};So.float=Bk;So.floatExp=Lk;So.floatNaN=Nk});var Fc=w(ko=>{"use strict";var Vg=jr(),Eo=t=>typeof t=="bigint"||Number.isInteger(t),Mc=(t,e,i,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),i);function Hg(t,e,i){let{value:r}=t;return Eo(r)&&r>=0?i+r.toString(e):Vg.stringifyNumber(t)}var Rk={identify:t=>Eo(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,i)=>Mc(t,2,8,i),stringify:t=>Hg(t,8,"0o")},Pk={identify:Eo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,i)=>Mc(t,0,10,i),stringify:Vg.stringifyNumber},Mk={identify:t=>Eo(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,i)=>Mc(t,2,16,i),stringify:t=>Hg(t,16,"0x")};ko.int=Pk;ko.intHex=Mk;ko.intOct=Rk});var Yg=w(Gg=>{"use strict";var Fk=qr(),qk=xo(),Dk=Dr(),jk=Cn(),Uk=Bc(),qc=Pc(),Dc=Fc(),$k=[Fk.map,Dk.seq,jk.string,qk.nullTag,Uk.boolTag,Dc.intOct,Dc.int,Dc.intHex,qc.floatNaN,qc.floatExp,qc.float];Gg.schema=$k});var Kg=w(zg=>{"use strict";var Vk=je(),Hk=qr(),Gk=Dr();function Wg(t){return typeof t=="bigint"||Number.isInteger(t)}var Oo=({value:t})=>JSON.stringify(t),Yk=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Oo},{identify:t=>t==null,createNode:()=>new Vk.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Oo},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Oo},{identify:Wg,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:i})=>i?BigInt(t):parseInt(t,10),stringify:({value:t})=>Wg(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Oo}],Wk={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},zk=[Hk.map,Gk.seq].concat(Yk,Wk);zg.schema=zk});var Uc=w(Jg=>{"use strict";var jc=je(),Kk=xn(),Jk={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Buffer=="function")return Buffer.from(t,"base64");if(typeof atob=="function"){let i=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(i.length);for(let n=0;n{"use strict";var Co=Se(),$c=wi(),Zk=je(),Qk=Ei();function Zg(t,e){var i;if(Co.isSeq(t))for(let r=0;r1&&e("Each pair must have its own sequence indicator");let s=n.items[0]||new $c.Pair(new Zk.Scalar(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore} +${n}${g}`}else return`${d}${o}${f.join(" ")}${o}${g}`}function yo({indent:t,options:{commentString:e}},i,r,n){if(r&&n&&(r=r.replace(/^\n+/,"")),r){let s=vo.indentComment(e(r),t);i.push(s.trimStart())}}Eg.stringifyCollection=QE});var Si=_(Ic=>{"use strict";var tk=Tc(),ik=Oc(),rk=no(),xi=Se(),bo=wi(),nk=De();function kn(t,e){let i=xi.isScalar(e)?e.value:e;for(let r of t)if(xi.isPair(r)&&(r.key===e||r.key===i||xi.isScalar(r.key)&&r.key.value===i))return r}var Ac=class extends rk.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(xi.MAP,e),this.items=[]}static from(e,i,r){let{keepUndefined:n,replacer:s}=r,o=new this(e),a=(l,c)=>{if(typeof s=="function")c=s.call(i,l,c);else if(Array.isArray(s)&&!s.includes(l))return;(c!==void 0||n)&&o.items.push(bo.createPair(l,c,r))};if(i instanceof Map)for(let[l,c]of i)a(l,c);else if(i&&typeof i=="object")for(let l of Object.keys(i))a(l,i[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,i){var o;let r;xi.isPair(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new bo.Pair(e,e==null?void 0:e.value):r=new bo.Pair(e.key,e.value);let n=kn(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(n){if(!i)throw new Error(`Key ${r.key} already set`);xi.isScalar(n.value)&&nk.isScalarValue(r.value)?n.value.value=r.value:n.value=r.value}else if(s){let a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(e){let i=kn(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){var s;let r=kn(this.items,e),n=r==null?void 0:r.value;return(s=!i&&xi.isScalar(n)?n.value:n)!=null?s:void 0}has(e){return!!kn(this.items,e)}set(e,i){this.add(new bo.Pair(e,i),!0)}toJSON(e,i,r){let n=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(n);for(let s of this.items)ik.addPairToJSMap(i,n,s);return n}toString(e,i,r){if(!e)return JSON.stringify(this);for(let n of this.items)if(!xi.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),tk.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:i})}};Ic.YAMLMap=Ac;Ic.findPair=kn});var Fr=_(Og=>{"use strict";var sk=Se(),kg=Si(),ok={collection:"map",default:!0,nodeClass:kg.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return sk.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,i)=>kg.YAMLMap.from(t,e,i)};Og.map=ok});var Ei=_(Cg=>{"use strict";var ak=vn(),lk=Tc(),ck=no(),wo=Se(),uk=De(),fk=vi(),Nc=class extends ck.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(wo.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let i=_o(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){let r=_o(e);if(typeof r!="number")return;let n=this.items[r];return!i&&wo.isScalar(n)?n.value:n}has(e){let i=_o(e);return typeof i=="number"&&i=0?e:null}Cg.YAMLSeq=Nc});var qr=_(Ag=>{"use strict";var hk=Se(),Tg=Ei(),pk={collection:"seq",default:!0,nodeClass:Tg.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return hk.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,i)=>Tg.YAMLSeq.from(t,e,i)};Ag.seq=pk});var On=_(Ig=>{"use strict";var dk=wn(),mk={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,i,r){return e=Object.assign({actualString:!0},e),dk.stringifyString(t,e,i,r)}};Ig.string=mk});var xo=_(Bg=>{"use strict";var Ng=De(),Lg={identify:t=>t==null,createNode:()=>new Ng.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ng.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&Lg.test.test(t)?t:e.options.nullStr};Bg.nullTag=Lg});var Lc=_(Pg=>{"use strict";var gk=De(),Rg={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new gk.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},i){if(t&&Rg.test.test(t)){let r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?i.options.trueStr:i.options.falseStr}};Pg.boolTag=Rg});var Dr=_(Mg=>{"use strict";function vk({format:t,minFractionDigits:e,tag:i,value:r}){if(typeof r=="bigint")return String(r);let n=typeof r=="number"?r:Number(r);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let o=s.indexOf(".");o<0&&(o=s.length,s+=".");let a=e-(s.length-o-1);for(;a-- >0;)s+="0"}return s}Mg.stringifyNumber=vk});var Rc=_(So=>{"use strict";var yk=De(),Bc=Dr(),bk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Bc.stringifyNumber},_k={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Bc.stringifyNumber(t)}},wk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new yk.Scalar(parseFloat(t)),i=t.indexOf(".");return i!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-i-1),e},stringify:Bc.stringifyNumber};So.float=wk;So.floatExp=_k;So.floatNaN=bk});var Mc=_(ko=>{"use strict";var Fg=Dr(),Eo=t=>typeof t=="bigint"||Number.isInteger(t),Pc=(t,e,i,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),i);function qg(t,e,i){let{value:r}=t;return Eo(r)&&r>=0?i+r.toString(e):Fg.stringifyNumber(t)}var xk={identify:t=>Eo(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,i)=>Pc(t,2,8,i),stringify:t=>qg(t,8,"0o")},Sk={identify:Eo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,i)=>Pc(t,0,10,i),stringify:Fg.stringifyNumber},Ek={identify:t=>Eo(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,i)=>Pc(t,2,16,i),stringify:t=>qg(t,16,"0x")};ko.int=Sk;ko.intHex=Ek;ko.intOct=xk});var jg=_(Dg=>{"use strict";var kk=Fr(),Ok=xo(),Ck=qr(),Tk=On(),Ak=Lc(),Fc=Rc(),qc=Mc(),Ik=[kk.map,Ck.seq,Tk.string,Ok.nullTag,Ak.boolTag,qc.intOct,qc.int,qc.intHex,Fc.floatNaN,Fc.floatExp,Fc.float];Dg.schema=Ik});var Vg=_($g=>{"use strict";var Nk=De(),Lk=Fr(),Bk=qr();function Ug(t){return typeof t=="bigint"||Number.isInteger(t)}var Oo=({value:t})=>JSON.stringify(t),Rk=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Oo},{identify:t=>t==null,createNode:()=>new Nk.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Oo},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Oo},{identify:Ug,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:i})=>i?BigInt(t):parseInt(t,10),stringify:({value:t})=>Ug(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Oo}],Pk={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Mk=[Lk.map,Bk.seq].concat(Rk,Pk);$g.schema=Mk});var jc=_(Hg=>{"use strict";var Dc=De(),Fk=wn(),qk={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Buffer=="function")return Buffer.from(t,"base64");if(typeof atob=="function"){let i=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(i.length);for(let n=0;n{"use strict";var Co=Se(),Uc=wi(),Dk=De(),jk=Ei();function Gg(t,e){var i;if(Co.isSeq(t))for(let r=0;r1&&e("Each pair must have its own sequence indicator");let s=n.items[0]||new Uc.Pair(new Dk.Scalar(null));if(n.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${n.commentBefore} ${s.key.commentBefore}`:n.commentBefore),n.comment){let o=(i=s.value)!=null?i:s.key;o.comment=o.comment?`${n.comment} -${o.comment}`:n.comment}n=s}t.items[r]=Co.isPair(n)?n:new $c.Pair(n)}}else e("Expected a sequence for this tag");return t}function Qg(t,e,i){let{replacer:r}=i,n=new Qk.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push($c.createPair(a,l,i))}return n}var Xk={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Zg,createNode:Qg};To.createPairs=Qg;To.pairs=Xk;To.resolvePairs=Zg});var Gc=w(Hc=>{"use strict";var Xg=Se(),Vc=vi(),Tn=Si(),eO=Ei(),e0=Ao(),Qi=class t extends eO.YAMLSeq{constructor(){super(),this.add=Tn.YAMLMap.prototype.add.bind(this),this.delete=Tn.YAMLMap.prototype.delete.bind(this),this.get=Tn.YAMLMap.prototype.get.bind(this),this.has=Tn.YAMLMap.prototype.has.bind(this),this.set=Tn.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,i){if(!i)return super.toJSON(e);let r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(let n of this.items){let s,o;if(Xg.isPair(n)?(s=Vc.toJS(n.key,"",i),o=Vc.toJS(n.value,s,i)):s=Vc.toJS(n,"",i),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,i,r){let n=e0.createPairs(e,i,r),s=new this;return s.items=n.items,s}};Qi.tag="tag:yaml.org,2002:omap";var tO={collection:"seq",identify:t=>t instanceof Map,nodeClass:Qi,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let i=e0.resolvePairs(t,e),r=[];for(let{key:n}of i.items)Xg.isScalar(n)&&(r.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):r.push(n.value));return Object.assign(new Qi,i)},createNode:(t,e,i)=>Qi.from(t,e,i)};Hc.YAMLOMap=Qi;Hc.omap=tO});var s0=w(Yc=>{"use strict";var t0=je();function i0({value:t,source:e},i){return e&&(t?r0:n0).test.test(e)?e:t?i.options.trueStr:i.options.falseStr}var r0={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new t0.Scalar(!0),stringify:i0},n0={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new t0.Scalar(!1),stringify:i0};Yc.falseTag=n0;Yc.trueTag=r0});var o0=w(Io=>{"use strict";var iO=je(),Wc=jr(),rO={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Wc.stringifyNumber},nO={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Wc.stringifyNumber(t)}},sO={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new iO.Scalar(parseFloat(t.replace(/_/g,""))),i=t.indexOf(".");if(i!==-1){let r=t.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Wc.stringifyNumber};Io.float=sO;Io.floatExp=nO;Io.floatNaN=rO});var l0=w(In=>{"use strict";var a0=jr(),An=t=>typeof t=="bigint"||Number.isInteger(t);function No(t,e,i,{intAsBigInt:r}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(i){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return n==="-"?BigInt(-1)*o:o}let s=parseInt(t,i);return n==="-"?-1*s:s}function zc(t,e,i){let{value:r}=t;if(An(r)){let n=r.toString(e);return r<0?"-"+i+n.substr(1):i+n}return a0.stringifyNumber(t)}var oO={identify:An,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,i)=>No(t,2,2,i),stringify:t=>zc(t,2,"0b")},aO={identify:An,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,i)=>No(t,1,8,i),stringify:t=>zc(t,8,"0")},lO={identify:An,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,i)=>No(t,0,10,i),stringify:a0.stringifyNumber},cO={identify:An,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,i)=>No(t,2,16,i),stringify:t=>zc(t,16,"0x")};In.int=lO;In.intBin=oO;In.intHex=cO;In.intOct=aO});var Jc=w(Kc=>{"use strict";var Ro=Se(),Lo=wi(),Bo=Si(),Xi=class t extends Bo.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let i;Ro.isPair(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new Lo.Pair(e.key,null):i=new Lo.Pair(e,null),Bo.findPair(this.items,i.key)||this.items.push(i)}get(e,i){let r=Bo.findPair(this.items,e);return!i&&Ro.isPair(r)?Ro.isScalar(r.key)?r.key.value:r.key:r}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);let r=Bo.findPair(this.items,e);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new Lo.Pair(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(e,i,r){let{replacer:n}=r,s=new this(e);if(i&&Symbol.iterator in Object(i))for(let o of i)typeof n=="function"&&(o=n.call(i,o,o)),s.items.push(Lo.createPair(o,null,r));return s}};Xi.tag="tag:yaml.org,2002:set";var uO={collection:"map",identify:t=>t instanceof Set,nodeClass:Xi,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,i)=>Xi.from(t,e,i),resolve(t,e){if(Ro.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Xi,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};Kc.YAMLSet=Xi;Kc.set=uO});var Qc=w(Po=>{"use strict";var fO=jr();function Zc(t,e){let i=t[0],r=i==="-"||i==="+"?t.substring(1):t,n=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return i==="-"?n(-1)*s:s}function c0(t){let{value:e}=t,i=o=>o;if(typeof e=="bigint")i=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return fO.stringifyNumber(t);let r="";e<0&&(r="-",e*=i(-1));let n=i(60),s=[e%n];return e<60?s.unshift(0):(e=(e-s[0])/n,s.unshift(e%n),e>=60&&(e=(e-s[0])/n,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var hO={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:i})=>Zc(t,i),stringify:c0},pO={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Zc(t,!1),stringify:c0},u0={identify:t=>t 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(t){let e=t.match(u0.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,i,r,n,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(i,r-1,n,s||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Zc(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};Po.floatTime=pO;Po.intTime=hO;Po.timestamp=u0});var p0=w(h0=>{"use strict";var dO=qr(),mO=xo(),gO=Dr(),vO=Cn(),yO=Uc(),f0=s0(),Xc=o0(),Mo=l0(),bO=po(),_O=Gc(),wO=Ao(),xO=Jc(),eu=Qc(),SO=[dO.map,gO.seq,vO.string,mO.nullTag,f0.trueTag,f0.falseTag,Mo.intBin,Mo.intOct,Mo.int,Mo.intHex,Xc.floatNaN,Xc.floatExp,Xc.float,yO.binary,bO.merge,_O.omap,wO.pairs,xO.set,eu.intTime,eu.floatTime,eu.timestamp];h0.schema=SO});var S0=w(ru=>{"use strict";var v0=qr(),EO=xo(),y0=Dr(),kO=Cn(),OO=Bc(),tu=Pc(),iu=Fc(),CO=Yg(),TO=Kg(),b0=Uc(),Nn=po(),_0=Gc(),w0=Ao(),d0=p0(),x0=Jc(),Fo=Qc(),m0=new Map([["core",CO.schema],["failsafe",[v0.map,y0.seq,kO.string]],["json",TO.schema],["yaml11",d0.schema],["yaml-1.1",d0.schema]]),g0={binary:b0.binary,bool:OO.boolTag,float:tu.float,floatExp:tu.floatExp,floatNaN:tu.floatNaN,floatTime:Fo.floatTime,int:iu.int,intHex:iu.intHex,intOct:iu.intOct,intTime:Fo.intTime,map:v0.map,merge:Nn.merge,null:EO.nullTag,omap:_0.omap,pairs:w0.pairs,seq:y0.seq,set:x0.set,timestamp:Fo.timestamp},AO={"tag:yaml.org,2002:binary":b0.binary,"tag:yaml.org,2002:merge":Nn.merge,"tag:yaml.org,2002:omap":_0.omap,"tag:yaml.org,2002:pairs":w0.pairs,"tag:yaml.org,2002:set":x0.set,"tag:yaml.org,2002:timestamp":Fo.timestamp};function IO(t,e,i){let r=m0.get(e);if(r&&!t)return i&&!r.includes(Nn.merge)?r.concat(Nn.merge):r.slice();let n=r;if(!n)if(Array.isArray(t))n=[];else{let s=Array.from(m0.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)n=n.concat(s);else typeof t=="function"&&(n=t(n.slice()));return i&&(n=n.concat(Nn.merge)),n.reduce((s,o)=>{let a=typeof o=="string"?g0[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(g0).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}ru.coreKnownTags=AO;ru.getTags=IO});var ou=w(E0=>{"use strict";var nu=Se(),NO=qr(),LO=Dr(),BO=Cn(),qo=S0(),RO=(t,e)=>t.keye.key?1:0,su=class t{constructor({compat:e,customTags:i,merge:r,resolveKnownTags:n,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?qo.getTags(e,"compat"):e?qo.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?qo.coreKnownTags:{},this.tags=qo.getTags(i,this.name,r),this.toStringOptions=a!=null?a:null,Object.defineProperty(this,nu.MAP,{value:NO.map}),Object.defineProperty(this,nu.SCALAR,{value:BO.string}),Object.defineProperty(this,nu.SEQ,{value:LO.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?RO:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};E0.Schema=su});var O0=w(k0=>{"use strict";var PO=Se(),au=Sn(),Ln=bn();function MO(t,e){var l;let i=[],r=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(i.push(c),r=!0):t.directives.docStart&&(r=!0)}r&&i.push("---");let n=au.createStringifyContext(t,e),{commentString:s}=n.options;if(t.commentBefore){i.length!==1&&i.unshift("");let c=s(t.commentBefore);i.unshift(Ln.indentComment(c,""))}let o=!1,a=null;if(t.contents){if(PO.isNode(t.contents)){if(t.contents.spaceBefore&&r&&i.push(""),t.contents.commentBefore){let f=s(t.contents.commentBefore);i.push(Ln.indentComment(f,""))}n.forceBlockIndent=!!t.comment,a=t.contents.comment}let c=a?void 0:()=>o=!0,u=au.stringify(t.contents,n,()=>a=null,c);a&&(u+=Ln.lineComment(u,"",s(a))),(u[0]==="|"||u[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${u}`:i.push(u)}else i.push(au.stringify(t.contents,n));if((l=t.directives)!=null&&l.docEnd)if(t.comment){let c=s(t.comment);c.includes(` -`)?(i.push("..."),i.push(Ln.indentComment(c,""))):i.push(`... ${c}`)}else i.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&i[i.length-1]!==""&&i.push(""),i.push(Ln.indentComment(s(c),"")))}return i.join(` +${o.comment}`:n.comment}n=s}t.items[r]=Co.isPair(n)?n:new Uc.Pair(n)}}else e("Expected a sequence for this tag");return t}function Yg(t,e,i){let{replacer:r}=i,n=new jk.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(Uc.createPair(a,l,i))}return n}var Uk={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Gg,createNode:Yg};To.createPairs=Yg;To.pairs=Uk;To.resolvePairs=Gg});var Hc=_(Vc=>{"use strict";var Wg=Se(),$c=vi(),Cn=Si(),$k=Ei(),Kg=Ao(),Qi=class t extends $k.YAMLSeq{constructor(){super(),this.add=Cn.YAMLMap.prototype.add.bind(this),this.delete=Cn.YAMLMap.prototype.delete.bind(this),this.get=Cn.YAMLMap.prototype.get.bind(this),this.has=Cn.YAMLMap.prototype.has.bind(this),this.set=Cn.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,i){if(!i)return super.toJSON(e);let r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(let n of this.items){let s,o;if(Wg.isPair(n)?(s=$c.toJS(n.key,"",i),o=$c.toJS(n.value,s,i)):s=$c.toJS(n,"",i),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,o)}return r}static from(e,i,r){let n=Kg.createPairs(e,i,r),s=new this;return s.items=n.items,s}};Qi.tag="tag:yaml.org,2002:omap";var Vk={collection:"seq",identify:t=>t instanceof Map,nodeClass:Qi,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let i=Kg.resolvePairs(t,e),r=[];for(let{key:n}of i.items)Wg.isScalar(n)&&(r.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):r.push(n.value));return Object.assign(new Qi,i)},createNode:(t,e,i)=>Qi.from(t,e,i)};Vc.YAMLOMap=Qi;Vc.omap=Vk});var Xg=_(Gc=>{"use strict";var zg=De();function Jg({value:t,source:e},i){return e&&(t?Zg:Qg).test.test(e)?e:t?i.options.trueStr:i.options.falseStr}var Zg={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new zg.Scalar(!0),stringify:Jg},Qg={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new zg.Scalar(!1),stringify:Jg};Gc.falseTag=Qg;Gc.trueTag=Zg});var e0=_(Io=>{"use strict";var Hk=De(),Yc=Dr(),Gk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Yc.stringifyNumber},Yk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Yc.stringifyNumber(t)}},Wk={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new Hk.Scalar(parseFloat(t.replace(/_/g,""))),i=t.indexOf(".");if(i!==-1){let r=t.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:Yc.stringifyNumber};Io.float=Wk;Io.floatExp=Yk;Io.floatNaN=Gk});var i0=_(An=>{"use strict";var t0=Dr(),Tn=t=>typeof t=="bigint"||Number.isInteger(t);function No(t,e,i,{intAsBigInt:r}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(i){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return n==="-"?BigInt(-1)*o:o}let s=parseInt(t,i);return n==="-"?-1*s:s}function Wc(t,e,i){let{value:r}=t;if(Tn(r)){let n=r.toString(e);return r<0?"-"+i+n.substr(1):i+n}return t0.stringifyNumber(t)}var Kk={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,i)=>No(t,2,2,i),stringify:t=>Wc(t,2,"0b")},zk={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,i)=>No(t,1,8,i),stringify:t=>Wc(t,8,"0")},Jk={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,i)=>No(t,0,10,i),stringify:t0.stringifyNumber},Zk={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,i)=>No(t,2,16,i),stringify:t=>Wc(t,16,"0x")};An.int=Jk;An.intBin=Kk;An.intHex=Zk;An.intOct=zk});var zc=_(Kc=>{"use strict";var Ro=Se(),Lo=wi(),Bo=Si(),Xi=class t extends Bo.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let i;Ro.isPair(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new Lo.Pair(e.key,null):i=new Lo.Pair(e,null),Bo.findPair(this.items,i.key)||this.items.push(i)}get(e,i){let r=Bo.findPair(this.items,e);return!i&&Ro.isPair(r)?Ro.isScalar(r.key)?r.key.value:r.key:r}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);let r=Bo.findPair(this.items,e);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new Lo.Pair(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(e,i,r){let{replacer:n}=r,s=new this(e);if(i&&Symbol.iterator in Object(i))for(let o of i)typeof n=="function"&&(o=n.call(i,o,o)),s.items.push(Lo.createPair(o,null,r));return s}};Xi.tag="tag:yaml.org,2002:set";var Qk={collection:"map",identify:t=>t instanceof Set,nodeClass:Xi,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,i)=>Xi.from(t,e,i),resolve(t,e){if(Ro.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Xi,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};Kc.YAMLSet=Xi;Kc.set=Qk});var Zc=_(Po=>{"use strict";var Xk=Dr();function Jc(t,e){let i=t[0],r=i==="-"||i==="+"?t.substring(1):t,n=o=>e?BigInt(o):Number(o),s=r.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return i==="-"?n(-1)*s:s}function r0(t){let{value:e}=t,i=o=>o;if(typeof e=="bigint")i=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Xk.stringifyNumber(t);let r="";e<0&&(r="-",e*=i(-1));let n=i(60),s=[e%n];return e<60?s.unshift(0):(e=(e-s[0])/n,s.unshift(e%n),e>=60&&(e=(e-s[0])/n,s.unshift(e))),r+s.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var eO={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:i})=>Jc(t,i),stringify:r0},tO={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Jc(t,!1),stringify:r0},n0={identify:t=>t 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(t){let e=t.match(n0.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,i,r,n,s,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(i,r-1,n,s||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Jc(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};Po.floatTime=tO;Po.intTime=eO;Po.timestamp=n0});var a0=_(o0=>{"use strict";var iO=Fr(),rO=xo(),nO=qr(),sO=On(),oO=jc(),s0=Xg(),Qc=e0(),Mo=i0(),aO=po(),lO=Hc(),cO=Ao(),uO=zc(),Xc=Zc(),fO=[iO.map,nO.seq,sO.string,rO.nullTag,s0.trueTag,s0.falseTag,Mo.intBin,Mo.intOct,Mo.int,Mo.intHex,Qc.floatNaN,Qc.floatExp,Qc.float,oO.binary,aO.merge,lO.omap,cO.pairs,uO.set,Xc.intTime,Xc.floatTime,Xc.timestamp];o0.schema=fO});var v0=_(iu=>{"use strict";var f0=Fr(),hO=xo(),h0=qr(),pO=On(),dO=Lc(),eu=Rc(),tu=Mc(),mO=jg(),gO=Vg(),p0=jc(),In=po(),d0=Hc(),m0=Ao(),l0=a0(),g0=zc(),Fo=Zc(),c0=new Map([["core",mO.schema],["failsafe",[f0.map,h0.seq,pO.string]],["json",gO.schema],["yaml11",l0.schema],["yaml-1.1",l0.schema]]),u0={binary:p0.binary,bool:dO.boolTag,float:eu.float,floatExp:eu.floatExp,floatNaN:eu.floatNaN,floatTime:Fo.floatTime,int:tu.int,intHex:tu.intHex,intOct:tu.intOct,intTime:Fo.intTime,map:f0.map,merge:In.merge,null:hO.nullTag,omap:d0.omap,pairs:m0.pairs,seq:h0.seq,set:g0.set,timestamp:Fo.timestamp},vO={"tag:yaml.org,2002:binary":p0.binary,"tag:yaml.org,2002:merge":In.merge,"tag:yaml.org,2002:omap":d0.omap,"tag:yaml.org,2002:pairs":m0.pairs,"tag:yaml.org,2002:set":g0.set,"tag:yaml.org,2002:timestamp":Fo.timestamp};function yO(t,e,i){let r=c0.get(e);if(r&&!t)return i&&!r.includes(In.merge)?r.concat(In.merge):r.slice();let n=r;if(!n)if(Array.isArray(t))n=[];else{let s=Array.from(c0.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)n=n.concat(s);else typeof t=="function"&&(n=t(n.slice()));return i&&(n=n.concat(In.merge)),n.reduce((s,o)=>{let a=typeof o=="string"?u0[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(u0).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(a)||s.push(a),s},[])}iu.coreKnownTags=vO;iu.getTags=yO});var su=_(y0=>{"use strict";var ru=Se(),bO=Fr(),_O=qr(),wO=On(),qo=v0(),xO=(t,e)=>t.keye.key?1:0,nu=class t{constructor({compat:e,customTags:i,merge:r,resolveKnownTags:n,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?qo.getTags(e,"compat"):e?qo.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?qo.coreKnownTags:{},this.tags=qo.getTags(i,this.name,r),this.toStringOptions=a!=null?a:null,Object.defineProperty(this,ru.MAP,{value:bO.map}),Object.defineProperty(this,ru.SCALAR,{value:wO.string}),Object.defineProperty(this,ru.SEQ,{value:_O.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?xO:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};y0.Schema=nu});var _0=_(b0=>{"use strict";var SO=Se(),ou=xn(),Nn=yn();function EO(t,e){var l;let i=[],r=e.directives===!0;if(e.directives!==!1&&t.directives){let c=t.directives.toString(t);c?(i.push(c),r=!0):t.directives.docStart&&(r=!0)}r&&i.push("---");let n=ou.createStringifyContext(t,e),{commentString:s}=n.options;if(t.commentBefore){i.length!==1&&i.unshift("");let c=s(t.commentBefore);i.unshift(Nn.indentComment(c,""))}let o=!1,a=null;if(t.contents){if(SO.isNode(t.contents)){if(t.contents.spaceBefore&&r&&i.push(""),t.contents.commentBefore){let f=s(t.contents.commentBefore);i.push(Nn.indentComment(f,""))}n.forceBlockIndent=!!t.comment,a=t.contents.comment}let c=a?void 0:()=>o=!0,u=ou.stringify(t.contents,n,()=>a=null,c);a&&(u+=Nn.lineComment(u,"",s(a))),(u[0]==="|"||u[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${u}`:i.push(u)}else i.push(ou.stringify(t.contents,n));if((l=t.directives)!=null&&l.docEnd)if(t.comment){let c=s(t.comment);c.includes(` +`)?(i.push("..."),i.push(Nn.indentComment(c,""))):i.push(`... ${c}`)}else i.push("...");else{let c=t.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||a)&&i[i.length-1]!==""&&i.push(""),i.push(Nn.indentComment(s(c),"")))}return i.join(` `)+` -`}k0.stringifyDocument=MO});var Bn=w(C0=>{"use strict";var FO=vn(),Ur=no(),At=Se(),qO=wi(),DO=vi(),jO=ou(),UO=O0(),lu=Xs(),$O=hc(),VO=yn(),cu=fc(),uu=class t{constructor(e,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,At.NODE_TYPE,{value:At.DOC});let n=null;typeof i=="function"||Array.isArray(i)?n=i:r===void 0&&i&&(r=i,i=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new cu.Directives({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(t.prototype,{[At.NODE_TYPE]:{value:At.DOC}});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=At.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){$r(this.contents)&&this.contents.add(e)}addIn(e,i){$r(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){let r=lu.anchorNames(this);e.anchor=!i||r.has(i)?lu.findNewAnchor(i||"a",r):i}return new FO.Alias(e.anchor)}createNode(e,i,r){let n;if(typeof i=="function")e=i.call({"":e},"",e),n=i;else if(Array.isArray(i)){let b=S=>typeof S=="number"||S instanceof String||S instanceof Number,_=i.filter(b).map(String);_.length>0&&(i=i.concat(_)),n=i}else r===void 0&&i&&(r=i,i=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r!=null?r:{},{onAnchor:f,setAnchors:d,sourceObjects:g}=lu.createNodeAnchors(this,o||"a"),m={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:g},v=VO.createNode(e,u,m);return a&&At.isCollection(v)&&(v.flow=!0),d(),v}createPair(e,i,r={}){let n=this.createNode(e,null,r),s=this.createNode(i,null,r);return new qO.Pair(n,s)}delete(e){return $r(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ur.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):$r(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return At.isCollection(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Ur.isEmptyPath(e)?!i&&At.isScalar(this.contents)?this.contents.value:this.contents:At.isCollection(this.contents)?this.contents.getIn(e,i):void 0}has(e){return At.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Ur.isEmptyPath(e)?this.contents!==void 0:At.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=Ur.collectionFromPath(this.schema,[e],i):$r(this.contents)&&this.contents.set(e,i)}setIn(e,i){Ur.isEmptyPath(e)?this.contents=i:this.contents==null?this.contents=Ur.collectionFromPath(this.schema,Array.from(e),i):$r(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new cu.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new cu.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new jO.Schema(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=DO.toJS(this.contents,i!=null?i:"",a);if(typeof s=="function")for(let{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?$O.applyReviver(o,{"":l},"",l):l}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)){let i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return UO.stringifyDocument(this,e)}};function $r(t){if(At.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}C0.Document=uu});var Mn=w(Pn=>{"use strict";var Rn=class extends Error{constructor(e,i,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=i}},fu=class extends Rn{constructor(e,i,r){super("YAMLParseError",e,i,r)}},hu=class extends Rn{constructor(e,i,r){super("YAMLWarning",e,i,r)}},HO=(t,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(a=>e.linePos(a));let{line:r,col:n}=i.linePos[0];i.message+=` at line ${r}, column ${n}`;let s=n-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="\u2026"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(o.substring(0,s))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`\u2026 +`}b0.stringifyDocument=EO});var Ln=_(w0=>{"use strict";var kO=gn(),jr=no(),It=Se(),OO=wi(),CO=vi(),TO=su(),AO=_0(),au=Xs(),IO=fc(),NO=vn(),lu=uc(),cu=class t{constructor(e,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,It.NODE_TYPE,{value:It.DOC});let n=null;typeof i=="function"||Array.isArray(i)?n=i:r===void 0&&i&&(r=i,i=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new lu.Directives({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,n,r)}clone(){let e=Object.create(t.prototype,{[It.NODE_TYPE]:{value:It.DOC}});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=It.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Ur(this.contents)&&this.contents.add(e)}addIn(e,i){Ur(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){let r=au.anchorNames(this);e.anchor=!i||r.has(i)?au.findNewAnchor(i||"a",r):i}return new kO.Alias(e.anchor)}createNode(e,i,r){let n;if(typeof i=="function")e=i.call({"":e},"",e),n=i;else if(Array.isArray(i)){let b=E=>typeof E=="number"||E instanceof String||E instanceof Number,x=i.filter(b).map(String);x.length>0&&(i=i.concat(x)),n=i}else r===void 0&&i&&(r=i,i=void 0);let{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=r!=null?r:{},{onAnchor:f,setAnchors:d,sourceObjects:g}=au.createNodeAnchors(this,o||"a"),m={aliasDuplicateObjects:s!=null?s:!0,keepUndefined:l!=null?l:!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:g},y=NO.createNode(e,u,m);return a&&It.isCollection(y)&&(y.flow=!0),d(),y}createPair(e,i,r={}){let n=this.createNode(e,null,r),s=this.createNode(i,null,r);return new OO.Pair(n,s)}delete(e){return Ur(this.contents)?this.contents.delete(e):!1}deleteIn(e){return jr.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Ur(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return It.isCollection(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return jr.isEmptyPath(e)?!i&&It.isScalar(this.contents)?this.contents.value:this.contents:It.isCollection(this.contents)?this.contents.getIn(e,i):void 0}has(e){return It.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return jr.isEmptyPath(e)?this.contents!==void 0:It.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=jr.collectionFromPath(this.schema,[e],i):Ur(this.contents)&&this.contents.set(e,i)}setIn(e,i){jr.isEmptyPath(e)?this.contents=i:this.contents==null?this.contents=jr.collectionFromPath(this.schema,Array.from(e),i):Ur(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new lu.Directives({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new lu.Directives({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new TO.Schema(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=CO.toJS(this.contents,i!=null?i:"",a);if(typeof s=="function")for(let{count:c,res:u}of a.anchors.values())s(u,c);return typeof o=="function"?IO.applyReviver(o,{"":l},"",l):l}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)){let i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return AO.stringifyDocument(this,e)}};function Ur(t){if(It.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}w0.Document=cu});var Pn=_(Rn=>{"use strict";var Bn=class extends Error{constructor(e,i,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=i}},uu=class extends Bn{constructor(e,i,r){super("YAMLParseError",e,i,r)}},fu=class extends Bn{constructor(e,i,r){super("YAMLWarning",e,i,r)}},LO=(t,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(a=>e.linePos(a));let{line:r,col:n}=i.linePos[0];i.message+=` at line ${r}, column ${n}`;let s=n-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&o.length>80){let a=Math.min(s-39,o.length-79);o="\u2026"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),r>1&&/^ *$/.test(o.substring(0,s))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`\u2026 `),o=a+o}if(/[^ ]/.test(o)){let a=1,l=i.linePos[1];l&&l.line===r&&l.col>n&&(a=Math.max(1,Math.min(l.col-n,80-s)));let c=" ".repeat(s)+"^".repeat(a);i.message+=`: ${o} ${c} -`}};Pn.YAMLError=Rn;Pn.YAMLParseError=fu;Pn.YAMLWarning=hu;Pn.prettifyError=HO});var Fn=w(T0=>{"use strict";function GO(t,{flow:e,indicator:i,next:r,offset:n,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",g=!1,m=!1,v=null,b=null,_=null,S=null,O=null,k=null,E=null;for(let A of t)switch(m&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),v&&(c&&A.type!=="comment"&&A.type!=="newline"&&s(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),v=null),A.type){case"space":!e&&(i!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&A.source.includes(" ")&&(v=A),u=!0;break;case"comment":{u||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=A.source.substring(1)||" ";f?f+=d+C:f=C,d="",c=!1;break}case"newline":c?f?f+=A.source:l=!0:d+=A.source,c=!0,g=!0,(b||_)&&(S=A),u=!0;break;case"anchor":b&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=A,E===null&&(E=A.offset),c=!1,u=!1,m=!0;break;case"tag":{_&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),_=A,E===null&&(E=A.offset),c=!1,u=!1,m=!0;break}case i:(b||_)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),k&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e!=null?e:"collection"}`),k=A,c=i==="seq-item-ind"||i==="explicit-key-ind",u=!1;break;case"comma":if(e){O&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),O=A,c=!1,u=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}let R=t[t.length-1],T=R?R.offset+R.source.length:n;return m&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v&&(c&&v.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:O,found:k,spaceBefore:l,comment:f,hasNewline:g,anchor:b,tag:_,newlineAfterProp:S,end:T,start:E!=null?E:T}}T0.resolveProps=GO});var Do=w(A0=>{"use strict";function pu(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(` -`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let i of e.start)if(i.type==="newline")return!0;if(e.sep){for(let i of e.sep)if(i.type==="newline")return!0}if(pu(e.key)||pu(e.value))return!0}return!1;default:return!0}}A0.containsNewline=pu});var du=w(I0=>{"use strict";var YO=Do();function WO(t,e,i){if((e==null?void 0:e.type)==="flow-collection"){let r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&YO.containsNewline(e)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}I0.flowIndentCheck=WO});var mu=w(L0=>{"use strict";var N0=Se();function zO(t,e,i){let{uniqueKeys:r}=t.options;if(r===!1)return!1;let n=typeof r=="function"?r:(s,o)=>s===o||N0.isScalar(s)&&N0.isScalar(o)&&s.value===o.value;return e.some(s=>n(s.key,i))}L0.mapIncludes=zO});var q0=w(F0=>{"use strict";var B0=wi(),KO=Si(),R0=Fn(),JO=Do(),P0=du(),ZO=mu(),M0="All mapping items must start at the same column";function QO({composeNode:t,composeEmptyNode:e},i,r,n,s){var u,f;let o=(u=s==null?void 0:s.nodeClass)!=null?u:KO.YAMLMap,a=new o(i.schema);i.atRoot&&(i.atRoot=!1);let l=r.offset,c=null;for(let d of r.items){let{start:g,key:m,sep:v,value:b}=d,_=R0.resolveProps(g,{indicator:"explicit-key-ind",next:m!=null?m:v==null?void 0:v[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),S=!_.found;if(S){if(m&&(m.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==r.indent&&n(l,"BAD_INDENT",M0)),!_.anchor&&!_.tag&&!v){c=_.end,_.comment&&(a.comment?a.comment+=` -`+_.comment:a.comment=_.comment);continue}(_.newlineAfterProp||JO.containsNewline(m))&&n(m!=null?m:g[g.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=_.found)==null?void 0:f.indent)!==r.indent&&n(l,"BAD_INDENT",M0);i.atKey=!0;let O=_.end,k=m?t(i,m,_,n):e(i,O,g,null,_,n);i.schema.compat&&P0.flowIndentCheck(r.indent,m,n),i.atKey=!1,ZO.mapIncludes(i,a.items,k)&&n(O,"DUPLICATE_KEY","Map keys must be unique");let E=R0.resolveProps(v!=null?v:[],{indicator:"map-value-ind",next:b,offset:k.range[2],onError:n,parentIndent:r.indent,startOnNewline:!m||m.type==="block-scalar"});if(l=E.end,E.found){S&&((b==null?void 0:b.type)==="block-map"&&!E.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&_.start{"use strict";var XO=Ei(),eC=Fn(),tC=du();function iC({composeNode:t,composeEmptyNode:e},i,r,n,s){var u;let o=(u=s==null?void 0:s.nodeClass)!=null?u:XO.YAMLSeq,a=new o(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=r.offset,c=null;for(let{start:f,value:d}of r.items){let g=eC.resolveProps(f,{indicator:"seq-item-ind",next:d,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!g.found)if(g.anchor||g.tag||d)d&&d.type==="block-seq"?n(g.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=g.end,g.comment&&(a.comment=g.comment);continue}let m=d?t(i,d,g,n):e(i,g.end,f,null,g,n);i.schema.compat&&tC.flowIndentCheck(r.indent,d,n),l=m.range[2],a.items.push(m)}return a.range=[r.offset,l,c!=null?c:l],a}D0.resolveBlockSeq=iC});var Vr=w(U0=>{"use strict";function rC(t,e,i,r){let n="";if(t){let s=!1,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{i&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=o+u:n=u,o="";break}case"newline":n&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}U0.resolveEnd=rC});var G0=w(H0=>{"use strict";var nC=Se(),sC=wi(),$0=Si(),oC=Ei(),aC=Vr(),V0=Fn(),lC=Do(),cC=mu(),gu="Block collections are not allowed within flow collections",vu=t=>t&&(t.type==="block-map"||t.type==="block-seq");function uC({composeNode:t,composeEmptyNode:e},i,r,n,s){var b,_;let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=(b=s==null?void 0:s.nodeClass)!=null?b:o?$0.YAMLMap:oC.YAMLSeq,c=new l(i.schema);c.flow=!0;let u=i.atRoot;u&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let f=r.offset+r.start.source.length;for(let S=0;S0){let S=aC.resolveEnd(m,v,i.options.strict,n);S.comment&&(c.comment?c.comment+=` -`+S.comment:c.comment=S.comment),c.range=[r.offset,v,S.offset]}else c.range=[r.offset,v,v];return c}H0.resolveFlowCollection=uC});var W0=w(Y0=>{"use strict";var fC=Se(),hC=je(),pC=Si(),dC=Ei(),mC=q0(),gC=j0(),vC=G0();function yu(t,e,i,r,n,s){let o=i.type==="block-map"?mC.resolveBlockMap(t,e,i,r,s):i.type==="block-seq"?gC.resolveBlockSeq(t,e,i,r,s):vC.resolveFlowCollection(t,e,i,r,s),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function yC(t,e,i,r,n){var d,g;let s=r.tag,o=s?e.directives.tagName(s.source,m=>n(s,"TAG_RESOLVE_FAILED",m)):null;if(i.type==="block-seq"){let{anchor:m,newlineAfterProp:v}=r,b=m&&s?m.offset>s.offset?m:s:m!=null?m:s;b&&(!v||v.offsetm.tag===o&&m.collection===a);if(!l){let m=e.schema.knownTags[o];if(m&&m.collection===a)e.schema.tags.push(Object.assign({},m,{default:!1})),l=m;else return m!=null&&m.collection?n(s,"BAD_COLLECTION_TYPE",`${m.tag} used for ${a} collection, but expects ${m.collection}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),yu(t,e,i,n,o)}let c=yu(t,e,i,n,o,l),u=(g=(d=l.resolve)==null?void 0:d.call(l,c,m=>n(s,"TAG_RESOLVE_FAILED",m),e.options))!=null?g:c,f=fC.isNode(u)?u:new hC.Scalar(u);return f.range=c.range,f.tag=o,l!=null&&l.format&&(f.format=l.format),f}Y0.composeCollection=yC});var _u=w(z0=>{"use strict";var bu=je();function bC(t,e,i){let r=e.offset,n=_C(e,t.options.strict,i);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let s=n.mode===">"?bu.Scalar.BLOCK_FOLDED:bu.Scalar.BLOCK_LITERAL,o=e.source?wC(e.source):[],a=o.length;for(let v=o.length-1;v>=0;--v){let b=o[v][1];if(b===""||b==="\r")a=v;else break}if(a===0){let v=n.chomp==="+"&&o.length>0?` -`.repeat(Math.max(1,o.length-1)):"",b=r+n.length;return e.source&&(b+=e.source.length),{value:v,type:s,comment:n.comment,range:[r,b,b]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let v=0;vl&&(l=b.length);else{if(b.length=a;--v)o[v][0].length>l&&(a=v+1);let f="",d="",g=!1;for(let v=0;vl||_[0]===" "?(d===" "?d=` +`}};Rn.YAMLError=Bn;Rn.YAMLParseError=uu;Rn.YAMLWarning=fu;Rn.prettifyError=LO});var Mn=_(x0=>{"use strict";function BO(t,{flow:e,indicator:i,next:r,offset:n,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",g=!1,m=!1,y=null,b=null,x=null,E=null,O=null,k=null,S=null;for(let A of t)switch(m&&(A.type!=="space"&&A.type!=="newline"&&A.type!=="comma"&&s(A.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m=!1),y&&(c&&A.type!=="comment"&&A.type!=="newline"&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),A.type){case"space":!e&&(i!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&A.source.includes(" ")&&(y=A),u=!0;break;case"comment":{u||s(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=A.source.substring(1)||" ";f?f+=d+C:f=C,d="",c=!1;break}case"newline":c?f?f+=A.source:l=!0:d+=A.source,c=!0,g=!0,(b||x)&&(E=A),u=!0;break;case"anchor":b&&s(A,"MULTIPLE_ANCHORS","A node can have at most one anchor"),A.source.endsWith(":")&&s(A.offset+A.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=A,S===null&&(S=A.offset),c=!1,u=!1,m=!0;break;case"tag":{x&&s(A,"MULTIPLE_TAGS","A node can have at most one tag"),x=A,S===null&&(S=A.offset),c=!1,u=!1,m=!0;break}case i:(b||x)&&s(A,"BAD_PROP_ORDER",`Anchors and tags must be after the ${A.source} indicator`),k&&s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.source} in ${e!=null?e:"collection"}`),k=A,c=i==="seq-item-ind"||i==="explicit-key-ind",u=!1;break;case"comma":if(e){O&&s(A,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),O=A,c=!1,u=!1;break}default:s(A,"UNEXPECTED_TOKEN",`Unexpected ${A.type} token`),c=!1,u=!1}let R=t[t.length-1],T=R?R.offset+R.source.length:n;return m&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&s(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(c&&y.indent<=o||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:O,found:k,spaceBefore:l,comment:f,hasNewline:g,anchor:b,tag:x,newlineAfterProp:E,end:T,start:S!=null?S:T}}x0.resolveProps=BO});var Do=_(S0=>{"use strict";function hu(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(` +`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let i of e.start)if(i.type==="newline")return!0;if(e.sep){for(let i of e.sep)if(i.type==="newline")return!0}if(hu(e.key)||hu(e.value))return!0}return!1;default:return!0}}S0.containsNewline=hu});var pu=_(E0=>{"use strict";var RO=Do();function PO(t,e,i){if((e==null?void 0:e.type)==="flow-collection"){let r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&RO.containsNewline(e)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}E0.flowIndentCheck=PO});var du=_(O0=>{"use strict";var k0=Se();function MO(t,e,i){let{uniqueKeys:r}=t.options;if(r===!1)return!1;let n=typeof r=="function"?r:(s,o)=>s===o||k0.isScalar(s)&&k0.isScalar(o)&&s.value===o.value;return e.some(s=>n(s.key,i))}O0.mapIncludes=MO});var L0=_(N0=>{"use strict";var C0=wi(),FO=Si(),T0=Mn(),qO=Do(),A0=pu(),DO=du(),I0="All mapping items must start at the same column";function jO({composeNode:t,composeEmptyNode:e},i,r,n,s){var u,f;let o=(u=s==null?void 0:s.nodeClass)!=null?u:FO.YAMLMap,a=new o(i.schema);i.atRoot&&(i.atRoot=!1);let l=r.offset,c=null;for(let d of r.items){let{start:g,key:m,sep:y,value:b}=d,x=T0.resolveProps(g,{indicator:"explicit-key-ind",next:m!=null?m:y==null?void 0:y[0],offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0}),E=!x.found;if(E){if(m&&(m.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in m&&m.indent!==r.indent&&n(l,"BAD_INDENT",I0)),!x.anchor&&!x.tag&&!y){c=x.end,x.comment&&(a.comment?a.comment+=` +`+x.comment:a.comment=x.comment);continue}(x.newlineAfterProp||qO.containsNewline(m))&&n(m!=null?m:g[g.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=x.found)==null?void 0:f.indent)!==r.indent&&n(l,"BAD_INDENT",I0);i.atKey=!0;let O=x.end,k=m?t(i,m,x,n):e(i,O,g,null,x,n);i.schema.compat&&A0.flowIndentCheck(r.indent,m,n),i.atKey=!1,DO.mapIncludes(i,a.items,k)&&n(O,"DUPLICATE_KEY","Map keys must be unique");let S=T0.resolveProps(y!=null?y:[],{indicator:"map-value-ind",next:b,offset:k.range[2],onError:n,parentIndent:r.indent,startOnNewline:!m||m.type==="block-scalar"});if(l=S.end,S.found){E&&((b==null?void 0:b.type)==="block-map"&&!S.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&x.start{"use strict";var UO=Ei(),$O=Mn(),VO=pu();function HO({composeNode:t,composeEmptyNode:e},i,r,n,s){var u;let o=(u=s==null?void 0:s.nodeClass)!=null?u:UO.YAMLSeq,a=new o(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let l=r.offset,c=null;for(let{start:f,value:d}of r.items){let g=$O.resolveProps(f,{indicator:"seq-item-ind",next:d,offset:l,onError:n,parentIndent:r.indent,startOnNewline:!0});if(!g.found)if(g.anchor||g.tag||d)d&&d.type==="block-seq"?n(g.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=g.end,g.comment&&(a.comment=g.comment);continue}let m=d?t(i,d,g,n):e(i,g.end,f,null,g,n);i.schema.compat&&VO.flowIndentCheck(r.indent,d,n),l=m.range[2],a.items.push(m)}return a.range=[r.offset,l,c!=null?c:l],a}B0.resolveBlockSeq=HO});var $r=_(P0=>{"use strict";function GO(t,e,i,r){let n="";if(t){let s=!1,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":s=!0;break;case"comment":{i&&!s&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=o+u:n=u,o="";break}case"newline":n&&(o+=l),s=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}P0.resolveEnd=GO});var D0=_(q0=>{"use strict";var YO=Se(),WO=wi(),M0=Si(),KO=Ei(),zO=$r(),F0=Mn(),JO=Do(),ZO=du(),mu="Block collections are not allowed within flow collections",gu=t=>t&&(t.type==="block-map"||t.type==="block-seq");function QO({composeNode:t,composeEmptyNode:e},i,r,n,s){var b,x;let o=r.start.source==="{",a=o?"flow map":"flow sequence",l=(b=s==null?void 0:s.nodeClass)!=null?b:o?M0.YAMLMap:KO.YAMLSeq,c=new l(i.schema);c.flow=!0;let u=i.atRoot;u&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let f=r.offset+r.start.source.length;for(let E=0;E0){let E=zO.resolveEnd(m,y,i.options.strict,n);E.comment&&(c.comment?c.comment+=` +`+E.comment:c.comment=E.comment),c.range=[r.offset,y,E.offset]}else c.range=[r.offset,y,y];return c}q0.resolveFlowCollection=QO});var U0=_(j0=>{"use strict";var XO=Se(),eC=De(),tC=Si(),iC=Ei(),rC=L0(),nC=R0(),sC=D0();function vu(t,e,i,r,n,s){let o=i.type==="block-map"?rC.resolveBlockMap(t,e,i,r,s):i.type==="block-seq"?nC.resolveBlockSeq(t,e,i,r,s):sC.resolveFlowCollection(t,e,i,r,s),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function oC(t,e,i,r,n){var d,g;let s=r.tag,o=s?e.directives.tagName(s.source,m=>n(s,"TAG_RESOLVE_FAILED",m)):null;if(i.type==="block-seq"){let{anchor:m,newlineAfterProp:y}=r,b=m&&s?m.offset>s.offset?m:s:m!=null?m:s;b&&(!y||y.offsetm.tag===o&&m.collection===a);if(!l){let m=e.schema.knownTags[o];if(m&&m.collection===a)e.schema.tags.push(Object.assign({},m,{default:!1})),l=m;else return m!=null&&m.collection?n(s,"BAD_COLLECTION_TYPE",`${m.tag} used for ${a} collection, but expects ${m.collection}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),vu(t,e,i,n,o)}let c=vu(t,e,i,n,o,l),u=(g=(d=l.resolve)==null?void 0:d.call(l,c,m=>n(s,"TAG_RESOLVE_FAILED",m),e.options))!=null?g:c,f=XO.isNode(u)?u:new eC.Scalar(u);return f.range=c.range,f.tag=o,l!=null&&l.format&&(f.format=l.format),f}j0.composeCollection=oC});var bu=_($0=>{"use strict";var yu=De();function aC(t,e,i){let r=e.offset,n=lC(e,t.options.strict,i);if(!n)return{value:"",type:null,comment:"",range:[r,r,r]};let s=n.mode===">"?yu.Scalar.BLOCK_FOLDED:yu.Scalar.BLOCK_LITERAL,o=e.source?cC(e.source):[],a=o.length;for(let y=o.length-1;y>=0;--y){let b=o[y][1];if(b===""||b==="\r")a=y;else break}if(a===0){let y=n.chomp==="+"&&o.length>0?` +`.repeat(Math.max(1,o.length-1)):"",b=r+n.length;return e.source&&(b+=e.source.length),{value:y,type:s,comment:n.comment,range:[r,b,b]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let y=0;yl&&(l=b.length);else{b.length=a;--y)o[y][0].length>l&&(a=y+1);let f="",d="",g=!1;for(let y=0;yl||x[0]===" "?(d===" "?d=` `:!g&&d===` `&&(d=` -`),f+=d+b.slice(l)+_,d=` -`,g=!0):_===""?d===` +`),f+=d+b.slice(l)+x,d=` +`,g=!0):x===""?d===` `?f+=` `:d=` -`:(f+=d+_,d=" ",g=!1)}switch(n.chomp){case"-":break;case"+":for(let v=a;v{"use strict";var wu=je(),xC=Vr();function SC(t,e,i){let{offset:r,type:n,source:s,end:o}=t,a,l,c=(d,g,m)=>i(r+d,g,m);switch(n){case"scalar":a=wu.Scalar.PLAIN,l=EC(s,c);break;case"single-quoted-scalar":a=wu.Scalar.QUOTE_SINGLE,l=kC(s,c);break;case"double-quoted-scalar":a=wu.Scalar.QUOTE_DOUBLE,l=OC(s,c);break;default:return i(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let u=r+s.length,f=xC.resolveEnd(o,u,e,i);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function EC(t,e){let i="";switch(t[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 ${t[0]}`;break}case"@":case"`":{i=`reserved character ${t[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),K0(t)}function kC(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),K0(t.slice(1,-1)).replace(/''/g,"'")}function K0(t){var l;let e,i;try{e=new RegExp(`(.*?)(?{"use strict";var _u=De(),uC=$r();function fC(t,e,i){let{offset:r,type:n,source:s,end:o}=t,a,l,c=(d,g,m)=>i(r+d,g,m);switch(n){case"scalar":a=_u.Scalar.PLAIN,l=hC(s,c);break;case"single-quoted-scalar":a=_u.Scalar.QUOTE_SINGLE,l=pC(s,c);break;case"double-quoted-scalar":a=_u.Scalar.QUOTE_DOUBLE,l=dC(s,c);break;default:return i(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[r,r+s.length,r+s.length]}}let u=r+s.length,f=uC.resolveEnd(o,u,e,i);return{value:l,type:a,comment:f.comment,range:[r,u,f.offset]}}function hC(t,e){let i="";switch(t[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 ${t[0]}`;break}case"@":case"`":{i=`reserved character ${t[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),V0(t)}function pC(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),V0(t.slice(1,-1)).replace(/''/g,"'")}function V0(t){var l;let e,i;try{e=new RegExp(`(.*?)(?s?t.slice(s,r+1):n)}else i+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),i}function CC(t,e){let i="",r=t[e+1];for(;(r===" "||r===" "||r===` +`)&&(i+=r>s?t.slice(s,r+1):n)}else i+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),i}function mC(t,e){let i="",r=t[e+1];for(;(r===" "||r===" "||r===` `||r==="\r")&&!(r==="\r"&&t[e+2]!==` `);)r===` `&&(i+=` -`),e+=1,r=t[e+1];return i||(i=" "),{fold:i,offset:e}}var TC={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` -`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function AC(t,e,i,r){let n=t.substr(e,i),o=n.length===i&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;if(isNaN(o)){let a=t.substr(e-2,i+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}J0.resolveFlowScalar=SC});var X0=w(Q0=>{"use strict";var er=Se(),Z0=je(),IC=_u(),NC=xu();function LC(t,e,i,r){let{value:n,type:s,comment:o,range:a}=e.type==="block-scalar"?IC.resolveBlockScalar(t,e,r):NC.resolveFlowScalar(e,t.options.strict,r),l=i?t.directives.tagName(i.source,f=>r(i,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[er.SCALAR]:l?c=BC(t.schema,n,l,i,r):e.type==="scalar"?c=RC(t,n,e,r):c=t.schema[er.SCALAR];let u;try{let f=c.resolve(n,d=>r(i!=null?i:e,"TAG_RESOLVE_FAILED",d),t.options);u=er.isScalar(f)?f:new Z0.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(i!=null?i:e,"TAG_RESOLVE_FAILED",d),u=new Z0.Scalar(n)}return u.range=a,u.source=n,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function BC(t,e,i,r,n){var a;if(i==="!")return t[er.SCALAR];let s=[];for(let l of t.tags)if(!l.collection&&l.tag===i)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if((a=l.test)!=null&&a.test(e))return l;let o=t.knownTags[i];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),t[er.SCALAR])}function RC({atKey:t,directives:e,schema:i},r,n,s){var a;let o=i.tags.find(l=>{var c;return(l.default===!0||t&&l.default==="key")&&((c=l.test)==null?void 0:c.test(r))})||i[er.SCALAR];if(i.compat){let l=(a=i.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(r))}))!=null?a:i[er.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}Q0.composeScalar=LC});var tv=w(ev=>{"use strict";function PC(t,e,i){if(e){i===null&&(i=e.length);for(let r=i-1;r>=0;--r){let n=e[r];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++r];(n==null?void 0:n.type)==="space";)t+=n.source.length,n=e[++r];break}}return t}ev.emptyScalarPosition=PC});var nv=w(Eu=>{"use strict";var MC=vn(),FC=Se(),qC=W0(),iv=X0(),DC=Vr(),jC=tv(),UC={composeNode:rv,composeEmptyNode:Su};function rv(t,e,i,r){let n=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=i,c,u=!0;switch(e.type){case"alias":c=$C(t,e,r),(a||l)&&r(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":c=iv.composeScalar(t,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=qC.composeCollection(UC,t,e,i,r),a&&(c.anchor=a.source.substring(1));break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),c=Su(t,e.offset,void 0,null,i,r),u=!1}}if(a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!FC.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")){let f="With stringKeys, all keys must be strings";r(l!=null?l:e,"NON_STRING_KEY",f)}return s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Su(t,e,i,r,{spaceBefore:n,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:jC.emptyScalarPosition(e,i,r),indent:-1,source:""},f=iv.composeScalar(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function $C({options:t},{offset:e,source:i,end:r},n){let s=new MC.Alias(i.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+i.length,a=DC.resolveEnd(r,o,t.strict,n);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}Eu.composeEmptyNode=Su;Eu.composeNode=rv});var av=w(ov=>{"use strict";var VC=Bn(),sv=nv(),HC=Vr(),GC=Fn();function YC(t,e,{offset:i,start:r,value:n,end:s},o){let a=Object.assign({_directives:e},t),l=new VC.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=GC.resolveProps(r,{indicator:"doc-start",next:n!=null?n:s==null?void 0:s[0],offset:i,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?sv.composeNode(c,n,u,o):sv.composeEmptyNode(c,u.end,r,null,u,o);let f=l.contents.range[2],d=HC.resolveEnd(s,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[i,f,d.offset],l}ov.composeDoc=YC});var Ou=w(uv=>{"use strict";var WC=fc(),zC=Bn(),qn=Mn(),lv=Se(),KC=av(),JC=Vr();function Dn(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:i}=t;return[e,e+(typeof i=="string"?i.length:1)]}function cv(t){var n;let e="",i=!1,r=!1;for(let s=0;s{"use strict";var er=Se(),G0=De(),yC=bu(),bC=wu();function _C(t,e,i,r){let{value:n,type:s,comment:o,range:a}=e.type==="block-scalar"?yC.resolveBlockScalar(t,e,r):bC.resolveFlowScalar(e,t.options.strict,r),l=i?t.directives.tagName(i.source,f=>r(i,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[er.SCALAR]:l?c=wC(t.schema,n,l,i,r):e.type==="scalar"?c=xC(t,n,e,r):c=t.schema[er.SCALAR];let u;try{let f=c.resolve(n,d=>r(i!=null?i:e,"TAG_RESOLVE_FAILED",d),t.options);u=er.isScalar(f)?f:new G0.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);r(i!=null?i:e,"TAG_RESOLVE_FAILED",d),u=new G0.Scalar(n)}return u.range=a,u.source=n,s&&(u.type=s),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function wC(t,e,i,r,n){var a;if(i==="!")return t[er.SCALAR];let s=[];for(let l of t.tags)if(!l.collection&&l.tag===i)if(l.default&&l.test)s.push(l);else return l;for(let l of s)if((a=l.test)!=null&&a.test(e))return l;let o=t.knownTags[i];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),t[er.SCALAR])}function xC({atKey:t,directives:e,schema:i},r,n,s){var a;let o=i.tags.find(l=>{var c;return(l.default===!0||t&&l.default==="key")&&((c=l.test)==null?void 0:c.test(r))})||i[er.SCALAR];if(i.compat){let l=(a=i.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(r))}))!=null?a:i[er.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),u=e.tagString(l.tag),f=`Value may be parsed as either ${c} or ${u}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return o}Y0.composeScalar=_C});var z0=_(K0=>{"use strict";function SC(t,e,i){if(e){i===null&&(i=e.length);for(let r=i-1;r>=0;--r){let n=e[r];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++r];(n==null?void 0:n.type)==="space";)t+=n.source.length,n=e[++r];break}}return t}K0.emptyScalarPosition=SC});var Q0=_(Su=>{"use strict";var EC=gn(),kC=Se(),OC=U0(),J0=W0(),CC=$r(),TC=z0(),AC={composeNode:Z0,composeEmptyNode:xu};function Z0(t,e,i,r){let n=t.atKey,{spaceBefore:s,comment:o,anchor:a,tag:l}=i,c,u=!0;switch(e.type){case"alias":c=IC(t,e,r),(a||l)&&r(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":c=J0.composeScalar(t,e,l,r),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=OC.composeCollection(AC,t,e,i,r),a&&(c.anchor=a.source.substring(1));break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",f),c=xu(t,e.offset,void 0,null,i,r),u=!1}}return a&&c.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!kC.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&r(l!=null?l:e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function xu(t,e,i,r,{spaceBefore:n,comment:s,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:TC.emptyScalarPosition(e,i,r),indent:-1,source:""},f=J0.composeScalar(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=l),f}function IC({options:t},{offset:e,source:i,end:r},n){let s=new EC.Alias(i.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+i.length,a=CC.resolveEnd(r,o,t.strict,n);return s.range=[e,o,a.offset],a.comment&&(s.comment=a.comment),s}Su.composeEmptyNode=xu;Su.composeNode=Z0});var tv=_(ev=>{"use strict";var NC=Ln(),X0=Q0(),LC=$r(),BC=Mn();function RC(t,e,{offset:i,start:r,value:n,end:s},o){let a=Object.assign({_directives:e},t),l=new NC.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=BC.resolveProps(r,{indicator:"doc-start",next:n!=null?n:s==null?void 0:s[0],offset:i,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?X0.composeNode(c,n,u,o):X0.composeEmptyNode(c,u.end,r,null,u,o);let f=l.contents.range[2],d=LC.resolveEnd(s,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[i,f,d.offset],l}ev.composeDoc=RC});var ku=_(nv=>{"use strict";var PC=uc(),MC=Ln(),Fn=Pn(),iv=Se(),FC=tv(),qC=$r();function qn(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:i}=t;return[e,e+(typeof i=="string"?i.length:1)]}function rv(t){var n;let e="",i=!1,r=!1;for(let s=0;s{let o=Dn(i);s?this.warnings.push(new qn.YAMLWarning(o,r,n)):this.errors.push(new qn.YAMLParseError(o,r,n))},this.directives=new WC.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,i){let{comment:r,afterEmptyLine:n}=cv(this.prelude);if(r){let s=e.contents;if(i)e.comment=e.comment?`${e.comment} -${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(lv.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];lv.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r} +`)+(o.substring(1)||" "),i=!0,r=!1;break;case"%":((n=t[s+1])==null?void 0:n[0])!=="#"&&(s+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:e,afterEmptyLine:r}}var Eu=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,n,s)=>{let o=qn(i);s?this.warnings.push(new Fn.YAMLWarning(o,r,n)):this.errors.push(new Fn.YAMLParseError(o,r,n))},this.directives=new PC.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,i){let{comment:r,afterEmptyLine:n}=rv(this.prelude);if(r){let s=e.contents;if(i)e.comment=e.comment?`${e.comment} +${r}`:r;else if(n||e.directives.docStart||!s)e.commentBefore=r;else if(iv.isCollection(s)&&!s.flow&&s.items.length>0){let o=s.items[0];iv.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${r} ${a}`:r}else{let o=s.commentBefore;s.commentBefore=o?`${r} -${o}`:r}}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:cv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(i,r)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(i,r,n)=>{let s=Dn(e);s[0]+=i,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let i=KC.composeDoc(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":{let i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new qn.YAMLParseError(Dn(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new qn.YAMLParseError(Dn(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let i=JC.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){let r=this.doc.comment;this.doc.comment=r?`${r} -${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new qn.YAMLParseError(Dn(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){let r=Object.assign({_directives:this.directives},this.options),n=new zC.Document(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,i,i],this.decorate(n,!1),yield n}}};uv.Composer=ku});var pv=w(jo=>{"use strict";var ZC=_u(),QC=xu(),XC=Mn(),fv=xn();function eT(t,e=!0,i){if(t){let r=(n,s,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(i)i(a,s,o);else throw new XC.YAMLParseError([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return QC.resolveFlowScalar(t,e,r);case"block-scalar":return ZC.resolveBlockScalar({options:{strict:e}},t,r)}}return null}function tT(t,e){var c;let{implicitKey:i=!1,indent:r,inFlow:n=!1,offset:s=-1,type:o="PLAIN"}=e,a=fv.stringifyString({type:o,value:t},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:r,source:` +${o}`:r}}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:rv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,r=-1){for(let n of e)yield*this.next(n);yield*this.end(i,r)}*next(e){switch(process.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(i,r,n)=>{let s=qn(e);s[0]+=i,this.onError(s,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let i=FC.composeDoc(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":{let i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Fn.YAMLParseError(qn(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){let r="Unexpected doc-end without preceding document";this.errors.push(new Fn.YAMLParseError(qn(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;let i=qC.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){let r=this.doc.comment;this.doc.comment=r?`${r} +${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Fn.YAMLParseError(qn(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){let r=Object.assign({_directives:this.directives},this.options),n=new MC.Document(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,i,i],this.decorate(n,!1),yield n}}};nv.Composer=Eu});var av=_(jo=>{"use strict";var DC=bu(),jC=wu(),UC=Pn(),sv=wn();function $C(t,e=!0,i){if(t){let r=(n,s,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(i)i(a,s,o);else throw new UC.YAMLParseError([a,a+1],s,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return jC.resolveFlowScalar(t,e,r);case"block-scalar":return DC.resolveBlockScalar({options:{strict:e}},t,r)}}return null}function VC(t,e){var c;let{implicitKey:i=!1,indent:r,inFlow:n=!1,offset:s=-1,type:o="PLAIN"}=e,a=sv.stringifyString({type:o,value:t},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:r,source:` `}];switch(a[0]){case"|":case">":{let u=a.indexOf(` `),f=a.substring(0,u),d=a.substring(u+1)+` -`,g=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return hv(g,l)||g.push({type:"newline",offset:-1,indent:r,source:` -`}),{type:"block-scalar",offset:s,indent:r,props:g,source:d}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function iT(t,e,i={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:s=!1,type:o}=i,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=fv.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":rT(t,l);break;case'"':Cu(t,l,"double-quoted-scalar");break;case"'":Cu(t,l,"single-quoted-scalar");break;default:Cu(t,l,"scalar")}}function rT(t,e){let i=e.indexOf(` +`,g=[{type:"block-scalar-header",offset:s,indent:r,source:f}];return ov(g,l)||g.push({type:"newline",offset:-1,indent:r,source:` +`}),{type:"block-scalar",offset:s,indent:r,props:g,source:d}}case'"':return{type:"double-quoted-scalar",offset:s,indent:r,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:s,indent:r,source:a,end:l};default:return{type:"scalar",offset:s,indent:r,source:a,end:l}}}function HC(t,e,i={}){let{afterKey:r=!1,implicitKey:n=!1,inFlow:s=!1,type:o}=i,a="indent"in t?t.indent:null;if(r&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=sv.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":GC(t,l);break;case'"':Ou(t,l,"double-quoted-scalar");break;case"'":Ou(t,l,"single-quoted-scalar");break;default:Ou(t,l,"scalar")}}function GC(t,e){let i=e.indexOf(` `),r=e.substring(0,i),n=e.substring(i+1)+` -`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,t.source=n}else{let{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];hv(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:` -`});for(let l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:n})}}function hv(t,e){if(e)for(let i of e)switch(i.type){case"space":case"comment":t.push(i);break;case"newline":return t.push(i),!0}return!1}function Cu(t,e,i){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=i,t.source=e;break;case"block-scalar":{let r=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let s of r)s.offset+=n;delete t.props,Object.assign(t,{type:i,source:e,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:` -`};delete t.items,Object.assign(t,{type:i,source:e,end:[n]});break}default:{let r="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:i,indent:r,source:e,end:n})}}}jo.createScalarToken=tT;jo.resolveAsScalar=eT;jo.setScalarValue=iT});var mv=w(dv=>{"use strict";var nT=t=>"type"in t?$o(t):Uo(t);function $o(t){switch(t.type){case"block-scalar":{let e="";for(let i of t.props)e+=$o(i);return e+t.source}case"block-map":case"block-seq":{let e="";for(let i of t.items)e+=Uo(i);return e}case"flow-collection":{let e=t.start.source;for(let i of t.items)e+=Uo(i);for(let i of t.end)e+=i.source;return e}case"document":{let e=Uo(t);if(t.end)for(let i of t.end)e+=i.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let i of t.end)e+=i.source;return e}}}function Uo({start:t,key:e,sep:i,value:r}){let n="";for(let s of t)n+=s.source;if(e&&(n+=$o(e)),i)for(let s of i)n+=s.source;return r&&(n+=$o(r)),n}dv.stringify=nT});var bv=w(yv=>{"use strict";var Tu=Symbol("break visit"),sT=Symbol("skip children"),gv=Symbol("remove item");function tr(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),vv(Object.freeze([]),t,e)}tr.BREAK=Tu;tr.SKIP=sT;tr.REMOVE=gv;tr.itemAtPath=(t,e)=>{let i=t;for(let[r,n]of e){let s=i==null?void 0:i[r];if(s&&"items"in s)i=s.items[n];else return}return i};tr.parentCollection=(t,e)=>{let i=tr.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],n=i==null?void 0:i[r];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function vv(t,e,i){let r=i(e,t);if(typeof r=="symbol")return r;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let o=0;o{"use strict";var Au=pv(),oT=mv(),aT=bv(),Iu="\uFEFF",Nu="",Lu="",Bu="",lT=t=>!!t&&"items"in t,cT=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function uT(t){switch(t){case Iu:return"";case Nu:return"";case Lu:return"";case Bu:return"";default:return JSON.stringify(t)}}function fT(t){switch(t){case Iu:return"byte-order-mark";case Nu:return"doc-mode";case Lu:return"flow-error-end";case Bu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=r,t.source=n}else{let{offset:s}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:s,indent:o,source:r}];ov(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:` +`});for(let l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:n})}}function ov(t,e){if(e)for(let i of e)switch(i.type){case"space":case"comment":t.push(i);break;case"newline":return t.push(i),!0}return!1}function Ou(t,e,i){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=i,t.source=e;break;case"block-scalar":{let r=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let s of r)s.offset+=n;delete t.props,Object.assign(t,{type:i,source:e,end:r});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:` +`};delete t.items,Object.assign(t,{type:i,source:e,end:[n]});break}default:{let r="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:i,indent:r,source:e,end:n})}}}jo.createScalarToken=VC;jo.resolveAsScalar=$C;jo.setScalarValue=HC});var cv=_(lv=>{"use strict";var YC=t=>"type"in t?$o(t):Uo(t);function $o(t){switch(t.type){case"block-scalar":{let e="";for(let i of t.props)e+=$o(i);return e+t.source}case"block-map":case"block-seq":{let e="";for(let i of t.items)e+=Uo(i);return e}case"flow-collection":{let e=t.start.source;for(let i of t.items)e+=Uo(i);for(let i of t.end)e+=i.source;return e}case"document":{let e=Uo(t);if(t.end)for(let i of t.end)e+=i.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let i of t.end)e+=i.source;return e}}}function Uo({start:t,key:e,sep:i,value:r}){let n="";for(let s of t)n+=s.source;if(e&&(n+=$o(e)),i)for(let s of i)n+=s.source;return r&&(n+=$o(r)),n}lv.stringify=YC});var pv=_(hv=>{"use strict";var Cu=Symbol("break visit"),WC=Symbol("skip children"),uv=Symbol("remove item");function tr(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),fv(Object.freeze([]),t,e)}tr.BREAK=Cu;tr.SKIP=WC;tr.REMOVE=uv;tr.itemAtPath=(t,e)=>{let i=t;for(let[r,n]of e){let s=i==null?void 0:i[r];if(s&&"items"in s)i=s.items[n];else return}return i};tr.parentCollection=(t,e)=>{let i=tr.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],n=i==null?void 0:i[r];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function fv(t,e,i){let r=i(e,t);if(typeof r=="symbol")return r;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let o=0;o{"use strict";var Tu=av(),KC=cv(),zC=pv(),Au="\uFEFF",Iu="",Nu="",Lu="",JC=t=>!!t&&"items"in t,ZC=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function QC(t){switch(t){case Au:return"";case Iu:return"";case Nu:return"";case Lu:return"";default:return JSON.stringify(t)}}function XC(t){switch(t){case Au:return"byte-order-mark";case Iu:return"doc-mode";case Nu:return"flow-error-end";case Lu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` `:case`\r -`: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(t[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}gt.createScalarToken=Au.createScalarToken;gt.resolveAsScalar=Au.resolveAsScalar;gt.setScalarValue=Au.setScalarValue;gt.stringify=oT.stringify;gt.visit=aT.visit;gt.BOM=Iu;gt.DOCUMENT=Nu;gt.FLOW_END=Lu;gt.SCALAR=Bu;gt.isCollection=lT;gt.isScalar=cT;gt.prettyToken=uT;gt.tokenType=fT});var Mu=w(wv=>{"use strict";var jn=Vo();function jt(t){switch(t){case void 0:case" ":case` -`:case"\r":case" ":return!0;default:return!1}}var _v=new Set("0123456789ABCDEFabcdef"),hT=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ho=new Set(",[]{}"),pT=new Set(` ,[]{} -\r `),Ru=t=>!t||pT.has(t),Pu=class{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){var n;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 r=(n=this.next)!=null?n:"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i===" ";)i=this.buffer[++e];return!i||i==="#"||i===` +`: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(t[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}gt.createScalarToken=Tu.createScalarToken;gt.resolveAsScalar=Tu.resolveAsScalar;gt.setScalarValue=Tu.setScalarValue;gt.stringify=KC.stringify;gt.visit=zC.visit;gt.BOM=Au;gt.DOCUMENT=Iu;gt.FLOW_END=Nu;gt.SCALAR=Lu;gt.isCollection=JC;gt.isScalar=ZC;gt.prettyToken=QC;gt.tokenType=XC});var Pu=_(mv=>{"use strict";var Dn=Vo();function jt(t){switch(t){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}var dv=new Set("0123456789ABCDEFabcdef"),eT=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ho=new Set(",[]{}"),tT=new Set(` ,[]{} +\r `),Bu=t=>!t||tT.has(t),Ru=class{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){var n;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 r=(n=this.next)!=null?n:"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i===" ";)i=this.buffer[++e];return!i||i==="#"||i===` `?!0:i==="\r"?this.buffer[e+1]===` `:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+e];if(i==="\r"){let n=this.buffer[r+e+1];if(n===` `||!n&&!this.atEnd)return e+r+1}return i===` `||r>=this.indentNext||!i&&!this.atEnd?e+r:-1}if(i==="-"||i==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&jt(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!jt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&jt(i)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let 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(Ru),"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,r=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((r!==-1&&rthis.indentValue&&!jt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&jt(i)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let 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(Bu),"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,r=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((r!==-1&&r"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>jt(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case" ":i+=1;break;case` `:e=s,i=0;break;case"\r":{let o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===` `)break}default:break e}if(!r&&!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{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(` `,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(r=this.buffer[n];r===" ";)r=this.buffer[++n];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===` `;)r=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,o=this.buffer[s];o==="\r"&&(o=this.buffer[--s]);let a=s;for(;o===" ";)o=this.buffer[--s];if(o===` -`&&s>=this.pos&&s+1+i>a)e=s;else break}while(!0);return yield jn.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,i=this.pos-1,r=this.pos-1,n;for(;n=this.buffer[++r];)if(n===":"){let s=this.buffer[r+1];if(jt(s)||e&&Ho.has(s))break;i=r}else if(jt(n)){let s=this.buffer[r+1];if(n==="\r"&&(s===` +`&&s>=this.pos&&s+1+i>a)e=s;else break}while(!0);return yield Dn.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,i=this.pos-1,r=this.pos-1,n;for(;n=this.buffer[++r];)if(n===":"){let s=this.buffer[r+1];if(jt(s)||e&&Ho.has(s))break;i=r}else if(jt(n)){let s=this.buffer[r+1];if(n==="\r"&&(s===` `?(r+=1,n=` `,s=this.buffer[r+1]):i=r),s==="#"||e&&Ho.has(s))break;if(n===` -`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&Ho.has(n))break;i=r}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield jn.SCALAR,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){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.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(Ru))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,i=this.charAt(1);if(jt(i)||e&&Ho.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(;!jt(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(hT.has(i))i=this.buffer[++e];else if(i==="%"&&_v.has(this.buffer[e+1])&&_v.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===` +`){let o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&Ho.has(n))break;i=r}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Dn.SCALAR,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){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.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(Bu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let e=this.flowLevel>0,i=this.charAt(1);if(jt(i)||e&&Ho.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(;!jt(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(eT.has(i))i=this.buffer[++e];else if(i==="%"&&dv.has(this.buffer[e+1])&&dv.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===` `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` -`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||e&&r===" ");let n=i-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=i),n}*pushUntil(e){let i=this.pos,r=this.buffer[i];for(;!e(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}};wv.Lexer=Pu});var qu=w(xv=>{"use strict";var Fu=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,r=this.lineStarts.length;for(;i>1;this.lineStarts[s]{"use strict";var Sv=Vo(),dT=Mu();function ir(t,e){for(let i=0;i=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=t[++e])==null?void 0:i.type)==="space";);return t.splice(e,t.length)}function kv(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!ir(e.start,"explicit-key-ind")&&!ir(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Ov(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)}var Du=class{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 dT.Lexer,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,i))yield*this.next(r);i||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",Sv.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let i=Sv.tokenType(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{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,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(){let 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){let i=e!=null?e:this.stack.pop();if(i)if(this.stack.length===0)yield i;else{let r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&kv(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=i;else{Object.assign(n,{key:i,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=r.items[r.items.length-1];n.value?r.items.push({start:[],value:i}):n.value=i;break}case"flow-collection":{let n=r.items[r.items.length-1];!n||n.value?r.items.push({start:[],key:i,sep:[]}):n.sep?n.value=i:Object.assign(n,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){let n=i.items[i.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Ev(n.start)===-1&&(i.indent===0||n.start.every(s=>s.type!=="comment"||s.indent0&&(yield this.buffer.substr(this.pos,n),this.pos=i),n}*pushUntil(e){let i=this.pos,r=this.buffer[i];for(;!e(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}};mv.Lexer=Ru});var Fu=_(gv=>{"use strict";var Mu=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,r=this.lineStarts.length;for(;i>1;this.lineStarts[s]{"use strict";var vv=Vo(),iT=Pu();function ir(t,e){for(let i=0;i=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=t[++e])==null?void 0:i.type)==="space";);return t.splice(e,t.length)}function bv(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!ir(e.start,"explicit-key-ind")&&!ir(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,_v(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)}var qu=class{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 iT.Lexer,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,i))yield*this.next(r);i||(yield*this.end())}*next(e){if(this.source=e,process.env.LOG_TOKENS&&console.log("|",vv.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let i=vv.tokenType(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{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,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(){let 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){let i=e!=null?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{let r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&bv(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{let n=r.items[r.items.length-1];if(n.value){r.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=i;else{Object.assign(n,{key:i,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=r.items[r.items.length-1];n.value?r.items.push({start:[],value:i}):n.value=i;break}case"flow-collection":{let n=r.items[r.items.length-1];!n||n.value?r.items.push({start:[],key:i,sep:[]}):n.sep?n.value=i:Object.assign(n,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){let n=i.items[i.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&yv(n.start)===-1&&(i.indent===0||n.start.every(s=>s.type!=="comment"||s.indent=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&i.sep&&!i.value){let a=[];for(let l=0;le.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=i.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||i.value?(o.push(this.sourceToken),e.items.push({start:o}),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):s||i.value?(o.push(this.sourceToken),e.items.push({start:o,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(ir(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Ov(i.key)&&!ir(i.sep,"newline")){let a=Hr(i.start),l=i.key,c=i.sep;c.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else o.length>0?i.sep=i.sep.concat(o,this.sourceToken):i.sep.push(this.sourceToken);else if(ir(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{let a=Hr(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):ir(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":{let a=this.flowScalar(this.type);s||i.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(a):(Object.assign(i,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){n&&a.type!=="block-seq"&&e.items.push({start:o}),this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;let i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){let n="end"in i.value?i.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.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)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,i.start),s.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||ir(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let i=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.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":{let n=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:n,sep:[]}):i.sep?this.stack.push(n):Object.assign(i,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let n=Go(r),s=Hr(n);kv(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let i=this.source.indexOf(` +`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;let i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){let n="end"in i.value?i.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.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)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,i.start),s.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,s=n&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind",o=[];if(s&&i.sep&&!i.value){let a=[];for(let l=0;le.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=i.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":s||i.value?(o.push(this.sourceToken),e.items.push({start:o}),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):s||i.value?(o.push(this.sourceToken),e.items.push({start:o,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(ir(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(_v(i.key)&&!ir(i.sep,"newline")){let a=Vr(i.start),l=i.key,c=i.sep;c.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:c}]})}else o.length>0?i.sep=i.sep.concat(o,this.sourceToken):i.sep.push(this.sourceToken);else if(ir(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{let a=Vr(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||s?e.items.push({start:o,key:null,sep:[this.sourceToken]}):ir(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":{let a=this.flowScalar(this.type);s||i.value?(e.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(a):(Object.assign(i,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){n&&a.type!=="block-seq"&&e.items.push({start:o}),this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;let i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){let n="end"in i.value?i.value.end:void 0,s=Array.isArray(n)?n[n.length-1]:void 0;(s==null?void 0:s.type)==="comment"?n==null||n.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)){let n=e.items[e.items.length-2],s=(r=n==null?void 0:n.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,i.start),s.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||ir(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let i=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.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":{let n=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:n,sep:[]}):i.sep?this.stack.push(n):Object.assign(i,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let n=Go(r),s=Vr(n);bv(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let i=this.source.indexOf(` `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(` -`,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;let i=Go(e),r=Hr(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let i=Go(e),r=Hr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(r=>r.type==="newline"||r.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())}}};Cv.Parser=Du});var Lv=w($n=>{"use strict";var Tv=Ou(),mT=Bn(),Un=Mn(),gT=Ec(),vT=Se(),yT=qu(),Av=ju();function Iv(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new yT.LineCounter||null,prettyErrors:e}}function bT(t,e={}){let{lineCounter:i,prettyErrors:r}=Iv(e),n=new Av.Parser(i==null?void 0:i.addNewLine),s=new Tv.Composer(e),o=Array.from(s.compose(n.parse(t)));if(r&&i)for(let a of o)a.errors.forEach(Un.prettifyError(t,i)),a.warnings.forEach(Un.prettifyError(t,i));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function Nv(t,e={}){let{lineCounter:i,prettyErrors:r}=Iv(e),n=new Av.Parser(i==null?void 0:i.addNewLine),s=new Tv.Composer(e),o=null;for(let a of s.compose(n.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new Un.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(o.errors.forEach(Un.prettifyError(t,i)),o.warnings.forEach(Un.prettifyError(t,i))),o}function _T(t,e,i){let r;typeof e=="function"?r=e:i===void 0&&e&&typeof e=="object"&&(i=e);let n=Nv(t,i);if(!n)return null;if(n.warnings.forEach(s=>gT.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:r},i))}function wT(t,e,i){var n;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){let s=Math.round(i);i=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){let{keepUndefined:s}=(n=i!=null?i:e)!=null?n:{};if(!s)return}return vT.isDocument(t)&&!r?t.toString(i):new mT.Document(t,r,i).toString(i)}$n.parse=_T;$n.parseAllDocuments=bT;$n.parseDocument=Nv;$n.stringify=wT});var Rv=w(Oe=>{"use strict";var xT=Ou(),ST=Bn(),ET=ou(),Uu=Mn(),kT=vn(),ki=Se(),OT=wi(),CT=je(),TT=Si(),AT=Ei(),IT=Vo(),NT=Mu(),LT=qu(),BT=ju(),Yo=Lv(),Bv=pn();Oe.Composer=xT.Composer;Oe.Document=ST.Document;Oe.Schema=ET.Schema;Oe.YAMLError=Uu.YAMLError;Oe.YAMLParseError=Uu.YAMLParseError;Oe.YAMLWarning=Uu.YAMLWarning;Oe.Alias=kT.Alias;Oe.isAlias=ki.isAlias;Oe.isCollection=ki.isCollection;Oe.isDocument=ki.isDocument;Oe.isMap=ki.isMap;Oe.isNode=ki.isNode;Oe.isPair=ki.isPair;Oe.isScalar=ki.isScalar;Oe.isSeq=ki.isSeq;Oe.Pair=OT.Pair;Oe.Scalar=CT.Scalar;Oe.YAMLMap=TT.YAMLMap;Oe.YAMLSeq=AT.YAMLSeq;Oe.CST=IT;Oe.Lexer=NT.Lexer;Oe.LineCounter=LT.LineCounter;Oe.Parser=BT.Parser;Oe.parse=Yo.parse;Oe.parseAllDocuments=Yo.parseAllDocuments;Oe.parseDocument=Yo.parseDocument;Oe.stringify=Yo.stringify;Oe.visit=Bv.visit;Oe.visitAsync=Bv.visitAsync});var qv=w((OL,Fv)=>{"use strict";var{Duplex:RT}=require("stream");function Pv(t){t.emit("close")}function PT(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Mv(t){this.removeListener("error",Mv),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function MT(t,e){let i=!0,r=new RT({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(s,o){let a=!o&&r._readableState.objectMode?s.toString():s;r.push(a)||t.pause()}),t.once("error",function(s){r.destroyed||(i=!1,r.destroy(s))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(n,s){if(t.readyState===t.CLOSED){s(n),process.nextTick(Pv,r);return}let o=!1;t.once("error",function(l){o=!0,s(l)}),t.once("close",function(){o||s(n),process.nextTick(Pv,r)}),i&&t.terminate()},r._final=function(n){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(n)});return}t._socket!==null&&(t._socket._writableState.finished?(n(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){n()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(n,s,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(n,s,o)});return}t.send(n,o)},r.on("end",PT),r.on("error",Mv),r}Fv.exports=MT});var Oi=w((CL,Dv)=>{"use strict";Dv.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Vn=w((TL,Wo)=>{"use strict";var{EMPTY_BUFFER:FT}=Oi(),$u=Buffer[Symbol.species];function qT(t,e){if(t.length===0)return FT;if(t.length===1)return t[0];let i=Buffer.allocUnsafe(e),r=0;for(let n=0;n{"use strict";var $v=Symbol("kDone"),Hu=Symbol("kRun"),Gu=class{constructor(e){this[$v]=()=>{this.pending--,this[Hu]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Hu]()}[Hu](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[$v])}}};Vv.exports=Gu});var Yn=w((IL,zv)=>{"use strict";var Hn=require("zlib"),Gv=Vn(),jT=Hv(),{kStatusCode:Yv}=Oi(),UT=Buffer[Symbol.species],$T=Buffer.from([0,0,255,255]),Jo=Symbol("permessage-deflate"),ai=Symbol("total-length"),Gn=Symbol("callback"),Ci=Symbol("buffers"),Ko=Symbol("error"),zo,Yu=class{constructor(e,i,r){if(this._maxPayload=r|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!i,this._deflate=null,this._inflate=null,this.params=null,!zo){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;zo=new jT(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[Gn];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let i=this._options,r=e.find(n=>!(i.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(i.serverMaxWindowBits===!1||typeof i.serverMaxWindowBits=="number"&&i.serverMaxWindowBits>n.server_max_window_bits)||typeof i.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return i.serverNoContextTakeover&&(r.server_no_context_takeover=!0),i.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof i.serverMaxWindowBits=="number"&&(r.server_max_window_bits=i.serverMaxWindowBits),typeof i.clientMaxWindowBits=="number"?r.client_max_window_bits=i.clientMaxWindowBits:(r.client_max_window_bits===!0||i.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let i=e[0];if(this._options.clientNoContextTakeover===!1&&i.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!i.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(i.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&i.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return i}normalizeParams(e){return e.forEach(i=>{Object.keys(i).forEach(r=>{let n=i[r];if(n.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(n=n[0],r==="client_max_window_bits"){if(n!==!0){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else if(r==="server_max_window_bits"){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else throw new Error(`Unknown parameter "${r}"`);i[r]=n})}),e}decompress(e,i,r){zo.add(n=>{this._decompress(e,i,(s,o)=>{n(),r(s,o)})})}compress(e,i,r){zo.add(n=>{this._compress(e,i,(s,o)=>{n(),r(s,o)})})}_decompress(e,i,r){let n=this._isServer?"client":"server";if(!this._inflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?Hn.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=Hn.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[Jo]=this,this._inflate[ai]=0,this._inflate[Ci]=[],this._inflate.on("error",HT),this._inflate.on("data",Wv)}this._inflate[Gn]=r,this._inflate.write(e),i&&this._inflate.write($T),this._inflate.flush(()=>{let s=this._inflate[Ko];if(s){this._inflate.close(),this._inflate=null,r(s);return}let o=Gv.concat(this._inflate[Ci],this._inflate[ai]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ai]=0,this._inflate[Ci]=[],i&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,i,r){let n=this._isServer?"server":"client";if(!this._deflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?Hn.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=Hn.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[ai]=0,this._deflate[Ci]=[],this._deflate.on("data",VT)}this._deflate[Gn]=r,this._deflate.write(e),this._deflate.flush(Hn.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=Gv.concat(this._deflate[Ci],this._deflate[ai]);i&&(s=new UT(s.buffer,s.byteOffset,s.length-4)),this._deflate[Gn]=null,this._deflate[ai]=0,this._deflate[Ci]=[],i&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),r(null,s)})}};zv.exports=Yu;function VT(t){this[Ci].push(t),this[ai]+=t.length}function Wv(t){if(this[ai]+=t.length,this[Jo]._maxPayload<1||this[ai]<=this[Jo]._maxPayload){this[Ci].push(t);return}this[Ko]=new RangeError("Max payload size exceeded"),this[Ko].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ko][Yv]=1009,this.removeListener("data",Wv),this.reset()}function HT(t){this[Jo]._inflate=null,t[Yv]=1007,this[Gn](t)}});var Wn=w((NL,Zo)=>{"use strict";var{isUtf8:Kv}=require("buffer"),GT=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function YT(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Wu(t){let e=t.length,i=0;for(;i=e||(t[i+1]&192)!==128||(t[i+2]&192)!==128||t[i]===224&&(t[i+1]&224)===128||t[i]===237&&(t[i+1]&224)===160)return!1;i+=3}else if((t[i]&248)===240){if(i+3>=e||(t[i+1]&192)!==128||(t[i+2]&192)!==128||(t[i+3]&192)!==128||t[i]===240&&(t[i+1]&240)===128||t[i]===244&&t[i+1]>143||t[i]>244)return!1;i+=4}else return!1;return!0}Zo.exports={isValidStatusCode:YT,isValidUTF8:Wu,tokenChars:GT};if(Kv)Zo.exports.isValidUTF8=function(t){return t.length<24?Wu(t):Kv(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=require("utf-8-validate");Zo.exports.isValidUTF8=function(e){return e.length<32?Wu(e):t(e)}}catch{}});var Qu=w((LL,iy)=>{"use strict";var{Writable:WT}=require("stream"),Jv=Yn(),{BINARY_TYPES:zT,EMPTY_BUFFER:Zv,kStatusCode:KT,kWebSocket:JT}=Oi(),{concat:zu,toArrayBuffer:ZT,unmask:QT}=Vn(),{isValidStatusCode:XT,isValidUTF8:Qv}=Wn(),Qo=Buffer[Symbol.species],It=0,Xv=1,ey=2,ty=3,Ku=4,Ju=5,Xo=6,Zu=class extends WT{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||zT[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[JT]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=It}_write(e,i,r){if(this._opcode===8&&this._state==It)return r();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e=r.length?i.set(this._buffers.shift(),n):(i.set(new Uint8Array(r.buffer,r.byteOffset,e),n),this._buffers[0]=new Qo(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return i}startLoop(e){this._loop=!0;do switch(this._state){case It:this.getInfo(e);break;case Xv:this.getPayloadLength16(e);break;case ey:this.getPayloadLength64(e);break;case ty:this.getMask();break;case Ku:this.getData(e);break;case Ju:case Xo:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let i=this.consume(2);if(i[0]&48){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let r=(i[0]&64)===64;if(r&&!this._extensions[Jv.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(i[0]&128)===128,this._opcode=i[0]&15,this._payloadLength=i[1]&127,this._opcode===0){if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(i[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=Xv:this._payloadLength===127?this._state=ey:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let i=this.consume(8),r=i.readUInt32BE(0);if(r>Math.pow(2,53-32)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=r*Math.pow(2,32)+i.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let i=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(i);return}this._masked?this._state=ty:this._state=Ku}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Ku}getData(e){let i=Zv;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(i,e);return}if(this._compressed){this._state=Ju,this.decompress(i,e);return}i.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(i)),this.dataMessage(e)}decompress(e,i){this._extensions[Jv.extensionName].decompress(e,this._fin,(n,s)=>{if(n)return i(n);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");i(o);return}this._fragments.push(s)}this.dataMessage(i),this._state===It&&this.startLoop(i)})}dataMessage(e){if(!this._fin){this._state=It;return}let i=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=zu(r,i):this._binaryType==="arraybuffer"?n=ZT(zu(r,i)):n=r,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=It):(this._state=Xo,setImmediate(()=>{this.emit("message",n,!0),this._state=It,this.startLoop(e)}))}else{let n=zu(r,i);if(!this._skipUTF8Validation&&!Qv(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===Ju||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=It):(this._state=Xo,setImmediate(()=>{this.emit("message",n,!1),this._state=It,this.startLoop(e)}))}}controlMessage(e,i){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Zv),this.end();else{let r=e.readUInt16BE(0);if(!XT(r)){let s=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");i(s);return}let n=new Qo(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Qv(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");i(s);return}this._loop=!1,this.emit("conclude",r,n),this.end()}this._state=It;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=It):(this._state=Xo,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=It,this.startLoop(i)}))}createError(e,i,r,n,s){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${i}`:i);return Error.captureStackTrace(o,this.createError),o.code=s,o[KT]=n,o}};iy.exports=Zu});var ef=w((RL,sy)=>{"use strict";var{Duplex:BL}=require("stream"),{randomFillSync:eA}=require("crypto"),ry=Yn(),{EMPTY_BUFFER:tA}=Oi(),{isValidStatusCode:iA}=Wn(),{mask:ny,toBuffer:Gr}=Vn(),Ut=Symbol("kByteLength"),rA=Buffer.alloc(4),ea=8*1024,rr,Yr=ea,Xu=class t{constructor(e,i,r){this._extensions=i||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,i){let r,n=!1,s=2,o=!1;i.mask&&(r=i.maskBuffer||rA,i.generateMask?i.generateMask(r):(Yr===ea&&(rr===void 0&&(rr=Buffer.alloc(ea)),eA(rr,0,ea),Yr=0),r[0]=rr[Yr++],r[1]=rr[Yr++],r[2]=rr[Yr++],r[3]=rr[Yr++]),o=(r[0]|r[1]|r[2]|r[3])===0,s=6);let a;typeof e=="string"?(!i.mask||o)&&i[Ut]!==void 0?a=i[Ut]:(e=Buffer.from(e),a=e.length):(a=e.length,n=i.mask&&i.readOnly&&!o);let l=a;a>=65536?(s+=8,l=127):a>125&&(s+=2,l=126);let c=Buffer.allocUnsafe(n?a+s:s);return c[0]=i.fin?i.opcode|128:i.opcode,i.rsv1&&(c[0]|=64),c[1]=l,l===126?c.writeUInt16BE(a,2):l===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),i.mask?(c[1]|=128,c[s-4]=r[0],c[s-3]=r[1],c[s-2]=r[2],c[s-1]=r[3],o?[c,e]:n?(ny(e,r,c,s,a),[c]):(ny(e,r,e,0,a),[c,e])):[c,e]}close(e,i,r,n){let s;if(e===void 0)s=tA;else{if(typeof e!="number"||!iA(e))throw new TypeError("First argument must be a valid error code number");if(i===void 0||!i.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let a=Buffer.byteLength(i);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+a),s.writeUInt16BE(e,0),typeof i=="string"?s.write(i,2):s.set(i,2)}}let o={[Ut]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,o,n]):this.sendFrame(t.frame(s,o),n)}ping(e,i,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Gr(e),n=e.length,s=Gr.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Ut]:n,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,i,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Gr(e),n=e.length,s=Gr.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Ut]:n,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,i,r){let n=this._extensions[ry.extensionName],s=i.binary?2:1,o=i.compress,a,l;if(typeof e=="string"?(a=Buffer.byteLength(e),l=!1):(e=Gr(e),a=e.length,l=Gr.readOnly),this._firstFragment?(this._firstFragment=!1,o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=a>=n._threshold),this._compress=o):(o=!1,s=0),i.fin&&(this._firstFragment=!0),n){let c={[Ut]:a,fin:i.fin,generateMask:this._generateMask,mask:i.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:o};this._deflating?this.enqueue([this.dispatch,e,this._compress,c,r]):this.dispatch(e,this._compress,c,r)}else this.sendFrame(t.frame(e,{[Ut]:a,fin:i.fin,generateMask:this._generateMask,mask:i.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:!1}),r)}dispatch(e,i,r,n){if(!i){this.sendFrame(t.frame(e,r),n);return}let s=this._extensions[ry.extensionName];this._bufferedBytes+=r[Ut],this._deflating=!0,s.compress(e,r.fin,(o,a)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(l);for(let c=0;c{"use strict";var{kForOnEventAttribute:zn,kListener:tf}=Oi(),oy=Symbol("kCode"),ay=Symbol("kData"),ly=Symbol("kError"),cy=Symbol("kMessage"),uy=Symbol("kReason"),Wr=Symbol("kTarget"),fy=Symbol("kType"),hy=Symbol("kWasClean"),li=class{constructor(e){this[Wr]=null,this[fy]=e}get target(){return this[Wr]}get type(){return this[fy]}};Object.defineProperty(li.prototype,"target",{enumerable:!0});Object.defineProperty(li.prototype,"type",{enumerable:!0});var nr=class extends li{constructor(e,i={}){super(e),this[oy]=i.code===void 0?0:i.code,this[uy]=i.reason===void 0?"":i.reason,this[hy]=i.wasClean===void 0?!1:i.wasClean}get code(){return this[oy]}get reason(){return this[uy]}get wasClean(){return this[hy]}};Object.defineProperty(nr.prototype,"code",{enumerable:!0});Object.defineProperty(nr.prototype,"reason",{enumerable:!0});Object.defineProperty(nr.prototype,"wasClean",{enumerable:!0});var zr=class extends li{constructor(e,i={}){super(e),this[ly]=i.error===void 0?null:i.error,this[cy]=i.message===void 0?"":i.message}get error(){return this[ly]}get message(){return this[cy]}};Object.defineProperty(zr.prototype,"error",{enumerable:!0});Object.defineProperty(zr.prototype,"message",{enumerable:!0});var Kn=class extends li{constructor(e,i={}){super(e),this[ay]=i.data===void 0?null:i.data}get data(){return this[ay]}};Object.defineProperty(Kn.prototype,"data",{enumerable:!0});var nA={addEventListener(t,e,i={}){for(let n of this.listeners(t))if(!i[zn]&&n[tf]===e&&!n[zn])return;let r;if(t==="message")r=function(s,o){let a=new Kn("message",{data:o?s:s.toString()});a[Wr]=this,ta(e,this,a)};else if(t==="close")r=function(s,o){let a=new nr("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Wr]=this,ta(e,this,a)};else if(t==="error")r=function(s){let o=new zr("error",{error:s,message:s.message});o[Wr]=this,ta(e,this,o)};else if(t==="open")r=function(){let s=new li("open");s[Wr]=this,ta(e,this,s)};else return;r[zn]=!!i[zn],r[tf]=e,i.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let i of this.listeners(t))if(i[tf]===e&&!i[zn]){this.removeListener(t,i);break}}};py.exports={CloseEvent:nr,ErrorEvent:zr,Event:li,EventTarget:nA,MessageEvent:Kn};function ta(t,e,i){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,i):t.call(e,i)}});var rf=w((ML,my)=>{"use strict";var{tokenChars:Jn}=Wn();function Zt(t,e,i){t[e]===void 0?t[e]=[i]:t[e].push(i)}function sA(t){let e=Object.create(null),i=Object.create(null),r=!1,n=!1,s=!1,o,a,l=-1,c=-1,u=-1,f=0;for(;f{let i=t[e];return Array.isArray(i)||(i=[i]),i.map(r=>[e].concat(Object.keys(r).map(n=>{let s=r[n];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?n:`${n}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}my.exports={format:oA,parse:sA}});var lf=w((DL,Oy)=>{"use strict";var aA=require("events"),lA=require("https"),cA=require("http"),yy=require("net"),uA=require("tls"),{randomBytes:fA,createHash:hA}=require("crypto"),{Duplex:FL,Readable:qL}=require("stream"),{URL:nf}=require("url"),Ti=Yn(),pA=Qu(),dA=ef(),{BINARY_TYPES:gy,EMPTY_BUFFER:ia,GUID:mA,kForOnEventAttribute:sf,kListener:gA,kStatusCode:vA,kWebSocket:nt,NOOP:by}=Oi(),{EventTarget:{addEventListener:yA,removeEventListener:bA}}=dy(),{format:_A,parse:wA}=rf(),{toBuffer:xA}=Vn(),SA=30*1e3,_y=Symbol("kAborted"),of=[8,13],ci=["CONNECTING","OPEN","CLOSING","CLOSED"],EA=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,qe=class t extends aA{constructor(e,i,r){super(),this._binaryType=gy[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ia,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,i===void 0?i=[]:Array.isArray(i)||(typeof i=="object"&&i!==null?(r=i,i=[]):i=[i]),wy(this,e,i,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){gy.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,i,r){let n=new pA({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new dA(e,this._extensions,r.generateMask),this._receiver=n,this._socket=e,n[nt]=this,e[nt]=this,n.on("conclude",CA),n.on("drain",TA),n.on("error",AA),n.on("message",IA),n.on("ping",NA),n.on("pong",LA),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),i.length>0&&e.unshift(i),e.on("close",Sy),e.on("data",na),e.on("end",Ey),e.on("error",ky),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Ti.extensionName]&&this._extensions[Ti.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,i){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){let r="WebSocket was closed before the connection was established";St(this,this._req,r);return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,i,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),SA)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=i=void 0):typeof i=="function"&&(r=i,i=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){af(this,e,r);return}i===void 0&&(i=!this._isServer),this._sender.ping(e||ia,i,r)}pong(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=i=void 0):typeof i=="function"&&(r=i,i=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){af(this,e,r);return}i===void 0&&(i=!this._isServer),this._sender.pong(e||ia,i,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof i=="function"&&(r=i,i={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){af(this,e,r);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...i};this._extensions[Ti.extensionName]||(n.compress=!1),this._sender.send(e||ia,n,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){let e="WebSocket was closed before the connection was established";St(this,this._req,e);return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(qe,"CONNECTING",{enumerable:!0,value:ci.indexOf("CONNECTING")});Object.defineProperty(qe.prototype,"CONNECTING",{enumerable:!0,value:ci.indexOf("CONNECTING")});Object.defineProperty(qe,"OPEN",{enumerable:!0,value:ci.indexOf("OPEN")});Object.defineProperty(qe.prototype,"OPEN",{enumerable:!0,value:ci.indexOf("OPEN")});Object.defineProperty(qe,"CLOSING",{enumerable:!0,value:ci.indexOf("CLOSING")});Object.defineProperty(qe.prototype,"CLOSING",{enumerable:!0,value:ci.indexOf("CLOSING")});Object.defineProperty(qe,"CLOSED",{enumerable:!0,value:ci.indexOf("CLOSED")});Object.defineProperty(qe.prototype,"CLOSED",{enumerable:!0,value:ci.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(qe.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(qe.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[sf])return e[gA];return null},set(e){for(let i of this.listeners(t))if(i[sf]){this.removeListener(t,i);break}typeof e=="function"&&this.addEventListener(t,e,{[sf]:!0})}})});qe.prototype.addEventListener=yA;qe.prototype.removeEventListener=bA;Oy.exports=qe;function wy(t,e,i,r){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:of[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=n.autoPong,!of.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${of.join(", ")})`);let s;if(e instanceof nf)s=e;else try{s=new nf(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),t._url=s.href;let o=s.protocol==="wss:",a=s.protocol==="ws+unix:",l;if(s.protocol!=="ws:"&&!o&&!a?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:a&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"),l){let v=new SyntaxError(l);if(t._redirects===0)throw v;ra(t,v);return}let c=o?443:80,u=fA(16).toString("base64"),f=o?lA.request:cA.request,d=new Set,g;if(n.createConnection=n.createConnection||(o?OA:kA),n.defaultPort=n.defaultPort||c,n.port=s.port||c,n.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},n.path=s.pathname+s.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(g=new Ti(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=_A({[Ti.extensionName]:g.offer()})),i.length){for(let v of i){if(typeof v!="string"||!EA.test(v)||d.has(v))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(v)}n.headers["Sec-WebSocket-Protocol"]=i.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(s.username||s.password)&&(n.auth=`${s.username}:${s.password}`),a){let v=n.path.split(":");n.socketPath=v[0],n.path=v[1]}let m;if(n.followRedirects){if(t._redirects===0){t._originalIpc=a,t._originalSecure=o,t._originalHostOrSocketPath=a?n.socketPath:s.host;let v=r&&r.headers;if(r={...r,headers:{}},v)for(let[b,_]of Object.entries(v))r.headers[b.toLowerCase()]=_}else if(t.listenerCount("redirect")===0){let v=a?t._originalIpc?n.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:s.host===t._originalHostOrSocketPath;(!v||t._originalSecure&&!o)&&(delete n.headers.authorization,delete n.headers.cookie,v||delete n.headers.host,n.auth=void 0)}n.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),m=t._req=f(n),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=f(n);n.timeout&&m.on("timeout",()=>{St(t,m,"Opening handshake has timed out")}),m.on("error",v=>{m===null||m[_y]||(m=t._req=null,ra(t,v))}),m.on("response",v=>{let b=v.headers.location,_=v.statusCode;if(b&&n.followRedirects&&_>=300&&_<400){if(++t._redirects>n.maxRedirects){St(t,m,"Maximum redirects exceeded");return}m.abort();let S;try{S=new nf(b,e)}catch{let k=new SyntaxError(`Invalid URL: ${b}`);ra(t,k);return}wy(t,S,i,r)}else t.emit("unexpected-response",m,v)||St(t,m,`Unexpected server response: ${v.statusCode}`)}),m.on("upgrade",(v,b,_)=>{if(t.emit("upgrade",v),t.readyState!==qe.CONNECTING)return;m=t._req=null;let S=v.headers.upgrade;if(S===void 0||S.toLowerCase()!=="websocket"){St(t,b,"Invalid Upgrade header");return}let O=hA("sha1").update(u+mA).digest("base64");if(v.headers["sec-websocket-accept"]!==O){St(t,b,"Invalid Sec-WebSocket-Accept header");return}let k=v.headers["sec-websocket-protocol"],E;if(k!==void 0?d.size?d.has(k)||(E="Server sent an invalid subprotocol"):E="Server sent a subprotocol but none was requested":d.size&&(E="Server sent no subprotocol"),E){St(t,b,E);return}k&&(t._protocol=k);let R=v.headers["sec-websocket-extensions"];if(R!==void 0){if(!g){St(t,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let T;try{T=wA(R)}catch{St(t,b,"Invalid Sec-WebSocket-Extensions header");return}let A=Object.keys(T);if(A.length!==1||A[0]!==Ti.extensionName){St(t,b,"Server indicated an extension that was not requested");return}try{g.accept(T[Ti.extensionName])}catch{St(t,b,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Ti.extensionName]=g}t.setSocket(b,_,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(m,t):m.end()}function ra(t,e){t._readyState=qe.CLOSING,t.emit("error",e),t.emitClose()}function kA(t){return t.path=t.socketPath,yy.connect(t)}function OA(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=yy.isIP(t.host)?"":t.host),uA.connect(t)}function St(t,e,i){t._readyState=qe.CLOSING;let r=new Error(i);Error.captureStackTrace(r,St),e.setHeader?(e[_y]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(ra,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function af(t,e,i){if(e){let r=xA(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(i){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${ci[t.readyState]})`);process.nextTick(i,r)}}function CA(t,e){let i=this[nt];i._closeFrameReceived=!0,i._closeMessage=e,i._closeCode=t,i._socket[nt]!==void 0&&(i._socket.removeListener("data",na),process.nextTick(xy,i._socket),t===1005?i.close():i.close(t,e))}function TA(){let t=this[nt];t.isPaused||t._socket.resume()}function AA(t){let e=this[nt];e._socket[nt]!==void 0&&(e._socket.removeListener("data",na),process.nextTick(xy,e._socket),e.close(t[vA])),e.emit("error",t)}function vy(){this[nt].emitClose()}function IA(t,e){this[nt].emit("message",t,e)}function NA(t){let e=this[nt];e._autoPong&&e.pong(t,!this._isServer,by),e.emit("ping",t)}function LA(t){this[nt].emit("pong",t)}function xy(t){t.resume()}function Sy(){let t=this[nt];this.removeListener("close",Sy),this.removeListener("data",na),this.removeListener("end",Ey),t._readyState=qe.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[nt]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",vy),t._receiver.on("finish",vy))}function na(t){this[nt]._receiver.write(t)||this.pause()}function Ey(){let t=this[nt];t._readyState=qe.CLOSING,t._receiver.end(),this.end()}function ky(){let t=this[nt];this.removeListener("error",ky),this.on("error",by),t&&(t._readyState=qe.CLOSING,this.destroy())}});var Ty=w((jL,Cy)=>{"use strict";var{tokenChars:BA}=Wn();function RA(t){let e=new Set,i=-1,r=-1,n=0;for(n;n{"use strict";var PA=require("events"),sa=require("http"),{Duplex:UL}=require("stream"),{createHash:MA}=require("crypto"),Ay=rf(),sr=Yn(),FA=Ty(),qA=lf(),{GUID:DA,kWebSocket:jA}=Oi(),UA=/^[+/0-9A-Za-z]{22}==$/,Iy=0,Ny=1,By=2,cf=class extends PA{constructor(e,i){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:qA,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=sa.createServer((r,n)=>{let s=sa.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),n.end(s)}),this._server.listen(e.port,e.host,e.backlog,i)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=$A(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,o)=>{this.handleUpgrade(n,s,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Iy}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===By){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Zn,this);return}if(e&&this.once("close",e),this._state!==Ny)if(this._state=Ny,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Zn,this):process.nextTick(Zn,this);else{let i=this._server;this._removeListeners(),this._removeListeners=this._server=null,i.close(()=>{Zn(this)})}}shouldHandle(e){if(this.options.path){let i=e.url.indexOf("?");if((i!==-1?e.url.slice(0,i):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,i,r,n){i.on("error",Ly);let s=e.headers["sec-websocket-key"],o=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){or(this,e,i,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){or(this,e,i,400,"Invalid Upgrade header");return}if(s===void 0||!UA.test(s)){or(this,e,i,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==8&&a!==13){or(this,e,i,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){Qn(i,400);return}let l=e.headers["sec-websocket-protocol"],c=new Set;if(l!==void 0)try{c=FA.parse(l)}catch{or(this,e,i,400,"Invalid Sec-WebSocket-Protocol header");return}let u=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&u!==void 0){let d=new sr(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let g=Ay.parse(u);g[sr.extensionName]&&(d.accept(g[sr.extensionName]),f[sr.extensionName]=d)}catch{or(this,e,i,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(g,m,v,b)=>{if(!g)return Qn(i,m||401,v,b);this.completeUpgrade(f,s,c,e,i,r,n)});return}if(!this.options.verifyClient(d))return Qn(i,401)}this.completeUpgrade(f,s,c,e,i,r,n)}completeUpgrade(e,i,r,n,s,o,a){if(!s.readable||!s.writable)return s.destroy();if(s[jA])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Iy)return Qn(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${MA("sha1").update(i+DA).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(r.size){let f=this.options.handleProtocols?this.options.handleProtocols(r,n):r.values().next().value;f&&(c.push(`Sec-WebSocket-Protocol: ${f}`),u._protocol=f)}if(e[sr.extensionName]){let f=e[sr.extensionName].params,d=Ay.format({[sr.extensionName]:[f]});c.push(`Sec-WebSocket-Extensions: ${d}`),u._extensions=e}this.emit("headers",c,n),s.write(c.concat(`\r +`,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;let i=Go(e),r=Vr(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let i=Go(e),r=Vr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(r=>r.type==="newline"||r.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())}}};wv.Parser=qu});var Ov=_(Un=>{"use strict";var xv=ku(),rT=Ln(),jn=Pn(),nT=Sc(),sT=Se(),oT=Fu(),Sv=Du();function Ev(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new oT.LineCounter||null,prettyErrors:e}}function aT(t,e={}){let{lineCounter:i,prettyErrors:r}=Ev(e),n=new Sv.Parser(i==null?void 0:i.addNewLine),s=new xv.Composer(e),o=Array.from(s.compose(n.parse(t)));if(r&&i)for(let a of o)a.errors.forEach(jn.prettifyError(t,i)),a.warnings.forEach(jn.prettifyError(t,i));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function kv(t,e={}){let{lineCounter:i,prettyErrors:r}=Ev(e),n=new Sv.Parser(i==null?void 0:i.addNewLine),s=new xv.Composer(e),o=null;for(let a of s.compose(n.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new jn.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(o.errors.forEach(jn.prettifyError(t,i)),o.warnings.forEach(jn.prettifyError(t,i))),o}function lT(t,e,i){let r;typeof e=="function"?r=e:i===void 0&&e&&typeof e=="object"&&(i=e);let n=kv(t,i);if(!n)return null;if(n.warnings.forEach(s=>nT.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:r},i))}function cT(t,e,i){var n;let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){let s=Math.round(i);i=s<1?void 0:s>8?{indent:8}:{indent:s}}if(t===void 0){let{keepUndefined:s}=(n=i!=null?i:e)!=null?n:{};if(!s)return}return sT.isDocument(t)&&!r?t.toString(i):new rT.Document(t,r,i).toString(i)}Un.parse=lT;Un.parseAllDocuments=aT;Un.parseDocument=kv;Un.stringify=cT});var Tv=_(Oe=>{"use strict";var uT=ku(),fT=Ln(),hT=su(),ju=Pn(),pT=gn(),ki=Se(),dT=wi(),mT=De(),gT=Si(),vT=Ei(),yT=Vo(),bT=Pu(),_T=Fu(),wT=Du(),Yo=Ov(),Cv=hn();Oe.Composer=uT.Composer;Oe.Document=fT.Document;Oe.Schema=hT.Schema;Oe.YAMLError=ju.YAMLError;Oe.YAMLParseError=ju.YAMLParseError;Oe.YAMLWarning=ju.YAMLWarning;Oe.Alias=pT.Alias;Oe.isAlias=ki.isAlias;Oe.isCollection=ki.isCollection;Oe.isDocument=ki.isDocument;Oe.isMap=ki.isMap;Oe.isNode=ki.isNode;Oe.isPair=ki.isPair;Oe.isScalar=ki.isScalar;Oe.isSeq=ki.isSeq;Oe.Pair=dT.Pair;Oe.Scalar=mT.Scalar;Oe.YAMLMap=gT.YAMLMap;Oe.YAMLSeq=vT.YAMLSeq;Oe.CST=yT;Oe.Lexer=bT.Lexer;Oe.LineCounter=_T.LineCounter;Oe.Parser=wT.Parser;Oe.parse=Yo.parse;Oe.parseAllDocuments=Yo.parseAllDocuments;Oe.parseDocument=Yo.parseDocument;Oe.stringify=Yo.stringify;Oe.visit=Cv.visit;Oe.visitAsync=Cv.visitAsync});var Lv=_((fL,Nv)=>{"use strict";var{Duplex:xT}=require("stream");function Av(t){t.emit("close")}function ST(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Iv(t){this.removeListener("error",Iv),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function ET(t,e){let i=!0,r=new xT({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(s,o){let a=!o&&r._readableState.objectMode?s.toString():s;r.push(a)||t.pause()}),t.once("error",function(s){r.destroyed||(i=!1,r.destroy(s))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(n,s){if(t.readyState===t.CLOSED){s(n),process.nextTick(Av,r);return}let o=!1;t.once("error",function(l){o=!0,s(l)}),t.once("close",function(){o||s(n),process.nextTick(Av,r)}),i&&t.terminate()},r._final=function(n){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(n)});return}t._socket!==null&&(t._socket._writableState.finished?(n(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){n()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(n,s,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(n,s,o)});return}t.send(n,o)},r.on("end",ST),r.on("error",Iv),r}Nv.exports=ET});var Oi=_((hL,Bv)=>{"use strict";Bv.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var $n=_((pL,Wo)=>{"use strict";var{EMPTY_BUFFER:kT}=Oi(),Uu=Buffer[Symbol.species];function OT(t,e){if(t.length===0)return kT;if(t.length===1)return t[0];let i=Buffer.allocUnsafe(e),r=0;for(let n=0;n{"use strict";var Mv=Symbol("kDone"),Vu=Symbol("kRun"),Hu=class{constructor(e){this[Mv]=()=>{this.pending--,this[Vu]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Vu]()}[Vu](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Mv])}}};Fv.exports=Hu});var Gn=_((mL,$v)=>{"use strict";var Vn=require("zlib"),Dv=$n(),TT=qv(),{kStatusCode:jv}=Oi(),AT=Buffer[Symbol.species],IT=Buffer.from([0,0,255,255]),Jo=Symbol("permessage-deflate"),ai=Symbol("total-length"),Hn=Symbol("callback"),Ci=Symbol("buffers"),zo=Symbol("error"),Ko,Gu=class{constructor(e,i,r){if(this._maxPayload=r|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!i,this._deflate=null,this._inflate=null,this.params=null,!Ko){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Ko=new TT(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[Hn];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let i=this._options,r=e.find(n=>!(i.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(i.serverMaxWindowBits===!1||typeof i.serverMaxWindowBits=="number"&&i.serverMaxWindowBits>n.server_max_window_bits)||typeof i.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return i.serverNoContextTakeover&&(r.server_no_context_takeover=!0),i.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof i.serverMaxWindowBits=="number"&&(r.server_max_window_bits=i.serverMaxWindowBits),typeof i.clientMaxWindowBits=="number"?r.client_max_window_bits=i.clientMaxWindowBits:(r.client_max_window_bits===!0||i.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let i=e[0];if(this._options.clientNoContextTakeover===!1&&i.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!i.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(i.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&i.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return i}normalizeParams(e){return e.forEach(i=>{Object.keys(i).forEach(r=>{let n=i[r];if(n.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(n=n[0],r==="client_max_window_bits"){if(n!==!0){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else if(r==="server_max_window_bits"){let s=+n;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${n}`);n=s}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${n}`)}else throw new Error(`Unknown parameter "${r}"`);i[r]=n})}),e}decompress(e,i,r){Ko.add(n=>{this._decompress(e,i,(s,o)=>{n(),r(s,o)})})}compress(e,i,r){Ko.add(n=>{this._compress(e,i,(s,o)=>{n(),r(s,o)})})}_decompress(e,i,r){let n=this._isServer?"client":"server";if(!this._inflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?Vn.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=Vn.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[Jo]=this,this._inflate[ai]=0,this._inflate[Ci]=[],this._inflate.on("error",LT),this._inflate.on("data",Uv)}this._inflate[Hn]=r,this._inflate.write(e),i&&this._inflate.write(IT),this._inflate.flush(()=>{let s=this._inflate[zo];if(s){this._inflate.close(),this._inflate=null,r(s);return}let o=Dv.concat(this._inflate[Ci],this._inflate[ai]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ai]=0,this._inflate[Ci]=[],i&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,i,r){let n=this._isServer?"server":"client";if(!this._deflate){let s=`${n}_max_window_bits`,o=typeof this.params[s]!="number"?Vn.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=Vn.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[ai]=0,this._deflate[Ci]=[],this._deflate.on("data",NT)}this._deflate[Hn]=r,this._deflate.write(e),this._deflate.flush(Vn.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=Dv.concat(this._deflate[Ci],this._deflate[ai]);i&&(s=new AT(s.buffer,s.byteOffset,s.length-4)),this._deflate[Hn]=null,this._deflate[ai]=0,this._deflate[Ci]=[],i&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),r(null,s)})}};$v.exports=Gu;function NT(t){this[Ci].push(t),this[ai]+=t.length}function Uv(t){if(this[ai]+=t.length,this[Jo]._maxPayload<1||this[ai]<=this[Jo]._maxPayload){this[Ci].push(t);return}this[zo]=new RangeError("Max payload size exceeded"),this[zo].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[zo][jv]=1009,this.removeListener("data",Uv),this.reset()}function LT(t){this[Jo]._inflate=null,t[jv]=1007,this[Hn](t)}});var Yn=_((gL,Zo)=>{"use strict";var{isUtf8:Vv}=require("buffer"),BT=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function RT(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function Yu(t){let e=t.length,i=0;for(;i=e||(t[i+1]&192)!==128||(t[i+2]&192)!==128||t[i]===224&&(t[i+1]&224)===128||t[i]===237&&(t[i+1]&224)===160)return!1;i+=3}else if((t[i]&248)===240){if(i+3>=e||(t[i+1]&192)!==128||(t[i+2]&192)!==128||(t[i+3]&192)!==128||t[i]===240&&(t[i+1]&240)===128||t[i]===244&&t[i+1]>143||t[i]>244)return!1;i+=4}else return!1;return!0}Zo.exports={isValidStatusCode:RT,isValidUTF8:Yu,tokenChars:BT};if(Vv)Zo.exports.isValidUTF8=function(t){return t.length<24?Yu(t):Vv(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=require("utf-8-validate");Zo.exports.isValidUTF8=function(e){return e.length<32?Yu(e):t(e)}}catch{}});var Zu=_((vL,Jv)=>{"use strict";var{Writable:PT}=require("stream"),Hv=Gn(),{BINARY_TYPES:MT,EMPTY_BUFFER:Gv,kStatusCode:FT,kWebSocket:qT}=Oi(),{concat:Wu,toArrayBuffer:DT,unmask:jT}=$n(),{isValidStatusCode:UT,isValidUTF8:Yv}=Yn(),Qo=Buffer[Symbol.species],Nt=0,Wv=1,Kv=2,zv=3,Ku=4,zu=5,Xo=6,Ju=class extends PT{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||MT[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[qT]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Nt}_write(e,i,r){if(this._opcode===8&&this._state==Nt)return r();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e=r.length?i.set(this._buffers.shift(),n):(i.set(new Uint8Array(r.buffer,r.byteOffset,e),n),this._buffers[0]=new Qo(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return i}startLoop(e){this._loop=!0;do switch(this._state){case Nt:this.getInfo(e);break;case Wv:this.getPayloadLength16(e);break;case Kv:this.getPayloadLength64(e);break;case zv:this.getMask();break;case Ku:this.getData(e);break;case zu:case Xo:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let i=this.consume(2);if((i[0]&48)!==0){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let r=(i[0]&64)===64;if(r&&!this._extensions[Hv.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(i[0]&128)===128,this._opcode=i[0]&15,this._payloadLength=i[1]&127,this._opcode===0){if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(r){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(i[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=Wv:this._payloadLength===127?this._state=Kv:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let i=this.consume(8),r=i.readUInt32BE(0);if(r>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=r*Math.pow(2,32)+i.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let i=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(i);return}this._masked?this._state=zv:this._state=Ku}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Ku}getData(e){let i=Gv;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(i,e);return}if(this._compressed){this._state=zu,this.decompress(i,e);return}i.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(i)),this.dataMessage(e)}decompress(e,i){this._extensions[Hv.extensionName].decompress(e,this._fin,(n,s)=>{if(n)return i(n);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");i(o);return}this._fragments.push(s)}this.dataMessage(i),this._state===Nt&&this.startLoop(i)})}dataMessage(e){if(!this._fin){this._state=Nt;return}let i=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Wu(r,i):this._binaryType==="arraybuffer"?n=DT(Wu(r,i)):n=r,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=Nt):(this._state=Xo,setImmediate(()=>{this.emit("message",n,!0),this._state=Nt,this.startLoop(e)}))}else{let n=Wu(r,i);if(!this._skipUTF8Validation&&!Yv(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===zu||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=Nt):(this._state=Xo,setImmediate(()=>{this.emit("message",n,!1),this._state=Nt,this.startLoop(e)}))}}controlMessage(e,i){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Gv),this.end();else{let r=e.readUInt16BE(0);if(!UT(r)){let s=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");i(s);return}let n=new Qo(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Yv(n)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");i(s);return}this._loop=!1,this.emit("conclude",r,n),this.end()}this._state=Nt;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Nt):(this._state=Xo,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Nt,this.startLoop(i)}))}createError(e,i,r,n,s){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${i}`:i);return Error.captureStackTrace(o,this.createError),o.code=s,o[FT]=n,o}};Jv.exports=Ju});var Xu=_((bL,Xv)=>{"use strict";var{Duplex:yL}=require("stream"),{randomFillSync:$T}=require("crypto"),Zv=Gn(),{EMPTY_BUFFER:VT}=Oi(),{isValidStatusCode:HT}=Yn(),{mask:Qv,toBuffer:Hr}=$n(),Ut=Symbol("kByteLength"),GT=Buffer.alloc(4),ea=8*1024,rr,Gr=ea,Qu=class t{constructor(e,i,r){this._extensions=i||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,i){let r,n=!1,s=2,o=!1;i.mask&&(r=i.maskBuffer||GT,i.generateMask?i.generateMask(r):(Gr===ea&&(rr===void 0&&(rr=Buffer.alloc(ea)),$T(rr,0,ea),Gr=0),r[0]=rr[Gr++],r[1]=rr[Gr++],r[2]=rr[Gr++],r[3]=rr[Gr++]),o=(r[0]|r[1]|r[2]|r[3])===0,s=6);let a;typeof e=="string"?(!i.mask||o)&&i[Ut]!==void 0?a=i[Ut]:(e=Buffer.from(e),a=e.length):(a=e.length,n=i.mask&&i.readOnly&&!o);let l=a;a>=65536?(s+=8,l=127):a>125&&(s+=2,l=126);let c=Buffer.allocUnsafe(n?a+s:s);return c[0]=i.fin?i.opcode|128:i.opcode,i.rsv1&&(c[0]|=64),c[1]=l,l===126?c.writeUInt16BE(a,2):l===127&&(c[2]=c[3]=0,c.writeUIntBE(a,4,6)),i.mask?(c[1]|=128,c[s-4]=r[0],c[s-3]=r[1],c[s-2]=r[2],c[s-1]=r[3],o?[c,e]:n?(Qv(e,r,c,s,a),[c]):(Qv(e,r,e,0,a),[c,e])):[c,e]}close(e,i,r,n){let s;if(e===void 0)s=VT;else{if(typeof e!="number"||!HT(e))throw new TypeError("First argument must be a valid error code number");if(i===void 0||!i.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let a=Buffer.byteLength(i);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+a),s.writeUInt16BE(e,0),typeof i=="string"?s.write(i,2):s.set(i,2)}}let o={[Ut]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,o,n]):this.sendFrame(t.frame(s,o),n)}ping(e,i,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Hr(e),n=e.length,s=Hr.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Ut]:n,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,i,r){let n,s;if(typeof e=="string"?(n=Buffer.byteLength(e),s=!1):(e=Hr(e),n=e.length,s=Hr.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[Ut]:n,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,i,r){let n=this._extensions[Zv.extensionName],s=i.binary?2:1,o=i.compress,a,l;if(typeof e=="string"?(a=Buffer.byteLength(e),l=!1):(e=Hr(e),a=e.length,l=Hr.readOnly),this._firstFragment?(this._firstFragment=!1,o&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=a>=n._threshold),this._compress=o):(o=!1,s=0),i.fin&&(this._firstFragment=!0),n){let c={[Ut]:a,fin:i.fin,generateMask:this._generateMask,mask:i.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:o};this._deflating?this.enqueue([this.dispatch,e,this._compress,c,r]):this.dispatch(e,this._compress,c,r)}else this.sendFrame(t.frame(e,{[Ut]:a,fin:i.fin,generateMask:this._generateMask,mask:i.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:l,rsv1:!1}),r)}dispatch(e,i,r,n){if(!i){this.sendFrame(t.frame(e,r),n);return}let s=this._extensions[Zv.extensionName];this._bufferedBytes+=r[Ut],this._deflating=!0,s.compress(e,r.fin,(o,a)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(l);for(let c=0;c{"use strict";var{kForOnEventAttribute:Wn,kListener:ef}=Oi(),ey=Symbol("kCode"),ty=Symbol("kData"),iy=Symbol("kError"),ry=Symbol("kMessage"),ny=Symbol("kReason"),Yr=Symbol("kTarget"),sy=Symbol("kType"),oy=Symbol("kWasClean"),li=class{constructor(e){this[Yr]=null,this[sy]=e}get target(){return this[Yr]}get type(){return this[sy]}};Object.defineProperty(li.prototype,"target",{enumerable:!0});Object.defineProperty(li.prototype,"type",{enumerable:!0});var nr=class extends li{constructor(e,i={}){super(e),this[ey]=i.code===void 0?0:i.code,this[ny]=i.reason===void 0?"":i.reason,this[oy]=i.wasClean===void 0?!1:i.wasClean}get code(){return this[ey]}get reason(){return this[ny]}get wasClean(){return this[oy]}};Object.defineProperty(nr.prototype,"code",{enumerable:!0});Object.defineProperty(nr.prototype,"reason",{enumerable:!0});Object.defineProperty(nr.prototype,"wasClean",{enumerable:!0});var Wr=class extends li{constructor(e,i={}){super(e),this[iy]=i.error===void 0?null:i.error,this[ry]=i.message===void 0?"":i.message}get error(){return this[iy]}get message(){return this[ry]}};Object.defineProperty(Wr.prototype,"error",{enumerable:!0});Object.defineProperty(Wr.prototype,"message",{enumerable:!0});var Kn=class extends li{constructor(e,i={}){super(e),this[ty]=i.data===void 0?null:i.data}get data(){return this[ty]}};Object.defineProperty(Kn.prototype,"data",{enumerable:!0});var YT={addEventListener(t,e,i={}){for(let n of this.listeners(t))if(!i[Wn]&&n[ef]===e&&!n[Wn])return;let r;if(t==="message")r=function(s,o){let a=new Kn("message",{data:o?s:s.toString()});a[Yr]=this,ta(e,this,a)};else if(t==="close")r=function(s,o){let a=new nr("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Yr]=this,ta(e,this,a)};else if(t==="error")r=function(s){let o=new Wr("error",{error:s,message:s.message});o[Yr]=this,ta(e,this,o)};else if(t==="open")r=function(){let s=new li("open");s[Yr]=this,ta(e,this,s)};else return;r[Wn]=!!i[Wn],r[ef]=e,i.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let i of this.listeners(t))if(i[ef]===e&&!i[Wn]){this.removeListener(t,i);break}}};ay.exports={CloseEvent:nr,ErrorEvent:Wr,Event:li,EventTarget:YT,MessageEvent:Kn};function ta(t,e,i){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,i):t.call(e,i)}});var tf=_((wL,cy)=>{"use strict";var{tokenChars:zn}=Yn();function Zt(t,e,i){t[e]===void 0?t[e]=[i]:t[e].push(i)}function WT(t){let e=Object.create(null),i=Object.create(null),r=!1,n=!1,s=!1,o,a,l=-1,c=-1,u=-1,f=0;for(;f{let i=t[e];return Array.isArray(i)||(i=[i]),i.map(r=>[e].concat(Object.keys(r).map(n=>{let s=r[n];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?n:`${n}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}cy.exports={format:KT,parse:WT}});var af=_((EL,_y)=>{"use strict";var zT=require("events"),JT=require("https"),ZT=require("http"),hy=require("net"),QT=require("tls"),{randomBytes:XT,createHash:eA}=require("crypto"),{Duplex:xL,Readable:SL}=require("stream"),{URL:rf}=require("url"),Ti=Gn(),tA=Zu(),iA=Xu(),{BINARY_TYPES:uy,EMPTY_BUFFER:ia,GUID:rA,kForOnEventAttribute:nf,kListener:nA,kStatusCode:sA,kWebSocket:nt,NOOP:py}=Oi(),{EventTarget:{addEventListener:oA,removeEventListener:aA}}=ly(),{format:lA,parse:cA}=tf(),{toBuffer:uA}=$n(),fA=30*1e3,dy=Symbol("kAborted"),sf=[8,13],ci=["CONNECTING","OPEN","CLOSING","CLOSED"],hA=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,qe=class t extends zT{constructor(e,i,r){super(),this._binaryType=uy[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ia,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,i===void 0?i=[]:Array.isArray(i)||(typeof i=="object"&&i!==null?(r=i,i=[]):i=[i]),my(this,e,i,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){uy.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,i,r){let n=new tA({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation});this._sender=new iA(e,this._extensions,r.generateMask),this._receiver=n,this._socket=e,n[nt]=this,e[nt]=this,n.on("conclude",mA),n.on("drain",gA),n.on("error",vA),n.on("message",yA),n.on("ping",bA),n.on("pong",_A),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),i.length>0&&e.unshift(i),e.on("close",vy),e.on("data",na),e.on("end",yy),e.on("error",by),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Ti.extensionName]&&this._extensions[Ti.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,i){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){St(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,i,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),fA)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=i=void 0):typeof i=="function"&&(r=i,i=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){of(this,e,r);return}i===void 0&&(i=!this._isServer),this._sender.ping(e||ia,i,r)}pong(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=i=void 0):typeof i=="function"&&(r=i,i=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){of(this,e,r);return}i===void 0&&(i=!this._isServer),this._sender.pong(e||ia,i,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,i,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof i=="function"&&(r=i,i={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){of(this,e,r);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...i};this._extensions[Ti.extensionName]||(n.compress=!1),this._sender.send(e||ia,n,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){St(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(qe,"CONNECTING",{enumerable:!0,value:ci.indexOf("CONNECTING")});Object.defineProperty(qe.prototype,"CONNECTING",{enumerable:!0,value:ci.indexOf("CONNECTING")});Object.defineProperty(qe,"OPEN",{enumerable:!0,value:ci.indexOf("OPEN")});Object.defineProperty(qe.prototype,"OPEN",{enumerable:!0,value:ci.indexOf("OPEN")});Object.defineProperty(qe,"CLOSING",{enumerable:!0,value:ci.indexOf("CLOSING")});Object.defineProperty(qe.prototype,"CLOSING",{enumerable:!0,value:ci.indexOf("CLOSING")});Object.defineProperty(qe,"CLOSED",{enumerable:!0,value:ci.indexOf("CLOSED")});Object.defineProperty(qe.prototype,"CLOSED",{enumerable:!0,value:ci.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(qe.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(qe.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[nf])return e[nA];return null},set(e){for(let i of this.listeners(t))if(i[nf]){this.removeListener(t,i);break}typeof e=="function"&&this.addEventListener(t,e,{[nf]:!0})}})});qe.prototype.addEventListener=oA;qe.prototype.removeEventListener=aA;_y.exports=qe;function my(t,e,i,r){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:sf[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=n.autoPong,!sf.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${sf.join(", ")})`);let s;if(e instanceof rf)s=e;else try{s=new rf(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),t._url=s.href;let o=s.protocol==="wss:",a=s.protocol==="ws+unix:",l;if(s.protocol!=="ws:"&&!o&&!a?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:a&&!s.pathname?l="The URL's pathname is empty":s.hash&&(l="The URL contains a fragment identifier"),l){let y=new SyntaxError(l);if(t._redirects===0)throw y;ra(t,y);return}let c=o?443:80,u=XT(16).toString("base64"),f=o?JT.request:ZT.request,d=new Set,g;if(n.createConnection=n.createConnection||(o?dA:pA),n.defaultPort=n.defaultPort||c,n.port=s.port||c,n.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},n.path=s.pathname+s.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(g=new Ti(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=lA({[Ti.extensionName]:g.offer()})),i.length){for(let y of i){if(typeof y!="string"||!hA.test(y)||d.has(y))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(y)}n.headers["Sec-WebSocket-Protocol"]=i.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(s.username||s.password)&&(n.auth=`${s.username}:${s.password}`),a){let y=n.path.split(":");n.socketPath=y[0],n.path=y[1]}let m;if(n.followRedirects){if(t._redirects===0){t._originalIpc=a,t._originalSecure=o,t._originalHostOrSocketPath=a?n.socketPath:s.host;let y=r&&r.headers;if(r={...r,headers:{}},y)for(let[b,x]of Object.entries(y))r.headers[b.toLowerCase()]=x}else if(t.listenerCount("redirect")===0){let y=a?t._originalIpc?n.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:s.host===t._originalHostOrSocketPath;(!y||t._originalSecure&&!o)&&(delete n.headers.authorization,delete n.headers.cookie,y||delete n.headers.host,n.auth=void 0)}n.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),m=t._req=f(n),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=f(n);n.timeout&&m.on("timeout",()=>{St(t,m,"Opening handshake has timed out")}),m.on("error",y=>{m===null||m[dy]||(m=t._req=null,ra(t,y))}),m.on("response",y=>{let b=y.headers.location,x=y.statusCode;if(b&&n.followRedirects&&x>=300&&x<400){if(++t._redirects>n.maxRedirects){St(t,m,"Maximum redirects exceeded");return}m.abort();let E;try{E=new rf(b,e)}catch{let k=new SyntaxError(`Invalid URL: ${b}`);ra(t,k);return}my(t,E,i,r)}else t.emit("unexpected-response",m,y)||St(t,m,`Unexpected server response: ${y.statusCode}`)}),m.on("upgrade",(y,b,x)=>{if(t.emit("upgrade",y),t.readyState!==qe.CONNECTING)return;m=t._req=null;let E=y.headers.upgrade;if(E===void 0||E.toLowerCase()!=="websocket"){St(t,b,"Invalid Upgrade header");return}let O=eA("sha1").update(u+rA).digest("base64");if(y.headers["sec-websocket-accept"]!==O){St(t,b,"Invalid Sec-WebSocket-Accept header");return}let k=y.headers["sec-websocket-protocol"],S;if(k!==void 0?d.size?d.has(k)||(S="Server sent an invalid subprotocol"):S="Server sent a subprotocol but none was requested":d.size&&(S="Server sent no subprotocol"),S){St(t,b,S);return}k&&(t._protocol=k);let R=y.headers["sec-websocket-extensions"];if(R!==void 0){if(!g){St(t,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let T;try{T=cA(R)}catch{St(t,b,"Invalid Sec-WebSocket-Extensions header");return}let A=Object.keys(T);if(A.length!==1||A[0]!==Ti.extensionName){St(t,b,"Server indicated an extension that was not requested");return}try{g.accept(T[Ti.extensionName])}catch{St(t,b,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[Ti.extensionName]=g}t.setSocket(b,x,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(m,t):m.end()}function ra(t,e){t._readyState=qe.CLOSING,t.emit("error",e),t.emitClose()}function pA(t){return t.path=t.socketPath,hy.connect(t)}function dA(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=hy.isIP(t.host)?"":t.host),QT.connect(t)}function St(t,e,i){t._readyState=qe.CLOSING;let r=new Error(i);Error.captureStackTrace(r,St),e.setHeader?(e[dy]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(ra,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function of(t,e,i){if(e){let r=uA(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(i){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${ci[t.readyState]})`);process.nextTick(i,r)}}function mA(t,e){let i=this[nt];i._closeFrameReceived=!0,i._closeMessage=e,i._closeCode=t,i._socket[nt]!==void 0&&(i._socket.removeListener("data",na),process.nextTick(gy,i._socket),t===1005?i.close():i.close(t,e))}function gA(){let t=this[nt];t.isPaused||t._socket.resume()}function vA(t){let e=this[nt];e._socket[nt]!==void 0&&(e._socket.removeListener("data",na),process.nextTick(gy,e._socket),e.close(t[sA])),e.emit("error",t)}function fy(){this[nt].emitClose()}function yA(t,e){this[nt].emit("message",t,e)}function bA(t){let e=this[nt];e._autoPong&&e.pong(t,!this._isServer,py),e.emit("ping",t)}function _A(t){this[nt].emit("pong",t)}function gy(t){t.resume()}function vy(){let t=this[nt];this.removeListener("close",vy),this.removeListener("data",na),this.removeListener("end",yy),t._readyState=qe.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[nt]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",fy),t._receiver.on("finish",fy))}function na(t){this[nt]._receiver.write(t)||this.pause()}function yy(){let t=this[nt];t._readyState=qe.CLOSING,t._receiver.end(),this.end()}function by(){let t=this[nt];this.removeListener("error",by),this.on("error",py),t&&(t._readyState=qe.CLOSING,this.destroy())}});var xy=_((kL,wy)=>{"use strict";var{tokenChars:wA}=Yn();function xA(t){let e=new Set,i=-1,r=-1,n=0;for(n;n{"use strict";var SA=require("events"),sa=require("http"),{Duplex:OL}=require("stream"),{createHash:EA}=require("crypto"),Sy=tf(),sr=Gn(),kA=xy(),OA=af(),{GUID:CA,kWebSocket:TA}=Oi(),AA=/^[+/0-9A-Za-z]{22}==$/,Ey=0,ky=1,Cy=2,lf=class extends SA{constructor(e,i){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:OA,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=sa.createServer((r,n)=>{let s=sa.STATUS_CODES[426];n.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),n.end(s)}),this._server.listen(e.port,e.host,e.backlog,i)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=IA(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,s,o)=>{this.handleUpgrade(n,s,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Ey}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Cy){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Jn,this);return}if(e&&this.once("close",e),this._state!==ky)if(this._state=ky,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Jn,this):process.nextTick(Jn,this);else{let i=this._server;this._removeListeners(),this._removeListeners=this._server=null,i.close(()=>{Jn(this)})}}shouldHandle(e){if(this.options.path){let i=e.url.indexOf("?");if((i!==-1?e.url.slice(0,i):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,i,r,n){i.on("error",Oy);let s=e.headers["sec-websocket-key"],o=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){or(this,e,i,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){or(this,e,i,400,"Invalid Upgrade header");return}if(s===void 0||!AA.test(s)){or(this,e,i,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==8&&a!==13){or(this,e,i,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){Zn(i,400);return}let l=e.headers["sec-websocket-protocol"],c=new Set;if(l!==void 0)try{c=kA.parse(l)}catch{or(this,e,i,400,"Invalid Sec-WebSocket-Protocol header");return}let u=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&u!==void 0){let d=new sr(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let g=Sy.parse(u);g[sr.extensionName]&&(d.accept(g[sr.extensionName]),f[sr.extensionName]=d)}catch{or(this,e,i,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(g,m,y,b)=>{if(!g)return Zn(i,m||401,y,b);this.completeUpgrade(f,s,c,e,i,r,n)});return}if(!this.options.verifyClient(d))return Zn(i,401)}this.completeUpgrade(f,s,c,e,i,r,n)}completeUpgrade(e,i,r,n,s,o,a){if(!s.readable||!s.writable)return s.destroy();if(s[TA])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Ey)return Zn(s,503);let c=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${EA("sha1").update(i+CA).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(r.size){let f=this.options.handleProtocols?this.options.handleProtocols(r,n):r.values().next().value;f&&(c.push(`Sec-WebSocket-Protocol: ${f}`),u._protocol=f)}if(e[sr.extensionName]){let f=e[sr.extensionName].params,d=Sy.format({[sr.extensionName]:[f]});c.push(`Sec-WebSocket-Extensions: ${d}`),u._extensions=e}this.emit("headers",c,n),s.write(c.concat(`\r `).join(`\r -`)),s.removeListener("error",Ly),u.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Zn,this)})),a(u,n)}};Ry.exports=cf;function $A(t,e){for(let i of Object.keys(e))t.on(i,e[i]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function Zn(t){t._state=By,t.emit("close")}function Ly(){this.destroy()}function Qn(t,e,i,r){i=i||sa.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(i),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${sa.STATUS_CODES[e]}\r +`)),s.removeListener("error",Oy),u.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Jn,this)})),a(u,n)}};Ty.exports=lf;function IA(t,e){for(let i of Object.keys(e))t.on(i,e[i]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function Jn(t){t._state=Cy,t.emit("close")}function Oy(){this.destroy()}function Zn(t,e,i,r){i=i||sa.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(i),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${sa.STATUS_CODES[e]}\r `+Object.keys(r).map(n=>`${n}: ${r[n]}`).join(`\r `)+`\r \r -`+i)}function or(t,e,i,r,n){if(t.listenerCount("wsClientError")){let s=new Error(n);Error.captureStackTrace(s,or),t.emit("wsClientError",s,i,e)}else Qn(i,r,n)}});var Dy=w((HL,qy)=>{var Ai=require("constants"),HA=process.cwd,oa=null,GA=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return oa||(oa=HA.call(process)),oa};try{process.cwd()}catch{}typeof process.chdir=="function"&&(pf=process.chdir,process.chdir=function(t){oa=null,pf.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,pf));var pf;qy.exports=YA;function YA(t){Ai.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||i(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=r(t.chmod),t.fchmod=r(t.fchmod),t.lchmod=r(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=n(t.chmodSync),t.fchmodSync=n(t.fchmodSync),t.lchmodSync=n(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,f,d){d&&process.nextTick(d)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,f,d,g){g&&process.nextTick(g)},t.lchownSync=function(){}),GA==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function f(d,g,m){var v=Date.now(),b=0;u(d,g,function _(S){if(S&&(S.code==="EACCES"||S.code==="EPERM")&&Date.now()-v<6e4){setTimeout(function(){t.stat(g,function(O,k){O&&O.code==="ENOENT"?u(d,g,_):m(S)})},b),b<100&&(b+=10);return}m&&m(S)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f}(t.rename)),t.read=typeof t.read!="function"?t.read:function(u){function f(d,g,m,v,b,_){var S;if(_&&typeof _=="function"){var O=0;S=function(k,E,R){if(k&&k.code==="EAGAIN"&&O<10)return O++,u.call(t,d,g,m,v,b,S);_.apply(this,arguments)}}return u.call(t,d,g,m,v,b,S)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(u){return function(f,d,g,m,v){for(var b=0;;)try{return u.call(t,f,d,g,m,v)}catch(_){if(_.code==="EAGAIN"&&b<10){b++;continue}throw _}}}(t.readSync);function e(u){u.lchmod=function(f,d,g){u.open(f,Ai.O_WRONLY|Ai.O_SYMLINK,d,function(m,v){if(m){g&&g(m);return}u.fchmod(v,d,function(b){u.close(v,function(_){g&&g(b||_)})})})},u.lchmodSync=function(f,d){var g=u.openSync(f,Ai.O_WRONLY|Ai.O_SYMLINK,d),m=!0,v;try{v=u.fchmodSync(g,d),m=!1}finally{if(m)try{u.closeSync(g)}catch{}else u.closeSync(g)}return v}}function i(u){Ai.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(f,d,g,m){u.open(f,Ai.O_SYMLINK,function(v,b){if(v){m&&m(v);return}u.futimes(b,d,g,function(_){u.close(b,function(S){m&&m(_||S)})})})},u.lutimesSync=function(f,d,g){var m=u.openSync(f,Ai.O_SYMLINK),v,b=!0;try{v=u.futimesSync(m,d,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return v}):u.futimes&&(u.lutimes=function(f,d,g,m){m&&process.nextTick(m)},u.lutimesSync=function(){})}function r(u){return u&&function(f,d,g){return u.call(t,f,d,function(m){c(m)&&(m=null),g&&g.apply(this,arguments)})}}function n(u){return u&&function(f,d){try{return u.call(t,f,d)}catch(g){if(!c(g))throw g}}}function s(u){return u&&function(f,d,g,m){return u.call(t,f,d,g,function(v){c(v)&&(v=null),m&&m.apply(this,arguments)})}}function o(u){return u&&function(f,d,g){try{return u.call(t,f,d,g)}catch(m){if(!c(m))throw m}}}function a(u){return u&&function(f,d,g){typeof d=="function"&&(g=d,d=null);function m(v,b){b&&(b.uid<0&&(b.uid+=4294967296),b.gid<0&&(b.gid+=4294967296)),g&&g.apply(this,arguments)}return d?u.call(t,f,d,m):u.call(t,f,m)}}function l(u){return u&&function(f,d){var g=d?u.call(t,f,d):u.call(t,f);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function c(u){if(!u||u.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var $y=w((GL,Uy)=>{var jy=require("stream").Stream;Uy.exports=WA;function WA(t){return{ReadStream:e,WriteStream:i};function e(r,n){if(!(this instanceof e))return new e(r,n);jy.call(this);var s=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var o=Object.keys(n),a=0,l=o.length;athis.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(u,f){if(u){s.emit("error",u),s.readable=!1;return}s.fd=f,s.emit("open",f),s._read()})}function i(r,n){if(!(this instanceof i))return new i(r,n);jy.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),o=0,a=s.length;o= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Hy=w((YL,Vy)=>{"use strict";Vy.exports=KA;var zA=Object.getPrototypeOf||function(t){return t.__proto__};function KA(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:zA(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}});var zy=w((WL,gf)=>{var Me=require("fs"),JA=Dy(),ZA=$y(),QA=Hy(),aa=require("util"),et,ca;typeof Symbol=="function"&&typeof Symbol.for=="function"?(et=Symbol.for("graceful-fs.queue"),ca=Symbol.for("graceful-fs.previous")):(et="___graceful-fs.queue",ca="___graceful-fs.previous");function XA(){}function Wy(t,e){Object.defineProperty(t,et,{get:function(){return e}})}var ar=XA;aa.debuglog?ar=aa.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(ar=function(){var t=aa.format.apply(aa,arguments);t="GFS4: "+t.split(/\n/).join(` -GFS4: `),console.error(t)});Me[et]||(Gy=global[et]||[],Wy(Me,Gy),Me.close=function(t){function e(i,r){return t.call(Me,i,function(n){n||Yy(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,ca,{value:t}),e}(Me.close),Me.closeSync=function(t){function e(i){t.apply(Me,arguments),Yy()}return Object.defineProperty(e,ca,{value:t}),e}(Me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){ar(Me[et]),require("assert").equal(Me[et].length,0)}));var Gy;global[et]||Wy(global,Me[et]);gf.exports=df(QA(Me));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Me.__patched&&(gf.exports=df(Me),Me.__patched=!0);function df(t){JA(t),t.gracefulify=df,t.createReadStream=E,t.createWriteStream=R;var e=t.readFile;t.readFile=i;function i(C,L,P){return typeof L=="function"&&(P=L,L=null),U(C,L,P);function U(q,H,j,V){return e(q,H,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Kr([U,[q,H,j],W,V||Date.now(),Date.now()]):typeof j=="function"&&j.apply(this,arguments)})}}var r=t.writeFile;t.writeFile=n;function n(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return r(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return s(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=l);function l(C,L,P,U){return typeof P=="function"&&(U=P,P=0),q(C,L,P,U);function q(H,j,V,W,Q){return a(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var c=t.readdir;t.readdir=f;var u=/^v[0-5]\./;function f(C,L,P){typeof L=="function"&&(P=L,L=null);var U=u.test(process.version)?function(j,V,W,Q){return c(j,q(j,V,W,Q))}:function(j,V,W,Q){return c(j,V,q(j,V,W,Q))};return U(C,L,P);function q(H,j,V,W){return function(Q,Y){Q&&(Q.code==="EMFILE"||Q.code==="ENFILE")?Kr([U,[H,j,V],Q,W||Date.now(),Date.now()]):(Y&&Y.sort&&Y.sort(),typeof V=="function"&&V.call(this,Q,Y))}}}if(process.version.substr(0,4)==="v0.8"){var d=ZA(t);_=d.ReadStream,O=d.WriteStream}var g=t.ReadStream;g&&(_.prototype=Object.create(g.prototype),_.prototype.open=S);var m=t.WriteStream;m&&(O.prototype=Object.create(m.prototype),O.prototype.open=k),Object.defineProperty(t,"ReadStream",{get:function(){return _},set:function(C){_=C},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return O},set:function(C){O=C},enumerable:!0,configurable:!0});var v=_;Object.defineProperty(t,"FileReadStream",{get:function(){return v},set:function(C){v=C},enumerable:!0,configurable:!0});var b=O;Object.defineProperty(t,"FileWriteStream",{get:function(){return b},set:function(C){b=C},enumerable:!0,configurable:!0});function _(C,L){return this instanceof _?(g.apply(this,arguments),this):_.apply(Object.create(_.prototype),arguments)}function S(){var C=this;A(C.path,C.flags,C.mode,function(L,P){L?(C.autoClose&&C.destroy(),C.emit("error",L)):(C.fd=P,C.emit("open",P),C.read())})}function O(C,L){return this instanceof O?(m.apply(this,arguments),this):O.apply(Object.create(O.prototype),arguments)}function k(){var C=this;A(C.path,C.flags,C.mode,function(L,P){L?(C.destroy(),C.emit("error",L)):(C.fd=P,C.emit("open",P))})}function E(C,L){return new t.ReadStream(C,L)}function R(C,L){return new t.WriteStream(C,L)}var T=t.open;t.open=A;function A(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return T(H,j,V,function(Y,de){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}return t}function Kr(t){ar("ENQUEUE",t[0].name,t[1]),Me[et].push(t),mf()}var la;function Yy(){for(var t=Date.now(),e=0;e2&&(Me[et][e][3]=t,Me[et][e][4]=t);mf()}function mf(){if(clearTimeout(la),la=void 0,Me[et].length!==0){var t=Me[et].shift(),e=t[0],i=t[1],r=t[2],n=t[3],s=t[4];if(n===void 0)ar("RETRY",e.name,i),e.apply(null,i);else if(Date.now()-n>=6e4){ar("TIMEOUT",e.name,i);var o=i.pop();typeof o=="function"&&o.call(null,r)}else{var a=Date.now()-s,l=Math.max(s-n,1),c=Math.min(l*1.2,100);a>=c?(ar("RETRY",e.name,i),e.apply(null,i.concat([n]))):Me[et].push(t)}la===void 0&&(la=setTimeout(mf,0))}}});var Jy=w((zL,Ky)=>{function Nt(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}Ky.exports=Nt;Nt.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};Nt.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};Nt.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var i=this._timeouts.shift();if(i===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),i=this._timeouts.shift();else return!1;var r=this,n=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},i);return this._options.unref&&n.unref(),!0};Nt.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var i=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){i._operationTimeoutCb()},i._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Nt.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};Nt.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};Nt.prototype.start=Nt.prototype.try;Nt.prototype.errors=function(){return this._errors};Nt.prototype.attempts=function(){return this._attempts};Nt.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,i=0,r=0;r=i&&(e=n,i=o)}return e}});var Zy=w(lr=>{var eI=Jy();lr.operation=function(t){var e=lr.timeouts(t);return new eI(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};lr.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in t)e[i]=t[i];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n{Qy.exports=Zy()});var eb=w((ZL,ua)=>{ua.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&ua.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ua.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var sb=w((QL,Qr)=>{var Pe=global.process,cr=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};cr(Pe)?(tb=require("assert"),Jr=eb(),ib=/^win/i.test(Pe.platform),Xn=require("events"),typeof Xn!="function"&&(Xn=Xn.EventEmitter),Pe.__signal_exit_emitter__?Je=Pe.__signal_exit_emitter__:(Je=Pe.__signal_exit_emitter__=new Xn,Je.count=0,Je.emitted={}),Je.infinite||(Je.setMaxListeners(1/0),Je.infinite=!0),Qr.exports=function(t,e){if(!cr(global.process))return function(){};tb.equal(typeof t,"function","a callback must be provided for exit handler"),Zr===!1&&vf();var i="exit";e&&e.alwaysLast&&(i="afterexit");var r=function(){Je.removeListener(i,t),Je.listeners("exit").length===0&&Je.listeners("afterexit").length===0&&fa()};return Je.on(i,t),r},fa=function(){!Zr||!cr(global.process)||(Zr=!1,Jr.forEach(function(e){try{Pe.removeListener(e,ha[e])}catch{}}),Pe.emit=pa,Pe.reallyExit=yf,Je.count-=1)},Qr.exports.unload=fa,ur=function(e,i,r){Je.emitted[e]||(Je.emitted[e]=!0,Je.emit(e,i,r))},ha={},Jr.forEach(function(t){ha[t]=function(){if(cr(global.process)){var i=Pe.listeners(t);i.length===Je.count&&(fa(),ur("exit",null,t),ur("afterexit",null,t),ib&&t==="SIGHUP"&&(t="SIGINT"),Pe.kill(Pe.pid,t))}}}),Qr.exports.signals=function(){return Jr},Zr=!1,vf=function(){Zr||!cr(global.process)||(Zr=!0,Je.count+=1,Jr=Jr.filter(function(e){try{return Pe.on(e,ha[e]),!0}catch{return!1}}),Pe.emit=nb,Pe.reallyExit=rb)},Qr.exports.load=vf,yf=Pe.reallyExit,rb=function(e){cr(global.process)&&(Pe.exitCode=e||0,ur("exit",Pe.exitCode,null),ur("afterexit",Pe.exitCode,null),yf.call(Pe,Pe.exitCode))},pa=Pe.emit,nb=function(e,i){if(e==="exit"&&cr(global.process)){i!==void 0&&(Pe.exitCode=i);var r=pa.apply(this,arguments);return ur("exit",Pe.exitCode,null),ur("afterexit",Pe.exitCode,null),r}else return pa.apply(this,arguments)}):Qr.exports=function(){return function(){}};var tb,Jr,ib,Xn,Je,fa,ur,ha,Zr,vf,yf,rb,pa,nb});var pb=w((XL,hb)=>{"use strict";var tI=require("path"),cb=zy(),iI=Xy(),rI=sb(),Ii={},ob=Symbol();function nI(t,e,i){let r=e[ob];if(r)return e.stat(t,(s,o)=>{if(s)return i(s);i(null,o.mtime,r)});let n=new Date(Math.ceil(Date.now()/1e3)*1e3+5);e.utimes(t,n,n,s=>{if(s)return i(s);e.stat(t,(o,a)=>{if(o)return i(o);let l=a.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(e,ob,{value:l}),i(null,a.mtime,l)})})}function sI(t){let e=Date.now();return t==="s"&&(e=Math.ceil(e/1e3)*1e3),new Date(e)}function ma(t,e){return e.lockfilePath||`${t}.lock`}function ub(t,e,i){if(!e.realpath)return i(null,tI.resolve(t));e.fs.realpath(t,i)}function _f(t,e,i){let r=ma(t,e);e.fs.mkdir(r,n=>{if(!n)return nI(r,e.fs,(s,o,a)=>{if(s)return e.fs.rmdir(r,()=>{}),i(s);i(null,o,a)});if(n.code!=="EEXIST")return i(n);if(e.stale<=0)return i(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:t}));e.fs.stat(r,(s,o)=>{if(s)return s.code==="ENOENT"?_f(t,{...e,stale:0},i):i(s);if(!oI(o,e))return i(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:t}));fb(t,e,a=>{if(a)return i(a);_f(t,{...e,stale:0},i)})})})}function oI(t,e){return t.mtime.getTime(){if(r&&r.code!=="ENOENT")return i(r);i()})}function da(t,e){let i=Ii[t];i.updateTimeout||(i.updateDelay=i.updateDelay||e.update,i.updateTimeout=setTimeout(()=>{i.updateTimeout=null,e.fs.stat(i.lockfilePath,(r,n)=>{let s=i.lastUpdate+e.stale{let c=i.lastUpdate+e.stale{throw r},...e},e.retries=e.retries||0,e.retries=typeof e.retries=="number"?{retries:e.retries}:e.retries,e.stale=Math.max(e.stale||0,2e3),e.update=e.update==null?e.stale/2:e.update||0,e.update=Math.max(Math.min(e.update,e.stale/2),1e3),ub(t,e,(r,n)=>{if(r)return i(r);let s=iI.operation(e.retries);s.attempt(()=>{_f(n,e,(o,a,l)=>{if(s.retry(o))return;if(o)return i(s.mainError());let c=Ii[n]={lockfilePath:ma(n,e),mtime:a,mtimePrecision:l,options:e,lastUpdate:Date.now()};da(n,e),i(null,u=>{if(c.released)return u&&u(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));lI(n,{...e,realpath:!1},u)})})})})}function lI(t,e,i){e={fs:cb,realpath:!0,...e},ub(t,e,(r,n)=>{if(r)return i(r);let s=Ii[n];if(!s)return i(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete Ii[n],fb(n,e,i)})}function ab(t){return(...e)=>new Promise((i,r)=>{e.push((n,s)=>{n?r(n):i(s)}),t(...e)})}var lb=!1;function cI(){lb||(lb=!0,rI(()=>{for(let t in Ii){let e=Ii[t].options;try{e.fs.rmdirSync(ma(t,e))}catch{}}}))}hb.exports.lock=async(t,e)=>{cI();let i=await ab(aI)(t,e);return ab(i)}});var CI={};Ef(CI,{HttpsProxyAgent:()=>kb.HttpsProxyAgent,PNG:()=>Ob.PNG,SocksProxyAgent:()=>Tb.SocksProxyAgent,StackUtils:()=>wI,colors:()=>uI,debug:()=>fI,diff:()=>hI,dotenv:()=>pI,getProxyForUrl:()=>Eb.getProxyForUrl,jpegjs:()=>dI,lockfile:()=>gI,mime:()=>vI,minimatch:()=>yI,open:()=>bI,program:()=>Cb.program,progress:()=>_I,ws:()=>SI,wsReceiver:()=>kI,wsSender:()=>OI,wsServer:()=>EI,yaml:()=>xI});module.exports=Kb(CI);var db=De(Xf()),mb=De(br());var Ba={};Ef(Ba,{Diff:()=>Ot,applyPatch:()=>Nh,applyPatches:()=>ew,canonicalize:()=>Ss,convertChangesToDMP:()=>cw,convertChangesToXML:()=>uw,createPatch:()=>tw,createTwoFilesPatch:()=>Lh,diffArrays:()=>J_,diffChars:()=>L_,diffCss:()=>U_,diffJson:()=>K_,diffLines:()=>Ca,diffSentences:()=>j_,diffTrimmedLines:()=>D_,diffWords:()=>F_,diffWordsWithSpace:()=>Oh,formatPatch:()=>Os,merge:()=>sw,parsePatch:()=>Cs,reversePatch:()=>Bh,structuredPatch:()=>ks});function Ot(){}Ot.prototype={diff:function(e,i){var r,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=n.callback;typeof n=="function"&&(s=n,n={});var o=this;function a(k){return k=o.postProcess(k,n),s?(setTimeout(function(){s(k)},0),!0):k}e=this.castInput(e,n),i=this.castInput(i,n),e=this.removeEmpty(this.tokenize(e,n)),i=this.removeEmpty(this.tokenize(i,n));var l=i.length,c=e.length,u=1,f=l+c;n.maxEditLength!=null&&(f=Math.min(f,n.maxEditLength));var d=(r=n.timeout)!==null&&r!==void 0?r:1/0,g=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],v=this.extractCommon(m[0],i,e,0,n);if(m[0].oldPos+1>=c&&v+1>=l)return a(uh(o,m[0].lastComponent,i,e,o.useLongestToken));var b=-1/0,_=1/0;function S(){for(var k=Math.max(b,-u);k<=Math.min(_,u);k+=2){var E=void 0,R=m[k-1],T=m[k+1];R&&(m[k-1]=void 0);var A=!1;if(T){var C=T.oldPos-k;A=T&&0<=C&&C=c&&v+1>=l)return a(uh(o,E.lastComponent,i,e,o.useLongestToken));m[k]=E,E.oldPos+1>=c&&(_=Math.min(_,k-1)),v+1>=l&&(b=Math.max(b,k+1))}u++}if(s)(function k(){setTimeout(function(){if(u>f||Date.now()>g)return s();S()||k()},0)})();else for(;u<=f&&Date.now()<=g;){var O=S();if(O)return O}},addToPath:function(e,i,r,n,s){var o=e.lastComponent;return o&&!s.oneChangePerToken&&o.added===i&&o.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:o.count+1,added:i,removed:r,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:i,removed:r,previousComponent:o}}},extractCommon:function(e,i,r,n,s){for(var o=i.length,a=r.length,l=e.oldPos,c=l-n,u=0;c+1g.length?v:g}),f.value=t.join(d)}else f.value=t.join(i.slice(c,c+f.count));c+=f.count,f.added||(u+=f.count)}}return s}var N_=new Ot;function L_(t,e,i){return N_.diff(t,e,i)}function fh(t,e){var i;for(i=0;ie.length&&(i=t.length-e.length);var r=e.length;t.length0&&e[o]!=e[s];)s=n[s];e[o]==e[s]&&s++}s=0;for(var a=i;a0&&t[a]!=e[s];)s=n[s];t[a]==e[s]&&s++}return s}function R_(t){return t.includes(`\r +`+i)}function or(t,e,i,r,n){if(t.listenerCount("wsClientError")){let s=new Error(n);Error.captureStackTrace(s,or),t.emit("wsClientError",s,i,e)}else Zn(i,r,n)}});var By=_((AL,Ly)=>{var Ai=require("constants"),LA=process.cwd,oa=null,BA=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return oa||(oa=LA.call(process)),oa};try{process.cwd()}catch{}typeof process.chdir=="function"&&(hf=process.chdir,process.chdir=function(t){oa=null,hf.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,hf));var hf;Ly.exports=RA;function RA(t){Ai.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||i(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=r(t.chmod),t.fchmod=r(t.fchmod),t.lchmod=r(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=n(t.chmodSync),t.fchmodSync=n(t.fchmodSync),t.lchmodSync=n(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,f,d){d&&process.nextTick(d)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,f,d,g){g&&process.nextTick(g)},t.lchownSync=function(){}),BA==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(u){function f(d,g,m){var y=Date.now(),b=0;u(d,g,function x(E){if(E&&(E.code==="EACCES"||E.code==="EPERM")&&Date.now()-y<6e4){setTimeout(function(){t.stat(g,function(O,k){O&&O.code==="ENOENT"?u(d,g,x):m(E)})},b),b<100&&(b+=10);return}m&&m(E)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f}(t.rename)),t.read=typeof t.read!="function"?t.read:function(u){function f(d,g,m,y,b,x){var E;if(x&&typeof x=="function"){var O=0;E=function(k,S,R){if(k&&k.code==="EAGAIN"&&O<10)return O++,u.call(t,d,g,m,y,b,E);x.apply(this,arguments)}}return u.call(t,d,g,m,y,b,E)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,u),f}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(u){return function(f,d,g,m,y){for(var b=0;;)try{return u.call(t,f,d,g,m,y)}catch(x){if(x.code==="EAGAIN"&&b<10){b++;continue}throw x}}}(t.readSync);function e(u){u.lchmod=function(f,d,g){u.open(f,Ai.O_WRONLY|Ai.O_SYMLINK,d,function(m,y){if(m){g&&g(m);return}u.fchmod(y,d,function(b){u.close(y,function(x){g&&g(b||x)})})})},u.lchmodSync=function(f,d){var g=u.openSync(f,Ai.O_WRONLY|Ai.O_SYMLINK,d),m=!0,y;try{y=u.fchmodSync(g,d),m=!1}finally{if(m)try{u.closeSync(g)}catch{}else u.closeSync(g)}return y}}function i(u){Ai.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(f,d,g,m){u.open(f,Ai.O_SYMLINK,function(y,b){if(y){m&&m(y);return}u.futimes(b,d,g,function(x){u.close(b,function(E){m&&m(x||E)})})})},u.lutimesSync=function(f,d,g){var m=u.openSync(f,Ai.O_SYMLINK),y,b=!0;try{y=u.futimesSync(m,d,g),b=!1}finally{if(b)try{u.closeSync(m)}catch{}else u.closeSync(m)}return y}):u.futimes&&(u.lutimes=function(f,d,g,m){m&&process.nextTick(m)},u.lutimesSync=function(){})}function r(u){return u&&function(f,d,g){return u.call(t,f,d,function(m){c(m)&&(m=null),g&&g.apply(this,arguments)})}}function n(u){return u&&function(f,d){try{return u.call(t,f,d)}catch(g){if(!c(g))throw g}}}function s(u){return u&&function(f,d,g,m){return u.call(t,f,d,g,function(y){c(y)&&(y=null),m&&m.apply(this,arguments)})}}function o(u){return u&&function(f,d,g){try{return u.call(t,f,d,g)}catch(m){if(!c(m))throw m}}}function a(u){return u&&function(f,d,g){typeof d=="function"&&(g=d,d=null);function m(y,b){b&&(b.uid<0&&(b.uid+=4294967296),b.gid<0&&(b.gid+=4294967296)),g&&g.apply(this,arguments)}return d?u.call(t,f,d,m):u.call(t,f,m)}}function l(u){return u&&function(f,d){var g=d?u.call(t,f,d):u.call(t,f);return g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),g}}function c(u){if(!u||u.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var My=_((IL,Py)=>{var Ry=require("stream").Stream;Py.exports=PA;function PA(t){return{ReadStream:e,WriteStream:i};function e(r,n){if(!(this instanceof e))return new e(r,n);Ry.call(this);var s=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,n=n||{};for(var o=Object.keys(n),a=0,l=o.length;athis.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(u,f){if(u){s.emit("error",u),s.readable=!1;return}s.fd=f,s.emit("open",f),s._read()})}function i(r,n){if(!(this instanceof i))return new i(r,n);Ry.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var s=Object.keys(n),o=0,a=s.length;o= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var qy=_((NL,Fy)=>{"use strict";Fy.exports=FA;var MA=Object.getPrototypeOf||function(t){return t.__proto__};function FA(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:MA(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}});var $y=_((LL,mf)=>{var Me=require("fs"),qA=By(),DA=My(),jA=qy(),aa=require("util"),tt,ca;typeof Symbol=="function"&&typeof Symbol.for=="function"?(tt=Symbol.for("graceful-fs.queue"),ca=Symbol.for("graceful-fs.previous")):(tt="___graceful-fs.queue",ca="___graceful-fs.previous");function UA(){}function Uy(t,e){Object.defineProperty(t,tt,{get:function(){return e}})}var ar=UA;aa.debuglog?ar=aa.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(ar=function(){var t=aa.format.apply(aa,arguments);t="GFS4: "+t.split(/\n/).join(` +GFS4: `),console.error(t)});Me[tt]||(Dy=global[tt]||[],Uy(Me,Dy),Me.close=function(t){function e(i,r){return t.call(Me,i,function(n){n||jy(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(e,ca,{value:t}),e}(Me.close),Me.closeSync=function(t){function e(i){t.apply(Me,arguments),jy()}return Object.defineProperty(e,ca,{value:t}),e}(Me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){ar(Me[tt]),require("assert").equal(Me[tt].length,0)}));var Dy;global[tt]||Uy(global,Me[tt]);mf.exports=pf(jA(Me));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Me.__patched&&(mf.exports=pf(Me),Me.__patched=!0);function pf(t){qA(t),t.gracefulify=pf,t.createReadStream=S,t.createWriteStream=R;var e=t.readFile;t.readFile=i;function i(C,L,P){return typeof L=="function"&&(P=L,L=null),U(C,L,P);function U(q,H,j,V){return e(q,H,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Kr([U,[q,H,j],W,V||Date.now(),Date.now()]):typeof j=="function"&&j.apply(this,arguments)})}}var r=t.writeFile;t.writeFile=n;function n(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return r(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return s(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=l);function l(C,L,P,U){return typeof P=="function"&&(U=P,P=0),q(C,L,P,U);function q(H,j,V,W,Q){return a(H,j,V,function(Y){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}var c=t.readdir;t.readdir=f;var u=/^v[0-5]\./;function f(C,L,P){typeof L=="function"&&(P=L,L=null);var U=u.test(process.version)?function(j,V,W,Q){return c(j,q(j,V,W,Q))}:function(j,V,W,Q){return c(j,V,q(j,V,W,Q))};return U(C,L,P);function q(H,j,V,W){return function(Q,Y){Q&&(Q.code==="EMFILE"||Q.code==="ENFILE")?Kr([U,[H,j,V],Q,W||Date.now(),Date.now()]):(Y&&Y.sort&&Y.sort(),typeof V=="function"&&V.call(this,Q,Y))}}}if(process.version.substr(0,4)==="v0.8"){var d=DA(t);x=d.ReadStream,O=d.WriteStream}var g=t.ReadStream;g&&(x.prototype=Object.create(g.prototype),x.prototype.open=E);var m=t.WriteStream;m&&(O.prototype=Object.create(m.prototype),O.prototype.open=k),Object.defineProperty(t,"ReadStream",{get:function(){return x},set:function(C){x=C},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return O},set:function(C){O=C},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(t,"FileReadStream",{get:function(){return y},set:function(C){y=C},enumerable:!0,configurable:!0});var b=O;Object.defineProperty(t,"FileWriteStream",{get:function(){return b},set:function(C){b=C},enumerable:!0,configurable:!0});function x(C,L){return this instanceof x?(g.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function E(){var C=this;A(C.path,C.flags,C.mode,function(L,P){L?(C.autoClose&&C.destroy(),C.emit("error",L)):(C.fd=P,C.emit("open",P),C.read())})}function O(C,L){return this instanceof O?(m.apply(this,arguments),this):O.apply(Object.create(O.prototype),arguments)}function k(){var C=this;A(C.path,C.flags,C.mode,function(L,P){L?(C.destroy(),C.emit("error",L)):(C.fd=P,C.emit("open",P))})}function S(C,L){return new t.ReadStream(C,L)}function R(C,L){return new t.WriteStream(C,L)}var T=t.open;t.open=A;function A(C,L,P,U){return typeof P=="function"&&(U=P,P=null),q(C,L,P,U);function q(H,j,V,W,Q){return T(H,j,V,function(Y,de){Y&&(Y.code==="EMFILE"||Y.code==="ENFILE")?Kr([q,[H,j,V,W],Y,Q||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}}return t}function Kr(t){ar("ENQUEUE",t[0].name,t[1]),Me[tt].push(t),df()}var la;function jy(){for(var t=Date.now(),e=0;e2&&(Me[tt][e][3]=t,Me[tt][e][4]=t);df()}function df(){if(clearTimeout(la),la=void 0,Me[tt].length!==0){var t=Me[tt].shift(),e=t[0],i=t[1],r=t[2],n=t[3],s=t[4];if(n===void 0)ar("RETRY",e.name,i),e.apply(null,i);else if(Date.now()-n>=6e4){ar("TIMEOUT",e.name,i);var o=i.pop();typeof o=="function"&&o.call(null,r)}else{var a=Date.now()-s,l=Math.max(s-n,1),c=Math.min(l*1.2,100);a>=c?(ar("RETRY",e.name,i),e.apply(null,i.concat([n]))):Me[tt].push(t)}la===void 0&&(la=setTimeout(df,0))}}});var Hy=_((BL,Vy)=>{function Lt(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}Vy.exports=Lt;Lt.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};Lt.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};Lt.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var i=this._timeouts.shift();if(i===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),i=this._timeouts.shift();else return!1;var r=this,n=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},i);return this._options.unref&&n.unref(),!0};Lt.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var i=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){i._operationTimeoutCb()},i._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Lt.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};Lt.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};Lt.prototype.start=Lt.prototype.try;Lt.prototype.errors=function(){return this._errors};Lt.prototype.attempts=function(){return this._attempts};Lt.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,i=0,r=0;r=i&&(e=n,i=o)}return e}});var Gy=_(lr=>{var $A=Hy();lr.operation=function(t){var e=lr.timeouts(t);return new $A(e,{forever:t&&t.forever,unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};lr.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in t)e[i]=t[i];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],n=0;n{Yy.exports=Gy()});var Ky=_((ML,ua)=>{ua.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&ua.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ua.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Xy=_((FL,Zr)=>{var Pe=global.process,cr=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};cr(Pe)?(zy=require("assert"),zr=Ky(),Jy=/^win/i.test(Pe.platform),Qn=require("events"),typeof Qn!="function"&&(Qn=Qn.EventEmitter),Pe.__signal_exit_emitter__?Ze=Pe.__signal_exit_emitter__:(Ze=Pe.__signal_exit_emitter__=new Qn,Ze.count=0,Ze.emitted={}),Ze.infinite||(Ze.setMaxListeners(1/0),Ze.infinite=!0),Zr.exports=function(t,e){if(!cr(global.process))return function(){};zy.equal(typeof t,"function","a callback must be provided for exit handler"),Jr===!1&&gf();var i="exit";e&&e.alwaysLast&&(i="afterexit");var r=function(){Ze.removeListener(i,t),Ze.listeners("exit").length===0&&Ze.listeners("afterexit").length===0&&fa()};return Ze.on(i,t),r},fa=function(){!Jr||!cr(global.process)||(Jr=!1,zr.forEach(function(e){try{Pe.removeListener(e,ha[e])}catch{}}),Pe.emit=pa,Pe.reallyExit=vf,Ze.count-=1)},Zr.exports.unload=fa,ur=function(e,i,r){Ze.emitted[e]||(Ze.emitted[e]=!0,Ze.emit(e,i,r))},ha={},zr.forEach(function(t){ha[t]=function(){if(cr(global.process)){var i=Pe.listeners(t);i.length===Ze.count&&(fa(),ur("exit",null,t),ur("afterexit",null,t),Jy&&t==="SIGHUP"&&(t="SIGINT"),Pe.kill(Pe.pid,t))}}}),Zr.exports.signals=function(){return zr},Jr=!1,gf=function(){Jr||!cr(global.process)||(Jr=!0,Ze.count+=1,zr=zr.filter(function(e){try{return Pe.on(e,ha[e]),!0}catch{return!1}}),Pe.emit=Qy,Pe.reallyExit=Zy)},Zr.exports.load=gf,vf=Pe.reallyExit,Zy=function(e){cr(global.process)&&(Pe.exitCode=e||0,ur("exit",Pe.exitCode,null),ur("afterexit",Pe.exitCode,null),vf.call(Pe,Pe.exitCode))},pa=Pe.emit,Qy=function(e,i){if(e==="exit"&&cr(global.process)){i!==void 0&&(Pe.exitCode=i);var r=pa.apply(this,arguments);return ur("exit",Pe.exitCode,null),ur("afterexit",Pe.exitCode,null),r}else return pa.apply(this,arguments)}):Zr.exports=function(){return function(){}};var zy,zr,Jy,Qn,Ze,fa,ur,ha,Jr,gf,vf,Zy,pa,Qy});var ab=_((qL,ob)=>{"use strict";var VA=require("path"),rb=$y(),HA=Wy(),GA=Xy(),Ii={},eb=Symbol();function YA(t,e,i){let r=e[eb];if(r)return e.stat(t,(s,o)=>{if(s)return i(s);i(null,o.mtime,r)});let n=new Date(Math.ceil(Date.now()/1e3)*1e3+5);e.utimes(t,n,n,s=>{if(s)return i(s);e.stat(t,(o,a)=>{if(o)return i(o);let l=a.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(e,eb,{value:l}),i(null,a.mtime,l)})})}function WA(t){let e=Date.now();return t==="s"&&(e=Math.ceil(e/1e3)*1e3),new Date(e)}function ma(t,e){return e.lockfilePath||`${t}.lock`}function nb(t,e,i){if(!e.realpath)return i(null,VA.resolve(t));e.fs.realpath(t,i)}function bf(t,e,i){let r=ma(t,e);e.fs.mkdir(r,n=>{if(!n)return YA(r,e.fs,(s,o,a)=>{if(s)return e.fs.rmdir(r,()=>{}),i(s);i(null,o,a)});if(n.code!=="EEXIST")return i(n);if(e.stale<=0)return i(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:t}));e.fs.stat(r,(s,o)=>{if(s)return s.code==="ENOENT"?bf(t,{...e,stale:0},i):i(s);if(!KA(o,e))return i(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:t}));sb(t,e,a=>{if(a)return i(a);bf(t,{...e,stale:0},i)})})})}function KA(t,e){return t.mtime.getTime(){if(r&&r.code!=="ENOENT")return i(r);i()})}function da(t,e){let i=Ii[t];i.updateTimeout||(i.updateDelay=i.updateDelay||e.update,i.updateTimeout=setTimeout(()=>{i.updateTimeout=null,e.fs.stat(i.lockfilePath,(r,n)=>{let s=i.lastUpdate+e.stale{let c=i.lastUpdate+e.stale{throw r},...e},e.retries=e.retries||0,e.retries=typeof e.retries=="number"?{retries:e.retries}:e.retries,e.stale=Math.max(e.stale||0,2e3),e.update=e.update==null?e.stale/2:e.update||0,e.update=Math.max(Math.min(e.update,e.stale/2),1e3),nb(t,e,(r,n)=>{if(r)return i(r);let s=HA.operation(e.retries);s.attempt(()=>{bf(n,e,(o,a,l)=>{if(s.retry(o))return;if(o)return i(s.mainError());let c=Ii[n]={lockfilePath:ma(n,e),mtime:a,mtimePrecision:l,options:e,lastUpdate:Date.now()};da(n,e),i(null,u=>{if(c.released)return u&&u(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));JA(n,{...e,realpath:!1},u)})})})})}function JA(t,e,i){e={fs:rb,realpath:!0,...e},nb(t,e,(r,n)=>{if(r)return i(r);let s=Ii[n];if(!s)return i(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete Ii[n],sb(n,e,i)})}function tb(t){return(...e)=>new Promise((i,r)=>{e.push((n,s)=>{n?r(n):i(s)}),t(...e)})}var ib=!1;function ZA(){ib||(ib=!0,GA(()=>{for(let t in Ii){let e=Ii[t].options;try{e.fs.rmdirSync(ma(t,e))}catch{}}}))}ob.exports.lock=async(t,e)=>{ZA();let i=await tb(zA)(t,e);return tb(i)}});var dI={};Sf(dI,{HttpsProxyAgent:()=>yb.HttpsProxyAgent,PNG:()=>bb.PNG,SocksProxyAgent:()=>wb.SocksProxyAgent,colors:()=>QA,debug:()=>XA,diff:()=>eI,dotenv:()=>tI,getProxyForUrl:()=>vb.getProxyForUrl,jpegjs:()=>iI,lockfile:()=>nI,mime:()=>sI,minimatch:()=>oI,open:()=>aI,program:()=>_b.program,progress:()=>lI,ws:()=>uI,wsReceiver:()=>hI,wsSender:()=>pI,wsServer:()=>fI,yaml:()=>cI});module.exports=$b(dI);var lb=Ue(Qf()),cb=Ue(yr());var Ba={};Sf(Ba,{Diff:()=>Ct,applyPatch:()=>Nh,applyPatches:()=>K_,canonicalize:()=>Ss,convertChangesToDMP:()=>rw,convertChangesToXML:()=>nw,createPatch:()=>z_,createTwoFilesPatch:()=>Lh,diffArrays:()=>H_,diffChars:()=>O_,diffCss:()=>P_,diffJson:()=>V_,diffLines:()=>Ca,diffSentences:()=>R_,diffTrimmedLines:()=>B_,diffWords:()=>N_,diffWordsWithSpace:()=>Oh,formatPatch:()=>Os,merge:()=>X_,parsePatch:()=>Cs,reversePatch:()=>Bh,structuredPatch:()=>ks});function Ct(){}Ct.prototype={diff:function(e,i){var r,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=n.callback;typeof n=="function"&&(s=n,n={});var o=this;function a(k){return k=o.postProcess(k,n),s?(setTimeout(function(){s(k)},0),!0):k}e=this.castInput(e,n),i=this.castInput(i,n),e=this.removeEmpty(this.tokenize(e,n)),i=this.removeEmpty(this.tokenize(i,n));var l=i.length,c=e.length,u=1,f=l+c;n.maxEditLength!=null&&(f=Math.min(f,n.maxEditLength));var d=(r=n.timeout)!==null&&r!==void 0?r:1/0,g=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],y=this.extractCommon(m[0],i,e,0,n);if(m[0].oldPos+1>=c&&y+1>=l)return a(uh(o,m[0].lastComponent,i,e,o.useLongestToken));var b=-1/0,x=1/0;function E(){for(var k=Math.max(b,-u);k<=Math.min(x,u);k+=2){var S=void 0,R=m[k-1],T=m[k+1];R&&(m[k-1]=void 0);var A=!1;if(T){var C=T.oldPos-k;A=T&&0<=C&&C=c&&y+1>=l)return a(uh(o,S.lastComponent,i,e,o.useLongestToken));m[k]=S,S.oldPos+1>=c&&(x=Math.min(x,k-1)),y+1>=l&&(b=Math.max(b,k+1))}u++}if(s)(function k(){setTimeout(function(){if(u>f||Date.now()>g)return s();E()||k()},0)})();else for(;u<=f&&Date.now()<=g;){var O=E();if(O)return O}},addToPath:function(e,i,r,n,s){var o=e.lastComponent;return o&&!s.oneChangePerToken&&o.added===i&&o.removed===r?{oldPos:e.oldPos+n,lastComponent:{count:o.count+1,added:i,removed:r,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:i,removed:r,previousComponent:o}}},extractCommon:function(e,i,r,n,s){for(var o=i.length,a=r.length,l=e.oldPos,c=l-n,u=0;c+1g.length?y:g}),f.value=t.join(d)}else f.value=t.join(i.slice(c,c+f.count));c+=f.count,f.added||(u+=f.count)}}return s}var k_=new Ct;function O_(t,e,i){return k_.diff(t,e,i)}function fh(t,e){var i;for(i=0;ie.length&&(i=t.length-e.length);var r=e.length;t.length0&&e[o]!=e[s];)s=n[s];e[o]==e[s]&&s++}s=0;for(var a=i;a0&&t[a]!=e[s];)s=n[s];t[a]==e[s]&&s++}return s}function T_(t){return t.includes(`\r `)&&!t.startsWith(` -`)&&!t.match(/[^\r]\n/)}function P_(t){return!t.includes(`\r +`)&&!t.match(/[^\r]\n/)}function A_(t){return!t.includes(`\r `)&&t.includes(` -`)}var xs="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",M_=new RegExp("[".concat(xs,"]+|\\s+|[^").concat(xs,"]"),"ug"),tn=new Ot;tn.equals=function(t,e,i){return i.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t.trim()===e.trim()};tn.tokenize=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i;if(e.intlSegmenter){if(e.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=Array.from(e.intlSegmenter.segment(t),function(s){return s.segment})}else i=t.match(M_)||[];var r=[],n=null;return i.forEach(function(s){/\s/.test(s)?n==null?r.push(s):r.push(r.pop()+s):/\s/.test(n)?r[r.length-1]==n?r.push(r.pop()+s):r.push(n+s):r.push(s),n=s}),r};tn.join=function(t){return t.map(function(e,i){return i==0?e:e.replace(/^\s+/,"")}).join("")};tn.postProcess=function(t,e){if(!t||e.oneChangePerToken)return t;var i=null,r=null,n=null;return t.forEach(function(s){s.added?r=s:s.removed?n=s:((r||n)&&dh(i,n,r,s),i=s,r=null,n=null)}),(r||n)&&dh(i,n,r,null),t};function F_(t,e,i){return(i==null?void 0:i.ignoreWhitespace)!=null&&!i.ignoreWhitespace?Oh(t,e,i):tn.diff(t,e,i)}function dh(t,e,i,r){if(e&&i){var n=e.value.match(/^\s*/)[0],s=e.value.match(/\s*$/)[0],o=i.value.match(/^\s*/)[0],a=i.value.match(/\s*$/)[0];if(t){var l=fh(n,o);t.value=Oa(t.value,o,l),e.value=en(e.value,l),i.value=en(i.value,l)}if(r){var c=hh(s,a);r.value=ka(r.value,a,c),e.value=_s(e.value,c),i.value=_s(i.value,c)}}else if(i)t&&(i.value=i.value.replace(/^\s*/,"")),r&&(r.value=r.value.replace(/^\s*/,""));else if(t&&r){var u=r.value.match(/^\s*/)[0],f=e.value.match(/^\s*/)[0],d=e.value.match(/\s*$/)[0],g=fh(u,f);e.value=en(e.value,g);var m=hh(en(u,g),d);e.value=_s(e.value,m),r.value=ka(r.value,u,m),t.value=Oa(t.value,u,u.slice(0,u.length-m.length))}else if(r){var v=r.value.match(/^\s*/)[0],b=e.value.match(/\s*$/)[0],_=ph(b,v);e.value=_s(e.value,_)}else if(t){var S=t.value.match(/\s*$/)[0],O=e.value.match(/^\s*/)[0],k=ph(S,O);e.value=en(e.value,k)}}var kh=new Ot;kh.tokenize=function(t){var e=new RegExp("(\\r?\\n)|[".concat(xs,"]+|[^\\S\\n\\r]+|[^").concat(xs,"]"),"ug");return t.match(e)||[]};function Oh(t,e,i){return kh.diff(t,e,i)}function q_(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}var rn=new Ot;rn.tokenize=function(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,` -`));var i=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},i;if(e.intlSegmenter){if(e.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=Array.from(e.intlSegmenter.segment(t),function(s){return s.segment})}else i=t.match(I_)||[];var r=[],n=null;return i.forEach(function(s){/\s/.test(s)?n==null?r.push(s):r.push(r.pop()+s):/\s/.test(n)?r[r.length-1]==n?r.push(r.pop()+s):r.push(n+s):r.push(s),n=s}),r};en.join=function(t){return t.map(function(e,i){return i==0?e:e.replace(/^\s+/,"")}).join("")};en.postProcess=function(t,e){if(!t||e.oneChangePerToken)return t;var i=null,r=null,n=null;return t.forEach(function(s){s.added?r=s:s.removed?n=s:((r||n)&&dh(i,n,r,s),i=s,r=null,n=null)}),(r||n)&&dh(i,n,r,null),t};function N_(t,e,i){return(i==null?void 0:i.ignoreWhitespace)!=null&&!i.ignoreWhitespace?Oh(t,e,i):en.diff(t,e,i)}function dh(t,e,i,r){if(e&&i){var n=e.value.match(/^\s*/)[0],s=e.value.match(/\s*$/)[0],o=i.value.match(/^\s*/)[0],a=i.value.match(/\s*$/)[0];if(t){var l=fh(n,o);t.value=Oa(t.value,o,l),e.value=Xr(e.value,l),i.value=Xr(i.value,l)}if(r){var c=hh(s,a);r.value=ka(r.value,a,c),e.value=_s(e.value,c),i.value=_s(i.value,c)}}else if(i)t&&(i.value=i.value.replace(/^\s*/,"")),r&&(r.value=r.value.replace(/^\s*/,""));else if(t&&r){var u=r.value.match(/^\s*/)[0],f=e.value.match(/^\s*/)[0],d=e.value.match(/\s*$/)[0],g=fh(u,f);e.value=Xr(e.value,g);var m=hh(Xr(u,g),d);e.value=_s(e.value,m),r.value=ka(r.value,u,m),t.value=Oa(t.value,u,u.slice(0,u.length-m.length))}else if(r){var y=r.value.match(/^\s*/)[0],b=e.value.match(/\s*$/)[0],x=ph(b,y);e.value=_s(e.value,x)}else if(t){var E=t.value.match(/\s*$/)[0],O=e.value.match(/^\s*/)[0],k=ph(E,O);e.value=Xr(e.value,k)}}var kh=new Ct;kh.tokenize=function(t){var e=new RegExp("(\\r?\\n)|[".concat(xs,"]+|[^\\S\\n\\r]+|[^").concat(xs,"]"),"ug");return t.match(e)||[]};function Oh(t,e,i){return kh.diff(t,e,i)}function L_(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}var tn=new Ct;tn.tokenize=function(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,` +`));var i=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;nt.length)&&(e=t.length);for(var i=0,r=new Array(e);i2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string"&&(e=Cs(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}(i.autoConvertLineEndings||i.autoConvertLineEndings==null)&&(R_(t)&&Z_(e)?e=Ah(e):P_(t)&&Q_(e)&&(e=Ih(e)));var r=t.split(` -`),n=e.hunks,s=i.compareLine||function(P,U,q,H){return U===H},o=i.fuzzFactor||0,a=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return t;for(var l="",c=!1,u=!1,f=0;f3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,V=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],W=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,Q=0,Y=!1;H0?de[0]:" ",ne=de.length>0?de.substr(1):de;if(ae==="-")if(s(U+1,r[U],ae,ne))U++,Q=0;else return!q||r[U]==null?null:(V[W]=r[U],g(P,U+1,q-1,H,!1,V,W+1));if(ae==="+"){if(!j)return null;V[W]=ne,W++,Q=0,Y=!0}if(ae===" ")if(Q++,V[W]=r[U],s(U+1,r[U],ae,ne))W++,j=!0,Y=!1,U++;else return Y||!q?null:r[U]&&(g(P,U+1,q-1,H+1,!1,V,W+1)||g(P,U+1,q-1,H,!1,V,W+1))||g(P,U,q-1,H+1,!1,V,W)}return W-=Q,U-=Q,V.length=W,{patchedLines:V,oldLineLastI:U-1}}for(var m=[],v=0,b=0;b0?f(U.lines.slice(-o.context)):[],g-=v.length,m-=v.length)}(P=v).push.apply(P,ti(L.map(function(W){return(C.added?"+":"-")+W}))),C.added?_+=L.length:b+=L.length}else{if(g)if(L.length<=o.context*2&&Ot.length)&&(e=t.length);for(var i=0,r=new Array(e);i2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string"&&(e=Cs(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}(i.autoConvertLineEndings||i.autoConvertLineEndings==null)&&(T_(t)&&G_(e)?e=Ah(e):A_(t)&&Y_(e)&&(e=Ih(e)));var r=t.split(` +`),n=e.hunks,s=i.compareLine||function(P,U,q,H){return U===H},o=i.fuzzFactor||0,a=0;if(o<0||!Number.isInteger(o))throw new Error("fuzzFactor must be a non-negative integer");if(!n.length)return t;for(var l="",c=!1,u=!1,f=0;f3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,V=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],W=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,Q=0,Y=!1;H0?de[0]:" ",ne=de.length>0?de.substr(1):de;if(ae==="-")if(s(U+1,r[U],ae,ne))U++,Q=0;else return!q||r[U]==null?null:(V[W]=r[U],g(P,U+1,q-1,H,!1,V,W+1));if(ae==="+"){if(!j)return null;V[W]=ne,W++,Q=0,Y=!0}if(ae===" ")if(Q++,V[W]=r[U],s(U+1,r[U],ae,ne))W++,j=!0,Y=!1,U++;else return Y||!q?null:r[U]&&(g(P,U+1,q-1,H+1,!1,V,W+1)||g(P,U+1,q-1,H,!1,V,W+1))||g(P,U,q-1,H+1,!1,V,W)}return W-=Q,U-=Q,V.length=W,{patchedLines:V,oldLineLastI:U-1}}for(var m=[],y=0,b=0;b0?f(U.lines.slice(-o.context)):[],g-=y.length,m-=y.length)}(P=y).push.apply(P,ti(L.map(function(W){return(C.added?"+":"-")+W}))),C.added?x+=L.length:b+=L.length}else{if(g)if(L.length<=o.context*2&&Ot.length)return!1;for(var i=0;i"):r.removed&&e.push(""),e.push(fw(r.value)),r.added?e.push(""):r.removed&&e.push("")}return e.join("")}function fw(t){var e=t;return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=e.replace(/"/g,"""),e}var gb=De(qh()),Eb=De(jh()),kb=De(Kh()),vb=De(ip()),yb=De(up()),bb=De(Np()),_b=De(Gp()),Ob=De(jd()),Cb=De(Xd()),wb=De(nm()),Tb=De(jm()),xb=De(Ym()),Sb=De(Rv());var VA=De(qv(),1),uf=De(Qu(),1),ff=De(ef(),1),My=De(lf(),1),hf=De(Py(),1);var Fy=My.default;var uI=db.default,fI=mb.default,hI=Ba,pI=gb.default,dI=vb.default,mI=pb(),gI=mI,vI=yb.default,yI=bb.default,bI=_b.default,_I=wb.default,wI=xb.default,xI=Sb.default,SI=Fy,EI=hf.default,kI=uf.default,OI=ff.default;0&&(module.exports={HttpsProxyAgent,PNG,SocksProxyAgent,StackUtils,colors,debug,diff,dotenv,getProxyForUrl,jpegjs,lockfile,mime,minimatch,open,program,progress,ws,wsReceiver,wsSender,wsServer,yaml}); +`});return e?i.pop():i.push(i.pop().slice(0,-1)),i}function Z_(t,e){return t.length!==e.length?!1:Ia(t,e)}function Ia(t,e){if(e.length>t.length)return!1;for(var i=0;i"):r.removed&&e.push(""),e.push(sw(r.value)),r.added?e.push(""):r.removed&&e.push("")}return e.join("")}function sw(t){var e=t;return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=e.replace(/"/g,"""),e}var ub=Ue(qh()),vb=Ue(jh()),yb=Ue(zh()),fb=Ue(ip()),hb=Ue(up()),pb=Ue(Np()),db=Ue(Gp()),bb=Ue(jd()),_b=Ue(Xd()),mb=Ue(nm()),wb=Ue(jm()),gb=Ue(Tv());var NA=Ue(Lv(),1),cf=Ue(Zu(),1),uf=Ue(Xu(),1),Iy=Ue(af(),1),ff=Ue(Ay(),1);var Ny=Iy.default;var QA=lb.default,XA=cb.default,eI=Ba,tI=ub.default,iI=fb.default,rI=ab(),nI=rI,sI=hb.default,oI=pb.default,aI=db.default,lI=mb.default,cI=gb.default,uI=Ny,fI=ff.default,hI=cf.default,pI=uf.default;0&&(module.exports={HttpsProxyAgent,PNG,SocksProxyAgent,colors,debug,diff,dotenv,getProxyForUrl,jpegjs,lockfile,mime,minimatch,open,program,progress,ws,wsReceiver,wsSender,wsServer,yaml}); /*! Bundled license information: progress/lib/node-progress.js: diff --git a/tvapp2/node_modules/playwright-core/lib/vite/htmlReport/index.html b/tvapp2/node_modules/playwright-core/lib/vite/htmlReport/index.html index 55918eec..645cc5df 100755 --- a/tvapp2/node_modules/playwright-core/lib/vite/htmlReport/index.html +++ b/tvapp2/node_modules/playwright-core/lib/vite/htmlReport/index.html @@ -1,13 +1,13 @@ - + Playwright Test Report - - diff --git a/tvapp2/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-D5R_qtw3.js b/tvapp2/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-D5R_qtw3.js deleted file mode 100755 index 92b714da..00000000 --- a/tvapp2/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-D5R_qtw3.js +++ /dev/null @@ -1,24 +0,0 @@ -import{g as bu,c as ku}from"./index-DsR8Oo9k.js";var ya={exports:{}};(function(Et,zt){(function(C,De){Et.exports=De()})(ku,function(){var C=navigator.userAgent,De=navigator.platform,I=/gecko\/\d/i.test(C),K=/MSIE \d/.test(C),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),V=/Edge\/(\d+)/.exec(C),b=K||$||V,N=b&&(K?document.documentMode||6:+(V||$)[1]),_=!V&&/WebKit\//.test(C),ie=_&&/Qt\/\d+\.\d+/.test(C),O=!V&&/Chrome\/(\d+)/.exec(C),q=O&&+O[1],z=/Opera\//.test(C),X=/Apple Computer/.test(navigator.vendor),ke=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),we=/PhantomJS/.test(C),te=X&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),re=/Android/.test(C),ne=te||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),se=te||/Mac/.test(De),Ae=/\bCrOS\b/.test(C),ye=/win/i.test(De),de=z&&C.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(z=!1,_=!0);var ze=se&&(ie||z&&(de==null||de<12.11)),fe=I||b&&N>=9;function H(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=H(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return D(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(ge(Ue)+" ");return Ue[e]}function ge(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Ie.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&ae(e)?!0:t.test(e):ae(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Me(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Lt(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var vi=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,v){this.level=u,this.from=h,this.to=v}return function(u,h){var v=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var k=u.length,x=[],M=0;M-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Qt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Bt(e){e.prototype.on=function(t,n){ve(this,t,n)},e.prototype.off=function(t,n){dt(this,t,n)}}function ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Nr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){ht(e),Nr(e)}function ln(e){return e.target||e.srcElement}function Wt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),se&&e.ctrlKey&&t==1&&(t=3),t}var mi=function(){if(b&&N<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),Or;function Wn(e){if(Or==null){var t=d("span","​");J(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&N<8))}var n=Or?d("span","​"):d("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=J(e,document.createTextNode("AخA")),n=w(t,0,1).getBoundingClientRect(),r=w(t,1,2).getBoundingClientRect();return D(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var Pt=` - -b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` -`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},_n=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function yi(e){if(_t!=null)return _t;var t=J(e,d("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return _t=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=F(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.post},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?L(n,ce(e,n).text.length):ka(t,ce(e,t.line).text.length)}function ka(e,t){var n=e.ch;return n==null||n>t?L(e.line,t):n<0?L(e.line,0):e}function po(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Xt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xt.fromSaved=function(e,t,n){return t instanceof Hn?new Xt(e,Gt(e.mode,t.state),n,t.lookAhead):new Xt(e,Gt(e.mode,t),n)},Xt.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hn(t,this.maxLookAhead):t};function go(e,t,n,r){var i=[e.state.modeGen],o={};ko(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var h=e.state.overlays[u],v=1,k=0;n.state=!0,ko(e,t.text,h.mode,n,function(x,M){for(var E=v;kx&&i.splice(v,1,x,i[v+1],R),v+=2,k=Math.min(x,R)}if(M)if(h.opaque)i.splice(E,v-E,x,"overlay "+M),v=E+2;else for(;Ee.options.maxHighlightLength&&Gt(e.doc.mode,r.state),o=go(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Xt(r,!0,t);var o=wa(e,t,n),l=o>r.first&&ce(r,o-1).stateAfter,a=l?Xt.fromSaved(r,l,o):new Xt(r,Wr(r.mode),o);return r.iter(o,t,function(s){xi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var yo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function xo(e,t,n,r){var i=e.doc,o=i.mode,l;t=Ce(i,t);var a=ce(i,t.line),s=fn(e,t.line,n),u=new Je(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pose.options.maxHighlightLength?(a=!1,l&&xi(e,t,r,h.pos),h.pos=t.length,v=null):v=bo(bi(n,h,r.state,k),o),k){var x=k[0].name;x&&(v="m-"+(v?x+" "+v:x))}if(!a||u!=v){for(;sl;--a){if(a<=o.first)return o.first;var s=ce(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof Hn?u.lookAhead:0)<=o.modeFrontier))return a;var h=Le(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=a-1,r=h)}return i}function Sa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=ce(e,r).stateAfter;if(i&&(!(i instanceof Hn)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new Rn(l,o.from,s?null:o.to))}}return r}function Fa(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var ee=0;ee0)){var h=[s,1],v=Z(u.from,a.from),k=Z(u.to,a.to);(v<0||!l.inclusiveLeft&&!v)&&h.push({from:u.from,to:a.from}),(k>0||!l.inclusiveRight&&!k)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function To(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||wi(r,o.marker)<0)&&(r=o.marker)}return r}function Mo(e,t,n,r,i){var o=ce(e,t),l=$t&&o.markedSpans;if(l)for(var a=0;a=0&&v<=0||h<=0&&v>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.to,n)>=0:Z(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.from,r)<=0:Z(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Do(e);)e=t.find(-1,!0).line;return e}function Na(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function Oa(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Si(e,t){var n=ce(e,t),r=qt(n);return n==r?t:f(r)}function Fo(e,t){if(t>e.lastLine())return t;var n=ce(e,t),r;if(!cr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function cr(e,t){var n=$t&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Hr=function(e,t,n){this.text=e,Lo(this,t),this.height=n?n(this):1};Hr.prototype.lineNo=function(){return f(this)},Bt(Hr);function Pa(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),To(e),Lo(e,n);var i=r?r(e):1;i!=e.height&&Ft(e,i)}function Ia(e){e.parent=null,To(e)}var za={},Ba={};function Ao(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Ba:za;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Eo(e,t){var n=S("span",null,null,_?"padding-right: .1px":null),r={pre:S("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=_a,sr(e.display.measure)&&(l=We(o,e.doc.direction))&&(r.addToken=Ra(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);qa(o,r,vo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=le(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=le(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Wn(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(_){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=le(r.pre.className,r.textClass||"")),r}function Wa(e){var t=d("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function _a(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?Ha(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),b&&N<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var k=s.exec(t),x=k?k.index-v:t.length-v;if(x){var M=document.createTextNode(a.slice(v,v+x));b&&N<9?h.appendChild(d("span",[M])):h.appendChild(M),e.map.push(e.pos,e.pos+x,M),e.col+=x,e.pos+=x}if(!k)break;v+=x+1;var E=void 0;if(k[0]==" "){var R=e.cm.options.tabSize,U=R-e.col%R;E=h.appendChild(d("span",et(U),"cm-tab")),E.setAttribute("role","presentation"),E.setAttribute("cm-text"," "),e.col+=U}else k[0]=="\r"||k[0]==` -`?(E=h.appendChild(d("span",k[0]=="\r"?"␍":"␤","cm-invalidchar")),E.setAttribute("cm-text",k[0]),e.col+=1):(E=e.cm.options.specialCharPlaceholder(k[0]),E.setAttribute("cm-text",k[0]),b&&N<9?h.appendChild(d("span",[E])):h.appendChild(E),e.col+=1);e.map.push(e.pos,e.pos+1,E),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var Q=n||"";r&&(Q+=r),i&&(Q+=i);var G=d("span",[h],Q,o);if(l)for(var ee in l)l.hasOwnProperty(ee)&&ee!="style"&&ee!="class"&&G.setAttribute(ee,l[ee]);return e.content.appendChild(G)}e.content.appendChild(h)}}function Ha(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function No(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function qa(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;ls||Fe.collapsed&&pe.to==s&&pe.from==s)){if(pe.to!=null&&pe.to!=s&&x>pe.to&&(x=pe.to,E=""),Fe.className&&(M+=" "+Fe.className),Fe.css&&(k=(k?k+";":"")+Fe.css),Fe.startStyle&&pe.from==s&&(R+=" "+Fe.startStyle),Fe.endStyle&&pe.to==x&&(ee||(ee=[])).push(Fe.endStyle,pe.to),Fe.title&&((Q||(Q={})).title=Fe.title),Fe.attributes)for(var Ke in Fe.attributes)(Q||(Q={}))[Ke]=Fe.attributes[Ke];Fe.collapsed&&(!U||wi(U.marker,Fe)<0)&&(U=pe)}else pe.from>s&&x>pe.from&&(x=pe.from)}if(ee)for(var st=0;st=a)break;for(var Mt=Math.min(a,x);;){if(h){var wt=s+h.length;if(!U){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+M:M,R,s+tt.length==x?E:"",k,Q)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,R=""}h=i.slice(o,o=n[u++]),v=Ao(n[u++],t.cm.options)}}}function Oo(e,t,n){this.line=t,this.rest=Oa(t),this.size=this.rest?f(ge(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ho(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function $a(e,t){t=qt(t);var n=f(t),r=e.display.externalMeasured=new Oo(e.doc,t,n);r.lineN=n;var i=r.built=Eo(e,r);return r.text=i.pre,J(e.display.lineMeasure,i.pre),r}function Ro(e,t,n,r){return Zt(e,qr(e,t),n,r)}function Fi(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),i!=null){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(n=="right"&&i==s-a)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function ts(e,t,n,r){var i=jo(t.map,n,r),o=i.node,l=i.start,a=i.end,s=i.collapse,u;if(o.nodeType==3){for(var h=0;h<4;h++){for(;l&&Me(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+a0&&(s=r="right");var v;e.options.lineWrapping&&(v=o.getClientRects()).length>1?u=v[r=="right"?v.length-1:0]:u=o.getBoundingClientRect()}if(b&&N<9&&!l&&(!u||!u.left&&!u.right)){var k=o.parentNode.getClientRects()[0];k?u={left:k.left,right:k.left+Kr(e.display),top:k.top,bottom:k.bottom}:u=qo}for(var x=u.top-t.rect.top,M=u.bottom-t.rect.top,E=(x+M)/2,R=t.view.measure.heights,U=0;U=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function h(M,E,R){var U=a[E],Q=U.level==1;return l(R?M-1:M,Q!=R)}var v=lr(a,s,u),k=br,x=h(s,v,u=="before");return k!=null&&(x.other=h(s,k,u!="before")),x}function Zo(e,t){var n=0;t=Ce(e.doc,t),e.options.lineWrapping||(n=Kr(e.display)*t.ch);var r=ce(e.doc,t.line),i=er(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ei(e,t,n,r,i){var o=L(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Ni(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ei(r.first,0,null,-1,-1);var i=g(r,n),o=r.first+r.size-1;if(i>o)return Ei(r.first+r.size-1,ce(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=ce(r,i);;){var a=ns(e,l,i,t,n),s=Ea(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=ce(r,i=u.line)}}function Jo(e,t,n,r){r-=Ai(t);var i=t.text.length,o=Nt(function(l){return Zt(e,n,l-1).bottom<=r},i,0);return i=Nt(function(l){return Zt(e,n,l).top>r},o,i),{begin:o,end:i}}function Qo(e,t,n,r){n||(n=qr(e,t));var i=Yn(e,t,Zt(e,n,r),"line").top;return Jo(e,t,n,i)}function Oi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function ns(e,t,n,r,i){i-=er(t);var o=qr(e,t),l=Ai(t),a=0,s=t.text.length,u=!0,h=We(t,e.doc.direction);if(h){var v=(e.options.lineWrapping?os:is)(e,t,n,o,h,r,i);u=v.level!=1,a=u?v.from:v.to-1,s=u?v.to:v.from-1}var k=null,x=null,M=Nt(function(me){var pe=Zt(e,o,me);return pe.top+=l,pe.bottom+=l,Oi(pe,r,i,!1)?(pe.top<=i&&pe.left<=r&&(k=me,x=pe),!0):!1},a,s),E,R,U=!1;if(x){var Q=r-x.left=ee.bottom?1:0}return M=Lt(t.text,M,1),Ei(n,M,R,U,r-E)}function is(e,t,n,r,i,o,l){var a=Nt(function(v){var k=i[v],x=k.level!=1;return Oi(jt(e,L(n,x?k.to:k.from,x?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=s.level!=1,h=jt(e,L(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Oi(h,o,l,!0)&&h.top>l&&(s=i[a-1])}return s}function os(e,t,n,r,i,o,l){var a=Jo(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var h=null,v=null,k=0;k=u||x.to<=s)){var M=x.level!=1,E=Zt(e,r,M?Math.min(u,x.to)-1:Math.max(s,x.from)).right,R=ER)&&(h=x,v=R)}}return h||(h=i[i.length-1]),h.fromu&&(h={from:h.from,to:u,level:h.level}),h}var Sr;function jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Sr==null){Sr=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Sr.appendChild(document.createTextNode("x")),Sr.appendChild(d("br"));Sr.appendChild(document.createTextNode("x"))}J(e.measure,Sr);var n=Sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),D(e.measure),n||1}function Kr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),n=d("pre",[t],"CodeMirror-line-like");J(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Pi(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Ii(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ii(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Vo(e){var t=jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Kr(e.display)-3);return function(i){if(cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(u=ce(e.doc,s.line).text).length==s.ch){var h=Le(u,u.length,e.options.tabSize)-u.length;s=L(s.line,Math.max(0,Math.round((o-_o(e.display).left)/Kr(e.display))-h))}return s}function Lr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)$t&&Si(e.doc,t)i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=Jn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=Jn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var a=Jn(e,t,t,-1),s=Jn(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Gn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Lr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);oe(l,n)==-1&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Jn(e,t,n,r){var i=Lr(e,t),o,l=e.display.view;if(!$t||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(i==l.length-1)return null;o=a+l[i].size-t,i++}else o=a-t;t+=o,n+=o}for(;Si(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function ls(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Gn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Gn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Lr(e,n)))),r.viewTo=n}function $o(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(d("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Qn(e,t){return e.top-t.top||e.left-t.left}function as(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=_o(e.display),a=l.left,s=Math.max(r.sizerWidth,wr(e)-r.sizer.offsetLeft)-l.right,u=i.direction=="ltr";function h(G,ee,me,pe){ee<0&&(ee=0),ee=Math.round(ee),pe=Math.round(pe),o.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+G+`px; - top: `+ee+"px; width: "+(me??s-G)+`px; - height: `+(pe-ee)+"px"))}function v(G,ee,me){var pe=ce(i,G),Fe=pe.text.length,Ke,st;function Xe(tt,St){return Zn(e,L(G,tt),"div",pe,St)}function Mt(tt,St,ft){var nt=Qo(e,pe,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(pe.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(pe,i.direction);return or(wt,ee||0,me??Fe,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Tt=Xe(St-1,rt?"right":"left"),nn=ee==null&&tt==0,xr=me==null&&St==Fe,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Tt.top-Qe.top<=3){var ut=(u?nn:xr)&>,fo=(u?xr:nn)&&Jt,ir=ut?a:(rt?Qe:Tt).left,Ar=fo?s:(rt?Tt:Qe).right;h(ir,Qe.top,Ar-ir,Qe.bottom)}else{var Er,mt,on,co;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),co=u&&xr&&Jt?s:Tt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&xr&&Jt?a:Tt.left,co=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function tl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Hi(e))}function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Hi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),_&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wi(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||x<-.005)&&(ie.display.sizerWidth){var E=Math.ceil(h/Kr(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function rl(e){if(e.widgets)for(var t=0;t=l&&(o=g(t,er(ce(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function ss(e,t){if(!Ze(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!we){var l=d("div","​",null,`position: absolute; - top: `+(t.top-n.viewOffset-Xn(e.display))+`px; - height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px; - left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function us(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?L(t.line,t.ch+1,"before"):t,t=t.ch?L(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=Ri(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(yn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function fs(e,t){var n=Ri(e,t);n.scrollTop!=null&&yn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function Ri(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Mi(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Di(n),s=t.topa-r;if(t.topi+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,x=wr(e)-n.gutters.offsetWidth,M=t.right-t.left>x;return M&&(t.right=t.left+x),t.left<10?l.scrollLeft=0:t.leftx+k-3&&(l.scrollLeft=t.right+(M?0:10)-x),l}function qi(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function cs(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Zo(e,t.from),r=Zo(e,t.to);nl(e,n,r,t.margin)}}function nl(e,t,n,r){var i=Ri(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function yn(e,t){Math.abs(e.doc.scrollTop-t)<2||(I||Ki(e,{top:t}),il(e,t,!0),I&&Ki(e),kn(e,100))}function il(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ul(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Di(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&N<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dr.prototype.zeroWidthHack=function(){var e=se&&!ke?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new be,this.disableVert=new be},Dr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bn=function(){};bn.prototype.update=function(){return{bottom:0,right:0}},bn.prototype.setScrollLeft=function(){},bn.prototype.setScrollTop=function(){},bn.prototype.clear=function(){};function Xr(e,t){t||(t=xn(e));var n=e.display.barWidth,r=e.display.barHeight;ol(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Vn(e),ol(e,xn(e)),n=e.display.barWidth,r=e.display.barHeight}function ol(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var ll={native:Dr,null:bn};function al(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ee(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ll[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ve(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Cr(e,t):yn(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var ds=0;function Mr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ds,markArrays:null},ja(e.curOp)}function Fr(e){var t=e.curOp;t&&Ua(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ti(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function gs(e){e.updatedDisplay=e.mustUpdate&&ji(e.cm,e.update)}function vs(e){var t=e.cm,n=t.display;e.updatedDisplay&&Vn(t),e.barMeasure=xn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ro(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Yt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-wr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ms(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=fn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Gt(t.mode,r.state):null,s=go(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,h=s.classes;h?o.styleClasses=h:u&&(o.styleClasses=null);for(var v=!l||l.length!=o.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),k=0;!v&&kn)return kn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Dt(e,function(){for(var o=0;o=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&$o(e)==0)return!1;fl(e)&&(hr(e),t.dims=Pi(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),$t&&(o=Si(e.doc,o),l=Fo(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;ls(e,o,l),n.viewOffset=er(ce(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=$o(e);if(!a&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=ks(e);return s>4&&(n.lineDiv.style.display="none"),Ss(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ws(u),D(n.cursorDiv),D(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,kn(e,400)),n.updateLineNumbers=null,!0}function sl(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==wr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Di(e.display)-Mi(e),n.top)}),t.visible=$n(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=$n(e.display,e.doc,n));if(!ji(e,t))break;Vn(e);var i=xn(e);vn(e),Xr(e,i),Gi(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ki(e,t){var n=new ti(e,t);if(ji(e,n)){Vn(e),sl(e,n);var r=xn(e);vn(e),Xr(e,r),Gi(e,r),n.finish()}}function Ss(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(M){var E=M.nextSibling;return _&&se&&e.display.currentWheelTarget==M?M.style.display="none":M.parentNode.removeChild(M),E}for(var s=r.view,u=r.viewFrom,h=0;h-1&&(x=!1),Po(e,v,u,n)),x&&(D(v.lineNumber),v.lineNumber.appendChild(document.createTextNode(W(e.options,u)))),l=v.node.nextSibling}u+=v.size}for(;l;)l=a(l)}function Ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ot(e,"gutterChanged",e)}function Gi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Yt(e)+"px"}function ul(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Ii(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),b&&N<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!_&&!(I&&ne)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Xi(r.gutters,r.lineNumbers),cl(i),n.init(i)}var ri=0,rr=null;b?rr=-.53:I?rr=15:O?rr=-.7:X&&(rr=-1/3);function dl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function Ls(e){var t=dl(e);return t.x*=rr,t.y*=rr,t}function hl(e,t){O&&q==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=dl(t),r=n.x,i=n.y,o=rr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&se&&_){e:for(var h=t.target,v=l.view;h!=a;h=h.parentNode)for(var k=0;k=0&&Z(e,r.to())<=0)return n}return-1};var He=function(e,t){this.anchor=e,this.head=t};He.prototype.from=function(){return _r(this.anchor,this.head)},He.prototype.to=function(){return xt(this.anchor,this.head)},He.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(k,x){return Z(k.from(),x.from())}),n=oe(t,i);for(var o=1;o0:s>=0){var u=_r(a.from(),l.from()),h=xt(a.to(),l.to()),v=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new He(v?h:u,v?u:h))}}return new At(t,n)}function pr(e,t){return new At([new He(e,t||e)],0)}function gr(e){return e.text?L(e.from.line+e.text.length-1,ge(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function pl(e,t){if(Z(e,t.from)<0)return e;if(Z(e,t.to)<=0)return gr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=gr(t).ch-t.to.ch),L(n,r)}function Yi(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,M-1),e.insert(a.line+1,U)}ot(e,"change",e,t)}function vr(e,t,n){function r(i,o,l){if(i.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ge(e.done)}function bl(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,l,a;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Ms(i,i.lastOp==r)))a=ge(l.changes),Z(t.from,t.to)==0&&Z(t.from,a.to)==0?a.to=gr(t):l.changes.push(Qi(e,t));else{var s=ge(i.done);for((!s||!s.ranges)&&ii(e.sel,i.done),l={changes:[Qi(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ye(e,"historyAdded")}function Fs(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function As(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Fs(e,o,ge(i.done),t))?i.done[i.done.length-1]=t:ii(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&xl(i.undone)}function ii(e,t){var n=ge(t);n&&n.ranges&&n.equals(e)||t.push(e)}function kl(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function Es(e){if(!e)return null;for(var t,n=0;n-1&&(ge(a)[v]=u[v],delete u[v])}}return r}function Vi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=Z(t,i)<0;o!=Z(n,i)<0?(i=t,t=n):o!=Z(t,n)<0&&(t=n)}return new He(i,t)}else return new He(n||t,t)}function oi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),pt(e,new At([Vi(e.sel.primary(),t,n,i)],0),r)}function Sl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ye(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(n){var v=s.find(r<0?1:-1),k=void 0;if((r<0?h:u)&&(v=Fl(e,v,-r,v&&v.line==t.line?o:null)),v&&v.line==t.line&&(k=Z(v,n))&&(r<0?k<0:k>0))return Zr(e,v,t,r,i)}var x=s.find(r<0?-1:1);return(r<0?u:h)&&(x=Fl(e,x,r,x.line==t.line?o:null)),x?Zr(e,x,t,r,i):null}}return t}function ai(e,t,n,r,i){var o=r||1,l=Zr(e,t,n,o,i)||!i&&Zr(e,t,n,o,!0)||Zr(e,t,n,-o,i)||!i&&Zr(e,t,n,-o,!0);return l||(e.cantEdit=!0,L(e.first,0))}function Fl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Ce(e,L(t.line-1)):null:n>0&&t.ch==(r||ce(e,t.line)).text.length?t.line=0;--i)Nl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Nl(e,t)}}function Nl(e,t){if(!(t.text.length==1&&t.text[0]==""&&Z(t.from,t.to)==0)){var n=Yi(e,t);bl(e,t,n,e.cm?e.cm.curOp.id:NaN),Tn(e,t,n,ki(e,t));var r=[];vr(e,function(i,o){!o&&oe(r,i.history)==-1&&(zl(i.history,t),r.push(i.history)),Tn(i,t,null,ki(i,t))})}}function si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,l=e.sel,a=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u=0;--x){var M=k(x);if(M)return M.v}}}}function Ol(e,t){if(t!=0&&(e.first+=t,e.sel=new At(Pe(e.sel.ranges,function(i){return new He(L(i.anchor.line+t,i.anchor.ch),L(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){bt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:L(o,ce(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Vt(e,t.from,t.to),n||(n=Yi(e,t)),e.cm?Ps(e.cm,t,r):Ji(e,t,r),li(e,n,Ve),e.cantEdit&&ai(e,L(e.firstLine(),0))&&(e.cantEdit=!1)}}function Ps(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(qt(ce(r,o.line))),r.iter(s,l.line+1,function(x){if(x==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ot(e),Ji(r,t,n,Vo(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(x){var M=Un(x);M>i.maxLineLength&&(i.maxLine=x,i.maxLineLength=M,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Sa(r,o.line),kn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?bt(e):o.line==l.line&&t.text.length==1&&!vl(e.doc,t)?dr(e,o.line,"text"):bt(e,o.line,l.line+1,u);var h=Ct(e,"changes"),v=Ct(e,"change");if(v||h){var k={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};v&&ot(e,"change",e,k),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(k)}e.display.selForContextMenu=null}function Qr(e,t,n,r,i){var o;r||(r=n),Z(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Jr(e,{from:n,to:r,text:t,origin:i})}function Pl(e,t,n,r){n1||!(this.children[0]instanceof Cn))){var a=[];this.collapse(a),this.children=[new Cn(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&bt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Dl(e.doc)),e&&ot(e,"markerCleared",e,this,r,i),t&&Fr(e),this.parent&&this.parent.clear()}},mr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=S("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Mo(e,t.line,t,n,o)||t.line!=n.line&&Mo(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");La()}o.addToHistory&&bl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,n.line+1,function(v){s&&o.collapsed&&!s.options.lineWrapping&&qt(v)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Ft(v,0),Da(v,new Rn(o,a==t.line?t.ch:null,a==n.line?n.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,n.line+1,function(v){cr(e,v)&&Ft(v,0)}),o.clearOnEnter&&ve(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ta(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Wl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)bt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=n.line;h++)dr(s,h,"text");o.atomic&&Dl(s.doc),ot(s,"markerAdded",s,o)}return o}var Fn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;s--)Jr(this,r[s]);a?Ll(this,a):this.cm&&Gr(this.cm)}),undo:at(function(){si(this,"undo")}),redo:at(function(){si(this,"redo")}),undoSelection:at(function(){si(this,"undo",!0)}),redoSelection:at(function(){si(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Ce(this,e),t=Ce(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),Ce(this,L(n,t))},indexFromPos:function(e){e=Ce(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k=0;a--)Qr(e.doc,"",r[a].from,r[a].to,"+delete");Gr(e)})}function eo(e,t,n){var r=Lt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function to(e,t,n){var r=eo(e,t.ch,n);return r==null?null:new L(t.line,r,n<0?"after":"before")}function ro(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=We(n,t.doc.direction);if(o){var l=i<0?ge(o):o[0],a=i<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var h=qr(t,n);u=i<0?n.text.length-1:0;var v=Zt(t,h,u).top;u=Nt(function(k){return Zt(t,h,k).top==v},i<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=eo(n,u,1))}else u=i<0?l.to:l.from;return new L(r,u,s)}}return new L(r,i<0?n.text.length:0,i<0?"before":"after")}function Ys(e,t,n,r){var i=We(t,e.doc.direction);if(!i)return to(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lr(i,n.ch,n.sticky),l=i[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&k>=h.begin)){var x=v?"before":"after";return new L(n.line,k,x)}}var M=function(U,Q,G){for(var ee=function(Ke,st){return st?new L(n.line,a(Ke,1),"before"):new L(n.line,Ke,"after")};U>=0&&U0==(me.level!=1),Fe=pe?G.begin:a(G.end,-1);if(me.from<=Fe&&Fe0?h.end:a(h.begin,-1);return R!=null&&!(r>0&&R==t.text.length)&&(E=M(r>0?0:i.length-1,r,u(R)),E)?E:null}var Nn={selectAll:Al,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ve)},killLine:function(e){return en(e,function(t){if(t.empty()){var n=ce(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new L(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),L(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ce(e.doc,i.line-1).text;l&&(i=new L(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),L(i.line-1,l.length-1),i,"+transpose"))}}n.push(new He(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Dt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&Z(t,this.pos)==0&&n==this.button};var Pn,In;function tu(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new io(n,e,t),Pn=null,"double"):(Pn=new io(n,e,t),In=null,"single")}function ea(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){_||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!oo(t,e)){var r=Tr(t,e),i=Wt(e),o=r?tu(r,i):"single";j(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ru(t,i,r,o,e))&&(i==1?r?iu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(fe?t.display.input.onContextMenu(e):_i(t)))}}}function ru(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Ul(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function nu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ae?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=se?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(se?n.altKey:n.ctrlKey)),i}function iu(e,t,n,r){b?setTimeout(ue(tl,e),0):e.curOp.focus=y(Y(e));var i=nu(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&mi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(Z((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(Z(l.to(),t)>0||t.xRel<0)?ou(e,r,t,i):lu(e,r,t,i)}function ou(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){_&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_i(e)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",a),dt(i.scroller,"dragstart",s),dt(i.scroller,"drop",l),o||(ht(u),r.addNew||oi(e.doc,n,null,null,r.extend),_&&!X||b&&N==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};_&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,ve(i.wrapper.ownerDocument,"mouseup",l),ve(i.wrapper.ownerDocument,"mousemove",a),ve(i.scroller,"dragstart",s),ve(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ta(e,t,n){if(n=="char")return new He(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new He(L(t.line,0),Ce(e.doc,L(t.line+1,0)));var r=n(e,t);return new He(r.from,r.to)}function lu(e,t,n,r){b&&_i(e);var i=e.display,o=e.doc;ht(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(n),a>-1?l=u[a]:l=new He(n,n)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new He(n,n)),n=Tr(e,t,!0,!0),a=-1;else{var h=ta(e,n,r.unit);r.extend?l=Vi(l,h.anchor,h.head,r.extend):l=h}r.addNew?a==-1?(a=u.length,pt(o,Kt(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(pt(o,Kt(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):$i(o,a,l,ct):(a=0,pt(o,new At([l],0),ct),s=o.sel);var v=n;function k(G){if(Z(v,G)!=0)if(v=G,r.unit=="rectangle"){for(var ee=[],me=e.options.tabSize,pe=Le(ce(o,n.line).text,n.ch,me),Fe=Le(ce(o,G.line).text,G.ch,me),Ke=Math.min(pe,Fe),st=Math.max(pe,Fe),Xe=Math.min(n.line,G.line),Mt=Math.min(e.lastLine(),Math.max(n.line,G.line));Xe<=Mt;Xe++){var wt=ce(o,Xe).text,tt=Re(wt,Ke,me);Ke==st?ee.push(new He(L(Xe,tt),L(Xe,tt))):wt.length>tt&&ee.push(new He(L(Xe,tt),L(Xe,Re(wt,st,me))))}ee.length||ee.push(new He(n,n)),pt(o,Kt(e,s.ranges.slice(0,a).concat(ee),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(G)}else{var St=l,ft=ta(e,G,r.unit),nt=St.anchor,rt;Z(ft.anchor,nt)>0?(rt=ft.head,nt=_r(St.from(),ft.anchor)):(rt=ft.anchor,nt=xt(St.to(),ft.head));var Qe=s.ranges.slice(0);Qe[a]=au(e,new He(Ce(o,nt),rt)),pt(o,Kt(e,Qe,a),ct)}}var x=i.wrapper.getBoundingClientRect(),M=0;function E(G){var ee=++M,me=Tr(e,G,!0,r.unit=="rectangle");if(me)if(Z(me,v)!=0){e.curOp.focus=y(Y(e)),k(me);var pe=$n(i,o);(me.line>=pe.to||me.linex.bottom?20:0;Fe&&setTimeout(lt(e,function(){M==ee&&(i.scroller.scrollTop+=Fe,E(G))}),50)}}function R(G){e.state.selectingText=!1,M=1/0,G&&(ht(G),i.input.focus()),dt(i.wrapper.ownerDocument,"mousemove",U),dt(i.wrapper.ownerDocument,"mouseup",Q),o.history.lastSelOrigin=null}var U=lt(e,function(G){G.buttons===0||!Wt(G)?R(G):E(G)}),Q=lt(e,R);e.state.selectingText=Q,ve(i.wrapper.ownerDocument,"mousemove",U),ve(i.wrapper.ownerDocument,"mouseup",Q)}function au(e,t){var n=t.anchor,r=t.head,i=ce(e.doc,n.line);if(Z(n,r)==0&&n.sticky==r.sticky)return t;var o=We(i);if(!o)return t;var l=lr(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s=l+(a.from==n.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=lr(o,r.ch,r.sticky),v=h-l||(r.ch-n.ch)*(a.level==1?-1:1);h==s-1||h==s?u=v<0:u=v>0}var k=o[s+(u?-1:0)],x=u==(k.level==1),M=x?k.from:k.to,E=x?"after":"before";return n.ch==M&&n.sticky==E?t:new He(new L(n.line,M,E),r)}function ra(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ht(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ct(e,n))return yt(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var h=g(e.doc,o),v=e.display.gutterSpecs[s];return Ye(e,n,e,h,v.className,t),yt(t)}}}function oo(e,t){return ra(e,t,"gutterClick",!0)}function na(e,t){tr(e.display,t)||su(e,t)||Ze(e,t,"contextmenu")||fe||e.display.input.onContextMenu(t)}function su(e,t){return Ct(e,"gutterContextMenu")?ra(e,t,"gutterContextMenu",!1):!1}function ia(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(e)}var tn={toString:function(){return"CodeMirror.Init"}},oa={},di={};function uu(e){var t=e.optionHandlers;function n(r,i,o,l){e.defaults[r]=i,o&&(t[r]=l?function(a,s,u){u!=tn&&o(a,s,u)}:o)}e.defineOption=n,e.Init=tn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Zi(r)},!0),n("indentUnit",2,Zi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Sn(r),gn(r),bt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var h=s.text.indexOf(i,u);if(h==-1)break;u=h+i.length,o.push(L(l,h))}l++});for(var a=o.length-1;a>=0;a--)Qr(r.doc,i,o[a],L(o[a].line,o[a].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=tn&&r.refresh()}),n("specialCharPlaceholder",Wa,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",ne?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!ye),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){ia(r),wn(r)},!0),n("keyMap","default",function(r,i,o){var l=fi(i),a=o!=tn&&fi(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,cu,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Xi(i,r.options.lineNumbers),wn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Ii(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Xr(r)},!0),n("scrollbarStyle","native",function(r){al(r),Xr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Xi(r.options.gutters,i),wn(r)},!0),n("firstLineNumber",1,wn,!0),n("lineNumberFormatter",function(r){return r},wn,!0),n("showCursorWhenSelecting",!1,vn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Ur(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,fu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vn,!0),n("singleCursorHeightPerLine",!0,vn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Sn,!0),n("addModeClass",!1,Sn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Sn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function fu(e,t,n){var r=n&&n!=tn;if(!t!=!r){var i=e.display.dragFunctions,o=t?ve:dt;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function cu(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ee(e.display.wrapper,"CodeMirror-wrap"),Li(e)),zi(e),bt(e),gn(e),setTimeout(function(){return Xr(e)},100)}function Ge(e,t){var n=this;if(!(this instanceof Ge))return new Ge(e,t);this.options=t=t?Te(t):{},Te(oa,t,!1);var r=t.value;typeof r=="string"?r=new kt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ge.inputStyles[t.inputStyle](this),o=this.display=new Ts(e,r,i,t);o.wrapper.CodeMirror=this,ia(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),al(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new be,keySeq:null,specialChars:null},t.autofocus&&!ne&&o.input.focus(),b&&N<11&&setTimeout(function(){return n.display.input.reset(!0)},20),du(this),js(),Mr(this),this.curOp.forceUpdate=!0,ml(this,r),t.autofocus&&!ne||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Hi(n)},20):Ur(this);for(var l in di)di.hasOwnProperty(l)&&di[l](this,t[l],tn);fl(this),t.finishInit&&t.finishInit(this);for(var a=0;a20*20}ve(t.scroller,"touchstart",function(s){if(!Ze(e,s)&&!o(s)&&!oo(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),ve(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ve(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!tr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var h=e.coordsChar(t.activeTouch,"page"),v;!u.prev||l(u,u.prev)?v=new He(h,h):!u.prev.prev||l(u,u.prev.prev)?v=e.findWordAt(h):v=new He(L(h.line,0),Ce(e.doc,L(h.line+1,0))),e.setSelection(v.anchor,v.head),e.focus(),ht(s)}i()}),ve(t.scroller,"touchcancel",i),ve(t.scroller,"scroll",function(){t.scroller.clientHeight&&(yn(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),Ye(e,"scroll",e))}),ve(t.scroller,"mousewheel",function(s){return hl(e,s)}),ve(t.scroller,"DOMMouseScroll",function(s){return hl(e,s)}),ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Ze(e,s)||ar(s)},over:function(s){Ze(e,s)||(qs(e,s),ar(s))},start:function(s){return Rs(e,s)},drop:lt(e,Hs),leave:function(s){Ze(e,s)||Rl(e)}};var a=t.input.getField();ve(a,"keyup",function(s){return Vl.call(e,s)}),ve(a,"keydown",lt(e,Ql)),ve(a,"keypress",lt(e,$l)),ve(a,"focus",function(s){return Hi(e,s)}),ve(a,"blur",function(s){return Ur(e,s)})}var lo=[];Ge.defineInitHook=function(e){return lo.push(e)};function zn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=fn(e,t).state:n="prev");var l=e.options.tabSize,a=ce(i,t),s=Le(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(a.text))h=0,n="not";else if(n=="smart"&&(h=i.mode.indent(o,a.text.slice(u.length),a.text),h==qe||h>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?h=Le(ce(i,t-1).text,null,l):h=0:n=="add"?h=s+e.options.indentUnit:n=="subtract"?h=s-e.options.indentUnit:typeof n=="number"&&(h=s+n),h=Math.max(0,h);var v="",k=0;if(e.options.indentWithTabs)for(var x=Math.floor(h/l);x;--x)k+=l,v+=" ";if(kl,s=Pt(t),u=null;if(a&&r.ranges.length>1)if(Ut&&Ut.text.join(` -`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h=0;k--){var x=r.ranges[k],M=x.from(),E=x.to();x.empty()&&(n&&n>0?M=L(M.line,M.ch-n):e.state.overwrite&&!a?E=L(E.line,Math.min(ce(o,E.line).text.length,E.ch+ge(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(` -`)==s.join(` -`)&&(M=E=L(M.line,0)));var R={from:M,to:E,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,R),ot(e,"inputRead",e,R)}t&&!a&&aa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function la(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return ao(t,n,0,null,"paste")}),!0}function aa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ce(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function sa(e){for(var t=[],n=[],r=0;ro&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v0&&$i(this.doc,l,new He(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return xo(this,r,i)},getLineTokens:function(r,i){return xo(this,L(r),i,!0)},getTokenTypeAt:function(r){r=Ce(this.doc,r);var i=vo(this,ce(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]s&&(r=s,l=!0),a=ce(this.doc,r)}else a=r;return Yn(this,a,{top:0,left:0},i||"page",o||l).top+(l?this.doc.height-er(a):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Kr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,l,a){var s=this.display;r=jt(this,Ce(this.doc,r));var u=r.bottom,h=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),l=="over")u=r.top;else if(l=="above"||l=="near"){var v=Math.max(s.wrapper.clientHeight,this.doc.height),k=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>v)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=v&&(u=r.bottom),h+i.offsetWidth>k&&(h=k-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",a=="right"?(h=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(a=="left"?h=0:a=="middle"&&(h=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=h+"px"),o&&fs(this,{left:h,top:u,right:h+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:vt(Ql),triggerOnKeyPress:vt($l),triggerOnKeyUp:Vl,triggerOnMouseDown:vt(ea),execCommand:function(r){if(Nn.hasOwnProperty(r))return Nn[r].call(null,this)},triggerElectric:vt(function(r){aa(this,r)}),findPosH:function(r,i,o,l){var a=1;i<0&&(a=-1,i=-i);for(var s=Ce(this.doc,r),u=0;u0&&h(o.charAt(l-1));)--l;for(;a.5||this.options.lineWrapping)&&zi(this),Ye(this,"refresh",this)}),swapDoc:vt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ml(this,r),gn(this),this.display.input.reset(),mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ot(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Bt(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,l){e.registerHelper(r,i,l),n[r]._global.push({pred:o,val:l})}}function uo(e,t,n,r,i){var o=t,l=n,a=ce(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var Q=t.line+s;return Q=e.first+e.size?!1:(t=new L(Q,t.ch,t.sticky),a=ce(e,Q))}function h(Q){var G;if(r=="codepoint"){var ee=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ee))G=null;else{var me=n>0?ee>=55296&&ee<56320:ee>=56320&&ee<57343;G=new L(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(me?2:1))),-n)}}else i?G=Ys(e.cm,a,t,n):G=to(a,t,n);if(G==null)if(!Q&&u())t=ro(i,e.cm,a,t.line,s);else return!1;else t=G;return!0}if(r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var v=null,k=r=="group",x=e.cm&&e.cm.getHelper(t,"wordChars"),M=!0;!(n<0&&!h(!M));M=!1){var E=a.text.charAt(t.ch)||` -`,R=Se(E,x)?"w":k&&E==` -`?"n":!k||/\s/.test(E)?null:"p";if(k&&!M&&!R&&(R="s"),v&&v!=R){n<0&&(n=1,h(),t.sticky="after");break}if(R&&(v=R),n>0&&!h(!M))break}var U=ai(e,t,o,l,!0);return _e(o,U)&&(U.hitSide=!0),U}function fa(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,j(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Ni(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,so(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ve(i,"paste",function(a){!o(a)||Ze(r,a)||la(a,r)||N<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ve(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ve(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return n.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=sa(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(` -`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=ua(),v=h.firstChild;so(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(` -`);var k=y(xe(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ve(i,"copy",l),ve(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=el(this.cm,!1);return e.focus=y(xe(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ca(t,r)||{node:a[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(r=L(r.line-1,ce(e.doc,r.line-1).length)),i.ch==ce(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Lr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Lr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(gu(e,a,h,l,u)),k=Vt(e.doc,L(l,0),L(u,ce(e.doc,u).text.length));v.length>1&&k.length>1;)if(ge(v)==ge(k))v.pop(),k.pop(),u--;else if(v[0]==k[0])v.shift(),k.shift(),l++;else break;for(var x=0,M=0,E=v[0],R=k[0],U=Math.min(E.length,R.length);xr.ch&&Q.charCodeAt(Q.length-M-1)==G.charCodeAt(G.length-M-1);)x--,M++;v[v.length-1]=Q.slice(0,Q.length-M).replace(/^\u200b+/,""),v[0]=v[0].slice(x).replace(/\u200b+$/,"");var me=L(l,x),pe=L(u,k.length?ge(k).length-M:0);if(v.length>1||v[0]||Z(me,pe))return Qr(e.doc,v,me,pe,"+input"),!0},je.prototype.ensurePolled=function(){this.forceCompositionEnd()},je.prototype.reset=function(){this.forceCompositionEnd()},je.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},je.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},je.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Dt(this.cm,function(){return bt(e.cm)})},je.prototype.setUneditable=function(e){e.contentEditable="false"},je.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||lt(this.cm,ao)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},je.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},je.prototype.onContextMenu=function(){},je.prototype.resetPosition=function(){},je.prototype.needsContentAttribute=!0;function ca(e,t){var n=Fi(e,t.line);if(!n||n.hidden)return null;var r=ce(e.doc,t.line),i=Ho(n,r,t.line),o=We(r,e.doc.direction),l="left";if(o){var a=lr(o,t.ch);l=a%2?"right":"left"}var s=jo(i.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function pu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function rn(e,t){return t&&(e.bad=!0),e}function gu(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(x){return function(M){return M.id==x}}function h(){l&&(o+=a,s&&(o+=a),l=s=!1)}function v(x){x&&(h(),o+=x)}function k(x){if(x.nodeType==1){var M=x.getAttribute("cm-text");if(M){v(M);return}var E=x.getAttribute("cm-marker"),R;if(E){var U=e.findMarks(L(r,0),L(i+1,0),u(+E));U.length&&(R=U[0].find(0))&&v(Vt(e.doc,R.from,R.to).join(a));return}if(x.getAttribute("contenteditable")=="false")return;var Q=/^(pre|div|p|li|table|br)$/i.test(x.nodeName);if(!/^br$/i.test(x.nodeName)&&x.textContent.length==0)return;Q&&h();for(var G=0;G=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),ve(i,"paste",function(l){Ze(r,l)||la(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(l){if(!Ze(r,l)){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=sa(r);hi({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Ve):(n.prevInput="",i.value=a.text.join(` -`),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ve(i,"cut",o),ve(i,"copy",o),ve(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ve(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ve(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=ua(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;so(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=el(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;J(n.cursorDiv,e.cursors),J(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&N>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&N>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||y(xe(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&N>=9&&this.hasSelection===i||se&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r="​"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l1e3||i.indexOf(` -`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&N>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Tr(n,e),l=r.scroller.scrollTop;if(!o||z)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; - top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px; - z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;_&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),_&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=x,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var E=n.somethingSelected(),R="​"+(E?i.value:"");i.value="⇚",i.value=R,t.prevInput=E?"":"​",i.selectionStart=1,i.selectionEnd=R.length,r.selForContextMenu=n.doc.sel}}function x(){if(t.contextMenuPending==x&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&N<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&N<9)&&k();var E=0,R=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?lt(n,Al)(n):E++<10?r.detectingSelectAll=setTimeout(R,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(R,200)}}if(b&&N>=9&&k(),fe){ar(e);var M=function(){dt(window,"mouseup",M),setTimeout(x,20)};ve(window,"mouseup",M)}else setTimeout(x,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function mu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=y(xe(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ve(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function yu(e){e.off=dt,e.on=ve,e.wheelEventPixels=Ls,e.Doc=kt,e.splitLines=Pt,e.countColumn=Le,e.findColumn=Re,e.isWordChar=ae,e.Pass=qe,e.signal=Ye,e.Line=Hr,e.changeEnd=gr,e.scrollbarModel=ll,e.Pos=L,e.cmpPos=Z,e.modes=Pr,e.mimeModes=Ht,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Gl,e.isModifierKey=Kl,e.lookupKey=$r,e.normalizeKeyMap=Xs,e.StringStream=Je,e.SharedTextMarker=Fn,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=P,e.contains=m,e.rmClass=Ee,e.keyNames=yr}uu(Ge),hu(Ge);var xu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&oe(xu,gi)<0&&(Ge.prototype[gi]=function(e){return function(){return e.apply(this.doc,arguments)}}(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=mu,yu(Ge),Ge.version="5.65.18",Ge})})(ya);var It=ya.exports;const Cu=bu(It);var wu={exports:{}};(function(Et,zt){(function(C){C(It)})(function(C){C.defineMode("css",function(fe,H){var Ee=H.inline;H.propertyKeywords||(H=C.resolveMode("text/css"));var D=fe.indentUnit,J=H.tokenHooks,d=H.documentTypes||{},S=H.mediaTypes||{},w=H.mediaFeatures||{},m=H.mediaValueKeywords||{},y=H.propertyKeywords||{},P=H.nonStandardPropertyKeywords||{},le=H.fontProperties||{},p=H.counterDescriptors||{},c=H.colorKeywords||{},Y=H.valueKeywords||{},xe=H.allowNested,j=H.lineComment,ue=H.supportsAtComponent===!0,Te=fe.highlightNonStandardPropertyKeywords!==!1,Le,be;function oe(T,B){return Le=B,T}function Ne(T,B){var F=T.next();if(J[F]){var Ie=J[F](T,B);if(Ie!==!1)return Ie}if(F=="@")return T.eatWhile(/[\w\\\-]/),oe("def",T.current());if(F=="="||(F=="~"||F=="|")&&T.eat("="))return oe(null,"compare");if(F=='"'||F=="'")return B.tokenize=qe(F),B.tokenize(T,B);if(F=="#")return T.eatWhile(/[\w\\\-]/),oe("atom","hash");if(F=="!")return T.match(/^\s*\w*/),oe("keyword","important");if(/\d/.test(F)||F=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),oe("number","unit");if(F==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),oe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?oe("variable-2","variable-definition"):oe("variable-2","variable");if(T.match(/^\w+-/))return oe("meta","meta")}else return/[,+>*\/]/.test(F)?oe(null,"select-op"):F=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?oe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(F)?oe(null,F):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(B.tokenize=Ve),oe("variable callee","variable")):/[\w\\\-]/.test(F)?(T.eatWhile(/[\w\\\-]/),oe("property","word")):oe(null,null)}function qe(T){return function(B,F){for(var Ie=!1,ae;(ae=B.next())!=null;){if(ae==T&&!Ie){T==")"&&B.backUp(1);break}Ie=!Ie&&ae=="\\"}return(ae==T||!Ie&&T!=")")&&(F.tokenize=null),oe("string","string")}}function Ve(T,B){return T.next(),T.match(/^\s*[\"\')]/,!1)?B.tokenize=null:B.tokenize=qe(")"),oe(null,"(")}function ct(T,B,F){this.type=T,this.indent=B,this.prev=F}function Oe(T,B,F,Ie){return T.context=new ct(F,B.indentation()+(Ie===!1?0:D),T.context),F}function Re(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function Ue(T,B,F){return Pe[F.context.type](T,B,F)}function et(T,B,F,Ie){for(var ae=Ie||1;ae>0;ae--)F.context=F.context.prev;return Ue(T,B,F)}function ge(T){var B=T.current().toLowerCase();Y.hasOwnProperty(B)?be="atom":c.hasOwnProperty(B)?be="keyword":be="variable"}var Pe={};return Pe.top=function(T,B,F){if(T=="{")return Oe(F,B,"block");if(T=="}"&&F.context.prev)return Re(F);if(ue&&/@component/i.test(T))return Oe(F,B,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return Oe(F,B,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return Oe(F,B,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return F.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return Oe(F,B,"at");if(T=="hash")be="builtin";else if(T=="word")be="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return Oe(F,B,"interpolation");if(T==":")return"pseudo";if(xe&&T=="(")return Oe(F,B,"parens")}return F.context.type},Pe.block=function(T,B,F){if(T=="word"){var Ie=B.current().toLowerCase();return y.hasOwnProperty(Ie)?(be="property","maybeprop"):P.hasOwnProperty(Ie)?(be=Te?"string-2":"property","maybeprop"):xe?(be=B.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(be+=" error","maybeprop")}else return T=="meta"?"block":!xe&&(T=="hash"||T=="qualifier")?(be="error","block"):Pe.top(T,B,F)},Pe.maybeprop=function(T,B,F){return T==":"?Oe(F,B,"prop"):Ue(T,B,F)},Pe.prop=function(T,B,F){if(T==";")return Re(F);if(T=="{"&&xe)return Oe(F,B,"propBlock");if(T=="}"||T=="{")return et(T,B,F);if(T=="(")return Oe(F,B,"parens");if(T=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(B.current()))be+=" error";else if(T=="word")ge(B);else if(T=="interpolation")return Oe(F,B,"interpolation");return"prop"},Pe.propBlock=function(T,B,F){return T=="}"?Re(F):T=="word"?(be="property","maybeprop"):F.context.type},Pe.parens=function(T,B,F){return T=="{"||T=="}"?et(T,B,F):T==")"?Re(F):T=="("?Oe(F,B,"parens"):T=="interpolation"?Oe(F,B,"interpolation"):(T=="word"&&ge(B),"parens")},Pe.pseudo=function(T,B,F){return T=="meta"?"pseudo":T=="word"?(be="variable-3",F.context.type):Ue(T,B,F)},Pe.documentTypes=function(T,B,F){return T=="word"&&d.hasOwnProperty(B.current())?(be="tag",F.context.type):Pe.atBlock(T,B,F)},Pe.atBlock=function(T,B,F){if(T=="(")return Oe(F,B,"atBlock_parens");if(T=="}"||T==";")return et(T,B,F);if(T=="{")return Re(F)&&Oe(F,B,xe?"block":"top");if(T=="interpolation")return Oe(F,B,"interpolation");if(T=="word"){var Ie=B.current().toLowerCase();Ie=="only"||Ie=="not"||Ie=="and"||Ie=="or"?be="keyword":S.hasOwnProperty(Ie)?be="attribute":w.hasOwnProperty(Ie)?be="property":m.hasOwnProperty(Ie)?be="keyword":y.hasOwnProperty(Ie)?be="property":P.hasOwnProperty(Ie)?be=Te?"string-2":"property":Y.hasOwnProperty(Ie)?be="atom":c.hasOwnProperty(Ie)?be="keyword":be="error"}return F.context.type},Pe.atComponentBlock=function(T,B,F){return T=="}"?et(T,B,F):T=="{"?Re(F)&&Oe(F,B,xe?"block":"top",!1):(T=="word"&&(be="error"),F.context.type)},Pe.atBlock_parens=function(T,B,F){return T==")"?Re(F):T=="{"||T=="}"?et(T,B,F,2):Pe.atBlock(T,B,F)},Pe.restricted_atBlock_before=function(T,B,F){return T=="{"?Oe(F,B,"restricted_atBlock"):T=="word"&&F.stateArg=="@counter-style"?(be="variable","restricted_atBlock_before"):Ue(T,B,F)},Pe.restricted_atBlock=function(T,B,F){return T=="}"?(F.stateArg=null,Re(F)):T=="word"?(F.stateArg=="@font-face"&&!le.hasOwnProperty(B.current().toLowerCase())||F.stateArg=="@counter-style"&&!p.hasOwnProperty(B.current().toLowerCase())?be="error":be="property","maybeprop"):"restricted_atBlock"},Pe.keyframes=function(T,B,F){return T=="word"?(be="variable","keyframes"):T=="{"?Oe(F,B,"top"):Ue(T,B,F)},Pe.at=function(T,B,F){return T==";"?Re(F):T=="{"||T=="}"?et(T,B,F):(T=="word"?be="tag":T=="hash"&&(be="builtin"),"at")},Pe.interpolation=function(T,B,F){return T=="}"?Re(F):T=="{"||T==";"?et(T,B,F):(T=="word"?be="variable":T!="variable"&&T!="("&&T!=")"&&(be="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:Ee?"block":"top",stateArg:null,context:new ct(Ee?"block":"top",T||0,null)}},token:function(T,B){if(!B.tokenize&&T.eatSpace())return null;var F=(B.tokenize||Ne)(T,B);return F&&typeof F=="object"&&(Le=F[1],F=F[0]),be=F,Le!="comment"&&(B.state=Pe[B.state](Le,T,B)),be},indent:function(T,B){var F=T.context,Ie=B&&B.charAt(0),ae=F.indent;return F.type=="prop"&&(Ie=="}"||Ie==")")&&(F=F.prev),F.prev&&(Ie=="}"&&(F.type=="block"||F.type=="top"||F.type=="interpolation"||F.type=="restricted_atBlock")?(F=F.prev,ae=F.indent):(Ie==")"&&(F.type=="parens"||F.type=="atBlock_parens")||Ie=="{"&&(F.type=="at"||F.type=="atBlock"))&&(ae=Math.max(0,F.indent-D))),ae},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:j,fold:"brace"}});function De(fe){for(var H={},Ee=0;Ee")):null:d.match("--")?w(ke("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),w(we(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),S.tokenize=ke("meta","?>"),"meta"):(ie=d.eat("/")?"closeTag":"openTag",S.tokenize=z,"tag bracket");if(m=="&"){var y;return d.eat("#")?d.eat("x")?y=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):y=d.eatWhile(/[\d]/)&&d.eat(";"):y=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),y?"atom":"error"}else return d.eatWhile(/[^&<]/),null}q.isInText=!0;function z(d,S){var w=d.next();if(w==">"||w=="/"&&d.eat(">"))return S.tokenize=q,ie=w==">"?"endTag":"selfcloseTag","tag bracket";if(w=="=")return ie="equals",null;if(w=="<"){S.tokenize=q,S.state=Ae,S.tagName=S.tagStart=null;var m=S.tokenize(d,S);return m?m+" tag error":"tag error"}else return/[\'\"]/.test(w)?(S.tokenize=X(w),S.stringStartCol=d.column(),S.tokenize(d,S)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function X(d){var S=function(w,m){for(;!w.eol();)if(w.next()==d){m.tokenize=z;break}return"string"};return S.isInAttribute=!0,S}function ke(d,S){return function(w,m){for(;!w.eol();){if(w.match(S)){m.tokenize=q;break}w.next()}return d}}function we(d){return function(S,w){for(var m;(m=S.next())!=null;){if(m=="<")return w.tokenize=we(d+1),w.tokenize(S,w);if(m==">")if(d==1){w.tokenize=q;break}else return w.tokenize=we(d-1),w.tokenize(S,w)}return"meta"}}function te(d){return d&&d.toLowerCase()}function re(d,S,w){this.prev=d.context,this.tagName=S||"",this.indent=d.indented,this.startOfLine=w,(b.doNotIndent.hasOwnProperty(S)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function ne(d){d.context&&(d.context=d.context.prev)}function se(d,S){for(var w;;){if(!d.context||(w=d.context.tagName,!b.contextGrabbers.hasOwnProperty(te(w))||!b.contextGrabbers[te(w)].hasOwnProperty(te(S))))return;ne(d)}}function Ae(d,S,w){return d=="openTag"?(w.tagStart=S.column(),ye):d=="closeTag"?de:Ae}function ye(d,S,w){return d=="word"?(w.tagName=S.current(),O="tag",H):b.allowMissingTagName&&d=="endTag"?(O="tag bracket",H(d,S,w)):(O="error",ye)}function de(d,S,w){if(d=="word"){var m=S.current();return w.context&&w.context.tagName!=m&&b.implicitlyClosed.hasOwnProperty(te(w.context.tagName))&&ne(w),w.context&&w.context.tagName==m||b.matchClosing===!1?(O="tag",ze):(O="tag error",fe)}else return b.allowMissingTagName&&d=="endTag"?(O="tag bracket",ze(d,S,w)):(O="error",fe)}function ze(d,S,w){return d!="endTag"?(O="error",ze):(ne(w),Ae)}function fe(d,S,w){return O="error",ze(d,S,w)}function H(d,S,w){if(d=="word")return O="attribute",Ee;if(d=="endTag"||d=="selfcloseTag"){var m=w.tagName,y=w.tagStart;return w.tagName=w.tagStart=null,d=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(te(m))?se(w,m):(se(w,m),w.context=new re(w,m,y==w.indented)),Ae}return O="error",H}function Ee(d,S,w){return d=="equals"?D:(b.allowMissing||(O="error"),H(d,S,w))}function D(d,S,w){return d=="string"?J:d=="word"&&b.allowUnquoted?(O="string",H):(O="error",H(d,S,w))}function J(d,S,w){return d=="string"?J:H(d,S,w)}return{startState:function(d){var S={tokenize:q,state:Ae,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(S.baseIndent=d),S},token:function(d,S){if(!S.tagName&&d.sol()&&(S.indented=d.indentation()),d.eatSpace())return null;ie=null;var w=S.tokenize(d,S);return(w||ie)&&w!="comment"&&(O=null,S.state=S.state(ie||w,d,S),O&&(w=O=="error"?w+" error":O)),w},indent:function(d,S,w){var m=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+V;if(m&&m.noIndent)return C.Pass;if(d.tokenize!=z&&d.tokenize!=q)return w?w.match(/^(\s*)/)[0].length:0;if(d.tagName)return b.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+V*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(d){d.state==D&&(d.state=H)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var S=[],w=d.context;w;w=w.prev)S.push(w.tagName);return S.reverse()}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),da.exports}var pa={exports:{}},ga;function ba(){return ga||(ga=1,function(Et,zt){(function(C){C(It)})(function(C){C.defineMode("javascript",function(De,I){var K=De.indentUnit,$=I.statementIndent,V=I.jsonld,b=I.json||V,N=I.trackScope!==!1,_=I.typescript,ie=I.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function f(it){return{type:it,style:"keyword"}}var g=f("keyword a"),A=f("keyword b"),W=f("keyword c"),L=f("keyword d"),Z=f("operator"),_e={type:"atom",style:"atom"};return{if:f("if"),while:g,with:g,else:A,do:A,try:A,finally:A,return:L,break:L,continue:L,new:f("new"),delete:W,void:W,throw:W,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:Z,typeof:Z,instanceof:Z,true:_e,false:_e,null:_e,undefined:_e,NaN:_e,Infinity:_e,this:f("this"),class:f("class"),super:f("atom"),yield:W,export:f("export"),import:f("import"),extends:W,await:W}}(),q=/[+\-*&%=<>!?|~^@]/,z=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function X(f){for(var g=!1,A,W=!1;(A=f.next())!=null;){if(!g){if(A=="/"&&!W)return;A=="["?W=!0:W&&A=="]"&&(W=!1)}g=!g&&A=="\\"}}var ke,we;function te(f,g,A){return ke=f,we=A,g}function re(f,g){var A=f.next();if(A=='"'||A=="'")return g.tokenize=ne(A),g.tokenize(f,g);if(A=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return te("number","number");if(A=="."&&f.match(".."))return te("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(A))return te(A);if(A=="="&&f.eat(">"))return te("=>","operator");if(A=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return te("number","number");if(/\d/.test(A))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),te("number","number");if(A=="/")return f.eat("*")?(g.tokenize=se,se(f,g)):f.eat("/")?(f.skipToEnd(),te("comment","comment")):Ft(f,g,1)?(X(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),te("regexp","string-2")):(f.eat("="),te("operator","operator",f.current()));if(A=="`")return g.tokenize=Ae,Ae(f,g);if(A=="#"&&f.peek()=="!")return f.skipToEnd(),te("meta","meta");if(A=="#"&&f.eatWhile(ie))return te("variable","property");if(A=="<"&&f.match("!--")||A=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),te("comment","comment");if(q.test(A))return(A!=">"||!g.lexical||g.lexical.type!=">")&&(f.eat("=")?(A=="!"||A=="=")&&f.eat("="):/[<>*+\-|&?]/.test(A)&&(f.eat(A),A==">"&&f.eat(A))),A=="?"&&f.eat(".")?te("."):te("operator","operator",f.current());if(ie.test(A)){f.eatWhile(ie);var W=f.current();if(g.lastType!="."){if(O.propertyIsEnumerable(W)){var L=O[W];return te(L.type,L.style,W)}if(W=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return te("async","keyword",W)}return te("variable","variable",W)}}function ne(f){return function(g,A){var W=!1,L;if(V&&g.peek()=="@"&&g.match(z))return A.tokenize=re,te("jsonld-keyword","meta");for(;(L=g.next())!=null&&!(L==f&&!W);)W=!W&&L=="\\";return W||(A.tokenize=re),te("string","string")}}function se(f,g){for(var A=!1,W;W=f.next();){if(W=="/"&&A){g.tokenize=re;break}A=W=="*"}return te("comment","comment")}function Ae(f,g){for(var A=!1,W;(W=f.next())!=null;){if(!A&&(W=="`"||W=="$"&&f.eat("{"))){g.tokenize=re;break}A=!A&&W=="\\"}return te("quasi","string-2",f.current())}var ye="([{}])";function de(f,g){g.fatArrowAt&&(g.fatArrowAt=null);var A=f.string.indexOf("=>",f.start);if(!(A<0)){if(_){var W=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,A));W&&(A=W.index)}for(var L=0,Z=!1,_e=A-1;_e>=0;--_e){var it=f.string.charAt(_e),xt=ye.indexOf(it);if(xt>=0&&xt<3){if(!L){++_e;break}if(--L==0){it=="("&&(Z=!0);break}}else if(xt>=3&&xt<6)++L;else if(ie.test(it))Z=!0;else if(/["'\/`]/.test(it))for(;;--_e){if(_e==0)return;var _r=f.string.charAt(_e-1);if(_r==it&&f.string.charAt(_e-2)!="\\"){_e--;break}}else if(Z&&!L){++_e;break}}Z&&!L&&(g.fatArrowAt=_e)}}var ze={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function fe(f,g,A,W,L,Z){this.indented=f,this.column=g,this.type=A,this.prev=L,this.info=Z,W!=null&&(this.align=W)}function H(f,g){if(!N)return!1;for(var A=f.localVars;A;A=A.next)if(A.name==g)return!0;for(var W=f.context;W;W=W.prev)for(var A=W.vars;A;A=A.next)if(A.name==g)return!0}function Ee(f,g,A,W,L){var Z=f.cc;for(D.state=f,D.stream=L,D.marked=null,D.cc=Z,D.style=g,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var _e=Z.length?Z.pop():b?oe:Le;if(_e(A,W)){for(;Z.length&&Z[Z.length-1].lex;)Z.pop()();return D.marked?D.marked:A=="variable"&&H(f,W)?"variable-2":g}}}var D={state:null,column:null,marked:null,cc:null};function J(){for(var f=arguments.length-1;f>=0;f--)D.cc.push(arguments[f])}function d(){return J.apply(null,arguments),!0}function S(f,g){for(var A=g;A;A=A.next)if(A.name==f)return!0;return!1}function w(f){var g=D.state;if(D.marked="def",!!N){if(g.context){if(g.lexical.info=="var"&&g.context&&g.context.block){var A=m(f,g.context);if(A!=null){g.context=A;return}}else if(!S(f,g.localVars)){g.localVars=new le(f,g.localVars);return}}I.globalVars&&!S(f,g.globalVars)&&(g.globalVars=new le(f,g.globalVars))}}function m(f,g){if(g)if(g.block){var A=m(f,g.prev);return A?A==g.prev?g:new P(A,g.vars,!0):null}else return S(f,g.vars)?g:new P(g.prev,new le(f,g.vars),!1);else return null}function y(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function P(f,g,A){this.prev=f,this.vars=g,this.block=A}function le(f,g){this.name=f,this.next=g}var p=new le("this",new le("arguments",null));function c(){D.state.context=new P(D.state.context,D.state.localVars,!1),D.state.localVars=p}function Y(){D.state.context=new P(D.state.context,D.state.localVars,!0),D.state.localVars=null}c.lex=Y.lex=!0;function xe(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}xe.lex=!0;function j(f,g){var A=function(){var W=D.state,L=W.indented;if(W.lexical.type=="stat")L=W.lexical.indented;else for(var Z=W.lexical;Z&&Z.type==")"&&Z.align;Z=Z.prev)L=Z.indented;W.lexical=new fe(L,D.stream.column(),f,null,W.lexical,g)};return A.lex=!0,A}function ue(){var f=D.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}ue.lex=!0;function Te(f){function g(A){return A==f?d():f==";"||A=="}"||A==")"||A=="]"?J():d(g)}return g}function Le(f,g){return f=="var"?d(j("vardef",g),Nr,Te(";"),ue):f=="keyword a"?d(j("form"),qe,Le,ue):f=="keyword b"?d(j("form"),Le,ue):f=="keyword d"?D.stream.match(/^\s*$/,!1)?d():d(j("stat"),ct,Te(";"),ue):f=="debugger"?d(Te(";")):f=="{"?d(j("}"),Y,Nt,ue,xe):f==";"?d():f=="if"?(D.state.lexical.info=="else"&&D.state.cc[D.state.cc.length-1]==ue&&D.state.cc.pop()(),d(j("form"),qe,Le,ue,Or)):f=="function"?d(Pt):f=="for"?d(j("form"),Y,Wn,Le,xe,ue):f=="class"||_&&g=="interface"?(D.marked="keyword",d(j("form",f=="class"?f:g),Pr,ue)):f=="variable"?_&&g=="declare"?(D.marked="keyword",d(Le)):_&&(g=="module"||g=="enum"||g=="type")&&D.stream.match(/^\s*\w/,!1)?(D.marked="keyword",g=="enum"?d(ce):g=="type"?d(_n,Te("operator"),We,Te(";")):d(j("form"),yt,Te("{"),j("}"),Nt,ue,ue)):_&&g=="namespace"?(D.marked="keyword",d(j("form"),oe,Le,ue)):_&&g=="abstract"?(D.marked="keyword",d(Le)):d(j("stat"),Ie):f=="switch"?d(j("form"),qe,Te("{"),j("}","switch"),Y,Nt,ue,ue,xe):f=="case"?d(oe,Te(":")):f=="default"?d(Te(":")):f=="catch"?d(j("form"),c,be,Le,ue,xe):f=="export"?d(j("stat"),Ir,ue):f=="import"?d(j("stat"),fr,ue):f=="async"?d(Le):g=="@"?d(oe,Le):J(j("stat"),oe,Te(";"),ue)}function be(f){if(f=="(")return d(_t,Te(")"))}function oe(f,g){return Ve(f,g,!1)}function Ne(f,g){return Ve(f,g,!0)}function qe(f){return f!="("?J():d(j(")"),ct,Te(")"),ue)}function Ve(f,g,A){if(D.state.fatArrowAt==D.stream.start){var W=A?Pe:ge;if(f=="(")return d(c,j(")"),Me(_t,")"),ue,Te("=>"),W,xe);if(f=="variable")return J(c,yt,Te("=>"),W,xe)}var L=A?Re:Oe;return ze.hasOwnProperty(f)?d(L):f=="function"?d(Pt,L):f=="class"||_&&g=="interface"?(D.marked="keyword",d(j("form"),yi,ue)):f=="keyword c"||f=="async"?d(A?Ne:oe):f=="("?d(j(")"),ct,Te(")"),ue,L):f=="operator"||f=="spread"?d(A?Ne:oe):f=="["?d(j("]"),Je,ue,L):f=="{"?Lt(Se,"}",null,L):f=="quasi"?J(Ue,L):f=="new"?d(T(A)):d()}function ct(f){return f.match(/[;\}\)\],]/)?J():J(oe)}function Oe(f,g){return f==","?d(ct):Re(f,g,!1)}function Re(f,g,A){var W=A==!1?Oe:Re,L=A==!1?oe:Ne;if(f=="=>")return d(c,A?Pe:ge,xe);if(f=="operator")return/\+\+|--/.test(g)||_&&g=="!"?d(W):_&&g=="<"&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?d(j(">"),Me(We,">"),ue,W):g=="?"?d(oe,Te(":"),L):d(L);if(f=="quasi")return J(Ue,W);if(f!=";"){if(f=="(")return Lt(Ne,")","call",W);if(f==".")return d(ae,W);if(f=="[")return d(j("]"),ct,Te("]"),ue,W);if(_&&g=="as")return D.marked="keyword",d(We,W);if(f=="regexp")return D.state.lastType=D.marked="operator",D.stream.backUp(D.stream.pos-D.stream.start-1),d(L)}}function Ue(f,g){return f!="quasi"?J():g.slice(g.length-2)!="${"?d(Ue):d(ct,et)}function et(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ae,d(Ue)}function ge(f){return de(D.stream,D.state),J(f=="{"?Le:oe)}function Pe(f){return de(D.stream,D.state),J(f=="{"?Le:Ne)}function T(f){return function(g){return g=="."?d(f?F:B):g=="variable"&&_?d(Ct,f?Re:Oe):J(f?Ne:oe)}}function B(f,g){if(g=="target")return D.marked="keyword",d(Oe)}function F(f,g){if(g=="target")return D.marked="keyword",d(Re)}function Ie(f){return f==":"?d(ue,Le):J(Oe,Te(";"),ue)}function ae(f){if(f=="variable")return D.marked="property",d()}function Se(f,g){if(f=="async")return D.marked="property",d(Se);if(f=="variable"||D.style=="keyword"){if(D.marked="property",g=="get"||g=="set")return d(he);var A;return _&&D.state.fatArrowAt==D.stream.start&&(A=D.stream.match(/^\s*:\s*/,!1))&&(D.state.fatArrowAt=D.stream.pos+A[0].length),d(Be)}else{if(f=="number"||f=="string")return D.marked=V?"property":D.style+" property",d(Be);if(f=="jsonld-keyword")return d(Be);if(_&&y(g))return D.marked="keyword",d(Se);if(f=="[")return d(oe,or,Te("]"),Be);if(f=="spread")return d(Ne,Be);if(g=="*")return D.marked="keyword",d(Se);if(f==":")return J(Be)}}function he(f){return f!="variable"?J(Be):(D.marked="property",d(Pt))}function Be(f){if(f==":")return d(Ne);if(f=="(")return J(Pt)}function Me(f,g,A){function W(L,Z){if(A?A.indexOf(L)>-1:L==","){var _e=D.state.lexical;return _e.info=="call"&&(_e.pos=(_e.pos||0)+1),d(function(it,xt){return it==g||xt==g?J():J(f)},W)}return L==g||Z==g?d():A&&A.indexOf(";")>-1?J(f):d(Te(g))}return function(L,Z){return L==g||Z==g?d():J(f,W)}}function Lt(f,g,A){for(var W=3;W"),We);if(f=="quasi")return J(dt,Ot)}function Bn(f){if(f=="=>")return d(We)}function ve(f){return f.match(/[\}\)\]]/)?d():f==","||f==";"?d(ve):J(Qt,ve)}function Qt(f,g){if(f=="variable"||D.style=="keyword")return D.marked="property",d(Qt);if(g=="?"||f=="number"||f=="string")return d(Qt);if(f==":")return d(We);if(f=="[")return d(Te("variable"),br,Te("]"),Qt);if(f=="(")return J(ur,Qt);if(!f.match(/[;\}\)\],]/))return d()}function dt(f,g){return f!="quasi"?J():g.slice(g.length-2)!="${"?d(dt):d(We,Ye)}function Ye(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ae,d(dt)}function Ze(f,g){return f=="variable"&&D.stream.match(/^\s*[?:]/,!1)||g=="?"?d(Ze):f==":"?d(We):f=="spread"?d(Ze):J(We)}function Ot(f,g){if(g=="<")return d(j(">"),Me(We,">"),ue,Ot);if(g=="|"||f=="."||g=="&")return d(We);if(f=="[")return d(We,Te("]"),Ot);if(g=="extends"||g=="implements")return D.marked="keyword",d(We);if(g=="?")return d(We,Te(":"),We)}function Ct(f,g){if(g=="<")return d(j(">"),Me(We,">"),ue,Ot)}function Bt(){return J(We,ht)}function ht(f,g){if(g=="=")return d(We)}function Nr(f,g){return g=="enum"?(D.marked="keyword",d(ce)):J(yt,or,Wt,mi)}function yt(f,g){if(_&&y(g))return D.marked="keyword",d(yt);if(f=="variable")return w(g),d();if(f=="spread")return d(yt);if(f=="[")return Lt(ln,"]");if(f=="{")return Lt(ar,"}")}function ar(f,g){return f=="variable"&&!D.stream.match(/^\s*:/,!1)?(w(g),d(Wt)):(f=="variable"&&(D.marked="property"),f=="spread"?d(yt):f=="}"?J():f=="["?d(oe,Te("]"),Te(":"),ar):d(Te(":"),yt,Wt))}function ln(){return J(yt,Wt)}function Wt(f,g){if(g=="=")return d(Ne)}function mi(f){if(f==",")return d(Nr)}function Or(f,g){if(f=="keyword b"&&g=="else")return d(j("form","else"),Le,ue)}function Wn(f,g){if(g=="await")return d(Wn);if(f=="(")return d(j(")"),an,ue)}function an(f){return f=="var"?d(Nr,sr):f=="variable"?d(sr):J(sr)}function sr(f,g){return f==")"?d():f==";"?d(sr):g=="in"||g=="of"?(D.marked="keyword",d(oe,sr)):J(oe,sr)}function Pt(f,g){if(g=="*")return D.marked="keyword",d(Pt);if(f=="variable")return w(g),d(Pt);if(f=="(")return d(c,j(")"),Me(_t,")"),ue,lr,Le,xe);if(_&&g=="<")return d(j(">"),Me(Bt,">"),ue,Pt)}function ur(f,g){if(g=="*")return D.marked="keyword",d(ur);if(f=="variable")return w(g),d(ur);if(f=="(")return d(c,j(")"),Me(_t,")"),ue,lr,xe);if(_&&g=="<")return d(j(">"),Me(Bt,">"),ue,ur)}function _n(f,g){if(f=="keyword"||f=="variable")return D.marked="type",d(_n);if(g=="<")return d(j(">"),Me(Bt,">"),ue)}function _t(f,g){return g=="@"&&d(oe,_t),f=="spread"?d(_t):_&&y(g)?(D.marked="keyword",d(_t)):_&&f=="this"?d(or,Wt):J(yt,or,Wt)}function yi(f,g){return f=="variable"?Pr(f,g):Ht(f,g)}function Pr(f,g){if(f=="variable")return w(g),d(Ht)}function Ht(f,g){if(g=="<")return d(j(">"),Me(Bt,">"),ue,Ht);if(g=="extends"||g=="implements"||_&&f==",")return g=="implements"&&(D.marked="keyword"),d(_?We:oe,Ht);if(f=="{")return d(j("}"),Rt,ue)}function Rt(f,g){if(f=="async"||f=="variable"&&(g=="static"||g=="get"||g=="set"||_&&y(g))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked="keyword",d(Rt);if(f=="variable"||D.style=="keyword")return D.marked="property",d(kr,Rt);if(f=="number"||f=="string")return d(kr,Rt);if(f=="[")return d(oe,or,Te("]"),kr,Rt);if(g=="*")return D.marked="keyword",d(Rt);if(_&&f=="(")return J(ur,Rt);if(f==";"||f==",")return d(Rt);if(f=="}")return d();if(g=="@")return d(oe,Rt)}function kr(f,g){if(g=="!"||g=="?")return d(kr);if(f==":")return d(We,Wt);if(g=="=")return d(Ne);var A=D.state.lexical.prev,W=A&&A.info=="interface";return J(W?ur:Pt)}function Ir(f,g){return g=="*"?(D.marked="keyword",d(Wr,Te(";"))):g=="default"?(D.marked="keyword",d(oe,Te(";"))):f=="{"?d(Me(zr,"}"),Wr,Te(";")):J(Le)}function zr(f,g){if(g=="as")return D.marked="keyword",d(Te("variable"));if(f=="variable")return J(Ne,zr)}function fr(f){return f=="string"?d():f=="("?J(oe):f=="."?J(Oe):J(Br,Gt,Wr)}function Br(f,g){return f=="{"?Lt(Br,"}"):(f=="variable"&&w(g),g=="*"&&(D.marked="keyword"),d(sn))}function Gt(f){if(f==",")return d(Br,Gt)}function sn(f,g){if(g=="as")return D.marked="keyword",d(Br)}function Wr(f,g){if(g=="from")return D.marked="keyword",d(oe)}function Je(f){return f=="]"?d():J(Me(Ne,"]"))}function ce(){return J(j("form"),yt,Te("{"),j("}"),Me(Vt,"}"),ue,ue)}function Vt(){return J(yt,Wt)}function un(f,g){return f.lastType=="operator"||f.lastType==","||q.test(g.charAt(0))||/[,.]/.test(g.charAt(0))}function Ft(f,g,A){return g.tokenize==re&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(g.lastType)||g.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(A||0)))}return{startState:function(f){var g={tokenize:re,lastType:"sof",cc:[],lexical:new fe((f||0)-K,0,"block",!1),localVars:I.localVars,context:I.localVars&&new P(null,null,!1),indented:f||0};return I.globalVars&&typeof I.globalVars=="object"&&(g.globalVars=I.globalVars),g},token:function(f,g){if(f.sol()&&(g.lexical.hasOwnProperty("align")||(g.lexical.align=!1),g.indented=f.indentation(),de(f,g)),g.tokenize!=se&&f.eatSpace())return null;var A=g.tokenize(f,g);return ke=="comment"?A:(g.lastType=ke=="operator"&&(we=="++"||we=="--")?"incdec":ke,Ee(g,A,ke,we,f))},indent:function(f,g){if(f.tokenize==se||f.tokenize==Ae)return C.Pass;if(f.tokenize!=re)return 0;var A=g&&g.charAt(0),W=f.lexical,L;if(!/^\s*else\b/.test(g))for(var Z=f.cc.length-1;Z>=0;--Z){var _e=f.cc[Z];if(_e==ue)W=W.prev;else if(_e!=Or&&_e!=xe)break}for(;(W.type=="stat"||W.type=="form")&&(A=="}"||(L=f.cc[f.cc.length-1])&&(L==Oe||L==Re)&&!/^[,\.=+\-*:?[\(]/.test(g));)W=W.prev;$&&W.type==")"&&W.prev.type=="stat"&&(W=W.prev);var it=W.type,xt=A==it;return it=="vardef"?W.indented+(f.lastType=="operator"||f.lastType==","?W.info.length+1:0):it=="form"&&A=="{"?W.indented:it=="form"?W.indented+K:it=="stat"?W.indented+(un(f,g)?$||K:0):W.info=="switch"&&!xt&&I.doubleIndentSwitch!=!1?W.indented+(/^(?:case|default)\b/.test(g)?K:2*K):W.align?W.column+(xt?0:1):W.indented+(xt?0:K)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:b?null:"/*",blockCommentEnd:b?null:"*/",blockCommentContinue:b?null:" * ",lineComment:b?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:b?"json":"javascript",jsonldMode:V,jsonMode:b,expressionAllowed:Ft,skipExpression:function(f){Ee(f,"atom","atom","true",new C.StringStream("",2,null))}}}),C.registerHelper("wordChars","javascript",/[\w$]/),C.defineMIME("text/javascript","javascript"),C.defineMIME("text/ecmascript","javascript"),C.defineMIME("application/javascript","javascript"),C.defineMIME("application/x-javascript","javascript"),C.defineMIME("application/ecmascript","javascript"),C.defineMIME("application/json",{name:"javascript",json:!0}),C.defineMIME("application/x-json",{name:"javascript",json:!0}),C.defineMIME("application/manifest+json",{name:"javascript",json:!0}),C.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),C.defineMIME("text/typescript",{name:"javascript",typescript:!0}),C.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}()),pa.exports}(function(Et,zt){(function(C){C(It,xa(),ba(),Su)})(function(C){var De={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function I(ie,O,q){var z=ie.current(),X=z.search(O);return X>-1?ie.backUp(z.length-X):z.match(/<\/?$/)&&(ie.backUp(z.length),ie.match(O,!1)||ie.match(z)),q}var K={};function $(ie){var O=K[ie];return O||(K[ie]=new RegExp("\\s+"+ie+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function V(ie,O){var q=ie.match($(O));return q?/^\s*(.*?)\s*$/.exec(q[2])[1]:""}function b(ie,O){return new RegExp((O?"^":"")+"","i")}function N(ie,O){for(var q in ie)for(var z=O[q]||(O[q]=[]),X=ie[q],ke=X.length-1;ke>=0;ke--)z.unshift(X[ke])}function _(ie,O){for(var q=0;q=0;we--)z.script.unshift(["type",ke[we].matches,ke[we].mode]);function te(re,ne){var se=q.token(re,ne.htmlState),Ae=/\btag\b/.test(se),ye;if(Ae&&!/[<>\s\/]/.test(re.current())&&(ye=ne.htmlState.tagName&&ne.htmlState.tagName.toLowerCase())&&z.hasOwnProperty(ye))ne.inTag=ye+" ";else if(ne.inTag&&Ae&&/>$/.test(re.current())){var de=/^([\S]+) (.*)/.exec(ne.inTag);ne.inTag=null;var ze=re.current()==">"&&_(z[de[1]],de[2]),fe=C.getMode(ie,ze),H=b(de[1],!0),Ee=b(de[1],!1);ne.token=function(D,J){return D.match(H,!1)?(J.token=te,J.localState=J.localMode=null,null):I(D,Ee,J.localMode.token(D,J.localState))},ne.localMode=fe,ne.localState=C.startState(fe,q.indent(ne.htmlState,"",""))}else ne.inTag&&(ne.inTag+=re.current(),re.eol()&&(ne.inTag+=" "));return se}return{startState:function(){var re=C.startState(q);return{token:te,inTag:null,localMode:null,localState:null,htmlState:re}},copyState:function(re){var ne;return re.localState&&(ne=C.copyState(re.localMode,re.localState)),{token:re.token,inTag:re.inTag,localMode:re.localMode,localState:ne,htmlState:C.copyState(q,re.htmlState)}},token:function(re,ne){return ne.token(re,ne)},indent:function(re,ne,se){return!re.localMode||/^\s*<\//.test(ne)?q.indent(re.htmlState,ne,se):re.localMode.indent?re.localMode.indent(re.localState,ne,se):C.Pass},innerMode:function(re){return{state:re.localState||re.htmlState,mode:re.localMode||q}}}},"xml","javascript","css"),C.defineMIME("text/html","htmlmixed")})})();ba();(function(Et,zt){(function(C){C(It)})(function(C){function De(N){return new RegExp("^(("+N.join(")|(")+"))\\b")}var I=De(["and","or","not","is"]),K=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],$=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];C.registerHelper("hintWords","python",K.concat($).concat(["exec","print"]));function V(N){return N.scopes[N.scopes.length-1]}C.defineMode("python",function(N,_){for(var ie="error",O=_.delimiters||_.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,q=[_.singleOperators,_.doubleOperators,_.doubleDelimiters,_.tripleDelimiters,_.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],z=0;zy?H(w):P0&&D(S,w)&&(le+=" "+ie),le}}return de(S,w)}function de(S,w,m){if(S.eatSpace())return null;if(!m&&S.match(/^#.*/))return"comment";if(S.match(/^[0-9\.]/,!1)){var y=!1;if(S.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(y=!0),S.match(/^[\d_]+\.\d*/)&&(y=!0),S.match(/^\.\d+/)&&(y=!0),y)return S.eat(/J/i),"number";var P=!1;if(S.match(/^0x[0-9a-f_]+/i)&&(P=!0),S.match(/^0b[01_]+/i)&&(P=!0),S.match(/^0o[0-7_]+/i)&&(P=!0),S.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(S.eat(/J/i),P=!0),S.match(/^0(?![\dx])/i)&&(P=!0),P)return S.eat(/L/i),"number"}if(S.match(ne)){var le=S.current().toLowerCase().indexOf("f")!==-1;return le?(w.tokenize=ze(S.current(),w.tokenize),w.tokenize(S,w)):(w.tokenize=fe(S.current(),w.tokenize),w.tokenize(S,w))}for(var p=0;p=0;)S=S.substr(1);var m=S.length==1,y="string";function P(p){return function(c,Y){var xe=de(c,Y,!0);return xe=="punctuation"&&(c.current()=="{"?Y.tokenize=P(p+1):c.current()=="}"&&(p>1?Y.tokenize=P(p-1):Y.tokenize=le)),xe}}function le(p,c){for(;!p.eol();)if(p.eatWhile(/[^'"\{\}\\]/),p.eat("\\")){if(p.next(),m&&p.eol())return y}else{if(p.match(S))return c.tokenize=w,y;if(p.match("{{"))return y;if(p.match("{",!1))return c.tokenize=P(0),p.current()?y:c.tokenize(p,c);if(p.match("}}"))return y;if(p.match("}"))return ie;p.eat(/['"]/)}if(m){if(_.singleLineStringErrors)return ie;c.tokenize=w}return y}return le.isString=!0,le}function fe(S,w){for(;"rubf".indexOf(S.charAt(0).toLowerCase())>=0;)S=S.substr(1);var m=S.length==1,y="string";function P(le,p){for(;!le.eol();)if(le.eatWhile(/[^'"\\]/),le.eat("\\")){if(le.next(),m&&le.eol())return y}else{if(le.match(S))return p.tokenize=w,y;le.eat(/['"]/)}if(m){if(_.singleLineStringErrors)return ie;p.tokenize=w}return y}return P.isString=!0,P}function H(S){for(;V(S).type!="py";)S.scopes.pop();S.scopes.push({offset:V(S).offset+N.indentUnit,type:"py",align:null})}function Ee(S,w,m){var y=S.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:S.column()+1;w.scopes.push({offset:w.indent+X,type:m,align:y})}function D(S,w){for(var m=S.indentation();w.scopes.length>1&&V(w).offset>m;){if(V(w).type!="py")return!0;w.scopes.pop()}return V(w).offset!=m}function J(S,w){S.sol()&&(w.beginningOfLine=!0,w.dedent=!1);var m=w.tokenize(S,w),y=S.current();if(w.beginningOfLine&&y=="@")return S.match(re,!1)?"meta":te?"operator":ie;if(/\S/.test(y)&&(w.beginningOfLine=!1),(m=="variable"||m=="builtin")&&w.lastToken=="meta"&&(m="meta"),(y=="pass"||y=="return")&&(w.dedent=!0),y=="lambda"&&(w.lambda=!0),y==":"&&!w.lambda&&V(w).type=="py"&&S.match(/^\s*(?:#|$)/,!1)&&H(w),y.length==1&&!/string|comment/.test(m)){var P="[({".indexOf(y);if(P!=-1&&Ee(S,w,"])}".slice(P,P+1)),P="])}".indexOf(y),P!=-1)if(V(w).type==y)w.indent=w.scopes.pop().offset-X;else return ie}return w.dedent&&S.eol()&&V(w).type=="py"&&w.scopes.length>1&&w.scopes.pop(),m}var d={startState:function(S){return{tokenize:ye,scopes:[{offset:S||0,type:"py",align:null}],indent:S||0,lastToken:null,lambda:!1,dedent:0}},token:function(S,w){var m=w.errorToken;m&&(w.errorToken=!1);var y=J(S,w);return y&&y!="comment"&&(w.lastToken=y=="keyword"||y=="punctuation"?S.current():y),y=="punctuation"&&(y=null),S.eol()&&w.lambda&&(w.lambda=!1),m?y+" "+ie:y},indent:function(S,w){if(S.tokenize!=ye)return S.tokenize.isString?C.Pass:0;var m=V(S),y=m.type==w.charAt(0)||m.type=="py"&&!S.dedent&&/^(else:|elif |except |finally:)/.test(w);return m.align!=null?m.align-(y?1:0):m.offset-(y?X:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return d}),C.defineMIME("text/x-python","python");var b=function(N){return N.split(" ")};C.defineMIME("text/x-cython",{name:"python",extra_keywords:b("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})})();(function(Et,zt){(function(C){C(It)})(function(C){function De(m,y,P,le,p,c){this.indented=m,this.column=y,this.type=P,this.info=le,this.align=p,this.prev=c}function I(m,y,P,le){var p=m.indented;return m.context&&m.context.type=="statement"&&P!="statement"&&(p=m.context.indented),m.context=new De(p,y,P,le,null,m.context)}function K(m){var y=m.context.type;return(y==")"||y=="]"||y=="}")&&(m.indented=m.context.indented),m.context=m.context.prev}function $(m,y,P){if(y.prevToken=="variable"||y.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(m.string.slice(0,P))||y.typeAtEndOfLine&&m.column()==m.indentation())return!0}function V(m){for(;;){if(!m||m.type=="top")return!0;if(m.type=="}"&&m.prev.info!="namespace")return!1;m=m.prev}}C.defineMode("clike",function(m,y){var P=m.indentUnit,le=y.statementIndentUnit||P,p=y.dontAlignCalls,c=y.keywords||{},Y=y.types||{},xe=y.builtin||{},j=y.blockKeywords||{},ue=y.defKeywords||{},Te=y.atoms||{},Le=y.hooks||{},be=y.multiLineStrings,oe=y.indentStatements!==!1,Ne=y.indentSwitch!==!1,qe=y.namespaceSeparator,Ve=y.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,ct=y.numberStart||/[\d\.]/,Oe=y.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Re=y.isOperatorChar||/[+\-*&%=<>!?|\/]/,Ue=y.isIdentifierChar||/[\w\$_\xa1-\uffff]/,et=y.isReservedIdentifier||!1,ge,Pe;function T(ae,Se){var he=ae.next();if(Le[he]){var Be=Le[he](ae,Se);if(Be!==!1)return Be}if(he=='"'||he=="'")return Se.tokenize=B(he),Se.tokenize(ae,Se);if(ct.test(he)){if(ae.backUp(1),ae.match(Oe))return"number";ae.next()}if(Ve.test(he))return ge=he,null;if(he=="/"){if(ae.eat("*"))return Se.tokenize=F,F(ae,Se);if(ae.eat("/"))return ae.skipToEnd(),"comment"}if(Re.test(he)){for(;!ae.match(/^\/[\/*]/,!1)&&ae.eat(Re););return"operator"}if(ae.eatWhile(Ue),qe)for(;ae.match(qe);)ae.eatWhile(Ue);var Me=ae.current();return N(c,Me)?(N(j,Me)&&(ge="newstatement"),N(ue,Me)&&(Pe=!0),"keyword"):N(Y,Me)?"type":N(xe,Me)||et&&et(Me)?(N(j,Me)&&(ge="newstatement"),"builtin"):N(Te,Me)?"atom":"variable"}function B(ae){return function(Se,he){for(var Be=!1,Me,Lt=!1;(Me=Se.next())!=null;){if(Me==ae&&!Be){Lt=!0;break}Be=!Be&&Me=="\\"}return(Lt||!(Be||be))&&(he.tokenize=null),"string"}}function F(ae,Se){for(var he=!1,Be;Be=ae.next();){if(Be=="/"&&he){Se.tokenize=null;break}he=Be=="*"}return"comment"}function Ie(ae,Se){y.typeFirstDefinitions&&ae.eol()&&V(Se.context)&&(Se.typeAtEndOfLine=$(ae,Se,ae.pos))}return{startState:function(ae){return{tokenize:null,context:new De((ae||0)-P,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(ae,Se){var he=Se.context;if(ae.sol()&&(he.align==null&&(he.align=!1),Se.indented=ae.indentation(),Se.startOfLine=!0),ae.eatSpace())return Ie(ae,Se),null;ge=Pe=null;var Be=(Se.tokenize||T)(ae,Se);if(Be=="comment"||Be=="meta")return Be;if(he.align==null&&(he.align=!0),ge==";"||ge==":"||ge==","&&ae.match(/^\s*(?:\/\/.*)?$/,!1))for(;Se.context.type=="statement";)K(Se);else if(ge=="{")I(Se,ae.column(),"}");else if(ge=="[")I(Se,ae.column(),"]");else if(ge=="(")I(Se,ae.column(),")");else if(ge=="}"){for(;he.type=="statement";)he=K(Se);for(he.type=="}"&&(he=K(Se));he.type=="statement";)he=K(Se)}else ge==he.type?K(Se):oe&&((he.type=="}"||he.type=="top")&&ge!=";"||he.type=="statement"&&ge=="newstatement")&&I(Se,ae.column(),"statement",ae.current());if(Be=="variable"&&(Se.prevToken=="def"||y.typeFirstDefinitions&&$(ae,Se,ae.start)&&V(Se.context)&&ae.match(/^\s*\(/,!1))&&(Be="def"),Le.token){var Me=Le.token(ae,Se,Be);Me!==void 0&&(Be=Me)}return Be=="def"&&y.styleDefs===!1&&(Be="variable"),Se.startOfLine=!1,Se.prevToken=Pe?"def":Be||ge,Ie(ae,Se),Be},indent:function(ae,Se){if(ae.tokenize!=T&&ae.tokenize!=null||ae.typeAtEndOfLine&&V(ae.context))return C.Pass;var he=ae.context,Be=Se&&Se.charAt(0),Me=Be==he.type;if(he.type=="statement"&&Be=="}"&&(he=he.prev),y.dontIndentStatements)for(;he.type=="statement"&&y.dontIndentStatements.test(he.info);)he=he.prev;if(Le.indent){var Lt=Le.indent(ae,he,Se,P);if(typeof Lt=="number")return Lt}var Nt=he.prev&&he.prev.info=="switch";if(y.allmanIndentation&&/[{(]/.test(Be)){for(;he.type!="top"&&he.type!="}";)he=he.prev;return he.indented}return he.type=="statement"?he.indented+(Be=="{"?0:le):he.align&&(!p||he.type!=")")?he.column+(Me?0:1):he.type==")"&&!Me?he.indented+le:he.indented+(Me?0:P)+(!Me&&Nt&&!/^(?:case|default)\b/.test(Se)?P:0)},electricInput:Ne?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function b(m){for(var y={},P=m.split(" "),le=0;le!?|\/#:@]/,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,y){return m.match('""')?(y.tokenize=D,y.tokenize(m,y)):!1},"'":function(m){return m.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(m,y){var P=y.context;return P.type=="}"&&P.align&&m.eat(">")?(y.context=new De(P.indented,P.column,P.type,P.info,null,P.prev),"operator"):!1},"/":function(m,y){return m.eat("*")?(y.tokenize=J(1),y.tokenize(m,y)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function d(m){return function(y,P){for(var le=!1,p,c=!1;!y.eol();){if(!m&&!le&&y.match('"')){c=!0;break}if(m&&y.match('"""')){c=!0;break}p=y.next(),!le&&p=="$"&&y.match("{")&&y.skipTo("}"),le=!le&&p=="\\"&&!m}return(c||!m)&&(P.tokenize=null),"string"}}Ee("text/x-kotlin",{name:"clike",keywords:b("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:b("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:b("catch class do else finally for if where try while enum"),defKeywords:b("class val var object interface fun"),atoms:b("true false null this"),hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},"*":function(m,y){return y.prevToken=="."?"variable":"operator"},'"':function(m,y){return y.tokenize=d(m.match('""')),y.tokenize(m,y)},"/":function(m,y){return m.eat("*")?(y.tokenize=J(1),y.tokenize(m,y)):!1},indent:function(m,y,P,le){var p=P&&P.charAt(0);if((m.prevToken=="}"||m.prevToken==")")&&P=="")return m.indented;if(m.prevToken=="operator"&&P!="}"&&m.context.type!="}"||m.prevToken=="variable"&&p=="."||(m.prevToken=="}"||m.prevToken==")")&&p==".")return le*2+y.indented;if(y.align&&y.type=="}")return y.indented+(m.context.type==(P||"").charAt(0)?0:le)}},modeProps:{closeBrackets:{triples:'"'}}}),Ee(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:b("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:b("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:b("for while do if else struct"),builtin:b("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:b("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":ne},modeProps:{fold:["brace","include"]}}),Ee("text/x-nesc",{name:"clike",keywords:b(_+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:ke,blockKeywords:b(te),atoms:b("null true false"),hooks:{"#":ne},modeProps:{fold:["brace","include"]}}),Ee("text/x-objectivec",{name:"clike",keywords:b(_+" "+O),types:we,builtin:b(q),blockKeywords:b(te+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:b(re+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:Ae,hooks:{"#":ne,"*":se},modeProps:{fold:["brace","include"]}}),Ee("text/x-objectivec++",{name:"clike",keywords:b(_+" "+O+" "+ie),types:we,builtin:b(q),blockKeywords:b(te+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:b(re+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:Ae,hooks:{"#":ne,"*":se,u:de,U:de,L:de,R:de,0:ye,1:ye,2:ye,3:ye,4:ye,5:ye,6:ye,7:ye,8:ye,9:ye,token:function(m,y,P){if(P=="variable"&&m.peek()=="("&&(y.prevToken==";"||y.prevToken==null||y.prevToken=="}")&&ze(m.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),Ee("text/x-squirrel",{name:"clike",keywords:b("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:ke,blockKeywords:b("case catch class else for foreach if switch try while"),defKeywords:b("function local class"),typeFirstDefinitions:!0,atoms:b("true false null"),hooks:{"#":ne},modeProps:{fold:["brace","include"]}});var S=null;function w(m){return function(y,P){for(var le=!1,p,c=!1;!y.eol();){if(!le&&y.match('"')&&(m=="single"||y.match('""'))){c=!0;break}if(!le&&y.match("``")){S=w(m),c=!0;break}p=y.next(),le=m=="single"&&!le&&p=="\\"}return c&&(P.tokenize=null),"string"}}Ee("text/x-ceylon",{name:"clike",keywords:b("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(m){var y=m.charAt(0);return y===y.toUpperCase()&&y!==y.toLowerCase()},blockKeywords:b("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:b("class dynamic function interface module object package value"),builtin:b("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:b("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,y){return y.tokenize=w(m.match('""')?"triple":"single"),y.tokenize(m,y)},"`":function(m,y){return!S||!m.match("`")?!1:(y.tokenize=S,S=null,y.tokenize(m,y))},"'":function(m){return m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(m,y,P){if((P=="variable"||P=="type")&&y.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})})();var va={exports:{}},ma;function Tu(){return ma||(ma=1,function(Et,zt){(function(C){C(It)})(function(C){C.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var De=0;De-1&&K.substring(b+1,K.length);if(N)return C.findModeByExtension(N)},C.findModeByName=function(K){K=K.toLowerCase();for(var $=0;$` "'(~:]+/,ke=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,we=/^\s*\[[^\]]+?\]:.*$/,te=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,re=" ";function ne(p,c,Y){return c.f=c.inline=Y,Y(p,c)}function se(p,c,Y){return c.f=c.block=Y,Y(p,c)}function Ae(p){return!p||!/\S/.test(p.string)}function ye(p){if(p.linkTitle=!1,p.linkHref=!1,p.linkText=!1,p.em=!1,p.strong=!1,p.strikethrough=!1,p.quote=0,p.indentedCode=!1,p.f==ze){var c=$;if(!c){var Y=C.innerMode(K,p.htmlState);c=Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText}c&&(p.f=D,p.block=de,p.htmlState=null)}return p.trailingSpace=0,p.trailingSpaceNewLine=!1,p.prevLine=p.thisLine,p.thisLine={stream:null},null}function de(p,c){var Y=p.column()===c.indentation,xe=Ae(c.prevLine.stream),j=c.indentedCode,ue=c.prevLine.hr,Te=c.list!==!1,Le=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var be=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,Te)){for(c.list=null;be=4&&(j||c.prevLine.fencedCodeEnd||c.prevLine.header||xe))return p.skipToEnd(),c.indentedCode=!0,b.code;if(p.eatSpace())return null;if(Y&&c.indentation<=Le&&(qe=p.match(q))&&qe[1].length<=6)return c.quote=0,c.header=qe[1].length,c.thisLine.header=!0,I.highlightFormatting&&(c.formatting="header"),c.f=c.inline,H(c);if(c.indentation<=Le&&p.eat(">"))return c.quote=Y?1:c.quote+1,I.highlightFormatting&&(c.formatting="quote"),p.eatSpace(),H(c);if(!Ne&&!c.setext&&Y&&c.indentation<=Le&&(qe=p.match(ie))){var Ve=qe[1]?"ol":"ul";return c.indentation=be+p.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,I.taskLists&&p.match(O,!1)&&(c.taskList=!0),c.f=c.inline,I.highlightFormatting&&(c.formatting=["list","list-"+Ve]),H(c)}else{if(Y&&c.indentation<=Le&&(qe=p.match(ke,!0)))return c.quote=0,c.fencedEndRE=new RegExp(qe[1]+"+ *$"),c.localMode=I.fencedCodeBlockHighlighting&&V(qe[2]||I.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=C.startState(c.localMode)),c.f=c.block=fe,I.highlightFormatting&&(c.formatting="code-block"),c.code=-1,H(c);if(c.setext||(!oe||!Te)&&!c.quote&&c.list===!1&&!c.code&&!Ne&&!we.test(p.string)&&(qe=p.lookAhead(1))&&(qe=qe.match(z)))return c.setext?(c.header=c.setext,c.setext=0,p.skipToEnd(),I.highlightFormatting&&(c.formatting="header")):(c.header=qe[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,H(c);if(Ne)return p.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,b.hr;if(p.peek()==="[")return ne(p,c,m)}return ne(p,c,c.inline)}function ze(p,c){var Y=K.token(p,c.htmlState);if(!$){var xe=C.innerMode(K,c.htmlState);(xe.mode.name=="xml"&&xe.state.tagStart===null&&!xe.state.context&&xe.state.tokenize.isInText||c.md_inside&&p.current().indexOf(">")>-1)&&(c.f=D,c.block=de,c.htmlState=null)}return Y}function fe(p,c){var Y=c.listStack[c.listStack.length-1]||0,xe=c.indentation=p.quote?c.push(b.formatting+"-"+p.formatting[Y]+"-"+p.quote):c.push("error"))}if(p.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(p.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(p.linkHref?c.push(b.linkHref,"url"):(p.strong&&c.push(b.strong),p.em&&c.push(b.em),p.strikethrough&&c.push(b.strikethrough),p.emoji&&c.push(b.emoji),p.linkText&&c.push(b.linkText),p.code&&c.push(b.code),p.image&&c.push(b.image),p.imageAltText&&c.push(b.imageAltText,"link"),p.imageMarker&&c.push(b.imageMarker)),p.header&&c.push(b.header,b.header+"-"+p.header),p.quote&&(c.push(b.quote),!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=p.quote?c.push(b.quote+"-"+p.quote):c.push(b.quote+"-"+I.maxBlockquoteDepth)),p.list!==!1){var xe=(p.listStack.length-1)%3;xe?xe===1?c.push(b.list2):c.push(b.list3):c.push(b.list1)}return p.trailingSpaceNewLine?c.push("trailing-space-new-line"):p.trailingSpace&&c.push("trailing-space-"+(p.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function Ee(p,c){if(p.match(X,!0))return H(c)}function D(p,c){var Y=c.text(p,c);if(typeof Y<"u")return Y;if(c.list)return c.list=null,H(c);if(c.taskList){var xe=p.match(O,!0)[1]===" ";return xe?c.taskOpen=!0:c.taskClosed=!0,I.highlightFormatting&&(c.formatting="task"),c.taskList=!1,H(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&p.match(/^#+$/,!0))return I.highlightFormatting&&(c.formatting="header"),H(c);var j=p.next();if(c.linkTitle){c.linkTitle=!1;var ue=j;j==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Te="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(p.match(new RegExp(Te),!0))return b.linkHref}if(j==="`"){var Le=c.formatting;I.highlightFormatting&&(c.formatting="code"),p.eatWhile("`");var be=p.current().length;if(c.code==0&&(!c.quote||be==1))return c.code=be,H(c);if(be==c.code){var oe=H(c);return c.code=0,oe}else return c.formatting=Le,H(c)}else if(c.code)return H(c);if(j==="\\"&&(p.next(),I.highlightFormatting)){var Ne=H(c),qe=b.formatting+"-escape";return Ne?Ne+" "+qe:qe}if(j==="!"&&p.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,I.highlightFormatting&&(c.formatting="image"),H(c);if(j==="["&&c.imageMarker&&p.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,I.highlightFormatting&&(c.formatting="image"),H(c);if(j==="]"&&c.imageAltText){I.highlightFormatting&&(c.formatting="image");var Ne=H(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=d,Ne}if(j==="["&&!c.image)return c.linkText&&p.match(/^.*?\]/)||(c.linkText=!0,I.highlightFormatting&&(c.formatting="link")),H(c);if(j==="]"&&c.linkText){I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return c.linkText=!1,c.inline=c.f=p.match(/\(.*?\)| ?\[.*?\]/,!1)?d:D,Ne}if(j==="<"&&p.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=J,I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return Ne?Ne+=" ":Ne="",Ne+b.linkInline}if(j==="<"&&p.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=J,I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return Ne?Ne+=" ":Ne="",Ne+b.linkEmail}if(I.xml&&j==="<"&&p.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ve=p.string.indexOf(">",p.pos);if(Ve!=-1){var ct=p.string.substring(p.start,Ve);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ct)&&(c.md_inside=!0)}return p.backUp(1),c.htmlState=C.startState(K),se(p,c,ze)}if(I.xml&&j==="<"&&p.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(j==="*"||j==="_"){for(var Oe=1,Re=p.pos==1?" ":p.string.charAt(p.pos-2);Oe<3&&p.eat(j);)Oe++;var Ue=p.peek()||" ",et=!/\s/.test(Ue)&&(!te.test(Ue)||/\s/.test(Re)||te.test(Re)),ge=!/\s/.test(Re)&&(!te.test(Re)||/\s/.test(Ue)||te.test(Ue)),Pe=null,T=null;if(Oe%2&&(!c.em&&et&&(j==="*"||!ge||te.test(Re))?Pe=!0:c.em==j&&ge&&(j==="*"||!et||te.test(Ue))&&(Pe=!1)),Oe>1&&(!c.strong&&et&&(j==="*"||!ge||te.test(Re))?T=!0:c.strong==j&&ge&&(j==="*"||!et||te.test(Ue))&&(T=!1)),T!=null||Pe!=null){I.highlightFormatting&&(c.formatting=Pe==null?"strong":T==null?"em":"strong em"),Pe===!0&&(c.em=j),T===!0&&(c.strong=j);var oe=H(c);return Pe===!1&&(c.em=!1),T===!1&&(c.strong=!1),oe}}else if(j===" "&&(p.eat("*")||p.eat("_"))){if(p.peek()===" ")return H(c);p.backUp(1)}if(I.strikethrough){if(j==="~"&&p.eatWhile(j)){if(c.strikethrough){I.highlightFormatting&&(c.formatting="strikethrough");var oe=H(c);return c.strikethrough=!1,oe}else if(p.match(/^[^\s]/,!1))return c.strikethrough=!0,I.highlightFormatting&&(c.formatting="strikethrough"),H(c)}else if(j===" "&&p.match("~~",!0)){if(p.peek()===" ")return H(c);p.backUp(2)}}if(I.emoji&&j===":"&&p.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,I.highlightFormatting&&(c.formatting="emoji");var B=H(c);return c.emoji=!1,B}return j===" "&&(p.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),H(c)}function J(p,c){var Y=p.next();if(Y===">"){c.f=c.inline=D,I.highlightFormatting&&(c.formatting="link");var xe=H(c);return xe?xe+=" ":xe="",xe+b.linkInline}return p.match(/^[^>]+/,!0),b.linkInline}function d(p,c){if(p.eatSpace())return null;var Y=p.next();return Y==="("||Y==="["?(c.f=c.inline=w(Y==="("?")":"]"),I.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,H(c)):"error"}var S={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(p){return function(c,Y){var xe=c.next();if(xe===p){Y.f=Y.inline=D,I.highlightFormatting&&(Y.formatting="link-string");var j=H(Y);return Y.linkHref=!1,j}return c.match(S[p]),Y.linkHref=!0,H(Y)}}function m(p,c){return p.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=y,p.next(),I.highlightFormatting&&(c.formatting="link"),c.linkText=!0,H(c)):ne(p,c,D)}function y(p,c){if(p.match("]:",!0)){c.f=c.inline=P,I.highlightFormatting&&(c.formatting="link");var Y=H(c);return c.linkText=!1,Y}return p.match(/^([^\]\\]|\\.)+/,!0),b.linkText}function P(p,c){return p.eatSpace()?null:(p.match(/^[^\s]+/,!0),p.peek()===void 0?c.linkTitle=!0:p.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),c.f=c.inline=D,b.linkHref+" url")}var le={startState:function(){return{f:de,prevLine:{stream:null},thisLine:{stream:null},block:de,htmlState:null,indentation:0,inline:D,text:Ee,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(p){return{f:p.f,prevLine:p.prevLine,thisLine:p.thisLine,block:p.block,htmlState:p.htmlState&&C.copyState(K,p.htmlState),indentation:p.indentation,localMode:p.localMode,localState:p.localMode?C.copyState(p.localMode,p.localState):null,inline:p.inline,text:p.text,formatting:!1,linkText:p.linkText,linkTitle:p.linkTitle,linkHref:p.linkHref,code:p.code,em:p.em,strong:p.strong,strikethrough:p.strikethrough,emoji:p.emoji,header:p.header,setext:p.setext,hr:p.hr,taskList:p.taskList,list:p.list,listStack:p.listStack.slice(0),quote:p.quote,indentedCode:p.indentedCode,trailingSpace:p.trailingSpace,trailingSpaceNewLine:p.trailingSpaceNewLine,md_inside:p.md_inside,fencedEndRE:p.fencedEndRE}},token:function(p,c){if(c.formatting=!1,p!=c.thisLine.stream){if(c.header=0,c.hr=!1,p.match(/^\s*$/,!0))return ye(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:p},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=ze)){var Y=p.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(c.indentation=Y,c.indentationDiff=null,Y>0)return null}}return c.f(p,c)},innerMode:function(p){return p.block==ze?{state:p.htmlState,mode:K}:p.localState?{state:p.localState,mode:p.localMode}:{state:p,mode:le}},indent:function(p,c,Y){return p.block==ze&&K.indent?K.indent(p.htmlState,c,Y):p.localState&&p.localMode.indent?p.localMode.indent(p.localState,c,Y):C.Pass},blankLine:ye,getType:H,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return le},"xml"),C.defineMIME("text/markdown","markdown"),C.defineMIME("text/x-markdown","markdown")})})();(function(Et,zt){(function(C){C(It)})(function(C){C.defineOption("placeholder","",function(N,_,ie){var O=ie&&ie!=C.Init;if(_&&!O)N.on("blur",$),N.on("change",V),N.on("swapDoc",V),C.on(N.getInputField(),"compositionupdate",N.state.placeholderCompose=function(){K(N)}),V(N);else if(!_&&O){N.off("blur",$),N.off("change",V),N.off("swapDoc",V),C.off(N.getInputField(),"compositionupdate",N.state.placeholderCompose),De(N);var q=N.getWrapperElement();q.className=q.className.replace(" CodeMirror-empty","")}_&&!N.hasFocus()&&$(N)});function De(N){N.state.placeholder&&(N.state.placeholder.parentNode.removeChild(N.state.placeholder),N.state.placeholder=null)}function I(N){De(N);var _=N.state.placeholder=document.createElement("pre");_.style.cssText="height: 0; overflow: visible",_.style.direction=N.getOption("direction"),_.className="CodeMirror-placeholder CodeMirror-line-like";var ie=N.getOption("placeholder");typeof ie=="string"&&(ie=document.createTextNode(ie)),_.appendChild(ie),N.display.lineSpace.insertBefore(_,N.display.lineSpace.firstChild)}function K(N){setTimeout(function(){var _=!1;if(N.lineCount()==1){var ie=N.getInputField();_=ie.nodeName=="TEXTAREA"?!N.getLine(0).length:!/[^\u200b]/.test(ie.querySelector(".CodeMirror-line").textContent)}_?I(N):De(N)},20)}function $(N){b(N)&&I(N)}function V(N){var _=N.getWrapperElement(),ie=b(N);_.className=_.className.replace(" CodeMirror-empty","")+(ie?" CodeMirror-empty":""),ie?I(N):De(N)}function b(N){return N.lineCount()===1&&N.getLine(0)===""}})})();(function(Et,zt){(function(C){C(It)})(function(C){C.defineSimpleMode=function(O,q){C.defineMode(O,function(z){return C.simpleMode(z,q)})},C.simpleMode=function(O,q){De(q,"start");var z={},X=q.meta||{},ke=!1;for(var we in q)if(we!=X&&q.hasOwnProperty(we))for(var te=z[we]=[],re=q[we],ne=0;ne2&&se.token&&typeof se.token!="string"){for(var de=2;de-1)return C.Pass;var we=z.indent.length-1,te=O[z.state];e:for(;;){for(var re=0;re$.keyCol)return K.skipToEnd(),"string";if($.literal&&($.literal=!1),K.sol()){if($.keyCol=0,$.pair=!1,$.pairStart=!1,K.match("---")||K.match("..."))return"def";if(K.match(/\s*-\s+/))return"meta"}if(K.match(/^(\{|\}|\[|\])/))return V=="{"?$.inlinePairs++:V=="}"?$.inlinePairs--:V=="["?$.inlineList++:$.inlineList--,"meta";if($.inlineList>0&&!b&&V==",")return K.next(),"meta";if($.inlinePairs>0&&!b&&V==",")return $.keyCol=0,$.pair=!1,$.pairStart=!1,K.next(),"meta";if($.pairStart){if(K.match(/^\s*(\||\>)\s*/))return $.literal=!0,"meta";if(K.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if($.inlinePairs==0&&K.match(/^\s*-?[0-9\.\,]+\s?$/)||$.inlinePairs>0&&K.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(K.match(I))return"keyword"}return!$.pair&&K.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?($.pair=!0,$.keyCol=K.indentation(),"atom"):$.pair&&K.match(/^:\s*/)?($.pairStart=!0,"meta"):($.pairStart=!1,$.escaped=V=="\\",K.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),C.defineMIME("text/x-yaml","yaml"),C.defineMIME("text/yaml","yaml")})})();export{Cu as default}; diff --git a/tvapp2/node_modules/playwright-core/lib/vite/recorder/assets/index-DsR8Oo9k.js b/tvapp2/node_modules/playwright-core/lib/vite/recorder/assets/index-DsR8Oo9k.js deleted file mode 100755 index b98c8586..00000000 --- a/tvapp2/node_modules/playwright-core/lib/vite/recorder/assets/index-DsR8Oo9k.js +++ /dev/null @@ -1,184 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/codeMirrorModule-D5R_qtw3.js","assets/codeMirrorModule-C3UTv-Ge.css"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var c1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kc={exports:{}},Fi={},Wc={exports:{}},D={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var cs=Symbol.for("react.element"),Tp=Symbol.for("react.portal"),Cp=Symbol.for("react.fragment"),_p=Symbol.for("react.strict_mode"),Lp=Symbol.for("react.profiler"),Op=Symbol.for("react.provider"),$p=Symbol.for("react.context"),Ip=Symbol.for("react.forward_ref"),Ap=Symbol.for("react.suspense"),Pp=Symbol.for("react.memo"),Mp=Symbol.for("react.lazy"),du=Symbol.iterator;function jp(e){return e===null||typeof e!="object"?null:(e=du&&e[du]||e["@@iterator"],typeof e=="function"?e:null)}var Hc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qc=Object.assign,Qc={};function ir(e,t,n){this.props=e,this.context=t,this.refs=Qc,this.updater=n||Hc}ir.prototype.isReactComponent={};ir.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ir.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Yc(){}Yc.prototype=ir.prototype;function na(e,t,n){this.props=e,this.context=t,this.refs=Qc,this.updater=n||Hc}var ra=na.prototype=new Yc;ra.constructor=na;qc(ra,ir.prototype);ra.isPureReactComponent=!0;var hu=Array.isArray,Jc=Object.prototype.hasOwnProperty,sa={current:null},Gc={key:!0,ref:!0,__self:!0,__source:!0};function Xc(e,t,n){var r,s={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Jc.call(t,r)&&!Gc.hasOwnProperty(r)&&(s[r]=t[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1{const r=e.current;if(!r)return;const s=r.getBoundingClientRect();n(new DOMRect(0,0,s.width,s.height));const i=new ResizeObserver(l=>{const o=l[l.length-1];o&&o.contentRect&&n(o.contentRect)});return i.observe(r),()=>i.disconnect()},[e]),[t,e]}function Hp(e){if(e<0||!isFinite(e))return"-";if(e===0)return"0";if(e<1e3)return e.toFixed(0)+"ms";const t=e/1e3;if(t<60)return t.toFixed(1)+"s";const n=t/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function mu(e){const t=document.createElement("textarea");t.style.position="absolute",t.style.zIndex="-1000",t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}function eo(e,t){e&&(t=Xt.getObject(e,t));const[n,r]=zn.useState(t),s=zn.useCallback(i=>{e?Xt.setObject(e,i):r(i)},[e,r]);return zn.useEffect(()=>{if(e){const i=()=>r(Xt.getObject(e,t));return Xt.onChangeEmitter.addEventListener(e,i),()=>Xt.onChangeEmitter.removeEventListener(e,i)}},[t,e]),[n,s]}class qp{constructor(){this.onChangeEmitter=new EventTarget}getString(t,n){return localStorage[t]||n}setString(t,n){var r;localStorage[t]=n,this.onChangeEmitter.dispatchEvent(new Event(t)),(r=window.saveSettings)==null||r.call(window)}getObject(t,n){if(!localStorage[t])return n;try{return JSON.parse(localStorage[t])}catch{return n}}setObject(t,n){var r;localStorage[t]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(t)),(r=window.saveSettings)==null||r.call(window)}}const Xt=new qp;function on(...e){return e.filter(Boolean).join(" ")}const gu="\\u0000-\\u0020\\u007f-\\u009f",Qp=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+gu+'"]{2,}[^\\s'+gu+`"')}\\],:;.!?]`,"ug");function Yp(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",n=>{n.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",n=>{document.body.classList.add("inactive")},!1);const e=Xt.getString("theme","light-mode"),t=window.matchMedia("(prefers-color-scheme: dark)");(e==="dark-mode"||t.matches)&&document.body.classList.add("dark-mode")}const Jp=new Set;function Gp(){const e=Xp(),t=e==="dark-mode"?"light-mode":"dark-mode";e&&document.body.classList.remove(e),document.body.classList.add(t),Xt.setString("theme",t);for(const n of Jp)n(t)}function Xp(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}var tf={exports:{}},Fe={},nf={exports:{}},rf={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(e){function t(I,j){var R=I.length;I.push(j);e:for(;0>>1,oe=I[Z];if(0>>1;Zs(vl,R))Yts(Ss,vl)?(I[Z]=Ss,I[Yt]=R,Z=Yt):(I[Z]=vl,I[Qt]=R,Z=Qt);else if(Yts(Ss,R))I[Z]=Ss,I[Yt]=R,Z=Yt;else break e}}return j}function s(I,j){var R=I.sortIndex-j.sortIndex;return R!==0?R:I.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var a=[],u=[],m=1,f=null,p=3,g=!1,w=!1,h=!1,v=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(I){for(var j=n(u);j!==null;){if(j.callback===null)r(u);else if(j.startTime<=I)r(u),j.sortIndex=j.expirationTime,t(a,j);else break;j=n(u)}}function S(I){if(h=!1,y(I),!w)if(n(a)!==null)w=!0,yr(x);else{var j=n(u);j!==null&&vr(S,j.startTime-I)}}function x(I,j){w=!1,h&&(h=!1,d(N),N=-1),g=!0;var R=p;try{for(y(j),f=n(a);f!==null&&(!(f.expirationTime>j)||I&&!M());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,p=f.priorityLevel;var oe=Z(f.expirationTime<=j);j=e.unstable_now(),typeof oe=="function"?f.callback=oe:f===n(a)&&r(a),y(j)}else r(a);f=n(a)}if(f!==null)var ws=!0;else{var Qt=n(u);Qt!==null&&vr(S,Qt.startTime-j),ws=!1}return ws}finally{f=null,p=R,g=!1}}var k=!1,T=null,N=-1,E=5,O=-1;function M(){return!(e.unstable_now()-OI||125Z?(I.sortIndex=R,t(u,I),n(a)===null&&I===n(u)&&(h?(d(N),N=-1):h=!0,vr(S,R-Z))):(I.sortIndex=oe,t(a,I),w||g||(w=!0,yr(x))),I},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(I){var j=p;return function(){var R=p;p=j;try{return I.apply(this,arguments)}finally{p=R}}}})(rf);nf.exports=rf;var Zp=nf.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var sf=B,Be=Zp;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),to=Object.prototype.hasOwnProperty,em=/^[: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]*$/,yu={},vu={};function tm(e){return to.call(vu,e)?!0:to.call(yu,e)?!1:em.test(e)?vu[e]=!0:(yu[e]=!0,!1)}function nm(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rm(e,t,n,r){if(t===null||typeof t>"u"||nm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Te(e,t,n,r,s,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var he={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){he[e]=new Te(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];he[t]=new Te(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){he[e]=new Te(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){he[e]=new Te(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){he[e]=new Te(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){he[e]=new Te(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){he[e]=new Te(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){he[e]=new Te(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){he[e]=new Te(e,5,!1,e.toLowerCase(),null,!1,!1)});var la=/[\-:]([a-z])/g;function oa(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(la,oa);he[t]=new Te(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(la,oa);he[t]=new Te(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(la,oa);he[t]=new Te(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){he[e]=new Te(e,1,!1,e.toLowerCase(),null,!1,!1)});he.xlinkHref=new Te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){he[e]=new Te(e,1,!1,e.toLowerCase(),null,!0,!0)});function aa(e,t,n,r){var s=he.hasOwnProperty(t)?he[t]:null;(s!==null?s.type!==0:r||!(2o||s[l]!==i[o]){var a=` -`+s[l].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=l&&0<=o);break}}}finally{kl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Or(e):""}function sm(e){switch(e.tag){case 5:return Or(e.type);case 16:return Or("Lazy");case 13:return Or("Suspense");case 19:return Or("SuspenseList");case 0:case 2:case 15:return e=El(e.type,!1),e;case 11:return e=El(e.type.render,!1),e;case 1:return e=El(e.type,!0),e;default:return""}}function io(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Tn:return"Fragment";case xn:return"Portal";case no:return"Profiler";case ua:return"StrictMode";case ro:return"Suspense";case so:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case af:return(e.displayName||"Context")+".Consumer";case of:return(e._context.displayName||"Context")+".Provider";case ca:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fa:return t=e.displayName||null,t!==null?t:io(e.type)||"Memo";case Ct:t=e._payload,e=e._init;try{return io(e(t))}catch{}}return null}function im(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return io(t);case 8:return t===ua?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lm(e){var t=cf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ns(e){e._valueTracker||(e._valueTracker=lm(e))}function ff(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=cf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ci(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function lo(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Su(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function df(e,t){t=t.checked,t!=null&&aa(e,"checked",t,!1)}function oo(e,t){df(e,t);var n=zt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ao(e,t.type,n):t.hasOwnProperty("defaultValue")&&ao(e,t.type,zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ku(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ao(e,t,n){(t!=="number"||ci(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $r=Array.isArray;function Un(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=xs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},om=["Webkit","ms","Moz","O"];Object.keys(Mr).forEach(function(e){om.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mr[t]=Mr[e]})});function gf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mr.hasOwnProperty(e)&&Mr[e]?(""+t).trim():t+"px"}function yf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=gf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var am=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fo(e,t){if(t){if(am[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function ho(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 po=null;function da(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mo=null,Vn=null,Kn=null;function xu(e){if(e=hs(e)){if(typeof mo!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Wi(t),mo(e.stateNode,e.type,t))}}function vf(e){Vn?Kn?Kn.push(e):Kn=[e]:Vn=e}function wf(){if(Vn){var e=Vn,t=Kn;if(Kn=Vn=null,xu(e),t)for(e=0;e>>=0,e===0?32:31-(wm(e)/Sm|0)|0}var Ts=64,Cs=4194304;function Ir(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var o=l&~s;o!==0?r=Ir(o):(i&=l,i!==0&&(r=Ir(i)))}else l=n&~s,l!==0?r=Ir(l):i!==0&&(r=Ir(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function fs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=n}function xm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Rr),Pu=" ",Mu=!1;function Bf(e,t){switch(e){case"keyup":return Xm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ff(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cn=!1;function eg(e,t){switch(e){case"compositionend":return Ff(t);case"keypress":return t.which!==32?null:(Mu=!0,Pu);case"textInput":return e=t.data,e===Pu&&Mu?null:e;default:return null}}function tg(e,t){if(Cn)return e==="compositionend"||!Sa&&Bf(e,t)?(e=Df(),Hs=ya=$t=null,Cn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=bu(n)}}function Kf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wf(){for(var e=window,t=ci();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ci(e.document)}return t}function ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function cg(e){var t=Wf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Kf(n.ownerDocument.documentElement,n)){if(r!==null&&ka(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Bu(n,i);var l=Bu(n,r);s&&l&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,_n=null,ko=null,br=null,Eo=!1;function Fu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Eo||_n==null||_n!==ci(r)||(r=_n,"selectionStart"in r&&ka(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),br&&Gr(br,r)||(br=r,r=yi(ko,"onSelect"),0$n||(e.current=Lo[$n],Lo[$n]=null,$n--)}function U(e,t){$n++,Lo[$n]=e.current,e.current=t}var Ut={},Se=Ht(Ut),Ie=Ht(!1),cn=Ut;function Gn(e,t){var n=e.type.contextTypes;if(!n)return Ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ae(e){return e=e.childContextTypes,e!=null}function wi(){K(Ie),K(Se)}function qu(e,t,n){if(Se.current!==Ut)throw Error(_(168));U(Se,t),U(Ie,n)}function ed(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(_(108,im(e)||"Unknown",s));return G({},n,r)}function Si(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,cn=Se.current,U(Se,e),U(Ie,Ie.current),!0}function Qu(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=ed(e,t,cn),r.__reactInternalMemoizedMergedChildContext=e,K(Ie),K(Se),U(Se,e)):K(Ie),U(Ie,n)}var pt=null,Hi=!1,Rl=!1;function td(e){pt===null?pt=[e]:pt.push(e)}function Eg(e){Hi=!0,td(e)}function qt(){if(!Rl&&pt!==null){Rl=!0;var e=0,t=F;try{var n=pt;for(F=1;e>=l,s-=l,mt=1<<32-tt(t)+s|n<N?(E=T,T=null):E=T.sibling;var O=p(d,T,y[N],S);if(O===null){T===null&&(T=E);break}e&&T&&O.alternate===null&&t(d,T),c=i(O,c,N),k===null?x=O:k.sibling=O,k=O,T=E}if(N===y.length)return n(d,T),W&&Jt(d,N),x;if(T===null){for(;NN?(E=T,T=null):E=T.sibling;var M=p(d,T,O.value,S);if(M===null){T===null&&(T=E);break}e&&T&&M.alternate===null&&t(d,T),c=i(M,c,N),k===null?x=M:k.sibling=M,k=M,T=E}if(O.done)return n(d,T),W&&Jt(d,N),x;if(T===null){for(;!O.done;N++,O=y.next())O=f(d,O.value,S),O!==null&&(c=i(O,c,N),k===null?x=O:k.sibling=O,k=O);return W&&Jt(d,N),x}for(T=r(d,T);!O.done;N++,O=y.next())O=g(T,d,N,O.value,S),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?N:O.key),c=i(O,c,N),k===null?x=O:k.sibling=O,k=O);return e&&T.forEach(function(C){return t(d,C)}),W&&Jt(d,N),x}function v(d,c,y,S){if(typeof y=="object"&&y!==null&&y.type===Tn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Es:e:{for(var x=y.key,k=c;k!==null;){if(k.key===x){if(x=y.type,x===Tn){if(k.tag===7){n(d,k.sibling),c=s(k,y.props.children),c.return=d,d=c;break e}}else if(k.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ct&&tc(x)===k.type){n(d,k.sibling),c=s(k,y.props),c.ref=xr(d,k,y),c.return=d,d=c;break e}n(d,k);break}else t(d,k);k=k.sibling}y.type===Tn?(c=un(y.props.children,d.mode,S,y.key),c.return=d,d=c):(S=ei(y.type,y.key,y.props,null,d.mode,S),S.ref=xr(d,c,y),S.return=d,d=S)}return l(d);case xn:e:{for(k=y.key;c!==null;){if(c.key===k)if(c.tag===4&&c.stateNode.containerInfo===y.containerInfo&&c.stateNode.implementation===y.implementation){n(d,c.sibling),c=s(c,y.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=Kl(y,d.mode,S),c.return=d,d=c}return l(d);case Ct:return k=y._init,v(d,c,k(y._payload),S)}if($r(y))return w(d,c,y,S);if(wr(y))return h(d,c,y,S);Ps(d,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,c!==null&&c.tag===6?(n(d,c.sibling),c=s(c,y),c.return=d,d=c):(n(d,c),c=Vl(y,d.mode,S),c.return=d,d=c),l(d)):n(d,c)}return v}var Zn=ud(!0),cd=ud(!1),ps={},ut=Ht(ps),ts=Ht(ps),ns=Ht(ps);function nn(e){if(e===ps)throw Error(_(174));return e}function $a(e,t){switch(U(ns,t),U(ts,e),U(ut,ps),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:co(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=co(t,e)}K(ut),U(ut,t)}function er(){K(ut),K(ts),K(ns)}function fd(e){nn(ns.current);var t=nn(ut.current),n=co(t,e.type);t!==n&&(U(ts,e),U(ut,n))}function Ia(e){ts.current===e&&(K(ut),K(ts))}var q=Ht(0);function Ci(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dl=[];function Aa(){for(var e=0;en?n:4,e(!0);var r=bl.transition;bl.transition={};try{e(!1),t()}finally{F=n,bl.transition=r}}function _d(){return Qe().memoizedState}function Cg(e,t,n){var r=bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ld(e))Od(t,n);else if(n=id(e,t,n,r),n!==null){var s=Ne();nt(n,e,r,s),$d(n,t,r)}}function _g(e,t,n){var r=bt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ld(e))Od(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,n);if(s.hasEagerState=!0,s.eagerState=o,rt(o,l)){var a=t.interleaved;a===null?(s.next=s,La(t)):(s.next=a.next,a.next=s),t.interleaved=s;return}}catch{}finally{}n=id(e,t,s,r),n!==null&&(s=Ne(),nt(n,e,r,s),$d(n,t,r))}}function Ld(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function Od(e,t){Br=_i=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $d(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pa(e,n)}}var Li={readContext:qe,useCallback:me,useContext:me,useEffect:me,useImperativeHandle:me,useInsertionEffect:me,useLayoutEffect:me,useMemo:me,useReducer:me,useRef:me,useState:me,useDebugValue:me,useDeferredValue:me,useTransition:me,useMutableSource:me,useSyncExternalStore:me,useId:me,unstable_isNewReconciler:!1},Lg={readContext:qe,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:qe,useEffect:rc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Js(4194308,4,Ed.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Js(4194308,4,e,t)},useInsertionEffect:function(e,t){return Js(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Cg.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:nc,useDebugValue:Da,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=nc(!1),t=e[0];return e=Tg.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,s=lt();if(W){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),ue===null)throw Error(_(349));dn&30||pd(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,rc(gd.bind(null,r,i,e),[e]),r.flags|=2048,is(9,md.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=lt(),t=ue.identifierPrefix;if(W){var n=gt,r=mt;n=(r&~(1<<32-tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=rs++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[ot]=t,e[es]=r,Bd(e,t,!1,!1),t.stateNode=e;e:{switch(l=ho(n,r),n){case"dialog":V("cancel",e),V("close",e),s=r;break;case"iframe":case"object":case"embed":V("load",e),s=r;break;case"video":case"audio":for(s=0;snr&&(t.flags|=128,r=!0,Tr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ci(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!W)return ge(t),null}else 2*ee()-i.renderingStartTime>nr&&n!==1073741824&&(t.flags|=128,r=!0,Tr(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ee(),t.sibling=null,n=q.current,U(q,r?n&1|2:n&1),t):(ge(t),null);case 22:case 23:return Va(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?je&1073741824&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function Rg(e,t){switch(Na(t),t.tag){case 1:return Ae(t.type)&&wi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return er(),K(Ie),K(Se),Aa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ia(t),null;case 13:if(K(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Xn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(q),null;case 4:return er(),null;case 10:return _a(t.type._context),null;case 22:case 23:return Va(),null;case 24:return null;default:return null}}var js=!1,ve=!1,Dg=typeof WeakSet=="function"?WeakSet:Set,$=null;function Mn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function Fo(e,t,n){try{n()}catch(r){X(e,t,r)}}var dc=!1;function bg(e,t){if(No=mi,e=Wf(),ka(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,o=-1,a=-1,u=0,m=0,f=e,p=null;t:for(;;){for(var g;f!==n||s!==0&&f.nodeType!==3||(o=l+s),f!==i||r!==0&&f.nodeType!==3||(a=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(g=f.firstChild)!==null;)p=f,f=g;for(;;){if(f===e)break t;if(p===n&&++u===s&&(o=l),p===i&&++m===r&&(a=l),(g=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=g}n=o===-1||a===-1?null:{start:o,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(xo={focusedElem:e,selectionRange:n},mi=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var h=w.memoizedProps,v=w.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?h:Xe(t.type,h),v);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(S){X(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return w=dc,dc=!1,w}function Fr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Fo(t,n,i)}s=s.next}while(s!==r)}}function Yi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ud(e){var t=e.alternate;t!==null&&(e.alternate=null,Ud(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ot],delete t[es],delete t[_o],delete t[Sg],delete t[kg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Vd(e){return e.tag===5||e.tag===3||e.tag===4}function hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vi));else if(r!==4&&(e=e.child,e!==null))for(Uo(e,t,n),e=e.sibling;e!==null;)Uo(e,t,n),e=e.sibling}function Vo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Vo(e,t,n),e=e.sibling;e!==null;)Vo(e,t,n),e=e.sibling}var ce=null,Ze=!1;function Tt(e,t,n){for(n=n.child;n!==null;)Kd(e,t,n),n=n.sibling}function Kd(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(zi,n)}catch{}switch(n.tag){case 5:ve||Mn(n,t);case 6:var r=ce,s=Ze;ce=null,Tt(e,t,n),ce=r,Ze=s,ce!==null&&(Ze?(e=ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(Ze?(e=ce,n=n.stateNode,e.nodeType===8?jl(e.parentNode,n):e.nodeType===1&&jl(e,n),Yr(e)):jl(ce,n.stateNode));break;case 4:r=ce,s=Ze,ce=n.stateNode.containerInfo,Ze=!0,Tt(e,t,n),ce=r,Ze=s;break;case 0:case 11:case 14:case 15:if(!ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Fo(n,t,l),s=s.next}while(s!==r)}Tt(e,t,n);break;case 1:if(!ve&&(Mn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){X(n,t,o)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(ve=(r=ve)||n.memoizedState!==null,Tt(e,t,n),ve=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function pc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Dg),t.forEach(function(r){var s=qg.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Je(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=l),r&=~i}if(r=s,r=ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fg(r/1960))-r,10e?16:e,It===null)var r=!1;else{if(e=It,It=null,Ii=0,b&6)throw Error(_(331));var s=b;for(b|=4,$=e.current;$!==null;){var i=$,l=i.child;if($.flags&16){var o=i.deletions;if(o!==null){for(var a=0;aee()-za?an(e,0):Fa|=n),Pe(e,t)}function Xd(e,t){t===0&&(e.mode&1?(t=Cs,Cs<<=1,!(Cs&130023424)&&(Cs=4194304)):t=1);var n=Ne();e=Et(e,t),e!==null&&(fs(e,t,n),Pe(e,n))}function Hg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xd(e,n)}function qg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Xd(e,n)}var Zd;Zd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ie.current)$e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return $e=!1,Mg(e,t,n);$e=!!(e.flags&131072)}else $e=!1,W&&t.flags&1048576&&nd(t,Ei,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Gs(e,t),e=t.pendingProps;var s=Gn(t,Se.current);Hn(t,n),s=Ma(null,t,r,e,s,n);var i=ja();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(r)?(i=!0,Si(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Oa(t),s.updater=qi,t.stateNode=s,s._reactInternals=t,Po(t,r,e,n),t=Ro(null,t,r,!0,i,n)):(t.tag=0,W&&i&&Ea(t),ke(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Gs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Yg(r),e=Xe(r,e),s){case 0:t=jo(null,t,r,e,n);break e;case 1:t=uc(null,t,r,e,n);break e;case 11:t=oc(null,t,r,e,n);break e;case 14:t=ac(null,t,r,Xe(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xe(r,s),jo(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xe(r,s),uc(e,t,r,s,n);case 3:e:{if(Rd(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,s=i.element,ld(e,t),Ti(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=tr(Error(_(423)),t),t=cc(e,t,r,n,s);break e}else if(r!==s){s=tr(Error(_(424)),t),t=cc(e,t,r,n,s);break e}else for(De=jt(t.stateNode.containerInfo.firstChild),be=t,W=!0,et=null,n=cd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xn(),r===s){t=Nt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return fd(t),e===null&&$o(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,l=s.children,To(r,s)?l=null:i!==null&&To(r,i)&&(t.flags|=32),jd(e,t),ke(e,t,l,n),t.child;case 6:return e===null&&$o(t),null;case 13:return Dd(e,t,n);case 4:return $a(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zn(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xe(r,s),oc(e,t,r,s,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,l=s.value,U(Ni,r._currentValue),r._currentValue=l,i!==null)if(rt(i.value,l)){if(i.children===s.children&&!Ie.current){t=Nt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var a=o.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=vt(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var m=u.pending;m===null?a.next=a:(a.next=m.next,m.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Io(i.return,n,t),o.lanes|=n;break}a=a.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(_(341));l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),Io(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}ke(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Hn(t,n),s=qe(s),r=r(s),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,s=Xe(r,t.pendingProps),s=Xe(r.type,s),ac(e,t,r,s,n);case 15:return Pd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Xe(r,s),Gs(e,t),t.tag=1,Ae(r)?(e=!0,Si(t)):e=!1,Hn(t,n),ad(t,r,s),Po(t,r,s,n),Ro(null,t,r,!0,e,n);case 19:return bd(e,t,n);case 22:return Md(e,t,n)}throw Error(_(156,t.tag))};function eh(e,t){return Cf(e,t)}function Qg(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ke(e,t,n,r){return new Qg(e,t,n,r)}function Wa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yg(e){if(typeof e=="function")return Wa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ca)return 11;if(e===fa)return 14}return 2}function Bt(e,t){var n=e.alternate;return n===null?(n=Ke(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ei(e,t,n,r,s,i){var l=2;if(r=e,typeof e=="function")Wa(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Tn:return un(n.children,s,i,t);case ua:l=8,s|=8;break;case no:return e=Ke(12,n,t,s|2),e.elementType=no,e.lanes=i,e;case ro:return e=Ke(13,n,t,s),e.elementType=ro,e.lanes=i,e;case so:return e=Ke(19,n,t,s),e.elementType=so,e.lanes=i,e;case uf:return Gi(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case of:l=10;break e;case af:l=9;break e;case ca:l=11;break e;case fa:l=14;break e;case Ct:l=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Ke(l,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function un(e,t,n,r){return e=Ke(7,e,r,t),e.lanes=n,e}function Gi(e,t,n,r){return e=Ke(22,e,r,t),e.elementType=uf,e.lanes=n,e.stateNode={isHidden:!1},e}function Vl(e,t,n){return e=Ke(6,e,null,t),e.lanes=n,e}function Kl(e,t,n){return t=Ke(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jg(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xl(0),this.expirationTimes=xl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ha(e,t,n,r,s,i,l,o,a){return e=new Jg(e,t,n,o,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ke(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oa(i),e}function Gg(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sh)}catch(e){console.error(e)}}sh(),tf.exports=Fe;var ny=tf.exports,ih,Ec=ny;ih=Ec.createRoot,Ec.hydrateRoot;const ry="modulepreload",sy=function(e){return"/"+e},Nc={},iy=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),o=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.allSettled(n.map(a=>{if(a=sy(a),a in Nc)return;Nc[a]=!0;const u=a.endsWith(".css"),m=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${m}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":ry,u||(f.as="script"),f.crossOrigin="",f.href=a,o&&f.setAttribute("nonce",o),document.head.appendChild(f),u)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${a}`)))})}))}function i(l){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l}return s.then(l=>{for(const o of l||[])o.status==="rejected"&&i(o.reason);return t().catch(i)})};function ly(e,t){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let s,i={},l=!1,o=t==null?void 0:t.fg,a=t==null?void 0:t.bg;for(;(s=n.exec(e))!==null;){const[,,u,,m]=s;if(u){const f=+u;switch(f){case 0:i={};break;case 1:i["font-weight"]="bold";break;case 2:i.opacity="0.8";break;case 3:i["font-style"]="italic";break;case 4:i["text-decoration"]="underline";break;case 7:l=!0;break;case 8:i.display="none";break;case 9:i["text-decoration"]="line-through";break;case 22:delete i["font-weight"],delete i["font-style"],delete i.opacity,delete i["text-decoration"];break;case 23:delete i["font-weight"],delete i["font-style"],delete i.opacity;break;case 24:delete i["text-decoration"];break;case 27:l=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:o=xc[f-30];break;case 39:o=t==null?void 0:t.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:a=xc[f-40];break;case 49:a=t==null?void 0:t.bg;break;case 53:i["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:o=Tc[f-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:a=Tc[f-100];break}}else if(m){const f={...i},p=l?a:o;p!==void 0&&(f.color=p);const g=l?o:a;g!==void 0&&(f["background-color"]=g),r.push(`${oy(m)}`)}}return r.join("")}const xc={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)"},Tc={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 oy(e){return e.replace(/[&"<>]/g,t=>({"&":"&",'"':""","<":"<",">":">"})[t])}function ay(e){return Object.entries(e).map(([t,n])=>`${t}: ${n}`).join("; ")}const Wl=({text:e,language:t,mimeType:n,linkify:r,readOnly:s,highlight:i,revealLine:l,lineNumbers:o,isFocused:a,focusOnChange:u,wrapLines:m,onChange:f,dataTestId:p,placeholder:g})=>{const[w,h]=ef(),[v]=B.useState(iy(()=>import("./codeMirrorModule-D5R_qtw3.js"),__vite__mapDeps([0,1])).then(S=>S.default)),d=B.useRef(null),[c,y]=B.useState();return B.useEffect(()=>{(async()=>{var N,E;const S=await v;cy(S);const x=h.current;if(!x)return;const k=dy(t)||fy(n)||(r?"text/linkified":"");if(d.current&&k===d.current.cm.getOption("mode")&&!!s===d.current.cm.getOption("readOnly")&&o===d.current.cm.getOption("lineNumbers")&&m===d.current.cm.getOption("lineWrapping")&&g===d.current.cm.getOption("placeholder"))return;(E=(N=d.current)==null?void 0:N.cm)==null||E.getWrapperElement().remove();const T=S(x,{value:"",mode:k,readOnly:!!s,lineNumbers:o,lineWrapping:m,placeholder:g});return d.current={cm:T},a&&T.focus(),y(T),T})()},[v,c,h,t,n,r,o,m,s,a,g]),B.useEffect(()=>{d.current&&d.current.cm.setSize(w.width,w.height)},[w]),B.useLayoutEffect(()=>{var k;if(!c)return;let S=!1;if(c.getValue()!==e&&(c.setValue(e),S=!0,u&&(c.execCommand("selectAll"),c.focus())),S||JSON.stringify(i)!==JSON.stringify(d.current.highlight)){for(const E of d.current.highlight||[])c.removeLineClass(E.line-1,"wrap");for(const E of i||[])c.addLineClass(E.line-1,"wrap",`source-line-${E.type}`);for(const E of d.current.widgets||[])c.removeLineWidget(E);for(const E of d.current.markers||[])E.clear();const T=[],N=[];for(const E of i||[]){if(E.type!=="subtle-error"&&E.type!=="error")continue;const O=(k=d.current)==null?void 0:k.cm.getLine(E.line-1);if(O){const M={};M.title=E.message||"",N.push(c.markText({line:E.line-1,ch:0},{line:E.line-1,ch:E.column||O.length},{className:"source-line-error-underline",attributes:M}))}if(E.type==="error"){const M=document.createElement("div");M.innerHTML=ly(E.message||""),M.className="source-line-error-widget",T.push(c.addLineWidget(E.line,M,{above:!0,coverGutter:!1}))}}d.current.highlight=i,d.current.widgets=T,d.current.markers=N}typeof l=="number"&&d.current.cm.lineCount()>=l&&c.scrollIntoView({line:Math.max(0,l-1),ch:0},50);let x;return f&&(x=()=>f(c.getValue()),c.on("change",x)),()=>{x&&c.off("change",x)}},[c,e,i,l,u,f]),L.jsx("div",{"data-testid":p,className:"cm-wrapper",ref:h,onClick:uy})};function uy(e){var n;if(!(e.target instanceof HTMLElement))return;let t;e.target.classList.contains("cm-linkified")?t=e.target.textContent:e.target.classList.contains("cm-link")&&((n=e.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(t=e.target.nextElementSibling.textContent.slice(1,-1)),t&&(e.preventDefault(),e.stopPropagation(),window.open(t,"_blank"))}let Cc=!1;function cy(e){Cc||(Cc=!0,e.defineSimpleMode("text/linkified",{start:[{regex:Qp,token:"linkified"}]}))}function fy(e){if(e){if(e.includes("javascript")||e.includes("json"))return"javascript";if(e.includes("python"))return"python";if(e.includes("csharp"))return"text/x-csharp";if(e.includes("java"))return"text/x-java";if(e.includes("markdown"))return"markdown";if(e.includes("html")||e.includes("svg"))return"htmlmixed";if(e.includes("css"))return"css"}}function dy(e){if(e)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[e]}const hy=50,py=({sidebarSize:e,sidebarHidden:t=!1,sidebarIsFirst:n=!1,orientation:r="vertical",minSidebarSize:s=hy,settingName:i,sidebar:l,main:o})=>{const a=Math.max(s,e)*window.devicePixelRatio,[u,m]=eo(i?i+"."+r+":size":void 0,a),[f,p]=eo(i?i+"."+r+":size":void 0,a),[g,w]=B.useState(null),[h,v]=ef();let d;r==="vertical"?(d=f/window.devicePixelRatio,h&&h.heightw({offset:r==="vertical"?y.clientY:y.clientX,size:d}),onMouseUp:()=>w(null),onMouseMove:y=>{if(!y.buttons)w(null);else if(g){const x=(r==="vertical"?y.clientY:y.clientX)-g.offset,k=n?g.size+x:g.size-x,N=y.target.parentElement.getBoundingClientRect(),E=Math.min(Math.max(s,k),(r==="vertical"?N.height:N.width)-s);r==="vertical"?p(E*window.devicePixelRatio):m(E*window.devicePixelRatio)}}})]})},lh=({noShadow:e,children:t,noMinHeight:n,className:r,sidebarBackground:s,onClick:i})=>L.jsx("div",{className:on("toolbar",e&&"no-shadow",n&&"no-min-height",r,s&&"toolbar-sidebar-background"),onClick:i,children:t}),my=({tabs:e,selectedTab:t,setSelectedTab:n,leftToolbar:r,rightToolbar:s,dataTestId:i,mode:l})=>{const o=B.useId();return t||(t=e[0].id),l||(l="default"),L.jsx("div",{className:"tabbed-pane","data-testid":i,children:L.jsxs("div",{className:"vbox",children:[L.jsxs(lh,{children:[r&&L.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),l==="default"&&L.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...e.map(a=>L.jsx(gy,{id:a.id,ariaControls:`${o}-${a.id}`,title:a.title,count:a.count,errorCount:a.errorCount,selected:t===a.id,onSelect:n},a.id))]}),l==="select"&&L.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:L.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:a=>{n==null||n(e[a.currentTarget.selectedIndex].id)},children:e.map(a=>{let u="";return a.count&&(u=` (${a.count})`),a.errorCount&&(u=` (${a.errorCount})`),L.jsxs("option",{value:a.id,selected:a.id===t,role:"tab","aria-controls":`${o}-${a.id}`,children:[a.title,u]},a.id)})})}),s&&L.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...s]})]}),e.map(a=>{const u="tab-content tab-"+a.id;if(a.component)return L.jsx("div",{id:`${o}-${a.id}`,role:"tabpanel","aria-label":a.title,className:u,style:{display:t===a.id?"inherit":"none"},children:a.component},a.id);if(t===a.id)return L.jsx("div",{id:`${o}-${a.id}`,role:"tabpanel","aria-label":a.title,className:u,children:a.render()},a.id)})]})})},gy=({id:e,title:t,count:n,errorCount:r,selected:s,onSelect:i,ariaControls:l})=>L.jsxs("div",{className:on("tabbed-pane-tab",s&&"selected"),onClick:()=>i==null?void 0:i(e),role:"tab",title:t,"aria-controls":l,children:[L.jsx("div",{className:"tabbed-pane-tab-label",children:t}),!!n&&L.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&L.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]}),yy=({sources:e,fileId:t,setFileId:n})=>L.jsx("select",{className:"source-chooser",hidden:!e.length,title:"Source chooser",value:t,onChange:r=>{n(r.target.selectedOptions[0].value)},children:vy(e)});function vy(e){const t=s=>s.replace(/.*[/\\]([^/\\]+)/,"$1"),n=s=>L.jsx("option",{value:s.id,children:t(s.label)},s.id),r=new Map;for(const s of e){let i=r.get(s.group||"Debugger");i||(i=[],r.set(s.group||"Debugger",i)),i.push(s)}return[...r.entries()].map(([s,i])=>L.jsx("optgroup",{label:s,children:i.filter(l=>(l.group||"Debugger")===s).map(l=>n(l))},s))}function wy(){return{id:"default",isRecorded:!1,text:"",language:"javascript",label:"",highlight:[]}}const Me=B.forwardRef(function({children:t,title:n="",icon:r,disabled:s=!1,toggled:i=!1,onClick:l=()=>{},style:o,testId:a,className:u,ariaLabel:m},f){return L.jsxs("button",{ref:f,className:on(u,"toolbar-button",r,i&&"toggled"),onMouseDown:Lc,onClick:l,onDoubleClick:Lc,title:n,disabled:!!s,style:o,"data-testid":a,"aria-label":m||n,children:[r&&L.jsx("span",{className:`codicon codicon-${r}`,style:t?{marginRight:5}:{}}),t]})}),_c=({style:e})=>L.jsx("div",{className:"toolbar-separator",style:e}),Lc=e=>{e.stopPropagation(),e.preventDefault()};function nl(e,t="'"){const n=JSON.stringify(e),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(t==="'")return t+r.replace(/[']/g,"\\'")+t;if(t==='"')return t+r.replace(/["]/g,'\\"')+t;if(t==="`")return t+r.replace(/[`]/g,"`")+t;throw new Error("Invalid escape char")}function Mi(e){return e.charAt(0).toUpperCase()+e.substring(1)}function oh(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function rl(e){return e.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}const ne=function(e,t,n){return e>=t&&e<=n};function Ce(e){return ne(e,48,57)}function Oc(e){return Ce(e)||ne(e,65,70)||ne(e,97,102)}function Sy(e){return ne(e,65,90)}function ky(e){return ne(e,97,122)}function Ey(e){return Sy(e)||ky(e)}function Ny(e){return e>=128}function ti(e){return Ey(e)||Ny(e)||e===95}function $c(e){return ti(e)||Ce(e)||e===45}function xy(e){return ne(e,0,8)||e===11||ne(e,14,31)||e===127}function ni(e){return e===10}function dt(e){return ni(e)||e===9||e===32}const Ty=1114111;class Ja extends Error{constructor(t){super(t),this.name="InvalidCharacterError"}}function Cy(e){const t=[];for(let n=0;n=t.length?-1:t[C]},l=function(C){if(C===void 0&&(C=1),C>3)throw"Spec Error: no more than three codepoints of lookahead.";return i(n+C)},o=function(C){return C===void 0&&(C=1),n+=C,s=i(n),!0},a=function(){return n-=1,!0},u=function(C){return C===void 0&&(C=s),C===-1},m=function(){if(f(),o(),dt(s)){for(;dt(l());)o();return new Qo}else{if(s===34)return w();if(s===35)if($c(l())||d(l(1),l(2))){const C=new Eh("");return y(l(1),l(2),l(3))&&(C.type="id"),C.value=T(),C}else return new ye(s);else return s===36?l()===61?(o(),new Iy):new ye(s):s===39?w():s===40?new yh:s===41?new vh:s===42?l()===61?(o(),new Ay):new ye(s):s===43?k()?(a(),p()):new ye(s):s===44?new hh:s===45?k()?(a(),p()):l(1)===45&&l(2)===62?(o(2),new ch):S()?(a(),g()):new ye(s):s===46?k()?(a(),p()):new ye(s):s===58?new fh:s===59?new dh:s===60?l(1)===33&&l(2)===45&&l(3)===45?(o(3),new uh):new ye(s):s===64?y(l(1),l(2),l(3))?new kh(T()):new ye(s):s===91?new gh:s===92?c()?(a(),g()):new ye(s):s===93?new Yo:s===94?l()===61?(o(),new $y):new ye(s):s===123?new ph:s===124?l()===61?(o(),new Oy):l()===124?(o(),new wh):new ye(s):s===125?new mh:s===126?l()===61?(o(),new Ly):new ye(s):Ce(s)?(a(),p()):ti(s)?(a(),g()):u()?new si:new ye(s)}},f=function(){for(;l(1)===47&&l(2)===42;)for(o(2);;)if(o(),s===42&&l()===47){o();break}else if(u())return},p=function(){const C=N();if(y(l(1),l(2),l(3))){const A=new Py;return A.value=C.value,A.repr=C.repr,A.type=C.type,A.unit=T(),A}else if(l()===37){o();const A=new Ch;return A.value=C.value,A.repr=C.repr,A}else{const A=new Th;return A.value=C.value,A.repr=C.repr,A.type=C.type,A}},g=function(){const C=T();if(C.toLowerCase()==="url"&&l()===40){for(o();dt(l(1))&&dt(l(2));)o();return l()===34||l()===39?new ii(C):dt(l())&&(l(2)===34||l(2)===39)?new ii(C):h()}else return l()===40?(o(),new ii(C)):new Sh(C)},w=function(C){C===void 0&&(C=s);let A="";for(;o();){if(s===C||u())return new Nh(A);if(ni(s))return a(),new ah;s===92?u(l())||(ni(l())?o():A+=se(v())):A+=se(s)}throw new Error("Internal error")},h=function(){const C=new xh("");for(;dt(l());)o();if(u(l()))return C;for(;o();){if(s===41||u())return C;if(dt(s)){for(;dt(l());)o();return l()===41||u(l())?(o(),C):(O(),new ri)}else{if(s===34||s===39||s===40||xy(s))return O(),new ri;if(s===92)if(c())C.value+=se(v());else return O(),new ri;else C.value+=se(s)}}throw new Error("Internal error")},v=function(){if(o(),Oc(s)){const C=[s];for(let pe=0;pe<5&&Oc(l());pe++)o(),C.push(s);dt(l())&&o();let A=parseInt(C.map(function(pe){return String.fromCharCode(pe)}).join(""),16);return A>Ty&&(A=65533),A}else return u()?65533:s},d=function(C,A){return!(C!==92||ni(A))},c=function(){return d(s,l())},y=function(C,A,pe){return C===45?ti(A)||A===45||d(A,pe):ti(C)?!0:C===92?d(C,A):!1},S=function(){return y(s,l(1),l(2))},x=function(C,A,pe){return C===43||C===45?!!(Ce(A)||A===46&&Ce(pe)):C===46?!!Ce(A):!!Ce(C)},k=function(){return x(s,l(1),l(2))},T=function(){let C="";for(;o();)if($c(s))C+=se(s);else if(c())C+=se(v());else return a(),C;throw new Error("Internal parse error")},N=function(){let C="",A="integer";for((l()===43||l()===45)&&(o(),C+=se(s));Ce(l());)o(),C+=se(s);if(l(1)===46&&Ce(l(2)))for(o(),C+=se(s),o(),C+=se(s),A="number";Ce(l());)o(),C+=se(s);const pe=l(1),gr=l(2),yr=l(3);if((pe===69||pe===101)&&Ce(gr))for(o(),C+=se(s),o(),C+=se(s),A="number";Ce(l());)o(),C+=se(s);else if((pe===69||pe===101)&&(gr===43||gr===45)&&Ce(yr))for(o(),C+=se(s),o(),C+=se(s),o(),C+=se(s),A="number";Ce(l());)o(),C+=se(s);const vr=E(C);return{type:A,value:vr,repr:C}},E=function(C){return+C},O=function(){for(;o();){if(s===41||u())return;c()&&v()}};let M=0;for(;!u(l());)if(r.push(m()),M++,M>t.length*2)throw new Error("I'm infinite-looping!");return r}class te{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class ah extends te{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class ri extends te{constructor(){super(...arguments),this.tokenType="BADURL"}}class Qo extends te{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class uh extends te{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return""}}class fh extends te{constructor(){super(...arguments),this.tokenType=":"}}class dh extends te{constructor(){super(...arguments),this.tokenType=";"}}class hh extends te{constructor(){super(...arguments),this.tokenType=","}}class ar extends te{constructor(){super(...arguments),this.value="",this.mirror=""}}class ph extends ar{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class mh extends ar{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class gh extends ar{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Yo extends ar{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class yh extends ar{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class vh extends ar{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class Ly extends te{constructor(){super(...arguments),this.tokenType="~="}}class Oy extends te{constructor(){super(...arguments),this.tokenType="|="}}class $y extends te{constructor(){super(...arguments),this.tokenType="^="}}class Iy extends te{constructor(){super(...arguments),this.tokenType="$="}}class Ay extends te{constructor(){super(...arguments),this.tokenType="*="}}class wh extends te{constructor(){super(...arguments),this.tokenType="||"}}class si extends te{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class ye extends te{constructor(t){super(),this.tokenType="DELIM",this.value="",this.value=se(t)}toString(){return"DELIM("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}toSource(){return this.value==="\\"?`\\ -`:this.value}}class ur extends te{constructor(){super(...arguments),this.value=""}ASCIIMatch(t){return this.value.toLowerCase()===t.toLowerCase()}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t}}class Sh extends ur{constructor(t){super(),this.tokenType="IDENT",this.value=t}toString(){return"IDENT("+this.value+")"}toSource(){return ms(this.value)}}class ii extends ur{constructor(t){super(),this.tokenType="FUNCTION",this.value=t,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ms(this.value)+"("}}class kh extends ur{constructor(t){super(),this.tokenType="AT-KEYWORD",this.value=t}toString(){return"AT("+this.value+")"}toSource(){return"@"+ms(this.value)}}class Eh extends ur{constructor(t){super(),this.tokenType="HASH",this.value=t,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t}toSource(){return this.type==="id"?"#"+ms(this.value):"#"+My(this.value)}}class Nh extends ur{constructor(t){super(),this.tokenType="STRING",this.value=t}toString(){return'"'+_h(this.value)+'"'}}class xh extends ur{constructor(t){super(),this.tokenType="URL",this.value=t}toString(){return"URL("+this.value+")"}toSource(){return'url("'+_h(this.value)+'")'}}class Th extends te{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const t=super.toJSON();return t.value=this.value,t.type=this.type,t.repr=this.repr,t}toSource(){return this.repr}}class Ch extends te{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.repr=this.repr,t}toSource(){return this.repr+"%"}}class Py extends te{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const t=this.constructor.prototype.constructor.prototype.toJSON.call(this);return t.value=this.value,t.type=this.type,t.repr=this.repr,t.unit=this.unit,t}toSource(){const t=this.repr;let n=ms(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||ne(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),t+n}}function ms(e){e=""+e;let t="";const n=e.charCodeAt(0);for(let r=0;r=128||s===45||s===95||ne(s,48,57)||ne(s,65,90)||ne(s,97,122)?t+=e[r]:t+="\\"+e[r]}return t}function My(e){e=""+e;let t="";for(let n=0;n=128||r===45||r===95||ne(r,48,57)||ne(r,65,90)||ne(r,97,122)?t+=e[n]:t+="\\"+r.toString(16)+" "}return t}function _h(e){e=""+e;let t="";for(let n=0;nE instanceof kh||E instanceof ah||E instanceof ri||E instanceof wh||E instanceof uh||E instanceof ch||E instanceof dh||E instanceof ph||E instanceof mh||E instanceof xh||E instanceof Ch);if(r)throw new Le(`Unsupported token "${r.toSource()}" while parsing css selector "${e}". Did you mean to CSS.escape it?`);let s=0;const i=new Set;function l(){return new Le(`Unexpected token "${n[s].toSource()}" while parsing css selector "${e}". Did you mean to CSS.escape it?`)}function o(){for(;n[s]instanceof Qo;)s++}function a(E=s){return n[E]instanceof Sh}function u(E=s){return n[E]instanceof Nh}function m(E=s){return n[E]instanceof Th}function f(E=s){return n[E]instanceof hh}function p(E=s){return n[E]instanceof yh}function g(E=s){return n[E]instanceof vh}function w(E=s){return n[E]instanceof ii}function h(E=s){return n[E]instanceof ye&&n[E].value==="*"}function v(E=s){return n[E]instanceof si}function d(E=s){return n[E]instanceof ye&&[">","+","~"].includes(n[E].value)}function c(E=s){return f(E)||g(E)||v(E)||d(E)||n[E]instanceof Qo}function y(){const E=[S()];for(;o(),!!f();)s++,E.push(S());return E}function S(){return o(),m()||u()?n[s++].value:x()}function x(){const E={simples:[]};for(o(),d()?E.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):E.simples.push({selector:k(),combinator:""});;){if(o(),d())E.simples[E.simples.length-1].combinator=n[s++].value,o();else if(c())break;E.simples.push({combinator:"",selector:k()})}return E}function k(){let E="";const O=[];for(;!c();)if(a()||h())E+=n[s++].toSource();else if(n[s]instanceof Eh)E+=n[s++].toSource();else if(n[s]instanceof ye&&n[s].value===".")if(s++,a())E+="."+n[s++].toSource();else throw l();else if(n[s]instanceof fh)if(s++,a())if(!t.has(n[s].value.toLowerCase()))E+=":"+n[s++].toSource();else{const M=n[s++].value.toLowerCase();O.push({name:M,args:[]}),i.add(M)}else if(w()){const M=n[s++].value.toLowerCase();if(t.has(M)?(O.push({name:M,args:y()}),i.add(M)):E+=`:${M}(${T()})`,o(),!g())throw l();s++}else throw l();else if(n[s]instanceof gh){for(E+="[",s++;!(n[s]instanceof Yo)&&!v();)E+=n[s++].toSource();if(!(n[s]instanceof Yo))throw l();E+="]",s++}else throw l();if(!E&&!O.length)throw l();return{css:E||void 0,functions:O}}function T(){let E="",O=1;for(;!v()&&((p()||w())&&O++,g()&&O--,!!O);)E+=n[s++].toSource();return E}const N=y();if(!v())throw l();if(N.some(E=>typeof E!="object"||!("simples"in E)))throw new Le(`Error while parsing css selector "${e}". Did you mean to CSS.escape it?`);return{selector:N,names:Array.from(i)}}const Ic=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),Ry=new Set(["left-of","right-of","above","below","near"]),Dy=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 Lh(e){const t=By(e),n=[];for(const r of t.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const s=jy(r.body,Dy);n.push({name:"css",body:s.selector,source:r.body});continue}if(Ic.has(r.name)){let s,i;try{const u=JSON.parse("["+r.body+"]");if(!Array.isArray(u)||u.length<1||u.length>2||typeof u[0]!="string")throw new Le(`Malformed selector: ${r.name}=`+r.body);if(s=u[0],u.length===2){if(typeof u[1]!="number"||!Ry.has(r.name))throw new Le(`Malformed selector: ${r.name}=`+r.body);i=u[1]}}catch{throw new Le(`Malformed selector: ${r.name}=`+r.body)}const l={name:r.name,source:r.body,body:{parsed:Lh(s),distance:i}},o=[...l.body.parsed.parts].reverse().find(u=>u.name==="internal:control"&&u.body==="enter-frame"),a=o?l.body.parsed.parts.indexOf(o):-1;a!==-1&&by(l.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&l.body.parsed.parts.splice(0,a+1),n.push(l);continue}n.push({...r,source:r.body})}if(Ic.has(n[0].name))throw new Le(`"${n[0].name}" selector cannot be first`);return{capture:t.capture,parts:n}}function by(e,t){return Rn({parts:e})===Rn({parts:t})}function Rn(e,t){return typeof e=="string"?e:e.parts.map((n,r)=>{let s=!0;!t&&r!==e.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(s=!1);const i=s?n.name+"=":"";return`${r===e.capture?"*":""}${i}${n.source}`}).join(" >> ")}function By(e){let t=0,n,r=0;const s={parts:[]},i=()=>{const o=e.substring(r,t).trim(),a=o.indexOf("=");let u,m;a!==-1&&o.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(u=o.substring(0,a).trim(),m=o.substring(a+1)):o.length>1&&o[0]==='"'&&o[o.length-1]==='"'||o.length>1&&o[0]==="'"&&o[o.length-1]==="'"?(u="text",m=o):/^\(*\/\//.test(o)||o.startsWith("..")?(u="xpath",m=o):(u="css",m=o);let f=!1;if(u[0]==="*"&&(f=!0,u=u.substring(1)),s.parts.push({name:u,body:m}),f){if(s.capture!==void 0)throw new Le("Only one of the selectors can capture using * modifier");s.capture=s.parts.length-1}};if(!e.includes(">>"))return t=e.length,i(),s;const l=()=>{const a=e.substring(r,t).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;t"&&e[t+1]===">"?(i(),t+=2,r=t):t++}return i(),s}function Hl(e,t){let n=0,r=e.length===0;const s=()=>e[n]||"",i=()=>{const v=s();return++n,r=n>=e.length,v},l=v=>{throw r?new Le(`Unexpected end of selector while parsing selector \`${e}\``):new Le(`Error while parsing selector \`${e}\` - unexpected symbol "${s()}" at position ${n}`+(v?" during "+v:""))};function o(){for(;!r&&/\s/.test(s());)i()}function a(v){return v>="€"||v>="0"&&v<="9"||v>="A"&&v<="Z"||v>="a"&&v<="z"||v>="0"&&v<="9"||v==="_"||v==="-"}function u(){let v="";for(o();!r&&a(s());)v+=i();return v}function m(v){let d=i();for(d!==v&&l("parsing quoted string");!r&&s()!==v;)s()==="\\"&&i(),d+=i();return s()!==v&&l("parsing quoted string"),d+=i(),d}function f(){i()!=="/"&&l("parsing regular expression");let v="",d=!1;for(;!r;){if(s()==="\\")v+=i(),r&&l("parsing regular expression");else if(d&&s()==="]")d=!1;else if(!d&&s()==="[")d=!0;else if(!d&&s()==="/")break;v+=i()}i()!=="/"&&l("parsing regular expression");let c="";for(;!r&&s().match(/[dgimsuy]/);)c+=i();try{return new RegExp(v,c)}catch(y){throw new Le(`Error while parsing selector \`${e}\`: ${y.message}`)}}function p(){let v="";return o(),s()==="'"||s()==='"'?v=m(s()).slice(1,-1):v=u(),v||l("parsing property path"),v}function g(){o();let v="";return r||(v+=i()),!r&&v!=="="&&(v+=i()),["=","*=","^=","$=","|=","~="].includes(v)||l("parsing operator"),v}function w(){i();const v=[];for(v.push(p()),o();s()===".";)i(),v.push(p()),o();if(s()==="]")return i(),{name:v.join("."),jsonPath:v,op:"",value:null,caseSensitive:!1};const d=g();let c,y=!0;if(o(),s()==="/"){if(d!=="=")throw new Le(`Error while parsing selector \`${e}\` - cannot use ${d} in attribute with regular expression`);c=f()}else if(s()==="'"||s()==='"')c=m(s()).slice(1,-1),o(),s()==="i"||s()==="I"?(y=!1,i()):(s()==="s"||s()==="S")&&(y=!0,i());else{for(c="";!r&&(a(s())||s()==="+"||s()===".");)c+=i();c==="true"?c=!0:c==="false"&&(c=!1)}if(o(),s()!=="]"&&l("parsing attribute value"),i(),d!=="="&&typeof c!="string")throw new Le(`Error while parsing selector \`${e}\` - cannot use ${d} in attribute with non-string matching value - ${c}`);return{name:v.join("."),jsonPath:v,op:d,value:c,caseSensitive:y}}const h={name:"",attributes:[]};for(h.name=u(),o();s()==="[";)h.attributes.push(w()),o();if(r||l(void 0),!h.name&&!h.attributes.length)throw new Le(`Error while parsing selector \`${e}\` - selector cannot be empty`);return h}function Oh(e,t,n=!1){return Fy(e,t,n,1)[0]}function Fy(e,t,n=!1,r=20,s){try{return Nn(new qy[e](s),Lh(t),n,r)}catch{return[t]}}function Nn(e,t,n=!1,r=20){const s=[...t.parts],i=[];let l=n?"frame-locator":"page";for(let o=0;oe.generateLocator(u,"has",h)));continue}if(a.name==="internal:has-not"){const w=Nn(e,a.body.parsed,!1,r);i.push(w.map(h=>e.generateLocator(u,"hasNot",h)));continue}if(a.name==="internal:and"){const w=Nn(e,a.body.parsed,!1,r);i.push(w.map(h=>e.generateLocator(u,"and",h)));continue}if(a.name==="internal:or"){const w=Nn(e,a.body.parsed,!1,r);i.push(w.map(h=>e.generateLocator(u,"or",h)));continue}if(a.name==="internal:chain"){const w=Nn(e,a.body.parsed,!1,r);i.push(w.map(h=>e.generateLocator(u,"chain",h)));continue}if(a.name==="internal:label"){const{exact:w,text:h}=_r(a.body);i.push([e.generateLocator(u,"label",h,{exact:w})]);continue}if(a.name==="internal:role"){const w=Hl(a.body),h={attrs:[]};for(const v of w.attributes)v.name==="name"?(h.exact=v.caseSensitive,h.name=v.value):(v.name==="level"&&typeof v.value=="string"&&(v.value=+v.value),h.attrs.push({name:v.name==="include-hidden"?"includeHidden":v.name,value:v.value}));i.push([e.generateLocator(u,"role",w.name,h)]);continue}if(a.name==="internal:testid"){const w=Hl(a.body),{value:h}=w.attributes[0];i.push([e.generateLocator(u,"test-id",h)]);continue}if(a.name==="internal:attr"){const w=Hl(a.body),{name:h,value:v,caseSensitive:d}=w.attributes[0],c=v,y=!!d;if(h==="placeholder"){i.push([e.generateLocator(u,"placeholder",c,{exact:y})]);continue}if(h==="alt"){i.push([e.generateLocator(u,"alt",c,{exact:y})]);continue}if(h==="title"){i.push([e.generateLocator(u,"title",c,{exact:y})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){const w=i[i.length-1],h=s[o-1],v=w.map(d=>e.chainLocators([d,e.generateLocator(u,"frame","")]));["xpath","css"].includes(h.name)&&v.push(e.generateLocator(u,"frame-locator",Rn({parts:[h]})),e.generateLocator(u,"frame-locator",Rn({parts:[h]},!0))),w.splice(0,w.length,...v),l="frame-locator";continue}const m=s[o+1],f=Rn({parts:[a]}),p=e.generateLocator(u,"default",f);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:w,text:h}=_r(m.body);if(!w){const v=e.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",h,{exact:w}),d={};m.name==="internal:has-text"?d.hasText=h:d.hasNotText=h;const c=e.generateLocator(u,"default",f,d);i.push([e.chainLocators([p,v]),c]),o++;continue}}let g;if(["xpath","css"].includes(a.name)){const w=Rn({parts:[a]},!0);g=e.generateLocator(u,"default",w)}i.push([p,g].filter(Boolean))}return zy(e,i,r)}function zy(e,t,n){const r=t.map(()=>""),s=[],i=l=>{if(l===t.length)return s.push(e.chainLocators(r)),s.lengthJSON.parse(r));for(let r=0;r{const n=B.useRef(null),[r,s]=B.useState(new Map);return B.useLayoutEffect(()=>{var i;t.find(l=>l.reveal)&&((i=n.current)==null||i.scrollIntoView({block:"center",inline:"nearest"}))},[n,t]),L.jsxs("div",{className:"call-log",style:{flex:"auto"},children:[t.map(i=>{const l=r.get(i.id),o=typeof l=="boolean"?l:i.status!=="done",a=i.params.selector?Oh(e,i.params.selector):null;let u=i.title,m="";return i.title.startsWith("expect.to")||i.title.startsWith("expect.not.to")?(u="expect(",m=`).${i.title.substring(7)}()`):i.title.startsWith("locator.")?(u="",m=`.${i.title.substring(8)}()`):(a||i.params.url)&&(u=i.title+"(",m=")"),L.jsxs("div",{className:on("call-log-call",i.status),children:[L.jsxs("div",{className:"call-log-call-header",children:[L.jsx("span",{className:on("codicon",`codicon-chevron-${o?"down":"right"}`),style:{cursor:"pointer"},onClick:()=>{const f=new Map(r);f.set(i.id,!o),s(f)}}),u,i.params.url?L.jsx("span",{className:"call-log-details",children:L.jsx("span",{className:"call-log-url",title:i.params.url,children:i.params.url})}):void 0,a?L.jsx("span",{className:"call-log-details",children:L.jsx("span",{className:"call-log-selector",title:`page.${a}`,children:`page.${a}`})}):void 0,m,L.jsx("span",{className:on("codicon",Yy(i))}),typeof i.duration=="number"?L.jsxs("span",{className:"call-log-time",children:["— ",Hp(i.duration)]}):void 0]}),(o?i.messages:[]).map((f,p)=>L.jsx("div",{className:"call-log-message",children:f.trim()},p)),!!i.error&&L.jsx("div",{className:"call-log-message error",hidden:!o,children:i.error})]},i.id)}),L.jsx("div",{ref:n})]})};function Yy(e){switch(e.status){case"done":return"codicon-check";case"in-progress":return"codicon-clock";case"paused":return"codicon-debug-pause";case"error":return"codicon-error"}}const Ga=Symbol.for("yaml.alias"),Jo=Symbol.for("yaml.document"),Ft=Symbol.for("yaml.map"),$h=Symbol.for("yaml.pair"),ft=Symbol.for("yaml.scalar"),cr=Symbol.for("yaml.seq"),Ye=Symbol.for("yaml.node.type"),vn=e=>!!e&&typeof e=="object"&&e[Ye]===Ga,wn=e=>!!e&&typeof e=="object"&&e[Ye]===Jo,fr=e=>!!e&&typeof e=="object"&&e[Ye]===Ft,H=e=>!!e&&typeof e=="object"&&e[Ye]===$h,z=e=>!!e&&typeof e=="object"&&e[Ye]===ft,dr=e=>!!e&&typeof e=="object"&&e[Ye]===cr;function Q(e){if(e&&typeof e=="object")switch(e[Ye]){case Ft:case cr:return!0}return!1}function J(e){if(e&&typeof e=="object")switch(e[Ye]){case Ga:case Ft:case ft:case cr:return!0}return!1}const Jy=e=>(z(e)||Q(e))&&!!e.anchor,Oe=Symbol("break visit"),Ih=Symbol("skip children"),ct=Symbol("remove node");function Vt(e,t){const n=Ah(t);wn(e)?Dn(null,e.contents,n,Object.freeze([e]))===ct&&(e.contents=null):Dn(null,e,n,Object.freeze([]))}Vt.BREAK=Oe;Vt.SKIP=Ih;Vt.REMOVE=ct;function Dn(e,t,n,r){const s=Ph(e,t,n,r);if(J(s)||H(s))return Mh(e,r,s),Dn(e,s,n,r);if(typeof s!="symbol"){if(Q(t)){r=Object.freeze(r.concat(t));for(let i=0;ie.replace(/[!,[\]{}]/g,t=>Gy[t]);class Ee{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ee.defaultYaml,t),this.tags=Object.assign({},Ee.defaultTags,n)}clone(){const t=new Ee(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Ee(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ee.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ee.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Ee.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ee.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[i,l]=r;return this.tags[i]=l,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const l=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,l),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const l=t.slice(2,-1);return l==="!"||l==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),l)}const[,r,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(s)}catch(l){return n(String(l)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+Xy(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let s;if(t&&r.length>0&&J(t.contents)){const i={};Vt(t.contents,(l,o)=>{J(o)&&o.tag&&(i[o.tag]=!0)}),s=Object.keys(i)}else s=[];for(const[i,l]of r)i==="!!"&&l==="tag:yaml.org,2002:"||(!t||s.some(o=>o.startsWith(l)))&&n.push(`%TAG ${i} ${l}`);return n.join(` -`)}}Ee.defaultYaml={explicit:!1,version:"1.2"};Ee.defaultTags={"!!":"tag:yaml.org,2002:"};function jh(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Rh(e){const t=new Set;return Vt(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function Dh(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function Zy(e,t){const n=[],r=new Map;let s=null;return{onAnchor:i=>{n.push(i),s||(s=Rh(e));const l=Dh(t,s);return s.add(l),l},setAnchors:()=>{for(const i of n){const l=r.get(i);if(typeof l=="object"&&l.anchor&&(z(l.node)||Q(l.node)))l.node.anchor=l.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=i,o}}},sourceObjects:r}}function Bn(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;sHe(r,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!Jy(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=i=>{r.res=i,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class Xa{constructor(t){Object.defineProperty(this,Ye,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!wn(t))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=He(this,"",l);if(typeof s=="function")for(const{count:a,res:u}of l.anchors.values())s(u,a);return typeof i=="function"?Bn(i,{"":o},"",o):o}}class il extends Xa{constructor(t){super(Ga),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return Vt(t,{Node:(r,s)=>{if(s===this)return Vt.BREAK;s.anchor===this.source&&(n=s)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:s,maxAliasCount:i}=n,l=this.resolve(s);if(!l){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let o=r.get(l);if(o||(He(l,null,n),o=r.get(l)),!o||o.res===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=li(s,l,r)),o.count*o.aliasCount>i)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return o.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(jh(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(t.implicitKey)return`${s} `}return s}}function li(e,t,n){if(vn(t)){const r=t.resolve(e),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(Q(t)){let r=0;for(const s of t.items){const i=li(e,s,n);i>r&&(r=i)}return r}else if(H(t)){const r=li(e,t.key,n),s=li(e,t.value,n);return Math.max(r,s)}return 1}const bh=e=>!e||typeof e!="function"&&typeof e!="object";class P extends Xa{constructor(t){super(ft),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:He(this.value,t,n)}toString(){return String(this.value)}}P.BLOCK_FOLDED="BLOCK_FOLDED";P.BLOCK_LITERAL="BLOCK_LITERAL";P.PLAIN="PLAIN";P.QUOTE_DOUBLE="QUOTE_DOUBLE";P.QUOTE_SINGLE="QUOTE_SINGLE";const e0="tag:yaml.org,2002:";function t0(e,t,n){if(t){const r=n.filter(i=>i.tag===t),s=r.find(i=>!i.format)??r[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(r=>{var s;return((s=r.identify)==null?void 0:s.call(r,e))&&!r.format})}function os(e,t,n){var f,p,g;if(wn(e)&&(e=e.contents),J(e))return e;if(H(e)){const w=(p=(f=n.schema[Ft]).createNode)==null?void 0:p.call(f,n.schema,null,n);return w.items.push(e),w}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:l,sourceObjects:o}=n;let a;if(r&&e&&typeof e=="object"){if(a=o.get(e),a)return a.anchor||(a.anchor=s(e)),new il(a.anchor);a={anchor:null,node:null},o.set(e,a)}t!=null&&t.startsWith("!!")&&(t=e0+t.slice(2));let u=t0(e,t,l.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const w=new P(e);return a&&(a.node=w),w}u=e instanceof Map?l[Ft]:Symbol.iterator in Object(e)?l[cr]:l[Ft]}i&&(i(u),delete n.onTagObj);const m=u!=null&&u.createNode?u.createNode(n.schema,e,n):typeof((g=u==null?void 0:u.nodeClass)==null?void 0:g.from)=="function"?u.nodeClass.from(n.schema,e,n):new P(e);return t?m.tag=t:u.default||(m.tag=u.tag),a&&(a.node=m),m}function ji(e,t,n){let r=n;for(let s=t.length-1;s>=0;--s){const i=t[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const l=[];l[i]=r,r=l}else r=new Map([[i,r]])}return os(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Pr=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Bh extends Xa{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>J(r)||H(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Pr(t))this.add(n);else{const[r,...s]=t,i=this.get(r,!0);if(Q(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,ji(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const s=this.get(n,!0);if(Q(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...s]=t,i=this.get(r,!0);return s.length===0?!n&&z(i)?i.value:i:Q(i)?i.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!H(n))return!1;const r=n.value;return r==null||t&&z(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const s=this.get(n,!0);return Q(s)?s.hasIn(r):!1}setIn(t,n){const[r,...s]=t;if(s.length===0)this.set(r,n);else{const i=this.get(r,!0);if(Q(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,ji(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}}const n0=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function yt(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const rn=(e,t,n)=>e.endsWith(` -`)?yt(n,t):n.includes(` -`)?` -`+yt(n,t):(e.endsWith(" ")?"":" ")+n,Fh="flow",Go="block",oi="quoted";function ll(e,t,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:l,onOverflow:o}={}){if(!s||s<0)return e;ss-Math.max(2,i)?u.push(0):f=s-r);let p,g,w=!1,h=-1,v=-1,d=-1;n===Go&&(h=Ac(e,h,t.length),h!==-1&&(f=h+a));for(let y;y=e[h+=1];){if(n===oi&&y==="\\"){switch(v=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}d=h}if(y===` -`)n===Go&&(h=Ac(e,h,t.length)),f=h+t.length+a,p=void 0;else{if(y===" "&&g&&g!==" "&&g!==` -`&&g!==" "){const S=e[h+1];S&&S!==" "&&S!==` -`&&S!==" "&&(p=h)}if(h>=f)if(p)u.push(p),f=p+a,p=void 0;else if(n===oi){for(;g===" "||g===" ";)g=y,y=e[h+=1],w=!0;const S=h>d+1?h-2:v-1;if(m[S])return e;u.push(S),m[S]=!0,f=S+a,p=void 0}else w=!0}g=y}if(w&&o&&o(),u.length===0)return e;l&&l();let c=e.slice(0,u[0]);for(let y=0;y({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),al=e=>/^(%|---|\.\.\.)/m.test(e);function r0(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let i=0,l=0;ir)return!0;if(l=i+1,s-l<=r)return!1}return!0}function Vr(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,s=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(al(e)?" ":"");let l="",o=0;for(let a=0,u=n[a];u;u=n[++a])if(u===" "&&n[a+1]==="\\"&&n[a+2]==="n"&&(l+=n.slice(o,a)+"\\ ",a+=1,o=a,u="\\"),u==="\\")switch(n[a+1]){case"u":{l+=n.slice(o,a);const m=n.substr(a+2,4);switch(m){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:m.substr(0,2)==="00"?l+="\\x"+m.substr(2):l+=n.substr(a,6)}a+=5,o=a+1}break;case"n":if(r||n[a+2]==='"'||n.length -`;let f,p;for(p=n.length;p>0;--p){const k=n[p-1];if(k!==` -`&&k!==" "&&k!==" ")break}let g=n.substring(p);const w=g.indexOf(` -`);w===-1?f="-":n===g||w!==g.length-1?(f="+",i&&i()):f="",g&&(n=n.slice(0,-g.length),g[g.length-1]===` -`&&(g=g.slice(0,-1)),g=g.replace(Zo,`$&${u}`));let h=!1,v,d=-1;for(v=0;v")+(h?u?"2":"1":"")+f;if(e&&(S+=" "+o(e.replace(/ ?[\r\n]+/g," ")),s&&s()),m)return n=n.replace(/\n+/g,`$&${u}`),`${S} -${u}${c}${n}${g}`;n=n.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);const x=ll(`${c}${n}${g}`,u,Go,ol(r,!0));return`${S} -${u}${x}`}function s0(e,t,n,r){const{type:s,value:i}=e,{actualString:l,implicitKey:o,indent:a,indentStep:u,inFlow:m}=t;if(o&&i.includes(` -`)||m&&/[[\]{},]/.test(i))return Fn(i,t);if(!i||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||m||!i.includes(` -`)?Fn(i,t):ai(e,t,n,r);if(!o&&!m&&s!==P.PLAIN&&i.includes(` -`))return ai(e,t,n,r);if(al(i)){if(a==="")return t.forceBlockIndent=!0,ai(e,t,n,r);if(o&&a===u)return Fn(i,t)}const f=i.replace(/\n+/g,`$& -${a}`);if(l){const p=h=>{var v;return h.default&&h.tag!=="tag:yaml.org,2002:str"&&((v=h.test)==null?void 0:v.test(f))},{compat:g,tags:w}=t.doc.schema;if(w.some(p)||g!=null&&g.some(p))return Fn(i,t)}return o?f:ll(f,a,Fh,ol(t,!1))}function gs(e,t,n,r){const{implicitKey:s,inFlow:i}=t,l=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==P.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(l.value)&&(o=P.QUOTE_DOUBLE);const a=m=>{switch(m){case P.BLOCK_FOLDED:case P.BLOCK_LITERAL:return s||i?Fn(l.value,t):ai(l,t,n,r);case P.QUOTE_DOUBLE:return Vr(l.value,t);case P.QUOTE_SINGLE:return Xo(l.value,t);case P.PLAIN:return s0(l,t,n,r);default:return null}};let u=a(o);if(u===null){const{defaultKeyType:m,defaultStringType:f}=t.options,p=s&&m||f;if(u=a(p),u===null)throw new Error(`Unsupported default string type ${p}`)}return u}function zh(e,t){const n=Object.assign({blockQuote:!0,commentString:n0,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},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function i0(e,t){var s;if(t.tag){const i=e.filter(l=>l.tag===t.tag);if(i.length>0)return i.find(l=>l.format===t.format)??i[0]}let n,r;if(z(t)){r=t.value;let i=e.filter(l=>{var o;return(o=l.identify)==null?void 0:o.call(l,r)});if(i.length>1){const l=i.filter(o=>o.test);l.length>0&&(i=l)}n=i.find(l=>l.format===t.format)??i.find(l=>!l.format)}else r=t,n=e.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=((s=r==null?void 0:r.constructor)==null?void 0:s.name)??typeof r;throw new Error(`Tag not resolved for ${i} value`)}return n}function l0(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const s=[],i=(z(e)||Q(e))&&e.anchor;i&&jh(i)&&(n.add(i),s.push(`&${i}`));const l=e.tag?e.tag:t.default?null:t.tag;return l&&s.push(r.directives.tagString(l)),s.join(" ")}function rr(e,t,n,r){var a;if(H(e))return e.toString(t,n,r);if(vn(e)){if(t.doc.directives)return e.toString(t);if((a=t.resolvedAliases)!=null&&a.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const i=J(e)?e:t.doc.createNode(e,{onTagObj:u=>s=u});s||(s=i0(t.doc.schema.tags,i));const l=l0(i,s,t);l.length>0&&(t.indentAtStart=(t.indentAtStart??0)+l.length+1);const o=typeof s.stringify=="function"?s.stringify(i,t,n,r):z(i)?gs(i,t,n,r):i.toString(t,n,r);return l?z(i)||o[0]==="{"||o[0]==="["?`${l} ${o}`:`${l} -${t.indent}${o}`:o}function o0({key:e,value:t},n,r,s){const{allNullValues:i,doc:l,indent:o,indentStep:a,options:{commentString:u,indentSeq:m,simpleKeys:f}}=n;let p=J(e)&&e.comment||null;if(f){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(Q(e)||!J(e)&&typeof e=="object"){const T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let g=!f&&(!e||p&&t==null&&!n.inFlow||Q(e)||(z(e)?e.type===P.BLOCK_FOLDED||e.type===P.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!g&&(f||!i),indent:o+a});let w=!1,h=!1,v=rr(e,n,()=>w=!0,()=>h=!0);if(!g&&!n.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(n.inFlow){if(i||t==null)return w&&r&&r(),v===""?"?":g?`? ${v}`:v}else if(i&&!f||t==null&&g)return v=`? ${v}`,p&&!w?v+=rn(v,n.indent,u(p)):h&&s&&s(),v;w&&(p=null),g?(p&&(v+=rn(v,n.indent,u(p))),v=`? ${v} -${o}:`):(v=`${v}:`,p&&(v+=rn(v,n.indent,u(p))));let d,c,y;J(t)?(d=!!t.spaceBefore,c=t.commentBefore,y=t.comment):(d=!1,c=null,y=null,t&&typeof t=="object"&&(t=l.createNode(t))),n.implicitKey=!1,!g&&!p&&z(t)&&(n.indentAtStart=v.length+1),h=!1,!m&&a.length>=2&&!n.inFlow&&!g&&dr(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let S=!1;const x=rr(t,n,()=>S=!0,()=>h=!0);let k=" ";if(p||d||c){if(k=d?` -`:"",c){const T=u(c);k+=` -${yt(T,n.indent)}`}x===""&&!n.inFlow?k===` -`&&(k=` - -`):k+=` -${n.indent}`}else if(!g&&Q(t)){const T=x[0],N=x.indexOf(` -`),E=N!==-1,O=n.inFlow??t.flow??t.items.length===0;if(E||!O){let M=!1;if(E&&(T==="&"||T==="!")){let C=x.indexOf(" ");T==="&"&&C!==-1&&Ce===bs||typeof e=="symbol"&&e.description===bs,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new P(Symbol(bs)),{addToJSMap:Vh}),stringify:()=>bs},a0=(e,t)=>(wt.identify(t)||z(t)&&(!t.type||t.type===P.PLAIN)&&wt.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===wt.tag&&n.default));function Vh(e,t,n){if(n=e&&vn(n)?n.resolve(e.doc):n,dr(n))for(const r of n.items)ql(e,t,r);else if(Array.isArray(n))for(const r of n)ql(e,t,r);else ql(e,t,n)}function ql(e,t,n){const r=e&&vn(n)?n.resolve(e.doc):n;if(!fr(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,e,Map);for(const[i,l]of s)t instanceof Map?t.has(i)||t.set(i,l):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:l,writable:!0,enumerable:!0,configurable:!0});return t}function Kh(e,t,{key:n,value:r}){if(J(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(a0(e,n))Vh(e,t,r);else{const s=He(n,"",e);if(t instanceof Map)t.set(s,He(r,s,e));else if(t instanceof Set)t.add(s);else{const i=u0(n,s,e),l=He(r,i,e);i in t?Object.defineProperty(t,i,{value:l,writable:!0,enumerable:!0,configurable:!0}):t[i]=l}}return t}function u0(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(J(e)&&(n!=null&&n.doc)){const r=zh(n.doc,{});r.anchors=new Set;for(const i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=e.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),Uh(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function Za(e,t,n){const r=os(e,void 0,n),s=os(t,void 0,n);return new we(r,s)}class we{constructor(t,n=null){Object.defineProperty(this,Ye,{value:$h}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return J(n)&&(n=n.clone(t)),J(r)&&(r=r.clone(t)),new we(n,r)}toJSON(t,n){const r=n!=null&&n.mapAsMap?new Map:{};return Kh(n,r,this)}toString(t,n,r){return t!=null&&t.doc?o0(this,t,n,r):JSON.stringify(this)}}function Wh(e,t,n){return(t.inFlow??e.flow?f0:c0)(e,t,n)}function c0({comment:e,items:t},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:l,onComment:o}){const{indent:a,options:{commentString:u}}=n,m=Object.assign({},n,{indent:i,type:null});let f=!1;const p=[];for(let w=0;wv=null,()=>f=!0);v&&(d+=rn(d,i,u(v))),f&&v&&(f=!1),p.push(r+d)}let g;if(p.length===0)g=s.start+s.end;else{g=p[0];for(let w=1;wv=null);wm||d.includes(` -`))&&(u=!0),f.push(d),m=f.length}const{start:p,end:g}=n;if(f.length===0)return p+g;if(!u){const w=f.reduce((h,v)=>h+v.length+2,2);u=t.options.lineWidth>0&&w>t.options.lineWidth}if(u){let w=p;for(const h of f)w+=h?` -${i}${s}${h}`:` -`;return`${w} -${s}${g}`}else return`${p}${l}${f.join(" ")}${l}${g}`}function Ri({indent:e,options:{commentString:t}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=yt(t(r),e);n.push(i.trimStart())}}function sn(e,t){const n=z(t)?t.value:t;for(const r of e)if(H(r)&&(r.key===t||r.key===n||z(r.key)&&r.key.value===n))return r}class Re extends Bh{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Ft,t),this.items=[]}static from(t,n,r){const{keepUndefined:s,replacer:i}=r,l=new this(t),o=(a,u)=>{if(typeof i=="function")u=i.call(n,a,u);else if(Array.isArray(i)&&!i.includes(a))return;(u!==void 0||s)&&l.items.push(Za(a,u,r))};if(n instanceof Map)for(const[a,u]of n)o(a,u);else if(n&&typeof n=="object")for(const a of Object.keys(n))o(a,n[a]);return typeof t.sortMapEntries=="function"&&l.items.sort(t.sortMapEntries),l}add(t,n){var l;let r;H(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new we(t,t==null?void 0:t.value):r=new we(t.key,t.value);const s=sn(this.items,r.key),i=(l=this.schema)==null?void 0:l.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);z(s.value)&&bh(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const o=this.items.findIndex(a=>i(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(t){const n=sn(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=sn(this.items,t),s=r==null?void 0:r.value;return(!n&&z(s)?s.value:s)??void 0}has(t){return!!sn(this.items,t)}set(t,n){this.add(new we(t,n),!0)}toJSON(t,n,r){const s=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const i of this.items)Kh(n,s,i);return s}toString(t,n,r){if(!t)return JSON.stringify(this);for(const s of this.items)if(!H(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Wh(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const hr={collection:"map",default:!0,nodeClass:Re,tag:"tag:yaml.org,2002:map",resolve(e,t){return fr(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Re.from(e,t,n)};class Kt extends Bh{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(cr,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Bs(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Bs(t);if(typeof r!="number")return;const s=this.items[r];return!n&&z(s)?s.value:s}has(t){const n=Bs(t);return typeof n=="number"&&n=0?t:null}const pr={collection:"seq",default:!0,nodeClass:Kt,tag:"tag:yaml.org,2002:seq",resolve(e,t){return dr(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Kt.from(e,t,n)},ul={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),gs(e,t,n,r)}},cl={identify:e=>e==null,createNode:()=>new P(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new P(null),stringify:({source:e},t)=>typeof e=="string"&&cl.test.test(e)?e:t.options.nullStr},eu={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new P(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&eu.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function st({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let l=i.indexOf(".");l<0&&(l=i.length,i+=".");let o=t-(i.length-l-1);for(;o-- >0;)i+="0"}return i}const Hh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:st},qh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():st(e)}},Qh={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new P(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:st},fl=e=>typeof e=="bigint"||Number.isInteger(e),tu=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function Yh(e,t,n){const{value:r}=e;return fl(r)&&r>=0?n+r.toString(t):st(e)}const Jh={identify:e=>fl(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>tu(e,2,8,n),stringify:e=>Yh(e,8,"0o")},Gh={identify:fl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>tu(e,0,10,n),stringify:st},Xh={identify:e=>fl(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>tu(e,2,16,n),stringify:e=>Yh(e,16,"0x")},d0=[hr,pr,ul,cl,eu,Jh,Gh,Xh,Hh,qh,Qh];function Pc(e){return typeof e=="bigint"||Number.isInteger(e)}const Fs=({value:e})=>JSON.stringify(e),h0=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Fs},{identify:e=>e==null,createNode:()=>new P(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Fs},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>e==="true",stringify:Fs},{identify:Pc,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Pc(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Fs}],p0={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},m0=[hr,pr].concat(h0,p0),nu={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Buffer=="function")return Buffer.from(e,"base64");if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s1&&t("Each pair must have its own sequence indicator");const s=r.items[0]||new we(new P(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore} -${s.key.commentBefore}`:r.commentBefore),r.comment){const i=s.value??s.key;i.comment=i.comment?`${r.comment} -${i.comment}`:r.comment}r=s}e.items[n]=H(r)?r:new we(r)}}else t("Expected a sequence for this tag");return e}function ep(e,t,n){const{replacer:r}=n,s=new Kt(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let l of t){typeof r=="function"&&(l=r.call(t,String(i++),l));let o,a;if(Array.isArray(l))if(l.length===2)o=l[0],a=l[1];else throw new TypeError(`Expected [key, value] tuple: ${l}`);else if(l&&l instanceof Object){const u=Object.keys(l);if(u.length===1)o=u[0],a=l[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=l;s.items.push(Za(o,a,n))}return s}const ru={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Zh,createNode:ep};class Qn extends Kt{constructor(){super(),this.add=Re.prototype.add.bind(this),this.delete=Re.prototype.delete.bind(this),this.get=Re.prototype.get.bind(this),this.has=Re.prototype.has.bind(this),this.set=Re.prototype.set.bind(this),this.tag=Qn.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const s of this.items){let i,l;if(H(s)?(i=He(s.key,"",n),l=He(s.value,i,n)):i=He(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,l)}return r}static from(t,n,r){const s=ep(t,n,r),i=new this;return i.items=s.items,i}}Qn.tag="tag:yaml.org,2002:omap";const su={collection:"seq",identify:e=>e instanceof Map,nodeClass:Qn,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Zh(e,t),r=[];for(const{key:s}of n.items)z(s)&&(r.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new Qn,n)},createNode:(e,t,n)=>Qn.from(e,t,n)};function tp({value:e,source:t},n){return t&&(e?np:rp).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const np={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new P(!0),stringify:tp},rp={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new P(!1),stringify:tp},g0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:st},y0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():st(e)}},v0={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new P(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:st},ys=e=>typeof e=="bigint"||Number.isInteger(e);function dl(e,t,n,{intAsBigInt:r}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const l=BigInt(e);return s==="-"?BigInt(-1)*l:l}const i=parseInt(e,n);return s==="-"?-1*i:i}function iu(e,t,n){const{value:r}=e;if(ys(r)){const s=r.toString(t);return r<0?"-"+n+s.substr(1):n+s}return st(e)}const w0={identify:ys,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>dl(e,2,2,n),stringify:e=>iu(e,2,"0b")},S0={identify:ys,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>dl(e,1,8,n),stringify:e=>iu(e,8,"0")},k0={identify:ys,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>dl(e,0,10,n),stringify:st},E0={identify:ys,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>dl(e,2,16,n),stringify:e=>iu(e,16,"0x")};class Yn extends Re{constructor(t){super(t),this.tag=Yn.tag}add(t){let n;H(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new we(t.key,null):n=new we(t,null),sn(this.items,n.key)||this.items.push(n)}get(t,n){const r=sn(this.items,t);return!n&&H(r)?z(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=sn(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new we(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n))for(let l of n)typeof s=="function"&&(l=s.call(n,l,l)),i.items.push(Za(l,null,r));return i}}Yn.tag="tag:yaml.org,2002:set";const lu={collection:"map",identify:e=>e instanceof Set,nodeClass:Yn,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>Yn.from(e,t,n),resolve(e,t){if(fr(e)){if(e.hasAllNullValues(!0))return Object.assign(new Yn,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ou(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,s=l=>t?BigInt(l):Number(l),i=r.replace(/_/g,"").split(":").reduce((l,o)=>l*s(60)+s(o),s(0));return n==="-"?s(-1)*i:i}function sp(e){let{value:t}=e,n=l=>l;if(typeof t=="bigint")n=l=>BigInt(l);else if(isNaN(t)||!isFinite(t))return st(e);let r="";t<0&&(r="-",t*=n(-1));const s=n(60),i=[t%s];return t<60?i.unshift(0):(t=(t-i[0])/s,i.unshift(t%s),t>=60&&(t=(t-i[0])/s,i.unshift(t))),r+i.map(l=>String(l).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const ip={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>ou(e,n),stringify:sp},lp={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ou(e,!1),stringify:sp},hl={identify:e=>e 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(e){const t=e.match(hl.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,s,i,l,o]=t.map(Number),a=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,r-1,s,i||0,l||0,o||0,a);const m=t[8];if(m&&m!=="Z"){let f=ou(m,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Mc=[hr,pr,ul,cl,np,rp,w0,S0,k0,E0,g0,y0,v0,nu,wt,su,ru,lu,ip,lp,hl],jc=new Map([["core",d0],["failsafe",[hr,pr,ul]],["json",m0],["yaml11",Mc],["yaml-1.1",Mc]]),Rc={binary:nu,bool:eu,float:Qh,floatExp:qh,floatNaN:Hh,floatTime:lp,int:Gh,intHex:Xh,intOct:Jh,intTime:ip,map:hr,merge:wt,null:cl,omap:su,pairs:ru,seq:pr,set:lu,timestamp:hl},N0={"tag:yaml.org,2002:binary":nu,"tag:yaml.org,2002:merge":wt,"tag:yaml.org,2002:omap":su,"tag:yaml.org,2002:pairs":ru,"tag:yaml.org,2002:set":lu,"tag:yaml.org,2002:timestamp":hl};function Ql(e,t,n){const r=jc.get(t);if(r&&!e)return n&&!r.includes(wt)?r.concat(wt):r.slice();let s=r;if(!s)if(Array.isArray(e))s=[];else{const i=Array.from(jc.keys()).filter(l=>l!=="yaml11").map(l=>JSON.stringify(l)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${i} or define customTags array`)}if(Array.isArray(e))for(const i of e)s=s.concat(i);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(wt)),s.reduce((i,l)=>{const o=typeof l=="string"?Rc[l]:l;if(!o){const a=JSON.stringify(l),u=Object.keys(Rc).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${u}`)}return i.includes(o)||i.push(o),i},[])}const x0=(e,t)=>e.keyt.key?1:0;class pl{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:s,schema:i,sortMapEntries:l,toStringDefaults:o}){this.compat=Array.isArray(t)?Ql(t,"compat"):t?Ql(null,t):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?N0:{},this.tags=Ql(n,this.name,r),this.toStringOptions=o??null,Object.defineProperty(this,Ft,{value:hr}),Object.defineProperty(this,ft,{value:ul}),Object.defineProperty(this,cr,{value:pr}),this.sortMapEntries=typeof l=="function"?l:l===!0?x0:null}clone(){const t=Object.create(pl.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function T0(e,t){var a;const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const u=e.directives.toString(e);u?(n.push(u),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const s=zh(e,t),{commentString:i}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const u=i(e.commentBefore);n.unshift(yt(u,""))}let l=!1,o=null;if(e.contents){if(J(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const f=i(e.contents.commentBefore);n.push(yt(f,""))}s.forceBlockIndent=!!e.comment,o=e.contents.comment}const u=o?void 0:()=>l=!0;let m=rr(e.contents,s,()=>o=null,u);o&&(m+=rn(m,"",i(o))),(m[0]==="|"||m[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${m}`:n.push(m)}else n.push(rr(e.contents,s));if((a=e.directives)!=null&&a.docEnd)if(e.comment){const u=i(e.comment);u.includes(` -`)?(n.push("..."),n.push(yt(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=e.comment;u&&l&&(u=u.replace(/^\n+/,"")),u&&((!l||o)&&n[n.length-1]!==""&&n.push(""),n.push(yt(i(u),"")))}return n.join(` -`)+` -`}class mr{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ye,{value:Jo});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:l}=i;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(l=this.directives.yaml.version)):this.directives=new Ee({version:l}),this.setSchema(l,r),this.contents=t===void 0?null:this.createNode(t,s,r)}clone(){const t=Object.create(mr.prototype,{[Ye]:{value:Jo}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=J(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){kn(this.contents)&&this.contents.add(t)}addIn(t,n){kn(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=Rh(this);t.anchor=!n||r.has(n)?Dh(n||"a",r):n}return new il(t.anchor)}createNode(t,n,r){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const v=c=>typeof c=="number"||c instanceof String||c instanceof Number,d=n.filter(v).map(String);d.length>0&&(n=n.concat(d)),s=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:i,anchorPrefix:l,flow:o,keepUndefined:a,onTagObj:u,tag:m}=r??{},{onAnchor:f,setAnchors:p,sourceObjects:g}=Zy(this,l||"a"),w={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:u,replacer:s,schema:this.schema,sourceObjects:g},h=os(t,m,w);return o&&Q(h)&&(h.flow=!0),p(),h}createPair(t,n,r={}){const s=this.createNode(t,null,r),i=this.createNode(n,null,r);return new we(s,i)}delete(t){return kn(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Pr(t)?this.contents==null?!1:(this.contents=null,!0):kn(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Q(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Pr(t)?!n&&z(this.contents)?this.contents.value:this.contents:Q(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Q(this.contents)?this.contents.has(t):!1}hasIn(t){return Pr(t)?this.contents!==void 0:Q(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=ji(this.schema,[t],n):kn(this.contents)&&this.contents.set(t,n)}setIn(t,n){Pr(t)?this.contents=n:this.contents==null?this.contents=ji(this.schema,Array.from(t),n):kn(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ee({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Ee({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new pl(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:i,reviver:l}={}){const o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=He(this.contents,n??"",o);if(typeof i=="function")for(const{count:u,res:m}of o.anchors.values())i(m,u);return typeof l=="function"?Bn(l,{"":a},"",a):a}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return T0(this,t)}}function kn(e){if(Q(e))return!0;throw new Error("Expected a YAML collection as document contents")}class au extends Error{constructor(t,n,r,s){super(),this.name=t,this.code=r,this.message=s,this.pos=n}}class ln extends au{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class op extends au{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const Di=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>t.linePos(o));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,l=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&l.length>80){const o=Math.min(i-39,l.length-79);l="…"+l.substring(o),i-=o-1}if(l.length>80&&(l=l.substring(0,79)+"…"),r>1&&/^ *$/.test(l.substring(0,i))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`… -`),l=o+l}if(/[^ ]/.test(l)){let o=1;const a=n.linePos[1];a&&a.line===r&&a.col>s&&(o=Math.max(1,Math.min(a.col-s,80-i)));const u=" ".repeat(i)+"^".repeat(o);n.message+=`: - -${l} -${u} -`}};function sr(e,{flow:t,indicator:n,next:r,offset:s,onError:i,parentIndent:l,startOnNewline:o}){let a=!1,u=o,m=o,f="",p="",g=!1,w=!1,h=null,v=null,d=null,c=null,y=null,S=null,x=null;for(const N of e)switch(w&&(N.type!=="space"&&N.type!=="newline"&&N.type!=="comma"&&i(N.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w=!1),h&&(u&&N.type!=="comment"&&N.type!=="newline"&&i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),N.type){case"space":!t&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&N.source.includes(" ")&&(h=N),m=!0;break;case"comment":{m||i(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const E=N.source.substring(1)||" ";f?f+=p+E:f=E,p="",u=!1;break}case"newline":u?f?f+=N.source:a=!0:p+=N.source,u=!0,g=!0,(v||d)&&(c=N),m=!0;break;case"anchor":v&&i(N,"MULTIPLE_ANCHORS","A node can have at most one anchor"),N.source.endsWith(":")&&i(N.offset+N.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=N,x===null&&(x=N.offset),u=!1,m=!1,w=!0;break;case"tag":{d&&i(N,"MULTIPLE_TAGS","A node can have at most one tag"),d=N,x===null&&(x=N.offset),u=!1,m=!1,w=!0;break}case n:(v||d)&&i(N,"BAD_PROP_ORDER",`Anchors and tags must be after the ${N.source} indicator`),S&&i(N,"UNEXPECTED_TOKEN",`Unexpected ${N.source} in ${t??"collection"}`),S=N,u=n==="seq-item-ind"||n==="explicit-key-ind",m=!1;break;case"comma":if(t){y&&i(N,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),y=N,u=!1,m=!1;break}default:i(N,"UNEXPECTED_TOKEN",`Unexpected ${N.type} token`),u=!1,m=!1}const k=e[e.length-1],T=k?k.offset+k.source.length:s;return w&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(u&&h.indent<=l||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&i(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:y,found:S,spaceBefore:a,comment:f,hasNewline:g,anchor:v,tag:d,newlineAfterProp:c,end:T,start:x??T}}function as(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` -`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(as(t.key)||as(t.value))return!0}return!1;default:return!0}}function ea(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&as(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function ap(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const s=typeof r=="function"?r:(i,l)=>i===l||z(i)&&z(l)&&i.value===l.value;return t.some(i=>s(i.key,n))}const Dc="All mapping items must start at the same column";function C0({composeNode:e,composeEmptyNode:t},n,r,s,i){var m;const l=(i==null?void 0:i.nodeClass)??Re,o=new l(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,u=null;for(const f of r.items){const{start:p,key:g,sep:w,value:h}=f,v=sr(p,{indicator:"explicit-key-ind",next:g??(w==null?void 0:w[0]),offset:a,onError:s,parentIndent:r.indent,startOnNewline:!0}),d=!v.found;if(d){if(g&&(g.type==="block-seq"?s(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in g&&g.indent!==r.indent&&s(a,"BAD_INDENT",Dc)),!v.anchor&&!v.tag&&!w){u=v.end,v.comment&&(o.comment?o.comment+=` -`+v.comment:o.comment=v.comment);continue}(v.newlineAfterProp||as(g))&&s(g??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=v.found)==null?void 0:m.indent)!==r.indent&&s(a,"BAD_INDENT",Dc);n.atKey=!0;const c=v.end,y=g?e(n,g,v,s):t(n,c,p,null,v,s);n.schema.compat&&ea(r.indent,g,s),n.atKey=!1,ap(n,o.items,y)&&s(c,"DUPLICATE_KEY","Map keys must be unique");const S=sr(w??[],{indicator:"map-value-ind",next:h,offset:y.range[2],onError:s,parentIndent:r.indent,startOnNewline:!g||g.type==="block-scalar"});if(a=S.end,S.found){d&&((h==null?void 0:h.type)==="block-map"&&!S.hasNewline&&s(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&v.starte&&(e.type==="block-map"||e.type==="block-seq");function L0({composeNode:e,composeEmptyNode:t},n,r,s,i){const l=r.start.source==="{",o=l?"flow map":"flow sequence",a=(i==null?void 0:i.nodeClass)??(l?Re:Kt),u=new a(n.schema);u.flow=!0;const m=n.atRoot;m&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=r.offset+r.start.source.length;for(let v=0;v0){const v=vs(w,h,n.options.strict,s);v.comment&&(u.comment?u.comment+=` -`+v.comment:u.comment=v.comment),u.range=[r.offset,h,v.offset]}else u.range=[r.offset,h,h];return u}function Gl(e,t,n,r,s,i){const l=n.type==="block-map"?C0(e,t,n,r,i):n.type==="block-seq"?_0(e,t,n,r,i):L0(e,t,n,r,i),o=l.constructor;return s==="!"||s===o.tagName?(l.tag=o.tagName,l):(s&&(l.tag=s),l)}function O0(e,t,n,r,s){var p;const i=r.tag,l=i?t.directives.tagName(i.source,g=>s(i,"TAG_RESOLVE_FAILED",g)):null;if(n.type==="block-seq"){const{anchor:g,newlineAfterProp:w}=r,h=g&&i?g.offset>i.offset?g:i:g??i;h&&(!w||w.offsetg.tag===l&&g.collection===o);if(!a){const g=t.schema.knownTags[l];if(g&&g.collection===o)t.schema.tags.push(Object.assign({},g,{default:!1})),a=g;else return g!=null&&g.collection?s(i,"BAD_COLLECTION_TYPE",`${g.tag} used for ${o} collection, but expects ${g.collection}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${l}`,!0),Gl(e,t,n,s,l)}const u=Gl(e,t,n,s,l,a),m=((p=a.resolve)==null?void 0:p.call(a,u,g=>s(i,"TAG_RESOLVE_FAILED",g),t.options))??u,f=J(m)?m:new P(m);return f.range=u.range,f.tag=l,a!=null&&a.format&&(f.format=a.format),f}function up(e,t,n){const r=t.offset,s=$0(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};const i=s.mode===">"?P.BLOCK_FOLDED:P.BLOCK_LITERAL,l=t.source?I0(t.source):[];let o=l.length;for(let h=l.length-1;h>=0;--h){const v=l[h][1];if(v===""||v==="\r")o=h;else break}if(o===0){const h=s.chomp==="+"&&l.length>0?` -`.repeat(Math.max(1,l.length-1)):"";let v=r+s.length;return t.source&&(v+=t.source.length),{value:h,type:i,comment:s.comment,range:[r,v,v]}}let a=t.indent+s.indent,u=t.offset+s.length,m=0;for(let h=0;ha&&(a=v.length);else{v.length=o;--h)l[h][0].length>a&&(o=h+1);let f="",p="",g=!1;for(let h=0;ha||d[0]===" "?(p===" "?p=` -`:!g&&p===` -`&&(p=` - -`),f+=p+v.slice(a)+d,p=` -`,g=!0):d===""?p===` -`?f+=` -`:p=` -`:(f+=p+d,p=" ",g=!1)}switch(s.chomp){case"-":break;case"+":for(let h=o;hn(r+p,g,w);switch(s){case"scalar":o=P.PLAIN,a=A0(i,u);break;case"single-quoted-scalar":o=P.QUOTE_SINGLE,a=P0(i,u);break;case"double-quoted-scalar":o=P.QUOTE_DOUBLE,a=M0(i,u);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}const m=r+i.length,f=vs(l,m,t,n);return{value:a,type:o,comment:f.comment,range:[r,m,f.offset]}}function A0(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),fp(e)}function P0(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),fp(e.slice(1,-1)).replace(/''/g,"'")}function fp(e){let t,n;try{t=new RegExp(`(.*?)(?i?e.slice(i,r+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function j0(e,t){let n="",r=e[t+1];for(;(r===" "||r===" "||r===` -`||r==="\r")&&!(r==="\r"&&e[t+2]!==` -`);)r===` -`&&(n+=` -`),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}const R0={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` -`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function D0(e,t,n,r){const s=e.substr(t,n),l=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(l)){const o=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}return String.fromCodePoint(l)}function dp(e,t,n,r){const{value:s,type:i,comment:l,range:o}=t.type==="block-scalar"?up(e,t,r):cp(t,e.options.strict,r),a=n?e.directives.tagName(n.source,f=>r(n,"TAG_RESOLVE_FAILED",f)):null;let u;e.options.stringKeys&&e.atKey?u=e.schema[ft]:a?u=b0(e.schema,s,a,n,r):t.type==="scalar"?u=B0(e,s,t,r):u=e.schema[ft];let m;try{const f=u.resolve(s,p=>r(n??t,"TAG_RESOLVE_FAILED",p),e.options);m=z(f)?f:new P(f)}catch(f){const p=f instanceof Error?f.message:String(f);r(n??t,"TAG_RESOLVE_FAILED",p),m=new P(s)}return m.range=o,m.source=s,i&&(m.type=i),a&&(m.tag=a),u.format&&(m.format=u.format),l&&(m.comment=l),m}function b0(e,t,n,r,s){var o;if(n==="!")return e[ft];const i=[];for(const a of e.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(const a of i)if((o=a.test)!=null&&o.test(t))return a;const l=e.knownTags[n];return l&&!l.collection?(e.tags.push(Object.assign({},l,{default:!1,test:void 0})),l):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[ft])}function B0({atKey:e,directives:t,schema:n},r,s,i){const l=n.tags.find(o=>{var a;return(o.default===!0||e&&o.default==="key")&&((a=o.test)==null?void 0:a.test(r))})||n[ft];if(n.compat){const o=n.compat.find(a=>{var u;return a.default&&((u=a.test)==null?void 0:u.test(r))})??n[ft];if(l.tag!==o.tag){const a=t.tagString(l.tag),u=t.tagString(o.tag),m=`Value may be parsed as either ${a} or ${u}`;i(s,"TAG_RESOLVE_FAILED",m,!0)}}return l}function F0(e,t,n){if(t){n===null&&(n=t.length);for(let r=n-1;r>=0;--r){let s=t[r];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++r];(s==null?void 0:s.type)==="space";)e+=s.source.length,s=t[++r];break}}return e}const z0={composeNode:hp,composeEmptyNode:uu};function hp(e,t,n,r){const s=e.atKey,{spaceBefore:i,comment:l,anchor:o,tag:a}=n;let u,m=!0;switch(t.type){case"alias":u=U0(e,t,r),(o||a)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=dp(e,t,a,r),o&&(u.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":u=O0(z0,e,t,n,r),o&&(u.anchor=o.source.substring(1));break;default:{const f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",f),u=uu(e,t.offset,void 0,null,n,r),m=!1}}return o&&u.anchor===""&&r(o,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!z(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&r(a??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(u.spaceBefore=!0),l&&(t.type==="scalar"&&t.source===""?u.comment=l:u.commentBefore=l),e.options.keepSourceTokens&&m&&(u.srcToken=t),u}function uu(e,t,n,r,{spaceBefore:s,comment:i,anchor:l,tag:o,end:a},u){const m={type:"scalar",offset:F0(t,n,r),indent:-1,source:""},f=dp(e,m,o,u);return l&&(f.anchor=l.source.substring(1),f.anchor===""&&u(l,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=a),f}function U0({options:e},{offset:t,source:n,end:r},s){const i=new il(n.substring(1));i.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const l=t+n.length,o=vs(r,l,e.strict,s);return i.range=[t,l,o.offset],o.comment&&(i.comment=o.comment),i}function V0(e,t,{offset:n,start:r,value:s,end:i},l){const o=Object.assign({_directives:t},e),a=new mr(void 0,o),u={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},m=sr(r,{indicator:"doc-start",next:s??(i==null?void 0:i[0]),offset:n,onError:l,parentIndent:0,startOnNewline:!0});m.found&&(a.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!m.hasNewline&&l(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=s?hp(u,s,m,l):uu(u,m.end,r,null,m,l);const f=a.contents.range[2],p=vs(i,f,!1,l);return p.comment&&(a.comment=p.comment),a.range=[n,f,p.offset],a}function Lr(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function bc(e){var s;let t="",n=!1,r=!1;for(let i=0;i{const l=Lr(n);i?this.warnings.push(new op(l,r,s)):this.errors.push(new ln(l,r,s))},this.directives=new Ee({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:s}=bc(this.prelude);if(r){const i=t.contents;if(n)t.comment=t.comment?`${t.comment} -${r}`:r;else if(s||t.directives.docStart||!i)t.commentBefore=r;else if(Q(i)&&!i.flow&&i.items.length>0){let l=i.items[0];H(l)&&(l=l.key);const o=l.commentBefore;l.commentBefore=o?`${r} -${o}`:r}else{const l=i.commentBefore;i.commentBefore=l?`${r} -${l}`:r}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:bc(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(const s of t)yield*this.next(s);yield*this.end(n,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,r,s)=>{const i=Lr(t);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",r,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=V0(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new ln(Lr(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new ln(Lr(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=vs(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r} -${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new ln(Lr(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),s=new mr(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}function K0(e,t=!0,n){if(e){const r=(s,i,l)=>{const o=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(o,i,l);else throw new ln([o,o+1],i,l)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return cp(e,t,r);case"block-scalar":return up({options:{strict:t}},e,r)}}return null}function W0(e,t){const{implicitKey:n=!1,indent:r,inFlow:s=!1,offset:i=-1,type:l="PLAIN"}=t,o=gs({type:l,value:e},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),a=t.end??[{type:"newline",offset:-1,indent:r,source:` -`}];switch(o[0]){case"|":case">":{const u=o.indexOf(` -`),m=o.substring(0,u),f=o.substring(u+1)+` -`,p=[{type:"block-scalar-header",offset:i,indent:r,source:m}];return pp(p,a)||p.push({type:"newline",offset:-1,indent:r,source:` -`}),{type:"block-scalar",offset:i,indent:r,props:p,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:r,source:o,end:a};case"'":return{type:"single-quoted-scalar",offset:i,indent:r,source:o,end:a};default:return{type:"scalar",offset:i,indent:r,source:o,end:a}}}function H0(e,t,n={}){let{afterKey:r=!1,implicitKey:s=!1,inFlow:i=!1,type:l}=n,o="indent"in e?e.indent:null;if(r&&typeof o=="number"&&(o+=2),!l)switch(e.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const u=e.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const a=gs({type:l,value:t},{implicitKey:s||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(a[0]){case"|":case">":q0(e,a);break;case'"':Xl(e,a,"double-quoted-scalar");break;case"'":Xl(e,a,"single-quoted-scalar");break;default:Xl(e,a,"scalar")}}function q0(e,t){const n=t.indexOf(` -`),r=t.substring(0,n),s=t.substring(n+1)+` -`;if(e.type==="block-scalar"){const i=e.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=r,e.source=s}else{const{offset:i}=e,l="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:i,indent:l,source:r}];pp(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:l,source:` -`});for(const a of Object.keys(e))a!=="type"&&a!=="offset"&&delete e[a];Object.assign(e,{type:"block-scalar",indent:l,props:o,source:s})}}function pp(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function Xl(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let s=t.length;e.props[0].type==="block-scalar-header"&&(s-=e.props[0].source.length);for(const i of r)i.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:` -`};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const r="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(const i of Object.keys(e))i!=="type"&&i!=="offset"&&delete e[i];Object.assign(e,{type:n,indent:r,source:t,end:s})}}}const Q0=e=>"type"in e?bi(e):ui(e);function bi(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=bi(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=ui(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=ui(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=ui(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function ui({start:e,key:t,sep:n,value:r}){let s="";for(const i of e)s+=i.source;if(t&&(s+=bi(t)),n)for(const i of n)s+=i.source;return r&&(s+=bi(r)),s}const ta=Symbol("break visit"),Y0=Symbol("skip children"),mp=Symbol("remove item");function mn(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),gp(Object.freeze([]),e,t)}mn.BREAK=ta;mn.SKIP=Y0;mn.REMOVE=mp;mn.itemAtPath=(e,t)=>{let n=e;for(const[r,s]of t){const i=n==null?void 0:n[r];if(i&&"items"in i)n=i.items[s];else return}return n};mn.parentCollection=(e,t)=>{const n=mn.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],s=n==null?void 0:n[r];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function gp(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const s of["key","value"]){const i=t[s];if(i&&"items"in i){for(let l=0;l!!e&&"items"in e,G0=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function X0(e){switch(e){case ml:return"";case gl:return"";case yl:return"";case us:return"";default:return JSON.stringify(e)}}function yp(e){switch(e){case ml:return"byte-order-mark";case gl:return"doc-mode";case yl:return"flow-error-end";case us:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` -`:case`\r -`: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(e[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 Z0=Object.freeze(Object.defineProperty({__proto__:null,BOM:ml,DOCUMENT:gl,FLOW_END:yl,SCALAR:us,createScalarToken:W0,isCollection:J0,isScalar:G0,prettyToken:X0,resolveAsScalar:K0,setScalarValue:H0,stringify:Q0,tokenType:yp,visit:mn},Symbol.toStringTag,{value:"Module"}));function Ge(e){switch(e){case void 0:case" ":case` -`:case"\r":case" ":return!0;default:return!1}}const Bc=new Set("0123456789ABCDEFabcdef"),e1=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),zs=new Set(",[]{}"),t1=new Set(` ,[]{} -\r `),Zl=e=>!e||t1.has(e);class vp{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(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===` -`?!0:n==="\r"?this.buffer[t+1]===` -`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const s=this.buffer[r+t+1];if(s===` -`||!s&&!this.atEnd)return t+r+1}return n===` -`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&Ge(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!Ge(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ge(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);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(Zl),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Ge(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case` -`:t=i,n=0;break;case"\r":{const l=this.buffer[i+1];if(!l&&!this.atEnd)return this.setNext("block-scalar");if(l===` -`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const i=this.continueScalar(t+1);if(i===-1)break;t=this.buffer.indexOf(` -`,i)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===` -`;)r=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let i=t-1,l=this.buffer[i];l==="\r"&&(l=this.buffer[--i]);const o=i;for(;l===" ";)l=this.buffer[--i];if(l===` -`&&i>=this.pos&&i+1+n>o)t=i;else break}while(!0);return yield us,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){const i=this.buffer[r+1];if(Ge(i)||t&&zs.has(i))break;n=r}else if(Ge(s)){let i=this.buffer[r+1];if(s==="\r"&&(i===` -`?(r+=1,s=` -`,i=this.buffer[r+1]):n=r),i==="#"||t&&zs.has(i))break;if(s===` -`){const l=this.continueScalar(r+1);if(l===-1)break;r=Math.max(r,l-2)}}else{if(t&&zs.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield us,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Zl))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Ge(n)||t&&zs.has(n))return t?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 t=this.pos+2,n=this.buffer[t];for(;!Ge(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(e1.has(n))n=this.buffer[++t];else if(n==="%"&&Bc.has(this.buffer[t+1])&&Bc.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===` -`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===` -`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||t&&r===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class wp{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n>1;this.lineStarts[i]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function zc(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!Zt(t.start,"explicit-key-ind")&&!Zt(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,Sp(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class fu{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new vp,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=yp(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t}),this.offset+=t.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 t=this.peek(1);if(this.type==="doc-end"&&(!t||t.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(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&zc(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Fc(s.start)===-1&&(n.indent===0||s.start.every(i=>i.type!=="comment"||i.indent=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,i=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let l=[];if(i&&n.sep&&!n.value){const o=[];for(let a=0;at.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(l=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||n.value?(l.push(this.sourceToken),t.items.push({start:l}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):i||n.value?(l.push(this.sourceToken),t.items.push({start:l,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(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Zt(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]});else if(Sp(n.key)&&!Zt(n.sep,"newline")){const o=En(n.start),a=n.key,u=n.sep;u.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:u}]})}else l.length>0?n.sep=n.sep.concat(l,this.sourceToken):n.sep.push(this.sourceToken);else if(Zt(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=En(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||i?t.items.push({start:l,key:null,sep:[this.sourceToken]}):Zt(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||n.value?(t.items.push({start:l,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(t);if(o){s&&o.type!=="block-seq"&&t.items.push({start:l}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,i=Array.isArray(s)?s[s.length-1]:void 0;(i==null?void 0:i.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],i=(r=s==null?void 0:s.value)==null?void 0:r.end;if(Array.isArray(i)){Array.prototype.push.apply(i,n.start),i.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||Zt(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const s=Us(r),i=En(s);zc(t);const l=t.end.splice(1,t.end.length);l.push(this.sourceToken);const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:l}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(` -`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(` -`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){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 n=Us(t),r=En(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Us(t),r=En(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){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:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function kp(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new wp||null,prettyErrors:t}}function n1(e,t={}){const{lineCounter:n,prettyErrors:r}=kp(t),s=new fu(n==null?void 0:n.addNewLine),i=new cu(t),l=Array.from(i.compose(s.parse(e)));if(r&&n)for(const o of l)o.errors.forEach(Di(e,n)),o.warnings.forEach(Di(e,n));return l.length>0?l:Object.assign([],{empty:!0},i.streamInfo())}function Ep(e,t={}){const{lineCounter:n,prettyErrors:r}=kp(t),s=new fu(n==null?void 0:n.addNewLine),i=new cu(t);let l=null;for(const o of i.compose(s.parse(e),!0,e.length))if(!l)l=o;else if(l.options.logLevel!=="silent"){l.errors.push(new ln(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(l.errors.forEach(Di(e,n)),l.warnings.forEach(Di(e,n))),l}function r1(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=Ep(e,n);if(!s)return null;if(s.warnings.forEach(i=>Uh(s.options.logLevel,i)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:r},n))}function s1(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return wn(e)&&!r?e.toString(n):new mr(e,r,n).toString(n)}const i1=Object.freeze(Object.defineProperty({__proto__:null,Alias:il,CST:Z0,Composer:cu,Document:mr,Lexer:vp,LineCounter:wp,Pair:we,Parser:fu,Scalar:P,Schema:pl,YAMLError:au,YAMLMap:Re,YAMLParseError:ln,YAMLSeq:Kt,YAMLWarning:op,isAlias:vn,isCollection:Q,isDocument:wn,isMap:fr,isNode:J,isPair:H,isScalar:z,isSeq:dr,parse:r1,parseAllDocuments:n1,parseDocument:Ep,stringify:s1,visit:Vt,visitAsync:sl},Symbol.toStringTag,{value:"Module"}));function l1(e,t,n={}){var p;const r=new e.LineCounter,s={keepSourceTokens:!0,lineCounter:r,...n},i=e.parseDocument(t,s),l=[],o=g=>[r.linePos(g[0]),r.linePos(g[1])],a=g=>{l.push({message:g.message,range:[r.linePos(g.pos[0]),r.linePos(g.pos[1])]})},u=(g,w)=>{for(const h of w.items){if(h instanceof e.Scalar&&typeof h.value=="string"){const c=Bi.parse(h,s,l);c&&(g.children=g.children||[],g.children.push(c));continue}if(h instanceof e.YAMLMap){m(g,h);continue}l.push({message:"Sequence items should be strings or maps",range:o(h.range||w.range)})}},m=(g,w)=>{for(const h of w.items){if(g.children=g.children||[],!(h.key instanceof e.Scalar&&typeof h.key.value=="string")){l.push({message:"Only string keys are supported",range:o(h.key.range||w.range)});continue}const d=h.key,c=h.value;if(d.value==="text"){if(!(c instanceof e.Scalar&&typeof c.value=="string")){l.push({message:"Text value should be a string",range:o(h.value.range||w.range)});continue}g.children.push({kind:"text",text:Uc(c.value)});continue}const y=Bi.parse(d,s,l);if(!y)continue;if(c instanceof e.Scalar){const k=typeof c.value;if(k!=="string"&&k!=="number"&&k!=="boolean"){l.push({message:"Node value should be a string or a sequence",range:o(h.value.range||w.range)});continue}g.children.push({...y,children:[{kind:"text",text:Uc(String(c.value))}]});continue}if(c instanceof e.YAMLSeq){g.children.push(y),u(y,c);continue}l.push({message:"Map values should be strings or sequences",range:o(h.value.range||w.range)})}},f={kind:"role",role:"fragment"};return i.errors.forEach(a),l.length?{errors:l,fragment:f}:(i.contents instanceof e.YAMLSeq||l.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:i.contents?o(i.contents.range):[{line:0,col:0},{line:0,col:0}]}),l.length?{errors:l,fragment:f}:(u(f,i.contents),l.length?{errors:l,fragment:o1}:((p=f.children)==null?void 0:p.length)===1?{fragment:f.children[0],errors:l}:{fragment:f,errors:l}))}const o1={kind:"role",role:"fragment"};function Np(e){return e.replace(/[\r\n\s\t]+/g," ").trim()}function Uc(e){return e.startsWith("/")&&e.endsWith("/")&&e.length>1?{pattern:e.slice(1,-1)}:Np(e)}class Bi{static parse(t,n,r){try{return new Bi(t.value)._parse()}catch(s){if(s instanceof Vc){const i=n.prettyErrors===!1?s.message:s.message+`: - -`+t.value+` -`+" ".repeat(s.pos)+`^ -`;return r.push({message:i,range:[n.lineCounter.linePos(t.range[0]),n.lineCounter.linePos(t.range[0]+s.pos)]}),null}throw s}}constructor(t){this._input=t,this._pos=0,this._length=t.length}_peek(){return this._input[this._pos]||""}_next(){return this._pos=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(t){this._eof()&&this._throwError(`Unexpected end of input when expecting ${t}`);const n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let t="",n=!1;for(;!this._eof();){const r=this._next();if(n)t+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return t;t+=r}}this._throwError("Unterminated string")}_throwError(t,n=0){throw new Vc(t,n||this._pos)}_readRegex(){let t="",n=!1,r=!1;for(;!this._eof();){const s=this._next();if(n)t+=s,n=!1;else if(s==="\\")n=!0,t+=s;else{if(s==="/"&&!r)return{pattern:t};s==="["?(r=!0,t+=s):s==="]"&&r?(t+=s,r=!1):t+=s}}this._throwError("Unterminated regex")}_readStringOrRegex(){const t=this._peek();return t==='"'?(this._next(),Np(this._readString())):t==="/"?(this._next(),this._readRegex()):null}_readAttributes(t){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let s="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)s+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(t,r,s||"true",n)}}_parse(){this._skipWhitespace();const t=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:t,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(t,n,r,s){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',s),t.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',s),t.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',s),t.expanded=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',s),t.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',s),t.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',s),t.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,s)}_assert(t,n,r){t||this._throwError(n||"Assertion error",r)}}class Vc extends Error{constructor(t,n){super(t),this.pos=n}}const a1=({sources:e,paused:t,log:n,mode:r})=>{var x;const[s,i]=B.useState(),[l,o]=B.useState(),[a,u]=eo("recorderPropertiesTab","log"),[m,f]=B.useState(),[p,g]=B.useState(),w=s||l||((x=e[0])==null?void 0:x.id),h=B.useMemo(()=>{if(w){const k=e.find(T=>T.id===w);if(k)return k}return wy()},[e,w]),[v,d]=B.useState("");window.playwrightElementPicked=(k,T)=>{const N=h.language;d(Oh(N,k.selector)),f(k.ariaSnapshot),g([]),T&&a!=="locator"&&a!=="aria"&&u("locator"),r==="inspecting"&&a==="aria"||window.dispatch({event:"setMode",params:{mode:r==="inspecting"?"standby":"recording"}}).catch(()=>{})},window.playwrightSetRunningFile=o;const c=B.useRef(null);B.useLayoutEffect(()=>{var k;(k=c.current)==null||k.scrollIntoView({block:"center",inline:"nearest"})},[c]),B.useEffect(()=>{const k=T=>{switch(T.key){case"F8":T.preventDefault(),t?window.dispatch({event:"resume"}):window.dispatch({event:"pause"});break;case"F10":T.preventDefault(),t&&window.dispatch({event:"step"});break}};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[t]);const y=B.useCallback(k=>{(r==="none"||r==="inspecting")&&window.dispatch({event:"setMode",params:{mode:"standby"}}),d(k),window.dispatch({event:"highlightRequested",params:{selector:k}})},[r]),S=B.useCallback(k=>{(r==="none"||r==="inspecting")&&window.dispatch({event:"setMode",params:{mode:"standby"}});const{fragment:T,errors:N}=l1(i1,k,{prettyErrors:!1}),E=N.map(O=>({message:O.message,line:O.range[1].line,column:O.range[1].col,type:"subtle-error"}));g(E),f(k),N.length||window.dispatch({event:"highlightRequested",params:{ariaTemplate:T}})},[r]);return L.jsxs("div",{className:"recorder",children:[L.jsxs(lh,{children:[L.jsx(Me,{icon:"circle-large-filled",title:"Record",toggled:r==="recording"||r==="recording-inspecting"||r==="assertingText"||r==="assertingVisibility",onClick:()=>{window.dispatch({event:"setMode",params:{mode:r==="none"||r==="standby"||r==="inspecting"?"recording":"standby"}})},children:"Record"}),L.jsx(_c,{}),L.jsx(Me,{icon:"inspect",title:"Pick locator",toggled:r==="inspecting"||r==="recording-inspecting",onClick:()=>{const k={inspecting:"standby",none:"inspecting",standby:"inspecting",recording:"recording-inspecting","recording-inspecting":"recording",assertingText:"recording-inspecting",assertingVisibility:"recording-inspecting",assertingValue:"recording-inspecting",assertingSnapshot:"recording-inspecting"}[r];window.dispatch({event:"setMode",params:{mode:k}}).catch(()=>{})}}),L.jsx(Me,{icon:"eye",title:"Assert visibility",toggled:r==="assertingVisibility",disabled:r==="none"||r==="standby"||r==="inspecting",onClick:()=>{window.dispatch({event:"setMode",params:{mode:r==="assertingVisibility"?"recording":"assertingVisibility"}})}}),L.jsx(Me,{icon:"whole-word",title:"Assert text",toggled:r==="assertingText",disabled:r==="none"||r==="standby"||r==="inspecting",onClick:()=>{window.dispatch({event:"setMode",params:{mode:r==="assertingText"?"recording":"assertingText"}})}}),L.jsx(Me,{icon:"symbol-constant",title:"Assert value",toggled:r==="assertingValue",disabled:r==="none"||r==="standby"||r==="inspecting",onClick:()=>{window.dispatch({event:"setMode",params:{mode:r==="assertingValue"?"recording":"assertingValue"}})}}),L.jsx(Me,{icon:"gist",title:"Assert snapshot",toggled:r==="assertingSnapshot",disabled:r==="none"||r==="standby"||r==="inspecting",onClick:()=>{window.dispatch({event:"setMode",params:{mode:r==="assertingSnapshot"?"recording":"assertingSnapshot"}})}}),L.jsx(_c,{}),L.jsx(Me,{icon:"files",title:"Copy",disabled:!h||!h.text,onClick:()=>{mu(h.text)}}),L.jsx(Me,{icon:"debug-continue",title:"Resume (F8)",ariaLabel:"Resume",disabled:!t,onClick:()=>{window.dispatch({event:"resume"})}}),L.jsx(Me,{icon:"debug-pause",title:"Pause (F8)",ariaLabel:"Pause",disabled:t,onClick:()=>{window.dispatch({event:"pause"})}}),L.jsx(Me,{icon:"debug-step-over",title:"Step over (F10)",ariaLabel:"Step over",disabled:!t,onClick:()=>{window.dispatch({event:"step"})}}),L.jsx("div",{style:{flex:"auto"}}),L.jsx("div",{children:"Target:"}),L.jsx(yy,{fileId:w,sources:e,setFileId:k=>{i(k),window.dispatch({event:"fileChanged",params:{file:k}})}}),L.jsx(Me,{icon:"clear-all",title:"Clear",disabled:!h||!h.text,onClick:()=>{window.dispatch({event:"clear"})}}),L.jsx(Me,{icon:"color-mode",title:"Toggle color mode",toggled:!1,onClick:()=>Gp()})]}),L.jsx(py,{sidebarSize:200,main:L.jsx(Wl,{text:h.text,language:h.language,highlight:h.highlight,revealLine:h.revealLine,readOnly:!0,lineNumbers:!0}),sidebar:L.jsx(my,{rightToolbar:a==="locator"||a==="aria"?[L.jsx(Me,{icon:"files",title:"Copy",onClick:()=>mu((a==="locator"?v:m)||"")},1)]:[],tabs:[{id:"locator",title:"Locator",render:()=>L.jsx(Wl,{text:v,placeholder:"Type locator to inspect",language:h.language,focusOnChange:!0,onChange:y,wrapLines:!0})},{id:"log",title:"Log",render:()=>L.jsx(Qy,{language:h.language,log:Array.from(n.values())})},{id:"aria",title:"Aria",render:()=>L.jsx(Wl,{text:m||"",placeholder:"Type aria template to match",language:"yaml",onChange:S,highlight:p,wrapLines:!0})}],selectedTab:a,setSelectedTab:u})})]})},u1=({})=>{const[e,t]=B.useState([]),[n,r]=B.useState(!1),[s,i]=B.useState(new Map),[l,o]=B.useState("none");return window.playwrightSetMode=o,window.playwrightSetSources=B.useCallback(a=>{t(a),window.playwrightSourcesEchoForTest=a},[]),window.playwrightSetPaused=r,window.playwrightUpdateLogs=a=>{i(u=>{const m=new Map(u);for(const f of a)f.reveal=!u.has(f.id),m.set(f.id,f);return m})},L.jsx(a1,{sources:e,paused:n,log:s,mode:l})};(async()=>(Yp(),ih(document.querySelector("#root")).render(L.jsx(u1,{}))))();export{c1 as c,xp as g}; diff --git a/tvapp2/node_modules/playwright-core/lib/vite/recorder/index.html b/tvapp2/node_modules/playwright-core/lib/vite/recorder/index.html index 79d0d7b5..fd4e728b 100755 --- a/tvapp2/node_modules/playwright-core/lib/vite/recorder/index.html +++ b/tvapp2/node_modules/playwright-core/lib/vite/recorder/index.html @@ -20,7 +20,7 @@ Playwright Inspector - + diff --git a/tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-CyuxU5C-.js b/tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-CyuxU5C-.js deleted file mode 100755 index e4b7c8c6..00000000 --- a/tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-CyuxU5C-.js +++ /dev/null @@ -1,24 +0,0 @@ -import{n as bu,o as ku}from"./defaultSettingsView-5nVJRt0A.js";var ya={exports:{}};(function(Et,zt){(function(C,De){Et.exports=De()})(ku,function(){var C=navigator.userAgent,De=navigator.platform,I=/gecko\/\d/i.test(C),K=/MSIE \d/.test(C),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),V=/Edge\/(\d+)/.exec(C),b=K||$||V,N=b&&(K?document.documentMode||6:+(V||$)[1]),_=!V&&/WebKit\//.test(C),ie=_&&/Qt\/\d+\.\d+/.test(C),O=!V&&/Chrome\/(\d+)/.exec(C),q=O&&+O[1],z=/Opera\//.test(C),X=/Apple Computer/.test(navigator.vendor),ke=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),we=/PhantomJS/.test(C),te=X&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),re=/Android/.test(C),ne=te||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),se=te||/Mac/.test(De),Ae=/\bCrOS\b/.test(C),ye=/win/i.test(De),de=z&&C.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(z=!1,_=!0);var ze=se&&(ie||z&&(de==null||de<12.11)),fe=I||b&&N>=9;function H(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=H(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return D(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(ge(Ue)+" ");return Ue[e]}function ge(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Ie.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&ae(e)?!0:t.test(e):ae(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Me(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Lt(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var vi=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,v){this.level=u,this.from=h,this.to=v}return function(u,h){var v=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var k=u.length,x=[],M=0;M-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Qt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Bt(e){e.prototype.on=function(t,n){ve(this,t,n)},e.prototype.off=function(t,n){dt(this,t,n)}}function ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Nr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){ht(e),Nr(e)}function ln(e){return e.target||e.srcElement}function Wt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),se&&e.ctrlKey&&t==1&&(t=3),t}var mi=function(){if(b&&N<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),Or;function Wn(e){if(Or==null){var t=d("span","​");J(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&N<8))}var n=Or?d("span","​"):d("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=J(e,document.createTextNode("AخA")),n=w(t,0,1).getBoundingClientRect(),r=w(t,1,2).getBoundingClientRect();return D(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var Pt=` - -b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(` -`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},_n=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function yi(e){if(_t!=null)return _t;var t=J(e,d("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return _t=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=F(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.post},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?L(n,ce(e,n).text.length):ka(t,ce(e,t.line).text.length)}function ka(e,t){var n=e.ch;return n==null||n>t?L(e.line,t):n<0?L(e.line,0):e}function po(e,t){for(var n=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Xt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xt.fromSaved=function(e,t,n){return t instanceof Hn?new Xt(e,Gt(e.mode,t.state),n,t.lookAhead):new Xt(e,Gt(e.mode,t),n)},Xt.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hn(t,this.maxLookAhead):t};function go(e,t,n,r){var i=[e.state.modeGen],o={};ko(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var h=e.state.overlays[u],v=1,k=0;n.state=!0,ko(e,t.text,h.mode,n,function(x,M){for(var E=v;kx&&i.splice(v,1,x,i[v+1],R),v+=2,k=Math.min(x,R)}if(M)if(h.opaque)i.splice(E,v-E,x,"overlay "+M),v=E+2;else for(;Ee.options.maxHighlightLength&&Gt(e.doc.mode,r.state),o=go(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Xt(r,!0,t);var o=wa(e,t,n),l=o>r.first&&ce(r,o-1).stateAfter,a=l?Xt.fromSaved(r,l,o):new Xt(r,Wr(r.mode),o);return r.iter(o,t,function(s){xi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&ut.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var yo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function xo(e,t,n,r){var i=e.doc,o=i.mode,l;t=Ce(i,t);var a=ce(i,t.line),s=fn(e,t.line,n),u=new Je(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pose.options.maxHighlightLength?(a=!1,l&&xi(e,t,r,h.pos),h.pos=t.length,v=null):v=bo(bi(n,h,r.state,k),o),k){var x=k[0].name;x&&(v="m-"+(v?x+" "+v:x))}if(!a||u!=v){for(;sl;--a){if(a<=o.first)return o.first;var s=ce(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof Hn?u.lookAhead:0)<=o.modeFrontier))return a;var h=Le(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=a-1,r=h)}return i}function Sa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=ce(e,r).stateAfter;if(i&&(!(i instanceof Hn)||r+i.lookAhead=t:o.to>t);(r||(r=[])).push(new Rn(l,o.from,s?null:o.to))}}return r}function Fa(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var ee=0;ee0)){var h=[s,1],v=Z(u.from,a.from),k=Z(u.to,a.to);(v<0||!l.inclusiveLeft&&!v)&&h.push({from:u.from,to:a.from}),(k>0||!l.inclusiveRight&&!k)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function To(e){var t=e.markedSpans;if(t){for(var n=0;nt)&&(!r||wi(r,o.marker)<0)&&(r=o.marker)}return r}function Mo(e,t,n,r,i){var o=ce(e,t),l=$t&&o.markedSpans;if(l)for(var a=0;a=0&&v<=0||h<=0&&v>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.to,n)>=0:Z(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.from,r)<=0:Z(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Do(e);)e=t.find(-1,!0).line;return e}function Na(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function Oa(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Si(e,t){var n=ce(e,t),r=qt(n);return n==r?t:f(r)}function Fo(e,t){if(t>e.lastLine())return t;var n=ce(e,t),r;if(!cr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function cr(e,t){var n=$t&&t.markedSpans;if(n){for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Hr=function(e,t,n){this.text=e,Lo(this,t),this.height=n?n(this):1};Hr.prototype.lineNo=function(){return f(this)},Bt(Hr);function Pa(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),To(e),Lo(e,n);var i=r?r(e):1;i!=e.height&&Ft(e,i)}function Ia(e){e.parent=null,To(e)}var za={},Ba={};function Ao(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Ba:za;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Eo(e,t){var n=S("span",null,null,_?"padding-right: .1px":null),r={pre:S("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=_a,sr(e.display.measure)&&(l=We(o,e.doc.direction))&&(r.addToken=Ra(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);qa(o,r,vo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=le(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=le(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Wn(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(_){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=le(r.pre.className,r.textClass||"")),r}function Wa(e){var t=d("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function _a(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?Ha(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),b&&N<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var k=s.exec(t),x=k?k.index-v:t.length-v;if(x){var M=document.createTextNode(a.slice(v,v+x));b&&N<9?h.appendChild(d("span",[M])):h.appendChild(M),e.map.push(e.pos,e.pos+x,M),e.col+=x,e.pos+=x}if(!k)break;v+=x+1;var E=void 0;if(k[0]==" "){var R=e.cm.options.tabSize,U=R-e.col%R;E=h.appendChild(d("span",et(U),"cm-tab")),E.setAttribute("role","presentation"),E.setAttribute("cm-text"," "),e.col+=U}else k[0]=="\r"||k[0]==` -`?(E=h.appendChild(d("span",k[0]=="\r"?"␍":"␤","cm-invalidchar")),E.setAttribute("cm-text",k[0]),e.col+=1):(E=e.cm.options.specialCharPlaceholder(k[0]),E.setAttribute("cm-text",k[0]),b&&N<9?h.appendChild(d("span",[E])):h.appendChild(E),e.col+=1);e.map.push(e.pos,e.pos+1,E),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var Q=n||"";r&&(Q+=r),i&&(Q+=i);var G=d("span",[h],Q,o);if(l)for(var ee in l)l.hasOwnProperty(ee)&&ee!="style"&&ee!="class"&&G.setAttribute(ee,l[ee]);return e.content.appendChild(G)}e.content.appendChild(h)}}function Ha(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;iu&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function No(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function qa(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;ls||Fe.collapsed&&pe.to==s&&pe.from==s)){if(pe.to!=null&&pe.to!=s&&x>pe.to&&(x=pe.to,E=""),Fe.className&&(M+=" "+Fe.className),Fe.css&&(k=(k?k+";":"")+Fe.css),Fe.startStyle&&pe.from==s&&(R+=" "+Fe.startStyle),Fe.endStyle&&pe.to==x&&(ee||(ee=[])).push(Fe.endStyle,pe.to),Fe.title&&((Q||(Q={})).title=Fe.title),Fe.attributes)for(var Ke in Fe.attributes)(Q||(Q={}))[Ke]=Fe.attributes[Ke];Fe.collapsed&&(!U||wi(U.marker,Fe)<0)&&(U=pe)}else pe.from>s&&x>pe.from&&(x=pe.from)}if(ee)for(var st=0;st=a)break;for(var Mt=Math.min(a,x);;){if(h){var wt=s+h.length;if(!U){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+M:M,R,s+tt.length==x?E:"",k,Q)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,R=""}h=i.slice(o,o=n[u++]),v=Ao(n[u++],t.cm.options)}}}function Oo(e,t,n){this.line=t,this.rest=Oa(t),this.size=this.rest?f(ge(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ho(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function $a(e,t){t=qt(t);var n=f(t),r=e.display.externalMeasured=new Oo(e.doc,t,n);r.lineN=n;var i=r.built=Eo(e,r);return r.text=i.pre,J(e.display.lineMeasure,i.pre),r}function Ro(e,t,n,r){return Zt(e,qr(e,t),n,r)}function Fi(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=s-a,i=o-1,t>=s&&(l="right")),i!=null){if(r=e[u+2],a==s&&n==(r.insertLeft?"left":"right")&&(l=n),n=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[(u-=3)+2],l="left";if(n=="right"&&i==s-a)for(;u=0&&(n=e[i]).left==n.right;i--);return n}function ts(e,t,n,r){var i=jo(t.map,n,r),o=i.node,l=i.start,a=i.end,s=i.collapse,u;if(o.nodeType==3){for(var h=0;h<4;h++){for(;l&&Me(t.line.text.charAt(i.coverStart+l));)--l;for(;i.coverStart+a0&&(s=r="right");var v;e.options.lineWrapping&&(v=o.getClientRects()).length>1?u=v[r=="right"?v.length-1:0]:u=o.getBoundingClientRect()}if(b&&N<9&&!l&&(!u||!u.left&&!u.right)){var k=o.parentNode.getClientRects()[0];k?u={left:k.left,right:k.left+Kr(e.display),top:k.top,bottom:k.bottom}:u=qo}for(var x=u.top-t.rect.top,M=u.bottom-t.rect.top,E=(x+M)/2,R=t.view.measure.heights,U=0;U=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l(u=="before"?s-1:s,u=="before");function h(M,E,R){var U=a[E],Q=U.level==1;return l(R?M-1:M,Q!=R)}var v=lr(a,s,u),k=br,x=h(s,v,u=="before");return k!=null&&(x.other=h(s,k,u!="before")),x}function Zo(e,t){var n=0;t=Ce(e.doc,t),e.options.lineWrapping||(n=Kr(e.display)*t.ch);var r=ce(e.doc,t.line),i=er(r)+Xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ei(e,t,n,r,i){var o=L(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Ni(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ei(r.first,0,null,-1,-1);var i=g(r,n),o=r.first+r.size-1;if(i>o)return Ei(r.first+r.size-1,ce(r,o).text.length,null,1,1);t<0&&(t=0);for(var l=ce(r,i);;){var a=ns(e,l,i,t,n),s=Ea(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=ce(r,i=u.line)}}function Jo(e,t,n,r){r-=Ai(t);var i=t.text.length,o=Nt(function(l){return Zt(e,n,l-1).bottom<=r},i,0);return i=Nt(function(l){return Zt(e,n,l).top>r},o,i),{begin:o,end:i}}function Qo(e,t,n,r){n||(n=qr(e,t));var i=Yn(e,t,Zt(e,n,r),"line").top;return Jo(e,t,n,i)}function Oi(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function ns(e,t,n,r,i){i-=er(t);var o=qr(e,t),l=Ai(t),a=0,s=t.text.length,u=!0,h=We(t,e.doc.direction);if(h){var v=(e.options.lineWrapping?os:is)(e,t,n,o,h,r,i);u=v.level!=1,a=u?v.from:v.to-1,s=u?v.to:v.from-1}var k=null,x=null,M=Nt(function(me){var pe=Zt(e,o,me);return pe.top+=l,pe.bottom+=l,Oi(pe,r,i,!1)?(pe.top<=i&&pe.left<=r&&(k=me,x=pe),!0):!1},a,s),E,R,U=!1;if(x){var Q=r-x.left=ee.bottom?1:0}return M=Lt(t.text,M,1),Ei(n,M,R,U,r-E)}function is(e,t,n,r,i,o,l){var a=Nt(function(v){var k=i[v],x=k.level!=1;return Oi(jt(e,L(n,x?k.to:k.from,x?"before":"after"),"line",t,r),o,l,!0)},0,i.length-1),s=i[a];if(a>0){var u=s.level!=1,h=jt(e,L(n,u?s.from:s.to,u?"after":"before"),"line",t,r);Oi(h,o,l,!0)&&h.top>l&&(s=i[a-1])}return s}function os(e,t,n,r,i,o,l){var a=Jo(e,t,r,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var h=null,v=null,k=0;k=u||x.to<=s)){var M=x.level!=1,E=Zt(e,r,M?Math.min(u,x.to)-1:Math.max(s,x.from)).right,R=ER)&&(h=x,v=R)}}return h||(h=i[i.length-1]),h.fromu&&(h={from:h.from,to:u,level:h.level}),h}var Sr;function jr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Sr==null){Sr=d("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Sr.appendChild(document.createTextNode("x")),Sr.appendChild(d("br"));Sr.appendChild(document.createTextNode("x"))}J(e.measure,Sr);var n=Sr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),D(e.measure),n||1}function Kr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=d("span","xxxxxxxxxx"),n=d("pre",[t],"CodeMirror-line-like");J(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Pi(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Ii(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ii(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Vo(e){var t=jr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Kr(e.display)-3);return function(i){if(cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(u=ce(e.doc,s.line).text).length==s.ch){var h=Le(u,u.length,e.options.tabSize)-u.length;s=L(s.line,Math.max(0,Math.round((o-_o(e.display).left)/Kr(e.display))-h))}return s}function Lr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)$t&&Si(e.doc,t)i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var o=Jn(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var l=Jn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hr(e)}else{var a=Jn(e,t,t,-1),s=Jn(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Gn(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):hr(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Lr(e,t)];if(o.node!=null){var l=o.changes||(o.changes=[]);oe(l,n)==-1&&l.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Jn(e,t,n,r){var i=Lr(e,t),o,l=e.display.view;if(!$t||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var a=e.display.viewFrom,s=0;s0){if(i==l.length-1)return null;o=a+l[i].size-t,i++}else o=a-t;t+=o,n+=o}for(;Si(e.doc,n)!=n;){if(i==(r<0?0:l.length-1))return null;n+=r*l[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function ls(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=Gn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Gn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Lr(e,n)))),r.viewTo=n}function $o(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(r.other){var a=n.appendChild(d("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function Qn(e,t){return e.top-t.top||e.left-t.left}function as(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),l=_o(e.display),a=l.left,s=Math.max(r.sizerWidth,wr(e)-r.sizer.offsetLeft)-l.right,u=i.direction=="ltr";function h(G,ee,me,pe){ee<0&&(ee=0),ee=Math.round(ee),pe=Math.round(pe),o.appendChild(d("div",null,"CodeMirror-selected","position: absolute; left: "+G+`px; - top: `+ee+"px; width: "+(me??s-G)+`px; - height: `+(pe-ee)+"px"))}function v(G,ee,me){var pe=ce(i,G),Fe=pe.text.length,Ke,st;function Xe(tt,St){return Zn(e,L(G,tt),"div",pe,St)}function Mt(tt,St,ft){var nt=Qo(e,pe,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(pe.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(pe,i.direction);return or(wt,ee||0,me??Fe,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Tt=Xe(St-1,rt?"right":"left"),nn=ee==null&&tt==0,xr=me==null&&St==Fe,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Tt.top-Qe.top<=3){var ut=(u?nn:xr)&>,fo=(u?xr:nn)&&Jt,ir=ut?a:(rt?Qe:Tt).left,Ar=fo?s:(rt?Tt:Qe).right;h(ir,Qe.top,Ar-ir,Qe.bottom)}else{var Er,mt,on,co;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),co=u&&xr&&Jt?s:Tt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&xr&&Jt?a:Tt.left,co=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function tl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Hi(e))}function _i(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Hi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),_&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Wi(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l.005||x<-.005)&&(ie.display.sizerWidth){var E=Math.ceil(h/Kr(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function rl(e){if(e.widgets)for(var t=0;t=l&&(o=g(t,er(ce(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function ss(e,t){if(!Ze(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!we){var l=d("div","​",null,`position: absolute; - top: `+(t.top-n.viewOffset-Xn(e.display))+`px; - height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px; - left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function us(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?L(t.line,t.ch+1,"before"):t,t=t.ch?L(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=Ri(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(yn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function fs(e,t){var n=Ri(e,t);n.scrollTop!=null&&yn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function Ri(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Mi(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Di(n),s=t.topa-r;if(t.topi+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,x=wr(e)-n.gutters.offsetWidth,M=t.right-t.left>x;return M&&(t.right=t.left+x),t.left<10?l.scrollLeft=0:t.leftx+k-3&&(l.scrollLeft=t.right+(M?0:10)-x),l}function qi(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function cs(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Zo(e,t.from),r=Zo(e,t.to);nl(e,n,r,t.margin)}}function nl(e,t,n,r){var i=Ri(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function yn(e,t){Math.abs(e.doc.scrollTop-t)<2||(I||Ki(e,{top:t}),il(e,t,!0),I&&Ki(e),kn(e,100))}function il(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,ul(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Di(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&N<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dr.prototype.zeroWidthHack=function(){var e=se&&!ke?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new be,this.disableVert=new be},Dr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),o=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Dr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bn=function(){};bn.prototype.update=function(){return{bottom:0,right:0}},bn.prototype.setScrollLeft=function(){},bn.prototype.setScrollTop=function(){},bn.prototype.clear=function(){};function Xr(e,t){t||(t=xn(e));var n=e.display.barWidth,r=e.display.barHeight;ol(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Vn(e),ol(e,xn(e)),n=e.display.barWidth,r=e.display.barHeight}function ol(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var ll={native:Dr,null:bn};function al(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ee(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ll[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ve(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Cr(e,t):yn(e,t)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var ds=0;function Mr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ds,markArrays:null},ja(e.curOp)}function Fr(e){var t=e.curOp;t&&Ua(t,function(n){for(var r=0;r=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ti(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function gs(e){e.updatedDisplay=e.mustUpdate&&ji(e.cm,e.update)}function vs(e){var t=e.cm,n=t.display;e.updatedDisplay&&Vn(t),e.barMeasure=xn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ro(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Yt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-wr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function ms(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var n=+new Date+e.options.workTime,r=fn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Gt(t.mode,r.state):null,s=go(e,o,r,!0);a&&(r.state=a),o.styles=s.styles;var u=o.styleClasses,h=s.classes;h?o.styleClasses=h:u&&(o.styleClasses=null);for(var v=!l||l.length!=o.styles.length||u!=h&&(!u||!h||u.bgClass!=h.bgClass||u.textClass!=h.textClass),k=0;!v&&kn)return kn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Dt(e,function(){for(var o=0;o=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&$o(e)==0)return!1;fl(e)&&(hr(e),t.dims=Pi(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroml&&n.viewTo-l<20&&(l=Math.min(i,n.viewTo)),$t&&(o=Si(e.doc,o),l=Fo(e.doc,l));var a=o!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;ls(e,o,l),n.viewOffset=er(ce(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=$o(e);if(!a&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var u=ks(e);return s>4&&(n.lineDiv.style.display="none"),Ss(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,ws(u),D(n.cursorDiv),D(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,kn(e,400)),n.updateLineNumbers=null,!0}function sl(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==wr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Di(e.display)-Mi(e),n.top)}),t.visible=$n(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=$n(e.display,e.doc,n));if(!ji(e,t))break;Vn(e);var i=xn(e);vn(e),Xr(e,i),Gi(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ki(e,t){var n=new ti(e,t);if(ji(e,n)){Vn(e),sl(e,n);var r=xn(e);vn(e),Xr(e,r),Gi(e,r),n.finish()}}function Ss(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,l=o.firstChild;function a(M){var E=M.nextSibling;return _&&se&&e.display.currentWheelTarget==M?M.style.display="none":M.parentNode.removeChild(M),E}for(var s=r.view,u=r.viewFrom,h=0;h-1&&(x=!1),Po(e,v,u,n)),x&&(D(v.lineNumber),v.lineNumber.appendChild(document.createTextNode(W(e.options,u)))),l=v.node.nextSibling}u+=v.size}for(;l;)l=a(l)}function Ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ot(e,"gutterChanged",e)}function Gi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Yt(e)+"px"}function ul(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Ii(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",l=0;l=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),b&&N<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!_&&!(I&&ne)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Xi(r.gutters,r.lineNumbers),cl(i),n.init(i)}var ri=0,rr=null;b?rr=-.53:I?rr=15:O?rr=-.7:X&&(rr=-1/3);function dl(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function Ls(e){var t=dl(e);return t.x*=rr,t.y*=rr,t}function hl(e,t){O&&q==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=dl(t),r=n.x,i=n.y,o=rr;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,o=1);var l=e.display,a=l.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&se&&_){e:for(var h=t.target,v=l.view;h!=a;h=h.parentNode)for(var k=0;k=0&&Z(e,r.to())<=0)return n}return-1};var He=function(e,t){this.anchor=e,this.head=t};He.prototype.from=function(){return _r(this.anchor,this.head)},He.prototype.to=function(){return xt(this.anchor,this.head)},He.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Kt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(k,x){return Z(k.from(),x.from())}),n=oe(t,i);for(var o=1;o0:s>=0){var u=_r(a.from(),l.from()),h=xt(a.to(),l.to()),v=a.empty()?l.from()==l.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new He(v?h:u,v?u:h))}}return new At(t,n)}function pr(e,t){return new At([new He(e,t||e)],0)}function gr(e){return e.text?L(e.from.line+e.text.length-1,ge(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function pl(e,t){if(Z(e,t.from)<0)return e;if(Z(e,t.to)<=0)return gr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=gr(t).ch-t.to.ch),L(n,r)}function Yi(e,t){for(var n=[],r=0;r1&&e.remove(a.line+1,M-1),e.insert(a.line+1,U)}ot(e,"change",e,t)}function vr(e,t,n){function r(i,o,l){if(i.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges)return e.done.pop(),ge(e.done)}function bl(e,t,n,r){var i=e.history;i.undone.length=0;var o=+new Date,l,a;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=Ms(i,i.lastOp==r)))a=ge(l.changes),Z(t.from,t.to)==0&&Z(t.from,a.to)==0?a.to=gr(t):l.changes.push(Qi(e,t));else{var s=ge(i.done);for((!s||!s.ranges)&&ii(e.sel,i.done),l={changes:[Qi(e,t)],generation:i.generation},i.done.push(l);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ye(e,"historyAdded")}function Fs(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function As(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Fs(e,o,ge(i.done),t))?i.done[i.done.length-1]=t:ii(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&xl(i.undone)}function ii(e,t){var n=ge(t);n&&n.ranges&&n.equals(e)||t.push(e)}function kl(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(l){l.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=l.markedSpans),++o})}function Es(e){if(!e)return null;for(var t,n=0;n-1&&(ge(a)[v]=u[v],delete u[v])}}return r}function Vi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=Z(t,i)<0;o!=Z(n,i)<0?(i=t,t=n):o!=Z(t,n)<0&&(t=n)}return new He(i,t)}else return new He(n||t,t)}function oi(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),pt(e,new At([Vi(e.sel.primary(),t,n,i)],0),r)}function Sl(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(Ye(s,"beforeCursorEnter"),s.explicitlyCleared))if(o.markedSpans){--l;continue}else break;if(!s.atomic)continue;if(n){var v=s.find(r<0?1:-1),k=void 0;if((r<0?h:u)&&(v=Fl(e,v,-r,v&&v.line==t.line?o:null)),v&&v.line==t.line&&(k=Z(v,n))&&(r<0?k<0:k>0))return Zr(e,v,t,r,i)}var x=s.find(r<0?-1:1);return(r<0?u:h)&&(x=Fl(e,x,r,x.line==t.line?o:null)),x?Zr(e,x,t,r,i):null}}return t}function ai(e,t,n,r,i){var o=r||1,l=Zr(e,t,n,o,i)||!i&&Zr(e,t,n,o,!0)||Zr(e,t,n,-o,i)||!i&&Zr(e,t,n,-o,!0);return l||(e.cantEdit=!0,L(e.first,0))}function Fl(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Ce(e,L(t.line-1)):null:n>0&&t.ch==(r||ce(e,t.line)).text.length?t.line=0;--i)Nl(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Nl(e,t)}}function Nl(e,t){if(!(t.text.length==1&&t.text[0]==""&&Z(t.from,t.to)==0)){var n=Yi(e,t);bl(e,t,n,e.cm?e.cm.curOp.id:NaN),Tn(e,t,n,ki(e,t));var r=[];vr(e,function(i,o){!o&&oe(r,i.history)==-1&&(zl(i.history,t),r.push(i.history)),Tn(i,t,null,ki(i,t))})}}function si(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,o,l=e.sel,a=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,u=0;u=0;--x){var M=k(x);if(M)return M.v}}}}function Ol(e,t){if(t!=0&&(e.first+=t,e.sel=new At(Pe(e.sel.ranges,function(i){return new He(L(i.anchor.line+t,i.anchor.ch),L(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){bt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:L(o,ce(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Vt(e,t.from,t.to),n||(n=Yi(e,t)),e.cm?Ps(e.cm,t,r):Ji(e,t,r),li(e,n,Ve),e.cantEdit&&ai(e,L(e.firstLine(),0))&&(e.cantEdit=!1)}}function Ps(e,t,n){var r=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=f(qt(ce(r,o.line))),r.iter(s,l.line+1,function(x){if(x==i.maxLine)return a=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Ot(e),Ji(r,t,n,Vo(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,function(x){var M=Un(x);M>i.maxLineLength&&(i.maxLine=x,i.maxLineLength=M,i.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),Sa(r,o.line),kn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?bt(e):o.line==l.line&&t.text.length==1&&!vl(e.doc,t)?dr(e,o.line,"text"):bt(e,o.line,l.line+1,u);var h=Ct(e,"changes"),v=Ct(e,"change");if(v||h){var k={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};v&&ot(e,"change",e,k),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(k)}e.display.selForContextMenu=null}function Qr(e,t,n,r,i){var o;r||(r=n),Z(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),typeof t=="string"&&(t=e.splitLines(t)),Jr(e,{from:n,to:r,text:t,origin:i})}function Pl(e,t,n,r){n1||!(this.children[0]instanceof Cn))){var a=[];this.collapse(a),this.children=[new Cn(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=h,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&bt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Dl(e.doc)),e&&ot(e,"markerCleared",e,this,r,i),t&&Fr(e),this.parent&&this.parent.clear()}},mr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i0||l==0&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=S("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Mo(e,t.line,t,n,o)||t.line!=n.line&&Mo(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");La()}o.addToHistory&&bl(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a=t.line,s=e.cm,u;if(e.iter(a,n.line+1,function(v){s&&o.collapsed&&!s.options.lineWrapping&&qt(v)==s.display.maxLine&&(u=!0),o.collapsed&&a!=t.line&&Ft(v,0),Da(v,new Rn(o,a==t.line?t.ch:null,a==n.line?n.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,n.line+1,function(v){cr(e,v)&&Ft(v,0)}),o.clearOnEnter&&ve(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(Ta(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Wl,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)bt(s,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var h=t.line;h<=n.line;h++)dr(s,h,"text");o.atomic&&Dl(s.doc),ot(s,"markerAdded",s,o)}return o}var Fn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n=0;s--)Jr(this,r[s]);a?Ll(this,a):this.cm&&Gr(this.cm)}),undo:at(function(){si(this,"undo")}),redo:at(function(){si(this,"redo")}),undoSelection:at(function(){si(this,"undo",!0)}),redoSelection:at(function(){si(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Ce(this,e),t=Ce(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),Ce(this,L(n,t))},indexFromPos:function(e){e=Ce(this,e);var t=e.ch;if(e.linet&&(t=e.from),e.to!=null&&e.to-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k=0;a--)Qr(e.doc,"",r[a].from,r[a].to,"+delete");Gr(e)})}function eo(e,t,n){var r=Lt(e.text,t+n,n);return r<0||r>e.text.length?null:r}function to(e,t,n){var r=eo(e,t.ch,n);return r==null?null:new L(t.line,r,n<0?"after":"before")}function ro(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var o=We(n,t.doc.direction);if(o){var l=i<0?ge(o):o[0],a=i<0==(l.level==1),s=a?"after":"before",u;if(l.level>0||t.doc.direction=="rtl"){var h=qr(t,n);u=i<0?n.text.length-1:0;var v=Zt(t,h,u).top;u=Nt(function(k){return Zt(t,h,k).top==v},i<0==(l.level==1)?l.from:l.to-1,u),s=="before"&&(u=eo(n,u,1))}else u=i<0?l.to:l.from;return new L(r,u,s)}}return new L(r,i<0?n.text.length:0,i<0?"before":"after")}function Ys(e,t,n,r){var i=We(t,e.doc.direction);if(!i)return to(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=lr(i,n.ch,n.sticky),l=i[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(r>0?l.to>n.ch:l.from=l.from&&k>=h.begin)){var x=v?"before":"after";return new L(n.line,k,x)}}var M=function(U,Q,G){for(var ee=function(Ke,st){return st?new L(n.line,a(Ke,1),"before"):new L(n.line,Ke,"after")};U>=0&&U0==(me.level!=1),Fe=pe?G.begin:a(G.end,-1);if(me.from<=Fe&&Fe0?h.end:a(h.begin,-1);return R!=null&&!(r>0&&R==t.text.length)&&(E=M(r>0?0:i.length-1,r,u(R)),E)?E:null}var Nn={selectAll:Al,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ve)},killLine:function(e){return en(e,function(t){if(t.empty()){var n=ce(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new L(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),L(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ce(e.doc,i.line-1).text;l&&(i=new L(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),L(i.line-1,l.length-1),i,"+transpose"))}}n.push(new He(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Dt(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&Z(t,this.pos)==0&&n==this.button};var Pn,In;function tu(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new io(n,e,t),Pn=null,"double"):(Pn=new io(n,e,t),In=null,"single")}function ea(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){_||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!oo(t,e)){var r=Tr(t,e),i=Wt(e),o=r?tu(r,i):"single";j(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ru(t,i,r,o,e))&&(i==1?r?iu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(fe?t.display.input.onContextMenu(e):_i(t)))}}}function ru(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Ul(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function nu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ae?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=se?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(se?n.altKey:n.ctrlKey)),i}function iu(e,t,n,r){b?setTimeout(ue(tl,e),0):e.curOp.focus=y(Y(e));var i=nu(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&mi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(Z((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(Z(l.to(),t)>0||t.xRel<0)?ou(e,r,t,i):lu(e,r,t,i)}function ou(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){_&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:_i(e)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",a),dt(i.scroller,"dragstart",s),dt(i.scroller,"drop",l),o||(ht(u),r.addNew||oi(e.doc,n,null,null,r.extend),_&&!X||b&&N==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),a=function(u){o=o||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},s=function(){return o=!0};_&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,ve(i.wrapper.ownerDocument,"mouseup",l),ve(i.wrapper.ownerDocument,"mousemove",a),ve(i.scroller,"dragstart",s),ve(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ta(e,t,n){if(n=="char")return new He(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new He(L(t.line,0),Ce(e.doc,L(t.line+1,0)));var r=n(e,t);return new He(r.from,r.to)}function lu(e,t,n,r){b&&_i(e);var i=e.display,o=e.doc;ht(t);var l,a,s=o.sel,u=s.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(n),a>-1?l=u[a]:l=new He(n,n)):(l=o.sel.primary(),a=o.sel.primIndex),r.unit=="rectangle")r.addNew||(l=new He(n,n)),n=Tr(e,t,!0,!0),a=-1;else{var h=ta(e,n,r.unit);r.extend?l=Vi(l,h.anchor,h.head,r.extend):l=h}r.addNew?a==-1?(a=u.length,pt(o,Kt(e,u.concat([l]),a),{scroll:!1,origin:"*mouse"})):u.length>1&&u[a].empty()&&r.unit=="char"&&!r.extend?(pt(o,Kt(e,u.slice(0,a).concat(u.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):$i(o,a,l,ct):(a=0,pt(o,new At([l],0),ct),s=o.sel);var v=n;function k(G){if(Z(v,G)!=0)if(v=G,r.unit=="rectangle"){for(var ee=[],me=e.options.tabSize,pe=Le(ce(o,n.line).text,n.ch,me),Fe=Le(ce(o,G.line).text,G.ch,me),Ke=Math.min(pe,Fe),st=Math.max(pe,Fe),Xe=Math.min(n.line,G.line),Mt=Math.min(e.lastLine(),Math.max(n.line,G.line));Xe<=Mt;Xe++){var wt=ce(o,Xe).text,tt=Re(wt,Ke,me);Ke==st?ee.push(new He(L(Xe,tt),L(Xe,tt))):wt.length>tt&&ee.push(new He(L(Xe,tt),L(Xe,Re(wt,st,me))))}ee.length||ee.push(new He(n,n)),pt(o,Kt(e,s.ranges.slice(0,a).concat(ee),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(G)}else{var St=l,ft=ta(e,G,r.unit),nt=St.anchor,rt;Z(ft.anchor,nt)>0?(rt=ft.head,nt=_r(St.from(),ft.anchor)):(rt=ft.anchor,nt=xt(St.to(),ft.head));var Qe=s.ranges.slice(0);Qe[a]=au(e,new He(Ce(o,nt),rt)),pt(o,Kt(e,Qe,a),ct)}}var x=i.wrapper.getBoundingClientRect(),M=0;function E(G){var ee=++M,me=Tr(e,G,!0,r.unit=="rectangle");if(me)if(Z(me,v)!=0){e.curOp.focus=y(Y(e)),k(me);var pe=$n(i,o);(me.line>=pe.to||me.linex.bottom?20:0;Fe&&setTimeout(lt(e,function(){M==ee&&(i.scroller.scrollTop+=Fe,E(G))}),50)}}function R(G){e.state.selectingText=!1,M=1/0,G&&(ht(G),i.input.focus()),dt(i.wrapper.ownerDocument,"mousemove",U),dt(i.wrapper.ownerDocument,"mouseup",Q),o.history.lastSelOrigin=null}var U=lt(e,function(G){G.buttons===0||!Wt(G)?R(G):E(G)}),Q=lt(e,R);e.state.selectingText=Q,ve(i.wrapper.ownerDocument,"mousemove",U),ve(i.wrapper.ownerDocument,"mouseup",Q)}function au(e,t){var n=t.anchor,r=t.head,i=ce(e.doc,n.line);if(Z(n,r)==0&&n.sticky==r.sticky)return t;var o=We(i);if(!o)return t;var l=lr(o,n.ch,n.sticky),a=o[l];if(a.from!=n.ch&&a.to!=n.ch)return t;var s=l+(a.from==n.ch==(a.level!=1)?0:1);if(s==0||s==o.length)return t;var u;if(r.line!=n.line)u=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var h=lr(o,r.ch,r.sticky),v=h-l||(r.ch-n.ch)*(a.level==1?-1:1);h==s-1||h==s?u=v<0:u=v>0}var k=o[s+(u?-1:0)],x=u==(k.level==1),M=x?k.from:k.to,E=x?"after":"before";return n.ch==M&&n.sticky==E?t:new He(new L(n.line,M,E),r)}function ra(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ht(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Ct(e,n))return yt(t);o-=a.top-l.viewOffset;for(var s=0;s=i){var h=g(e.doc,o),v=e.display.gutterSpecs[s];return Ye(e,n,e,h,v.className,t),yt(t)}}}function oo(e,t){return ra(e,t,"gutterClick",!0)}function na(e,t){tr(e.display,t)||su(e,t)||Ze(e,t,"contextmenu")||fe||e.display.input.onContextMenu(t)}function su(e,t){return Ct(e,"gutterContextMenu")?ra(e,t,"gutterContextMenu",!1):!1}function ia(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(e)}var tn={toString:function(){return"CodeMirror.Init"}},oa={},di={};function uu(e){var t=e.optionHandlers;function n(r,i,o,l){e.defaults[r]=i,o&&(t[r]=l?function(a,s,u){u!=tn&&o(a,s,u)}:o)}e.defineOption=n,e.Init=tn,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Zi(r)},!0),n("indentUnit",2,Zi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){Sn(r),gn(r),bt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var o=[],l=r.doc.first;r.doc.iter(function(s){for(var u=0;;){var h=s.text.indexOf(i,u);if(h==-1)break;u=h+i.length,o.push(L(l,h))}l++});for(var a=o.length-1;a>=0;a--)Qr(r.doc,i,o[a],L(o[a].line,o[a].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,o){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),o!=tn&&r.refresh()}),n("specialCharPlaceholder",Wa,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",ne?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!ye),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){ia(r),wn(r)},!0),n("keyMap","default",function(r,i,o){var l=fi(i),a=o!=tn&&fi(o);a&&a.detach&&a.detach(r,l),l.attach&&l.attach(r,a||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,cu,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=Xi(i,r.options.lineNumbers),wn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Ii(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Xr(r)},!0),n("scrollbarStyle","native",function(r){al(r),Xr(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=Xi(r.options.gutters,i),wn(r)},!0),n("firstLineNumber",1,wn,!0),n("lineNumberFormatter",function(r){return r},wn,!0),n("showCursorWhenSelecting",!1,vn,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Ur(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,fu),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vn,!0),n("singleCursorHeightPerLine",!0,vn,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Sn,!0),n("addModeClass",!1,Sn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,Sn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function fu(e,t,n){var r=n&&n!=tn;if(!t!=!r){var i=e.display.dragFunctions,o=t?ve:dt;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function cu(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ee(e.display.wrapper,"CodeMirror-wrap"),Li(e)),zi(e),bt(e),gn(e),setTimeout(function(){return Xr(e)},100)}function Ge(e,t){var n=this;if(!(this instanceof Ge))return new Ge(e,t);this.options=t=t?Te(t):{},Te(oa,t,!1);var r=t.value;typeof r=="string"?r=new kt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ge.inputStyles[t.inputStyle](this),o=this.display=new Ts(e,r,i,t);o.wrapper.CodeMirror=this,ia(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),al(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new be,keySeq:null,specialChars:null},t.autofocus&&!ne&&o.input.focus(),b&&N<11&&setTimeout(function(){return n.display.input.reset(!0)},20),du(this),js(),Mr(this),this.curOp.forceUpdate=!0,ml(this,r),t.autofocus&&!ne||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Hi(n)},20):Ur(this);for(var l in di)di.hasOwnProperty(l)&&di[l](this,t[l],tn);fl(this),t.finishInit&&t.finishInit(this);for(var a=0;a20*20}ve(t.scroller,"touchstart",function(s){if(!Ze(e,s)&&!o(s)&&!oo(e,s)){t.input.ensurePolled(),clearTimeout(n);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),ve(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),ve(t.scroller,"touchend",function(s){var u=t.activeTouch;if(u&&!tr(t,s)&&u.left!=null&&!u.moved&&new Date-u.start<300){var h=e.coordsChar(t.activeTouch,"page"),v;!u.prev||l(u,u.prev)?v=new He(h,h):!u.prev.prev||l(u,u.prev.prev)?v=e.findWordAt(h):v=new He(L(h.line,0),Ce(e.doc,L(h.line+1,0))),e.setSelection(v.anchor,v.head),e.focus(),ht(s)}i()}),ve(t.scroller,"touchcancel",i),ve(t.scroller,"scroll",function(){t.scroller.clientHeight&&(yn(e,t.scroller.scrollTop),Cr(e,t.scroller.scrollLeft,!0),Ye(e,"scroll",e))}),ve(t.scroller,"mousewheel",function(s){return hl(e,s)}),ve(t.scroller,"DOMMouseScroll",function(s){return hl(e,s)}),ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){Ze(e,s)||ar(s)},over:function(s){Ze(e,s)||(qs(e,s),ar(s))},start:function(s){return Rs(e,s)},drop:lt(e,Hs),leave:function(s){Ze(e,s)||Rl(e)}};var a=t.input.getField();ve(a,"keyup",function(s){return Vl.call(e,s)}),ve(a,"keydown",lt(e,Ql)),ve(a,"keypress",lt(e,$l)),ve(a,"focus",function(s){return Hi(e,s)}),ve(a,"blur",function(s){return Ur(e,s)})}var lo=[];Ge.defineInitHook=function(e){return lo.push(e)};function zn(e,t,n,r){var i=e.doc,o;n==null&&(n="add"),n=="smart"&&(i.mode.indent?o=fn(e,t).state:n="prev");var l=e.options.tabSize,a=ce(i,t),s=Le(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u=a.text.match(/^\s*/)[0],h;if(!r&&!/\S/.test(a.text))h=0,n="not";else if(n=="smart"&&(h=i.mode.indent(o,a.text.slice(u.length),a.text),h==qe||h>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?h=Le(ce(i,t-1).text,null,l):h=0:n=="add"?h=s+e.options.indentUnit:n=="subtract"?h=s-e.options.indentUnit:typeof n=="number"&&(h=s+n),h=Math.max(0,h);var v="",k=0;if(e.options.indentWithTabs)for(var x=Math.floor(h/l);x;--x)k+=l,v+=" ";if(kl,s=Pt(t),u=null;if(a&&r.ranges.length>1)if(Ut&&Ut.text.join(` -`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h=0;k--){var x=r.ranges[k],M=x.from(),E=x.to();x.empty()&&(n&&n>0?M=L(M.line,M.ch-n):e.state.overwrite&&!a?E=L(E.line,Math.min(ce(o,E.line).text.length,E.ch+ge(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(` -`)==s.join(` -`)&&(M=E=L(M.line,0)));var R={from:M,to:E,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,R),ot(e,"inputRead",e,R)}t&&!a&&aa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function la(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return ao(t,n,0,null,"paste")}),!0}function aa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ce(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function sa(e){for(var t=[],n=[],r=0;ro&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v0&&$i(this.doc,l,new He(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return xo(this,r,i)},getLineTokens:function(r,i){return xo(this,L(r),i,!0)},getTokenTypeAt:function(r){r=Ce(this.doc,r);var i=vo(this,ce(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]s&&(r=s,l=!0),a=ce(this.doc,r)}else a=r;return Yn(this,a,{top:0,left:0},i||"page",o||l).top+(l?this.doc.height-er(a):0)},defaultTextHeight:function(){return jr(this.display)},defaultCharWidth:function(){return Kr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,o,l,a){var s=this.display;r=jt(this,Ce(this.doc,r));var u=r.bottom,h=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),l=="over")u=r.top;else if(l=="above"||l=="near"){var v=Math.max(s.wrapper.clientHeight,this.doc.height),k=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(l=="above"||r.bottom+i.offsetHeight>v)&&r.top>i.offsetHeight?u=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=v&&(u=r.bottom),h+i.offsetWidth>k&&(h=k-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",a=="right"?(h=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(a=="left"?h=0:a=="middle"&&(h=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=h+"px"),o&&fs(this,{left:h,top:u,right:h+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:vt(Ql),triggerOnKeyPress:vt($l),triggerOnKeyUp:Vl,triggerOnMouseDown:vt(ea),execCommand:function(r){if(Nn.hasOwnProperty(r))return Nn[r].call(null,this)},triggerElectric:vt(function(r){aa(this,r)}),findPosH:function(r,i,o,l){var a=1;i<0&&(a=-1,i=-i);for(var s=Ce(this.doc,r),u=0;u0&&h(o.charAt(l-1));)--l;for(;a.5||this.options.lineWrapping)&&zi(this),Ye(this,"refresh",this)}),swapDoc:vt(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ml(this,r),gn(this),this.display.input.reset(),mn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,ot(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Bt(e),e.registerHelper=function(r,i,o){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=o},e.registerGlobalHelper=function(r,i,o,l){e.registerHelper(r,i,l),n[r]._global.push({pred:o,val:l})}}function uo(e,t,n,r,i){var o=t,l=n,a=ce(e,t.line),s=i&&e.direction=="rtl"?-n:n;function u(){var Q=t.line+s;return Q=e.first+e.size?!1:(t=new L(Q,t.ch,t.sticky),a=ce(e,Q))}function h(Q){var G;if(r=="codepoint"){var ee=a.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ee))G=null;else{var me=n>0?ee>=55296&&ee<56320:ee>=56320&&ee<57343;G=new L(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(me?2:1))),-n)}}else i?G=Ys(e.cm,a,t,n):G=to(a,t,n);if(G==null)if(!Q&&u())t=ro(i,e.cm,a,t.line,s);else return!1;else t=G;return!0}if(r=="char"||r=="codepoint")h();else if(r=="column")h(!0);else if(r=="word"||r=="group")for(var v=null,k=r=="group",x=e.cm&&e.cm.getHelper(t,"wordChars"),M=!0;!(n<0&&!h(!M));M=!1){var E=a.text.charAt(t.ch)||` -`,R=Se(E,x)?"w":k&&E==` -`?"n":!k||/\s/.test(E)?null:"p";if(k&&!M&&!R&&(R="s"),v&&v!=R){n<0&&(n=1,h(),t.sticky="after");break}if(R&&(v=R),n>0&&!h(!M))break}var U=ai(e,t,o,l,!0);return _e(o,U)&&(U.hitSide=!0),U}function fa(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,j(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Ni(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,so(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ve(i,"paste",function(a){!o(a)||Ze(r,a)||la(a,r)||N<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ve(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ve(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return n.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=sa(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(` -`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=ua(),v=h.firstChild;so(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(` -`);var k=y(xe(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ve(i,"copy",l),ve(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=el(this.cm,!1);return e.focus=y(xe(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ca(t,r)||{node:a[0].measure.map[2],offset:0},u=i.linee.firstLine()&&(r=L(r.line-1,ce(e.doc,r.line-1).length)),i.ch==ce(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Lr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Lr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(gu(e,a,h,l,u)),k=Vt(e.doc,L(l,0),L(u,ce(e.doc,u).text.length));v.length>1&&k.length>1;)if(ge(v)==ge(k))v.pop(),k.pop(),u--;else if(v[0]==k[0])v.shift(),k.shift(),l++;else break;for(var x=0,M=0,E=v[0],R=k[0],U=Math.min(E.length,R.length);xr.ch&&Q.charCodeAt(Q.length-M-1)==G.charCodeAt(G.length-M-1);)x--,M++;v[v.length-1]=Q.slice(0,Q.length-M).replace(/^\u200b+/,""),v[0]=v[0].slice(x).replace(/\u200b+$/,"");var me=L(l,x),pe=L(u,k.length?ge(k).length-M:0);if(v.length>1||v[0]||Z(me,pe))return Qr(e.doc,v,me,pe,"+input"),!0},je.prototype.ensurePolled=function(){this.forceCompositionEnd()},je.prototype.reset=function(){this.forceCompositionEnd()},je.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},je.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},je.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Dt(this.cm,function(){return bt(e.cm)})},je.prototype.setUneditable=function(e){e.contentEditable="false"},je.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||lt(this.cm,ao)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},je.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},je.prototype.onContextMenu=function(){},je.prototype.resetPosition=function(){},je.prototype.needsContentAttribute=!0;function ca(e,t){var n=Fi(e,t.line);if(!n||n.hidden)return null;var r=ce(e.doc,t.line),i=Ho(n,r,t.line),o=We(r,e.doc.direction),l="left";if(o){var a=lr(o,t.ch);l=a%2?"right":"left"}var s=jo(i.map,t.ch,l);return s.offset=s.collapse=="right"?s.end:s.start,s}function pu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function rn(e,t){return t&&(e.bad=!0),e}function gu(e,t,n,r,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(x){return function(M){return M.id==x}}function h(){l&&(o+=a,s&&(o+=a),l=s=!1)}function v(x){x&&(h(),o+=x)}function k(x){if(x.nodeType==1){var M=x.getAttribute("cm-text");if(M){v(M);return}var E=x.getAttribute("cm-marker"),R;if(E){var U=e.findMarks(L(r,0),L(i+1,0),u(+E));U.length&&(R=U[0].find(0))&&v(Vt(e.doc,R.from,R.to).join(a));return}if(x.getAttribute("contenteditable")=="false")return;var Q=/^(pre|div|p|li|table|br)$/i.test(x.nodeName);if(!/^br$/i.test(x.nodeName)&&x.textContent.length==0)return;Q&&h();for(var G=0;G=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),ve(i,"paste",function(l){Ze(r,l)||la(l,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function o(l){if(!Ze(r,l)){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var a=sa(r);hi({lineWise:!0,text:a.text}),l.type=="cut"?r.setSelections(a.ranges,null,Ve):(n.prevInput="",i.value=a.text.join(` -`),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ve(i,"cut",o),ve(i,"copy",o),ve(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ve(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ve(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=ua(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;so(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=el(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;J(n.cursorDiv,e.cursors),J(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&N>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&N>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||y(xe(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&N>=9&&this.hasSelection===i||se&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r="​"),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l1e3||i.indexOf(` -`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&N>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Tr(n,e),l=r.scroller.scrollTop;if(!o||z)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px; - top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px; - z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;_&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),_&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=x,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var E=n.somethingSelected(),R="​"+(E?i.value:"");i.value="⇚",i.value=R,t.prevInput=E?"":"​",i.selectionStart=1,i.selectionEnd=R.length,r.selForContextMenu=n.doc.sel}}function x(){if(t.contextMenuPending==x&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&N<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&N<9)&&k();var E=0,R=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="​"?lt(n,Al)(n):E++<10?r.detectingSelectAll=setTimeout(R,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(R,200)}}if(b&&N>=9&&k(),fe){ar(e);var M=function(){dt(window,"mouseup",M),setTimeout(x,20)};ve(window,"mouseup",M)}else setTimeout(x,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function mu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=y(xe(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ve(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function yu(e){e.off=dt,e.on=ve,e.wheelEventPixels=Ls,e.Doc=kt,e.splitLines=Pt,e.countColumn=Le,e.findColumn=Re,e.isWordChar=ae,e.Pass=qe,e.signal=Ye,e.Line=Hr,e.changeEnd=gr,e.scrollbarModel=ll,e.Pos=L,e.cmpPos=Z,e.modes=Pr,e.mimeModes=Ht,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Gl,e.isModifierKey=Kl,e.lookupKey=$r,e.normalizeKeyMap=Xs,e.StringStream=Je,e.SharedTextMarker=Fn,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=P,e.contains=m,e.rmClass=Ee,e.keyNames=yr}uu(Ge),hu(Ge);var xu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&oe(xu,gi)<0&&(Ge.prototype[gi]=function(e){return function(){return e.apply(this.doc,arguments)}}(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=mu,yu(Ge),Ge.version="5.65.18",Ge})})(ya);var It=ya.exports;const Cu=bu(It);var wu={exports:{}};(function(Et,zt){(function(C){C(It)})(function(C){C.defineMode("css",function(fe,H){var Ee=H.inline;H.propertyKeywords||(H=C.resolveMode("text/css"));var D=fe.indentUnit,J=H.tokenHooks,d=H.documentTypes||{},S=H.mediaTypes||{},w=H.mediaFeatures||{},m=H.mediaValueKeywords||{},y=H.propertyKeywords||{},P=H.nonStandardPropertyKeywords||{},le=H.fontProperties||{},p=H.counterDescriptors||{},c=H.colorKeywords||{},Y=H.valueKeywords||{},xe=H.allowNested,j=H.lineComment,ue=H.supportsAtComponent===!0,Te=fe.highlightNonStandardPropertyKeywords!==!1,Le,be;function oe(T,B){return Le=B,T}function Ne(T,B){var F=T.next();if(J[F]){var Ie=J[F](T,B);if(Ie!==!1)return Ie}if(F=="@")return T.eatWhile(/[\w\\\-]/),oe("def",T.current());if(F=="="||(F=="~"||F=="|")&&T.eat("="))return oe(null,"compare");if(F=='"'||F=="'")return B.tokenize=qe(F),B.tokenize(T,B);if(F=="#")return T.eatWhile(/[\w\\\-]/),oe("atom","hash");if(F=="!")return T.match(/^\s*\w*/),oe("keyword","important");if(/\d/.test(F)||F=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),oe("number","unit");if(F==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),oe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?oe("variable-2","variable-definition"):oe("variable-2","variable");if(T.match(/^\w+-/))return oe("meta","meta")}else return/[,+>*\/]/.test(F)?oe(null,"select-op"):F=="."&&T.match(/^-?[_a-z][_a-z0-9-]*/i)?oe("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(F)?oe(null,F):T.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(T.current())&&(B.tokenize=Ve),oe("variable callee","variable")):/[\w\\\-]/.test(F)?(T.eatWhile(/[\w\\\-]/),oe("property","word")):oe(null,null)}function qe(T){return function(B,F){for(var Ie=!1,ae;(ae=B.next())!=null;){if(ae==T&&!Ie){T==")"&&B.backUp(1);break}Ie=!Ie&&ae=="\\"}return(ae==T||!Ie&&T!=")")&&(F.tokenize=null),oe("string","string")}}function Ve(T,B){return T.next(),T.match(/^\s*[\"\')]/,!1)?B.tokenize=null:B.tokenize=qe(")"),oe(null,"(")}function ct(T,B,F){this.type=T,this.indent=B,this.prev=F}function Oe(T,B,F,Ie){return T.context=new ct(F,B.indentation()+(Ie===!1?0:D),T.context),F}function Re(T){return T.context.prev&&(T.context=T.context.prev),T.context.type}function Ue(T,B,F){return Pe[F.context.type](T,B,F)}function et(T,B,F,Ie){for(var ae=Ie||1;ae>0;ae--)F.context=F.context.prev;return Ue(T,B,F)}function ge(T){var B=T.current().toLowerCase();Y.hasOwnProperty(B)?be="atom":c.hasOwnProperty(B)?be="keyword":be="variable"}var Pe={};return Pe.top=function(T,B,F){if(T=="{")return Oe(F,B,"block");if(T=="}"&&F.context.prev)return Re(F);if(ue&&/@component/i.test(T))return Oe(F,B,"atComponentBlock");if(/^@(-moz-)?document$/i.test(T))return Oe(F,B,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(T))return Oe(F,B,"atBlock");if(/^@(font-face|counter-style)/i.test(T))return F.stateArg=T,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(T))return"keyframes";if(T&&T.charAt(0)=="@")return Oe(F,B,"at");if(T=="hash")be="builtin";else if(T=="word")be="tag";else{if(T=="variable-definition")return"maybeprop";if(T=="interpolation")return Oe(F,B,"interpolation");if(T==":")return"pseudo";if(xe&&T=="(")return Oe(F,B,"parens")}return F.context.type},Pe.block=function(T,B,F){if(T=="word"){var Ie=B.current().toLowerCase();return y.hasOwnProperty(Ie)?(be="property","maybeprop"):P.hasOwnProperty(Ie)?(be=Te?"string-2":"property","maybeprop"):xe?(be=B.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(be+=" error","maybeprop")}else return T=="meta"?"block":!xe&&(T=="hash"||T=="qualifier")?(be="error","block"):Pe.top(T,B,F)},Pe.maybeprop=function(T,B,F){return T==":"?Oe(F,B,"prop"):Ue(T,B,F)},Pe.prop=function(T,B,F){if(T==";")return Re(F);if(T=="{"&&xe)return Oe(F,B,"propBlock");if(T=="}"||T=="{")return et(T,B,F);if(T=="(")return Oe(F,B,"parens");if(T=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(B.current()))be+=" error";else if(T=="word")ge(B);else if(T=="interpolation")return Oe(F,B,"interpolation");return"prop"},Pe.propBlock=function(T,B,F){return T=="}"?Re(F):T=="word"?(be="property","maybeprop"):F.context.type},Pe.parens=function(T,B,F){return T=="{"||T=="}"?et(T,B,F):T==")"?Re(F):T=="("?Oe(F,B,"parens"):T=="interpolation"?Oe(F,B,"interpolation"):(T=="word"&&ge(B),"parens")},Pe.pseudo=function(T,B,F){return T=="meta"?"pseudo":T=="word"?(be="variable-3",F.context.type):Ue(T,B,F)},Pe.documentTypes=function(T,B,F){return T=="word"&&d.hasOwnProperty(B.current())?(be="tag",F.context.type):Pe.atBlock(T,B,F)},Pe.atBlock=function(T,B,F){if(T=="(")return Oe(F,B,"atBlock_parens");if(T=="}"||T==";")return et(T,B,F);if(T=="{")return Re(F)&&Oe(F,B,xe?"block":"top");if(T=="interpolation")return Oe(F,B,"interpolation");if(T=="word"){var Ie=B.current().toLowerCase();Ie=="only"||Ie=="not"||Ie=="and"||Ie=="or"?be="keyword":S.hasOwnProperty(Ie)?be="attribute":w.hasOwnProperty(Ie)?be="property":m.hasOwnProperty(Ie)?be="keyword":y.hasOwnProperty(Ie)?be="property":P.hasOwnProperty(Ie)?be=Te?"string-2":"property":Y.hasOwnProperty(Ie)?be="atom":c.hasOwnProperty(Ie)?be="keyword":be="error"}return F.context.type},Pe.atComponentBlock=function(T,B,F){return T=="}"?et(T,B,F):T=="{"?Re(F)&&Oe(F,B,xe?"block":"top",!1):(T=="word"&&(be="error"),F.context.type)},Pe.atBlock_parens=function(T,B,F){return T==")"?Re(F):T=="{"||T=="}"?et(T,B,F,2):Pe.atBlock(T,B,F)},Pe.restricted_atBlock_before=function(T,B,F){return T=="{"?Oe(F,B,"restricted_atBlock"):T=="word"&&F.stateArg=="@counter-style"?(be="variable","restricted_atBlock_before"):Ue(T,B,F)},Pe.restricted_atBlock=function(T,B,F){return T=="}"?(F.stateArg=null,Re(F)):T=="word"?(F.stateArg=="@font-face"&&!le.hasOwnProperty(B.current().toLowerCase())||F.stateArg=="@counter-style"&&!p.hasOwnProperty(B.current().toLowerCase())?be="error":be="property","maybeprop"):"restricted_atBlock"},Pe.keyframes=function(T,B,F){return T=="word"?(be="variable","keyframes"):T=="{"?Oe(F,B,"top"):Ue(T,B,F)},Pe.at=function(T,B,F){return T==";"?Re(F):T=="{"||T=="}"?et(T,B,F):(T=="word"?be="tag":T=="hash"&&(be="builtin"),"at")},Pe.interpolation=function(T,B,F){return T=="}"?Re(F):T=="{"||T==";"?et(T,B,F):(T=="word"?be="variable":T!="variable"&&T!="("&&T!=")"&&(be="error"),"interpolation")},{startState:function(T){return{tokenize:null,state:Ee?"block":"top",stateArg:null,context:new ct(Ee?"block":"top",T||0,null)}},token:function(T,B){if(!B.tokenize&&T.eatSpace())return null;var F=(B.tokenize||Ne)(T,B);return F&&typeof F=="object"&&(Le=F[1],F=F[0]),be=F,Le!="comment"&&(B.state=Pe[B.state](Le,T,B)),be},indent:function(T,B){var F=T.context,Ie=B&&B.charAt(0),ae=F.indent;return F.type=="prop"&&(Ie=="}"||Ie==")")&&(F=F.prev),F.prev&&(Ie=="}"&&(F.type=="block"||F.type=="top"||F.type=="interpolation"||F.type=="restricted_atBlock")?(F=F.prev,ae=F.indent):(Ie==")"&&(F.type=="parens"||F.type=="atBlock_parens")||Ie=="{"&&(F.type=="at"||F.type=="atBlock"))&&(ae=Math.max(0,F.indent-D))),ae},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:j,fold:"brace"}});function De(fe){for(var H={},Ee=0;Ee")):null:d.match("--")?w(ke("comment","-->")):d.match("DOCTYPE",!0,!0)?(d.eatWhile(/[\w\._\-]/),w(we(1))):null:d.eat("?")?(d.eatWhile(/[\w\._\-]/),S.tokenize=ke("meta","?>"),"meta"):(ie=d.eat("/")?"closeTag":"openTag",S.tokenize=z,"tag bracket");if(m=="&"){var y;return d.eat("#")?d.eat("x")?y=d.eatWhile(/[a-fA-F\d]/)&&d.eat(";"):y=d.eatWhile(/[\d]/)&&d.eat(";"):y=d.eatWhile(/[\w\.\-:]/)&&d.eat(";"),y?"atom":"error"}else return d.eatWhile(/[^&<]/),null}q.isInText=!0;function z(d,S){var w=d.next();if(w==">"||w=="/"&&d.eat(">"))return S.tokenize=q,ie=w==">"?"endTag":"selfcloseTag","tag bracket";if(w=="=")return ie="equals",null;if(w=="<"){S.tokenize=q,S.state=Ae,S.tagName=S.tagStart=null;var m=S.tokenize(d,S);return m?m+" tag error":"tag error"}else return/[\'\"]/.test(w)?(S.tokenize=X(w),S.stringStartCol=d.column(),S.tokenize(d,S)):(d.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function X(d){var S=function(w,m){for(;!w.eol();)if(w.next()==d){m.tokenize=z;break}return"string"};return S.isInAttribute=!0,S}function ke(d,S){return function(w,m){for(;!w.eol();){if(w.match(S)){m.tokenize=q;break}w.next()}return d}}function we(d){return function(S,w){for(var m;(m=S.next())!=null;){if(m=="<")return w.tokenize=we(d+1),w.tokenize(S,w);if(m==">")if(d==1){w.tokenize=q;break}else return w.tokenize=we(d-1),w.tokenize(S,w)}return"meta"}}function te(d){return d&&d.toLowerCase()}function re(d,S,w){this.prev=d.context,this.tagName=S||"",this.indent=d.indented,this.startOfLine=w,(b.doNotIndent.hasOwnProperty(S)||d.context&&d.context.noIndent)&&(this.noIndent=!0)}function ne(d){d.context&&(d.context=d.context.prev)}function se(d,S){for(var w;;){if(!d.context||(w=d.context.tagName,!b.contextGrabbers.hasOwnProperty(te(w))||!b.contextGrabbers[te(w)].hasOwnProperty(te(S))))return;ne(d)}}function Ae(d,S,w){return d=="openTag"?(w.tagStart=S.column(),ye):d=="closeTag"?de:Ae}function ye(d,S,w){return d=="word"?(w.tagName=S.current(),O="tag",H):b.allowMissingTagName&&d=="endTag"?(O="tag bracket",H(d,S,w)):(O="error",ye)}function de(d,S,w){if(d=="word"){var m=S.current();return w.context&&w.context.tagName!=m&&b.implicitlyClosed.hasOwnProperty(te(w.context.tagName))&&ne(w),w.context&&w.context.tagName==m||b.matchClosing===!1?(O="tag",ze):(O="tag error",fe)}else return b.allowMissingTagName&&d=="endTag"?(O="tag bracket",ze(d,S,w)):(O="error",fe)}function ze(d,S,w){return d!="endTag"?(O="error",ze):(ne(w),Ae)}function fe(d,S,w){return O="error",ze(d,S,w)}function H(d,S,w){if(d=="word")return O="attribute",Ee;if(d=="endTag"||d=="selfcloseTag"){var m=w.tagName,y=w.tagStart;return w.tagName=w.tagStart=null,d=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(te(m))?se(w,m):(se(w,m),w.context=new re(w,m,y==w.indented)),Ae}return O="error",H}function Ee(d,S,w){return d=="equals"?D:(b.allowMissing||(O="error"),H(d,S,w))}function D(d,S,w){return d=="string"?J:d=="word"&&b.allowUnquoted?(O="string",H):(O="error",H(d,S,w))}function J(d,S,w){return d=="string"?J:H(d,S,w)}return{startState:function(d){var S={tokenize:q,state:Ae,indented:d||0,tagName:null,tagStart:null,context:null};return d!=null&&(S.baseIndent=d),S},token:function(d,S){if(!S.tagName&&d.sol()&&(S.indented=d.indentation()),d.eatSpace())return null;ie=null;var w=S.tokenize(d,S);return(w||ie)&&w!="comment"&&(O=null,S.state=S.state(ie||w,d,S),O&&(w=O=="error"?w+" error":O)),w},indent:function(d,S,w){var m=d.context;if(d.tokenize.isInAttribute)return d.tagStart==d.indented?d.stringStartCol+1:d.indented+V;if(m&&m.noIndent)return C.Pass;if(d.tokenize!=z&&d.tokenize!=q)return w?w.match(/^(\s*)/)[0].length:0;if(d.tagName)return b.multilineTagIndentPastTag!==!1?d.tagStart+d.tagName.length+2:d.tagStart+V*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(d){d.state==D&&(d.state=H)},xmlCurrentTag:function(d){return d.tagName?{name:d.tagName,close:d.type=="closeTag"}:null},xmlCurrentContext:function(d){for(var S=[],w=d.context;w;w=w.prev)S.push(w.tagName);return S.reverse()}}}),C.defineMIME("text/xml","xml"),C.defineMIME("application/xml","xml"),C.mimeModes.hasOwnProperty("text/html")||C.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),da.exports}var pa={exports:{}},ga;function ba(){return ga||(ga=1,function(Et,zt){(function(C){C(It)})(function(C){C.defineMode("javascript",function(De,I){var K=De.indentUnit,$=I.statementIndent,V=I.jsonld,b=I.json||V,N=I.trackScope!==!1,_=I.typescript,ie=I.wordCharacters||/[\w$\xa1-\uffff]/,O=function(){function f(it){return{type:it,style:"keyword"}}var g=f("keyword a"),A=f("keyword b"),W=f("keyword c"),L=f("keyword d"),Z=f("operator"),_e={type:"atom",style:"atom"};return{if:f("if"),while:g,with:g,else:A,do:A,try:A,finally:A,return:L,break:L,continue:L,new:f("new"),delete:W,void:W,throw:W,debugger:f("debugger"),var:f("var"),const:f("var"),let:f("var"),function:f("function"),catch:f("catch"),for:f("for"),switch:f("switch"),case:f("case"),default:f("default"),in:Z,typeof:Z,instanceof:Z,true:_e,false:_e,null:_e,undefined:_e,NaN:_e,Infinity:_e,this:f("this"),class:f("class"),super:f("atom"),yield:W,export:f("export"),import:f("import"),extends:W,await:W}}(),q=/[+\-*&%=<>!?|~^@]/,z=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function X(f){for(var g=!1,A,W=!1;(A=f.next())!=null;){if(!g){if(A=="/"&&!W)return;A=="["?W=!0:W&&A=="]"&&(W=!1)}g=!g&&A=="\\"}}var ke,we;function te(f,g,A){return ke=f,we=A,g}function re(f,g){var A=f.next();if(A=='"'||A=="'")return g.tokenize=ne(A),g.tokenize(f,g);if(A=="."&&f.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return te("number","number");if(A=="."&&f.match(".."))return te("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(A))return te(A);if(A=="="&&f.eat(">"))return te("=>","operator");if(A=="0"&&f.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return te("number","number");if(/\d/.test(A))return f.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),te("number","number");if(A=="/")return f.eat("*")?(g.tokenize=se,se(f,g)):f.eat("/")?(f.skipToEnd(),te("comment","comment")):Ft(f,g,1)?(X(f),f.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),te("regexp","string-2")):(f.eat("="),te("operator","operator",f.current()));if(A=="`")return g.tokenize=Ae,Ae(f,g);if(A=="#"&&f.peek()=="!")return f.skipToEnd(),te("meta","meta");if(A=="#"&&f.eatWhile(ie))return te("variable","property");if(A=="<"&&f.match("!--")||A=="-"&&f.match("->")&&!/\S/.test(f.string.slice(0,f.start)))return f.skipToEnd(),te("comment","comment");if(q.test(A))return(A!=">"||!g.lexical||g.lexical.type!=">")&&(f.eat("=")?(A=="!"||A=="=")&&f.eat("="):/[<>*+\-|&?]/.test(A)&&(f.eat(A),A==">"&&f.eat(A))),A=="?"&&f.eat(".")?te("."):te("operator","operator",f.current());if(ie.test(A)){f.eatWhile(ie);var W=f.current();if(g.lastType!="."){if(O.propertyIsEnumerable(W)){var L=O[W];return te(L.type,L.style,W)}if(W=="async"&&f.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return te("async","keyword",W)}return te("variable","variable",W)}}function ne(f){return function(g,A){var W=!1,L;if(V&&g.peek()=="@"&&g.match(z))return A.tokenize=re,te("jsonld-keyword","meta");for(;(L=g.next())!=null&&!(L==f&&!W);)W=!W&&L=="\\";return W||(A.tokenize=re),te("string","string")}}function se(f,g){for(var A=!1,W;W=f.next();){if(W=="/"&&A){g.tokenize=re;break}A=W=="*"}return te("comment","comment")}function Ae(f,g){for(var A=!1,W;(W=f.next())!=null;){if(!A&&(W=="`"||W=="$"&&f.eat("{"))){g.tokenize=re;break}A=!A&&W=="\\"}return te("quasi","string-2",f.current())}var ye="([{}])";function de(f,g){g.fatArrowAt&&(g.fatArrowAt=null);var A=f.string.indexOf("=>",f.start);if(!(A<0)){if(_){var W=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,A));W&&(A=W.index)}for(var L=0,Z=!1,_e=A-1;_e>=0;--_e){var it=f.string.charAt(_e),xt=ye.indexOf(it);if(xt>=0&&xt<3){if(!L){++_e;break}if(--L==0){it=="("&&(Z=!0);break}}else if(xt>=3&&xt<6)++L;else if(ie.test(it))Z=!0;else if(/["'\/`]/.test(it))for(;;--_e){if(_e==0)return;var _r=f.string.charAt(_e-1);if(_r==it&&f.string.charAt(_e-2)!="\\"){_e--;break}}else if(Z&&!L){++_e;break}}Z&&!L&&(g.fatArrowAt=_e)}}var ze={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function fe(f,g,A,W,L,Z){this.indented=f,this.column=g,this.type=A,this.prev=L,this.info=Z,W!=null&&(this.align=W)}function H(f,g){if(!N)return!1;for(var A=f.localVars;A;A=A.next)if(A.name==g)return!0;for(var W=f.context;W;W=W.prev)for(var A=W.vars;A;A=A.next)if(A.name==g)return!0}function Ee(f,g,A,W,L){var Z=f.cc;for(D.state=f,D.stream=L,D.marked=null,D.cc=Z,D.style=g,f.lexical.hasOwnProperty("align")||(f.lexical.align=!0);;){var _e=Z.length?Z.pop():b?oe:Le;if(_e(A,W)){for(;Z.length&&Z[Z.length-1].lex;)Z.pop()();return D.marked?D.marked:A=="variable"&&H(f,W)?"variable-2":g}}}var D={state:null,column:null,marked:null,cc:null};function J(){for(var f=arguments.length-1;f>=0;f--)D.cc.push(arguments[f])}function d(){return J.apply(null,arguments),!0}function S(f,g){for(var A=g;A;A=A.next)if(A.name==f)return!0;return!1}function w(f){var g=D.state;if(D.marked="def",!!N){if(g.context){if(g.lexical.info=="var"&&g.context&&g.context.block){var A=m(f,g.context);if(A!=null){g.context=A;return}}else if(!S(f,g.localVars)){g.localVars=new le(f,g.localVars);return}}I.globalVars&&!S(f,g.globalVars)&&(g.globalVars=new le(f,g.globalVars))}}function m(f,g){if(g)if(g.block){var A=m(f,g.prev);return A?A==g.prev?g:new P(A,g.vars,!0):null}else return S(f,g.vars)?g:new P(g.prev,new le(f,g.vars),!1);else return null}function y(f){return f=="public"||f=="private"||f=="protected"||f=="abstract"||f=="readonly"}function P(f,g,A){this.prev=f,this.vars=g,this.block=A}function le(f,g){this.name=f,this.next=g}var p=new le("this",new le("arguments",null));function c(){D.state.context=new P(D.state.context,D.state.localVars,!1),D.state.localVars=p}function Y(){D.state.context=new P(D.state.context,D.state.localVars,!0),D.state.localVars=null}c.lex=Y.lex=!0;function xe(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}xe.lex=!0;function j(f,g){var A=function(){var W=D.state,L=W.indented;if(W.lexical.type=="stat")L=W.lexical.indented;else for(var Z=W.lexical;Z&&Z.type==")"&&Z.align;Z=Z.prev)L=Z.indented;W.lexical=new fe(L,D.stream.column(),f,null,W.lexical,g)};return A.lex=!0,A}function ue(){var f=D.state;f.lexical.prev&&(f.lexical.type==")"&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}ue.lex=!0;function Te(f){function g(A){return A==f?d():f==";"||A=="}"||A==")"||A=="]"?J():d(g)}return g}function Le(f,g){return f=="var"?d(j("vardef",g),Nr,Te(";"),ue):f=="keyword a"?d(j("form"),qe,Le,ue):f=="keyword b"?d(j("form"),Le,ue):f=="keyword d"?D.stream.match(/^\s*$/,!1)?d():d(j("stat"),ct,Te(";"),ue):f=="debugger"?d(Te(";")):f=="{"?d(j("}"),Y,Nt,ue,xe):f==";"?d():f=="if"?(D.state.lexical.info=="else"&&D.state.cc[D.state.cc.length-1]==ue&&D.state.cc.pop()(),d(j("form"),qe,Le,ue,Or)):f=="function"?d(Pt):f=="for"?d(j("form"),Y,Wn,Le,xe,ue):f=="class"||_&&g=="interface"?(D.marked="keyword",d(j("form",f=="class"?f:g),Pr,ue)):f=="variable"?_&&g=="declare"?(D.marked="keyword",d(Le)):_&&(g=="module"||g=="enum"||g=="type")&&D.stream.match(/^\s*\w/,!1)?(D.marked="keyword",g=="enum"?d(ce):g=="type"?d(_n,Te("operator"),We,Te(";")):d(j("form"),yt,Te("{"),j("}"),Nt,ue,ue)):_&&g=="namespace"?(D.marked="keyword",d(j("form"),oe,Le,ue)):_&&g=="abstract"?(D.marked="keyword",d(Le)):d(j("stat"),Ie):f=="switch"?d(j("form"),qe,Te("{"),j("}","switch"),Y,Nt,ue,ue,xe):f=="case"?d(oe,Te(":")):f=="default"?d(Te(":")):f=="catch"?d(j("form"),c,be,Le,ue,xe):f=="export"?d(j("stat"),Ir,ue):f=="import"?d(j("stat"),fr,ue):f=="async"?d(Le):g=="@"?d(oe,Le):J(j("stat"),oe,Te(";"),ue)}function be(f){if(f=="(")return d(_t,Te(")"))}function oe(f,g){return Ve(f,g,!1)}function Ne(f,g){return Ve(f,g,!0)}function qe(f){return f!="("?J():d(j(")"),ct,Te(")"),ue)}function Ve(f,g,A){if(D.state.fatArrowAt==D.stream.start){var W=A?Pe:ge;if(f=="(")return d(c,j(")"),Me(_t,")"),ue,Te("=>"),W,xe);if(f=="variable")return J(c,yt,Te("=>"),W,xe)}var L=A?Re:Oe;return ze.hasOwnProperty(f)?d(L):f=="function"?d(Pt,L):f=="class"||_&&g=="interface"?(D.marked="keyword",d(j("form"),yi,ue)):f=="keyword c"||f=="async"?d(A?Ne:oe):f=="("?d(j(")"),ct,Te(")"),ue,L):f=="operator"||f=="spread"?d(A?Ne:oe):f=="["?d(j("]"),Je,ue,L):f=="{"?Lt(Se,"}",null,L):f=="quasi"?J(Ue,L):f=="new"?d(T(A)):d()}function ct(f){return f.match(/[;\}\)\],]/)?J():J(oe)}function Oe(f,g){return f==","?d(ct):Re(f,g,!1)}function Re(f,g,A){var W=A==!1?Oe:Re,L=A==!1?oe:Ne;if(f=="=>")return d(c,A?Pe:ge,xe);if(f=="operator")return/\+\+|--/.test(g)||_&&g=="!"?d(W):_&&g=="<"&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?d(j(">"),Me(We,">"),ue,W):g=="?"?d(oe,Te(":"),L):d(L);if(f=="quasi")return J(Ue,W);if(f!=";"){if(f=="(")return Lt(Ne,")","call",W);if(f==".")return d(ae,W);if(f=="[")return d(j("]"),ct,Te("]"),ue,W);if(_&&g=="as")return D.marked="keyword",d(We,W);if(f=="regexp")return D.state.lastType=D.marked="operator",D.stream.backUp(D.stream.pos-D.stream.start-1),d(L)}}function Ue(f,g){return f!="quasi"?J():g.slice(g.length-2)!="${"?d(Ue):d(ct,et)}function et(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ae,d(Ue)}function ge(f){return de(D.stream,D.state),J(f=="{"?Le:oe)}function Pe(f){return de(D.stream,D.state),J(f=="{"?Le:Ne)}function T(f){return function(g){return g=="."?d(f?F:B):g=="variable"&&_?d(Ct,f?Re:Oe):J(f?Ne:oe)}}function B(f,g){if(g=="target")return D.marked="keyword",d(Oe)}function F(f,g){if(g=="target")return D.marked="keyword",d(Re)}function Ie(f){return f==":"?d(ue,Le):J(Oe,Te(";"),ue)}function ae(f){if(f=="variable")return D.marked="property",d()}function Se(f,g){if(f=="async")return D.marked="property",d(Se);if(f=="variable"||D.style=="keyword"){if(D.marked="property",g=="get"||g=="set")return d(he);var A;return _&&D.state.fatArrowAt==D.stream.start&&(A=D.stream.match(/^\s*:\s*/,!1))&&(D.state.fatArrowAt=D.stream.pos+A[0].length),d(Be)}else{if(f=="number"||f=="string")return D.marked=V?"property":D.style+" property",d(Be);if(f=="jsonld-keyword")return d(Be);if(_&&y(g))return D.marked="keyword",d(Se);if(f=="[")return d(oe,or,Te("]"),Be);if(f=="spread")return d(Ne,Be);if(g=="*")return D.marked="keyword",d(Se);if(f==":")return J(Be)}}function he(f){return f!="variable"?J(Be):(D.marked="property",d(Pt))}function Be(f){if(f==":")return d(Ne);if(f=="(")return J(Pt)}function Me(f,g,A){function W(L,Z){if(A?A.indexOf(L)>-1:L==","){var _e=D.state.lexical;return _e.info=="call"&&(_e.pos=(_e.pos||0)+1),d(function(it,xt){return it==g||xt==g?J():J(f)},W)}return L==g||Z==g?d():A&&A.indexOf(";")>-1?J(f):d(Te(g))}return function(L,Z){return L==g||Z==g?d():J(f,W)}}function Lt(f,g,A){for(var W=3;W"),We);if(f=="quasi")return J(dt,Ot)}function Bn(f){if(f=="=>")return d(We)}function ve(f){return f.match(/[\}\)\]]/)?d():f==","||f==";"?d(ve):J(Qt,ve)}function Qt(f,g){if(f=="variable"||D.style=="keyword")return D.marked="property",d(Qt);if(g=="?"||f=="number"||f=="string")return d(Qt);if(f==":")return d(We);if(f=="[")return d(Te("variable"),br,Te("]"),Qt);if(f=="(")return J(ur,Qt);if(!f.match(/[;\}\)\],]/))return d()}function dt(f,g){return f!="quasi"?J():g.slice(g.length-2)!="${"?d(dt):d(We,Ye)}function Ye(f){if(f=="}")return D.marked="string-2",D.state.tokenize=Ae,d(dt)}function Ze(f,g){return f=="variable"&&D.stream.match(/^\s*[?:]/,!1)||g=="?"?d(Ze):f==":"?d(We):f=="spread"?d(Ze):J(We)}function Ot(f,g){if(g=="<")return d(j(">"),Me(We,">"),ue,Ot);if(g=="|"||f=="."||g=="&")return d(We);if(f=="[")return d(We,Te("]"),Ot);if(g=="extends"||g=="implements")return D.marked="keyword",d(We);if(g=="?")return d(We,Te(":"),We)}function Ct(f,g){if(g=="<")return d(j(">"),Me(We,">"),ue,Ot)}function Bt(){return J(We,ht)}function ht(f,g){if(g=="=")return d(We)}function Nr(f,g){return g=="enum"?(D.marked="keyword",d(ce)):J(yt,or,Wt,mi)}function yt(f,g){if(_&&y(g))return D.marked="keyword",d(yt);if(f=="variable")return w(g),d();if(f=="spread")return d(yt);if(f=="[")return Lt(ln,"]");if(f=="{")return Lt(ar,"}")}function ar(f,g){return f=="variable"&&!D.stream.match(/^\s*:/,!1)?(w(g),d(Wt)):(f=="variable"&&(D.marked="property"),f=="spread"?d(yt):f=="}"?J():f=="["?d(oe,Te("]"),Te(":"),ar):d(Te(":"),yt,Wt))}function ln(){return J(yt,Wt)}function Wt(f,g){if(g=="=")return d(Ne)}function mi(f){if(f==",")return d(Nr)}function Or(f,g){if(f=="keyword b"&&g=="else")return d(j("form","else"),Le,ue)}function Wn(f,g){if(g=="await")return d(Wn);if(f=="(")return d(j(")"),an,ue)}function an(f){return f=="var"?d(Nr,sr):f=="variable"?d(sr):J(sr)}function sr(f,g){return f==")"?d():f==";"?d(sr):g=="in"||g=="of"?(D.marked="keyword",d(oe,sr)):J(oe,sr)}function Pt(f,g){if(g=="*")return D.marked="keyword",d(Pt);if(f=="variable")return w(g),d(Pt);if(f=="(")return d(c,j(")"),Me(_t,")"),ue,lr,Le,xe);if(_&&g=="<")return d(j(">"),Me(Bt,">"),ue,Pt)}function ur(f,g){if(g=="*")return D.marked="keyword",d(ur);if(f=="variable")return w(g),d(ur);if(f=="(")return d(c,j(")"),Me(_t,")"),ue,lr,xe);if(_&&g=="<")return d(j(">"),Me(Bt,">"),ue,ur)}function _n(f,g){if(f=="keyword"||f=="variable")return D.marked="type",d(_n);if(g=="<")return d(j(">"),Me(Bt,">"),ue)}function _t(f,g){return g=="@"&&d(oe,_t),f=="spread"?d(_t):_&&y(g)?(D.marked="keyword",d(_t)):_&&f=="this"?d(or,Wt):J(yt,or,Wt)}function yi(f,g){return f=="variable"?Pr(f,g):Ht(f,g)}function Pr(f,g){if(f=="variable")return w(g),d(Ht)}function Ht(f,g){if(g=="<")return d(j(">"),Me(Bt,">"),ue,Ht);if(g=="extends"||g=="implements"||_&&f==",")return g=="implements"&&(D.marked="keyword"),d(_?We:oe,Ht);if(f=="{")return d(j("}"),Rt,ue)}function Rt(f,g){if(f=="async"||f=="variable"&&(g=="static"||g=="get"||g=="set"||_&&y(g))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked="keyword",d(Rt);if(f=="variable"||D.style=="keyword")return D.marked="property",d(kr,Rt);if(f=="number"||f=="string")return d(kr,Rt);if(f=="[")return d(oe,or,Te("]"),kr,Rt);if(g=="*")return D.marked="keyword",d(Rt);if(_&&f=="(")return J(ur,Rt);if(f==";"||f==",")return d(Rt);if(f=="}")return d();if(g=="@")return d(oe,Rt)}function kr(f,g){if(g=="!"||g=="?")return d(kr);if(f==":")return d(We,Wt);if(g=="=")return d(Ne);var A=D.state.lexical.prev,W=A&&A.info=="interface";return J(W?ur:Pt)}function Ir(f,g){return g=="*"?(D.marked="keyword",d(Wr,Te(";"))):g=="default"?(D.marked="keyword",d(oe,Te(";"))):f=="{"?d(Me(zr,"}"),Wr,Te(";")):J(Le)}function zr(f,g){if(g=="as")return D.marked="keyword",d(Te("variable"));if(f=="variable")return J(Ne,zr)}function fr(f){return f=="string"?d():f=="("?J(oe):f=="."?J(Oe):J(Br,Gt,Wr)}function Br(f,g){return f=="{"?Lt(Br,"}"):(f=="variable"&&w(g),g=="*"&&(D.marked="keyword"),d(sn))}function Gt(f){if(f==",")return d(Br,Gt)}function sn(f,g){if(g=="as")return D.marked="keyword",d(Br)}function Wr(f,g){if(g=="from")return D.marked="keyword",d(oe)}function Je(f){return f=="]"?d():J(Me(Ne,"]"))}function ce(){return J(j("form"),yt,Te("{"),j("}"),Me(Vt,"}"),ue,ue)}function Vt(){return J(yt,Wt)}function un(f,g){return f.lastType=="operator"||f.lastType==","||q.test(g.charAt(0))||/[,.]/.test(g.charAt(0))}function Ft(f,g,A){return g.tokenize==re&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(g.lastType)||g.lastType=="quasi"&&/\{\s*$/.test(f.string.slice(0,f.pos-(A||0)))}return{startState:function(f){var g={tokenize:re,lastType:"sof",cc:[],lexical:new fe((f||0)-K,0,"block",!1),localVars:I.localVars,context:I.localVars&&new P(null,null,!1),indented:f||0};return I.globalVars&&typeof I.globalVars=="object"&&(g.globalVars=I.globalVars),g},token:function(f,g){if(f.sol()&&(g.lexical.hasOwnProperty("align")||(g.lexical.align=!1),g.indented=f.indentation(),de(f,g)),g.tokenize!=se&&f.eatSpace())return null;var A=g.tokenize(f,g);return ke=="comment"?A:(g.lastType=ke=="operator"&&(we=="++"||we=="--")?"incdec":ke,Ee(g,A,ke,we,f))},indent:function(f,g){if(f.tokenize==se||f.tokenize==Ae)return C.Pass;if(f.tokenize!=re)return 0;var A=g&&g.charAt(0),W=f.lexical,L;if(!/^\s*else\b/.test(g))for(var Z=f.cc.length-1;Z>=0;--Z){var _e=f.cc[Z];if(_e==ue)W=W.prev;else if(_e!=Or&&_e!=xe)break}for(;(W.type=="stat"||W.type=="form")&&(A=="}"||(L=f.cc[f.cc.length-1])&&(L==Oe||L==Re)&&!/^[,\.=+\-*:?[\(]/.test(g));)W=W.prev;$&&W.type==")"&&W.prev.type=="stat"&&(W=W.prev);var it=W.type,xt=A==it;return it=="vardef"?W.indented+(f.lastType=="operator"||f.lastType==","?W.info.length+1:0):it=="form"&&A=="{"?W.indented:it=="form"?W.indented+K:it=="stat"?W.indented+(un(f,g)?$||K:0):W.info=="switch"&&!xt&&I.doubleIndentSwitch!=!1?W.indented+(/^(?:case|default)\b/.test(g)?K:2*K):W.align?W.column+(xt?0:1):W.indented+(xt?0:K)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:b?null:"/*",blockCommentEnd:b?null:"*/",blockCommentContinue:b?null:" * ",lineComment:b?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:b?"json":"javascript",jsonldMode:V,jsonMode:b,expressionAllowed:Ft,skipExpression:function(f){Ee(f,"atom","atom","true",new C.StringStream("",2,null))}}}),C.registerHelper("wordChars","javascript",/[\w$]/),C.defineMIME("text/javascript","javascript"),C.defineMIME("text/ecmascript","javascript"),C.defineMIME("application/javascript","javascript"),C.defineMIME("application/x-javascript","javascript"),C.defineMIME("application/ecmascript","javascript"),C.defineMIME("application/json",{name:"javascript",json:!0}),C.defineMIME("application/x-json",{name:"javascript",json:!0}),C.defineMIME("application/manifest+json",{name:"javascript",json:!0}),C.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),C.defineMIME("text/typescript",{name:"javascript",typescript:!0}),C.defineMIME("application/typescript",{name:"javascript",typescript:!0})})}()),pa.exports}(function(Et,zt){(function(C){C(It,xa(),ba(),Su)})(function(C){var De={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function I(ie,O,q){var z=ie.current(),X=z.search(O);return X>-1?ie.backUp(z.length-X):z.match(/<\/?$/)&&(ie.backUp(z.length),ie.match(O,!1)||ie.match(z)),q}var K={};function $(ie){var O=K[ie];return O||(K[ie]=new RegExp("\\s+"+ie+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function V(ie,O){var q=ie.match($(O));return q?/^\s*(.*?)\s*$/.exec(q[2])[1]:""}function b(ie,O){return new RegExp((O?"^":"")+"","i")}function N(ie,O){for(var q in ie)for(var z=O[q]||(O[q]=[]),X=ie[q],ke=X.length-1;ke>=0;ke--)z.unshift(X[ke])}function _(ie,O){for(var q=0;q=0;we--)z.script.unshift(["type",ke[we].matches,ke[we].mode]);function te(re,ne){var se=q.token(re,ne.htmlState),Ae=/\btag\b/.test(se),ye;if(Ae&&!/[<>\s\/]/.test(re.current())&&(ye=ne.htmlState.tagName&&ne.htmlState.tagName.toLowerCase())&&z.hasOwnProperty(ye))ne.inTag=ye+" ";else if(ne.inTag&&Ae&&/>$/.test(re.current())){var de=/^([\S]+) (.*)/.exec(ne.inTag);ne.inTag=null;var ze=re.current()==">"&&_(z[de[1]],de[2]),fe=C.getMode(ie,ze),H=b(de[1],!0),Ee=b(de[1],!1);ne.token=function(D,J){return D.match(H,!1)?(J.token=te,J.localState=J.localMode=null,null):I(D,Ee,J.localMode.token(D,J.localState))},ne.localMode=fe,ne.localState=C.startState(fe,q.indent(ne.htmlState,"",""))}else ne.inTag&&(ne.inTag+=re.current(),re.eol()&&(ne.inTag+=" "));return se}return{startState:function(){var re=C.startState(q);return{token:te,inTag:null,localMode:null,localState:null,htmlState:re}},copyState:function(re){var ne;return re.localState&&(ne=C.copyState(re.localMode,re.localState)),{token:re.token,inTag:re.inTag,localMode:re.localMode,localState:ne,htmlState:C.copyState(q,re.htmlState)}},token:function(re,ne){return ne.token(re,ne)},indent:function(re,ne,se){return!re.localMode||/^\s*<\//.test(ne)?q.indent(re.htmlState,ne,se):re.localMode.indent?re.localMode.indent(re.localState,ne,se):C.Pass},innerMode:function(re){return{state:re.localState||re.htmlState,mode:re.localMode||q}}}},"xml","javascript","css"),C.defineMIME("text/html","htmlmixed")})})();ba();(function(Et,zt){(function(C){C(It)})(function(C){function De(N){return new RegExp("^(("+N.join(")|(")+"))\\b")}var I=De(["and","or","not","is"]),K=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],$=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];C.registerHelper("hintWords","python",K.concat($).concat(["exec","print"]));function V(N){return N.scopes[N.scopes.length-1]}C.defineMode("python",function(N,_){for(var ie="error",O=_.delimiters||_.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,q=[_.singleOperators,_.doubleOperators,_.doubleDelimiters,_.tripleDelimiters,_.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],z=0;zy?H(w):P0&&D(S,w)&&(le+=" "+ie),le}}return de(S,w)}function de(S,w,m){if(S.eatSpace())return null;if(!m&&S.match(/^#.*/))return"comment";if(S.match(/^[0-9\.]/,!1)){var y=!1;if(S.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(y=!0),S.match(/^[\d_]+\.\d*/)&&(y=!0),S.match(/^\.\d+/)&&(y=!0),y)return S.eat(/J/i),"number";var P=!1;if(S.match(/^0x[0-9a-f_]+/i)&&(P=!0),S.match(/^0b[01_]+/i)&&(P=!0),S.match(/^0o[0-7_]+/i)&&(P=!0),S.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(S.eat(/J/i),P=!0),S.match(/^0(?![\dx])/i)&&(P=!0),P)return S.eat(/L/i),"number"}if(S.match(ne)){var le=S.current().toLowerCase().indexOf("f")!==-1;return le?(w.tokenize=ze(S.current(),w.tokenize),w.tokenize(S,w)):(w.tokenize=fe(S.current(),w.tokenize),w.tokenize(S,w))}for(var p=0;p=0;)S=S.substr(1);var m=S.length==1,y="string";function P(p){return function(c,Y){var xe=de(c,Y,!0);return xe=="punctuation"&&(c.current()=="{"?Y.tokenize=P(p+1):c.current()=="}"&&(p>1?Y.tokenize=P(p-1):Y.tokenize=le)),xe}}function le(p,c){for(;!p.eol();)if(p.eatWhile(/[^'"\{\}\\]/),p.eat("\\")){if(p.next(),m&&p.eol())return y}else{if(p.match(S))return c.tokenize=w,y;if(p.match("{{"))return y;if(p.match("{",!1))return c.tokenize=P(0),p.current()?y:c.tokenize(p,c);if(p.match("}}"))return y;if(p.match("}"))return ie;p.eat(/['"]/)}if(m){if(_.singleLineStringErrors)return ie;c.tokenize=w}return y}return le.isString=!0,le}function fe(S,w){for(;"rubf".indexOf(S.charAt(0).toLowerCase())>=0;)S=S.substr(1);var m=S.length==1,y="string";function P(le,p){for(;!le.eol();)if(le.eatWhile(/[^'"\\]/),le.eat("\\")){if(le.next(),m&&le.eol())return y}else{if(le.match(S))return p.tokenize=w,y;le.eat(/['"]/)}if(m){if(_.singleLineStringErrors)return ie;p.tokenize=w}return y}return P.isString=!0,P}function H(S){for(;V(S).type!="py";)S.scopes.pop();S.scopes.push({offset:V(S).offset+N.indentUnit,type:"py",align:null})}function Ee(S,w,m){var y=S.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:S.column()+1;w.scopes.push({offset:w.indent+X,type:m,align:y})}function D(S,w){for(var m=S.indentation();w.scopes.length>1&&V(w).offset>m;){if(V(w).type!="py")return!0;w.scopes.pop()}return V(w).offset!=m}function J(S,w){S.sol()&&(w.beginningOfLine=!0,w.dedent=!1);var m=w.tokenize(S,w),y=S.current();if(w.beginningOfLine&&y=="@")return S.match(re,!1)?"meta":te?"operator":ie;if(/\S/.test(y)&&(w.beginningOfLine=!1),(m=="variable"||m=="builtin")&&w.lastToken=="meta"&&(m="meta"),(y=="pass"||y=="return")&&(w.dedent=!0),y=="lambda"&&(w.lambda=!0),y==":"&&!w.lambda&&V(w).type=="py"&&S.match(/^\s*(?:#|$)/,!1)&&H(w),y.length==1&&!/string|comment/.test(m)){var P="[({".indexOf(y);if(P!=-1&&Ee(S,w,"])}".slice(P,P+1)),P="])}".indexOf(y),P!=-1)if(V(w).type==y)w.indent=w.scopes.pop().offset-X;else return ie}return w.dedent&&S.eol()&&V(w).type=="py"&&w.scopes.length>1&&w.scopes.pop(),m}var d={startState:function(S){return{tokenize:ye,scopes:[{offset:S||0,type:"py",align:null}],indent:S||0,lastToken:null,lambda:!1,dedent:0}},token:function(S,w){var m=w.errorToken;m&&(w.errorToken=!1);var y=J(S,w);return y&&y!="comment"&&(w.lastToken=y=="keyword"||y=="punctuation"?S.current():y),y=="punctuation"&&(y=null),S.eol()&&w.lambda&&(w.lambda=!1),m?y+" "+ie:y},indent:function(S,w){if(S.tokenize!=ye)return S.tokenize.isString?C.Pass:0;var m=V(S),y=m.type==w.charAt(0)||m.type=="py"&&!S.dedent&&/^(else:|elif |except |finally:)/.test(w);return m.align!=null?m.align-(y?1:0):m.offset-(y?X:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return d}),C.defineMIME("text/x-python","python");var b=function(N){return N.split(" ")};C.defineMIME("text/x-cython",{name:"python",extra_keywords:b("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})})();(function(Et,zt){(function(C){C(It)})(function(C){function De(m,y,P,le,p,c){this.indented=m,this.column=y,this.type=P,this.info=le,this.align=p,this.prev=c}function I(m,y,P,le){var p=m.indented;return m.context&&m.context.type=="statement"&&P!="statement"&&(p=m.context.indented),m.context=new De(p,y,P,le,null,m.context)}function K(m){var y=m.context.type;return(y==")"||y=="]"||y=="}")&&(m.indented=m.context.indented),m.context=m.context.prev}function $(m,y,P){if(y.prevToken=="variable"||y.prevToken=="type"||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(m.string.slice(0,P))||y.typeAtEndOfLine&&m.column()==m.indentation())return!0}function V(m){for(;;){if(!m||m.type=="top")return!0;if(m.type=="}"&&m.prev.info!="namespace")return!1;m=m.prev}}C.defineMode("clike",function(m,y){var P=m.indentUnit,le=y.statementIndentUnit||P,p=y.dontAlignCalls,c=y.keywords||{},Y=y.types||{},xe=y.builtin||{},j=y.blockKeywords||{},ue=y.defKeywords||{},Te=y.atoms||{},Le=y.hooks||{},be=y.multiLineStrings,oe=y.indentStatements!==!1,Ne=y.indentSwitch!==!1,qe=y.namespaceSeparator,Ve=y.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,ct=y.numberStart||/[\d\.]/,Oe=y.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Re=y.isOperatorChar||/[+\-*&%=<>!?|\/]/,Ue=y.isIdentifierChar||/[\w\$_\xa1-\uffff]/,et=y.isReservedIdentifier||!1,ge,Pe;function T(ae,Se){var he=ae.next();if(Le[he]){var Be=Le[he](ae,Se);if(Be!==!1)return Be}if(he=='"'||he=="'")return Se.tokenize=B(he),Se.tokenize(ae,Se);if(ct.test(he)){if(ae.backUp(1),ae.match(Oe))return"number";ae.next()}if(Ve.test(he))return ge=he,null;if(he=="/"){if(ae.eat("*"))return Se.tokenize=F,F(ae,Se);if(ae.eat("/"))return ae.skipToEnd(),"comment"}if(Re.test(he)){for(;!ae.match(/^\/[\/*]/,!1)&&ae.eat(Re););return"operator"}if(ae.eatWhile(Ue),qe)for(;ae.match(qe);)ae.eatWhile(Ue);var Me=ae.current();return N(c,Me)?(N(j,Me)&&(ge="newstatement"),N(ue,Me)&&(Pe=!0),"keyword"):N(Y,Me)?"type":N(xe,Me)||et&&et(Me)?(N(j,Me)&&(ge="newstatement"),"builtin"):N(Te,Me)?"atom":"variable"}function B(ae){return function(Se,he){for(var Be=!1,Me,Lt=!1;(Me=Se.next())!=null;){if(Me==ae&&!Be){Lt=!0;break}Be=!Be&&Me=="\\"}return(Lt||!(Be||be))&&(he.tokenize=null),"string"}}function F(ae,Se){for(var he=!1,Be;Be=ae.next();){if(Be=="/"&&he){Se.tokenize=null;break}he=Be=="*"}return"comment"}function Ie(ae,Se){y.typeFirstDefinitions&&ae.eol()&&V(Se.context)&&(Se.typeAtEndOfLine=$(ae,Se,ae.pos))}return{startState:function(ae){return{tokenize:null,context:new De((ae||0)-P,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(ae,Se){var he=Se.context;if(ae.sol()&&(he.align==null&&(he.align=!1),Se.indented=ae.indentation(),Se.startOfLine=!0),ae.eatSpace())return Ie(ae,Se),null;ge=Pe=null;var Be=(Se.tokenize||T)(ae,Se);if(Be=="comment"||Be=="meta")return Be;if(he.align==null&&(he.align=!0),ge==";"||ge==":"||ge==","&&ae.match(/^\s*(?:\/\/.*)?$/,!1))for(;Se.context.type=="statement";)K(Se);else if(ge=="{")I(Se,ae.column(),"}");else if(ge=="[")I(Se,ae.column(),"]");else if(ge=="(")I(Se,ae.column(),")");else if(ge=="}"){for(;he.type=="statement";)he=K(Se);for(he.type=="}"&&(he=K(Se));he.type=="statement";)he=K(Se)}else ge==he.type?K(Se):oe&&((he.type=="}"||he.type=="top")&&ge!=";"||he.type=="statement"&&ge=="newstatement")&&I(Se,ae.column(),"statement",ae.current());if(Be=="variable"&&(Se.prevToken=="def"||y.typeFirstDefinitions&&$(ae,Se,ae.start)&&V(Se.context)&&ae.match(/^\s*\(/,!1))&&(Be="def"),Le.token){var Me=Le.token(ae,Se,Be);Me!==void 0&&(Be=Me)}return Be=="def"&&y.styleDefs===!1&&(Be="variable"),Se.startOfLine=!1,Se.prevToken=Pe?"def":Be||ge,Ie(ae,Se),Be},indent:function(ae,Se){if(ae.tokenize!=T&&ae.tokenize!=null||ae.typeAtEndOfLine&&V(ae.context))return C.Pass;var he=ae.context,Be=Se&&Se.charAt(0),Me=Be==he.type;if(he.type=="statement"&&Be=="}"&&(he=he.prev),y.dontIndentStatements)for(;he.type=="statement"&&y.dontIndentStatements.test(he.info);)he=he.prev;if(Le.indent){var Lt=Le.indent(ae,he,Se,P);if(typeof Lt=="number")return Lt}var Nt=he.prev&&he.prev.info=="switch";if(y.allmanIndentation&&/[{(]/.test(Be)){for(;he.type!="top"&&he.type!="}";)he=he.prev;return he.indented}return he.type=="statement"?he.indented+(Be=="{"?0:le):he.align&&(!p||he.type!=")")?he.column+(Me?0:1):he.type==")"&&!Me?he.indented+le:he.indented+(Me?0:P)+(!Me&&Nt&&!/^(?:case|default)\b/.test(Se)?P:0)},electricInput:Ne?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function b(m){for(var y={},P=m.split(" "),le=0;le!?|\/#:@]/,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,y){return m.match('""')?(y.tokenize=D,y.tokenize(m,y)):!1},"'":function(m){return m.match(/^(\\[^'\s]+|[^\\'])'/)?"string-2":(m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom")},"=":function(m,y){var P=y.context;return P.type=="}"&&P.align&&m.eat(">")?(y.context=new De(P.indented,P.column,P.type,P.info,null,P.prev),"operator"):!1},"/":function(m,y){return m.eat("*")?(y.tokenize=J(1),y.tokenize(m,y)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function d(m){return function(y,P){for(var le=!1,p,c=!1;!y.eol();){if(!m&&!le&&y.match('"')){c=!0;break}if(m&&y.match('"""')){c=!0;break}p=y.next(),!le&&p=="$"&&y.match("{")&&y.skipTo("}"),le=!le&&p=="\\"&&!m}return(c||!m)&&(P.tokenize=null),"string"}}Ee("text/x-kotlin",{name:"clike",keywords:b("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:b("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:b("catch class do else finally for if where try while enum"),defKeywords:b("class val var object interface fun"),atoms:b("true false null this"),hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},"*":function(m,y){return y.prevToken=="."?"variable":"operator"},'"':function(m,y){return y.tokenize=d(m.match('""')),y.tokenize(m,y)},"/":function(m,y){return m.eat("*")?(y.tokenize=J(1),y.tokenize(m,y)):!1},indent:function(m,y,P,le){var p=P&&P.charAt(0);if((m.prevToken=="}"||m.prevToken==")")&&P=="")return m.indented;if(m.prevToken=="operator"&&P!="}"&&m.context.type!="}"||m.prevToken=="variable"&&p=="."||(m.prevToken=="}"||m.prevToken==")")&&p==".")return le*2+y.indented;if(y.align&&y.type=="}")return y.indented+(m.context.type==(P||"").charAt(0)?0:le)}},modeProps:{closeBrackets:{triples:'"'}}}),Ee(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:b("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:b("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:b("for while do if else struct"),builtin:b("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:b("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":ne},modeProps:{fold:["brace","include"]}}),Ee("text/x-nesc",{name:"clike",keywords:b(_+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:ke,blockKeywords:b(te),atoms:b("null true false"),hooks:{"#":ne},modeProps:{fold:["brace","include"]}}),Ee("text/x-objectivec",{name:"clike",keywords:b(_+" "+O),types:we,builtin:b(q),blockKeywords:b(te+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:b(re+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:Ae,hooks:{"#":ne,"*":se},modeProps:{fold:["brace","include"]}}),Ee("text/x-objectivec++",{name:"clike",keywords:b(_+" "+O+" "+ie),types:we,builtin:b(q),blockKeywords:b(te+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:b(re+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:b("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:Ae,hooks:{"#":ne,"*":se,u:de,U:de,L:de,R:de,0:ye,1:ye,2:ye,3:ye,4:ye,5:ye,6:ye,7:ye,8:ye,9:ye,token:function(m,y,P){if(P=="variable"&&m.peek()=="("&&(y.prevToken==";"||y.prevToken==null||y.prevToken=="}")&&ze(m.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),Ee("text/x-squirrel",{name:"clike",keywords:b("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:ke,blockKeywords:b("case catch class else for foreach if switch try while"),defKeywords:b("function local class"),typeFirstDefinitions:!0,atoms:b("true false null"),hooks:{"#":ne},modeProps:{fold:["brace","include"]}});var S=null;function w(m){return function(y,P){for(var le=!1,p,c=!1;!y.eol();){if(!le&&y.match('"')&&(m=="single"||y.match('""'))){c=!0;break}if(!le&&y.match("``")){S=w(m),c=!0;break}p=y.next(),le=m=="single"&&!le&&p=="\\"}return c&&(P.tokenize=null),"string"}}Ee("text/x-ceylon",{name:"clike",keywords:b("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(m){var y=m.charAt(0);return y===y.toUpperCase()&&y!==y.toLowerCase()},blockKeywords:b("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:b("class dynamic function interface module object package value"),builtin:b("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:b("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(m){return m.eatWhile(/[\w\$_]/),"meta"},'"':function(m,y){return y.tokenize=w(m.match('""')?"triple":"single"),y.tokenize(m,y)},"`":function(m,y){return!S||!m.match("`")?!1:(y.tokenize=S,S=null,y.tokenize(m,y))},"'":function(m){return m.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(m,y,P){if((P=="variable"||P=="type")&&y.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})})();var va={exports:{}},ma;function Tu(){return ma||(ma=1,function(Et,zt){(function(C){C(It)})(function(C){C.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var De=0;De-1&&K.substring(b+1,K.length);if(N)return C.findModeByExtension(N)},C.findModeByName=function(K){K=K.toLowerCase();for(var $=0;$` "'(~:]+/,ke=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,we=/^\s*\[[^\]]+?\]:.*$/,te=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,re=" ";function ne(p,c,Y){return c.f=c.inline=Y,Y(p,c)}function se(p,c,Y){return c.f=c.block=Y,Y(p,c)}function Ae(p){return!p||!/\S/.test(p.string)}function ye(p){if(p.linkTitle=!1,p.linkHref=!1,p.linkText=!1,p.em=!1,p.strong=!1,p.strikethrough=!1,p.quote=0,p.indentedCode=!1,p.f==ze){var c=$;if(!c){var Y=C.innerMode(K,p.htmlState);c=Y.mode.name=="xml"&&Y.state.tagStart===null&&!Y.state.context&&Y.state.tokenize.isInText}c&&(p.f=D,p.block=de,p.htmlState=null)}return p.trailingSpace=0,p.trailingSpaceNewLine=!1,p.prevLine=p.thisLine,p.thisLine={stream:null},null}function de(p,c){var Y=p.column()===c.indentation,xe=Ae(c.prevLine.stream),j=c.indentedCode,ue=c.prevLine.hr,Te=c.list!==!1,Le=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var be=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,Te)){for(c.list=null;be=4&&(j||c.prevLine.fencedCodeEnd||c.prevLine.header||xe))return p.skipToEnd(),c.indentedCode=!0,b.code;if(p.eatSpace())return null;if(Y&&c.indentation<=Le&&(qe=p.match(q))&&qe[1].length<=6)return c.quote=0,c.header=qe[1].length,c.thisLine.header=!0,I.highlightFormatting&&(c.formatting="header"),c.f=c.inline,H(c);if(c.indentation<=Le&&p.eat(">"))return c.quote=Y?1:c.quote+1,I.highlightFormatting&&(c.formatting="quote"),p.eatSpace(),H(c);if(!Ne&&!c.setext&&Y&&c.indentation<=Le&&(qe=p.match(ie))){var Ve=qe[1]?"ol":"ul";return c.indentation=be+p.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,I.taskLists&&p.match(O,!1)&&(c.taskList=!0),c.f=c.inline,I.highlightFormatting&&(c.formatting=["list","list-"+Ve]),H(c)}else{if(Y&&c.indentation<=Le&&(qe=p.match(ke,!0)))return c.quote=0,c.fencedEndRE=new RegExp(qe[1]+"+ *$"),c.localMode=I.fencedCodeBlockHighlighting&&V(qe[2]||I.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=C.startState(c.localMode)),c.f=c.block=fe,I.highlightFormatting&&(c.formatting="code-block"),c.code=-1,H(c);if(c.setext||(!oe||!Te)&&!c.quote&&c.list===!1&&!c.code&&!Ne&&!we.test(p.string)&&(qe=p.lookAhead(1))&&(qe=qe.match(z)))return c.setext?(c.header=c.setext,c.setext=0,p.skipToEnd(),I.highlightFormatting&&(c.formatting="header")):(c.header=qe[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,H(c);if(Ne)return p.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,b.hr;if(p.peek()==="[")return ne(p,c,m)}return ne(p,c,c.inline)}function ze(p,c){var Y=K.token(p,c.htmlState);if(!$){var xe=C.innerMode(K,c.htmlState);(xe.mode.name=="xml"&&xe.state.tagStart===null&&!xe.state.context&&xe.state.tokenize.isInText||c.md_inside&&p.current().indexOf(">")>-1)&&(c.f=D,c.block=de,c.htmlState=null)}return Y}function fe(p,c){var Y=c.listStack[c.listStack.length-1]||0,xe=c.indentation=p.quote?c.push(b.formatting+"-"+p.formatting[Y]+"-"+p.quote):c.push("error"))}if(p.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(p.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(p.linkHref?c.push(b.linkHref,"url"):(p.strong&&c.push(b.strong),p.em&&c.push(b.em),p.strikethrough&&c.push(b.strikethrough),p.emoji&&c.push(b.emoji),p.linkText&&c.push(b.linkText),p.code&&c.push(b.code),p.image&&c.push(b.image),p.imageAltText&&c.push(b.imageAltText,"link"),p.imageMarker&&c.push(b.imageMarker)),p.header&&c.push(b.header,b.header+"-"+p.header),p.quote&&(c.push(b.quote),!I.maxBlockquoteDepth||I.maxBlockquoteDepth>=p.quote?c.push(b.quote+"-"+p.quote):c.push(b.quote+"-"+I.maxBlockquoteDepth)),p.list!==!1){var xe=(p.listStack.length-1)%3;xe?xe===1?c.push(b.list2):c.push(b.list3):c.push(b.list1)}return p.trailingSpaceNewLine?c.push("trailing-space-new-line"):p.trailingSpace&&c.push("trailing-space-"+(p.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function Ee(p,c){if(p.match(X,!0))return H(c)}function D(p,c){var Y=c.text(p,c);if(typeof Y<"u")return Y;if(c.list)return c.list=null,H(c);if(c.taskList){var xe=p.match(O,!0)[1]===" ";return xe?c.taskOpen=!0:c.taskClosed=!0,I.highlightFormatting&&(c.formatting="task"),c.taskList=!1,H(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&p.match(/^#+$/,!0))return I.highlightFormatting&&(c.formatting="header"),H(c);var j=p.next();if(c.linkTitle){c.linkTitle=!1;var ue=j;j==="("&&(ue=")"),ue=(ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Te="^\\s*(?:[^"+ue+"\\\\]+|\\\\\\\\|\\\\.)"+ue;if(p.match(new RegExp(Te),!0))return b.linkHref}if(j==="`"){var Le=c.formatting;I.highlightFormatting&&(c.formatting="code"),p.eatWhile("`");var be=p.current().length;if(c.code==0&&(!c.quote||be==1))return c.code=be,H(c);if(be==c.code){var oe=H(c);return c.code=0,oe}else return c.formatting=Le,H(c)}else if(c.code)return H(c);if(j==="\\"&&(p.next(),I.highlightFormatting)){var Ne=H(c),qe=b.formatting+"-escape";return Ne?Ne+" "+qe:qe}if(j==="!"&&p.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,I.highlightFormatting&&(c.formatting="image"),H(c);if(j==="["&&c.imageMarker&&p.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,I.highlightFormatting&&(c.formatting="image"),H(c);if(j==="]"&&c.imageAltText){I.highlightFormatting&&(c.formatting="image");var Ne=H(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=d,Ne}if(j==="["&&!c.image)return c.linkText&&p.match(/^.*?\]/)||(c.linkText=!0,I.highlightFormatting&&(c.formatting="link")),H(c);if(j==="]"&&c.linkText){I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return c.linkText=!1,c.inline=c.f=p.match(/\(.*?\)| ?\[.*?\]/,!1)?d:D,Ne}if(j==="<"&&p.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=J,I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return Ne?Ne+=" ":Ne="",Ne+b.linkInline}if(j==="<"&&p.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=J,I.highlightFormatting&&(c.formatting="link");var Ne=H(c);return Ne?Ne+=" ":Ne="",Ne+b.linkEmail}if(I.xml&&j==="<"&&p.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ve=p.string.indexOf(">",p.pos);if(Ve!=-1){var ct=p.string.substring(p.start,Ve);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ct)&&(c.md_inside=!0)}return p.backUp(1),c.htmlState=C.startState(K),se(p,c,ze)}if(I.xml&&j==="<"&&p.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(j==="*"||j==="_"){for(var Oe=1,Re=p.pos==1?" ":p.string.charAt(p.pos-2);Oe<3&&p.eat(j);)Oe++;var Ue=p.peek()||" ",et=!/\s/.test(Ue)&&(!te.test(Ue)||/\s/.test(Re)||te.test(Re)),ge=!/\s/.test(Re)&&(!te.test(Re)||/\s/.test(Ue)||te.test(Ue)),Pe=null,T=null;if(Oe%2&&(!c.em&&et&&(j==="*"||!ge||te.test(Re))?Pe=!0:c.em==j&&ge&&(j==="*"||!et||te.test(Ue))&&(Pe=!1)),Oe>1&&(!c.strong&&et&&(j==="*"||!ge||te.test(Re))?T=!0:c.strong==j&&ge&&(j==="*"||!et||te.test(Ue))&&(T=!1)),T!=null||Pe!=null){I.highlightFormatting&&(c.formatting=Pe==null?"strong":T==null?"em":"strong em"),Pe===!0&&(c.em=j),T===!0&&(c.strong=j);var oe=H(c);return Pe===!1&&(c.em=!1),T===!1&&(c.strong=!1),oe}}else if(j===" "&&(p.eat("*")||p.eat("_"))){if(p.peek()===" ")return H(c);p.backUp(1)}if(I.strikethrough){if(j==="~"&&p.eatWhile(j)){if(c.strikethrough){I.highlightFormatting&&(c.formatting="strikethrough");var oe=H(c);return c.strikethrough=!1,oe}else if(p.match(/^[^\s]/,!1))return c.strikethrough=!0,I.highlightFormatting&&(c.formatting="strikethrough"),H(c)}else if(j===" "&&p.match("~~",!0)){if(p.peek()===" ")return H(c);p.backUp(2)}}if(I.emoji&&j===":"&&p.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,I.highlightFormatting&&(c.formatting="emoji");var B=H(c);return c.emoji=!1,B}return j===" "&&(p.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),H(c)}function J(p,c){var Y=p.next();if(Y===">"){c.f=c.inline=D,I.highlightFormatting&&(c.formatting="link");var xe=H(c);return xe?xe+=" ":xe="",xe+b.linkInline}return p.match(/^[^>]+/,!0),b.linkInline}function d(p,c){if(p.eatSpace())return null;var Y=p.next();return Y==="("||Y==="["?(c.f=c.inline=w(Y==="("?")":"]"),I.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,H(c)):"error"}var S={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function w(p){return function(c,Y){var xe=c.next();if(xe===p){Y.f=Y.inline=D,I.highlightFormatting&&(Y.formatting="link-string");var j=H(Y);return Y.linkHref=!1,j}return c.match(S[p]),Y.linkHref=!0,H(Y)}}function m(p,c){return p.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=y,p.next(),I.highlightFormatting&&(c.formatting="link"),c.linkText=!0,H(c)):ne(p,c,D)}function y(p,c){if(p.match("]:",!0)){c.f=c.inline=P,I.highlightFormatting&&(c.formatting="link");var Y=H(c);return c.linkText=!1,Y}return p.match(/^([^\]\\]|\\.)+/,!0),b.linkText}function P(p,c){return p.eatSpace()?null:(p.match(/^[^\s]+/,!0),p.peek()===void 0?c.linkTitle=!0:p.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),c.f=c.inline=D,b.linkHref+" url")}var le={startState:function(){return{f:de,prevLine:{stream:null},thisLine:{stream:null},block:de,htmlState:null,indentation:0,inline:D,text:Ee,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(p){return{f:p.f,prevLine:p.prevLine,thisLine:p.thisLine,block:p.block,htmlState:p.htmlState&&C.copyState(K,p.htmlState),indentation:p.indentation,localMode:p.localMode,localState:p.localMode?C.copyState(p.localMode,p.localState):null,inline:p.inline,text:p.text,formatting:!1,linkText:p.linkText,linkTitle:p.linkTitle,linkHref:p.linkHref,code:p.code,em:p.em,strong:p.strong,strikethrough:p.strikethrough,emoji:p.emoji,header:p.header,setext:p.setext,hr:p.hr,taskList:p.taskList,list:p.list,listStack:p.listStack.slice(0),quote:p.quote,indentedCode:p.indentedCode,trailingSpace:p.trailingSpace,trailingSpaceNewLine:p.trailingSpaceNewLine,md_inside:p.md_inside,fencedEndRE:p.fencedEndRE}},token:function(p,c){if(c.formatting=!1,p!=c.thisLine.stream){if(c.header=0,c.hr=!1,p.match(/^\s*$/,!0))return ye(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:p},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=ze)){var Y=p.match(/^\s*/,!0)[0].replace(/\t/g,re).length;if(c.indentation=Y,c.indentationDiff=null,Y>0)return null}}return c.f(p,c)},innerMode:function(p){return p.block==ze?{state:p.htmlState,mode:K}:p.localState?{state:p.localState,mode:p.localMode}:{state:p,mode:le}},indent:function(p,c,Y){return p.block==ze&&K.indent?K.indent(p.htmlState,c,Y):p.localState&&p.localMode.indent?p.localMode.indent(p.localState,c,Y):C.Pass},blankLine:ye,getType:H,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return le},"xml"),C.defineMIME("text/markdown","markdown"),C.defineMIME("text/x-markdown","markdown")})})();(function(Et,zt){(function(C){C(It)})(function(C){C.defineOption("placeholder","",function(N,_,ie){var O=ie&&ie!=C.Init;if(_&&!O)N.on("blur",$),N.on("change",V),N.on("swapDoc",V),C.on(N.getInputField(),"compositionupdate",N.state.placeholderCompose=function(){K(N)}),V(N);else if(!_&&O){N.off("blur",$),N.off("change",V),N.off("swapDoc",V),C.off(N.getInputField(),"compositionupdate",N.state.placeholderCompose),De(N);var q=N.getWrapperElement();q.className=q.className.replace(" CodeMirror-empty","")}_&&!N.hasFocus()&&$(N)});function De(N){N.state.placeholder&&(N.state.placeholder.parentNode.removeChild(N.state.placeholder),N.state.placeholder=null)}function I(N){De(N);var _=N.state.placeholder=document.createElement("pre");_.style.cssText="height: 0; overflow: visible",_.style.direction=N.getOption("direction"),_.className="CodeMirror-placeholder CodeMirror-line-like";var ie=N.getOption("placeholder");typeof ie=="string"&&(ie=document.createTextNode(ie)),_.appendChild(ie),N.display.lineSpace.insertBefore(_,N.display.lineSpace.firstChild)}function K(N){setTimeout(function(){var _=!1;if(N.lineCount()==1){var ie=N.getInputField();_=ie.nodeName=="TEXTAREA"?!N.getLine(0).length:!/[^\u200b]/.test(ie.querySelector(".CodeMirror-line").textContent)}_?I(N):De(N)},20)}function $(N){b(N)&&I(N)}function V(N){var _=N.getWrapperElement(),ie=b(N);_.className=_.className.replace(" CodeMirror-empty","")+(ie?" CodeMirror-empty":""),ie?I(N):De(N)}function b(N){return N.lineCount()===1&&N.getLine(0)===""}})})();(function(Et,zt){(function(C){C(It)})(function(C){C.defineSimpleMode=function(O,q){C.defineMode(O,function(z){return C.simpleMode(z,q)})},C.simpleMode=function(O,q){De(q,"start");var z={},X=q.meta||{},ke=!1;for(var we in q)if(we!=X&&q.hasOwnProperty(we))for(var te=z[we]=[],re=q[we],ne=0;ne2&&se.token&&typeof se.token!="string"){for(var de=2;de-1)return C.Pass;var we=z.indent.length-1,te=O[z.state];e:for(;;){for(var re=0;re$.keyCol)return K.skipToEnd(),"string";if($.literal&&($.literal=!1),K.sol()){if($.keyCol=0,$.pair=!1,$.pairStart=!1,K.match("---")||K.match("..."))return"def";if(K.match(/\s*-\s+/))return"meta"}if(K.match(/^(\{|\}|\[|\])/))return V=="{"?$.inlinePairs++:V=="}"?$.inlinePairs--:V=="["?$.inlineList++:$.inlineList--,"meta";if($.inlineList>0&&!b&&V==",")return K.next(),"meta";if($.inlinePairs>0&&!b&&V==",")return $.keyCol=0,$.pair=!1,$.pairStart=!1,K.next(),"meta";if($.pairStart){if(K.match(/^\s*(\||\>)\s*/))return $.literal=!0,"meta";if(K.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if($.inlinePairs==0&&K.match(/^\s*-?[0-9\.\,]+\s?$/)||$.inlinePairs>0&&K.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(K.match(I))return"keyword"}return!$.pair&&K.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)?($.pair=!0,$.keyCol=K.indentation(),"atom"):$.pair&&K.match(/^:\s*/)?($.pairStart=!0,"meta"):($.pairStart=!1,$.escaped=V=="\\",K.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),C.defineMIME("text/x-yaml","yaml"),C.defineMIME("text/yaml","yaml")})})();export{Cu as default}; diff --git a/tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-5nVJRt0A.js b/tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-5nVJRt0A.js deleted file mode 100755 index 25140c21..00000000 --- a/tvapp2/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-5nVJRt0A.js +++ /dev/null @@ -1,243 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-CyuxU5C-.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]); -var Y0=Object.defineProperty;var Z0=(t,e,n)=>e in t?Y0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var W=(t,e,n)=>Z0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var mb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ev(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fh={exports:{}},ll={},zh={exports:{}},z={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pi=Symbol.for("react.element"),tv=Symbol.for("react.portal"),nv=Symbol.for("react.fragment"),rv=Symbol.for("react.strict_mode"),sv=Symbol.for("react.profiler"),iv=Symbol.for("react.provider"),ov=Symbol.for("react.context"),lv=Symbol.for("react.forward_ref"),av=Symbol.for("react.suspense"),cv=Symbol.for("react.memo"),uv=Symbol.for("react.lazy"),jf=Symbol.iterator;function fv(t){return t===null||typeof t!="object"?null:(t=jf&&t[jf]||t["@@iterator"],typeof t=="function"?t:null)}var Bh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Uh=Object.assign,Hh={};function Xr(t,e,n){this.props=t,this.context=e,this.refs=Hh,this.updater=n||Bh}Xr.prototype.isReactComponent={};Xr.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Xr.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Vh(){}Vh.prototype=Xr.prototype;function Xc(t,e,n){this.props=t,this.context=e,this.refs=Hh,this.updater=n||Bh}var Gc=Xc.prototype=new Vh;Gc.constructor=Xc;Uh(Gc,Xr.prototype);Gc.isPureReactComponent=!0;var Mf=Array.isArray,qh=Object.prototype.hasOwnProperty,Jc={current:null},Wh={key:!0,ref:!0,__self:!0,__source:!0};function Kh(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)qh.call(e,r)&&!Wh.hasOwnProperty(r)&&(s[r]=e[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1{let o=!1;return t().then(l=>{o||i(l)}),()=>{o=!0}},e),s}function Xn(){const t=tt.useRef(null),[e,n]=tt.useState(new DOMRect(0,0,10,10));return tt.useLayoutEffect(()=>{const r=t.current;if(!r)return;const s=r.getBoundingClientRect();n(new DOMRect(0,0,s.width,s.height));const i=new ResizeObserver(o=>{const l=o[o.length-1];l&&l.contentRect&&n(l.contentRect)});return i.observe(r),()=>i.disconnect()},[t]),[e,t]}function Pe(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0)+"ms";const e=t/1e3;if(e<60)return e.toFixed(1)+"s";const n=e/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function kv(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0);const e=t/1024;if(e<1e3)return e.toFixed(1)+"K";const n=e/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function Xh(t,e,n,r,s){let i=0,o=s!==void 0?s:t.length;for(;i>1;n(e,t[l])>=0?i=l+1:o=l}return o}function $f(t){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function Dr(t,e){t&&(e=jn.getObject(t,e));const[n,r]=tt.useState(e),s=tt.useCallback(i=>{t?jn.setObject(t,i):r(i)},[t,r]);return tt.useEffect(()=>{if(t){const i=()=>r(jn.getObject(t,e));return jn.onChangeEmitter.addEventListener(t,i),()=>jn.onChangeEmitter.removeEventListener(t,i)}},[e,t]),[n,s]}class Ev{constructor(){this.onChangeEmitter=new EventTarget}getString(e,n){return localStorage[e]||n}setString(e,n){var r;localStorage[e]=n,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,n){if(!localStorage[e])return n;try{return JSON.parse(localStorage[e])}catch{return n}}setObject(e,n){var r;localStorage[e]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const jn=new Ev;function le(...t){return t.filter(Boolean).join(" ")}function Gh(t){t&&(t!=null&&t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t==null||t.scrollIntoView())}const Pf="\\u0000-\\u0020\\u007f-\\u009f",Jh=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Pf+'"]{2,}[^\\s'+Pf+`"')}\\],:;.!?]`,"ug");function bv(){const[t,e]=tt.useState(!1),n=tt.useCallback(()=>{const r=[];return e(s=>(r.push(setTimeout(()=>e(!1),1e3)),s?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[t,n]}function gb(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",n=>{n.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",n=>{document.body.classList.add("inactive")},!1);const t=jn.getString("theme","light-mode"),e=window.matchMedia("(prefers-color-scheme: dark)");(t==="dark-mode"||e.matches)&&document.body.classList.add("dark-mode")}const Zc=new Set;function Tv(){const t=za(),e=t==="dark-mode"?"light-mode":"dark-mode";t&&document.body.classList.remove(t),document.body.classList.add(e),jn.setString("theme",e);for(const n of Zc)n(e)}function yb(t){Zc.add(t)}function vb(t){Zc.delete(t)}function za(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function Nv(){const[t,e]=tt.useState(za()==="dark-mode");return[t,n=>{za()==="dark-mode"!==n&&Tv(),e(n)}]}var Yh={exports:{}},st={},Zh={exports:{}},ep={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(t){function e(j,$){var D=j.length;j.push($);e:for(;0>>1,ce=j[q];if(0>>1;qs(as,D))Cts(ke,as)?(j[q]=ke,j[Ct]=D,q=Ct):(j[q]=as,j[Ie]=D,q=Ie);else if(Cts(ke,D))j[q]=ke,j[Ct]=D,q=Ct;else break e}}return $}function s(j,$){var D=j.sortIndex-$.sortIndex;return D!==0?D:j.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var a=[],c=[],u=1,f=null,d=3,h=!1,v=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(j){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=j)r(c),$.sortIndex=$.expirationTime,e(a,$);else break;$=n(c)}}function x(j){if(m=!1,S(j),!v)if(n(a)!==null)v=!0,Be(_);else{var $=n(c);$!==null&&Le(x,$.startTime-j)}}function _(j,$){v=!1,m&&(m=!1,y(E),E=-1),h=!0;var D=d;try{for(S($),f=n(a);f!==null&&(!(f.expirationTime>$)||j&&!L());){var q=f.callback;if(typeof q=="function"){f.callback=null,d=f.priorityLevel;var ce=q(f.expirationTime<=$);$=t.unstable_now(),typeof ce=="function"?f.callback=ce:f===n(a)&&r(a),S($)}else r(a);f=n(a)}if(f!==null)var Rt=!0;else{var Ie=n(c);Ie!==null&&Le(x,Ie.startTime-$),Rt=!1}return Rt}finally{f=null,d=D,h=!1}}var b=!1,T=null,E=-1,k=5,A=-1;function L(){return!(t.unstable_now()-Aj||125q?(j.sortIndex=D,e(c,j),n(a)===null&&j===n(c)&&(m?(y(E),E=-1):m=!0,Le(x,D-q))):(j.sortIndex=ce,e(a,j),v||h||(v=!0,Be(_))),j},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(j){var $=d;return function(){var D=d;d=$;try{return j.apply(this,arguments)}finally{d=D}}}})(ep);Zh.exports=ep;var Cv=Zh.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var tp=N,rt=Cv;function I(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ba=Object.prototype.hasOwnProperty,Av=/^[: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]*$/,Rf={},Df={};function Lv(t){return Ba.call(Df,t)?!0:Ba.call(Rf,t)?!1:Av.test(t)?Df[t]=!0:(Rf[t]=!0,!1)}function Iv(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function jv(t,e,n,r){if(e===null||typeof e>"u"||Iv(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ze(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){_e[t]=new ze(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];_e[e]=new ze(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){_e[t]=new ze(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){_e[t]=new ze(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){_e[t]=new ze(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){_e[t]=new ze(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){_e[t]=new ze(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){_e[t]=new ze(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){_e[t]=new ze(t,5,!1,t.toLowerCase(),null,!1,!1)});var eu=/[\-:]([a-z])/g;function tu(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(eu,tu);_e[e]=new ze(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){_e[t]=new ze(t,1,!1,t.toLowerCase(),null,!1,!1)});_e.xlinkHref=new ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){_e[t]=new ze(t,1,!1,t.toLowerCase(),null,!0,!0)});function nu(t,e,n,r){var s=_e.hasOwnProperty(e)?_e[e]:null;(s!==null?s.type!==0:r||!(2l||s[o]!==i[l]){var a=` -`+s[o].replace(" at new "," at ");return t.displayName&&a.includes("")&&(a=a.replace("",t.displayName)),a}while(1<=o&&0<=l);break}}}finally{Ql=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?bs(t):""}function Mv(t){switch(t.tag){case 5:return bs(t.type);case 16:return bs("Lazy");case 13:return bs("Suspense");case 19:return bs("SuspenseList");case 0:case 2:case 15:return t=Xl(t.type,!1),t;case 11:return t=Xl(t.type.render,!1),t;case 1:return t=Xl(t.type,!0),t;default:return""}}function qa(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case dr:return"Fragment";case fr:return"Portal";case Ua:return"Profiler";case ru:return"StrictMode";case Ha:return"Suspense";case Va:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case sp:return(t.displayName||"Context")+".Consumer";case rp:return(t._context.displayName||"Context")+".Provider";case su:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case iu:return e=t.displayName||null,e!==null?e:qa(t.type)||"Memo";case rn:e=t._payload,t=t._init;try{return qa(t(e))}catch{}}return null}function Ov(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return qa(e);case 8:return e===ru?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function _n(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function op(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $v(t){var e=op(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ti(t){t._valueTracker||(t._valueTracker=$v(t))}function lp(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=op(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ko(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}}function Wa(t,e){var n=e.checked;return se({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function zf(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=_n(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ap(t,e){e=e.checked,e!=null&&nu(t,"checked",e,!1)}function Ka(t,e){ap(t,e);var n=_n(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Qa(t,e.type,n):e.hasOwnProperty("defaultValue")&&Qa(t,e.type,_n(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Bf(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Qa(t,e,n){(e!=="number"||ko(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ts=Array.isArray;function Ar(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=Ni.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ks(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Os={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pv=["Webkit","ms","Moz","O"];Object.keys(Os).forEach(function(t){Pv.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Os[e]=Os[t]})});function dp(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Os.hasOwnProperty(t)&&Os[t]?(""+e).trim():e+"px"}function hp(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=dp(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var Rv=se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ja(t,e){if(e){if(Rv[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(I(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(I(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(I(61))}if(e.style!=null&&typeof e.style!="object")throw Error(I(62))}}function Ya(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";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 Za=null;function ou(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ec=null,Lr=null,Ir=null;function Vf(t){if(t=yi(t)){if(typeof ec!="function")throw Error(I(280));var e=t.stateNode;e&&(e=dl(e),ec(t.stateNode,t.type,e))}}function pp(t){Lr?Ir?Ir.push(t):Ir=[t]:Lr=t}function mp(){if(Lr){var t=Lr,e=Ir;if(Ir=Lr=null,Vf(t),e)for(t=0;t>>=0,t===0?32:31-(Qv(t)/Xv|0)|0}var Ci=64,Ai=4194304;function Ns(t){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: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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function No(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=Ns(l):(i&=o,i!==0&&(r=Ns(i)))}else o=n&~s,o!==0?r=Ns(o):i!==0&&(r=Ns(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function mi(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-kt(e),t[e]=n}function Zv(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Ps),Zf=" ",ed=!1;function $p(t,e){switch(t){case"keyup":return Nw.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hr=!1;function Aw(t,e){switch(t){case"compositionend":return Pp(e);case"keypress":return e.which!==32?null:(ed=!0,Zf);case"textInput":return t=e.data,t===Zf&&ed?null:t;default:return null}}function Lw(t,e){if(hr)return t==="compositionend"||!pu&&$p(t,e)?(t=Mp(),to=fu=un=null,hr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sd(n)}}function zp(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?zp(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Bp(){for(var t=window,e=ko();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ko(t.document)}return e}function mu(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Fw(t){var e=Bp(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&zp(n.ownerDocument.documentElement,n)){if(r!==null&&mu(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=id(n,i);var o=id(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,pr=null,oc=null,Ds=null,lc=!1;function od(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lc||pr==null||pr!==ko(r)||(r=pr,"selectionStart"in r&&mu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ds&&Zs(Ds,r)||(Ds=r,r=Lo(oc,"onSelect"),0yr||(t.current=hc[yr],hc[yr]=null,yr--)}function V(t,e){yr++,hc[yr]=t.current,t.current=e}var kn={},Ae=Nn(kn),Xe=Nn(!1),Hn=kn;function zr(t,e){var n=t.type.contextTypes;if(!n)return kn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Ge(t){return t=t.childContextTypes,t!=null}function jo(){Q(Xe),Q(Ae)}function hd(t,e,n){if(Ae.current!==kn)throw Error(I(168));V(Ae,e),V(Xe,n)}function Gp(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(I(108,Ov(t)||"Unknown",s));return se({},n,r)}function Mo(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||kn,Hn=Ae.current,V(Ae,t),V(Xe,Xe.current),!0}function pd(t,e,n){var r=t.stateNode;if(!r)throw Error(I(169));n?(t=Gp(t,e,Hn),r.__reactInternalMemoizedMergedChildContext=t,Q(Xe),Q(Ae),V(Ae,t)):Q(Xe),V(Xe,n)}var Ht=null,hl=!1,ca=!1;function Jp(t){Ht===null?Ht=[t]:Ht.push(t)}function Jw(t){hl=!0,Jp(t)}function Cn(){if(!ca&&Ht!==null){ca=!0;var t=0,e=U;try{var n=Ht;for(U=1;t>=o,s-=o,Vt=1<<32-kt(e)+s|n<E?(k=T,T=null):k=T.sibling;var A=d(y,T,S[E],x);if(A===null){T===null&&(T=k);break}t&&T&&A.alternate===null&&e(y,T),g=i(A,g,E),b===null?_=A:b.sibling=A,b=A,T=k}if(E===S.length)return n(y,T),J&&An(y,E),_;if(T===null){for(;EE?(k=T,T=null):k=T.sibling;var L=d(y,T,A.value,x);if(L===null){T===null&&(T=k);break}t&&T&&L.alternate===null&&e(y,T),g=i(L,g,E),b===null?_=L:b.sibling=L,b=L,T=k}if(A.done)return n(y,T),J&&An(y,E),_;if(T===null){for(;!A.done;E++,A=S.next())A=f(y,A.value,x),A!==null&&(g=i(A,g,E),b===null?_=A:b.sibling=A,b=A);return J&&An(y,E),_}for(T=r(y,T);!A.done;E++,A=S.next())A=h(T,y,E,A.value,x),A!==null&&(t&&A.alternate!==null&&T.delete(A.key===null?E:A.key),g=i(A,g,E),b===null?_=A:b.sibling=A,b=A);return t&&T.forEach(function(C){return e(y,C)}),J&&An(y,E),_}function w(y,g,S,x){if(typeof S=="object"&&S!==null&&S.type===dr&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case bi:e:{for(var _=S.key,b=g;b!==null;){if(b.key===_){if(_=S.type,_===dr){if(b.tag===7){n(y,b.sibling),g=s(b,S.props.children),g.return=y,y=g;break e}}else if(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===rn&&xd(_)===b.type){n(y,b.sibling),g=s(b,S.props),g.ref=ms(y,b,S),g.return=y,y=g;break e}n(y,b);break}else e(y,b);b=b.sibling}S.type===dr?(g=Bn(S.props.children,y.mode,x,S.key),g.return=y,y=g):(x=co(S.type,S.key,S.props,null,y.mode,x),x.ref=ms(y,g,S),x.return=y,y=x)}return o(y);case fr:e:{for(b=S.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===S.containerInfo&&g.stateNode.implementation===S.implementation){n(y,g.sibling),g=s(g,S.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else e(y,g);g=g.sibling}g=ya(S,y.mode,x),g.return=y,y=g}return o(y);case rn:return b=S._init,w(y,g,b(S._payload),x)}if(Ts(S))return v(y,g,S,x);if(us(S))return m(y,g,S,x);Pi(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,g!==null&&g.tag===6?(n(y,g.sibling),g=s(g,S),g.return=y,y=g):(n(y,g),g=ga(S,y.mode,x),g.return=y,y=g),o(y)):n(y,g)}return w}var Ur=im(!0),om=im(!1),vi={},Ot=Nn(vi),ri=Nn(vi),si=Nn(vi);function Pn(t){if(t===vi)throw Error(I(174));return t}function Eu(t,e){switch(V(si,e),V(ri,t),V(Ot,vi),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ga(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ga(e,t)}Q(Ot),V(Ot,e)}function Hr(){Q(Ot),Q(ri),Q(si)}function lm(t){Pn(si.current);var e=Pn(Ot.current),n=Ga(e,t.type);e!==n&&(V(ri,t),V(Ot,n))}function bu(t){ri.current===t&&(Q(Ot),Q(ri))}var ee=Nn(0);function Fo(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ua=[];function Tu(){for(var t=0;tn?n:4,t(!0);var r=fa.transition;fa.transition={};try{t(!1),e()}finally{U=n,fa.transition=r}}function km(){return mt().memoizedState}function t1(t,e,n){var r=vn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Em(t))bm(e,n);else if(n=tm(t,e,n,r),n!==null){var s=Re();Et(n,t,r,s),Tm(n,e,r)}}function n1(t,e,n){var r=vn(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Em(t))bm(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,bt(l,o)){var a=e.interleaved;a===null?(s.next=s,_u(e)):(s.next=a.next,a.next=s),e.interleaved=s;return}}catch{}finally{}n=tm(t,e,s,r),n!==null&&(s=Re(),Et(n,t,r,s),Tm(n,e,r))}}function Em(t){var e=t.alternate;return t===ne||e!==null&&e===ne}function bm(t,e){Fs=zo=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Tm(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,au(t,n)}}var Bo={readContext:pt,useCallback:Ee,useContext:Ee,useEffect:Ee,useImperativeHandle:Ee,useInsertionEffect:Ee,useLayoutEffect:Ee,useMemo:Ee,useReducer:Ee,useRef:Ee,useState:Ee,useDebugValue:Ee,useDeferredValue:Ee,useTransition:Ee,useMutableSource:Ee,useSyncExternalStore:Ee,useId:Ee,unstable_isNewReconciler:!1},r1={readContext:pt,useCallback:function(t,e){return It().memoizedState=[t,e===void 0?null:e],t},useContext:pt,useEffect:kd,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,io(4194308,4,vm.bind(null,e,t),n)},useLayoutEffect:function(t,e){return io(4194308,4,t,e)},useInsertionEffect:function(t,e){return io(4,2,t,e)},useMemo:function(t,e){var n=It();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=It();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=t1.bind(null,ne,t),[r.memoizedState,t]},useRef:function(t){var e=It();return t={current:t},e.memoizedState=t},useState:_d,useDebugValue:Iu,useDeferredValue:function(t){return It().memoizedState=t},useTransition:function(){var t=_d(!1),e=t[0];return t=e1.bind(null,t[1]),It().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ne,s=It();if(J){if(n===void 0)throw Error(I(407));n=n()}else{if(n=e(),ge===null)throw Error(I(349));qn&30||um(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,kd(dm.bind(null,r,i,t),[t]),r.flags|=2048,li(9,fm.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=It(),e=ge.identifierPrefix;if(J){var n=qt,r=Vt;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=ii++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[jt]=e,t[ni]=r,$m(t,e,!1,!1),e.stateNode=t;e:{switch(o=Ya(n,r),n){case"dialog":K("cancel",t),K("close",t),s=r;break;case"iframe":case"object":case"embed":K("load",t),s=r;break;case"video":case"audio":for(s=0;sqr&&(e.flags|=128,r=!0,gs(i,!1),e.lanes=4194304)}else{if(!r)if(t=Fo(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),gs(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!J)return be(e),null}else 2*oe()-i.renderingStartTime>qr&&n!==1073741824&&(e.flags|=128,r=!0,gs(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=oe(),e.sibling=null,n=ee.current,V(ee,r?n&1|2:n&1),e):(be(e),null);case 22:case 23:return Ru(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Ye&1073741824&&(be(e),e.subtreeFlags&6&&(e.flags|=8192)):be(e),null;case 24:return null;case 25:return null}throw Error(I(156,e.tag))}function f1(t,e){switch(yu(e),e.tag){case 1:return Ge(e.type)&&jo(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Hr(),Q(Xe),Q(Ae),Tu(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return bu(e),null;case 13:if(Q(ee),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(I(340));Br()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Q(ee),null;case 4:return Hr(),null;case 10:return xu(e.type._context),null;case 22:case 23:return Ru(),null;case 24:return null;default:return null}}var Di=!1,Ne=!1,d1=typeof WeakSet=="function"?WeakSet:Set,O=null;function xr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(t,e,r)}else n.current=null}function bc(t,e,n){try{n()}catch(r){ie(t,e,r)}}var jd=!1;function h1(t,e){if(ac=Co,t=Bp(),mu(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,c=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==n||s!==0&&f.nodeType!==3||(l=o+s),f!==i||r!==0&&f.nodeType!==3||(a=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===n&&++c===s&&(l=o),d===i&&++u===r&&(a=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(cc={focusedElem:t,selectionRange:n},Co=!1,O=e;O!==null;)if(e=O,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,O=t;else for(;O!==null;){e=O;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,w=v.memoizedState,y=e.stateNode,g=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:wt(e.type,m),w);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){ie(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,O=t;break}O=e.return}return v=jd,jd=!1,v}function zs(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&bc(e,n,i)}s=s.next}while(s!==r)}}function gl(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Tc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Dm(t){var e=t.alternate;e!==null&&(t.alternate=null,Dm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[jt],delete e[ni],delete e[dc],delete e[Xw],delete e[Gw])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Fm(t){return t.tag===5||t.tag===3||t.tag===4}function Md(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Fm(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.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 Nc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Io));else if(r!==4&&(t=t.child,t!==null))for(Nc(t,e,n),t=t.sibling;t!==null;)Nc(t,e,n),t=t.sibling}function Cc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(Cc(t,e,n),t=t.sibling;t!==null;)Cc(t,e,n),t=t.sibling}var ve=null,St=!1;function nn(t,e,n){for(n=n.child;n!==null;)zm(t,e,n),n=n.sibling}function zm(t,e,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(al,n)}catch{}switch(n.tag){case 5:Ne||xr(n,e);case 6:var r=ve,s=St;ve=null,nn(t,e,n),ve=r,St=s,ve!==null&&(St?(t=ve,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ve.removeChild(n.stateNode));break;case 18:ve!==null&&(St?(t=ve,n=n.stateNode,t.nodeType===8?aa(t.parentNode,n):t.nodeType===1&&aa(t,n),Js(t)):aa(ve,n.stateNode));break;case 4:r=ve,s=St,ve=n.stateNode.containerInfo,St=!0,nn(t,e,n),ve=r,St=s;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&bc(n,e,o),s=s.next}while(s!==r)}nn(t,e,n);break;case 1:if(!Ne&&(xr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ie(n,e,l)}nn(t,e,n);break;case 21:nn(t,e,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,nn(t,e,n),Ne=r):nn(t,e,n);break;default:nn(t,e,n)}}function Od(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new d1),e.forEach(function(r){var s=_1.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function yt(t,e){var n=e.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*m1(r/1960))-r,10t?16:t,fn===null)var r=!1;else{if(t=fn,fn=null,Vo=0,B&6)throw Error(I(331));var s=B;for(B|=4,O=t.current;O!==null;){var i=O,o=i.child;if(O.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aoe()-$u?zn(t,0):Ou|=n),Je(t,e)}function Qm(t,e){e===0&&(t.mode&1?(e=Ai,Ai<<=1,!(Ai&130023424)&&(Ai=4194304)):e=1);var n=Re();t=Yt(t,e),t!==null&&(mi(t,e,n),Je(t,n))}function x1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Qm(t,n)}function _1(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(I(314))}r!==null&&r.delete(e),Qm(t,n)}var Xm;Xm=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Xe.current)Qe=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Qe=!1,c1(t,e,n);Qe=!!(t.flags&131072)}else Qe=!1,J&&e.flags&1048576&&Yp(e,$o,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;oo(t,e),t=e.pendingProps;var s=zr(e,Ae.current);Mr(e,n),s=Cu(null,e,r,t,s,n);var i=Au();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ge(r)?(i=!0,Mo(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ku(e),s.updater=pl,e.stateNode=s,s._reactInternals=e,vc(e,r,t,n),e=xc(null,e,r,!0,i,n)):(e.tag=0,J&&i&&gu(e),je(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(oo(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=E1(r),t=wt(r,t),s){case 0:e=Sc(null,e,r,t,n);break e;case 1:e=Ad(null,e,r,t,n);break e;case 11:e=Nd(null,e,r,t,n);break e;case 14:e=Cd(null,e,r,wt(r.type,t),n);break e}throw Error(I(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Sc(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Ad(t,e,r,s,n);case 3:e:{if(jm(e),t===null)throw Error(I(387));r=e.pendingProps,i=e.memoizedState,s=i.element,nm(t,e),Do(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Vr(Error(I(423)),e),e=Ld(t,e,r,n,s);break e}else if(r!==s){s=Vr(Error(I(424)),e),e=Ld(t,e,r,n,s);break e}else for(et=mn(e.stateNode.containerInfo.firstChild),nt=e,J=!0,xt=null,n=om(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===s){e=Zt(t,e,n);break e}je(t,e,r,n)}e=e.child}return e;case 5:return lm(e),t===null&&mc(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,uc(r,s)?o=null:i!==null&&uc(r,i)&&(e.flags|=32),Im(t,e),je(t,e,o,n),e.child;case 6:return t===null&&mc(e),null;case 13:return Mm(t,e,n);case 4:return Eu(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ur(e,null,r,n):je(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),Nd(t,e,r,s,n);case 7:return je(t,e,e.pendingProps,n),e.child;case 8:return je(t,e,e.pendingProps.children,n),e.child;case 12:return je(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,V(Po,r._currentValue),r._currentValue=o,i!==null)if(bt(i.value,o)){if(i.children===s.children&&!Xe.current){e=Zt(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Qt(-1,n&-n),a.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),gc(i.return,n,e),l.lanes|=n;break}a=a.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(I(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),gc(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}je(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Mr(e,n),s=pt(s),r=r(s),e.flags|=1,je(t,e,r,n),e.child;case 14:return r=e.type,s=wt(r,e.pendingProps),s=wt(r.type,s),Cd(t,e,r,s,n);case 15:return Am(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:wt(r,s),oo(t,e),e.tag=1,Ge(r)?(t=!0,Mo(e)):t=!1,Mr(e,n),sm(e,r,s),vc(e,r,s,n),xc(null,e,r,!0,t,n);case 19:return Om(t,e,n);case 22:return Lm(t,e,n)}throw Error(I(156,e.tag))};function Gm(t,e){return _p(t,e)}function k1(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(t,e,n,r){return new k1(t,e,n,r)}function Fu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function E1(t){if(typeof t=="function")return Fu(t)?1:0;if(t!=null){if(t=t.$$typeof,t===su)return 11;if(t===iu)return 14}return 2}function wn(t,e){var n=t.alternate;return n===null?(n=ft(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function co(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")Fu(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case dr:return Bn(n.children,s,i,e);case ru:o=8,s|=8;break;case Ua:return t=ft(12,n,e,s|2),t.elementType=Ua,t.lanes=i,t;case Ha:return t=ft(13,n,e,s),t.elementType=Ha,t.lanes=i,t;case Va:return t=ft(19,n,e,s),t.elementType=Va,t.lanes=i,t;case ip:return vl(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case rp:o=10;break e;case sp:o=9;break e;case su:o=11;break e;case iu:o=14;break e;case rn:o=16,r=null;break e}throw Error(I(130,t==null?t:typeof t,""))}return e=ft(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Bn(t,e,n,r){return t=ft(7,t,r,e),t.lanes=n,t}function vl(t,e,n,r){return t=ft(22,t,r,e),t.elementType=ip,t.lanes=n,t.stateNode={isHidden:!1},t}function ga(t,e,n){return t=ft(6,t,null,e),t.lanes=n,t}function ya(t,e,n){return e=ft(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function b1(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jl(0),this.expirationTimes=Jl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function zu(t,e,n,r,s,i,o,l,a){return t=new b1(t,e,n,l,a),e===1?(e=1,i===!0&&(e|=8)):e=0,i=ft(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ku(i),t}function T1(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eg)}catch(t){console.error(t)}}eg(),Yh.exports=st;var I1=Yh.exports,j1,Ud=I1;j1=Ud.createRoot,Ud.hydrateRoot;const As=Symbol("context"),tg=Symbol("next"),ng=Symbol("prev"),Hd=Symbol("events");class wb{constructor(e){W(this,"startTime");W(this,"endTime");W(this,"browserName");W(this,"channel");W(this,"platform");W(this,"wallTime");W(this,"title");W(this,"options");W(this,"pages");W(this,"actions");W(this,"events");W(this,"stdio");W(this,"errors");W(this,"errorDescriptors");W(this,"hasSource");W(this,"hasStepData");W(this,"sdkLanguage");W(this,"testIdAttributeName");W(this,"sources");W(this,"resources");e.forEach(r=>M1(r));const n=e.find(r=>r.origin==="library");this.browserName=(n==null?void 0:n.browserName)||"",this.sdkLanguage=n==null?void 0:n.sdkLanguage,this.channel=n==null?void 0:n.channel,this.testIdAttributeName=n==null?void 0:n.testIdAttributeName,this.platform=(n==null?void 0:n.platform)||"",this.title=(n==null?void 0:n.title)||"",this.options=(n==null?void 0:n.options)||{},this.actions=O1(e),this.pages=[].concat(...e.map(r=>r.pages)),this.wallTime=e.map(r=>r.wallTime).reduce((r,s)=>Math.min(r||Number.MAX_VALUE,s),Number.MAX_VALUE),this.startTime=e.map(r=>r.startTime).reduce((r,s)=>Math.min(r,s),Number.MAX_VALUE),this.endTime=e.map(r=>r.endTime).reduce((r,s)=>Math.max(r,s),Number.MIN_VALUE),this.events=[].concat(...e.map(r=>r.events)),this.stdio=[].concat(...e.map(r=>r.stdio)),this.errors=[].concat(...e.map(r=>r.errors)),this.hasSource=e.some(r=>r.hasSource),this.hasStepData=e.some(r=>r.origin==="testRunner"),this.resources=[...e.map(r=>r.resources)].flat(),this.events.sort((r,s)=>r.time-s.time),this.resources.sort((r,s)=>r._monotonicTime-s._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=V1(this.actions,this.errorDescriptors)}failedAction(){return this.actions.findLast(e=>e.error)}_errorDescriptorsFromActions(){var n;const e=[];for(const r of this.actions||[])(n=r.error)!=null&&n.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){const e=[];for(const n of this.errors||[])n.message&&e.push({stack:n.stack,message:n.message});return e}}function M1(t){for(const n of t.pages)n[As]=t;for(let n=0;n=0;n--){const r=t.actions[n];r[tg]=e,r.apiName.includes("route.")||(e=r)}for(const n of t.events)n[As]=t;for(const n of t.resources)n[As]=t}function O1(t){const e=new Map;for(const s of t){const i=s.traceUrl;let o=e.get(i);o||(o=[],e.set(i,o)),o.push(s)}const n=[];let r=0;for(const[,s]of e){e.size>1&&$1(s,++r);const i=P1(s);n.push(...i)}n.sort((s,i)=>i.parentId===s.callId?-1:s.parentId===i.callId?1:s.startTime-i.startTime);for(let s=1;sl.origin==="library"),r=t.filter(l=>l.origin==="testRunner");if(!r.length||!n.length)return t.map(l=>l.actions.map(a=>({...a,context:l}))).flat();const s=n.some(l=>l.actions.some(a=>!!a.stepId));for(const l of n)for(const a of l.actions){const c=s?a.stepId:`${a.apiName}@${a.wallTime}`;e.set(c,{...a,context:l})}const i=D1(r,e,s);i&&R1(n,i);const o=new Map;for(const l of r)for(const a of l.actions){const c=s?a.callId:`${a.apiName}@${a.wallTime}`,u=e.get(c);if(u){o.set(a.callId,u.callId),a.error&&(u.error=a.error),a.attachments&&(u.attachments=a.attachments),a.parentId&&(u.parentId=o.get(a.parentId)??a.parentId),u.startTime=a.startTime,u.endTime=a.endTime;continue}a.parentId&&(a.parentId=o.get(a.parentId)??a.parentId),e.set(c,{...a,context:l})}return[...e.values()]}function R1(t,e){for(const n of t){n.startTime+=e,n.endTime+=e;for(const r of n.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of n.events)r.time+=e;for(const r of n.stdio)r.timestamp+=e;for(const r of n.pages)for(const s of r.screencastFrames)s.timestamp+=e;for(const r of n.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function D1(t,e,n){for(const r of t)for(const s of r.actions){if(!s.startTime)continue;const i=n?s.callId:`${s.apiName}@${s.wallTime}`,o=e.get(i);if(o)return s.startTime-o.startTime}return 0}function F1(t){const e=new Map;for(const r of t)e.set(r.callId,{id:r.callId,parent:void 0,children:[],action:r});const n={id:"",parent:void 0,children:[]};for(const r of e.values()){const s=r.action.parentId&&e.get(r.action.parentId)||n;s.children.push(r),r.parent=s}return{rootItem:n,itemMap:e}}function Ko(t){return t[As]}function z1(t){return t[tg]}function B1(t){return t[ng]}function U1(t){let e=0,n=0;for(const r of H1(t)){if(r.type==="console"){const s=r.messageType;s==="warning"?++n:s==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:n}}function H1(t){let e=t[Hd];if(e)return e;const n=z1(t);return e=Ko(t).events.filter(r=>r.time>=t.startTime&&(!n||r.time{const a=Math.max(s,t)*window.devicePixelRatio,[c,u]=Dr(i?i+"."+r+":size":void 0,a),[f,d]=Dr(i?i+"."+r+":size":void 0,a),[h,v]=N.useState(null),[m,w]=Xn();let y;r==="vertical"?(y=f/window.devicePixelRatio,m&&m.heightv({offset:r==="vertical"?S.clientY:S.clientX,size:y}),onMouseUp:()=>v(null),onMouseMove:S=>{if(!S.buttons)v(null);else if(h){const _=(r==="vertical"?S.clientY:S.clientX)-h.offset,b=n?h.size+_:h.size-_,E=S.target.parentElement.getBoundingClientRect(),k=Math.min(Math.max(s,b),(r==="vertical"?E.height:E.width)-s);r==="vertical"?d(k*window.devicePixelRatio):u(k*window.devicePixelRatio)}}})]})};function kl(t,e="'"){const n=JSON.stringify(t),r=n.substring(1,n.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"`")+e;throw new Error("Invalid escape char")}function Xo(t){return t.charAt(0).toUpperCase()+t.substring(1)}function rg(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function ut(t){let e="";for(let n=0;n=1&&n<=31||n>=48&&n<=57&&(e===0||e===1&&t.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":e===0&&n===45&&t.length===1?"\\"+t.charAt(e):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?t.charAt(e):"\\"+t.charAt(e)}let In;function K1(){In=new Map}function De(t){let e=In==null?void 0:In.get(t);return e===void 0&&(e=t.replace(/\u200b/g,"").trim().replace(/\s+/g," "),In==null||In.set(t,e)),e}function El(t){return t.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function sg(t){return t.unicode||t.unicodeSets?String(t):String(t).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Ve(t,e){return typeof t!="string"?sg(t):`${JSON.stringify(t)}${e?"s":"i"}`}function Oe(t,e){return typeof t!="string"?sg(t):`"${t.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function Q1(t,e,n=""){if(t.length<=e)return t;const r=[...t];return r.length>e?r.slice(0,e-n.length).join("")+n:r.join("")}function Vd(t,e){return Q1(t,e,"…")}function Go(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function X1(t,e){const n=t.length,r=e.length;let s=0,i=0;const o=Array(n+1).fill(null).map(()=>Array(r+1).fill(0));for(let l=1;l<=n;l++)for(let a=1;a<=r;a++)t[l-1]===e[a-1]&&(o[l][a]=o[l-1][a-1]+1,o[l][a]>s&&(s=o[l][a],i=l));return t.slice(i-s,i)}const ue=function(t,e,n){return t>=e&&t<=n};function Ue(t){return ue(t,48,57)}function qd(t){return Ue(t)||ue(t,65,70)||ue(t,97,102)}function G1(t){return ue(t,65,90)}function J1(t){return ue(t,97,122)}function Y1(t){return G1(t)||J1(t)}function Z1(t){return t>=128}function uo(t){return Y1(t)||Z1(t)||t===95}function Wd(t){return uo(t)||Ue(t)||t===45}function eS(t){return ue(t,0,8)||t===11||ue(t,14,31)||t===127}function fo(t){return t===10}function Ft(t){return fo(t)||t===9||t===32}const tS=1114111;class Vu extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function nS(t){const e=[];for(let n=0;n=e.length?-1:e[C]},o=function(C){if(C===void 0&&(C=1),C>3)throw"Spec Error: no more than three codepoints of lookahead.";return i(n+C)},l=function(C){return C===void 0&&(C=1),n+=C,s=i(n),!0},a=function(){return n-=1,!0},c=function(C){return C===void 0&&(C=s),C===-1},u=function(){if(f(),l(),Ft(s)){for(;Ft(o());)l();return new Mc}else{if(s===34)return v();if(s===35)if(Wd(o())||y(o(1),o(2))){const C=new wg("");return S(o(1),o(2),o(3))&&(C.type="id"),C.value=T(),C}else return new Te(s);else return s===36?o()===61?(l(),new lS):new Te(s):s===39?v():s===40?new pg:s===41?new mg:s===42?o()===61?(l(),new aS):new Te(s):s===43?b()?(a(),d()):new Te(s):s===44?new ug:s===45?b()?(a(),d()):o(1)===45&&o(2)===62?(l(2),new lg):x()?(a(),h()):new Te(s):s===46?b()?(a(),d()):new Te(s):s===58?new ag:s===59?new cg:s===60?o(1)===33&&o(2)===45&&o(3)===45?(l(3),new og):new Te(s):s===64?S(o(1),o(2),o(3))?new vg(T()):new Te(s):s===91?new hg:s===92?g()?(a(),h()):new Te(s):s===93?new Oc:s===94?o()===61?(l(),new oS):new Te(s):s===123?new fg:s===124?o()===61?(l(),new iS):o()===124?(l(),new gg):new Te(s):s===125?new dg:s===126?o()===61?(l(),new sS):new Te(s):Ue(s)?(a(),d()):uo(s)?(a(),h()):c()?new po:new Te(s)}},f=function(){for(;o(1)===47&&o(2)===42;)for(l(2);;)if(l(),s===42&&o()===47){l();break}else if(c())return},d=function(){const C=E();if(S(o(1),o(2),o(3))){const M=new cS;return M.value=C.value,M.repr=C.repr,M.type=C.type,M.unit=T(),M}else if(o()===37){l();const M=new kg;return M.value=C.value,M.repr=C.repr,M}else{const M=new _g;return M.value=C.value,M.repr=C.repr,M.type=C.type,M}},h=function(){const C=T();if(C.toLowerCase()==="url"&&o()===40){for(l();Ft(o(1))&&Ft(o(2));)l();return o()===34||o()===39?new mo(C):Ft(o())&&(o(2)===34||o(2)===39)?new mo(C):m()}else return o()===40?(l(),new mo(C)):new yg(C)},v=function(C){C===void 0&&(C=s);let M="";for(;l();){if(s===C||c())return new Sg(M);if(fo(s))return a(),new ig;s===92?c(o())||(fo(o())?l():M+=de(w())):M+=de(s)}throw new Error("Internal error")},m=function(){const C=new xg("");for(;Ft(o());)l();if(c(o()))return C;for(;l();){if(s===41||c())return C;if(Ft(s)){for(;Ft(o());)l();return o()===41||c(o())?(l(),C):(A(),new ho)}else{if(s===34||s===39||s===40||eS(s))return A(),new ho;if(s===92)if(g())C.value+=de(w());else return A(),new ho;else C.value+=de(s)}}throw new Error("Internal error")},w=function(){if(l(),qd(s)){const C=[s];for(let F=0;F<5&&qd(o());F++)l(),C.push(s);Ft(o())&&l();let M=parseInt(C.map(function(F){return String.fromCharCode(F)}).join(""),16);return M>tS&&(M=65533),M}else return c()?65533:s},y=function(C,M){return!(C!==92||fo(M))},g=function(){return y(s,o())},S=function(C,M,F){return C===45?uo(M)||M===45||y(M,F):uo(C)?!0:C===92?y(C,M):!1},x=function(){return S(s,o(1),o(2))},_=function(C,M,F){return C===43||C===45?!!(Ue(M)||M===46&&Ue(F)):C===46?!!Ue(M):!!Ue(C)},b=function(){return _(s,o(1),o(2))},T=function(){let C="";for(;l();)if(Wd(s))C+=de(s);else if(g())C+=de(w());else return a(),C;throw new Error("Internal parse error")},E=function(){let C="",M="integer";for((o()===43||o()===45)&&(l(),C+=de(s));Ue(o());)l(),C+=de(s);if(o(1)===46&&Ue(o(2)))for(l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);const F=o(1),Z=o(2),Be=o(3);if((F===69||F===101)&&Ue(Z))for(l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);else if((F===69||F===101)&&(Z===43||Z===45)&&Ue(Be))for(l(),C+=de(s),l(),C+=de(s),l(),C+=de(s),M="number";Ue(o());)l(),C+=de(s);const Le=k(C);return{type:M,value:Le,repr:C}},k=function(C){return+C},A=function(){for(;l();){if(s===41||c())return;g()&&w()}};let L=0;for(;!c(o());)if(r.push(u()),L++,L>e.length*2)throw new Error("I'm infinite-looping!");return r}class ae{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class ig extends ae{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class ho extends ae{constructor(){super(...arguments),this.tokenType="BADURL"}}class Mc extends ae{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class og extends ae{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return""}}class ag extends ae{constructor(){super(...arguments),this.tokenType=":"}}class cg extends ae{constructor(){super(...arguments),this.tokenType=";"}}class ug extends ae{constructor(){super(...arguments),this.tokenType=","}}class Yr extends ae{constructor(){super(...arguments),this.value="",this.mirror=""}}class fg extends Yr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class dg extends Yr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class hg extends Yr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Oc extends Yr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class pg extends Yr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class mg extends Yr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class sS extends ae{constructor(){super(...arguments),this.tokenType="~="}}class iS extends ae{constructor(){super(...arguments),this.tokenType="|="}}class oS extends ae{constructor(){super(...arguments),this.tokenType="^="}}class lS extends ae{constructor(){super(...arguments),this.tokenType="$="}}class aS extends ae{constructor(){super(...arguments),this.tokenType="*="}}class gg extends ae{constructor(){super(...arguments),this.tokenType="||"}}class po extends ae{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class Te extends ae{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=de(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==="\\"?`\\ -`:this.value}}class Zr extends ae{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 yg extends Zr{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return wi(this.value)}}class mo extends Zr{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return wi(this.value)+"("}}class vg extends Zr{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+wi(this.value)}}class wg extends Zr{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+wi(this.value):"#"+uS(this.value)}}class Sg extends Zr{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+Eg(this.value)+'"'}}class xg extends Zr{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+Eg(this.value)+'")'}}class _g extends ae{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 kg extends ae{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 cS extends ae{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 n=wi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||ue(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function wi(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r=128||s===45||s===95||ue(s,48,57)||ue(s,65,90)||ue(s,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function uS(t){t=""+t;let e="";for(let n=0;n=128||r===45||r===95||ue(r,48,57)||ue(r,65,90)||ue(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function Eg(t){t=""+t;let e="";for(let n=0;nk instanceof vg||k instanceof ig||k instanceof ho||k instanceof gg||k instanceof og||k instanceof lg||k instanceof cg||k instanceof fg||k instanceof dg||k instanceof xg||k instanceof kg);if(r)throw new qe(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let s=0;const i=new Set;function o(){return new qe(`Unexpected token "${n[s].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function l(){for(;n[s]instanceof Mc;)s++}function a(k=s){return n[k]instanceof yg}function c(k=s){return n[k]instanceof Sg}function u(k=s){return n[k]instanceof _g}function f(k=s){return n[k]instanceof ug}function d(k=s){return n[k]instanceof pg}function h(k=s){return n[k]instanceof mg}function v(k=s){return n[k]instanceof mo}function m(k=s){return n[k]instanceof Te&&n[k].value==="*"}function w(k=s){return n[k]instanceof po}function y(k=s){return n[k]instanceof Te&&[">","+","~"].includes(n[k].value)}function g(k=s){return f(k)||h(k)||w(k)||y(k)||n[k]instanceof Mc}function S(){const k=[x()];for(;l(),!!f();)s++,k.push(x());return k}function x(){return l(),u()||c()?n[s++].value:_()}function _(){const k={simples:[]};for(l(),y()?k.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):k.simples.push({selector:b(),combinator:""});;){if(l(),y())k.simples[k.simples.length-1].combinator=n[s++].value,l();else if(g())break;k.simples.push({combinator:"",selector:b()})}return k}function b(){let k="";const A=[];for(;!g();)if(a()||m())k+=n[s++].toSource();else if(n[s]instanceof wg)k+=n[s++].toSource();else if(n[s]instanceof Te&&n[s].value===".")if(s++,a())k+="."+n[s++].toSource();else throw o();else if(n[s]instanceof ag)if(s++,a())if(!e.has(n[s].value.toLowerCase()))k+=":"+n[s++].toSource();else{const L=n[s++].value.toLowerCase();A.push({name:L,args:[]}),i.add(L)}else if(v()){const L=n[s++].value.toLowerCase();if(e.has(L)?(A.push({name:L,args:S()}),i.add(L)):k+=`:${L}(${T()})`,l(),!h())throw o();s++}else throw o();else if(n[s]instanceof hg){for(k+="[",s++;!(n[s]instanceof Oc)&&!w();)k+=n[s++].toSource();if(!(n[s]instanceof Oc))throw o();k+="]",s++}else throw o();if(!k&&!A.length)throw o();return{css:k||void 0,functions:A}}function T(){let k="",A=1;for(;!w()&&((d()||v())&&A++,h()&&A--,!!A);)k+=n[s++].toSource();return k}const E=S();if(!w())throw o();if(E.some(k=>typeof k!="object"||!("simples"in k)))throw new qe(`Error while parsing css selector "${t}". Did you mean to CSS.escape it?`);return{selector:E,names:Array.from(i)}}const $c=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),dS=new Set(["left-of","right-of","above","below","near"]),bg=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 bl(t){const e=mS(t),n=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const s=fS(r.body,bg);n.push({name:"css",body:s.selector,source:r.body});continue}if($c.has(r.name)){let s,i;try{const c=JSON.parse("["+r.body+"]");if(!Array.isArray(c)||c.length<1||c.length>2||typeof c[0]!="string")throw new qe(`Malformed selector: ${r.name}=`+r.body);if(s=c[0],c.length===2){if(typeof c[1]!="number"||!dS.has(r.name))throw new qe(`Malformed selector: ${r.name}=`+r.body);i=c[1]}}catch{throw new qe(`Malformed selector: ${r.name}=`+r.body)}const o={name:r.name,source:r.body,body:{parsed:bl(s),distance:i}},l=[...o.body.parsed.parts].reverse().find(c=>c.name==="internal:control"&&c.body==="enter-frame"),a=l?o.body.parsed.parts.indexOf(l):-1;a!==-1&&hS(o.body.parsed.parts.slice(0,a+1),n.slice(0,a+1))&&o.body.parsed.parts.splice(0,a+1),n.push(o);continue}n.push({...r,source:r.body})}if($c.has(n[0].name))throw new qe(`"${n[0].name}" selector cannot be first`);return{capture:e.capture,parts:n}}function hS(t,e){return Wt({parts:t})===Wt({parts:e})}function Wt(t,e){return typeof t=="string"?t:t.parts.map((n,r)=>{let s=!0;!e&&r!==t.capture&&(n.name==="css"||n.name==="xpath"&&n.source.startsWith("//")||n.source.startsWith(".."))&&(s=!1);const i=s?n.name+"=":"";return`${r===t.capture?"*":""}${i}${n.source}`}).join(" >> ")}function pS(t,e){const n=(r,s)=>{for(const i of r.parts)e(i,s),$c.has(i.name)&&n(i.body.parsed,!0)};n(t,!1)}function mS(t){let e=0,n,r=0;const s={parts:[]},i=()=>{const l=t.substring(r,e).trim(),a=l.indexOf("=");let c,u;a!==-1&&l.substring(0,a).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(c=l.substring(0,a).trim(),u=l.substring(a+1)):l.length>1&&l[0]==='"'&&l[l.length-1]==='"'||l.length>1&&l[0]==="'"&&l[l.length-1]==="'"?(c="text",u=l):/^\(*\/\//.test(l)||l.startsWith("..")?(c="xpath",u=l):(c="css",u=l);let f=!1;if(c[0]==="*"&&(f=!0,c=c.substring(1)),s.parts.push({name:c,body:u}),f){if(s.capture!==void 0)throw new qe("Only one of the selectors can capture using * modifier");s.capture=s.parts.length-1}};if(!t.includes(">>"))return e=t.length,i(),s;const o=()=>{const a=t.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!a&&!!a[1]};for(;e"&&t[e+1]===">"?(i(),e+=2,r=e):e++}return i(),s}function Un(t,e){let n=0,r=t.length===0;const s=()=>t[n]||"",i=()=>{const w=s();return++n,r=n>=t.length,w},o=w=>{throw r?new qe(`Unexpected end of selector while parsing selector \`${t}\``):new qe(`Error while parsing selector \`${t}\` - unexpected symbol "${s()}" at position ${n}`+(w?" during "+w:""))};function l(){for(;!r&&/\s/.test(s());)i()}function a(w){return w>="€"||w>="0"&&w<="9"||w>="A"&&w<="Z"||w>="a"&&w<="z"||w>="0"&&w<="9"||w==="_"||w==="-"}function c(){let w="";for(l();!r&&a(s());)w+=i();return w}function u(w){let y=i();for(y!==w&&o("parsing quoted string");!r&&s()!==w;)s()==="\\"&&i(),y+=i();return s()!==w&&o("parsing quoted string"),y+=i(),y}function f(){i()!=="/"&&o("parsing regular expression");let w="",y=!1;for(;!r;){if(s()==="\\")w+=i(),r&&o("parsing regular expression");else if(y&&s()==="]")y=!1;else if(!y&&s()==="[")y=!0;else if(!y&&s()==="/")break;w+=i()}i()!=="/"&&o("parsing regular expression");let g="";for(;!r&&s().match(/[dgimsuy]/);)g+=i();try{return new RegExp(w,g)}catch(S){throw new qe(`Error while parsing selector \`${t}\`: ${S.message}`)}}function d(){let w="";return l(),s()==="'"||s()==='"'?w=u(s()).slice(1,-1):w=c(),w||o("parsing property path"),w}function h(){l();let w="";return r||(w+=i()),!r&&w!=="="&&(w+=i()),["=","*=","^=","$=","|=","~="].includes(w)||o("parsing operator"),w}function v(){i();const w=[];for(w.push(d()),l();s()===".";)i(),w.push(d()),l();if(s()==="]")return i(),{name:w.join("."),jsonPath:w,op:"",value:null,caseSensitive:!1};const y=h();let g,S=!0;if(l(),s()==="/"){if(y!=="=")throw new qe(`Error while parsing selector \`${t}\` - cannot use ${y} in attribute with regular expression`);g=f()}else if(s()==="'"||s()==='"')g=u(s()).slice(1,-1),l(),s()==="i"||s()==="I"?(S=!1,i()):(s()==="s"||s()==="S")&&(S=!0,i());else{for(g="";!r&&(a(s())||s()==="+"||s()===".");)g+=i();g==="true"?g=!0:g==="false"?g=!1:e||(g=+g,Number.isNaN(g)&&o("parsing attribute value"))}if(l(),s()!=="]"&&o("parsing attribute value"),i(),y!=="="&&typeof g!="string")throw new qe(`Error while parsing selector \`${t}\` - cannot use ${y} in attribute with non-string matching value - ${g}`);return{name:w.join("."),jsonPath:w,op:y,value:g,caseSensitive:S}}const m={name:"",attributes:[]};for(m.name=c(),l();s()==="[";)m.attributes.push(v()),l();if(r||o(void 0),!m.name&&!m.attributes.length)throw new qe(`Error while parsing selector \`${t}\` - selector cannot be empty`);return m}function Sn(t,e,n=!1){return Tg(t,e,n,1)[0]}function Tg(t,e,n=!1,r=20,s){try{return cr(new _S[t](s),bl(e),n,r)}catch{return[e]}}function cr(t,e,n=!1,r=20){const s=[...e.parts],i=[];let o=n?"frame-locator":"page";for(let l=0;lt.generateLocator(c,"has",m)));continue}if(a.name==="internal:has-not"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"hasNot",m)));continue}if(a.name==="internal:and"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"and",m)));continue}if(a.name==="internal:or"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"or",m)));continue}if(a.name==="internal:chain"){const v=cr(t,a.body.parsed,!1,r);i.push(v.map(m=>t.generateLocator(c,"chain",m)));continue}if(a.name==="internal:label"){const{exact:v,text:m}=ws(a.body);i.push([t.generateLocator(c,"label",m,{exact:v})]);continue}if(a.name==="internal:role"){const v=Un(a.body,!0),m={attrs:[]};for(const w of v.attributes)w.name==="name"?(m.exact=w.caseSensitive,m.name=w.value):(w.name==="level"&&typeof w.value=="string"&&(w.value=+w.value),m.attrs.push({name:w.name==="include-hidden"?"includeHidden":w.name,value:w.value}));i.push([t.generateLocator(c,"role",v.name,m)]);continue}if(a.name==="internal:testid"){const v=Un(a.body,!0),{value:m}=v.attributes[0];i.push([t.generateLocator(c,"test-id",m)]);continue}if(a.name==="internal:attr"){const v=Un(a.body,!0),{name:m,value:w,caseSensitive:y}=v.attributes[0],g=w,S=!!y;if(m==="placeholder"){i.push([t.generateLocator(c,"placeholder",g,{exact:S})]);continue}if(m==="alt"){i.push([t.generateLocator(c,"alt",g,{exact:S})]);continue}if(m==="title"){i.push([t.generateLocator(c,"title",g,{exact:S})]);continue}}if(a.name==="internal:control"&&a.body==="enter-frame"){const v=i[i.length-1],m=s[l-1],w=v.map(y=>t.chainLocators([y,t.generateLocator(c,"frame","")]));["xpath","css"].includes(m.name)&&w.push(t.generateLocator(c,"frame-locator",Wt({parts:[m]})),t.generateLocator(c,"frame-locator",Wt({parts:[m]},!0))),v.splice(0,v.length,...w),o="frame-locator";continue}const u=s[l+1],f=Wt({parts:[a]}),d=t.generateLocator(c,"default",f);if(u&&["internal:has-text","internal:has-not-text"].includes(u.name)){const{exact:v,text:m}=ws(u.body);if(!v){const w=t.generateLocator("locator",u.name==="internal:has-text"?"has-text":"has-not-text",m,{exact:v}),y={};u.name==="internal:has-text"?y.hasText=m:y.hasNotText=m;const g=t.generateLocator(c,"default",f,y);i.push([t.chainLocators([d,w]),g]),l++;continue}}let h;if(["xpath","css"].includes(a.name)){const v=Wt({parts:[a]},!0);h=t.generateLocator(c,"default",v)}i.push([d,h].filter(Boolean))}return gS(t,i,r)}function gS(t,e,n){const r=e.map(()=>""),s=[],i=o=>{if(o===e.length)return s.push(t.chainLocators(r)),s.lengthJSON.parse(r));for(let r=0;rES(e,l,f.expandedItems,m||0,o),[e,l,f,m,o]),y=N.useRef(null),[g,S]=N.useState(),[x,_]=N.useState(!1);N.useEffect(()=>{u==null||u(g)},[u,g]),N.useEffect(()=>{const T=y.current;if(!T)return;const E=()=>{Kd.set(t,T.scrollTop)};return T.addEventListener("scroll",E,{passive:!0}),()=>T.removeEventListener("scroll",E)},[t]),N.useEffect(()=>{y.current&&(y.current.scrollTop=Kd.get(t)||0)},[t]);const b=N.useCallback(T=>{const{expanded:E}=w.get(T);if(E){for(let k=l;k;k=k.parent)if(k===T){c==null||c(T);break}f.expandedItems.set(T.id,!1)}else f.expandedItems.set(T.id,!0);d({...f})},[w,l,c,f,d]);return p.jsx("div",{className:le("tree-view vbox",t+"-tree-view"),role:"tree","data-testid":v||t+"-tree",children:p.jsxs("div",{className:le("tree-view-content"),tabIndex:0,onKeyDown:T=>{if(l&&T.key==="Enter"){a==null||a(l);return}if(T.key!=="ArrowDown"&&T.key!=="ArrowUp"&&T.key!=="ArrowLeft"&&T.key!=="ArrowRight")return;if(T.stopPropagation(),T.preventDefault(),l&&T.key==="ArrowLeft"){const{expanded:k,parent:A}=w.get(l);k?(f.expandedItems.set(l.id,!1),d({...f})):A&&(c==null||c(A));return}if(l&&T.key==="ArrowRight"){l.children.length&&(f.expandedItems.set(l.id,!0),d({...f}));return}let E=l;if(T.key==="ArrowDown"&&(l?E=w.get(l).next:w.size&&(E=[...w.keys()][0])),T.key==="ArrowUp"){if(l)E=w.get(l).prev;else if(w.size){const k=[...w.keys()];E=k[k.length-1]}}u==null||u(void 0),E&&(_(!0),c==null||c(E)),S(void 0)},ref:y,children:[h&&w.size===0&&p.jsx("div",{className:"tree-view-empty",children:h}),e.children.map(T=>w.get(T)&&p.jsx(Ng,{item:T,treeItems:w,selectedItem:l,onSelected:c,onAccepted:a,isError:i,toggleExpanded:b,highlightedItem:g,setHighlightedItem:S,render:n,icon:s,title:r,isKeyboardNavigation:x,setIsKeyboardNavigation:_},T.id))]})})}function Ng({item:t,treeItems:e,selectedItem:n,onSelected:r,highlightedItem:s,setHighlightedItem:i,isError:o,onAccepted:l,toggleExpanded:a,render:c,title:u,icon:f,isKeyboardNavigation:d,setIsKeyboardNavigation:h}){const v=N.useId(),m=N.useRef(null);N.useEffect(()=>{n===t&&d&&m.current&&(Gh(m.current),h(!1))},[t,n,d,h]);const w=e.get(t),y=w.depth,g=w.expanded;let S="codicon-blank";typeof g=="boolean"&&(S=g?"codicon-chevron-down":"codicon-chevron-right");const x=c(t),_=g&&t.children.length?t.children:[],b=u==null?void 0:u(t),T=(f==null?void 0:f(t))||"codicon-blank";return p.jsxs("div",{ref:m,role:"treeitem","aria-selected":t===n,"aria-expanded":g,"aria-controls":v,title:b,className:"vbox",style:{flex:"none"},children:[p.jsxs("div",{onDoubleClick:()=>l==null?void 0:l(t),className:le("tree-view-entry",n===t&&"selected",s===t&&"highlighted",(o==null?void 0:o(t))&&"error"),onClick:()=>r==null?void 0:r(t),onMouseEnter:()=>i(t),onMouseLeave:()=>i(void 0),children:[y?new Array(y).fill(0).map((E,k)=>p.jsx("div",{className:"tree-view-indent"},"indent-"+k)):void 0,p.jsx("div",{"aria-hidden":"true",className:"codicon "+S,style:{minWidth:16,marginRight:4},onDoubleClick:E=>{E.preventDefault(),E.stopPropagation()},onClick:E=>{E.stopPropagation(),E.preventDefault(),a(t)}}),f&&p.jsx("div",{className:"codicon "+T,style:{minWidth:16,marginRight:4},"aria-label":"["+T.replace("codicon","icon")+"]"}),typeof x=="string"?p.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:x}):x]}),!!_.length&&p.jsx("div",{id:v,role:"group",children:_.map(E=>e.get(E)&&p.jsx(Ng,{item:E,treeItems:e,selectedItem:n,onSelected:r,onAccepted:l,isError:o,toggleExpanded:a,highlightedItem:s,setHighlightedItem:i,render:c,title:u,icon:f,isKeyboardNavigation:d,setIsKeyboardNavigation:h},E.id))})]})}function ES(t,e,n,r,s=()=>!0){if(!s(t))return new Map;const i=new Map,o=new Set;for(let c=e==null?void 0:e.parent;c;c=c.parent)o.add(c.id);let l=null;const a=(c,u)=>{for(const f of c.children){if(!s(f))continue;const d=o.has(f.id)||n.get(f.id),h=r>u&&i.size<25&&d!==!1,v=f.children.length?d??h:void 0,m={depth:u,expanded:v,parent:t===c?null:c,next:null,prev:l};l&&(i.get(l).next=f),l=f,i.set(f,m),v&&a(f,u+1)}};return a(t,0),i}const Tt=N.forwardRef(function({children:e,title:n="",icon:r,disabled:s=!1,toggled:i=!1,onClick:o=()=>{},style:l,testId:a,className:c,ariaLabel:u},f){return p.jsxs("button",{ref:f,className:le(c,"toolbar-button",r,i&&"toggled"),onMouseDown:Qd,onClick:o,onDoubleClick:Qd,title:n,disabled:!!s,style:l,"data-testid":a,"aria-label":u||n,children:[r&&p.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e]})}),Qd=t=>{t.stopPropagation(),t.preventDefault()};function Cg(t){return t==="scheduled"?"codicon-clock":t==="running"?"codicon-loading":t==="failed"?"codicon-error":t==="passed"?"codicon-check":t==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function bS(t){return t==="scheduled"?"Pending":t==="running"?"Running":t==="failed"?"Failed":t==="passed"?"Passed":t==="skipped"?"Skipped":"Did not run"}const TS=kS,NS=({actions:t,selectedAction:e,selectedTime:n,setSelectedTime:r,sdkLanguage:s,onSelected:i,onHighlighted:o,revealConsole:l,revealAttachment:a,isLive:c})=>{const[u,f]=N.useState({expandedItems:new Map}),{rootItem:d,itemMap:h}=N.useMemo(()=>F1(t),[t]),{selectedItem:v}=N.useMemo(()=>({selectedItem:e?h.get(e.callId):void 0}),[h,e]),m=N.useCallback(_=>{var b,T;return!!((T=(b=_.action)==null?void 0:b.error)!=null&&T.message)},[]),w=N.useCallback(_=>r({minimum:_.action.startTime,maximum:_.action.endTime}),[r]),y=N.useCallback(_=>qu(_.action,{sdkLanguage:s,revealConsole:l,revealAttachment:a,isLive:c,showDuration:!0,showBadges:!0}),[c,l,a,s]),g=N.useCallback(_=>!n||!_.action||_.action.startTime<=n.maximum&&_.action.endTime>=n.minimum,[n]),S=N.useCallback(_=>{i==null||i(_.action)},[i]),x=N.useCallback(_=>{o==null||o(_==null?void 0:_.action)},[o]);return p.jsxs("div",{className:"vbox",children:[n&&p.jsxs("div",{className:"action-list-show-all",onClick:()=>r(void 0),children:[p.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),p.jsx(TS,{name:"actions",rootItem:d,treeState:u,setTreeState:f,selectedItem:v,onSelected:S,onHighlighted:x,onAccepted:w,isError:m,isVisible:g,render:y})]})},qu=(t,e)=>{var v;const{sdkLanguage:n,revealConsole:r,revealAttachment:s,isLive:i,showDuration:o,showBadges:l}=e,{errors:a,warnings:c}=U1(t),u=!!((v=t.attachments)!=null&&v.length)&&!!s,f=Ag(t,n||"javascript"),d=t.class==="Test"&&t.method==="test.step.skip";let h="";return t.endTime?h=Pe(t.endTime-t.startTime):t.error?h="Timed out":i||(h="-"),p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"action-title",title:t.apiName,children:[p.jsx("span",{children:t.apiName}),f&&(f.type==="locator"?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"action-parameter action-locator-parameter",children:f.value}),f.childDisplayString&&p.jsx("span",{className:"action-parameter action-generic-parameter",children:f.childDisplayString.value})]}):p.jsx("span",{className:"action-parameter action-generic-parameter",children:f.value})),t.method==="goto"&&t.params.url&&p.jsx("div",{className:"action-url",title:t.params.url,children:t.params.url}),t.class==="APIRequestContext"&&t.params.url&&p.jsx("div",{className:"action-url",title:t.params.url,children:CS(t.params.url)})]}),(o||l||u||d)&&p.jsx("div",{className:"spacer"}),u&&p.jsx(Tt,{icon:"attach",title:"Open Attachment",onClick:()=>s(t.attachments[0])}),o&&!d&&p.jsx("div",{className:"action-duration",children:h||p.jsx("span",{className:"codicon codicon-loading"})}),d&&p.jsx("span",{className:le("action-skipped","codicon",Cg("skipped")),title:"skipped"}),l&&p.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!a&&p.jsxs("div",{className:"action-icon",children:[p.jsx("span",{className:"codicon codicon-error"}),p.jsx("span",{className:"action-icon-value",children:a})]}),!!c&&p.jsxs("div",{className:"action-icon",children:[p.jsx("span",{className:"codicon codicon-warning"}),p.jsx("span",{className:"action-icon-value",children:c})]})]})]})};function CS(t){try{const e=new URL(t);return e.pathname+e.search}catch{return t}}const AS=t=>{switch(t.method){case"clockPauseAt":case"clockSetFixedTime":case"clockSetSystemTime":return t.params.timeString===void 0&&t.params.timeNumber===void 0?void 0:{type:"generic",value:new Date(t.params.timeString??t.params.timeNumber).toLocaleString(void 0,{timeZone:"UTC"})};case"clockFastForward":case"clockRunFor":return t.params.ticksNumber===void 0&&t.params.ticksString===void 0?void 0:{type:"generic",value:t.params.ticksString??`${t.params.ticksNumber}ms`}}},LS=t=>{switch(t.method){case"press":case"keyboardPress":case"keyboardDown":case"keyboardUp":return t.params.key===void 0?void 0:{type:"generic",value:t.params.key};case"type":case"fill":case"keyboardType":case"keyboardInsertText":{const e=t.params.text??t.params.value;return e===void 0?void 0:{type:"generic",value:`"${e}"`}}}},IS=t=>{switch(t.method){case"click":case"dblclick":case"mouseClick":case"mouseMove":return t.params.x===void 0||t.params.y===void 0?void 0:{type:"generic",value:`(${t.params.x}, ${t.params.y})`};case"mouseWheel":return t.params.deltaX===void 0||t.params.deltaY===void 0?void 0:{type:"generic",value:`(${t.params.deltaX}, ${t.params.deltaY})`}}},jS=t=>{switch(t.method){case"tap":return t.params.x===void 0||t.params.y===void 0?void 0:{type:"generic",value:`(${t.params.x}, ${t.params.y})`}}},Ag=(t,e,n=!1)=>{const r=t.params;if(!n&&r.selector!==void 0)return{type:"locator",value:Sn(e,r.selector),childDisplayString:Ag(t,e,!0)};switch(t.class.toLowerCase()){case"browsercontext":return AS(t);case"page":case"frame":case"elementhandle":return LS(t)??IS(t)??jS(t)}},Lg=({value:t,description:e})=>{const[n,r]=N.useState("copy"),s=N.useCallback(()=>{(typeof t=="function"?t():Promise.resolve(t)).then(o=>{navigator.clipboard.writeText(o).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[t]);return p.jsx(Tt,{title:e||"Copy",icon:n,onClick:s})},wa=({value:t,description:e})=>{const n=N.useCallback(async()=>{const r=typeof t=="function"?await t():t;await navigator.clipboard.writeText(r)},[t]);return p.jsx(Tt,{title:e,onClick:n,className:"copy-to-clipboard-text-button",children:e})},Yn=({text:t})=>p.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:t}),MS=({action:t,startTimeOffset:e,sdkLanguage:n})=>{const r=N.useMemo(()=>Object.keys((t==null?void 0:t.params)??{}).filter(l=>l!=="info"),[t]);if(!t)return p.jsx(Yn,{text:"No action selected"});const s=t.startTime-e,i=Pe(s),o=t.endTime?Pe(t.endTime-t.startTime):"Timed Out";return p.jsxs("div",{className:"call-tab",children:[p.jsx("div",{className:"call-line",children:t.apiName}),p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Time"}),p.jsx(Xd,{name:"start:",value:i}),p.jsx(Xd,{name:"duration:",value:o})]}),!!r.length&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Parameters"}),r.map(l=>Gd(Jd(t,l,t.params[l],n)))]}),!!t.result&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(t.result).map(l=>Gd(Jd(t,l,t.result[l],n)))]})]})},Xd=({name:t,value:e})=>p.jsxs("div",{className:"call-line",children:[t,p.jsx("span",{className:"call-value datetime",title:e,children:e})]});function Gd(t){let e=t.text.replace(/\n/g,"↵");return t.type==="string"&&(e=`"${e}"`),p.jsxs("div",{className:"call-line",children:[t.name,":",p.jsx("span",{className:le("call-value",t.type),title:t.text,children:e}),["string","number","object","locator"].includes(t.type)&&p.jsx(Lg,{value:t.text})]},t.name)}function Jd(t,e,n,r){const s=t.method.includes("eval")||t.method==="waitForFunction";if(e==="files")return{text:"",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&s)&&(n=Jo(n.value,new Array(10).fill({handle:""}))),(e==="value"&&s||e==="received"&&t.method==="expect")&&(n=Jo(n,new Array(10).fill({handle:""}))),e==="selector")return{text:Sn(r||"javascript",t.params.selector),type:"locator",name:"locator"};const i=typeof n;return i!=="object"||n===null?{text:String(n),type:i,name:e}:n.guid?{text:"",type:"handle",name:e}:{text:JSON.stringify(n).slice(0,1e3),type:"object",name:e}}function Jo(t,e){if(t.n!==void 0)return t.n;if(t.s!==void 0)return t.s;if(t.b!==void 0)return t.b;if(t.v!==void 0){if(t.v==="undefined")return;if(t.v==="null")return null;if(t.v==="NaN")return NaN;if(t.v==="Infinity")return 1/0;if(t.v==="-Infinity")return-1/0;if(t.v==="-0")return-0}if(t.d!==void 0)return new Date(t.d);if(t.r!==void 0)return new RegExp(t.r.p,t.r.f);if(t.a!==void 0)return t.a.map(n=>Jo(n,e));if(t.o!==void 0){const n={};for(const{k:r,v:s}of t.o)n[r]=Jo(s,e);return n}return t.h!==void 0?e===void 0?"":e[t.h]:""}const Yd=new Map;function Tl({name:t,items:e=[],id:n,render:r,icon:s,isError:i,isWarning:o,isInfo:l,selectedItem:a,onAccepted:c,onSelected:u,onHighlighted:f,onIconClicked:d,noItemsMessage:h,dataTestId:v,notSelectable:m}){const w=N.useRef(null),[y,g]=N.useState();return N.useEffect(()=>{f==null||f(y)},[f,y]),N.useEffect(()=>{const S=w.current;if(!S)return;const x=()=>{Yd.set(t,S.scrollTop)};return S.addEventListener("scroll",x,{passive:!0}),()=>S.removeEventListener("scroll",x)},[t]),N.useEffect(()=>{w.current&&(w.current.scrollTop=Yd.get(t)||0)},[t]),p.jsx("div",{className:le("list-view vbox",t+"-list-view"),role:e.length>0?"list":void 0,"data-testid":v||t+"-list",children:p.jsxs("div",{className:le("list-view-content",m&&"not-selectable"),tabIndex:0,onKeyDown:S=>{var T;if(a&&S.key==="Enter"){c==null||c(a,e.indexOf(a));return}if(S.key!=="ArrowDown"&&S.key!=="ArrowUp")return;S.stopPropagation(),S.preventDefault();const x=a?e.indexOf(a):-1;let _=x;S.key==="ArrowDown"&&(x===-1?_=0:_=Math.min(x+1,e.length-1)),S.key==="ArrowUp"&&(x===-1?_=e.length-1:_=Math.max(x-1,0));const b=(T=w.current)==null?void 0:T.children.item(_);Gh(b||void 0),f==null||f(void 0),u==null||u(e[_],_),g(void 0)},ref:w,children:[h&&e.length===0&&p.jsx("div",{className:"list-view-empty",children:h}),e.map((S,x)=>{const _=r(S,x);return p.jsxs("div",{onDoubleClick:()=>c==null?void 0:c(S,x),role:"listitem",className:le("list-view-entry",a===S&&"selected",!m&&y===S&&"highlighted",(i==null?void 0:i(S,x))&&"error",(o==null?void 0:o(S,x))&&"warning",(l==null?void 0:l(S,x))&&"info"),onClick:()=>u==null?void 0:u(S,x),onMouseEnter:()=>g(S),onMouseLeave:()=>g(void 0),children:[s&&p.jsx("div",{className:"codicon "+(s(S,x)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:b=>{b.preventDefault(),b.stopPropagation()},onClick:b=>{b.stopPropagation(),b.preventDefault(),d==null||d(S,x)}}),typeof _=="string"?p.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:_}):_]},(n==null?void 0:n(S,x))||x)})]})})}const OS=Tl,$S=({action:t,isLive:e})=>{const n=N.useMemo(()=>{var o;if(!t||!t.log.length)return[];const r=t.log,s=t.context.wallTime-t.context.startTime,i=[];for(let l=0;l0?a=Pe(t.endTime-c):e?a=Pe(Date.now()-s-c):a="-"}i.push({message:r[l].message,time:a})}return i},[t,e]);return n.length?p.jsx(OS,{name:"log",items:n,render:r=>p.jsxs("div",{className:"log-list-item",children:[p.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):p.jsx(Yn,{text:"No log entries"})};function ci(t,e){const n=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let s,i={},o=!1,l=e==null?void 0:e.fg,a=e==null?void 0:e.bg;for(;(s=n.exec(t))!==null;){const[,,c,,u]=s;if(c){const f=+c;switch(f){case 0:i={};break;case 1:i["font-weight"]="bold";break;case 2:i.opacity="0.8";break;case 3:i["font-style"]="italic";break;case 4:i["text-decoration"]="underline";break;case 7:o=!0;break;case 8:i.display="none";break;case 9:i["text-decoration"]="line-through";break;case 22:delete i["font-weight"],delete i["font-style"],delete i.opacity,delete i["text-decoration"];break;case 23:delete i["font-weight"],delete i["font-style"],delete i.opacity;break;case 24:delete i["text-decoration"];break;case 27:o=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:l=Zd[f-30];break;case 39:l=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:a=Zd[f-40];break;case 49:a=e==null?void 0:e.bg;break;case 53:i["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:l=eh[f-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:a=eh[f-100];break}}else if(u){const f={...i},d=o?a:l;d!==void 0&&(f.color=d);const h=o?l:a;h!==void 0&&(f["background-color"]=h),r.push(`${PS(u)}`)}}return r.join("")}const Zd={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)"},eh={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 PS(t){return t.replace(/[&"<>]/g,e=>({"&":"&",'"':""","<":"<",">":">"})[e])}function RS(t){return Object.entries(t).map(([e,n])=>`${e}: ${n}`).join("; ")}const DS=({error:t})=>{const e=N.useMemo(()=>ci(t),[t]);return p.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})};function FS(t){return N.useMemo(()=>{if(!t)return{errors:new Map};const e=new Map;for(const n of t.errorDescriptors)e.set(n.message,n);return{errors:e}},[t])}const zS=({errorsModel:t,sdkLanguage:e,revealInSource:n})=>t.errors.size?p.jsx("div",{className:"fill",style:{overflow:"auto"},children:[...t.errors.entries()].map(([r,s])=>{var a;let i,o;const l=(a=s.stack)==null?void 0:a[0];return l&&(i=l.file.replace(/.*[/\\](.*)/,"$1")+":"+l.line,o=l.file+":"+l.line),p.jsxs("div",{children:[p.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)"},children:[s.action&&qu(s.action,{sdkLanguage:e}),i&&p.jsxs("div",{className:"action-location",children:["@ ",p.jsx("span",{title:o,onClick:()=>n(s),children:i})]})]}),p.jsx(DS,{error:r})]},r)})}):p.jsx(Yn,{text:"No errors"}),BS=Tl;function US(t,e){const{entries:n}=N.useMemo(()=>{if(!t)return{entries:[]};const s=[];for(const i of t.events){if(i.type==="console"){const o=i.args&&i.args.length?VS(i.args):Ig(i.text),l=i.location.url,c=`${l?l.substring(l.lastIndexOf("/")+1):""}:${i.location.lineNumber}`;s.push({browserMessage:{body:o,location:c},isError:i.messageType==="error",isWarning:i.messageType==="warning",timestamp:i.time})}i.type==="event"&&i.method==="pageError"&&s.push({browserError:i.params.error,isError:!0,isWarning:!1,timestamp:i.time})}for(const i of t.stdio){let o="";i.text&&(o=ci(i.text.trim())||""),i.base64&&(o=ci(atob(i.base64).trim())||""),s.push({nodeMessage:{html:o},isError:i.type==="stderr",isWarning:!1,timestamp:i.timestamp})}return s.sort((i,o)=>i.timestamp-o.timestamp),{entries:s}},[t]);return{entries:N.useMemo(()=>e?n.filter(s=>s.timestamp>=e.minimum&&s.timestamp<=e.maximum):n,[n,e])}}const HS=({consoleModel:t,boundaries:e,onEntryHovered:n,onAccepted:r})=>t.entries.length?p.jsx("div",{className:"console-tab",children:p.jsx(BS,{name:"console",onAccepted:r,onHighlighted:n,items:t.entries,isError:s=>s.isError,isWarning:s=>s.isWarning,render:s=>{const i=Pe(s.timestamp-e.minimum),o=p.jsx("span",{className:"console-time",children:i}),l=s.isError?"status-error":s.isWarning?"status-warning":"status-none",a=s.browserMessage||s.browserError?p.jsx("span",{className:le("codicon","codicon-browser",l),title:"Browser message"}):p.jsx("span",{className:le("codicon","codicon-file",l),title:"Runner message"});let c,u,f,d;const{browserMessage:h,browserError:v,nodeMessage:m}=s;if(h&&(c=h.location,u=h.body),v){const{error:w,value:y}=v;w?(u=w.message,d=w.stack):u=String(y)}return m&&(f=m.html),p.jsxs("div",{className:"console-line",children:[o,a,c&&p.jsx("span",{className:"console-location",children:c}),u&&p.jsx("span",{className:"console-line-message",children:u}),f&&p.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:f}}),d&&p.jsx("div",{className:"console-stack",children:d})]})}})}):p.jsx(Yn,{text:"No console entries"});function VS(t){if(t.length===1)return Ig(t[0].preview);const e=typeof t[0].value=="string"&&t[0].value.includes("%"),n=e?t[0].value:"",r=e?t.slice(1):t;let s=0;const i=/%([%sdifoOc])/g;let o;const l=[];let a=[];l.push(p.jsx("span",{children:a}));let c=0;for(;(o=i.exec(n))!==null;){const u=n.substring(c,o.index);a.push(p.jsx("span",{children:u})),c=o.index+2;const f=o[0][1];if(f==="%")a.push(p.jsx("span",{children:"%"}));else if(f==="s"||f==="o"||f==="O"||f==="d"||f==="i"||f==="f"){const d=r[s++],h={};typeof(d==null?void 0:d.value)!="string"&&(h.color="var(--vscode-debugTokenExpression-number)"),a.push(p.jsx("span",{style:h,children:(d==null?void 0:d.preview)||""}))}else if(f==="c"){a=[];const d=r[s++],h=d?qS(d.preview):{};l.push(p.jsx("span",{style:h,children:a}))}}for(ca[1].toUpperCase());e[l]=o}return e}catch{return{}}}function WS(t){return["background","border","color","font","line","margin","padding","text"].some(n=>t.startsWith(n))}const Wu=({noShadow:t,children:e,noMinHeight:n,className:r,sidebarBackground:s,onClick:i})=>p.jsx("div",{className:le("toolbar",t&&"no-shadow",n&&"no-min-height",r,s&&"toolbar-sidebar-background"),onClick:i,children:e}),Pc=({tabs:t,selectedTab:e,setSelectedTab:n,leftToolbar:r,rightToolbar:s,dataTestId:i,mode:o})=>{const l=N.useId();return e||(e=t[0].id),o||(o="default"),p.jsx("div",{className:"tabbed-pane","data-testid":i,children:p.jsxs("div",{className:"vbox",children:[p.jsxs(Wu,{children:[r&&p.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),o==="default"&&p.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...t.map(a=>p.jsx(jg,{id:a.id,ariaControls:`${l}-${a.id}`,title:a.title,count:a.count,errorCount:a.errorCount,selected:e===a.id,onSelect:n},a.id))]}),o==="select"&&p.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:p.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},onChange:a=>{n==null||n(t[a.currentTarget.selectedIndex].id)},children:t.map(a=>{let c="";return a.count&&(c=` (${a.count})`),a.errorCount&&(c=` (${a.errorCount})`),p.jsxs("option",{value:a.id,selected:a.id===e,role:"tab","aria-controls":`${l}-${a.id}`,children:[a.title,c]},a.id)})})}),s&&p.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...s]})]}),t.map(a=>{const c="tab-content tab-"+a.id;if(a.component)return p.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:c,style:{display:e===a.id?"inherit":"none"},children:a.component},a.id);if(e===a.id)return p.jsx("div",{id:`${l}-${a.id}`,role:"tabpanel","aria-label":a.title,className:c,children:a.render()},a.id)})]})})},jg=({id:t,title:e,count:n,errorCount:r,selected:s,onSelect:i,ariaControls:o})=>p.jsxs("div",{className:le("tabbed-pane-tab",s&&"selected"),onClick:()=>i==null?void 0:i(t),role:"tab",title:e,"aria-controls":o,children:[p.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!n&&p.jsx("div",{className:"tabbed-pane-tab-counter",children:n}),!!r&&p.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]}),KS="modulepreload",QS=function(t,e){return new URL(t,e).href},th={},XS=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.allSettled(n.map(c=>{if(c=QS(c,r),c in th)return;th[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(!!r)for(let v=o.length-1;v>=0;v--){const m=o[v];if(m.href===c&&(!u||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":KS,u||(h.as="script"),h.crossOrigin="",h.href=c,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((v,m)=>{h.addEventListener("load",v),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return e().catch(i)})},GS=20,Wr=({text:t,language:e,mimeType:n,linkify:r,readOnly:s,highlight:i,revealLine:o,lineNumbers:l,isFocused:a,focusOnChange:c,wrapLines:u,onChange:f,dataTestId:d,placeholder:h})=>{const[v,m]=Xn(),[w]=N.useState(XS(()=>import("./codeMirrorModule-CyuxU5C-.js"),__vite__mapDeps([0,1]),import.meta.url).then(x=>x.default)),y=N.useRef(null),[g,S]=N.useState();return N.useEffect(()=>{(async()=>{var E,k;const x=await w;YS(x);const _=m.current;if(!_)return;const b=ex(e)||ZS(n)||(r?"text/linkified":"");if(y.current&&b===y.current.cm.getOption("mode")&&!!s===y.current.cm.getOption("readOnly")&&l===y.current.cm.getOption("lineNumbers")&&u===y.current.cm.getOption("lineWrapping")&&h===y.current.cm.getOption("placeholder"))return;(k=(E=y.current)==null?void 0:E.cm)==null||k.getWrapperElement().remove();const T=x(_,{value:"",mode:b,readOnly:!!s,lineNumbers:l,lineWrapping:u,placeholder:h});return y.current={cm:T},a&&T.focus(),S(T),T})()},[w,g,m,e,n,r,l,u,s,a,h]),N.useEffect(()=>{y.current&&y.current.cm.setSize(v.width,v.height)},[v]),N.useLayoutEffect(()=>{var b;if(!g)return;let x=!1;if(g.getValue()!==t&&(g.setValue(t),x=!0,c&&(g.execCommand("selectAll"),g.focus())),x||JSON.stringify(i)!==JSON.stringify(y.current.highlight)){for(const k of y.current.highlight||[])g.removeLineClass(k.line-1,"wrap");for(const k of i||[])g.addLineClass(k.line-1,"wrap",`source-line-${k.type}`);for(const k of y.current.widgets||[])g.removeLineWidget(k);for(const k of y.current.markers||[])k.clear();const T=[],E=[];for(const k of i||[]){if(k.type!=="subtle-error"&&k.type!=="error")continue;const A=(b=y.current)==null?void 0:b.cm.getLine(k.line-1);if(A){const L={};L.title=k.message||"",E.push(g.markText({line:k.line-1,ch:0},{line:k.line-1,ch:k.column||A.length},{className:"source-line-error-underline",attributes:L}))}if(k.type==="error"){const L=document.createElement("div");L.innerHTML=ci(k.message||""),L.className="source-line-error-widget",T.push(g.addLineWidget(k.line,L,{above:!0,coverGutter:!1}))}}y.current.highlight=i,y.current.widgets=T,y.current.markers=E}typeof o=="number"&&y.current.cm.lineCount()>=o&&g.scrollIntoView({line:Math.max(0,o-1),ch:0},50);let _;return f&&(_=()=>f(g.getValue()),g.on("change",_)),()=>{_&&g.off("change",_)}},[g,t,i,o,c,f]),p.jsx("div",{"data-testid":d,className:"cm-wrapper",ref:m,onClick:JS})};function JS(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let nh=!1;function YS(t){nh||(nh=!0,t.defineSimpleMode("text/linkified",{start:[{regex:Jh,token:"linkified"}]}))}function ZS(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function ex(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}async function tx(t){const e=navigator.platform.includes("Win")?"win":"unix";let n=[];const r=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function s(f){const d='^"';return d+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/\r?\n/g,`^ - -`)+d}function i(f){function d(h){let m=h.charCodeAt(0).toString(16);for(;m.length<4;)m="0"+m;return"\\u"+m}return/[\0-\x1F\x7F-\x9F!]|\'/.test(f)?"$'"+f.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,d)+"'":"'"+f+"'"}const o=e==="win"?s:i;n.push(o(t.request.url).replace(/[[{}\]]/g,"\\$&"));let l="GET";const a=[],c=await Mg(t);c&&(a.push("--data-raw "+o(c)),r.add("content-length"),l="POST"),t.request.method!==l&&n.push("-X "+o(t.request.method));const u=t.request.headers;for(let f=0;f=3?e==="win"?` ^ - `:` \\ - `:" ")}async function nx(t,e=0){const n=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"]),r=new Set(["cookie","authorization"]),s=JSON.stringify(t.request.url),i=t.request.headers,o=i.reduce((v,m)=>{const w=m.name;return!n.has(w.toLowerCase())&&!w.includes(":")&&v.append(w,m.value),v},new Headers),l={};for(const v of o)l[v[0]]=v[1];const a=t.request.cookies.length||i.some(({name:v})=>r.has(v.toLowerCase()))?"include":"omit",c=i.find(({name:v})=>v.toLowerCase()==="referer"),u=c?c.value:void 0,f=await Mg(t),d={headers:Object.keys(l).length?l:void 0,referrer:u,body:f,method:t.request.method,mode:"cors"};if(e===1){const v=i.find(w=>w.name.toLowerCase()==="cookie"),m={};delete d.mode,v&&(m.cookie=v.value),u&&(delete d.referrer,m.Referer=u),Object.keys(m).length&&(d.headers={...l,...m})}else d.credentials=a;const h=JSON.stringify(d,null,2);return`fetch(${s}, ${h});`}async function Mg(t){var e,n;return(e=t.request.postData)!=null&&e._sha1?await fetch(`sha1/${t.request.postData._sha1}`).then(r=>r.text()):(n=t.request.postData)==null?void 0:n.text}class rx{generatePlaywrightRequestCall(e,n){let r=e.method.toLowerCase();const s=new URL(e.url),i=`${s.origin}${s.pathname}`,o={};["delete","get","head","post","put","patch"].includes(r)||(o.method=r,r="fetch"),s.searchParams.size&&(o.params=Object.fromEntries(s.searchParams.entries())),n&&(o.data=n),e.headers.length&&(o.headers=Object.fromEntries(e.headers.map(c=>[c.name,c.value])));const l=[`'${i}'`];return Object.keys(o).length>0&&l.push(this.prettyPrintObject(o)),`await page.request.${r}(${l.join(", ")});`}prettyPrintObject(e,n=2,r=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 l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`[ -${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`, -`)} -${l}]`}if(Object.keys(e).length===0)return"{}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`{ -${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1),u=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(l)?l:this.stringLiteral(l);return`${i}${u}: ${c}`}).join(`, -`)} -${s}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(` -`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class sx{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),i=[`"${`${r.origin}${r.pathname}`}"`];let o=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(o)||(i.push(`method="${o}"`),o="fetch"),r.searchParams.size&&i.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),n&&i.push(`data=${this.prettyPrintObject(n)}`),e.headers.length&&i.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(a=>[a.name,a.value])))}`);const l=i.length===1?i[0]:` -${i.map(a=>this.indent(a,2)).join(`, -`)} -`;return`await page.request.${o}(${l})`}indent(e,n){return e.split(` -`).map(r=>" ".repeat(n)+r).join(` -`)}prettyPrintObject(e,n=2,r=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 l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`[ -${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`, -`)} -${l}]`}if(Object.keys(e).length===0)return"{}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`{ -${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1);return`${i}${this.stringLiteral(l)}: ${c}`}).join(`, -`)} -${s}}`}stringLiteral(e){return JSON.stringify(e)}}class ix{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),s=`${r.origin}${r.pathname}`,i={},o=[];let l=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(l)||(i.Method=l,l="fetch"),r.searchParams.size&&(i.Params=Object.fromEntries(r.searchParams.entries())),n&&(i.Data=n),e.headers.length&&(i.Headers=Object.fromEntries(e.headers.map(u=>[u.name,u.value])));const a=[`"${s}"`];return Object.keys(i).length>0&&a.push(this.prettyPrintObject(i)),`${o.join(` -`)}${o.length?` -`:""}await request.${this.toFunctionName(l)}(${a.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,n=2,r=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 l=" ".repeat(r*n),a=" ".repeat((r+1)*n);return`new object[] { -${e.map(u=>`${a}${this.prettyPrintObject(u,n,r+1)}`).join(`, -`)} -${l}}`}if(Object.keys(e).length===0)return"new {}";const s=" ".repeat(r*n),i=" ".repeat((r+1)*n);return`new() { -${Object.entries(e).map(([l,a])=>{const c=this.prettyPrintObject(a,n,r+1),u=r===0?l:`[${this.stringLiteral(l)}]`;return`${i}${u} = ${c}`}).join(`, -`)} -${s}}`}stringLiteral(e){return JSON.stringify(e)}}class ox{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),s=[`"${r.origin}${r.pathname}"`],i=[];let o=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(o)||(i.push(`setMethod("${o}")`),o="fetch");for(const[l,a]of r.searchParams)i.push(`setQueryParam(${this.stringLiteral(l)}, ${this.stringLiteral(a)})`);n&&i.push(`setData(${this.stringLiteral(n)})`);for(const l of e.headers)i.push(`setHeader(${this.stringLiteral(l.name)}, ${this.stringLiteral(l.value)})`);return i.length>0&&s.push(`RequestOptions.create() - .${i.join(` - .`)} -`),`request.${o}(${s.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function lx(t){if(t==="javascript")return new rx;if(t==="python")return new sx;if(t==="csharp")return new ix;if(t==="java")return new ox;throw new Error("Unsupported language: "+t)}const ax=({resource:t,sdkLanguage:e,startTimeOffset:n,onClose:r})=>{const[s,i]=N.useState("request");return p.jsx(Pc,{dataTestId:"network-request-details",leftToolbar:[p.jsx(Tt,{icon:"close",title:"Close",onClick:r},"close")],tabs:[{id:"request",title:"Request",render:()=>p.jsx(cx,{resource:t,sdkLanguage:e,startTimeOffset:n})},{id:"response",title:"Response",render:()=>p.jsx(ux,{resource:t})},{id:"body",title:"Body",render:()=>p.jsx(fx,{resource:t})}],selectedTab:s,setSelectedTab:i})},cx=({resource:t,sdkLanguage:e,startTimeOffset:n})=>{const[r,s]=N.useState(null);return N.useEffect(()=>{(async()=>{if(t.request.postData){const o=t.request.headers.find(a=>a.name.toLowerCase()==="content-type"),l=o?o.value:"";if(t.request.postData._sha1){const a=await fetch(`sha1/${t.request.postData._sha1}`);s({text:Rc(await a.text(),l),mimeType:l})}else s({text:Rc(t.request.postData.text,l),mimeType:l})}else s(null)})()},[t]),p.jsxs("div",{className:"network-request-details-tab",children:[p.jsx("div",{className:"network-request-details-header",children:"General"}),p.jsx("div",{className:"network-request-details-url",children:`URL: ${t.request.url}`}),p.jsx("div",{className:"network-request-details-general",children:`Method: ${t.request.method}`}),t.response.status!==-1&&p.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",p.jsx("span",{className:hx(t.response.status),style:{display:"inline-flex"},children:`${t.response.status} ${t.response.statusText}`})]}),t.request.queryString.length?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),p.jsx("div",{className:"network-request-details-headers",children:t.request.queryString.map(i=>`${i.name}: ${i.value}`).join(` -`)})]}):null,p.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),p.jsx("div",{className:"network-request-details-headers",children:t.request.headers.map(i=>`${i.name}: ${i.value}`).join(` -`)}),p.jsx("div",{className:"network-request-details-header",children:"Time"}),p.jsx("div",{className:"network-request-details-general",children:`Start: ${Pe(n)}`}),p.jsx("div",{className:"network-request-details-general",children:`Duration: ${Pe(t.time)}`}),p.jsxs("div",{className:"network-request-details-copy",children:[p.jsx(wa,{description:"Copy as cURL",value:()=>tx(t)}),p.jsx(wa,{description:"Copy as Fetch",value:()=>nx(t)}),p.jsx(wa,{description:"Copy as Playwright",value:async()=>lx(e).generatePlaywrightRequestCall(t.request,r==null?void 0:r.text)})]}),r&&p.jsx("div",{className:"network-request-details-header",children:"Request Body"}),r&&p.jsx(Wr,{text:r.text,mimeType:r.mimeType,readOnly:!0,lineNumbers:!0})]})},ux=({resource:t})=>p.jsxs("div",{className:"network-request-details-tab",children:[p.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),p.jsx("div",{className:"network-request-details-headers",children:t.response.headers.map(e=>`${e.name}: ${e.value}`).join(` -`)})]}),fx=({resource:t})=>{const[e,n]=N.useState(null);return N.useEffect(()=>{(async()=>{if(t.response.content._sha1){const s=t.response.content.mimeType.includes("image"),i=t.response.content.mimeType.includes("font"),o=await fetch(`sha1/${t.response.content._sha1}`);if(s){const l=await o.blob(),a=new FileReader,c=new Promise(u=>a.onload=u);a.readAsDataURL(l),n({dataUrl:(await c).target.result})}else if(i){const l=await o.arrayBuffer();n({font:l})}else{const l=Rc(await o.text(),t.response.content.mimeType);n({text:l,mimeType:t.response.content.mimeType})}}else n(null)})()},[t]),p.jsxs("div",{className:"network-request-details-tab",children:[!t.response.content._sha1&&p.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&p.jsx(dx,{font:e.font}),e&&e.dataUrl&&p.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&p.jsx(Wr,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},dx=({font:t})=>{const[e,n]=N.useState(!1);return N.useEffect(()=>{let r;try{r=new FontFace("font-preview",t),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[t]),e?p.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):p.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",p.jsx("br",{}),"NOPQRSTUVWXYZ",p.jsx("br",{}),"abcdefghijklm",p.jsx("br",{}),"nopqrstuvwxyz",p.jsx("br",{}),"1234567890"]})};function hx(t){return t<300||t===304?"green-circle":t<400?"yellow-circle":"red-circle"}function Rc(t,e){if(t===null)return"Loading...";const n=t;if(n==="")return"";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}const Og=({cursor:t,onPaneMouseMove:e,onPaneMouseUp:n,onPaneDoubleClick:r})=>(tt.useEffect(()=>{const s=document.createElement("div");return s.style.position="fixed",s.style.top="0",s.style.right="0",s.style.bottom="0",s.style.left="0",s.style.zIndex="9999",s.style.cursor=t,document.body.appendChild(s),e&&s.addEventListener("mousemove",e),n&&s.addEventListener("mouseup",n),r&&document.body.addEventListener("dblclick",r),()=>{e&&s.removeEventListener("mousemove",e),n&&s.removeEventListener("mouseup",n),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(s)}},[t,e,n,r]),p.jsx(p.Fragment,{})),px={position:"absolute",top:0,right:0,bottom:0,left:0},$g=({orientation:t,offsets:e,setOffsets:n,resizerColor:r,resizerWidth:s,minColumnWidth:i})=>{const o=i||0,[l,a]=tt.useState(null),[c,u]=Xn(),f={position:"absolute",right:t==="horizontal"?void 0:0,bottom:t==="horizontal"?0:void 0,width:t==="horizontal"?7:void 0,height:t==="horizontal"?void 0:7,borderTopWidth:t==="horizontal"?void 0:(7-s)/2,borderRightWidth:t==="horizontal"?(7-s)/2:void 0,borderBottomWidth:t==="horizontal"?void 0:(7-s)/2,borderLeftWidth:t==="horizontal"?(7-s)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:t==="horizontal"?"ew-resize":"ns-resize"};return p.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-s)/2,zIndex:100,pointerEvents:"none"},ref:u,children:[!!l&&p.jsx(Og,{cursor:t==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>a(null),onPaneMouseMove:d=>{if(!d.buttons)a(null);else if(l){const h=t==="horizontal"?d.clientX-l.clientX:d.clientY-l.clientY,v=l.offset+h,m=l.index>0?e[l.index-1]:0,w=t==="horizontal"?c.width:c.height,y=Math.min(Math.max(m+o,v),w-o)-e[l.index];for(let g=l.index;gp.jsx("div",{style:{...f,top:t==="horizontal"?0:d,left:t==="horizontal"?d:0,pointerEvents:"initial"},onMouseDown:v=>a({clientX:v.clientX,clientY:v.clientY,offset:d,index:h}),children:p.jsx("div",{style:{...px,background:r}})},h))]})};function mx(t){const[e,n]=N.useState([]);N.useEffect(()=>{const i=[];for(let o=0;o{var o,l;(l=t.setSorting)==null||l.call(t,{by:i,negate:((o=t.sorting)==null?void 0:o.by)===i?!t.sorting.negate:!1})},[t]);return p.jsxs("div",{className:`grid-view ${t.name}-grid-view`,children:[p.jsx($g,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),p.jsxs("div",{className:"vbox",children:[p.jsx("div",{className:"grid-view-header",children:t.columns.map((i,o)=>p.jsxs("div",{className:"grid-view-header-cell "+gx(i,t.sorting),style:{width:ot.setSorting&&s(i),children:[p.jsx("span",{className:"grid-view-header-cell-title",children:t.columnTitle(i)}),p.jsx("span",{className:"codicon codicon-triangle-up"}),p.jsx("span",{className:"codicon codicon-triangle-down"})]},t.columnTitle(i)))}),p.jsx(Tl,{name:t.name,items:t.items,id:t.id,render:(i,o)=>p.jsx(p.Fragment,{children:t.columns.map((l,a)=>{const{body:c,title:u}=t.render(i,l,o);return p.jsx("div",{className:`grid-view-cell grid-view-column-${String(l)}`,title:u,style:{width:ap.jsxs("div",{className:"network-filters",children:[p.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:t.searchValue,onChange:n=>e({...t,searchValue:n.target.value})}),p.jsx("div",{className:"network-filters-resource-types",children:yx.map(n=>p.jsx("div",{title:n,onClick:()=>e({...t,resourceType:n}),className:`network-filters-resource-type ${t.resourceType===n?"selected":""}`,children:n},n))})]}),Sx=mx;function xx(t,e){const n=N.useMemo(()=>((t==null?void 0:t.resources)||[]).filter(o=>e?!!o._monotonicTime&&o._monotonicTime>=e.minimum&&o._monotonicTime<=e.maximum:!0),[t,e]),r=N.useMemo(()=>new Nx(t),[t]);return{resources:n,contextIdMap:r}}const _x=({boundaries:t,networkModel:e,onEntryHovered:n,sdkLanguage:r})=>{const[s,i]=N.useState(void 0),[o,l]=N.useState(void 0),[a,c]=N.useState(vx),{renderedEntries:u}=N.useMemo(()=>{const m=e.resources.map(w=>Cx(w,t,e.contextIdMap)).filter(Mx(a));return s&&Lx(m,s),{renderedEntries:m}},[e.resources,e.contextIdMap,a,s,t]),[f,d]=N.useState(()=>new Map(Pg().map(m=>[m,Ex(m)]))),h=N.useCallback(m=>{c(m),l(void 0)},[]);if(!e.resources.length)return p.jsx(Yn,{text:"No network calls"});const v=p.jsx(Sx,{name:"network",items:u,selectedItem:o,onSelected:m=>l(m),onHighlighted:m=>n==null?void 0:n(m==null?void 0:m.resource),columns:bx(!!o,u),columnTitle:kx,columnWidths:f,setColumnWidths:d,isError:m=>m.status.code>=400||m.status.code===-1,isInfo:m=>!!m.route,render:(m,w)=>Tx(m,w),sorting:s,setSorting:i});return p.jsxs(p.Fragment,{children:[p.jsx(wx,{filterState:a,onFilterStateChange:h}),!o&&v,o&&p.jsx(Qo,{sidebarSize:f.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:p.jsx(ax,{resource:o.resource,sdkLanguage:r,startTimeOffset:o.start,onClose:()=>l(void 0)}),sidebar:v})]})},kx=t=>t==="contextId"?"Source":t==="name"?"Name":t==="method"?"Method":t==="status"?"Status":t==="contentType"?"Content Type":t==="duration"?"Duration":t==="size"?"Size":t==="start"?"Start":t==="route"?"Route":"",Ex=t=>t==="name"?200:t==="method"||t==="status"?60:t==="contentType"?200:t==="contextId"?60:100;function bx(t,e){if(t){const r=["name"];return rh(e)&&r.unshift("contextId"),r}let n=Pg();return rh(e)||(n=n.filter(r=>r!=="contextId")),n}function Pg(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const Tx=(t,e)=>e==="contextId"?{body:t.contextId,title:t.name.url}:e==="name"?{body:t.name.name,title:t.name.url}:e==="method"?{body:t.method}:e==="status"?{body:t.status.code>0?t.status.code:"",title:t.status.text}:e==="contentType"?{body:t.contentType}:e==="duration"?{body:Pe(t.duration)}:e==="size"?{body:kv(t.size)}:e==="start"?{body:Pe(t.start)}:e==="route"?{body:t.route}:{body:""};class Nx{constructor(e){W(this,"_pagerefToShortId",new Map);W(this,"_contextToId",new Map);W(this,"_lastPageId",0);W(this,"_lastApiRequestContextId",0)}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let n=this._pagerefToShortId.get(e);return n||(++this._lastPageId,n="page#"+this._lastPageId,this._pagerefToShortId.set(e,n)),n}_apiRequestContextId(e){const n=Ko(e);if(!n)return"";let r=this._contextToId.get(n);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(n,r)),r}}function rh(t){const e=new Set;for(const n of t)if(e.add(n.contextId),e.size>1)return!0;return!1}const Cx=(t,e,n)=>{const r=Ax(t);let s;try{const l=new URL(t.request.url);s=l.pathname.substring(l.pathname.lastIndexOf("/")+1),s||(s=l.host)}catch{s=t.request.url}let i=t.response.content.mimeType;const o=i.match(/^(.*);\s*charset=.*$/);return o&&(i=o[1]),{name:{name:s,url:t.request.url},method:t.request.method,status:{code:t.response.status,text:t.response.statusText},contentType:i,duration:t.time,size:t.response._transferSize>0?t.response._transferSize:t.response.bodySize,start:t._monotonicTime-e.minimum,route:r,resource:t,contextId:n.contextId(t)}};function Ax(t){return t._wasAborted?"aborted":t._wasContinued?"continued":t._wasFulfilled?"fulfilled":t._apiRequest?"api":""}function Lx(t,e){const n=Ix(e==null?void 0:e.by);n&&t.sort(n),e.negate&&t.reverse()}function Ix(t){if(t==="start")return(e,n)=>e.start-n.start;if(t==="duration")return(e,n)=>e.duration-n.duration;if(t==="status")return(e,n)=>e.status.code-n.status.code;if(t==="method")return(e,n)=>{const r=e.method,s=n.method;return r.localeCompare(s)};if(t==="size")return(e,n)=>e.size-n.size;if(t==="contentType")return(e,n)=>e.contentType.localeCompare(n.contentType);if(t==="name")return(e,n)=>e.name.name.localeCompare(n.name.name);if(t==="route")return(e,n)=>e.route.localeCompare(n.route);if(t==="contextId")return(e,n)=>e.contextId.localeCompare(n.contextId)}const jx={All:()=>!0,Fetch:t=>t==="application/json",HTML:t=>t==="text/html",CSS:t=>t==="text/css",JS:t=>t.includes("javascript"),Font:t=>t.includes("font"),Image:t=>t.includes("image")};function Mx({searchValue:t,resourceType:e}){return n=>{const r=jx[e];return r(n.contentType)&&n.name.url.toLowerCase().includes(t.toLowerCase())}}const sh={queryAll(t,e){e.startsWith("/")&&t.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const n=[],r=t.ownerDocument||t;if(!r)return n;const s=r.evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let i=s.iterateNext();i;i=s.iterateNext())i.nodeType===Node.ELEMENT_NODE&&n.push(i);return n}};let Rg="";function Ox(t){Rg=t}function Nl(t,e){for(;e;){if(t.contains(e))return!0;e=Fg(e)}return!1}function $e(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function Dg(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Fg(t){for(;t.parentElement;)t=t.parentElement;return $e(t)}function Ls(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=Fg(t)}}function Zn(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function zg(t,e){if(e=e??Zn(t),!e)return!0;if(Element.prototype.checkVisibility&&Rg!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function $r(t){const e=Zn(t);if(!e)return!0;if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===1&&$r(r)||r.nodeType===3&&Bg(r))return!0;return!1}if(!zg(t,e))return!1;const n=t.getBoundingClientRect();return n.width>0&&n.height>0}function Bg(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Se(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function ih(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const oh="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]",$x=new Map([["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-labelledby",new Set(["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",new Set(["generic"])]]);function Ug(t,e){return[...$x].some(([n,r])=>!(r!=null&&r.has(e||""))&&t.hasAttribute(n))}function Hg(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function Px(t){return!ty(t)&&(Rx(t)||Hg(t))}function Rx(t){const e=Se(t);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?t.hasAttribute("href"):e==="INPUT"?!t.hidden:!1}const Sa={A:t=>t.hasAttribute("href")?"link":null,AREA:t=>t.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:t=>Ls(t,oh)?null:"contentinfo",FORM:t=>ih(t)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:t=>Ls(t,oh)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:t=>t.getAttribute("alt")===""&&!t.getAttribute("title")&&!Ug(t)&&!Hg(t)?"presentation":"img",INPUT:t=>{const e=t.type.toLowerCase();if(e==="search")return t.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const n=es(t,t.getAttribute("list"))[0];return n&&Se(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:Jx[e]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SECTION:t=>ih(t)?"region":null,SELECT:t=>t.hasAttribute("multiple")||t.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:t=>{const e=Ls(t,"table"),n=e?Yo(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:t=>{if(t.getAttribute("scope")==="col")return"columnheader";if(t.getAttribute("scope")==="row")return"rowheader";const e=Ls(t,"table"),n=e?Yo(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},Dx={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 lh(t){var r;const e=((r=Sa[Se(t)])==null?void 0:r.call(Sa,t))||"";if(!e)return null;let n=t;for(;n;){const s=$e(n),i=Dx[Se(n)];if(!i||!s||!i.includes(Se(s)))break;const o=Yo(s);if((o==="none"||o==="presentation")&&!Vg(s,o))return o;n=s}return e}const Fx=["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 Yo(t){return(t.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>Fx.includes(n))||null}function Vg(t,e){return Ug(t,e)||Px(t)}function ye(t){const e=Yo(t);if(!e)return lh(t);if(e==="none"||e==="presentation"){const n=lh(t);if(Vg(t,n))return n}return e}function qg(t){return t===null?void 0:t.toLowerCase()==="true"}function Wg(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Se(t))}function ct(t){if(Wg(t))return!0;const e=Zn(t),n=t.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!n){for(let s=t.firstChild;s;s=s.nextSibling)if(s.nodeType===1&&!ct(s)||s.nodeType===3&&Bg(s))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!zg(t,e)?!0:Kg(t)}function Kg(t){let e=on==null?void 0:on.get(t);if(e===void 0){if(e=!1,t.parentElement&&t.parentElement.shadowRoot&&!t.assignedSlot&&(e=!0),!e){const n=Zn(t);e=!n||n.display==="none"||qg(t.getAttribute("aria-hidden"))===!0}if(!e){const n=$e(t);n&&(e=Kg(n))}on==null||on.set(t,e)}return e}function es(t,e){if(!e)return[];const n=Dg(t);if(!n)return[];try{const r=e.split(" ").filter(i=>!!i),s=new Set;for(const i of r){const o=n.querySelector("#"+CSS.escape(i));o&&s.add(o)}return[...s]}catch{return[]}}function zt(t){return t.trim()}function Hs(t){return t.split(" ").map(e=>e.replace(/\r\n/g,` -`).replace(/\s\s*/g," ")).join(" ").trim()}function ah(t,e){const n=[...t.querySelectorAll(e)];for(const r of es(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Zo(t,e){const n=e==="::before"?rf:sf;if(n!=null&&n.has(t))return(n==null?void 0:n.get(t))||"";const r=Zn(t,e),s=zx(t,r);return n&&n.set(t,s),s}function zx(t,e){if(!e||e.display==="none"||e.visibility==="hidden")return"";const n=e.content;let r;if(n[0]==="'"&&n[n.length-1]==="'"||n[0]==='"'&&n[n.length-1]==='"')r=n.substring(1,n.length-1);else if(n.startsWith("attr(")&&n.endsWith(")")){const s=n.substring(5,n.length-1).trim();r=t.getAttribute(s)||""}return r!==void 0?(e.display||"inline")!=="inline"?" "+r+" ":r:""}function Qg(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=es(t,e);return n.length?n:null}function Bx(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),r=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(t);return n||r}function ui(t,e){const n=e?ef:Zu;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(ye(t)||"")||(r=Hs(_t(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function ch(t,e){const n=e?nf:tf;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const s=es(t,t.getAttribute("aria-describedby"));r=Hs(s.map(i=>_t(i,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:i,hidden:ct(i)}})).join(" "))}else t.hasAttribute("aria-description")?r=Hs(t.getAttribute("aria-description")||""):r=Hs(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}const Ux=["application","checkbox","combobox","gridcell","listbox","radiogroup","slider","spinbutton","textbox","tree","columnheader","rowheader","searchbox","switch","treegrid"];function Hx(t){const e=ye(t)||"";if(!e||!Ux.includes(e))return"false";const n=t.getAttribute("aria-invalid");return!n||n.trim()===""||n.toLocaleLowerCase()==="false"?"false":n==="true"||n==="grammar"||n==="spelling"?n:"true"}function Vx(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function qx(t){const e=kr;let n=kr==null?void 0:kr.get(t);if(n===void 0){n="";const r=Hx(t)!=="false",s=Vx(t);if(r||s){const i=t.getAttribute("aria-errormessage");n=es(t,i).map(a=>Hs(_t(a,{visitedElements:new Set,embeddedInDescribedBy:{element:a,hidden:ct(a)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function _t(t,e){var a,c,u,f;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const d=!!((a=e.embeddedInLabelledBy)!=null&&a.hidden)||!!((c=e.embeddedInDescribedBy)!=null&&c.hidden)||!!((u=e.embeddedInNativeTextAlternative)!=null&&u.hidden)||!!((f=e.embeddedInLabel)!=null&&f.hidden);if(Wg(t)||!d&&ct(t))return e.visitedElements.add(t),""}const r=Qg(t);if(!e.embeddedInLabelledBy){const d=(r||[]).map(h=>_t(h,{...e,embeddedInLabelledBy:{element:h,hidden:ct(h)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(d)return d}const s=ye(t)||"",i=Se(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const d=[...t.labels||[]].includes(t),h=(r||[]).includes(t);if(!d&&!h){if(s==="textbox")return e.visitedElements.add(t),i==="INPUT"||i==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(s)){e.visitedElements.add(t);let v;if(i==="SELECT")v=[...t.selectedOptions],!v.length&&t.options.length&&v.push(t.options[0]);else{const m=s==="combobox"?ah(t,"*").find(w=>ye(w)==="listbox"):t;v=m?ah(m,'[aria-selected="true"]').filter(w=>ye(w)==="option"):[]}return!v.length&&i==="INPUT"?t.value:v.map(m=>_t(m,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(s))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(s))return e.visitedElements.add(t),""}}const o=t.getAttribute("aria-label")||"";if(zt(o))return e.visitedElements.add(t),o;if(!["presentation","none"].includes(s)){if(i==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const d=t.value||"";return zt(d)?d:t.type==="submit"?"Submit":t.type==="reset"?"Reset":t.getAttribute("title")||""}if(i==="INPUT"&&t.type==="image"){e.visitedElements.add(t);const d=t.labels||[];if(d.length&&!e.embeddedInLabelledBy)return Bi(d,e);const h=t.getAttribute("alt")||"";if(zt(h))return h;const v=t.getAttribute("title")||"";return zt(v)?v:"Submit"}if(!r&&i==="BUTTON"){e.visitedElements.add(t);const d=t.labels||[];if(d.length)return Bi(d,e)}if(!r&&i==="OUTPUT"){e.visitedElements.add(t);const d=t.labels||[];return d.length?Bi(d,e):t.getAttribute("title")||""}if(!r&&(i==="TEXTAREA"||i==="SELECT"||i==="INPUT")){e.visitedElements.add(t);const d=t.labels||[];if(d.length)return Bi(d,e);const h=i==="INPUT"&&["text","password","search","tel","email","url"].includes(t.type)||i==="TEXTAREA",v=t.getAttribute("placeholder")||"",m=t.getAttribute("title")||"";return!h||m?m:v}if(!r&&i==="FIELDSET"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="LEGEND")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});return t.getAttribute("title")||""}if(!r&&i==="FIGURE"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="FIGCAPTION")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});return t.getAttribute("title")||""}if(i==="IMG"){e.visitedElements.add(t);const d=t.getAttribute("alt")||"";return zt(d)?d:t.getAttribute("title")||""}if(i==="TABLE"){e.visitedElements.add(t);for(let h=t.firstElementChild;h;h=h.nextElementSibling)if(Se(h)==="CAPTION")return _t(h,{...n,embeddedInNativeTextAlternative:{element:h,hidden:ct(h)}});const d=t.getAttribute("summary")||"";if(d)return d}if(i==="AREA"){e.visitedElements.add(t);const d=t.getAttribute("alt")||"";return zt(d)?d:t.getAttribute("title")||""}if(i==="SVG"||t.ownerSVGElement){e.visitedElements.add(t);for(let d=t.firstElementChild;d;d=d.nextElementSibling)if(Se(d)==="TITLE"&&d.ownerSVGElement)return _t(d,{...n,embeddedInLabelledBy:{element:d,hidden:ct(d)}})}if(t.ownerSVGElement&&i==="A"){const d=t.getAttribute("xlink:title")||"";if(zt(d))return e.visitedElements.add(t),d}}const l=i==="SUMMARY"&&!["presentation","none"].includes(s);if(Bx(s,e.embeddedInTargetElement==="descendant")||l||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(t);const d=Wx(t,n);if(e.embeddedInTargetElement==="self"?zt(d):d)return d}if(!["presentation","none"].includes(s)||i==="IFRAME"){e.visitedElements.add(t);const d=t.getAttribute("title")||"";if(zt(d))return d}return e.visitedElements.add(t),""}function Wx(t,e){const n=[],r=(i,o)=>{var l;if(!(o&&i.assignedSlot))if(i.nodeType===1){const a=((l=Zn(i))==null?void 0:l.display)||"inline";let c=_t(i,e);(a!=="inline"||i.nodeName==="BR")&&(c=" "+c+" "),n.push(c)}else i.nodeType===3&&n.push(i.textContent||"")};n.push(Zo(t,"::before"));const s=t.nodeName==="SLOT"?t.assignedNodes():[];if(s.length)for(const i of s)r(i,!1);else{for(let i=t.firstChild;i;i=i.nextSibling)r(i,!0);if(t.shadowRoot)for(let i=t.shadowRoot.firstChild;i;i=i.nextSibling)r(i,!0);for(const i of es(t,t.getAttribute("aria-owns")))r(i,!0)}return n.push(Zo(t,"::after")),n.join("")}const Ku=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Xg(t){return Se(t)==="OPTION"?t.selected:Ku.includes(ye(t)||"")?qg(t.getAttribute("aria-selected"))===!0:!1}const Qu=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Gg(t){const e=Xu(t,!0);return e==="error"?!1:e}function Kx(t){return Xu(t,!0)}function Qx(t){return Xu(t,!1)}function Xu(t,e){const n=Se(t);if(e&&n==="INPUT"&&t.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(t.type))return t.checked;if(Qu.includes(ye(t)||"")){const r=t.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const Xx=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function Gx(t){const e=Se(t);return["INPUT","TEXTAREA","SELECT"].includes(e)?t.hasAttribute("readonly"):Xx.includes(ye(t)||"")?t.getAttribute("aria-readonly")==="true":t.isContentEditable?!1:"error"}const Gu=["button"];function Jg(t){if(Gu.includes(ye(t)||"")){const e=t.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Ju=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Yg(t){if(Se(t)==="DETAILS")return t.open;if(Ju.includes(ye(t)||"")){const e=t.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Yu=["heading","listitem","row","treeitem"];function Zg(t){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Se(t)];if(e)return e;if(Yu.includes(ye(t)||"")){const n=t.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}const ey=["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 el(t){return ty(t)||ry(t)}function ty(t){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(t.tagName)&&(t.hasAttribute("disabled")||ny(t))}function ny(t){return t?Se(t)==="FIELDSET"&&t.hasAttribute("disabled")?!0:ny(t.parentElement):!1}function ry(t){if(!t)return!1;if(ey.includes(ye(t)||"")){const e=(t.getAttribute("aria-disabled")||"").toLowerCase();if(e==="true")return!0;if(e==="false")return!1}return ry($e(t))}function Bi(t,e){return[...t].map(n=>_t(n,{...e,embeddedInLabel:{element:n,hidden:ct(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}let Zu,ef,tf,nf,kr,on,rf,sf,sy=0;function of(){++sy,Zu??(Zu=new Map),ef??(ef=new Map),tf??(tf=new Map),nf??(nf=new Map),kr??(kr=new Map),on??(on=new Map),rf??(rf=new Map),sf??(sf=new Map)}function lf(){--sy||(Zu=void 0,ef=void 0,tf=void 0,nf=void 0,kr=void 0,on=void 0,rf=void 0,sf=void 0)}const Jx={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function iy(t,e){for(const n of e.jsonPath)t!=null&&(t=t[n]);return oy(t,e)}function oy(t,e){const n=typeof t=="string"&&!e.caseSensitive?t.toUpperCase():t,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op===""?!!n:e.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:e.op==="*="?n.includes(r):e.op==="^="?n.startsWith(r):e.op==="$="?n.endsWith(r):e.op==="|="?n===r||n.startsWith(r+"-"):e.op==="~="?n.split(" ").includes(r):!1}function af(t){const e=t.ownerDocument;return t.nodeName==="SCRIPT"||t.nodeName==="NOSCRIPT"||t.nodeName==="STYLE"||e.head&&e.head.contains(t)}function Ke(t,e){let n=t.get(e);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!af(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))n={full:e.value,normalized:De(e.value),immediate:[e.value]};else{for(let s=e.firstChild;s;s=s.nextSibling)if(s.nodeType===Node.TEXT_NODE)n.full+=s.nodeValue||"",r+=s.nodeValue||"";else{if(s.nodeType===Node.COMMENT_NODE)continue;r&&n.immediate.push(r),r="",s.nodeType===Node.ELEMENT_NODE&&(n.full+=Ke(t,s).full)}r&&n.immediate.push(r),e.shadowRoot&&(n.full+=Ke(t,e.shadowRoot).full),n.full&&(n.normalized=De(n.full))}}t.set(e,n)}return n}function Cl(t,e,n){if(af(e)||!n(Ke(t,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Ke(t,r)))return"selfAndChildren";return e.shadowRoot&&n(Ke(t,e.shadowRoot))?"selfAndChildren":"self"}function ly(t,e){const n=Qg(e);if(n)return n.map(i=>Ke(t,i));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:De(r),immediate:[r]}];const s=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||s){const i=e.labels;if(i)return[...i].map(o=>Ke(t,o))}return[]}function uh(t){return t.displayName||t.name||"Anonymous"}function Yx(t){if(t.type)switch(typeof t.type){case"function":return uh(t.type);case"string":return t.type;case"object":return t.type.displayName||(t.type.render?uh(t.type.render):"")}if(t._currentElement){const e=t._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function Zx(t){var e;return t.key??((e=t._currentElement)==null?void 0:e.key)}function e_(t){if(t.child){const n=[];for(let r=t.child;r;r=r.sibling)n.push(r);return n}if(!t._currentElement)return[];const e=n=>{var s;const r=(s=n._currentElement)==null?void 0:s.type;return typeof r=="function"||typeof r=="string"};if(t._renderedComponent){const n=t._renderedComponent;return e(n)?[n]:[]}return t._renderedChildren?[...Object.values(t._renderedChildren)].filter(e):[]}function t_(t){var r;const e=t.memoizedProps||((r=t._currentElement)==null?void 0:r.props);if(!e||typeof e=="string")return e;const n={...e};return delete n.children,n}function ay(t){var r;const e={key:Zx(t),name:Yx(t),children:e_(t).map(ay),rootElements:[],props:t_(t)},n=t.stateNode||t._hostNode||((r=t._renderedComponent)==null?void 0:r._hostNode);if(n instanceof Element)e.rootElements.push(n);else for(const s of e.children)e.rootElements.push(...s.rootElements);return e}function cy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)cy(r,e,n);return n}function uy(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);do{const s=r.currentNode,i=s,o=Object.keys(i).find(a=>a.startsWith("__reactContainer")&&i[a]!==null);if(o)e.push(i[o].stateNode.current);else{const a="_reactRootContainer";i.hasOwnProperty(a)&&i[a]!==null&&e.push(i[a]._internalRoot.current)}if(s instanceof Element&&s.hasAttribute("data-reactroot"))for(const a of Object.keys(s))(a.startsWith("__reactInternalInstance")||a.startsWith("__reactFiber"))&&e.push(s[a]);const l=s instanceof Element?s.shadowRoot:null;l&&uy(l,e)}while(r.nextNode());return e}const n_={queryAll(t,e){const{name:n,attributes:r}=Un(e,!1),o=uy(t.ownerDocument||t).map(a=>ay(a)).map(a=>cy(a,c=>{const u=c.props??{};if(c.key!==void 0&&(u.key=c.key),n&&c.name!==n||c.rootElements.some(f=>!Nl(t,f)))return!1;for(const f of r)if(!iy(u,f))return!1;return!0})).flat(),l=new Set;for(const a of o)for(const c of a.rootElements)l.add(c);return[...l]}};function fy(t,e){const n=t.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=n.substring(n.lastIndexOf("/")+1);return r.endsWith(e)&&(r=r.substring(0,r.length-e.length)),r}function r_(t,e){return e?e.toUpperCase():""}const s_=/(?:^|[-_/])(\w)/g,dy=t=>t&&t.replace(s_,r_);function i_(t){function e(u){const f=u.name||u._componentTag||u.__playwright_guessedName;if(f)return f;const d=u.__file;if(d)return dy(fy(d,".vue"))}function n(u,f){return u.type.__playwright_guessedName=f,f}function r(u){var d,h,v,m;const f=e(u.type||{});if(f)return f;if(u.root===u)return"Root";for(const w in(h=(d=u.parent)==null?void 0:d.type)==null?void 0:h.components)if(((v=u.parent)==null?void 0:v.type.components[w])===u.type)return n(u,w);for(const w in(m=u.appContext)==null?void 0:m.components)if(u.appContext.components[w]===u.type)return n(u,w);return"Anonymous Component"}function s(u){return u._isBeingDestroyed||u.isUnmounted}function i(u){return u.subTree.type.toString()==="Symbol(Fragment)"}function o(u){const f=[];return u.component&&f.push(u.component),u.suspense&&f.push(...o(u.suspense.activeBranch)),Array.isArray(u.children)&&u.children.forEach(d=>{d.component?f.push(d.component):f.push(...o(d))}),f.filter(d=>{var h;return!s(d)&&!((h=d.type.devtools)!=null&&h.hide)})}function l(u){return i(u)?a(u.subTree):[u.subTree.el]}function a(u){if(!u.children)return[];const f=[];for(let d=0,h=u.children.length;d!!o.component).map(o=>o.component):[]}function s(i){return{name:n(i),children:r(i).map(s),rootElements:[i.$el],props:i._props}}return s(t)}function hy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)hy(r,e,n);return n}function py(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT),s=new Set;do{const i=r.currentNode;i.__vue__&&s.add(i.__vue__.$root),i.__vue_app__&&i._vnode&&i._vnode.component&&e.push({root:i._vnode.component,version:3});const o=i instanceof Element?i.shadowRoot:null;o&&py(o,e)}while(r.nextNode());for(const i of s)e.push({version:2,root:i});return e}const l_={queryAll(t,e){const n=t.ownerDocument||t,{name:r,attributes:s}=Un(e,!1),l=py(n).map(c=>c.version===3?i_(c.root):o_(c.root)).map(c=>hy(c,u=>{if(r&&u.name!==r||u.rootElements.some(f=>!Nl(t,f)))return!1;for(const f of s)if(!iy(u.props,f))return!1;return!0})).flat(),a=new Set;for(const c of l)for(const u of c.rootElements)a.add(u);return[...a]}},my=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];my.sort();function Ss(t,e,n){if(!e.includes(n))throw new Error(`"${t}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function sr(t,e){if(t.op!==""&&!e.includes(t.value))throw new Error(`"${t.name}" must be one of ${e.map(n=>JSON.stringify(n)).join(", ")}`)}function ir(t,e){if(!e.includes(t.op))throw new Error(`"${t.name}" does not support "${t.op}" matcher`)}function a_(t,e){const n={role:e};for(const r of t)switch(r.name){case"checked":{Ss(r.name,Qu,e),sr(r,[!0,!1,"mixed"]),ir(r,["","="]),n.checked=r.op===""?!0:r.value;break}case"pressed":{Ss(r.name,Gu,e),sr(r,[!0,!1,"mixed"]),ir(r,["","="]),n.pressed=r.op===""?!0:r.value;break}case"selected":{Ss(r.name,Ku,e),sr(r,[!0,!1]),ir(r,["","="]),n.selected=r.op===""?!0:r.value;break}case"expanded":{Ss(r.name,Ju,e),sr(r,[!0,!1]),ir(r,["","="]),n.expanded=r.op===""?!0:r.value;break}case"level":{if(Ss(r.name,Yu,e),typeof r.value=="string"&&(r.value=+r.value),r.op!=="="||typeof r.value!="number"||Number.isNaN(r.value))throw new Error('"level" attribute must be compared to a number');n.level=r.value;break}case"disabled":{sr(r,[!0,!1]),ir(r,["","="]),n.disabled=r.op===""?!0:r.value;break}case"name":{if(r.op==="")throw new Error('"name" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');n.name=r.value,n.nameOp=r.op,n.exact=r.caseSensitive;break}case"include-hidden":{sr(r,[!0,!1]),ir(r,["","="]),n.includeHidden=r.op===""?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${my.map(s=>`"${s}"`).join(", ")}.`)}return n}function c_(t,e,n){const r=[],s=o=>{if(ye(o)===e.role&&!(e.selected!==void 0&&Xg(o)!==e.selected)&&!(e.checked!==void 0&&Gg(o)!==e.checked)&&!(e.pressed!==void 0&&Jg(o)!==e.pressed)&&!(e.expanded!==void 0&&Yg(o)!==e.expanded)&&!(e.level!==void 0&&Zg(o)!==e.level)&&!(e.disabled!==void 0&&el(o)!==e.disabled)&&!(!e.includeHidden&&ct(o))){if(e.name!==void 0){const l=De(ui(o,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=De(e.name)),n&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!oy(l,{name:"",jsonPath:[],op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(o)}},i=o=>{const l=[];o.shadowRoot&&l.push(o.shadowRoot);for(const a of o.querySelectorAll("*"))s(a),a.shadowRoot&&l.push(a.shadowRoot);l.forEach(i)};return i(t),r}function fh(t){return{queryAll:(e,n)=>{const r=Un(n,!0),s=r.name.toLowerCase();if(!s)throw new Error("Role must not be empty");const i=a_(r.attributes,s);of();try{return c_(e,i,t)}finally{lf()}}}}function u_(t,e,n){const r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function f_(t,e,n){const r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function d_(t,e,n){const r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function h_(t,e,n){const r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function p_(t,e,n){const r=n===void 0?50:n;let s=0;return t.left-e.right>=0&&(s+=t.left-e.right),e.left-t.right>=0&&(s+=e.left-t.right),e.top-t.bottom>=0&&(s+=e.top-t.bottom),t.top-e.bottom>=0&&(s+=t.top-e.bottom),s>r?void 0:s}const m_=["left-of","right-of","above","below","near"];function gy(t,e,n,r){const s=e.getBoundingClientRect(),i={"left-of":f_,"right-of":u_,above:d_,below:h_,near:p_}[t];let o;for(const l of n){if(l===e)continue;const a=i(s,l.getBoundingClientRect(),r);a!==void 0&&(o===void 0||ar.every((c,u)=>a.rest[u]===c));if(o)return o.result;const l=s();return i.push({rest:r,result:l}),l}_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,n,r){const s=this._checkSelector(n);this.begin();try{return this._cached(this._cacheMatches,e,[s,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(s)?this._matchesEngine(Is,e,s,r):(this._hasScopeClause(s)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,s.simples[s.simples.length-1].selector,r)?this._matchesParents(e,s,s.simples.length-2,r):!1))}finally{this.end()}}query(e,n){const r=this._checkSelector(n);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Is,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const s=this._scoreMap;this._scoreMap=new Map;let i=this._querySimple(e,r.simples[r.simples.length-1].selector);return i=i.filter(o=>this._matchesParents(o,r,r.simples.length-2,e)),this._scoreMap.size&&i.sort((o,l)=>{const a=this._scoreMap.get(o),c=this._scoreMap.get(l);return a===c?0:a===void 0?1:c===void 0?-1:a-c}),this._scoreMap=s,i})}finally{this.end()}}_markScore(e,n){this._scoreMap&&this._scoreMap.set(e,n)}_hasScopeClause(e){return e.simples.some(n=>n.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const n=$e(e.scope);return n?{...e,scope:n,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,n,r){return this._cached(this._cacheMatchesSimple,e,[n,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||n.css&&!this._matchesCSS(e,n.css))return!1;for(const s of n.functions)if(!this._matchesEngine(this._getEngine(s.name),e,s.args,r))return!1;return!0})}_querySimple(e,n){return n.functions.length?this._cached(this._cacheQuerySimple,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=n.css;const s=n.functions;r==="*"&&s.length&&(r=void 0);let i,o=-1;r!==void 0?i=this._queryCSS(e,r):(o=s.findIndex(l=>this._getEngine(l.name).query!==void 0),o===-1&&(o=0),i=this._queryEngine(this._getEngine(s[o].name),e,s[o].args));for(let l=0;lthis._matchesEngine(a,c,s[l].args,e)))}for(let l=0;lthis._matchesEngine(a,c,s[l].args,e)))}return i}):this._queryCSS(e,n.css||"*")}_matchesParents(e,n,r,s){return r<0?!0:this._cached(this._cacheMatchesParents,e,[n,r,s.scope,s.pierceShadow,s.originalScope],()=>{const{selector:i,combinator:o}=n.simples[r];if(o===">"){const l=Ui(e,s);return!l||!this._matchesSimple(l,i,s)?!1:this._matchesParents(l,n,r-1,s)}if(o==="+"){const l=xa(e,s);return!l||!this._matchesSimple(l,i,s)?!1:this._matchesParents(l,n,r-1,s)}if(o===""){let l=Ui(e,s);for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="")break}l=Ui(l,s)}return!1}if(o==="~"){let l=xa(e,s);for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="~")break}l=xa(l,s)}return!1}if(o===">="){let l=e;for(;l;){if(this._matchesSimple(l,i,s)){if(this._matchesParents(l,n,r-1,s))return!0;if(n.simples[r-1].combinator==="")break}l=Ui(l,s)}return!1}throw new Error(`Unsupported combinator "${o}"`)})}_matchesEngine(e,n,r,s){if(e.matches)return this._callMatches(e,n,r,s);if(e.query)return this._callQuery(e,r,s).includes(n);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,n,r){if(e.query)return this._callQuery(e,r,n);if(e.matches)return this._queryCSS(n,"*").filter(s=>this._callMatches(e,s,r,n));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,n,r,s){return this._cached(this._cacheCallMatches,n,[e,s.scope,s.pierceShadow,s.originalScope,...r],()=>e.matches(n,r,s,this))}_callQuery(e,n,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...n],()=>e.query(r,n,this))}_matchesCSS(e,n){return e.matches(n)}_queryCSS(e,n){return this._cached(this._cacheQueryCSS,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=[];function s(i){if(r=r.concat([...i.querySelectorAll(n)]),!!e.pierceShadow){i.shadowRoot&&s(i.shadowRoot);for(const o of i.querySelectorAll("*"))o.shadowRoot&&s(o.shadowRoot)}}return s(e.scope),r})}_getEngine(e){const n=this._engines.get(e);if(!n)throw new Error(`Unknown selector engine "${e}"`);return n}}const Is={matches(t,e,n,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(s=>r.matches(t,s,n))},query(t,e,n){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const s of e)r=r.concat(n.query(t,s));return e.length===1?r:yy(r)}},y_={matches(t,e,n,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...n,scope:t},e).length>0}},v_={matches(t,e,n,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const s=n.originalScope||n.scope;return s.nodeType===9?t===s.documentElement:t===s},query(t,e,n){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=t.originalScope||t.scope;if(r.nodeType===9){const s=r.documentElement;return s?[s]:[]}return r.nodeType===1?[r]:[]}},w_={matches(t,e,n,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(t,e,n)}},S_={query(t,e,n){return n.query({...t,pierceShadow:!1},e)},matches(t,e,n,r){return r.matches(t,e,{...n,pierceShadow:!1})}},x_={matches(t,e,n,r){if(e.length)throw new Error('"visible" engine expects no arguments');return $r(t)}},__={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const s=De(e[0]).toLowerCase(),i=o=>o.normalized.toLowerCase().includes(s);return Cl(r._cacheText,t,i)==="self"}},k_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const s=De(e[0]),i=o=>!s&&!o.immediate.length?!0:o.immediate.some(l=>De(l)===s);return Cl(r._cacheText,t,i)!=="none"}},E_={matches(t,e,n,r){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 s=new RegExp(e[0],e.length===2?e[1]:void 0),i=o=>s.test(o.full);return Cl(r._cacheText,t,i)==="self"}},b_={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(af(t))return!1;const s=De(e[0]).toLowerCase();return(o=>o.normalized.toLowerCase().includes(s))(Ke(r._cacheText,t))}};function xs(t){return{matches(e,n,r,s){const i=n.length&&typeof n[n.length-1]=="number"?n[n.length-1]:void 0,o=i===void 0?n:n.slice(0,n.length-1);if(n.length<1+(i===void 0?0:1))throw new Error(`"${t}" engine expects a selector list and optional maximum distance in pixels`);const l=s.query(r,o),a=gy(t,e,l,i);return a===void 0?!1:(s._markScore(e,a),!0)}}}const T_={query(t,e,n){let r=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 r!="number"||r<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const s=Is.query(t,e.slice(0,e.length-1),n);return r--,r1){const a=new Set(l.children);l.children=[];let c=o.firstElementChild;for(;c&&l.children.lengthyo(c)))]}else{const o=or(t,e,n)||Hi(t,e,n);r=[yo(o)]}}const s=r[0],i=t.parseSelector(s);return{selector:s,selectors:r,elements:t.querySelectorAll(i,n.root??e.ownerDocument)}}finally{Dc.clear(),Fc.clear(),lf(),t._evaluator.end()}}function mh(t){return t.filter(e=>e[0].selector[0]!=="/")}function or(t,e,n){if(n.root&&!Nl(n.root,e))throw new Error("Target element must belong to the root's subtree");if(e===n.root)return[{engine:"css",selector:":scope",score:1}];if(e.ownerDocument.documentElement===e)return[{engine:"css",selector:"html",score:1}];const r=(i,o)=>{const l=i===e;let a=o?B_(t,i,i===e):[];i!==e&&(a=mh(a));const c=z_(t,i,n).filter(d=>!n.omitInternalEngines||!d.engine.startsWith("internal:")).map(d=>[d]);let u=gh(t,n.root??e.ownerDocument,i,[...a,...c],l);a=mh(a);const f=d=>{const h=o&&!d.length,v=[...d,...c].filter(w=>u?ln(w)=ln(u))continue;if(m=gh(t,w,i,v,l),!m)return;const g=[...y,...m];(!u||ln(g){const l=o?Dc:Fc;let a=l.get(i);return a===void 0&&(a=r(i,o),l.set(i,a)),a};return r(e,!n.noText)}function z_(t,e,n){const r=[];{for(const o of["data-testid","data-test-id","data-test"])o!==n.testIdAttributeName&&e.getAttribute(o)&&r.push({engine:"css",selector:`[${o}=${vs(e.getAttribute(o))}]`,score:N_});if(!n.noCSSId){const o=e.getAttribute("id");o&&!U_(o)&&r.push({engine:"css",selector:Ny(o),score:R_})}r.push({engine:"css",selector:ut(e.nodeName.toLowerCase()),score:by})}if(e.nodeName==="IFRAME"){for(const o of["name","title"])e.getAttribute(o)&&r.push({engine:"css",selector:`${ut(e.nodeName.toLowerCase())}[${o}=${vs(e.getAttribute(o))}]`,score:C_});return e.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${vs(e.getAttribute(n.testIdAttributeName))}]`,score:dh}),zc([r]),r}if(e.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${Oe(e.getAttribute(n.testIdAttributeName),!0)}]`,score:dh}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const o=e;if(o.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${Oe(o.placeholder,!0)}]`,score:L_});for(const l of Er(o.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${Oe(l.text,!1)}]`,score:Sy-l.scoreBonus})}}const s=ly(t._evaluator._cacheText,e);for(const o of s){const l=o.normalized;r.push({engine:"internal:label",selector:Ve(l,!0),score:I_});for(const a of Er(l))r.push({engine:"internal:label",selector:Ve(a.text,!1),score:xy-a.scoreBonus})}const i=ye(e);return i&&!["none","presentation"].includes(i)&&r.push({engine:"internal:role",selector:i,score:Ey}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&r.push({engine:"css",selector:`${ut(e.nodeName.toLowerCase())}[name=${vs(e.getAttribute("name"))}]`,score:_a}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${ut(e.nodeName.toLowerCase())}[type=${vs(e.getAttribute("type"))}]`,score:_a}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:ut(e.nodeName.toLowerCase()),score:_a+1}),zc([r]),r}function B_(t,e,n){if(e.nodeName==="SELECT")return[];const r=[],s=e.getAttribute("title");if(s){r.push([{engine:"internal:attr",selector:`[title=${Oe(s,!0)}]`,score:$_}]);for(const c of Er(s))r.push([{engine:"internal:attr",selector:`[title=${Oe(c.text,!1)}]`,score:ky-c.scoreBonus}])}const i=e.getAttribute("alt");if(i&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${Oe(i,!0)}]`,score:M_}]);for(const c of Er(i))r.push([{engine:"internal:attr",selector:`[alt=${Oe(c.text,!1)}]`,score:_y-c.scoreBonus}])}const o=Ke(t._evaluator._cacheText,e).normalized,l=o?Er(o):[];if(o){if(n){o.length<=80&&r.push([{engine:"internal:text",selector:Ve(o,!0),score:O_}]);for(const u of l)r.push([{engine:"internal:text",selector:Ve(u.text,!1),score:go-u.scoreBonus}])}const c={engine:"css",selector:ut(e.nodeName.toLowerCase()),score:by};for(const u of l)r.push([c,{engine:"internal:has-text",selector:Ve(u.text,!1),score:go-u.scoreBonus}]);if(o.length<=80){const u=new RegExp("^"+Go(o)+"$");r.push([c,{engine:"internal:has-text",selector:Ve(u,!1),score:hh}])}}const a=ye(e);if(a&&!["none","presentation"].includes(a)){const c=ui(e,!1);if(c){const u={engine:"internal:role",selector:`${a}[name=${Oe(c,!0)}]`,score:j_};r.push([u]);for(const f of Er(c))r.push([{engine:"internal:role",selector:`${a}[name=${Oe(f.text,!1)}]`,score:wy-f.scoreBonus}])}else{const u={engine:"internal:role",selector:`${a}`,score:Ey};for(const f of l)r.push([u,{engine:"internal:has-text",selector:Ve(f.text,!1),score:go-f.scoreBonus}]);if(o.length<=80){const f=new RegExp("^"+Go(o)+"$");r.push([u,{engine:"internal:has-text",selector:Ve(f,!1),score:hh}])}}}return zc(r),r}function Ny(t){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(t)?"#"+t:`[id="${ut(t)}"]`}function ka(t){return t.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Hi(t,e,n){const r=n.root??e.ownerDocument,s=[];function i(l){const a=s.slice();l&&a.unshift(l);const c=a.join(" > "),u=t.parseSelector(c);return t.querySelector(u,r,!1)===e?c:void 0}function o(l){const a={engine:"css",selector:l,score:D_},c=t.parseSelector(l),u=t.querySelectorAll(c,r);if(u.length===1)return[a];const f={engine:"nth",selector:String(u.indexOf(e)),score:Ty};return[a,f]}for(let l=e;l&&l!==r;l=$e(l)){const a=l.nodeName.toLowerCase();let c="";if(l.id&&!n.noCSSId){const d=Ny(l.id),h=i(d);if(h)return o(h);c=d}const u=l.parentNode,f=[...l.classList];for(let d=0;dw.nodeName.toLowerCase()===a).indexOf(l)===0?ut(a):`${ut(a)}:nth-child(${1+d.indexOf(l)})`,m=i(v);if(m)return o(m);c||(c=v)}else c||(c=ut(a));s.unshift(c)}return o(i())}function zc(t){for(const e of t)for(const n of e)n.score>A_&&n.score>"),n=r,r==="css"?e.push(s):e.push(`${r}=${s}`);return e.join(" ")}function ln(t){let e=0;for(let n=0;n({tokens:l,score:ln(l)}));i.sort((l,a)=>l.score-a.score);let o=null;for(const{tokens:l}of i){const a=t.parseSelector(yo(l)),c=t.querySelectorAll(a,e);if(c[0]===n&&c.length===1)return l;const u=c.indexOf(n);if(!s||o||u===-1||c.length>5)continue;const f={engine:"nth",selector:String(u),score:Ty};o=[...l,f]}return o}function U_(t){let e,n=0;for(let r=0;r="a"&&s<="z"?i="lower":s>="A"&&s<="Z"?i="upper":s>="0"&&s<="9"?i="digit":i="other",i==="lower"&&e==="upper"){e=i;continue}e&&e!==i&&++n,e=i}}return n>=t.length/4}function Vi(t,e){if(t.length<=e)return t;t=t.substring(0,e);const n=t.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function Er(t){let e=[];{const n=t.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){const s=Vi(t.substring(r).trimStart(),80);e.push({text:s,scoreBonus:s.length<=30?2:1})}}{const n=t.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){const s=Vi(t.substring(0,t.length-r).trimEnd(),80);e.push({text:s,scoreBonus:s.length<=30?2:1})}}return t.length<=30?e.push({text:t,scoreBonus:0}):(e.push({text:Vi(t,80),scoreBonus:0}),e.push({text:Vi(t,30),scoreBonus:1})),e=e.filter(n=>n.text),e.length||e.push({text:t.substring(0,80),scoreBonus:0}),e}const yh=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}";class Ea{constructor(e){this._highlightEntries=[],this._highlightOptions={},this._language="javascript",this._injectedScript=e;const n=e.document;this._isUnderTest=e.isUnderTest,this._glassPaneElement=n.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483646",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent";for(const r of["click","auxclick","dragstart","input","keydown","keyup","pointerdown","pointerup","mousedown","mouseup","mouseleave","focus","scroll"])this._glassPaneElement.addEventListener(r,s=>{s.stopPropagation(),s.stopImmediatePropagation(),s.type==="click"&&s.button===0&&this._highlightOptions.tooltipListItemSelected&&this._highlightOptions.tooltipListItemSelected(void 0)});if(this._actionPointElement=n.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 r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync(yh),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=yh,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&!this._injectedScript.document.documentElement.contains(this._glassPaneElement)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this.updateHighlight(this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),{tooltipText:Sn(this._language,Wt(e))}),this._rafRequest=this._injectedScript.builtinRequestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,n){this._actionPointElement.style.top=n+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,n;for(const r of this._highlightEntries)(e=r.highlightElement)==null||e.remove(),(n=r.tooltipElement)==null||n.remove();this._highlightEntries=[],this._highlightOptions={},this._glassPaneElement.style.pointerEvents="none"}updateHighlight(e,n){this._innerUpdateHighlight(e,n)}maskElements(e,n){this._innerUpdateHighlight(e,{color:n})}_innerUpdateHighlight(e,n){let r=n.color;if(r||(r=e.length>1?"#f6b26b7f":"#6fa8dc7f"),!this._highlightIsUpToDate(e,n)){this.clearHighlight(),this._highlightOptions=n,this._glassPaneElement.style.pointerEvents=n.tooltipListItemSelected?"initial":"none";for(let s=0;s1?` [${s+1} of ${e.length}]`:"";l=[n.tooltipText+a]}for(let a=0;a{var u;return(u=n.tooltipListItemSelected)==null?void 0:u.call(n,a)}))}if(n.tooltipFooter){const a=this._injectedScript.document.createElement("x-pw-tooltip-footer");a.textContent=n.tooltipFooter,o.appendChild(a)}}this._highlightEntries.push({targetElement:e[s],tooltipElement:o,highlightElement:i})}for(const s of this._highlightEntries){if(s.box=s.targetElement.getBoundingClientRect(),!s.tooltipElement)continue;const{anchorLeft:i,anchorTop:o}=this.tooltipPosition(s.box,s.tooltipElement);s.tooltipTop=o,s.tooltipLeft=i}for(const s of this._highlightEntries){s.tooltipElement&&(s.tooltipElement.style.top=s.tooltipTop+"px",s.tooltipElement.style.left=s.tooltipLeft+"px");const i=s.box;s.highlightElement.style.backgroundColor=r,s.highlightElement.style.left=i.x+"px",s.highlightElement.style.top=i.y+"px",s.highlightElement.style.width=i.width+"px",s.highlightElement.style.height=i.height+"px",s.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:i.x,y:i.y,width:i.width,height:i.height}))}}}firstBox(){var e;return(e=this._highlightEntries[0])==null?void 0:e.box}tooltipPosition(e,n){const r=n.offsetWidth,s=n.offsetHeight,i=this._glassPaneElement.offsetWidth,o=this._glassPaneElement.offsetHeight;let l=e.left;l+r>i-5&&(l=i-r-5);let a=e.bottom+5;return a+s>o-5&&(e.top>s+5?a=e.top-s-5:a=o-5-s),{anchorLeft:l,anchorTop:a}}_highlightIsUpToDate(e,n){var r,s;if(n.tooltipText!==this._highlightOptions.tooltipText||n.tooltipListItemSelected!==this._highlightOptions.tooltipListItemSelected||n.tooltipFooter!==this._highlightOptions.tooltipFooter||((r=n.tooltipList)==null?void 0:r.length)!==((s=this._highlightOptions.tooltipList)==null?void 0:s.length))return!1;if(n.tooltipList&&this._highlightOptions.tooltipList){for(let i=0;i{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case` -`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Cy(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}function tl(t){const e=new Set,n={root:{role:"fragment",name:"",children:[],element:t},elements:new Map,ids:new Map},r=o=>{const l=n.elements.size+1;n.elements.set(l,o),n.ids.set(o,l)};r(t);const s=(o,l)=>{if(e.has(l))return;if(e.add(l),l.nodeType===Node.TEXT_NODE&&l.nodeValue){const f=l.nodeValue;o.role!=="textbox"&&f&&o.children.push(l.nodeValue||"");return}if(l.nodeType!==Node.ELEMENT_NODE)return;const a=l;if(ct(a))return;const c=[];if(a.hasAttribute("aria-owns")){const f=a.getAttribute("aria-owns").split(/\s+/);for(const d of f){const h=t.ownerDocument.getElementById(d);h&&c.push(h)}}r(a);const u=V_(a);u&&o.children.push(u),i(u||o,a,c)};function i(o,l,a=[]){var d;const u=(((d=Zn(l))==null?void 0:d.display)||"inline")!=="inline"||l.nodeName==="BR"?" ":"";u&&o.children.push(u),o.children.push(Zo(l,"::before"));const f=l.nodeName==="SLOT"?l.assignedNodes():[];if(f.length)for(const h of f)s(o,h);else{for(let h=l.firstChild;h;h=h.nextSibling)h.assignedSlot||s(o,h);if(l.shadowRoot)for(let h=l.shadowRoot.firstChild;h;h=h.nextSibling)s(o,h)}for(const h of a)s(o,h);o.children.push(Zo(l,"::after")),u&&o.children.push(u),o.children.length===1&&o.name===o.children[0]&&(o.children=[])}of();try{s(n.root,t)}finally{lf()}return q_(n.root),n}function V_(t){const e=ye(t);if(!e||e==="presentation"||e==="none")return null;const n=De(ui(t,!1)||""),r={role:e,name:n,children:[],element:t};return Qu.includes(e)&&(r.checked=Gg(t)),ey.includes(e)&&(r.disabled=el(t)),Ju.includes(e)&&(r.expanded=Yg(t)),Yu.includes(e)&&(r.level=Zg(t)),Gu.includes(e)&&(r.pressed=Jg(t)),Ku.includes(e)&&(r.selected=Xg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&(r.children=[t.value]),r}function q_(t){const e=(r,s)=>{if(!r.length)return;const i=De(r.join(""));i&&s.push(i),r.length=0},n=r=>{const s=[],i=[];for(const o of r.children||[])typeof o=="string"?i.push(o):(e(i,s),n(o),s.push(o));e(i,s),r.children=s.length?s:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function Ay(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function W_(t,e){return Ay(t,e.text)}function K_(t,e){return Ay(t,e.name)}function Q_(t,e){const n=tl(t).root;return{matches:Iy(n,e,!1),received:{raw:Vs(n,{mode:"raw"}),regex:Vs(n,{mode:"regex"})}}}function X_(t,e){const n=tl(t).root;return Iy(n,e,!0).map(s=>s.element)}function Ly(t,e,n){return typeof t=="string"&&e.kind==="text"?W_(t,e):t!==null&&typeof t=="object"&&e.kind==="role"?!(e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!K_(t.name,e)||!G_(t.children||[],e.children||[])):!1}function G_(t,e,n){if(e.length>t.length)return!1;const r=t.slice(),s=e.slice();for(const i of s){let o=r.shift();for(;o&&!Ly(o,i);)o=r.shift();if(!o)return!1}return!0}function Iy(t,e,n){const r=[],s=(i,o)=>{if(Ly(i,e)){const l=typeof i=="string"?o:i;return l&&r.push(l),!n}if(typeof i=="string")return!1;for(const l of i.children||[])if(s(l,i))return!0;return!1};return s(t,null),r}function Vs(t,e){const n=[],r=(e==null?void 0:e.mode)==="regex"?Y_:()=>!0,s=(e==null?void 0:e.mode)==="regex"?J_:o=>o,i=(o,l,a)=>{if(typeof o=="string"){if(l&&!r(l,o))return;const f=vh(s(o));f&&n.push(a+"- text: "+f);return}let c=o.role;if(o.name&&o.name.length<=900){const f=s(o.name);if(f){const d=f.startsWith("/")&&f.endsWith("/")?f:JSON.stringify(f);c+=" "+d}}if(o.checked==="mixed"&&(c+=" [checked=mixed]"),o.checked===!0&&(c+=" [checked]"),o.disabled&&(c+=" [disabled]"),o.expanded&&(c+=" [expanded]"),o.level&&(c+=` [level=${o.level}]`),o.pressed==="mixed"&&(c+=" [pressed=mixed]"),o.pressed===!0&&(c+=" [pressed]"),o.selected===!0&&(c+=" [selected]"),e!=null&&e.ids){const f=e==null?void 0:e.ids.get(o.element);f&&(c+=` [id=${f}]`)}const u=a+"- "+H_(c);if(!o.children.length)n.push(u);else if(o.children.length===1&&typeof o.children[0]=="string"){const f=r(o,o.children[0])?s(o.children[0]):null;f?n.push(u+": "+vh(f)):n.push(u)}else{n.push(u+":");for(const f of o.children||[])i(f,o,a+" ")}};if(t.role==="fragment")for(const o of t.children||[])i(o,t,"");else i(t,null,"");return n.join(` -`)}function J_(t){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 n="",r=0;const s=new RegExp(e.map(i=>"("+i.regex.source+")").join("|"),"g");return t.replace(s,(i,...o)=>{const l=o[o.length-2],a=o.slice(0,-2);n+=Go(t.slice(r,l));for(let c=0;ce.length)return!1;const n=e.length<=200&&t.name.length<=200?X1(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function cf(t,e,n={}){var d;const r=new t.LineCounter,s={keepSourceTokens:!0,lineCounter:r,...n},i=t.parseDocument(e,s),o=[],l=h=>[r.linePos(h[0]),r.linePos(h[1])],a=h=>{o.push({message:h.message,range:[r.linePos(h.pos[0]),r.linePos(h.pos[1])]})},c=(h,v)=>{for(const m of v.items){if(m instanceof t.Scalar&&typeof m.value=="string"){const g=nl.parse(m,s,o);g&&(h.children=h.children||[],h.children.push(g));continue}if(m instanceof t.YAMLMap){u(h,m);continue}o.push({message:"Sequence items should be strings or maps",range:l(m.range||v.range)})}},u=(h,v)=>{for(const m of v.items){if(h.children=h.children||[],!(m.key instanceof t.Scalar&&typeof m.key.value=="string")){o.push({message:"Only string keys are supported",range:l(m.key.range||v.range)});continue}const y=m.key,g=m.value;if(y.value==="text"){if(!(g instanceof t.Scalar&&typeof g.value=="string")){o.push({message:"Text value should be a string",range:l(m.value.range||v.range)});continue}h.children.push({kind:"text",text:wh(g.value)});continue}const S=nl.parse(y,s,o);if(!S)continue;if(g instanceof t.Scalar){const b=typeof g.value;if(b!=="string"&&b!=="number"&&b!=="boolean"){o.push({message:"Node value should be a string or a sequence",range:l(m.value.range||v.range)});continue}h.children.push({...S,children:[{kind:"text",text:wh(String(g.value))}]});continue}if(g instanceof t.YAMLSeq){h.children.push(S),c(S,g);continue}o.push({message:"Map values should be strings or sequences",range:l(m.value.range||v.range)})}},f={kind:"role",role:"fragment"};return i.errors.forEach(a),o.length?{errors:o,fragment:f}:(i.contents instanceof t.YAMLSeq||o.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:i.contents?l(i.contents.range):[{line:0,col:0},{line:0,col:0}]}),o.length?{errors:o,fragment:f}:(c(f,i.contents),o.length?{errors:o,fragment:Z_}:((d=f.children)==null?void 0:d.length)===1?{fragment:f.children[0],errors:o}:{fragment:f,errors:o}))}const Z_={kind:"role",role:"fragment"};function jy(t){return t.replace(/[\r\n\s\t]+/g," ").trim()}function wh(t){return t.startsWith("/")&&t.endsWith("/")&&t.length>1?{pattern:t.slice(1,-1)}:jy(t)}class nl{static parse(e,n,r){try{return new nl(e.value)._parse()}catch(s){if(s instanceof Sh){const i=n.prettyErrors===!1?s.message:s.message+`: - -`+e.value+` -`+" ".repeat(s.pos)+`^ -`;return r.push({message:i,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+s.pos)]}),null}throw s}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_peek(){return this._input[this._pos]||""}_next(){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 n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new Sh(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const s=this._next();if(n)e+=s,n=!1;else if(s==="\\")n=!0,e+=s;else{if(s==="/"&&!r)return{pattern:e};s==="["?(r=!0,e+=s):s==="]"&&r?(e+=s,r=!1):e+=s}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),jy(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let s="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)s+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,s||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,s){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',s),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',s),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',s),e.expanded=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',s),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',s),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',s),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,s)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class Sh extends Error{constructor(e,n){super(e),this.pos=n}}class My{constructor(e,n,r,s,i,o,l){this.onGlobalListenersRemoved=new Set,this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Sn,cacheNormalizedWhitespaces:K1,elementText:Ke,getAriaRole:ye,getElementAccessibleDescription:ch,getElementAccessibleName:ui,isElementVisible:$r,isInsideScope:Nl,normalizeWhiteSpace:De,parseAriaSnapshot:cf},this.window=e,this.document=e.document,this.isUnderTest=n,this._sdkLanguage=r,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=s,this._evaluator=new g_(new Map),this._engines=new Map,this._engines.set("xpath",sh),this._engines.set("xpath:light",sh),this._engines.set("_react",n_),this._engines.set("_vue",l_),this._engines.set("role",fh(!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",fh(!0));for(const{name:a,engine:c}of l)this._engines.set(a,c);this._stableRafCount=i,this._browserName=o,Ox(o),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),n&&(this.window.__injectedScript=this)}builtinSetTimeout(e,n){var r;return(r=this.window.__pwClock)!=null&&r.builtin?this.window.__pwClock.builtin.setTimeout(e,n):this.window.setTimeout(e,n)}builtinClearTimeout(e){var n;return(n=this.window.__pwClock)!=null&&n.builtin?this.window.__pwClock.builtin.clearTimeout(e):this.window.clearTimeout(e)}builtinRequestAnimationFrame(e){var n;return(n=this.window.__pwClock)!=null&&n.builtin?this.window.__pwClock.builtin.requestAnimationFrame(e):this.window.requestAnimationFrame(e)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const n=bl(e);return pS(n,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),n}generateSelector(e,n){return ph(this,e,n)}generateSelectorSimple(e,n){return ph(this,e,{...n,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,n,r){const s=this.querySelectorAll(e,n);if(r&&s.length>1)throw this.strictModeViolationError(e,s);return s[0]}_queryNth(e,n){const r=[...e];let s=+n.body;return s===-1&&(s=r.length-1),new Set(r.slice(s,s+1))}_queryLayoutSelector(e,n,r){const s=n.name,i=n.body,o=[],l=this.querySelectorAll(i.parsed,r);for(const a of e){const c=gy(s,a,l,i.distance);c!==void 0&&o.push({element:a,score:c})}return o.sort((a,c)=>a.score-c.score),new Set(o.map(a=>a.element))}ariaSnapshot(e,n){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const r=tl(e);return Vs(r.root,n)}ariaSnapshotAsObject(e){return tl(e)}ariaSnapshotElement(e,n){return e.elements.get(n)||null}renderAriaTree(e,n){return Vs(e,n)}renderAriaSnapshotWithIds(e){return Vs(e.root,{ids:e.ids})}getAllByAria(e,n){return X_(e.documentElement,n)}querySelectorAll(e,n){if(e.capture!==void 0){if(e.parts.some(s=>s.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const r={parts:e.parts.slice(0,e.capture+1)};if(e.capturer.has(o)))}else if(s.name==="internal:or"){const i=this.querySelectorAll(s.body.parsed,n);r=new Set(yy(new Set([...r,...i])))}else if(m_.includes(s.name))r=this._queryLayoutSelector(r,s,n);else{const i=new Set;for(const o of r){const l=this._queryEngineAll(s,o);for(const a of l)i.add(a)}r=i}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,n){const r=this._engines.get(e.name).queryAll(n,e.body);for(const s of r)if(!("nodeName"in s))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(s)}`);return r}_createAttributeEngine(e,n){const r=s=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(s)}]`,functions:[]},combinator:""}]}];return{queryAll:(s,i)=>this._evaluator.query({scope:s,pierceShadow:n},r(i))}}_createCSSEngine(){return{queryAll:(e,n)=>this._evaluator.query({scope:e,pierceShadow:!0},n)}}_createTextEngine(e,n){return{queryAll:(s,i)=>{const{matcher:o,kind:l}=Wi(i,n),a=[];let c=null;const u=d=>{if(l==="lax"&&c&&c.contains(d))return!1;const h=Cl(this._evaluator._cacheText,d,o);h==="none"&&(c=d),(h==="self"||h==="selfAndChildren"&&l==="strict"&&!n)&&a.push(d)};s.nodeType===Node.ELEMENT_NODE&&u(s);const f=this._evaluator._queryCSS({scope:s,pierceShadow:e},"*");for(const d of f)u(d);return a}}}_createInternalHasTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,s=Ke(this._evaluator._cacheText,r),{matcher:i}=Wi(n,!0);return i(s)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,s=Ke(this._evaluator._cacheText,r),{matcher:i}=Wi(n,!0);return i(s)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,n)=>{const{matcher:r}=Wi(n,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(i=>ly(this._evaluator._cacheText,i).some(o=>r(o)))}}}_createNamedAttributeEngine(){return{queryAll:(n,r)=>{const s=Un(r,!0);if(s.name||s.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:i,value:o,caseSensitive:l}=s.attributes[0],a=l?null:o.toLowerCase();let c;return o instanceof RegExp?c=f=>!!f.match(o):l?c=f=>f===o:c=f=>f.toLowerCase().includes(a),this._evaluator._queryCSS({scope:n,pierceShadow:!0},`[${i}]`).filter(f=>c(f.getAttribute(i)))}}}_createControlEngine(){return{queryAll(e,n){if(n==="enter-frame")return[];if(n==="return-empty")return[];if(n==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${n}`)}}}_createHasEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[n]:[]}}_createHasNotEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[]:[n]}}_createVisibleEngine(){return{queryAll:(n,r)=>{if(n.nodeType!==1)return[];const s=r==="true";return $r(n)===s?[n]:[]}}}_createInternalChainEngine(){return{queryAll:(n,r)=>this.querySelectorAll(r.parsed,n)}}extend(e,n){const r=this.window.eval(` - (() => { - const module = {}; - ${e} - return module.exports.default(); - })()`);return new r(this,n)}async viewportRatio(e){return await new Promise(n=>{const r=new IntersectionObserver(s=>{n(s[0].intersectionRatio),r.disconnect()});r.observe(e),this.builtinRequestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const n=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const n=e.ownerDocument.defaultView;for(let s=e;s;s=$e(s))if(n.getComputedStyle(s).transform!=="none")return"transformed";const r=n.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,n){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(n==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const s=r.closest("label");s&&s.control&&(r=s.control)}return r}async checkElementStates(e,n){if(n.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of n)if(r!=="stable"){const s=this.elementState(e,r);if(s.received==="error:notconnected")return"error:notconnected";if(!s.matches)return{missingState:r}}}async _checkElementIsStable(e){const n=Symbol("continuePolling");let r,s=0,i=0;const o=()=>{const f=this.retarget(e,"no-follow-label");if(!f)return"error:notconnected";const d=performance.now();if(this._stableRafCount>1&&d-i<15)return n;i=d;const h=f.getBoundingClientRect(),v={x:h.top,y:h.left,width:h.width,height:h.height};if(r){if(!(v.x===r.x&&v.y===r.y&&v.width===r.width&&v.height===r.height))return!1;if(++s>=this._stableRafCount)return!0}return r=v,n};let l,a;const c=new Promise((f,d)=>{l=f,a=d}),u=()=>{try{const f=o();f!==n?l(f):this.builtinRequestAnimationFrame(u)}catch(f){a(f)}};return this.builtinRequestAnimationFrame(u),c}elementState(e,n){const r=this.retarget(e,["visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(n==="visible"||n==="hidden"){const s=$r(r);return{matches:n==="visible"?s:!s,received:s?"visible":"hidden"}}if(n==="disabled"||n==="enabled"){const s=el(r);return{matches:n==="disabled"?s:!s,received:s?"disabled":"enabled"}}if(n==="editable"){const s=el(r),i=Gx(r);if(i==="error")throw this.createStacklessError("Element is not an ,