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