@fkn/lib 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{background-BKX-_a5c.js → background-DkW0j6iK.js} +2 -2
- package/{background-CJX0MYvT.cjs → background-Y_zGUlba.cjs} +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +973 -788
- package/index.js +98 -103
- package/locator-CcAGamNm.cjs +31 -0
- package/{locator-BcexQUF6.js → locator-DpMUq6q3.js} +4 -4
- package/package.json +2 -6
- package/locator-i9-DjgYk.cjs +0 -31
package/index.js
CHANGED
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
import { a as e, c as t, h as n, i as r, l as i, o as a, r as o, s, t as c, u as l } from "./locator-
|
|
1
|
+
import { a as e, c as t, h as n, i as r, l as i, o as a, r as o, s, t as c, u as l } from "./locator-DpMUq6q3.js";
|
|
2
2
|
import { createTypedEventTarget as u, expose as d } from "osra";
|
|
3
3
|
import { Stream as f } from "stream";
|
|
4
4
|
import { EventEmitter as p } from "events";
|
|
5
5
|
import { Address4 as m, Address6 as h } from "ip-address";
|
|
6
|
-
import "
|
|
7
|
-
import "buffer";
|
|
6
|
+
import { Buffer as g } from "buffer";
|
|
8
7
|
//#region src/lib/dom.ts
|
|
9
|
-
var
|
|
10
|
-
!
|
|
11
|
-
var
|
|
12
|
-
if (!
|
|
8
|
+
var _ = "https://fkn.app", v = globalThis?.document.querySelector(`iframe[src="${_}/api"]`), y = globalThis.document?.createElement("iframe");
|
|
9
|
+
!v && y && (y.src = `${_}/api`, y.style.display = "none", document.body.appendChild(y));
|
|
10
|
+
var b = v || y, x = b.contentWindow;
|
|
11
|
+
if (!b.contentWindow) throw Error("Missing iframe content window");
|
|
13
12
|
//#endregion
|
|
14
13
|
//#region src/lib/api.ts
|
|
15
|
-
var
|
|
16
|
-
let r = new AbortController()
|
|
14
|
+
var S = (e) => new Promise((t, n) => {
|
|
15
|
+
let r = new AbortController(), i = setTimeout(() => {
|
|
16
|
+
r.abort(), n(/* @__PURE__ */ Error("Timeout waiting for api to be exposed"));
|
|
17
|
+
}, e);
|
|
17
18
|
d({}, {
|
|
18
19
|
key: "fkn-api",
|
|
19
20
|
unregisterSignal: r.signal,
|
|
20
21
|
transport: {
|
|
21
22
|
receive: window,
|
|
22
|
-
emit:
|
|
23
|
+
emit: x
|
|
23
24
|
}
|
|
24
|
-
}).then(
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
}).then((e) => {
|
|
26
|
+
clearTimeout(i), t(e);
|
|
27
|
+
}).catch((e) => {
|
|
28
|
+
clearTimeout(i), n(e);
|
|
29
|
+
});
|
|
30
|
+
}), C = (e = 50) => S(e).then((e) => e).catch((t) => {
|
|
31
|
+
if (t.message === "Timeout waiting for api to be exposed") return C(Math.min(e * 2, 500));
|
|
29
32
|
throw t;
|
|
30
|
-
}),
|
|
33
|
+
}), w = C(), T = (e, t) => w.then((n) => n.proxyFetch(e, t)), E = new TextEncoder();
|
|
31
34
|
new TextDecoder();
|
|
32
|
-
var
|
|
35
|
+
var D = (e) => m.isValid(e), O = (e) => h.isValid(e), k = (e) => D(e) ? 4 : O(e) ? 6 : 0, A = (...e) => {
|
|
33
36
|
if (typeof e[0] == "string") throw Error("FKN WebVPN does not support IPC connections");
|
|
34
37
|
let t = typeof e.at(-1) == "function" ? e.at(-1) : void 0;
|
|
35
38
|
return e[0] && typeof e[0] == "object" ? {
|
|
@@ -37,11 +40,11 @@ var E = (e) => m.isValid(e), D = (e) => h.isValid(e), O = (e) => E(e) ? 4 : D(e)
|
|
|
37
40
|
callback: t
|
|
38
41
|
} : {
|
|
39
42
|
port: e[0] ?? 0,
|
|
40
|
-
host: typeof e[1] == "string" ? e[1] :
|
|
43
|
+
host: typeof e[1] == "string" ? e[1] : void 0,
|
|
41
44
|
callback: t
|
|
42
45
|
};
|
|
43
|
-
},
|
|
44
|
-
let t = typeof e.at(-1) == "function" ? e.at(-1) : void 0, n = e[0] ?? 0, r = typeof e[1] == "string" ? e[1] :
|
|
46
|
+
}, j = (...e) => {
|
|
47
|
+
let t = typeof e.at(-1) == "function" ? e.at(-1) : void 0, n = e[0] ?? 0, r = typeof e[1] == "string" ? e[1] : void 0;
|
|
45
48
|
return typeof e[0] == "object" ? {
|
|
46
49
|
...e[0],
|
|
47
50
|
address: e[0].address ?? r,
|
|
@@ -52,18 +55,18 @@ var E = (e) => m.isValid(e), D = (e) => h.isValid(e), O = (e) => E(e) ? 4 : D(e)
|
|
|
52
55
|
port: n,
|
|
53
56
|
callback: t
|
|
54
57
|
};
|
|
55
|
-
},
|
|
58
|
+
}, M = (...e) => {
|
|
56
59
|
let t = typeof e.at(-1) == "function" ? e.at(-1) : void 0, n = e[0];
|
|
57
60
|
if (typeof e[2] == "number") return {
|
|
58
61
|
message: n,
|
|
59
62
|
offset: e[1],
|
|
60
63
|
length: e[2],
|
|
61
64
|
port: typeof e[3] == "number" ? e[3] : 0,
|
|
62
|
-
address: typeof e[4] == "string" ? e[4] :
|
|
65
|
+
address: typeof e[4] == "string" ? e[4] : void 0,
|
|
63
66
|
callback: t
|
|
64
67
|
};
|
|
65
68
|
{
|
|
66
|
-
let r = typeof e[1] == "number" ? e[1] : 0, i = typeof e[2] == "string" ? e[2] :
|
|
69
|
+
let r = typeof e[1] == "number" ? e[1] : 0, i = typeof e[2] == "string" ? e[2] : void 0;
|
|
67
70
|
return {
|
|
68
71
|
message: n,
|
|
69
72
|
offset: 0,
|
|
@@ -74,27 +77,21 @@ var E = (e) => m.isValid(e), D = (e) => h.isValid(e), O = (e) => E(e) ? 4 : D(e)
|
|
|
74
77
|
};
|
|
75
78
|
}
|
|
76
79
|
};
|
|
77
|
-
new TextEncoder(), new TextDecoder()
|
|
78
|
-
let t = 0;
|
|
79
|
-
return () => {
|
|
80
|
-
let n = t;
|
|
81
|
-
return t = (t + 1) % e, n;
|
|
82
|
-
};
|
|
83
|
-
})(65536);
|
|
80
|
+
new TextEncoder(), new TextDecoder();
|
|
84
81
|
//#endregion
|
|
85
82
|
//#region src/lib/webvpn/net.ts
|
|
86
|
-
var
|
|
87
|
-
Server: () =>
|
|
88
|
-
Socket: () =>
|
|
89
|
-
_default: () =>
|
|
90
|
-
connect: () =>
|
|
91
|
-
createConnection: () =>
|
|
92
|
-
createServer: () =>
|
|
93
|
-
default: () =>
|
|
94
|
-
isIP: () =>
|
|
95
|
-
isIPv4: () =>
|
|
96
|
-
isIPv6: () =>
|
|
97
|
-
}),
|
|
83
|
+
var N = /* @__PURE__ */ n({
|
|
84
|
+
Server: () => F,
|
|
85
|
+
Socket: () => P,
|
|
86
|
+
_default: () => z,
|
|
87
|
+
connect: () => I,
|
|
88
|
+
createConnection: () => L,
|
|
89
|
+
createServer: () => R,
|
|
90
|
+
default: () => z,
|
|
91
|
+
isIP: () => k,
|
|
92
|
+
isIPv4: () => D,
|
|
93
|
+
isIPv6: () => O
|
|
94
|
+
}), P = class extends f.Duplex {
|
|
98
95
|
_localAddress;
|
|
99
96
|
_remoteAddress;
|
|
100
97
|
_webVPNTcpSocketPromise;
|
|
@@ -151,8 +148,8 @@ var M = /* @__PURE__ */ n({
|
|
|
151
148
|
}).catch(n);
|
|
152
149
|
}
|
|
153
150
|
connect(...e) {
|
|
154
|
-
let t =
|
|
155
|
-
remoteAddress: t.host,
|
|
151
|
+
let t = A(...e), n = this.__webvpn_tcp_socket_init__(w.then((e) => e.webVpnTcpSocket({
|
|
152
|
+
remoteAddress: t.host ?? "localhost",
|
|
156
153
|
remotePort: t.port
|
|
157
154
|
})));
|
|
158
155
|
return t.callback && n.then((e) => {
|
|
@@ -271,7 +268,7 @@ var M = /* @__PURE__ */ n({
|
|
|
271
268
|
return this._remoteAddress.family;
|
|
272
269
|
}
|
|
273
270
|
timeout;
|
|
274
|
-
},
|
|
271
|
+
}, F = class extends p {
|
|
275
272
|
_localAddress;
|
|
276
273
|
_webVPNTcpSocketListenerPromise;
|
|
277
274
|
constructor(e, t) {
|
|
@@ -289,11 +286,11 @@ var M = /* @__PURE__ */ n({
|
|
|
289
286
|
}), this._webVPNTcpSocketListenerPromise;
|
|
290
287
|
}
|
|
291
288
|
listen(...e) {
|
|
292
|
-
let t =
|
|
293
|
-
localAddress: t.host,
|
|
289
|
+
let t = A(...e), n = this.__webvpn_tcp_socket_listener_init__(w.then((e) => e.webVpnTcpSocketListener({
|
|
290
|
+
localAddress: t.host ?? "::",
|
|
294
291
|
localPort: t.port,
|
|
295
292
|
onConnection: (e) => {
|
|
296
|
-
let t = new
|
|
293
|
+
let t = new P({ connection: Promise.resolve(e) });
|
|
297
294
|
this.emit("connection", t);
|
|
298
295
|
}
|
|
299
296
|
})));
|
|
@@ -326,22 +323,22 @@ var M = /* @__PURE__ */ n({
|
|
|
326
323
|
connections;
|
|
327
324
|
listening;
|
|
328
325
|
async [Symbol.asyncDispose]() {}
|
|
329
|
-
},
|
|
330
|
-
let n = new
|
|
326
|
+
}, I = (e, t) => new P().connect(e, t), L = (e, t) => new P().connect(e, t), R = (e, t) => {
|
|
327
|
+
let n = new F(e);
|
|
331
328
|
return t && n.on("connection", t), n;
|
|
332
|
-
},
|
|
333
|
-
Socket:
|
|
334
|
-
Server:
|
|
335
|
-
connect:
|
|
336
|
-
createConnection:
|
|
337
|
-
createServer:
|
|
338
|
-
isIP:
|
|
339
|
-
isIPv4:
|
|
340
|
-
isIPv6:
|
|
341
|
-
},
|
|
342
|
-
Socket: () =>
|
|
343
|
-
createSocket: () =>
|
|
344
|
-
}),
|
|
329
|
+
}, z = {
|
|
330
|
+
Socket: P,
|
|
331
|
+
Server: F,
|
|
332
|
+
connect: I,
|
|
333
|
+
createConnection: L,
|
|
334
|
+
createServer: R,
|
|
335
|
+
isIP: k,
|
|
336
|
+
isIPv4: D,
|
|
337
|
+
isIPv6: O
|
|
338
|
+
}, B = /* @__PURE__ */ n({
|
|
339
|
+
Socket: () => V,
|
|
340
|
+
createSocket: () => W
|
|
341
|
+
}), V = class extends p {
|
|
345
342
|
_type;
|
|
346
343
|
_localAddress;
|
|
347
344
|
_remoteAddress;
|
|
@@ -370,7 +367,7 @@ var M = /* @__PURE__ */ n({
|
|
|
370
367
|
}
|
|
371
368
|
addMembership(e, t) {
|
|
372
369
|
if (m.isValid(e)) {
|
|
373
|
-
let n =
|
|
370
|
+
let n = H(e), r = t && m.isValid(t) ? H(t) : new Uint8Array([
|
|
374
371
|
0,
|
|
375
372
|
0,
|
|
376
373
|
0,
|
|
@@ -382,7 +379,7 @@ var M = /* @__PURE__ */ n({
|
|
|
382
379
|
interface: r
|
|
383
380
|
});
|
|
384
381
|
} else if (h.isValid(e)) {
|
|
385
|
-
let t =
|
|
382
|
+
let t = U(e);
|
|
386
383
|
this._setUdpOption({
|
|
387
384
|
type: 7,
|
|
388
385
|
group: t,
|
|
@@ -395,22 +392,19 @@ var M = /* @__PURE__ */ n({
|
|
|
395
392
|
return this._localAddress;
|
|
396
393
|
}
|
|
397
394
|
bind(...e) {
|
|
398
|
-
let t =
|
|
399
|
-
return this._webVPNUdpSocketPromise =
|
|
395
|
+
let t = j(...e), n = this._type === "udp6" ? "::" : "0.0.0.0";
|
|
396
|
+
return this._webVPNUdpSocketPromise = w.then((e) => e.webVpnUdpSocket({
|
|
400
397
|
type: this._type,
|
|
401
|
-
address: t.address,
|
|
398
|
+
address: t.address ?? n,
|
|
402
399
|
port: t.port
|
|
403
400
|
})).then((e) => {
|
|
404
401
|
let t = e.dataReadableStream.getReader(), n = async () => {
|
|
405
402
|
let { value: e, done: r } = await t.read();
|
|
406
|
-
r || (this.emit("message", {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
port: e.port,
|
|
412
|
-
size: e.size
|
|
413
|
-
}
|
|
403
|
+
r || (this.emit("message", g.from(e.data), {
|
|
404
|
+
address: e.address,
|
|
405
|
+
family: e.family,
|
|
406
|
+
port: e.port,
|
|
407
|
+
size: e.size
|
|
414
408
|
}), n());
|
|
415
409
|
};
|
|
416
410
|
return n(), this._localAddress = {
|
|
@@ -437,15 +431,15 @@ var M = /* @__PURE__ */ n({
|
|
|
437
431
|
if (!this._webVPNUdpSocketPromise) throw Error("Socket not bound");
|
|
438
432
|
this._webVPNUdpSocketPromise.then(async (t) => {
|
|
439
433
|
if (!t) throw Error("Socket not bound");
|
|
440
|
-
let n = e[0], r = typeof e[1] == "string" ? e[1] :
|
|
434
|
+
let n = e[0], r = this._type === "udp6" ? "::1" : "127.0.0.1", i = typeof e[1] == "string" ? e[1] : r, a = typeof e.at(-1) == "function" ? e.at(-1) : void 0;
|
|
441
435
|
await t.connect({
|
|
442
436
|
remotePort: n,
|
|
443
|
-
remoteAddress:
|
|
437
|
+
remoteAddress: i
|
|
444
438
|
}), this._remoteAddress = {
|
|
445
|
-
address:
|
|
439
|
+
address: i,
|
|
446
440
|
family: this._type === "udp6" ? "IPv6" : "IPv4",
|
|
447
441
|
port: n
|
|
448
|
-
},
|
|
442
|
+
}, a && a();
|
|
449
443
|
});
|
|
450
444
|
}
|
|
451
445
|
disconnect() {
|
|
@@ -460,7 +454,7 @@ var M = /* @__PURE__ */ n({
|
|
|
460
454
|
}
|
|
461
455
|
dropMembership(e, t) {
|
|
462
456
|
if (m.isValid(e)) {
|
|
463
|
-
let n =
|
|
457
|
+
let n = H(e), r = t && m.isValid(t) ? H(t) : new Uint8Array([
|
|
464
458
|
0,
|
|
465
459
|
0,
|
|
466
460
|
0,
|
|
@@ -472,7 +466,7 @@ var M = /* @__PURE__ */ n({
|
|
|
472
466
|
interface: r
|
|
473
467
|
});
|
|
474
468
|
} else if (h.isValid(e)) {
|
|
475
|
-
let t =
|
|
469
|
+
let t = U(e);
|
|
476
470
|
this._setUdpOption({
|
|
477
471
|
type: 8,
|
|
478
472
|
group: t,
|
|
@@ -505,14 +499,15 @@ var M = /* @__PURE__ */ n({
|
|
|
505
499
|
}
|
|
506
500
|
send(...e) {
|
|
507
501
|
this._webVPNUdpSocketPromise || this.bind();
|
|
508
|
-
let t =
|
|
502
|
+
let t = M(...e), n = this._type === "udp6" ? "::1" : "127.0.0.1";
|
|
509
503
|
if (!this._webVPNUdpSocketPromise) throw Error("Socket not bound");
|
|
510
504
|
this._webVPNUdpSocketPromise.then((e) => {
|
|
511
505
|
if (!e) throw Error("Socket not bound");
|
|
512
|
-
let
|
|
506
|
+
let r = typeof t.message == "string" ? E.encode(t.message) : t.message;
|
|
513
507
|
e.send({
|
|
514
508
|
...t,
|
|
515
|
-
|
|
509
|
+
address: t.address ?? n,
|
|
510
|
+
message: r.buffer
|
|
516
511
|
});
|
|
517
512
|
});
|
|
518
513
|
}
|
|
@@ -566,16 +561,16 @@ var M = /* @__PURE__ */ n({
|
|
|
566
561
|
this.close(e);
|
|
567
562
|
});
|
|
568
563
|
}
|
|
569
|
-
},
|
|
564
|
+
}, H = (e) => {
|
|
570
565
|
let t = e.split(".").map((e) => parseInt(e, 10));
|
|
571
566
|
if (t.length !== 4 || t.some((e) => Number.isNaN(e) || e < 0 || e > 255)) throw Error(`Invalid IPv4 address: ${e}`);
|
|
572
567
|
return new Uint8Array(t);
|
|
573
|
-
},
|
|
568
|
+
}, U = (e) => {
|
|
574
569
|
let t = new h(e).getBitsBase16(0, 128).match(/.{2}/g);
|
|
575
570
|
if (!t || t.length !== 16) throw Error(`Invalid IPv6 address: ${e}`);
|
|
576
571
|
return new Uint8Array(t.map((e) => parseInt(e, 16)));
|
|
577
|
-
},
|
|
578
|
-
let n = new
|
|
572
|
+
}, W = (e, t) => {
|
|
573
|
+
let n = new V(typeof e == "string" ? { type: e } : e);
|
|
579
574
|
return t && n.on("message", t), n;
|
|
580
575
|
};
|
|
581
576
|
(() => {
|
|
@@ -584,21 +579,21 @@ var M = /* @__PURE__ */ n({
|
|
|
584
579
|
return e;
|
|
585
580
|
})();
|
|
586
581
|
//#endregion
|
|
587
|
-
//#region
|
|
588
|
-
var
|
|
589
|
-
document.addEventListener(
|
|
590
|
-
|
|
582
|
+
//#region node_modules/@mfkn/web-extension/lib/utils/extension.js
|
|
583
|
+
var G = "FKN_WEB_EXTENSION_MAIN_WORLD_CONTENT_SCRIPT_ENABLED_EVENT_KEY", K = "fknExtension", q = u();
|
|
584
|
+
typeof document < "u" && document.addEventListener(G, (e) => {
|
|
585
|
+
q.dispatchEvent(new CustomEvent("statuschange", { detail: { enabled: e.detail.enabled } }));
|
|
591
586
|
});
|
|
592
|
-
var
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
},
|
|
587
|
+
var J = () => document.documentElement.dataset[K] === "true", Y = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY", X, Z = new Proxy({}, { get: (e, t) => async (...e) => {
|
|
588
|
+
if (!J()) throw Error("The FKN WebExtension is not installed, enabled or not exposed on this page.");
|
|
589
|
+
return X ??= d({}, {
|
|
590
|
+
transport: window,
|
|
591
|
+
revivableModules: o
|
|
592
|
+
}), (await X)[t](...e);
|
|
593
|
+
} }), Q = async ({ iframe: e, domains: t = [] }) => {
|
|
599
594
|
let n = crypto.randomUUID();
|
|
600
|
-
e.
|
|
601
|
-
let { executeLocator: r, goto: a } = await
|
|
595
|
+
e.dispatchEvent(new CustomEvent(Y, { detail: n }));
|
|
596
|
+
let { executeLocator: r, goto: a } = await Z.attachFrame({
|
|
602
597
|
marker: n,
|
|
603
598
|
domains: t
|
|
604
599
|
}), o = i(r), s = (e, t = {}) => a({
|
|
@@ -612,4 +607,4 @@ var q = () => document.documentElement.dataset[G] === "true", J = d({}, {
|
|
|
612
607
|
};
|
|
613
608
|
};
|
|
614
609
|
//#endregion
|
|
615
|
-
export {
|
|
610
|
+
export { Y as ATTACH_FRAME_EVENT_KEY, Q as attachFrame, r as box, e as createVideoElementHandle, B as dgram, o as handleRevivableModules, a as isType, N as net, s as revive, T as serverProxyFetch, t as type };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let r=require(`osra`);var i=3e4,a=50,o=e=>{let t=e[e.length-1];return typeof t==`object`&&t&&`timeout`in t&&typeof t.timeout==`number`?t.timeout:i},s=async(e,t,n,r)=>{let i=e,s=o(r),c=Date.now()+s,l=Error(`Locator timeout (${s}ms): ${n}`),{promise:u,reject:d}=Promise.withResolvers(),f=setTimeout(()=>d(l),s),p=l;try{for(;Date.now()<c;)try{return await Promise.race([i(t,n,r),u])}catch(e){if(e===l)break;p=e;let t=c-Date.now();if(t<=0)break;await new Promise(e=>setTimeout(e,Math.min(a,t)))}}finally{clearTimeout(f)}throw p},c=n({render:()=>d,resolve:()=>u,type:()=>l}),l=`locator`,u=(e,t)=>e.elements.flatMap(e=>[...e.querySelectorAll(t)]),d=e=>({fragment:typeof e==`string`?e:`?`,separator:`descend`}),f=e=>typeof e==`object`&&!!e,p=e=>f(e)&&e.FKN_WEB_EXTENSION_FRAME_ANNOUNCE_KEY===!0&&typeof e.frameId==`string`,m=new WeakMap,h=new WeakMap,g=new Set,_=e=>(g.add(e),()=>g.delete(e));typeof window<`u`&&window.addEventListener(`message`,e=>{if(!p(e.data))return;e.stopImmediatePropagation();let t=e.source;if(!t||typeof t!=`object`)return;let n=t,r=m.get(n),i=e.data.frameId;if(m.set(n,i),r)for(let e of g)e(r);let a=h.get(n);if(a){h.delete(n);for(let e of a)e(i)}},{capture:!0});var v=e=>{let t=e.contentWindow;if(!t)return Promise.reject(Error(`frameLocator: <iframe> has no contentWindow`));let n=m.get(t);return n?Promise.resolve(n):new Promise(e=>{let n=h.get(t)??[];n.push(e),h.set(t,n)})},y=n({render:()=>C,resolve:()=>x,resolvePeer:()=>S,type:()=>b}),b=`frameLocator`,x=(e,t)=>e.elements.flatMap(e=>[...e.querySelectorAll(t)]).filter(e=>e instanceof HTMLIFrameElement),S=async({parts:e,selfIndex:t,resolveLocal:n})=>{let r=n(e.slice(0,t+1))[0];if(!r)throw Error(`frameLocator: no <iframe> matched`);if(!(r instanceof HTMLIFrameElement))throw Error(`frameLocator: expected <iframe>, got <${r.tagName.toLowerCase()}>`);return v(r)},C=e=>({fragment:typeof e==`string`?e:`?`,separator:`frame-down`}),ee=n({render:()=>ie,resolve:()=>ne,resolvePeer:()=>re,type:()=>te}),te=`owner`,ne=e=>{throw Error(`owner: must be processed by the executor as an upward pivot`)},re=async()=>{let{backgroundResolvers:e}=await Promise.resolve().then(()=>require(`./background-Y_zGUlba.cjs`)),t=await(await e).getParentFrameId();if(!t)throw Error(`owner: already at top frame`);return t},ie=()=>({fragment:``,separator:`frame-up`}),ae=class extends Error{reason;filename;line;column;source;constructor(e,t,n,r,i){super(`${e}:${n}:${r}: ${t}`),this.reason=t,this.filename=e,this.line=n,this.column=r,this.source=i}},oe=class{start;end;source;constructor(e,t,n){this.start=e,this.end=t,this.source=n}},w;(function(e){e.stylesheet=`stylesheet`,e.rule=`rule`,e.declaration=`declaration`,e.comment=`comment`,e.container=`container`,e.charset=`charset`,e.document=`document`,e.customMedia=`custom-media`,e.fontFace=`font-face`,e.host=`host`,e.import=`import`,e.keyframes=`keyframes`,e.keyframe=`keyframe`,e.layer=`layer`,e.media=`media`,e.namespace=`namespace`,e.page=`page`,e.startingStyle=`starting-style`,e.supports=`supports`})(w||={});var se=(e,t,n)=>{let r=n,i=1e4;do{let n=t.map(t=>e.indexOf(t,r));n.push(e.indexOf(`\\`,r));let a=n.filter(e=>e!==-1);if(a.length===0)return-1;let o=Math.min(...a);if(e[o]!==`\\`)return o;r=o+2,i--}while(i>0);throw Error(`Too many escaping`)},T=(e,t,n)=>{let r=n,i=1e4;do{let n=t.map(t=>e.indexOf(t,r));n.push(e.indexOf(`(`,r)),n.push(e.indexOf(`"`,r)),n.push(e.indexOf(`'`,r)),n.push(e.indexOf(`\\`,r));let a=n.filter(e=>e!==-1);if(a.length===0)return-1;let o=Math.min(...a);switch(e[o]){case`\\`:r=o+2;break;case`(`:{let t=T(e,[`)`],o+1);if(t===-1)return-1;r=t+1}break;case`"`:{let t=se(e,[`"`],o+1);if(t===-1)return-1;r=t+1}break;case`'`:{let t=se(e,[`'`],o+1);if(t===-1)return-1;r=t+1}break;default:return o}i--}while(i>0);throw Error(`Too many escaping`)},E=/\/\*[^]*?(?:\*\/|$)/g;function D(e){return e?e.trim():``}function O(e,t){let n=e&&typeof e.type==`string`,r=n?e:t;for(let t in e){let n=e[t];Array.isArray(n)?n.forEach(e=>{O(e,r)}):n&&typeof n==`object`&&O(n,r)}return n&&Object.defineProperty(e,`parent`,{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var ce=class{level=0;indentation=` `;compress=!1;constructor(e){typeof e?.indent==`string`&&(this.indentation=e?.indent),e?.compress&&(this.compress=!0)}emit(e,t){return e}indent(e){return this.level=this.level||1,e?(this.level+=e,``):Array(this.level).join(this.indentation)}visit(e){switch(e.type){case w.stylesheet:return this.stylesheet(e);case w.rule:return this.rule(e);case w.declaration:return this.declaration(e);case w.comment:return this.comment(e);case w.container:return this.container(e);case w.charset:return this.charset(e);case w.document:return this.document(e);case w.customMedia:return this.customMedia(e);case w.fontFace:return this.fontFace(e);case w.host:return this.host(e);case w.import:return this.import(e);case w.keyframes:return this.keyframes(e);case w.keyframe:return this.keyframe(e);case w.layer:return this.layer(e);case w.media:return this.media(e);case w.namespace:return this.namespace(e);case w.page:return this.page(e);case w.startingStyle:return this.startingStyle(e);case w.supports:return this.supports(e)}}mapVisit(e,t){let n=``;t||=``;for(let r=0,i=e.length;r<i;r++)n+=this.visit(e[r]),t&&r<i-1&&(n+=this.emit(t));return n}compile(e){return this.compress?e.stylesheet.rules.map(this.visit,this).join(``):this.stylesheet(e)}stylesheet(e){return this.mapVisit(e.stylesheet.rules,`
|
|
2
|
+
|
|
3
|
+
`)}comment(e){return this.compress?this.emit(``,e.position):this.emit(`${this.indent()}/*${e.comment}*/`,e.position)}container(e){return this.compress?this.emit(`@container ${e.container}`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`${this.indent()}@container ${e.container}`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
4
|
+
|
|
5
|
+
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`)}layer(e){return this.compress?this.emit(`@layer ${e.layer}`,e.position)+(e.rules?this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):`;`):this.emit(`${this.indent()}@layer ${e.layer}`,e.position)+(e.rules?this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
6
|
+
|
|
7
|
+
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`):`;`)}import(e){return this.emit(`@import ${e.import};`,e.position)}media(e){return this.compress?this.emit(`@media ${e.media}`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`${this.indent()}@media ${e.media}`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
8
|
+
|
|
9
|
+
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`)}document(e){let t=`@${e.vendor||``}document ${e.document}`;return this.compress?this.emit(t,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(t,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
10
|
+
|
|
11
|
+
`)+this.emit(`${this.indent(-1)}\n}`)}charset(e){return this.emit(`@charset ${e.charset};`,e.position)}namespace(e){return this.emit(`@namespace ${e.namespace};`,e.position)}startingStyle(e){return this.compress?this.emit(`@starting-style`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`${this.indent()}@starting-style`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
12
|
+
|
|
13
|
+
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`)}supports(e){return this.compress?this.emit(`@supports ${e.supports}`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`${this.indent()}@supports ${e.supports}`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
14
|
+
|
|
15
|
+
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`)}keyframes(e){return this.compress?this.emit(`@${e.vendor||``}keyframes ${e.name}`,e.position)+this.emit(`{`)+this.mapVisit(e.keyframes)+this.emit(`}`):this.emit(`@${e.vendor||``}keyframes ${e.name}`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.keyframes,`
|
|
16
|
+
`)+this.emit(`${this.indent(-1)}}`)}keyframe(e){let t=e.declarations;return this.compress?this.emit(e.values.join(`,`),e.position)+this.emit(`{`)+this.mapVisit(t)+this.emit(`}`):this.emit(this.indent())+this.emit(e.values.join(`, `),e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(t,`
|
|
17
|
+
`)+this.emit(`${this.indent(-1)}\n${this.indent()}}\n`)}page(e){if(this.compress){let t=e.selectors.length?e.selectors.join(`, `):``;return this.emit(`@page ${t}`,e.position)+this.emit(`{`)+this.mapVisit(e.declarations)+this.emit(`}`)}let t=e.selectors.length?`${e.selectors.join(`, `)} `:``;return this.emit(`@page ${t}`,e.position)+this.emit(`{
|
|
18
|
+
`)+this.emit(this.indent(1))+this.mapVisit(e.declarations,`
|
|
19
|
+
`)+this.emit(this.indent(-1))+this.emit(`
|
|
20
|
+
}`)}fontFace(e){return this.compress?this.emit(`@font-face`,e.position)+this.emit(`{`)+this.mapVisit(e.declarations)+this.emit(`}`):this.emit(`@font-face `,e.position)+this.emit(`{
|
|
21
|
+
`)+this.emit(this.indent(1))+this.mapVisit(e.declarations,`
|
|
22
|
+
`)+this.emit(this.indent(-1))+this.emit(`
|
|
23
|
+
}`)}host(e){return this.compress?this.emit(`@host`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`@host`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
24
|
+
|
|
25
|
+
`)+this.emit(`${this.indent(-1)}\n}`)}customMedia(e){return this.emit(`@custom-media ${e.name} ${e.media};`,e.position)}rule(e){let t=e.declarations;if(!t.length)return``;if(this.compress)return this.emit(e.selectors.join(`,`),e.position)+this.emit(`{`)+this.mapVisit(t)+this.emit(`}`);let n=this.indent();return this.emit(e.selectors.map(e=>n+e).join(`,
|
|
26
|
+
`),e.position)+this.emit(` {
|
|
27
|
+
`)+this.emit(this.indent(1))+this.mapVisit(t,`
|
|
28
|
+
`)+this.emit(this.indent(-1))+this.emit(`\n${this.indent()}}`)}declaration(e){return this.compress?this.emit(`${e.property}:${e.value}`,e.position)+this.emit(`;`):e.property===`grid-template-areas`?this.emit(this.indent())+this.emit(e.property+`: `+e.value.split(`
|
|
29
|
+
`).join(`
|
|
30
|
+
`.padEnd(22)+this.indent()),e.position)+this.emit(`;`):this.emit(this.indent())+this.emit(`${e.property}: ${e.value}`,e.position)+this.emit(`;`)}},le=(e,t)=>{t||={};let n=1,r=1;function i(){let e={line:n,column:r};return i=>(i.position=new oe(e,{line:n,column:r},t?.source||``),d(),i)}let a=[];function o(i){let o=new ae(t?.source||``,i,n,r,e);if(!t?.silent)throw o;a.push(o)}function s(){let t=/^{\s*/.exec(e);return!!t&&(u(t),!0)}function c(){let t=/^}/.exec(e);return!!t&&(u(t),!0)}function l(){let t,n=[];for(d(),f(n);e.length&&e.charAt(0)!==`}`&&(t=S()||C(),t);)n.push(t),f(n);return n}function u(t){let i=t[0];return function(e){let t=e.match(/\n/g);t&&(n+=t.length);let i=e.lastIndexOf(`
|
|
31
|
+
`);r=~i?e.length-i:r+e.length}(i),e=e.slice(i.length),t}function d(){let t=/^\s*/.exec(e);t&&u(t)}function f(e){e||=[];let t=p();for(;t;)e.push(t),t=p();return e}function p(){let t=i();if(e.charAt(0)!==`/`||e.charAt(1)!==`*`)return;let n=/^\/\*[^]*?\*\//.exec(e);return n?(u(n),t({type:w.comment,comment:n[0].slice(2,-2)})):o(`End of comment missing`)}function m(){let t=/^([^{]+)/.exec(e);if(t)return u(t),((e,t)=>{let n=[],r=0;for(;r<e.length;){let i=T(e,t,r);if(i===-1)return n.push(e.substring(r)),n;n.push(e.substring(r,i)),r=i+1}return n})(D(t[0]).replace(E,``),[`,`]).map(e=>D(e))}function h(){let t=i(),n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);if(!n)return;u(n);let r=D(n[0]),a=/^:\s*/.exec(e);if(!a)return o(`property missing ':'`);u(a);let s=``,c=T(e,[`;`,`}`]);c!==-1&&(s=e.substring(0,c),u([s]),s=D(s).replace(E,``));let l=t({type:w.declaration,property:r.replace(E,``),value:s}),d=/^[;\s]*/.exec(e);return d&&u(d),l}function g(){let e=[];if(!s())return o(`missing '{'`);f(e);let t=h();for(;t;)e.push(t),f(e),t=h();return c()?e:o(`missing '}'`)}function _(){let t=[],n=i(),r=/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);for(;r;){let n=u(r);t.push(n[1]);let i=/^,\s*/.exec(e);i&&u(i),r=/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e)}if(t.length)return n({type:w.keyframe,values:t,declarations:g()||[]})}let v=x(`import`),y=x(`charset`),b=x(`namespace`);function x(t){let n=RegExp(`^@`+t+`\\s*((?::?[^;'"]|"(?:\\\\"|[^"])*?"|'(?:\\\\'|[^'])*?')+)(?:;|$)`);return()=>{let r=i(),a=n.exec(e);if(!a)return;let o=u(a),s={type:t};return s[t]=o[1].trim(),r(s)}}function S(){if(e[0]===`@`)return function(){let t=i(),n=/^@([-\w]+)?keyframes\s*/.exec(e);if(!n)return;let r=u(n)[1],a=/^([-\w]+)\s*/.exec(e);if(!a)return o(`@keyframes missing name`);let l=u(a)[1];if(!s())return o(`@keyframes missing '{'`);let d=f(),p=_();for(;p;)d.push(p),d=d.concat(f()),p=_();return c()?t({type:w.keyframes,name:l,vendor:r,keyframes:d}):o(`@keyframes missing '}'`)}()||function(){let t=i(),n=/^@media *([^{]+)/.exec(e);if(!n)return;let r=D(u(n)[1]);if(!s())return o(`@media missing '{'`);let a=f().concat(l());return c()?t({type:w.media,media:r,rules:a}):o(`@media missing '}'`)}()||function(){let t=i(),n=/^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);if(!n)return;let r=u(n);return t({type:w.customMedia,name:D(r[1]),media:D(r[2])})}()||function(){let t=i(),n=/^@supports *([^{]+)/.exec(e);if(!n)return;let r=D(u(n)[1]);if(!s())return o(`@supports missing '{'`);let a=f().concat(l());return c()?t({type:w.supports,supports:r,rules:a}):o(`@supports missing '}'`)}()||v()||y()||b()||function(){let t=i(),n=/^@([-\w]+)?document *([^{]+)/.exec(e);if(!n)return;let r=u(n),a=D(r[1]),d=D(r[2]);if(!s())return o(`@document missing '{'`);let p=f().concat(l());return c()?t({type:w.document,document:d,vendor:a,rules:p}):o(`@document missing '}'`)}()||function(){let t=i(),n=/^@page */.exec(e);if(!n)return;u(n);let r=m()||[];if(!s())return o(`@page missing '{'`);let a=f(),l=h();for(;l;)a.push(l),a=a.concat(f()),l=h();return c()?t({type:w.page,selectors:r,declarations:a}):o(`@page missing '}'`)}()||function(){let t=i(),n=/^@host\s*/.exec(e);if(!n)return;if(u(n),!s())return o(`@host missing '{'`);let r=f().concat(l());return c()?t({type:w.host,rules:r}):o(`@host missing '}'`)}()||function(){let t=i(),n=/^@font-face\s*/.exec(e);if(!n)return;if(u(n),!s())return o(`@font-face missing '{'`);let r=f(),a=h();for(;a;)r.push(a),r=r.concat(f()),a=h();return c()?t({type:w.fontFace,declarations:r}):o(`@font-face missing '}'`)}()||function(){let t=i(),n=/^@container *([^{]+)/.exec(e);if(!n)return;let r=D(u(n)[1]);if(!s())return o(`@container missing '{'`);let a=f().concat(l());return c()?t({type:w.container,container:r,rules:a}):o(`@container missing '}'`)}()||function(){let t=i(),n=/^@starting-style\s*/.exec(e);if(!n)return;if(u(n),!s())return o(`@starting-style missing '{'`);let r=f().concat(l());return c()?t({type:w.startingStyle,rules:r}):o(`@starting-style missing '}'`)}()||function(){let t=i(),n=/^@layer *([^{;@]+)/.exec(e);if(!n)return;let r=D(u(n)[1]);if(!s()){let n=/^[;\s]*/.exec(e);return n&&u(n),t({type:w.layer,layer:r})}let a=f().concat(l());return c()?t({type:w.layer,layer:r,rules:a}):o(`@layer missing '}'`)}()}function C(){let e=i(),t=m();return t?(f(),e({type:w.rule,selectors:t,declarations:g()||[]})):o(`selector missing`)}return O(function(){let e=l();return{type:w.stylesheet,stylesheet:{source:t?.source,rules:e,parsingErrors:a}}}())},ue=(e,t)=>new ce(t||{}).compile(e),de=n({resolve:()=>_e,type:()=>fe}),fe=`addStyleTag`,pe=/(?:^|[^\w-])(?:url|image|image-set|cross-fade|paint|element|expression)\s*\(/i,me=e=>e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))).replace(/\\(.)/g,`$1`),k=e=>!pe.test(me(e.value)),A=e=>{let t=[];for(let n of e)switch(n.type){case w.import:case w.fontFace:case w.namespace:case w.charset:case w.document:case w.comment:continue;case w.rule:case w.page:t.push({...n,declarations:n.declarations.filter(e=>e.type!==w.declaration||k(e))});continue;case w.media:case w.supports:case w.container:case w.host:case w.startingStyle:t.push({...n,rules:A(n.rules)});continue;case w.layer:t.push({...n,rules:n.rules?A(n.rules):void 0});continue;case w.keyframes:t.push({...n,keyframes:n.keyframes.map(e=>e.type===w.keyframe?{...e,declarations:e.declarations.filter(e=>e.type!==w.declaration||k(e))}:e)});continue;default:continue}return t},he=e=>{let t;try{t=le(e,{silent:!0})}catch{return``}return t.stylesheet.rules=A(t.stylesheet.rules),ue(t)},ge=e=>{let t=()=>{e.parentNode||(document.head??document.documentElement).appendChild(e)};t();let n=new MutationObserver(n=>{for(let r of n)for(let n of r.removedNodes)if(n===e||n.contains?.(e)){t();return}});n.observe(document.documentElement,{childList:!0,subtree:!0}),window.addEventListener(`load`,()=>n.disconnect(),{once:!0})},_e=async(e,t)=>{let n=document.createElement(`style`);n.textContent=t.noSanitize?t.content:he(t.content);try{ge(n)}catch(e){console.error(e)}},j=`frameLocator`,M=[{...c,nextLocatorType:`locator`},y,ee],N=[de],ve={type:j,selectorModules:M,operationModules:N},P=F({ownType:j,selectorModules:M,operationModules:N});function F(e){return(t,n=[])=>({...Object.fromEntries(e.selectorModules.map(r=>[r.type,(...i)=>{let a=[...n,{locatorType:e.ownType,type:r.type,args:i}];return(r.nextLocatorType??e.ownType)===`locator`?Tt(t,a):P(t,a)}])),...Object.fromEntries(e.operationModules.map(({type:e})=>[e,(...r)=>s(t,n,e,r)]))})}var ye=n({render:()=>Se,resolve:()=>xe,type:()=>be}),be=`getByRole`,xe=(e,t)=>e.elements.flatMap(e=>[...e.querySelectorAll(`[role="${CSS.escape(t)}"]`)]),Se=e=>({fragment:typeof e==`string`?`[role="${e.replaceAll(`"`,`\\"`)}"]`:`[role]`}),Ce=n({render:()=>Ee,resolve:()=>Te,type:()=>we}),we=`getByText`,Te=(e,t)=>e.elements.flatMap(e=>[e,...e.querySelectorAll(`*`)]).filter(e=>e.textContent?.includes(t)),Ee=e=>({fragment:typeof e==`string`?`:has-text("${e.replaceAll(`"`,`\\"`)}")`:`:has-text(...)`}),De=n({render:()=>Ae,resolve:()=>ke,type:()=>Oe}),Oe=`getByTestId`,ke=(e,t)=>e.elements.flatMap(e=>[...e.querySelectorAll(`[data-testid="${CSS.escape(t)}"]`)]),Ae=e=>({fragment:typeof e==`string`?`[data-testid="${e.replaceAll(`"`,`\\"`)}"]`:`[data-testid]`}),je=n({render:()=>Pe,resolve:()=>Ne,type:()=>Me}),Me=`first`,Ne=e=>e.elements.slice(0,1),Pe=()=>({fragment:`:first`}),Fe=n({render:()=>Le,resolve:()=>Ie,type:()=>`nth`}),Ie=(e,t)=>{let n=e.elements.at(t);return n?[n]:[]},Le=e=>({fragment:typeof e==`number`?`:nth(${e})`:`:nth(?)`}),I=e=>{let t=Error(e);return t.name=`LocatorError`,t},L=e=>{if(e.length===0)throw I(`No elements found`);if(e.length>1)throw I(`Strict mode violation: locator resolved to ${e.length} elements`);return e[0]},Re=n({resolve:()=>Be,type:()=>ze}),ze=`click`,Be=(e,t={})=>{let n=L(e.elements),r=n.getBoundingClientRect(),i=t.position?.x??.5,a=t.position?.y??.5,o={bubbles:!0,cancelable:!0,composed:!0,clientX:r.left+r.width*i,clientY:r.top+r.height*a,button:0},s={...o,buttons:1,pointerType:`mouse`,pointerId:1,isPrimary:!0},c={...o,buttons:1},l={...o,buttons:0};n.dispatchEvent(new PointerEvent(`pointerdown`,s)),n.dispatchEvent(new MouseEvent(`mousedown`,c)),n.dispatchEvent(new PointerEvent(`pointerup`,{...s,buttons:0})),n.dispatchEvent(new MouseEvent(`mouseup`,l)),n.dispatchEvent(new MouseEvent(`click`,l))},Ve=n({resolve:()=>We,type:()=>He}),He=`fill`,R=(e,t)=>{e._valueTracker?.setValue(``);let n=e instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`)?.set;r?r.call(e,t):e.value=t},Ue=(e,t)=>{if(e.type!==`range`)return null;let n=Number(e.min||0),r=Number(e.max||100);if(!Number.isFinite(n)||!Number.isFinite(r)||r<=n)return null;let i=Number(t);if(!Number.isFinite(i))return null;let a=Math.max(0,Math.min(1,(i-n)/(r-n))),o=e.getBoundingClientRect(),s={bubbles:!0,cancelable:!0,composed:!0,clientX:o.left+o.width*a,clientY:o.top+o.height/2,button:0};return{pointerDown:{...s,buttons:1,pointerType:`mouse`,pointerId:1,isPrimary:!0},pointerUp:{...s,buttons:0,pointerType:`mouse`,pointerId:1,isPrimary:!0},mouseDown:{...s,buttons:1},mouseUp:{...s,buttons:0}}},We=(e,t,n={})=>{let r=L(e.elements);if(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement){let e=r instanceof HTMLInputElement?Ue(r,t):null;if(e){r.dispatchEvent(new PointerEvent(`pointerdown`,e.pointerDown)),r.dispatchEvent(new MouseEvent(`mousedown`,e.mouseDown)),R(r,t),r.dispatchEvent(new Event(`input`,{bubbles:!0})),r.dispatchEvent(new PointerEvent(`pointerup`,e.pointerUp)),r.dispatchEvent(new MouseEvent(`mouseup`,e.mouseUp)),r.dispatchEvent(new Event(`change`,{bubbles:!0}));return}R(r,t),r.dispatchEvent(new Event(`input`,{bubbles:!0})),r.dispatchEvent(new Event(`change`,{bubbles:!0}));return}if(r instanceof HTMLElement&&r.isContentEditable){r.textContent=t,r.dispatchEvent(new Event(`input`,{bubbles:!0}));return}throw Error(`fill: element <${r.tagName.toLowerCase()}> is not fillable`)},Ge=n({resolve:()=>qe,type:()=>Ke}),Ke=`hover`,qe=(e,t={})=>{let n=L(e.elements);n.dispatchEvent(new MouseEvent(`mouseenter`,{bubbles:!1,cancelable:!0})),n.dispatchEvent(new MouseEvent(`mouseover`,{bubbles:!0,cancelable:!0})),n.dispatchEvent(new MouseEvent(`mousemove`,{bubbles:!0,cancelable:!0}))},Je=n({resolve:()=>Xe,type:()=>Ye}),Ye=`textContent`,Xe=(e,t={})=>L(e.elements).textContent,Ze=n({resolve:()=>$e,type:()=>Qe}),Qe=`isVisible`,$e=(e,t={})=>{let n=L(e.elements);if(!(n instanceof HTMLElement))return!0;let r=n.ownerDocument.defaultView?.getComputedStyle(n);if(r?.display===`none`||r?.visibility===`hidden`)return!1;let i=n.getBoundingClientRect();return i.width>0&&i.height>0},et=n({resolve:()=>nt,type:()=>tt}),tt=`count`,nt=(e,t={})=>e.elements.length,rt=n({resolve:()=>at,type:()=>it}),it=`exists`,at=(e,t={})=>e.elements.length>0,ot=n({resolve:()=>ct,type:()=>st}),st=`getAttribute`,ct=(e,t,n={})=>L(e.elements).getAttribute(t),lt=(e,t)=>{let n=new EventTarget,r=new Map,i=EventTarget.prototype.addEventListener.bind(n),a=EventTarget.prototype.removeEventListener.bind(n);return Object.defineProperty(n,`addEventListener`,{configurable:!0,value:(a,o,s)=>{if(o!==null){if(!r.has(a)){let i=r=>{n.dispatchEvent(new CustomEvent(a,{detail:t(r,e),bubbles:r.bubbles,cancelable:r.cancelable,composed:r.composed}))};e.addEventListener(a,i),r.set(a,i)}i(a,o,s)}}}),Object.defineProperty(n,`removeEventListener`,{configurable:!0,value:(t,n,i)=>{if(n===null)return;a(t,n,i);let o=r.get(t);o&&(e.removeEventListener(t,o),r.delete(t))}}),n},z=e=>typeof e==`boolean`?e?1:0:e?.capture?1:0,ut=e=>{let t=new WeakMap;return{addEventListener:(n,r,i)=>{if(r===null)return;let a=`${n}|${z(i)}`,o=t.get(r);if(o||(o=new Map,t.set(r,o)),o.has(a))return;let s=typeof i==`object`&&!!i&&!!i.once,c=t=>{s&&o.delete(a);let i=e.unenrich(t,n);typeof r==`function`?r.call(e.target,i):r.handleEvent(i)};o.set(a,c),e.remoteEvents.addEventListener(n,c,i)},removeEventListener:(n,r,i)=>{if(r===null)return;let a=`${n}|${z(i)}`,o=t.get(r),s=o?.get(a);s&&(e.remoteEvents.removeEventListener(n,s,i),o.delete(a))},dispatchEvent:t=>e.remoteEvents.dispatchEvent(t)}},dt=n({box:()=>Z,createVideoElementHandle:()=>Y,isType:()=>X,revive:()=>Q,type:()=>B}),B=`videoElement`,V=[`currentTime`,`volume`,`muted`,`playbackRate`,`src`,`loop`,`autoplay`,`preload`,`poster`,`disableRemotePlayback`],H=[`duration`,`paused`,`ended`,`seeking`,`readyState`,`currentSrc`],U=[`buffered`,`seekable`],W=Symbol.for(`fkn.remoteVideoElement`),G=Symbol.for(`fkn.remoteVideoElement.state`),K=Symbol.for(`fkn.remoteVideoElement.controller`),ft=e=>e?Array.from({length:e.length},(t,n)=>[e.start(n),e.end(n)]):[],q=e=>{let t={};for(let n of[...V,...H])t[n]=e[n];for(let n of U)t[n]=ft(e[n]);return t.error=e.error?{code:e.error.code,message:e.error.message}:null,t},pt=e=>{let t=t=>{if(!Number.isInteger(t)||t<0||t>=e.length)throw new DOMException(`Index or size is negative or greater than the allowed amount`,`IndexSizeError`)};return{get length(){return e.length},start(n){return t(n),e[n][0]},end(n){return t(n),e[n][1]}}},mt=e=>e?{code:e.code,message:e.message,MEDIA_ERR_ABORTED:1,MEDIA_ERR_NETWORK:2,MEDIA_ERR_DECODE:3,MEDIA_ERR_SRC_NOT_SUPPORTED:4}:null,ht=e=>lt(e,(e,t)=>({originalDetail:e instanceof CustomEvent?e.detail:null,snapshot:q(t)})),gt=async(e,t)=>{switch(t){case`play`:return await e.play(),null;case`pause`:return e.pause(),null;case`load`:return e.load(),null;case`requestPictureInPicture`:if(typeof e.requestPictureInPicture!=`function`)throw Error(`requestPictureInPicture is not supported in this environment`);return await e.requestPictureInPicture(),null;case`exitPictureInPicture`:{let t=e.ownerDocument;if(typeof t?.exitPictureInPicture!=`function`)throw Error(`exitPictureInPicture is not supported in this environment`);return await t.exitPictureInPicture(),null}default:throw Error(`videoElement: unknown method "${t}"`)}},_t=e=>({call:async t=>gt(e,t),set:async(t,n)=>{try{e[t]=n}catch{}return q(e)},events:ht(e)}),J=(e,t)=>{let n=new EventTarget;Object.defineProperty(n,W,{value:!0}),Object.defineProperty(n,G,{value:e}),Object.defineProperty(n,K,{value:t});let r=ut({target:n,remoteEvents:t.events,unenrich:(t,n)=>{if(!(t instanceof CustomEvent))return t;let r=t.detail;if(!r||!(`snapshot`in r))return t;Object.assign(e,r.snapshot);let i={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed};return r.originalDetail===null?new Event(n,i):new CustomEvent(n,{...i,detail:r.originalDetail})}}),i={addEventListener:{configurable:!0,value:r.addEventListener},removeEventListener:{configurable:!0,value:r.removeEventListener},dispatchEvent:{configurable:!0,value:r.dispatchEvent},error:{configurable:!0,enumerable:!0,get(){return mt(e.error)}},play:{configurable:!0,value:()=>t.call(`play`,[])},pause:{configurable:!0,value:()=>{t.call(`pause`,[]).catch(()=>{})}},load:{configurable:!0,value:()=>{t.call(`load`,[]).catch(()=>{})}},requestPictureInPicture:{configurable:!0,value:()=>t.call(`requestPictureInPicture`,[])},exitPictureInPicture:{configurable:!0,value:()=>t.call(`exitPictureInPicture`,[])},HAVE_FUTURE_DATA:{enumerable:!0,value:3},HAVE_ENOUGH_DATA:{enumerable:!0,value:4}};for(let n of V)i[n]={configurable:!0,enumerable:!0,get(){return e[n]},set(r){e[n]=r,t.set(n,r).then(t=>{Object.assign(e,t)},()=>{})}};for(let t of H)i[t]={configurable:!0,enumerable:!0,get(){return e[t]}};for(let t of U)i[t]={configurable:!0,enumerable:!0,get(){return pt(e[t])}};return Object.defineProperties(n,i),n},Y=e=>J(q(e),_t(e)),X=e=>typeof e==`object`&&!!e&&e[W]===!0,Z=(e,t)=>{let n=e;return{...r.BoxBase,type:B,initialState:n[G],controller:(0,r.recursiveBox)(n[K],t)}},Q=(e,t)=>{let n=(0,r.recursiveRevive)(e.controller,t);return J({...e.initialState},n)},vt=e=>[dt,...e],yt=n({resolve:()=>xt,type:()=>bt}),bt=`videoElement`,xt=(e,t={})=>{let n=L(e.elements);if(!(n instanceof HTMLVideoElement))throw Error(`videoElement: expected <video>, got <${n.tagName.toLowerCase()}>`);return Y(n)},$=`locator`,St=[c,{...y,nextLocatorType:`frameLocator`},ye,Ce,De,je,Fe],Ct=[Re,Ve,Ge,Je,Ze,et,rt,ot,yt],wt={type:$,selectorModules:St,operationModules:Ct},Tt=F({ownType:$,selectorModules:St,operationModules:Ct});Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return ve}});
|
|
@@ -34,7 +34,7 @@ var r = Object.defineProperty, i = (e, t) => () => (t || e((t = { exports: {} })
|
|
|
34
34
|
fragment: typeof e == "string" ? e : "?",
|
|
35
35
|
separator: "descend"
|
|
36
36
|
}), m = (e) => typeof e == "object" && !!e, h = (e) => m(e) && e.FKN_WEB_EXTENSION_FRAME_ANNOUNCE_KEY === !0 && typeof e.frameId == "string", g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new Set(), y = (e) => (v.add(e), () => v.delete(e));
|
|
37
|
-
window.addEventListener("message", (e) => {
|
|
37
|
+
typeof window < "u" && window.addEventListener("message", (e) => {
|
|
38
38
|
if (!h(e.data)) return;
|
|
39
39
|
e.stopImmediatePropagation();
|
|
40
40
|
let t = e.source;
|
|
@@ -76,7 +76,7 @@ var b = (e) => {
|
|
|
76
76
|
}), re = "owner", ie = (e) => {
|
|
77
77
|
throw Error("owner: must be processed by the executor as an upward pivot");
|
|
78
78
|
}, ae = async () => {
|
|
79
|
-
let { backgroundResolvers: e } = await import("./background-
|
|
79
|
+
let { backgroundResolvers: e } = await import("./background-DkW0j6iK.js"), t = await (await e).getParentFrameId();
|
|
80
80
|
if (!t) throw Error("owner: already at top frame");
|
|
81
81
|
return t;
|
|
82
82
|
}, oe = () => ({
|
|
@@ -648,7 +648,7 @@ var le = class {
|
|
|
648
648
|
operationModules: N
|
|
649
649
|
});
|
|
650
650
|
//#endregion
|
|
651
|
-
//#region
|
|
651
|
+
//#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/factory.js
|
|
652
652
|
function F(e) {
|
|
653
653
|
return (t, n = []) => ({
|
|
654
654
|
...Object.fromEntries(e.selectorModules.map((r) => [r.type, (...i) => {
|
|
@@ -663,7 +663,7 @@ function F(e) {
|
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
665
|
//#endregion
|
|
666
|
-
//#region
|
|
666
|
+
//#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/selectors/get-by-role.js
|
|
667
667
|
var xe = /* @__PURE__ */ a({
|
|
668
668
|
render: () => we,
|
|
669
669
|
resolve: () => Ce,
|
package/package.json
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fkn/lib",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"buffer": "^
|
|
9
|
-
"dns-packet": "^5.6.1",
|
|
8
|
+
"buffer": "^5.7.1",
|
|
10
9
|
"events": "^3.3.0",
|
|
11
10
|
"ip-address": "^10.1.0",
|
|
12
11
|
"osra": "^0.4.0",
|
|
13
12
|
"stream": "^0.0.3"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"webextension-polyfill": "^0.12.0"
|
|
17
13
|
}
|
|
18
14
|
}
|
package/locator-i9-DjgYk.cjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let u=require(`osra`);var d=3e4,f=50,p=e=>{let t=e[e.length-1];return typeof t==`object`&&t&&`timeout`in t&&typeof t.timeout==`number`?t.timeout:d},m=async(e,t,n,r)=>{let i=e,a=p(r),o=Date.now()+a,s=Error(`Locator timeout (${a}ms): ${n}`),{promise:c,reject:l}=Promise.withResolvers(),u=setTimeout(()=>l(s),a),d=s;try{for(;Date.now()<o;)try{return await Promise.race([i(t,n,r),c])}catch(e){if(e===s)break;d=e;let t=o-Date.now();if(t<=0)break;await new Promise(e=>setTimeout(e,Math.min(f,t)))}}finally{clearTimeout(u)}throw d},h=s({render:()=>v,resolve:()=>_,type:()=>g}),g=`locator`,_=(e,t)=>e.elements.flatMap(e=>[...e.querySelectorAll(t)]),v=e=>({fragment:typeof e==`string`?e:`?`,separator:`descend`}),y=e=>typeof e==`object`&&!!e,b=e=>y(e)&&e.FKN_WEB_EXTENSION_FRAME_ANNOUNCE_KEY===!0&&typeof e.frameId==`string`,x=new WeakMap,S=new WeakMap,C=new Set,ee=e=>(C.add(e),()=>C.delete(e));window.addEventListener(`message`,e=>{if(!b(e.data))return;e.stopImmediatePropagation();let t=e.source;if(!t||typeof t!=`object`)return;let n=t,r=x.get(n),i=e.data.frameId;if(x.set(n,i),r)for(let e of C)e(r);let a=S.get(n);if(a){S.delete(n);for(let e of a)e(i)}},{capture:!0});var te=e=>{let t=e.contentWindow;if(!t)return Promise.reject(Error(`frameLocator: <iframe> has no contentWindow`));let n=x.get(t);return n?Promise.resolve(n):new Promise(e=>{let n=S.get(t)??[];n.push(e),S.set(t,n)})},w=s({render:()=>ae,resolve:()=>re,resolvePeer:()=>ie,type:()=>ne}),ne=`frameLocator`,re=(e,t)=>e.elements.flatMap(e=>[...e.querySelectorAll(t)]).filter(e=>e instanceof HTMLIFrameElement),ie=async({parts:e,selfIndex:t,resolveLocal:n})=>{let r=n(e.slice(0,t+1))[0];if(!r)throw Error(`frameLocator: no <iframe> matched`);if(!(r instanceof HTMLIFrameElement))throw Error(`frameLocator: expected <iframe>, got <${r.tagName.toLowerCase()}>`);return te(r)},ae=e=>({fragment:typeof e==`string`?e:`?`,separator:`frame-down`}),oe=s({render:()=>ue,resolve:()=>ce,resolvePeer:()=>le,type:()=>se}),se=`owner`,ce=e=>{throw Error(`owner: must be processed by the executor as an upward pivot`)},le=async()=>{let{backgroundResolvers:e}=await Promise.resolve().then(()=>require(`./background-CJX0MYvT.cjs`)),t=await(await e).getParentFrameId();if(!t)throw Error(`owner: already at top frame`);return t},ue=()=>({fragment:``,separator:`frame-up`}),de=class extends Error{reason;filename;line;column;source;constructor(e,t,n,r,i){super(`${e}:${n}:${r}: ${t}`),this.reason=t,this.filename=e,this.line=n,this.column=r,this.source=i}},fe=class{start;end;source;constructor(e,t,n){this.start=e,this.end=t,this.source=n}},T;(function(e){e.stylesheet=`stylesheet`,e.rule=`rule`,e.declaration=`declaration`,e.comment=`comment`,e.container=`container`,e.charset=`charset`,e.document=`document`,e.customMedia=`custom-media`,e.fontFace=`font-face`,e.host=`host`,e.import=`import`,e.keyframes=`keyframes`,e.keyframe=`keyframe`,e.layer=`layer`,e.media=`media`,e.namespace=`namespace`,e.page=`page`,e.startingStyle=`starting-style`,e.supports=`supports`})(T||={});var E=(e,t,n)=>{let r=n,i=1e4;do{let n=t.map(t=>e.indexOf(t,r));n.push(e.indexOf(`\\`,r));let a=n.filter(e=>e!==-1);if(a.length===0)return-1;let o=Math.min(...a);if(e[o]!==`\\`)return o;r=o+2,i--}while(i>0);throw Error(`Too many escaping`)},D=(e,t,n)=>{let r=n,i=1e4;do{let n=t.map(t=>e.indexOf(t,r));n.push(e.indexOf(`(`,r)),n.push(e.indexOf(`"`,r)),n.push(e.indexOf(`'`,r)),n.push(e.indexOf(`\\`,r));let a=n.filter(e=>e!==-1);if(a.length===0)return-1;let o=Math.min(...a);switch(e[o]){case`\\`:r=o+2;break;case`(`:{let t=D(e,[`)`],o+1);if(t===-1)return-1;r=t+1}break;case`"`:{let t=E(e,[`"`],o+1);if(t===-1)return-1;r=t+1}break;case`'`:{let t=E(e,[`'`],o+1);if(t===-1)return-1;r=t+1}break;default:return o}i--}while(i>0);throw Error(`Too many escaping`)},O=/\/\*[^]*?(?:\*\/|$)/g;function k(e){return e?e.trim():``}function A(e,t){let n=e&&typeof e.type==`string`,r=n?e:t;for(let t in e){let n=e[t];Array.isArray(n)?n.forEach(e=>{A(e,r)}):n&&typeof n==`object`&&A(n,r)}return n&&Object.defineProperty(e,`parent`,{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var pe=class{level=0;indentation=` `;compress=!1;constructor(e){typeof e?.indent==`string`&&(this.indentation=e?.indent),e?.compress&&(this.compress=!0)}emit(e,t){return e}indent(e){return this.level=this.level||1,e?(this.level+=e,``):Array(this.level).join(this.indentation)}visit(e){switch(e.type){case T.stylesheet:return this.stylesheet(e);case T.rule:return this.rule(e);case T.declaration:return this.declaration(e);case T.comment:return this.comment(e);case T.container:return this.container(e);case T.charset:return this.charset(e);case T.document:return this.document(e);case T.customMedia:return this.customMedia(e);case T.fontFace:return this.fontFace(e);case T.host:return this.host(e);case T.import:return this.import(e);case T.keyframes:return this.keyframes(e);case T.keyframe:return this.keyframe(e);case T.layer:return this.layer(e);case T.media:return this.media(e);case T.namespace:return this.namespace(e);case T.page:return this.page(e);case T.startingStyle:return this.startingStyle(e);case T.supports:return this.supports(e)}}mapVisit(e,t){let n=``;t||=``;for(let r=0,i=e.length;r<i;r++)n+=this.visit(e[r]),t&&r<i-1&&(n+=this.emit(t));return n}compile(e){return this.compress?e.stylesheet.rules.map(this.visit,this).join(``):this.stylesheet(e)}stylesheet(e){return this.mapVisit(e.stylesheet.rules,`
|
|
2
|
-
|
|
3
|
-
`)}comment(e){return this.compress?this.emit(``,e.position):this.emit(`${this.indent()}/*${e.comment}*/`,e.position)}container(e){return this.compress?this.emit(`@container ${e.container}`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`${this.indent()}@container ${e.container}`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
4
|
-
|
|
5
|
-
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`)}layer(e){return this.compress?this.emit(`@layer ${e.layer}`,e.position)+(e.rules?this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):`;`):this.emit(`${this.indent()}@layer ${e.layer}`,e.position)+(e.rules?this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
6
|
-
|
|
7
|
-
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`):`;`)}import(e){return this.emit(`@import ${e.import};`,e.position)}media(e){return this.compress?this.emit(`@media ${e.media}`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`${this.indent()}@media ${e.media}`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
8
|
-
|
|
9
|
-
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`)}document(e){let t=`@${e.vendor||``}document ${e.document}`;return this.compress?this.emit(t,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(t,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
10
|
-
|
|
11
|
-
`)+this.emit(`${this.indent(-1)}\n}`)}charset(e){return this.emit(`@charset ${e.charset};`,e.position)}namespace(e){return this.emit(`@namespace ${e.namespace};`,e.position)}startingStyle(e){return this.compress?this.emit(`@starting-style`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`${this.indent()}@starting-style`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
12
|
-
|
|
13
|
-
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`)}supports(e){return this.compress?this.emit(`@supports ${e.supports}`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`${this.indent()}@supports ${e.supports}`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
14
|
-
|
|
15
|
-
`)+this.emit(`\n${this.indent(-1)}${this.indent()}}`)}keyframes(e){return this.compress?this.emit(`@${e.vendor||``}keyframes ${e.name}`,e.position)+this.emit(`{`)+this.mapVisit(e.keyframes)+this.emit(`}`):this.emit(`@${e.vendor||``}keyframes ${e.name}`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.keyframes,`
|
|
16
|
-
`)+this.emit(`${this.indent(-1)}}`)}keyframe(e){let t=e.declarations;return this.compress?this.emit(e.values.join(`,`),e.position)+this.emit(`{`)+this.mapVisit(t)+this.emit(`}`):this.emit(this.indent())+this.emit(e.values.join(`, `),e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(t,`
|
|
17
|
-
`)+this.emit(`${this.indent(-1)}\n${this.indent()}}\n`)}page(e){if(this.compress){let t=e.selectors.length?e.selectors.join(`, `):``;return this.emit(`@page ${t}`,e.position)+this.emit(`{`)+this.mapVisit(e.declarations)+this.emit(`}`)}let t=e.selectors.length?`${e.selectors.join(`, `)} `:``;return this.emit(`@page ${t}`,e.position)+this.emit(`{
|
|
18
|
-
`)+this.emit(this.indent(1))+this.mapVisit(e.declarations,`
|
|
19
|
-
`)+this.emit(this.indent(-1))+this.emit(`
|
|
20
|
-
}`)}fontFace(e){return this.compress?this.emit(`@font-face`,e.position)+this.emit(`{`)+this.mapVisit(e.declarations)+this.emit(`}`):this.emit(`@font-face `,e.position)+this.emit(`{
|
|
21
|
-
`)+this.emit(this.indent(1))+this.mapVisit(e.declarations,`
|
|
22
|
-
`)+this.emit(this.indent(-1))+this.emit(`
|
|
23
|
-
}`)}host(e){return this.compress?this.emit(`@host`,e.position)+this.emit(`{`)+this.mapVisit(e.rules)+this.emit(`}`):this.emit(`@host`,e.position)+this.emit(` {\n${this.indent(1)}`)+this.mapVisit(e.rules,`
|
|
24
|
-
|
|
25
|
-
`)+this.emit(`${this.indent(-1)}\n}`)}customMedia(e){return this.emit(`@custom-media ${e.name} ${e.media};`,e.position)}rule(e){let t=e.declarations;if(!t.length)return``;if(this.compress)return this.emit(e.selectors.join(`,`),e.position)+this.emit(`{`)+this.mapVisit(t)+this.emit(`}`);let n=this.indent();return this.emit(e.selectors.map(e=>n+e).join(`,
|
|
26
|
-
`),e.position)+this.emit(` {
|
|
27
|
-
`)+this.emit(this.indent(1))+this.mapVisit(t,`
|
|
28
|
-
`)+this.emit(this.indent(-1))+this.emit(`\n${this.indent()}}`)}declaration(e){return this.compress?this.emit(`${e.property}:${e.value}`,e.position)+this.emit(`;`):e.property===`grid-template-areas`?this.emit(this.indent())+this.emit(e.property+`: `+e.value.split(`
|
|
29
|
-
`).join(`
|
|
30
|
-
`.padEnd(22)+this.indent()),e.position)+this.emit(`;`):this.emit(this.indent())+this.emit(`${e.property}: ${e.value}`,e.position)+this.emit(`;`)}},me=(e,t)=>{t||={};let n=1,r=1;function i(){let e={line:n,column:r};return i=>(i.position=new fe(e,{line:n,column:r},t?.source||``),d(),i)}let a=[];function o(i){let o=new de(t?.source||``,i,n,r,e);if(!t?.silent)throw o;a.push(o)}function s(){let t=/^{\s*/.exec(e);return!!t&&(u(t),!0)}function c(){let t=/^}/.exec(e);return!!t&&(u(t),!0)}function l(){let t,n=[];for(d(),f(n);e.length&&e.charAt(0)!==`}`&&(t=S()||C(),t);)n.push(t),f(n);return n}function u(t){let i=t[0];return function(e){let t=e.match(/\n/g);t&&(n+=t.length);let i=e.lastIndexOf(`
|
|
31
|
-
`);r=~i?e.length-i:r+e.length}(i),e=e.slice(i.length),t}function d(){let t=/^\s*/.exec(e);t&&u(t)}function f(e){e||=[];let t=p();for(;t;)e.push(t),t=p();return e}function p(){let t=i();if(e.charAt(0)!==`/`||e.charAt(1)!==`*`)return;let n=/^\/\*[^]*?\*\//.exec(e);return n?(u(n),t({type:T.comment,comment:n[0].slice(2,-2)})):o(`End of comment missing`)}function m(){let t=/^([^{]+)/.exec(e);if(t)return u(t),((e,t)=>{let n=[],r=0;for(;r<e.length;){let i=D(e,t,r);if(i===-1)return n.push(e.substring(r)),n;n.push(e.substring(r,i)),r=i+1}return n})(k(t[0]).replace(O,``),[`,`]).map(e=>k(e))}function h(){let t=i(),n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);if(!n)return;u(n);let r=k(n[0]),a=/^:\s*/.exec(e);if(!a)return o(`property missing ':'`);u(a);let s=``,c=D(e,[`;`,`}`]);c!==-1&&(s=e.substring(0,c),u([s]),s=k(s).replace(O,``));let l=t({type:T.declaration,property:r.replace(O,``),value:s}),d=/^[;\s]*/.exec(e);return d&&u(d),l}function g(){let e=[];if(!s())return o(`missing '{'`);f(e);let t=h();for(;t;)e.push(t),f(e),t=h();return c()?e:o(`missing '}'`)}function _(){let t=[],n=i(),r=/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);for(;r;){let n=u(r);t.push(n[1]);let i=/^,\s*/.exec(e);i&&u(i),r=/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e)}if(t.length)return n({type:T.keyframe,values:t,declarations:g()||[]})}let v=x(`import`),y=x(`charset`),b=x(`namespace`);function x(t){let n=RegExp(`^@`+t+`\\s*((?::?[^;'"]|"(?:\\\\"|[^"])*?"|'(?:\\\\'|[^'])*?')+)(?:;|$)`);return()=>{let r=i(),a=n.exec(e);if(!a)return;let o=u(a),s={type:t};return s[t]=o[1].trim(),r(s)}}function S(){if(e[0]===`@`)return function(){let t=i(),n=/^@([-\w]+)?keyframes\s*/.exec(e);if(!n)return;let r=u(n)[1],a=/^([-\w]+)\s*/.exec(e);if(!a)return o(`@keyframes missing name`);let l=u(a)[1];if(!s())return o(`@keyframes missing '{'`);let d=f(),p=_();for(;p;)d.push(p),d=d.concat(f()),p=_();return c()?t({type:T.keyframes,name:l,vendor:r,keyframes:d}):o(`@keyframes missing '}'`)}()||function(){let t=i(),n=/^@media *([^{]+)/.exec(e);if(!n)return;let r=k(u(n)[1]);if(!s())return o(`@media missing '{'`);let a=f().concat(l());return c()?t({type:T.media,media:r,rules:a}):o(`@media missing '}'`)}()||function(){let t=i(),n=/^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);if(!n)return;let r=u(n);return t({type:T.customMedia,name:k(r[1]),media:k(r[2])})}()||function(){let t=i(),n=/^@supports *([^{]+)/.exec(e);if(!n)return;let r=k(u(n)[1]);if(!s())return o(`@supports missing '{'`);let a=f().concat(l());return c()?t({type:T.supports,supports:r,rules:a}):o(`@supports missing '}'`)}()||v()||y()||b()||function(){let t=i(),n=/^@([-\w]+)?document *([^{]+)/.exec(e);if(!n)return;let r=u(n),a=k(r[1]),d=k(r[2]);if(!s())return o(`@document missing '{'`);let p=f().concat(l());return c()?t({type:T.document,document:d,vendor:a,rules:p}):o(`@document missing '}'`)}()||function(){let t=i(),n=/^@page */.exec(e);if(!n)return;u(n);let r=m()||[];if(!s())return o(`@page missing '{'`);let a=f(),l=h();for(;l;)a.push(l),a=a.concat(f()),l=h();return c()?t({type:T.page,selectors:r,declarations:a}):o(`@page missing '}'`)}()||function(){let t=i(),n=/^@host\s*/.exec(e);if(!n)return;if(u(n),!s())return o(`@host missing '{'`);let r=f().concat(l());return c()?t({type:T.host,rules:r}):o(`@host missing '}'`)}()||function(){let t=i(),n=/^@font-face\s*/.exec(e);if(!n)return;if(u(n),!s())return o(`@font-face missing '{'`);let r=f(),a=h();for(;a;)r.push(a),r=r.concat(f()),a=h();return c()?t({type:T.fontFace,declarations:r}):o(`@font-face missing '}'`)}()||function(){let t=i(),n=/^@container *([^{]+)/.exec(e);if(!n)return;let r=k(u(n)[1]);if(!s())return o(`@container missing '{'`);let a=f().concat(l());return c()?t({type:T.container,container:r,rules:a}):o(`@container missing '}'`)}()||function(){let t=i(),n=/^@starting-style\s*/.exec(e);if(!n)return;if(u(n),!s())return o(`@starting-style missing '{'`);let r=f().concat(l());return c()?t({type:T.startingStyle,rules:r}):o(`@starting-style missing '}'`)}()||function(){let t=i(),n=/^@layer *([^{;@]+)/.exec(e);if(!n)return;let r=k(u(n)[1]);if(!s()){let n=/^[;\s]*/.exec(e);return n&&u(n),t({type:T.layer,layer:r})}let a=f().concat(l());return c()?t({type:T.layer,layer:r,rules:a}):o(`@layer missing '}'`)}()}function C(){let e=i(),t=m();return t?(f(),e({type:T.rule,selectors:t,declarations:g()||[]})):o(`selector missing`)}return A(function(){let e=l();return{type:T.stylesheet,stylesheet:{source:t?.source,rules:e,parsingErrors:a}}}())},he=(e,t)=>new pe(t||{}).compile(e),ge=s({resolve:()=>Se,type:()=>_e}),_e=`addStyleTag`,ve=/(?:^|[^\w-])(?:url|image|image-set|cross-fade|paint|element|expression)\s*\(/i,ye=e=>e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(e,t)=>String.fromCodePoint(Number.parseInt(t,16))).replace(/\\(.)/g,`$1`),j=e=>!ve.test(ye(e.value)),M=e=>{let t=[];for(let n of e)switch(n.type){case T.import:case T.fontFace:case T.namespace:case T.charset:case T.document:case T.comment:continue;case T.rule:case T.page:t.push({...n,declarations:n.declarations.filter(e=>e.type!==T.declaration||j(e))});continue;case T.media:case T.supports:case T.container:case T.host:case T.startingStyle:t.push({...n,rules:M(n.rules)});continue;case T.layer:t.push({...n,rules:n.rules?M(n.rules):void 0});continue;case T.keyframes:t.push({...n,keyframes:n.keyframes.map(e=>e.type===T.keyframe?{...e,declarations:e.declarations.filter(e=>e.type!==T.declaration||j(e))}:e)});continue;default:continue}return t},be=e=>{let t;try{t=me(e,{silent:!0})}catch{return``}return t.stylesheet.rules=M(t.stylesheet.rules),he(t)},xe=e=>{let t=()=>{e.parentNode||(document.head??document.documentElement).appendChild(e)};t();let n=new MutationObserver(n=>{for(let r of n)for(let n of r.removedNodes)if(n===e||n.contains?.(e)){t();return}});n.observe(document.documentElement,{childList:!0,subtree:!0}),window.addEventListener(`load`,()=>n.disconnect(),{once:!0})},Se=async(e,t)=>{let n=document.createElement(`style`);n.textContent=t.noSanitize?t.content:be(t.content);try{xe(n)}catch(e){console.error(e)}},N=`frameLocator`,P=[{...h,nextLocatorType:`locator`},w,oe],F=[ge],Ce={type:N,selectorModules:P,operationModules:F},I=L({ownType:N,selectorModules:P,operationModules:F});function L(e){return(t,n=[])=>({...Object.fromEntries(e.selectorModules.map(r=>[r.type,(...i)=>{let a=[...n,{locatorType:e.ownType,type:r.type,args:i}];return(r.nextLocatorType??e.ownType)===`locator`?Mt(t,a):I(t,a)}])),...Object.fromEntries(e.operationModules.map(({type:e})=>[e,(...r)=>m(t,n,e,r)]))})}var we=s({render:()=>De,resolve:()=>Ee,type:()=>Te}),Te=`getByRole`,Ee=(e,t)=>e.elements.flatMap(e=>[...e.querySelectorAll(`[role="${CSS.escape(t)}"]`)]),De=e=>({fragment:typeof e==`string`?`[role="${e.replaceAll(`"`,`\\"`)}"]`:`[role]`}),Oe=s({render:()=>je,resolve:()=>Ae,type:()=>ke}),ke=`getByText`,Ae=(e,t)=>e.elements.flatMap(e=>[e,...e.querySelectorAll(`*`)]).filter(e=>e.textContent?.includes(t)),je=e=>({fragment:typeof e==`string`?`:has-text("${e.replaceAll(`"`,`\\"`)}")`:`:has-text(...)`}),Me=s({render:()=>Fe,resolve:()=>Pe,type:()=>Ne}),Ne=`getByTestId`,Pe=(e,t)=>e.elements.flatMap(e=>[...e.querySelectorAll(`[data-testid="${CSS.escape(t)}"]`)]),Fe=e=>({fragment:typeof e==`string`?`[data-testid="${e.replaceAll(`"`,`\\"`)}"]`:`[data-testid]`}),Ie=s({render:()=>ze,resolve:()=>Re,type:()=>Le}),Le=`first`,Re=e=>e.elements.slice(0,1),ze=()=>({fragment:`:first`}),Be=s({render:()=>He,resolve:()=>Ve,type:()=>`nth`}),Ve=(e,t)=>{let n=e.elements.at(t);return n?[n]:[]},He=e=>({fragment:typeof e==`number`?`:nth(${e})`:`:nth(?)`}),R=e=>{let t=Error(e);return t.name=`LocatorError`,t},z=e=>{if(e.length===0)throw R(`No elements found`);if(e.length>1)throw R(`Strict mode violation: locator resolved to ${e.length} elements`);return e[0]},Ue=s({resolve:()=>Ge,type:()=>We}),We=`click`,Ge=(e,t={})=>{let n=z(e.elements),r=n.getBoundingClientRect(),i=t.position?.x??.5,a=t.position?.y??.5,o={bubbles:!0,cancelable:!0,composed:!0,clientX:r.left+r.width*i,clientY:r.top+r.height*a,button:0},s={...o,buttons:1,pointerType:`mouse`,pointerId:1,isPrimary:!0},c={...o,buttons:1},l={...o,buttons:0};n.dispatchEvent(new PointerEvent(`pointerdown`,s)),n.dispatchEvent(new MouseEvent(`mousedown`,c)),n.dispatchEvent(new PointerEvent(`pointerup`,{...s,buttons:0})),n.dispatchEvent(new MouseEvent(`mouseup`,l)),n.dispatchEvent(new MouseEvent(`click`,l))},Ke=s({resolve:()=>Ye,type:()=>qe}),qe=`fill`,B=(e,t)=>{e._valueTracker?.setValue(``);let n=e instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`)?.set;r?r.call(e,t):e.value=t},Je=(e,t)=>{if(e.type!==`range`)return null;let n=Number(e.min||0),r=Number(e.max||100);if(!Number.isFinite(n)||!Number.isFinite(r)||r<=n)return null;let i=Number(t);if(!Number.isFinite(i))return null;let a=Math.max(0,Math.min(1,(i-n)/(r-n))),o=e.getBoundingClientRect(),s={bubbles:!0,cancelable:!0,composed:!0,clientX:o.left+o.width*a,clientY:o.top+o.height/2,button:0};return{pointerDown:{...s,buttons:1,pointerType:`mouse`,pointerId:1,isPrimary:!0},pointerUp:{...s,buttons:0,pointerType:`mouse`,pointerId:1,isPrimary:!0},mouseDown:{...s,buttons:1},mouseUp:{...s,buttons:0}}},Ye=(e,t,n={})=>{let r=z(e.elements);if(r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement){let e=r instanceof HTMLInputElement?Je(r,t):null;if(e){r.dispatchEvent(new PointerEvent(`pointerdown`,e.pointerDown)),r.dispatchEvent(new MouseEvent(`mousedown`,e.mouseDown)),B(r,t),r.dispatchEvent(new Event(`input`,{bubbles:!0})),r.dispatchEvent(new PointerEvent(`pointerup`,e.pointerUp)),r.dispatchEvent(new MouseEvent(`mouseup`,e.mouseUp)),r.dispatchEvent(new Event(`change`,{bubbles:!0}));return}B(r,t),r.dispatchEvent(new Event(`input`,{bubbles:!0})),r.dispatchEvent(new Event(`change`,{bubbles:!0}));return}if(r instanceof HTMLElement&&r.isContentEditable){r.textContent=t,r.dispatchEvent(new Event(`input`,{bubbles:!0}));return}throw Error(`fill: element <${r.tagName.toLowerCase()}> is not fillable`)},Xe=s({resolve:()=>Qe,type:()=>Ze}),Ze=`hover`,Qe=(e,t={})=>{let n=z(e.elements);n.dispatchEvent(new MouseEvent(`mouseenter`,{bubbles:!1,cancelable:!0})),n.dispatchEvent(new MouseEvent(`mouseover`,{bubbles:!0,cancelable:!0})),n.dispatchEvent(new MouseEvent(`mousemove`,{bubbles:!0,cancelable:!0}))},$e=s({resolve:()=>tt,type:()=>et}),et=`textContent`,tt=(e,t={})=>z(e.elements).textContent,nt=s({resolve:()=>it,type:()=>rt}),rt=`isVisible`,it=(e,t={})=>{let n=z(e.elements);if(!(n instanceof HTMLElement))return!0;let r=n.ownerDocument.defaultView?.getComputedStyle(n);if(r?.display===`none`||r?.visibility===`hidden`)return!1;let i=n.getBoundingClientRect();return i.width>0&&i.height>0},at=s({resolve:()=>st,type:()=>ot}),ot=`count`,st=(e,t={})=>e.elements.length,ct=s({resolve:()=>ut,type:()=>lt}),lt=`exists`,ut=(e,t={})=>e.elements.length>0,dt=s({resolve:()=>pt,type:()=>ft}),ft=`getAttribute`,pt=(e,t,n={})=>z(e.elements).getAttribute(t),mt=(e,t)=>{let n=new EventTarget,r=new Map,i=EventTarget.prototype.addEventListener.bind(n),a=EventTarget.prototype.removeEventListener.bind(n);return Object.defineProperty(n,`addEventListener`,{configurable:!0,value:(a,o,s)=>{if(o!==null){if(!r.has(a)){let i=r=>{n.dispatchEvent(new CustomEvent(a,{detail:t(r,e),bubbles:r.bubbles,cancelable:r.cancelable,composed:r.composed}))};e.addEventListener(a,i),r.set(a,i)}i(a,o,s)}}}),Object.defineProperty(n,`removeEventListener`,{configurable:!0,value:(t,n,i)=>{if(n===null)return;a(t,n,i);let o=r.get(t);o&&(e.removeEventListener(t,o),r.delete(t))}}),n},V=e=>typeof e==`boolean`?e?1:0:e?.capture?1:0,ht=e=>{let t=new WeakMap;return{addEventListener:(n,r,i)=>{if(r===null)return;let a=`${n}|${V(i)}`,o=t.get(r);if(o||(o=new Map,t.set(r,o)),o.has(a))return;let s=typeof i==`object`&&!!i&&!!i.once,c=t=>{s&&o.delete(a);let i=e.unenrich(t,n);typeof r==`function`?r.call(e.target,i):r.handleEvent(i)};o.set(a,c),e.remoteEvents.addEventListener(n,c,i)},removeEventListener:(n,r,i)=>{if(r===null)return;let a=`${n}|${V(i)}`,o=t.get(r),s=o?.get(a);s&&(e.remoteEvents.removeEventListener(n,s,i),o.delete(a))},dispatchEvent:t=>e.remoteEvents.dispatchEvent(t)}},gt=s({box:()=>wt,createVideoElementHandle:()=>Z,isType:()=>Ct,revive:()=>Tt,type:()=>H}),H=`videoElement`,U=[`currentTime`,`volume`,`muted`,`playbackRate`,`src`,`loop`,`autoplay`,`preload`,`poster`,`disableRemotePlayback`],W=[`duration`,`paused`,`ended`,`seeking`,`readyState`,`currentSrc`],G=[`buffered`,`seekable`],K=Symbol.for(`fkn.remoteVideoElement`),q=Symbol.for(`fkn.remoteVideoElement.state`),J=Symbol.for(`fkn.remoteVideoElement.controller`),_t=e=>e?Array.from({length:e.length},(t,n)=>[e.start(n),e.end(n)]):[],Y=e=>{let t={};for(let n of[...U,...W])t[n]=e[n];for(let n of G)t[n]=_t(e[n]);return t.error=e.error?{code:e.error.code,message:e.error.message}:null,t},vt=e=>{let t=t=>{if(!Number.isInteger(t)||t<0||t>=e.length)throw new DOMException(`Index or size is negative or greater than the allowed amount`,`IndexSizeError`)};return{get length(){return e.length},start(n){return t(n),e[n][0]},end(n){return t(n),e[n][1]}}},yt=e=>e?{code:e.code,message:e.message,MEDIA_ERR_ABORTED:1,MEDIA_ERR_NETWORK:2,MEDIA_ERR_DECODE:3,MEDIA_ERR_SRC_NOT_SUPPORTED:4}:null,bt=e=>mt(e,(e,t)=>({originalDetail:e instanceof CustomEvent?e.detail:null,snapshot:Y(t)})),xt=async(e,t)=>{switch(t){case`play`:return await e.play(),null;case`pause`:return e.pause(),null;case`load`:return e.load(),null;case`requestPictureInPicture`:if(typeof e.requestPictureInPicture!=`function`)throw Error(`requestPictureInPicture is not supported in this environment`);return await e.requestPictureInPicture(),null;case`exitPictureInPicture`:{let t=e.ownerDocument;if(typeof t?.exitPictureInPicture!=`function`)throw Error(`exitPictureInPicture is not supported in this environment`);return await t.exitPictureInPicture(),null}default:throw Error(`videoElement: unknown method "${t}"`)}},St=e=>({call:async t=>xt(e,t),set:async(t,n)=>{try{e[t]=n}catch{}return Y(e)},events:bt(e)}),X=(e,t)=>{let n=new EventTarget;Object.defineProperty(n,K,{value:!0}),Object.defineProperty(n,q,{value:e}),Object.defineProperty(n,J,{value:t});let r=ht({target:n,remoteEvents:t.events,unenrich:(t,n)=>{if(!(t instanceof CustomEvent))return t;let r=t.detail;if(!r||!(`snapshot`in r))return t;Object.assign(e,r.snapshot);let i={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed};return r.originalDetail===null?new Event(n,i):new CustomEvent(n,{...i,detail:r.originalDetail})}}),i={addEventListener:{configurable:!0,value:r.addEventListener},removeEventListener:{configurable:!0,value:r.removeEventListener},dispatchEvent:{configurable:!0,value:r.dispatchEvent},error:{configurable:!0,enumerable:!0,get(){return yt(e.error)}},play:{configurable:!0,value:()=>t.call(`play`,[])},pause:{configurable:!0,value:()=>{t.call(`pause`,[]).catch(()=>{})}},load:{configurable:!0,value:()=>{t.call(`load`,[]).catch(()=>{})}},requestPictureInPicture:{configurable:!0,value:()=>t.call(`requestPictureInPicture`,[])},exitPictureInPicture:{configurable:!0,value:()=>t.call(`exitPictureInPicture`,[])},HAVE_FUTURE_DATA:{enumerable:!0,value:3},HAVE_ENOUGH_DATA:{enumerable:!0,value:4}};for(let n of U)i[n]={configurable:!0,enumerable:!0,get(){return e[n]},set(r){e[n]=r,t.set(n,r).then(t=>{Object.assign(e,t)},()=>{})}};for(let t of W)i[t]={configurable:!0,enumerable:!0,get(){return e[t]}};for(let t of G)i[t]={configurable:!0,enumerable:!0,get(){return vt(e[t])}};return Object.defineProperties(n,i),n},Z=e=>X(Y(e),St(e)),Ct=e=>typeof e==`object`&&!!e&&e[K]===!0,wt=(e,t)=>{let n=e;return{...u.BoxBase,type:H,initialState:n[q],controller:(0,u.recursiveBox)(n[J],t)}},Tt=(e,t)=>{let n=(0,u.recursiveRevive)(e.controller,t);return X({...e.initialState},n)},Et=e=>[gt,...e],Dt=s({resolve:()=>kt,type:()=>Ot}),Ot=`videoElement`,kt=(e,t={})=>{let n=z(e.elements);if(!(n instanceof HTMLVideoElement))throw Error(`videoElement: expected <video>, got <${n.tagName.toLowerCase()}>`);return Z(n)},Q=`locator`,At=[h,{...w,nextLocatorType:`frameLocator`},we,Oe,Me,Ie,Be],$=[Ue,Ke,Xe,$e,nt,at,ct,dt,Dt],jt={type:Q,selectorModules:At,operationModules:$},Mt=L({ownType:Q,selectorModules:At,operationModules:$});Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Ce}});
|