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