leesto-connect 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/dist/leesto-connect.js +905 -850
- package/dist/leesto-connect.js.map +1 -1
- package/package.json +1 -1
package/dist/leesto-connect.js
CHANGED
|
@@ -1,62 +1,66 @@
|
|
|
1
|
-
var Mt = "login", xt = "rrweb-buffer",
|
|
2
|
-
function
|
|
1
|
+
var Mt = "login", xt = "rrweb-buffer", Ft = "ambient", Dt = "login-anchor", Pt = ["ArrowDown", "Escape"];
|
|
2
|
+
function $t(e) {
|
|
3
|
+
return Pt.includes(e);
|
|
4
|
+
}
|
|
5
|
+
var Bt = 6e3, qt = 3e3;
|
|
6
|
+
function Ut(e) {
|
|
3
7
|
return typeof e == "object" && e !== null && typeof e.type == "string" && e.type.startsWith("leesto:");
|
|
4
8
|
}
|
|
5
|
-
var
|
|
9
|
+
var Ht = [
|
|
6
10
|
"mask_all",
|
|
7
11
|
"labels_visible",
|
|
8
12
|
"inputs_only"
|
|
9
|
-
],
|
|
10
|
-
function
|
|
11
|
-
return typeof e == "string" &&
|
|
13
|
+
], Le = "mask_all";
|
|
14
|
+
function Gt(e) {
|
|
15
|
+
return typeof e == "string" && Ht.includes(e);
|
|
12
16
|
}
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
return typeof e == "string" &&
|
|
17
|
+
var Wt = "leesto_diag", Vt = "leesto_run", Ye = "X-Leesto-Run-Id", zt = "leesto_mask", Kt = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
18
|
+
function be(e) {
|
|
19
|
+
return typeof e == "string" && Kt.test(e);
|
|
16
20
|
}
|
|
17
|
-
function
|
|
21
|
+
function jt() {
|
|
18
22
|
try {
|
|
19
23
|
const e = globalThis.crypto, t = e?.randomUUID?.();
|
|
20
|
-
if (
|
|
24
|
+
if (be(t)) return t;
|
|
21
25
|
if (!e?.getRandomValues) return;
|
|
22
26
|
const n = e.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
23
27
|
n[6] = (n[6] ?? 0) & 15 | 64, n[8] = (n[8] ?? 0) & 63 | 128;
|
|
24
28
|
const r = Array.from(n, (i) => i.toString(16).padStart(2, "0")).join(""), o = `${r.slice(0, 8)}-${r.slice(8, 12)}-${r.slice(12, 16)}-${r.slice(16, 20)}-${r.slice(20)}`;
|
|
25
|
-
return
|
|
29
|
+
return be(o) ? o : void 0;
|
|
26
30
|
} catch {
|
|
27
31
|
return;
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
|
-
function
|
|
34
|
+
function Xt(e) {
|
|
31
35
|
try {
|
|
32
|
-
const t = new URLSearchParams(e).getAll(
|
|
33
|
-
return t.some((r) => r !== n) ?
|
|
36
|
+
const t = new URLSearchParams(e).getAll(zt), [n] = t;
|
|
37
|
+
return t.some((r) => r !== n) ? Le : Gt(n) ? n : Le;
|
|
34
38
|
} catch {
|
|
35
|
-
return
|
|
39
|
+
return Le;
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
|
-
function
|
|
42
|
+
function Yt(e) {
|
|
39
43
|
try {
|
|
40
|
-
const t = new URLSearchParams(e).get(
|
|
41
|
-
return
|
|
44
|
+
const t = new URLSearchParams(e).get(Vt);
|
|
45
|
+
return be(t) ? t : void 0;
|
|
42
46
|
} catch {
|
|
43
47
|
return;
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
|
-
function
|
|
50
|
+
function ke(e) {
|
|
47
51
|
try {
|
|
48
|
-
return new URLSearchParams(e).get(
|
|
52
|
+
return new URLSearchParams(e).get(Wt) === "1";
|
|
49
53
|
} catch {
|
|
50
54
|
return !1;
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
57
|
+
function Zt(e, t) {
|
|
58
|
+
if (ke(e)) return e;
|
|
55
59
|
if (typeof t != "string" || !t.startsWith("leesto-arming?")) return "";
|
|
56
60
|
const n = `?${t.slice(14)}`;
|
|
57
|
-
return
|
|
61
|
+
return ke(n) ? n : "";
|
|
58
62
|
}
|
|
59
|
-
function
|
|
63
|
+
function ht(e) {
|
|
60
64
|
try {
|
|
61
65
|
const t = new URL(e);
|
|
62
66
|
return `${t.origin}${t.pathname}`;
|
|
@@ -64,28 +68,28 @@ function mt(e) {
|
|
|
64
68
|
return e.split(/[?#]/)[0] ?? e;
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
|
-
var Ze = "leesto/console",
|
|
71
|
+
var Ze = "leesto/console", Qt = "leesto/network", Jt = "leesto/network-ring", en = "leesto/console-ring", tn = {
|
|
68
72
|
primary: "#08783f",
|
|
69
73
|
hover: "#066633",
|
|
70
74
|
foreground: "#f3fff7"
|
|
71
|
-
},
|
|
75
|
+
}, nn = {
|
|
72
76
|
primary: "#46c383",
|
|
73
77
|
hover: "#65d49b",
|
|
74
78
|
foreground: "#082315"
|
|
75
|
-
},
|
|
76
|
-
light:
|
|
77
|
-
dark:
|
|
78
|
-
},
|
|
79
|
-
function
|
|
79
|
+
}, rn = {
|
|
80
|
+
light: tn,
|
|
81
|
+
dark: nn
|
|
82
|
+
}, W = (e) => Math.min(1, Math.max(0, e));
|
|
83
|
+
function Me(e, [t, n, r]) {
|
|
80
84
|
return e.map((o) => o[0] * t + o[1] * n + o[2] * r);
|
|
81
85
|
}
|
|
82
|
-
var
|
|
86
|
+
var ee = (e) => {
|
|
83
87
|
const t = Math.abs(e);
|
|
84
88
|
return t <= 0.04045 ? e / 12.92 : Math.sign(e) * ((t + 0.055) / 1.055) ** 2.4;
|
|
85
|
-
},
|
|
89
|
+
}, Ae = (e) => {
|
|
86
90
|
const t = Math.abs(e);
|
|
87
91
|
return t <= 31308e-7 ? e * 12.92 : Math.sign(e) * (1.055 * t ** (1 / 2.4) - 0.055);
|
|
88
|
-
},
|
|
92
|
+
}, on = [
|
|
89
93
|
[
|
|
90
94
|
1.2249401762805598,
|
|
91
95
|
-0.22494017628055996,
|
|
@@ -101,7 +105,7 @@ var Y = (e) => {
|
|
|
101
105
|
-0.07863604555063188,
|
|
102
106
|
1.0982736001409663
|
|
103
107
|
]
|
|
104
|
-
],
|
|
108
|
+
], sn = [
|
|
105
109
|
[
|
|
106
110
|
0.955473421488075,
|
|
107
111
|
-0.02309845494876471,
|
|
@@ -117,7 +121,7 @@ var Y = (e) => {
|
|
|
117
121
|
-0.020507649298898964,
|
|
118
122
|
1.330365926242124
|
|
119
123
|
]
|
|
120
|
-
],
|
|
124
|
+
], an = [
|
|
121
125
|
[
|
|
122
126
|
3.2409699419045226,
|
|
123
127
|
-1.537383177570094,
|
|
@@ -133,17 +137,17 @@ var Y = (e) => {
|
|
|
133
137
|
-0.20397695888897652,
|
|
134
138
|
1.0569715142428786
|
|
135
139
|
]
|
|
136
|
-
],
|
|
140
|
+
], Ie = [
|
|
137
141
|
0.3457 / 0.3585,
|
|
138
142
|
1,
|
|
139
143
|
0.2958 / 0.3585
|
|
140
144
|
];
|
|
141
|
-
function
|
|
145
|
+
function fe([e, t, n], r) {
|
|
142
146
|
return {
|
|
143
|
-
r:
|
|
144
|
-
g:
|
|
145
|
-
b:
|
|
146
|
-
a:
|
|
147
|
+
r: W(Ae(e)),
|
|
148
|
+
g: W(Ae(t)),
|
|
149
|
+
b: W(Ae(n)),
|
|
150
|
+
a: W(r)
|
|
147
151
|
};
|
|
148
152
|
}
|
|
149
153
|
function Qe(e, t, n) {
|
|
@@ -155,21 +159,21 @@ function Qe(e, t, n) {
|
|
|
155
159
|
];
|
|
156
160
|
}
|
|
157
161
|
function Je(e, t, n) {
|
|
158
|
-
const r = 903.2962962962963, o = 216 / 24389, i = (e + 16) / 116, l = i + t / 500, c = i - n / 200, s = l ** 3 > o ? l ** 3 : (116 * l - 16) / r, a = e > r * o ? i ** 3 : e / r, u = c ** 3 > o ? c ** 3 : (116 * c - 16) / r,
|
|
159
|
-
s *
|
|
160
|
-
a *
|
|
161
|
-
u *
|
|
162
|
+
const r = 903.2962962962963, o = 216 / 24389, i = (e + 16) / 116, l = i + t / 500, c = i - n / 200, s = l ** 3 > o ? l ** 3 : (116 * l - 16) / r, a = e > r * o ? i ** 3 : e / r, u = c ** 3 > o ? c ** 3 : (116 * c - 16) / r, f = [
|
|
163
|
+
s * Ie[0],
|
|
164
|
+
a * Ie[1],
|
|
165
|
+
u * Ie[2]
|
|
162
166
|
];
|
|
163
|
-
return
|
|
167
|
+
return Me(an, Me(sn, f));
|
|
164
168
|
}
|
|
165
|
-
function
|
|
169
|
+
function G(e, t) {
|
|
166
170
|
if (e === void 0) return null;
|
|
167
171
|
if (e === "none") return 0;
|
|
168
172
|
const n = Number.parseFloat(e);
|
|
169
173
|
return Number.isFinite(n) ? e.endsWith("%") ? n / 100 * t : n : null;
|
|
170
174
|
}
|
|
171
|
-
var
|
|
172
|
-
function
|
|
175
|
+
var ln = /^(rgba?|oklch|oklab|lab|lch|color)\((.*)\)$/, cn = /^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/;
|
|
176
|
+
function un(e) {
|
|
173
177
|
const t = e.length <= 4 ? [...e].map((r) => r + r).join("") : e, n = (r) => Number.parseInt(t.slice(r * 2, r * 2 + 2), 16) / 255;
|
|
174
178
|
return {
|
|
175
179
|
r: n(0),
|
|
@@ -178,7 +182,7 @@ function ln(e) {
|
|
|
178
182
|
a: t.length === 8 ? n(3) : 1
|
|
179
183
|
};
|
|
180
184
|
}
|
|
181
|
-
function
|
|
185
|
+
function He(e) {
|
|
182
186
|
const t = e.trim().toLowerCase();
|
|
183
187
|
if (t === "transparent") return {
|
|
184
188
|
r: 0,
|
|
@@ -186,61 +190,61 @@ function Pe(e) {
|
|
|
186
190
|
b: 0,
|
|
187
191
|
a: 0
|
|
188
192
|
};
|
|
189
|
-
const n =
|
|
190
|
-
if (n) return
|
|
191
|
-
const r =
|
|
193
|
+
const n = cn.exec(t);
|
|
194
|
+
if (n) return un(n[1] ?? "");
|
|
195
|
+
const r = ln.exec(t);
|
|
192
196
|
if (!r) return null;
|
|
193
|
-
const o = r[1], [i = "", l] = (r[2] ?? "").split("/"), c = i.split(/[\s,]+/).filter(Boolean), s = l?.trim() ?? (o === "color" ? void 0 : c[3]), a = s === void 0 ? 1 :
|
|
197
|
+
const o = r[1], [i = "", l] = (r[2] ?? "").split("/"), c = i.split(/[\s,]+/).filter(Boolean), s = l?.trim() ?? (o === "color" ? void 0 : c[3]), a = s === void 0 ? 1 : G(s, 1);
|
|
194
198
|
if (a === null) return null;
|
|
195
199
|
if (o === "color") {
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
const v = c[0], [E, _, A] = [
|
|
201
|
+
G(c[1], 1),
|
|
202
|
+
G(c[2], 1),
|
|
203
|
+
G(c[3], 1)
|
|
200
204
|
];
|
|
201
|
-
return
|
|
202
|
-
r:
|
|
203
|
-
g:
|
|
204
|
-
b:
|
|
205
|
-
a:
|
|
206
|
-
} :
|
|
207
|
-
|
|
205
|
+
return E === null || _ === null || A === null ? null : v === "srgb" ? {
|
|
206
|
+
r: W(E),
|
|
207
|
+
g: W(_),
|
|
208
|
+
b: W(A),
|
|
209
|
+
a: W(a)
|
|
210
|
+
} : v === "srgb-linear" ? fe([
|
|
211
|
+
E,
|
|
208
212
|
_,
|
|
209
|
-
|
|
210
|
-
], a) :
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
A
|
|
214
|
+
], a) : v === "display-p3" ? fe(Me(on, [
|
|
215
|
+
ee(E),
|
|
216
|
+
ee(_),
|
|
217
|
+
ee(A)
|
|
214
218
|
]), a) : null;
|
|
215
219
|
}
|
|
216
220
|
if (o === "rgb" || o === "rgba") {
|
|
217
|
-
const [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
+
const [v, E, _] = [
|
|
222
|
+
G(c[0], 255),
|
|
223
|
+
G(c[1], 255),
|
|
224
|
+
G(c[2], 255)
|
|
221
225
|
];
|
|
222
|
-
return
|
|
223
|
-
r:
|
|
224
|
-
g:
|
|
225
|
-
b:
|
|
226
|
-
a:
|
|
226
|
+
return v === null || E === null || _ === null ? null : {
|
|
227
|
+
r: W(v / 255),
|
|
228
|
+
g: W(E / 255),
|
|
229
|
+
b: W(_ / 255),
|
|
230
|
+
a: W(a)
|
|
227
231
|
};
|
|
228
232
|
}
|
|
229
|
-
const u = o === "lab" || o === "lch",
|
|
230
|
-
if (
|
|
233
|
+
const u = o === "lab" || o === "lch", f = G(c[0], u ? 100 : 1);
|
|
234
|
+
if (f === null) return null;
|
|
231
235
|
if (o === "oklab" || o === "lab") {
|
|
232
|
-
const [
|
|
233
|
-
return
|
|
236
|
+
const [v, E] = [G(c[1], u ? 125 : 0.4), G(c[2], u ? 125 : 0.4)];
|
|
237
|
+
return v === null || E === null ? null : fe(u ? Je(f, v, E) : Qe(f, v, E), a);
|
|
234
238
|
}
|
|
235
|
-
const [
|
|
236
|
-
if (
|
|
237
|
-
const
|
|
238
|
-
return
|
|
239
|
+
const [d, p] = [G(c[1], u ? 150 : 0.4), G(c[2], 1)];
|
|
240
|
+
if (d === null || p === null) return null;
|
|
241
|
+
const y = p * Math.PI / 180, [S, R] = [d * Math.cos(y), d * Math.sin(y)];
|
|
242
|
+
return fe(u ? Je(f, S, R) : Qe(f, S, R), a);
|
|
239
243
|
}
|
|
240
|
-
var
|
|
241
|
-
function
|
|
244
|
+
var fn = /(?:rgba?|oklch|oklab|lab|lch|color)\([^()]*\)|\btransparent\b/g;
|
|
245
|
+
function dn(e) {
|
|
242
246
|
if (!e.includes("gradient(")) return null;
|
|
243
|
-
const t = (e.toLowerCase().match(
|
|
247
|
+
const t = (e.toLowerCase().match(fn) ?? []).map(He).filter((o) => o !== null);
|
|
244
248
|
if (t.length === 0) return null;
|
|
245
249
|
const n = t.reduce((o, i) => o + i.a, 0);
|
|
246
250
|
if (n === 0) return {
|
|
@@ -257,37 +261,37 @@ function un(e) {
|
|
|
257
261
|
a: n / t.length
|
|
258
262
|
};
|
|
259
263
|
}
|
|
260
|
-
function
|
|
264
|
+
function xe({ r: e, g: t, b: n }) {
|
|
261
265
|
const [r, o, i] = [
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
], l = Math.cbrt(0.4122214708 * r + 0.5363325363 * o + 0.0514459929 * i), c = Math.cbrt(0.2119034982 * r + 0.6806995451 * o + 0.1073969566 * i), s = Math.cbrt(0.0883024619 * r + 0.2817188376 * o + 0.6299787005 * i), a = 0.2104542553 * l + 0.793617785 * c - 0.0040720468 * s, u = 1.9779984951 * l - 2.428592205 * c + 0.4505937099 * s,
|
|
266
|
+
ee(e),
|
|
267
|
+
ee(t),
|
|
268
|
+
ee(n)
|
|
269
|
+
], l = Math.cbrt(0.4122214708 * r + 0.5363325363 * o + 0.0514459929 * i), c = Math.cbrt(0.2119034982 * r + 0.6806995451 * o + 0.1073969566 * i), s = Math.cbrt(0.0883024619 * r + 0.2817188376 * o + 0.6299787005 * i), a = 0.2104542553 * l + 0.793617785 * c - 0.0040720468 * s, u = 1.9779984951 * l - 2.428592205 * c + 0.4505937099 * s, f = 0.0259040371 * l + 0.7827717662 * c - 0.808675766 * s, d = Math.atan2(f, u) * 180 / Math.PI;
|
|
266
270
|
return {
|
|
267
271
|
L: a,
|
|
268
|
-
C: Math.hypot(u,
|
|
269
|
-
H:
|
|
272
|
+
C: Math.hypot(u, f),
|
|
273
|
+
H: d < 0 ? d + 360 : d
|
|
270
274
|
};
|
|
271
275
|
}
|
|
272
|
-
var
|
|
276
|
+
var pn = {
|
|
273
277
|
r: 1,
|
|
274
278
|
g: 1,
|
|
275
279
|
b: 1
|
|
276
|
-
},
|
|
280
|
+
}, mn = {
|
|
277
281
|
r: 18 / 255,
|
|
278
282
|
g: 18 / 255,
|
|
279
283
|
b: 18 / 255
|
|
280
284
|
};
|
|
281
|
-
function
|
|
282
|
-
return e.includes("dark") && (!e.includes("light") || t) ?
|
|
285
|
+
function hn(e, t) {
|
|
286
|
+
return e.includes("dark") && (!e.includes("light") || t) ? mn : pn;
|
|
283
287
|
}
|
|
284
|
-
function
|
|
285
|
-
const t = [], n =
|
|
288
|
+
function gn(e) {
|
|
289
|
+
const t = [], n = dn(e.backgroundImage);
|
|
286
290
|
n && n.a > 0 && t.push(n);
|
|
287
|
-
const r =
|
|
291
|
+
const r = He(e.backgroundColor);
|
|
288
292
|
return r && r.a > 0 && t.push(r), t;
|
|
289
293
|
}
|
|
290
|
-
function
|
|
294
|
+
function yn(e, t) {
|
|
291
295
|
const n = {
|
|
292
296
|
r: 0,
|
|
293
297
|
g: 0,
|
|
@@ -305,28 +309,28 @@ function mn(e, t) {
|
|
|
305
309
|
b: n.b + t.b * r
|
|
306
310
|
};
|
|
307
311
|
}
|
|
308
|
-
function
|
|
312
|
+
function bn(e) {
|
|
309
313
|
const t = e.defaultView;
|
|
310
314
|
if (!t || typeof e.elementsFromPoint != "function") return [];
|
|
311
315
|
const { innerWidth: n, innerHeight: r } = t;
|
|
312
316
|
if (!n || !r) return [];
|
|
313
|
-
const o =
|
|
317
|
+
const o = hn(t.getComputedStyle(e.documentElement).colorScheme ?? "", typeof t.matchMedia == "function" && t.matchMedia("(prefers-color-scheme: dark)").matches), i = /* @__PURE__ */ new Map(), l = (s) => {
|
|
314
318
|
let a = i.get(s);
|
|
315
|
-
return a || (a = s.matches("[data-leesto-picker-outline], [data-leesto-capture-cover]") ? [] :
|
|
319
|
+
return a || (a = s.matches("[data-leesto-picker-outline], [data-leesto-capture-cover]") ? [] : gn(t.getComputedStyle(s)), i.set(s, a)), a;
|
|
316
320
|
}, c = [];
|
|
317
321
|
for (let s = 0; s < 10; s++) for (let a = 0; a < 16; a++) {
|
|
318
|
-
const u = (a + 0.5) * n / 16,
|
|
319
|
-
let
|
|
320
|
-
for (const
|
|
321
|
-
for (const
|
|
322
|
-
|
|
323
|
-
if (
|
|
322
|
+
const u = (a + 0.5) * n / 16, f = (s + 0.5) * r / 10, d = [];
|
|
323
|
+
let p = 0;
|
|
324
|
+
for (const y of e.elementsFromPoint(u, f)) {
|
|
325
|
+
for (const S of l(y))
|
|
326
|
+
d.push(S), p += (1 - p) * S.a;
|
|
327
|
+
if (p >= 0.95) break;
|
|
324
328
|
}
|
|
325
|
-
c.push(
|
|
329
|
+
c.push(yn(d, o));
|
|
326
330
|
}
|
|
327
331
|
return c;
|
|
328
332
|
}
|
|
329
|
-
function
|
|
333
|
+
function vn(e) {
|
|
330
334
|
const t = e.defaultView, n = [];
|
|
331
335
|
for (const r of e.querySelectorAll('meta[name="theme-color"]')) {
|
|
332
336
|
const o = r.getAttribute("media");
|
|
@@ -334,33 +338,33 @@ function bn(e) {
|
|
|
334
338
|
}
|
|
335
339
|
t && n.push(t.getComputedStyle(e.documentElement).getPropertyValue("accent-color"));
|
|
336
340
|
for (const r of n) {
|
|
337
|
-
const o =
|
|
341
|
+
const o = He(r);
|
|
338
342
|
if (!o || o.a < 0.95) continue;
|
|
339
343
|
const i = {
|
|
340
344
|
r: o.r,
|
|
341
345
|
g: o.g,
|
|
342
346
|
b: o.b
|
|
343
347
|
};
|
|
344
|
-
if (
|
|
348
|
+
if (xe(i).C >= 0.035) return i;
|
|
345
349
|
}
|
|
346
350
|
return null;
|
|
347
351
|
}
|
|
348
352
|
var et = (e) => Math.floor(e / 30) % 12;
|
|
349
|
-
function
|
|
353
|
+
function wn(e, t = null) {
|
|
350
354
|
if (e.length === 0) return null;
|
|
351
|
-
const n = e.map(
|
|
352
|
-
for (const
|
|
353
|
-
if (
|
|
354
|
-
const
|
|
355
|
-
i[
|
|
355
|
+
const n = e.map(xe), r = n.reduce((d, p) => d + p.L, 0) / n.length, o = Math.round(Math.min(1, Math.max(0, r)) * 100) / 100, i = Array.from({ length: 12 }, () => 0), l = Array.from({ length: 12 }, () => 0);
|
|
356
|
+
for (const d of n) {
|
|
357
|
+
if (d.C < 0.035) continue;
|
|
358
|
+
const p = et(d.H);
|
|
359
|
+
i[p] = (i[p] ?? 0) + d.C ** 2, l[p] = (l[p] ?? 0) + 1;
|
|
356
360
|
}
|
|
357
|
-
const c = (
|
|
361
|
+
const c = (d, p) => (d[(p + 11) % 12] ?? 0) + (d[p] ?? 0) + (d[(p + 1) % 12] ?? 0);
|
|
358
362
|
let s = null;
|
|
359
|
-
for (let
|
|
360
|
-
c(l,
|
|
363
|
+
for (let d = 0; d < 12; d++)
|
|
364
|
+
c(l, d) < 4 || (s === null || c(i, d) > c(i, s)) && (s = d);
|
|
361
365
|
if (s === null || c(i, s) < 3e-3) return {
|
|
362
366
|
lightness: o,
|
|
363
|
-
hue: t ? Math.round(
|
|
367
|
+
hue: t ? Math.round(xe(t).H) % 360 : null
|
|
364
368
|
};
|
|
365
369
|
const a = /* @__PURE__ */ new Set([
|
|
366
370
|
(s + 11) % 12,
|
|
@@ -370,78 +374,78 @@ function yn(e, t = null) {
|
|
|
370
374
|
x: 0,
|
|
371
375
|
y: 0
|
|
372
376
|
};
|
|
373
|
-
for (const
|
|
374
|
-
if (
|
|
375
|
-
const
|
|
376
|
-
u.x +=
|
|
377
|
+
for (const d of n) {
|
|
378
|
+
if (d.C < 0.035 || !a.has(et(d.H))) continue;
|
|
379
|
+
const p = d.C ** 2, y = d.H * Math.PI / 180;
|
|
380
|
+
u.x += p * Math.cos(y), u.y += p * Math.sin(y);
|
|
377
381
|
}
|
|
378
|
-
const
|
|
382
|
+
const f = Math.atan2(u.y, u.x) * 180 / Math.PI;
|
|
379
383
|
return {
|
|
380
384
|
lightness: o,
|
|
381
|
-
hue: Math.round(
|
|
385
|
+
hue: Math.round(f + 360) % 360
|
|
382
386
|
};
|
|
383
387
|
}
|
|
384
|
-
function
|
|
388
|
+
function En(e, t) {
|
|
385
389
|
if (!e || Math.abs(Math.round(e.lightness * 100) - Math.round(t.lightness * 100)) >= 2) return !0;
|
|
386
390
|
if (e.hue === null || t.hue === null) return e.hue !== t.hue;
|
|
387
391
|
const n = Math.abs(e.hue - t.hue) % 360;
|
|
388
392
|
return Math.min(n, 360 - n) >= 10;
|
|
389
393
|
}
|
|
390
|
-
var
|
|
391
|
-
var
|
|
394
|
+
var Sn = [150, 800], Tn = 1e3;
|
|
395
|
+
var _n = 2e3, tt = [
|
|
392
396
|
"class",
|
|
393
397
|
"style",
|
|
394
398
|
"data-theme",
|
|
395
399
|
"data-mode"
|
|
396
400
|
];
|
|
397
|
-
function
|
|
401
|
+
function Ln(e, t = () => wn(bn(document), vn(document))) {
|
|
398
402
|
let n = !1, r = !1, o = null, i = Number.NEGATIVE_INFINITY, l = null, c = null, s = null, a = null, u = null;
|
|
399
|
-
const
|
|
403
|
+
const f = /* @__PURE__ */ new Set(), d = () => {
|
|
400
404
|
if (n || document.hidden) return;
|
|
401
|
-
const
|
|
402
|
-
if (
|
|
405
|
+
const N = i + 250 - Date.now();
|
|
406
|
+
if (N > 0) {
|
|
403
407
|
l ?? (l = setTimeout(() => {
|
|
404
|
-
l = null,
|
|
405
|
-
},
|
|
408
|
+
l = null, d();
|
|
409
|
+
}, N));
|
|
406
410
|
return;
|
|
407
411
|
}
|
|
408
412
|
i = Date.now();
|
|
409
|
-
let
|
|
413
|
+
let k;
|
|
410
414
|
try {
|
|
411
|
-
|
|
415
|
+
k = t();
|
|
412
416
|
} catch {
|
|
413
417
|
return;
|
|
414
418
|
}
|
|
415
|
-
!
|
|
416
|
-
},
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
},
|
|
422
|
-
|
|
423
|
-
c = null,
|
|
419
|
+
!k || !r && !En(o, k) || (r = !1, o = k, e(k));
|
|
420
|
+
}, p = (N) => {
|
|
421
|
+
const k = setTimeout(() => {
|
|
422
|
+
f.delete(k), d();
|
|
423
|
+
}, N);
|
|
424
|
+
f.add(k);
|
|
425
|
+
}, y = () => {
|
|
426
|
+
d(), c && clearTimeout(c), c = setTimeout(() => {
|
|
427
|
+
c = null, d();
|
|
424
428
|
}, 250);
|
|
425
|
-
}, E = () => {
|
|
426
|
-
p(), a && clearTimeout(a), a = setTimeout(() => {
|
|
427
|
-
a = null, p();
|
|
428
|
-
}, En);
|
|
429
|
-
}, A = () => {
|
|
430
|
-
const I = Date.now();
|
|
431
|
-
u ?? (u = I), s && clearTimeout(s);
|
|
432
|
-
const O = Math.max(0, Math.min(500, u + Sn - I));
|
|
433
|
-
s = setTimeout(() => {
|
|
434
|
-
s = null, u = null, p();
|
|
435
|
-
}, O);
|
|
436
429
|
}, S = () => {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
430
|
+
d(), a && clearTimeout(a), a = setTimeout(() => {
|
|
431
|
+
a = null, d();
|
|
432
|
+
}, Tn);
|
|
433
|
+
}, R = () => {
|
|
434
|
+
const N = Date.now();
|
|
435
|
+
u ?? (u = N), s && clearTimeout(s);
|
|
436
|
+
const k = Math.max(0, Math.min(500, u + _n - N));
|
|
437
|
+
s = setTimeout(() => {
|
|
438
|
+
s = null, u = null, d();
|
|
439
|
+
}, k);
|
|
440
|
+
}, v = () => {
|
|
441
|
+
document.hidden || p(0);
|
|
442
|
+
}, E = () => d(), _ = typeof window.matchMedia == "function" ? window.matchMedia("(prefers-color-scheme: dark)") : null, A = () => p(0), M = new MutationObserver(S);
|
|
443
|
+
M.observe(document.documentElement, {
|
|
440
444
|
attributes: !0,
|
|
441
445
|
attributeFilter: tt
|
|
442
446
|
});
|
|
443
|
-
const D = new MutationObserver(
|
|
444
|
-
return document.body && (
|
|
447
|
+
const D = new MutationObserver(R);
|
|
448
|
+
return document.body && (M.observe(document.body, {
|
|
445
449
|
attributes: !0,
|
|
446
450
|
attributeFilter: tt
|
|
447
451
|
}), D.observe(document.body, {
|
|
@@ -449,38 +453,38 @@ function Tn(e, t = () => yn(gn(document), bn(document))) {
|
|
|
449
453
|
childList: !0,
|
|
450
454
|
attributes: !0,
|
|
451
455
|
attributeFilter: ["class", "style"]
|
|
452
|
-
})), document.addEventListener("scroll",
|
|
456
|
+
})), document.addEventListener("scroll", y, {
|
|
453
457
|
capture: !0,
|
|
454
458
|
passive: !0
|
|
455
|
-
}), window.addEventListener("resize",
|
|
459
|
+
}), window.addEventListener("resize", y), document.addEventListener("visibilitychange", v), _?.addEventListener("change", A), {
|
|
456
460
|
announce: () => {
|
|
457
|
-
n || (r = !0, document.readyState === "complete" ?
|
|
461
|
+
n || (r = !0, document.readyState === "complete" ? d() : window.addEventListener("load", E, { once: !0 }));
|
|
458
462
|
},
|
|
459
463
|
navigated: () => {
|
|
460
464
|
if (!n)
|
|
461
|
-
for (const
|
|
465
|
+
for (const N of Sn) p(N);
|
|
462
466
|
},
|
|
463
467
|
stop: () => {
|
|
464
468
|
n = !0;
|
|
465
|
-
for (const
|
|
466
|
-
...
|
|
469
|
+
for (const N of [
|
|
470
|
+
...f,
|
|
467
471
|
l,
|
|
468
472
|
c,
|
|
469
473
|
s,
|
|
470
474
|
a
|
|
471
|
-
])
|
|
472
|
-
|
|
475
|
+
]) N && clearTimeout(N);
|
|
476
|
+
f.clear(), M.disconnect(), D.disconnect(), document.removeEventListener("scroll", y, { capture: !0 }), window.removeEventListener("resize", y), document.removeEventListener("visibilitychange", v), window.removeEventListener("load", E), _?.removeEventListener("change", A);
|
|
473
477
|
}
|
|
474
478
|
};
|
|
475
479
|
}
|
|
476
|
-
var
|
|
477
|
-
function
|
|
480
|
+
var An = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g, In = /\b\d{3}-\d{2}-\d{4}\b/g, Rn = /\d(?:[ -]?\d){12,18}/g, Nn = /\b(Bearer|Basic|Token)\s+(?=[A-Za-z0-9._~+/=-]*\d)[A-Za-z0-9._~+/=-]{6,}/gi, On = /\b((?:proxy-)?authorization)\b(["']?\s*[:=]\s*["']?)(?:Digest\s+[^\r\n]*|(?:(?:Bearer|Basic|Token)\s+)?[^\s"'&,;}]+)/gi, Cn = /(token|secret|passw(?:or)?d|api[-_]?key)\b(["']?\s*[:=]\s*["']?)[^\s"'&,;}]+/gi, kn = /\b((?:set-)?cookie)\b(["']?\s*[:=]\s*["']?)[^"'\r\n]+/gi, Mn = /\b(session(?:[-_]?id)?)\b(["']?\s*[:=]\s*["']?)(?=[^\s"'&,;}]{0,256}\d)[^\s"'&,;}]+/gi, xn = /\beyJ[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\b/g, Fn = /\bhttps?:\/\/[^\s"'<>)]+/gi, Dn = /(?::\d+){1,2}$/;
|
|
481
|
+
function Pn(e) {
|
|
478
482
|
const t = e.search(/[?#]/);
|
|
479
483
|
if (t < 0) return e;
|
|
480
|
-
const n =
|
|
484
|
+
const n = Dn.exec(e.slice(t))?.[0] ?? "";
|
|
481
485
|
return e.slice(0, t) + n;
|
|
482
486
|
}
|
|
483
|
-
function
|
|
487
|
+
function $n(e) {
|
|
484
488
|
let t = 0, n = !1;
|
|
485
489
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
486
490
|
let o = e.charCodeAt(r) - 48;
|
|
@@ -489,47 +493,47 @@ function Pn(e) {
|
|
|
489
493
|
}
|
|
490
494
|
return t % 10 === 0;
|
|
491
495
|
}
|
|
492
|
-
function
|
|
496
|
+
function oe(e) {
|
|
493
497
|
if (!e) return e;
|
|
494
|
-
let t = e.replace(
|
|
495
|
-
return t = t.replace(
|
|
498
|
+
let t = e.replace(Fn, Pn).replace(On, "$1$2[secret masqué]").replace(Nn, "$1 [secret masqué]").replace(xn, "[jeton masqué]").replace(kn, "$1$2[secret masqué]").replace(Cn, "$1$2[secret masqué]").replace(Mn, "$1$2[secret masqué]");
|
|
499
|
+
return t = t.replace(An, "[email masqué]"), t = t.replace(In, "[id masqué]"), t = t.replace(Rn, (n) => {
|
|
496
500
|
const r = n.replace(/[ -]/g, "");
|
|
497
|
-
return r.length >= 13 && r.length <= 19 &&
|
|
501
|
+
return r.length >= 13 && r.length <= 19 && $n(r) ? "[carte masquée]" : n;
|
|
498
502
|
}), t;
|
|
499
503
|
}
|
|
500
|
-
var
|
|
501
|
-
function
|
|
502
|
-
const t = e.trim(), n =
|
|
503
|
-
return n ? `${n[1]}:` : /^(data|blob):/i.test(t) ? e :
|
|
504
|
+
var Bn = /^(mailto|tel|sms|callto):/i;
|
|
505
|
+
function Ge(e) {
|
|
506
|
+
const t = e.trim(), n = Bn.exec(t);
|
|
507
|
+
return n ? `${n[1]}:` : /^(data|blob):/i.test(t) ? e : oe(ht(t));
|
|
504
508
|
}
|
|
505
|
-
function
|
|
509
|
+
function qn(e) {
|
|
506
510
|
return e.split(",").map((t) => {
|
|
507
511
|
const [n = "", ...r] = t.trim().split(/\s+/);
|
|
508
|
-
return [
|
|
512
|
+
return [Ge(n), ...r].join(" ");
|
|
509
513
|
}).join(", ");
|
|
510
514
|
}
|
|
511
|
-
function
|
|
512
|
-
return e.replace(/url\(\s*(['"]?)([^'")]*)\1\s*\)/gi, (t, n, r) => `url(${n}${
|
|
515
|
+
function Un(e) {
|
|
516
|
+
return e.replace(/url\(\s*(['"]?)([^'")]*)\1\s*\)/gi, (t, n, r) => `url(${n}${Ge(r)}${n})`);
|
|
513
517
|
}
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
function
|
|
518
|
+
var Ee = "leesto-mask", ie = "[data-leesto-block]", We = "leesto-mask-text", Ve = "[data-private]", gt = `.${We}, ${Ve}`, Hn = 'img, picture, video, canvas, object, embed, svg image, input[type="image"]', Gn = 'button, a, [role="button"], [role="link"], input[type="button"], input[type="submit"], input[type="reset"]';
|
|
519
|
+
var yt = 'input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select';
|
|
520
|
+
function Se(e) {
|
|
517
521
|
return e.replace(/\S/g, "*");
|
|
518
522
|
}
|
|
519
|
-
function
|
|
523
|
+
function Wn(e, t) {
|
|
520
524
|
try {
|
|
521
525
|
return e.closest(t);
|
|
522
526
|
} catch {
|
|
523
527
|
return null;
|
|
524
528
|
}
|
|
525
529
|
}
|
|
526
|
-
function
|
|
527
|
-
return
|
|
530
|
+
function bt(e) {
|
|
531
|
+
return Wn(e, gt) !== null;
|
|
528
532
|
}
|
|
529
|
-
var
|
|
530
|
-
function
|
|
533
|
+
var Vn = `.${Ee}, ${ie}, ${gt}`;
|
|
534
|
+
function ae(e) {
|
|
531
535
|
try {
|
|
532
|
-
return e.closest(
|
|
536
|
+
return e.closest(Vn) !== null;
|
|
533
537
|
} catch {
|
|
534
538
|
return !0;
|
|
535
539
|
}
|
|
@@ -537,8 +541,8 @@ function ne(e) {
|
|
|
537
541
|
function vt(e) {
|
|
538
542
|
if (!e || typeof e.closest != "function") return !1;
|
|
539
543
|
try {
|
|
540
|
-
if (
|
|
541
|
-
const t = e.closest(
|
|
544
|
+
if (bt(e) || e.matches(yt)) return !1;
|
|
545
|
+
const t = e.closest(Gn);
|
|
542
546
|
return t ? (t.textContent ?? "").trim().length <= 80 : !1;
|
|
543
547
|
} catch {
|
|
544
548
|
return !1;
|
|
@@ -552,23 +556,23 @@ var nt = {
|
|
|
552
556
|
tel: !0,
|
|
553
557
|
text: !0
|
|
554
558
|
},
|
|
555
|
-
blockClass:
|
|
556
|
-
maskTextClass:
|
|
559
|
+
blockClass: Ee,
|
|
560
|
+
maskTextClass: We
|
|
557
561
|
};
|
|
558
562
|
function wt(e) {
|
|
559
563
|
if (e === "inputs_only") return {
|
|
560
564
|
...nt,
|
|
561
|
-
blockSelector:
|
|
562
|
-
maskTextSelector:
|
|
565
|
+
blockSelector: ie,
|
|
566
|
+
maskTextSelector: Ve
|
|
563
567
|
};
|
|
564
568
|
const t = {
|
|
565
569
|
...nt,
|
|
566
|
-
blockSelector: `${
|
|
570
|
+
blockSelector: `${ie}, ${Hn}`,
|
|
567
571
|
maskTextSelector: "*"
|
|
568
572
|
};
|
|
569
573
|
return e === "labels_visible" ? {
|
|
570
574
|
...t,
|
|
571
|
-
maskTextFn: (n, r) => vt(r) ? n :
|
|
575
|
+
maskTextFn: (n, r) => vt(r) ? n : Se(n)
|
|
572
576
|
} : t;
|
|
573
577
|
}
|
|
574
578
|
var rt = /* @__PURE__ */ new Set([
|
|
@@ -581,7 +585,7 @@ var rt = /* @__PURE__ */ new Set([
|
|
|
581
585
|
"aria-placeholder",
|
|
582
586
|
"aria-roledescription",
|
|
583
587
|
"aria-valuetext"
|
|
584
|
-
]),
|
|
588
|
+
]), zn = /* @__PURE__ */ new Set([
|
|
585
589
|
"href",
|
|
586
590
|
"src",
|
|
587
591
|
"action",
|
|
@@ -594,16 +598,16 @@ var rt = /* @__PURE__ */ new Set([
|
|
|
594
598
|
"longdesc",
|
|
595
599
|
"xlink:href"
|
|
596
600
|
]);
|
|
597
|
-
function
|
|
598
|
-
if (e === "srcset") return
|
|
599
|
-
if (e === "style") return
|
|
600
|
-
if (
|
|
601
|
-
if (e.startsWith("data-")) return
|
|
602
|
-
}
|
|
603
|
-
var
|
|
604
|
-
function
|
|
601
|
+
function Kn(e, t) {
|
|
602
|
+
if (e === "srcset") return qn(t);
|
|
603
|
+
if (e === "style") return Un(t);
|
|
604
|
+
if (zn.has(e)) return Ge(t);
|
|
605
|
+
if (e.startsWith("data-")) return oe(t);
|
|
606
|
+
}
|
|
607
|
+
var jn = 2, Xn = 3, Yn = 4, Zn = 0, Qn = 2;
|
|
608
|
+
function Jn(e, t, n) {
|
|
605
609
|
if (e) try {
|
|
606
|
-
return e.matches(
|
|
610
|
+
return e.matches(yt);
|
|
607
611
|
} catch {
|
|
608
612
|
return !0;
|
|
609
613
|
}
|
|
@@ -624,33 +628,33 @@ function Et(e, t, n) {
|
|
|
624
628
|
} catch {
|
|
625
629
|
return null;
|
|
626
630
|
}
|
|
627
|
-
}, i = (a, u,
|
|
631
|
+
}, i = (a, u, f, d) => {
|
|
628
632
|
if (u === "value") {
|
|
629
|
-
if (
|
|
633
|
+
if (Jn(a, f, d)) return !1;
|
|
630
634
|
} else if (!rt.has(u)) return !0;
|
|
631
|
-
return !a ||
|
|
632
|
-
}, l = (a, u,
|
|
633
|
-
if (
|
|
634
|
-
for (const
|
|
635
|
-
const
|
|
636
|
-
if (typeof
|
|
637
|
-
const
|
|
638
|
-
if (
|
|
639
|
-
d
|
|
635
|
+
return !a || bt(a) ? !1 : t === "inputs_only" ? !0 : t === "labels_visible" ? vt(a) : !1;
|
|
636
|
+
}, l = (a, u, f) => {
|
|
637
|
+
if (f)
|
|
638
|
+
for (const d of Object.keys(f)) {
|
|
639
|
+
const p = f[d];
|
|
640
|
+
if (typeof p != "string" || !p) continue;
|
|
641
|
+
const y = Kn(d, p);
|
|
642
|
+
if (y !== void 0) {
|
|
643
|
+
f[d] = y;
|
|
640
644
|
continue;
|
|
641
645
|
}
|
|
642
|
-
|
|
646
|
+
d !== "value" && !rt.has(d) || i(a, d, u, f) || (f[d] = Se(p));
|
|
643
647
|
}
|
|
644
648
|
}, c = (a) => {
|
|
645
649
|
const u = a ? [a] : [];
|
|
646
650
|
for (; u.length > 0; ) {
|
|
647
|
-
const
|
|
648
|
-
|
|
651
|
+
const f = u.pop();
|
|
652
|
+
f.type === Qn && f.attributes && l(o(f.id), String(f.tagName ?? ""), f.attributes), Array.isArray(f.childNodes) && u.push(...f.childNodes);
|
|
649
653
|
}
|
|
650
654
|
}, s = r.data;
|
|
651
|
-
if (r.type ===
|
|
652
|
-
else if (r.type ===
|
|
653
|
-
else if (r.type ===
|
|
655
|
+
if (r.type === Yn && typeof s.href == "string") s.href = ht(s.href);
|
|
656
|
+
else if (r.type === jn) c(s.node);
|
|
657
|
+
else if (r.type === Xn && s.source === Zn) {
|
|
654
658
|
for (const a of s.adds ?? []) c(a.node);
|
|
655
659
|
for (const a of s.attributes ?? []) {
|
|
656
660
|
const u = o(a.id);
|
|
@@ -659,50 +663,50 @@ function Et(e, t, n) {
|
|
|
659
663
|
}
|
|
660
664
|
return e;
|
|
661
665
|
}
|
|
662
|
-
var
|
|
666
|
+
var Fe = "data-leesto-capture-field", De = "data-leesto-capture-text", Pe = "data-leesto-capture-block", St = `.${Ee}, ${ie}`, er = 'input:not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="image"]), textarea, select', tr = `.${We}, ${Ve}`;
|
|
663
667
|
function ot(e, t = {}) {
|
|
664
668
|
const n = [], r = (i, l, c = "") => {
|
|
665
669
|
i.hasAttribute(l) || (i.setAttribute(l, c), n.push([i, l]));
|
|
666
670
|
}, o = (i) => [...e.matches(i) ? [e] : [], ...e.querySelectorAll(i)];
|
|
667
|
-
for (const i of o(
|
|
668
|
-
for (const i of o(
|
|
671
|
+
for (const i of o(er)) r(i, Fe);
|
|
672
|
+
for (const i of o(tr)) r(i, De);
|
|
669
673
|
if (t.blocks) for (const i of e.querySelectorAll(St)) {
|
|
670
674
|
const l = i.getBoundingClientRect();
|
|
671
|
-
r(i,
|
|
675
|
+
r(i, Pe, `${Math.round(l.width)}x${Math.round(l.height)}`);
|
|
672
676
|
}
|
|
673
677
|
return () => {
|
|
674
678
|
for (const [i, l] of n) i.removeAttribute(l);
|
|
675
679
|
};
|
|
676
680
|
}
|
|
677
|
-
function
|
|
681
|
+
function $e(e) {
|
|
678
682
|
const t = e.ownerDocument.createTreeWalker(e, 4);
|
|
679
683
|
for (let n = t.nextNode(); n; n = t.nextNode()) {
|
|
680
684
|
const r = n;
|
|
681
|
-
r.data =
|
|
685
|
+
r.data = Se(r.data);
|
|
682
686
|
}
|
|
683
687
|
}
|
|
684
|
-
function
|
|
688
|
+
function nr(e) {
|
|
685
689
|
const t = e.tagName.toLowerCase();
|
|
686
690
|
if (t === "select") {
|
|
687
|
-
for (const r of e.querySelectorAll("option"))
|
|
691
|
+
for (const r of e.querySelectorAll("option")) $e(r);
|
|
688
692
|
return;
|
|
689
693
|
}
|
|
690
694
|
const n = e.getAttribute("value");
|
|
691
|
-
n && e.setAttribute("value",
|
|
695
|
+
n && e.setAttribute("value", Se(n)), t === "textarea" && $e(e);
|
|
692
696
|
}
|
|
693
697
|
function it(e) {
|
|
694
698
|
if (e.nodeType !== 1) return;
|
|
695
699
|
const t = e, n = (r) => [...t.hasAttribute(r) ? [t] : [], ...t.querySelectorAll(`[${r}]`)];
|
|
696
|
-
for (const r of n(
|
|
697
|
-
|
|
698
|
-
for (const r of n(
|
|
699
|
-
|
|
700
|
-
for (const r of t.querySelectorAll(`[${
|
|
701
|
-
const [o, i] = (r.getAttribute(
|
|
700
|
+
for (const r of n(Fe))
|
|
701
|
+
nr(r), r.removeAttribute(Fe);
|
|
702
|
+
for (const r of n(De))
|
|
703
|
+
$e(r), r.removeAttribute(De);
|
|
704
|
+
for (const r of t.querySelectorAll(`[${Pe}]`)) {
|
|
705
|
+
const [o, i] = (r.getAttribute(Pe) ?? "0x0").split("x"), l = r.ownerDocument.createElement("div");
|
|
702
706
|
l.setAttribute("style", `display:inline-block;width:${o}px;height:${i}px;background:#a1a1aa`), r.replaceWith(l);
|
|
703
707
|
}
|
|
704
708
|
}
|
|
705
|
-
function
|
|
709
|
+
function de(e) {
|
|
706
710
|
const t = [];
|
|
707
711
|
return {
|
|
708
712
|
push(n) {
|
|
@@ -713,46 +717,46 @@ function se(e) {
|
|
|
713
717
|
}
|
|
714
718
|
};
|
|
715
719
|
}
|
|
716
|
-
function
|
|
720
|
+
function X(e) {
|
|
717
721
|
const t = typeof e == "string" ? e : e instanceof URL ? e.href : e instanceof Request ? e.url : String(e);
|
|
718
722
|
try {
|
|
719
723
|
const n = new URL(t, typeof location < "u" ? location.href : void 0);
|
|
720
|
-
return n.origin +
|
|
724
|
+
return n.origin + oe(n.pathname);
|
|
721
725
|
} catch {
|
|
722
|
-
return
|
|
726
|
+
return oe(t.split("?")[0] ?? t);
|
|
723
727
|
}
|
|
724
728
|
}
|
|
725
|
-
var
|
|
729
|
+
var rr = /* @__PURE__ */ new Set(["fetch", "xmlhttprequest"]), or = ["deprecation", "intervention"], ir = { teardown: () => {
|
|
726
730
|
} };
|
|
727
|
-
function
|
|
731
|
+
function sr(e) {
|
|
728
732
|
const t = typeof performance < "u" ? performance.timeOrigin : 0;
|
|
729
733
|
return Math.round(t + e);
|
|
730
734
|
}
|
|
731
|
-
function
|
|
735
|
+
function ar(e) {
|
|
732
736
|
const t = e.responseStatus;
|
|
733
737
|
return typeof t == "number" && t > 0 ? t : void 0;
|
|
734
738
|
}
|
|
735
|
-
function
|
|
736
|
-
if (
|
|
737
|
-
const t =
|
|
739
|
+
function lr(e) {
|
|
740
|
+
if (rr.has(e.initiatorType)) return null;
|
|
741
|
+
const t = ar(e), n = e.transferSize || e.encodedBodySize || void 0;
|
|
738
742
|
return {
|
|
739
743
|
method: "GET",
|
|
740
|
-
url:
|
|
744
|
+
url: X(e.name),
|
|
741
745
|
...t !== void 0 ? { status: t } : {},
|
|
742
746
|
durationMs: Math.round(e.duration),
|
|
743
747
|
...n ? { responseSize: n } : {},
|
|
744
|
-
startedAt:
|
|
748
|
+
startedAt: sr(e.startTime),
|
|
745
749
|
...t !== void 0 && t >= 400 ? { failed: !0 } : {},
|
|
746
750
|
initiatorType: e.initiatorType
|
|
747
751
|
};
|
|
748
752
|
}
|
|
749
|
-
function
|
|
750
|
-
if (typeof window > "u") return
|
|
753
|
+
function cr(e) {
|
|
754
|
+
if (typeof window > "u") return ir;
|
|
751
755
|
const t = [];
|
|
752
756
|
if (typeof PerformanceObserver < "u") try {
|
|
753
757
|
const i = new PerformanceObserver((l) => {
|
|
754
758
|
for (const c of l.getEntries()) try {
|
|
755
|
-
const s =
|
|
759
|
+
const s = lr(c);
|
|
756
760
|
s && e.onResource(s);
|
|
757
761
|
} catch {
|
|
758
762
|
}
|
|
@@ -771,7 +775,7 @@ function ar(e) {
|
|
|
771
775
|
e.onReport("warn", `Navigateur (${c.type}) : ${s}`);
|
|
772
776
|
}
|
|
773
777
|
}), {
|
|
774
|
-
types:
|
|
778
|
+
types: or,
|
|
775
779
|
buffered: !0
|
|
776
780
|
});
|
|
777
781
|
i.observe(), t.push(() => i.disconnect());
|
|
@@ -793,31 +797,31 @@ function ar(e) {
|
|
|
793
797
|
}
|
|
794
798
|
} };
|
|
795
799
|
}
|
|
796
|
-
var
|
|
800
|
+
var ur = 50, fr = 30, dr = 100, pr = 50, se = 500, Tt = 8e3, mr = se * 4, hr = Tt * 2;
|
|
797
801
|
function _t(e, t, n) {
|
|
798
|
-
return
|
|
802
|
+
return oe(e.slice(0, n)).slice(0, t);
|
|
799
803
|
}
|
|
800
|
-
function
|
|
801
|
-
return _t(e,
|
|
804
|
+
function ne(e) {
|
|
805
|
+
return _t(e, se, mr);
|
|
802
806
|
}
|
|
803
|
-
var
|
|
804
|
-
function
|
|
807
|
+
var gr = /(token|secret|passw(or)?d|api[-_]?key|authorization|cookie)$/i;
|
|
808
|
+
function Re(e) {
|
|
805
809
|
const t = e instanceof Error ? e.stack : void 0;
|
|
806
810
|
if (t)
|
|
807
|
-
return _t(t, Tt,
|
|
811
|
+
return _t(t, Tt, hr);
|
|
808
812
|
}
|
|
809
|
-
function
|
|
813
|
+
function Ne(e) {
|
|
810
814
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
811
815
|
if (typeof e == "string") return e;
|
|
812
816
|
if (typeof e == "object" && e !== null) {
|
|
813
817
|
const t = /* @__PURE__ */ Symbol("overflow");
|
|
814
|
-
let n =
|
|
818
|
+
let n = se * 8;
|
|
815
819
|
try {
|
|
816
820
|
return JSON.stringify(e, (r, o) => {
|
|
817
|
-
if (
|
|
821
|
+
if (gr.test(r)) return "[masqué]";
|
|
818
822
|
if (n -= r.length + (typeof o == "string" ? o.length : 8), n < 0) throw t;
|
|
819
823
|
return o;
|
|
820
|
-
}).slice(0,
|
|
824
|
+
}).slice(0, se);
|
|
821
825
|
} catch (r) {
|
|
822
826
|
return r === t ? "[objet volumineux]" : "[objet]";
|
|
823
827
|
}
|
|
@@ -829,7 +833,7 @@ function st(e) {
|
|
|
829
833
|
const t = Number(e);
|
|
830
834
|
return Number.isFinite(t) && t >= 0 ? t : void 0;
|
|
831
835
|
}
|
|
832
|
-
var
|
|
836
|
+
var yr = {
|
|
833
837
|
snapshot: () => ({
|
|
834
838
|
errors: [],
|
|
835
839
|
logs: [],
|
|
@@ -842,131 +846,131 @@ var mr = {
|
|
|
842
846
|
teardown: () => {
|
|
843
847
|
}
|
|
844
848
|
};
|
|
845
|
-
function
|
|
846
|
-
if (typeof window > "u") return
|
|
847
|
-
const t =
|
|
849
|
+
function Lt(e) {
|
|
850
|
+
if (typeof window > "u") return yr;
|
|
851
|
+
const t = de(ur), n = de(fr), r = de(dr), o = de(pr), i = be(e.runId) ? e.runId : void 0, l = (m) => {
|
|
848
852
|
if (!i) return !1;
|
|
849
853
|
try {
|
|
850
|
-
const
|
|
851
|
-
return
|
|
854
|
+
const b = new URL(String(m), location.href);
|
|
855
|
+
return b.origin === location.origin || (e.runIdOrigins ?? []).includes(b.origin);
|
|
852
856
|
} catch {
|
|
853
857
|
return !1;
|
|
854
858
|
}
|
|
855
859
|
};
|
|
856
860
|
let c = e.sink ?? null;
|
|
857
|
-
const s = (
|
|
858
|
-
c?.(
|
|
859
|
-
}, a = (
|
|
860
|
-
e.captureNetwork && t.push(
|
|
861
|
-
}, u = (
|
|
862
|
-
e.captureNetwork && s(
|
|
863
|
-
},
|
|
864
|
-
if (!
|
|
865
|
-
const
|
|
866
|
-
level:
|
|
867
|
-
message:
|
|
868
|
-
...
|
|
869
|
-
...
|
|
861
|
+
const s = (m, b) => {
|
|
862
|
+
c?.(m, b);
|
|
863
|
+
}, a = (m) => {
|
|
864
|
+
e.captureNetwork && t.push(m);
|
|
865
|
+
}, u = (m) => {
|
|
866
|
+
e.captureNetwork && s(Qt, m);
|
|
867
|
+
}, f = (m, b, w, I = {}) => {
|
|
868
|
+
if (!b) return;
|
|
869
|
+
const x = {
|
|
870
|
+
level: m,
|
|
871
|
+
message: b,
|
|
872
|
+
...w ? { stack: w } : {},
|
|
873
|
+
...I,
|
|
870
874
|
at: Date.now()
|
|
871
875
|
};
|
|
872
|
-
o.push(
|
|
873
|
-
},
|
|
876
|
+
o.push(x), s(Ze, x);
|
|
877
|
+
}, d = (m, b) => {
|
|
874
878
|
try {
|
|
875
|
-
const
|
|
876
|
-
|
|
879
|
+
const w = ne(b.map(Ne).join(" ")), I = b.find((x) => x instanceof Error);
|
|
880
|
+
f(m, w, Re(I), {
|
|
877
881
|
mechanism: "console",
|
|
878
|
-
...
|
|
882
|
+
...I instanceof Error && I.name ? { name: I.name } : {}
|
|
879
883
|
});
|
|
880
884
|
} catch {
|
|
881
885
|
}
|
|
882
|
-
},
|
|
886
|
+
}, p = (m, b) => {
|
|
883
887
|
try {
|
|
884
|
-
const
|
|
885
|
-
|
|
886
|
-
level:
|
|
887
|
-
message:
|
|
888
|
+
const w = ne(b.map(Ne).join(" "));
|
|
889
|
+
w && r.push({
|
|
890
|
+
level: m,
|
|
891
|
+
message: w,
|
|
888
892
|
at: Date.now()
|
|
889
893
|
});
|
|
890
894
|
} catch {
|
|
891
895
|
}
|
|
892
|
-
},
|
|
893
|
-
console.error = (...
|
|
894
|
-
const
|
|
895
|
-
const
|
|
896
|
-
if (
|
|
897
|
-
const
|
|
898
|
-
if (!
|
|
899
|
-
|
|
896
|
+
}, y = console.error, S = console.warn, R = console.log, v = console.info;
|
|
897
|
+
console.error = (...m) => (d("error", m), y.apply(console, m)), console.warn = (...m) => (d("warn", m), S.apply(console, m)), console.log = (...m) => (p("log", m), R.apply(console, m)), console.info = (...m) => (p("info", m), v.apply(console, m));
|
|
898
|
+
const E = (m) => {
|
|
899
|
+
const b = m.target;
|
|
900
|
+
if (b instanceof Element) {
|
|
901
|
+
const I = b.src || b.href || "";
|
|
902
|
+
if (!I) return;
|
|
903
|
+
f("error", `Ressource non chargée : <${b.tagName.toLowerCase()}> ${X(I)}`.slice(0, se), void 0, {
|
|
900
904
|
mechanism: "resource",
|
|
901
|
-
sourceUrl:
|
|
905
|
+
sourceUrl: X(I)
|
|
902
906
|
});
|
|
903
907
|
return;
|
|
904
908
|
}
|
|
905
|
-
const
|
|
906
|
-
|
|
909
|
+
const w = m;
|
|
910
|
+
f("error", ne(`Erreur non gérée : ${w.message}`), Re(w.error), {
|
|
907
911
|
mechanism: "window.error",
|
|
908
|
-
...typeof
|
|
909
|
-
...typeof
|
|
910
|
-
...typeof
|
|
911
|
-
...typeof
|
|
912
|
+
...typeof w.error?.name == "string" ? { name: w.error.name } : {},
|
|
913
|
+
...typeof w.filename == "string" && w.filename ? { sourceUrl: X(w.filename) } : {},
|
|
914
|
+
...typeof w.lineno == "number" && w.lineno > 0 ? { line: w.lineno } : {},
|
|
915
|
+
...typeof w.colno == "number" && w.colno > 0 ? { column: w.colno } : {}
|
|
912
916
|
});
|
|
913
|
-
}, _ = (
|
|
914
|
-
|
|
917
|
+
}, _ = (m) => {
|
|
918
|
+
f("error", ne(`Promesse rejetée : ${Ne(m.reason)}`), Re(m.reason), {
|
|
915
919
|
mechanism: "unhandledrejection",
|
|
916
|
-
...
|
|
920
|
+
...m.reason instanceof Error && m.reason.name ? { name: m.reason.name } : {}
|
|
917
921
|
});
|
|
918
922
|
};
|
|
919
|
-
window.addEventListener("error",
|
|
920
|
-
const
|
|
921
|
-
|
|
922
|
-
const
|
|
923
|
-
let
|
|
924
|
-
if (i && l(
|
|
925
|
-
const C = new Headers(
|
|
926
|
-
for (const [P, U] of new Headers(
|
|
927
|
-
C.set(Ye, i),
|
|
928
|
-
...
|
|
923
|
+
window.addEventListener("error", E, !0), window.addEventListener("unhandledrejection", _);
|
|
924
|
+
const A = typeof window.fetch == "function" ? window.fetch.bind(window) : null;
|
|
925
|
+
A && (window.fetch = (async (m, b) => {
|
|
926
|
+
const w = Date.now(), I = (b?.method ?? (m instanceof Request ? m.method : "GET") ?? "GET").toUpperCase(), x = X(m);
|
|
927
|
+
let B = b;
|
|
928
|
+
if (i && l(m)) {
|
|
929
|
+
const C = new Headers(m instanceof Request ? m.headers : void 0);
|
|
930
|
+
for (const [P, U] of new Headers(b?.headers)) C.set(P, U);
|
|
931
|
+
C.set(Ye, i), B = {
|
|
932
|
+
...b,
|
|
929
933
|
headers: C
|
|
930
934
|
};
|
|
931
935
|
}
|
|
932
936
|
try {
|
|
933
|
-
const C = await
|
|
937
|
+
const C = await A(m, B);
|
|
934
938
|
try {
|
|
935
939
|
const P = C.headers.get("x-request-id"), U = C.headers.get("traceparent");
|
|
936
940
|
a({
|
|
937
|
-
method:
|
|
938
|
-
url:
|
|
941
|
+
method: I,
|
|
942
|
+
url: x,
|
|
939
943
|
status: C.status,
|
|
940
|
-
durationMs: Date.now() -
|
|
944
|
+
durationMs: Date.now() - w,
|
|
941
945
|
responseSize: st(C.headers.get("content-length")),
|
|
942
946
|
contentType: C.headers.get("content-type") ?? void 0,
|
|
943
|
-
startedAt:
|
|
947
|
+
startedAt: w,
|
|
944
948
|
...P ? { requestId: P.slice(0, 200) } : {},
|
|
945
949
|
...U ? { traceparent: U.slice(0, 200) } : {},
|
|
946
950
|
...i ? { runId: i } : {}
|
|
947
951
|
}), C.ok || u({
|
|
948
|
-
method:
|
|
949
|
-
url:
|
|
952
|
+
method: I,
|
|
953
|
+
url: x,
|
|
950
954
|
status: C.status,
|
|
951
|
-
durationMs: Date.now() -
|
|
955
|
+
durationMs: Date.now() - w
|
|
952
956
|
});
|
|
953
957
|
} catch {
|
|
954
958
|
}
|
|
955
959
|
return C;
|
|
956
960
|
} catch (C) {
|
|
957
961
|
try {
|
|
958
|
-
const P = Date.now() -
|
|
962
|
+
const P = Date.now() - w;
|
|
959
963
|
a({
|
|
960
|
-
method:
|
|
961
|
-
url:
|
|
964
|
+
method: I,
|
|
965
|
+
url: x,
|
|
962
966
|
status: 0,
|
|
963
967
|
durationMs: P,
|
|
964
|
-
startedAt:
|
|
968
|
+
startedAt: w,
|
|
965
969
|
failed: !0,
|
|
966
970
|
...i ? { runId: i } : {}
|
|
967
971
|
}), u({
|
|
968
|
-
method:
|
|
969
|
-
url:
|
|
972
|
+
method: I,
|
|
973
|
+
url: x,
|
|
970
974
|
status: 0,
|
|
971
975
|
durationMs: P
|
|
972
976
|
});
|
|
@@ -975,86 +979,86 @@ function At(e) {
|
|
|
975
979
|
throw C;
|
|
976
980
|
}
|
|
977
981
|
}));
|
|
978
|
-
const
|
|
979
|
-
XMLHttpRequest.prototype.open = function(
|
|
980
|
-
return this[
|
|
981
|
-
method: (
|
|
982
|
-
url:
|
|
982
|
+
const M = XMLHttpRequest.prototype.open, D = XMLHttpRequest.prototype.send, N = "__echoNet";
|
|
983
|
+
XMLHttpRequest.prototype.open = function(m, b, ...w) {
|
|
984
|
+
return this[N] = {
|
|
985
|
+
method: (m || "GET").toUpperCase(),
|
|
986
|
+
url: X(b),
|
|
983
987
|
start: 0,
|
|
984
|
-
propagate: l(
|
|
985
|
-
},
|
|
986
|
-
f,
|
|
988
|
+
propagate: l(b)
|
|
989
|
+
}, M.apply(this, [
|
|
987
990
|
m,
|
|
988
|
-
|
|
991
|
+
b,
|
|
992
|
+
...w
|
|
989
993
|
]);
|
|
990
|
-
}, XMLHttpRequest.prototype.send = function(...
|
|
991
|
-
const
|
|
992
|
-
if (
|
|
993
|
-
if (
|
|
994
|
+
}, XMLHttpRequest.prototype.send = function(...m) {
|
|
995
|
+
const b = this[N];
|
|
996
|
+
if (b) {
|
|
997
|
+
if (b.start = Date.now(), i && b.propagate) try {
|
|
994
998
|
this.setRequestHeader(Ye, i);
|
|
995
999
|
} catch {
|
|
996
1000
|
}
|
|
997
1001
|
this.addEventListener("loadend", () => {
|
|
998
1002
|
try {
|
|
999
|
-
const
|
|
1003
|
+
const w = Date.now() - b.start, I = this.status, x = I === 0, B = this.getResponseHeader("x-request-id"), C = this.getResponseHeader("traceparent");
|
|
1000
1004
|
a({
|
|
1001
|
-
method:
|
|
1002
|
-
url:
|
|
1003
|
-
status:
|
|
1004
|
-
durationMs:
|
|
1005
|
+
method: b.method,
|
|
1006
|
+
url: b.url,
|
|
1007
|
+
status: I,
|
|
1008
|
+
durationMs: w,
|
|
1005
1009
|
responseSize: st(this.getResponseHeader("content-length")),
|
|
1006
1010
|
contentType: this.getResponseHeader("content-type") ?? void 0,
|
|
1007
|
-
startedAt:
|
|
1008
|
-
...
|
|
1011
|
+
startedAt: b.start,
|
|
1012
|
+
...x ? { failed: !0 } : {},
|
|
1009
1013
|
...i ? { runId: i } : {},
|
|
1010
|
-
...
|
|
1014
|
+
...B ? { requestId: B.slice(0, 200) } : {},
|
|
1011
1015
|
...C ? { traceparent: C.slice(0, 200) } : {}
|
|
1012
|
-
}), (
|
|
1013
|
-
method:
|
|
1014
|
-
url:
|
|
1015
|
-
status:
|
|
1016
|
-
durationMs:
|
|
1016
|
+
}), (x || I >= 400) && u({
|
|
1017
|
+
method: b.method,
|
|
1018
|
+
url: b.url,
|
|
1019
|
+
status: I,
|
|
1020
|
+
durationMs: w
|
|
1017
1021
|
});
|
|
1018
1022
|
} catch {
|
|
1019
1023
|
}
|
|
1020
1024
|
}, { once: !0 });
|
|
1021
1025
|
}
|
|
1022
|
-
return D.apply(this,
|
|
1026
|
+
return D.apply(this, m);
|
|
1023
1027
|
};
|
|
1024
|
-
const
|
|
1025
|
-
onResource: (
|
|
1028
|
+
const k = cr({
|
|
1029
|
+
onResource: (m) => {
|
|
1026
1030
|
e.captureNetwork && n.push(i ? {
|
|
1027
|
-
...
|
|
1031
|
+
...m,
|
|
1028
1032
|
runId: i
|
|
1029
|
-
} :
|
|
1033
|
+
} : m);
|
|
1030
1034
|
},
|
|
1031
|
-
onReport: (
|
|
1032
|
-
}),
|
|
1033
|
-
let
|
|
1035
|
+
onReport: (m, b) => f(m, ne(b), void 0, { mechanism: "report" })
|
|
1036
|
+
}), z = () => e.captureNetwork ? [...t.snapshot(), ...n.snapshot()].sort((m, b) => m.startedAt - b.startedAt) : [];
|
|
1037
|
+
let V = !1;
|
|
1034
1038
|
return {
|
|
1035
1039
|
snapshot: () => ({
|
|
1036
1040
|
errors: o.snapshot(),
|
|
1037
1041
|
logs: r.snapshot(),
|
|
1038
|
-
network:
|
|
1042
|
+
network: z(),
|
|
1039
1043
|
...i ? { runId: i } : {}
|
|
1040
1044
|
}),
|
|
1041
|
-
setSink: (
|
|
1042
|
-
c =
|
|
1045
|
+
setSink: (m) => {
|
|
1046
|
+
c = m;
|
|
1043
1047
|
},
|
|
1044
1048
|
flushRings: () => {
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1049
|
+
const m = z();
|
|
1050
|
+
m.length > 0 && s(Jt, { entries: m });
|
|
1051
|
+
const b = r.snapshot();
|
|
1052
|
+
b.length > 0 && s(en, { entries: b });
|
|
1053
|
+
const w = o.snapshot();
|
|
1054
|
+
w.length > 0 && s(Ze, { entries: w });
|
|
1051
1055
|
},
|
|
1052
1056
|
teardown: () => {
|
|
1053
|
-
|
|
1057
|
+
V || (V = !0, c = null, k.teardown(), console.error = y, console.warn = S, console.log = R, console.info = v, window.removeEventListener("error", E, !0), window.removeEventListener("unhandledrejection", _), A && (window.fetch = A), XMLHttpRequest.prototype.open = M, XMLHttpRequest.prototype.send = D);
|
|
1054
1058
|
}
|
|
1055
1059
|
};
|
|
1056
1060
|
}
|
|
1057
|
-
var
|
|
1061
|
+
var br = "data-leesto-scrollbars", vr = `@supports selector(::-webkit-scrollbar) {
|
|
1058
1062
|
::-webkit-scrollbar { width: 10px; height: 10px; }
|
|
1059
1063
|
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
|
|
1060
1064
|
::-webkit-scrollbar-thumb {
|
|
@@ -1068,21 +1072,21 @@ var gr = "data-leesto-scrollbars", br = `@supports selector(::-webkit-scrollbar)
|
|
|
1068
1072
|
:where(html) { scrollbar-color: rgb(128 128 128 / 0.5) transparent; }
|
|
1069
1073
|
:where(*) { scrollbar-width: thin; }
|
|
1070
1074
|
}`;
|
|
1071
|
-
function
|
|
1075
|
+
function wr(e) {
|
|
1072
1076
|
const t = e.createElement("div");
|
|
1073
1077
|
t.style.cssText = "position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden", e.documentElement.append(t);
|
|
1074
1078
|
const n = t.offsetWidth - t.clientWidth;
|
|
1075
1079
|
return t.remove(), n;
|
|
1076
1080
|
}
|
|
1077
|
-
function
|
|
1081
|
+
function Er(e = document, t = wr) {
|
|
1078
1082
|
if (e.querySelector("style[data-leesto-scrollbars]")) return () => {
|
|
1079
1083
|
};
|
|
1080
1084
|
if (t(e) <= 0) return () => {
|
|
1081
1085
|
};
|
|
1082
1086
|
const n = e.createElement("style");
|
|
1083
|
-
return n.setAttribute(
|
|
1087
|
+
return n.setAttribute(br, ""), n.textContent = vr, (e.head ?? e.documentElement).prepend(n), () => n.remove();
|
|
1084
1088
|
}
|
|
1085
|
-
var
|
|
1089
|
+
var Sr = 80, Tr = {
|
|
1086
1090
|
a: "link",
|
|
1087
1091
|
button: "button",
|
|
1088
1092
|
img: "img",
|
|
@@ -1095,50 +1099,50 @@ var wr = 80, Er = {
|
|
|
1095
1099
|
h5: "heading",
|
|
1096
1100
|
h6: "heading",
|
|
1097
1101
|
dialog: "dialog"
|
|
1098
|
-
},
|
|
1102
|
+
}, _r = {
|
|
1099
1103
|
button: "button",
|
|
1100
1104
|
submit: "button",
|
|
1101
1105
|
reset: "button",
|
|
1102
1106
|
checkbox: "checkbox",
|
|
1103
1107
|
radio: "radio",
|
|
1104
1108
|
search: "searchbox"
|
|
1105
|
-
},
|
|
1109
|
+
}, j = (e) => {
|
|
1106
1110
|
const t = (e ?? "").replace(/\s+/g, " ").trim();
|
|
1107
|
-
return t ? t.slice(0,
|
|
1111
|
+
return t ? t.slice(0, Sr) : null;
|
|
1108
1112
|
};
|
|
1109
|
-
function
|
|
1113
|
+
function Lr(e) {
|
|
1110
1114
|
const t = [];
|
|
1111
1115
|
let n = 0;
|
|
1112
1116
|
const r = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT);
|
|
1113
1117
|
for (let o = r.nextNode(); o && n < 320; o = r.nextNode()) {
|
|
1114
1118
|
const i = o.parentElement;
|
|
1115
|
-
if (i && i !== e &&
|
|
1119
|
+
if (i && i !== e && ae(i)) continue;
|
|
1116
1120
|
const l = o.nodeValue ?? "";
|
|
1117
1121
|
l.trim() && (t.push(l), n += l.length);
|
|
1118
1122
|
}
|
|
1119
1123
|
return t.join(" ");
|
|
1120
1124
|
}
|
|
1121
|
-
function
|
|
1125
|
+
function Ar(e, t) {
|
|
1122
1126
|
const n = e.getAttribute("role")?.trim().split(/\s+/)[0];
|
|
1123
|
-
return n || (t === "input" ?
|
|
1127
|
+
return n || (t === "input" ? _r[e.type] ?? "textbox" : t === "a" && !e.hasAttribute("href") ? null : Tr[t] ?? null);
|
|
1124
1128
|
}
|
|
1125
|
-
function
|
|
1129
|
+
function Ir(e) {
|
|
1126
1130
|
const t = (e.getAttribute("aria-labelledby")?.split(/\s+/).filter(Boolean) ?? []).map((n) => {
|
|
1127
1131
|
const r = e.ownerDocument.getElementById(n);
|
|
1128
|
-
return r && !
|
|
1132
|
+
return r && !ae(r) ? r.textContent ?? "" : "";
|
|
1129
1133
|
});
|
|
1130
|
-
return
|
|
1134
|
+
return j(t.join(" "));
|
|
1131
1135
|
}
|
|
1132
|
-
function
|
|
1133
|
-
const n =
|
|
1136
|
+
function Rr(e, t) {
|
|
1137
|
+
const n = j(e.getAttribute("aria-label")) ?? Ir(e) ?? (t === "img" ? j(e.getAttribute("alt")) : null) ?? j(e.getAttribute("title"));
|
|
1134
1138
|
if (n) return n;
|
|
1135
1139
|
if (t === "input" || t === "textarea" || t === "select") {
|
|
1136
|
-
const r = e.getAttribute("id"), o = r ? e.ownerDocument.querySelector(`label[for="${CSS.escape(r)}"]`) : null, i = o && !
|
|
1137
|
-
return
|
|
1140
|
+
const r = e.getAttribute("id"), o = r ? e.ownerDocument.querySelector(`label[for="${CSS.escape(r)}"]`) : null, i = o && !ae(o) ? o.textContent : null;
|
|
1141
|
+
return j(i) ?? j(e.getAttribute("placeholder"));
|
|
1138
1142
|
}
|
|
1139
|
-
return
|
|
1143
|
+
return j(Lr(e));
|
|
1140
1144
|
}
|
|
1141
|
-
function
|
|
1145
|
+
function Nr(e) {
|
|
1142
1146
|
if (!e) return null;
|
|
1143
1147
|
try {
|
|
1144
1148
|
const t = new URL(e, document.baseURI);
|
|
@@ -1147,52 +1151,52 @@ function Rr(e) {
|
|
|
1147
1151
|
return null;
|
|
1148
1152
|
}
|
|
1149
1153
|
}
|
|
1150
|
-
function
|
|
1151
|
-
const t = e.tagName.toLowerCase(), n =
|
|
1154
|
+
function Or(e) {
|
|
1155
|
+
const t = e.tagName.toLowerCase(), n = ae(e), r = {
|
|
1152
1156
|
tag: t,
|
|
1153
|
-
role:
|
|
1154
|
-
name: n ? null :
|
|
1157
|
+
role: Ar(e, t),
|
|
1158
|
+
name: n ? null : Rr(e, t)
|
|
1155
1159
|
};
|
|
1156
1160
|
return e instanceof HTMLImageElement && (r.image = {
|
|
1157
|
-
src: n ? null :
|
|
1161
|
+
src: n ? null : Nr(e.currentSrc || e.getAttribute("src") || ""),
|
|
1158
1162
|
loaded: e.complete && e.naturalWidth > 0
|
|
1159
1163
|
}), r;
|
|
1160
1164
|
}
|
|
1161
|
-
var Cr = /\b(se deconnecter|deconnexion|log ?out|sign ?out)\b/,
|
|
1162
|
-
function
|
|
1165
|
+
var Cr = /\b(se deconnecter|deconnexion|log ?out|sign ?out)\b/, kr = /\/(logout|log-out|signout|sign-out|deconnexion)\b/i, Mr = 'a, button, [role="button"], [role="menuitem"], input[type="submit"], input[type="button"]', xr = 3;
|
|
1166
|
+
function Be(e) {
|
|
1163
1167
|
return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/\s+/g, " ").trim().toLowerCase();
|
|
1164
1168
|
}
|
|
1165
|
-
function
|
|
1169
|
+
function Fr(e) {
|
|
1166
1170
|
const t = e.getAttribute("aria-label");
|
|
1167
1171
|
return t || (e instanceof HTMLInputElement ? e.value : e.textContent ?? "");
|
|
1168
1172
|
}
|
|
1169
|
-
function
|
|
1170
|
-
for (const t of Array.from(e.querySelectorAll(
|
|
1171
|
-
if (Cr.test(
|
|
1173
|
+
function Dr(e) {
|
|
1174
|
+
for (const t of Array.from(e.querySelectorAll(Mr))) {
|
|
1175
|
+
if (Cr.test(Be(Fr(t)))) return !0;
|
|
1172
1176
|
const n = t.getAttribute("href");
|
|
1173
|
-
if (n &&
|
|
1177
|
+
if (n && kr.test(n)) return !0;
|
|
1174
1178
|
}
|
|
1175
1179
|
return !1;
|
|
1176
1180
|
}
|
|
1177
|
-
function Dr(e, t) {
|
|
1178
|
-
const n = Me(t);
|
|
1179
|
-
return n.length < Nr || !e.body ? !1 : Me(e.body.innerText ?? e.body.textContent).includes(n);
|
|
1180
|
-
}
|
|
1181
1181
|
function Pr(e, t) {
|
|
1182
|
-
|
|
1182
|
+
const n = Be(t);
|
|
1183
|
+
return n.length < xr || !e.body ? !1 : Be(e.body.innerText ?? e.body.textContent).includes(n);
|
|
1183
1184
|
}
|
|
1184
|
-
|
|
1185
|
+
function $r(e, t) {
|
|
1186
|
+
return Pr(e, t) ? "same-account" : Dr(e) ? "signed-in" : "unknown";
|
|
1187
|
+
}
|
|
1188
|
+
var Br = 100, qr = 800, Ur = [
|
|
1185
1189
|
"hidden",
|
|
1186
1190
|
"class",
|
|
1187
1191
|
"style",
|
|
1188
1192
|
"type",
|
|
1189
1193
|
"disabled",
|
|
1190
1194
|
"aria-hidden"
|
|
1191
|
-
],
|
|
1192
|
-
function
|
|
1195
|
+
], Te = 'input[type="password"]', At = 'input[autocomplete="username"], input[autocomplete="email"], input[type="email"]', _e = `${Te}, ${At}`, ve = /\b(connexion|se connecter|connectez[- ]vous|s'identifier|identifiez[- ]vous|login|log ?in|sign ?in)\b/, qe = /\b(inscription|s'inscrire|inscrivez|creer (un|votre|mon) compte|sign ?up|register|create (an |your )?account|mot de passe oublie|oublie|reinitialiser|forgot|reset|lien de connexion|magic link|envoyer (un|le) lien|send (me )?(a |the )?link|code|newsletter|abonner|subscribe|enregistrer|sauvegarder|mettre a jour|save|update|confirmer|confirm|supprimer mon compte|delete account|payer|pay)\b/, Hr = /\b(inscription|s'inscrire|inscrivez|creer (un|votre|mon) compte|sign ?up|create (an |your )?account|mot de passe oublie|reinitialiser|forgot|lien de connexion|magic link|envoyer (un|le) lien|send (me )?(a |the )?link|newsletter|abonner|subscribe)\b/, Gr = /\b(afficher|masquer|voir|show|hide|toggle)\b/, Wr = /\b(effacer|vider|supprimer|clear|reset)\b/, Vr = /[\u{1F441}\u{1F576}\u{1F440}]/u;
|
|
1196
|
+
function re(e) {
|
|
1193
1197
|
return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/[’‘]/g, "'").replace(/\s+/g, " ").trim().toLowerCase();
|
|
1194
1198
|
}
|
|
1195
|
-
function
|
|
1199
|
+
function le(e) {
|
|
1196
1200
|
let t = e;
|
|
1197
1201
|
for (; t; ) {
|
|
1198
1202
|
if (t.hasAttribute("hidden") || t.getAttribute("aria-hidden") === "true" || t instanceof HTMLInputElement && t.type === "hidden") return !1;
|
|
@@ -1202,43 +1206,43 @@ function re(e) {
|
|
|
1202
1206
|
}
|
|
1203
1207
|
return !0;
|
|
1204
1208
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return Array.from(e.querySelectorAll(t)).filter(
|
|
1209
|
+
function Y(e, t) {
|
|
1210
|
+
return Array.from(e.querySelectorAll(t)).filter(le);
|
|
1207
1211
|
}
|
|
1208
|
-
function
|
|
1212
|
+
function zr(e) {
|
|
1209
1213
|
return e ? e instanceof HTMLInputElement ? e.value : e.textContent ?? "" : "";
|
|
1210
1214
|
}
|
|
1211
|
-
function
|
|
1215
|
+
function It(e, t) {
|
|
1212
1216
|
return !e.outsideForms || !t.closest("form");
|
|
1213
1217
|
}
|
|
1214
|
-
function
|
|
1215
|
-
return Array.from(e.scope.querySelectorAll(t)).filter((n) =>
|
|
1218
|
+
function pe(e, t) {
|
|
1219
|
+
return Array.from(e.scope.querySelectorAll(t)).filter((n) => le(n) && It(e, n));
|
|
1216
1220
|
}
|
|
1217
|
-
function
|
|
1218
|
-
return
|
|
1221
|
+
function we(e) {
|
|
1222
|
+
return re(e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent);
|
|
1219
1223
|
}
|
|
1220
|
-
function
|
|
1221
|
-
const t =
|
|
1222
|
-
return
|
|
1224
|
+
function Kr(e) {
|
|
1225
|
+
const t = we(e);
|
|
1226
|
+
return Gr.test(t) || Vr.test(t);
|
|
1223
1227
|
}
|
|
1224
|
-
function
|
|
1228
|
+
function jr(e, t) {
|
|
1225
1229
|
if (e.getAttribute("type") === "submit" || !t) return !1;
|
|
1226
1230
|
const n = e.parentElement;
|
|
1227
|
-
return !n ||
|
|
1231
|
+
return !n || Y(n, _e).length === 0 ? !1 : !n.contains(t);
|
|
1228
1232
|
}
|
|
1229
|
-
var
|
|
1230
|
-
function
|
|
1231
|
-
return Array.from(e.querySelectorAll(
|
|
1233
|
+
var Xr = 'button, input[type="submit"], input[type="button"], input[type="image"], a[href]';
|
|
1234
|
+
function Yr(e) {
|
|
1235
|
+
return Array.from(e.querySelectorAll(Xr)).some(le);
|
|
1232
1236
|
}
|
|
1233
|
-
function
|
|
1237
|
+
function Zr(e, t) {
|
|
1234
1238
|
let n = e.parentElement;
|
|
1235
1239
|
for (; n && !n.contains(t); ) {
|
|
1236
|
-
if (
|
|
1240
|
+
if (Yr(n)) return !0;
|
|
1237
1241
|
n = n.parentElement;
|
|
1238
1242
|
}
|
|
1239
1243
|
return !1;
|
|
1240
1244
|
}
|
|
1241
|
-
function
|
|
1245
|
+
function Qr(e) {
|
|
1242
1246
|
const t = [
|
|
1243
1247
|
e.getAttribute("name"),
|
|
1244
1248
|
e.getAttribute("id"),
|
|
@@ -1250,30 +1254,30 @@ function Yr(e) {
|
|
|
1250
1254
|
const r = e.ownerDocument.querySelector(`label[for="${CSS.escape(n)}"]`);
|
|
1251
1255
|
r && t.push(r.textContent);
|
|
1252
1256
|
}
|
|
1253
|
-
return
|
|
1257
|
+
return re(t.filter(Boolean).join(" "));
|
|
1254
1258
|
}
|
|
1255
|
-
function
|
|
1259
|
+
function Jr(e, t) {
|
|
1256
1260
|
const n = e.parentElement;
|
|
1257
1261
|
if (!n) return null;
|
|
1258
|
-
const r = e.ownerDocument.body, o = (u) => t ?
|
|
1262
|
+
const r = e.ownerDocument.body, o = (u) => t ? Rt({
|
|
1259
1263
|
scope: u,
|
|
1260
1264
|
outsideForms: !0
|
|
1261
|
-
}, t) : e, i = (u) =>
|
|
1265
|
+
}, t) : e, i = (u) => Ue({
|
|
1262
1266
|
scope: u,
|
|
1263
1267
|
outsideForms: !0
|
|
1264
1268
|
}, e, o(u)), l = (u) => !!o(u) && !!i(u);
|
|
1265
1269
|
let c = n, s = null;
|
|
1266
1270
|
const a = (u) => {
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1271
|
+
const f = i(u);
|
|
1272
|
+
f && !s && ve.test(we(f)) && (s = u);
|
|
1269
1273
|
};
|
|
1270
1274
|
for (a(n); c !== r && !l(c); ) {
|
|
1271
1275
|
const u = c.parentElement;
|
|
1272
1276
|
if (!u || u.querySelector("form")) break;
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1275
|
-
const
|
|
1276
|
-
if (
|
|
1277
|
+
const f = [e], d = o(c);
|
|
1278
|
+
d && d !== e && f.push(d);
|
|
1279
|
+
const p = !!d;
|
|
1280
|
+
if (Y(u, _e).filter((y) => !y.closest("form") && !f.includes(y)).some((y) => y.matches(Te) || p || qe.test(Qr(y)) ? !0 : Zr(y, e))) break;
|
|
1277
1281
|
c = u, a(u);
|
|
1278
1282
|
}
|
|
1279
1283
|
return {
|
|
@@ -1285,24 +1289,24 @@ function at(e, t, n) {
|
|
|
1285
1289
|
return e ? {
|
|
1286
1290
|
scope: e,
|
|
1287
1291
|
outsideForms: !1
|
|
1288
|
-
} :
|
|
1292
|
+
} : Jr(t, n);
|
|
1289
1293
|
}
|
|
1290
|
-
function
|
|
1294
|
+
function eo(e, t) {
|
|
1291
1295
|
let n = e.parentElement;
|
|
1292
1296
|
for (; n && n !== t.scope; ) {
|
|
1293
|
-
if (
|
|
1297
|
+
if (Y(n, _e).length === 1) return !0;
|
|
1294
1298
|
n = n.parentElement;
|
|
1295
1299
|
}
|
|
1296
1300
|
return !1;
|
|
1297
1301
|
}
|
|
1298
|
-
function
|
|
1299
|
-
const r = (s) => !!(t.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_FOLLOWING), o = Array.from(e.scope.querySelectorAll('button, input[type="submit"]')).filter((s) =>
|
|
1302
|
+
function Ue(e, t, n) {
|
|
1303
|
+
const r = (s) => !!(t.compareDocumentPosition(s) & Node.DOCUMENT_POSITION_FOLLOWING), o = Array.from(e.scope.querySelectorAll('button, input[type="submit"]')).filter((s) => le(s) && It(e, s) && (s.getAttribute("type") === "submit" || r(s)) && !Kr(s) && !Wr.test(we(s)) && !jr(s, n));
|
|
1300
1304
|
if (o.length === 0) return null;
|
|
1301
1305
|
const i = (s, a) => {
|
|
1302
1306
|
const u = r(s);
|
|
1303
1307
|
return [
|
|
1304
|
-
|
|
1305
|
-
|
|
1308
|
+
eo(s, e) ? 1 : 0,
|
|
1309
|
+
ve.test(we(s)) ? 0 : 1,
|
|
1306
1310
|
s.getAttribute("type") === "submit" ? 0 : 1,
|
|
1307
1311
|
u ? 0 : 1,
|
|
1308
1312
|
u ? a : -a
|
|
@@ -1311,19 +1315,19 @@ function De(e, t, n) {
|
|
|
1311
1315
|
let l = o[0], c = i(l, 0);
|
|
1312
1316
|
return o.forEach((s, a) => {
|
|
1313
1317
|
const u = i(s, a);
|
|
1314
|
-
for (let
|
|
1315
|
-
const
|
|
1316
|
-
if (
|
|
1317
|
-
|
|
1318
|
+
for (let f = 0; f < u.length; f++) {
|
|
1319
|
+
const d = u[f], p = c[f];
|
|
1320
|
+
if (d !== p) {
|
|
1321
|
+
d < p && (l = s, c = u);
|
|
1318
1322
|
return;
|
|
1319
1323
|
}
|
|
1320
1324
|
}
|
|
1321
1325
|
}), l;
|
|
1322
1326
|
}
|
|
1323
1327
|
function lt(e) {
|
|
1324
|
-
return e.querySelectorAll("form").length + (
|
|
1328
|
+
return e.querySelectorAll("form").length + (Y(e, _e).some((t) => !t.closest("form")) ? 1 : 0) === 1;
|
|
1325
1329
|
}
|
|
1326
|
-
function
|
|
1330
|
+
function to(e, t) {
|
|
1327
1331
|
if (e) {
|
|
1328
1332
|
const n = e.getAttribute("aria-label");
|
|
1329
1333
|
if (n) return n;
|
|
@@ -1354,45 +1358,45 @@ function Jr(e, t) {
|
|
|
1354
1358
|
return (t instanceof Document ? t.body : t)?.querySelector("h1, h2, h3")?.textContent ?? "";
|
|
1355
1359
|
}
|
|
1356
1360
|
function ct(e, t, n) {
|
|
1357
|
-
const r =
|
|
1361
|
+
const r = re(zr(n)), o = re(to(e, t)), i = (e?.getAttribute("action") ?? "").split("?")[0], l = re([
|
|
1358
1362
|
e?.id,
|
|
1359
1363
|
e?.getAttribute("name"),
|
|
1360
1364
|
e?.className,
|
|
1361
1365
|
i
|
|
1362
1366
|
].filter(Boolean).join(" "));
|
|
1363
1367
|
return {
|
|
1364
|
-
positive:
|
|
1365
|
-
negative:
|
|
1368
|
+
positive: ve.test(r) || ve.test(o),
|
|
1369
|
+
negative: qe.test(r) || qe.test(o) || Hr.test(l)
|
|
1366
1370
|
};
|
|
1367
1371
|
}
|
|
1368
|
-
function
|
|
1369
|
-
const n =
|
|
1372
|
+
function Rt(e, t) {
|
|
1373
|
+
const n = pe(e, 'input[autocomplete="username"]')[0] ?? pe(e, 'input[autocomplete="email"]')[0] ?? pe(e, 'input[type="email"]')[0];
|
|
1370
1374
|
if (n) return n;
|
|
1371
1375
|
if (!t) return null;
|
|
1372
|
-
const r =
|
|
1376
|
+
const r = pe(e, 'input[type="text"], input:not([type])').filter((o) => o.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
1373
1377
|
return r[r.length - 1] ?? null;
|
|
1374
1378
|
}
|
|
1375
|
-
function
|
|
1379
|
+
function Oe(e, t) {
|
|
1376
1380
|
if (t.querySelector('input[autocomplete="new-password"]')) return null;
|
|
1377
|
-
const n =
|
|
1381
|
+
const n = Y(t, Te);
|
|
1378
1382
|
if (n.length > 1) return null;
|
|
1379
1383
|
if (n.length === 1) {
|
|
1380
1384
|
const s = n[0], a = at(e, s, s);
|
|
1381
1385
|
if (!a) return null;
|
|
1382
|
-
const u =
|
|
1383
|
-
return !(s.autocomplete === "current-password" ||
|
|
1386
|
+
const u = Rt(a, s), f = Ue(a, s, u), d = ct(e, t, f);
|
|
1387
|
+
return !(s.autocomplete === "current-password" || d.positive) || d.negative ? null : {
|
|
1384
1388
|
kind: "password",
|
|
1385
1389
|
form: e,
|
|
1386
1390
|
identifier: u,
|
|
1387
1391
|
password: s,
|
|
1388
|
-
submit:
|
|
1392
|
+
submit: f
|
|
1389
1393
|
};
|
|
1390
1394
|
}
|
|
1391
|
-
const r =
|
|
1395
|
+
const r = Y(t, At);
|
|
1392
1396
|
if (r.length !== 1) return null;
|
|
1393
1397
|
const o = r[0], i = at(e, o, null);
|
|
1394
1398
|
if (!i) return null;
|
|
1395
|
-
const l =
|
|
1399
|
+
const l = Ue(i, o, o), c = ct(e, t, l);
|
|
1396
1400
|
return !(o.autocomplete === "username" || c.positive) || c.negative ? null : {
|
|
1397
1401
|
kind: "identifier",
|
|
1398
1402
|
form: e,
|
|
@@ -1401,22 +1405,22 @@ function _e(e, t) {
|
|
|
1401
1405
|
submit: l
|
|
1402
1406
|
};
|
|
1403
1407
|
}
|
|
1404
|
-
function
|
|
1408
|
+
function me(e = document) {
|
|
1405
1409
|
const t = Array.from(e.querySelectorAll("form"));
|
|
1406
1410
|
for (const n of t) {
|
|
1407
|
-
const r =
|
|
1411
|
+
const r = Oe(n, n);
|
|
1408
1412
|
if (r) return r;
|
|
1409
1413
|
}
|
|
1410
|
-
return t.length === 0 ||
|
|
1414
|
+
return t.length === 0 || Y(e, Te).find((n) => !n.closest("form")) ? Oe(null, e) : null;
|
|
1411
1415
|
}
|
|
1412
1416
|
function ut(e, t) {
|
|
1413
1417
|
const n = Object.getPrototypeOf(e), r = Object.getOwnPropertyDescriptor(n, "value")?.set ?? Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
1414
1418
|
r ? r.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1415
1419
|
}
|
|
1416
|
-
function
|
|
1420
|
+
function no(e) {
|
|
1417
1421
|
return !!e.form || !!e.submit;
|
|
1418
1422
|
}
|
|
1419
|
-
function
|
|
1423
|
+
function ro(e) {
|
|
1420
1424
|
const t = e.form, n = t?.noValidate;
|
|
1421
1425
|
t && (t.noValidate = !0);
|
|
1422
1426
|
try {
|
|
@@ -1425,28 +1429,28 @@ function to(e) {
|
|
|
1425
1429
|
t && (t.noValidate = n ?? !1);
|
|
1426
1430
|
}
|
|
1427
1431
|
}
|
|
1428
|
-
var
|
|
1432
|
+
var oo = {
|
|
1429
1433
|
identifier: null,
|
|
1430
1434
|
password: null
|
|
1431
1435
|
};
|
|
1432
1436
|
function ft(e, t) {
|
|
1433
1437
|
return !e || e.disabled || e.readOnly ? !1 : e.value === "" || t !== null && e.value === t;
|
|
1434
1438
|
}
|
|
1435
|
-
function
|
|
1439
|
+
function Nt(e, t, n) {
|
|
1436
1440
|
return {
|
|
1437
1441
|
identifier: ft(e.identifier, n.identifier) && !t.identifier,
|
|
1438
1442
|
password: ft(e.password, n.password) && !t.password
|
|
1439
1443
|
};
|
|
1440
1444
|
}
|
|
1441
|
-
function
|
|
1445
|
+
function io(e, t, n) {
|
|
1442
1446
|
const r = e.identifier;
|
|
1443
1447
|
return !r || n.identifier ? !1 : r.value !== "" && r.value !== t.login;
|
|
1444
1448
|
}
|
|
1445
|
-
function
|
|
1446
|
-
const o =
|
|
1447
|
-
return !o.identifier && !o.password ? { error: "nothing-to-fill" } :
|
|
1449
|
+
function so(e, t, n, r = oo) {
|
|
1450
|
+
const o = Nt(e, n, r);
|
|
1451
|
+
return !o.identifier && !o.password ? { error: "nothing-to-fill" } : io(e, t, o) ? { error: "identifier-mismatch" } : no(e) ? (o.identifier && ut(e.identifier, t.login), o.password && ut(e.password, t.password), ro(e) ? { step: o.identifier && o.password ? "both" : o.password ? "password" : "identifier" } : { error: "no-submit" }) : { error: "no-submit" };
|
|
1448
1452
|
}
|
|
1449
|
-
function
|
|
1453
|
+
function ao(e) {
|
|
1450
1454
|
if (typeof window > "u" || typeof MutationObserver > "u") return {
|
|
1451
1455
|
watch() {
|
|
1452
1456
|
},
|
|
@@ -1466,22 +1470,22 @@ function io(e) {
|
|
|
1466
1470
|
}, o = !1, i = null, l = null, c = null, s = null, a = 0;
|
|
1467
1471
|
const u = () => {
|
|
1468
1472
|
c && clearTimeout(c), c = null;
|
|
1469
|
-
},
|
|
1473
|
+
}, f = () => {
|
|
1470
1474
|
s && clearTimeout(s), s = null, a = 0;
|
|
1475
|
+
}, d = () => {
|
|
1476
|
+
if (s = null, a = 0, !t || n.identifier || n.password || me(document)) return;
|
|
1477
|
+
const E = $r(document, t.login);
|
|
1478
|
+
t = null, e.onNoForm(E);
|
|
1471
1479
|
}, p = () => {
|
|
1472
|
-
if (s = null, a = 0, !t || n.identifier || n.password || le(document)) return;
|
|
1473
|
-
const v = Pr(document, t.login);
|
|
1474
|
-
t = null, e.onNoForm(v);
|
|
1475
|
-
}, h = () => {
|
|
1476
1480
|
if (!a) return;
|
|
1477
1481
|
s && clearTimeout(s);
|
|
1478
|
-
const
|
|
1479
|
-
s = setTimeout(
|
|
1480
|
-
},
|
|
1481
|
-
i?.disconnect(), i = null, u(),
|
|
1482
|
-
},
|
|
1483
|
-
const
|
|
1484
|
-
if (e.onMatch?.(
|
|
1482
|
+
const E = Math.max(0, a - Date.now());
|
|
1483
|
+
s = setTimeout(d, Math.min(qr, E));
|
|
1484
|
+
}, y = () => {
|
|
1485
|
+
i?.disconnect(), i = null, u(), f(), l && clearTimeout(l), l = null;
|
|
1486
|
+
}, S = () => {
|
|
1487
|
+
const E = me(document);
|
|
1488
|
+
if (e.onMatch?.(E), !E) {
|
|
1485
1489
|
o = !1, r = {
|
|
1486
1490
|
identifier: null,
|
|
1487
1491
|
password: null
|
|
@@ -1491,8 +1495,8 @@ function io(e) {
|
|
|
1491
1495
|
if (!t)
|
|
1492
1496
|
o || (o = !0, e.onDetected());
|
|
1493
1497
|
else {
|
|
1494
|
-
const _ =
|
|
1495
|
-
if ("error" in
|
|
1498
|
+
const _ = Nt(E, n, r), A = so(E, t, n, r);
|
|
1499
|
+
if ("error" in A || (_.identifier && (n = {
|
|
1496
1500
|
...n,
|
|
1497
1501
|
identifier: !0
|
|
1498
1502
|
}, r = {
|
|
@@ -1504,46 +1508,46 @@ function io(e) {
|
|
|
1504
1508
|
}, r = {
|
|
1505
1509
|
...r,
|
|
1506
1510
|
password: t.password
|
|
1507
|
-
})), "error" in
|
|
1508
|
-
const
|
|
1509
|
-
|
|
1511
|
+
})), "error" in A) {
|
|
1512
|
+
const M = A.error !== "nothing-to-fill" ? A.error : !n.identifier && !n.password ? "already-filled" : null;
|
|
1513
|
+
M && (e.onError(M), t = null, y());
|
|
1510
1514
|
} else
|
|
1511
|
-
e.onFilled(
|
|
1512
|
-
c = null,
|
|
1513
|
-
},
|
|
1515
|
+
e.onFilled(A.step), n.password && (t = null, u(), c = setTimeout(() => {
|
|
1516
|
+
c = null, me(document) && (o = !0, e.onDetected());
|
|
1517
|
+
}, Bt));
|
|
1514
1518
|
}
|
|
1515
|
-
},
|
|
1516
|
-
|
|
1517
|
-
l = null,
|
|
1518
|
-
},
|
|
1519
|
-
},
|
|
1520
|
-
i || (i = new MutationObserver(
|
|
1519
|
+
}, R = () => {
|
|
1520
|
+
p(), l && clearTimeout(l), l = setTimeout(() => {
|
|
1521
|
+
l = null, S();
|
|
1522
|
+
}, Br);
|
|
1523
|
+
}, v = () => {
|
|
1524
|
+
i || (i = new MutationObserver(R), i.observe(document.body, {
|
|
1521
1525
|
childList: !0,
|
|
1522
1526
|
subtree: !0,
|
|
1523
1527
|
attributes: !0,
|
|
1524
|
-
attributeFilter:
|
|
1528
|
+
attributeFilter: Ur
|
|
1525
1529
|
}));
|
|
1526
1530
|
};
|
|
1527
1531
|
return {
|
|
1528
1532
|
watch() {
|
|
1529
|
-
i || (o = !1,
|
|
1533
|
+
i || (o = !1, v()), S();
|
|
1530
1534
|
},
|
|
1531
|
-
fill(
|
|
1532
|
-
|
|
1535
|
+
fill(E) {
|
|
1536
|
+
f(), t = E, v(), S(), t && !n.identifier && !n.password && !me(document) && (a = Date.now() + qt, p());
|
|
1533
1537
|
},
|
|
1534
1538
|
cancel() {
|
|
1535
1539
|
t = null, n = {
|
|
1536
1540
|
identifier: !1,
|
|
1537
1541
|
password: !1
|
|
1538
|
-
}, o = !1,
|
|
1542
|
+
}, o = !1, y(), e.onMatch?.(null);
|
|
1539
1543
|
},
|
|
1540
1544
|
teardown() {
|
|
1541
|
-
t = null,
|
|
1545
|
+
t = null, y(), e.onMatch?.(null);
|
|
1542
1546
|
}
|
|
1543
1547
|
};
|
|
1544
1548
|
}
|
|
1545
|
-
var
|
|
1546
|
-
function
|
|
1549
|
+
var lo = 500, he = 0.5;
|
|
1550
|
+
function co(e) {
|
|
1547
1551
|
const t = e?.identifier ?? e?.password ?? null;
|
|
1548
1552
|
if (!e || !t) return null;
|
|
1549
1553
|
const n = [e.identifier, e.password].filter((r) => r !== null);
|
|
@@ -1553,143 +1557,189 @@ function so(e) {
|
|
|
1553
1557
|
inputs: n
|
|
1554
1558
|
};
|
|
1555
1559
|
}
|
|
1556
|
-
var
|
|
1557
|
-
function
|
|
1558
|
-
return e === null || t === null ? e === t : Math.abs(e.x - t.x) <=
|
|
1560
|
+
var ge = (e) => Math.round(e * 2) / 2;
|
|
1561
|
+
function uo(e, t) {
|
|
1562
|
+
return e === null || t === null ? e === t : e.crowded === t.crowded && Math.abs(e.x - t.x) <= he && Math.abs(e.y - t.y) <= he && Math.abs(e.width - t.width) <= he && Math.abs(e.height - t.height) <= he;
|
|
1559
1563
|
}
|
|
1560
|
-
function
|
|
1564
|
+
function fo(e, t) {
|
|
1561
1565
|
if (typeof document.elementFromPoint != "function") return !1;
|
|
1562
1566
|
const n = t.left + t.width / 2, r = t.top + t.height / 2;
|
|
1563
1567
|
if (n < 0 || r < 0 || n >= window.innerWidth || r >= window.innerHeight) return !1;
|
|
1564
1568
|
const o = document.elementFromPoint(n, r);
|
|
1565
1569
|
return !o || o === e || e.contains(o) ? !1 : !Array.from(e.labels ?? []).some((i) => i.contains(o));
|
|
1566
1570
|
}
|
|
1567
|
-
|
|
1568
|
-
|
|
1571
|
+
var po = 8, mo = [24, 32], ho = "button, a[href], input, select, textarea, [role=button], [tabindex]";
|
|
1572
|
+
function go(e, t) {
|
|
1573
|
+
if (typeof document.elementFromPoint != "function") return !1;
|
|
1574
|
+
const n = t.top + t.height / 2;
|
|
1575
|
+
return mo.some((r) => {
|
|
1576
|
+
const o = t.right - po - r / 2;
|
|
1577
|
+
if (o <= t.left || o < 0 || n < 0 || o >= window.innerWidth || n >= window.innerHeight) return !1;
|
|
1578
|
+
const i = document.elementFromPoint(o, n)?.closest(ho);
|
|
1579
|
+
return !!i && !i.contains(e);
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1582
|
+
function yo(e) {
|
|
1583
|
+
if (!e.isConnected || !le(e)) return null;
|
|
1569
1584
|
const t = e.getBoundingClientRect();
|
|
1570
|
-
return t.width <= 0 || t.height <= 0 || t.right <= 0 || t.bottom <= 0 || t.left >= window.innerWidth || t.top >= window.innerHeight ||
|
|
1571
|
-
x:
|
|
1572
|
-
y:
|
|
1573
|
-
width:
|
|
1574
|
-
height:
|
|
1585
|
+
return t.width <= 0 || t.height <= 0 || t.right <= 0 || t.bottom <= 0 || t.left >= window.innerWidth || t.top >= window.innerHeight || fo(e, t) ? null : {
|
|
1586
|
+
x: ge(t.left),
|
|
1587
|
+
y: ge(t.top),
|
|
1588
|
+
width: ge(t.width),
|
|
1589
|
+
height: ge(t.height),
|
|
1590
|
+
...go(e, t) ? { crowded: !0 } : {}
|
|
1575
1591
|
};
|
|
1576
1592
|
}
|
|
1577
|
-
function
|
|
1593
|
+
function bo(e, t = {}) {
|
|
1578
1594
|
if (typeof window > "u") return {
|
|
1579
1595
|
track() {
|
|
1580
1596
|
},
|
|
1597
|
+
focusField() {
|
|
1598
|
+
},
|
|
1581
1599
|
teardown() {
|
|
1582
1600
|
}
|
|
1583
1601
|
};
|
|
1584
|
-
const n = t.frame ?? ((
|
|
1585
|
-
let o = null, i = null, l = !1, c = !1, s = Number.NEGATIVE_INFINITY, a =
|
|
1586
|
-
const
|
|
1602
|
+
const n = t.frame ?? ((h) => window.requestAnimationFrame(() => h())), r = t.trusted ?? ((h) => h.isTrusted);
|
|
1603
|
+
let o = null, i = null, l = !1, c = !1, s = Number.NEGATIVE_INFINITY, a = Number.NEGATIVE_INFINITY, u = Number.NEGATIVE_INFINITY, f = !1, d = !1, p = null, y = null, S = null;
|
|
1604
|
+
const R = () => {
|
|
1587
1605
|
if (c = !1, !o) return;
|
|
1588
|
-
const
|
|
1589
|
-
i && i.scrolling === l &&
|
|
1590
|
-
rect:
|
|
1606
|
+
const h = yo(o.field);
|
|
1607
|
+
i && i.scrolling === l && uo(i.rect, h) || (i = {
|
|
1608
|
+
rect: h,
|
|
1591
1609
|
scrolling: l
|
|
1592
|
-
}, e.onAnchor(
|
|
1593
|
-
},
|
|
1594
|
-
!o || c || (c = !0, n(
|
|
1595
|
-
},
|
|
1610
|
+
}, e.onAnchor(h, l));
|
|
1611
|
+
}, v = () => {
|
|
1612
|
+
!o || c || (c = !0, n(R));
|
|
1613
|
+
}, E = (h) => {
|
|
1596
1614
|
if (!o) return;
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
}, 150),
|
|
1601
|
-
},
|
|
1602
|
-
const
|
|
1603
|
-
|
|
1604
|
-
}, A = /* @__PURE__ */ new Set(),
|
|
1605
|
-
|
|
1606
|
-
},
|
|
1607
|
-
o
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1615
|
+
const O = h.target;
|
|
1616
|
+
O instanceof Node && !O.contains(o.field) || (l = !0, p && clearTimeout(p), p = setTimeout(() => {
|
|
1617
|
+
p = null, l = !1, v();
|
|
1618
|
+
}, 150), v());
|
|
1619
|
+
}, _ = () => {
|
|
1620
|
+
const h = Date.now();
|
|
1621
|
+
h - s < 250 || (s = h, e.onInteraction());
|
|
1622
|
+
}, A = /* @__PURE__ */ new Set(), M = (h) => h.pointerType === "touch", D = (h) => h.pointerId ?? 0, N = () => {
|
|
1623
|
+
e.onFieldFocus(), s = Number.NEGATIVE_INFINITY;
|
|
1624
|
+
}, k = (h) => {
|
|
1625
|
+
if (!o || (h.button ?? 0) !== 0) return;
|
|
1626
|
+
const O = h.target;
|
|
1627
|
+
if (!(O instanceof Node)) return;
|
|
1628
|
+
const H = o.field;
|
|
1629
|
+
!H.contains(O) && !Array.from(H.labels ?? []).some((Q) => Q.contains(O)) || (a = Date.now(), document.activeElement === H && N());
|
|
1630
|
+
}, z = (h) => {
|
|
1631
|
+
!o || !r(h) || (u = Date.now(), M(h) ? A.add(D(h)) : (_(), k(h)));
|
|
1632
|
+
}, V = (h) => {
|
|
1633
|
+
o && r(h) && (u = Date.now()), o && r(h) && M(h) && A.delete(D(h)) && (_(), k(h));
|
|
1634
|
+
}, m = (h) => {
|
|
1635
|
+
if (!o) return;
|
|
1636
|
+
const O = f;
|
|
1637
|
+
f = !1, !(h.target !== o.field || O || d || !r(h)) && (Date.now() - a > 1e3 || (_(), N()));
|
|
1638
|
+
}, b = (h) => {
|
|
1639
|
+
!o || h.target !== o.field || !r(h) || h.relatedTarget instanceof Node && _();
|
|
1640
|
+
}, w = (h) => {
|
|
1641
|
+
!r(h) || Date.now() - u <= lo || (a = Date.now());
|
|
1614
1642
|
}, I = () => {
|
|
1615
|
-
document.
|
|
1616
|
-
},
|
|
1617
|
-
|
|
1643
|
+
o && document.activeElement === o.field && (f = !0);
|
|
1644
|
+
}, x = (h) => {
|
|
1645
|
+
if (!o || !r(h)) return;
|
|
1646
|
+
const { key: O, isComposing: H, shiftKey: Q, altKey: ce, ctrlKey: ue, metaKey: g } = h;
|
|
1647
|
+
O === "Tab" && (a = Date.now()), !(h.target !== o.field || H || Q || ce || ue || g) && $t(O) && e.onFieldKey(O);
|
|
1648
|
+
}, B = (h) => {
|
|
1649
|
+
A.delete(D(h));
|
|
1650
|
+
}, C = (h) => {
|
|
1651
|
+
if (!o || !r(h) || !(h.target instanceof Node)) return;
|
|
1652
|
+
const O = h.target;
|
|
1653
|
+
(o.scope ? o.scope.contains(O) : o.inputs.some((H) => H === O)) && _();
|
|
1654
|
+
}, P = () => {
|
|
1655
|
+
document.visibilityState === "visible" && v();
|
|
1656
|
+
}, U = () => {
|
|
1657
|
+
document.addEventListener("scroll", E, {
|
|
1618
1658
|
capture: !0,
|
|
1619
1659
|
passive: !0
|
|
1620
|
-
}), window.addEventListener("resize",
|
|
1621
|
-
document.visibilityState === "visible" &&
|
|
1660
|
+
}), window.addEventListener("resize", v), window.visualViewport?.addEventListener("resize", v), window.visualViewport?.addEventListener("scroll", v), document.addEventListener("pointerdown", z, !0), document.addEventListener("pointerup", V, !0), document.addEventListener("pointercancel", B, !0), document.addEventListener("input", C, !0), document.addEventListener("focusin", m, !0), document.addEventListener("focusout", b, !0), document.addEventListener("keydown", x, !0), window.addEventListener("focus", w), window.addEventListener("blur", I), document.addEventListener("visibilitychange", P), y = setInterval(() => {
|
|
1661
|
+
document.visibilityState === "visible" && v();
|
|
1622
1662
|
}, 250);
|
|
1623
|
-
},
|
|
1624
|
-
document.removeEventListener("scroll",
|
|
1625
|
-
},
|
|
1626
|
-
const
|
|
1627
|
-
o = null,
|
|
1663
|
+
}, Z = () => {
|
|
1664
|
+
document.removeEventListener("scroll", E, { capture: !0 }), window.removeEventListener("resize", v), window.visualViewport?.removeEventListener("resize", v), window.visualViewport?.removeEventListener("scroll", v), document.removeEventListener("pointerdown", z, !0), document.removeEventListener("pointerup", V, !0), document.removeEventListener("pointercancel", B, !0), document.removeEventListener("input", C, !0), document.removeEventListener("focusin", m, !0), document.removeEventListener("focusout", b, !0), document.removeEventListener("keydown", x, !0), window.removeEventListener("focus", w), window.removeEventListener("blur", I), A.clear(), f = !1, a = Number.NEGATIVE_INFINITY, u = Number.NEGATIVE_INFINITY, document.removeEventListener("visibilitychange", P), y && clearInterval(y), p && clearTimeout(p), y = null, p = null, S?.disconnect(), S = null, l = !1, c = !1;
|
|
1665
|
+
}, te = () => {
|
|
1666
|
+
const h = o !== null;
|
|
1667
|
+
o = null, Z(), i = null, h && e.onAnchor(null, !1);
|
|
1628
1668
|
};
|
|
1629
1669
|
return {
|
|
1630
|
-
track(
|
|
1631
|
-
if (!
|
|
1632
|
-
|
|
1670
|
+
track(h) {
|
|
1671
|
+
if (!h) {
|
|
1672
|
+
te();
|
|
1633
1673
|
return;
|
|
1634
1674
|
}
|
|
1635
|
-
const
|
|
1636
|
-
o =
|
|
1675
|
+
const O = o?.field === h.field, H = o !== null;
|
|
1676
|
+
o = h, H || U(), O || (S?.disconnect(), S = typeof ResizeObserver > "u" ? null : new ResizeObserver(() => v()), S?.observe(h.field), i = null), v();
|
|
1677
|
+
},
|
|
1678
|
+
focusField() {
|
|
1679
|
+
if (o) {
|
|
1680
|
+
d = !0;
|
|
1681
|
+
try {
|
|
1682
|
+
o.field.focus({ preventScroll: !0 });
|
|
1683
|
+
} finally {
|
|
1684
|
+
d = !1;
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1637
1687
|
},
|
|
1638
|
-
teardown:
|
|
1688
|
+
teardown: te
|
|
1639
1689
|
};
|
|
1640
1690
|
}
|
|
1641
|
-
var
|
|
1642
|
-
function
|
|
1691
|
+
var vo = "leesto/navigation";
|
|
1692
|
+
function wo(e) {
|
|
1643
1693
|
const t = e?.timestamp;
|
|
1644
1694
|
return typeof t == "number" ? t : void 0;
|
|
1645
1695
|
}
|
|
1646
|
-
function
|
|
1696
|
+
function Eo(e) {
|
|
1647
1697
|
return e?.type === 4;
|
|
1648
1698
|
}
|
|
1649
|
-
function
|
|
1699
|
+
function So(e) {
|
|
1650
1700
|
try {
|
|
1651
1701
|
return JSON.stringify(e)?.length ?? 0;
|
|
1652
1702
|
} catch {
|
|
1653
1703
|
return 0;
|
|
1654
1704
|
}
|
|
1655
1705
|
}
|
|
1656
|
-
function
|
|
1657
|
-
const t = e.now ?? Date.now, n = e.measure ??
|
|
1706
|
+
function To(e) {
|
|
1707
|
+
const t = e.now ?? Date.now, n = e.measure ?? So;
|
|
1658
1708
|
let r = [], o = 0, i = !1, l = Number.NEGATIVE_INFINITY;
|
|
1659
1709
|
const c = () => {
|
|
1660
1710
|
const a = r.shift();
|
|
1661
1711
|
a && (o -= a.bytes);
|
|
1662
1712
|
}, s = () => {
|
|
1663
1713
|
if (!i) {
|
|
1664
|
-
const
|
|
1665
|
-
for (; r.length > 1 && (r[1]?.start ?? Number.POSITIVE_INFINITY) <=
|
|
1714
|
+
const f = t() - e.windowMs;
|
|
1715
|
+
for (; r.length > 1 && (r[1]?.start ?? Number.POSITIVE_INFINITY) <= f; ) c();
|
|
1666
1716
|
}
|
|
1667
1717
|
const a = i ? e.heldMaxBytes : e.maxBytes;
|
|
1668
1718
|
for (; o > a && r.length > 1; ) c();
|
|
1669
1719
|
const u = r[r.length - 1];
|
|
1670
1720
|
if (o > a && e.requestCheckout && (u?.events.length ?? 0) > 2) {
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1721
|
+
const f = t();
|
|
1722
|
+
f - l >= e.minCheckoutIntervalMs && (l = f, e.requestCheckout());
|
|
1673
1723
|
}
|
|
1674
1724
|
};
|
|
1675
1725
|
return {
|
|
1676
1726
|
push(a) {
|
|
1677
1727
|
const u = n(a);
|
|
1678
|
-
if (
|
|
1679
|
-
start:
|
|
1728
|
+
if (Eo(a)) r.push({
|
|
1729
|
+
start: wo(a) ?? t(),
|
|
1680
1730
|
events: [a],
|
|
1681
1731
|
bytes: u
|
|
1682
1732
|
});
|
|
1683
1733
|
else {
|
|
1684
|
-
const
|
|
1685
|
-
if (!
|
|
1686
|
-
|
|
1734
|
+
const f = r[r.length - 1];
|
|
1735
|
+
if (!f) return;
|
|
1736
|
+
f.events.push(a), f.bytes += u;
|
|
1687
1737
|
}
|
|
1688
1738
|
o += u, s();
|
|
1689
1739
|
},
|
|
1690
1740
|
snapshot() {
|
|
1691
1741
|
const a = [];
|
|
1692
|
-
for (const u of r) for (const
|
|
1742
|
+
for (const u of r) for (const f of u.events) a.push(f);
|
|
1693
1743
|
return a;
|
|
1694
1744
|
},
|
|
1695
1745
|
hold() {
|
|
@@ -1713,44 +1763,44 @@ function go(e) {
|
|
|
1713
1763
|
}
|
|
1714
1764
|
};
|
|
1715
1765
|
}
|
|
1716
|
-
var Ot = 6e5,
|
|
1766
|
+
var Ot = 6e5, Ct = 1e3, _o = {
|
|
1717
1767
|
mousemove: 100,
|
|
1718
1768
|
scroll: 150
|
|
1719
|
-
},
|
|
1769
|
+
}, Lo = {
|
|
1720
1770
|
windowMs: 12e4,
|
|
1721
1771
|
checkoutEveryNms: 6e4,
|
|
1722
1772
|
maxBytes: 8388608,
|
|
1723
1773
|
heldMaxBytes: 33554432,
|
|
1724
1774
|
minCheckoutIntervalMs: 15e3,
|
|
1725
|
-
sampling:
|
|
1726
|
-
},
|
|
1727
|
-
async function
|
|
1775
|
+
sampling: _o
|
|
1776
|
+
}, Ao = 5;
|
|
1777
|
+
async function Io(e) {
|
|
1728
1778
|
const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = e.maskPolicy ?? "mask_all", o = Date.now();
|
|
1729
1779
|
let i = [], l = !1, c = 0;
|
|
1730
1780
|
const s = () => {
|
|
1731
1781
|
if (i.length === 0) return;
|
|
1732
|
-
const
|
|
1733
|
-
i = [], e.onBatch(
|
|
1782
|
+
const R = i;
|
|
1783
|
+
i = [], e.onBatch(R);
|
|
1734
1784
|
}, a = t({
|
|
1735
|
-
emit(
|
|
1736
|
-
i.push(Et(
|
|
1785
|
+
emit(R) {
|
|
1786
|
+
i.push(Et(R, r, (v) => t.mirror.getNode(v)));
|
|
1737
1787
|
},
|
|
1738
1788
|
...wt(r)
|
|
1739
|
-
}), u = e.diagnostics ?? null,
|
|
1740
|
-
|
|
1789
|
+
}), u = e.diagnostics ?? null, f = a ? u ?? Lt({ captureNetwork: e.captureNetwork !== !1 }) : null, d = f !== null && u === null;
|
|
1790
|
+
f?.setSink((R, v) => {
|
|
1741
1791
|
try {
|
|
1742
|
-
n(
|
|
1792
|
+
n(R, v);
|
|
1743
1793
|
} catch {
|
|
1744
1794
|
}
|
|
1745
1795
|
});
|
|
1746
|
-
const
|
|
1747
|
-
return
|
|
1748
|
-
|
|
1749
|
-
}, Ot), { stop:
|
|
1796
|
+
const p = setInterval(s, Ct), y = { timer: null }, S = () => (l || (l = !0, clearInterval(p), clearTimeout(y.timer ?? void 0), f?.flushRings(), f?.setSink(null), d && f?.teardown(), a?.(), s(), c = Date.now() - o), c);
|
|
1797
|
+
return y.timer = setTimeout(() => {
|
|
1798
|
+
S(), e.onCap();
|
|
1799
|
+
}, Ot), { stop: S };
|
|
1750
1800
|
}
|
|
1751
|
-
async function
|
|
1801
|
+
async function Ro(e) {
|
|
1752
1802
|
const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = {
|
|
1753
|
-
...
|
|
1803
|
+
...Lo,
|
|
1754
1804
|
...e.config
|
|
1755
1805
|
}, { diagnostics: o } = e, i = e.maskPolicy ?? "mask_all";
|
|
1756
1806
|
let l = !1, c = null, s = null;
|
|
@@ -1759,7 +1809,7 @@ async function Eo(e) {
|
|
|
1759
1809
|
t.takeFullSnapshot(!0);
|
|
1760
1810
|
} catch {
|
|
1761
1811
|
}
|
|
1762
|
-
}, u =
|
|
1812
|
+
}, u = To({
|
|
1763
1813
|
windowMs: r.windowMs,
|
|
1764
1814
|
maxBytes: r.maxBytes,
|
|
1765
1815
|
heldMaxBytes: r.heldMaxBytes,
|
|
@@ -1767,78 +1817,78 @@ async function Eo(e) {
|
|
|
1767
1817
|
requestCheckout: () => queueMicrotask(() => {
|
|
1768
1818
|
l || a();
|
|
1769
1819
|
})
|
|
1770
|
-
}),
|
|
1771
|
-
emit(
|
|
1772
|
-
const
|
|
1773
|
-
u.push(
|
|
1820
|
+
}), f = t({
|
|
1821
|
+
emit(p) {
|
|
1822
|
+
const y = Et(p, i, (S) => t.mirror.getNode(S));
|
|
1823
|
+
u.push(y), c?.(y);
|
|
1774
1824
|
},
|
|
1775
1825
|
checkoutEveryNms: r.checkoutEveryNms,
|
|
1776
1826
|
sampling: r.sampling,
|
|
1777
1827
|
...wt(i)
|
|
1778
1828
|
});
|
|
1779
|
-
if (!
|
|
1780
|
-
const
|
|
1829
|
+
if (!f) return null;
|
|
1830
|
+
const d = (p, y) => {
|
|
1781
1831
|
try {
|
|
1782
|
-
n(
|
|
1832
|
+
n(p, y);
|
|
1783
1833
|
} catch {
|
|
1784
1834
|
}
|
|
1785
1835
|
};
|
|
1786
|
-
return o.setSink(
|
|
1836
|
+
return o.setSink(d), {
|
|
1787
1837
|
snapshot() {
|
|
1788
|
-
const
|
|
1789
|
-
o.setSink((
|
|
1790
|
-
|
|
1791
|
-
type:
|
|
1838
|
+
const p = u.snapshot(), y = Date.now();
|
|
1839
|
+
o.setSink((R, v) => {
|
|
1840
|
+
p.push({
|
|
1841
|
+
type: Ao,
|
|
1792
1842
|
data: {
|
|
1793
|
-
tag:
|
|
1794
|
-
payload:
|
|
1843
|
+
tag: R,
|
|
1844
|
+
payload: v
|
|
1795
1845
|
},
|
|
1796
|
-
timestamp:
|
|
1846
|
+
timestamp: y
|
|
1797
1847
|
});
|
|
1798
1848
|
});
|
|
1799
1849
|
try {
|
|
1800
1850
|
o.flushRings();
|
|
1801
1851
|
} finally {
|
|
1802
|
-
o.setSink(l ? null :
|
|
1852
|
+
o.setSink(l ? null : d);
|
|
1803
1853
|
}
|
|
1804
|
-
const
|
|
1854
|
+
const S = p[0]?.timestamp;
|
|
1805
1855
|
return {
|
|
1806
|
-
events:
|
|
1807
|
-
durationMs: typeof
|
|
1856
|
+
events: p,
|
|
1857
|
+
durationMs: typeof S == "number" ? Math.max(0, y - S) : 0
|
|
1808
1858
|
};
|
|
1809
1859
|
},
|
|
1810
1860
|
hold: () => u.hold(),
|
|
1811
1861
|
release: () => u.release(),
|
|
1812
|
-
markNavigation(
|
|
1813
|
-
l ||
|
|
1862
|
+
markNavigation(p) {
|
|
1863
|
+
l || d(vo, { href: X(p) });
|
|
1814
1864
|
},
|
|
1815
1865
|
stats: () => u.stats(),
|
|
1816
|
-
stream({ onBatch:
|
|
1866
|
+
stream({ onBatch: p, onCap: y }) {
|
|
1817
1867
|
s?.stop();
|
|
1818
|
-
const
|
|
1819
|
-
let
|
|
1868
|
+
const S = Date.now();
|
|
1869
|
+
let R = [], v = !1, E = 0;
|
|
1820
1870
|
const _ = () => {
|
|
1821
|
-
if (
|
|
1822
|
-
const
|
|
1823
|
-
|
|
1824
|
-
},
|
|
1825
|
-
|
|
1871
|
+
if (R.length === 0) return;
|
|
1872
|
+
const k = R;
|
|
1873
|
+
R = [], p(k);
|
|
1874
|
+
}, A = (k) => {
|
|
1875
|
+
R.push(k);
|
|
1826
1876
|
};
|
|
1827
|
-
c =
|
|
1828
|
-
const
|
|
1829
|
-
return
|
|
1877
|
+
c = A, a();
|
|
1878
|
+
const M = setInterval(_, Ct), D = { timer: null }, N = { stop() {
|
|
1879
|
+
return v || (v = !0, clearInterval(M), clearTimeout(D.timer ?? void 0), o.flushRings(), c === A && (c = null), s === N && (s = null), _(), E = Date.now() - S), E;
|
|
1830
1880
|
} };
|
|
1831
1881
|
return D.timer = setTimeout(() => {
|
|
1832
|
-
|
|
1833
|
-
}, Ot), s =
|
|
1882
|
+
N.stop(), y();
|
|
1883
|
+
}, Ot), s = N, N;
|
|
1834
1884
|
},
|
|
1835
1885
|
stop() {
|
|
1836
|
-
l || (l = !0, s?.stop(), o.setSink(null),
|
|
1886
|
+
l || (l = !0, s?.stop(), o.setSink(null), f(), u.clear());
|
|
1837
1887
|
}
|
|
1838
1888
|
};
|
|
1839
1889
|
}
|
|
1840
|
-
var
|
|
1841
|
-
function
|
|
1890
|
+
var No = ["https://lab.leesto.app", "https://lab-dev.leesto.app"], Oo = ["http://localhost:3505", "http://127.0.0.1:3505"];
|
|
1891
|
+
function Co(e) {
|
|
1842
1892
|
try {
|
|
1843
1893
|
const t = new URL(e).hostname;
|
|
1844
1894
|
return t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "[::1]";
|
|
@@ -1846,7 +1896,7 @@ function _o(e) {
|
|
|
1846
1896
|
return !1;
|
|
1847
1897
|
}
|
|
1848
1898
|
}
|
|
1849
|
-
function
|
|
1899
|
+
function ko(e) {
|
|
1850
1900
|
const t = e.trim();
|
|
1851
1901
|
if (!t) return null;
|
|
1852
1902
|
try {
|
|
@@ -1856,19 +1906,19 @@ function Ao(e) {
|
|
|
1856
1906
|
return null;
|
|
1857
1907
|
}
|
|
1858
1908
|
}
|
|
1859
|
-
function
|
|
1860
|
-
const t = (e.explicit ?? []).map(
|
|
1909
|
+
function Mo(e) {
|
|
1910
|
+
const t = (e.explicit ?? []).map(ko).filter((r) => r !== null);
|
|
1861
1911
|
if (t.length > 0) return [...new Set(t)];
|
|
1862
|
-
const n = [...
|
|
1863
|
-
return
|
|
1912
|
+
const n = [...No];
|
|
1913
|
+
return Co(e.pageOrigin) && n.push(...Oo), [...new Set(n)];
|
|
1864
1914
|
}
|
|
1865
|
-
function
|
|
1915
|
+
function Ce(e, t) {
|
|
1866
1916
|
return !e || e === "*" || e === "null" ? !1 : t.includes(e);
|
|
1867
1917
|
}
|
|
1868
|
-
function
|
|
1918
|
+
function ye() {
|
|
1869
1919
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
1870
1920
|
}
|
|
1871
|
-
function
|
|
1921
|
+
function xo(e) {
|
|
1872
1922
|
const t = (l) => {
|
|
1873
1923
|
const c = typeof l == "string" ? l.trim() : "";
|
|
1874
1924
|
return c.length > 0 ? c : void 0;
|
|
@@ -1882,7 +1932,7 @@ function Ro(e) {
|
|
|
1882
1932
|
...i ? { environment: i } : {}
|
|
1883
1933
|
};
|
|
1884
1934
|
}
|
|
1885
|
-
function
|
|
1935
|
+
function Fo() {
|
|
1886
1936
|
if (typeof document > "u") return;
|
|
1887
1937
|
const e = document.querySelector('link[rel~="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]');
|
|
1888
1938
|
if (e?.href)
|
|
@@ -1892,7 +1942,7 @@ function Io() {
|
|
|
1892
1942
|
return;
|
|
1893
1943
|
}
|
|
1894
1944
|
}
|
|
1895
|
-
function
|
|
1945
|
+
function Do() {
|
|
1896
1946
|
const e = (r) => !!r && r !== "transparent" && !/^rgba\(\s*0,\s*0,\s*0,\s*0\s*\)$/.test(r), t = getComputedStyle(document.body).backgroundColor;
|
|
1897
1947
|
if (e(t)) return t;
|
|
1898
1948
|
const n = getComputedStyle(document.documentElement).backgroundColor;
|
|
@@ -1900,18 +1950,18 @@ function Co() {
|
|
|
1900
1950
|
}
|
|
1901
1951
|
var dt = Promise.resolve();
|
|
1902
1952
|
function pt(e) {
|
|
1903
|
-
const t = dt.then(() =>
|
|
1953
|
+
const t = dt.then(() => $o(e));
|
|
1904
1954
|
return dt = t.catch(() => {
|
|
1905
1955
|
}), t;
|
|
1906
1956
|
}
|
|
1907
|
-
function
|
|
1957
|
+
function Po(e, t, n, r) {
|
|
1908
1958
|
if (t !== "sticky") return [n, r];
|
|
1909
1959
|
const o = e.getBoundingClientRect(), i = e.style.position;
|
|
1910
1960
|
e.style.position = "static";
|
|
1911
1961
|
const l = e.getBoundingClientRect();
|
|
1912
1962
|
return e.style.position = i, [o.x - l.x, o.y - l.y];
|
|
1913
1963
|
}
|
|
1914
|
-
async function
|
|
1964
|
+
async function $o(e) {
|
|
1915
1965
|
const { domToPng: t } = await import("./chunks/dist-BTlWkbvW.js");
|
|
1916
1966
|
if (e) {
|
|
1917
1967
|
const s = document.querySelector(e);
|
|
@@ -1932,7 +1982,7 @@ async function ko(e) {
|
|
|
1932
1982
|
};
|
|
1933
1983
|
try {
|
|
1934
1984
|
c = ot(n);
|
|
1935
|
-
for (const s of n.querySelectorAll(`.${
|
|
1985
|
+
for (const s of n.querySelectorAll(`.${Ee}, ${ie}`)) {
|
|
1936
1986
|
const a = s.getBoundingClientRect();
|
|
1937
1987
|
if (a.width <= 0 || a.height <= 0) continue;
|
|
1938
1988
|
const u = document.createElement("div");
|
|
@@ -1950,13 +2000,13 @@ async function ko(e) {
|
|
|
1950
2000
|
for (const s of n.querySelectorAll("*")) {
|
|
1951
2001
|
const a = getComputedStyle(s).position;
|
|
1952
2002
|
if (a === "fixed" || a === "sticky") {
|
|
1953
|
-
const [u,
|
|
1954
|
-
l.push([s,
|
|
2003
|
+
const [u, f] = Po(s, a, r, o), d = s.style.transform;
|
|
2004
|
+
l.push([s, d]), s.style.transform = `translate(${u}px, ${f}px)${d ? ` ${d}` : ""}`;
|
|
1955
2005
|
}
|
|
1956
2006
|
}
|
|
1957
2007
|
return await t(n, {
|
|
1958
2008
|
quality: 0.92,
|
|
1959
|
-
backgroundColor:
|
|
2009
|
+
backgroundColor: Do(),
|
|
1960
2010
|
width: n.clientWidth,
|
|
1961
2011
|
height: n.clientHeight,
|
|
1962
2012
|
style: {
|
|
@@ -1971,7 +2021,7 @@ async function ko(e) {
|
|
|
1971
2021
|
for (const [s, a] of l) s.style.transform = a;
|
|
1972
2022
|
}
|
|
1973
2023
|
}
|
|
1974
|
-
function
|
|
2024
|
+
function Bo(e) {
|
|
1975
2025
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
1976
2026
|
const t = [];
|
|
1977
2027
|
let n = e;
|
|
@@ -1992,56 +2042,56 @@ function No(e) {
|
|
|
1992
2042
|
}
|
|
1993
2043
|
return t.join(" > ");
|
|
1994
2044
|
}
|
|
1995
|
-
function
|
|
2045
|
+
function qo(e) {
|
|
1996
2046
|
const t = e.tagName.toLowerCase();
|
|
1997
|
-
if (
|
|
2047
|
+
if (ae(e)) return t;
|
|
1998
2048
|
const n = (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 40);
|
|
1999
2049
|
return n ? `${t} · ${n}` : t;
|
|
2000
2050
|
}
|
|
2001
|
-
var
|
|
2002
|
-
function
|
|
2051
|
+
var kt = "leesto:shell-origin";
|
|
2052
|
+
function Uo() {
|
|
2003
2053
|
try {
|
|
2004
|
-
return sessionStorage.getItem(
|
|
2054
|
+
return sessionStorage.getItem(kt);
|
|
2005
2055
|
} catch {
|
|
2006
2056
|
return null;
|
|
2007
2057
|
}
|
|
2008
2058
|
}
|
|
2009
|
-
function
|
|
2059
|
+
function Ho(e) {
|
|
2010
2060
|
try {
|
|
2011
|
-
sessionStorage.setItem(
|
|
2061
|
+
sessionStorage.setItem(kt, e);
|
|
2012
2062
|
} catch {
|
|
2013
2063
|
}
|
|
2014
2064
|
}
|
|
2015
|
-
function
|
|
2065
|
+
function Go() {
|
|
2016
2066
|
try {
|
|
2017
2067
|
return typeof window.name == "string" ? window.name : "";
|
|
2018
2068
|
} catch {
|
|
2019
2069
|
return "";
|
|
2020
2070
|
}
|
|
2021
2071
|
}
|
|
2022
|
-
function
|
|
2072
|
+
function mt(e = {}) {
|
|
2023
2073
|
if (typeof window > "u" || window.parent === window) return () => {
|
|
2024
2074
|
};
|
|
2025
|
-
const t = window.parent, n = e.highlightColor ??
|
|
2075
|
+
const t = window.parent, n = e.highlightColor ?? rn.light.primary, r = Mo({
|
|
2026
2076
|
explicit: e.shellOrigins,
|
|
2027
2077
|
pageOrigin: location.origin
|
|
2028
2078
|
});
|
|
2029
2079
|
let o = null;
|
|
2030
2080
|
try {
|
|
2031
2081
|
const g = document.referrer ? new URL(document.referrer).origin : "";
|
|
2032
|
-
|
|
2082
|
+
Ce(g, r) && (o = g);
|
|
2033
2083
|
} catch {
|
|
2034
2084
|
}
|
|
2035
2085
|
if (!o) {
|
|
2036
|
-
const g =
|
|
2037
|
-
g &&
|
|
2086
|
+
const g = Uo();
|
|
2087
|
+
g && Ce(g, r) && (o = g);
|
|
2038
2088
|
}
|
|
2039
2089
|
const i = (g) => {
|
|
2040
2090
|
if (o) {
|
|
2041
2091
|
t.postMessage(g, o);
|
|
2042
2092
|
return;
|
|
2043
2093
|
}
|
|
2044
|
-
for (const
|
|
2094
|
+
for (const T of r) t.postMessage(g, T);
|
|
2045
2095
|
};
|
|
2046
2096
|
let l = null, c = "";
|
|
2047
2097
|
const s = () => {
|
|
@@ -2060,90 +2110,95 @@ function ht(e = {}) {
|
|
|
2060
2110
|
borderRadius: "4px",
|
|
2061
2111
|
display: "none"
|
|
2062
2112
|
}), document.documentElement.append(g);
|
|
2063
|
-
let
|
|
2064
|
-
const
|
|
2065
|
-
const
|
|
2066
|
-
if (!
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2113
|
+
let T = null, L = null, K = null;
|
|
2114
|
+
const J = document.body.style.cursor, $ = () => {
|
|
2115
|
+
const F = L ?? T;
|
|
2116
|
+
if (!F) return;
|
|
2117
|
+
const q = F.getBoundingClientRect();
|
|
2118
|
+
L ? i({
|
|
2069
2119
|
type: "leesto:element-picked",
|
|
2070
|
-
selector:
|
|
2071
|
-
label:
|
|
2120
|
+
selector: Bo(F),
|
|
2121
|
+
label: qo(F),
|
|
2072
2122
|
rect: {
|
|
2073
|
-
x:
|
|
2074
|
-
y:
|
|
2075
|
-
width:
|
|
2076
|
-
height:
|
|
2123
|
+
x: q.x,
|
|
2124
|
+
y: q.y,
|
|
2125
|
+
width: q.width,
|
|
2126
|
+
height: q.height
|
|
2077
2127
|
},
|
|
2078
|
-
...
|
|
2079
|
-
x:
|
|
2080
|
-
y:
|
|
2128
|
+
...K ? { point: {
|
|
2129
|
+
x: q.x + K.x,
|
|
2130
|
+
y: q.y + K.y
|
|
2081
2131
|
} } : {},
|
|
2082
2132
|
viewport: {
|
|
2083
2133
|
width: document.documentElement.clientWidth,
|
|
2084
2134
|
height: document.documentElement.clientHeight
|
|
2085
2135
|
},
|
|
2086
|
-
context:
|
|
2136
|
+
context: Or(F)
|
|
2087
2137
|
}) : Object.assign(g.style, {
|
|
2088
2138
|
display: "block",
|
|
2089
|
-
left: `${
|
|
2090
|
-
top: `${
|
|
2091
|
-
width: `${
|
|
2092
|
-
height: `${
|
|
2139
|
+
left: `${q.x}px`,
|
|
2140
|
+
top: `${q.y}px`,
|
|
2141
|
+
width: `${q.width}px`,
|
|
2142
|
+
height: `${q.height}px`
|
|
2093
2143
|
});
|
|
2094
|
-
}, ze = (
|
|
2095
|
-
|
|
2096
|
-
},
|
|
2097
|
-
g.remove(), document.removeEventListener("mousemove", ze, !0), document.removeEventListener("click",
|
|
2098
|
-
},
|
|
2099
|
-
if (
|
|
2100
|
-
const
|
|
2101
|
-
|
|
2102
|
-
x:
|
|
2103
|
-
y:
|
|
2144
|
+
}, ze = (F) => {
|
|
2145
|
+
T = F.target instanceof Element ? F.target : null, $();
|
|
2146
|
+
}, Ke = () => {
|
|
2147
|
+
g.remove(), document.removeEventListener("mousemove", ze, !0), document.removeEventListener("click", je, !0), document.body.style.cursor = J;
|
|
2148
|
+
}, je = (F) => {
|
|
2149
|
+
if (F.preventDefault(), F.stopPropagation(), L = F.target instanceof Element ? F.target : null, L) {
|
|
2150
|
+
const q = L.getBoundingClientRect();
|
|
2151
|
+
K = {
|
|
2152
|
+
x: F.clientX - q.x,
|
|
2153
|
+
y: F.clientY - q.y
|
|
2104
2154
|
};
|
|
2105
2155
|
}
|
|
2106
|
-
|
|
2107
|
-
},
|
|
2108
|
-
|
|
2156
|
+
Ke(), $();
|
|
2157
|
+
}, Xe = (F) => {
|
|
2158
|
+
F.key === "Escape" && (a?.(), i({ type: "leesto:pick-cancelled" }));
|
|
2109
2159
|
};
|
|
2110
2160
|
a = () => {
|
|
2111
|
-
|
|
2112
|
-
}, document.body.style.cursor = "crosshair", document.addEventListener("mousemove", ze, !0), document.addEventListener("click",
|
|
2113
|
-
},
|
|
2161
|
+
Ke(), document.removeEventListener("keydown", Xe, !0), document.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $), a = null;
|
|
2162
|
+
}, document.body.style.cursor = "crosshair", document.addEventListener("mousemove", ze, !0), document.addEventListener("click", je, !0), document.addEventListener("keydown", Xe, !0), document.addEventListener("scroll", $, !0), window.addEventListener("resize", $);
|
|
2163
|
+
}, f = Zt(location.search, Go()), d = ke(f) && !ye(), p = Xt(f), y = d ? Yt(f) ?? jt() : void 0, S = d ? Lt({
|
|
2114
2164
|
captureNetwork: e.captureNetwork !== !1,
|
|
2115
|
-
runId:
|
|
2165
|
+
runId: y,
|
|
2116
2166
|
runIdOrigins: e.runIdOrigins
|
|
2117
2167
|
}) : null;
|
|
2118
|
-
let
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2168
|
+
let R = null;
|
|
2169
|
+
const v = () => {
|
|
2170
|
+
R ?? (R = Er());
|
|
2121
2171
|
};
|
|
2122
|
-
(o ||
|
|
2123
|
-
let
|
|
2124
|
-
const _ =
|
|
2125
|
-
diagnostics:
|
|
2126
|
-
maskPolicy:
|
|
2127
|
-
}).then((g) => g &&
|
|
2128
|
-
let
|
|
2129
|
-
const
|
|
2130
|
-
if (
|
|
2131
|
-
const g =
|
|
2132
|
-
|
|
2172
|
+
(o || f) && v();
|
|
2173
|
+
let E = !1;
|
|
2174
|
+
const _ = S ? Ro({
|
|
2175
|
+
diagnostics: S,
|
|
2176
|
+
maskPolicy: p
|
|
2177
|
+
}).then((g) => g && E ? (g.stop(), null) : g).catch(() => null) : null;
|
|
2178
|
+
let A = null, M = !1, D = !1;
|
|
2179
|
+
const N = () => {
|
|
2180
|
+
if (A) {
|
|
2181
|
+
const g = A.stop();
|
|
2182
|
+
A = null, i({
|
|
2133
2183
|
type: "leesto:rec-stopped",
|
|
2134
2184
|
durationMs: g
|
|
2135
2185
|
});
|
|
2136
|
-
} else
|
|
2186
|
+
} else M && (D = !0);
|
|
2137
2187
|
};
|
|
2138
|
-
let
|
|
2139
|
-
const
|
|
2140
|
-
onAnchor: (g,
|
|
2188
|
+
let k = !1;
|
|
2189
|
+
const z = bo({
|
|
2190
|
+
onAnchor: (g, T) => i({
|
|
2141
2191
|
type: "leesto:login-anchor",
|
|
2142
2192
|
rect: g,
|
|
2143
|
-
scrolling:
|
|
2193
|
+
scrolling: T
|
|
2144
2194
|
}),
|
|
2145
|
-
onInteraction: () => i({ type: "leesto:login-interaction" })
|
|
2146
|
-
|
|
2195
|
+
onInteraction: () => i({ type: "leesto:login-interaction" }),
|
|
2196
|
+
onFieldFocus: () => i({ type: "leesto:login-field-focus" }),
|
|
2197
|
+
onFieldKey: (g) => i({
|
|
2198
|
+
type: "leesto:login-field-key",
|
|
2199
|
+
key: g
|
|
2200
|
+
})
|
|
2201
|
+
}), V = ao({
|
|
2147
2202
|
onDetected: () => i({ type: "leesto:login-form-detected" }),
|
|
2148
2203
|
onFilled: (g) => i({
|
|
2149
2204
|
type: "leesto:login-filled",
|
|
@@ -2157,118 +2212,118 @@ function ht(e = {}) {
|
|
|
2157
2212
|
type: "leesto:login-no-form",
|
|
2158
2213
|
signedIn: g
|
|
2159
2214
|
}),
|
|
2160
|
-
onMatch: (g) =>
|
|
2161
|
-
}),
|
|
2162
|
-
window.addEventListener("pagehide",
|
|
2163
|
-
const
|
|
2215
|
+
onMatch: (g) => z.track(k ? co(g) : null)
|
|
2216
|
+
}), m = () => V.cancel();
|
|
2217
|
+
window.addEventListener("pagehide", m);
|
|
2218
|
+
const b = Ln((g) => i({
|
|
2164
2219
|
type: "leesto:ambient",
|
|
2165
2220
|
...g
|
|
2166
|
-
})),
|
|
2167
|
-
let
|
|
2168
|
-
const
|
|
2169
|
-
let P = C(), U =
|
|
2170
|
-
const
|
|
2171
|
-
|
|
2172
|
-
const g =
|
|
2221
|
+
})), w = xo(e.build), I = window.navigation;
|
|
2222
|
+
let x = !1;
|
|
2223
|
+
const B = () => !x && I?.canGoBack === !0, C = () => !x && I?.canGoForward === !0;
|
|
2224
|
+
let P = C(), U = B(), Z = location.href;
|
|
2225
|
+
const te = () => {
|
|
2226
|
+
Z = location.href, U = B(), P = C();
|
|
2227
|
+
const g = Fo();
|
|
2173
2228
|
i({
|
|
2174
2229
|
type: "leesto:ready",
|
|
2175
2230
|
url: location.href,
|
|
2176
2231
|
bridgeVersion: 1,
|
|
2177
2232
|
capabilities: [
|
|
2178
2233
|
Mt,
|
|
2179
|
-
Pt,
|
|
2180
2234
|
Dt,
|
|
2181
|
-
|
|
2235
|
+
Ft,
|
|
2236
|
+
...I ? ["navigation", "navigation-forward"] : [],
|
|
2182
2237
|
..._ ? [xt] : []
|
|
2183
2238
|
],
|
|
2184
2239
|
canGoBack: U,
|
|
2185
2240
|
canGoForward: P,
|
|
2186
2241
|
...g ? { favicon: g } : {},
|
|
2187
|
-
...
|
|
2188
|
-
...
|
|
2189
|
-
...
|
|
2190
|
-
}),
|
|
2191
|
-
},
|
|
2192
|
-
if (g.source !== t || !
|
|
2193
|
-
o !== g.origin && (o = g.origin,
|
|
2194
|
-
const
|
|
2195
|
-
if (
|
|
2196
|
-
i({ type: "leesto:pong" }),
|
|
2197
|
-
else if (
|
|
2198
|
-
const
|
|
2199
|
-
if (!
|
|
2200
|
-
|
|
2242
|
+
...w ? { build: w } : {},
|
|
2243
|
+
...y ? { diagnosticRunId: y } : {},
|
|
2244
|
+
...ye() ? { gpc: !0 } : {}
|
|
2245
|
+
}), b.announce();
|
|
2246
|
+
}, h = (g) => {
|
|
2247
|
+
if (g.source !== t || !Ce(g.origin, r) || !Ut(g.data)) return;
|
|
2248
|
+
o !== g.origin && (o = g.origin, Ho(g.origin)), v();
|
|
2249
|
+
const T = g.data;
|
|
2250
|
+
if (T.type === "leesto:ping")
|
|
2251
|
+
i({ type: "leesto:pong" }), te();
|
|
2252
|
+
else if (T.type === "leesto:navigate-back" || T.type === "leesto:navigate-forward") {
|
|
2253
|
+
const L = T.type === "leesto:navigate-forward";
|
|
2254
|
+
if (!I || !(L ? C() : B())) return;
|
|
2255
|
+
x = !0, O(), Promise.resolve((L ? I.forward() : I.back()).finished).catch(() => {
|
|
2201
2256
|
}).finally(() => {
|
|
2202
|
-
|
|
2257
|
+
x = !1, E || O();
|
|
2203
2258
|
});
|
|
2204
|
-
} else if (
|
|
2205
|
-
if (s(),
|
|
2206
|
-
let
|
|
2259
|
+
} else if (T.type === "leesto:highlight") {
|
|
2260
|
+
if (s(), T.selector) {
|
|
2261
|
+
let L = null;
|
|
2207
2262
|
try {
|
|
2208
|
-
|
|
2263
|
+
L = document.querySelector(T.selector);
|
|
2209
2264
|
} catch {
|
|
2210
|
-
|
|
2265
|
+
L = null;
|
|
2211
2266
|
}
|
|
2212
|
-
|
|
2267
|
+
L && (l = L, c = L.style.outline, L.style.outline = `2px solid ${n}`, L.style.outlineOffset = "2px", L.scrollIntoView({
|
|
2213
2268
|
block: "center",
|
|
2214
2269
|
behavior: "smooth"
|
|
2215
2270
|
}));
|
|
2216
2271
|
}
|
|
2217
|
-
} else if (
|
|
2218
|
-
else if (
|
|
2219
|
-
else if (
|
|
2272
|
+
} else if (T.type === "leesto:pick-start") u();
|
|
2273
|
+
else if (T.type === "leesto:pick-stop") a?.();
|
|
2274
|
+
else if (T.type === "leesto:capture-request") (T.selector ? pt(T.selector) : (e.capture ?? pt)()).then((L) => i({
|
|
2220
2275
|
type: "leesto:screenshot",
|
|
2221
|
-
dataUrl:
|
|
2222
|
-
...
|
|
2223
|
-
})).catch((
|
|
2276
|
+
dataUrl: L,
|
|
2277
|
+
...T.selector ? { selector: T.selector } : {}
|
|
2278
|
+
})).catch((L) => i({
|
|
2224
2279
|
type: "leesto:capture-failed",
|
|
2225
|
-
reason:
|
|
2280
|
+
reason: L instanceof Error ? L.message : "capture_error"
|
|
2226
2281
|
}));
|
|
2227
|
-
else if (
|
|
2228
|
-
if (
|
|
2229
|
-
if (
|
|
2282
|
+
else if (T.type === "leesto:rec-start") {
|
|
2283
|
+
if (A || M) return;
|
|
2284
|
+
if (ye()) {
|
|
2230
2285
|
i({
|
|
2231
2286
|
type: "leesto:rec-blocked",
|
|
2232
2287
|
reason: "gpc"
|
|
2233
2288
|
});
|
|
2234
2289
|
return;
|
|
2235
2290
|
}
|
|
2236
|
-
|
|
2237
|
-
const
|
|
2291
|
+
M = !0, D = !1;
|
|
2292
|
+
const L = ($) => i({
|
|
2238
2293
|
type: "leesto:rec-batch",
|
|
2239
|
-
events:
|
|
2240
|
-
}),
|
|
2241
|
-
onBatch:
|
|
2242
|
-
onCap:
|
|
2294
|
+
events: $
|
|
2295
|
+
}), K = () => N(), J = () => Io({
|
|
2296
|
+
onBatch: L,
|
|
2297
|
+
onCap: K,
|
|
2243
2298
|
captureNetwork: e.captureNetwork,
|
|
2244
|
-
maskPolicy:
|
|
2245
|
-
diagnostics:
|
|
2299
|
+
maskPolicy: p,
|
|
2300
|
+
diagnostics: S
|
|
2246
2301
|
});
|
|
2247
|
-
(_ ? _.then((
|
|
2248
|
-
onBatch:
|
|
2249
|
-
onCap:
|
|
2250
|
-
}) :
|
|
2251
|
-
|
|
2252
|
-
}).catch((
|
|
2253
|
-
|
|
2302
|
+
(_ ? _.then(($) => $ ? $.stream({
|
|
2303
|
+
onBatch: L,
|
|
2304
|
+
onCap: K
|
|
2305
|
+
}) : J()) : J()).then(($) => {
|
|
2306
|
+
M = !1, A = $, D && N();
|
|
2307
|
+
}).catch(($) => {
|
|
2308
|
+
M = !1, i({
|
|
2254
2309
|
type: "leesto:rec-error",
|
|
2255
|
-
reason:
|
|
2310
|
+
reason: $ instanceof Error ? $.message : "rec_error"
|
|
2256
2311
|
});
|
|
2257
2312
|
});
|
|
2258
|
-
} else if (
|
|
2259
|
-
else if (
|
|
2313
|
+
} else if (T.type === "leesto:rec-stop") N();
|
|
2314
|
+
else if (T.type === "leesto:rec-buffer-request") {
|
|
2260
2315
|
if (!_) {
|
|
2261
2316
|
i({
|
|
2262
2317
|
type: "leesto:rec-buffer",
|
|
2263
2318
|
events: [],
|
|
2264
2319
|
durationMs: 0,
|
|
2265
|
-
unavailable:
|
|
2320
|
+
unavailable: ye() ? "gpc" : "not-armed"
|
|
2266
2321
|
});
|
|
2267
2322
|
return;
|
|
2268
2323
|
}
|
|
2269
|
-
_.then((
|
|
2270
|
-
if (
|
|
2271
|
-
if (!
|
|
2324
|
+
_.then((L) => {
|
|
2325
|
+
if (E) return;
|
|
2326
|
+
if (!L) {
|
|
2272
2327
|
i({
|
|
2273
2328
|
type: "leesto:rec-buffer",
|
|
2274
2329
|
events: [],
|
|
@@ -2277,33 +2332,33 @@ function ht(e = {}) {
|
|
|
2277
2332
|
});
|
|
2278
2333
|
return;
|
|
2279
2334
|
}
|
|
2280
|
-
const { events:
|
|
2335
|
+
const { events: K, durationMs: J } = L.snapshot();
|
|
2281
2336
|
i({
|
|
2282
2337
|
type: "leesto:rec-buffer",
|
|
2283
|
-
events:
|
|
2284
|
-
durationMs:
|
|
2338
|
+
events: K,
|
|
2339
|
+
durationMs: J
|
|
2285
2340
|
});
|
|
2286
2341
|
});
|
|
2287
|
-
} else
|
|
2342
|
+
} else T.type === "leesto:rec-buffer-hold" ? _?.then((L) => L?.hold()) : T.type === "leesto:rec-buffer-release" ? _?.then((L) => L?.release()) : T.type === "leesto:diagnostics-request" ? i({
|
|
2288
2343
|
type: "leesto:diagnostics",
|
|
2289
|
-
snapshot:
|
|
2344
|
+
snapshot: S?.snapshot() ?? {
|
|
2290
2345
|
errors: [],
|
|
2291
2346
|
logs: [],
|
|
2292
2347
|
network: []
|
|
2293
2348
|
}
|
|
2294
|
-
}) :
|
|
2295
|
-
login:
|
|
2296
|
-
password:
|
|
2297
|
-
}) :
|
|
2349
|
+
}) : T.type === "leesto:login-watch" ? (k = T.anchor === !0, V.watch()) : T.type === "leesto:login-fill" ? V.fill({
|
|
2350
|
+
login: T.login,
|
|
2351
|
+
password: T.password
|
|
2352
|
+
}) : T.type === "leesto:login-cancel" ? V.cancel() : T.type === "leesto:login-focus-field" && z.focusField();
|
|
2298
2353
|
};
|
|
2299
|
-
window.addEventListener("message",
|
|
2300
|
-
const
|
|
2301
|
-
if (!(location.href ===
|
|
2302
|
-
if (location.href !==
|
|
2303
|
-
const
|
|
2304
|
-
_?.then((
|
|
2354
|
+
window.addEventListener("message", h), te();
|
|
2355
|
+
const O = (g) => {
|
|
2356
|
+
if (!(location.href === Z && B() === U && C() === P)) {
|
|
2357
|
+
if (location.href !== Z) {
|
|
2358
|
+
const T = location.href;
|
|
2359
|
+
_?.then((L) => L?.markNavigation(T)), b.navigated();
|
|
2305
2360
|
}
|
|
2306
|
-
|
|
2361
|
+
Z = location.href, U = B(), P = C(), i({
|
|
2307
2362
|
type: "leesto:location",
|
|
2308
2363
|
url: location.href,
|
|
2309
2364
|
canGoBack: U,
|
|
@@ -2311,28 +2366,28 @@ function ht(e = {}) {
|
|
|
2311
2366
|
navigationType: typeof g == "string" ? g : "traverse"
|
|
2312
2367
|
});
|
|
2313
2368
|
}
|
|
2314
|
-
},
|
|
2315
|
-
|
|
2316
|
-
},
|
|
2317
|
-
|
|
2369
|
+
}, H = history.pushState, Q = history.replaceState, ce = (...g) => {
|
|
2370
|
+
H.apply(history, g), O("push");
|
|
2371
|
+
}, ue = (...g) => {
|
|
2372
|
+
Q.apply(history, g), O("replace");
|
|
2318
2373
|
};
|
|
2319
|
-
return history.pushState =
|
|
2320
|
-
|
|
2374
|
+
return history.pushState = ce, history.replaceState = ue, I?.addEventListener("currententrychange", O), window.addEventListener("popstate", O), window.addEventListener("hashchange", O), () => {
|
|
2375
|
+
E = !0, b.stop(), R?.(), I?.removeEventListener("currententrychange", O), N(), _?.then((g) => g?.stop()), S?.teardown(), s(), a?.(), V.teardown(), z.teardown(), window.removeEventListener("pagehide", m), window.removeEventListener("message", h), window.removeEventListener("popstate", O), window.removeEventListener("hashchange", O), history.pushState === ce && (history.pushState = H), history.replaceState === ue && (history.replaceState = Q);
|
|
2321
2376
|
};
|
|
2322
2377
|
}
|
|
2323
|
-
function
|
|
2378
|
+
function Wo() {
|
|
2324
2379
|
return typeof document > "u" ? null : document.currentScript ?? document.querySelector("script[data-leesto-connect]");
|
|
2325
2380
|
}
|
|
2326
|
-
function
|
|
2381
|
+
function Vo(e) {
|
|
2327
2382
|
const t = {}, n = e?.dataset.highlightColor;
|
|
2328
2383
|
n && (t.highlightColor = n);
|
|
2329
2384
|
const r = (e?.dataset.shellOrigin ?? "").split(",").map((o) => o.trim()).filter(Boolean);
|
|
2330
2385
|
return r.length > 0 && (t.shellOrigins = r), t;
|
|
2331
2386
|
}
|
|
2332
2387
|
if (typeof window < "u") {
|
|
2333
|
-
window.LeestoConnect = { connect: (t) =>
|
|
2334
|
-
const e =
|
|
2335
|
-
(!e || e.dataset.leestoManual === void 0) &&
|
|
2388
|
+
window.LeestoConnect = { connect: (t) => mt(t) };
|
|
2389
|
+
const e = Wo();
|
|
2390
|
+
(!e || e.dataset.leestoManual === void 0) && mt(Vo(e));
|
|
2336
2391
|
}
|
|
2337
2392
|
|
|
2338
2393
|
//# sourceMappingURL=leesto-connect.js.map
|