leesto-connect 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/leesto-connect.js +925 -752
- package/dist/leesto-connect.js.map +1 -1
- package/package.json +1 -1
package/dist/leesto-connect.js
CHANGED
|
@@ -1,88 +1,82 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
1
|
+
var rt = "login", ot = "rrweb-buffer", it = 6e3, st = 3e3;
|
|
2
|
+
function at(e) {
|
|
3
3
|
return typeof e == "object" && e !== null && typeof e.type == "string" && e.type.startsWith("leesto:");
|
|
4
4
|
}
|
|
5
|
-
var
|
|
5
|
+
var lt = [
|
|
6
6
|
"mask_all",
|
|
7
7
|
"labels_visible",
|
|
8
8
|
"inputs_only"
|
|
9
|
-
],
|
|
10
|
-
function
|
|
11
|
-
return typeof e == "string" &&
|
|
12
|
-
}
|
|
13
|
-
var Pe = "leesto_diag", xe = "leesto_run", we = "X-Leesto-Run-Id", De = "leesto_mask", be = [
|
|
14
|
-
Pe,
|
|
15
|
-
xe,
|
|
16
|
-
De
|
|
17
|
-
], st = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
18
|
-
function Z(e) {
|
|
19
|
-
return typeof e == "string" && st.test(e);
|
|
9
|
+
], le = "mask_all";
|
|
10
|
+
function ct(e) {
|
|
11
|
+
return typeof e == "string" && lt.includes(e);
|
|
20
12
|
}
|
|
21
|
-
|
|
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);
|
|
16
|
+
}
|
|
17
|
+
function ht() {
|
|
22
18
|
try {
|
|
23
19
|
const e = globalThis.crypto, t = e?.randomUUID?.();
|
|
24
|
-
if (
|
|
20
|
+
if (te(t)) return t;
|
|
25
21
|
if (!e?.getRandomValues) return;
|
|
26
22
|
const n = e.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
27
23
|
n[6] = (n[6] ?? 0) & 15 | 64, n[8] = (n[8] ?? 0) & 63 | 128;
|
|
28
|
-
const r = Array.from(n, (
|
|
29
|
-
return
|
|
24
|
+
const r = Array.from(n, (i) => i.toString(16).padStart(2, "0")).join(""), o = `${r.slice(0, 8)}-${r.slice(8, 12)}-${r.slice(12, 16)}-${r.slice(16, 20)}-${r.slice(20)}`;
|
|
25
|
+
return te(o) ? o : void 0;
|
|
30
26
|
} catch {
|
|
31
27
|
return;
|
|
32
28
|
}
|
|
33
29
|
}
|
|
34
|
-
function
|
|
30
|
+
function mt(e) {
|
|
35
31
|
try {
|
|
36
|
-
const t = new URLSearchParams(e).getAll(
|
|
37
|
-
return t.some((r) => r !== n) ?
|
|
32
|
+
const t = new URLSearchParams(e).getAll(dt), [n] = t;
|
|
33
|
+
return t.some((r) => r !== n) ? le : ct(n) ? n : le;
|
|
38
34
|
} catch {
|
|
39
|
-
return
|
|
35
|
+
return le;
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
|
-
function
|
|
38
|
+
function gt(e) {
|
|
43
39
|
try {
|
|
44
|
-
const t = new URLSearchParams(e).get(
|
|
45
|
-
return
|
|
40
|
+
const t = new URLSearchParams(e).get(ft);
|
|
41
|
+
return te(t) ? t : void 0;
|
|
46
42
|
} catch {
|
|
47
43
|
return;
|
|
48
44
|
}
|
|
49
45
|
}
|
|
50
|
-
function
|
|
46
|
+
function pe(e) {
|
|
51
47
|
try {
|
|
52
|
-
return new URLSearchParams(e).get(
|
|
48
|
+
return new URLSearchParams(e).get(ut) === "1";
|
|
53
49
|
} catch {
|
|
54
50
|
return !1;
|
|
55
51
|
}
|
|
56
52
|
}
|
|
57
|
-
function
|
|
58
|
-
if (
|
|
53
|
+
function yt(e, t) {
|
|
54
|
+
if (pe(e)) return e;
|
|
59
55
|
if (typeof t != "string" || !t.startsWith("leesto-arming?")) return "";
|
|
60
56
|
const n = `?${t.slice(14)}`;
|
|
61
|
-
return
|
|
57
|
+
return pe(n) ? n : "";
|
|
62
58
|
}
|
|
63
|
-
function
|
|
59
|
+
function vt(e) {
|
|
64
60
|
try {
|
|
65
61
|
const t = new URL(e);
|
|
66
|
-
|
|
67
|
-
for (const n of be) t.searchParams.delete(n);
|
|
68
|
-
return t.href;
|
|
62
|
+
return `${t.origin}${t.pathname}`;
|
|
69
63
|
} catch {
|
|
70
|
-
return e;
|
|
64
|
+
return e.split(/[?#]/)[0] ?? e;
|
|
71
65
|
}
|
|
72
66
|
}
|
|
73
|
-
var
|
|
67
|
+
var Te = "leesto/console", bt = "leesto/network", wt = "leesto/network-ring", Et = "leesto/console-ring", St = {
|
|
74
68
|
primary: "#08783f",
|
|
75
69
|
hover: "#066633",
|
|
76
70
|
foreground: "#f3fff7"
|
|
77
|
-
},
|
|
71
|
+
}, _t = {
|
|
78
72
|
primary: "#46c383",
|
|
79
73
|
hover: "#65d49b",
|
|
80
74
|
foreground: "#082315"
|
|
81
|
-
},
|
|
82
|
-
light:
|
|
83
|
-
dark:
|
|
75
|
+
}, Rt = {
|
|
76
|
+
light: St,
|
|
77
|
+
dark: _t
|
|
84
78
|
};
|
|
85
|
-
function
|
|
79
|
+
function Z(e) {
|
|
86
80
|
const t = [];
|
|
87
81
|
return {
|
|
88
82
|
push(n) {
|
|
@@ -93,126 +87,147 @@ function X(e) {
|
|
|
93
87
|
}
|
|
94
88
|
};
|
|
95
89
|
}
|
|
96
|
-
var
|
|
97
|
-
function
|
|
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) {
|
|
92
|
+
const t = e.search(/[?#]/);
|
|
93
|
+
if (t < 0) return e;
|
|
94
|
+
const n = Dt.exec(e.slice(t))?.[0] ?? "";
|
|
95
|
+
return e.slice(0, t) + n;
|
|
96
|
+
}
|
|
97
|
+
function Ft(e) {
|
|
98
98
|
let t = 0, n = !1;
|
|
99
99
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
100
|
-
let
|
|
101
|
-
if (
|
|
102
|
-
n && (
|
|
100
|
+
let o = e.charCodeAt(r) - 48;
|
|
101
|
+
if (o < 0 || o > 9) return !1;
|
|
102
|
+
n && (o *= 2, o > 9 && (o -= 9)), t += o, n = !n;
|
|
103
103
|
}
|
|
104
104
|
return t % 10 === 0;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function he(e) {
|
|
107
107
|
if (!e) return e;
|
|
108
|
-
let t = e.replace(
|
|
109
|
-
return t = t.replace(
|
|
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) => {
|
|
110
110
|
const r = n.replace(/[ -]/g, "");
|
|
111
|
-
return r.length >= 13 && r.length <= 19 &&
|
|
111
|
+
return r.length >= 13 && r.length <= 19 && Ft(r) ? "[carte masquée]" : n;
|
|
112
112
|
}), t;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function W(e) {
|
|
115
115
|
const t = typeof e == "string" ? e : e instanceof URL ? e.href : e instanceof Request ? e.url : String(e);
|
|
116
116
|
try {
|
|
117
117
|
const n = new URL(t, typeof location < "u" ? location.href : void 0);
|
|
118
|
-
return n.origin +
|
|
118
|
+
return n.origin + he(n.pathname);
|
|
119
119
|
} catch {
|
|
120
|
-
return
|
|
120
|
+
return he(t.split("?")[0] ?? t);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var
|
|
123
|
+
var Pt = /* @__PURE__ */ new Set(["fetch", "xmlhttprequest"]), qt = ["deprecation", "intervention"], Bt = { teardown: () => {
|
|
124
124
|
} };
|
|
125
|
-
function
|
|
125
|
+
function Ut(e) {
|
|
126
126
|
const t = typeof performance < "u" ? performance.timeOrigin : 0;
|
|
127
127
|
return Math.round(t + e);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Gt(e) {
|
|
130
130
|
const t = e.responseStatus;
|
|
131
131
|
return typeof t == "number" && t > 0 ? t : void 0;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
if (
|
|
135
|
-
const t =
|
|
133
|
+
function Ht(e) {
|
|
134
|
+
if (Pt.has(e.initiatorType)) return null;
|
|
135
|
+
const t = Gt(e), n = e.transferSize || e.encodedBodySize || void 0;
|
|
136
136
|
return {
|
|
137
137
|
method: "GET",
|
|
138
|
-
url:
|
|
138
|
+
url: W(e.name),
|
|
139
139
|
...t !== void 0 ? { status: t } : {},
|
|
140
140
|
durationMs: Math.round(e.duration),
|
|
141
141
|
...n ? { responseSize: n } : {},
|
|
142
|
-
startedAt:
|
|
142
|
+
startedAt: Ut(e.startTime),
|
|
143
143
|
...t !== void 0 && t >= 400 ? { failed: !0 } : {},
|
|
144
144
|
initiatorType: e.initiatorType
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
if (typeof window > "u") return
|
|
147
|
+
function Wt(e) {
|
|
148
|
+
if (typeof window > "u") return Bt;
|
|
149
149
|
const t = [];
|
|
150
150
|
if (typeof PerformanceObserver < "u") try {
|
|
151
|
-
const
|
|
152
|
-
for (const
|
|
153
|
-
const
|
|
154
|
-
|
|
151
|
+
const i = new PerformanceObserver((u) => {
|
|
152
|
+
for (const l of u.getEntries()) try {
|
|
153
|
+
const s = Ht(l);
|
|
154
|
+
s && e.onResource(s);
|
|
155
155
|
} catch {
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
|
-
|
|
158
|
+
i.observe({
|
|
159
159
|
type: "resource",
|
|
160
160
|
buffered: !0
|
|
161
|
-
}), t.push(() =>
|
|
161
|
+
}), t.push(() => i.disconnect());
|
|
162
162
|
} catch {
|
|
163
163
|
}
|
|
164
164
|
const n = window.ReportingObserver;
|
|
165
165
|
if (n) try {
|
|
166
|
-
const
|
|
167
|
-
for (const
|
|
168
|
-
const
|
|
169
|
-
e.onReport("warn", `Navigateur (${
|
|
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}`);
|
|
170
170
|
}
|
|
171
171
|
}), {
|
|
172
|
-
types:
|
|
172
|
+
types: qt,
|
|
173
173
|
buffered: !0
|
|
174
174
|
});
|
|
175
|
-
|
|
175
|
+
i.observe(), t.push(() => i.disconnect());
|
|
176
176
|
} catch {
|
|
177
177
|
}
|
|
178
|
-
const r = (
|
|
179
|
-
const
|
|
180
|
-
e.onReport("error", `CSP : ${
|
|
178
|
+
const r = (i) => {
|
|
179
|
+
const u = i;
|
|
180
|
+
e.onReport("error", `CSP : ${u.blockedURI || "ressource"} bloqué par « ${u.violatedDirective} »`);
|
|
181
181
|
};
|
|
182
182
|
window.addEventListener("securitypolicyviolation", r), t.push(() => window.removeEventListener("securitypolicyviolation", r));
|
|
183
|
-
let
|
|
183
|
+
let o = !1;
|
|
184
184
|
return { teardown: () => {
|
|
185
|
-
if (!
|
|
186
|
-
|
|
187
|
-
for (const
|
|
188
|
-
|
|
185
|
+
if (!o) {
|
|
186
|
+
o = !0;
|
|
187
|
+
for (const i of t) try {
|
|
188
|
+
i();
|
|
189
189
|
} catch {
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
} };
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
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);
|
|
197
|
+
}
|
|
198
|
+
function V(e) {
|
|
199
|
+
return qe(e, K, Kt);
|
|
200
|
+
}
|
|
201
|
+
var Zt = /(token|secret|passw(or)?d|api[-_]?key|authorization|cookie)$/i;
|
|
202
|
+
function ce(e) {
|
|
196
203
|
const t = e instanceof Error ? e.stack : void 0;
|
|
197
204
|
if (t)
|
|
198
|
-
return
|
|
205
|
+
return qe(t, Pe, Yt);
|
|
199
206
|
}
|
|
200
|
-
function
|
|
207
|
+
function ue(e) {
|
|
201
208
|
if (e instanceof Error) return `${e.name}: ${e.message}`;
|
|
202
209
|
if (typeof e == "string") return e;
|
|
203
|
-
if (typeof e == "object" && e !== null)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
210
|
+
if (typeof e == "object" && e !== null) {
|
|
211
|
+
const t = /* @__PURE__ */ Symbol("overflow");
|
|
212
|
+
let n = K * 8;
|
|
213
|
+
try {
|
|
214
|
+
return JSON.stringify(e, (r, o) => {
|
|
215
|
+
if (Zt.test(r)) return "[masqué]";
|
|
216
|
+
if (n -= r.length + (typeof o == "string" ? o.length : 8), n < 0) throw t;
|
|
217
|
+
return o;
|
|
218
|
+
}).slice(0, K);
|
|
219
|
+
} catch (r) {
|
|
220
|
+
return r === t ? "[objet volumineux]" : "[objet]";
|
|
221
|
+
}
|
|
207
222
|
}
|
|
208
223
|
return String(e);
|
|
209
224
|
}
|
|
210
|
-
function
|
|
225
|
+
function Oe(e) {
|
|
211
226
|
if (!e) return;
|
|
212
227
|
const t = Number(e);
|
|
213
228
|
return Number.isFinite(t) && t >= 0 ? t : void 0;
|
|
214
229
|
}
|
|
215
|
-
var
|
|
230
|
+
var Jt = {
|
|
216
231
|
snapshot: () => ({
|
|
217
232
|
errors: [],
|
|
218
233
|
logs: [],
|
|
@@ -225,10 +240,10 @@ var Nt = {
|
|
|
225
240
|
teardown: () => {
|
|
226
241
|
}
|
|
227
242
|
};
|
|
228
|
-
function
|
|
229
|
-
if (typeof window > "u") return
|
|
230
|
-
const t =
|
|
231
|
-
if (!
|
|
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) => {
|
|
246
|
+
if (!i) return !1;
|
|
232
247
|
try {
|
|
233
248
|
const p = new URL(String(f), location.href);
|
|
234
249
|
return p.origin === location.origin || (e.runIdOrigins ?? []).includes(p.origin);
|
|
@@ -236,33 +251,35 @@ function qe(e) {
|
|
|
236
251
|
return !1;
|
|
237
252
|
}
|
|
238
253
|
};
|
|
239
|
-
let
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
},
|
|
254
|
+
let l = e.sink ?? null;
|
|
255
|
+
const s = (f, p) => {
|
|
256
|
+
l?.(f, p);
|
|
257
|
+
}, a = (f) => {
|
|
243
258
|
e.captureNetwork && t.push(f);
|
|
244
|
-
},
|
|
259
|
+
}, c = (f) => {
|
|
260
|
+
e.captureNetwork && s(bt, f);
|
|
261
|
+
}, d = (f, p, m, E = {}) => {
|
|
245
262
|
if (!p) return;
|
|
246
|
-
const
|
|
263
|
+
const I = {
|
|
247
264
|
level: f,
|
|
248
265
|
message: p,
|
|
249
266
|
...m ? { stack: m } : {},
|
|
250
267
|
...E,
|
|
251
268
|
at: Date.now()
|
|
252
269
|
};
|
|
253
|
-
|
|
254
|
-
},
|
|
270
|
+
o.push(I), s(Te, I);
|
|
271
|
+
}, y = (f, p) => {
|
|
255
272
|
try {
|
|
256
|
-
const m =
|
|
257
|
-
|
|
273
|
+
const m = V(p.map(ue).join(" ")), E = p.find((I) => I instanceof Error);
|
|
274
|
+
d(f, m, ce(E), {
|
|
258
275
|
mechanism: "console",
|
|
259
276
|
...E instanceof Error && E.name ? { name: E.name } : {}
|
|
260
277
|
});
|
|
261
278
|
} catch {
|
|
262
279
|
}
|
|
263
|
-
},
|
|
280
|
+
}, b = (f, p) => {
|
|
264
281
|
try {
|
|
265
|
-
const m =
|
|
282
|
+
const m = V(p.map(ue).join(" "));
|
|
266
283
|
m && r.push({
|
|
267
284
|
level: f,
|
|
268
285
|
message: m,
|
|
@@ -270,127 +287,127 @@ function qe(e) {
|
|
|
270
287
|
});
|
|
271
288
|
} catch {
|
|
272
289
|
}
|
|
273
|
-
},
|
|
274
|
-
console.error = (...f) => (
|
|
275
|
-
const
|
|
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) => {
|
|
276
293
|
const p = f.target;
|
|
277
294
|
if (p instanceof Element) {
|
|
278
295
|
const E = p.src || p.href || "";
|
|
279
296
|
if (!E) return;
|
|
280
|
-
|
|
297
|
+
d("error", `Ressource non chargée : <${p.tagName.toLowerCase()}> ${W(E)}`.slice(0, K), void 0, {
|
|
281
298
|
mechanism: "resource",
|
|
282
|
-
sourceUrl:
|
|
299
|
+
sourceUrl: W(E)
|
|
283
300
|
});
|
|
284
301
|
return;
|
|
285
302
|
}
|
|
286
303
|
const m = f;
|
|
287
|
-
|
|
304
|
+
d("error", V(`Erreur non gérée : ${m.message}`), ce(m.error), {
|
|
288
305
|
mechanism: "window.error",
|
|
289
306
|
...typeof m.error?.name == "string" ? { name: m.error.name } : {},
|
|
290
|
-
...typeof m.filename == "string" && m.filename ? { sourceUrl:
|
|
307
|
+
...typeof m.filename == "string" && m.filename ? { sourceUrl: W(m.filename) } : {},
|
|
291
308
|
...typeof m.lineno == "number" && m.lineno > 0 ? { line: m.lineno } : {},
|
|
292
309
|
...typeof m.colno == "number" && m.colno > 0 ? { column: m.colno } : {}
|
|
293
310
|
});
|
|
294
311
|
}, C = (f) => {
|
|
295
|
-
|
|
312
|
+
d("error", V(`Promesse rejetée : ${ue(f.reason)}`), ce(f.reason), {
|
|
296
313
|
mechanism: "unhandledrejection",
|
|
297
314
|
...f.reason instanceof Error && f.reason.name ? { name: f.reason.name } : {}
|
|
298
315
|
});
|
|
299
316
|
};
|
|
300
|
-
window.addEventListener("error",
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
const m = Date.now(), E = (p?.method ?? (f instanceof Request ? f.method : "GET") ?? "GET").toUpperCase(),
|
|
304
|
-
let
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
307
|
-
for (const [
|
|
308
|
-
|
|
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 = {
|
|
309
326
|
...p,
|
|
310
|
-
headers:
|
|
327
|
+
headers: L
|
|
311
328
|
};
|
|
312
329
|
}
|
|
313
330
|
try {
|
|
314
|
-
const
|
|
331
|
+
const L = await O(f, B);
|
|
315
332
|
try {
|
|
316
|
-
const
|
|
317
|
-
|
|
333
|
+
const T = L.headers.get("x-request-id"), G = L.headers.get("traceparent");
|
|
334
|
+
a({
|
|
318
335
|
method: E,
|
|
319
|
-
url:
|
|
320
|
-
status:
|
|
336
|
+
url: I,
|
|
337
|
+
status: L.status,
|
|
321
338
|
durationMs: Date.now() - m,
|
|
322
|
-
responseSize:
|
|
323
|
-
contentType:
|
|
339
|
+
responseSize: Oe(L.headers.get("content-length")),
|
|
340
|
+
contentType: L.headers.get("content-type") ?? void 0,
|
|
324
341
|
startedAt: m,
|
|
325
|
-
...
|
|
326
|
-
...
|
|
327
|
-
...
|
|
328
|
-
}),
|
|
342
|
+
...T ? { requestId: T.slice(0, 200) } : {},
|
|
343
|
+
...G ? { traceparent: G.slice(0, 200) } : {},
|
|
344
|
+
...i ? { runId: i } : {}
|
|
345
|
+
}), L.ok || c({
|
|
329
346
|
method: E,
|
|
330
|
-
url:
|
|
331
|
-
status:
|
|
347
|
+
url: I,
|
|
348
|
+
status: L.status,
|
|
332
349
|
durationMs: Date.now() - m
|
|
333
350
|
});
|
|
334
351
|
} catch {
|
|
335
352
|
}
|
|
336
|
-
return
|
|
337
|
-
} catch (
|
|
353
|
+
return L;
|
|
354
|
+
} catch (L) {
|
|
338
355
|
try {
|
|
339
|
-
const
|
|
340
|
-
|
|
356
|
+
const T = Date.now() - m;
|
|
357
|
+
a({
|
|
341
358
|
method: E,
|
|
342
|
-
url:
|
|
359
|
+
url: I,
|
|
343
360
|
status: 0,
|
|
344
|
-
durationMs:
|
|
361
|
+
durationMs: T,
|
|
345
362
|
startedAt: m,
|
|
346
363
|
failed: !0,
|
|
347
|
-
...
|
|
348
|
-
}),
|
|
364
|
+
...i ? { runId: i } : {}
|
|
365
|
+
}), c({
|
|
349
366
|
method: E,
|
|
350
|
-
url:
|
|
367
|
+
url: I,
|
|
351
368
|
status: 0,
|
|
352
|
-
durationMs:
|
|
369
|
+
durationMs: T
|
|
353
370
|
});
|
|
354
371
|
} catch {
|
|
355
372
|
}
|
|
356
|
-
throw
|
|
373
|
+
throw L;
|
|
357
374
|
}
|
|
358
375
|
}));
|
|
359
|
-
const
|
|
376
|
+
const M = XMLHttpRequest.prototype.open, D = XMLHttpRequest.prototype.send, F = "__echoNet";
|
|
360
377
|
XMLHttpRequest.prototype.open = function(f, p, ...m) {
|
|
361
|
-
return this[
|
|
378
|
+
return this[F] = {
|
|
362
379
|
method: (f || "GET").toUpperCase(),
|
|
363
|
-
url:
|
|
380
|
+
url: W(p),
|
|
364
381
|
start: 0,
|
|
365
|
-
propagate:
|
|
366
|
-
},
|
|
382
|
+
propagate: u(p)
|
|
383
|
+
}, M.apply(this, [
|
|
367
384
|
f,
|
|
368
385
|
p,
|
|
369
386
|
...m
|
|
370
387
|
]);
|
|
371
388
|
}, XMLHttpRequest.prototype.send = function(...f) {
|
|
372
|
-
const p = this[
|
|
389
|
+
const p = this[F];
|
|
373
390
|
if (p) {
|
|
374
|
-
if (p.start = Date.now(),
|
|
375
|
-
this.setRequestHeader(
|
|
391
|
+
if (p.start = Date.now(), i && p.propagate) try {
|
|
392
|
+
this.setRequestHeader(Le, i);
|
|
376
393
|
} catch {
|
|
377
394
|
}
|
|
378
395
|
this.addEventListener("loadend", () => {
|
|
379
396
|
try {
|
|
380
|
-
const m = Date.now() - p.start, E = this.status,
|
|
381
|
-
|
|
397
|
+
const m = Date.now() - p.start, E = this.status, I = E === 0, B = this.getResponseHeader("x-request-id"), L = this.getResponseHeader("traceparent");
|
|
398
|
+
a({
|
|
382
399
|
method: p.method,
|
|
383
400
|
url: p.url,
|
|
384
401
|
status: E,
|
|
385
402
|
durationMs: m,
|
|
386
|
-
responseSize:
|
|
403
|
+
responseSize: Oe(this.getResponseHeader("content-length")),
|
|
387
404
|
contentType: this.getResponseHeader("content-type") ?? void 0,
|
|
388
405
|
startedAt: p.start,
|
|
389
|
-
...
|
|
390
|
-
...
|
|
391
|
-
...
|
|
392
|
-
...
|
|
393
|
-
}), (
|
|
406
|
+
...I ? { failed: !0 } : {},
|
|
407
|
+
...i ? { runId: i } : {},
|
|
408
|
+
...B ? { requestId: B.slice(0, 200) } : {},
|
|
409
|
+
...L ? { traceparent: L.slice(0, 200) } : {}
|
|
410
|
+
}), (I || E >= 400) && c({
|
|
394
411
|
method: p.method,
|
|
395
412
|
url: p.url,
|
|
396
413
|
status: E,
|
|
@@ -400,53 +417,275 @@ function qe(e) {
|
|
|
400
417
|
}
|
|
401
418
|
}, { once: !0 });
|
|
402
419
|
}
|
|
403
|
-
return
|
|
420
|
+
return D.apply(this, f);
|
|
404
421
|
};
|
|
405
|
-
const
|
|
422
|
+
const q = Wt({
|
|
406
423
|
onResource: (f) => {
|
|
407
|
-
e.captureNetwork && n.push(
|
|
424
|
+
e.captureNetwork && n.push(i ? {
|
|
408
425
|
...f,
|
|
409
|
-
runId:
|
|
426
|
+
runId: i
|
|
410
427
|
} : f);
|
|
411
428
|
},
|
|
412
|
-
onReport: (f, p) =>
|
|
429
|
+
onReport: (f, p) => d(f, V(p), void 0, { mechanism: "report" })
|
|
413
430
|
}), $ = () => e.captureNetwork ? [...t.snapshot(), ...n.snapshot()].sort((f, p) => f.startedAt - p.startedAt) : [];
|
|
414
|
-
let
|
|
431
|
+
let U = !1;
|
|
415
432
|
return {
|
|
416
433
|
snapshot: () => ({
|
|
417
|
-
errors:
|
|
434
|
+
errors: o.snapshot(),
|
|
418
435
|
logs: r.snapshot(),
|
|
419
436
|
network: $(),
|
|
420
|
-
...
|
|
437
|
+
...i ? { runId: i } : {}
|
|
421
438
|
}),
|
|
422
439
|
setSink: (f) => {
|
|
423
|
-
|
|
440
|
+
l = f;
|
|
424
441
|
},
|
|
425
442
|
flushRings: () => {
|
|
426
443
|
const f = $();
|
|
427
|
-
f.length > 0 &&
|
|
444
|
+
f.length > 0 && s(wt, { entries: f });
|
|
428
445
|
const p = r.snapshot();
|
|
429
|
-
p.length > 0 &&
|
|
430
|
-
const m =
|
|
431
|
-
m.length > 0 &&
|
|
446
|
+
p.length > 0 && s(Et, { entries: p });
|
|
447
|
+
const m = o.snapshot();
|
|
448
|
+
m.length > 0 && s(Te, { entries: m });
|
|
432
449
|
},
|
|
433
450
|
teardown: () => {
|
|
434
|
-
|
|
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);
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
}
|
|
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;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
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
|
+
}
|
|
487
|
+
}
|
|
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
|
|
504
|
+
};
|
|
505
|
+
const t = {
|
|
506
|
+
...Ie,
|
|
507
|
+
blockSelector: `${ne}, ${Qt}`,
|
|
508
|
+
maskTextSelector: "*"
|
|
509
|
+
};
|
|
510
|
+
return e === "labels_visible" ? {
|
|
511
|
+
...t,
|
|
512
|
+
maskTextFn: (n, r) => Ve(r) ? n : ze(n)
|
|
513
|
+
} : t;
|
|
514
|
+
}
|
|
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);
|
|
435
574
|
}
|
|
575
|
+
}
|
|
576
|
+
return e;
|
|
577
|
+
}
|
|
578
|
+
var un = 80, fn = {
|
|
579
|
+
a: "link",
|
|
580
|
+
button: "button",
|
|
581
|
+
img: "img",
|
|
582
|
+
textarea: "textbox",
|
|
583
|
+
select: "combobox",
|
|
584
|
+
h1: "heading",
|
|
585
|
+
h2: "heading",
|
|
586
|
+
h3: "heading",
|
|
587
|
+
h4: "heading",
|
|
588
|
+
h5: "heading",
|
|
589
|
+
h6: "heading",
|
|
590
|
+
dialog: "dialog"
|
|
591
|
+
}, dn = {
|
|
592
|
+
button: "button",
|
|
593
|
+
submit: "button",
|
|
594
|
+
reset: "button",
|
|
595
|
+
checkbox: "checkbox",
|
|
596
|
+
radio: "radio",
|
|
597
|
+
search: "searchbox"
|
|
598
|
+
}, H = (e) => {
|
|
599
|
+
const t = (e ?? "").replace(/\s+/g, " ").trim();
|
|
600
|
+
return t ? t.slice(0, un) : null;
|
|
601
|
+
};
|
|
602
|
+
function pn(e) {
|
|
603
|
+
const t = [];
|
|
604
|
+
let n = 0;
|
|
605
|
+
const r = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT);
|
|
606
|
+
for (let o = r.nextNode(); o && n < 320; o = r.nextNode()) {
|
|
607
|
+
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);
|
|
611
|
+
}
|
|
612
|
+
return t.join(" ");
|
|
613
|
+
}
|
|
614
|
+
function hn(e, t) {
|
|
615
|
+
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);
|
|
617
|
+
}
|
|
618
|
+
function mn(e) {
|
|
619
|
+
const t = (e.getAttribute("aria-labelledby")?.split(/\s+/).filter(Boolean) ?? []).map((n) => {
|
|
620
|
+
const r = e.ownerDocument.getElementById(n);
|
|
621
|
+
return r && !Y(r) ? r.textContent ?? "" : "";
|
|
622
|
+
});
|
|
623
|
+
return H(t.join(" "));
|
|
624
|
+
}
|
|
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"));
|
|
627
|
+
if (n) return n;
|
|
628
|
+
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"));
|
|
631
|
+
}
|
|
632
|
+
return H(pn(e));
|
|
633
|
+
}
|
|
634
|
+
function yn(e) {
|
|
635
|
+
if (!e) return null;
|
|
636
|
+
try {
|
|
637
|
+
const t = new URL(e, document.baseURI);
|
|
638
|
+
return t.protocol === "data:" || t.protocol === "blob:" ? `${t.protocol}…` : `${t.origin}${t.pathname}`;
|
|
639
|
+
} catch {
|
|
640
|
+
return null;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
function vn(e) {
|
|
644
|
+
const t = e.tagName.toLowerCase(), n = Y(e), r = {
|
|
645
|
+
tag: t,
|
|
646
|
+
role: hn(e, t),
|
|
647
|
+
name: n ? null : gn(e, t)
|
|
436
648
|
};
|
|
649
|
+
return e instanceof HTMLImageElement && (r.image = {
|
|
650
|
+
src: n ? null : yn(e.currentSrc || e.getAttribute("src") || ""),
|
|
651
|
+
loaded: e.complete && e.naturalWidth > 0
|
|
652
|
+
}), r;
|
|
653
|
+
}
|
|
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) {
|
|
656
|
+
return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/\s+/g, " ").trim().toLowerCase();
|
|
657
|
+
}
|
|
658
|
+
function _n(e) {
|
|
659
|
+
const t = e.getAttribute("aria-label");
|
|
660
|
+
return t || (e instanceof HTMLInputElement ? e.value : e.textContent ?? "");
|
|
661
|
+
}
|
|
662
|
+
function Rn(e) {
|
|
663
|
+
for (const t of Array.from(e.querySelectorAll(En))) {
|
|
664
|
+
if (bn.test(me(_n(t)))) return !0;
|
|
665
|
+
const n = t.getAttribute("href");
|
|
666
|
+
if (n && wn.test(n)) return !0;
|
|
667
|
+
}
|
|
668
|
+
return !1;
|
|
669
|
+
}
|
|
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);
|
|
437
673
|
}
|
|
438
|
-
|
|
674
|
+
function Ln(e, t) {
|
|
675
|
+
return An(e, t) ? "same-account" : Rn(e) ? "signed-in" : "unknown";
|
|
676
|
+
}
|
|
677
|
+
var Tn = 100, On = 800, In = [
|
|
439
678
|
"hidden",
|
|
440
679
|
"class",
|
|
441
680
|
"style",
|
|
442
681
|
"type",
|
|
443
682
|
"disabled",
|
|
444
683
|
"aria-hidden"
|
|
445
|
-
],
|
|
446
|
-
function
|
|
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) {
|
|
447
686
|
return (e ?? "").normalize("NFD").replace(/[̀-ͯ]/g, "").replace(/[’‘]/g, "'").replace(/\s+/g, " ").trim().toLowerCase();
|
|
448
687
|
}
|
|
449
|
-
function
|
|
688
|
+
function ae(e) {
|
|
450
689
|
let t = e;
|
|
451
690
|
for (; t; ) {
|
|
452
691
|
if (t.hasAttribute("hidden") || t.getAttribute("aria-hidden") === "true" || t instanceof HTMLInputElement && t.type === "hidden") return !1;
|
|
@@ -456,43 +695,43 @@ function ne(e) {
|
|
|
456
695
|
}
|
|
457
696
|
return !0;
|
|
458
697
|
}
|
|
459
|
-
function
|
|
460
|
-
return Array.from(e.querySelectorAll(t)).filter(
|
|
698
|
+
function z(e, t) {
|
|
699
|
+
return Array.from(e.querySelectorAll(t)).filter(ae);
|
|
461
700
|
}
|
|
462
|
-
function
|
|
701
|
+
function Mn(e) {
|
|
463
702
|
return e ? e instanceof HTMLInputElement ? e.value : e.textContent ?? "" : "";
|
|
464
703
|
}
|
|
465
|
-
function
|
|
704
|
+
function Ze(e, t) {
|
|
466
705
|
return !e.outsideForms || !t.closest("form");
|
|
467
706
|
}
|
|
468
|
-
function
|
|
469
|
-
return Array.from(e.scope.querySelectorAll(t)).filter((n) =>
|
|
707
|
+
function J(e, t) {
|
|
708
|
+
return Array.from(e.scope.querySelectorAll(t)).filter((n) => ae(n) && Ze(e, n));
|
|
470
709
|
}
|
|
471
|
-
function
|
|
472
|
-
return
|
|
710
|
+
function oe(e) {
|
|
711
|
+
return X(e.getAttribute("aria-label") ?? e.getAttribute("title") ?? e.textContent);
|
|
473
712
|
}
|
|
474
|
-
function
|
|
475
|
-
const t =
|
|
476
|
-
return
|
|
713
|
+
function Dn(e) {
|
|
714
|
+
const t = oe(e);
|
|
715
|
+
return Nn.test(t) || xn.test(t);
|
|
477
716
|
}
|
|
478
|
-
function
|
|
717
|
+
function $n(e, t) {
|
|
479
718
|
if (e.getAttribute("type") === "submit" || !t) return !1;
|
|
480
719
|
const n = e.parentElement;
|
|
481
|
-
return !n ||
|
|
720
|
+
return !n || z(n, se).length === 0 ? !1 : !n.contains(t);
|
|
482
721
|
}
|
|
483
|
-
var
|
|
484
|
-
function
|
|
485
|
-
return Array.from(e.querySelectorAll(
|
|
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);
|
|
486
725
|
}
|
|
487
|
-
function
|
|
726
|
+
function qn(e, t) {
|
|
488
727
|
let n = e.parentElement;
|
|
489
728
|
for (; n && !n.contains(t); ) {
|
|
490
|
-
if (
|
|
729
|
+
if (Pn(n)) return !0;
|
|
491
730
|
n = n.parentElement;
|
|
492
731
|
}
|
|
493
732
|
return !1;
|
|
494
733
|
}
|
|
495
|
-
function
|
|
734
|
+
function Bn(e) {
|
|
496
735
|
const t = [
|
|
497
736
|
e.getAttribute("name"),
|
|
498
737
|
e.getAttribute("id"),
|
|
@@ -504,173 +743,173 @@ function jt(e) {
|
|
|
504
743
|
const r = e.ownerDocument.querySelector(`label[for="${CSS.escape(n)}"]`);
|
|
505
744
|
r && t.push(r.textContent);
|
|
506
745
|
}
|
|
507
|
-
return
|
|
746
|
+
return X(t.filter(Boolean).join(" "));
|
|
508
747
|
}
|
|
509
|
-
function
|
|
748
|
+
function Un(e, t) {
|
|
510
749
|
const n = e.parentElement;
|
|
511
750
|
if (!n) return null;
|
|
512
|
-
const r = e.ownerDocument.body,
|
|
513
|
-
scope:
|
|
751
|
+
const r = e.ownerDocument.body, o = (c) => t ? Je({
|
|
752
|
+
scope: c,
|
|
514
753
|
outsideForms: !0
|
|
515
|
-
}, t) : e,
|
|
516
|
-
scope:
|
|
754
|
+
}, t) : e, i = (c) => ye({
|
|
755
|
+
scope: c,
|
|
517
756
|
outsideForms: !0
|
|
518
|
-
}, e,
|
|
519
|
-
let
|
|
520
|
-
const
|
|
521
|
-
const d =
|
|
522
|
-
d && !
|
|
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);
|
|
523
762
|
};
|
|
524
|
-
for (
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
const d = [e], y =
|
|
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);
|
|
528
767
|
y && y !== e && d.push(y);
|
|
529
|
-
const
|
|
530
|
-
if (
|
|
531
|
-
|
|
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);
|
|
532
771
|
}
|
|
533
772
|
return {
|
|
534
|
-
scope: l
|
|
773
|
+
scope: u(l) ? l : s ?? n,
|
|
535
774
|
outsideForms: !0
|
|
536
775
|
};
|
|
537
776
|
}
|
|
538
|
-
function
|
|
777
|
+
function Ne(e, t, n) {
|
|
539
778
|
return e ? {
|
|
540
779
|
scope: e,
|
|
541
780
|
outsideForms: !1
|
|
542
|
-
} :
|
|
781
|
+
} : Un(t, n);
|
|
543
782
|
}
|
|
544
|
-
function
|
|
783
|
+
function Gn(e, t) {
|
|
545
784
|
let n = e.parentElement;
|
|
546
785
|
for (; n && n !== t.scope; ) {
|
|
547
|
-
if (
|
|
786
|
+
if (z(n, se).length === 1) return !0;
|
|
548
787
|
n = n.parentElement;
|
|
549
788
|
}
|
|
550
789
|
return !1;
|
|
551
790
|
}
|
|
552
|
-
function
|
|
553
|
-
const r = (
|
|
554
|
-
if (
|
|
555
|
-
const
|
|
556
|
-
const
|
|
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));
|
|
793
|
+
if (o.length === 0) return null;
|
|
794
|
+
const i = (s, a) => {
|
|
795
|
+
const c = r(s);
|
|
557
796
|
return [
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
797
|
+
Gn(s, e) ? 1 : 0,
|
|
798
|
+
re.test(oe(s)) ? 0 : 1,
|
|
799
|
+
s.getAttribute("type") === "submit" ? 0 : 1,
|
|
800
|
+
c ? 0 : 1,
|
|
801
|
+
c ? a : -a
|
|
563
802
|
];
|
|
564
803
|
};
|
|
565
|
-
let
|
|
566
|
-
return
|
|
567
|
-
const
|
|
568
|
-
for (let d = 0; d <
|
|
569
|
-
const y =
|
|
570
|
-
if (y !==
|
|
571
|
-
y <
|
|
804
|
+
let u = o[0], l = i(u, 0);
|
|
805
|
+
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);
|
|
572
811
|
return;
|
|
573
812
|
}
|
|
574
813
|
}
|
|
575
|
-
}),
|
|
814
|
+
}), u;
|
|
576
815
|
}
|
|
577
|
-
function
|
|
578
|
-
return e.querySelectorAll("form").length + (
|
|
816
|
+
function Ce(e) {
|
|
817
|
+
return e.querySelectorAll("form").length + (z(e, se).some((t) => !t.closest("form")) ? 1 : 0) === 1;
|
|
579
818
|
}
|
|
580
|
-
function
|
|
819
|
+
function Hn(e, t) {
|
|
581
820
|
if (e) {
|
|
582
821
|
const n = e.getAttribute("aria-label");
|
|
583
822
|
if (n) return n;
|
|
584
823
|
const r = e.getAttribute("aria-labelledby");
|
|
585
824
|
if (r) {
|
|
586
|
-
const
|
|
587
|
-
if (
|
|
825
|
+
const l = e.ownerDocument.getElementById(r);
|
|
826
|
+
if (l) return l.textContent ?? "";
|
|
588
827
|
}
|
|
589
|
-
const
|
|
590
|
-
if (
|
|
591
|
-
let
|
|
592
|
-
for (;
|
|
593
|
-
const
|
|
594
|
-
if (
|
|
595
|
-
const
|
|
596
|
-
return
|
|
828
|
+
const o = e.querySelector("h1, h2, h3, legend");
|
|
829
|
+
if (o) return o.textContent ?? "";
|
|
830
|
+
let i = e.previousElementSibling;
|
|
831
|
+
for (; i; ) {
|
|
832
|
+
const l = /^(h1|h2|h3|legend)$/i.test(i.tagName) ? i : i.querySelector("h1, h2, h3, legend");
|
|
833
|
+
if (l) {
|
|
834
|
+
const s = e.parentElement;
|
|
835
|
+
return s && Ce(s) ? l.textContent ?? "" : "";
|
|
597
836
|
}
|
|
598
|
-
|
|
837
|
+
i = i.previousElementSibling;
|
|
599
838
|
}
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
604
|
-
return
|
|
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 ?? "" : "";
|
|
605
844
|
}
|
|
606
845
|
return "";
|
|
607
846
|
}
|
|
608
847
|
return (t instanceof Document ? t.body : t)?.querySelector("h1, h2, h3")?.textContent ?? "";
|
|
609
848
|
}
|
|
610
|
-
function
|
|
611
|
-
const r =
|
|
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([
|
|
612
851
|
e?.id,
|
|
613
852
|
e?.getAttribute("name"),
|
|
614
853
|
e?.className,
|
|
615
|
-
|
|
854
|
+
i
|
|
616
855
|
].filter(Boolean).join(" "));
|
|
617
856
|
return {
|
|
618
|
-
positive:
|
|
619
|
-
negative:
|
|
857
|
+
positive: re.test(r) || re.test(o),
|
|
858
|
+
negative: ge.test(r) || ge.test(o) || kn.test(u)
|
|
620
859
|
};
|
|
621
860
|
}
|
|
622
|
-
function
|
|
623
|
-
const n =
|
|
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];
|
|
624
863
|
if (n) return n;
|
|
625
864
|
if (!t) return null;
|
|
626
|
-
const r =
|
|
865
|
+
const r = J(e, 'input[type="text"], input:not([type])').filter((o) => o.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
627
866
|
return r[r.length - 1] ?? null;
|
|
628
867
|
}
|
|
629
|
-
function
|
|
868
|
+
function fe(e, t) {
|
|
630
869
|
if (t.querySelector('input[autocomplete="new-password"]')) return null;
|
|
631
|
-
const n =
|
|
870
|
+
const n = z(t, ie);
|
|
632
871
|
if (n.length > 1) return null;
|
|
633
872
|
if (n.length === 1) {
|
|
634
|
-
const
|
|
635
|
-
if (!
|
|
636
|
-
const
|
|
637
|
-
return !(
|
|
873
|
+
const s = n[0], a = Ne(e, s, s);
|
|
874
|
+
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 : {
|
|
638
877
|
kind: "password",
|
|
639
878
|
form: e,
|
|
640
|
-
identifier:
|
|
641
|
-
password:
|
|
879
|
+
identifier: c,
|
|
880
|
+
password: s,
|
|
642
881
|
submit: d
|
|
643
882
|
};
|
|
644
883
|
}
|
|
645
|
-
const r =
|
|
884
|
+
const r = z(t, Ye);
|
|
646
885
|
if (r.length !== 1) return null;
|
|
647
|
-
const
|
|
648
|
-
if (!
|
|
649
|
-
const
|
|
650
|
-
return !(
|
|
886
|
+
const o = r[0], i = Ne(e, o, null);
|
|
887
|
+
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 : {
|
|
651
890
|
kind: "identifier",
|
|
652
891
|
form: e,
|
|
653
|
-
identifier:
|
|
892
|
+
identifier: o,
|
|
654
893
|
password: null,
|
|
655
|
-
submit:
|
|
894
|
+
submit: u
|
|
656
895
|
};
|
|
657
896
|
}
|
|
658
|
-
function
|
|
897
|
+
function Q(e = document) {
|
|
659
898
|
const t = Array.from(e.querySelectorAll("form"));
|
|
660
899
|
for (const n of t) {
|
|
661
|
-
const r =
|
|
900
|
+
const r = fe(n, n);
|
|
662
901
|
if (r) return r;
|
|
663
902
|
}
|
|
664
|
-
return t.length === 0 ||
|
|
903
|
+
return t.length === 0 || z(e, ie).find((n) => !n.closest("form")) ? fe(null, e) : null;
|
|
665
904
|
}
|
|
666
|
-
function
|
|
905
|
+
function Me(e, t) {
|
|
667
906
|
const n = Object.getPrototypeOf(e), r = Object.getOwnPropertyDescriptor(n, "value")?.set ?? Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
|
|
668
907
|
r ? r.call(e, t) : e.value = t, e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
669
908
|
}
|
|
670
|
-
function
|
|
909
|
+
function Wn(e) {
|
|
671
910
|
return !!e.form || !!e.submit;
|
|
672
911
|
}
|
|
673
|
-
function
|
|
912
|
+
function zn(e) {
|
|
674
913
|
const t = e.form, n = t?.noValidate;
|
|
675
914
|
t && (t.noValidate = !0);
|
|
676
915
|
try {
|
|
@@ -679,28 +918,28 @@ function Yt(e) {
|
|
|
679
918
|
t && (t.noValidate = n ?? !1);
|
|
680
919
|
}
|
|
681
920
|
}
|
|
682
|
-
var
|
|
921
|
+
var jn = {
|
|
683
922
|
identifier: null,
|
|
684
923
|
password: null
|
|
685
924
|
};
|
|
686
|
-
function
|
|
925
|
+
function De(e, t) {
|
|
687
926
|
return !e || e.disabled || e.readOnly ? !1 : e.value === "" || t !== null && e.value === t;
|
|
688
927
|
}
|
|
689
|
-
function
|
|
928
|
+
function Qe(e, t, n) {
|
|
690
929
|
return {
|
|
691
|
-
identifier:
|
|
692
|
-
password:
|
|
930
|
+
identifier: De(e.identifier, n.identifier) && !t.identifier,
|
|
931
|
+
password: De(e.password, n.password) && !t.password
|
|
693
932
|
};
|
|
694
933
|
}
|
|
695
|
-
function
|
|
934
|
+
function Vn(e, t, n) {
|
|
696
935
|
const r = e.identifier;
|
|
697
936
|
return !r || n.identifier ? !1 : r.value !== "" && r.value !== t.login;
|
|
698
937
|
}
|
|
699
|
-
function
|
|
700
|
-
const
|
|
701
|
-
return !
|
|
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" };
|
|
702
941
|
}
|
|
703
|
-
function
|
|
942
|
+
function Kn(e) {
|
|
704
943
|
if (typeof window > "u" || typeof MutationObserver > "u") return {
|
|
705
944
|
watch() {
|
|
706
945
|
},
|
|
@@ -717,390 +956,286 @@ function en(e) {
|
|
|
717
956
|
}, r = {
|
|
718
957
|
identifier: null,
|
|
719
958
|
password: null
|
|
720
|
-
},
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
},
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
959
|
+
}, o = !1, i = null, u = null, l = null, s = null, a = 0;
|
|
960
|
+
const c = () => {
|
|
961
|
+
l && clearTimeout(l), l = null;
|
|
962
|
+
}, d = () => {
|
|
963
|
+
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 = () => {
|
|
969
|
+
if (!a) return;
|
|
970
|
+
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) {
|
|
978
|
+
o = !1, r = {
|
|
729
979
|
identifier: null,
|
|
730
980
|
password: null
|
|
731
|
-
},
|
|
981
|
+
}, c();
|
|
732
982
|
return;
|
|
733
983
|
}
|
|
734
984
|
if (!t)
|
|
735
|
-
|
|
985
|
+
o || (o = !0, e.onDetected());
|
|
736
986
|
else {
|
|
737
|
-
const
|
|
738
|
-
if ("error" in
|
|
987
|
+
const C = Qe(A, n, r), O = Xn(A, t, n, r);
|
|
988
|
+
if ("error" in O || (C.identifier && (n = {
|
|
739
989
|
...n,
|
|
740
990
|
identifier: !0
|
|
741
991
|
}, r = {
|
|
742
992
|
...r,
|
|
743
993
|
identifier: t.login
|
|
744
|
-
}),
|
|
994
|
+
}), C.password && (n = {
|
|
745
995
|
...n,
|
|
746
996
|
password: !0
|
|
747
997
|
}, r = {
|
|
748
998
|
...r,
|
|
749
999
|
password: t.password
|
|
750
|
-
})), "error" in
|
|
751
|
-
const
|
|
752
|
-
|
|
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());
|
|
753
1003
|
} else
|
|
754
|
-
e.onFilled(
|
|
755
|
-
|
|
756
|
-
},
|
|
1004
|
+
e.onFilled(O.step), n.password && (t = null, c(), l = setTimeout(() => {
|
|
1005
|
+
l = null, Q(document) && (o = !0, e.onDetected());
|
|
1006
|
+
}, it));
|
|
757
1007
|
}
|
|
758
|
-
},
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
},
|
|
762
|
-
},
|
|
763
|
-
|
|
1008
|
+
}, R = () => {
|
|
1009
|
+
b(), u && clearTimeout(u), u = setTimeout(() => {
|
|
1010
|
+
u = null, _();
|
|
1011
|
+
}, Tn);
|
|
1012
|
+
}, S = () => {
|
|
1013
|
+
i || (i = new MutationObserver(R), i.observe(document.body, {
|
|
764
1014
|
childList: !0,
|
|
765
1015
|
subtree: !0,
|
|
766
1016
|
attributes: !0,
|
|
767
|
-
attributeFilter:
|
|
1017
|
+
attributeFilter: In
|
|
768
1018
|
}));
|
|
769
1019
|
};
|
|
770
1020
|
return {
|
|
771
1021
|
watch() {
|
|
772
|
-
|
|
1022
|
+
i || (o = !1, S()), _();
|
|
773
1023
|
},
|
|
774
|
-
fill(
|
|
775
|
-
t =
|
|
1024
|
+
fill(A) {
|
|
1025
|
+
d(), t = A, S(), _(), t && !n.identifier && !n.password && !Q(document) && (a = Date.now() + st, b());
|
|
776
1026
|
},
|
|
777
1027
|
cancel() {
|
|
778
1028
|
t = null, n = {
|
|
779
1029
|
identifier: !1,
|
|
780
1030
|
password: !1
|
|
781
|
-
},
|
|
1031
|
+
}, o = !1, w();
|
|
782
1032
|
},
|
|
783
1033
|
teardown() {
|
|
784
|
-
t = null,
|
|
1034
|
+
t = null, w();
|
|
785
1035
|
}
|
|
786
1036
|
};
|
|
787
1037
|
}
|
|
788
|
-
var
|
|
789
|
-
function
|
|
1038
|
+
var Yn = "leesto/navigation";
|
|
1039
|
+
function Zn(e) {
|
|
790
1040
|
const t = e?.timestamp;
|
|
791
1041
|
return typeof t == "number" ? t : void 0;
|
|
792
1042
|
}
|
|
793
|
-
function
|
|
1043
|
+
function Jn(e) {
|
|
794
1044
|
return e?.type === 4;
|
|
795
1045
|
}
|
|
796
|
-
function
|
|
1046
|
+
function Qn(e) {
|
|
797
1047
|
try {
|
|
798
1048
|
return JSON.stringify(e)?.length ?? 0;
|
|
799
1049
|
} catch {
|
|
800
1050
|
return 0;
|
|
801
1051
|
}
|
|
802
1052
|
}
|
|
803
|
-
function
|
|
804
|
-
const t = e.now ?? Date.now, n = e.measure ??
|
|
805
|
-
let r = [],
|
|
806
|
-
const
|
|
807
|
-
const
|
|
808
|
-
|
|
809
|
-
},
|
|
810
|
-
if (!
|
|
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 = () => {
|
|
1057
|
+
const a = r.shift();
|
|
1058
|
+
a && (o -= a.bytes);
|
|
1059
|
+
}, s = () => {
|
|
1060
|
+
if (!i) {
|
|
811
1061
|
const d = t() - e.windowMs;
|
|
812
|
-
for (; r.length > 1 && (r[1]?.start ?? Number.POSITIVE_INFINITY) <= d; )
|
|
1062
|
+
for (; r.length > 1 && (r[1]?.start ?? Number.POSITIVE_INFINITY) <= d; ) l();
|
|
813
1063
|
}
|
|
814
|
-
const
|
|
815
|
-
for (;
|
|
816
|
-
const
|
|
817
|
-
if (
|
|
1064
|
+
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) {
|
|
818
1068
|
const d = t();
|
|
819
|
-
d -
|
|
1069
|
+
d - u >= e.minCheckoutIntervalMs && (u = d, e.requestCheckout());
|
|
820
1070
|
}
|
|
821
1071
|
};
|
|
822
1072
|
return {
|
|
823
|
-
push(
|
|
824
|
-
const
|
|
825
|
-
if (
|
|
826
|
-
start:
|
|
827
|
-
events: [
|
|
828
|
-
bytes:
|
|
1073
|
+
push(a) {
|
|
1074
|
+
const c = n(a);
|
|
1075
|
+
if (Jn(a)) r.push({
|
|
1076
|
+
start: Zn(a) ?? t(),
|
|
1077
|
+
events: [a],
|
|
1078
|
+
bytes: c
|
|
829
1079
|
});
|
|
830
1080
|
else {
|
|
831
1081
|
const d = r[r.length - 1];
|
|
832
1082
|
if (!d) return;
|
|
833
|
-
d.events.push(
|
|
1083
|
+
d.events.push(a), d.bytes += c;
|
|
834
1084
|
}
|
|
835
|
-
|
|
1085
|
+
o += c, s();
|
|
836
1086
|
},
|
|
837
1087
|
snapshot() {
|
|
838
|
-
const
|
|
839
|
-
for (const
|
|
840
|
-
return
|
|
1088
|
+
const a = [];
|
|
1089
|
+
for (const c of r) for (const d of c.events) a.push(d);
|
|
1090
|
+
return a;
|
|
841
1091
|
},
|
|
842
1092
|
hold() {
|
|
843
|
-
|
|
1093
|
+
s(), i = !0;
|
|
844
1094
|
},
|
|
845
1095
|
release() {
|
|
846
|
-
|
|
1096
|
+
i = !1, s();
|
|
847
1097
|
},
|
|
848
1098
|
stats() {
|
|
849
|
-
let
|
|
850
|
-
for (const
|
|
1099
|
+
let a = 0;
|
|
1100
|
+
for (const c of r) a += c.events.length;
|
|
851
1101
|
return {
|
|
852
1102
|
segments: r.length,
|
|
853
|
-
events:
|
|
854
|
-
bytes:
|
|
855
|
-
held:
|
|
1103
|
+
events: a,
|
|
1104
|
+
bytes: o,
|
|
1105
|
+
held: i
|
|
856
1106
|
};
|
|
857
1107
|
},
|
|
858
1108
|
clear() {
|
|
859
|
-
r = [],
|
|
1109
|
+
r = [], o = 0;
|
|
860
1110
|
}
|
|
861
1111
|
};
|
|
862
1112
|
}
|
|
863
|
-
var
|
|
864
|
-
var Ve = 'input:not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select';
|
|
865
|
-
function je(e) {
|
|
866
|
-
return e.replace(/\S/g, "*");
|
|
867
|
-
}
|
|
868
|
-
function fn(e, t) {
|
|
869
|
-
try {
|
|
870
|
-
return e.closest(t);
|
|
871
|
-
} catch {
|
|
872
|
-
return null;
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
function ze(e) {
|
|
876
|
-
return fn(e, ln) !== null;
|
|
877
|
-
}
|
|
878
|
-
function We(e) {
|
|
879
|
-
if (!e || typeof e.closest != "function") return !1;
|
|
880
|
-
try {
|
|
881
|
-
if (ze(e) || e.matches(Ve)) return !1;
|
|
882
|
-
const t = e.closest(un);
|
|
883
|
-
return t ? (t.textContent ?? "").trim().length <= 80 : !1;
|
|
884
|
-
} catch {
|
|
885
|
-
return !1;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
var Ce = {
|
|
889
|
-
maskAllInputs: !0,
|
|
890
|
-
maskInputOptions: {
|
|
891
|
-
password: !0,
|
|
892
|
-
email: !0,
|
|
893
|
-
tel: !0,
|
|
894
|
-
text: !0
|
|
895
|
-
},
|
|
896
|
-
blockClass: an,
|
|
897
|
-
maskTextClass: Ue
|
|
898
|
-
};
|
|
899
|
-
function Xe(e) {
|
|
900
|
-
if (e === "inputs_only") return {
|
|
901
|
-
...Ce,
|
|
902
|
-
blockSelector: Te,
|
|
903
|
-
maskTextSelector: He
|
|
904
|
-
};
|
|
905
|
-
const t = {
|
|
906
|
-
...Ce,
|
|
907
|
-
blockSelector: `${Te}, ${cn}`,
|
|
908
|
-
maskTextSelector: "*"
|
|
909
|
-
};
|
|
910
|
-
return e === "labels_visible" ? {
|
|
911
|
-
...t,
|
|
912
|
-
maskTextFn: (n, r) => We(r) ? n : je(n)
|
|
913
|
-
} : t;
|
|
914
|
-
}
|
|
915
|
-
var Ie = /* @__PURE__ */ new Set([
|
|
916
|
-
"placeholder",
|
|
917
|
-
"title",
|
|
918
|
-
"alt",
|
|
919
|
-
"label",
|
|
920
|
-
"aria-label",
|
|
921
|
-
"aria-description",
|
|
922
|
-
"aria-placeholder",
|
|
923
|
-
"aria-roledescription",
|
|
924
|
-
"aria-valuetext"
|
|
925
|
-
]), dn = 2, pn = 3, hn = 4, mn = 0, gn = 2;
|
|
926
|
-
function yn(e, t, n) {
|
|
927
|
-
if (e) try {
|
|
928
|
-
return e.matches(Ve);
|
|
929
|
-
} catch {
|
|
930
|
-
return !0;
|
|
931
|
-
}
|
|
932
|
-
const r = t.toLowerCase();
|
|
933
|
-
if (r === "textarea" || r === "select") return !0;
|
|
934
|
-
if (r !== "input") return !1;
|
|
935
|
-
const s = String(n.type ?? "").toLowerCase();
|
|
936
|
-
return s !== "button" && s !== "submit" && s !== "reset";
|
|
937
|
-
}
|
|
938
|
-
function Ke(e, t, n) {
|
|
939
|
-
const r = e;
|
|
940
|
-
if (!r || typeof r != "object" || !r.data) return e;
|
|
941
|
-
const s = (c) => {
|
|
942
|
-
if (typeof c != "number") return null;
|
|
943
|
-
try {
|
|
944
|
-
const a = n(c);
|
|
945
|
-
return a && a.nodeType === 1 ? a : null;
|
|
946
|
-
} catch {
|
|
947
|
-
return null;
|
|
948
|
-
}
|
|
949
|
-
}, o = (c, a, d, y) => {
|
|
950
|
-
if (a === "value") {
|
|
951
|
-
if (yn(c, d, y)) return !1;
|
|
952
|
-
} else if (!Ie.has(a)) return !0;
|
|
953
|
-
return !c || ze(c) ? !1 : t === "inputs_only" ? !0 : t === "labels_visible" ? We(c) : !1;
|
|
954
|
-
}, l = (c, a, d) => {
|
|
955
|
-
if (d)
|
|
956
|
-
for (const y of Object.keys(d)) {
|
|
957
|
-
const g = d[y];
|
|
958
|
-
typeof g != "string" || !g || y !== "value" && !Ie.has(y) || o(c, y, a, d) || (d[y] = je(g));
|
|
959
|
-
}
|
|
960
|
-
}, u = (c) => {
|
|
961
|
-
const a = c ? [c] : [];
|
|
962
|
-
for (; a.length > 0; ) {
|
|
963
|
-
const d = a.pop();
|
|
964
|
-
d.type === gn && d.attributes && l(s(d.id), String(d.tagName ?? ""), d.attributes), Array.isArray(d.childNodes) && a.push(...d.childNodes);
|
|
965
|
-
}
|
|
966
|
-
}, i = r.data;
|
|
967
|
-
if (r.type === hn && typeof i.href == "string") i.href = ut(i.href);
|
|
968
|
-
else if (r.type === dn) u(i.node);
|
|
969
|
-
else if (r.type === pn && i.source === mn) {
|
|
970
|
-
for (const c of i.adds ?? []) u(c.node);
|
|
971
|
-
for (const c of i.attributes ?? []) {
|
|
972
|
-
const a = s(c.id);
|
|
973
|
-
l(a, a?.tagName ?? "", c.attributes);
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
return e;
|
|
977
|
-
}
|
|
978
|
-
var Ye = 6e5, Ze = 1e3, vn = {
|
|
1113
|
+
var et = 6e5, tt = 1e3, tr = {
|
|
979
1114
|
mousemove: 100,
|
|
980
1115
|
scroll: 150
|
|
981
|
-
},
|
|
1116
|
+
}, nr = {
|
|
982
1117
|
windowMs: 12e4,
|
|
983
1118
|
checkoutEveryNms: 6e4,
|
|
984
1119
|
maxBytes: 8388608,
|
|
985
1120
|
heldMaxBytes: 33554432,
|
|
986
1121
|
minCheckoutIntervalMs: 15e3,
|
|
987
|
-
sampling:
|
|
988
|
-
},
|
|
989
|
-
async function
|
|
990
|
-
const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = e.maskPolicy ?? "mask_all",
|
|
991
|
-
let
|
|
992
|
-
const
|
|
993
|
-
if (
|
|
994
|
-
const R =
|
|
995
|
-
|
|
996
|
-
},
|
|
1122
|
+
sampling: tr
|
|
1123
|
+
}, rr = 5;
|
|
1124
|
+
async function or(e) {
|
|
1125
|
+
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;
|
|
1127
|
+
const s = () => {
|
|
1128
|
+
if (i.length === 0) return;
|
|
1129
|
+
const R = i;
|
|
1130
|
+
i = [], e.onBatch(R);
|
|
1131
|
+
}, a = t({
|
|
997
1132
|
emit(R) {
|
|
998
|
-
|
|
1133
|
+
i.push(Ke(R, r, (S) => t.mirror.getNode(S)));
|
|
999
1134
|
},
|
|
1000
1135
|
...Xe(r)
|
|
1001
|
-
}),
|
|
1002
|
-
d?.setSink((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) => {
|
|
1003
1138
|
try {
|
|
1004
|
-
n(R,
|
|
1139
|
+
n(R, S);
|
|
1005
1140
|
} catch {
|
|
1006
1141
|
}
|
|
1007
1142
|
});
|
|
1008
|
-
const
|
|
1009
|
-
return
|
|
1010
|
-
|
|
1011
|
-
},
|
|
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: _ };
|
|
1012
1147
|
}
|
|
1013
|
-
async function
|
|
1148
|
+
async function ir(e) {
|
|
1014
1149
|
const { record: t, addCustomEvent: n } = await import("./chunks/rrweb-qwppqH_c.js"), r = {
|
|
1015
|
-
...
|
|
1150
|
+
...nr,
|
|
1016
1151
|
...e.config
|
|
1017
|
-
}, { diagnostics:
|
|
1018
|
-
let
|
|
1019
|
-
const
|
|
1152
|
+
}, { diagnostics: o } = e, i = e.maskPolicy ?? "mask_all";
|
|
1153
|
+
let u = !1, l = null, s = null;
|
|
1154
|
+
const a = () => {
|
|
1020
1155
|
try {
|
|
1021
1156
|
t.takeFullSnapshot(!0);
|
|
1022
1157
|
} catch {
|
|
1023
1158
|
}
|
|
1024
|
-
},
|
|
1159
|
+
}, c = er({
|
|
1025
1160
|
windowMs: r.windowMs,
|
|
1026
1161
|
maxBytes: r.maxBytes,
|
|
1027
1162
|
heldMaxBytes: r.heldMaxBytes,
|
|
1028
1163
|
minCheckoutIntervalMs: r.minCheckoutIntervalMs,
|
|
1029
1164
|
requestCheckout: () => queueMicrotask(() => {
|
|
1030
|
-
|
|
1165
|
+
u || a();
|
|
1031
1166
|
})
|
|
1032
1167
|
}), d = t({
|
|
1033
|
-
emit(
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1168
|
+
emit(b) {
|
|
1169
|
+
const w = Ke(b, i, (_) => t.mirror.getNode(_));
|
|
1170
|
+
c.push(w), l?.(w);
|
|
1036
1171
|
},
|
|
1037
1172
|
checkoutEveryNms: r.checkoutEveryNms,
|
|
1038
1173
|
sampling: r.sampling,
|
|
1039
|
-
...Xe(
|
|
1174
|
+
...Xe(i)
|
|
1040
1175
|
});
|
|
1041
1176
|
if (!d) return null;
|
|
1042
|
-
const y = (
|
|
1177
|
+
const y = (b, w) => {
|
|
1043
1178
|
try {
|
|
1044
|
-
n(
|
|
1179
|
+
n(b, w);
|
|
1045
1180
|
} catch {
|
|
1046
1181
|
}
|
|
1047
1182
|
};
|
|
1048
|
-
return
|
|
1183
|
+
return o.setSink(y), {
|
|
1049
1184
|
snapshot() {
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
type:
|
|
1185
|
+
const b = c.snapshot(), w = Date.now();
|
|
1186
|
+
o.setSink((R, S) => {
|
|
1187
|
+
b.push({
|
|
1188
|
+
type: rr,
|
|
1054
1189
|
data: {
|
|
1055
1190
|
tag: R,
|
|
1056
|
-
payload:
|
|
1191
|
+
payload: S
|
|
1057
1192
|
},
|
|
1058
|
-
timestamp:
|
|
1193
|
+
timestamp: w
|
|
1059
1194
|
});
|
|
1060
1195
|
});
|
|
1061
1196
|
try {
|
|
1062
|
-
|
|
1197
|
+
o.flushRings();
|
|
1063
1198
|
} finally {
|
|
1064
|
-
|
|
1199
|
+
o.setSink(u ? null : y);
|
|
1065
1200
|
}
|
|
1066
|
-
const
|
|
1201
|
+
const _ = b[0]?.timestamp;
|
|
1067
1202
|
return {
|
|
1068
|
-
events:
|
|
1069
|
-
durationMs: typeof
|
|
1203
|
+
events: b,
|
|
1204
|
+
durationMs: typeof _ == "number" ? Math.max(0, w - _) : 0
|
|
1070
1205
|
};
|
|
1071
1206
|
},
|
|
1072
|
-
hold: () =>
|
|
1073
|
-
release: () =>
|
|
1074
|
-
markNavigation(
|
|
1075
|
-
|
|
1207
|
+
hold: () => c.hold(),
|
|
1208
|
+
release: () => c.release(),
|
|
1209
|
+
markNavigation(b) {
|
|
1210
|
+
u || y(Yn, { href: W(b) });
|
|
1076
1211
|
},
|
|
1077
|
-
stats: () =>
|
|
1078
|
-
stream({ onBatch:
|
|
1079
|
-
|
|
1080
|
-
const
|
|
1081
|
-
let R = [],
|
|
1082
|
-
const
|
|
1212
|
+
stats: () => c.stats(),
|
|
1213
|
+
stream({ onBatch: b, onCap: w }) {
|
|
1214
|
+
s?.stop();
|
|
1215
|
+
const _ = Date.now();
|
|
1216
|
+
let R = [], S = !1, A = 0;
|
|
1217
|
+
const C = () => {
|
|
1083
1218
|
if (R.length === 0) return;
|
|
1084
|
-
const
|
|
1085
|
-
R = [],
|
|
1086
|
-
},
|
|
1087
|
-
R.push(
|
|
1219
|
+
const q = R;
|
|
1220
|
+
R = [], b(q);
|
|
1221
|
+
}, O = (q) => {
|
|
1222
|
+
R.push(q);
|
|
1088
1223
|
};
|
|
1089
|
-
|
|
1090
|
-
const
|
|
1091
|
-
return
|
|
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;
|
|
1092
1227
|
} };
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1095
|
-
},
|
|
1228
|
+
return D.timer = setTimeout(() => {
|
|
1229
|
+
F.stop(), w();
|
|
1230
|
+
}, et), s = F, F;
|
|
1096
1231
|
},
|
|
1097
1232
|
stop() {
|
|
1098
|
-
|
|
1233
|
+
u || (u = !0, s?.stop(), o.setSink(null), d(), c.clear());
|
|
1099
1234
|
}
|
|
1100
1235
|
};
|
|
1101
1236
|
}
|
|
1102
|
-
var
|
|
1103
|
-
function
|
|
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) {
|
|
1104
1239
|
try {
|
|
1105
1240
|
const t = new URL(e).hostname;
|
|
1106
1241
|
return t === "localhost" || t.endsWith(".localhost") || t === "127.0.0.1" || t === "[::1]";
|
|
@@ -1108,7 +1243,7 @@ function _n(e) {
|
|
|
1108
1243
|
return !1;
|
|
1109
1244
|
}
|
|
1110
1245
|
}
|
|
1111
|
-
function
|
|
1246
|
+
function cr(e) {
|
|
1112
1247
|
const t = e.trim();
|
|
1113
1248
|
if (!t) return null;
|
|
1114
1249
|
try {
|
|
@@ -1118,33 +1253,33 @@ function kn(e) {
|
|
|
1118
1253
|
return null;
|
|
1119
1254
|
}
|
|
1120
1255
|
}
|
|
1121
|
-
function
|
|
1122
|
-
const t = (e.explicit ?? []).map(
|
|
1256
|
+
function ur(e) {
|
|
1257
|
+
const t = (e.explicit ?? []).map(cr).filter((r) => r !== null);
|
|
1123
1258
|
if (t.length > 0) return [...new Set(t)];
|
|
1124
|
-
const n = [...
|
|
1125
|
-
return
|
|
1259
|
+
const n = [...sr];
|
|
1260
|
+
return lr(e.pageOrigin) && n.push(...ar), [...new Set(n)];
|
|
1126
1261
|
}
|
|
1127
|
-
function
|
|
1262
|
+
function de(e, t) {
|
|
1128
1263
|
return !e || e === "*" || e === "null" ? !1 : t.includes(e);
|
|
1129
1264
|
}
|
|
1130
|
-
function
|
|
1265
|
+
function ee() {
|
|
1131
1266
|
return typeof navigator < "u" && navigator.globalPrivacyControl === !0;
|
|
1132
1267
|
}
|
|
1133
|
-
function
|
|
1134
|
-
const t = (
|
|
1135
|
-
const
|
|
1136
|
-
return
|
|
1137
|
-
}, n = (
|
|
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) => {
|
|
1138
1273
|
if (!(typeof document > "u"))
|
|
1139
|
-
return t(document.querySelector(`meta[name="${
|
|
1140
|
-
}, r = typeof window < "u" ? window.__LEESTO_APP_BUILD__ : void 0,
|
|
1141
|
-
if (!(!
|
|
1274
|
+
return t(document.querySelector(`meta[name="${u}"]`)?.getAttribute("content"));
|
|
1275
|
+
}, 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
|
+
if (!(!o && !i))
|
|
1142
1277
|
return {
|
|
1143
|
-
...
|
|
1144
|
-
...
|
|
1278
|
+
...o ? { version: o } : {},
|
|
1279
|
+
...i ? { environment: i } : {}
|
|
1145
1280
|
};
|
|
1146
1281
|
}
|
|
1147
|
-
function
|
|
1282
|
+
function dr() {
|
|
1148
1283
|
if (typeof document > "u") return;
|
|
1149
1284
|
const e = document.querySelector('link[rel~="icon"], link[rel="shortcut icon"], link[rel="apple-touch-icon"]');
|
|
1150
1285
|
if (e?.href)
|
|
@@ -1154,43 +1289,59 @@ function Tn() {
|
|
|
1154
1289
|
return;
|
|
1155
1290
|
}
|
|
1156
1291
|
}
|
|
1157
|
-
function
|
|
1292
|
+
function pr() {
|
|
1158
1293
|
const e = (r) => !!r && r !== "transparent" && !/^rgba\(\s*0,\s*0,\s*0,\s*0\s*\)$/.test(r), t = getComputedStyle(document.body).backgroundColor;
|
|
1159
1294
|
if (e(t)) return t;
|
|
1160
1295
|
const n = getComputedStyle(document.documentElement).backgroundColor;
|
|
1161
1296
|
return e(n) ? n : "#ffffff";
|
|
1162
1297
|
}
|
|
1163
|
-
async function
|
|
1298
|
+
async function $e(e) {
|
|
1164
1299
|
const { domToPng: t } = await import("./chunks/dist-BTlWkbvW.js");
|
|
1165
1300
|
if (e) {
|
|
1166
1301
|
const l = document.querySelector(e);
|
|
1167
1302
|
if (!l) throw new Error("element_not_found");
|
|
1168
1303
|
return t(l, { quality: 0.92 });
|
|
1169
1304
|
}
|
|
1170
|
-
const n = document.documentElement, r = window.scrollX,
|
|
1171
|
-
for (const l of n.querySelectorAll("*")) {
|
|
1172
|
-
const u = getComputedStyle(l).position;
|
|
1173
|
-
if (u === "fixed" || u === "sticky") {
|
|
1174
|
-
const i = l.style.transform;
|
|
1175
|
-
o.push([l, i]), l.style.transform = `translate(${r}px, ${s}px)${i ? ` ${i}` : ""}`;
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1305
|
+
const n = document.documentElement, r = window.scrollX, o = window.scrollY, i = [], u = [];
|
|
1178
1306
|
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, {
|
|
1312
|
+
position: "fixed",
|
|
1313
|
+
left: `${s.x}px`,
|
|
1314
|
+
top: `${s.y}px`,
|
|
1315
|
+
width: `${s.width}px`,
|
|
1316
|
+
height: `${s.height}px`,
|
|
1317
|
+
background: "#a1a1aa",
|
|
1318
|
+
zIndex: "2147483647",
|
|
1319
|
+
pointerEvents: "none"
|
|
1320
|
+
}), n.append(a), i.push(a);
|
|
1321
|
+
}
|
|
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}` : ""}`;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1179
1329
|
return await t(n, {
|
|
1180
1330
|
quality: 0.92,
|
|
1181
|
-
backgroundColor:
|
|
1331
|
+
backgroundColor: pr(),
|
|
1182
1332
|
width: n.clientWidth,
|
|
1183
1333
|
height: n.clientHeight,
|
|
1184
1334
|
style: {
|
|
1185
|
-
transform: `translate(${-r}px, ${-
|
|
1335
|
+
transform: `translate(${-r}px, ${-o}px)`,
|
|
1186
1336
|
transformOrigin: "top left"
|
|
1187
1337
|
}
|
|
1188
1338
|
});
|
|
1189
1339
|
} finally {
|
|
1190
|
-
for (const
|
|
1340
|
+
for (const l of i) l.remove();
|
|
1341
|
+
for (const [l, s] of u) l.style.transform = s;
|
|
1191
1342
|
}
|
|
1192
1343
|
}
|
|
1193
|
-
function
|
|
1344
|
+
function hr(e) {
|
|
1194
1345
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
1195
1346
|
const t = [];
|
|
1196
1347
|
let n = e;
|
|
@@ -1200,73 +1351,75 @@ function In(e) {
|
|
|
1200
1351
|
break;
|
|
1201
1352
|
}
|
|
1202
1353
|
let r = n.tagName.toLowerCase();
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1206
|
-
if (
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1354
|
+
const o = typeof n.className == "string" ? n.className.trim().split(/\s+/).filter(Boolean)[0] : null;
|
|
1355
|
+
o && (r += `.${CSS.escape(o)}`);
|
|
1356
|
+
const i = n.parentElement;
|
|
1357
|
+
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})`);
|
|
1209
1360
|
}
|
|
1210
|
-
t.unshift(r), n =
|
|
1361
|
+
t.unshift(r), n = i;
|
|
1211
1362
|
}
|
|
1212
1363
|
return t.join(" > ");
|
|
1213
1364
|
}
|
|
1214
|
-
function
|
|
1215
|
-
const t = e.tagName.toLowerCase()
|
|
1365
|
+
function mr(e) {
|
|
1366
|
+
const t = e.tagName.toLowerCase();
|
|
1367
|
+
if (Y(e)) return t;
|
|
1368
|
+
const n = (e.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 40);
|
|
1216
1369
|
return n ? `${t} · ${n}` : t;
|
|
1217
1370
|
}
|
|
1218
|
-
var
|
|
1219
|
-
function
|
|
1371
|
+
var nt = "leesto:shell-origin";
|
|
1372
|
+
function gr() {
|
|
1220
1373
|
try {
|
|
1221
|
-
return sessionStorage.getItem(
|
|
1374
|
+
return sessionStorage.getItem(nt);
|
|
1222
1375
|
} catch {
|
|
1223
1376
|
return null;
|
|
1224
1377
|
}
|
|
1225
1378
|
}
|
|
1226
|
-
function
|
|
1379
|
+
function yr(e) {
|
|
1227
1380
|
try {
|
|
1228
|
-
sessionStorage.setItem(
|
|
1381
|
+
sessionStorage.setItem(nt, e);
|
|
1229
1382
|
} catch {
|
|
1230
1383
|
}
|
|
1231
1384
|
}
|
|
1232
|
-
function
|
|
1385
|
+
function vr() {
|
|
1233
1386
|
try {
|
|
1234
1387
|
return typeof window.name == "string" ? window.name : "";
|
|
1235
1388
|
} catch {
|
|
1236
1389
|
return "";
|
|
1237
1390
|
}
|
|
1238
1391
|
}
|
|
1239
|
-
function
|
|
1392
|
+
function Fe(e = {}) {
|
|
1240
1393
|
if (typeof window > "u" || window.parent === window) return () => {
|
|
1241
1394
|
};
|
|
1242
|
-
const t = window.parent, n = e.highlightColor ??
|
|
1395
|
+
const t = window.parent, n = e.highlightColor ?? Rt.light.primary, r = ur({
|
|
1243
1396
|
explicit: e.shellOrigins,
|
|
1244
1397
|
pageOrigin: location.origin
|
|
1245
1398
|
});
|
|
1246
|
-
let
|
|
1399
|
+
let o = null;
|
|
1247
1400
|
try {
|
|
1248
1401
|
const h = document.referrer ? new URL(document.referrer).origin : "";
|
|
1249
|
-
|
|
1402
|
+
de(h, r) && (o = h);
|
|
1250
1403
|
} catch {
|
|
1251
1404
|
}
|
|
1252
|
-
if (!
|
|
1253
|
-
const h =
|
|
1254
|
-
h &&
|
|
1405
|
+
if (!o) {
|
|
1406
|
+
const h = gr();
|
|
1407
|
+
h && de(h, r) && (o = h);
|
|
1255
1408
|
}
|
|
1256
|
-
const
|
|
1257
|
-
if (
|
|
1258
|
-
t.postMessage(h,
|
|
1409
|
+
const i = (h) => {
|
|
1410
|
+
if (o) {
|
|
1411
|
+
t.postMessage(h, o);
|
|
1259
1412
|
return;
|
|
1260
1413
|
}
|
|
1261
1414
|
for (const v of r) t.postMessage(h, v);
|
|
1262
1415
|
};
|
|
1263
|
-
let
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1416
|
+
let u = null, l = "";
|
|
1417
|
+
const s = () => {
|
|
1418
|
+
u && (u.style.outline = l), u = null;
|
|
1266
1419
|
};
|
|
1267
|
-
let
|
|
1268
|
-
const
|
|
1269
|
-
|
|
1420
|
+
let a = null;
|
|
1421
|
+
const c = () => {
|
|
1422
|
+
a?.(), s(), document.querySelector("[data-leesto-picker-outline]")?.remove();
|
|
1270
1423
|
const h = document.createElement("div");
|
|
1271
1424
|
h.dataset.leestoPickerOutline = "", h.setAttribute("aria-hidden", "true"), Object.assign(h.style, {
|
|
1272
1425
|
position: "fixed",
|
|
@@ -1277,176 +1430,196 @@ function Me(e = {}) {
|
|
|
1277
1430
|
borderRadius: "4px",
|
|
1278
1431
|
display: "none"
|
|
1279
1432
|
}), document.documentElement.append(h);
|
|
1280
|
-
let v = null,
|
|
1281
|
-
const j = document.body.style.cursor,
|
|
1282
|
-
const
|
|
1283
|
-
if (!
|
|
1284
|
-
const
|
|
1285
|
-
|
|
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({
|
|
1286
1439
|
type: "leesto:element-picked",
|
|
1287
|
-
selector:
|
|
1288
|
-
label:
|
|
1440
|
+
selector: hr(k),
|
|
1441
|
+
label: mr(k),
|
|
1289
1442
|
rect: {
|
|
1290
|
-
x:
|
|
1291
|
-
y:
|
|
1292
|
-
width:
|
|
1293
|
-
height:
|
|
1294
|
-
}
|
|
1443
|
+
x: x.x,
|
|
1444
|
+
y: x.y,
|
|
1445
|
+
width: x.width,
|
|
1446
|
+
height: x.height
|
|
1447
|
+
},
|
|
1448
|
+
...P ? { point: {
|
|
1449
|
+
x: x.x + P.x,
|
|
1450
|
+
y: x.y + P.y
|
|
1451
|
+
} } : {},
|
|
1452
|
+
viewport: {
|
|
1453
|
+
width: document.documentElement.clientWidth,
|
|
1454
|
+
height: document.documentElement.clientHeight
|
|
1455
|
+
},
|
|
1456
|
+
context: vn(k)
|
|
1295
1457
|
}) : Object.assign(h.style, {
|
|
1296
1458
|
display: "block",
|
|
1297
|
-
left: `${
|
|
1298
|
-
top: `${
|
|
1299
|
-
width: `${
|
|
1300
|
-
height: `${
|
|
1459
|
+
left: `${x.x}px`,
|
|
1460
|
+
top: `${x.y}px`,
|
|
1461
|
+
width: `${x.width}px`,
|
|
1462
|
+
height: `${x.height}px`
|
|
1301
1463
|
});
|
|
1302
|
-
},
|
|
1303
|
-
v =
|
|
1304
|
-
},
|
|
1305
|
-
h.remove(), document.removeEventListener("mousemove",
|
|
1306
|
-
},
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
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
|
|
1474
|
+
};
|
|
1475
|
+
}
|
|
1476
|
+
_e(), N();
|
|
1477
|
+
}, Ae = (k) => {
|
|
1478
|
+
k.key === "Escape" && (a?.(), i({ type: "leesto:pick-cancelled" }));
|
|
1310
1479
|
};
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
}, document.body.style.cursor = "crosshair", document.addEventListener("mousemove",
|
|
1314
|
-
}, d =
|
|
1480
|
+
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({
|
|
1315
1484
|
captureNetwork: e.captureNetwork !== !1,
|
|
1316
|
-
runId:
|
|
1485
|
+
runId: w,
|
|
1317
1486
|
runIdOrigins: e.runIdOrigins
|
|
1318
1487
|
}) : null;
|
|
1319
1488
|
let R = !1;
|
|
1320
|
-
const
|
|
1321
|
-
diagnostics:
|
|
1322
|
-
maskPolicy:
|
|
1489
|
+
const S = _ ? ir({
|
|
1490
|
+
diagnostics: _,
|
|
1491
|
+
maskPolicy: b
|
|
1323
1492
|
}).then((h) => h && R ? (h.stop(), null) : h).catch(() => null) : null;
|
|
1324
|
-
let
|
|
1325
|
-
const
|
|
1326
|
-
if (
|
|
1327
|
-
const h =
|
|
1328
|
-
|
|
1493
|
+
let A = null, C = !1, O = !1;
|
|
1494
|
+
const M = () => {
|
|
1495
|
+
if (A) {
|
|
1496
|
+
const h = A.stop();
|
|
1497
|
+
A = null, i({
|
|
1329
1498
|
type: "leesto:rec-stopped",
|
|
1330
1499
|
durationMs: h
|
|
1331
1500
|
});
|
|
1332
|
-
} else
|
|
1333
|
-
},
|
|
1334
|
-
onDetected: () =>
|
|
1335
|
-
onFilled: (h) =>
|
|
1501
|
+
} else C && (O = !0);
|
|
1502
|
+
}, D = Kn({
|
|
1503
|
+
onDetected: () => i({ type: "leesto:login-form-detected" }),
|
|
1504
|
+
onFilled: (h) => i({
|
|
1336
1505
|
type: "leesto:login-filled",
|
|
1337
1506
|
step: h
|
|
1338
1507
|
}),
|
|
1339
|
-
onError: (h) =>
|
|
1508
|
+
onError: (h) => i({
|
|
1340
1509
|
type: "leesto:login-error",
|
|
1341
1510
|
reason: h
|
|
1511
|
+
}),
|
|
1512
|
+
onNoForm: (h) => i({
|
|
1513
|
+
type: "leesto:login-no-form",
|
|
1514
|
+
signedIn: h
|
|
1342
1515
|
})
|
|
1343
|
-
}),
|
|
1344
|
-
window.addEventListener("pagehide",
|
|
1345
|
-
const
|
|
1346
|
-
let
|
|
1347
|
-
const
|
|
1348
|
-
let
|
|
1349
|
-
const
|
|
1350
|
-
|
|
1351
|
-
const h =
|
|
1352
|
-
|
|
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();
|
|
1525
|
+
i({
|
|
1353
1526
|
type: "leesto:ready",
|
|
1354
1527
|
url: location.href,
|
|
1355
1528
|
bridgeVersion: 1,
|
|
1356
1529
|
capabilities: [
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
...
|
|
1530
|
+
rt,
|
|
1531
|
+
...$ ? ["navigation", "navigation-forward"] : [],
|
|
1532
|
+
...S ? [ot] : []
|
|
1360
1533
|
],
|
|
1361
|
-
canGoBack:
|
|
1362
|
-
canGoForward:
|
|
1534
|
+
canGoBack: E,
|
|
1535
|
+
canGoForward: m,
|
|
1363
1536
|
...h ? { favicon: h } : {},
|
|
1364
|
-
|
|
1365
|
-
...
|
|
1366
|
-
...
|
|
1537
|
+
...q ? { build: q } : {},
|
|
1538
|
+
...w ? { diagnosticRunId: w } : {},
|
|
1539
|
+
...ee() ? { gpc: !0 } : {}
|
|
1367
1540
|
});
|
|
1368
|
-
},
|
|
1369
|
-
if (h.source !== t || !
|
|
1370
|
-
|
|
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));
|
|
1371
1544
|
const v = h.data;
|
|
1372
1545
|
if (v.type === "leesto:ping")
|
|
1373
|
-
|
|
1546
|
+
i({ type: "leesto:pong" }), B();
|
|
1374
1547
|
else if (v.type === "leesto:navigate-back" || v.type === "leesto:navigate-forward") {
|
|
1375
|
-
const
|
|
1376
|
-
if (
|
|
1377
|
-
|
|
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(() => {
|
|
1378
1551
|
}).finally(() => {
|
|
1379
|
-
|
|
1552
|
+
U = !1, R || T();
|
|
1380
1553
|
});
|
|
1381
1554
|
} else if (v.type === "leesto:highlight") {
|
|
1382
|
-
if (
|
|
1383
|
-
let
|
|
1555
|
+
if (s(), v.selector) {
|
|
1556
|
+
let g = null;
|
|
1384
1557
|
try {
|
|
1385
|
-
|
|
1558
|
+
g = document.querySelector(v.selector);
|
|
1386
1559
|
} catch {
|
|
1387
|
-
|
|
1560
|
+
g = null;
|
|
1388
1561
|
}
|
|
1389
|
-
|
|
1562
|
+
g && (u = g, l = g.style.outline, g.style.outline = `2px solid ${n}`, g.style.outlineOffset = "2px", g.scrollIntoView({
|
|
1390
1563
|
block: "center",
|
|
1391
1564
|
behavior: "smooth"
|
|
1392
1565
|
}));
|
|
1393
1566
|
}
|
|
1394
|
-
} else if (v.type === "leesto:pick-start")
|
|
1395
|
-
else if (v.type === "leesto:pick-stop")
|
|
1396
|
-
else if (v.type === "leesto:capture-request") (v.selector ?
|
|
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({
|
|
1397
1570
|
type: "leesto:screenshot",
|
|
1398
|
-
dataUrl:
|
|
1571
|
+
dataUrl: g,
|
|
1399
1572
|
...v.selector ? { selector: v.selector } : {}
|
|
1400
|
-
})).catch((
|
|
1573
|
+
})).catch((g) => i({
|
|
1401
1574
|
type: "leesto:capture-failed",
|
|
1402
|
-
reason:
|
|
1575
|
+
reason: g instanceof Error ? g.message : "capture_error"
|
|
1403
1576
|
}));
|
|
1404
1577
|
else if (v.type === "leesto:rec-start") {
|
|
1405
|
-
if (
|
|
1406
|
-
if (
|
|
1407
|
-
|
|
1578
|
+
if (A || C) return;
|
|
1579
|
+
if (ee()) {
|
|
1580
|
+
i({
|
|
1408
1581
|
type: "leesto:rec-blocked",
|
|
1409
1582
|
reason: "gpc"
|
|
1410
1583
|
});
|
|
1411
1584
|
return;
|
|
1412
1585
|
}
|
|
1413
|
-
|
|
1414
|
-
const
|
|
1586
|
+
C = !0, O = !1;
|
|
1587
|
+
const g = (N) => i({
|
|
1415
1588
|
type: "leesto:rec-batch",
|
|
1416
|
-
events:
|
|
1417
|
-
}),
|
|
1418
|
-
onBatch:
|
|
1419
|
-
onCap:
|
|
1589
|
+
events: N
|
|
1590
|
+
}), P = () => M(), j = () => or({
|
|
1591
|
+
onBatch: g,
|
|
1592
|
+
onCap: P,
|
|
1420
1593
|
captureNetwork: e.captureNetwork,
|
|
1421
|
-
maskPolicy:
|
|
1422
|
-
diagnostics:
|
|
1594
|
+
maskPolicy: b,
|
|
1595
|
+
diagnostics: _
|
|
1423
1596
|
});
|
|
1424
|
-
(
|
|
1425
|
-
onBatch:
|
|
1426
|
-
onCap:
|
|
1427
|
-
}) :
|
|
1428
|
-
|
|
1429
|
-
}).catch((
|
|
1430
|
-
|
|
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({
|
|
1431
1604
|
type: "leesto:rec-error",
|
|
1432
|
-
reason:
|
|
1605
|
+
reason: N instanceof Error ? N.message : "rec_error"
|
|
1433
1606
|
});
|
|
1434
1607
|
});
|
|
1435
|
-
} else if (v.type === "leesto:rec-stop")
|
|
1608
|
+
} else if (v.type === "leesto:rec-stop") M();
|
|
1436
1609
|
else if (v.type === "leesto:rec-buffer-request") {
|
|
1437
|
-
if (!
|
|
1438
|
-
|
|
1610
|
+
if (!S) {
|
|
1611
|
+
i({
|
|
1439
1612
|
type: "leesto:rec-buffer",
|
|
1440
1613
|
events: [],
|
|
1441
1614
|
durationMs: 0,
|
|
1442
|
-
unavailable:
|
|
1615
|
+
unavailable: ee() ? "gpc" : "not-armed"
|
|
1443
1616
|
});
|
|
1444
1617
|
return;
|
|
1445
1618
|
}
|
|
1446
|
-
|
|
1619
|
+
S.then((g) => {
|
|
1447
1620
|
if (R) return;
|
|
1448
|
-
if (!
|
|
1449
|
-
|
|
1621
|
+
if (!g) {
|
|
1622
|
+
i({
|
|
1450
1623
|
type: "leesto:rec-buffer",
|
|
1451
1624
|
events: [],
|
|
1452
1625
|
durationMs: 0,
|
|
@@ -1454,62 +1627,62 @@ function Me(e = {}) {
|
|
|
1454
1627
|
});
|
|
1455
1628
|
return;
|
|
1456
1629
|
}
|
|
1457
|
-
const { events:
|
|
1458
|
-
|
|
1630
|
+
const { events: P, durationMs: j } = g.snapshot();
|
|
1631
|
+
i({
|
|
1459
1632
|
type: "leesto:rec-buffer",
|
|
1460
|
-
events:
|
|
1461
|
-
durationMs:
|
|
1633
|
+
events: P,
|
|
1634
|
+
durationMs: j
|
|
1462
1635
|
});
|
|
1463
1636
|
});
|
|
1464
|
-
} else v.type === "leesto:rec-buffer-hold" ?
|
|
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({
|
|
1465
1638
|
type: "leesto:diagnostics",
|
|
1466
|
-
snapshot:
|
|
1639
|
+
snapshot: _?.snapshot() ?? {
|
|
1467
1640
|
errors: [],
|
|
1468
1641
|
logs: [],
|
|
1469
1642
|
network: []
|
|
1470
1643
|
}
|
|
1471
|
-
}) : v.type === "leesto:login-watch" ?
|
|
1644
|
+
}) : v.type === "leesto:login-watch" ? D.watch() : v.type === "leesto:login-fill" ? D.fill({
|
|
1472
1645
|
login: v.login,
|
|
1473
1646
|
password: v.password
|
|
1474
|
-
}) : v.type === "leesto:login-cancel" &&
|
|
1647
|
+
}) : v.type === "leesto:login-cancel" && D.cancel();
|
|
1475
1648
|
};
|
|
1476
|
-
window.addEventListener("message",
|
|
1477
|
-
const
|
|
1478
|
-
if (!(location.href ===
|
|
1479
|
-
if (location.href !==
|
|
1649
|
+
window.addEventListener("message", L), B();
|
|
1650
|
+
const T = (h) => {
|
|
1651
|
+
if (!(location.href === I && f() === E && p() === m)) {
|
|
1652
|
+
if (location.href !== I) {
|
|
1480
1653
|
const v = location.href;
|
|
1481
|
-
|
|
1654
|
+
S?.then((g) => g?.markNavigation(v));
|
|
1482
1655
|
}
|
|
1483
|
-
|
|
1656
|
+
I = location.href, E = f(), m = p(), i({
|
|
1484
1657
|
type: "leesto:location",
|
|
1485
1658
|
url: location.href,
|
|
1486
|
-
canGoBack:
|
|
1487
|
-
canGoForward:
|
|
1659
|
+
canGoBack: E,
|
|
1660
|
+
canGoForward: m,
|
|
1488
1661
|
navigationType: typeof h == "string" ? h : "traverse"
|
|
1489
1662
|
});
|
|
1490
1663
|
}
|
|
1491
|
-
},
|
|
1492
|
-
|
|
1493
|
-
},
|
|
1494
|
-
|
|
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");
|
|
1495
1668
|
};
|
|
1496
|
-
return history.pushState =
|
|
1497
|
-
R = !0,
|
|
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);
|
|
1498
1671
|
};
|
|
1499
1672
|
}
|
|
1500
|
-
function
|
|
1673
|
+
function br() {
|
|
1501
1674
|
return typeof document > "u" ? null : document.currentScript ?? document.querySelector("script[data-leesto-connect]");
|
|
1502
1675
|
}
|
|
1503
|
-
function
|
|
1676
|
+
function wr(e) {
|
|
1504
1677
|
const t = {}, n = e?.dataset.highlightColor;
|
|
1505
1678
|
n && (t.highlightColor = n);
|
|
1506
|
-
const r = (e?.dataset.shellOrigin ?? "").split(",").map((
|
|
1679
|
+
const r = (e?.dataset.shellOrigin ?? "").split(",").map((o) => o.trim()).filter(Boolean);
|
|
1507
1680
|
return r.length > 0 && (t.shellOrigins = r), t;
|
|
1508
1681
|
}
|
|
1509
1682
|
if (typeof window < "u") {
|
|
1510
|
-
window.LeestoConnect = { connect: (t) =>
|
|
1511
|
-
const e =
|
|
1512
|
-
(!e || e.dataset.leestoManual === void 0) &&
|
|
1683
|
+
window.LeestoConnect = { connect: (t) => Fe(t) };
|
|
1684
|
+
const e = br();
|
|
1685
|
+
(!e || e.dataset.leestoManual === void 0) && Fe(wr(e));
|
|
1513
1686
|
}
|
|
1514
1687
|
|
|
1515
1688
|
//# sourceMappingURL=leesto-connect.js.map
|