@appsurify-testmap/rrweb-record 3.6.0-alpha.1 → 3.11.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb-record.cjs +703 -440
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +703 -440
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +733 -440
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +34 -34
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +4 -4
|
@@ -815,7 +815,7 @@ try {
|
|
|
815
815
|
}
|
|
816
816
|
} catch (error) {
|
|
817
817
|
}
|
|
818
|
-
const
|
|
818
|
+
const z$1 = {
|
|
819
819
|
ANCHOR: 0.4,
|
|
820
820
|
PATH: 0.3,
|
|
821
821
|
TARGET: 0.2,
|
|
@@ -831,10 +831,10 @@ const I$1 = {
|
|
|
831
831
|
DEPTH_PENALTY_FACTOR: 0.05,
|
|
832
832
|
DEGRADED_SCORE: 0.3
|
|
833
833
|
};
|
|
834
|
-
const
|
|
834
|
+
const bt$1 = {
|
|
835
835
|
MIN_CONFIDENCE_FOR_SKIP: 0.7
|
|
836
836
|
};
|
|
837
|
-
const
|
|
837
|
+
const tt$1 = [
|
|
838
838
|
"form",
|
|
839
839
|
"main",
|
|
840
840
|
"nav",
|
|
@@ -843,7 +843,7 @@ const K$1 = [
|
|
|
843
843
|
"footer",
|
|
844
844
|
"header"
|
|
845
845
|
];
|
|
846
|
-
const
|
|
846
|
+
const et$1 = [
|
|
847
847
|
"form",
|
|
848
848
|
"navigation",
|
|
849
849
|
"main",
|
|
@@ -853,7 +853,7 @@ const J$1 = [
|
|
|
853
853
|
"banner",
|
|
854
854
|
"search"
|
|
855
855
|
];
|
|
856
|
-
const
|
|
856
|
+
const St$1 = [
|
|
857
857
|
// HTML5 Semantic
|
|
858
858
|
"article",
|
|
859
859
|
"aside",
|
|
@@ -959,7 +959,7 @@ const w$1 = {
|
|
|
959
959
|
// Any aria-* attribute (if not above)
|
|
960
960
|
"aria-*": 25
|
|
961
961
|
};
|
|
962
|
-
const
|
|
962
|
+
const Y$1 = /* @__PURE__ */ new Set([
|
|
963
963
|
"id",
|
|
964
964
|
// handled separately
|
|
965
965
|
"class",
|
|
@@ -972,7 +972,7 @@ const V$1 = /* @__PURE__ */ new Set([
|
|
|
972
972
|
// can change
|
|
973
973
|
"contenteditable"
|
|
974
974
|
]);
|
|
975
|
-
const
|
|
975
|
+
const At$1 = {
|
|
976
976
|
maxPathDepth: 10,
|
|
977
977
|
enableSvgFingerprint: true,
|
|
978
978
|
confidenceThreshold: 0,
|
|
@@ -980,7 +980,7 @@ const bt$1 = {
|
|
|
980
980
|
includeUtilityClasses: false,
|
|
981
981
|
source: "dom-dsl"
|
|
982
982
|
};
|
|
983
|
-
function
|
|
983
|
+
function L$1(r2) {
|
|
984
984
|
if (/^[a-z]+-\d+$/i.test(r2) || /^[a-z]+(-[a-z]+)+-\d+$/i.test(r2) || /^[a-z]+(_[a-z]+)*_\d+$/i.test(r2) || /^\d+$/.test(r2) || /^:[a-z0-9]+:$/i.test(r2) || /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r2))
|
|
985
985
|
return true;
|
|
986
986
|
if (/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r2)) {
|
|
@@ -990,7 +990,7 @@ function P$1(r2) {
|
|
|
990
990
|
}
|
|
991
991
|
return !!(/^radix-/.test(r2) || /^mui-\d+$/.test(r2));
|
|
992
992
|
}
|
|
993
|
-
const
|
|
993
|
+
const Z$1 = /* @__PURE__ */ new Set([
|
|
994
994
|
"aria-labelledby",
|
|
995
995
|
"aria-describedby",
|
|
996
996
|
"aria-controls",
|
|
@@ -1004,10 +1004,10 @@ const Q$1 = /* @__PURE__ */ new Set([
|
|
|
1004
1004
|
"aria-errormessage",
|
|
1005
1005
|
"aria-flowto"
|
|
1006
1006
|
]);
|
|
1007
|
-
function
|
|
1008
|
-
return r2.trim().split(/\s+/).some((e2) =>
|
|
1007
|
+
function K$1(r2) {
|
|
1008
|
+
return r2.trim().split(/\s+/).some((e2) => L$1(e2));
|
|
1009
1009
|
}
|
|
1010
|
-
let
|
|
1010
|
+
let Ct$1 = class Ct {
|
|
1011
1011
|
constructor(t2, e2) {
|
|
1012
1012
|
var _a2;
|
|
1013
1013
|
this.maxDepth = (_a2 = t2.maxPathDepth) != null ? _a2 : 10, this.cache = e2;
|
|
@@ -1041,25 +1041,25 @@ let St$1 = class St {
|
|
|
1041
1041
|
if (e2 === "head" || this.isInsideHead(t2)) {
|
|
1042
1042
|
const c2 = s2 == null ? void 0 : s2.documentElement;
|
|
1043
1043
|
if (c2) {
|
|
1044
|
-
const
|
|
1044
|
+
const l2 = {
|
|
1045
1045
|
element: c2,
|
|
1046
1046
|
score: 1,
|
|
1047
1047
|
tier: "A",
|
|
1048
1048
|
depth: 0
|
|
1049
1049
|
};
|
|
1050
|
-
return this.cacheResult(t2,
|
|
1050
|
+
return this.cacheResult(t2, l2), l2;
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
1053
|
if (e2 === "body") {
|
|
1054
1054
|
const c2 = s2 == null ? void 0 : s2.documentElement;
|
|
1055
1055
|
if (c2) {
|
|
1056
|
-
const
|
|
1056
|
+
const l2 = {
|
|
1057
1057
|
element: c2,
|
|
1058
1058
|
score: 1,
|
|
1059
1059
|
tier: "A",
|
|
1060
1060
|
depth: 0
|
|
1061
1061
|
};
|
|
1062
|
-
return this.cacheResult(t2,
|
|
1062
|
+
return this.cacheResult(t2, l2), l2;
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
let n2 = t2.parentElement, a2 = 0, i2 = null;
|
|
@@ -1073,10 +1073,10 @@ let St$1 = class St {
|
|
|
1073
1073
|
};
|
|
1074
1074
|
const c2 = this.scoreAnchor(n2);
|
|
1075
1075
|
if (c2 > 0) {
|
|
1076
|
-
const
|
|
1077
|
-
if (
|
|
1078
|
-
return
|
|
1079
|
-
(!i2 ||
|
|
1076
|
+
const l2 = this.applyDepthPenalty(c2, a2), f2 = this.getTier(n2), h = { element: n2, score: l2, tier: f2, depth: a2 };
|
|
1077
|
+
if (f2 === "A")
|
|
1078
|
+
return h;
|
|
1079
|
+
(!i2 || l2 > i2.score) && (i2 = h);
|
|
1080
1080
|
}
|
|
1081
1081
|
n2 = n2.parentElement, a2++;
|
|
1082
1082
|
}
|
|
@@ -1091,11 +1091,11 @@ let St$1 = class St {
|
|
|
1091
1091
|
scoreAnchor(t2) {
|
|
1092
1092
|
let e2 = 0;
|
|
1093
1093
|
const s2 = t2.tagName.toLowerCase();
|
|
1094
|
-
|
|
1094
|
+
tt$1.includes(s2) && (e2 += I$1.SEMANTIC_TAG);
|
|
1095
1095
|
const n2 = t2.getAttribute("role");
|
|
1096
|
-
n2 &&
|
|
1096
|
+
n2 && et$1.includes(n2) && (e2 += I$1.ROLE), (t2.hasAttribute("aria-label") || t2.hasAttribute("aria-labelledby")) && (e2 += I$1.ARIA_LABEL);
|
|
1097
1097
|
const a2 = t2.id;
|
|
1098
|
-
return a2 && !
|
|
1098
|
+
return a2 && !L$1(a2) && (e2 += I$1.STABLE_ID), (t2.hasAttribute("data-testid") || t2.hasAttribute("data-qa") || t2.hasAttribute("data-test")) && (e2 += I$1.TEST_MARKER), Math.min(e2, 1);
|
|
1099
1099
|
}
|
|
1100
1100
|
/**
|
|
1101
1101
|
* Applies depth penalty to score
|
|
@@ -1112,10 +1112,10 @@ let St$1 = class St {
|
|
|
1112
1112
|
*/
|
|
1113
1113
|
getTier(t2) {
|
|
1114
1114
|
const e2 = t2.tagName.toLowerCase();
|
|
1115
|
-
if (
|
|
1115
|
+
if (tt$1.includes(e2))
|
|
1116
1116
|
return "A";
|
|
1117
1117
|
const s2 = t2.getAttribute("role");
|
|
1118
|
-
return s2 &&
|
|
1118
|
+
return s2 && et$1.includes(s2) ? "B" : "C";
|
|
1119
1119
|
}
|
|
1120
1120
|
/**
|
|
1121
1121
|
* Checks if element is inside <head> section.
|
|
@@ -1150,7 +1150,7 @@ let St$1 = class St {
|
|
|
1150
1150
|
this.cache && this.cache.setAnchor(t2, e2);
|
|
1151
1151
|
}
|
|
1152
1152
|
};
|
|
1153
|
-
const
|
|
1153
|
+
const Tt$1 = [
|
|
1154
1154
|
// CSS-in-JS
|
|
1155
1155
|
/^css-[a-z0-9]+$/i,
|
|
1156
1156
|
/^sc-[a-z0-9]+-\d+$/i,
|
|
@@ -1171,7 +1171,7 @@ const At$1 = [
|
|
|
1171
1171
|
/\d{5,}/
|
|
1172
1172
|
// 5+ digits in a row
|
|
1173
1173
|
];
|
|
1174
|
-
const
|
|
1174
|
+
const Et$1 = [
|
|
1175
1175
|
// === FIX 4: Tailwind arbitrary values and variants (highest priority) ===
|
|
1176
1176
|
/^\[/,
|
|
1177
1177
|
// Any arbitrary value or variant starting with [ (e.g., [&_svg]:..., [mask-type:luminance])
|
|
@@ -1283,29 +1283,91 @@ const xt$1 = [
|
|
|
1283
1283
|
/^pull-(left|right)$/,
|
|
1284
1284
|
/^float-(left|right|none)$/
|
|
1285
1285
|
];
|
|
1286
|
-
function
|
|
1287
|
-
return
|
|
1286
|
+
function q$1(r2) {
|
|
1287
|
+
return Tt$1.some((t2) => t2.test(r2));
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
return r2.length <= 2 || /^\d/.test(r2) ? true :
|
|
1289
|
+
function U$1(r2) {
|
|
1290
|
+
return r2.length <= 2 || /^\d/.test(r2) ? true : Et$1.some((t2) => t2.test(r2));
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1293
|
-
return !
|
|
1292
|
+
function $t$1(r2) {
|
|
1293
|
+
return !q$1(r2) && !U$1(r2);
|
|
1294
1294
|
}
|
|
1295
1295
|
function M$1(r2) {
|
|
1296
|
-
return r2.filter((t2) =>
|
|
1296
|
+
return r2.filter((t2) => $t$1(t2));
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function It$1(r2) {
|
|
1299
1299
|
const t2 = [], e2 = [];
|
|
1300
1300
|
for (const s2 of r2)
|
|
1301
|
-
|
|
1301
|
+
U$1(s2) || q$1(s2) ? e2.push(s2) : t2.push(s2);
|
|
1302
1302
|
return { semantic: t2, utility: e2 };
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
return
|
|
1304
|
+
function st$1(r2) {
|
|
1305
|
+
return U$1(r2) || q$1(r2);
|
|
1306
|
+
}
|
|
1307
|
+
const Rt$1 = /* @__PURE__ */ new Set([
|
|
1308
|
+
"tr",
|
|
1309
|
+
"td",
|
|
1310
|
+
"th",
|
|
1311
|
+
"thead",
|
|
1312
|
+
"tbody",
|
|
1313
|
+
"tfoot"
|
|
1314
|
+
]);
|
|
1315
|
+
const Dt$1 = /* @__PURE__ */ new Set([
|
|
1316
|
+
"data-testid",
|
|
1317
|
+
"data-qa",
|
|
1318
|
+
"data-cy",
|
|
1319
|
+
"data-test",
|
|
1320
|
+
"aria-label",
|
|
1321
|
+
"name",
|
|
1322
|
+
"href"
|
|
1323
|
+
]);
|
|
1324
|
+
function Mt$1(r2) {
|
|
1325
|
+
if (r2.id)
|
|
1326
|
+
return true;
|
|
1327
|
+
if (r2.attributes) {
|
|
1328
|
+
for (const t2 of Object.keys(r2.attributes))
|
|
1329
|
+
if (Dt$1.has(t2))
|
|
1330
|
+
return true;
|
|
1331
|
+
}
|
|
1332
|
+
return false;
|
|
1333
|
+
}
|
|
1334
|
+
function Lt$1(r2, t2, e2) {
|
|
1335
|
+
var _a3;
|
|
1336
|
+
var _a2;
|
|
1337
|
+
const s2 = r2.parentElement;
|
|
1338
|
+
if (!s2)
|
|
1339
|
+
return true;
|
|
1340
|
+
for (const n2 of Array.from(s2.children)) {
|
|
1341
|
+
if (n2 === r2 || n2.tagName.toLowerCase() !== t2)
|
|
1342
|
+
continue;
|
|
1343
|
+
if (((_a3 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim()) != null ? _a3 : "") === e2)
|
|
1344
|
+
return false;
|
|
1345
|
+
}
|
|
1346
|
+
return true;
|
|
1347
|
+
}
|
|
1348
|
+
function _$1(r2, t2, e2) {
|
|
1349
|
+
var _a2;
|
|
1350
|
+
if (Rt$1.has(r2))
|
|
1351
|
+
return true;
|
|
1352
|
+
if (Mt$1(t2))
|
|
1353
|
+
return false;
|
|
1354
|
+
if (e2) {
|
|
1355
|
+
const s2 = e2.parentElement;
|
|
1356
|
+
if (s2) {
|
|
1357
|
+
const n2 = (_a2 = t2.text) == null ? void 0 : _a2.normalized;
|
|
1358
|
+
if (n2 && Lt$1(e2, r2, n2))
|
|
1359
|
+
return false;
|
|
1360
|
+
if (Array.from(s2.children).some(
|
|
1361
|
+
(i2) => i2 !== e2 && i2.tagName.toLowerCase() === r2
|
|
1362
|
+
))
|
|
1363
|
+
return true;
|
|
1364
|
+
}
|
|
1365
|
+
return false;
|
|
1366
|
+
}
|
|
1367
|
+
return true;
|
|
1306
1368
|
}
|
|
1307
|
-
const
|
|
1308
|
-
let $
|
|
1369
|
+
const rt$1 = (r2) => r2.replace(/([#:.[\]@])/g, "\\$1");
|
|
1370
|
+
let Pt$1 = class Pt {
|
|
1309
1371
|
constructor(t2, e2) {
|
|
1310
1372
|
var _a2;
|
|
1311
1373
|
this.maxDepth = (_a2 = t2.maxPathDepth) != null ? _a2 : 10, this.cache = e2;
|
|
@@ -1341,19 +1403,22 @@ let $t$1 = class $t {
|
|
|
1341
1403
|
degraded: true,
|
|
1342
1404
|
degradationReason: "target-not-descendant-of-anchor"
|
|
1343
1405
|
};
|
|
1344
|
-
let
|
|
1345
|
-
return
|
|
1346
|
-
path:
|
|
1347
|
-
const h =
|
|
1406
|
+
let l2 = this.filterNoise(i2);
|
|
1407
|
+
return l2 = this.ensureUniqueness(i2, l2, t2, e2, s2), {
|
|
1408
|
+
path: l2.map((h) => {
|
|
1409
|
+
const d = h.tagName.toLowerCase(), u2 = s2.extract(h);
|
|
1348
1410
|
let g;
|
|
1349
|
-
if (h) {
|
|
1350
|
-
const m =
|
|
1351
|
-
|
|
1411
|
+
if (_$1(d, u2, h)) {
|
|
1412
|
+
const m = h.parentElement;
|
|
1413
|
+
if (m) {
|
|
1414
|
+
const b = Array.from(m.children).indexOf(h);
|
|
1415
|
+
b !== -1 && (g = b + 1);
|
|
1416
|
+
}
|
|
1352
1417
|
}
|
|
1353
1418
|
return {
|
|
1354
|
-
tag:
|
|
1355
|
-
semantics:
|
|
1356
|
-
score: s2.scoreElement(
|
|
1419
|
+
tag: d,
|
|
1420
|
+
semantics: u2,
|
|
1421
|
+
score: s2.scoreElement(h),
|
|
1357
1422
|
nthChild: g
|
|
1358
1423
|
};
|
|
1359
1424
|
}),
|
|
@@ -1379,27 +1444,27 @@ let $t$1 = class $t {
|
|
|
1379
1444
|
return e2;
|
|
1380
1445
|
let c2;
|
|
1381
1446
|
if (this.cache) {
|
|
1382
|
-
const
|
|
1383
|
-
|
|
1447
|
+
const f2 = this.cache.getSelectorResults(i2);
|
|
1448
|
+
f2 !== void 0 ? c2 = f2 : (c2 = Array.from(o2.querySelectorAll(i2)), this.cache.setSelectorResults(i2, c2));
|
|
1384
1449
|
} else
|
|
1385
1450
|
c2 = o2.querySelectorAll(i2);
|
|
1386
1451
|
if (c2.length <= 1)
|
|
1387
1452
|
return e2;
|
|
1388
|
-
const
|
|
1389
|
-
for (const
|
|
1390
|
-
if (a2.scoreElement(
|
|
1453
|
+
const l2 = t2.filter((f2) => !e2.includes(f2));
|
|
1454
|
+
for (const f2 of l2) {
|
|
1455
|
+
if (a2.scoreElement(f2) < bt$1.MIN_CONFIDENCE_FOR_SKIP)
|
|
1391
1456
|
continue;
|
|
1392
|
-
const
|
|
1457
|
+
const d = this.insertNodeInOrder(e2, f2, t2), u2 = this.buildTestSelector(s2, d, n2);
|
|
1393
1458
|
try {
|
|
1394
|
-
let
|
|
1459
|
+
let g;
|
|
1395
1460
|
if (this.cache) {
|
|
1396
|
-
const m = this.cache.getSelectorResults(
|
|
1397
|
-
m !== void 0 ?
|
|
1461
|
+
const m = this.cache.getSelectorResults(u2);
|
|
1462
|
+
m !== void 0 ? g = m : (g = Array.from(o2.querySelectorAll(u2)), this.cache.setSelectorResults(u2, g));
|
|
1398
1463
|
} else
|
|
1399
|
-
|
|
1400
|
-
if (
|
|
1401
|
-
return
|
|
1402
|
-
|
|
1464
|
+
g = o2.querySelectorAll(u2);
|
|
1465
|
+
if (g.length === 1)
|
|
1466
|
+
return d;
|
|
1467
|
+
g.length < c2.length && (e2 = d);
|
|
1403
1468
|
} catch (e) {
|
|
1404
1469
|
}
|
|
1405
1470
|
}
|
|
@@ -1433,9 +1498,9 @@ let $t$1 = class $t {
|
|
|
1433
1498
|
*/
|
|
1434
1499
|
elementToSelector(t2) {
|
|
1435
1500
|
let e2 = t2.tagName.toLowerCase();
|
|
1436
|
-
t2.id && !
|
|
1501
|
+
t2.id && !L$1(t2.id) && (e2 += `#${rt$1(t2.id)}`);
|
|
1437
1502
|
for (const s2 of Array.from(t2.classList))
|
|
1438
|
-
|
|
1503
|
+
st$1(s2) || (e2 += `.${rt$1(s2)}`);
|
|
1439
1504
|
return e2;
|
|
1440
1505
|
}
|
|
1441
1506
|
/**
|
|
@@ -1449,7 +1514,7 @@ let $t$1 = class $t {
|
|
|
1449
1514
|
*/
|
|
1450
1515
|
shouldInclude(t2) {
|
|
1451
1516
|
const e2 = t2.tagName.toLowerCase();
|
|
1452
|
-
return
|
|
1517
|
+
return St$1.includes(e2) ? true : e2 === "div" || e2 === "span" ? this.hasSemanticFeatures(t2) : false;
|
|
1453
1518
|
}
|
|
1454
1519
|
/**
|
|
1455
1520
|
* Checks if element has meaningful semantic features
|
|
@@ -1462,13 +1527,13 @@ let $t$1 = class $t {
|
|
|
1462
1527
|
return true;
|
|
1463
1528
|
if (t2.classList.length > 0) {
|
|
1464
1529
|
for (const s2 of Array.from(t2.classList))
|
|
1465
|
-
if (!
|
|
1530
|
+
if (!st$1(s2))
|
|
1466
1531
|
return true;
|
|
1467
1532
|
}
|
|
1468
1533
|
if (t2.hasAttribute("data-testid") || t2.hasAttribute("data-qa") || t2.hasAttribute("data-test"))
|
|
1469
1534
|
return true;
|
|
1470
1535
|
const e2 = t2.id;
|
|
1471
|
-
return !!(e2 && !
|
|
1536
|
+
return !!(e2 && !L$1(e2));
|
|
1472
1537
|
}
|
|
1473
1538
|
/**
|
|
1474
1539
|
* Checks if element is inside <head> section.
|
|
@@ -1517,31 +1582,34 @@ let $t$1 = class $t {
|
|
|
1517
1582
|
degradationReason: "head-not-found-in-path"
|
|
1518
1583
|
} : {
|
|
1519
1584
|
path: n2.map((c2) => {
|
|
1520
|
-
const
|
|
1521
|
-
let
|
|
1522
|
-
if (
|
|
1523
|
-
const
|
|
1524
|
-
|
|
1585
|
+
const l2 = c2.tagName.toLowerCase(), f2 = s2.extract(c2);
|
|
1586
|
+
let h;
|
|
1587
|
+
if (_$1(l2, f2, c2)) {
|
|
1588
|
+
const d = c2.parentElement;
|
|
1589
|
+
if (d) {
|
|
1590
|
+
const g = Array.from(d.children).indexOf(c2);
|
|
1591
|
+
g !== -1 && (h = g + 1);
|
|
1592
|
+
}
|
|
1525
1593
|
}
|
|
1526
1594
|
return {
|
|
1527
|
-
tag:
|
|
1528
|
-
semantics:
|
|
1595
|
+
tag: l2,
|
|
1596
|
+
semantics: f2,
|
|
1529
1597
|
score: s2.scoreElement(c2),
|
|
1530
|
-
nthChild:
|
|
1598
|
+
nthChild: h
|
|
1531
1599
|
};
|
|
1532
1600
|
}),
|
|
1533
1601
|
degraded: false
|
|
1534
1602
|
};
|
|
1535
1603
|
}
|
|
1536
1604
|
};
|
|
1537
|
-
function
|
|
1605
|
+
function j$1(r2) {
|
|
1538
1606
|
return r2 ? r2.trim().replace(/[\n\t\r]/g, " ").replace(/\s+/g, " ") : "";
|
|
1539
1607
|
}
|
|
1540
|
-
const
|
|
1608
|
+
const Ht$1 = {
|
|
1541
1609
|
preserveQueryForAbsolute: true,
|
|
1542
1610
|
removeDynamicHashes: true
|
|
1543
1611
|
};
|
|
1544
|
-
function
|
|
1612
|
+
function kt$1(r2) {
|
|
1545
1613
|
return r2 ? [
|
|
1546
1614
|
/\d{5,}/,
|
|
1547
1615
|
// 5+ digits
|
|
@@ -1555,20 +1623,20 @@ function It$1(r2) {
|
|
|
1555
1623
|
// UUID-like
|
|
1556
1624
|
].some((e2) => e2.test(r2)) : false;
|
|
1557
1625
|
}
|
|
1558
|
-
function
|
|
1626
|
+
function _t$1(r2, t2) {
|
|
1559
1627
|
if (!r2)
|
|
1560
1628
|
return r2;
|
|
1561
1629
|
const e2 = r2.startsWith("http://") || r2.startsWith("https://"), [s2, n2] = r2.split("#"), [a2, i2] = s2.split("?");
|
|
1562
1630
|
let o2 = a2;
|
|
1563
|
-
return e2 && t2.preserveQueryForAbsolute && i2 && (o2 += `?${i2}`), n2 && (t2.removeDynamicHashes &&
|
|
1631
|
+
return e2 && t2.preserveQueryForAbsolute && i2 && (o2 += `?${i2}`), n2 && (t2.removeDynamicHashes && kt$1(n2) || (o2 += `#${n2}`)), o2;
|
|
1564
1632
|
}
|
|
1565
1633
|
function D$1(r2, t2, e2 = {}) {
|
|
1566
1634
|
if (!t2)
|
|
1567
1635
|
return t2;
|
|
1568
|
-
const s2 = __spreadValues(__spreadValues({},
|
|
1569
|
-
return r2 === "href" || r2 === "src" ?
|
|
1636
|
+
const s2 = __spreadValues(__spreadValues({}, Ht$1), e2);
|
|
1637
|
+
return r2 === "href" || r2 === "src" ? _t$1(t2, s2) : t2;
|
|
1570
1638
|
}
|
|
1571
|
-
const
|
|
1639
|
+
const Ot$1 = [
|
|
1572
1640
|
"role",
|
|
1573
1641
|
"aria-label",
|
|
1574
1642
|
"aria-labelledby",
|
|
@@ -1580,7 +1648,7 @@ const Dt$1 = [
|
|
|
1580
1648
|
"aria-setsize",
|
|
1581
1649
|
"aria-haspopup"
|
|
1582
1650
|
];
|
|
1583
|
-
const
|
|
1651
|
+
const qt$1 = [
|
|
1584
1652
|
"aria-selected",
|
|
1585
1653
|
"aria-checked",
|
|
1586
1654
|
"aria-pressed",
|
|
@@ -1594,7 +1662,7 @@ const Mt$1 = [
|
|
|
1594
1662
|
"aria-live",
|
|
1595
1663
|
"aria-atomic"
|
|
1596
1664
|
];
|
|
1597
|
-
const
|
|
1665
|
+
const Ut$1 = [
|
|
1598
1666
|
"data-state",
|
|
1599
1667
|
"data-active",
|
|
1600
1668
|
"data-inactive",
|
|
@@ -1614,7 +1682,7 @@ const Pt$1 = [
|
|
|
1614
1682
|
"data-orientation",
|
|
1615
1683
|
"data-theme"
|
|
1616
1684
|
];
|
|
1617
|
-
const
|
|
1685
|
+
const zt$1 = [
|
|
1618
1686
|
"data-radix-",
|
|
1619
1687
|
"data-headlessui-",
|
|
1620
1688
|
"data-reach-",
|
|
@@ -1623,7 +1691,7 @@ const Ht$1 = [
|
|
|
1623
1691
|
"data-mantine-",
|
|
1624
1692
|
"data-tw-"
|
|
1625
1693
|
];
|
|
1626
|
-
const
|
|
1694
|
+
const Ft$1 = [
|
|
1627
1695
|
"data-testid",
|
|
1628
1696
|
"data-test-id",
|
|
1629
1697
|
"data-test",
|
|
@@ -1636,7 +1704,7 @@ const Lt$1 = [
|
|
|
1636
1704
|
"data-product-id",
|
|
1637
1705
|
"data-user-id"
|
|
1638
1706
|
];
|
|
1639
|
-
const
|
|
1707
|
+
const jt$1 = [
|
|
1640
1708
|
// Google Analytics / GTM
|
|
1641
1709
|
"data-ga",
|
|
1642
1710
|
"data-gtm",
|
|
@@ -1673,7 +1741,7 @@ const kt$1 = [
|
|
|
1673
1741
|
"data-segment",
|
|
1674
1742
|
"data-analytics"
|
|
1675
1743
|
];
|
|
1676
|
-
const
|
|
1744
|
+
const Wt$1 = [
|
|
1677
1745
|
"data-category",
|
|
1678
1746
|
// Google Analytics category
|
|
1679
1747
|
"data-action",
|
|
@@ -1683,7 +1751,7 @@ const qt$1 = [
|
|
|
1683
1751
|
"data-value"
|
|
1684
1752
|
// Google Analytics value
|
|
1685
1753
|
];
|
|
1686
|
-
const
|
|
1754
|
+
const Bt$1 = [
|
|
1687
1755
|
"id",
|
|
1688
1756
|
"name",
|
|
1689
1757
|
"type",
|
|
@@ -1693,7 +1761,7 @@ const Ot$1 = [
|
|
|
1693
1761
|
"alt",
|
|
1694
1762
|
"href"
|
|
1695
1763
|
];
|
|
1696
|
-
const
|
|
1764
|
+
const Gt$1 = [
|
|
1697
1765
|
"disabled",
|
|
1698
1766
|
"checked",
|
|
1699
1767
|
"selected",
|
|
@@ -1702,17 +1770,17 @@ const _t$1 = [
|
|
|
1702
1770
|
"required",
|
|
1703
1771
|
"value"
|
|
1704
1772
|
];
|
|
1705
|
-
const
|
|
1773
|
+
const Vt$1 = [
|
|
1706
1774
|
/^radix-/,
|
|
1707
1775
|
/^headlessui-/,
|
|
1708
1776
|
/^mui-/,
|
|
1709
1777
|
/:\w+:/
|
|
1710
1778
|
// matches :ru:, :r1:, etc.
|
|
1711
1779
|
];
|
|
1712
|
-
function
|
|
1713
|
-
return
|
|
1780
|
+
function Qt$1(r2, t2) {
|
|
1781
|
+
return Ot$1.includes(r2) ? true : qt$1.includes(r2) || Ut$1.includes(r2) || zt$1.some((e2) => r2.startsWith(e2)) ? false : Ft$1.includes(r2) ? true : jt$1.some((e2) => r2.startsWith(e2)) || Wt$1.includes(r2) ? false : r2.startsWith("data-") && r2.endsWith("-id") ? true : r2 === "id" ? !Vt$1.some((e2) => e2.test(t2)) : Bt$1.includes(r2) ? true : Gt$1.includes(r2) ? false : !!r2.startsWith("data-");
|
|
1714
1782
|
}
|
|
1715
|
-
let
|
|
1783
|
+
let nt$1 = class nt {
|
|
1716
1784
|
constructor(t2, e2) {
|
|
1717
1785
|
var _a2;
|
|
1718
1786
|
this.includeUtilityClasses = (_a2 = t2.includeUtilityClasses) != null ? _a2 : false, this.cache = e2;
|
|
@@ -1729,12 +1797,12 @@ let st$1 = class st {
|
|
|
1729
1797
|
return i2;
|
|
1730
1798
|
}
|
|
1731
1799
|
const e2 = {}, s2 = t2.id;
|
|
1732
|
-
if (s2 && !
|
|
1800
|
+
if (s2 && !L$1(s2) && (e2.id = s2), t2.classList.length > 0) {
|
|
1733
1801
|
const i2 = Array.from(t2.classList);
|
|
1734
1802
|
if (this.includeUtilityClasses)
|
|
1735
1803
|
e2.classes = i2;
|
|
1736
1804
|
else {
|
|
1737
|
-
const { semantic: o2 } =
|
|
1805
|
+
const { semantic: o2 } = It$1(i2);
|
|
1738
1806
|
o2.length > 0 && (e2.classes = o2);
|
|
1739
1807
|
}
|
|
1740
1808
|
}
|
|
@@ -1763,7 +1831,7 @@ let st$1 = class st {
|
|
|
1763
1831
|
* @returns True if should be ignored
|
|
1764
1832
|
*/
|
|
1765
1833
|
shouldIgnoreAttribute(t2) {
|
|
1766
|
-
return !!(
|
|
1834
|
+
return !!(Y$1.has(t2) || t2.startsWith("on") || t2.startsWith("ng-") || t2.startsWith("_ng") || t2.startsWith("data-reactid") || t2.startsWith("data-react") || t2.startsWith("data-v-"));
|
|
1767
1835
|
}
|
|
1768
1836
|
/**
|
|
1769
1837
|
* Gets attribute priority
|
|
@@ -1798,7 +1866,7 @@ let st$1 = class st {
|
|
|
1798
1866
|
const e2 = {};
|
|
1799
1867
|
for (const s2 of Array.from(t2.attributes)) {
|
|
1800
1868
|
const n2 = s2.name;
|
|
1801
|
-
if (this.shouldIgnoreAttribute(n2) || !
|
|
1869
|
+
if (this.shouldIgnoreAttribute(n2) || !Qt$1(n2, s2.value) || Z$1.has(n2) && K$1(s2.value) || this.getAttributePriority(n2) === 0)
|
|
1802
1870
|
continue;
|
|
1803
1871
|
const i2 = n2 === "href" || n2 === "src" ? D$1(n2, s2.value) : s2.value;
|
|
1804
1872
|
!i2 || i2.trim() === "" || this.isDynamicValue(i2) || (e2[n2] = i2);
|
|
@@ -1812,7 +1880,7 @@ let st$1 = class st {
|
|
|
1812
1880
|
const e2 = this.getDirectTextContent(t2);
|
|
1813
1881
|
if (!e2)
|
|
1814
1882
|
return null;
|
|
1815
|
-
const s2 =
|
|
1883
|
+
const s2 = j$1(e2);
|
|
1816
1884
|
if (!s2)
|
|
1817
1885
|
return null;
|
|
1818
1886
|
const n2 = 100, a2 = e2.length > n2 ? e2.slice(0, n2) + "..." : e2, i2 = s2.length > n2 ? s2.slice(0, n2) + "..." : s2;
|
|
@@ -1862,7 +1930,7 @@ let st$1 = class st {
|
|
|
1862
1930
|
].includes(e2);
|
|
1863
1931
|
}
|
|
1864
1932
|
};
|
|
1865
|
-
let
|
|
1933
|
+
let Yt$1 = class Yt {
|
|
1866
1934
|
/**
|
|
1867
1935
|
* Generates fingerprint for SVG element
|
|
1868
1936
|
* @param element - SVG element to fingerprint
|
|
@@ -1977,11 +2045,11 @@ let Ft$1 = class Ft {
|
|
|
1977
2045
|
return Math.abs(e2).toString(16).padStart(8, "0");
|
|
1978
2046
|
}
|
|
1979
2047
|
};
|
|
1980
|
-
function
|
|
1981
|
-
const e2 = r2.anchor.score, s2 = r2.path.length > 0 ? r2.path.reduce((o2, c2) => o2 + c2.score, 0) / r2.path.length : 0.5, n2 = r2.target.score, a2 = e2 *
|
|
2048
|
+
function Zt$1(r2, t2 = 0) {
|
|
2049
|
+
const e2 = r2.anchor.score, s2 = r2.path.length > 0 ? r2.path.reduce((o2, c2) => o2 + c2.score, 0) / r2.path.length : 0.5, n2 = r2.target.score, a2 = e2 * z$1.ANCHOR + s2 * z$1.PATH + n2 * z$1.TARGET + t2 * z$1.UNIQUENESS, i2 = r2.anchor.degraded ? 0.2 : 0;
|
|
1982
2050
|
return Math.max(0, Math.min(1, a2 - i2));
|
|
1983
2051
|
}
|
|
1984
|
-
let
|
|
2052
|
+
let Kt$1 = class Kt {
|
|
1985
2053
|
constructor(t2) {
|
|
1986
2054
|
this.cache = /* @__PURE__ */ new Map(), this.maxSize = t2;
|
|
1987
2055
|
}
|
|
@@ -2012,10 +2080,10 @@ let Wt$1 = class Wt {
|
|
|
2012
2080
|
return this.cache.size;
|
|
2013
2081
|
}
|
|
2014
2082
|
};
|
|
2015
|
-
let
|
|
2083
|
+
let Xt$1 = class Xt {
|
|
2016
2084
|
constructor(t2 = {}) {
|
|
2017
2085
|
var _a2, _b;
|
|
2018
|
-
this.eidCache = /* @__PURE__ */ new WeakMap(), this.selectorResultCache = new
|
|
2086
|
+
this.eidCache = /* @__PURE__ */ new WeakMap(), this.selectorResultCache = new Kt$1(
|
|
2019
2087
|
(_a2 = t2.maxSelectorCacheSize) != null ? _a2 : 1e3
|
|
2020
2088
|
), this.anchorCache = /* @__PURE__ */ new WeakMap(), this.semanticsCache = /* @__PURE__ */ new WeakMap(), this.stats = {
|
|
2021
2089
|
eidHits: 0,
|
|
@@ -2163,12 +2231,12 @@ let Bt$1 = class Bt {
|
|
|
2163
2231
|
return s2 > 0 ? t2 / s2 : 0;
|
|
2164
2232
|
}
|
|
2165
2233
|
};
|
|
2166
|
-
function
|
|
2167
|
-
return new
|
|
2234
|
+
function Jt$1(r2) {
|
|
2235
|
+
return new Xt$1(r2);
|
|
2168
2236
|
}
|
|
2169
|
-
let
|
|
2170
|
-
function
|
|
2171
|
-
return
|
|
2237
|
+
let F$1 = null;
|
|
2238
|
+
function X$1() {
|
|
2239
|
+
return F$1 || (F$1 = Jt$1()), F$1;
|
|
2172
2240
|
}
|
|
2173
2241
|
function k$1(r2) {
|
|
2174
2242
|
if (r2.ownerDocument)
|
|
@@ -2186,7 +2254,7 @@ function k$1(r2) {
|
|
|
2186
2254
|
3. You are working with a document node instead of an element`
|
|
2187
2255
|
);
|
|
2188
2256
|
}
|
|
2189
|
-
function
|
|
2257
|
+
function te$1(r2, t2) {
|
|
2190
2258
|
if (!t2)
|
|
2191
2259
|
return;
|
|
2192
2260
|
const e2 = k$1(r2), s2 = t2 instanceof Document ? t2 : k$1(t2);
|
|
@@ -2201,66 +2269,67 @@ Common causes:
|
|
|
2201
2269
|
Solution: Ensure element and root parameter are from the same document context.`
|
|
2202
2270
|
);
|
|
2203
2271
|
}
|
|
2204
|
-
function
|
|
2272
|
+
function J$1(r2, t2 = {}) {
|
|
2205
2273
|
var _a3, _b, _c, _d;
|
|
2206
2274
|
var _a2;
|
|
2207
2275
|
if (!r2 || !r2.ownerDocument || !r2.isConnected)
|
|
2208
2276
|
return null;
|
|
2209
|
-
const e2 = __spreadValues(__spreadValues({},
|
|
2277
|
+
const e2 = __spreadValues(__spreadValues({}, At$1), t2);
|
|
2210
2278
|
if (e2.root)
|
|
2211
2279
|
try {
|
|
2212
|
-
|
|
2280
|
+
te$1(r2, e2.root);
|
|
2213
2281
|
} catch (x2) {
|
|
2214
2282
|
return console.error("Cross-document generation detected:", x2), null;
|
|
2215
2283
|
}
|
|
2216
|
-
const s2 = (_a3 = e2.cache) != null ? _a3 :
|
|
2284
|
+
const s2 = (_a3 = e2.cache) != null ? _a3 : X$1(), n2 = s2.getEID(r2);
|
|
2217
2285
|
if (n2 !== void 0)
|
|
2218
2286
|
return n2;
|
|
2219
|
-
|
|
2220
|
-
|
|
2287
|
+
const a2 = r2.tagName.toLowerCase();
|
|
2288
|
+
if (a2 === "html") {
|
|
2289
|
+
const x2 = new nt$1(e2, s2), y = re$1(r2, e2, x2);
|
|
2221
2290
|
return s2.setEID(r2, y), y;
|
|
2222
2291
|
}
|
|
2223
|
-
const i2 = new
|
|
2224
|
-
if (!
|
|
2292
|
+
const i2 = new Ct$1(e2, s2), o2 = new Pt$1(e2, s2), c2 = new nt$1(e2, s2), l2 = new Yt$1(), f2 = i2.findAnchor(r2);
|
|
2293
|
+
if (!f2 && !e2.fallbackToBody)
|
|
2225
2294
|
return null;
|
|
2226
|
-
const
|
|
2227
|
-
if (!
|
|
2295
|
+
const h = (_c = (_b = f2 == null ? void 0 : f2.element) != null ? _b : (_a2 = r2.ownerDocument) == null ? void 0 : _a2.body) != null ? _c : null;
|
|
2296
|
+
if (!h)
|
|
2228
2297
|
return null;
|
|
2229
|
-
const
|
|
2230
|
-
let
|
|
2231
|
-
if (
|
|
2232
|
-
const y = Array.from(
|
|
2233
|
-
y !== -1 && (
|
|
2234
|
-
}
|
|
2235
|
-
const
|
|
2236
|
-
tag:
|
|
2237
|
-
semantics:
|
|
2238
|
-
score: (_d =
|
|
2239
|
-
degraded:
|
|
2240
|
-
nthChild:
|
|
2241
|
-
}, S = o2.buildPath(
|
|
2242
|
-
e2.enableSvgFingerprint &&
|
|
2298
|
+
const d = !f2 || f2.tier === "C", u2 = h.tagName.toLowerCase(), g = c2.extract(h), m = h.parentElement;
|
|
2299
|
+
let p;
|
|
2300
|
+
if (m && u2 !== "body" && u2 !== "html" && _$1(u2, g, h)) {
|
|
2301
|
+
const y = Array.from(m.children).indexOf(h);
|
|
2302
|
+
y !== -1 && (p = y + 1);
|
|
2303
|
+
}
|
|
2304
|
+
const b = {
|
|
2305
|
+
tag: h.tagName.toLowerCase(),
|
|
2306
|
+
semantics: g,
|
|
2307
|
+
score: (_d = f2 == null ? void 0 : f2.score) != null ? _d : I$1.DEGRADED_SCORE,
|
|
2308
|
+
degraded: d,
|
|
2309
|
+
nthChild: p
|
|
2310
|
+
}, S = o2.buildPath(h, r2, c2), T = c2.extract(r2);
|
|
2311
|
+
e2.enableSvgFingerprint && ee$1(r2) && (T.svg = l2.fingerprint(r2));
|
|
2243
2312
|
const C = r2.parentElement;
|
|
2244
2313
|
let A;
|
|
2245
|
-
if (C) {
|
|
2314
|
+
if (C && _$1(a2, T, r2)) {
|
|
2246
2315
|
const y = Array.from(C.children).indexOf(r2);
|
|
2247
2316
|
y !== -1 && (A = y + 1);
|
|
2248
2317
|
}
|
|
2249
2318
|
const v2 = {
|
|
2250
2319
|
tag: r2.tagName.toLowerCase(),
|
|
2251
|
-
semantics:
|
|
2320
|
+
semantics: T,
|
|
2252
2321
|
score: c2.scoreElement(r2),
|
|
2253
2322
|
nthChild: A
|
|
2254
|
-
},
|
|
2323
|
+
}, P = [], $ = {
|
|
2255
2324
|
onMultiple: "best-score",
|
|
2256
2325
|
onMissing: "anchor-only",
|
|
2257
2326
|
maxDepth: 3
|
|
2258
|
-
},
|
|
2327
|
+
}, E = b.degraded || S.degraded, R = se$1(b.degraded, S), N = {
|
|
2259
2328
|
version: "1.0",
|
|
2260
2329
|
anchor: b,
|
|
2261
2330
|
path: S.path,
|
|
2262
2331
|
target: v2,
|
|
2263
|
-
constraints:
|
|
2332
|
+
constraints: P,
|
|
2264
2333
|
fallback: $,
|
|
2265
2334
|
meta: {
|
|
2266
2335
|
confidence: 0,
|
|
@@ -2268,16 +2337,16 @@ function X$1(r2, t2 = {}) {
|
|
|
2268
2337
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2269
2338
|
generator: "dom-eid@1.0",
|
|
2270
2339
|
source: e2.source,
|
|
2271
|
-
degraded:
|
|
2340
|
+
degraded: E,
|
|
2272
2341
|
degradationReason: R
|
|
2273
2342
|
}
|
|
2274
2343
|
};
|
|
2275
|
-
return N.meta.confidence =
|
|
2344
|
+
return N.meta.confidence = Zt$1(N), N.meta.confidence < e2.confidenceThreshold ? null : (s2.setEID(r2, N), N);
|
|
2276
2345
|
}
|
|
2277
|
-
function
|
|
2346
|
+
function ee$1(r2) {
|
|
2278
2347
|
return r2.namespaceURI === "http://www.w3.org/2000/svg" || r2.tagName.toLowerCase() === "svg" || r2 instanceof SVGElement;
|
|
2279
2348
|
}
|
|
2280
|
-
function
|
|
2349
|
+
function se$1(r2, t2) {
|
|
2281
2350
|
if (r2 && t2.degraded)
|
|
2282
2351
|
return "anchor-and-path-degraded";
|
|
2283
2352
|
if (r2)
|
|
@@ -2285,7 +2354,7 @@ function Yt$1(r2, t2) {
|
|
|
2285
2354
|
if (t2.degraded)
|
|
2286
2355
|
return t2.degradationReason;
|
|
2287
2356
|
}
|
|
2288
|
-
function
|
|
2357
|
+
function re$1(r2, t2, e2, s2) {
|
|
2289
2358
|
const a2 = {
|
|
2290
2359
|
tag: "html",
|
|
2291
2360
|
semantics: e2.extract(r2),
|
|
@@ -2314,91 +2383,124 @@ function Zt$1(r2, t2, e2, s2) {
|
|
|
2314
2383
|
}
|
|
2315
2384
|
};
|
|
2316
2385
|
}
|
|
2317
|
-
const
|
|
2386
|
+
const ht$2 = {
|
|
2387
|
+
id: "i",
|
|
2388
|
+
"data-testid": "tid",
|
|
2389
|
+
"data-qa": "qa",
|
|
2390
|
+
"data-cy": "cy",
|
|
2391
|
+
"data-test": "dt",
|
|
2392
|
+
"aria-label": "al",
|
|
2393
|
+
"aria-labelledby": "alb",
|
|
2394
|
+
"aria-describedby": "adb",
|
|
2395
|
+
name: "n",
|
|
2396
|
+
href: "h",
|
|
2397
|
+
src: "s",
|
|
2398
|
+
type: "t",
|
|
2399
|
+
role: "r",
|
|
2400
|
+
alt: "at",
|
|
2401
|
+
title: "tt",
|
|
2402
|
+
for: "f",
|
|
2403
|
+
placeholder: "ph",
|
|
2404
|
+
text: "x"
|
|
2405
|
+
};
|
|
2406
|
+
const G$1 = Object.fromEntries(
|
|
2407
|
+
Object.entries(ht$2).map(([r2, t2]) => [t2, r2])
|
|
2408
|
+
);
|
|
2409
|
+
const ut$1 = {
|
|
2318
2410
|
maxClasses: 2,
|
|
2319
2411
|
maxAttributes: 5,
|
|
2320
2412
|
includeText: true,
|
|
2321
2413
|
maxTextLength: 50,
|
|
2322
2414
|
simplifyTarget: true,
|
|
2323
|
-
includeConstraints: true
|
|
2415
|
+
includeConstraints: true,
|
|
2416
|
+
format: "compact"
|
|
2324
2417
|
};
|
|
2325
|
-
function
|
|
2418
|
+
function ct$1(r2) {
|
|
2326
2419
|
return r2 === "id" ? 101 : w$1[r2] !== void 0 ? w$1[r2] : r2.startsWith("data-") ? w$1["data-*"] : r2.startsWith("aria-") ? w$1["aria-*"] : 0;
|
|
2327
2420
|
}
|
|
2328
|
-
function
|
|
2421
|
+
function de$1(r2) {
|
|
2329
2422
|
return ["id", "data-testid", "data-qa", "data-cy", "href", "text", "role"].includes(r2);
|
|
2330
2423
|
}
|
|
2331
|
-
function
|
|
2424
|
+
function fe$1(r2) {
|
|
2332
2425
|
return !!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(r2) || /(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(r2) || /\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(r2));
|
|
2333
2426
|
}
|
|
2334
|
-
function
|
|
2335
|
-
const e2 = __spreadValues(__spreadValues({},
|
|
2336
|
-
return `${
|
|
2337
|
-
}
|
|
2338
|
-
function
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2427
|
+
function ge$1(r2, t2) {
|
|
2428
|
+
const e2 = __spreadValues(__spreadValues({}, ut$1), t2), s2 = e2.format === "compact", n2 = s2 ? "v1" : `v${r2.version}`, a2 = s2 ? ":" : ": ", i2 = s2 ? "::" : " :: ", o2 = s2 ? ">" : " > ", c2 = e2.includeText && r2.target.semantics.text ? r2.target.semantics.text.normalized : void 0, l2 = W$1(r2.anchor, false, e2), f2 = r2.path.length > 0 ? r2.path.map((u2) => W$1(u2, false, e2, c2)).join(o2) + o2 : "", h = W$1(r2.target, true, e2), d = e2.includeConstraints ? pe$1(r2, e2) : "";
|
|
2429
|
+
return `${n2}${a2}${l2}${i2}${f2}${h}${d}`;
|
|
2430
|
+
}
|
|
2431
|
+
function W$1(r2, t2 = false, e2 = ut$1, s2) {
|
|
2432
|
+
var _a2;
|
|
2433
|
+
const { tag: n2, semantics: a2 } = r2, i2 = e2.format === "compact";
|
|
2434
|
+
let o2 = n2;
|
|
2435
|
+
const c2 = [], l2 = __spreadValues({}, a2.attributes);
|
|
2436
|
+
a2.id && (l2.id = a2.id), a2.role && !l2.role && (l2.role = a2.role);
|
|
2437
|
+
const f2 = Object.entries(l2).map(([u2, g]) => {
|
|
2438
|
+
const m = ct$1(u2), p = u2 === "href" || u2 === "src" ? D$1(u2, g) : g;
|
|
2439
|
+
return { name: u2, value: p, priority: m };
|
|
2440
|
+
}).filter((u2) => u2.name !== "id" && u2.name !== "class" && Y$1.has(u2.name) || Z$1.has(u2.name) && K$1(u2.value) ? false : u2.priority > 0 || u2.name === "role" || u2.name === "id");
|
|
2441
|
+
f2.sort((u2, g) => g.priority - u2.priority);
|
|
2442
|
+
const h = f2.slice(0, e2.maxAttributes);
|
|
2443
|
+
h.sort((u2, g) => u2.name.localeCompare(g.name));
|
|
2444
|
+
for (const { name: u2, value: g } of h) {
|
|
2445
|
+
const m = i2 ? (_a2 = ht$2[u2]) != null ? _a2 : u2 : u2;
|
|
2446
|
+
c2.push(`${m}="${V$1(g)}"`);
|
|
2447
|
+
}
|
|
2448
|
+
if (e2.includeText && a2.text && !fe$1(a2.text.normalized)) {
|
|
2449
|
+
const u2 = a2.text.normalized;
|
|
2450
|
+
if (u2.length > 0 && u2.length <= e2.maxTextLength && !(!t2 && s2 !== void 0 && u2 === s2)) {
|
|
2451
|
+
const m = i2 ? "x" : "text";
|
|
2452
|
+
c2.push(`${m}="${V$1(u2)}"`);
|
|
2453
|
+
}
|
|
2454
|
+
}
|
|
2455
|
+
let d = c2;
|
|
2456
|
+
if (c2.length > 0 && t2 && e2.simplifyTarget && a2.id && (d = c2.filter((u2) => {
|
|
2457
|
+
var _a3;
|
|
2458
|
+
const g = u2.split("=")[0], m = (_a3 = G$1[g]) != null ? _a3 : g;
|
|
2459
|
+
return ct$1(m) >= 60 || m === "text" || m === "id" || m === "role";
|
|
2460
|
+
})), a2.classes && a2.classes.length > 0) {
|
|
2461
|
+
const u2 = M$1(a2.classes), g = !!a2.id || c2.some((p) => {
|
|
2462
|
+
var _a3;
|
|
2463
|
+
const b = p.split("=")[0], S = (_a3 = G$1[b]) != null ? _a3 : b;
|
|
2464
|
+
return S === "href" || S === "data-testid" || S === "text" || S === "role";
|
|
2465
|
+
});
|
|
2466
|
+
if (!(t2 && e2.simplifyTarget && g) && u2.length > 0) {
|
|
2467
|
+
const p = u2.sort().slice(0, e2.maxClasses);
|
|
2468
|
+
o2 += p.map((b) => `.${b}`).join("");
|
|
2367
2469
|
}
|
|
2368
2470
|
}
|
|
2369
|
-
if (d.length > 0 && (
|
|
2370
|
-
const
|
|
2371
|
-
t2 && e2.simplifyTarget &&
|
|
2471
|
+
if (d.length > 0 && (o2 += `[${d.join(",")}]`), "nthChild" in r2 && r2.nthChild) {
|
|
2472
|
+
const u2 = !!a2.id || a2.attributes && Object.keys(a2.attributes).some(de$1);
|
|
2473
|
+
t2 && e2.simplifyTarget && u2 || (o2 += `#${r2.nthChild}`);
|
|
2372
2474
|
}
|
|
2373
|
-
return
|
|
2475
|
+
return o2;
|
|
2374
2476
|
}
|
|
2375
|
-
function
|
|
2477
|
+
function pe$1(r2, t2) {
|
|
2376
2478
|
if (!r2.constraints || r2.constraints.length === 0)
|
|
2377
2479
|
return "";
|
|
2378
|
-
const
|
|
2379
|
-
for (const
|
|
2380
|
-
switch (
|
|
2480
|
+
const e2 = [];
|
|
2481
|
+
for (const n2 of r2.constraints)
|
|
2482
|
+
switch (n2.type) {
|
|
2381
2483
|
case "uniqueness":
|
|
2382
|
-
|
|
2484
|
+
e2.push("unique=true");
|
|
2383
2485
|
break;
|
|
2384
2486
|
case "position":
|
|
2385
|
-
|
|
2487
|
+
n2.params && n2.params.strategy && e2.push(`pos=${n2.params.strategy}`);
|
|
2386
2488
|
break;
|
|
2387
2489
|
case "text-proximity":
|
|
2388
|
-
if (
|
|
2389
|
-
const
|
|
2390
|
-
|
|
2490
|
+
if (n2.params && n2.params.reference) {
|
|
2491
|
+
const a2 = V$1(String(n2.params.reference));
|
|
2492
|
+
e2.push(`text="${a2}"`);
|
|
2391
2493
|
}
|
|
2392
2494
|
break;
|
|
2393
2495
|
}
|
|
2394
|
-
return
|
|
2496
|
+
return e2.length === 0 ? "" : `${t2.format === "verbose" ? " " : ""}{${e2.join(",")}}`;
|
|
2395
2497
|
}
|
|
2396
|
-
function
|
|
2498
|
+
function V$1(r2) {
|
|
2397
2499
|
return r2.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/>/g, "\\>").replace(/:/g, "\\:");
|
|
2398
2500
|
}
|
|
2399
|
-
function
|
|
2400
|
-
const s2 =
|
|
2401
|
-
return s2 ?
|
|
2501
|
+
function Ne$1(r2, t2, e2) {
|
|
2502
|
+
const s2 = J$1(r2, t2);
|
|
2503
|
+
return s2 ? ge$1(s2, e2) : null;
|
|
2402
2504
|
}
|
|
2403
2505
|
let _id = 1;
|
|
2404
2506
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
@@ -3086,7 +3188,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
3086
3188
|
enableSvgFingerprint: selectorOptions.enableSvgFingerprint,
|
|
3087
3189
|
fallbackToBody: selectorOptions.fallbackToBody
|
|
3088
3190
|
};
|
|
3089
|
-
const selector =
|
|
3191
|
+
const selector = Ne$1(n2, seqlGeneratorOptions);
|
|
3090
3192
|
if (selector) {
|
|
3091
3193
|
serializedNode.selector = selector;
|
|
3092
3194
|
}
|
|
@@ -7226,6 +7328,29 @@ try {
|
|
|
7226
7328
|
}
|
|
7227
7329
|
} catch (error) {
|
|
7228
7330
|
}
|
|
7331
|
+
const ht$1 = {
|
|
7332
|
+
id: "i",
|
|
7333
|
+
"data-testid": "tid",
|
|
7334
|
+
"data-qa": "qa",
|
|
7335
|
+
"data-cy": "cy",
|
|
7336
|
+
"data-test": "dt",
|
|
7337
|
+
"aria-label": "al",
|
|
7338
|
+
"aria-labelledby": "alb",
|
|
7339
|
+
"aria-describedby": "adb",
|
|
7340
|
+
name: "n",
|
|
7341
|
+
href: "h",
|
|
7342
|
+
src: "s",
|
|
7343
|
+
type: "t",
|
|
7344
|
+
role: "r",
|
|
7345
|
+
alt: "at",
|
|
7346
|
+
title: "tt",
|
|
7347
|
+
for: "f",
|
|
7348
|
+
placeholder: "ph",
|
|
7349
|
+
text: "x"
|
|
7350
|
+
};
|
|
7351
|
+
Object.fromEntries(
|
|
7352
|
+
Object.entries(ht$1).map(([r2, t2]) => [t2, r2])
|
|
7353
|
+
);
|
|
7229
7354
|
function getDefaultExportFromCjs(x2) {
|
|
7230
7355
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
7231
7356
|
}
|
|
@@ -11598,7 +11723,7 @@ var NodeType = /* @__PURE__ */ ((NodeType2) => {
|
|
|
11598
11723
|
NodeType2[NodeType2["Comment"] = 5] = "Comment";
|
|
11599
11724
|
return NodeType2;
|
|
11600
11725
|
})(NodeType || {});
|
|
11601
|
-
const
|
|
11726
|
+
const z = {
|
|
11602
11727
|
ANCHOR: 0.4,
|
|
11603
11728
|
PATH: 0.3,
|
|
11604
11729
|
TARGET: 0.2,
|
|
@@ -11614,10 +11739,10 @@ const I = {
|
|
|
11614
11739
|
DEPTH_PENALTY_FACTOR: 0.05,
|
|
11615
11740
|
DEGRADED_SCORE: 0.3
|
|
11616
11741
|
};
|
|
11617
|
-
const
|
|
11742
|
+
const bt = {
|
|
11618
11743
|
MIN_CONFIDENCE_FOR_SKIP: 0.7
|
|
11619
11744
|
};
|
|
11620
|
-
const
|
|
11745
|
+
const tt = [
|
|
11621
11746
|
"form",
|
|
11622
11747
|
"main",
|
|
11623
11748
|
"nav",
|
|
@@ -11626,7 +11751,7 @@ const K = [
|
|
|
11626
11751
|
"footer",
|
|
11627
11752
|
"header"
|
|
11628
11753
|
];
|
|
11629
|
-
const
|
|
11754
|
+
const et = [
|
|
11630
11755
|
"form",
|
|
11631
11756
|
"navigation",
|
|
11632
11757
|
"main",
|
|
@@ -11636,7 +11761,7 @@ const J = [
|
|
|
11636
11761
|
"banner",
|
|
11637
11762
|
"search"
|
|
11638
11763
|
];
|
|
11639
|
-
const
|
|
11764
|
+
const St = [
|
|
11640
11765
|
// HTML5 Semantic
|
|
11641
11766
|
"article",
|
|
11642
11767
|
"aside",
|
|
@@ -11742,7 +11867,7 @@ const w = {
|
|
|
11742
11867
|
// Any aria-* attribute (if not above)
|
|
11743
11868
|
"aria-*": 25
|
|
11744
11869
|
};
|
|
11745
|
-
const
|
|
11870
|
+
const Y = /* @__PURE__ */ new Set([
|
|
11746
11871
|
"id",
|
|
11747
11872
|
// handled separately
|
|
11748
11873
|
"class",
|
|
@@ -11755,7 +11880,7 @@ const V = /* @__PURE__ */ new Set([
|
|
|
11755
11880
|
// can change
|
|
11756
11881
|
"contenteditable"
|
|
11757
11882
|
]);
|
|
11758
|
-
const
|
|
11883
|
+
const At = {
|
|
11759
11884
|
maxPathDepth: 10,
|
|
11760
11885
|
enableSvgFingerprint: true,
|
|
11761
11886
|
confidenceThreshold: 0,
|
|
@@ -11763,7 +11888,7 @@ const bt = {
|
|
|
11763
11888
|
includeUtilityClasses: false,
|
|
11764
11889
|
source: "dom-dsl"
|
|
11765
11890
|
};
|
|
11766
|
-
function
|
|
11891
|
+
function L(r2) {
|
|
11767
11892
|
if (/^[a-z]+-\d+$/i.test(r2) || /^[a-z]+(-[a-z]+)+-\d+$/i.test(r2) || /^[a-z]+(_[a-z]+)*_\d+$/i.test(r2) || /^\d+$/.test(r2) || /^:[a-z0-9]+:$/i.test(r2) || /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(r2))
|
|
11768
11893
|
return true;
|
|
11769
11894
|
if (/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(r2)) {
|
|
@@ -11773,7 +11898,7 @@ function P(r2) {
|
|
|
11773
11898
|
}
|
|
11774
11899
|
return !!(/^radix-/.test(r2) || /^mui-\d+$/.test(r2));
|
|
11775
11900
|
}
|
|
11776
|
-
const
|
|
11901
|
+
const Z = /* @__PURE__ */ new Set([
|
|
11777
11902
|
"aria-labelledby",
|
|
11778
11903
|
"aria-describedby",
|
|
11779
11904
|
"aria-controls",
|
|
@@ -11787,10 +11912,10 @@ const Q = /* @__PURE__ */ new Set([
|
|
|
11787
11912
|
"aria-errormessage",
|
|
11788
11913
|
"aria-flowto"
|
|
11789
11914
|
]);
|
|
11790
|
-
function
|
|
11791
|
-
return r2.trim().split(/\s+/).some((e2) =>
|
|
11915
|
+
function K(r2) {
|
|
11916
|
+
return r2.trim().split(/\s+/).some((e2) => L(e2));
|
|
11792
11917
|
}
|
|
11793
|
-
class
|
|
11918
|
+
class Ct2 {
|
|
11794
11919
|
constructor(t2, e2) {
|
|
11795
11920
|
var _a2;
|
|
11796
11921
|
this.maxDepth = (_a2 = t2.maxPathDepth) != null ? _a2 : 10, this.cache = e2;
|
|
@@ -11824,25 +11949,25 @@ class St2 {
|
|
|
11824
11949
|
if (e2 === "head" || this.isInsideHead(t2)) {
|
|
11825
11950
|
const c2 = s2 == null ? void 0 : s2.documentElement;
|
|
11826
11951
|
if (c2) {
|
|
11827
|
-
const
|
|
11952
|
+
const l2 = {
|
|
11828
11953
|
element: c2,
|
|
11829
11954
|
score: 1,
|
|
11830
11955
|
tier: "A",
|
|
11831
11956
|
depth: 0
|
|
11832
11957
|
};
|
|
11833
|
-
return this.cacheResult(t2,
|
|
11958
|
+
return this.cacheResult(t2, l2), l2;
|
|
11834
11959
|
}
|
|
11835
11960
|
}
|
|
11836
11961
|
if (e2 === "body") {
|
|
11837
11962
|
const c2 = s2 == null ? void 0 : s2.documentElement;
|
|
11838
11963
|
if (c2) {
|
|
11839
|
-
const
|
|
11964
|
+
const l2 = {
|
|
11840
11965
|
element: c2,
|
|
11841
11966
|
score: 1,
|
|
11842
11967
|
tier: "A",
|
|
11843
11968
|
depth: 0
|
|
11844
11969
|
};
|
|
11845
|
-
return this.cacheResult(t2,
|
|
11970
|
+
return this.cacheResult(t2, l2), l2;
|
|
11846
11971
|
}
|
|
11847
11972
|
}
|
|
11848
11973
|
let n2 = t2.parentElement, a2 = 0, i2 = null;
|
|
@@ -11856,10 +11981,10 @@ class St2 {
|
|
|
11856
11981
|
};
|
|
11857
11982
|
const c2 = this.scoreAnchor(n2);
|
|
11858
11983
|
if (c2 > 0) {
|
|
11859
|
-
const
|
|
11860
|
-
if (
|
|
11861
|
-
return
|
|
11862
|
-
(!i2 ||
|
|
11984
|
+
const l2 = this.applyDepthPenalty(c2, a2), f2 = this.getTier(n2), h = { element: n2, score: l2, tier: f2, depth: a2 };
|
|
11985
|
+
if (f2 === "A")
|
|
11986
|
+
return h;
|
|
11987
|
+
(!i2 || l2 > i2.score) && (i2 = h);
|
|
11863
11988
|
}
|
|
11864
11989
|
n2 = n2.parentElement, a2++;
|
|
11865
11990
|
}
|
|
@@ -11874,11 +11999,11 @@ class St2 {
|
|
|
11874
11999
|
scoreAnchor(t2) {
|
|
11875
12000
|
let e2 = 0;
|
|
11876
12001
|
const s2 = t2.tagName.toLowerCase();
|
|
11877
|
-
|
|
12002
|
+
tt.includes(s2) && (e2 += I.SEMANTIC_TAG);
|
|
11878
12003
|
const n2 = t2.getAttribute("role");
|
|
11879
|
-
n2 &&
|
|
12004
|
+
n2 && et.includes(n2) && (e2 += I.ROLE), (t2.hasAttribute("aria-label") || t2.hasAttribute("aria-labelledby")) && (e2 += I.ARIA_LABEL);
|
|
11880
12005
|
const a2 = t2.id;
|
|
11881
|
-
return a2 && !
|
|
12006
|
+
return a2 && !L(a2) && (e2 += I.STABLE_ID), (t2.hasAttribute("data-testid") || t2.hasAttribute("data-qa") || t2.hasAttribute("data-test")) && (e2 += I.TEST_MARKER), Math.min(e2, 1);
|
|
11882
12007
|
}
|
|
11883
12008
|
/**
|
|
11884
12009
|
* Applies depth penalty to score
|
|
@@ -11895,10 +12020,10 @@ class St2 {
|
|
|
11895
12020
|
*/
|
|
11896
12021
|
getTier(t2) {
|
|
11897
12022
|
const e2 = t2.tagName.toLowerCase();
|
|
11898
|
-
if (
|
|
12023
|
+
if (tt.includes(e2))
|
|
11899
12024
|
return "A";
|
|
11900
12025
|
const s2 = t2.getAttribute("role");
|
|
11901
|
-
return s2 &&
|
|
12026
|
+
return s2 && et.includes(s2) ? "B" : "C";
|
|
11902
12027
|
}
|
|
11903
12028
|
/**
|
|
11904
12029
|
* Checks if element is inside <head> section.
|
|
@@ -11933,7 +12058,7 @@ class St2 {
|
|
|
11933
12058
|
this.cache && this.cache.setAnchor(t2, e2);
|
|
11934
12059
|
}
|
|
11935
12060
|
}
|
|
11936
|
-
const
|
|
12061
|
+
const Tt = [
|
|
11937
12062
|
// CSS-in-JS
|
|
11938
12063
|
/^css-[a-z0-9]+$/i,
|
|
11939
12064
|
/^sc-[a-z0-9]+-\d+$/i,
|
|
@@ -11954,7 +12079,7 @@ const At = [
|
|
|
11954
12079
|
/\d{5,}/
|
|
11955
12080
|
// 5+ digits in a row
|
|
11956
12081
|
];
|
|
11957
|
-
const
|
|
12082
|
+
const Et = [
|
|
11958
12083
|
// === FIX 4: Tailwind arbitrary values and variants (highest priority) ===
|
|
11959
12084
|
/^\[/,
|
|
11960
12085
|
// Any arbitrary value or variant starting with [ (e.g., [&_svg]:..., [mask-type:luminance])
|
|
@@ -12066,29 +12191,91 @@ const xt = [
|
|
|
12066
12191
|
/^pull-(left|right)$/,
|
|
12067
12192
|
/^float-(left|right|none)$/
|
|
12068
12193
|
];
|
|
12069
|
-
function
|
|
12070
|
-
return
|
|
12194
|
+
function q(r2) {
|
|
12195
|
+
return Tt.some((t2) => t2.test(r2));
|
|
12071
12196
|
}
|
|
12072
|
-
function
|
|
12073
|
-
return r2.length <= 2 || /^\d/.test(r2) ? true :
|
|
12197
|
+
function U(r2) {
|
|
12198
|
+
return r2.length <= 2 || /^\d/.test(r2) ? true : Et.some((t2) => t2.test(r2));
|
|
12074
12199
|
}
|
|
12075
|
-
function
|
|
12076
|
-
return !
|
|
12200
|
+
function $t(r2) {
|
|
12201
|
+
return !q(r2) && !U(r2);
|
|
12077
12202
|
}
|
|
12078
12203
|
function M(r2) {
|
|
12079
|
-
return r2.filter((t2) =>
|
|
12204
|
+
return r2.filter((t2) => $t(t2));
|
|
12080
12205
|
}
|
|
12081
|
-
function
|
|
12206
|
+
function It(r2) {
|
|
12082
12207
|
const t2 = [], e2 = [];
|
|
12083
12208
|
for (const s2 of r2)
|
|
12084
|
-
|
|
12209
|
+
U(s2) || q(s2) ? e2.push(s2) : t2.push(s2);
|
|
12085
12210
|
return { semantic: t2, utility: e2 };
|
|
12086
12211
|
}
|
|
12087
|
-
function
|
|
12088
|
-
return
|
|
12212
|
+
function st(r2) {
|
|
12213
|
+
return U(r2) || q(r2);
|
|
12089
12214
|
}
|
|
12090
|
-
const
|
|
12091
|
-
|
|
12215
|
+
const Rt = /* @__PURE__ */ new Set([
|
|
12216
|
+
"tr",
|
|
12217
|
+
"td",
|
|
12218
|
+
"th",
|
|
12219
|
+
"thead",
|
|
12220
|
+
"tbody",
|
|
12221
|
+
"tfoot"
|
|
12222
|
+
]);
|
|
12223
|
+
const Dt = /* @__PURE__ */ new Set([
|
|
12224
|
+
"data-testid",
|
|
12225
|
+
"data-qa",
|
|
12226
|
+
"data-cy",
|
|
12227
|
+
"data-test",
|
|
12228
|
+
"aria-label",
|
|
12229
|
+
"name",
|
|
12230
|
+
"href"
|
|
12231
|
+
]);
|
|
12232
|
+
function Mt(r2) {
|
|
12233
|
+
if (r2.id)
|
|
12234
|
+
return true;
|
|
12235
|
+
if (r2.attributes) {
|
|
12236
|
+
for (const t2 of Object.keys(r2.attributes))
|
|
12237
|
+
if (Dt.has(t2))
|
|
12238
|
+
return true;
|
|
12239
|
+
}
|
|
12240
|
+
return false;
|
|
12241
|
+
}
|
|
12242
|
+
function Lt(r2, t2, e2) {
|
|
12243
|
+
var _a3;
|
|
12244
|
+
var _a2;
|
|
12245
|
+
const s2 = r2.parentElement;
|
|
12246
|
+
if (!s2)
|
|
12247
|
+
return true;
|
|
12248
|
+
for (const n2 of Array.from(s2.children)) {
|
|
12249
|
+
if (n2 === r2 || n2.tagName.toLowerCase() !== t2)
|
|
12250
|
+
continue;
|
|
12251
|
+
if (((_a3 = (_a2 = n2.textContent) == null ? void 0 : _a2.trim()) != null ? _a3 : "") === e2)
|
|
12252
|
+
return false;
|
|
12253
|
+
}
|
|
12254
|
+
return true;
|
|
12255
|
+
}
|
|
12256
|
+
function _(r2, t2, e2) {
|
|
12257
|
+
var _a2;
|
|
12258
|
+
if (Rt.has(r2))
|
|
12259
|
+
return true;
|
|
12260
|
+
if (Mt(t2))
|
|
12261
|
+
return false;
|
|
12262
|
+
if (e2) {
|
|
12263
|
+
const s2 = e2.parentElement;
|
|
12264
|
+
if (s2) {
|
|
12265
|
+
const n2 = (_a2 = t2.text) == null ? void 0 : _a2.normalized;
|
|
12266
|
+
if (n2 && Lt(e2, r2, n2))
|
|
12267
|
+
return false;
|
|
12268
|
+
if (Array.from(s2.children).some(
|
|
12269
|
+
(i2) => i2 !== e2 && i2.tagName.toLowerCase() === r2
|
|
12270
|
+
))
|
|
12271
|
+
return true;
|
|
12272
|
+
}
|
|
12273
|
+
return false;
|
|
12274
|
+
}
|
|
12275
|
+
return true;
|
|
12276
|
+
}
|
|
12277
|
+
const rt = (r2) => r2.replace(/([#:.[\]@])/g, "\\$1");
|
|
12278
|
+
class Pt2 {
|
|
12092
12279
|
constructor(t2, e2) {
|
|
12093
12280
|
var _a2;
|
|
12094
12281
|
this.maxDepth = (_a2 = t2.maxPathDepth) != null ? _a2 : 10, this.cache = e2;
|
|
@@ -12124,19 +12311,22 @@ class $t2 {
|
|
|
12124
12311
|
degraded: true,
|
|
12125
12312
|
degradationReason: "target-not-descendant-of-anchor"
|
|
12126
12313
|
};
|
|
12127
|
-
let
|
|
12128
|
-
return
|
|
12129
|
-
path:
|
|
12130
|
-
const h =
|
|
12314
|
+
let l2 = this.filterNoise(i2);
|
|
12315
|
+
return l2 = this.ensureUniqueness(i2, l2, t2, e2, s2), {
|
|
12316
|
+
path: l2.map((h) => {
|
|
12317
|
+
const d = h.tagName.toLowerCase(), u2 = s2.extract(h);
|
|
12131
12318
|
let g;
|
|
12132
|
-
if (h) {
|
|
12133
|
-
const m =
|
|
12134
|
-
|
|
12319
|
+
if (_(d, u2, h)) {
|
|
12320
|
+
const m = h.parentElement;
|
|
12321
|
+
if (m) {
|
|
12322
|
+
const b = Array.from(m.children).indexOf(h);
|
|
12323
|
+
b !== -1 && (g = b + 1);
|
|
12324
|
+
}
|
|
12135
12325
|
}
|
|
12136
12326
|
return {
|
|
12137
|
-
tag:
|
|
12138
|
-
semantics:
|
|
12139
|
-
score: s2.scoreElement(
|
|
12327
|
+
tag: d,
|
|
12328
|
+
semantics: u2,
|
|
12329
|
+
score: s2.scoreElement(h),
|
|
12140
12330
|
nthChild: g
|
|
12141
12331
|
};
|
|
12142
12332
|
}),
|
|
@@ -12162,27 +12352,27 @@ class $t2 {
|
|
|
12162
12352
|
return e2;
|
|
12163
12353
|
let c2;
|
|
12164
12354
|
if (this.cache) {
|
|
12165
|
-
const
|
|
12166
|
-
|
|
12355
|
+
const f2 = this.cache.getSelectorResults(i2);
|
|
12356
|
+
f2 !== void 0 ? c2 = f2 : (c2 = Array.from(o2.querySelectorAll(i2)), this.cache.setSelectorResults(i2, c2));
|
|
12167
12357
|
} else
|
|
12168
12358
|
c2 = o2.querySelectorAll(i2);
|
|
12169
12359
|
if (c2.length <= 1)
|
|
12170
12360
|
return e2;
|
|
12171
|
-
const
|
|
12172
|
-
for (const
|
|
12173
|
-
if (a2.scoreElement(
|
|
12361
|
+
const l2 = t2.filter((f2) => !e2.includes(f2));
|
|
12362
|
+
for (const f2 of l2) {
|
|
12363
|
+
if (a2.scoreElement(f2) < bt.MIN_CONFIDENCE_FOR_SKIP)
|
|
12174
12364
|
continue;
|
|
12175
|
-
const
|
|
12365
|
+
const d = this.insertNodeInOrder(e2, f2, t2), u2 = this.buildTestSelector(s2, d, n2);
|
|
12176
12366
|
try {
|
|
12177
|
-
let
|
|
12367
|
+
let g;
|
|
12178
12368
|
if (this.cache) {
|
|
12179
|
-
const m = this.cache.getSelectorResults(
|
|
12180
|
-
m !== void 0 ?
|
|
12369
|
+
const m = this.cache.getSelectorResults(u2);
|
|
12370
|
+
m !== void 0 ? g = m : (g = Array.from(o2.querySelectorAll(u2)), this.cache.setSelectorResults(u2, g));
|
|
12181
12371
|
} else
|
|
12182
|
-
|
|
12183
|
-
if (
|
|
12184
|
-
return
|
|
12185
|
-
|
|
12372
|
+
g = o2.querySelectorAll(u2);
|
|
12373
|
+
if (g.length === 1)
|
|
12374
|
+
return d;
|
|
12375
|
+
g.length < c2.length && (e2 = d);
|
|
12186
12376
|
} catch (e) {
|
|
12187
12377
|
}
|
|
12188
12378
|
}
|
|
@@ -12216,9 +12406,9 @@ class $t2 {
|
|
|
12216
12406
|
*/
|
|
12217
12407
|
elementToSelector(t2) {
|
|
12218
12408
|
let e2 = t2.tagName.toLowerCase();
|
|
12219
|
-
t2.id && !
|
|
12409
|
+
t2.id && !L(t2.id) && (e2 += `#${rt(t2.id)}`);
|
|
12220
12410
|
for (const s2 of Array.from(t2.classList))
|
|
12221
|
-
|
|
12411
|
+
st(s2) || (e2 += `.${rt(s2)}`);
|
|
12222
12412
|
return e2;
|
|
12223
12413
|
}
|
|
12224
12414
|
/**
|
|
@@ -12232,7 +12422,7 @@ class $t2 {
|
|
|
12232
12422
|
*/
|
|
12233
12423
|
shouldInclude(t2) {
|
|
12234
12424
|
const e2 = t2.tagName.toLowerCase();
|
|
12235
|
-
return
|
|
12425
|
+
return St.includes(e2) ? true : e2 === "div" || e2 === "span" ? this.hasSemanticFeatures(t2) : false;
|
|
12236
12426
|
}
|
|
12237
12427
|
/**
|
|
12238
12428
|
* Checks if element has meaningful semantic features
|
|
@@ -12245,13 +12435,13 @@ class $t2 {
|
|
|
12245
12435
|
return true;
|
|
12246
12436
|
if (t2.classList.length > 0) {
|
|
12247
12437
|
for (const s2 of Array.from(t2.classList))
|
|
12248
|
-
if (!
|
|
12438
|
+
if (!st(s2))
|
|
12249
12439
|
return true;
|
|
12250
12440
|
}
|
|
12251
12441
|
if (t2.hasAttribute("data-testid") || t2.hasAttribute("data-qa") || t2.hasAttribute("data-test"))
|
|
12252
12442
|
return true;
|
|
12253
12443
|
const e2 = t2.id;
|
|
12254
|
-
return !!(e2 && !
|
|
12444
|
+
return !!(e2 && !L(e2));
|
|
12255
12445
|
}
|
|
12256
12446
|
/**
|
|
12257
12447
|
* Checks if element is inside <head> section.
|
|
@@ -12300,31 +12490,34 @@ class $t2 {
|
|
|
12300
12490
|
degradationReason: "head-not-found-in-path"
|
|
12301
12491
|
} : {
|
|
12302
12492
|
path: n2.map((c2) => {
|
|
12303
|
-
const
|
|
12304
|
-
let
|
|
12305
|
-
if (
|
|
12306
|
-
const
|
|
12307
|
-
|
|
12493
|
+
const l2 = c2.tagName.toLowerCase(), f2 = s2.extract(c2);
|
|
12494
|
+
let h;
|
|
12495
|
+
if (_(l2, f2, c2)) {
|
|
12496
|
+
const d = c2.parentElement;
|
|
12497
|
+
if (d) {
|
|
12498
|
+
const g = Array.from(d.children).indexOf(c2);
|
|
12499
|
+
g !== -1 && (h = g + 1);
|
|
12500
|
+
}
|
|
12308
12501
|
}
|
|
12309
12502
|
return {
|
|
12310
|
-
tag:
|
|
12311
|
-
semantics:
|
|
12503
|
+
tag: l2,
|
|
12504
|
+
semantics: f2,
|
|
12312
12505
|
score: s2.scoreElement(c2),
|
|
12313
|
-
nthChild:
|
|
12506
|
+
nthChild: h
|
|
12314
12507
|
};
|
|
12315
12508
|
}),
|
|
12316
12509
|
degraded: false
|
|
12317
12510
|
};
|
|
12318
12511
|
}
|
|
12319
12512
|
}
|
|
12320
|
-
function
|
|
12513
|
+
function j(r2) {
|
|
12321
12514
|
return r2 ? r2.trim().replace(/[\n\t\r]/g, " ").replace(/\s+/g, " ") : "";
|
|
12322
12515
|
}
|
|
12323
|
-
const
|
|
12516
|
+
const Ht = {
|
|
12324
12517
|
preserveQueryForAbsolute: true,
|
|
12325
12518
|
removeDynamicHashes: true
|
|
12326
12519
|
};
|
|
12327
|
-
function
|
|
12520
|
+
function kt(r2) {
|
|
12328
12521
|
return r2 ? [
|
|
12329
12522
|
/\d{5,}/,
|
|
12330
12523
|
// 5+ digits
|
|
@@ -12338,20 +12531,20 @@ function It(r2) {
|
|
|
12338
12531
|
// UUID-like
|
|
12339
12532
|
].some((e2) => e2.test(r2)) : false;
|
|
12340
12533
|
}
|
|
12341
|
-
function
|
|
12534
|
+
function _t(r2, t2) {
|
|
12342
12535
|
if (!r2)
|
|
12343
12536
|
return r2;
|
|
12344
12537
|
const e2 = r2.startsWith("http://") || r2.startsWith("https://"), [s2, n2] = r2.split("#"), [a2, i2] = s2.split("?");
|
|
12345
12538
|
let o2 = a2;
|
|
12346
|
-
return e2 && t2.preserveQueryForAbsolute && i2 && (o2 += `?${i2}`), n2 && (t2.removeDynamicHashes &&
|
|
12539
|
+
return e2 && t2.preserveQueryForAbsolute && i2 && (o2 += `?${i2}`), n2 && (t2.removeDynamicHashes && kt(n2) || (o2 += `#${n2}`)), o2;
|
|
12347
12540
|
}
|
|
12348
12541
|
function D(r2, t2, e2 = {}) {
|
|
12349
12542
|
if (!t2)
|
|
12350
12543
|
return t2;
|
|
12351
|
-
const s2 = __spreadValues(__spreadValues({},
|
|
12352
|
-
return r2 === "href" || r2 === "src" ?
|
|
12544
|
+
const s2 = __spreadValues(__spreadValues({}, Ht), e2);
|
|
12545
|
+
return r2 === "href" || r2 === "src" ? _t(t2, s2) : t2;
|
|
12353
12546
|
}
|
|
12354
|
-
const
|
|
12547
|
+
const Ot = [
|
|
12355
12548
|
"role",
|
|
12356
12549
|
"aria-label",
|
|
12357
12550
|
"aria-labelledby",
|
|
@@ -12363,7 +12556,7 @@ const Dt = [
|
|
|
12363
12556
|
"aria-setsize",
|
|
12364
12557
|
"aria-haspopup"
|
|
12365
12558
|
];
|
|
12366
|
-
const
|
|
12559
|
+
const qt = [
|
|
12367
12560
|
"aria-selected",
|
|
12368
12561
|
"aria-checked",
|
|
12369
12562
|
"aria-pressed",
|
|
@@ -12377,7 +12570,7 @@ const Mt = [
|
|
|
12377
12570
|
"aria-live",
|
|
12378
12571
|
"aria-atomic"
|
|
12379
12572
|
];
|
|
12380
|
-
const
|
|
12573
|
+
const Ut = [
|
|
12381
12574
|
"data-state",
|
|
12382
12575
|
"data-active",
|
|
12383
12576
|
"data-inactive",
|
|
@@ -12397,7 +12590,7 @@ const Pt = [
|
|
|
12397
12590
|
"data-orientation",
|
|
12398
12591
|
"data-theme"
|
|
12399
12592
|
];
|
|
12400
|
-
const
|
|
12593
|
+
const zt = [
|
|
12401
12594
|
"data-radix-",
|
|
12402
12595
|
"data-headlessui-",
|
|
12403
12596
|
"data-reach-",
|
|
@@ -12406,7 +12599,7 @@ const Ht = [
|
|
|
12406
12599
|
"data-mantine-",
|
|
12407
12600
|
"data-tw-"
|
|
12408
12601
|
];
|
|
12409
|
-
const
|
|
12602
|
+
const Ft = [
|
|
12410
12603
|
"data-testid",
|
|
12411
12604
|
"data-test-id",
|
|
12412
12605
|
"data-test",
|
|
@@ -12419,7 +12612,7 @@ const Lt = [
|
|
|
12419
12612
|
"data-product-id",
|
|
12420
12613
|
"data-user-id"
|
|
12421
12614
|
];
|
|
12422
|
-
const
|
|
12615
|
+
const jt = [
|
|
12423
12616
|
// Google Analytics / GTM
|
|
12424
12617
|
"data-ga",
|
|
12425
12618
|
"data-gtm",
|
|
@@ -12456,7 +12649,7 @@ const kt = [
|
|
|
12456
12649
|
"data-segment",
|
|
12457
12650
|
"data-analytics"
|
|
12458
12651
|
];
|
|
12459
|
-
const
|
|
12652
|
+
const Wt = [
|
|
12460
12653
|
"data-category",
|
|
12461
12654
|
// Google Analytics category
|
|
12462
12655
|
"data-action",
|
|
@@ -12466,7 +12659,7 @@ const qt = [
|
|
|
12466
12659
|
"data-value"
|
|
12467
12660
|
// Google Analytics value
|
|
12468
12661
|
];
|
|
12469
|
-
const
|
|
12662
|
+
const Bt = [
|
|
12470
12663
|
"id",
|
|
12471
12664
|
"name",
|
|
12472
12665
|
"type",
|
|
@@ -12476,7 +12669,7 @@ const Ot = [
|
|
|
12476
12669
|
"alt",
|
|
12477
12670
|
"href"
|
|
12478
12671
|
];
|
|
12479
|
-
const
|
|
12672
|
+
const Gt = [
|
|
12480
12673
|
"disabled",
|
|
12481
12674
|
"checked",
|
|
12482
12675
|
"selected",
|
|
@@ -12485,17 +12678,17 @@ const _t = [
|
|
|
12485
12678
|
"required",
|
|
12486
12679
|
"value"
|
|
12487
12680
|
];
|
|
12488
|
-
const
|
|
12681
|
+
const Vt = [
|
|
12489
12682
|
/^radix-/,
|
|
12490
12683
|
/^headlessui-/,
|
|
12491
12684
|
/^mui-/,
|
|
12492
12685
|
/:\w+:/
|
|
12493
12686
|
// matches :ru:, :r1:, etc.
|
|
12494
12687
|
];
|
|
12495
|
-
function
|
|
12496
|
-
return
|
|
12688
|
+
function Qt(r2, t2) {
|
|
12689
|
+
return Ot.includes(r2) ? true : qt.includes(r2) || Ut.includes(r2) || zt.some((e2) => r2.startsWith(e2)) ? false : Ft.includes(r2) ? true : jt.some((e2) => r2.startsWith(e2)) || Wt.includes(r2) ? false : r2.startsWith("data-") && r2.endsWith("-id") ? true : r2 === "id" ? !Vt.some((e2) => e2.test(t2)) : Bt.includes(r2) ? true : Gt.includes(r2) ? false : !!r2.startsWith("data-");
|
|
12497
12690
|
}
|
|
12498
|
-
class
|
|
12691
|
+
class nt2 {
|
|
12499
12692
|
constructor(t2, e2) {
|
|
12500
12693
|
var _a2;
|
|
12501
12694
|
this.includeUtilityClasses = (_a2 = t2.includeUtilityClasses) != null ? _a2 : false, this.cache = e2;
|
|
@@ -12512,12 +12705,12 @@ class st2 {
|
|
|
12512
12705
|
return i2;
|
|
12513
12706
|
}
|
|
12514
12707
|
const e2 = {}, s2 = t2.id;
|
|
12515
|
-
if (s2 && !
|
|
12708
|
+
if (s2 && !L(s2) && (e2.id = s2), t2.classList.length > 0) {
|
|
12516
12709
|
const i2 = Array.from(t2.classList);
|
|
12517
12710
|
if (this.includeUtilityClasses)
|
|
12518
12711
|
e2.classes = i2;
|
|
12519
12712
|
else {
|
|
12520
|
-
const { semantic: o2 } =
|
|
12713
|
+
const { semantic: o2 } = It(i2);
|
|
12521
12714
|
o2.length > 0 && (e2.classes = o2);
|
|
12522
12715
|
}
|
|
12523
12716
|
}
|
|
@@ -12546,7 +12739,7 @@ class st2 {
|
|
|
12546
12739
|
* @returns True if should be ignored
|
|
12547
12740
|
*/
|
|
12548
12741
|
shouldIgnoreAttribute(t2) {
|
|
12549
|
-
return !!(
|
|
12742
|
+
return !!(Y.has(t2) || t2.startsWith("on") || t2.startsWith("ng-") || t2.startsWith("_ng") || t2.startsWith("data-reactid") || t2.startsWith("data-react") || t2.startsWith("data-v-"));
|
|
12550
12743
|
}
|
|
12551
12744
|
/**
|
|
12552
12745
|
* Gets attribute priority
|
|
@@ -12581,7 +12774,7 @@ class st2 {
|
|
|
12581
12774
|
const e2 = {};
|
|
12582
12775
|
for (const s2 of Array.from(t2.attributes)) {
|
|
12583
12776
|
const n2 = s2.name;
|
|
12584
|
-
if (this.shouldIgnoreAttribute(n2) || !
|
|
12777
|
+
if (this.shouldIgnoreAttribute(n2) || !Qt(n2, s2.value) || Z.has(n2) && K(s2.value) || this.getAttributePriority(n2) === 0)
|
|
12585
12778
|
continue;
|
|
12586
12779
|
const i2 = n2 === "href" || n2 === "src" ? D(n2, s2.value) : s2.value;
|
|
12587
12780
|
!i2 || i2.trim() === "" || this.isDynamicValue(i2) || (e2[n2] = i2);
|
|
@@ -12595,7 +12788,7 @@ class st2 {
|
|
|
12595
12788
|
const e2 = this.getDirectTextContent(t2);
|
|
12596
12789
|
if (!e2)
|
|
12597
12790
|
return null;
|
|
12598
|
-
const s2 =
|
|
12791
|
+
const s2 = j(e2);
|
|
12599
12792
|
if (!s2)
|
|
12600
12793
|
return null;
|
|
12601
12794
|
const n2 = 100, a2 = e2.length > n2 ? e2.slice(0, n2) + "..." : e2, i2 = s2.length > n2 ? s2.slice(0, n2) + "..." : s2;
|
|
@@ -12645,7 +12838,7 @@ class st2 {
|
|
|
12645
12838
|
].includes(e2);
|
|
12646
12839
|
}
|
|
12647
12840
|
}
|
|
12648
|
-
class
|
|
12841
|
+
class Yt2 {
|
|
12649
12842
|
/**
|
|
12650
12843
|
* Generates fingerprint for SVG element
|
|
12651
12844
|
* @param element - SVG element to fingerprint
|
|
@@ -12760,11 +12953,11 @@ class Ft2 {
|
|
|
12760
12953
|
return Math.abs(e2).toString(16).padStart(8, "0");
|
|
12761
12954
|
}
|
|
12762
12955
|
}
|
|
12763
|
-
function
|
|
12764
|
-
const e2 = r2.anchor.score, s2 = r2.path.length > 0 ? r2.path.reduce((o2, c2) => o2 + c2.score, 0) / r2.path.length : 0.5, n2 = r2.target.score, a2 = e2 *
|
|
12956
|
+
function Zt(r2, t2 = 0) {
|
|
12957
|
+
const e2 = r2.anchor.score, s2 = r2.path.length > 0 ? r2.path.reduce((o2, c2) => o2 + c2.score, 0) / r2.path.length : 0.5, n2 = r2.target.score, a2 = e2 * z.ANCHOR + s2 * z.PATH + n2 * z.TARGET + t2 * z.UNIQUENESS, i2 = r2.anchor.degraded ? 0.2 : 0;
|
|
12765
12958
|
return Math.max(0, Math.min(1, a2 - i2));
|
|
12766
12959
|
}
|
|
12767
|
-
class
|
|
12960
|
+
class Kt2 {
|
|
12768
12961
|
constructor(t2) {
|
|
12769
12962
|
this.cache = /* @__PURE__ */ new Map(), this.maxSize = t2;
|
|
12770
12963
|
}
|
|
@@ -12795,10 +12988,10 @@ class Wt2 {
|
|
|
12795
12988
|
return this.cache.size;
|
|
12796
12989
|
}
|
|
12797
12990
|
}
|
|
12798
|
-
class
|
|
12991
|
+
class Xt2 {
|
|
12799
12992
|
constructor(t2 = {}) {
|
|
12800
12993
|
var _a2, _b;
|
|
12801
|
-
this.eidCache = /* @__PURE__ */ new WeakMap(), this.selectorResultCache = new
|
|
12994
|
+
this.eidCache = /* @__PURE__ */ new WeakMap(), this.selectorResultCache = new Kt2(
|
|
12802
12995
|
(_a2 = t2.maxSelectorCacheSize) != null ? _a2 : 1e3
|
|
12803
12996
|
), this.anchorCache = /* @__PURE__ */ new WeakMap(), this.semanticsCache = /* @__PURE__ */ new WeakMap(), this.stats = {
|
|
12804
12997
|
eidHits: 0,
|
|
@@ -12946,12 +13139,12 @@ class Bt2 {
|
|
|
12946
13139
|
return s2 > 0 ? t2 / s2 : 0;
|
|
12947
13140
|
}
|
|
12948
13141
|
}
|
|
12949
|
-
function
|
|
12950
|
-
return new
|
|
13142
|
+
function Jt(r2) {
|
|
13143
|
+
return new Xt2(r2);
|
|
12951
13144
|
}
|
|
12952
|
-
let
|
|
12953
|
-
function
|
|
12954
|
-
return
|
|
13145
|
+
let F = null;
|
|
13146
|
+
function X() {
|
|
13147
|
+
return F || (F = Jt()), F;
|
|
12955
13148
|
}
|
|
12956
13149
|
function k(r2) {
|
|
12957
13150
|
if (r2.ownerDocument)
|
|
@@ -12969,7 +13162,7 @@ function k(r2) {
|
|
|
12969
13162
|
3. You are working with a document node instead of an element`
|
|
12970
13163
|
);
|
|
12971
13164
|
}
|
|
12972
|
-
function
|
|
13165
|
+
function te(r2, t2) {
|
|
12973
13166
|
if (!t2)
|
|
12974
13167
|
return;
|
|
12975
13168
|
const e2 = k(r2), s2 = t2 instanceof Document ? t2 : k(t2);
|
|
@@ -12984,66 +13177,67 @@ Common causes:
|
|
|
12984
13177
|
Solution: Ensure element and root parameter are from the same document context.`
|
|
12985
13178
|
);
|
|
12986
13179
|
}
|
|
12987
|
-
function
|
|
13180
|
+
function J(r2, t2 = {}) {
|
|
12988
13181
|
var _a3, _b, _c, _d;
|
|
12989
13182
|
var _a2;
|
|
12990
13183
|
if (!r2 || !r2.ownerDocument || !r2.isConnected)
|
|
12991
13184
|
return null;
|
|
12992
|
-
const e2 = __spreadValues(__spreadValues({},
|
|
13185
|
+
const e2 = __spreadValues(__spreadValues({}, At), t2);
|
|
12993
13186
|
if (e2.root)
|
|
12994
13187
|
try {
|
|
12995
|
-
|
|
13188
|
+
te(r2, e2.root);
|
|
12996
13189
|
} catch (x2) {
|
|
12997
13190
|
return console.error("Cross-document generation detected:", x2), null;
|
|
12998
13191
|
}
|
|
12999
|
-
const s2 = (_a3 = e2.cache) != null ? _a3 :
|
|
13192
|
+
const s2 = (_a3 = e2.cache) != null ? _a3 : X(), n2 = s2.getEID(r2);
|
|
13000
13193
|
if (n2 !== void 0)
|
|
13001
13194
|
return n2;
|
|
13002
|
-
|
|
13003
|
-
|
|
13195
|
+
const a2 = r2.tagName.toLowerCase();
|
|
13196
|
+
if (a2 === "html") {
|
|
13197
|
+
const x2 = new nt2(e2, s2), y = re(r2, e2, x2);
|
|
13004
13198
|
return s2.setEID(r2, y), y;
|
|
13005
13199
|
}
|
|
13006
|
-
const i2 = new
|
|
13007
|
-
if (!
|
|
13200
|
+
const i2 = new Ct2(e2, s2), o2 = new Pt2(e2, s2), c2 = new nt2(e2, s2), l2 = new Yt2(), f2 = i2.findAnchor(r2);
|
|
13201
|
+
if (!f2 && !e2.fallbackToBody)
|
|
13008
13202
|
return null;
|
|
13009
|
-
const
|
|
13010
|
-
if (!
|
|
13203
|
+
const h = (_c = (_b = f2 == null ? void 0 : f2.element) != null ? _b : (_a2 = r2.ownerDocument) == null ? void 0 : _a2.body) != null ? _c : null;
|
|
13204
|
+
if (!h)
|
|
13011
13205
|
return null;
|
|
13012
|
-
const
|
|
13013
|
-
let
|
|
13014
|
-
if (
|
|
13015
|
-
const y = Array.from(
|
|
13016
|
-
y !== -1 && (
|
|
13017
|
-
}
|
|
13018
|
-
const
|
|
13019
|
-
tag:
|
|
13020
|
-
semantics:
|
|
13021
|
-
score: (_d =
|
|
13022
|
-
degraded:
|
|
13023
|
-
nthChild:
|
|
13024
|
-
}, S = o2.buildPath(
|
|
13025
|
-
e2.enableSvgFingerprint &&
|
|
13206
|
+
const d = !f2 || f2.tier === "C", u2 = h.tagName.toLowerCase(), g = c2.extract(h), m = h.parentElement;
|
|
13207
|
+
let p;
|
|
13208
|
+
if (m && u2 !== "body" && u2 !== "html" && _(u2, g, h)) {
|
|
13209
|
+
const y = Array.from(m.children).indexOf(h);
|
|
13210
|
+
y !== -1 && (p = y + 1);
|
|
13211
|
+
}
|
|
13212
|
+
const b = {
|
|
13213
|
+
tag: h.tagName.toLowerCase(),
|
|
13214
|
+
semantics: g,
|
|
13215
|
+
score: (_d = f2 == null ? void 0 : f2.score) != null ? _d : I.DEGRADED_SCORE,
|
|
13216
|
+
degraded: d,
|
|
13217
|
+
nthChild: p
|
|
13218
|
+
}, S = o2.buildPath(h, r2, c2), T = c2.extract(r2);
|
|
13219
|
+
e2.enableSvgFingerprint && ee(r2) && (T.svg = l2.fingerprint(r2));
|
|
13026
13220
|
const C = r2.parentElement;
|
|
13027
13221
|
let A;
|
|
13028
|
-
if (C) {
|
|
13222
|
+
if (C && _(a2, T, r2)) {
|
|
13029
13223
|
const y = Array.from(C.children).indexOf(r2);
|
|
13030
13224
|
y !== -1 && (A = y + 1);
|
|
13031
13225
|
}
|
|
13032
13226
|
const v2 = {
|
|
13033
13227
|
tag: r2.tagName.toLowerCase(),
|
|
13034
|
-
semantics:
|
|
13228
|
+
semantics: T,
|
|
13035
13229
|
score: c2.scoreElement(r2),
|
|
13036
13230
|
nthChild: A
|
|
13037
|
-
},
|
|
13231
|
+
}, P = [], $ = {
|
|
13038
13232
|
onMultiple: "best-score",
|
|
13039
13233
|
onMissing: "anchor-only",
|
|
13040
13234
|
maxDepth: 3
|
|
13041
|
-
},
|
|
13235
|
+
}, E = b.degraded || S.degraded, R = se(b.degraded, S), N = {
|
|
13042
13236
|
version: "1.0",
|
|
13043
13237
|
anchor: b,
|
|
13044
13238
|
path: S.path,
|
|
13045
13239
|
target: v2,
|
|
13046
|
-
constraints:
|
|
13240
|
+
constraints: P,
|
|
13047
13241
|
fallback: $,
|
|
13048
13242
|
meta: {
|
|
13049
13243
|
confidence: 0,
|
|
@@ -13051,16 +13245,16 @@ function X(r2, t2 = {}) {
|
|
|
13051
13245
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
13052
13246
|
generator: "dom-eid@1.0",
|
|
13053
13247
|
source: e2.source,
|
|
13054
|
-
degraded:
|
|
13248
|
+
degraded: E,
|
|
13055
13249
|
degradationReason: R
|
|
13056
13250
|
}
|
|
13057
13251
|
};
|
|
13058
|
-
return N.meta.confidence =
|
|
13252
|
+
return N.meta.confidence = Zt(N), N.meta.confidence < e2.confidenceThreshold ? null : (s2.setEID(r2, N), N);
|
|
13059
13253
|
}
|
|
13060
|
-
function
|
|
13254
|
+
function ee(r2) {
|
|
13061
13255
|
return r2.namespaceURI === "http://www.w3.org/2000/svg" || r2.tagName.toLowerCase() === "svg" || r2 instanceof SVGElement;
|
|
13062
13256
|
}
|
|
13063
|
-
function
|
|
13257
|
+
function se(r2, t2) {
|
|
13064
13258
|
if (r2 && t2.degraded)
|
|
13065
13259
|
return "anchor-and-path-degraded";
|
|
13066
13260
|
if (r2)
|
|
@@ -13068,7 +13262,7 @@ function Yt(r2, t2) {
|
|
|
13068
13262
|
if (t2.degraded)
|
|
13069
13263
|
return t2.degradationReason;
|
|
13070
13264
|
}
|
|
13071
|
-
function
|
|
13265
|
+
function re(r2, t2, e2, s2) {
|
|
13072
13266
|
const a2 = {
|
|
13073
13267
|
tag: "html",
|
|
13074
13268
|
semantics: e2.extract(r2),
|
|
@@ -13097,91 +13291,124 @@ function Zt(r2, t2, e2, s2) {
|
|
|
13097
13291
|
}
|
|
13098
13292
|
};
|
|
13099
13293
|
}
|
|
13100
|
-
const
|
|
13294
|
+
const ht = {
|
|
13295
|
+
id: "i",
|
|
13296
|
+
"data-testid": "tid",
|
|
13297
|
+
"data-qa": "qa",
|
|
13298
|
+
"data-cy": "cy",
|
|
13299
|
+
"data-test": "dt",
|
|
13300
|
+
"aria-label": "al",
|
|
13301
|
+
"aria-labelledby": "alb",
|
|
13302
|
+
"aria-describedby": "adb",
|
|
13303
|
+
name: "n",
|
|
13304
|
+
href: "h",
|
|
13305
|
+
src: "s",
|
|
13306
|
+
type: "t",
|
|
13307
|
+
role: "r",
|
|
13308
|
+
alt: "at",
|
|
13309
|
+
title: "tt",
|
|
13310
|
+
for: "f",
|
|
13311
|
+
placeholder: "ph",
|
|
13312
|
+
text: "x"
|
|
13313
|
+
};
|
|
13314
|
+
const G = Object.fromEntries(
|
|
13315
|
+
Object.entries(ht).map(([r2, t2]) => [t2, r2])
|
|
13316
|
+
);
|
|
13317
|
+
const ut = {
|
|
13101
13318
|
maxClasses: 2,
|
|
13102
13319
|
maxAttributes: 5,
|
|
13103
13320
|
includeText: true,
|
|
13104
13321
|
maxTextLength: 50,
|
|
13105
13322
|
simplifyTarget: true,
|
|
13106
|
-
includeConstraints: true
|
|
13323
|
+
includeConstraints: true,
|
|
13324
|
+
format: "compact"
|
|
13107
13325
|
};
|
|
13108
|
-
function
|
|
13326
|
+
function ct(r2) {
|
|
13109
13327
|
return r2 === "id" ? 101 : w[r2] !== void 0 ? w[r2] : r2.startsWith("data-") ? w["data-*"] : r2.startsWith("aria-") ? w["aria-*"] : 0;
|
|
13110
13328
|
}
|
|
13111
|
-
function
|
|
13329
|
+
function de(r2) {
|
|
13112
13330
|
return ["id", "data-testid", "data-qa", "data-cy", "href", "text", "role"].includes(r2);
|
|
13113
13331
|
}
|
|
13114
|
-
function
|
|
13332
|
+
function fe(r2) {
|
|
13115
13333
|
return !!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(r2) || /(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(r2) || /\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(r2));
|
|
13116
13334
|
}
|
|
13117
|
-
function
|
|
13118
|
-
const e2 = __spreadValues(__spreadValues({},
|
|
13119
|
-
return `${
|
|
13120
|
-
}
|
|
13121
|
-
function
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
13146
|
-
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13335
|
+
function ge(r2, t2) {
|
|
13336
|
+
const e2 = __spreadValues(__spreadValues({}, ut), t2), s2 = e2.format === "compact", n2 = s2 ? "v1" : `v${r2.version}`, a2 = s2 ? ":" : ": ", i2 = s2 ? "::" : " :: ", o2 = s2 ? ">" : " > ", c2 = e2.includeText && r2.target.semantics.text ? r2.target.semantics.text.normalized : void 0, l2 = W(r2.anchor, false, e2), f2 = r2.path.length > 0 ? r2.path.map((u2) => W(u2, false, e2, c2)).join(o2) + o2 : "", h = W(r2.target, true, e2), d = e2.includeConstraints ? pe(r2, e2) : "";
|
|
13337
|
+
return `${n2}${a2}${l2}${i2}${f2}${h}${d}`;
|
|
13338
|
+
}
|
|
13339
|
+
function W(r2, t2 = false, e2 = ut, s2) {
|
|
13340
|
+
var _a2;
|
|
13341
|
+
const { tag: n2, semantics: a2 } = r2, i2 = e2.format === "compact";
|
|
13342
|
+
let o2 = n2;
|
|
13343
|
+
const c2 = [], l2 = __spreadValues({}, a2.attributes);
|
|
13344
|
+
a2.id && (l2.id = a2.id), a2.role && !l2.role && (l2.role = a2.role);
|
|
13345
|
+
const f2 = Object.entries(l2).map(([u2, g]) => {
|
|
13346
|
+
const m = ct(u2), p = u2 === "href" || u2 === "src" ? D(u2, g) : g;
|
|
13347
|
+
return { name: u2, value: p, priority: m };
|
|
13348
|
+
}).filter((u2) => u2.name !== "id" && u2.name !== "class" && Y.has(u2.name) || Z.has(u2.name) && K(u2.value) ? false : u2.priority > 0 || u2.name === "role" || u2.name === "id");
|
|
13349
|
+
f2.sort((u2, g) => g.priority - u2.priority);
|
|
13350
|
+
const h = f2.slice(0, e2.maxAttributes);
|
|
13351
|
+
h.sort((u2, g) => u2.name.localeCompare(g.name));
|
|
13352
|
+
for (const { name: u2, value: g } of h) {
|
|
13353
|
+
const m = i2 ? (_a2 = ht[u2]) != null ? _a2 : u2 : u2;
|
|
13354
|
+
c2.push(`${m}="${V(g)}"`);
|
|
13355
|
+
}
|
|
13356
|
+
if (e2.includeText && a2.text && !fe(a2.text.normalized)) {
|
|
13357
|
+
const u2 = a2.text.normalized;
|
|
13358
|
+
if (u2.length > 0 && u2.length <= e2.maxTextLength && !(!t2 && s2 !== void 0 && u2 === s2)) {
|
|
13359
|
+
const m = i2 ? "x" : "text";
|
|
13360
|
+
c2.push(`${m}="${V(u2)}"`);
|
|
13361
|
+
}
|
|
13362
|
+
}
|
|
13363
|
+
let d = c2;
|
|
13364
|
+
if (c2.length > 0 && t2 && e2.simplifyTarget && a2.id && (d = c2.filter((u2) => {
|
|
13365
|
+
var _a3;
|
|
13366
|
+
const g = u2.split("=")[0], m = (_a3 = G[g]) != null ? _a3 : g;
|
|
13367
|
+
return ct(m) >= 60 || m === "text" || m === "id" || m === "role";
|
|
13368
|
+
})), a2.classes && a2.classes.length > 0) {
|
|
13369
|
+
const u2 = M(a2.classes), g = !!a2.id || c2.some((p) => {
|
|
13370
|
+
var _a3;
|
|
13371
|
+
const b = p.split("=")[0], S = (_a3 = G[b]) != null ? _a3 : b;
|
|
13372
|
+
return S === "href" || S === "data-testid" || S === "text" || S === "role";
|
|
13373
|
+
});
|
|
13374
|
+
if (!(t2 && e2.simplifyTarget && g) && u2.length > 0) {
|
|
13375
|
+
const p = u2.sort().slice(0, e2.maxClasses);
|
|
13376
|
+
o2 += p.map((b) => `.${b}`).join("");
|
|
13150
13377
|
}
|
|
13151
13378
|
}
|
|
13152
|
-
if (d.length > 0 && (
|
|
13153
|
-
const
|
|
13154
|
-
t2 && e2.simplifyTarget &&
|
|
13379
|
+
if (d.length > 0 && (o2 += `[${d.join(",")}]`), "nthChild" in r2 && r2.nthChild) {
|
|
13380
|
+
const u2 = !!a2.id || a2.attributes && Object.keys(a2.attributes).some(de);
|
|
13381
|
+
t2 && e2.simplifyTarget && u2 || (o2 += `#${r2.nthChild}`);
|
|
13155
13382
|
}
|
|
13156
|
-
return
|
|
13383
|
+
return o2;
|
|
13157
13384
|
}
|
|
13158
|
-
function
|
|
13385
|
+
function pe(r2, t2) {
|
|
13159
13386
|
if (!r2.constraints || r2.constraints.length === 0)
|
|
13160
13387
|
return "";
|
|
13161
|
-
const
|
|
13162
|
-
for (const
|
|
13163
|
-
switch (
|
|
13388
|
+
const e2 = [];
|
|
13389
|
+
for (const n2 of r2.constraints)
|
|
13390
|
+
switch (n2.type) {
|
|
13164
13391
|
case "uniqueness":
|
|
13165
|
-
|
|
13392
|
+
e2.push("unique=true");
|
|
13166
13393
|
break;
|
|
13167
13394
|
case "position":
|
|
13168
|
-
|
|
13395
|
+
n2.params && n2.params.strategy && e2.push(`pos=${n2.params.strategy}`);
|
|
13169
13396
|
break;
|
|
13170
13397
|
case "text-proximity":
|
|
13171
|
-
if (
|
|
13172
|
-
const
|
|
13173
|
-
|
|
13398
|
+
if (n2.params && n2.params.reference) {
|
|
13399
|
+
const a2 = V(String(n2.params.reference));
|
|
13400
|
+
e2.push(`text="${a2}"`);
|
|
13174
13401
|
}
|
|
13175
13402
|
break;
|
|
13176
13403
|
}
|
|
13177
|
-
return
|
|
13404
|
+
return e2.length === 0 ? "" : `${t2.format === "verbose" ? " " : ""}{${e2.join(",")}}`;
|
|
13178
13405
|
}
|
|
13179
|
-
function
|
|
13406
|
+
function V(r2) {
|
|
13180
13407
|
return r2.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/>/g, "\\>").replace(/:/g, "\\:");
|
|
13181
13408
|
}
|
|
13182
|
-
function
|
|
13183
|
-
const s2 =
|
|
13184
|
-
return s2 ?
|
|
13409
|
+
function Ne(r2, t2, e2) {
|
|
13410
|
+
const s2 = J(r2, t2);
|
|
13411
|
+
return s2 ? ge(s2, e2) : null;
|
|
13185
13412
|
}
|
|
13186
13413
|
const defaultSelectorOptions = {
|
|
13187
13414
|
maxPathDepth: 10,
|
|
@@ -13228,7 +13455,7 @@ function resolveNodeSelector(node2, mirror2, selectorOptions, options) {
|
|
|
13228
13455
|
fallbackToBody: selectorOptions.fallbackToBody
|
|
13229
13456
|
};
|
|
13230
13457
|
try {
|
|
13231
|
-
const selector =
|
|
13458
|
+
const selector = Ne(element, seqlOptions);
|
|
13232
13459
|
if (selector) {
|
|
13233
13460
|
if (elementMeta) {
|
|
13234
13461
|
elementMeta.selector = selector;
|
|
@@ -14367,7 +14594,8 @@ function initInputObserver({
|
|
|
14367
14594
|
maskInputOptions,
|
|
14368
14595
|
maskInputFn,
|
|
14369
14596
|
sampling,
|
|
14370
|
-
userTriggeredOnInput
|
|
14597
|
+
userTriggeredOnInput,
|
|
14598
|
+
trustSyntheticInput
|
|
14371
14599
|
}) {
|
|
14372
14600
|
function eventHandler(event) {
|
|
14373
14601
|
let target = getEventTarget(event);
|
|
@@ -14417,34 +14645,53 @@ function initInputObserver({
|
|
|
14417
14645
|
function cbWithDedup(target, v2) {
|
|
14418
14646
|
const lastInputValue = lastInputValueMap.get(target);
|
|
14419
14647
|
const el = target;
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14648
|
+
if (trustSyntheticInput) {
|
|
14649
|
+
const isInitialEmpty = !v2.userTriggered && el.value === "" && !v2.isChecked && !lastInputValue;
|
|
14650
|
+
const isSelectDefaultSelection = el.tagName === "SELECT" && !v2.userTriggered && !lastInputValue && el.selectedIndex === 0;
|
|
14651
|
+
if (isInitialEmpty || isSelectDefaultSelection) {
|
|
14652
|
+
console.debug(
|
|
14653
|
+
`[${nowTimestamp()}] [rrweb:record/observer] phantom input ignored (trust mode)`,
|
|
14654
|
+
{
|
|
14655
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
|
14656
|
+
node: index.describeNode(el),
|
|
14657
|
+
tag: el.tagName,
|
|
14658
|
+
value: el.value,
|
|
14659
|
+
isInitialEmpty,
|
|
14660
|
+
isSelectDefaultSelection
|
|
14661
|
+
}
|
|
14662
|
+
);
|
|
14663
|
+
return;
|
|
14664
|
+
}
|
|
14665
|
+
} else {
|
|
14666
|
+
const hasPlaceholder = el.hasAttribute("placeholder");
|
|
14667
|
+
const isEmpty = el.value === "";
|
|
14668
|
+
const isDefaultEmpty = typeof el.defaultValue === "string" ? el.defaultValue === "" : true;
|
|
14669
|
+
const isNonUser = !v2.userTriggered;
|
|
14670
|
+
const isRepeatEmpty = !lastInputValue || lastInputValue.text === "";
|
|
14671
|
+
const isLikelyPhantom = hasPlaceholder && isEmpty && isDefaultEmpty && isRepeatEmpty && isNonUser && !v2.isChecked && el.type !== "hidden" && INPUT_TAGS.includes(el.tagName);
|
|
14672
|
+
const isRenderDrivenTextInput = el.tagName === "INPUT" && el.type === "text" && !v2.userTriggered && v2.text === el.defaultValue && !lastInputValue && el.hasAttribute("placeholder");
|
|
14673
|
+
const isValueFromDefault = !v2.userTriggered && el.value === el.defaultValue && !lastInputValue && el.hasAttribute("placeholder") && !v2.isChecked && el.type !== "hidden" && INPUT_TAGS.includes(el.tagName);
|
|
14674
|
+
const isPhantomCheckbox = el.type === "checkbox" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
|
|
14675
|
+
const isPhantomRadio = el.type === "radio" && !v2.userTriggered && !v2.isChecked && !lastInputValue;
|
|
14676
|
+
if (isLikelyPhantom || isRenderDrivenTextInput || isValueFromDefault || isPhantomCheckbox || isPhantomRadio) {
|
|
14677
|
+
console.debug(
|
|
14678
|
+
`[${nowTimestamp()}] [rrweb:record/observer] \u26D4 phantom input ignored`,
|
|
14679
|
+
{
|
|
14680
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-call
|
|
14681
|
+
node: index.describeNode(el),
|
|
14682
|
+
tag: el.tagName,
|
|
14683
|
+
nodeType: el.nodeType,
|
|
14684
|
+
attribute: el.attributes,
|
|
14685
|
+
value: el.value,
|
|
14686
|
+
isLikelyPhantom,
|
|
14687
|
+
isRenderDrivenTextInput,
|
|
14688
|
+
isValueFromDefault,
|
|
14689
|
+
isPhantomCheckbox,
|
|
14690
|
+
isPhantomRadio
|
|
14691
|
+
}
|
|
14692
|
+
);
|
|
14693
|
+
return;
|
|
14694
|
+
}
|
|
14448
14695
|
}
|
|
14449
14696
|
if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) {
|
|
14450
14697
|
lastInputValueMap.set(target, v2);
|
|
@@ -16508,8 +16755,15 @@ class NavigationManager {
|
|
|
16508
16755
|
return;
|
|
16509
16756
|
if (this.locked)
|
|
16510
16757
|
return;
|
|
16511
|
-
this.
|
|
16512
|
-
|
|
16758
|
+
if (this.pendingNavigation) {
|
|
16759
|
+
this.cancelTimers();
|
|
16760
|
+
this.disconnectSettlingObserver();
|
|
16761
|
+
this.pendingNavigation = null;
|
|
16762
|
+
this.onSnapshot(true);
|
|
16763
|
+
} else {
|
|
16764
|
+
this.cancelTimers();
|
|
16765
|
+
this.disconnectSettlingObserver();
|
|
16766
|
+
}
|
|
16513
16767
|
this.pendingNavigation = data;
|
|
16514
16768
|
if (this.frozen) {
|
|
16515
16769
|
return;
|
|
@@ -16723,7 +16977,7 @@ class ProcessedNodeManager {
|
|
|
16723
16977
|
destroy() {
|
|
16724
16978
|
}
|
|
16725
16979
|
}
|
|
16726
|
-
const version$1 = "3.
|
|
16980
|
+
const version$1 = "3.11.0-alpha.1";
|
|
16727
16981
|
let wrappedEmit;
|
|
16728
16982
|
let takeFullSnapshot$1;
|
|
16729
16983
|
let canvasManager;
|
|
@@ -16772,6 +17026,7 @@ function record(options = {}) {
|
|
|
16772
17026
|
recordAfter = options.recordAfter === "DOMContentLoaded" ? options.recordAfter : "load",
|
|
16773
17027
|
flushCustomEvent = options.flushCustomEvent !== void 0 ? options.flushCustomEvent : "after",
|
|
16774
17028
|
userTriggeredOnInput = false,
|
|
17029
|
+
trustSyntheticInput = false,
|
|
16775
17030
|
collectFonts = false,
|
|
16776
17031
|
inlineImages = false,
|
|
16777
17032
|
plugins,
|
|
@@ -17298,6 +17553,7 @@ function record(options = {}) {
|
|
|
17298
17553
|
recordCanvas,
|
|
17299
17554
|
inlineImages,
|
|
17300
17555
|
userTriggeredOnInput,
|
|
17556
|
+
trustSyntheticInput,
|
|
17301
17557
|
collectFonts,
|
|
17302
17558
|
doc,
|
|
17303
17559
|
maskInputFn,
|
|
@@ -17376,6 +17632,43 @@ function record(options = {}) {
|
|
|
17376
17632
|
);
|
|
17377
17633
|
}
|
|
17378
17634
|
return () => {
|
|
17635
|
+
if (recording) {
|
|
17636
|
+
const activeEl = document.activeElement;
|
|
17637
|
+
if (activeEl && INPUT_TAGS.includes(activeEl.tagName)) {
|
|
17638
|
+
const inputEl = activeEl;
|
|
17639
|
+
const id = mirror.getId(inputEl);
|
|
17640
|
+
if (id !== -1) {
|
|
17641
|
+
const lastValue = lastInputValueMap.get(inputEl);
|
|
17642
|
+
let text = inputEl.value;
|
|
17643
|
+
let isChecked = false;
|
|
17644
|
+
const type = getInputType(inputEl) || "";
|
|
17645
|
+
if (type === "radio" || type === "checkbox") {
|
|
17646
|
+
isChecked = inputEl.checked;
|
|
17647
|
+
} else if (maskInputOptions[inputEl.tagName.toLowerCase()] || maskInputOptions[type]) {
|
|
17648
|
+
text = maskInputValue({
|
|
17649
|
+
element: inputEl,
|
|
17650
|
+
maskInputOptions,
|
|
17651
|
+
tagName: inputEl.tagName,
|
|
17652
|
+
type,
|
|
17653
|
+
value: text,
|
|
17654
|
+
maskInputFn
|
|
17655
|
+
});
|
|
17656
|
+
}
|
|
17657
|
+
if (!lastValue || lastValue.text !== text || lastValue.isChecked !== isChecked) {
|
|
17658
|
+
const inputData = userTriggeredOnInput ? { text, isChecked, userTriggered: false } : { text, isChecked };
|
|
17659
|
+
lastInputValueMap.set(inputEl, inputData);
|
|
17660
|
+
wrappedEmit({
|
|
17661
|
+
type: EventType.IncrementalSnapshot,
|
|
17662
|
+
data: __spreadProps(__spreadValues({
|
|
17663
|
+
source: IncrementalSource.Input
|
|
17664
|
+
}, inputData), {
|
|
17665
|
+
id
|
|
17666
|
+
})
|
|
17667
|
+
});
|
|
17668
|
+
}
|
|
17669
|
+
}
|
|
17670
|
+
}
|
|
17671
|
+
}
|
|
17379
17672
|
if (checkoutDebounceTimer) {
|
|
17380
17673
|
clearTimeout(checkoutDebounceTimer);
|
|
17381
17674
|
checkoutDebounceTimer = null;
|