leesto-connect 0.5.0 → 0.7.0

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