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