@fkn/lib 0.9.35 → 0.9.37
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/{api-CfmRAze5.d.ts → api-CZI08srV.d.ts} +1 -1
- package/api.d.ts +2 -2
- package/attach-policy.cjs +1 -1
- package/attach-policy.js +1 -1
- package/cloud/dns.d.ts +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/net.d.ts +1 -1
- package/cloud-Beg4iCRU.cjs +1 -0
- package/{cloud-DxitkM7z.d.ts → cloud-DCZv4XAf.d.ts} +3 -3
- package/cloud-EfyYfgVT.js +476 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +3 -3
- package/cloud.js +1 -1
- package/{contract-D37GGkou.d.ts → contract-_nWuFitS.d.ts} +58 -3
- package/contract.cjs +1 -1
- package/contract.d.ts +2 -2
- package/contract.js +6 -6
- package/dgram.d.ts +2 -2
- package/dns.d.ts +1 -1
- package/extension-B7jDaJVp.cjs +1 -0
- package/{extension-TRYu_aG-.d.ts → extension-CqOhrS15.d.ts} +3 -3
- package/extension-sNRjVbET.js +89 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +3 -3
- package/extension.js +3 -3
- package/hosts-9dYv63ud.cjs +1 -0
- package/{hosts-C4-8lWwz.js → hosts-BzbzOhG8.js} +41 -19
- package/http.d.ts +1 -1
- package/{index-C_Lqta5o.d.ts → index-BUviSXsX.d.ts} +200 -6
- package/index.cjs +1 -1
- package/index.d.ts +9 -6
- package/index.js +12 -12
- package/lib-DYKLnpWs.cjs +53 -0
- package/{lib-B-jGWfsv.js → lib-FD1Ssqjt.js} +628 -475
- package/{net-0SlODFSM.d.ts → net-eCY_QD4P.d.ts} +2 -2
- package/net.d.ts +1 -1
- package/package.json +1 -1
- package/packages.d.ts +1 -1
- package/{proxy-Bmb2wxG1.d.ts → proxy-CrTXoFQK.d.ts} +2 -2
- package/rooms.d.ts +1 -1
- package/cloud-B9Sd7V1g.js +0 -422
- package/cloud-DCWD_0sd.cjs +0 -1
- package/extension-DJQ0oYdk.js +0 -89
- package/extension-DSrUjoLw.cjs +0 -1
- package/hosts-DD4rDeQH.cjs +0 -1
- package/lib-Cjd91q7g.cjs +0 -53
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { _ as t, a as n, d as r,
|
|
3
|
-
import { BoxBase as ee, createTypedEventTarget as
|
|
2
|
+
import { _ as t, a as n, d as r, f as i, g as a, h as o, i as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m, v as h, y as g } from "./hosts-BzbzOhG8.js";
|
|
3
|
+
import { BoxBase as ee, createTypedEventTarget as _, expose as v, recursiveBox as te, recursiveRevive as ne } from "osra";
|
|
4
4
|
//#region ../web-extension/lib/lib/revivables/event-proxy.js
|
|
5
|
-
var
|
|
5
|
+
var re = (e, t) => {
|
|
6
6
|
let n = new EventTarget(), r = /* @__PURE__ */ new Map(), i = EventTarget.prototype.addEventListener.bind(n), a = EventTarget.prototype.removeEventListener.bind(n);
|
|
7
7
|
return Object.defineProperty(n, "addEventListener", {
|
|
8
8
|
configurable: !0,
|
|
@@ -31,12 +31,12 @@ var ne = (e, t) => {
|
|
|
31
31
|
o && (e.removeEventListener(t, o), r.delete(t));
|
|
32
32
|
}
|
|
33
33
|
}), n;
|
|
34
|
-
},
|
|
34
|
+
}, y = (e) => typeof e == "boolean" ? +!!e : +!!e?.capture, b = (e) => {
|
|
35
35
|
let t = /* @__PURE__ */ new WeakMap();
|
|
36
36
|
return {
|
|
37
37
|
addEventListener: (n, r, i) => {
|
|
38
38
|
if (r === null) return;
|
|
39
|
-
let a = `${n}|${
|
|
39
|
+
let a = `${n}|${y(i)}`, o = t.get(r);
|
|
40
40
|
if (o || (o = /* @__PURE__ */ new Map(), t.set(r, o)), o.has(a)) return;
|
|
41
41
|
let s = typeof i == "object" && !!i && !!i.once, c = (t) => {
|
|
42
42
|
s && o.delete(a);
|
|
@@ -47,18 +47,18 @@ var ne = (e, t) => {
|
|
|
47
47
|
},
|
|
48
48
|
removeEventListener: (n, r, i) => {
|
|
49
49
|
if (r === null) return;
|
|
50
|
-
let a = `${n}|${
|
|
50
|
+
let a = `${n}|${y(i)}`, o = t.get(r), s = o?.get(a);
|
|
51
51
|
s && (e.remoteEvents.removeEventListener(n, s, i), o.delete(a));
|
|
52
52
|
},
|
|
53
53
|
dispatchEvent: (t) => e.remoteEvents.dispatchEvent(t)
|
|
54
54
|
};
|
|
55
|
-
},
|
|
56
|
-
box: () =>
|
|
57
|
-
createVideoElementHandle: () =>
|
|
58
|
-
isType: () =>
|
|
59
|
-
revive: () =>
|
|
60
|
-
type: () =>
|
|
61
|
-
}),
|
|
55
|
+
}, x = /* @__PURE__ */ e({
|
|
56
|
+
box: () => ve,
|
|
57
|
+
createVideoElementHandle: () => w,
|
|
58
|
+
isType: () => _e,
|
|
59
|
+
revive: () => ye,
|
|
60
|
+
type: () => S
|
|
61
|
+
}), S = "videoElement", ie = [
|
|
62
62
|
"currentTime",
|
|
63
63
|
"volume",
|
|
64
64
|
"muted",
|
|
@@ -69,22 +69,22 @@ var ne = (e, t) => {
|
|
|
69
69
|
"preload",
|
|
70
70
|
"poster",
|
|
71
71
|
"disableRemotePlayback"
|
|
72
|
-
],
|
|
72
|
+
], ae = [
|
|
73
73
|
"duration",
|
|
74
74
|
"paused",
|
|
75
75
|
"ended",
|
|
76
76
|
"seeking",
|
|
77
77
|
"readyState",
|
|
78
78
|
"currentSrc"
|
|
79
|
-
],
|
|
79
|
+
], oe = ["buffered", "seekable"], se = Symbol.for("fkn.remoteVideoElement"), ce = Symbol.for("fkn.remoteVideoElement.state"), le = Symbol.for("fkn.remoteVideoElement.controller"), ue = (e) => e ? Array.from({ length: e.length }, (t, n) => [e.start(n), e.end(n)]) : [], C = (e) => {
|
|
80
80
|
let t = {};
|
|
81
|
-
for (let n of [...
|
|
82
|
-
for (let n of
|
|
81
|
+
for (let n of [...ie, ...ae]) t[n] = e[n];
|
|
82
|
+
for (let n of oe) t[n] = ue(e[n]);
|
|
83
83
|
return t.error = e.error ? {
|
|
84
84
|
code: e.error.code,
|
|
85
85
|
message: e.error.message
|
|
86
86
|
} : null, t;
|
|
87
|
-
},
|
|
87
|
+
}, de = (e) => {
|
|
88
88
|
let t = (t) => {
|
|
89
89
|
if (!Number.isInteger(t) || t < 0 || t >= e.length) throw new DOMException("Index or size is negative or greater than the allowed amount", "IndexSizeError");
|
|
90
90
|
};
|
|
@@ -99,17 +99,17 @@ var ne = (e, t) => {
|
|
|
99
99
|
return t(n), e[n][1];
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
},
|
|
102
|
+
}, fe = (e) => e ? {
|
|
103
103
|
code: e.code,
|
|
104
104
|
message: e.message,
|
|
105
105
|
MEDIA_ERR_ABORTED: 1,
|
|
106
106
|
MEDIA_ERR_NETWORK: 2,
|
|
107
107
|
MEDIA_ERR_DECODE: 3,
|
|
108
108
|
MEDIA_ERR_SRC_NOT_SUPPORTED: 4
|
|
109
|
-
} : null,
|
|
109
|
+
} : null, pe = (e) => re(e, (e, t) => ({
|
|
110
110
|
originalDetail: e instanceof CustomEvent ? e.detail : null,
|
|
111
|
-
snapshot:
|
|
112
|
-
})),
|
|
111
|
+
snapshot: C(t)
|
|
112
|
+
})), me = async (e, t) => {
|
|
113
113
|
switch (t) {
|
|
114
114
|
case "play": return await e.play(), null;
|
|
115
115
|
case "pause": return e.pause(), null;
|
|
@@ -124,19 +124,19 @@ var ne = (e, t) => {
|
|
|
124
124
|
}
|
|
125
125
|
default: throw Error(`videoElement: unknown method "${t}"`);
|
|
126
126
|
}
|
|
127
|
-
},
|
|
128
|
-
call: async (t) =>
|
|
127
|
+
}, he = (e) => ({
|
|
128
|
+
call: async (t) => me(e, t),
|
|
129
129
|
set: async (t, n) => {
|
|
130
130
|
try {
|
|
131
131
|
e[t] = n;
|
|
132
132
|
} catch {}
|
|
133
|
-
return
|
|
133
|
+
return C(e);
|
|
134
134
|
},
|
|
135
|
-
events:
|
|
136
|
-
}),
|
|
135
|
+
events: pe(e)
|
|
136
|
+
}), ge = (e, t) => {
|
|
137
137
|
let n = new EventTarget();
|
|
138
|
-
Object.defineProperty(n,
|
|
139
|
-
let r =
|
|
138
|
+
Object.defineProperty(n, se, { value: !0 }), Object.defineProperty(n, ce, { value: e }), Object.defineProperty(n, le, { value: t });
|
|
139
|
+
let r = b({
|
|
140
140
|
target: n,
|
|
141
141
|
remoteEvents: t.events,
|
|
142
142
|
unenrich: (t, n) => {
|
|
@@ -171,7 +171,7 @@ var ne = (e, t) => {
|
|
|
171
171
|
configurable: !0,
|
|
172
172
|
enumerable: !0,
|
|
173
173
|
get() {
|
|
174
|
-
return
|
|
174
|
+
return fe(e.error);
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
177
|
play: {
|
|
@@ -207,7 +207,7 @@ var ne = (e, t) => {
|
|
|
207
207
|
value: 4
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
|
-
for (let n of
|
|
210
|
+
for (let n of ie) i[n] = {
|
|
211
211
|
configurable: !0,
|
|
212
212
|
enumerable: !0,
|
|
213
213
|
get() {
|
|
@@ -219,43 +219,43 @@ var ne = (e, t) => {
|
|
|
219
219
|
}, () => {});
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
|
-
for (let t of
|
|
222
|
+
for (let t of ae) i[t] = {
|
|
223
223
|
configurable: !0,
|
|
224
224
|
enumerable: !0,
|
|
225
225
|
get() {
|
|
226
226
|
return e[t];
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
for (let t of
|
|
229
|
+
for (let t of oe) i[t] = {
|
|
230
230
|
configurable: !0,
|
|
231
231
|
enumerable: !0,
|
|
232
232
|
get() {
|
|
233
|
-
return
|
|
233
|
+
return de(e[t]);
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
236
|
return Object.defineProperties(n, i), n;
|
|
237
|
-
},
|
|
237
|
+
}, w = (e) => ge(C(e), he(e)), _e = (e) => typeof e == "object" && !!e && e[se] === !0, ve = (e, t) => {
|
|
238
238
|
let n = e;
|
|
239
239
|
return {
|
|
240
240
|
...ee,
|
|
241
|
-
type:
|
|
242
|
-
initialState: n[
|
|
243
|
-
controller:
|
|
241
|
+
type: S,
|
|
242
|
+
initialState: n[ce],
|
|
243
|
+
controller: te(n[le], t)
|
|
244
244
|
};
|
|
245
|
-
},
|
|
246
|
-
let n =
|
|
247
|
-
return
|
|
248
|
-
},
|
|
245
|
+
}, ye = (e, t) => {
|
|
246
|
+
let n = ne(e.controller, t);
|
|
247
|
+
return ge({ ...e.initialState }, n);
|
|
248
|
+
}, be = (e) => [x, ...e], xe = 3, Se = 0, Ce = "fknExtension", we = "fknExtensionAbi", Te = "fknExtensionOps", Ee = [
|
|
249
249
|
"data-fkn-extension",
|
|
250
250
|
"data-fkn-extension-abi",
|
|
251
251
|
"data-fkn-extension-ops"
|
|
252
|
-
],
|
|
252
|
+
], De = (e) => {
|
|
253
253
|
if (e === void 0) return 0;
|
|
254
254
|
let t = Number(e);
|
|
255
255
|
return Number.isInteger(t) && t >= 0 ? t : 0;
|
|
256
|
-
},
|
|
256
|
+
}, Oe = (e) => e === void 0 ? null : e.split(",").map((e) => e.trim()).filter(Boolean), ke = (e, t = 0) => {
|
|
257
257
|
if (e.fknExtension !== "true") return { status: "absent" };
|
|
258
|
-
let n =
|
|
258
|
+
let n = De(e[we]), r = Oe(e[Te]);
|
|
259
259
|
return n < t ? {
|
|
260
260
|
status: "outdated",
|
|
261
261
|
abi: n,
|
|
@@ -266,42 +266,42 @@ var ne = (e, t) => {
|
|
|
266
266
|
abi: n,
|
|
267
267
|
operations: r
|
|
268
268
|
};
|
|
269
|
-
},
|
|
269
|
+
}, Ae = (e, t) => e.status === "ok" ? e.operations === null || e.operations.includes(t) : !1, je = (e, t) => e.status === "ok" && e.operations !== null && e.operations.includes(t), T = class extends Error {
|
|
270
270
|
abi;
|
|
271
271
|
required;
|
|
272
272
|
name = "ExtensionOutdatedError";
|
|
273
273
|
constructor(e, t) {
|
|
274
274
|
super(`The FKN WebExtension is installed but too old for this page: it speaks ABI ${e} and this page needs at least ${t}. Updating the extension fixes this.`), this.abi = e, this.required = t;
|
|
275
275
|
}
|
|
276
|
-
},
|
|
276
|
+
}, E = class extends Error {
|
|
277
277
|
operation;
|
|
278
278
|
abi;
|
|
279
279
|
name = "ExtensionOperationUnsupportedError";
|
|
280
280
|
constructor(e, t, n) {
|
|
281
281
|
super(n ?? `The FKN WebExtension does not support "${e}" (ABI ${t}). Updating the extension may add it.`), this.operation = e, this.abi = t;
|
|
282
282
|
}
|
|
283
|
-
},
|
|
284
|
-
typeof document < "u" && document.addEventListener(
|
|
285
|
-
|
|
283
|
+
}, Me = "FKN_WEB_EXTENSION_MAIN_WORLD_CONTENT_SCRIPT_ENABLED_EVENT_KEY", Ne = Ce, Pe = _();
|
|
284
|
+
typeof document < "u" && document.addEventListener(Me, () => {
|
|
285
|
+
Pe.dispatchEvent(new CustomEvent("statuschange", { detail: { enabled: Fe() } }));
|
|
286
286
|
});
|
|
287
|
-
var
|
|
288
|
-
|
|
289
|
-
},
|
|
290
|
-
let r = () =>
|
|
287
|
+
var Fe = () => typeof document > "u" ? !1 : document.documentElement.dataset[Ne] === "true", D = () => typeof document > "u" ? { status: "absent" } : ke(document.documentElement.dataset), Ie = null, Le = (e) => {
|
|
288
|
+
Ie = e;
|
|
289
|
+
}, Re = 150, O = (e = 1e3) => new Promise((t, n) => {
|
|
290
|
+
let r = () => D().status === "ok";
|
|
291
291
|
if (r()) return t();
|
|
292
292
|
let i, a = (e) => {
|
|
293
293
|
clearTimeout(i), c.disconnect(), document.removeEventListener("readystatechange", l), e();
|
|
294
294
|
}, o = () => a(async () => {
|
|
295
|
-
let e =
|
|
296
|
-
if (e.status === "outdated") return n(new
|
|
297
|
-
if (
|
|
298
|
-
if (await
|
|
299
|
-
let e =
|
|
300
|
-
if (e.status === "outdated") return n(new
|
|
295
|
+
let e = D();
|
|
296
|
+
if (e.status === "outdated") return n(new T(e.abi, e.required));
|
|
297
|
+
if (Ie) {
|
|
298
|
+
if (await Ie().catch(() => {}), r()) return t();
|
|
299
|
+
let e = D();
|
|
300
|
+
if (e.status === "outdated") return n(new T(e.abi, e.required));
|
|
301
301
|
}
|
|
302
302
|
n(/* @__PURE__ */ Error("The FKN WebExtension is not installed, enabled or not exposed on this page."));
|
|
303
303
|
}), s = () => {
|
|
304
|
-
clearTimeout(i), i = setTimeout(() => r() ? a(t) : o(),
|
|
304
|
+
clearTimeout(i), i = setTimeout(() => r() ? a(t) : o(), Re);
|
|
305
305
|
}, c = new MutationObserver(() => {
|
|
306
306
|
r() && a(t);
|
|
307
307
|
}), l = () => {
|
|
@@ -309,39 +309,39 @@ var Pe = () => typeof document > "u" ? !1 : document.documentElement.dataset[Me]
|
|
|
309
309
|
};
|
|
310
310
|
if (i = setTimeout(o, e), c.observe(document.documentElement, {
|
|
311
311
|
attributes: !0,
|
|
312
|
-
attributeFilter: [...
|
|
312
|
+
attributeFilter: [...Ee]
|
|
313
313
|
}), document.addEventListener("readystatechange", l), document.readyState === "complete") return s();
|
|
314
314
|
r() && a(t);
|
|
315
|
-
}),
|
|
316
|
-
await
|
|
315
|
+
}), ze, k = new Proxy({}, { get: (e, t) => async (...e) => {
|
|
316
|
+
await O(), ze ??= v({}, {
|
|
317
317
|
transport: window,
|
|
318
|
-
revivableModules:
|
|
318
|
+
revivableModules: be
|
|
319
319
|
});
|
|
320
|
-
let n = (await
|
|
320
|
+
let n = (await ze)[t];
|
|
321
321
|
return n(...e);
|
|
322
|
-
} }),
|
|
322
|
+
} }), A = [
|
|
323
323
|
"origin",
|
|
324
324
|
"referer",
|
|
325
325
|
"cookie"
|
|
326
|
-
],
|
|
327
|
-
if (t === "include" &&
|
|
328
|
-
},
|
|
329
|
-
let t = [...new Set((e ?? []).map(([e]) => e.trim().toLowerCase()).filter((e) => !
|
|
326
|
+
], Be = (e, t) => (e ?? []).some(([e, n]) => e.trim().toLowerCase() === t && n !== ""), Ve = (e) => Be(e, "cookie"), He = (e, t) => {
|
|
327
|
+
if (t === "include" && Ve(e)) throw Error("fetch: a forged Cookie header and credentials:'include' are different identities - send one or the other");
|
|
328
|
+
}, Ue = (e) => {
|
|
329
|
+
let t = [...new Set((e ?? []).map(([e]) => e.trim().toLowerCase()).filter((e) => !A.includes(e)))];
|
|
330
330
|
if (t.length) throw Error(`fetch: refusing to forge request header(s): ${t.join(", ")}`);
|
|
331
|
-
},
|
|
331
|
+
}, We = [
|
|
332
332
|
"fkn.app",
|
|
333
333
|
"fkn.dev",
|
|
334
334
|
"sdbx.app"
|
|
335
|
-
],
|
|
336
|
-
let t =
|
|
337
|
-
return
|
|
338
|
-
},
|
|
335
|
+
], Ge = (e) => e.replace(/\.+$/, ""), Ke = (e) => {
|
|
336
|
+
let t = Ge(e);
|
|
337
|
+
return We.some((e) => t === e || t.endsWith(`.${e}`));
|
|
338
|
+
}, qe = {
|
|
339
339
|
scope: "network.fetch",
|
|
340
340
|
category: "network",
|
|
341
341
|
severity: 0,
|
|
342
342
|
title: "Fetch data from other sites",
|
|
343
343
|
description: "Lets the app download public data from other websites directly, past the usual cross-origin limits."
|
|
344
|
-
},
|
|
344
|
+
}, Je = {
|
|
345
345
|
scope: "network.fetchCredentialed",
|
|
346
346
|
category: "network",
|
|
347
347
|
severity: 3,
|
|
@@ -349,7 +349,7 @@ var Pe = () => typeof document > "u" ? !1 : document.documentElement.dataset[Me]
|
|
|
349
349
|
unsafe: !0,
|
|
350
350
|
title: "Fetch from other sites, signed in as you",
|
|
351
351
|
description: "Lets the app fetch other sites using your logged-in session cookies, so it can read data only you should see."
|
|
352
|
-
},
|
|
352
|
+
}, Ye = {
|
|
353
353
|
scope: "network.fetchLocal",
|
|
354
354
|
category: "network",
|
|
355
355
|
severity: 3,
|
|
@@ -357,12 +357,12 @@ var Pe = () => typeof document > "u" ? !1 : document.documentElement.dataset[Me]
|
|
|
357
357
|
unsafe: !0,
|
|
358
358
|
title: "Access devices on your local network",
|
|
359
359
|
description: "Lets the app reach devices and services on your home or work network, which websites normally cannot touch."
|
|
360
|
-
},
|
|
360
|
+
}, Xe = (e) => {
|
|
361
361
|
let t = e.match(/^(\d+)\.(\d+)\.\d+\.\d+$/);
|
|
362
362
|
if (!t) return !1;
|
|
363
363
|
let [n, r] = [Number(t[1]), Number(t[2])];
|
|
364
364
|
return n === 10 || n === 127 || n === 0 || n === 169 && r === 254 || n === 172 && r >= 16 && r <= 31 || n === 192 && r === 168;
|
|
365
|
-
},
|
|
365
|
+
}, Ze = (e) => {
|
|
366
366
|
let t;
|
|
367
367
|
try {
|
|
368
368
|
t = new URL(e);
|
|
@@ -370,40 +370,40 @@ var Pe = () => typeof document > "u" ? !1 : document.documentElement.dataset[Me]
|
|
|
370
370
|
return !1;
|
|
371
371
|
}
|
|
372
372
|
let n = t.hostname.replace(/^\[|\]$/g, "").toLowerCase().replace(/\.$/, "");
|
|
373
|
-
return n === "localhost" || n.endsWith(".localhost") || n.endsWith(".local") || n.endsWith(".internal") || n.endsWith(".home.arpa") ? !0 : n.includes(":") ? n === "::" || n === "::1" || n.startsWith("fc") || n.startsWith("fd") || /^fe[89ab]/.test(n) || n.startsWith("::ffff:") :
|
|
374
|
-
},
|
|
373
|
+
return n === "localhost" || n.endsWith(".localhost") || n.endsWith(".local") || n.endsWith(".internal") || n.endsWith(".home.arpa") ? !0 : n.includes(":") ? n === "::" || n === "::1" || n.startsWith("fc") || n.startsWith("fd") || /^fe[89ab]/.test(n) || n.startsWith("::ffff:") : Xe(n);
|
|
374
|
+
}, Qe = (e) => {
|
|
375
375
|
let t;
|
|
376
376
|
try {
|
|
377
377
|
t = new URL(e);
|
|
378
378
|
} catch {
|
|
379
379
|
return !1;
|
|
380
380
|
}
|
|
381
|
-
return t.protocol === "chrome-extension:" || t.protocol === "moz-extension:" ||
|
|
382
|
-
},
|
|
383
|
-
if (
|
|
384
|
-
},
|
|
381
|
+
return t.protocol === "chrome-extension:" || t.protocol === "moz-extension:" || Ke(t.hostname);
|
|
382
|
+
}, $e = (e) => {
|
|
383
|
+
if (Qe(e)) throw Error("fetch: refusing to target the extension's own pages or FKN platform domains");
|
|
384
|
+
}, et = (e) => {
|
|
385
385
|
if (!e?.headers) return;
|
|
386
|
-
let t = new Headers(e.headers), n =
|
|
386
|
+
let t = new Headers(e.headers), n = A.map((e) => {
|
|
387
387
|
let n = t.get(e);
|
|
388
388
|
return n === null || n === "" ? void 0 : [e, n];
|
|
389
389
|
}).filter((e) => e !== void 0);
|
|
390
390
|
return n.length ? n : void 0;
|
|
391
|
-
},
|
|
391
|
+
}, tt = async (e, t) => {
|
|
392
392
|
let n = new Request(e, t);
|
|
393
|
-
|
|
393
|
+
$e(n.url);
|
|
394
394
|
let r = n.body ? await n.arrayBuffer() : null;
|
|
395
|
-
return
|
|
395
|
+
return k.proxyFetch({
|
|
396
396
|
url: n.url,
|
|
397
397
|
method: n.method,
|
|
398
398
|
headers: [...n.headers],
|
|
399
399
|
body: r,
|
|
400
400
|
credentials: t?.credentials === "include" ? "include" : "omit",
|
|
401
401
|
redirect: n.redirect,
|
|
402
|
-
unsafeHeaders:
|
|
402
|
+
unsafeHeaders: et(t),
|
|
403
403
|
reason: t?.reason,
|
|
404
404
|
signal: t?.signal ?? void 0
|
|
405
405
|
});
|
|
406
|
-
},
|
|
406
|
+
}, nt = {
|
|
407
407
|
scope: "network.readCookie",
|
|
408
408
|
category: "network",
|
|
409
409
|
severity: 3,
|
|
@@ -411,7 +411,7 @@ var Pe = () => typeof document > "u" ? !1 : document.documentElement.dataset[Me]
|
|
|
411
411
|
unsafe: !0,
|
|
412
412
|
title: "Read a site’s cookie",
|
|
413
413
|
description: "Lets the app read a named cookie from another site, which can include the login token only that site should see."
|
|
414
|
-
},
|
|
414
|
+
}, rt = { get: (e) => k.getCookie(e) }, it = {
|
|
415
415
|
scope: "network.modifyRequestHeaders",
|
|
416
416
|
category: "network",
|
|
417
417
|
severity: 2,
|
|
@@ -419,51 +419,7 @@ var Pe = () => typeof document > "u" ? !1 : document.documentElement.dataset[Me]
|
|
|
419
419
|
unsafe: !0,
|
|
420
420
|
title: "Rewrite request headers to other sites",
|
|
421
421
|
description: "Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites."
|
|
422
|
-
},
|
|
423
|
-
let e = T();
|
|
424
|
-
return e.status === "ok" && e.abi >= 2;
|
|
425
|
-
}, it = async () => {
|
|
426
|
-
await D();
|
|
427
|
-
let e = T();
|
|
428
|
-
if (e.status === "ok" && e.abi < 2) throw new w(e.abi, 2);
|
|
429
|
-
}, at = (e) => `Read the text, links and details ${e} shows.`, ot = (e) => `Inject unfiltered styles or code into ${e}. This can pass page details along to other sites.`, st = [
|
|
430
|
-
{
|
|
431
|
-
id: "interaction",
|
|
432
|
-
heading: "Interaction",
|
|
433
|
-
summary: "Allow the app to interact with the website (clicks, type in text, etc.)",
|
|
434
|
-
title: (e) => `Interact with ${e}`,
|
|
435
|
-
description: (e, t) => t ? `Click, type and hover on ${e} for you. If you are signed in there, this happens as you.` : `Click, type and hover on ${e} for you, in a signed-out view.`,
|
|
436
|
-
cloudTitle: (e) => `Interact with ${e}`,
|
|
437
|
-
cloudDescription: (e) => `Click, type and hover on ${e} for you, through the session in this frame. If you signed in there, this happens as you.`
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
id: "storage",
|
|
441
|
-
heading: "Site data",
|
|
442
|
-
summary: "Can read the website's data",
|
|
443
|
-
title: (e) => `Read data from ${e}`,
|
|
444
|
-
description: at,
|
|
445
|
-
cloudTitle: (e) => `Read data from ${e}`,
|
|
446
|
-
cloudDescription: at
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
id: "network",
|
|
450
|
-
heading: "Network",
|
|
451
|
-
summary: "Make requests on behalf of the website (using your cookies, etc.)",
|
|
452
|
-
title: (e) => `Make requests to ${e} as you`,
|
|
453
|
-
description: (e) => `Load pages and data from ${e} and send changes there with your signed-in session.`,
|
|
454
|
-
cloudTitle: (e) => `Make requests to ${e}`,
|
|
455
|
-
cloudDescription: (e) => `Load pages and data from ${e} and send changes there through the session in this frame. If you signed in there, this happens as you.`
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
id: "evaluation",
|
|
459
|
-
heading: "Evaluation",
|
|
460
|
-
summary: "Can execute arbitrary code on the website",
|
|
461
|
-
title: (e) => `Run code on ${e}`,
|
|
462
|
-
description: ot,
|
|
463
|
-
cloudTitle: (e) => `Run code on ${e}`,
|
|
464
|
-
cloudDescription: ot
|
|
465
|
-
}
|
|
466
|
-
], ct = class extends Error {
|
|
422
|
+
}, at = (e) => k.setRequestHeaderRule(e), ot = (e) => k.removeRequestHeaderRule({ ruleId: e }), st = class extends Error {
|
|
467
423
|
reason;
|
|
468
424
|
filename;
|
|
469
425
|
line;
|
|
@@ -472,18 +428,18 @@ var Pe = () => typeof document > "u" ? !1 : document.documentElement.dataset[Me]
|
|
|
472
428
|
constructor(e, t, n, r, i) {
|
|
473
429
|
super(`${e}:${n}:${r}: ${t}`), this.reason = t, this.filename = e, this.line = n, this.column = r, this.source = i;
|
|
474
430
|
}
|
|
475
|
-
},
|
|
431
|
+
}, ct = class {
|
|
476
432
|
start;
|
|
477
433
|
end;
|
|
478
434
|
source;
|
|
479
435
|
constructor(e, t, n) {
|
|
480
436
|
this.start = e, this.end = t, this.source = n;
|
|
481
437
|
}
|
|
482
|
-
},
|
|
438
|
+
}, j;
|
|
483
439
|
(function(e) {
|
|
484
440
|
e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.atRule = "at-rule", e.container = "container", e.charset = "charset", e.counterStyle = "counter-style", e.document = "document", e.customMedia = "custom-media", e.fontFace = "font-face", e.fontFeatureValues = "font-feature-values", 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.pageMarginBox = "page-margin-box", e.positionTry = "position-try", e.property = "property", e.scope = "scope", e.startingStyle = "starting-style", e.supports = "supports", e.viewTransition = "view-transition";
|
|
485
|
-
})(
|
|
486
|
-
var
|
|
441
|
+
})(j ||= {});
|
|
442
|
+
var lt = (e, t, n) => {
|
|
487
443
|
let r = n, i = 1e4;
|
|
488
444
|
do {
|
|
489
445
|
let n = t.map((t) => e.indexOf(t, r));
|
|
@@ -495,7 +451,7 @@ var ut = (e, t, n) => {
|
|
|
495
451
|
r = o + 2, i--;
|
|
496
452
|
} while (i > 0);
|
|
497
453
|
throw Error("Too many escaping");
|
|
498
|
-
},
|
|
454
|
+
}, M = (e, t, n) => {
|
|
499
455
|
let r = n, i = 1e4;
|
|
500
456
|
do {
|
|
501
457
|
let n = t.map((t) => e.indexOf(t, r));
|
|
@@ -509,21 +465,21 @@ var ut = (e, t, n) => {
|
|
|
509
465
|
break;
|
|
510
466
|
case "(":
|
|
511
467
|
{
|
|
512
|
-
let t =
|
|
468
|
+
let t = M(e, [")"], o + 1);
|
|
513
469
|
if (t === -1) return -1;
|
|
514
470
|
r = t + 1;
|
|
515
471
|
}
|
|
516
472
|
break;
|
|
517
473
|
case "\"":
|
|
518
474
|
{
|
|
519
|
-
let t =
|
|
475
|
+
let t = lt(e, ["\""], o + 1);
|
|
520
476
|
if (t === -1) return -1;
|
|
521
477
|
r = t + 1;
|
|
522
478
|
}
|
|
523
479
|
break;
|
|
524
480
|
case "'":
|
|
525
481
|
{
|
|
526
|
-
let t =
|
|
482
|
+
let t = lt(e, ["'"], o + 1);
|
|
527
483
|
if (t === -1) return -1;
|
|
528
484
|
r = t + 1;
|
|
529
485
|
}
|
|
@@ -533,17 +489,17 @@ var ut = (e, t, n) => {
|
|
|
533
489
|
i--;
|
|
534
490
|
} while (i > 0);
|
|
535
491
|
throw Error("Too many escaping");
|
|
536
|
-
},
|
|
537
|
-
function
|
|
492
|
+
}, N = /\/\*[^]*?(?:\*\/|$)/g;
|
|
493
|
+
function P(e) {
|
|
538
494
|
return e ? e.trim() : "";
|
|
539
495
|
}
|
|
540
|
-
function
|
|
496
|
+
function F(e, t) {
|
|
541
497
|
let n = e && typeof e.type == "string", r = n ? e : t;
|
|
542
498
|
for (let t in e) {
|
|
543
499
|
let n = e[t];
|
|
544
500
|
Array.isArray(n) ? n.forEach((e) => {
|
|
545
|
-
|
|
546
|
-
}) : n && typeof n == "object" &&
|
|
501
|
+
F(e, r);
|
|
502
|
+
}) : n && typeof n == "object" && F(n, r);
|
|
547
503
|
}
|
|
548
504
|
return n && Object.defineProperty(e, "parent", {
|
|
549
505
|
configurable: !0,
|
|
@@ -552,7 +508,7 @@ function I(e, t) {
|
|
|
552
508
|
value: t || null
|
|
553
509
|
}), e;
|
|
554
510
|
}
|
|
555
|
-
var
|
|
511
|
+
var ut = class {
|
|
556
512
|
level = 0;
|
|
557
513
|
indentation = " ";
|
|
558
514
|
compress = !1;
|
|
@@ -567,33 +523,33 @@ var dt = class {
|
|
|
567
523
|
}
|
|
568
524
|
visit(e) {
|
|
569
525
|
switch (e.type) {
|
|
570
|
-
case
|
|
571
|
-
case
|
|
572
|
-
case
|
|
573
|
-
case
|
|
574
|
-
case
|
|
575
|
-
case
|
|
576
|
-
case
|
|
577
|
-
case
|
|
578
|
-
case
|
|
579
|
-
case
|
|
580
|
-
case
|
|
581
|
-
case
|
|
582
|
-
case
|
|
583
|
-
case
|
|
584
|
-
case
|
|
585
|
-
case
|
|
586
|
-
case
|
|
587
|
-
case
|
|
588
|
-
case
|
|
589
|
-
case
|
|
590
|
-
case
|
|
591
|
-
case
|
|
592
|
-
case
|
|
593
|
-
case
|
|
594
|
-
case
|
|
595
|
-
case
|
|
596
|
-
case
|
|
526
|
+
case j.stylesheet: return this.stylesheet(e);
|
|
527
|
+
case j.rule: return this.rule(e);
|
|
528
|
+
case j.declaration: return this.declaration(e);
|
|
529
|
+
case j.comment: return this.comment(e);
|
|
530
|
+
case j.container: return this.container(e);
|
|
531
|
+
case j.charset: return this.charset(e);
|
|
532
|
+
case j.counterStyle: return this.counterStyle(e);
|
|
533
|
+
case j.document: return this.document(e);
|
|
534
|
+
case j.customMedia: return this.customMedia(e);
|
|
535
|
+
case j.fontFace: return this.fontFace(e);
|
|
536
|
+
case j.fontFeatureValues: return this.fontFeatureValues(e);
|
|
537
|
+
case j.host: return this.host(e);
|
|
538
|
+
case j.import: return this.import(e);
|
|
539
|
+
case j.keyframes: return this.keyframes(e);
|
|
540
|
+
case j.keyframe: return this.keyframe(e);
|
|
541
|
+
case j.layer: return this.layer(e);
|
|
542
|
+
case j.media: return this.media(e);
|
|
543
|
+
case j.namespace: return this.namespace(e);
|
|
544
|
+
case j.page: return this.page(e);
|
|
545
|
+
case j.pageMarginBox: return this.pageMarginBox(e);
|
|
546
|
+
case j.positionTry: return this.positionTry(e);
|
|
547
|
+
case j.property: return this.property(e);
|
|
548
|
+
case j.scope: return this.scope(e);
|
|
549
|
+
case j.startingStyle: return this.startingStyle(e);
|
|
550
|
+
case j.supports: return this.supports(e);
|
|
551
|
+
case j.viewTransition: return this.viewTransition(e);
|
|
552
|
+
case j.atRule: return this.genericAtRule(e);
|
|
597
553
|
}
|
|
598
554
|
}
|
|
599
555
|
mapVisit(e, t) {
|
|
@@ -689,7 +645,7 @@ var dt = class {
|
|
|
689
645
|
let t = e.prelude ? ` ${e.prelude}` : "";
|
|
690
646
|
if (this.compress) return this.emit(`@${e.name}${t}`, e.position) + (e.rules ? this.emit("{") + this.mapVisit(e.rules) + this.emit("}") : ";");
|
|
691
647
|
if (!e.rules) return this.emit(`${this.indent()}@${e.name}${t};`, e.position);
|
|
692
|
-
let n = e.rules.some((e) => e.type !==
|
|
648
|
+
let n = e.rules.some((e) => e.type !== j.declaration && e.type !== j.comment), r = n ? "\n\n" : "\n";
|
|
693
649
|
return this.emit(`${this.indent()}@${e.name}${t}`, e.position) + this.emit(n ? ` {\n${this.indent(1)}` : " {\n") + this.emit(n ? "" : this.indent(1)) + this.mapVisit(e.rules, r) + this.emit(n ? `\n${this.indent(-1)}${this.indent()}}` : `${this.indent(-1)}\n${this.indent()}}`);
|
|
694
650
|
}
|
|
695
651
|
rule(e) {
|
|
@@ -702,7 +658,7 @@ var dt = class {
|
|
|
702
658
|
declaration(e) {
|
|
703
659
|
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("\n").join("\n".padEnd(22) + this.indent()), e.position) + this.emit(";") : this.emit(this.indent()) + this.emit(`${e.property}: ${e.value}`, e.position) + this.emit(";");
|
|
704
660
|
}
|
|
705
|
-
},
|
|
661
|
+
}, dt = (e, t) => {
|
|
706
662
|
t ||= {};
|
|
707
663
|
let n = 1, r = 1;
|
|
708
664
|
function i() {
|
|
@@ -710,14 +666,14 @@ var dt = class {
|
|
|
710
666
|
line: n,
|
|
711
667
|
column: r
|
|
712
668
|
};
|
|
713
|
-
return (i) => (i.position = new
|
|
669
|
+
return (i) => (i.position = new ct(e, {
|
|
714
670
|
line: n,
|
|
715
671
|
column: r
|
|
716
672
|
}, t?.source || ""), u(), i);
|
|
717
673
|
}
|
|
718
674
|
let a = [];
|
|
719
675
|
function o(i) {
|
|
720
|
-
let o = new
|
|
676
|
+
let o = new st(t?.source || "", i, n, r, e);
|
|
721
677
|
if (!t?.silent) throw o;
|
|
722
678
|
a.push(o);
|
|
723
679
|
}
|
|
@@ -753,41 +709,41 @@ var dt = class {
|
|
|
753
709
|
if (e.charAt(0) !== "/" || e.charAt(1) !== "*") return;
|
|
754
710
|
let n = /^\/\*[^]*?\*\//.exec(e);
|
|
755
711
|
return n ? (l(n), t({
|
|
756
|
-
type:
|
|
712
|
+
type: j.comment,
|
|
757
713
|
comment: n[0].slice(2, -2)
|
|
758
714
|
})) : o("End of comment missing");
|
|
759
715
|
}
|
|
760
716
|
function p() {
|
|
761
|
-
let t =
|
|
717
|
+
let t = M(e, ["{"]);
|
|
762
718
|
if (t === -1 || t === 0) return;
|
|
763
719
|
let n = e.substring(0, t);
|
|
764
720
|
return l([n]), ((e, t) => {
|
|
765
721
|
let n = [], r = 0;
|
|
766
722
|
for (; r < e.length;) {
|
|
767
|
-
let i =
|
|
723
|
+
let i = M(e, t, r);
|
|
768
724
|
if (i === -1) return n.push(e.substring(r)), n;
|
|
769
725
|
n.push(e.substring(r, i)), r = i + 1;
|
|
770
726
|
}
|
|
771
727
|
return n;
|
|
772
|
-
})(
|
|
728
|
+
})(P(n).replace(N, ""), [","]).map((e) => P(e));
|
|
773
729
|
}
|
|
774
730
|
function m() {
|
|
775
731
|
let t = i(), n = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);
|
|
776
732
|
if (!n) return;
|
|
777
733
|
l(n);
|
|
778
|
-
let r =
|
|
734
|
+
let r = P(n[0]), a = /^:\s*/.exec(e);
|
|
779
735
|
if (!a) return o("property missing ':'");
|
|
780
736
|
l(a);
|
|
781
|
-
let s = "", c =
|
|
782
|
-
c !== -1 && (s = e.substring(0, c), l([s]), s =
|
|
737
|
+
let s = "", c = M(e, [";", "}"]);
|
|
738
|
+
c !== -1 && (s = e.substring(0, c), l([s]), s = P(s).replace(N, ""));
|
|
783
739
|
let u = t({
|
|
784
|
-
type:
|
|
785
|
-
property: r.replace(
|
|
740
|
+
type: j.declaration,
|
|
741
|
+
property: r.replace(N, ""),
|
|
786
742
|
value: s
|
|
787
743
|
}), d = /^[;\s]*/.exec(e);
|
|
788
744
|
return d && l(d), u;
|
|
789
745
|
}
|
|
790
|
-
function
|
|
746
|
+
function h() {
|
|
791
747
|
let n = [];
|
|
792
748
|
if (!s()) return o("missing '{'");
|
|
793
749
|
d(n);
|
|
@@ -800,25 +756,25 @@ var dt = class {
|
|
|
800
756
|
}
|
|
801
757
|
return c() ? n : o("missing '}'");
|
|
802
758
|
}
|
|
803
|
-
function
|
|
804
|
-
let t =
|
|
759
|
+
function g() {
|
|
760
|
+
let t = M(e, ["{"]);
|
|
805
761
|
if (t === -1) return !1;
|
|
806
|
-
let n =
|
|
762
|
+
let n = M(e, [";"]), r = M(e, ["}"]);
|
|
807
763
|
return !(n !== -1 && n < t) && !(r !== -1 && r < t);
|
|
808
764
|
}
|
|
809
|
-
function
|
|
765
|
+
function ee() {
|
|
810
766
|
let n = [];
|
|
811
767
|
if (!s()) return o("missing '{'");
|
|
812
768
|
for (d(n); e.length && e.charAt(0) !== "}";) {
|
|
813
769
|
if (e.charAt(0) === "@") {
|
|
814
|
-
let e =
|
|
770
|
+
let e = x();
|
|
815
771
|
if (e) {
|
|
816
772
|
n.push(e), d(n);
|
|
817
773
|
continue;
|
|
818
774
|
}
|
|
819
775
|
}
|
|
820
|
-
if (
|
|
821
|
-
let e =
|
|
776
|
+
if (g()) {
|
|
777
|
+
let e = S();
|
|
822
778
|
if (e) {
|
|
823
779
|
n.push(e), d(n);
|
|
824
780
|
continue;
|
|
@@ -839,18 +795,18 @@ var dt = class {
|
|
|
839
795
|
}
|
|
840
796
|
return c() ? n : o("missing '}'");
|
|
841
797
|
}
|
|
842
|
-
function
|
|
798
|
+
function _() {
|
|
843
799
|
let n = [];
|
|
844
800
|
for (u(), d(n); e.length && e.charAt(0) !== "}";) {
|
|
845
801
|
if (e.charAt(0) === "@") {
|
|
846
|
-
let e =
|
|
802
|
+
let e = x();
|
|
847
803
|
if (e) {
|
|
848
804
|
n.push(e), d(n);
|
|
849
805
|
continue;
|
|
850
806
|
}
|
|
851
807
|
}
|
|
852
|
-
if (
|
|
853
|
-
let e =
|
|
808
|
+
if (g()) {
|
|
809
|
+
let e = S();
|
|
854
810
|
if (e) {
|
|
855
811
|
n.push(e), d(n);
|
|
856
812
|
continue;
|
|
@@ -871,7 +827,7 @@ var dt = class {
|
|
|
871
827
|
}
|
|
872
828
|
return n;
|
|
873
829
|
}
|
|
874
|
-
function
|
|
830
|
+
function v() {
|
|
875
831
|
let t = [], n = i(), r = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
|
|
876
832
|
for (; r;) {
|
|
877
833
|
let n = l(r);
|
|
@@ -880,12 +836,12 @@ var dt = class {
|
|
|
880
836
|
i && l(i), r = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
|
|
881
837
|
}
|
|
882
838
|
if (t.length) return n({
|
|
883
|
-
type:
|
|
839
|
+
type: j.keyframe,
|
|
884
840
|
values: t,
|
|
885
|
-
declarations:
|
|
841
|
+
declarations: h() || []
|
|
886
842
|
});
|
|
887
843
|
}
|
|
888
|
-
let
|
|
844
|
+
let te = RegExp(`^@(${[
|
|
889
845
|
"top-left-corner",
|
|
890
846
|
"top-left",
|
|
891
847
|
"top-center",
|
|
@@ -902,8 +858,8 @@ var dt = class {
|
|
|
902
858
|
"right-top",
|
|
903
859
|
"right-middle",
|
|
904
860
|
"right-bottom"
|
|
905
|
-
].join("|")})(?![\\w-])\\s*`),
|
|
906
|
-
function
|
|
861
|
+
].join("|")})(?![\\w-])\\s*`), ne = b("import"), re = b("charset"), y = b("namespace");
|
|
862
|
+
function b(t) {
|
|
907
863
|
let n = RegExp("^@" + t + "\\s*((?::?[^;'\"]|\"(?:\\\\\"|[^\"])*?\"|'(?:\\\\'|[^'])*?')+)(?:;|$)");
|
|
908
864
|
return () => {
|
|
909
865
|
let r = i(), a = n.exec(e);
|
|
@@ -912,7 +868,7 @@ var dt = class {
|
|
|
912
868
|
return s[t] = o[1].trim(), r(s);
|
|
913
869
|
};
|
|
914
870
|
}
|
|
915
|
-
function
|
|
871
|
+
function x() {
|
|
916
872
|
if (e[0] === "@") return function() {
|
|
917
873
|
let t = i(), n = /^@([-\w]+)?keyframes\s*/.exec(e);
|
|
918
874
|
if (!n) return;
|
|
@@ -920,10 +876,10 @@ var dt = class {
|
|
|
920
876
|
if (!a) return o("@keyframes missing name");
|
|
921
877
|
let u = l(a)[1];
|
|
922
878
|
if (!s()) return o("@keyframes missing '{'");
|
|
923
|
-
let f = d(), p =
|
|
924
|
-
for (; p;) f.push(p), f = f.concat(d()), p =
|
|
879
|
+
let f = d(), p = v();
|
|
880
|
+
for (; p;) f.push(p), f = f.concat(d()), p = v();
|
|
925
881
|
return c() ? t({
|
|
926
|
-
type:
|
|
882
|
+
type: j.keyframes,
|
|
927
883
|
name: u,
|
|
928
884
|
vendor: r,
|
|
929
885
|
keyframes: f
|
|
@@ -931,11 +887,11 @@ var dt = class {
|
|
|
931
887
|
}() || function() {
|
|
932
888
|
let t = i(), n = /^@media *([^{]+)/.exec(e);
|
|
933
889
|
if (!n) return;
|
|
934
|
-
let r =
|
|
890
|
+
let r = P(l(n)[1]);
|
|
935
891
|
if (!s()) return o("@media missing '{'");
|
|
936
|
-
let a =
|
|
892
|
+
let a = _();
|
|
937
893
|
return c() ? t({
|
|
938
|
-
type:
|
|
894
|
+
type: j.media,
|
|
939
895
|
media: r,
|
|
940
896
|
rules: a
|
|
941
897
|
}) : o("@media missing '}'");
|
|
@@ -944,29 +900,29 @@ var dt = class {
|
|
|
944
900
|
if (!n) return;
|
|
945
901
|
let r = l(n);
|
|
946
902
|
return t({
|
|
947
|
-
type:
|
|
948
|
-
name:
|
|
949
|
-
media:
|
|
903
|
+
type: j.customMedia,
|
|
904
|
+
name: P(r[1]),
|
|
905
|
+
media: P(r[2])
|
|
950
906
|
});
|
|
951
907
|
}() || function() {
|
|
952
908
|
let t = i(), n = /^@supports *([^{]+)/.exec(e);
|
|
953
909
|
if (!n) return;
|
|
954
|
-
let r =
|
|
910
|
+
let r = P(l(n)[1]);
|
|
955
911
|
if (!s()) return o("@supports missing '{'");
|
|
956
|
-
let a =
|
|
912
|
+
let a = _();
|
|
957
913
|
return c() ? t({
|
|
958
|
-
type:
|
|
914
|
+
type: j.supports,
|
|
959
915
|
supports: r,
|
|
960
916
|
rules: a
|
|
961
917
|
}) : o("@supports missing '}'");
|
|
962
|
-
}() ||
|
|
918
|
+
}() || ne() || re() || y() || function() {
|
|
963
919
|
let t = i(), n = /^@([-\w]+)?document *([^{]+)/.exec(e);
|
|
964
920
|
if (!n) return;
|
|
965
|
-
let r = l(n), a =
|
|
921
|
+
let r = l(n), a = P(r[1]), u = P(r[2]);
|
|
966
922
|
if (!s()) return o("@document missing '{'");
|
|
967
|
-
let d =
|
|
923
|
+
let d = _();
|
|
968
924
|
return c() ? t({
|
|
969
|
-
type:
|
|
925
|
+
type: j.document,
|
|
970
926
|
document: u,
|
|
971
927
|
vendor: a,
|
|
972
928
|
rules: d
|
|
@@ -980,7 +936,7 @@ var dt = class {
|
|
|
980
936
|
let a = [];
|
|
981
937
|
for (d(a); e.length && e.charAt(0) !== "}";) {
|
|
982
938
|
if (e.charAt(0) === "@") {
|
|
983
|
-
let e =
|
|
939
|
+
let e = x();
|
|
984
940
|
if (e) {
|
|
985
941
|
a.push(e), d(a);
|
|
986
942
|
continue;
|
|
@@ -991,7 +947,7 @@ var dt = class {
|
|
|
991
947
|
a.push(t), d(a);
|
|
992
948
|
}
|
|
993
949
|
return c() ? t({
|
|
994
|
-
type:
|
|
950
|
+
type: j.page,
|
|
995
951
|
selectors: r,
|
|
996
952
|
declarations: a
|
|
997
953
|
}) : o("@page missing '}'");
|
|
@@ -999,9 +955,9 @@ var dt = class {
|
|
|
999
955
|
let t = i(), n = /^@host\s*/.exec(e);
|
|
1000
956
|
if (!n) return;
|
|
1001
957
|
if (l(n), !s()) return o("@host missing '{'");
|
|
1002
|
-
let r =
|
|
958
|
+
let r = _();
|
|
1003
959
|
return c() ? t({
|
|
1004
|
-
type:
|
|
960
|
+
type: j.host,
|
|
1005
961
|
rules: r
|
|
1006
962
|
}) : o("@host missing '}'");
|
|
1007
963
|
}() || function() {
|
|
@@ -1011,28 +967,28 @@ var dt = class {
|
|
|
1011
967
|
let r = d(), a = m();
|
|
1012
968
|
for (; a;) r.push(a), r = r.concat(d()), a = m();
|
|
1013
969
|
return c() ? t({
|
|
1014
|
-
type:
|
|
970
|
+
type: j.fontFace,
|
|
1015
971
|
declarations: r
|
|
1016
972
|
}) : o("@font-face missing '}'");
|
|
1017
973
|
}() || function() {
|
|
1018
974
|
let t = i(), n = /^@font-feature-values\s+([^{]+)/.exec(e);
|
|
1019
975
|
if (!n) return;
|
|
1020
|
-
let r =
|
|
976
|
+
let r = P(l(n)[1]);
|
|
1021
977
|
if (!s()) return o("@font-feature-values missing '{'");
|
|
1022
|
-
let a =
|
|
978
|
+
let a = _();
|
|
1023
979
|
return c() ? t({
|
|
1024
|
-
type:
|
|
980
|
+
type: j.fontFeatureValues,
|
|
1025
981
|
fontFamily: r,
|
|
1026
982
|
rules: a
|
|
1027
983
|
}) : o("@font-feature-values missing '}'");
|
|
1028
984
|
}() || function() {
|
|
1029
985
|
let t = i(), n = /^@container *([^{]+)/.exec(e);
|
|
1030
986
|
if (!n) return;
|
|
1031
|
-
let r =
|
|
987
|
+
let r = P(l(n)[1]);
|
|
1032
988
|
if (!s()) return o("@container missing '{'");
|
|
1033
|
-
let a =
|
|
989
|
+
let a = _();
|
|
1034
990
|
return c() ? t({
|
|
1035
|
-
type:
|
|
991
|
+
type: j.container,
|
|
1036
992
|
container: r,
|
|
1037
993
|
rules: a
|
|
1038
994
|
}) : o("@container missing '}'");
|
|
@@ -1040,25 +996,25 @@ var dt = class {
|
|
|
1040
996
|
let t = i(), n = /^@starting-style\s*/.exec(e);
|
|
1041
997
|
if (!n) return;
|
|
1042
998
|
if (l(n), !s()) return o("@starting-style missing '{'");
|
|
1043
|
-
let r =
|
|
999
|
+
let r = _();
|
|
1044
1000
|
return c() ? t({
|
|
1045
|
-
type:
|
|
1001
|
+
type: j.startingStyle,
|
|
1046
1002
|
rules: r
|
|
1047
1003
|
}) : o("@starting-style missing '}'");
|
|
1048
1004
|
}() || function() {
|
|
1049
1005
|
let t = i(), n = /^@layer *([^{;@]+)/.exec(e);
|
|
1050
1006
|
if (!n) return;
|
|
1051
|
-
let r =
|
|
1007
|
+
let r = P(l(n)[1]);
|
|
1052
1008
|
if (!s()) {
|
|
1053
1009
|
let n = /^[;\s]*/.exec(e);
|
|
1054
1010
|
return n && l(n), t({
|
|
1055
|
-
type:
|
|
1011
|
+
type: j.layer,
|
|
1056
1012
|
layer: r
|
|
1057
1013
|
});
|
|
1058
1014
|
}
|
|
1059
|
-
let a =
|
|
1015
|
+
let a = _();
|
|
1060
1016
|
return c() ? t({
|
|
1061
|
-
type:
|
|
1017
|
+
type: j.layer,
|
|
1062
1018
|
layer: r,
|
|
1063
1019
|
rules: a
|
|
1064
1020
|
}) : o("@layer missing '}'");
|
|
@@ -1070,7 +1026,7 @@ var dt = class {
|
|
|
1070
1026
|
let a = d(), u = m();
|
|
1071
1027
|
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
1072
1028
|
return c() ? t({
|
|
1073
|
-
type:
|
|
1029
|
+
type: j.property,
|
|
1074
1030
|
name: r,
|
|
1075
1031
|
declarations: a
|
|
1076
1032
|
}) : o("@property missing '}'");
|
|
@@ -1082,18 +1038,18 @@ var dt = class {
|
|
|
1082
1038
|
let a = d(), u = m();
|
|
1083
1039
|
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
1084
1040
|
return c() ? t({
|
|
1085
|
-
type:
|
|
1041
|
+
type: j.counterStyle,
|
|
1086
1042
|
name: r,
|
|
1087
1043
|
declarations: a
|
|
1088
1044
|
}) : o("@counter-style missing '}'");
|
|
1089
1045
|
}() || function() {
|
|
1090
1046
|
let t = i(), n = /^@scope\s*([^{]*)/.exec(e);
|
|
1091
1047
|
if (!n) return;
|
|
1092
|
-
let r =
|
|
1048
|
+
let r = P(l(n)[1]);
|
|
1093
1049
|
if (!s()) return o("@scope missing '{'");
|
|
1094
|
-
let a =
|
|
1050
|
+
let a = _();
|
|
1095
1051
|
return c() ? t({
|
|
1096
|
-
type:
|
|
1052
|
+
type: j.scope,
|
|
1097
1053
|
scope: r,
|
|
1098
1054
|
rules: a
|
|
1099
1055
|
}) : o("@scope missing '}'");
|
|
@@ -1104,7 +1060,7 @@ var dt = class {
|
|
|
1104
1060
|
let r = d(), a = m();
|
|
1105
1061
|
for (; a;) r.push(a), r = r.concat(d()), a = m();
|
|
1106
1062
|
return c() ? t({
|
|
1107
|
-
type:
|
|
1063
|
+
type: j.viewTransition,
|
|
1108
1064
|
declarations: r
|
|
1109
1065
|
}) : o("@view-transition missing '}'");
|
|
1110
1066
|
}() || function() {
|
|
@@ -1115,30 +1071,30 @@ var dt = class {
|
|
|
1115
1071
|
let a = d(), u = m();
|
|
1116
1072
|
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
1117
1073
|
return c() ? t({
|
|
1118
|
-
type:
|
|
1074
|
+
type: j.positionTry,
|
|
1119
1075
|
name: r,
|
|
1120
1076
|
declarations: a
|
|
1121
1077
|
}) : o("@position-try missing '}'");
|
|
1122
1078
|
}() || function() {
|
|
1123
|
-
let t = i(), n =
|
|
1079
|
+
let t = i(), n = te.exec(e);
|
|
1124
1080
|
if (!n) return;
|
|
1125
1081
|
let r = l(n)[1];
|
|
1126
1082
|
if (!s()) return o(`@${r} missing '{'`);
|
|
1127
1083
|
let a = d(), u = m();
|
|
1128
1084
|
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
1129
1085
|
return c() ? t({
|
|
1130
|
-
type:
|
|
1086
|
+
type: j.pageMarginBox,
|
|
1131
1087
|
name: r,
|
|
1132
1088
|
declarations: a
|
|
1133
1089
|
}) : o(`@${r} missing '}'`);
|
|
1134
1090
|
}() || function() {
|
|
1135
1091
|
let t = i(), n = /^@([-\w]+)\s*/.exec(e);
|
|
1136
1092
|
if (!n) return;
|
|
1137
|
-
let r = l(n)[1], a = "", u =
|
|
1138
|
-
if (u !== -1 && u > 0 && (a =
|
|
1139
|
-
let e =
|
|
1093
|
+
let r = l(n)[1], a = "", u = M(e, ["{", ";"]);
|
|
1094
|
+
if (u !== -1 && u > 0 && (a = P(e.substring(0, u)), l([e.substring(0, u)])), s()) {
|
|
1095
|
+
let e = _();
|
|
1140
1096
|
return c() ? t({
|
|
1141
|
-
type:
|
|
1097
|
+
type: j.atRule,
|
|
1142
1098
|
name: r,
|
|
1143
1099
|
prelude: a,
|
|
1144
1100
|
rules: e
|
|
@@ -1146,21 +1102,21 @@ var dt = class {
|
|
|
1146
1102
|
}
|
|
1147
1103
|
let d = /^[;\s]*/.exec(e);
|
|
1148
1104
|
return d && l(d), t({
|
|
1149
|
-
type:
|
|
1105
|
+
type: j.atRule,
|
|
1150
1106
|
name: r,
|
|
1151
1107
|
prelude: a
|
|
1152
1108
|
});
|
|
1153
1109
|
}();
|
|
1154
1110
|
}
|
|
1155
|
-
function
|
|
1111
|
+
function S() {
|
|
1156
1112
|
let e = i(), t = p();
|
|
1157
1113
|
return t ? (d(), e({
|
|
1158
|
-
type:
|
|
1114
|
+
type: j.rule,
|
|
1159
1115
|
selectors: t,
|
|
1160
|
-
declarations:
|
|
1116
|
+
declarations: ee() || []
|
|
1161
1117
|
})) : o("selector missing");
|
|
1162
1118
|
}
|
|
1163
|
-
return
|
|
1119
|
+
return F(function() {
|
|
1164
1120
|
let n = function() {
|
|
1165
1121
|
let n, r = [];
|
|
1166
1122
|
for (u(), d(r); e.length;) {
|
|
@@ -1171,7 +1127,7 @@ var dt = class {
|
|
|
1171
1127
|
}
|
|
1172
1128
|
break;
|
|
1173
1129
|
}
|
|
1174
|
-
if (n =
|
|
1130
|
+
if (n = x() || S(), !n) {
|
|
1175
1131
|
if (t?.silent) {
|
|
1176
1132
|
l([e.charAt(0)]), u(), d(r);
|
|
1177
1133
|
continue;
|
|
@@ -1183,7 +1139,7 @@ var dt = class {
|
|
|
1183
1139
|
return r;
|
|
1184
1140
|
}();
|
|
1185
1141
|
return {
|
|
1186
|
-
type:
|
|
1142
|
+
type: j.stylesheet,
|
|
1187
1143
|
stylesheet: {
|
|
1188
1144
|
source: t?.source,
|
|
1189
1145
|
rules: n,
|
|
@@ -1191,61 +1147,61 @@ var dt = class {
|
|
|
1191
1147
|
}
|
|
1192
1148
|
};
|
|
1193
1149
|
}());
|
|
1194
|
-
},
|
|
1150
|
+
}, ft = (e, t) => new ut(t || {}).compile(e), pt = Object.defineProperty, mt = (e, t) => {
|
|
1195
1151
|
let n = {};
|
|
1196
|
-
for (var r in e)
|
|
1152
|
+
for (var r in e) pt(n, r, {
|
|
1197
1153
|
get: e[r],
|
|
1198
1154
|
enumerable: !0
|
|
1199
1155
|
});
|
|
1200
|
-
return t ||
|
|
1201
|
-
},
|
|
1202
|
-
name:
|
|
1156
|
+
return t || pt(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
1157
|
+
}, ht = "LocatorError", I = "LocatorUnsupportedError", L = "LocatorDeniedError", gt = "LocatorInvalidError", R = (e) => typeof e == "object" && e ? e.name : void 0, z = (e) => Object.assign(Error(e), { name: ht }), B = (e, t = "", n) => Object.assign(Error(e), {
|
|
1158
|
+
name: I,
|
|
1203
1159
|
operation: t,
|
|
1204
1160
|
backend: n
|
|
1205
|
-
}),
|
|
1206
|
-
name:
|
|
1161
|
+
}), _t = (e, t) => B(`Locator operation not supported${t ? ` on the ${t} backend` : ""}: ${e}`, e, t), V = (e, t) => Object.assign(Error(e), {
|
|
1162
|
+
name: L,
|
|
1207
1163
|
operation: t
|
|
1208
|
-
}),
|
|
1209
|
-
name:
|
|
1164
|
+
}), H = (e, t) => Object.assign(Error(e), {
|
|
1165
|
+
name: gt,
|
|
1210
1166
|
operation: t
|
|
1211
|
-
}),
|
|
1167
|
+
}), vt = (e) => R(e) === I, yt = (e) => R(e) === L, bt = (e) => R(e) === gt, xt = (e) => yt(e) || vt(e) || bt(e), U = (e) => {
|
|
1212
1168
|
let t = (e.ownerDocument ?? e).defaultView;
|
|
1213
|
-
if (!t) throw
|
|
1169
|
+
if (!t) throw z("the resolved element belongs to a document with no window");
|
|
1214
1170
|
return t;
|
|
1215
|
-
},
|
|
1171
|
+
}, St = (e, t) => {
|
|
1216
1172
|
let n = e?.[t];
|
|
1217
1173
|
return typeof n == "function" ? n : null;
|
|
1218
|
-
},
|
|
1174
|
+
}, W = (e, t) => {
|
|
1219
1175
|
if (typeof e != "object" || !e) return null;
|
|
1220
1176
|
let n = (() => {
|
|
1221
1177
|
try {
|
|
1222
|
-
return
|
|
1178
|
+
return St(U(e), t);
|
|
1223
1179
|
} catch {
|
|
1224
1180
|
return null;
|
|
1225
1181
|
}
|
|
1226
1182
|
})();
|
|
1227
1183
|
if (n && e instanceof n) return n;
|
|
1228
|
-
let r =
|
|
1184
|
+
let r = St(globalThis, t);
|
|
1229
1185
|
return r && e instanceof r ? r : null;
|
|
1230
|
-
},
|
|
1231
|
-
if (e.length === 0) throw
|
|
1232
|
-
if (e.length > 1) throw
|
|
1186
|
+
}, G = (e, t) => W(e, t) !== null, K = (e) => {
|
|
1187
|
+
if (e.length === 0) throw z("No elements found");
|
|
1188
|
+
if (e.length > 1) throw z(`Strict mode violation: locator resolved to ${e.length} elements`);
|
|
1233
1189
|
return e[0];
|
|
1234
|
-
},
|
|
1235
|
-
if (!
|
|
1190
|
+
}, Ct = (e, t) => {
|
|
1191
|
+
if (!G(e, t)) throw z(`Strict mode violation: expected ${t}, got <${e.tagName.toLowerCase()}>`);
|
|
1236
1192
|
return e;
|
|
1237
|
-
},
|
|
1238
|
-
|
|
1239
|
-
},
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
]),
|
|
1247
|
-
if (
|
|
1248
|
-
if (e.type ===
|
|
1193
|
+
}, wt = (e) => e.tagName.toLowerCase(), Tt = /* @__PURE__ */ new Set(), Et = (e) => {
|
|
1194
|
+
Tt.add(e);
|
|
1195
|
+
}, Dt = /(?:^|[^\w-])(?:url|image|image-set|cross-fade|paint|element|expression)\s*\(/i, Ot = (e) => e.replace(/\\([0-9a-fA-F]{1,6})\s?/g, (e, t) => String.fromCodePoint(Number.parseInt(t, 16))).replace(/\\(.)/g, "$1"), kt = (e) => !Dt.test(Ot(e.value)), At = /* @__PURE__ */ new Set([
|
|
1196
|
+
j.import,
|
|
1197
|
+
j.fontFace,
|
|
1198
|
+
j.namespace,
|
|
1199
|
+
j.charset,
|
|
1200
|
+
j.document,
|
|
1201
|
+
j.comment
|
|
1202
|
+
]), jt = (e) => {
|
|
1203
|
+
if (At.has(e.type)) return null;
|
|
1204
|
+
if (e.type === j.declaration) return kt(e) ? e : null;
|
|
1249
1205
|
let t = e, n = { ...t };
|
|
1250
1206
|
for (let e of [
|
|
1251
1207
|
"declarations",
|
|
@@ -1253,18 +1209,18 @@ var dt = class {
|
|
|
1253
1209
|
"keyframes"
|
|
1254
1210
|
]) {
|
|
1255
1211
|
let r = t[e];
|
|
1256
|
-
Array.isArray(r) && (n[e] =
|
|
1212
|
+
Array.isArray(r) && (n[e] = Mt(r));
|
|
1257
1213
|
}
|
|
1258
1214
|
return n;
|
|
1259
|
-
},
|
|
1215
|
+
}, Mt = (e) => e.map((e) => jt(e)).filter((e) => e !== null), Nt = (e) => {
|
|
1260
1216
|
let t;
|
|
1261
1217
|
try {
|
|
1262
|
-
t =
|
|
1218
|
+
t = dt(e, { silent: !0 });
|
|
1263
1219
|
} catch {
|
|
1264
1220
|
return "";
|
|
1265
1221
|
}
|
|
1266
|
-
return t.stylesheet.rules =
|
|
1267
|
-
},
|
|
1222
|
+
return t.stylesheet.rules = Mt(t.stylesheet.rules), ft(t);
|
|
1223
|
+
}, Pt = (e, t) => {
|
|
1268
1224
|
let n = () => {
|
|
1269
1225
|
t.parentNode || (e.head ?? e.documentElement).appendChild(t);
|
|
1270
1226
|
};
|
|
@@ -1281,30 +1237,30 @@ var dt = class {
|
|
|
1281
1237
|
});
|
|
1282
1238
|
let i = () => r.disconnect(), a = e.defaultView;
|
|
1283
1239
|
a ? a.addEventListener("load", i, { once: !0 }) : setTimeout(i, 3e4);
|
|
1284
|
-
},
|
|
1240
|
+
}, Ft = { resolve: (e, t) => {
|
|
1285
1241
|
let n = e.document.createElement("style");
|
|
1286
|
-
n.textContent = t.noSanitize ? t.content :
|
|
1242
|
+
n.textContent = t.noSanitize ? t.content : Nt(t.content);
|
|
1287
1243
|
try {
|
|
1288
|
-
|
|
1244
|
+
Pt(e.document, n);
|
|
1289
1245
|
} catch (e) {
|
|
1290
1246
|
console.error(e);
|
|
1291
1247
|
}
|
|
1292
|
-
|
|
1293
|
-
} },
|
|
1248
|
+
Et(n);
|
|
1249
|
+
} }, It = (e) => {
|
|
1294
1250
|
let t = [];
|
|
1295
1251
|
return e.forEach((e, n) => {
|
|
1296
1252
|
t.push([n, e]);
|
|
1297
1253
|
}), t;
|
|
1298
|
-
},
|
|
1254
|
+
}, q = {
|
|
1299
1255
|
kind: "frame",
|
|
1300
1256
|
ensureArgs: (e) => [void 0, e],
|
|
1301
1257
|
resolve: async (e, t, n = {}) => {
|
|
1302
|
-
if (typeof t != "string") throw
|
|
1303
|
-
let r =
|
|
1258
|
+
if (typeof t != "string") throw H("fetch: url must be a string", "fetch");
|
|
1259
|
+
let r = U(e.document), i;
|
|
1304
1260
|
try {
|
|
1305
1261
|
i = new r.URL(t, e.document.baseURI).href;
|
|
1306
1262
|
} catch {
|
|
1307
|
-
throw
|
|
1263
|
+
throw H(`fetch: not a valid url: ${t}`, "fetch");
|
|
1308
1264
|
}
|
|
1309
1265
|
let a = await r.fetch(i, {
|
|
1310
1266
|
method: n.method ?? "GET",
|
|
@@ -1320,31 +1276,31 @@ var dt = class {
|
|
|
1320
1276
|
url: a.url,
|
|
1321
1277
|
redirected: a.redirected,
|
|
1322
1278
|
type: a.type,
|
|
1323
|
-
headers:
|
|
1279
|
+
headers: It(a.headers),
|
|
1324
1280
|
body: await a.arrayBuffer()
|
|
1325
1281
|
};
|
|
1326
1282
|
}
|
|
1327
|
-
},
|
|
1328
|
-
click: () =>
|
|
1329
|
-
count: () =>
|
|
1330
|
-
exists: () =>
|
|
1331
|
-
fill: () =>
|
|
1332
|
-
getAttribute: () =>
|
|
1333
|
-
hover: () =>
|
|
1334
|
-
isVisible: () =>
|
|
1335
|
-
textContent: () =>
|
|
1336
|
-
}),
|
|
1283
|
+
}, J = /* @__PURE__ */ mt({
|
|
1284
|
+
click: () => Rt,
|
|
1285
|
+
count: () => Kt,
|
|
1286
|
+
exists: () => qt,
|
|
1287
|
+
fill: () => Ht,
|
|
1288
|
+
getAttribute: () => Wt,
|
|
1289
|
+
hover: () => zt,
|
|
1290
|
+
isVisible: () => Gt,
|
|
1291
|
+
textContent: () => Ut
|
|
1292
|
+
}), Lt = (e, t) => {
|
|
1337
1293
|
let n = e.getBoundingClientRect();
|
|
1338
1294
|
return {
|
|
1339
1295
|
clientX: n.left + n.width * (t?.x ?? .5),
|
|
1340
1296
|
clientY: n.top + n.height * (t?.y ?? .5)
|
|
1341
1297
|
};
|
|
1342
|
-
},
|
|
1343
|
-
let n =
|
|
1298
|
+
}, Rt = { resolve: (e, t = {}) => {
|
|
1299
|
+
let n = K(e.elements), r = U(n), i = {
|
|
1344
1300
|
bubbles: !0,
|
|
1345
1301
|
cancelable: !0,
|
|
1346
1302
|
composed: !0,
|
|
1347
|
-
...
|
|
1303
|
+
...Lt(n, t.position),
|
|
1348
1304
|
button: 0
|
|
1349
1305
|
}, a = {
|
|
1350
1306
|
...i,
|
|
@@ -1368,12 +1324,12 @@ var dt = class {
|
|
|
1368
1324
|
...i,
|
|
1369
1325
|
buttons: 0
|
|
1370
1326
|
}));
|
|
1371
|
-
} },
|
|
1372
|
-
let n =
|
|
1327
|
+
} }, zt = { resolve: (e, t = {}) => {
|
|
1328
|
+
let n = K(e.elements), r = U(n), i = {
|
|
1373
1329
|
bubbles: !0,
|
|
1374
1330
|
cancelable: !0,
|
|
1375
1331
|
composed: !0,
|
|
1376
|
-
...
|
|
1332
|
+
...Lt(n, t.position)
|
|
1377
1333
|
}, a = {
|
|
1378
1334
|
...i,
|
|
1379
1335
|
pointerType: "mouse",
|
|
@@ -1387,11 +1343,11 @@ var dt = class {
|
|
|
1387
1343
|
...i,
|
|
1388
1344
|
bubbles: !1
|
|
1389
1345
|
})), n.dispatchEvent(new r.MouseEvent("mouseover", i)), n.dispatchEvent(new r.PointerEvent("pointermove", a)), n.dispatchEvent(new r.MouseEvent("mousemove", i));
|
|
1390
|
-
} },
|
|
1346
|
+
} }, Bt = (e, t) => {
|
|
1391
1347
|
e._valueTracker?.setValue("");
|
|
1392
|
-
let n = (
|
|
1348
|
+
let n = (W(e, "HTMLTextAreaElement") ?? W(e, "HTMLInputElement"))?.prototype, r = n && Object.getOwnPropertyDescriptor(n, "value")?.set;
|
|
1393
1349
|
r ? r.call(e, t) : e.value = t;
|
|
1394
|
-
},
|
|
1350
|
+
}, Vt = (e, t) => {
|
|
1395
1351
|
if (e.type !== "range") return null;
|
|
1396
1352
|
let n = Number(e.min || 0), r = Number(e.max || 100);
|
|
1397
1353
|
if (!Number.isFinite(n) || !Number.isFinite(r) || r <= n) return null;
|
|
@@ -1428,61 +1384,61 @@ var dt = class {
|
|
|
1428
1384
|
buttons: 0
|
|
1429
1385
|
}
|
|
1430
1386
|
};
|
|
1431
|
-
},
|
|
1432
|
-
let r =
|
|
1433
|
-
if (a ||
|
|
1434
|
-
let e = r, n = a ?
|
|
1435
|
-
n && (r.dispatchEvent(new i.PointerEvent("pointerdown", n.pointerDown)), r.dispatchEvent(new i.MouseEvent("mousedown", n.mouseDown))),
|
|
1387
|
+
}, Ht = { resolve: (e, t, n = {}) => {
|
|
1388
|
+
let r = K(e.elements), i = U(r), a = G(r, "HTMLInputElement");
|
|
1389
|
+
if (a || G(r, "HTMLTextAreaElement")) {
|
|
1390
|
+
let e = r, n = a ? Vt(e, t) : null;
|
|
1391
|
+
n && (r.dispatchEvent(new i.PointerEvent("pointerdown", n.pointerDown)), r.dispatchEvent(new i.MouseEvent("mousedown", n.mouseDown))), Bt(e, t), r.dispatchEvent(new i.Event("input", { bubbles: !0 })), n && (r.dispatchEvent(new i.PointerEvent("pointerup", n.pointerUp)), r.dispatchEvent(new i.MouseEvent("mouseup", n.mouseUp))), r.dispatchEvent(new i.Event("change", { bubbles: !0 }));
|
|
1436
1392
|
return;
|
|
1437
1393
|
}
|
|
1438
|
-
if (
|
|
1394
|
+
if (G(r, "HTMLElement") && r.isContentEditable) {
|
|
1439
1395
|
r.textContent = t, r.dispatchEvent(new i.Event("input", { bubbles: !0 }));
|
|
1440
1396
|
return;
|
|
1441
1397
|
}
|
|
1442
|
-
throw Error(`fill: element <${
|
|
1443
|
-
} },
|
|
1444
|
-
let n =
|
|
1445
|
-
if (!
|
|
1446
|
-
let r =
|
|
1398
|
+
throw Error(`fill: element <${wt(r)}> is not fillable`);
|
|
1399
|
+
} }, Ut = { resolve: (e, t = {}) => K(e.elements).textContent }, Wt = { resolve: (e, t, n = {}) => K(e.elements).getAttribute(t) }, Gt = { resolve: (e, t = {}) => {
|
|
1400
|
+
let n = K(e.elements);
|
|
1401
|
+
if (!G(n, "HTMLElement")) return !0;
|
|
1402
|
+
let r = U(n).getComputedStyle(n);
|
|
1447
1403
|
if (r?.display === "none" || r?.visibility === "hidden") return !1;
|
|
1448
1404
|
let i = n.getBoundingClientRect();
|
|
1449
1405
|
return i.width > 0 && i.height > 0;
|
|
1450
|
-
} },
|
|
1406
|
+
} }, Kt = { resolve: (e, t = {}) => e.elements.length }, qt = { resolve: (e, t = {}) => e.elements.length > 0 }, Y = (e, t) => e.elements.flatMap((e) => [...e.querySelectorAll(t)]), X = (e) => e.replaceAll("\"", "\\\""), Jt = {
|
|
1451
1407
|
to: "element",
|
|
1452
1408
|
css: !0,
|
|
1453
|
-
resolve: (e, t) =>
|
|
1409
|
+
resolve: (e, t) => Y(e, t),
|
|
1454
1410
|
render: (e) => ({
|
|
1455
1411
|
fragment: typeof e == "string" ? e : "?",
|
|
1456
1412
|
separator: "descend"
|
|
1457
1413
|
})
|
|
1458
|
-
},
|
|
1414
|
+
}, Yt = {
|
|
1459
1415
|
to: "frame",
|
|
1460
1416
|
css: !0,
|
|
1461
1417
|
barrier: "down",
|
|
1462
|
-
resolve: (e, t) =>
|
|
1418
|
+
resolve: (e, t) => Y(e, t),
|
|
1463
1419
|
render: (e) => ({
|
|
1464
1420
|
fragment: typeof e == "string" ? e : "?",
|
|
1465
1421
|
separator: "down"
|
|
1466
1422
|
})
|
|
1467
|
-
},
|
|
1423
|
+
}, Xt = {
|
|
1468
1424
|
element: {
|
|
1469
1425
|
selectors: {
|
|
1470
|
-
locator:
|
|
1471
|
-
frameLocator:
|
|
1426
|
+
locator: Jt,
|
|
1427
|
+
frameLocator: Yt,
|
|
1472
1428
|
getByRole: {
|
|
1473
1429
|
to: "element",
|
|
1474
|
-
resolve: (e, t) =>
|
|
1475
|
-
render: (e) => ({ fragment: typeof e == "string" ? `[role="${
|
|
1430
|
+
resolve: (e, t) => Y(e, `[role="${CSS.escape(t)}"]`),
|
|
1431
|
+
render: (e) => ({ fragment: typeof e == "string" ? `[role="${X(e)}"]` : "[role]" })
|
|
1476
1432
|
},
|
|
1477
1433
|
getByText: {
|
|
1478
1434
|
to: "element",
|
|
1479
1435
|
resolve: (e, t) => e.elements.flatMap((e) => [e, ...e.querySelectorAll("*")]).filter((e) => e.textContent?.includes(t)),
|
|
1480
|
-
render: (e) => ({ fragment: typeof e == "string" ? `:has-text("${
|
|
1436
|
+
render: (e) => ({ fragment: typeof e == "string" ? `:has-text("${X(e)}")` : ":has-text(...)" })
|
|
1481
1437
|
},
|
|
1482
1438
|
getByTestId: {
|
|
1483
1439
|
to: "element",
|
|
1484
|
-
resolve: (e, t) =>
|
|
1485
|
-
render: (e) => ({ fragment: typeof e == "string" ? `[data-testid="${
|
|
1440
|
+
resolve: (e, t) => Y(e, `[data-testid="${CSS.escape(t)}"]`),
|
|
1441
|
+
render: (e) => ({ fragment: typeof e == "string" ? `[data-testid="${X(e)}"]` : "[data-testid]" })
|
|
1486
1442
|
},
|
|
1487
1443
|
first: {
|
|
1488
1444
|
to: "element",
|
|
@@ -1499,20 +1455,20 @@ var dt = class {
|
|
|
1499
1455
|
}
|
|
1500
1456
|
},
|
|
1501
1457
|
operations: {
|
|
1502
|
-
click:
|
|
1503
|
-
fill:
|
|
1504
|
-
hover:
|
|
1505
|
-
textContent:
|
|
1506
|
-
getAttribute:
|
|
1507
|
-
isVisible:
|
|
1508
|
-
count:
|
|
1509
|
-
exists:
|
|
1458
|
+
click: Rt,
|
|
1459
|
+
fill: Ht,
|
|
1460
|
+
hover: zt,
|
|
1461
|
+
textContent: Ut,
|
|
1462
|
+
getAttribute: Wt,
|
|
1463
|
+
isVisible: Gt,
|
|
1464
|
+
count: Kt,
|
|
1465
|
+
exists: qt
|
|
1510
1466
|
}
|
|
1511
1467
|
},
|
|
1512
1468
|
frame: {
|
|
1513
1469
|
selectors: {
|
|
1514
|
-
locator:
|
|
1515
|
-
frameLocator:
|
|
1470
|
+
locator: Jt,
|
|
1471
|
+
frameLocator: Yt,
|
|
1516
1472
|
owner: {
|
|
1517
1473
|
to: "frame",
|
|
1518
1474
|
barrier: "up",
|
|
@@ -1526,11 +1482,11 @@ var dt = class {
|
|
|
1526
1482
|
}
|
|
1527
1483
|
},
|
|
1528
1484
|
operations: {
|
|
1529
|
-
addStyleTag:
|
|
1530
|
-
fetch:
|
|
1485
|
+
addStyleTag: Ft,
|
|
1486
|
+
fetch: q
|
|
1531
1487
|
}
|
|
1532
1488
|
}
|
|
1533
|
-
},
|
|
1489
|
+
}, Zt = (e, t = Xt) => ({
|
|
1534
1490
|
element: {
|
|
1535
1491
|
selectors: {
|
|
1536
1492
|
...t.element.selectors,
|
|
@@ -1551,29 +1507,29 @@ var dt = class {
|
|
|
1551
1507
|
...e.frame?.operations
|
|
1552
1508
|
}
|
|
1553
1509
|
}
|
|
1554
|
-
}),
|
|
1510
|
+
}), Qt = 3e4, $t = 50, en = (e) => {
|
|
1555
1511
|
let t = e[e.length - 1];
|
|
1556
1512
|
return typeof t == "object" && t ? t : void 0;
|
|
1557
|
-
},
|
|
1558
|
-
let t =
|
|
1559
|
-
return typeof t == "number" ? t :
|
|
1560
|
-
},
|
|
1513
|
+
}, tn = (e) => {
|
|
1514
|
+
let t = en(e)?.timeout;
|
|
1515
|
+
return typeof t == "number" ? t : Qt;
|
|
1516
|
+
}, nn = ({ executor: e, parts: t }) => ({ highlight: (n) => e.highlight(t, n).then(() => {}, () => {}) }), rn = async (e) => {
|
|
1561
1517
|
let t = {
|
|
1562
1518
|
parts: e.parts,
|
|
1563
1519
|
operation: e.operation,
|
|
1564
1520
|
args: e.args,
|
|
1565
1521
|
phase: "ensure"
|
|
1566
1522
|
};
|
|
1567
|
-
await e.gate?.(t,
|
|
1568
|
-
},
|
|
1523
|
+
await e.gate?.(t, nn(e));
|
|
1524
|
+
}, an = async (e) => {
|
|
1569
1525
|
let { executor: t, gate: n, parts: r, operation: i, args: a } = e;
|
|
1570
1526
|
n && await n({
|
|
1571
1527
|
parts: r,
|
|
1572
1528
|
operation: i,
|
|
1573
1529
|
args: a,
|
|
1574
1530
|
phase: "execute"
|
|
1575
|
-
},
|
|
1576
|
-
let o =
|
|
1531
|
+
}, nn(e));
|
|
1532
|
+
let o = tn(a), s = Date.now() + o, c = /* @__PURE__ */ Error(`Locator timeout (${o}ms): ${i}`), { promise: l, reject: u } = Promise.withResolvers();
|
|
1577
1533
|
l.catch(() => {});
|
|
1578
1534
|
let d = setTimeout(() => u(c), o), f = c;
|
|
1579
1535
|
try {
|
|
@@ -1581,24 +1537,24 @@ var dt = class {
|
|
|
1581
1537
|
return await Promise.race([t.execute(r, i, a), l]);
|
|
1582
1538
|
} catch (e) {
|
|
1583
1539
|
if (e === c) break;
|
|
1584
|
-
if (
|
|
1540
|
+
if (xt(e)) throw e;
|
|
1585
1541
|
f = e;
|
|
1586
1542
|
let t = s - Date.now();
|
|
1587
1543
|
if (t <= 0) break;
|
|
1588
|
-
await new Promise((e) => setTimeout(e, Math.min(
|
|
1544
|
+
await new Promise((e) => setTimeout(e, Math.min($t, t)));
|
|
1589
1545
|
}
|
|
1590
1546
|
} finally {
|
|
1591
1547
|
clearTimeout(d);
|
|
1592
1548
|
}
|
|
1593
1549
|
throw f;
|
|
1594
|
-
},
|
|
1550
|
+
}, on = (e, t, n, r) => {
|
|
1595
1551
|
let i = {};
|
|
1596
|
-
for (let [a, o] of Object.entries(t[n].selectors)) i[a] = (...i) =>
|
|
1552
|
+
for (let [a, o] of Object.entries(t[n].selectors)) i[a] = (...i) => on(e, t, o.to, [...r, {
|
|
1597
1553
|
kind: n,
|
|
1598
1554
|
name: a,
|
|
1599
1555
|
args: i
|
|
1600
1556
|
}]);
|
|
1601
|
-
for (let a of Object.keys(t[n].operations)) i[a] = (...t) =>
|
|
1557
|
+
for (let a of Object.keys(t[n].operations)) i[a] = (...t) => an({
|
|
1602
1558
|
...e,
|
|
1603
1559
|
parts: r,
|
|
1604
1560
|
operation: a,
|
|
@@ -1606,34 +1562,84 @@ var dt = class {
|
|
|
1606
1562
|
});
|
|
1607
1563
|
return i.ensure = (i, a = {}) => {
|
|
1608
1564
|
let o = t[n].operations[i]?.ensureArgs;
|
|
1609
|
-
return
|
|
1565
|
+
return rn({
|
|
1610
1566
|
...e,
|
|
1611
1567
|
parts: r,
|
|
1612
1568
|
operation: i,
|
|
1613
1569
|
args: o?.(a) ?? [a]
|
|
1614
1570
|
});
|
|
1615
1571
|
}, i;
|
|
1616
|
-
},
|
|
1572
|
+
}, sn = (e) => on(e, e.modules ?? Xt, "frame", []), cn = () => {
|
|
1573
|
+
let e = D();
|
|
1574
|
+
return e.status === "ok" && e.abi >= 2;
|
|
1575
|
+
}, ln = async () => {
|
|
1576
|
+
await O();
|
|
1577
|
+
let e = D();
|
|
1578
|
+
if (e.status === "ok" && e.abi < 2) throw new T(e.abi, 2);
|
|
1579
|
+
}, un = (e) => `Read the text, links and details ${e} shows.`, dn = (e) => `Inject unfiltered styles or code into ${e}. This can pass page details along to other sites.`, fn = [
|
|
1580
|
+
{
|
|
1581
|
+
id: "interaction",
|
|
1582
|
+
heading: "Interaction",
|
|
1583
|
+
summary: "Allow the app to interact with the website (clicks, type in text, etc.)",
|
|
1584
|
+
title: (e) => `Interact with ${e}`,
|
|
1585
|
+
description: (e, t) => t ? `Click, type and hover on ${e} for you. If you are signed in there, this happens as you.` : `Click, type and hover on ${e} for you, in a signed-out view.`,
|
|
1586
|
+
cloudTitle: (e) => `Click and type on ${e}`,
|
|
1587
|
+
cloudDescription: (e) => `Clicks, types and scrolls on ${e} for you.`
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
id: "storage",
|
|
1591
|
+
heading: "Site data",
|
|
1592
|
+
summary: "Can read the website's data",
|
|
1593
|
+
title: (e) => `Read data from ${e}`,
|
|
1594
|
+
description: un,
|
|
1595
|
+
cloudTitle: (e) => `Read what's on ${e}`,
|
|
1596
|
+
cloudDescription: un
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
id: "network",
|
|
1600
|
+
heading: "Network",
|
|
1601
|
+
summary: "Make requests on behalf of the website (using your cookies, etc.)",
|
|
1602
|
+
title: (e) => `Make requests to ${e} as you`,
|
|
1603
|
+
description: (e) => `Load pages and data from ${e} and send changes there with your signed-in session.`,
|
|
1604
|
+
cloudTitle: (e) => `Load and send data on ${e}`,
|
|
1605
|
+
cloudDescription: (e) => `Loads pages and data from ${e} and sends changes there.`
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
id: "evaluation",
|
|
1609
|
+
heading: "Evaluation",
|
|
1610
|
+
summary: "Can execute arbitrary code on the website",
|
|
1611
|
+
title: (e) => `Run code on ${e}`,
|
|
1612
|
+
description: dn,
|
|
1613
|
+
cloudTitle: (e) => `Run its own code on ${e}`,
|
|
1614
|
+
cloudDescription: dn
|
|
1615
|
+
}
|
|
1616
|
+
], pn = Zt({
|
|
1617
1617
|
element: { operations: {
|
|
1618
|
-
click: { resolve: (e, t = {}) =>
|
|
1619
|
-
hover: { resolve: (e, t = {}) =>
|
|
1620
|
-
fill: { resolve: (e, t, n = {}) =>
|
|
1621
|
-
textContent: { resolve: (e, t = {}) =>
|
|
1622
|
-
getAttribute: { resolve: (e, t, n = {}) =>
|
|
1623
|
-
isVisible: { resolve: (e, t = {}) =>
|
|
1624
|
-
count: { resolve: (e, t = {}) =>
|
|
1625
|
-
exists: { resolve: (e, t = {}) =>
|
|
1626
|
-
videoElement: { resolve: (e, t = {}) =>
|
|
1618
|
+
click: { resolve: (e, t = {}) => J.click.resolve(e, t) },
|
|
1619
|
+
hover: { resolve: (e, t = {}) => J.hover.resolve(e, t) },
|
|
1620
|
+
fill: { resolve: (e, t, n = {}) => J.fill.resolve(e, t, n) },
|
|
1621
|
+
textContent: { resolve: (e, t = {}) => J.textContent.resolve(e) },
|
|
1622
|
+
getAttribute: { resolve: (e, t, n = {}) => J.getAttribute.resolve(e, t) },
|
|
1623
|
+
isVisible: { resolve: (e, t = {}) => J.isVisible.resolve(e) },
|
|
1624
|
+
count: { resolve: (e, t = {}) => J.count.resolve(e) },
|
|
1625
|
+
exists: { resolve: (e, t = {}) => J.exists.resolve(e) },
|
|
1626
|
+
videoElement: { resolve: (e, t = {}) => w(Ct(K(e.elements), "HTMLVideoElement")) }
|
|
1627
1627
|
} },
|
|
1628
1628
|
frame: { operations: {
|
|
1629
|
-
addStyleTag: { resolve: (e, t) =>
|
|
1629
|
+
addStyleTag: { resolve: (e, t) => Ft.resolve(e, t) },
|
|
1630
1630
|
fetch: {
|
|
1631
|
-
resolve: (e, t, n = {}) =>
|
|
1632
|
-
kind:
|
|
1633
|
-
ensureArgs:
|
|
1631
|
+
resolve: (e, t, n = {}) => q.resolve(e, t, n),
|
|
1632
|
+
kind: q.kind,
|
|
1633
|
+
ensureArgs: q.ensureArgs
|
|
1634
|
+
},
|
|
1635
|
+
evaluate: {
|
|
1636
|
+
kind: "frame",
|
|
1637
|
+
resolve: (e, t, n) => {
|
|
1638
|
+
throw _t("evaluate", "this realm");
|
|
1639
|
+
}
|
|
1634
1640
|
}
|
|
1635
1641
|
} }
|
|
1636
|
-
}),
|
|
1642
|
+
}), mn = (e) => {
|
|
1637
1643
|
if (!e || e === "about:blank") return !1;
|
|
1638
1644
|
let t;
|
|
1639
1645
|
try {
|
|
@@ -1641,104 +1647,187 @@ var dt = class {
|
|
|
1641
1647
|
} catch {
|
|
1642
1648
|
return !1;
|
|
1643
1649
|
}
|
|
1644
|
-
return t.protocol === "chrome-extension:" || t.protocol === "moz-extension:" || t.protocol !== "about:" &&
|
|
1645
|
-
},
|
|
1646
|
-
if (
|
|
1647
|
-
},
|
|
1650
|
+
return t.protocol === "chrome-extension:" || t.protocol === "moz-extension:" || t.protocol !== "about:" && Ke(t.hostname);
|
|
1651
|
+
}, Z = (e) => {
|
|
1652
|
+
if (mn(e)) throw Error("attachFrame: refusing to target the extension's own pages or an FKN platform origin");
|
|
1653
|
+
}, hn = ({ src: e, domains: t, lockdown: n }) => {
|
|
1648
1654
|
if (n && !t.length && e && e !== "about:blank") throw Error("attachFrame: lockdown needs domains when the frame already has a src; pass domains or load it via goto");
|
|
1649
|
-
},
|
|
1655
|
+
}, gn = {
|
|
1650
1656
|
scope: "embed.iframe",
|
|
1651
1657
|
category: "interaction",
|
|
1652
1658
|
severity: 0,
|
|
1653
1659
|
title: "Load another website inside this app",
|
|
1654
1660
|
description: "Lets the app embed external pages directly inside its own view."
|
|
1655
|
-
},
|
|
1661
|
+
}, _n = {
|
|
1656
1662
|
scope: "embed.open",
|
|
1657
1663
|
category: "interaction",
|
|
1658
1664
|
severity: 0,
|
|
1659
1665
|
title: "Open a website inside this app",
|
|
1660
1666
|
description: "Lets the app navigate to another site without leaving its window."
|
|
1661
|
-
},
|
|
1667
|
+
}, vn = class extends Error {
|
|
1662
1668
|
name = "FrameWindowBlockedError";
|
|
1663
1669
|
constructor() {
|
|
1664
1670
|
super("attachFrame: the browser did not open the window. Call attachFrame directly in a click or key handler, and allow popups for this page");
|
|
1665
1671
|
}
|
|
1666
|
-
},
|
|
1672
|
+
}, yn = /* @__PURE__ */ new Set([
|
|
1667
1673
|
"jar-unreachable",
|
|
1668
1674
|
"bad-url",
|
|
1669
1675
|
"opaque-opener"
|
|
1670
|
-
]),
|
|
1676
|
+
]), bn = class extends Error {
|
|
1671
1677
|
name = "FrameWindowRefusedError";
|
|
1672
1678
|
reason;
|
|
1673
1679
|
constructor(e) {
|
|
1674
|
-
let t =
|
|
1680
|
+
let t = yn.has(e) ? e : "unknown";
|
|
1675
1681
|
super(t === "opaque-opener" ? "attachFrame: this page has an opaque origin, which a window can never answer, so no window was opened" : `attachFrame: the window refused to attach (${t}), and loaded nothing`), this.reason = t;
|
|
1676
1682
|
}
|
|
1677
|
-
},
|
|
1678
|
-
|
|
1683
|
+
}, xn = ["message", "document"], Sn = (e) => {
|
|
1684
|
+
if (e === "*") return "*";
|
|
1685
|
+
let t = () => /* @__PURE__ */ TypeError(`frame.postMessage: targetOrigin must be '*' or an origin, not ${JSON.stringify(e)}`);
|
|
1686
|
+
if (typeof e != "string") throw t();
|
|
1687
|
+
let n;
|
|
1688
|
+
try {
|
|
1689
|
+
n = new URL(e).origin;
|
|
1690
|
+
} catch {
|
|
1691
|
+
throw t();
|
|
1692
|
+
}
|
|
1693
|
+
if (n === "null") throw t();
|
|
1694
|
+
return n;
|
|
1695
|
+
}, Cn = (e, t) => {
|
|
1696
|
+
let n = typeof e == "object" && !!e;
|
|
1697
|
+
if (n && t !== void 0) throw TypeError("frame.postMessage: pass transfer inside the options object, not after it");
|
|
1698
|
+
let r = n ? e.targetOrigin ?? "*" : e ?? "*", i = n ? e.transfer : t;
|
|
1699
|
+
if (i !== void 0 && !Array.isArray(i)) throw TypeError("frame.postMessage: transfer must be an array");
|
|
1700
|
+
return {
|
|
1701
|
+
targetOrigin: Sn(r),
|
|
1702
|
+
transfer: i === void 0 ? [] : [...i]
|
|
1703
|
+
};
|
|
1704
|
+
}, wn = (e) => {
|
|
1705
|
+
typeof globalThis.reportError == "function" ? globalThis.reportError(e) : console.error(e);
|
|
1706
|
+
}, Tn = (e) => {
|
|
1707
|
+
let t = sn({
|
|
1679
1708
|
executor: e.executor,
|
|
1680
|
-
modules:
|
|
1709
|
+
modules: pn,
|
|
1681
1710
|
gate: e.gate
|
|
1682
|
-
}), n = (t, n = {}) => (
|
|
1711
|
+
}), n = (t, n = {}) => (Z(t), e.goto(t, n)), r = () => e.url(), i = async (t) => {
|
|
1683
1712
|
let n = e.request;
|
|
1684
1713
|
if (!n) throw Error("frame.request: this backend cannot ask for permission categories");
|
|
1685
1714
|
return n(t);
|
|
1686
|
-
}
|
|
1687
|
-
|
|
1715
|
+
}, a = async (t, n) => {
|
|
1716
|
+
let r = e.evaluate;
|
|
1717
|
+
if (!r) throw Error("frame.evaluate: this backend cannot run code in the attached frame");
|
|
1718
|
+
let i = typeof t == "function" ? t.toString() : t;
|
|
1719
|
+
if (typeof i != "string") throw TypeError("frame.evaluate: pass a function or a source string");
|
|
1720
|
+
return r(i, n);
|
|
1721
|
+
}, o = ((t, n, r) => {
|
|
1722
|
+
try {
|
|
1723
|
+
let i = e.postMessage;
|
|
1724
|
+
if (!i) throw Error("frame.postMessage: this backend cannot message the attached frame");
|
|
1725
|
+
let a = Cn(n, r);
|
|
1726
|
+
return i(t, a.targetOrigin, a.transfer);
|
|
1727
|
+
} catch (e) {
|
|
1728
|
+
return Promise.reject(e);
|
|
1729
|
+
}
|
|
1730
|
+
}), s = {
|
|
1731
|
+
message: /* @__PURE__ */ new Set(),
|
|
1732
|
+
document: /* @__PURE__ */ new Set()
|
|
1733
|
+
}, c = null, l = (e, t) => {
|
|
1734
|
+
if (!xn.includes(e)) throw TypeError(`frame.${t}: the event type must be ${xn.map((e) => `'${e}'`).join(" or ")}, not ${JSON.stringify(e)}`);
|
|
1735
|
+
return s[e];
|
|
1736
|
+
}, u = (e) => {
|
|
1737
|
+
let t = e.type === "message" ? Object.freeze({
|
|
1738
|
+
type: "message",
|
|
1739
|
+
data: e.data,
|
|
1740
|
+
origin: e.origin,
|
|
1741
|
+
ports: Object.freeze([...e.ports]),
|
|
1742
|
+
source: p
|
|
1743
|
+
}) : Object.freeze({
|
|
1744
|
+
type: "document",
|
|
1745
|
+
origin: e.origin
|
|
1746
|
+
});
|
|
1747
|
+
for (let n of [...s[e.type]]) try {
|
|
1748
|
+
n(t);
|
|
1749
|
+
} catch (e) {
|
|
1750
|
+
wn(e);
|
|
1751
|
+
}
|
|
1752
|
+
}, d = (e, t) => {
|
|
1753
|
+
if (l(e, "removeEventListener").delete(t), c !== null && !s.message.size && !s.document.size) {
|
|
1754
|
+
let e = c;
|
|
1755
|
+
c = null, e();
|
|
1756
|
+
}
|
|
1757
|
+
}, f = (t, n, r = {}) => {
|
|
1758
|
+
let i = l(t, "addEventListener");
|
|
1759
|
+
if (typeof n != "function") throw TypeError("frame.addEventListener: the listener must be a function");
|
|
1760
|
+
let { signal: a } = r;
|
|
1761
|
+
if (!(a?.aborted || i.has(n))) {
|
|
1762
|
+
if (c === null) {
|
|
1763
|
+
let t = e.listen;
|
|
1764
|
+
if (!t) throw Error("frame.addEventListener: this backend cannot relay the page's messages");
|
|
1765
|
+
c = t(u);
|
|
1766
|
+
}
|
|
1767
|
+
i.add(n), a?.addEventListener("abort", () => d(t, n), { once: !0 });
|
|
1768
|
+
}
|
|
1769
|
+
}, p = {
|
|
1688
1770
|
...t,
|
|
1689
1771
|
goto: n,
|
|
1690
1772
|
url: r,
|
|
1691
|
-
request: i
|
|
1773
|
+
request: i,
|
|
1774
|
+
evaluate: a,
|
|
1775
|
+
postMessage: o,
|
|
1776
|
+
addEventListener: f,
|
|
1777
|
+
removeEventListener: d
|
|
1692
1778
|
};
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1779
|
+
return p;
|
|
1780
|
+
}, En = [
|
|
1781
|
+
h,
|
|
1696
1782
|
t,
|
|
1697
|
-
|
|
1783
|
+
g,
|
|
1784
|
+
o,
|
|
1785
|
+
a,
|
|
1698
1786
|
c,
|
|
1787
|
+
s,
|
|
1788
|
+
d,
|
|
1789
|
+
i,
|
|
1790
|
+
n,
|
|
1699
1791
|
l,
|
|
1700
|
-
o,
|
|
1701
1792
|
f,
|
|
1702
|
-
r,
|
|
1703
|
-
n,
|
|
1704
1793
|
u,
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
s,
|
|
1794
|
+
gn,
|
|
1795
|
+
_n,
|
|
1708
1796
|
m,
|
|
1709
|
-
|
|
1710
|
-
Ke,
|
|
1797
|
+
r,
|
|
1711
1798
|
qe,
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1799
|
+
Je,
|
|
1800
|
+
Ye,
|
|
1801
|
+
nt,
|
|
1802
|
+
it
|
|
1803
|
+
], Dn = fn.map((e) => e.id), On = {
|
|
1715
1804
|
interaction: "act.click",
|
|
1716
1805
|
storage: "read.text",
|
|
1717
1806
|
network: "network.fetchCredentialed",
|
|
1718
1807
|
evaluation: "media.appearU"
|
|
1719
|
-
},
|
|
1808
|
+
}, Q = (e) => e === 0 ? "auto" : e === 4 ? "critical" : "bundled", kn = En, $ = /* @__PURE__ */ new Map(), An = {};
|
|
1720
1809
|
(() => {
|
|
1721
|
-
$ = new Map(
|
|
1722
|
-
let e = (e) =>
|
|
1723
|
-
Object.fromEntries(
|
|
1810
|
+
$ = new Map(kn.map((e) => [e.scope, e])), An = Object.fromEntries($), kn.filter((e) => e.severity === 4).map((e) => e.scope);
|
|
1811
|
+
let e = (e) => kn.filter((t) => t.category === e && Q(t.severity) === "bundled");
|
|
1812
|
+
Object.fromEntries(Dn.map((t) => [t, Math.max(0, ...e(t).map((e) => e.severity))])), Object.fromEntries(Dn.map((t) => [t, e(t).some((e) => e.unsafe === !0)]));
|
|
1724
1813
|
})();
|
|
1725
|
-
var
|
|
1814
|
+
var jn = (e) => $.get(e)?.category, Mn = (e) => {
|
|
1726
1815
|
let t = $.get(e);
|
|
1727
|
-
return t &&
|
|
1728
|
-
},
|
|
1816
|
+
return t && Q(t.severity);
|
|
1817
|
+
}, Nn = (e) => {
|
|
1729
1818
|
let t = $.get(e);
|
|
1730
|
-
if (t) return
|
|
1731
|
-
},
|
|
1732
|
-
let n = t ?? (e &&
|
|
1733
|
-
return n !== void 0 &&
|
|
1734
|
-
},
|
|
1735
|
-
for (let { category: n, key: r } of t) if (
|
|
1819
|
+
if (t) return Q(t.severity) === "critical" ? t.scope : t.category;
|
|
1820
|
+
}, Pn = (e) => On[e], Fn = ({ category: e, key: t }) => {
|
|
1821
|
+
let n = t ?? (e && Pn(e));
|
|
1822
|
+
return n !== void 0 && jn(n) !== void 0 ? n : void 0;
|
|
1823
|
+
}, In = (e, t) => {
|
|
1824
|
+
for (let { category: n, key: r } of t) if (Fn({
|
|
1736
1825
|
category: n,
|
|
1737
1826
|
key: r
|
|
1738
1827
|
}) === void 0) throw TypeError(r === void 0 ? n === void 0 ? `${e}: name a category or a permission key` : `${e}: unknown permission category "${n}"` : `${e}: unknown permission key "${r}"`);
|
|
1739
|
-
},
|
|
1828
|
+
}, Ln = (e, t = {}) => {
|
|
1740
1829
|
let n = [], r = e.map((e) => {
|
|
1741
|
-
let r =
|
|
1830
|
+
let r = Fn(e), i = [];
|
|
1742
1831
|
if (r !== void 0) for (let a of e.hosts) i.push(n.length), n.push({
|
|
1743
1832
|
...t,
|
|
1744
1833
|
key: r,
|
|
@@ -1748,8 +1837,8 @@ var wn = (e) => $.get(e)?.category, Tn = (e) => {
|
|
|
1748
1837
|
reason: e.reason
|
|
1749
1838
|
});
|
|
1750
1839
|
return {
|
|
1751
|
-
key: r !== void 0 &&
|
|
1752
|
-
category: e.category ?? (r === void 0 ? "interaction" :
|
|
1840
|
+
key: r !== void 0 && Mn(r) === "critical" ? r : void 0,
|
|
1841
|
+
category: e.category ?? (r === void 0 ? "interaction" : An[r].category),
|
|
1753
1842
|
hosts: e.hosts,
|
|
1754
1843
|
indexes: i
|
|
1755
1844
|
};
|
|
@@ -1763,18 +1852,34 @@ var wn = (e) => $.get(e)?.category, Tn = (e) => {
|
|
|
1763
1852
|
allow: i.length > 0 && i.every((t) => e[t]?.allow === !0)
|
|
1764
1853
|
}))
|
|
1765
1854
|
};
|
|
1766
|
-
},
|
|
1855
|
+
}, Rn = (e) => typeof e == "object" && !!e, zn = typeof chrome < "u" && !!chrome.runtime?.id, Bn = (e) => Rn(e) && e.FKN_WEB_EXTENSION_FRAME_ANNOUNCE_KEY === !0 && typeof e.frameId == "string" && typeof e.document == "string", Vn = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Un = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new Set();
|
|
1856
|
+
typeof window < "u" && zn && window.addEventListener("message", (e) => {
|
|
1857
|
+
if (!Bn(e.data)) return;
|
|
1858
|
+
e.stopImmediatePropagation();
|
|
1859
|
+
let t = e.source;
|
|
1860
|
+
if (!t || typeof t != "object") return;
|
|
1861
|
+
let n = t, r = Vn.get(n), i = e.data.frameId, a = e.data.document;
|
|
1862
|
+
if (Vn.set(n, i), Hn.set(n, a), r) for (let e of Wn) e(r);
|
|
1863
|
+
let o = Un.get(n);
|
|
1864
|
+
if (o) {
|
|
1865
|
+
for (let e of [...o]) (e.notDocument === void 0 || e.notDocument !== a) && (o.delete(e), e.resolve(i));
|
|
1866
|
+
o.size || Un.delete(n);
|
|
1867
|
+
}
|
|
1868
|
+
}, { capture: !0 });
|
|
1869
|
+
//#endregion
|
|
1870
|
+
//#region ../web-extension/lib/lib/frame-window.js
|
|
1871
|
+
var Gn = (e) => {
|
|
1767
1872
|
let t = e;
|
|
1768
1873
|
if (t.window === void 0) return "iframe";
|
|
1769
1874
|
if (t.iframe !== void 0) throw TypeError("attachFrame: pass either iframe or window, not both");
|
|
1770
1875
|
if (t.lockdown) throw TypeError("attachFrame: lockdown applies to an iframe, never to a window");
|
|
1771
1876
|
if (typeof t.window != "object" || t.window === null) throw TypeError("attachFrame: window must be an object");
|
|
1772
1877
|
return "window";
|
|
1773
|
-
},
|
|
1878
|
+
}, Kn = (e, t, n) => {
|
|
1774
1879
|
if (e === void 0) return t;
|
|
1775
1880
|
if (typeof e != "number" || !Number.isFinite(e) || e <= 0) throw TypeError(`attachFrame: window.${n} must be a positive number of CSS pixels`);
|
|
1776
1881
|
return Math.round(e);
|
|
1777
|
-
},
|
|
1882
|
+
}, qn = ({ url: e, width: t, height: n }) => {
|
|
1778
1883
|
let r = (() => {
|
|
1779
1884
|
if (e === void 0 || e === "" || e === "about:blank") return "";
|
|
1780
1885
|
if (typeof e != "string") throw TypeError("attachFrame: window.url must be a string");
|
|
@@ -1788,45 +1893,93 @@ var wn = (e) => $.get(e)?.category, Tn = (e) => {
|
|
|
1788
1893
|
if (t.protocol !== "http:" && t.protocol !== "https:") throw TypeError("attachFrame: window.url must be an http or https address");
|
|
1789
1894
|
return t.href;
|
|
1790
1895
|
})();
|
|
1791
|
-
return r &&
|
|
1896
|
+
return r && Z(r), {
|
|
1792
1897
|
url: r,
|
|
1793
|
-
width:
|
|
1794
|
-
height:
|
|
1898
|
+
width: Kn(t, 500, "width"),
|
|
1899
|
+
height: Kn(n, 700, "height")
|
|
1795
1900
|
};
|
|
1796
|
-
},
|
|
1797
|
-
|
|
1798
|
-
|
|
1901
|
+
}, Jn = (e) => {
|
|
1902
|
+
try {
|
|
1903
|
+
return new URL(e).hostname;
|
|
1904
|
+
} catch {
|
|
1905
|
+
return "";
|
|
1906
|
+
}
|
|
1907
|
+
}, Yn = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY", Xn = !1, Zn = () => {
|
|
1908
|
+
Xn || (Xn = !0, console.warn("[fkn-frame] the installed FKN WebExtension is too old to ask for permission categories upfront, so each capability will be asked for as it is first used. Updating the extension fixes this."));
|
|
1909
|
+
}, Qn = "frame: this frame no longer holds the document the app attached it to", $n = "frame.postMessage: '*' is not served on the extension yet, since this extension does not report the frame's origin; pass the page's origin as targetOrigin", er = (e) => {
|
|
1910
|
+
try {
|
|
1911
|
+
return new URL(e, location.href).hostname;
|
|
1912
|
+
} catch {
|
|
1913
|
+
return "";
|
|
1914
|
+
}
|
|
1915
|
+
}, tr = async ({ iframe: e, domains: t = [], syncCookies: n = !0, lockdown: r = !1, permissions: i }) => {
|
|
1799
1916
|
let a = crypto.randomUUID();
|
|
1800
|
-
if (
|
|
1917
|
+
if (Z(e.src), hn({
|
|
1801
1918
|
src: e.src,
|
|
1802
1919
|
domains: t,
|
|
1803
1920
|
lockdown: r
|
|
1804
|
-
}), await
|
|
1805
|
-
e.dispatchEvent(new CustomEvent(
|
|
1806
|
-
let { executeLocator: o, highlightLocator: s, ensureLocatorPermission: c, requestCategories: l,
|
|
1921
|
+
}), await O(), !e.isConnected) throw Error("attachFrame: the iframe must be connected to the document before attaching");
|
|
1922
|
+
e.dispatchEvent(new CustomEvent(Yn, { detail: a }));
|
|
1923
|
+
let { executeLocator: o, highlightLocator: s, ensureLocatorPermission: c, requestCategories: l, evaluateFrame: u, goto: d } = await k.attachFrame({
|
|
1807
1924
|
marker: a,
|
|
1808
1925
|
domains: t,
|
|
1809
1926
|
syncCookies: n,
|
|
1810
1927
|
lockdown: r
|
|
1811
|
-
}),
|
|
1928
|
+
}), f = new Set(p([...t, er(e.src)], { ipv6: !0 })), m = (e) => f.has(p([Jn(e)], { ipv6: !0 })[0] ?? ""), h = Tn({
|
|
1812
1929
|
executor: {
|
|
1813
1930
|
execute: o,
|
|
1814
1931
|
highlight: s
|
|
1815
1932
|
},
|
|
1816
1933
|
gate: (e) => c(e.parts, e.operation, e.args),
|
|
1817
|
-
request: async (e) => (
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1934
|
+
request: async (e) => (In("frame.request", e), await ln(), l(e)),
|
|
1935
|
+
evaluate: async (e, t) => {
|
|
1936
|
+
if (!je(D(), "evaluate")) {
|
|
1937
|
+
let e = D();
|
|
1938
|
+
throw new E("evaluate", e.status === "ok" ? e.abi : 0);
|
|
1939
|
+
}
|
|
1940
|
+
return u({
|
|
1941
|
+
source: e,
|
|
1942
|
+
arg: t
|
|
1943
|
+
});
|
|
1944
|
+
},
|
|
1945
|
+
postMessage: (t, n, r) => {
|
|
1946
|
+
if (n === "*") throw B($n, "postMessage", "extension");
|
|
1947
|
+
if (!m(n)) throw V(Qn, "postMessage");
|
|
1948
|
+
let i = e.contentWindow;
|
|
1949
|
+
if (i === null) throw V("frame: navigate the frame before postMessage", "postMessage");
|
|
1950
|
+
return i.postMessage(t, n, r), Promise.resolve();
|
|
1951
|
+
},
|
|
1952
|
+
listen: (t) => {
|
|
1953
|
+
let n = (n) => {
|
|
1954
|
+
n.source !== null && n.source === e.contentWindow && !Bn(n.data) && m(n.origin) && t({
|
|
1955
|
+
type: "message",
|
|
1956
|
+
data: n.data,
|
|
1957
|
+
origin: n.origin,
|
|
1958
|
+
ports: n.ports
|
|
1959
|
+
});
|
|
1960
|
+
}, r = () => t({
|
|
1961
|
+
type: "document",
|
|
1962
|
+
origin: ""
|
|
1963
|
+
});
|
|
1964
|
+
return window.addEventListener("message", n), e.addEventListener("load", r), () => {
|
|
1965
|
+
window.removeEventListener("message", n), e.removeEventListener("load", r);
|
|
1966
|
+
};
|
|
1967
|
+
},
|
|
1968
|
+
goto: (e, t = {}) => {
|
|
1969
|
+
for (let t of p([er(e)], { ipv6: !0 })) f.add(t);
|
|
1970
|
+
return d({
|
|
1971
|
+
url: e,
|
|
1972
|
+
...t
|
|
1973
|
+
});
|
|
1974
|
+
},
|
|
1822
1975
|
url: () => e.src
|
|
1823
1976
|
});
|
|
1824
|
-
return i?.length && (
|
|
1825
|
-
},
|
|
1826
|
-
if (
|
|
1827
|
-
let t =
|
|
1828
|
-
throw new
|
|
1829
|
-
},
|
|
1977
|
+
return i?.length && (cn() ? await h.request(i) : Zn()), h;
|
|
1978
|
+
}, nr = "attachFrame: window mode is served by the cloud backend for now, whatever extension is installed. Use cloud.attachFrame({ window })", rr = async (e) => {
|
|
1979
|
+
if (qn(e.window), e.syncCookies === !1) throw TypeError("attachFrame: syncCookies false does not apply to an extension window, which is the site's own first-party tab");
|
|
1980
|
+
let t = D();
|
|
1981
|
+
throw new E("attachWindow", t.status === "absent" ? 0 : t.abi, nr);
|
|
1982
|
+
}, ir = (async (e) => Gn(e) === "window" ? rr(e) : tr(e)), ar = "permissions.request: pass hosts, the sites the grant applies to", or = { request: async (e) => {
|
|
1830
1983
|
let t = e.map((e) => {
|
|
1831
1984
|
let { category: t, key: n, scope: r, reason: i, hosts: a } = e;
|
|
1832
1985
|
if (!("hosts" in e) && !("category" in e)) return { legacy: {
|
|
@@ -1835,7 +1988,7 @@ var wn = (e) => $.get(e)?.category, Tn = (e) => {
|
|
|
1835
1988
|
reason: i
|
|
1836
1989
|
} };
|
|
1837
1990
|
let o = p(a ?? [], { ipv6: !0 });
|
|
1838
|
-
if (!o.length) throw TypeError(
|
|
1991
|
+
if (!o.length) throw TypeError(ar);
|
|
1839
1992
|
return { ask: {
|
|
1840
1993
|
category: t,
|
|
1841
1994
|
key: n,
|
|
@@ -1843,9 +1996,9 @@ var wn = (e) => $.get(e)?.category, Tn = (e) => {
|
|
|
1843
1996
|
hosts: o
|
|
1844
1997
|
} };
|
|
1845
1998
|
}), n = t.flatMap((e) => "ask" in e ? [e.ask] : []);
|
|
1846
|
-
|
|
1847
|
-
let { items: r, answer: i } =
|
|
1999
|
+
In("permissions.request", n), n.length && await ln();
|
|
2000
|
+
let { items: r, answer: i } = Ln(n), a = t.flatMap((e) => "legacy" in e ? [e.legacy] : []), o = [...r, ...a], s = o.length ? await k.requestPermissions(o) : [], c = i(s.slice(0, r.length)), l = s.slice(r.length), u = 0, d = 0;
|
|
1848
2001
|
return t.map((e) => "ask" in e ? c[u++] : l[d++]);
|
|
1849
|
-
} },
|
|
2002
|
+
} }, sr = "PermissionDeniedError", cr = (e) => e instanceof Error ? e.name === sr : Rn(e) && e.name === "PermissionDeniedError";
|
|
1850
2003
|
//#endregion
|
|
1851
|
-
export {
|
|
2004
|
+
export { T as $, it as A, Qe as B, V as C, xt as D, B as E, $e as F, Ve as G, A as H, tt as I, D as J, Pe as K, Je as L, at as M, rt as N, ht as O, nt as P, E as Q, Ye as R, H as S, _t as T, Ue as U, Ze as V, He as W, O as X, Le as Y, xe as Z, hn as _, ir as a, _e as at, I as b, jn as c, vn as d, Se as et, bn as f, Z as g, _n as h, Yn as i, w as it, ot as j, yt as k, Nn as l, Tn as m, cr as n, be as nt, Gn as o, ye as ot, gn as p, Fe as q, or as r, ve as rt, qn as s, S as st, sr as t, Ae as tt, Mn as u, mn as v, L as w, vt as x, fn as y, qe as z };
|