@iqx-limited/quick-pdf
Version:
Converting PDFs to images (📃 to 📸)
1 lines • 1.37 MB
Source Map (JSON)
{"version":3,"file":"bidi-DfZSKIkl.mjs","sources":["../node_modules/mitt/dist/mitt.mjs","../node_modules/chromium-bidi/lib/cjs/utils/EventEmitter.js","../node_modules/chromium-bidi/lib/cjs/utils/log.js","../node_modules/chromium-bidi/lib/cjs/utils/ProcessingQueue.js","../node_modules/chromium-bidi/lib/cjs/protocol/cdp.js","../node_modules/chromium-bidi/lib/cjs/protocol/chromium-bidi.js","../node_modules/chromium-bidi/lib/cjs/protocol/generated/webdriver-bidi.js","../node_modules/chromium-bidi/lib/cjs/protocol/ErrorResponse.js","../node_modules/chromium-bidi/lib/cjs/protocol/generated/webdriver-bidi-permissions.js","../node_modules/chromium-bidi/lib/cjs/protocol/generated/webdriver-bidi-bluetooth.js","../node_modules/chromium-bidi/lib/cjs/protocol/protocol.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/BidiNoOpParser.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/browser/BrowserProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/cdp/CdpProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/context/BrowsingContextProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/emulation/EmulationProcessor.js","../node_modules/chromium-bidi/lib/cjs/utils/assert.js","../node_modules/chromium-bidi/lib/cjs/utils/graphemeTools.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/InputSource.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/keyUtils.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/USKeyboardLayout.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/ActionDispatcher.js","../node_modules/chromium-bidi/lib/cjs/utils/Mutex.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/InputState.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/InputStateManager.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/InputProcessor.js","../node_modules/chromium-bidi/lib/cjs/utils/base64.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/network/NetworkUtils.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/network/NetworkProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/permissions/PermissionsProcessor.js","../node_modules/chromium-bidi/lib/cjs/utils/uuid.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/ChannelProxy.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/PreloadScript.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/ScriptProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/session/SessionProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/storage/StorageProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/webExtension/WebExtensionProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/OutgoingMessage.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/CommandProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/bluetooth/BluetoothProcessor.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/browser/UserContextConfig.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/browser/UserContextStorage.js","../node_modules/chromium-bidi/lib/cjs/utils/Deferred.js","../node_modules/chromium-bidi/lib/cjs/utils/time.js","../node_modules/chromium-bidi/lib/cjs/utils/unitConversions.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/SharedId.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/Realm.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/WindowRealm.js","../node_modules/chromium-bidi/lib/cjs/utils/urlHelpers.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/context/NavigationTracker.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/context/BrowsingContextImpl.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/WorkerRealm.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/log/logHelper.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/log/LogManager.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/cdp/CdpTarget.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/cdp/CdpTargetManager.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/context/BrowsingContextStorage.js","../node_modules/chromium-bidi/lib/cjs/utils/DefaultMap.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/network/NetworkRequest.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/network/NetworkStorage.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/PreloadScriptStorage.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/script/RealmStorage.js","../node_modules/chromium-bidi/lib/cjs/utils/Buffer.js","../node_modules/chromium-bidi/lib/cjs/utils/IdWrapper.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/session/events.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/session/SubscriptionManager.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/session/EventManager.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/BidiServer.js","../node_modules/chromium-bidi/lib/cjs/bidiMapper/BidiMapper.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/CDPSession.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Connection.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/BidiOverCdp.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Navigation.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Realm.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Request.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/UserPrompt.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/BrowsingContext.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/UserContext.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Deserializer.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/JSHandle.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/ElementHandle.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Dialog.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/ExposedFunction.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/HTTPResponse.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/HTTPRequest.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Serializer.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/util.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Realm.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/WebWorker.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Frame.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Input.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Page.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Target.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/BrowserContext.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Browser.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Session.js","../node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Browser.js"],"sourcesContent":["export default function(n){return{all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e])},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]))},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e)}),(i=n.get(\"*\"))&&i.slice().map(function(n){n(t,e)})}}}\n//# sourceMappingURL=mitt.mjs.map\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventEmitter = void 0;\n/**\n * Copyright 2022 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst mitt_1 = __importDefault(require(\"mitt\"));\nclass EventEmitter {\n #emitter = (0, mitt_1.default)();\n on(type, handler) {\n this.#emitter.on(type, handler);\n return this;\n }\n /**\n * Like `on` but the listener will only be fired once and then it will be removed.\n * @param event The event you'd like to listen to\n * @param handler The handler function to run when the event occurs\n * @return `this` to enable chaining method calls.\n */\n once(event, handler) {\n const onceHandler = (eventData) => {\n handler(eventData);\n this.off(event, onceHandler);\n };\n return this.on(event, onceHandler);\n }\n off(type, handler) {\n this.#emitter.off(type, handler);\n return this;\n }\n /**\n * Emits an event and call any associated listeners.\n *\n * @param event The event to emit.\n * @param eventData Any data to emit with the event.\n * @return `true` if there are any listeners, `false` otherwise.\n */\n emit(event, eventData) {\n this.#emitter.emit(event, eventData);\n }\n /**\n * Removes all listeners. If given an event argument, it will remove only\n * listeners for that event.\n * @param event - the event to remove listeners for.\n * @returns `this` to enable you to chain method calls.\n */\n removeAllListeners(event) {\n if (event) {\n this.#emitter.all.delete(event);\n }\n else {\n this.#emitter.all.clear();\n }\n return this;\n }\n}\nexports.EventEmitter = EventEmitter;\n//# sourceMappingURL=EventEmitter.js.map","\"use strict\";\n/**\n * Copyright 2021 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LogType = void 0;\nvar LogType;\n(function (LogType) {\n // keep-sorted start\n LogType[\"bidi\"] = \"bidi\";\n LogType[\"cdp\"] = \"cdp\";\n LogType[\"debug\"] = \"debug\";\n LogType[\"debugError\"] = \"debug:error\";\n LogType[\"debugInfo\"] = \"debug:info\";\n LogType[\"debugWarn\"] = \"debug:warn\";\n // keep-sorted end\n})(LogType || (exports.LogType = LogType = {}));\n//# sourceMappingURL=log.js.map","\"use strict\";\n/**\n * Copyright 2022 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProcessingQueue = void 0;\nconst log_js_1 = require(\"./log.js\");\nclass ProcessingQueue {\n static LOGGER_PREFIX = `${log_js_1.LogType.debug}:queue`;\n #logger;\n #processor;\n #queue = [];\n // Flag to keep only 1 active processor.\n #isProcessing = false;\n constructor(processor, logger) {\n this.#processor = processor;\n this.#logger = logger;\n }\n add(entry, name) {\n this.#queue.push([entry, name]);\n // No need in waiting. Just initialize processor if needed.\n void this.#processIfNeeded();\n }\n async #processIfNeeded() {\n if (this.#isProcessing) {\n return;\n }\n this.#isProcessing = true;\n while (this.#queue.length > 0) {\n const arrayEntry = this.#queue.shift();\n if (!arrayEntry) {\n continue;\n }\n const [entryPromise, name] = arrayEntry;\n this.#logger?.(_a.LOGGER_PREFIX, 'Processing event:', name);\n await entryPromise\n .then((entry) => {\n if (entry.kind === 'error') {\n this.#logger?.(log_js_1.LogType.debugError, 'Event threw before sending:', entry.error.message, entry.error.stack);\n return;\n }\n return this.#processor(entry.value);\n })\n .catch((error) => {\n this.#logger?.(log_js_1.LogType.debugError, 'Event was not processed:', error?.message);\n });\n }\n this.#isProcessing = false;\n }\n}\nexports.ProcessingQueue = ProcessingQueue;\n_a = ProcessingQueue;\n//# sourceMappingURL=ProcessingQueue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=cdp.js.map","\"use strict\";\n/**\n * Copyright 2023 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EVENT_NAMES = exports.Bluetooth = exports.Network = exports.Input = exports.BrowsingContext = exports.Log = exports.Script = exports.BiDiModule = void 0;\n// keep-sorted end\nvar BiDiModule;\n(function (BiDiModule) {\n // keep-sorted start\n BiDiModule[\"Bluetooth\"] = \"bluetooth\";\n BiDiModule[\"Browser\"] = \"browser\";\n BiDiModule[\"BrowsingContext\"] = \"browsingContext\";\n BiDiModule[\"Cdp\"] = \"goog:cdp\";\n BiDiModule[\"Input\"] = \"input\";\n BiDiModule[\"Log\"] = \"log\";\n BiDiModule[\"Network\"] = \"network\";\n BiDiModule[\"Script\"] = \"script\";\n BiDiModule[\"Session\"] = \"session\";\n // keep-sorted end\n})(BiDiModule || (exports.BiDiModule = BiDiModule = {}));\nvar Script;\n(function (Script) {\n let EventNames;\n (function (EventNames) {\n // keep-sorted start\n EventNames[\"Message\"] = \"script.message\";\n EventNames[\"RealmCreated\"] = \"script.realmCreated\";\n EventNames[\"RealmDestroyed\"] = \"script.realmDestroyed\";\n // keep-sorted end\n })(EventNames = Script.EventNames || (Script.EventNames = {}));\n})(Script || (exports.Script = Script = {}));\nvar Log;\n(function (Log) {\n let EventNames;\n (function (EventNames) {\n EventNames[\"LogEntryAdded\"] = \"log.entryAdded\";\n })(EventNames = Log.EventNames || (Log.EventNames = {}));\n})(Log || (exports.Log = Log = {}));\nvar BrowsingContext;\n(function (BrowsingContext) {\n let EventNames;\n (function (EventNames) {\n // keep-sorted start\n EventNames[\"ContextCreated\"] = \"browsingContext.contextCreated\";\n EventNames[\"ContextDestroyed\"] = \"browsingContext.contextDestroyed\";\n EventNames[\"DomContentLoaded\"] = \"browsingContext.domContentLoaded\";\n EventNames[\"DownloadWillBegin\"] = \"browsingContext.downloadWillBegin\";\n EventNames[\"FragmentNavigated\"] = \"browsingContext.fragmentNavigated\";\n EventNames[\"HistoryUpdated\"] = \"browsingContext.historyUpdated\";\n EventNames[\"Load\"] = \"browsingContext.load\";\n EventNames[\"NavigationAborted\"] = \"browsingContext.navigationAborted\";\n EventNames[\"NavigationCommitted\"] = \"browsingContext.navigationCommitted\";\n EventNames[\"NavigationFailed\"] = \"browsingContext.navigationFailed\";\n EventNames[\"NavigationStarted\"] = \"browsingContext.navigationStarted\";\n EventNames[\"UserPromptClosed\"] = \"browsingContext.userPromptClosed\";\n EventNames[\"UserPromptOpened\"] = \"browsingContext.userPromptOpened\";\n // keep-sorted end\n })(EventNames = BrowsingContext.EventNames || (BrowsingContext.EventNames = {}));\n})(BrowsingContext || (exports.BrowsingContext = BrowsingContext = {}));\nvar Input;\n(function (Input) {\n let EventNames;\n (function (EventNames) {\n // keep-sorted start\n EventNames[\"FileDialogOpened\"] = \"input.fileDialogOpened\";\n // keep-sorted end\n })(EventNames = Input.EventNames || (Input.EventNames = {}));\n})(Input || (exports.Input = Input = {}));\nvar Network;\n(function (Network) {\n let EventNames;\n (function (EventNames) {\n // keep-sorted start\n EventNames[\"AuthRequired\"] = \"network.authRequired\";\n EventNames[\"BeforeRequestSent\"] = \"network.beforeRequestSent\";\n EventNames[\"FetchError\"] = \"network.fetchError\";\n EventNames[\"ResponseCompleted\"] = \"network.responseCompleted\";\n EventNames[\"ResponseStarted\"] = \"network.responseStarted\";\n // keep-sorted end\n })(EventNames = Network.EventNames || (Network.EventNames = {}));\n})(Network || (exports.Network = Network = {}));\nvar Bluetooth;\n(function (Bluetooth) {\n let EventNames;\n (function (EventNames) {\n EventNames[\"RequestDevicePromptUpdated\"] = \"bluetooth.requestDevicePromptUpdated\";\n EventNames[\"GattConnectionAttempted\"] = \"bluetooth.gattConnectionAttempted\";\n })(EventNames = Bluetooth.EventNames || (Bluetooth.EventNames = {}));\n})(Bluetooth || (exports.Bluetooth = Bluetooth = {}));\nexports.EVENT_NAMES = new Set([\n // keep-sorted start\n ...Object.values(BiDiModule),\n ...Object.values(Bluetooth.EventNames),\n ...Object.values(BrowsingContext.EventNames),\n ...Object.values(Input.EventNames),\n ...Object.values(Log.EventNames),\n ...Object.values(Network.EventNames),\n ...Object.values(Script.EventNames),\n // keep-sorted end\n]);\n//# sourceMappingURL=chromium-bidi.js.map","\"use strict\";\n/**\n * Copyright 2024 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=webdriver-bidi.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoSuchWebExtensionException = exports.InvalidWebExtensionException = exports.UnderspecifiedStoragePartitionException = exports.UnableToSetFileInputException = exports.UnableToSetCookieException = exports.NoSuchStoragePartitionException = exports.UnsupportedOperationException = exports.UnableToCloseBrowserException = exports.UnableToCaptureScreenException = exports.UnknownErrorException = exports.UnknownCommandException = exports.SessionNotCreatedException = exports.NoSuchUserContextException = exports.NoSuchScriptException = exports.NoSuchRequestException = exports.NoSuchNodeException = exports.NoSuchInterceptException = exports.NoSuchHistoryEntryException = exports.NoSuchHandleException = exports.NoSuchFrameException = exports.NoSuchElementException = exports.NoSuchAlertException = exports.MoveTargetOutOfBoundsException = exports.InvalidSessionIdException = exports.InvalidSelectorException = exports.InvalidArgumentException = exports.Exception = void 0;\nclass Exception extends Error {\n error;\n message;\n stacktrace;\n constructor(error, message, stacktrace) {\n super();\n this.error = error;\n this.message = message;\n this.stacktrace = stacktrace;\n }\n toErrorResponse(commandId) {\n return {\n type: 'error',\n id: commandId,\n error: this.error,\n message: this.message,\n stacktrace: this.stacktrace,\n };\n }\n}\nexports.Exception = Exception;\nclass InvalidArgumentException extends Exception {\n constructor(message, stacktrace) {\n super(\"invalid argument\" /* ErrorCode.InvalidArgument */, message, stacktrace);\n }\n}\nexports.InvalidArgumentException = InvalidArgumentException;\nclass InvalidSelectorException extends Exception {\n constructor(message, stacktrace) {\n super(\"invalid selector\" /* ErrorCode.InvalidSelector */, message, stacktrace);\n }\n}\nexports.InvalidSelectorException = InvalidSelectorException;\nclass InvalidSessionIdException extends Exception {\n constructor(message, stacktrace) {\n super(\"invalid session id\" /* ErrorCode.InvalidSessionId */, message, stacktrace);\n }\n}\nexports.InvalidSessionIdException = InvalidSessionIdException;\nclass MoveTargetOutOfBoundsException extends Exception {\n constructor(message, stacktrace) {\n super(\"move target out of bounds\" /* ErrorCode.MoveTargetOutOfBounds */, message, stacktrace);\n }\n}\nexports.MoveTargetOutOfBoundsException = MoveTargetOutOfBoundsException;\nclass NoSuchAlertException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such alert\" /* ErrorCode.NoSuchAlert */, message, stacktrace);\n }\n}\nexports.NoSuchAlertException = NoSuchAlertException;\nclass NoSuchElementException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such element\" /* ErrorCode.NoSuchElement */, message, stacktrace);\n }\n}\nexports.NoSuchElementException = NoSuchElementException;\nclass NoSuchFrameException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such frame\" /* ErrorCode.NoSuchFrame */, message, stacktrace);\n }\n}\nexports.NoSuchFrameException = NoSuchFrameException;\nclass NoSuchHandleException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such handle\" /* ErrorCode.NoSuchHandle */, message, stacktrace);\n }\n}\nexports.NoSuchHandleException = NoSuchHandleException;\nclass NoSuchHistoryEntryException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such history entry\" /* ErrorCode.NoSuchHistoryEntry */, message, stacktrace);\n }\n}\nexports.NoSuchHistoryEntryException = NoSuchHistoryEntryException;\nclass NoSuchInterceptException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such intercept\" /* ErrorCode.NoSuchIntercept */, message, stacktrace);\n }\n}\nexports.NoSuchInterceptException = NoSuchInterceptException;\nclass NoSuchNodeException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such node\" /* ErrorCode.NoSuchNode */, message, stacktrace);\n }\n}\nexports.NoSuchNodeException = NoSuchNodeException;\nclass NoSuchRequestException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such request\" /* ErrorCode.NoSuchRequest */, message, stacktrace);\n }\n}\nexports.NoSuchRequestException = NoSuchRequestException;\nclass NoSuchScriptException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such script\" /* ErrorCode.NoSuchScript */, message, stacktrace);\n }\n}\nexports.NoSuchScriptException = NoSuchScriptException;\nclass NoSuchUserContextException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such user context\" /* ErrorCode.NoSuchUserContext */, message, stacktrace);\n }\n}\nexports.NoSuchUserContextException = NoSuchUserContextException;\nclass SessionNotCreatedException extends Exception {\n constructor(message, stacktrace) {\n super(\"session not created\" /* ErrorCode.SessionNotCreated */, message, stacktrace);\n }\n}\nexports.SessionNotCreatedException = SessionNotCreatedException;\nclass UnknownCommandException extends Exception {\n constructor(message, stacktrace) {\n super(\"unknown command\" /* ErrorCode.UnknownCommand */, message, stacktrace);\n }\n}\nexports.UnknownCommandException = UnknownCommandException;\nclass UnknownErrorException extends Exception {\n constructor(message, stacktrace = new Error().stack) {\n super(\"unknown error\" /* ErrorCode.UnknownError */, message, stacktrace);\n }\n}\nexports.UnknownErrorException = UnknownErrorException;\nclass UnableToCaptureScreenException extends Exception {\n constructor(message, stacktrace) {\n super(\"unable to capture screen\" /* ErrorCode.UnableToCaptureScreen */, message, stacktrace);\n }\n}\nexports.UnableToCaptureScreenException = UnableToCaptureScreenException;\nclass UnableToCloseBrowserException extends Exception {\n constructor(message, stacktrace) {\n super(\"unable to close browser\" /* ErrorCode.UnableToCloseBrowser */, message, stacktrace);\n }\n}\nexports.UnableToCloseBrowserException = UnableToCloseBrowserException;\nclass UnsupportedOperationException extends Exception {\n constructor(message, stacktrace) {\n super(\"unsupported operation\" /* ErrorCode.UnsupportedOperation */, message, stacktrace);\n }\n}\nexports.UnsupportedOperationException = UnsupportedOperationException;\nclass NoSuchStoragePartitionException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such storage partition\" /* ErrorCode.NoSuchStoragePartition */, message, stacktrace);\n }\n}\nexports.NoSuchStoragePartitionException = NoSuchStoragePartitionException;\nclass UnableToSetCookieException extends Exception {\n constructor(message, stacktrace) {\n super(\"unable to set cookie\" /* ErrorCode.UnableToSetCookie */, message, stacktrace);\n }\n}\nexports.UnableToSetCookieException = UnableToSetCookieException;\nclass UnableToSetFileInputException extends Exception {\n constructor(message, stacktrace) {\n super(\"unable to set file input\" /* ErrorCode.UnableToSetFileInput */, message, stacktrace);\n }\n}\nexports.UnableToSetFileInputException = UnableToSetFileInputException;\nclass UnderspecifiedStoragePartitionException extends Exception {\n constructor(message, stacktrace) {\n super(\"underspecified storage partition\" /* ErrorCode.UnderspecifiedStoragePartition */, message, stacktrace);\n }\n}\nexports.UnderspecifiedStoragePartitionException = UnderspecifiedStoragePartitionException;\nclass InvalidWebExtensionException extends Exception {\n constructor(message, stacktrace) {\n super(\"invalid web extension\" /* ErrorCode.InvalidWebExtension */, message, stacktrace);\n }\n}\nexports.InvalidWebExtensionException = InvalidWebExtensionException;\nclass NoSuchWebExtensionException extends Exception {\n constructor(message, stacktrace) {\n super(\"no such web extension\" /* ErrorCode.NoSuchWebExtension */, message, stacktrace);\n }\n}\nexports.NoSuchWebExtensionException = NoSuchWebExtensionException;\n//# sourceMappingURL=ErrorResponse.js.map","\"use strict\";\n/**\n * Copyright 2024 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=webdriver-bidi-permissions.js.map","\"use strict\";\n/**\n * Copyright 2024 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=webdriver-bidi-bluetooth.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChromiumBidi = exports.Cdp = void 0;\n/**\n * Copyright 2023 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexports.Cdp = __importStar(require(\"./cdp.js\"));\nexports.ChromiumBidi = __importStar(require(\"./chromium-bidi.js\"));\n__exportStar(require(\"./generated/webdriver-bidi.js\"), exports);\n__exportStar(require(\"./ErrorResponse.js\"), exports);\n__exportStar(require(\"./generated/webdriver-bidi-permissions.js\"), exports);\n__exportStar(require(\"./generated/webdriver-bidi-bluetooth.js\"), exports);\n//# sourceMappingURL=protocol.js.map","\"use strict\";\n/**\n * Copyright 2023 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BidiNoOpParser = void 0;\nclass BidiNoOpParser {\n // Bluetooth module\n // keep-sorted start block=yes\n parseDisableSimulationParameters(params) {\n return params;\n }\n parseHandleRequestDevicePromptParams(params) {\n return params;\n }\n parseSimulateAdapterParameters(params) {\n return params;\n }\n parseSimulateAdvertisementParameters(params) {\n return params;\n }\n parseSimulateGattConnectionResponseParameters(params) {\n return params;\n }\n parseSimulatePreconnectedPeripheralParameters(params) {\n return params;\n }\n // keep-sorted end\n // Browser module\n // keep-sorted start block=yes\n parseRemoveUserContextParams(params) {\n return params;\n }\n // keep-sorted end\n // Browsing Context module\n // keep-sorted start block=yes\n parseActivateParams(params) {\n return params;\n }\n parseCaptureScreenshotParams(params) {\n return params;\n }\n parseCloseParams(params) {\n return params;\n }\n parseCreateParams(params) {\n return params;\n }\n parseGetTreeParams(params) {\n return params;\n }\n parseHandleUserPromptParams(params) {\n return params;\n }\n parseLocateNodesParams(params) {\n return params;\n }\n parseNavigateParams(params) {\n return params;\n }\n parsePrintParams(params) {\n return params;\n }\n parseReloadParams(params) {\n return params;\n }\n parseSetViewportParams(params) {\n return params;\n }\n parseTraverseHistoryParams(params) {\n return params;\n }\n // keep-sorted end\n // CDP module\n // keep-sorted start block=yes\n parseGetSessionParams(params) {\n return params;\n }\n parseResolveRealmParams(params) {\n return params;\n }\n parseSendCommandParams(params) {\n return params;\n }\n // keep-sorted end\n // Emulation module\n // keep-sorted start block=yes\n parseSetGeolocationOverrideParams(params) {\n return params;\n }\n // keep-sorted end\n // Script module\n // keep-sorted start block=yes\n parseAddPreloadScriptParams(params) {\n return params;\n }\n parseCallFunctionParams(params) {\n return params;\n }\n parseDisownParams(params) {\n return params;\n }\n parseEvaluateParams(params) {\n return params;\n }\n parseGetRealmsParams(params) {\n return params;\n }\n parseRemovePreloadScriptParams(params) {\n return params;\n }\n // keep-sorted end\n // Input module\n // keep-sorted start block=yes\n parsePerformActionsParams(params) {\n return params;\n }\n parseReleaseActionsParams(params) {\n return params;\n }\n parseSetFilesParams(params) {\n return params;\n }\n // keep-sorted end\n // Network module\n // keep-sorted start block=yes\n parseAddInterceptParams(params) {\n return params;\n }\n parseContinueRequestParams(params) {\n return params;\n }\n parseContinueResponseParams(params) {\n return params;\n }\n parseContinueWithAuthParams(params) {\n return params;\n }\n parseFailRequestParams(params) {\n return params;\n }\n parseProvideResponseParams(params) {\n return params;\n }\n parseRemoveInterceptParams(params) {\n return params;\n }\n parseSetCacheBehavior(params) {\n return params;\n }\n // keep-sorted end\n // Permissions module\n // keep-sorted start block=yes\n parseSetPermissionsParams(params) {\n return params;\n }\n // keep-sorted end\n // Session module\n // keep-sorted start block=yes\n parseSubscribeParams(params) {\n return params;\n }\n parseUnsubscribeParams(params) {\n return params;\n }\n // keep-sorted end\n // Storage module\n // keep-sorted start block=yes\n parseDeleteCookiesParams(params) {\n return params;\n }\n parseGetCookiesParams(params) {\n return params;\n }\n parseSetCookieParams(params) {\n return params;\n }\n // keep-sorted end\n // WebExtenstion module\n // keep-sorted start block=yes\n parseInstallParams(params) {\n return params;\n }\n parseUninstallParams(params) {\n return params;\n }\n}\nexports.BidiNoOpParser = BidiNoOpParser;\n//# sourceMappingURL=BidiNoOpParser.js.map","\"use strict\";\n/**\n * Copyright 2023 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BrowserProcessor = void 0;\nconst protocol_js_1 = require(\"../../../protocol/protocol.js\");\nclass BrowserProcessor {\n #browserCdpClient;\n #browsingContextStorage;\n #userContextStorage;\n constructor(browserCdpClient, browsingContextStorage, userContextStorage) {\n this.#browserCdpClient = browserCdpClient;\n this.#browsingContextStorage = browsingContextStorage;\n this.#userContextStorage = userContextStorage;\n }\n close() {\n // Ensure that it is put at the end of the event loop.\n // This way we send back the response before closing the tab.\n setTimeout(() => this.#browserCdpClient.sendCommand('Browser.close'), 0);\n return {};\n }\n async createUserContext(params) {\n const request = {\n proxyServer: params['goog:proxyServer'] ?? undefined,\n };\n const proxyBypassList = params['goog:proxyBypassList'] ?? undefined;\n if (proxyBypassList) {\n request.proxyBypassList = proxyBypassList.join(',');\n }\n const context = await this.#browserCdpClient.sendCommand('Target.createBrowserContext', request);\n return {\n userContext: context.browserContextId,\n };\n }\n async removeUserContext(params) {\n const userContext = params.userContext;\n if (userContext === 'default') {\n throw new protocol_js_1.InvalidArgumentException('`default` user context cannot be removed');\n }\n try {\n await this.#browserCdpClient.sendCommand('Target.disposeBrowserContext', {\n browserContextId: userContext,\n });\n }\n catch (err) {\n // https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/protocol/target_handler.cc;l=1424;drc=c686e8f4fd379312469fe018f5c390e9c8f20d0d\n if (err.message.startsWith('Failed to find context with id')) {\n throw new protocol_js_1.NoSuchUserContextException(err.message);\n }\n throw err;\n }\n return {};\n }\n async getUserContexts() {\n return {\n userContexts: await this.#userContextStorage.getUserContexts(),\n };\n }\n async #getWindowInfo(targetId) {\n const windowInfo = await this.#browserCdpClient.sendCommand('Browser.getWindowForTarget', { targetId });\n return {\n // `active` is not supported in CDP yet.\n active: false,\n clientWindow: `${windowInfo.windowId}`,\n state: windowInfo.bounds.windowState ?? 'normal',\n height: windowInfo.bounds.height ?? 0,\n width: windowInfo.bounds.width ?? 0,\n x: windowInfo.bounds.left ?? 0,\n y: windowInfo.bounds.top ?? 0,\n };\n }\n async getClientWindows() {\n const topLevelTargetIds = this.#browsingContextStorage\n .getTopLevelContexts()\n .map((b) => b.cdpTarget.id);\n const clientWindows = await Promise.all(topLevelTargetIds.map(async (targetId) => await this.#getWindowInfo(targetId)));\n const uniqueClientWindowIds = new Set();\n const uniqueClientWindows = new Array();\n // Filter out duplicated client windows.\n for (const window of clientWindows) {\n if (!uniqueClientWindowIds.has(window.clientWindow)) {\n uniqueClientWindowIds.add(window.clientWindow);\n uniqueClientWindows.push(window);\n }\n }\n return { clientWindows: uniqueClientWindows };\n }\n}\nexports.BrowserProcessor = BrowserProcessor;\n//# sourceMappingURL=BrowserProcessor.js.map","\"use strict\";\n/**\n * Copyright 2023 Google LLC.\n * Copyright (c) Microsoft Corporation.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CdpProcessor = void 0;\nconst protocol_js_1 = require(\"../../../protocol/protocol.js\");\nclass CdpProcessor {\n #browsingContextStorage;\n #realmStorage;\n #cdpConnection;\n #browserCdpClient;\n constructor(browsingContextStorage, realmStorage, cdpConnection, browserCdpClient) {\n this.#browsingContextStorage = browsingContextStorage;\n this.#realmStorage = realmStorage;\n this.#cdpConnection = cdpConnection;\n this.#browserCdpClient = browserCdpClient;\n }\n getSession(params) {\n const context = params.context;\n const sessionId = this.#browsingContextStorage.getContext(context).cdpTarget.cdpSessionId;\n if (sessionId === undefined) {\n return {};\n }\n return { session: sessionId };\n }\n resolveRealm(params) {\n const context = params.realm;\n const realm = this.#realmStorage.getRealm({ realmId: context });\n if (realm === undefined) {\n throw new protocol_js_1.UnknownErrorException(`Could not find realm ${params.realm}`);\n }\n return { executionContextId: realm.executionContextId };\n }\n async sendCommand(params) {\n const client = params.session\n ? this.#cdpConnection.getCdpClient(params.session)\n : this.#browserCdpClient;\n const result = await client.sendCommand(params.method, params.params);\n return {\n result,\n session: params.session,\n };\n }\n}\nexports.CdpProcessor = CdpProcessor;\n//# sourceMappingURL=CdpProcessor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BrowsingContextProcessor = void 0;\nconst protocol_js_1 = require(\"../../../protocol/protocol.js\");\nclass BrowsingContextProcessor {\n #browserCdpClient;\n #browsingContextStorage;\n #eventManager;\n #userContextStorage;\n constructor(browserCdpClient, browsingContextStorage, userContextStorage, eventManager) {\n this.#userContextStorage = userContextStorage;\n this.#browserCdpClient = browserCdpClient;\n this.#browsingContextStorage = browsingContextStorage;\n this.#eventManager = eventManager;\n this.#eventManager.addSubscribeHook(protocol_js_1.ChromiumBidi.BrowsingContext.EventNames.ContextCreated, this.#onContextCreatedSubscribeHook.bind(this));\n }\n getTree(params) {\n const resultContexts = params.root === undefined\n ? this.#browsingContextStorage.getTopLevelContexts()\n : [this.#browsingContextStorage.getContext(params.root)];\n return {\n contexts: resultContexts.map((c) => c.serializeToBidiValue(params.maxDepth ?? Number.MAX_VALUE)),\n };\n }\n async create(params) {\n let referenceContext;\n let userContext = 'default';\n if (params.referenceContext !== undefined) {\n referenceContext = this.#browsingContextStorage.getContext(params.referenceContext);\n if (!referenceContext.isTopLevelContext()) {\n throw new protocol_js_1.InvalidArgumentException(`referenceContext should be a top-level context`);\n }\n userContext = referenceContext.userContext;\n }\n if (params.userContext !== undefined) {\n userContext = params.userContext;\n }\n const existingContexts = this.#browsingContextStorage\n .getAllContexts()\n .filter((context) => context.userContext === userContext);\n let newWindow = false;\n switch (params.type) {\n case \"tab\" /* BrowsingContext.CreateType.Tab */:\n newWindow = false;\n break;\n case \"window\" /* BrowsingContext.CreateType.Window */:\n newWindow = true;\n break;\n }\n if (!existingContexts.length) {\n // If there are no contexts in the given user context, we need to set\n // newWindow to true as newWindow=false will be rejected.\n newWindow = true;\n }\n let result;\n try {\n result = await this.#browserCdpClient.sendCommand('Target.createTarget', {\n url: 'about:blank',\n newWindow,\n browserContextId: userContext === 'default' ? undefined : userContext,\n background: params.background === true,\n });\n }\n catch (err) {\n if (\n // See https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/protocol/target_handler.cc;l=90;drc=e80392ac11e48a691f4309964cab83a3a59e01c8\n err.message.startsWith('Failed to find browser context with id') ||\n // See https://source.chromium.org/chromium/chromium/src/+/main:headless/lib/browser/protocol/target_handler.cc;l=49;drc=e80392ac11e48a691f4309964cab83a3a59e01c8\n err.message === 'browserContextId') {\n throw new protocol_js_1.NoSuchUserContextException(`The context ${userContext} was not found`);\n }\n throw err;\n }\n // Wait for the new target to be attached and to be added to the browsing context\n // storage.\n const context = await this.#browsingContextStorage.waitForContext(result.targetId);\n // Wait for the new tab to be loaded to avoid race conditions in the\n // `browsingContext` events, when the `browsingContext.domContentLoaded` and\n // `browsingContext.load` events from the initial `about:blank` navigation\n // are emitted after the next navigation is started.\n // Details: https://github.com/web-platform-tests/wpt/issues/35846\n await context.lifecycleLoaded();\n return { context: context.id };\n }\n navigate(params) {\n const context = this.#browsingContextStorage.getContext(params.context);\n return context.navigate(params.url, params.wait ?? \"none\" /* BrowsingContext.ReadinessState.None */);\n }\n reload(params) {\n const context = this.#browsingContextStorage.getContext(params.context);\n return context.reload(params.ignoreCache ?? false, params.wait ?? \"none\" /* BrowsingContext.ReadinessState.None */);\n }\n async activate(params) {\n const context = this.#browsingContextStorage.getContext(params.context);\n if (!context.isTopLevelContext()) {\n