@unotest/web 0.43.2 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { E as ElementHint, S as ScreenshotOptions, N as NetworkEntry, W as WebDriver, L as LaunchOptions, C as ContextOptions, D as DriverContext, A as AttachOptions } from '../interfaces-ClW2IRgY.js';
2
- export { a as ActionTimeout, b as CheckOptions, c as ClickOptions, d as CookieOptions, e as DriverPage, F as FillOptions, G as GotoOptions, H as HoverOptions, f as NavigationOptions, P as PressOptions, R as ReloadOptions, g as SelectOptions, V as Viewport, h as WaitOptions, i as WaitState } from '../interfaces-ClW2IRgY.js';
1
+ import { B as BoundingBox, E as ElementHint, S as ScreenshotOptions, L as LocatorValue, C as CaptureFrame, a as CaptureRect, N as NetworkEntry, W as WebDriver, b as LaunchOptions, c as ContextOptions, D as DriverContext, A as AttachOptions } from '../interfaces-OvnJKELk.js';
2
+ export { d as ActionTimeout, e as CheckOptions, f as ClickOptions, g as CookieOptions, h as DriverPage, F as FillOptions, G as GotoOptions, H as HoverOptions, i as NavigationOptions, P as PressOptions, R as ReloadOptions, j as SelectOptions, V as Viewport, k as ViewportSize, l as WaitOptions, m as WaitState } from '../interfaces-OvnJKELk.js';
3
3
  import '@unotest/protocol';
4
4
  import '../config/schema.js';
5
5
  import 'zod';
@@ -30,6 +30,8 @@ interface FakeBehavior {
30
30
  inputValueByDefault?: string;
31
31
  /** Default isVisible() response. Default: true. */
32
32
  isVisibleByDefault?: boolean;
33
+ /** Default boundingBox() response. Default: a 100×20 box at the origin. */
34
+ boundingBoxByDefault?: BoundingBox | null;
33
35
  /** Default isDisabled() response. Default: false. */
34
36
  isDisabledByDefault?: boolean;
35
37
  /** Default checkedState() response — null = "not a checkable element",
@@ -57,6 +59,8 @@ interface FakeBehavior {
57
59
  * when unspecified) for tests that exercise a format fallback. Default:
58
60
  * the literal "fake-png"; tests that read dimensions seed a real PNG header. */
59
61
  screenshotBytes?: Buffer | ((type: ScreenshotOptions["type"]) => Buffer);
62
+ /** Where masks lie in a capture (`boxesInCapture`). Default: none. */
63
+ captureBoxes?: (locs: readonly LocatorValue[], frame: CaptureFrame) => CaptureRect[];
60
64
  /** What page.evaluate() resolves to — e.g. an OutlineTree for a capture
61
65
  * path under test. Default: undefined. */
62
66
  evaluateResult?: unknown;
@@ -73,6 +77,11 @@ interface FakeBehavior {
73
77
  * integration tests so the FakeContext's `click` becomes a tab
74
78
  * opener without touching production drivers. */
75
79
  popupOnClick?: string;
80
+ /** The context stands for a browser profile (`launch.userDataDir`) —
81
+ * the only kind where extension service workers exist. Default: false. */
82
+ profile?: boolean;
83
+ /** URLs of the service workers running when the context opens. */
84
+ serviceWorkers?: ReadonlyArray<string>;
76
85
  }
77
86
  declare class FakeWebDriver implements WebDriver {
78
87
  private readonly behavior;
@@ -85,7 +94,7 @@ declare class FakeWebDriver implements WebDriver {
85
94
  close(): Promise<void>;
86
95
  wsEndpoint(): string | undefined;
87
96
  connectShared(): Promise<void>;
88
- attachExisting(_opts?: AttachOptions): DriverContext;
97
+ attachExisting(_opts?: AttachOptions): Promise<DriverContext>;
89
98
  /** Test helper — full recorded call log. */
90
99
  calls(): ReadonlyArray<RecordedCall>;
91
100
  /** Test helper — calls matching a method name. */
@@ -1 +1 @@
1
- function _0x389f(_0x23c25d,_0x291f4c){_0x23c25d=_0x23c25d-0x9d;const _0x3f6528=_0x3f65();let _0x389f36=_0x3f6528[_0x23c25d];if(_0x389f['HBIuoT']===undefined){var _0x2a29af=function(_0x4a00c6){const _0x2ad076='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x39ccd7='',_0x4dbc93='';for(let _0x53c645=0x0,_0x156d5a,_0x35f335,_0x52b9ed=0x0;_0x35f335=_0x4a00c6['charAt'](_0x52b9ed++);~_0x35f335&&(_0x156d5a=_0x53c645%0x4?_0x156d5a*0x40+_0x35f335:_0x35f335,_0x53c645++%0x4)?_0x39ccd7+=String['fromCharCode'](0xff&_0x156d5a>>(-0x2*_0x53c645&0x6)):0x0){_0x35f335=_0x2ad076['indexOf'](_0x35f335);}for(let _0x21f22a=0x0,_0x15e21b=_0x39ccd7['length'];_0x21f22a<_0x15e21b;_0x21f22a++){_0x4dbc93+='%'+('00'+_0x39ccd7['charCodeAt'](_0x21f22a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4dbc93);};_0x389f['ptkoXO']=_0x2a29af,_0x389f['hzYVSA']={},_0x389f['HBIuoT']=!![];}const _0x260655=_0x3f6528[0x0],_0x1c4061=_0x23c25d+_0x260655,_0x2b5f6a=_0x389f['hzYVSA'][_0x1c4061];return!_0x2b5f6a?(_0x389f36=_0x389f['ptkoXO'](_0x389f36),_0x389f['hzYVSA'][_0x1c4061]=_0x389f36):_0x389f36=_0x2b5f6a,_0x389f36;}const _0x562ca9=_0x389f;(function(_0x21d0aa,_0x354f9b){const _0x42e522={_0xf0dd9b:0xc1,_0x2dedc8:0xde,_0xc0d620:0xcc,_0x3452a0:0x11e,_0x585f7c:0xc7,_0x48104f:0xa7},_0x1dc3e6=_0x389f,_0x1740e8=_0x21d0aa();while(!![]){try{const _0x7794af=parseInt(_0x1dc3e6(0xb3))/0x1*(parseInt(_0x1dc3e6(0xb1))/0x2)+-parseInt(_0x1dc3e6(0xdc))/0x3*(parseInt(_0x1dc3e6(0xa6))/0x4)+-parseInt(_0x1dc3e6(_0x42e522._0xf0dd9b))/0x5*(-parseInt(_0x1dc3e6(_0x42e522._0x2dedc8))/0x6)+-parseInt(_0x1dc3e6(_0x42e522._0xc0d620))/0x7*(parseInt(_0x1dc3e6(_0x42e522._0x3452a0))/0x8)+parseInt(_0x1dc3e6(_0x42e522._0x585f7c))/0x9+-parseInt(_0x1dc3e6(0xc0))/0xa*(parseInt(_0x1dc3e6(0xdd))/0xb)+-parseInt(_0x1dc3e6(0x111))/0xc*(parseInt(_0x1dc3e6(_0x42e522._0x48104f))/0xd);if(_0x7794af===_0x354f9b)break;else _0x1740e8['push'](_0x1740e8['shift']());}catch(_0x4d5419){_0x1740e8['push'](_0x1740e8['shift']());}}}(_0x3f65,0xd1a39));var __defProp=Object[_0x562ca9(0xdf)],__name=(_0x39ccd7,_0x4dbc93)=>__defProp(_0x39ccd7,_0x562ca9(0xca),{'value':_0x4dbc93,'configurable':!![]});function subscribe(_0x53c645,_0x156d5a){const _0x173388={_0xa8031f:0xe5},_0x1a4d56=_0x562ca9;return _0x53c645[_0x1a4d56(0x11a)](_0x156d5a),()=>{const _0x43dc68=_0x1a4d56;_0x53c645[_0x43dc68(_0x173388._0xa8031f)](_0x156d5a);};}function _0x3f65(){const _0x126918=['y29VA2LLu3rHDgu','mJrdEwv2rKS','C2nYzwvUC2HVDa','tg9JyxrVCKvYCM9Y','Cg9W','y29UC29SzuvUDhjPzxm','rMfRzvDLyKrYAxzLCG','y29VA2LLCW','C3rLChm','CMvSB2fK','D3nfBMrWB2LUDa','zw50zxjgCMfTzsbJywXSzwqGD2L0AcbLBxb0EsbSB2nHDg9Y','A2LUza','ywn0AxzLswr4','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','zMLSBa','z2v0q29VA2LL','D2fPDezVCK5HDMLNyxrPB24','mtGZndyZmLjIsKXvqW','mty5rNPqt3bU','zw50zxjgCMfTzq','BgvUz3rO','y2HLy2TLzfn0yxrL','AxneAxnHyMXLza','C2v0tg9JywXtDg9YywDL','DgL0Bgu','y2XPCgjVyxjKugfZDgu','ywn0AxzLugfNzq','y3vYCMvUDfvYBa','ndq2ugDPv3vp','C2v0q29VA2LL','nJaYoxLlrurQtG','z29gB3j3yxjK','CgfNzuXPC3q','D2fPDezVCKXVywrtDgf0zq','Bwf5yMvuAhjVDW','ChvZAa','y29UBMvJDfnOyxjLza','y2HLy2TLzfn0yxrLqNLezwzHDwX0','zw1PDezHA2vqB3b1Ca','AxnwAxnPyMXLqNLezwzHDwX0','zhjPDMvY','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','zMLSDgvY','mtaWmhfZv0v3wa','mtK3nJe1svDrEKvO','DxjS','y291BNrcEurLzMf1Bhq','B25bzNrLCKnSAwnR','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','ywjVDxq6yMXHBMS','nJGWmti0nKLxAhPwEq','ChjLC3m','lNbHz2u','BMfTzq','y2fSBhngB3i','mJe5odu2y09LwvjO','y29UDgv4Dhm','CgfNzxm','BMv3q29UDgv4Da','rhjPDMvYrxjYB3i','B3v0zxjive1m','C2nVCgu','Aw5WDxrwywX1zq','zxHPDezYyw1L','C2nYzwvUC2HVDevSzw1LBNq','D2fPDezVCLvYBa','Bg9JywXtDg9YywDLu3rHDgu','zxzHBhvHDgvpBKXVy2f0B3i','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','C2f2zvn0B3jHz2vtDgf0zq','zwXLBwvUDeHPBNrcEvjLzG','m0DPAe5jvq','mJK3ntvhCeLyEgS','ndjtr3njtKi','zgvMAw5LuhjVCgvYDhK','DhLWzq','y2fSBhm','zg91yMXLq2XPy2S','yMvOyxzPB3i','y291BNq','zgvSzxrL','z2v0tg9JywXtDg9YywDL','Dgv4DenVBNrLBNrcEurLzMf1Bhq','AxnwAxnPyMXL','BMv0D29YA0vUDhjPzxm','yxr0CMLIDxrLC0j5rgvMyxvSDa','rMfRzunVBNrLEhq','z290BW','y2XVC2u','y2XVC2vgywTLugfNzq','AxneAxnHyMXLzej5rgvMyxvSDa','rMfRzvbHz2u','Aw5UzxjuzxH0','lNbHz2uW','B3v0zxjiDg1SqNLszwy','Bgf1BMnOzwq','y2XPy2S','zxjYB3jpBK5LEhrby3rPB24','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','Cg9WDxbpBKnSAwnR','BMv3q29UDgv4DcbJywXSzwqGyMvMB3jLigXHDw5JAcGP','Bgf1BMnO','Aw5ZCgvJDevSzw1LBNq','zhjHz0fUzerYB3a','CMvJB3jK','D2fPDezVCG','zNjHBwvtDgfJAW','y2HLy2S','zNvUy3rPB24','CMvM','B25ozxDqywDL','zMfRzsb0AxrSzq','BMv3ugfNzuXPC3rLBMvYCW','C3vIC2nYAwjL','y3jLyxrLuMvJB3jKzxi','CMvJB3jKzxi','z29cywnR','y3r4','C2vSzwn0t3b0Aw9U','Aw5UzxjuzxH0qNLezwzHDwX0','iJ48l2rPDJ4','DxbSB2fKrMLSzq','z2v0qxr0CMLIDxrL','zxzHBhvHDgu','nJqXmZe2shrmDgLP','Ag92zxi','zxzHBhvHDgvszxn1Bhq','C2nYB2XSsw50B1zPzxC','Aw5PDgLHBfvYBa','Bwv0Ag9K','Dgv4DenVBNrLBNq','D2fPDezVCLrLEhq','C3bSAwnL','ywrK','C2v0qwn0AxzLugfNzq','C2nYzwvUC2HVDej5DgvZ'];_0x3f65=function(){return _0x126918;};return _0x3f65();}__name(subscribe,_0x562ca9(0x106));import{UnotestError}from'@unotest/core';var DriverError=class extends UnotestError{static{__name(this,_0x562ca9(0xd0));}},LocatorError=class extends UnotestError{static{__name(this,_0x562ca9(0x120));}};function createRecorder(){const _0x4586c2={_0x57d957:0xb8,_0x30f612:0xe1},_0x4422c9=_0x562ca9,_0x35f335=[];let _0x52b9ed=0x0;return{'push':__name(_0x21f22a=>_0x35f335[_0x4422c9(0xb8)]({..._0x21f22a,'seq':_0x52b9ed++}),_0x4422c9(_0x4586c2._0x57d957)),'calls':__name(()=>_0x35f335,_0x4422c9(_0x4586c2._0x30f612))};}__name(createRecorder,_0x562ca9(0x107));var FakePage=class{constructor(_0x15e21b,_0x98d4fa,_0x551e25,_0x248129){const _0x5bc653={_0x399fbd:0xe3},_0x5e46fb=_0x562ca9;this['recorder']=_0x15e21b,this[_0x5e46fb(_0x5bc653._0x399fbd)]=_0x98d4fa,this['scope']=_0x551e25,this['currentUrl']=_0x248129;}[_0x562ca9(0x108)];[_0x562ca9(0xe3)];[_0x562ca9(0xd2)];static{__name(this,_0x562ca9(0xf0));}[_0x562ca9(0xb0)];[_0x562ca9(0xc4)];[_0x562ca9(0xfd)](_0x22c45c,_0x334c19){const _0x3b657b={_0x2cf371:0xb8},_0xcc7ec1=_0x562ca9;this['recorder'][_0xcc7ec1(_0x3b657b._0x2cf371)]({'scope':this[_0xcc7ec1(0xd2)],'method':_0x22c45c,'args':_0x334c19});}[_0x562ca9(0xb7)](){const _0x5b5dfe=_0x562ca9;if(this[_0x5b5dfe(0xe3)][_0x5b5dfe(0xf6)]){const _0x23ae7b=this[_0x5b5dfe(0xe3)][_0x5b5dfe(0xf6)];this['behavior'][_0x5b5dfe(0xf6)]=void 0x0;throw _0x23ae7b;}}[_0x562ca9(0xc2)](){return this['currentUrl'];}async[_0x562ca9(0xad)](){const _0x233d31={_0x3548ad:0x104},_0x127117=_0x562ca9;return this[_0x127117(0xfd)](_0x127117(0xad),[]),_0x127117(_0x233d31._0x3548ad);}async[_0x562ca9(0xf5)](_0x390844,_0x3baf0e){const _0x465649={_0x54f47c:0xb7,_0x1f8698:0xc4},_0x1703a6=_0x562ca9;this[_0x1703a6(0xfd)](_0x1703a6(0xf5),[_0x390844,_0x3baf0e]),this[_0x1703a6(_0x465649._0x54f47c)](),this[_0x1703a6(_0x465649._0x1f8698)]?.();}async[_0x562ca9(0xe2)](_0x373caa,_0x55383b){const _0x40a84b={_0x34965f:0xfd,_0x2c0fd0:0xe2,_0x202535:0xb7},_0x2ea8ad=_0x562ca9;this[_0x2ea8ad(_0x40a84b._0x34965f)](_0x2ea8ad(_0x40a84b._0x2c0fd0),[_0x373caa,_0x55383b]),this[_0x2ea8ad(_0x40a84b._0x202535)]();}async[_0x562ca9(0xa3)](_0x337e1e,_0x4c4c5a,_0x28ebf9){const _0x22a579={_0x44b9f3:0xb7},_0x5943ab=_0x562ca9;this[_0x5943ab(0xfd)]('fill',[_0x337e1e,_0x4c4c5a,_0x28ebf9]),this[_0x5943ab(_0x22a579._0x44b9f3)]();}async[_0x562ca9(0xc8)](_0x3e7793,_0x47ac91,_0x4c0b1b){const _0x33fbf0={_0x5d8723:0xc8,_0x4ae42a:0xb7},_0x48c6b0=_0x562ca9;this[_0x48c6b0(0xfd)](_0x48c6b0(_0x33fbf0._0x5d8723),[_0x3e7793,_0x47ac91,_0x4c0b1b]),this[_0x48c6b0(_0x33fbf0._0x4ae42a)]();}async[_0x562ca9(0x100)](_0x436fa0,_0x2806b5){const _0x46f7c7={_0x3f317a:0x100},_0x379420=_0x562ca9;this[_0x379420(0xfd)](_0x379420(_0x46f7c7._0x3f317a),[_0x436fa0,_0x2806b5]),this['maybeThrow']();}async['uncheck'](_0x55c10b,_0x5764dd){const _0x486f60={_0x29d686:0xfd},_0x1f59b5=_0x562ca9;this[_0x1f59b5(_0x486f60._0x29d686)]('uncheck',[_0x55c10b,_0x5764dd]),this['maybeThrow']();}async[_0x562ca9(0x10b)](_0x21806b,_0x246266,_0x1662a5){const _0x3b619d={_0x920bec:0xfd},_0x173b8d=_0x562ca9;this[_0x173b8d(_0x3b619d._0x920bec)](_0x173b8d(0x10b),[_0x21806b,_0x246266,_0x1662a5]),this['maybeThrow']();}async[_0x562ca9(0x112)](_0x4c4f44,_0x186daf){const _0x40fd9c={_0x1da568:0xb7},_0x3dd960=_0x562ca9;this[_0x3dd960(0xfd)](_0x3dd960(0x112),[_0x4c4f44,_0x186daf]),this[_0x3dd960(_0x40fd9c._0x1da568)]();}async[_0x562ca9(0x114)](_0xf14588){const _0x2bbe3f={_0x4d2de8:0x114},_0x172909=_0x562ca9;this['record'](_0x172909(_0x2bbe3f._0x4d2de8),[_0xf14588]),this[_0x172909(0xb7)]();}async[_0x562ca9(0xfc)](_0x2c5b15,_0x44f689,_0x2035ce){const _0x39cbcf={_0x40bdcb:0xfc,_0x4cd41f:0xb7},_0x1b03d5=_0x562ca9;this[_0x1b03d5(0xfd)](_0x1b03d5(_0x39cbcf._0x40bdcb),[_0x2c5b15,_0x44f689,_0x2035ce]),this[_0x1b03d5(_0x39cbcf._0x4cd41f)]();}async[_0x562ca9(0x10e)](_0x5c122d,_0x4fa330){const _0x6e25c2={_0x3e0bd7:0xb7},_0x48e0ed=_0x562ca9;this[_0x48e0ed(0xfd)]('uploadFile',[_0x5c122d,_0x4fa330]),this[_0x48e0ed(_0x6e25c2._0x3e0bd7)]();}async[_0x562ca9(0xae)](_0x539307,_0x19b2ab){const _0x4fe12e={_0x5700ba:0xfd},_0x421ef4=_0x562ca9;this[_0x421ef4(_0x4fe12e._0x5700ba)](_0x421ef4(0xae),[_0x539307,_0x19b2ab]),this['maybeThrow']();}async[_0x562ca9(0xe4)](_0x1e20c2){const _0x4b992e={_0x158359:0xfd,_0x55f4b3:0xe3},_0x135320=_0x562ca9;return this[_0x135320(_0x4b992e._0x158359)](_0x135320(0xe4),[_0x1e20c2]),this[_0x135320(_0x4b992e._0x55f4b3)][_0x135320(0xc3)]??0x1;}async[_0x562ca9(0x117)](_0x1d1ec7){const _0x4feae4={_0x12ebda:0x117},_0x3816f1=_0x562ca9;return this[_0x3816f1(0xfd)](_0x3816f1(_0x4feae4._0x12ebda),[_0x1d1ec7]),this['behavior']['textContentByDefault']??'';}async[_0x562ca9(0xf1)](_0x5f52ef){const _0x4daa3b={_0x517fd3:0xe3,_0x46ecd1:0xe7},_0x3a5e2a=_0x562ca9;return this[_0x3a5e2a(0xfd)]('innerText',[_0x5f52ef]),this[_0x3a5e2a(0xe3)][_0x3a5e2a(0x10c)]??this[_0x3a5e2a(_0x4daa3b._0x517fd3)][_0x3a5e2a(_0x4daa3b._0x46ecd1)]??'';}async[_0x562ca9(0xd3)](_0x33c848){const _0x27017b={_0x41df2b:0xd3,_0x309abf:0xe3},_0x4129b1=_0x562ca9;return this[_0x4129b1(0xfd)](_0x4129b1(_0x27017b._0x41df2b),[_0x33c848]),this[_0x4129b1(_0x27017b._0x309abf)]['inputValueByDefault']??'';}async[_0x562ca9(0xaa)](_0x5b7139){const _0x3eade0={_0x14dddc:0xaa},_0x25160f=_0x562ca9;return this['record'](_0x25160f(_0x3eade0._0x14dddc),[_0x5b7139]),this[_0x25160f(0xe3)][_0x25160f(0xba)]??null;}async[_0x562ca9(0xe8)](_0x3afc2e){const _0x178960={_0x28aa6f:0xe8},_0x1857e1=_0x562ca9;return this['record'](_0x1857e1(_0x178960._0x28aa6f),[_0x3afc2e]),this[_0x1857e1(0xe3)][_0x1857e1(0xbc)]??!![];}async[_0x562ca9(0xab)](_0xaabeb6){const _0x2400c3={_0x29db0a:0xab,_0x5c9b8f:0xe3},_0x1a03ac=_0x562ca9;return this['record'](_0x1a03ac(_0x2400c3._0x29db0a),[_0xaabeb6]),this[_0x1a03ac(_0x2400c3._0x5c9b8f)][_0x1a03ac(0xef)]??![];}async[_0x562ca9(0x10f)](_0x4b2dc0,_0x48b0d1){const _0x2cface={_0x1234b2:0x10f,_0x4e3ecd:0xe3},_0x1fc93f=_0x562ca9;return this[_0x1fc93f(0xfd)](_0x1fc93f(_0x2cface._0x1234b2),[_0x4b2dc0,_0x48b0d1]),this[_0x1fc93f(_0x2cface._0x4e3ecd)][_0x1fc93f(0xea)]?.[_0x48b0d1]??null;}async[_0x562ca9(0xfe)](_0xfcff2b,_0x12c613){const _0x2e6e01=_0x562ca9;this[_0x2e6e01(0xfd)]('waitFor',[_0xfcff2b,_0x12c613]);}async[_0x562ca9(0xd6)](_0x2e5774,_0xb689e9){const _0x1ea473={_0x9a7a36:0xd6},_0x4e703f=_0x562ca9;this[_0x4e703f(0xfd)](_0x4e703f(_0x1ea473._0x9a7a36),[_0x2e5774,_0xb689e9]);}async[_0x562ca9(0x118)](_0x33e0c2,_0xa0a60a){const _0xa418bb=_0x562ca9;this['record'](_0xa418bb(0x118),[_0x33e0c2,_0xa0a60a]);}async[_0x562ca9(0xa5)](_0x5644d2){const _0x5e21c6=_0x562ca9;this['record'](_0x5e21c6(0xa5),[_0x5644d2]);}async[_0x562ca9(0xb6)](_0x29ddec,_0x59da14){const _0x337222={_0x515a0f:0xb6},_0x2db09b=_0x562ca9;this[_0x2db09b(0xfd)](_0x2db09b(_0x337222._0x515a0f),[_0x29ddec,_0x59da14]);}async[_0x562ca9(0xec)](_0x276922,_0x3d12ed){const _0x10a0fb={_0x1ef77a:0xec},_0x3d8aa4=_0x562ca9;this[_0x3d8aa4(0xfd)](_0x3d8aa4(_0x10a0fb._0x1ef77a),[_0x276922,_0x3d12ed]),this[_0x3d8aa4(0xb0)]=_0x276922;}async[_0x562ca9(0x9d)](_0x480ae7){const _0x4e4504=_0x562ca9;this[_0x4e4504(0xfd)](_0x4e4504(0x9d),[_0x480ae7]);}async[_0x562ca9(0x109)](_0x1013e3){const _0x18e17b={_0x19d930:0xfd},_0xee2d7=_0x562ca9;this[_0xee2d7(_0x18e17b._0x19d930)]('goBack',[_0x1013e3]);}async['goForward'](_0x49deaa){const _0x22c2c3={_0x3f46cd:0xfd},_0x196949=_0x562ca9;this[_0x196949(_0x22c2c3._0x3f46cd)](_0x196949(0xb4),[_0x49deaa]);}async[_0x562ca9(0x110)](_0x39485d){const _0x30580c={_0x5dbff3:0x113},_0x2b0d82=_0x562ca9;return this[_0x2b0d82(0xfd)](_0x2b0d82(0x110),[_0x39485d]),this['behavior'][_0x2b0d82(_0x30580c._0x5dbff3)];}async[_0x562ca9(0xd8)](_0x5db91c,_0x230f39){const _0x505335={_0x2417a5:0xfd,_0x2fe4b6:0xd8},_0x39e49a=_0x562ca9;return this[_0x39e49a(_0x505335._0x2417a5)](_0x39e49a(_0x505335._0x2fe4b6),[_0x5db91c,_0x230f39]),void 0x0;}async[_0x562ca9(0xfb)](_0x2a876a){const _0xed7884={_0x531dce:0xfd,_0x530a4a:0x102,_0x4490a0:0x102,_0xad541f:0xe3,_0x1f0463:0xdb},_0x4f07a3=_0x562ca9;this[_0x4f07a3(_0xed7884._0x531dce)](_0x4f07a3(0xfb),[_0x2a876a]);if(_0x2a876a['steps'][_0x4f07a3(0xa9)]!==0x1||_0x2a876a[_0x4f07a3(0x125)][0x0][_0x4f07a3(0xa0)]!==_0x4f07a3(_0xed7884._0x530a4a))return null;const _0xc1cde4=_0x2a876a[_0x4f07a3(0x125)][0x0][_0x4f07a3(_0xed7884._0x4490a0)],_0x5c8166=this[_0x4f07a3(_0xed7884._0xad541f)][_0x4f07a3(_0xed7884._0x1f0463)]?.[_0xc1cde4];return _0x5c8166??null;}async[_0x562ca9(0x11f)](_0x4ec762){const _0x13a51a={_0x2c1a2b:0x11c},_0x1b9a02=_0x562ca9;return this['record']('screenshot',[_0x4ec762]),this[_0x1b9a02(_0x13a51a._0x2c1a2b)](_0x4ec762?.[_0x1b9a02(0xe0)]);}async[_0x562ca9(0xd5)](_0x144429,_0x51d7bc){const _0x14ba39=_0x562ca9;return this[_0x14ba39(0xfd)]('screenshotElement',[_0x144429,_0x51d7bc]),this[_0x14ba39(0x11c)](_0x51d7bc?.[_0x14ba39(0xe0)]);}[_0x562ca9(0x11c)](_0xc37b8f){const _0x1406eb={_0xfa079c:0xe3},_0x130989=_0x562ca9,_0x4ce78d=this[_0x130989(_0x1406eb._0xfa079c)][_0x130989(0x11c)];if(_0x4ce78d===void 0x0)return Buffer['from']('fake-png');return typeof _0x4ce78d===_0x130989(0x101)?_0x4ce78d(_0xc37b8f):_0x4ce78d;}async[_0x562ca9(0xd1)](_0x4d3308){const _0x8f390e={_0xf4a3c3:0xfd,_0x2bb7a3:0xd1,_0x35bf71:0x125,_0xb083bc:0xa0,_0x21b0ad:0xa2},_0x128a03=_0x562ca9;this[_0x128a03(_0x8f390e._0xf4a3c3)](_0x128a03(_0x8f390e._0x2bb7a3),[_0x4d3308]);if(_0x4d3308[_0x128a03(_0x8f390e._0x35bf71)]['length']===0x1&&_0x4d3308[_0x128a03(0x125)][0x0][_0x128a03(_0x8f390e._0xb083bc)]===_0x128a03(0x102)){const _0x7d3ac4=_0x4d3308[_0x128a03(0x125)][0x0]['ref'];return this['behavior'][_0x128a03(0xf3)]?.[_0x7d3ac4]??_0x128a03(_0x8f390e._0x21b0ad)+_0x7d3ac4+_0x128a03(0x10d);}return'<div></div>';}},FakeContext=class{constructor(_0x439a96,_0x18f25b,_0x1271cd){const _0x13f89c={_0x387339:0xe3,_0x16d742:0xf2,_0x2c743e:0xc4},_0x290230={_0x2151d7:0xf8},_0x5b9fa3=_0x562ca9;this['recorder']=_0x439a96,this[_0x5b9fa3(_0x13f89c._0x387339)]=_0x18f25b,this['scope']=_0x1271cd;const _0x92b4ce=new FakePage(_0x439a96,_0x18f25b,_0x1271cd+_0x5b9fa3(_0x13f89c._0x16d742),_0x18f25b[_0x5b9fa3(0x115)]??_0x5b9fa3(0xc6));_0x18f25b[_0x5b9fa3(0xf8)]&&(_0x92b4ce[_0x5b9fa3(_0x13f89c._0x2c743e)]=()=>{const _0x4e983f=_0x5b9fa3;this['emitFakePopup'](_0x18f25b[_0x4e983f(_0x290230._0x2151d7)]);}),this['pageList']=[_0x92b4ce],this[_0x5b9fa3(0xd7)]={..._0x18f25b['localStorage']??{}},this[_0x5b9fa3(0x11d)]={..._0x18f25b[_0x5b9fa3(0x124)]??{}};}[_0x562ca9(0x108)];[_0x562ca9(0xe3)];['scope'];static{__name(this,_0x562ca9(0xeb));}[_0x562ca9(0xb5)];[_0x562ca9(0xa1)]=0x0;[_0x562ca9(0xff)]=[];[_0x562ca9(0xd7)];[_0x562ca9(0x11d)];[_0x562ca9(0x105)]=new Set();['record'](_0x374055,_0x3dc477){const _0x234ee5={_0x2bdae4:0x108,_0x49d330:0xb8,_0x4399ed:0xd2},_0x268b5c=_0x562ca9;this[_0x268b5c(_0x234ee5._0x2bdae4)][_0x268b5c(_0x234ee5._0x49d330)]({'scope':this[_0x268b5c(_0x234ee5._0x4399ed)],'method':_0x374055,'args':_0x3dc477});}[_0x562ca9(0xce)](){const _0x5355d9=_0x562ca9;return this[_0x5355d9(0xb5)];}[_0x562ca9(0xaf)](){const _0x56657c={_0x1cb9b7:0xd9},_0x324c1=_0x562ca9,_0xfc4254=this[_0x324c1(0xb5)][this[_0x324c1(0xa1)]];if(!_0xfc4254)throw new DriverError(_0x324c1(_0x56657c._0x1cb9b7),{'activeIdx':this[_0x324c1(0xa1)]});return _0xfc4254;}['consoleEntries'](){const _0x242e12={_0x45cf1d:0x122},_0x6ef77f=_0x562ca9;return this[_0x6ef77f(0xe3)][_0x6ef77f(_0x242e12._0x45cf1d)]??[];}['networkEntries'](){const _0x1f9a93={_0x1fc114:0xe9},_0x258a1b=_0x562ca9;return this['behavior'][_0x258a1b(_0x1f9a93._0x1fc114)]??[];}async[_0x562ca9(0x11b)](_0x20d49a){const _0x4bbf2f={_0x501140:0xfd,_0x4134e8:0xb5},_0x3dc724=_0x562ca9;this[_0x3dc724(_0x4bbf2f._0x501140)]('setActivePage',[_0x20d49a]);if(_0x20d49a<0x0||_0x20d49a>=this[_0x3dc724(_0x4bbf2f._0x4134e8)][_0x3dc724(0xa9)])throw new DriverError(_0x3dc724(0xc5),{'index':_0x20d49a,'available':this['pageList'][_0x3dc724(0xa9)]});this['activeIdx']=_0x20d49a,this[_0x3dc724(0xff)][_0x3dc724(0xa9)]=0x0;}[_0x562ca9(0x103)](_0x515319){const _0xebf6a0=_0x562ca9;return subscribe(this[_0xebf6a0(0x105)],_0x515319);}[_0x562ca9(0xbb)](_0x4de472){const _0x10f6ae={_0x5f33e9:0xc9,_0x27eb8b:0xe3},_0x16e172=_0x562ca9,_0x2b6187=this[_0x16e172(0xd2)]+_0x16e172(_0x10f6ae._0x5f33e9)+this[_0x16e172(0xb5)][_0x16e172(0xa9)],_0x29339b=new FakePage(this['recorder'],this[_0x16e172(_0x10f6ae._0x27eb8b)],_0x2b6187,_0x4de472);this[_0x16e172(0xb5)][_0x16e172(0xb8)](_0x29339b);const _0x3ab528=this['pageList'][_0x16e172(0xa9)]-0x1;for(const _0x130219 of this[_0x16e172(0x105)]){try{_0x130219({'index':_0x3ab528,'url':_0x4de472});}catch{}}return _0x3ab528;}[_0x562ca9(0xee)](_0x4878e5){const _0x76cc45={_0x4961bd:0xa9,_0x342f69:0xc5,_0x22a57d:0xb5,_0x59032a:0xb5,_0x23e7c9:0x119},_0x5159c3=_0x562ca9;if(_0x4878e5<0x0||_0x4878e5>=this[_0x5159c3(0xb5)][_0x5159c3(_0x76cc45._0x4961bd)])throw new DriverError(_0x5159c3(_0x76cc45._0x342f69),{'index':_0x4878e5,'available':this[_0x5159c3(_0x76cc45._0x22a57d)][_0x5159c3(0xa9)]});this[_0x5159c3(_0x76cc45._0x59032a)][_0x5159c3(_0x76cc45._0x23e7c9)](_0x4878e5,0x1);}async[_0x562ca9(0xa8)](_0x13bfad){const _0x5f298a={_0x204cae:0xfd,_0x57c483:0xa8,_0x2e267d:0x125,_0x3c2a46:0xa9,_0x1e7585:0xff},_0x3e9585=_0x562ca9;this[_0x3e9585(_0x5f298a._0x204cae)](_0x3e9585(_0x5f298a._0x57c483),[_0x13bfad]);if(!_0x13bfad[_0x3e9585(_0x5f298a._0x2e267d)][_0x3e9585(_0x5f298a._0x3c2a46)])throw new LocatorError(_0x3e9585(0x9f),{'locator':_0x13bfad});this[_0x3e9585(_0x5f298a._0x1e7585)]['push'](_0x13bfad);}async[_0x562ca9(0xd4)](){const _0x5c8cb6={_0x183d8c:0xfd,_0x328bb6:0xbe,_0x545745:0x121},_0x3200dc=_0x562ca9;this[_0x3200dc(_0x5c8cb6._0x183d8c)](_0x3200dc(0xd4),[]);if(this['frameStack'][_0x3200dc(0xa9)]===0x0)throw new DriverError(_0x3200dc(_0x5c8cb6._0x328bb6),{});this[_0x3200dc(0xff)][_0x3200dc(_0x5c8cb6._0x545745)]();}async[_0x562ca9(0xac)](_0x36cf3d,_0x5498cd){const _0x142387={_0x17722b:0xac},_0x542c3a=_0x562ca9;this[_0x542c3a(0xfd)](_0x542c3a(_0x142387._0x17722b),[_0x36cf3d,_0x5498cd]),this[_0x542c3a(0xd7)][_0x36cf3d]=_0x5498cd;}async[_0x562ca9(0xe6)](_0x294e6f){const _0x20d151={_0x50967a:0xe6,_0xc2755:0xd7},_0xe3a234=_0x562ca9;return this[_0xe3a234(0xfd)](_0xe3a234(_0x20d151._0x50967a),[_0x294e6f]),this[_0xe3a234(_0x20d151._0xc2755)][_0x294e6f]??null;}async[_0x562ca9(0xb2)](_0x463a14,_0x2086a3,_0x1df3ca){const _0x4f5ee0={_0xe2d51f:0x11d},_0x8da4b4=_0x562ca9;this['record'](_0x8da4b4(0xb2),[_0x463a14,_0x2086a3,_0x1df3ca]),this[_0x8da4b4(_0x4f5ee0._0xe2d51f)][_0x463a14]=_0x2086a3;}async['getCookie'](_0x29020e){const _0x2eeba0=_0x562ca9;return this['record'](_0x2eeba0(0xa4),[_0x29020e]),this['cookieState'][_0x29020e]??null;}async[_0x562ca9(0xda)](_0x7ecb21){const _0x5322ce=_0x562ca9;this[_0x5322ce(0xfd)]('saveStorageState',[_0x7ecb21]);}async[_0x562ca9(0x110)](_0x4790ba){const _0x79be34=_0x562ca9;return this[_0x79be34(0xfd)](_0x79be34(0x110),[_0x4790ba]),void 0x0;}async[_0x562ca9(0xed)](){const _0xff1f88={_0x25abf2:0xfd},_0x1426c9=_0x562ca9;this[_0x1426c9(_0xff1f88._0x25abf2)]('close',[]);}['frameDepth'](){const _0x31134c=_0x562ca9;return this[_0x31134c(0xff)]['length'];}},FakeWebDriver=class{constructor(_0x435e32={}){const _0x16d750={_0x1fc109:0x108},_0x11ba80=_0x562ca9;this['behavior']=_0x435e32,this[_0x11ba80(_0x16d750._0x1fc109)]=createRecorder();}[_0x562ca9(0xe3)];static{__name(this,_0x562ca9(0x123));}['launched']=![];[_0x562ca9(0x108)];[_0x562ca9(0xcd)]=[];async[_0x562ca9(0xfa)](_0x10dfae){const _0x137cc0=_0x562ca9;this[_0x137cc0(0x108)][_0x137cc0(0xb8)]({'scope':_0x137cc0(0xbd),'method':'launch','args':[_0x10dfae]}),this[_0x137cc0(0xf4)]=!![];}async['newContext'](_0xf71149){const _0x573e34={_0x59484a:0xb8,_0x274b59:0xcf,_0x1e55ec:0x108,_0x2f1257:0x10a,_0x4bd0ff:0xcd},_0x4683eb=_0x562ca9;this[_0x4683eb(0x108)][_0x4683eb(_0x573e34._0x59484a)]({'scope':'driver','method':_0x4683eb(_0x573e34._0x274b59),'args':[_0xf71149]});if(!this[_0x4683eb(0xf4)])throw new DriverError(_0x4683eb(0xf9),{});const _0x1d316b=new FakeContext(this[_0x4683eb(_0x573e34._0x1e55ec)],this['behavior'],_0x4683eb(_0x573e34._0x2f1257)+this[_0x4683eb(0xcd)][_0x4683eb(0xa9)]);return this[_0x4683eb(_0x573e34._0x4bd0ff)]['push'](_0x1d316b),_0x1d316b;}async[_0x562ca9(0xed)](){const _0x5cab2d={_0xec489f:0x108,_0x20458d:0xbd,_0x99dfd2:0xed,_0x1a8fb3:0xf4},_0x498e49=_0x562ca9;this[_0x498e49(_0x5cab2d._0xec489f)][_0x498e49(0xb8)]({'scope':_0x498e49(_0x5cab2d._0x20458d),'method':_0x498e49(_0x5cab2d._0x99dfd2),'args':[]}),this[_0x498e49(_0x5cab2d._0x1a8fb3)]=![];}[_0x562ca9(0x9e)](){return void 0x0;}async[_0x562ca9(0xb9)](){const _0x1602bc=_0x562ca9;throw new DriverError(_0x1602bc(0xf7),{});}['attachExisting'](_0x431c9d){throw new DriverError('attachExisting\x20not\x20supported\x20by\x20FakeWebDriver',{});}[_0x562ca9(0xe1)](){const _0x39213f={_0x677f36:0x108},_0x2e997d=_0x562ca9;return this[_0x2e997d(_0x39213f._0x677f36)][_0x2e997d(0xe1)]();}[_0x562ca9(0xcb)](_0x31054d){const _0x201644={_0x4a1cd0:0x108,_0x4d4747:0xbf},_0x1b49fb=_0x562ca9;return this[_0x1b49fb(_0x201644._0x4a1cd0)][_0x1b49fb(0xe1)]()[_0x1b49fb(_0x201644._0x4d4747)](_0x2d771e=>_0x2d771e[_0x1b49fb(0x116)]===_0x31054d);}};export{FakeWebDriver};
1
+ const _0x224db2=_0x4ba6;(function(_0x4dfa00,_0x161dae){const _0x7df14c={_0x1ec93f:0x10d,_0x53b2d0:0x122,_0x428632:0xd4,_0x39e1f8:0x189,_0x53f6c7:0x196,_0x552898:0x155,_0x2f6f01:0xe9},_0x2fb608=_0x4ba6,_0x29edbb=_0x4dfa00();while(!![]){try{const _0x5d2550=parseInt(_0x2fb608(_0x7df14c._0x1ec93f))/0x1*(-parseInt(_0x2fb608(_0x7df14c._0x53b2d0))/0x2)+parseInt(_0x2fb608(_0x7df14c._0x428632))/0x3+-parseInt(_0x2fb608(0x15e))/0x4*(-parseInt(_0x2fb608(0x17f))/0x5)+parseInt(_0x2fb608(0x11d))/0x6+parseInt(_0x2fb608(_0x7df14c._0x39e1f8))/0x7*(parseInt(_0x2fb608(_0x7df14c._0x53f6c7))/0x8)+parseInt(_0x2fb608(0x16b))/0x9+-parseInt(_0x2fb608(_0x7df14c._0x552898))/0xa*(parseInt(_0x2fb608(_0x7df14c._0x2f6f01))/0xb);if(_0x5d2550===_0x161dae)break;else _0x29edbb['push'](_0x29edbb['shift']());}catch(_0x44d82f){_0x29edbb['push'](_0x29edbb['shift']());}}}(_0x1026,0xdb798));var __defProp=Object['defineProperty'],__name=(_0x3ca933,_0x528903)=>__defProp(_0x3ca933,_0x224db2(0x18f),{'value':_0x528903,'configurable':!![]});import{writeFile}from'fs/promises';function _0x1026(){const _0x6021b8=['BMv3ugfNzuXPC3rLBMvYCW','CMvZCg9UC2u','yxjYAxzLza','D29YA2vYu3rHCNrLza','A2LUza','C2vYDMLJzvDVCMTLCNm','C2HPzNq','BgvMDa','Aw5ZCgvJDevSzw1LBNq','ywrK','zMLUzeLUzgv4','odq3ntCZofnVEhLhva','Bwf4','Aw5WDxrwywX1zq','zMfRzs1WBMC','iJ48l2rPDJ4','nde4uhznEgXr','y2XVC2vqywDL','yNjPBMDuB0zYB250','y2fUBM90ignSB3nLihrOzsbVBMX5ig9Wzw4GDgfIoIbUB3rOAw5NihDVDwXKigjLigXLzNqGDg8GzhjPDMu','y2XVC2vgywTLugfNzq','ig1Zlca','B25bzNrLCKnSAwnR','C3DPDgnOAw5N','yM94zxnjBKnHChr1CMu','ig1Z','AxneAxnHyMXLzej5rgvMyxvSDa','zgvSzxrL','zMLSDgvY','y291BNrcEurLzMf1Bhq','Dgv4DenVBNrLBNrcEurLzMf1Bhq','zhjHz0fUzerYB3a','y291BNq','yxjYAxzHBhm','z2v0qxr0CMLIDxrL','zxzHBhvHDgvpBKXVy2f0B3i','y29UBMvJDfnOyxjLzcbUB3qGC3vWCg9YDgvKigj5iezHA2vxzwjeCML2zxi','yMXVy2TLza','zxzHBhvHDgu','BM9eB3DUBg9Hza','ChjVzMLSzq','uvvfvuvFtufy','D2fPDezVCKXVywrtDgf0zq','igLUia','ihn0yxj0zwqGD2L0AgLUia','CNvU','BMv0D29YAY5TB2nR','DhLWzq','Cg9W','D2fPDezVCK5LD1bHz2u','pgrPDIbKyxrHlxvUB3rLC3qTCMvMpsi','CMvM','C291CMnL','y3vYCMvUDfvYBa','Bg9JywXtDg9YywDLu3rHDgu','BM8Gzg93BMXVywq','ywn0AxzLugfNzq','yMXVy2S','C3bSAwnL','zxzHBhvHDgvszxn1Bhq','zw1PDezHA2vqB3b1Ca','B25ozxDqywDL','y3r4','zxjYB3jpBK5LEhrby3rPB24','CMvZCg9UC2vZ','Aw5PDgLHBfvYBa','D2fPDezVCLnLCNzPy2vxB3jRzxi','nJeZmfLrCKTPAq','CxvLDwvK','y2HLy2TLzfn0yxrL','C2v0vMLLD3bVCNq','AgfZ','ugfNzuHPC3rVCNK','zMLYC3rvBMHHBMrLzfbHz2u','C3rYAw5NAwz5','zMLUza','mJrwr3v4t28','BMv0D29YAY53ywL0rM9YuMvXDwvZDa','ywn0AxzLswr4','yMvOyxzPB3i','CMfJzq','CMvZB2X2zq','CMvQzwn0','C2nYB2XSsw50B1zPzxC','rMfRzvDLyKrYAxzLCG','zxHPDezYyw1L','C2f2zufZ','D2fPDezVCK5HDMLNyxrPB24','y29UDgv4Dhm','mtaWntCYodr3vuLyyM8','D2fPDezVCG','zw1PDezHA2vszxf1zxn0','zxHPDezYyw1LignHBgXLzcb3AxrOig5VigzYyw1Lig9UihrOzsbZDgfJAW','Dw5JAgvJAW','uM91DgvkB3vYBMfS','yxr0ywnOrxHPC3rPBMCGBM90ihn1ChbVCNrLzcbIEsbgywTLv2vIrhjPDMvY','C2vSzwn0t3b0Aw9U','Bwf5yMvuAhjVDW','C3rVChbLza','y29VA2LLu3rHDgu','y2XVy2TgCM96zw4','lNbHz2u','C2XLzxa','zNjHBwvtDgfJAW','BM8Gywn0AxzLihbHz2uGAw4Gy29UDgv4Da','Dgv4DenVBNrLBNq','DgLTzw91De1Z','y29VA2LLCW','rg93BMXVywrrDwv1zq','nJmXmJi1rfDkuNH6','C2nYzwvUC2HVDej5DgvZ','y2fSBhm','Bgf1BMnO','y3jLyxrLuMvJB3jKzxi','Ag92zxi','u2vYDMLJzvDVCMTLCK5LzwrZuhjVzMLSzuvYCM9Y','Bgf1BMnOzwq','AgfUzgvKugfNzxm','AgfZq2XVy2S','n1fuAhnMzq','Dw5TB2nR','D29YA2vYlMv2ywX1yxrL','zNjVEMvU','zw1PDezHA2vtzxj2AwnLv29YA2vY','yM91BMrPBMDcB3HcEurLzMf1Bhq','BMfTzq','C3rYAw5N','zNjHBwvezxb0Aa','zwXLBwvUDeHPBNrcEvjLzG','DgLJAW','ChjLC3m','BMv4Da','nde2ntGWoenwz1PRtG','yNjVD3nLCKnVBNrLEhrjza','D2fPDgvY','BM93','CgfNzuXPC3q','CMvJB3jKzxi','CM91DgvZ','zNjVBq','ihDPDgHPBIa','y2XPCgjVyxjKugfZDgu','zgvZy3jPyMu','zw50zxjgCMfTzq','tM90uMvJB3jKAw5NrxjYB3i','BwfW','BMv0D29YAY51BM1Vy2S','y2XVy2S','BM8GC2vYDMLJzsb3B3jRzxi','DgL0Bgu','zg93BMXVywrZ','CgXHBKnSB3nL','zw1PDezHA2veB3DUBg9Hza','BM8Gzg93BMXVywqGD2HVC2uGBMfTzsb3B3vSzca','D2fPDezVCLvYBa','z290BW','q2XVy2ToB3rjBNn0ywXSzwrfCNjVCG','C2v0tg9JywXtDg9YywDL','BMv0D29YA0vUDhjPzxm','D2fPDezVCLrLEhq','oYbUB3qGDgfRzw46ia','lNbHz2uW','zMfRzvDVCMTLCG','z29gB3j3yxjK','uMvXDwvZDfDHAxruAw1LB3v0rxjYB3i','CMvJB3jK','z2v0','C2v0','C2v0qwn0AxzLugfNzq','Cg9WDxbpBKnSAwnR','oIbTB2nRigL0igzPCNn0ihDPDgGGBw9JA1jVDxrLka','AxnwAxnPyMXLqNLezwzHDwX0','mtaYndiXnwP2DKvXsW','C3vIC2nYAwjL','z2v0q29VA2LL','ihrHyG','C2nYzwvUC2HVDevSzw1LBNq','AxnwAxnPyMXL','BMv3q29UDgv4Da','y2XPy2S','ywjVDxq6yMXHBMS','zg91yMXLq2XPy2S','B3v0zxjiDg1SqNLszwy','zgvSAxzLCG','ig1HDgnOAw5Nia','BM90AgLUzYbYzwnVCMrZihjLCxvLC3rZihrVia','zw50zxjgCMfTzsbJywXSzwqGD2L0AcbLBxb0EsbSB2nHDg9Y','vgLTzw91DevYCM9Y','C2f2zvn0B3jHz2vtDgf0zq','y2XVy2SUzNjLzxPL','AgLZDg9YEq','C2v0q29VA2LL','DgfRzq','ndu2otrAqxLNtLi','C2vLBG','BMv3ugfNzq','B3v0zxjive1m','Bw9JA2vK','D2fPDezVCLjLCxvLC3q','BM8GCMvXDwvZDcb0BYa','C3rLChm','CgfNzsbPBMrLEcbVDxqGB2yGCMfUz2u','y29UBMvJDfnOyxjLza','AxneAxnHyMXLza','zhjPDMvY','y29UC29SzuvUDhjPzxm','rMfRzunVBNrLEhq','Aw5KzxHpzG','BMv0D29YAW','CMvSB2fK','DxbSB2fKrMLSzq','z2v0tg9JywXtDg9YywDL','ChvZAa','zNvUy3rPB24','DgvZDa','y2XVC2u','D29YA2vYtwf0y2HLCW','zNjLzxPL','C2nVCgu','Bwv0Ag9K','DxjS','yM91BMrPBMDcB3G','D2fPDgvYCW','DgfRzw4','DgHLihbHz2uGy2XVy2SGAxmGBM90igLUC3rHBgXLzcbVBIb0AgLZigjYB3DZzxiG4OcuigL0igHHCYb0BYbIzsbPBIbWBgfJzsbIzwzVCMuGDgHLigzPCNn0ihbHz2uGBg9HzhmSig9YihrOzsbWywDLj3mGB3DUihrPBwvYCYbRzwvWihjLywWGDgLTzs4GqsbYDw4GAw5ZDgfSBhmGAxqGD2HLBIb0AguGC2nLBMfYAw8GB3iGAxrZigHLBhbLCNmGy2fSBcbJBg9JA0zYzwv6zsaVignSB2nRvgLJAYaVignSB2nRuNvUoYbVDMvYie1ducWGB3bLBIb0AguGyNjVD3nLCIb3AxrOig5LD19JB250zxH0ihTJBg9JAZOGDhj1zx0Gkg9Yigv4CgXVCMvFC3rHCNqGE2nSB2nRoIb0CNvLFsKU','yxr0CMLIDxrLC0j5rgvMyxvSDa','Aw5UzxjuzxH0','ywjVCNq','Aw5WDxrwywX1zuj5rgvMyxvSDa','mZm3mgDowM5sCq','D29YA2vYvxjSCW','D2fPDezVCKrVD25SB2fK','y2HLy2S','BgvUz3rO'];_0x1026=function(){return _0x6021b8;};return _0x1026();}function subscribe(_0x33471b,_0x282109){const _0x4a0a4c=_0x224db2;return _0x33471b[_0x4a0a4c(0x11b)](_0x282109),()=>{const _0x1aa1a4=_0x4a0a4c;_0x33471b[_0x1aa1a4(0x12d)](_0x282109);};}__name(subscribe,_0x224db2(0xd5));import{UnotestError}from'@unotest/core';var DriverError=class extends UnotestError{static{__name(this,'DriverError');}},LocatorError=class extends UnotestError{static{__name(this,'LocatorError');}},TimeoutError=class extends UnotestError{static{__name(this,_0x224db2(0xe3));}},ClockNotInstalledError=class extends DriverError{static{__name(this,_0x224db2(0xc4));}constructor(){const _0x20575b=_0x224db2;super(_0x20575b(0x108),{});}},NO_CLOCK={'freeze':__name(()=>Promise['reject'](new ClockNotInstalledError()),_0x224db2(0x101)),'tick':__name(()=>Promise[_0x224db2(0x164)](new ClockNotInstalledError()),_0x224db2(0x193)),'run':__name(()=>Promise[_0x224db2(0x164)](new ClockNotInstalledError()),_0x224db2(0x13f)),'frozen':__name(()=>![],_0x224db2(0x18c))};function firstUnhandedPage(_0x167683,_0x134cb6){const _0x50cdf7={_0x440609:0x11c},_0x13d9cb=_0x224db2;return _0x167683[_0x13d9cb(_0x50cdf7._0x440609)](_0x23193b=>!_0x134cb6[_0x13d9cb(0x159)](_0x23193b));}function _0x4ba6(_0x5a1e6b,_0x4642ae){_0x5a1e6b=_0x5a1e6b-0xbe;const _0x10261e=_0x1026();let _0x4ba6c5=_0x10261e[_0x5a1e6b];if(_0x4ba6['fLbrSH']===undefined){var _0x99b40f=function(_0x4726a8){const _0x1e4a7d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3ca933='',_0x528903='';for(let _0x33471b=0x0,_0x282109,_0x167683,_0x134cb6=0x0;_0x167683=_0x4726a8['charAt'](_0x134cb6++);~_0x167683&&(_0x282109=_0x33471b%0x4?_0x282109*0x40+_0x167683:_0x167683,_0x33471b++%0x4)?_0x3ca933+=String['fromCharCode'](0xff&_0x282109>>(-0x2*_0x33471b&0x6)):0x0){_0x167683=_0x1e4a7d['indexOf'](_0x167683);}for(let _0x23193b=0x0,_0x5251d6=_0x3ca933['length'];_0x23193b<_0x5251d6;_0x23193b++){_0x528903+='%'+('00'+_0x3ca933['charCodeAt'](_0x23193b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x528903);};_0x4ba6['ouFAbu']=_0x99b40f,_0x4ba6['lzctjX']={},_0x4ba6['fLbrSH']=!![];}const _0x39bd45=_0x10261e[0x0],_0x40490a=_0x5a1e6b+_0x39bd45,_0x51d045=_0x4ba6['lzctjX'][_0x40490a];return!_0x51d045?(_0x4ba6c5=_0x4ba6['ouFAbu'](_0x4ba6c5),_0x4ba6['lzctjX'][_0x40490a]=_0x4ba6c5):_0x4ba6c5=_0x51d045,_0x4ba6c5;}__name(firstUnhandedPage,_0x224db2(0x15b));function claimNewPage(_0x5251d6,_0x574e29,_0x1d0b26){const _0x380160={_0xd329fc:0x127,_0x541258:0xd7,_0x7c6b4e:0x11b},_0x4056a0=_0x224db2,_0x4e5a16=firstUnhandedPage(_0x5251d6,_0x574e29);if(_0x4e5a16<0x0){const _0x3db034=_0x5251d6[_0x4056a0(0x111)];throw new TimeoutError('no\x20new\x20tab\x20within\x20'+_0x1d0b26+_0x4056a0(_0x380160._0xd329fc)+_0x3db034+_0x4056a0(_0x380160._0x541258)+(_0x3db034===0x1?'':'s')+'\x20open',{'timeoutMs':_0x1d0b26,'open':_0x3db034});}return _0x574e29[_0x4056a0(_0x380160._0x7c6b4e)](_0x5251d6[_0x4e5a16]),_0x4e5a16;}__name(claimNewPage,'claimNewPage');var PageHistory=class{static{__name(this,_0x224db2(0x15a));}[_0x224db2(0x119)]=[];[_0x224db2(0x129)](_0x489a72,_0x543e5e,_0x25a5b3){const _0x52f889={_0x255558:0x119,_0x299830:0x119,_0x11c335:0x119},_0x52b5b4=_0x224db2,_0x304d96=_0x489a72[_0x543e5e];if(!_0x304d96||_0x304d96===_0x25a5b3)return;const _0x71992f=this[_0x52b5b4(_0x52f889._0x255558)][_0x52b5b4(0x12e)](_0x1aea40=>_0x1aea40!==_0x304d96&&_0x489a72['includes'](_0x1aea40));this[_0x52b5b4(_0x52f889._0x299830)][_0x52b5b4(0x14c)](0x0,this[_0x52b5b4(_0x52f889._0x11c335)]['length'],..._0x71992f,_0x304d96);}[_0x224db2(0xbf)](_0x773887,_0x213230,_0x5ead70){const _0x11d17e={_0x21d554:0xf1,_0x5eddc1:0x125,_0x37f1e1:0x119,_0x498186:0x14c,_0x5825a8:0x119,_0x39f6b5:0x111},_0x175334=_0x224db2,_0x4eacd7=_0x773887[_0x5ead70];if(!_0x4eacd7)throw new DriverError(_0x175334(_0x11d17e._0x21d554),{'index':_0x5ead70,'available':_0x773887['length']});if(_0x773887['length']===0x1)throw new DriverError(_0x175334(_0x11d17e._0x5eddc1),{'index':_0x5ead70});const _0x47ade9=_0x773887[_0x175334(0x12e)](_0x51b367=>_0x51b367!==_0x4eacd7),_0x3df4b8=_0x773887[_0x213230],_0x23f436=this['left'][_0x175334(0x12e)](_0x2ccb8c=>_0x2ccb8c!==_0x4eacd7);this[_0x175334(_0x11d17e._0x37f1e1)][_0x175334(_0x11d17e._0x498186)](0x0,this[_0x175334(_0x11d17e._0x5825a8)][_0x175334(_0x11d17e._0x39f6b5)],..._0x23f436);if(_0x3df4b8&&_0x3df4b8!==_0x4eacd7)return{'closing':_0x4eacd7,'nextActive':_0x47ade9['indexOf'](_0x3df4b8)};for(let _0x30f191=this[_0x175334(_0x11d17e._0x5825a8)][_0x175334(_0x11d17e._0x39f6b5)]-0x1;_0x30f191>=0x0;_0x30f191--){const _0x232948=_0x47ade9[_0x175334(0xf7)](this[_0x175334(0x119)][_0x30f191]);if(_0x232948>=0x0)return{'closing':_0x4eacd7,'nextActive':_0x232948};}return{'closing':_0x4eacd7,'nextActive':Math[_0x175334(0x11e)](_0x5ead70-0x1,0x0)};}},NotRecordingError=class extends DriverError{static{__name(this,_0x224db2(0x1a2));}constructor(_0xe3f92c){const _0x5b9784=_0x224db2;super(_0x5b9784(0xe1)+JSON[_0x5b9784(0x15c)](_0xe3f92c)+_0x5b9784(0xd2)+JSON['stringify'](_0xe3f92c)+',\x20{abort:\x20true,\x20record:\x20true}).\x20Without\x20it\x20a\x20check\x20for\x20requests\x20there\x20would\x20pass\x20having\x20watched\x20nothing.',{'glob':_0xe3f92c});}},RequestWaitTimeoutError=class extends TimeoutError{static{__name(this,_0x224db2(0xcc));}constructor(_0x2d74b8,_0x189335){const _0x15663e={_0x399bf9:0xef,_0x3b19fc:0x12b},_0x59645d=_0x224db2;super(_0x59645d(_0x15663e._0x399bf9)+JSON[_0x59645d(0x15c)](_0x2d74b8)+_0x59645d(0x13d)+_0x189335+_0x59645d(_0x15663e._0x3b19fc),{'glob':_0x2d74b8,'timeoutMs':_0x189335});}},RouteJournal=class _RouteJournal{constructor(_0x4f66f6=Date['now']){const _0x4ed367=_0x224db2;this[_0x4ed367(0x199)]=_0x4f66f6;}[_0x224db2(0x199)];static{__name(this,_0x224db2(0x170));}static [_0x224db2(0x13b)]=0x1f4;[_0x224db2(0x152)]=new Map();['queued']=new Map();[_0x224db2(0x106)]=new Map();[_0x224db2(0x174)]=new Map();[_0x224db2(0xcf)](_0x14f190,_0x5c619d){const _0x12541e={_0x28a858:0x152,_0x36a048:0xcf,_0xb3d5a:0x116,_0x372b99:0x174,_0x5a74a4:0x159},_0x2aa404=_0x224db2;this[_0x2aa404(_0x12541e._0x28a858)][_0x2aa404(_0x12541e._0x36a048)](_0x14f190,_0x5c619d);if(!this[_0x2aa404(0x156)][_0x2aa404(0x159)](_0x14f190))this[_0x2aa404(0x156)][_0x2aa404(_0x12541e._0x36a048)](_0x14f190,[]);_0x5c619d[_0x2aa404(_0x12541e._0xb3d5a)]===_0x2aa404(0x10b)&&_0x5c619d['record']&&!this[_0x2aa404(_0x12541e._0x372b99)][_0x2aa404(_0x12541e._0x5a74a4)](_0x14f190)&&this['stopped'][_0x2aa404(0xcf)](_0x14f190,[]);}[_0x224db2(0x12d)](_0xa6c805){const _0x4c4df6={_0x39f18f:0x152,_0xfc5b7a:0x159},_0x3956a6=_0x224db2,_0x5e117c=_0xa6c805===void 0x0?[...this[_0x3956a6(0x152)]['keys']()]:this[_0x3956a6(_0x4c4df6._0x39f18f)][_0x3956a6(_0x4c4df6._0xfc5b7a)](_0xa6c805)?[_0xa6c805]:[];for(const _0x2986b1 of _0x5e117c){this['responses'][_0x3956a6(0x12d)](_0x2986b1),this['queued'][_0x3956a6(0x12d)](_0x2986b1);}return _0x5e117c;}[_0x224db2(0x113)](_0x8358bd){const _0x5899c6={_0x593ea4:0x152},_0x2060a1=_0x224db2;return this[_0x2060a1(_0x5899c6._0x593ea4)][_0x2060a1(0xce)](_0x8358bd);}[_0x224db2(0xed)](_0x25086e){const _0x4756f6=_0x224db2;return this['responses'][_0x4756f6(0x159)](_0x25086e);}[_0x224db2(0xdf)](_0x207be5,_0x29c80c){const _0x226bd2={_0x117e11:0xce},_0x37b3d2=_0x224db2,_0x3c0cc3=this[_0x37b3d2(0x106)]['get'](_0x207be5)?.[_0x37b3d2(0x118)]();if(_0x3c0cc3){_0x3c0cc3(_0x29c80c);return;}const _0x2376d2=this[_0x37b3d2(0x156)][_0x37b3d2(_0x226bd2._0x117e11)](_0x207be5);if(!_0x2376d2)return;_0x2376d2['push'](_0x29c80c);if(_0x2376d2['length']>_RouteJournal[_0x37b3d2(0x13b)])_0x2376d2['shift']();}[_0x224db2(0x14b)](_0x53ac3a,_0x5de835){const _0x41c528={_0x1503bd:0xce,_0x2b7776:0x104},_0x4153cf=_0x224db2;this[_0x4153cf(0x174)][_0x4153cf(_0x41c528._0x1503bd)](_0x53ac3a)?.[_0x4153cf(0xfc)]({'url':_0x5de835[_0x4153cf(_0x41c528._0x2b7776)],'method':_0x5de835[_0x4153cf(0x103)],'at':this['now']()});}[_0x224db2(0x137)](_0x3bddc3){const _0x178972={_0x304f21:0x174},_0x311321=_0x224db2,_0x52aa0c=this[_0x311321(_0x178972._0x304f21)][_0x311321(0xce)](_0x3bddc3);if(!_0x52aa0c)throw new NotRecordingError(_0x3bddc3);return _0x52aa0c;}[_0x224db2(0x195)](_0x4b2886,_0x575984){const _0x2dd343={_0x3ed411:0xce,_0x314371:0x118,_0x109c95:0x163},_0x5345e7={_0x444981:0x106,_0x466337:0xfc,_0x1f6f3e:0xcf},_0x3cf2a2=_0x224db2,_0x3f1d3b=this[_0x3cf2a2(0x156)][_0x3cf2a2(_0x2dd343._0x3ed411)](_0x4b2886)?.[_0x3cf2a2(_0x2dd343._0x314371)]();if(_0x3f1d3b)return Promise[_0x3cf2a2(_0x2dd343._0x109c95)](_0x3f1d3b);return new Promise((_0x3a04b9,_0x47dbb8)=>{const _0x2b46ae={_0x154f09:0x106,_0x2571e9:0x14c},_0x10d96f=_0x3cf2a2,_0x63bd25=__name(_0x2f4129=>{clearTimeout(_0x490deb),_0x3a04b9(_0x2f4129);},_0x10d96f(0x198)),_0x490deb=setTimeout(()=>{const _0x31abfe=_0x10d96f,_0x7321c9=this[_0x31abfe(_0x2b46ae._0x154f09)]['get'](_0x4b2886)??[];_0x7321c9[_0x31abfe(_0x2b46ae._0x2571e9)](_0x7321c9['indexOf'](_0x63bd25),0x1),_0x47dbb8(new RequestWaitTimeoutError(_0x4b2886,_0x575984));},_0x575984),_0x1552b1=this[_0x10d96f(_0x5345e7._0x444981)][_0x10d96f(0xce)](_0x4b2886)??[];_0x1552b1[_0x10d96f(_0x5345e7._0x466337)](_0x63bd25),this['waiters'][_0x10d96f(_0x5345e7._0x1f6f3e)](_0x4b2886,_0x1552b1);});}},DownloadQueue=class{constructor(_0x43d27b){const _0x1997fb={_0x17a0d2:0x178},_0x555a79=_0x224db2;this[_0x555a79(_0x1997fb._0x17a0d2)]=_0x43d27b;}['sleep'];static{__name(this,_0x224db2(0x17e));}[_0x224db2(0xea)]=[];[_0x224db2(0x107)]=new Set();[_0x224db2(0x133)]=new Set();[_0x224db2(0xfc)](_0x3e396f){const _0x4ca67f={_0x63947d:0x133},_0x142040=_0x224db2;this[_0x142040(0xea)][_0x142040(0xfc)](_0x3e396f);for(const _0x49fcec of this[_0x142040(_0x4ca67f._0x63947d)])_0x49fcec();}async[_0x224db2(0xe8)](_0x2741b5,_0x56bd7a){const _0x59abdc={_0x529fc9:0x195,_0x44c886:0x114,_0x453a8b:0x133,_0x1f28a6:0x178,_0x270a57:0x12d,_0x1b4a88:0x107},_0x5331c5=_0x224db2,_0x4495ba=__name(()=>this[_0x5331c5(0xea)][_0x5331c5(0x15d)](_0x466230=>!this[_0x5331c5(0x107)][_0x5331c5(0x159)](_0x466230)&&(_0x56bd7a===void 0x0||_0x56bd7a['matches'](_0x466230[_0x5331c5(0x18f)]))),_0x5331c5(_0x59abdc._0x529fc9));let _0x5d761d=_0x4495ba();if(_0x5d761d===void 0x0){let _0x5205c4=__name(()=>{},_0x5331c5(_0x59abdc._0x44c886));const _0x71bd0a=new Promise(_0x4ed3ec=>{_0x5205c4=__name(()=>{if(_0x4495ba()!==void 0x0)_0x4ed3ec();},'arrived');});this[_0x5331c5(_0x59abdc._0x453a8b)][_0x5331c5(0x11b)](_0x5205c4);try{await Promise[_0x5331c5(0x162)]([_0x71bd0a,this[_0x5331c5(_0x59abdc._0x1f28a6)](_0x2741b5)]);}finally{this[_0x5331c5(0x133)][_0x5331c5(_0x59abdc._0x270a57)](_0x5205c4);}_0x5d761d=_0x4495ba();}if(_0x5d761d===void 0x0)throw this['noDownload'](_0x2741b5,_0x56bd7a);return this[_0x5331c5(_0x59abdc._0x1b4a88)][_0x5331c5(0x11b)](_0x5d761d),_0x5d761d;}[_0x224db2(0x139)](_0x1985eb,_0x688a35){const _0x20161b={_0x284c5e:0x12e,_0x102f04:0xc1,_0xede1bd:0xc8,_0x163485:0x1a3,_0x4c9f0a:0x19e},_0xbabf27=_0x224db2,_0x4a49fc=this[_0xbabf27(0xea)][_0xbabf27(_0x20161b._0x284c5e)](_0x15badc=>!this[_0xbabf27(0x107)][_0xbabf27(0x159)](_0x15badc))[_0xbabf27(0x1a3)](_0x1c13ec=>_0x1c13ec[_0xbabf27(0x18f)]),_0x2beb5b=_0x688a35===void 0x0?_0xbabf27(0x149):_0xbabf27(_0x20161b._0x102f04)+_0x688a35['describe'](),_0x444464=_0x4a49fc[_0xbabf27(0x111)]>0x0?_0xbabf27(_0x20161b._0xede1bd)+_0x4a49fc[_0xbabf27(_0x20161b._0x163485)](_0x2caa30=>JSON['stringify'](_0x2caa30))['join'](',\x20'):'';return new TimeoutError(_0x2beb5b+_0xbabf27(_0x20161b._0x4c9f0a)+_0x1985eb+_0xbabf27(0x12b)+_0x444464,{'timeoutMs':_0x1985eb,'untaken':_0x4a49fc,..._0x688a35!==void 0x0?{'name':_0x688a35[_0xbabf27(0x1a0)]()}:{}});}},ServiceWorkerNeedsProfileError=class extends DriverError{static{__name(this,_0x224db2(0x185));}constructor(){super('no\x20extension\x20service\x20worker\x20here:\x20extensions\x20load\x20only\x20into\x20a\x20browser\x20started\x20with\x20a\x20profile\x20—\x20set\x20launch.userDataDir\x20(and\x20the\x20--load-extension\x20args)\x20in\x20unotest.config.\x20A\x20run\x20on\x20a\x20box\x20has\x20no\x20profile,\x20so\x20it\x20has\x20no\x20extensions\x20either.',{});}},ServiceWorkerWaitTimeoutError=class extends TimeoutError{static{__name(this,'ServiceWorkerWaitTimeoutError');}constructor(_0x2722da,_0x2b693e,_0x3eae15){const _0x4cce1b={_0xf56367:0xe0,_0x1f9a61:0x1a6,_0x5494ec:0x13e},_0x150e64=_0x224db2,_0x1efa86=_0x2b693e===void 0x0?'':_0x150e64(_0x4cce1b._0xf56367)+JSON['stringify'](_0x2b693e),_0x28d447=_0x3eae15[_0x150e64(0x111)]===0x0?'':'\x20Running:\x20'+_0x3eae15['join'](',\x20')+'.';super(_0x150e64(_0x4cce1b._0x1f9a61)+_0x1efa86+_0x150e64(_0x4cce1b._0x5494ec)+_0x2722da+'\x20ms.'+_0x28d447,{'timeoutMs':_0x2722da,'seen':_0x3eae15});}};function workerMatches(_0x538719,_0x5be30e){const _0x3ea957={_0x1bc455:0xfe},_0x1febce=_0x224db2;if(_0x5be30e===void 0x0)return!![];if(typeof _0x5be30e===_0x1febce(0x190))return _0x538719['includes'](_0x5be30e);return new RegExp(_0x5be30e[_0x1febce(0x146)],_0x5be30e['flags'])[_0x1febce(_0x3ea957._0x1bc455)](_0x538719);}__name(workerMatches,_0x224db2(0x100));function createRecorder(){const _0x1b7d87={_0x1e3d92:0x181},_0x3fa18c=_0x224db2,_0x16abbd=[];let _0x5743a7=0x0;return{'push':__name(_0x57c4f6=>_0x16abbd[_0x3fa18c(0xfc)]({..._0x57c4f6,'seq':_0x5743a7++}),_0x3fa18c(0xfc)),'calls':__name(()=>_0x16abbd,_0x3fa18c(_0x1b7d87._0x1e3d92))};}__name(createRecorder,_0x224db2(0x183));var FakePage=class{constructor(_0x78f573,_0x3d133d,_0x1406a3,_0x5b93e2){const _0x48d08d={_0x791967:0x102,_0x5a8846:0x147},_0x9c7b7c=_0x224db2;this[_0x9c7b7c(0x19b)]=_0x78f573,this[_0x9c7b7c(0x161)]=_0x3d133d,this[_0x9c7b7c(_0x48d08d._0x791967)]=_0x1406a3,this[_0x9c7b7c(_0x48d08d._0x5a8846)]=_0x5b93e2;}[_0x224db2(0x19b)];['behavior'];['scope'];static{__name(this,'FakePage');}['currentUrl'];[_0x224db2(0x128)];[_0x224db2(0xcd)](_0x130f3c,_0x35c4c5){const _0x226681={_0x1ea613:0x19b,_0x47fbba:0xfc},_0x73630b=_0x224db2;this[_0x73630b(_0x226681._0x1ea613)][_0x73630b(_0x226681._0x47fbba)]({'scope':this[_0x73630b(0x102)],'method':_0x130f3c,'args':_0x35c4c5});}['maybeThrow'](){const _0x2bd46b={_0x23ff7f:0x161,_0x1a0de6:0x151,_0x133216:0x151},_0x341c8a=_0x224db2;if(this[_0x341c8a(_0x2bd46b._0x23ff7f)][_0x341c8a(_0x2bd46b._0x1a0de6)]){const _0x5889c5=this[_0x341c8a(_0x2bd46b._0x23ff7f)][_0x341c8a(0x151)];this['behavior'][_0x341c8a(_0x2bd46b._0x133216)]=void 0x0;throw _0x5889c5;}}['url'](){return this['currentUrl'];}async[_0x224db2(0x1a7)](){const _0x1444ad={_0x39fc1f:0x1a7},_0x1bf383=_0x224db2;return this[_0x1bf383(0xcd)](_0x1bf383(_0x1444ad._0x39fc1f),[]),'fake\x20title';}async[_0x224db2(0xdb)](_0x168d73,_0x27c91e){const _0x5b4c86={_0x1cc4c1:0xdb},_0x35158a=_0x224db2;this[_0x35158a(0xcd)](_0x35158a(_0x5b4c86._0x1cc4c1),[_0x168d73,_0x27c91e]),this['maybeThrow'](),this[_0x35158a(0x128)]?.();}async['doubleClick'](_0x34d454,_0x57768f){const _0x329535={_0x372760:0xcd,_0x16b73c:0xdd},_0x146165=_0x224db2;this[_0x146165(_0x329535._0x372760)](_0x146165(_0x329535._0x16b73c),[_0x34d454,_0x57768f]),this['maybeThrow']();}async['fill'](_0x32438f,_0x2360bf,_0x264f8f){const _0x2c3de0={_0x28be3a:0xcd},_0x4f0a0e=_0x224db2;this[_0x4f0a0e(_0x2c3de0._0x28be3a)]('fill',[_0x32438f,_0x2360bf,_0x264f8f]),this[_0x4f0a0e(0x173)]();}async[_0x224db2(0x194)](_0x31ad1b,_0x288f96,_0x280610){const _0x412808={_0x457869:0xcd,_0x3d04e1:0x194,_0x5849e0:0x173},_0x314075=_0x224db2;this[_0x314075(_0x412808._0x457869)](_0x314075(_0x412808._0x3d04e1),[_0x31ad1b,_0x288f96,_0x280610]),this[_0x314075(_0x412808._0x5849e0)]();}async[_0x224db2(0x110)](_0x3e88a2,_0x133f32){const _0x38cf77=_0x224db2;this[_0x38cf77(0xcd)](_0x38cf77(0x110),[_0x3e88a2,_0x133f32]),this[_0x38cf77(0x173)]();}async[_0x224db2(0x16f)](_0x146a84,_0x4c5cbb){const _0x411000={_0x3da57f:0xcd,_0x35cdef:0x16f},_0x4ee61b=_0x224db2;this[_0x4ee61b(_0x411000._0x3da57f)](_0x4ee61b(_0x411000._0x35cdef),[_0x146a84,_0x4c5cbb]),this[_0x4ee61b(0x173)]();}async[_0x224db2(0x172)](_0x546af8,_0x4eea29,_0x1b7432){const _0xb22727={_0xa8136c:0xcd,_0x3c6cc9:0x173},_0x5ce45c=_0x224db2;this[_0x5ce45c(_0xb22727._0xa8136c)]('selectOption',[_0x546af8,_0x4eea29,_0x1b7432]),this[_0x5ce45c(_0xb22727._0x3c6cc9)]();}async[_0x224db2(0x184)](_0x95fb6a,_0x1dba85){const _0x2ef11e={_0x3257d0:0x184},_0x2bc922=_0x224db2;this[_0x2bc922(0xcd)](_0x2bc922(_0x2ef11e._0x3257d0),[_0x95fb6a,_0x1dba85]),this[_0x2bc922(0x173)]();}async[_0x224db2(0x165)](_0x20a15e){const _0xde8835=_0x224db2;this[_0xde8835(0xcd)](_0xde8835(0x165),[_0x20a15e]),this['maybeThrow']();}async[_0x224db2(0x131)](_0x242978,_0x12e150,_0x59aa95){const _0x431e0e=_0x224db2;this[_0x431e0e(0xcd)]('dragAndDrop',[_0x242978,_0x12e150,_0x59aa95]),this[_0x431e0e(0x173)]();}async[_0x224db2(0xfa)](_0x44bdf1,_0x3be87a){const _0x26942c={_0x57dd62:0xcd,_0x3230dc:0xfa},_0x1ee73c=_0x224db2;this[_0x1ee73c(_0x26942c._0x57dd62)](_0x1ee73c(_0x26942c._0x3230dc),[_0x44bdf1,_0x3be87a]),this[_0x1ee73c(0x173)]();}async[_0x224db2(0x19f)](_0x155fbe,_0x13181e){const _0xfa4678={_0x30b497:0x173},_0x5bee72=_0x224db2;this[_0x5bee72(0xcd)](_0x5bee72(0x19f),[_0x155fbe,_0x13181e]),this[_0x5bee72(_0xfa4678._0x30b497)]();}async['count'](_0x335fda){const _0x34f70a={_0x39de36:0x132},_0x5a8842=_0x224db2;return this[_0x5a8842(0xcd)](_0x5a8842(_0x34f70a._0x39de36),[_0x335fda]),this['behavior'][_0x5a8842(0x12f)]??0x1;}async[_0x224db2(0x17b)](_0x2141db){const _0x37bd9f={_0x2497f0:0x161},_0x115db5=_0x224db2;return this[_0x115db5(0xcd)]('textContent',[_0x2141db]),this[_0x115db5(_0x37bd9f._0x2497f0)][_0x115db5(0x130)]??'';}async[_0x224db2(0x10a)](_0xcbe08){const _0x1e7ea1={_0x419630:0x10a},_0x220e66=_0x224db2;return this[_0x220e66(0xcd)](_0x220e66(_0x1e7ea1._0x419630),[_0xcbe08]),this[_0x220e66(0x161)]['innerTextByDefault']??this['behavior']['textContentByDefault']??'';}async[_0x224db2(0x11f)](_0x5e0129){const _0x5ce161={_0x34b1b4:0xcd,_0x2f7a28:0x161,_0x4e2769:0x10c},_0x261faf=_0x224db2;return this[_0x261faf(_0x5ce161._0x34b1b4)](_0x261faf(0x11f),[_0x5e0129]),this[_0x261faf(_0x5ce161._0x2f7a28)][_0x261faf(_0x5ce161._0x4e2769)]??'';}async[_0x224db2(0x157)](_0xb3ba41){const _0x4fbece={_0xe22d7a:0x157},_0x2b4897=_0x224db2;return this['record'](_0x2b4897(_0x4fbece._0xe22d7a),[_0xb3ba41]),this['behavior']['checkedStateByDefault']??null;}async[_0x224db2(0xd9)](_0x198454){const _0x2876bd={_0x2f25c5:0xd3},_0x7b074f=_0x224db2;return this[_0x7b074f(0xcd)]('isVisible',[_0x198454]),this[_0x7b074f(0x161)][_0x7b074f(_0x2876bd._0x2f25c5)]??!![];}async[_0x224db2(0x105)](_0x256900){const _0x4d31f3={_0x320f01:0x18e,_0x50cf37:0x161},_0x55b40a=_0x224db2;return this['record'](_0x55b40a(0x105),[_0x256900]),this[_0x55b40a(0x161)][_0x55b40a(_0x4d31f3._0x320f01)]===void 0x0?{'x':0x0,'y':0x0,'width':0x64,'height':0x14}:this[_0x55b40a(_0x4d31f3._0x50cf37)][_0x55b40a(0x18e)];}async[_0x224db2(0xf3)](_0x198f1c){const _0x402b7b={_0x498978:0x161,_0xa0aded:0x12c},_0x2a6ccd=_0x224db2;return this['record'](_0x2a6ccd(0xf3),[_0x198f1c]),this[_0x2a6ccd(_0x402b7b._0x498978)][_0x2a6ccd(_0x402b7b._0xa0aded)]??![];}async[_0x224db2(0x134)](_0x503108,_0x5963b5){const _0x2a55a2={_0x396e07:0x109},_0x3362db=_0x224db2;return this[_0x3362db(0xcd)](_0x3362db(0x134),[_0x503108,_0x5963b5]),this[_0x3362db(0x161)][_0x3362db(_0x2a55a2._0x396e07)]?.[_0x5963b5]??null;}async[_0x224db2(0x16c)](_0x2835b9,_0x59eacf){const _0x2eba3e=_0x224db2;this[_0x2eba3e(0xcd)]('waitFor',[_0x2835b9,_0x59eacf]);}async[_0x224db2(0xc2)](_0x4d588d,_0x56f1d4){const _0xce5dec=_0x224db2;this['record'](_0xce5dec(0xc2),[_0x4d588d,_0x56f1d4]);}async[_0x224db2(0xc7)](_0x4861d1,_0x1c5f5e){const _0x38de04={_0x2ee78d:0xcd,_0x406c74:0xc7},_0x1b369a=_0x224db2;this[_0x1b369a(_0x38de04._0x2ee78d)](_0x1b369a(_0x38de04._0x406c74),[_0x4861d1,_0x1c5f5e]);}async[_0x224db2(0x169)](_0x360bfd){const _0x4135e4={_0x372462:0xcd,_0x2700f5:0x169},_0xc0d794=_0x224db2;this[_0xc0d794(_0x4135e4._0x372462)](_0xc0d794(_0x4135e4._0x2700f5),[_0x360bfd]);}async[_0x224db2(0x13c)](_0x34214d,_0xd39b36){const _0x19a6f1={_0x39b15a:0x13c},_0x405276=_0x224db2;this[_0x405276(0xcd)](_0x405276(_0x19a6f1._0x39b15a),[_0x34214d,_0xd39b36]);}async[_0x224db2(0xc3)](_0x2053a4,_0x4f39b1){const _0x4d6789={_0x1ecd6e:0xc3},_0x3b0550=_0x224db2;this[_0x3b0550(0xcd)](_0x3b0550(_0x4d6789._0x1ecd6e),[_0x2053a4,_0x4f39b1]),this[_0x3b0550(0x147)]=_0x2053a4;}async['reload'](_0x203c22){const _0x23d507=_0x224db2;this[_0x23d507(0xcd)](_0x23d507(0xf9),[_0x203c22]);}async['goBack'](_0x236a84){const _0x299aae={_0x10c85b:0xcd},_0x25455f=_0x224db2;this[_0x25455f(_0x299aae._0x10c85b)]('goBack',[_0x236a84]);}async[_0x224db2(0xcb)](_0x268a6c){const _0x17ff42=_0x224db2;this[_0x17ff42(0xcd)](_0x17ff42(0xcb),[_0x268a6c]);}async[_0x224db2(0x138)](_0x60563b){const _0x3ab8f1={_0xb4aa3c:0xcd,_0x72db5b:0x138,_0x569983:0x14d},_0x3ca3d6=_0x224db2;return this[_0x3ca3d6(_0x3ab8f1._0xb4aa3c)](_0x3ca3d6(_0x3ab8f1._0x72db5b),[_0x60563b]),this[_0x3ca3d6(0x161)][_0x3ca3d6(_0x3ab8f1._0x569983)];}async[_0x224db2(0x135)](_0x5767ef,_0x212b63,_0x15f415){const _0x5789a2={_0x3dfd69:0xcd},_0x3c2687=_0x224db2;return this[_0x3c2687(_0x5789a2._0x3dfd69)]('evaluateOnLocator',[_0x5767ef,_0x212b63,_0x15f415]),this[_0x3c2687(0x161)][_0x3c2687(0x14d)];}async[_0x224db2(0x11a)](_0x66ac67){const _0x519688={_0x45a0db:0x11a,_0x1bb8a0:0x111,_0x27c790:0x145,_0x52e49e:0x161},_0x41752c=_0x224db2;this['record'](_0x41752c(_0x519688._0x45a0db),[_0x66ac67]);if(_0x66ac67[_0x41752c(0xf0)][_0x41752c(_0x519688._0x1bb8a0)]!==0x1||_0x66ac67[_0x41752c(0xf0)][0x0][_0x41752c(0x116)]!=='ref')return null;const _0x8fa1b=_0x66ac67[_0x41752c(0xf0)][0x0][_0x41752c(_0x519688._0x27c790)],_0x365511=this[_0x41752c(_0x519688._0x52e49e)][_0x41752c(0x192)]?.[_0x8fa1b];return _0x365511??null;}async['screenshot'](_0x5cb397){const _0x2964e1={_0x3e2364:0xcd,_0x2e393d:0x180},_0x36bd01=_0x224db2;return this[_0x36bd01(_0x2964e1._0x3e2364)]('screenshot',[_0x5cb397]),this[_0x36bd01(_0x2964e1._0x2e393d)](_0x5cb397?.[_0x36bd01(0x141)]);}async[_0x224db2(0xd8)](_0x516ff4,_0x30688c){const _0x1fa4b5={_0x51dc48:0xcd},_0x39f8e9=_0x224db2;return this[_0x39f8e9(_0x1fa4b5._0x51dc48)]('screenshotElement',[_0x516ff4,_0x30688c]),this[_0x39f8e9(0x180)](_0x30688c?.[_0x39f8e9(0x141)]);}async[_0x224db2(0x12a)](_0x1a7017,_0x2966c5){const _0x57e041={_0x3a790b:0x12a,_0x3ab5fe:0x161,_0x3b6c6c:0x161},_0x2ee93c=_0x224db2;return this[_0x2ee93c(0xcd)](_0x2ee93c(_0x57e041._0x3a790b),[_0x1a7017,_0x2966c5]),this[_0x2ee93c(_0x57e041._0x3ab5fe)]['captureBoxes']?this[_0x2ee93c(_0x57e041._0x3b6c6c)]['captureBoxes'](_0x1a7017,_0x2966c5):[];}[_0x224db2(0x180)](_0x5cf3b5){const _0x155a58={_0x281f02:0x120,_0x1e4d39:0xfd},_0x53193f=_0x224db2,_0x20e6e9=this['behavior'][_0x53193f(0x180)];if(_0x20e6e9===void 0x0)return Buffer[_0x53193f(0x19d)](_0x53193f(_0x155a58._0x281f02));return typeof _0x20e6e9===_0x53193f(_0x155a58._0x1e4d39)?_0x20e6e9(_0x5cf3b5):_0x20e6e9;}async[_0x224db2(0xec)](_0x308d7c){const _0x2f9c90={_0x1174f4:0xcd,_0x9fb23b:0x161},_0x51ce88=_0x224db2;this[_0x51ce88(_0x2f9c90._0x1174f4)]('outerHTML',[_0x308d7c]);if(_0x308d7c['steps'][_0x51ce88(0x111)]===0x1&&_0x308d7c['steps'][0x0][_0x51ce88(0x116)]===_0x51ce88(0x145)){const _0x30aef4=_0x308d7c['steps'][0x0]['ref'];return this[_0x51ce88(_0x2f9c90._0x9fb23b)][_0x51ce88(0xde)]?.[_0x30aef4]??_0x51ce88(0x144)+_0x30aef4+_0x51ce88(0x121);}return'<div></div>';}},FakeContext=class{constructor(_0x52e26e,_0x484589,_0x345f07,_0x3da8cd=![]){const _0x3d95b4={_0x29f201:0x102,_0x12213d:0x188,_0x3850ea:0x153,_0x328403:0x19a,_0x2be613:0x187,_0x4b512c:0x10e,_0x5385fb:0x148,_0xa13106:0x17d},_0x335379={_0x3c8fef:0x14e},_0x36bc47=_0x224db2;this['recorder']=_0x52e26e,this['behavior']=_0x484589,this[_0x36bc47(_0x3d95b4._0x29f201)]=_0x345f07,this[_0x36bc47(_0x3d95b4._0x12213d)]=_0x3da8cd,this[_0x36bc47(0x176)]=![];const _0x2db733=new FakePage(_0x52e26e,_0x484589,_0x345f07+_0x36bc47(0xc9),_0x484589[_0x36bc47(_0x3d95b4._0x3850ea)]??_0x36bc47(0xdc));_0x484589[_0x36bc47(0xd1)]&&(_0x2db733['onAfterClick']=()=>{const _0x395cec=_0x36bc47;this[_0x395cec(_0x335379._0x3c8fef)](_0x484589[_0x395cec(0xd1)]);}),this[_0x36bc47(_0x3d95b4._0x328403)]=[_0x2db733],this[_0x36bc47(_0x3d95b4._0x2be613)]['add'](_0x2db733),this[_0x36bc47(_0x3d95b4._0x4b512c)]=[..._0x484589[_0x36bc47(0x117)]??[]],this[_0x36bc47(_0x3d95b4._0x5385fb)]={..._0x484589['localStorage']??{}},this['cookieState']={..._0x484589[_0x36bc47(_0x3d95b4._0xa13106)]??{}};}[_0x224db2(0x19b)];[_0x224db2(0x161)];[_0x224db2(0x102)];[_0x224db2(0x188)];static{__name(this,_0x224db2(0xf6));}[_0x224db2(0x176)];[_0x224db2(0x19a)];[_0x224db2(0x160)]=0x0;[_0x224db2(0x187)]=new WeakSet();[_0x224db2(0xe6)]=new PageHistory();['frameStack']=[];[_0x224db2(0x148)];[_0x224db2(0x175)];['newPageListeners']=new Set();[_0x224db2(0x19c)]=new RouteJournal();[_0x224db2(0xbe)]=new DownloadQueue(async()=>{});[_0x224db2(0x10e)];[_0x224db2(0x115)]=new Set();['record'](_0x30fcb5,_0x5851fe){const _0x4edc07={_0x29b646:0x102},_0x28a5db=_0x224db2;this['recorder'][_0x28a5db(0xfc)]({'scope':this[_0x28a5db(_0x4edc07._0x29b646)],'method':_0x30fcb5,'args':_0x5851fe});}['pages'](){const _0x2aca59=_0x224db2;return this[_0x2aca59(0x19a)];}[_0x224db2(0x14a)](){const _0x3711bb={_0x2b1c39:0x160},_0x583da5=_0x224db2,_0x71123a=this['pageList'][this[_0x583da5(_0x3711bb._0x2b1c39)]];if(!_0x71123a)throw new DriverError(_0x583da5(0x17a),{'activeIdx':this[_0x583da5(_0x3711bb._0x2b1c39)]});return _0x71123a;}[_0x224db2(0xf5)](){const _0x1011e9={_0x1ce6d1:0x161,_0x3e6a47:0xf5},_0x266e81=_0x224db2;return this[_0x266e81(_0x1011e9._0x1ce6d1)][_0x266e81(_0x1011e9._0x3e6a47)]??[];}[_0x224db2(0x10f)](_0x5aed70={}){const _0x27243d={_0x3189d1:0x10f,_0x274793:0xbe},_0x1fd47a=_0x224db2;return this['record'](_0x1fd47a(_0x27243d._0x3189d1),[_0x5aed70['timeoutMs']]),this[_0x1fd47a(_0x27243d._0x274793)]['take'](_0x5aed70[_0x1fd47a(0x17c)]??0x0,_0x5aed70['name']);}[_0x224db2(0xc0)](_0x516582,_0x573632){const _0x28e6e6=_0x224db2;this[_0x28e6e6(0xbe)][_0x28e6e6(0xfc)]({'name':_0x516582,'saveAs':__name(_0x9552b9=>writeFile(_0x9552b9,_0x573632),_0x28e6e6(0x168))});}[_0x224db2(0xc6)](){const _0x35a4c2=_0x224db2;return this['behavior'][_0x35a4c2(0xc6)]??[];}async[_0x224db2(0xd0)](_0xefc90,_0x282424){const _0x268b77={_0x4a978c:0xcd,_0x32b291:0xf1,_0x2276a3:0x19a,_0x5e084b:0x129,_0x4946cd:0x160,_0x576a94:0x19a},_0x59df91=_0x224db2;this[_0x59df91(_0x268b77._0x4a978c)]('setActivePage',[_0xefc90,_0x282424]);if(_0xefc90<0x0||_0xefc90>=this['pageList'][_0x59df91(0x111)])throw new DriverError(_0x59df91(_0x268b77._0x32b291),{'index':_0xefc90,'available':this[_0x59df91(_0x268b77._0x2276a3)]['length']});this[_0x59df91(0xe6)][_0x59df91(_0x268b77._0x5e084b)](this[_0x59df91(0x19a)],this['activeIdx'],this['pageList'][_0xefc90]),this[_0x59df91(_0x268b77._0x4946cd)]=_0xefc90,this[_0x59df91(0x179)][_0x59df91(0x111)]=0x0,this['handedPages'][_0x59df91(0x11b)](this[_0x59df91(_0x268b77._0x576a94)][_0xefc90]);if(_0x282424?.['activate']!==![])this[_0x59df91(0xcd)](_0x59df91(0x124),[_0xefc90]);}async['bringToFront'](_0x3641b7){const _0x20081b={_0x1e9fee:0x160,_0x1df71b:0xcd},_0x9637bb=_0x224db2,_0x12108f=_0x3641b7??this[_0x9637bb(_0x20081b._0x1e9fee)];if(_0x12108f<0x0||_0x12108f>=this[_0x9637bb(0x19a)][_0x9637bb(0x111)])throw new DriverError(_0x9637bb(0xf1),{'index':_0x12108f,'available':this[_0x9637bb(0x19a)][_0x9637bb(0x111)]});this[_0x9637bb(_0x20081b._0x1df71b)](_0x9637bb(0x124),[_0x12108f]);}async[_0x224db2(0xeb)](){const _0x29e7c0={_0x5d21f4:0xcd,_0x9d0d36:0xdc},_0x3c0107=_0x224db2;this[_0x3c0107(_0x29e7c0._0x5d21f4)]('newPage',[]);const _0x2613a8=this[_0x3c0107(0x14e)](_0x3c0107(_0x29e7c0._0x9d0d36));return await this[_0x3c0107(0xd0)](_0x2613a8),_0x2613a8;}async[_0x224db2(0x123)](_0x227f1e){const _0x195f11={_0x25a806:0x160,_0x572519:0x19a,_0x7aad16:0x111},_0x359cc=_0x224db2;this['record'](_0x359cc(0x123),[_0x227f1e]);const {closing:_0x4d0834,nextActive:_0x199625}=this['history'][_0x359cc(0xbf)](this['pageList'],this[_0x359cc(0x160)],_0x227f1e??this[_0x359cc(_0x195f11._0x25a806)]),_0x1198cd=_0x4d0834===this[_0x359cc(0x19a)][this['activeIdx']];this[_0x359cc(0x19a)]['splice'](this[_0x359cc(_0x195f11._0x572519)]['indexOf'](_0x4d0834),0x1),this[_0x359cc(0x160)]=_0x199625;if(!_0x1198cd)return;this['frameStack'][_0x359cc(_0x195f11._0x7aad16)]=0x0,this['record'](_0x359cc(0x124),[_0x199625]);}[_0x224db2(0x14f)](_0x2291ab){const _0xb5ce7a=_0x224db2;return subscribe(this[_0xb5ce7a(0x112)],_0x2291ab);}async[_0x224db2(0x143)](_0xe5aca0={}){const _0x23ea88={_0x4501fd:0xcd,_0x2c1b37:0x187},_0xaa6561=_0x224db2;return this[_0xaa6561(_0x23ea88._0x4501fd)]('waitForNewPage',[_0xe5aca0]),claimNewPage(this[_0xaa6561(0x19a)],this[_0xaa6561(_0x23ea88._0x2c1b37)],_0xe5aca0['timeoutMs']??0x0);}async[_0x224db2(0x158)](_0x1591e5){this['record']('setViewport',[_0x1591e5]);}async[_0x224db2(0x197)](){const _0x38f9cb=_0x224db2;return this[_0x38f9cb(0x102)];}[_0x224db2(0x1a5)](){const _0x4f8dbe={_0x3cb71f:0xcd,_0x2fc8ee:0xe5},_0x22a1b2=_0x224db2;if(!this['hasClock'])return NO_CLOCK;return{'freeze':__name(async _0x2ca6e3=>{const _0x3d6c7c=_0x4ba6;this[_0x3d6c7c(_0x4f8dbe._0x3cb71f)](_0x3d6c7c(_0x4f8dbe._0x2fc8ee),[_0x2ca6e3]),this[_0x3d6c7c(0x176)]=!![];},'freeze'),'tick':__name(async _0xa0cfc5=>this[_0x22a1b2(0xcd)]('clock.tick',[_0xa0cfc5]),'tick'),'run':__name(async()=>{this['record']('clock.run',[]),this['clockFrozen']=![];},_0x22a1b2(0x13f)),'frozen':__name(()=>this[_0x22a1b2(0x176)],'frozen')};}[_0x224db2(0xf8)](){const _0x5e824f={_0x49be44:0x18a,_0x31a15e:0xee},_0x4fdba8={_0x27d3eb:0x19c,_0x32c4b2:0x195,_0x551e66:0x17c},_0x2be967={_0x1ff5c5:0x1a4,_0x216aaf:0x12d},_0x3da4d6={_0x345ce4:0x140,_0x1488bd:0x19c,_0x3a59ba:0xcf},_0x5982a3=_0x224db2;return{'mock':__name(async(_0xa8df1a,_0x118031)=>{const _0x2ccf42=_0x4ba6;this['record'](_0x2ccf42(_0x3da4d6._0x345ce4),[_0xa8df1a,_0x118031]),this[_0x2ccf42(_0x3da4d6._0x1488bd)][_0x2ccf42(_0x3da4d6._0x3a59ba)](_0xa8df1a,_0x118031);},'mock'),'unmock':__name(async _0x191db3=>{const _0x18be46=_0x4ba6;this[_0x18be46(0xcd)](_0x18be46(_0x2be967._0x1ff5c5),[_0x191db3]),this[_0x18be46(0x19c)][_0x18be46(_0x2be967._0x216aaf)](_0x191db3);},_0x5982a3(_0x5e824f._0x49be44)),'waitForRequest':__name((_0x57bd9f,_0x4c3842)=>{const _0x3a6f23=_0x5982a3;return this[_0x3a6f23(0xcd)](_0x3a6f23(0x15f),[_0x57bd9f,_0x4c3842]),this[_0x3a6f23(_0x4fdba8._0x27d3eb)][_0x3a6f23(_0x4fdba8._0x32c4b2)](_0x57bd9f,_0x4c3842[_0x3a6f23(_0x4fdba8._0x551e66)]);},_0x5982a3(_0x5e824f._0x31a15e)),'blocked':__name(_0x3c7150=>this['routes'][_0x5982a3(0x137)](_0x3c7150),'blocked')};}async['waitForServiceWorker'](_0x38a059){const _0x2be34f={_0xa8181:0x154,_0x78a992:0x10e,_0x31c7d9:0xca,_0xaaa90e:0x161,_0x2e8457:0x13a},_0x480d92={_0xc59b20:0x115,_0x4c2f21:0x11b},_0x388610=_0x224db2;this[_0x388610(0xcd)](_0x388610(_0x2be34f._0xa8181),[_0x38a059]);const _0x568417=this[_0x388610(_0x2be34f._0x78a992)][_0x388610(0x15d)](_0x1544d0=>workerMatches(_0x1544d0,_0x38a059?.[_0x388610(0x104)]));if(_0x568417!==void 0x0)return this[_0x388610(_0x2be34f._0x31c7d9)](_0x568417);if(!this[_0x388610(_0x2be34f._0xaaa90e)][_0x388610(_0x2be34f._0x2e8457)])throw new ServiceWorkerNeedsProfileError();const _0x3e4d08=_0x38a059?.['timeoutMs']??0x3e8,_0x528760=await new Promise((_0x5beae5,_0x90731e)=>{const _0xbfbd7f={_0x2a43f5:0x115},_0x3ee6e2=_0x388610,_0x2be2c2=__name(_0x4ccf88=>{const _0x6c3866=_0x4ba6;if(!workerMatches(_0x4ccf88,_0x38a059?.[_0x6c3866(0x104)]))return;clearTimeout(_0x304d60),this[_0x6c3866(_0xbfbd7f._0x2a43f5)]['delete'](_0x2be2c2),_0x5beae5(_0x4ccf88);},'onStart'),_0x304d60=setTimeout(()=>{const _0x4ed0c2=_0x4ba6;this['workerStarted']['delete'](_0x2be2c2),_0x90731e(new ServiceWorkerWaitTimeoutError(_0x3e4d08,_0x38a059?.['url'],this[_0x4ed0c2(0x10e)]));},_0x3e4d08);this[_0x3ee6e2(_0x480d92._0xc59b20)][_0x3ee6e2(_0x480d92._0x4c2f21)](_0x2be2c2);});return this[_0x388610(_0x2be34f._0x31c7d9)](_0x528760);}['fakeWorker'](_0x58cd5d){return{'url':__name(()=>_0x58cd5d,'url'),'evaluate':__name(async(_0x32da54,_0x2d16b2)=>{const _0x503e6d=_0x4ba6;return this[_0x503e6d(0xcd)](_0x503e6d(0x18b),[_0x58cd5d,_0x32da54,_0x2d16b2]),this[_0x503e6d(0x161)][_0x503e6d(0x14d)];},'evaluate')};}[_0x224db2(0x18d)](_0x16b4d4){const _0xa994e1={_0x24b933:0xfc,_0x42135f:0x115},_0x287897=_0x224db2;this[_0x287897(0x10e)][_0x287897(_0xa994e1._0x24b933)](_0x16b4d4);for(const _0x56efe4 of[...this[_0x287897(_0xa994e1._0x42135f)]])_0x56efe4(_0x16b4d4);}[_0x224db2(0x16d)](_0x494e73,_0xf3446f){const _0x530ad0={_0xa6619b:0x19c},_0x4565af=_0x224db2,_0x8aed25=this[_0x4565af(0x19c)]['response'](_0x494e73);if(_0x8aed25?.['kind']==='abort'&&_0x8aed25['record'])this[_0x4565af(0x19c)][_0x4565af(0x14b)](_0x494e73,_0xf3446f);this[_0x4565af(_0x530ad0._0xa6619b)][_0x4565af(0xdf)](_0x494e73,_0xf3446f);}[_0x224db2(0x14e)](_0x4adfb1){const _0x2da3e6={_0x47e75e:0x111,_0x3245a0:0x161,_0x11935d:0x19a,_0x3063a8:0x112},_0x547947=_0x224db2,_0x40b081=this[_0x547947(0x102)]+_0x547947(0x177)+this['pageList'][_0x547947(_0x2da3e6._0x47e75e)],_0xd1b59d=new FakePage(this['recorder'],this[_0x547947(_0x2da3e6._0x3245a0)],_0x40b081,_0x4adfb1);this['pageList'][_0x547947(0xfc)](_0xd1b59d);const _0x13fd43=this[_0x547947(_0x2da3e6._0x11935d)][_0x547947(0x111)]-0x1;for(const _0x1fdefd of this[_0x547947(_0x2da3e6._0x3063a8)]){try{_0x1fdefd({'index':_0x13fd43,'url':_0x4adfb1});}catch{}}return _0x13fd43;}[_0x224db2(0x126)](_0x178917){const _0x2ed693=_0x224db2;if(_0x178917<0x0||_0x178917>=this[_0x2ed693(0x19a)]['length'])throw new DriverError(_0x2ed693(0xf1),{'index':_0x178917,'available':this['pageList']['length']});this[_0x2ed693(0x19a)]['splice'](_0x178917,0x1);}async[_0x224db2(0x1a1)](_0x3ef350){const _0x89bd04={_0x2007f9:0xcd,_0x334202:0x111,_0x24a58b:0xe2},_0x382aa5=_0x224db2;this[_0x382aa5(_0x89bd04._0x2007f9)](_0x382aa5(0x1a1),[_0x3ef350]);if(!_0x3ef350[_0x382aa5(0xf0)][_0x382aa5(_0x89bd04._0x334202)])throw new LocatorError(_0x382aa5(_0x89bd04._0x24a58b),{'locator':_0x3ef350});this[_0x382aa5(0x179)][_0x382aa5(0xfc)](_0x3ef350);}async[_0x224db2(0x167)](){const _0xfe4fed={_0xde351c:0x167,_0x25e85b:0x179,_0x1c454b:0x179,_0x2b2774:0x142},_0x5e20c1=_0x224db2;this['record'](_0x5e20c1(_0xfe4fed._0xde351c),[]);if(this[_0x5e20c1(_0xfe4fed._0x25e85b)]['length']===0x0)throw new DriverError(_0x5e20c1(0x16e),{});this[_0x5e20c1(_0xfe4fed._0x1c454b)][_0x5e20c1(_0xfe4fed._0x2b2774)]();}async[_0x224db2(0xc5)](_0x3d5b51,_0x348595){const _0x33454d=_0x224db2;this['record'](_0x33454d(0xc5),[_0x3d5b51,_0x348595]),this['localStorageState'][_0x3d5b51]=_0x348595;}async[_0x224db2(0xfb)](_0x366edf){const _0x1d87b7={_0x163ad9:0xfb,_0x5f1c95:0x148},_0x1d91c5=_0x224db2;return this['record'](_0x1d91c5(_0x1d87b7._0x163ad9),[_0x366edf]),this[_0x1d91c5(_0x1d87b7._0x5f1c95)][_0x366edf]??null;}async[_0x224db2(0xe7)](_0x418fc4,_0x197029,_0x3979c8){const _0x1adab9={_0x17b91f:0xcd,_0x1049a3:0xe7},_0x759ae=_0x224db2;this[_0x759ae(_0x1adab9._0x17b91f)](_0x759ae(_0x1adab9._0x1049a3),[_0x418fc4,_0x197029,_0x3979c8]),this['cookieState'][_0x418fc4]=_0x197029;}async[_0x224db2(0xd6)](_0x1466bc){const _0x14a7ab=_0x224db2;return this['record'](_0x14a7ab(0xd6),[_0x1466bc]),this[_0x14a7ab(0x175)][_0x1466bc]??null;}async[_0x224db2(0xe4)](_0x5ceedb){const _0x24223c=_0x224db2;this['record'](_0x24223c(0xe4),[_0x5ceedb]);}async[_0x224db2(0x138)](_0x30a57b){const _0x4493fb=_0x224db2;return this[_0x4493fb(0xcd)](_0x4493fb(0x138),[_0x30a57b]),void 0x0;}async[_0x224db2(0xff)](){const _0xc33ea3=_0x224db2;this[_0xc33ea3(0xcd)](_0xc33ea3(0xff),[]);}[_0x224db2(0x191)](){const _0x36b1a3=_0x224db2;return this[_0x36b1a3(0x179)][_0x36b1a3(0x111)];}},FakeWebDriver=class{constructor(_0x3c420c={}){const _0x4cda8e={_0x2c4ab3:0x161},_0x31f07c=_0x224db2;this[_0x31f07c(_0x4cda8e._0x2c4ab3)]=_0x3c420c,this['recorder']=createRecorder();}[_0x224db2(0x161)];static{__name(this,_0x224db2(0x166));}[_0x224db2(0x186)]=![];[_0x224db2(0x19b)];[_0x224db2(0x16a)]=[];async[_0x224db2(0x182)](_0x3878a1){const _0xd921ad={_0x5166b5:0x19b,_0x2eb3ee:0xfc,_0x56a537:0xf4,_0xa1196:0x186},_0x27ab41=_0x224db2;this[_0x27ab41(_0xd921ad._0x5166b5)][_0x27ab41(_0xd921ad._0x2eb3ee)]({'scope':_0x27ab41(_0xd921ad._0x56a537),'method':_0x27ab41(0x182),'args':[_0x3878a1]}),this[_0x27ab41(_0xd921ad._0xa1196)]=!![];}async[_0x224db2(0xda)](_0x392f02){const _0x44c2c3={_0x4a09a7:0x19b,_0xab8ccb:0xfc,_0x1f9600:0xf4,_0x15a2b3:0xda,_0x54ebb6:0x19b,_0x3e66c5:0x161,_0x26a76a:0x16a,_0x4ef416:0x1a5},_0x410eba=_0x224db2;this[_0x410eba(_0x44c2c3._0x4a09a7)][_0x410eba(_0x44c2c3._0xab8ccb)]({'scope':_0x410eba(_0x44c2c3._0x1f9600),'method':_0x410eba(_0x44c2c3._0x15a2b3),'args':[_0x392f02]});if(!this[_0x410eba(0x186)])throw new DriverError('newContext\x20called\x20before\x20launch()',{});const _0xc018d=new FakeContext(this[_0x410eba(_0x44c2c3._0x54ebb6)],this[_0x410eba(_0x44c2c3._0x3e66c5)],_0x410eba(0x150)+this[_0x410eba(_0x44c2c3._0x26a76a)]['length'],_0x392f02?.[_0x410eba(_0x44c2c3._0x4ef416)]===!![]);return this[_0x410eba(0x16a)][_0x410eba(_0x44c2c3._0xab8ccb)](_0xc018d),_0xc018d;}async[_0x224db2(0xff)](){const _0x934758={_0x583cd8:0x19b,_0x27b2f5:0xfc,_0x2a8997:0xf4},_0x5e0089=_0x224db2;this[_0x5e0089(_0x934758._0x583cd8)][_0x5e0089(_0x934758._0x27b2f5)]({'scope':_0x5e0089(_0x934758._0x2a8997),'method':'close','args':[]}),this[_0x5e0089(0x186)]=![];}['wsEndpoint'](){return void 0x0;}async[_0x224db2(0xf2)](){const _0xe5573f={_0x1da49f:0x136},_0x156cf2=_0x224db2;throw new DriverError(_0x156cf2(_0xe5573f._0x1da49f),{});}async['attachExisting'](_0x7c0114){const _0x1c37bf={_0x1e04a6:0x171},_0x47c6c8=_0x224db2;throw new DriverError(_0x47c6c8(_0x1c37bf._0x1e04a6),{});}[_0x224db2(0x181)](){const _0x3fc12b=_0x224db2;return this[_0x3fc12b(0x19b)][_0x3fc12b(0x181)]();}['callsFor'](_0x493a38){const _0x4d1e31=_0x224db2;return this['recorder'][_0x4d1e31(0x181)]()[_0x4d1e31(0x12e)](_0x10ee1e=>_0x10ee1e[_0x4d1e31(0x103)]===_0x493a38);}};export{FakeWebDriver};
@@ -1,6 +1,6 @@
1
- import { j as LocatorValue, W as WebDriver, D as DriverContext, e as DriverPage } from '../interfaces-ClW2IRgY.js';
2
- export { k as LocatorStep, l as appendStep, m as describeLocator, n as isLocatorValue, r as rootedAt } from '../interfaces-ClW2IRgY.js';
3
- import { Matcher, RegexLiteral, JudgeRequest, JudgeVerdict, SoftFailureRecord } from '@unotest/protocol';
1
+ import { L as LocatorValue, n as DriverDownload, D as DriverContext, W as WebDriver, h as DriverPage } from '../interfaces-OvnJKELk.js';
2
+ export { o as LocatorStep, p as appendStep, q as describeLocator, r as isLocatorValue, s as rootedAt } from '../interfaces-OvnJKELk.js';
3
+ import { Matcher, RegexLiteral, JudgeRequest, JudgeVerdict, VisualFailureRecord, SoftFailureRecord, TeardownStateRecord, TeardownFailureRecord } from '@unotest/protocol';
4
4
  import { ExecutionWalker, ExecutionEvent, RunResult, RunOptions } from '@unotest/dsl/executor';
5
5
  export { ExecutionError, ExecutionEvent, RunOptions, RunResult } from '@unotest/dsl/executor';
6
6
  import { SandboxConfig } from '../config/schema.js';
@@ -168,6 +168,131 @@ interface AnnotationSink {
168
168
  log(text: string): Promise<void>;
169
169
  }
170
170
 
171
+ declare class BaselineNames {
172
+ private readonly warn;
173
+ /** scenario → file-safe name → the name the scenario wrote, and the
174
+ * attempts it was asserted in. */
175
+ private readonly given;
176
+ /** `warn` hears of a baseline written twice in one attempt. */
177
+ constructor(warn?: (line: string) => void);
178
+ /** Refuses `raw` when another name of the same scenario already became
179
+ * `file`. The same name twice in one attempt of update mode writes the
180
+ * same file twice — said, since only the last picture stays. */
181
+ claim(scenarioFile: string, file: string, raw: string, attempt: number, updating: boolean): void;
182
+ }
183
+
184
+ interface BaselineStore {
185
+ /** Update mode: a snapshot is written as the new baseline and passes. */
186
+ readonly updating: boolean;
187
+ /** Project-relative posix path of the baseline `name` of a scenario. */
188
+ pathFor(scenarioFile: string, name: string): string;
189
+ /** The baseline's bytes, or null when there is none yet. */
190
+ read(scenarioFile: string, name: string): Promise<Uint8Array | null>;
191
+ /** Write `png` as the baseline; returns its project path. */
192
+ write(scenarioFile: string, name: string, png: Uint8Array): Promise<string>;
193
+ }
194
+
195
+ interface Rect {
196
+ x: number;
197
+ y: number;
198
+ width: number;
199
+ height: number;
200
+ }
201
+
202
+ interface ImageSize {
203
+ width: number;
204
+ height: number;
205
+ }
206
+ interface VisualCheckInput {
207
+ expectedPng: Uint8Array;
208
+ /** Names the baseline in a refusal (its project path). */
209
+ expectedSource: string;
210
+ actualPng: Uint8Array;
211
+ threshold: number;
212
+ excluded: readonly Rect[];
213
+ }
214
+ type VisualCheck = {
215
+ kind: "size-mismatch";
216
+ expected: ImageSize;
217
+ actual: ImageSize;
218
+ } | {
219
+ kind: "compared";
220
+ size: ImageSize;
221
+ differing: number;
222
+ compared: number;
223
+ ratio: number;
224
+ /** The diff picture, PNG. */
225
+ diffPng: Uint8Array;
226
+ };
227
+ interface ImageComparator {
228
+ compare(input: VisualCheckInput): VisualCheck;
229
+ }
230
+
231
+ type VisualOutcome = "passed" | "failed" | "updated" | "missing-baseline" | "size-mismatch"
232
+ /** The baseline is there but not a PNG this runner will read. */
233
+ | "unreadable-baseline";
234
+ interface VisualImages {
235
+ expected?: Uint8Array;
236
+ actual?: Uint8Array;
237
+ diff?: Uint8Array;
238
+ /** The snapshot as a baseline would be — named as the assert expects it. */
239
+ candidate?: Uint8Array;
240
+ }
241
+ /** Artifact-root-relative paths of the pictures written for one assert. */
242
+ interface VisualPaths {
243
+ expected?: string;
244
+ actual?: string;
245
+ diff?: string;
246
+ candidate?: string;
247
+ }
248
+ interface VisualAssertReport {
249
+ name: string;
250
+ outcome: VisualOutcome;
251
+ /** Project-relative path of the baseline this assert reads. */
252
+ baseline: string;
253
+ maxDiffRatio: number;
254
+ threshold: number;
255
+ ratio?: number;
256
+ differing?: number;
257
+ compared?: number;
258
+ /** Size of the snapshot. */
259
+ width?: number;
260
+ height?: number;
261
+ /** Size of the baseline, when it differs from the snapshot's. */
262
+ expectedWidth?: number;
263
+ expectedHeight?: number;
264
+ paths: VisualPaths;
265
+ /** Retry attempt the assert ran in, 1-based. */
266
+ attempt: number;
267
+ /** Browser context the snapshot was taken in, when the test holds more
268
+ * than one (#197). */
269
+ contextIndex?: number;
270
+ }
271
+ interface VisualSink {
272
+ /** Write the pictures of one assert under its attempt — a later attempt
273
+ * never overwrites an earlier one. Best-effort: a picture that cannot be
274
+ * written is left out of the returned paths, never thrown. */
275
+ save(name: string, attempt: number, images: VisualImages): Promise<VisualPaths>;
276
+ /** Journal the verdict — pass AND fail. Must not throw on sink faults. */
277
+ record(report: VisualAssertReport): Promise<void>;
278
+ /** The last assert that did not pass, for the failure bundle and
279
+ * runtime.json; null while every one passed. */
280
+ failure(): VisualFailureRecord | null;
281
+ }
282
+
283
+ /** What the assert needs besides the page — wired per run entry. */
284
+ interface VisualAssertDeps {
285
+ comparator: ImageComparator;
286
+ baselines: BaselineStore;
287
+ sink?: VisualSink;
288
+ /** Project-relative posix path of the scenario; the baseline lives next to it. */
289
+ scenarioFile: string;
290
+ /** Retry attempt, 1-based. */
291
+ attempt: number;
292
+ /** The names this run has given, to refuse two that became one file. */
293
+ names: BaselineNames;
294
+ }
295
+
171
296
  type FrameFormat = "png" | "webp";
172
297
 
173
298
  interface ScreenshotSink {
@@ -178,16 +303,74 @@ interface ScreenshotSink {
178
303
  save(name: string, bytes: Buffer, format: FrameFormat): Promise<string>;
179
304
  }
180
305
 
306
+ interface SavedDownload {
307
+ /** Absolute path of the saved file. */
308
+ path: string;
309
+ /** Size in bytes. */
310
+ bytes: number;
311
+ }
312
+ interface DownloadSink {
313
+ /** The directory saved files land in. A scenario may read them back
314
+ * from here by the absolute path `save` reported (readFile). */
315
+ readonly dir: string;
316
+ save(download: DriverDownload): Promise<SavedDownload>;
317
+ }
318
+
319
+ type ContextFactory = () => Promise<DriverContext>;
320
+ /** A context that did not close — reported, never swallowed. */
321
+ interface ContextCloseFailure {
322
+ index: number;
323
+ error: unknown;
324
+ }
325
+ declare class ContextSet {
326
+ private readonly opts;
327
+ private readonly list;
328
+ private activeIdx;
329
+ /** Called with the new active index on every switch (open or select). */
330
+ private readonly listeners;
331
+ constructor(first: DriverContext, opts?: {
332
+ open?: ContextFactory;
333
+ max?: number;
334
+ });
335
+ active(): DriverContext;
336
+ activeIndex(): number;
337
+ size(): number;
338
+ all(): readonly DriverContext[];
339
+ /** Open one more context, make it active, return its index. */
340
+ open(): Promise<number>;
341
+ select(index: unknown): void;
342
+ onSwitch(listener: (index: number) => void): () => void;
343
+ /** Close every context, newest first; the failures come back. */
344
+ closeAll(): Promise<ContextCloseFailure[]>;
345
+ private switchTo;
346
+ }
347
+
181
348
  type DslPrimitive = string | number | boolean | null;
182
349
  type DslObject = {
183
350
  readonly [key: string]: DslValue;
184
351
  };
185
352
  type DslArray = readonly DslValue[];
186
353
  type DslValue = DslPrimitive | DslObject | DslArray;
187
- interface TestRuntimeDeps {
354
+ /** The browser contexts a runtime acts in: its own set, started from the
355
+ * context the runner opened — or one it SHARES with its host (a flow
356
+ * replayed in an MCP session switches the session's contexts). */
357
+ type RuntimeContexts = {
358
+ /** Context 0 — the one the runner opened for this entry. */
359
+ readonly context: DriverContext;
360
+ /** Opens one more context with the entry's options (`newContext()`).
361
+ * Absent → the runtime cannot add one (an attached debug session). */
362
+ readonly openContext?: ContextFactory;
363
+ /** Ceiling on contexts per entry (`config.maxContexts`). */
364
+ readonly maxContexts?: number;
365
+ readonly contexts?: undefined;
366
+ } | {
367
+ readonly contexts: ContextSet;
368
+ readonly context?: undefined;
369
+ };
370
+ type TestRuntimeDeps = RuntimeContexts & TestRuntimeServices;
371
+ interface TestRuntimeServices {
188
372
  readonly runId: string;
189
373
  readonly driver: WebDriver;
190
- readonly context: DriverContext;
191
374
  readonly logger: Logger;
192
375
  /** Sandbox connection / base-URL config (D-27). DSL primitives `shell`,
193
376
  * `dbQuery`/`dbExec`, `apiCall` read these — scenarios can NOT pass a
@@ -206,6 +389,10 @@ interface TestRuntimeDeps {
206
389
  * to the run dir; absent in ad-hoc / explore runtimes (the DSL
207
390
  * function then logs and skips). */
208
391
  readonly screenshots?: ScreenshotSink;
392
+ /** Where `waitForDownload()` saves files. Wired by the CLI runner to the
393
+ * run dir (and journal); absent → the user cache, so explore and bare
394
+ * runtimes still hand the scenario a readable path. */
395
+ readonly downloads?: DownloadSink;
209
396
  /** LLM-judge behind `assertJudge`. Wired from the composition root
210
397
  * (UNOTEST_JUDGE_MODE); absent in bare test runtimes — the DSL
211
398
  * function then fails with the NullJudge-style setup message. */
@@ -218,23 +405,37 @@ interface TestRuntimeDeps {
218
405
  * it to the run's steps.jsonl; absent in ad-hoc / explore runtimes
219
406
  * (`log` still reaches the logger, `note` is logged in its place). */
220
407
  readonly annotations?: AnnotationSink;
408
+ /** Baselines, comparator and sink behind `assertScreenshot` — wired per
409
+ * run entry by the runner; absent in ad-hoc / explore runtimes, where
410
+ * the DSL function fails with a setup message. */
411
+ readonly visual?: VisualAssertDeps;
221
412
  }
222
413
  declare class TestRuntime {
223
414
  readonly runId: string;
224
415
  readonly driver: WebDriver;
225
- readonly context: DriverContext;
416
+ /** Every browser context of this entry and which one is active. */
417
+ readonly contexts: ContextSet;
226
418
  readonly logger: Logger;
227
419
  readonly sandbox: SandboxConfig;
228
420
  readonly baseUrl?: string;
229
421
  readonly screenshots?: ScreenshotSink;
422
+ readonly downloads: DownloadSink;
230
423
  readonly judge?: Judge;
231
424
  readonly judgeVerdicts?: JudgeVerdictSink;
232
425
  readonly annotations?: AnnotationSink;
426
+ readonly visual?: VisualAssertDeps;
233
427
  private readonly variables;
234
428
  private readonly nowFn;
235
429
  private readonly scope;
236
430
  private _callDepth;
237
431
  constructor(deps: TestRuntimeDeps);
432
+ /** The ACTIVE context — what every DSL function acts on. `setContext`
433
+ * and `newContext` move it; one-context scenarios never notice. */
434
+ get context(): DriverContext;
435
+ /** The active context's index once the test holds more than one — the
436
+ * journal, the failure bundle and `assertScreenshot` carry it only then
437
+ * (#197), so a one-context run writes exactly what it did before. */
438
+ reportedContextIndex(): number | undefined;
238
439
  /** Current epoch ms — injectable for deterministic tests. */
239
440
  now(): number;
240
441
  /** The active DriverPage. Tracks DriverContext.activePage which is mutated
@@ -352,6 +553,20 @@ interface ActiveRuntime {
352
553
  ttlTimer: NodeJS.Timeout | null;
353
554
  /** The runtime's own last-rites hook — see `register`. */
354
555
  onAbort?: () => Promise<void>;
556
+ /** The run's rollback pass, read for the snapshot — see `register`. */
557
+ teardown?: TeardownProgress;
558
+ }
559
+ /** What the manager reads off a run's rollback pass: the pass itself is
560
+ * driven by the runner (it plays it from the run's end and from
561
+ * `onAbort`), the manager only reports it. */
562
+ interface TeardownProgress {
563
+ status(): TeardownStateRecord | undefined;
564
+ failureRecords(): TeardownFailureRecord[];
565
+ /** Drop what has not been played; the labels dropped, newest first. */
566
+ skip(): string[];
567
+ /** Blocks are registered and the pass has not begun: the run is not over
568
+ * until the stand is given back. */
569
+ owed(): boolean;
355
570
  }
356
571
  interface RuntimeSummary {
357
572
  id: string;
@@ -372,6 +587,10 @@ interface RuntimeSnapshot {
372
587
  lastFailure: ActiveRuntime['lastFailure'];
373
588
  softFailures: readonly SoftFailureRecord[];
374
589
  lastResult: RunResult | null;
590
+ /** The rollback pass, once it has begun. */
591
+ teardown?: TeardownStateRecord;
592
+ /** Rollback blocks that failed or never ran. */
593
+ teardownFailures?: readonly TeardownFailureRecord[];
375
594
  }
376
595
  interface TestRuntimeManagerDeps {
377
596
  logger: Logger;
@@ -391,6 +610,13 @@ declare class TestRuntimeManager {
391
610
  * `aborted`. Bounded — only the last few matter (a writer flushes once). */
392
611
  private readonly terminalTombstones;
393
612
  private static readonly MAX_TOMBSTONES;
613
+ /** Aborts in flight. A second `abort` while the first one is still
614
+ * rolling the stand back gets the same promise — it must not run the
615
+ * generator's return, the last rites and the hooks a second time over a
616
+ * runtime that is half torn down. Giving up on the rollback is the
617
+ * caller's decision (a second Stop), not a side effect of calling
618
+ * abort twice. */
619
+ private readonly aborting;
394
620
  private nextId;
395
621
  constructor(deps: TestRuntimeManagerDeps);
396
622
  register(opts: {
@@ -406,6 +632,9 @@ declare class TestRuntimeManager {
406
632
  * anything the run still owes the disk has to be settled here (#194
407
633
  * tail). */
408
634
  onAbort?: () => Promise<void>;
635
+ /** The run's rollback pass, reported in `inspect()` (and so in
636
+ * runtime.json) while it plays. */
637
+ teardown?: TeardownProgress;
409
638
  }): string;
410
639
  pump(id: string): Promise<ExecutionEvent | RunResult>;
411
640
  /** The run's verdict — the executor's own, corrected for the one thing
@@ -418,9 +647,15 @@ declare class TestRuntimeManager {
418
647
  * going past it — web never sets it, and if it ever does, the retry's
419
648
  * own `step-end` decides and this correction has to be revisited.) */
420
649
  private verdict;
650
+ /** The run's final verdict, rollback included — see `pump`. */
651
+ finish(id: string, result: RunResult): void;
421
652
  step(id: string): Promise<ExecutionEvent | RunResult>;
422
653
  resume(id: string): Promise<ExecutionEvent | RunResult>;
423
654
  abort(id: string): Promise<void>;
655
+ private abortOnce;
656
+ /** The second Stop: give up on the rest of the run's rollback pass. The
657
+ * labels never played, newest first; empty when nothing was left. */
658
+ skipTeardown(id: string): string[];
424
659
  /** Snapshot a just-aborted (still-live) runtime into the tombstone map so a
425
660
  * later inspect() reflects `aborted`. Bounded LRU; best-effort. */
426
661
  private rememberTombstone;