@applitools/eyes-browser 1.6.11 → 1.6.12
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/CHANGELOG.md +150 -0
- package/dist/index.js +522 -466
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -74554,393 +74554,312 @@ var require_dist3 = __commonJS({
|
|
|
74554
74554
|
init_setImmediate();
|
|
74555
74555
|
init_buffer();
|
|
74556
74556
|
init_setInterval();
|
|
74557
|
-
exports.
|
|
74557
|
+
exports.translateTo = function(arg) {
|
|
74558
74558
|
var s = function() {
|
|
74559
74559
|
"use strict";
|
|
74560
|
-
function
|
|
74561
|
-
return
|
|
74562
|
-
}
|
|
74563
|
-
var t = function(e2) {
|
|
74564
|
-
var t2 = e2 && e2[0] || null;
|
|
74565
|
-
return !t2 || ("isConnected" in window.Node.prototype ? !t2.isConnected : document.documentElement.contains ? !document.documentElement.contains(t2) : !t2.ownerDocument.documentElement.contains(t2));
|
|
74566
|
-
}, r = t;
|
|
74567
|
-
var n = function(e2) {
|
|
74568
|
-
if (!e2.hasAttribute("data-applitools-fallback-selector")) {
|
|
74569
|
-
if (r([e2]))
|
|
74570
|
-
throw new Error("The element is not connected to the DOM: " + function(e3) {
|
|
74571
|
-
var t2 = e3.attributes, r2 = e3.tagName, n2 = e3.children.length, o2 = [].slice.call(t2).map(function(e4) {
|
|
74572
|
-
return e4.name + '="' + e4.value + '"';
|
|
74573
|
-
}).join(" ");
|
|
74574
|
-
return "<" + r2 + " " + o2 + (n2 ? ">" : "/>");
|
|
74575
|
-
}(e2));
|
|
74576
|
-
e2.setAttribute("data-applitools-fallback-selector", function(e3) {
|
|
74577
|
-
var t2 = [];
|
|
74578
|
-
for (; e3 && e3.nodeType === Node.ELEMENT_NODE; )
|
|
74579
|
-
try {
|
|
74580
|
-
var r2, n2 = e3.tagName.toLowerCase(), o2 = [].slice.call((null == (r2 = e3.parentNode) ? void 0 : r2.children) || []).indexOf(e3);
|
|
74581
|
-
o2 > -1 && (n2 += ":nth-child(" + (o2 + 1) + ")"), t2.unshift(n2), e3 = e3.parentNode;
|
|
74582
|
-
} catch (e4) {
|
|
74583
|
-
break;
|
|
74584
|
-
}
|
|
74585
|
-
return t2.length ? t2.join(" > ") : "html";
|
|
74586
|
-
}(e2));
|
|
74587
|
-
}
|
|
74588
|
-
}, o = t;
|
|
74589
|
-
function a(e2, t2) {
|
|
74590
|
-
if (o([e2])) {
|
|
74591
|
-
var r2 = function(e3) {
|
|
74592
|
-
if (null == e3 || !e3.getAttribute)
|
|
74593
|
-
return { error: "invalid element: " + JSON.stringify(e3) };
|
|
74594
|
-
var t3 = e3.getAttribute("data-applitools-fallback-selector");
|
|
74595
|
-
return t3;
|
|
74596
|
-
}(e2);
|
|
74597
|
-
if (!r2)
|
|
74598
|
-
return { error: "Failed to recover from stale element" };
|
|
74599
|
-
if (r2.error)
|
|
74600
|
-
return r2;
|
|
74601
|
-
var l = document.querySelectorAll(r2);
|
|
74602
|
-
if (!l || 1 !== l.length)
|
|
74603
|
-
return { error: "Failed to recover from stale element - selector found: " + r2 };
|
|
74604
|
-
var i = l[0];
|
|
74605
|
-
return i.setAttribute("data-applitools-selector", t2), i.setAttribute("data-applitools-recovered", true), a(i, t2);
|
|
74606
|
-
}
|
|
74607
|
-
n(e2);
|
|
74608
|
-
var u = e2.getAttribute("data-applitools-selector"), c = u ? u + " " + t2 : t2;
|
|
74609
|
-
return e2.setAttribute("data-applitools-selector", c), '[data-applitools-selector~="' + t2 + '"]';
|
|
74560
|
+
function t(t2) {
|
|
74561
|
+
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74610
74562
|
}
|
|
74611
|
-
|
|
74612
|
-
|
|
74613
|
-
|
|
74614
|
-
|
|
74615
|
-
|
|
74616
|
-
|
|
74617
|
-
|
|
74618
|
-
|
|
74619
|
-
|
|
74620
|
-
|
|
74621
|
-
|
|
74622
|
-
|
|
74623
|
-
|
|
74624
|
-
r3.add(n2), t4.push({ element: n2, kind: o2 });
|
|
74625
|
-
}
|
|
74626
|
-
}
|
|
74627
|
-
return t4;
|
|
74628
|
-
}(e4);
|
|
74629
|
-
return t3.map(function(e5) {
|
|
74630
|
-
return { selector: a(e5.element, r2), kind: e5.kind };
|
|
74631
|
-
});
|
|
74632
|
-
});
|
|
74633
|
-
});
|
|
74563
|
+
var r = function(t2) {
|
|
74564
|
+
var r2 = void 0 === t2 ? [] : t2, e = r2[0], n = r2[1], o = Object.keys(n).sort(), a = o.reduce(function(t3, r3) {
|
|
74565
|
+
return t3[r3] = { value: e.style.getPropertyValue(r3), important: Boolean(e.style.getPropertyPriority(r3)) }, t3;
|
|
74566
|
+
}, {});
|
|
74567
|
+
return o.forEach(function(t3) {
|
|
74568
|
+
e.style.setProperty(t3, "string" != typeof n[t3] && n[t3] ? n[t3].value : n[t3], n[t3] && n[t3].important ? "important" : "");
|
|
74569
|
+
}), a;
|
|
74570
|
+
};
|
|
74571
|
+
return t(function(t2) {
|
|
74572
|
+
var e = void 0 === t2 ? [] : t2, n = e[0], o = e[1];
|
|
74573
|
+
n = n || document.documentElement;
|
|
74574
|
+
var a = { value: "translate(" + -o.x + "px, " + -o.y + "px)", important: true };
|
|
74575
|
+
return r([n, { transform: a, "-webkit-transform": a }]), o;
|
|
74634
74576
|
});
|
|
74635
74577
|
}();
|
|
74636
74578
|
return s(arg);
|
|
74637
74579
|
};
|
|
74638
|
-
exports.
|
|
74580
|
+
exports.setElementStyleProperties = function(arg) {
|
|
74639
74581
|
var s = function() {
|
|
74640
74582
|
"use strict";
|
|
74641
74583
|
function t(t2) {
|
|
74642
74584
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74643
74585
|
}
|
|
74644
|
-
var e = function(t2) {
|
|
74645
|
-
var e2 = t2 && t2[0] || null;
|
|
74646
|
-
return !e2 || ("isConnected" in window.Node.prototype ? !e2.isConnected : document.documentElement.contains ? !document.documentElement.contains(e2) : !e2.ownerDocument.documentElement.contains(e2));
|
|
74647
|
-
};
|
|
74648
74586
|
return t(function(t2) {
|
|
74649
|
-
|
|
74650
|
-
|
|
74651
|
-
|
|
74652
|
-
|
|
74653
|
-
|
|
74654
|
-
|
|
74655
|
-
return "<" + n + " " + r + (o ? ">" : "/>");
|
|
74656
|
-
}(t2));
|
|
74657
|
-
t2.setAttribute("data-applitools-fallback-selector", function(t3) {
|
|
74658
|
-
var e2 = [];
|
|
74659
|
-
for (; t3 && t3.nodeType === Node.ELEMENT_NODE; )
|
|
74660
|
-
try {
|
|
74661
|
-
var n, o = t3.tagName.toLowerCase(), r = [].slice.call((null == (n = t3.parentNode) ? void 0 : n.children) || []).indexOf(t3);
|
|
74662
|
-
r > -1 && (o += ":nth-child(" + (r + 1) + ")"), e2.unshift(o), t3 = t3.parentNode;
|
|
74663
|
-
} catch (t4) {
|
|
74664
|
-
break;
|
|
74665
|
-
}
|
|
74666
|
-
return e2.length ? e2.join(" > ") : "html";
|
|
74667
|
-
}(t2));
|
|
74668
|
-
}
|
|
74587
|
+
var e = void 0 === t2 ? [] : t2, r = e[0], o = e[1], n = Object.keys(o).sort(), u = n.reduce(function(t3, e2) {
|
|
74588
|
+
return t3[e2] = { value: r.style.getPropertyValue(e2), important: Boolean(r.style.getPropertyPriority(e2)) }, t3;
|
|
74589
|
+
}, {});
|
|
74590
|
+
return n.forEach(function(t3) {
|
|
74591
|
+
r.style.setProperty(t3, "string" != typeof o[t3] && o[t3] ? o[t3].value : o[t3], o[t3] && o[t3].important ? "important" : "");
|
|
74592
|
+
}), u;
|
|
74669
74593
|
});
|
|
74670
74594
|
}();
|
|
74671
74595
|
return s(arg);
|
|
74672
74596
|
};
|
|
74673
|
-
exports.
|
|
74597
|
+
exports.setElementAttributes = function(arg) {
|
|
74674
74598
|
var s = function() {
|
|
74675
74599
|
"use strict";
|
|
74676
74600
|
function t(t2) {
|
|
74677
74601
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74678
74602
|
}
|
|
74679
|
-
var e = function(t2) {
|
|
74680
|
-
var e2 = void 0 === t2 ? [] : t2, r = e2[0], o = e2[1], n = Object.keys(o).sort(), a = n.reduce(function(t3, e3) {
|
|
74681
|
-
return t3[e3] = { value: r.style.getPropertyValue(e3), important: Boolean(r.style.getPropertyPriority(e3)) }, t3;
|
|
74682
|
-
}, {});
|
|
74683
|
-
return n.forEach(function(t3) {
|
|
74684
|
-
r.style.setProperty(t3, "string" != typeof o[t3] && o[t3] ? o[t3].value : o[t3], o[t3] && o[t3].important ? "important" : "");
|
|
74685
|
-
}), a;
|
|
74686
|
-
};
|
|
74687
74603
|
return t(function(t2) {
|
|
74688
|
-
var
|
|
74689
|
-
|
|
74690
|
-
|
|
74691
|
-
|
|
74692
|
-
++l;
|
|
74693
|
-
var m = o[y], d = document.createElement("div");
|
|
74694
|
-
d.style.setProperty("display", "block", "important"), d.style.setProperty("float", "left", "important"), d.style.setProperty("width", l * a + "px", "important"), d.style.setProperty("height", a + "px", "important"), d.style.setProperty("background", i[m], "important"), p.appendChild(d);
|
|
74695
|
-
}
|
|
74696
|
-
var u = { value: "none", important: true }, c = e([document.documentElement, { transform: u, "-webkit-transform": u }]), f = e([document.body, { transform: u, "-webkit-transform": u }]);
|
|
74697
|
-
return document.documentElement.setAttribute("data-applitools-original-transforms", JSON.stringify(c)), document.body.setAttribute("data-applitools-original-transforms", JSON.stringify(f)), document.body.appendChild(p), { mask: o, size: a, offset: s2 };
|
|
74604
|
+
var e = void 0 === t2 ? [] : t2, r = e[0], u = e[1];
|
|
74605
|
+
return Object.keys(u).reduce(function(t3, e2) {
|
|
74606
|
+
return t3[e2] = r.getAttribute(e2), r.setAttribute(e2, u[e2]), t3;
|
|
74607
|
+
}, {});
|
|
74698
74608
|
});
|
|
74699
74609
|
}();
|
|
74700
74610
|
return s(arg);
|
|
74701
74611
|
};
|
|
74702
|
-
exports.
|
|
74612
|
+
exports.scrollTo = function(arg) {
|
|
74703
74613
|
var s = function() {
|
|
74704
74614
|
"use strict";
|
|
74705
74615
|
function t(t2) {
|
|
74706
74616
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74707
74617
|
}
|
|
74618
|
+
var r = function(t2) {
|
|
74619
|
+
var r2 = void 0 === t2 ? [] : t2, o = r2[0], e = r2[1], l = Object.keys(e).sort(), n = l.reduce(function(t3, r3) {
|
|
74620
|
+
return t3[r3] = { value: o.style.getPropertyValue(r3), important: Boolean(o.style.getPropertyPriority(r3)) }, t3;
|
|
74621
|
+
}, {});
|
|
74622
|
+
return l.forEach(function(t3) {
|
|
74623
|
+
o.style.setProperty(t3, "string" != typeof e[t3] && e[t3] ? e[t3].value : e[t3], e[t3] && e[t3].important ? "important" : "");
|
|
74624
|
+
}), n;
|
|
74625
|
+
};
|
|
74708
74626
|
return t(function(t2) {
|
|
74709
|
-
var
|
|
74710
|
-
|
|
74627
|
+
var o = void 0 === t2 ? [] : t2, e = o[0], l = o[1];
|
|
74628
|
+
e = e || document.documentElement;
|
|
74629
|
+
var n = r([e, { "scroll-behavior": { value: "auto", important: true } }]);
|
|
74630
|
+
return e.scrollTo ? e.scrollTo(l.x, l.y) : (e.scrollLeft = l.x, e.scrollTop = l.y), r([e, n]), { x: e.scrollLeft, y: e.scrollTop };
|
|
74711
74631
|
});
|
|
74712
74632
|
}();
|
|
74713
74633
|
return s(arg);
|
|
74714
74634
|
};
|
|
74715
|
-
exports.
|
|
74635
|
+
exports.reloadPage = function(arg) {
|
|
74716
74636
|
var s = function() {
|
|
74717
74637
|
"use strict";
|
|
74718
74638
|
function t(t2) {
|
|
74719
74639
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74720
74640
|
}
|
|
74721
|
-
return t(function(
|
|
74722
|
-
|
|
74723
|
-
t3.removeAttribute("data-applitools-selector");
|
|
74724
|
-
var o = t3;
|
|
74725
|
-
if (o.getRootNode)
|
|
74726
|
-
try {
|
|
74727
|
-
for (; o; ) {
|
|
74728
|
-
var e = o.getRootNode();
|
|
74729
|
-
if (!e)
|
|
74730
|
-
break;
|
|
74731
|
-
(o = e.constructor && "ShadowRoot" === e.constructor.name ? e.host : e.defaultView ? e.defaultView.frameElement : null) && o.removeAttribute("data-applitools-selector");
|
|
74732
|
-
}
|
|
74733
|
-
} catch (t4) {
|
|
74734
|
-
}
|
|
74735
|
-
});
|
|
74641
|
+
return t(function() {
|
|
74642
|
+
window.location.reload();
|
|
74736
74643
|
});
|
|
74737
74644
|
}();
|
|
74738
74645
|
return s(arg);
|
|
74739
74646
|
};
|
|
74740
|
-
exports.
|
|
74647
|
+
exports.lazyLoad = function(arg) {
|
|
74741
74648
|
var s = function() {
|
|
74742
74649
|
"use strict";
|
|
74743
74650
|
function t(t2) {
|
|
74744
74651
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74745
74652
|
}
|
|
74746
|
-
var
|
|
74747
|
-
var
|
|
74748
|
-
|
|
74653
|
+
var o = function(t2) {
|
|
74654
|
+
var o2 = (void 0 === t2 ? [] : t2)[0];
|
|
74655
|
+
return o2 ? { x: o2.scrollLeft, y: o2.scrollTop } : { x: window.scrollX || window.pageXOffset, y: window.scrollY || window.pageYOffset };
|
|
74656
|
+
};
|
|
74657
|
+
var r = function(t2) {
|
|
74658
|
+
var o2 = void 0 === t2 ? [] : t2, r2 = o2[0], n2 = o2[1], e2 = Object.keys(n2).sort(), i2 = e2.reduce(function(t3, o3) {
|
|
74659
|
+
return t3[o3] = { value: r2.style.getPropertyValue(o3), important: Boolean(r2.style.getPropertyPriority(o3)) }, t3;
|
|
74749
74660
|
}, {});
|
|
74750
|
-
return
|
|
74751
|
-
|
|
74752
|
-
}),
|
|
74661
|
+
return e2.forEach(function(t3) {
|
|
74662
|
+
r2.style.setProperty(t3, "string" != typeof n2[t3] && n2[t3] ? n2[t3].value : n2[t3], n2[t3] && n2[t3].important ? "important" : "");
|
|
74663
|
+
}), i2;
|
|
74753
74664
|
};
|
|
74754
|
-
|
|
74755
|
-
var t2 =
|
|
74756
|
-
|
|
74757
|
-
var
|
|
74758
|
-
|
|
74665
|
+
var n = function(t2) {
|
|
74666
|
+
var o2 = void 0 === t2 ? [] : t2, n2 = o2[0], e2 = o2[1];
|
|
74667
|
+
n2 = n2 || document.documentElement;
|
|
74668
|
+
var i2 = r([n2, { "scroll-behavior": { value: "auto", important: true } }]);
|
|
74669
|
+
return n2.scrollTo ? n2.scrollTo(e2.x, e2.y) : (n2.scrollLeft = e2.x, n2.scrollTop = e2.y), r([n2, i2]), { x: n2.scrollLeft, y: n2.scrollTop };
|
|
74670
|
+
}, e = "__EYES__APPLITOOLS__", i = "lazyLoadResult";
|
|
74671
|
+
window[e] = window[e] || {};
|
|
74672
|
+
var l = o, a = n;
|
|
74673
|
+
return t(function(t2) {
|
|
74674
|
+
var o2 = void 0 === t2 ? [] : t2, r2 = o2[0], n2 = o2[1], s2 = void 0 === n2 ? {} : n2, u = s2.scrollLength, c = s2.waitingTime, w = s2.maxAmountToScroll;
|
|
74675
|
+
try {
|
|
74676
|
+
if (window[e][i]) {
|
|
74677
|
+
var d = window[e][i];
|
|
74678
|
+
return "WIP" !== d.status && delete window[e][i], JSON.stringify(d);
|
|
74679
|
+
}
|
|
74680
|
+
window[e][i] = { status: "WIP" };
|
|
74681
|
+
var v = l(), y = [];
|
|
74682
|
+
y.push({ maxAmountToScroll: w, scrollLength: u, waitingTime: c, startingScrollPositionX: v.x, startingScrollPositionY: v.y });
|
|
74683
|
+
var f = Date.now();
|
|
74684
|
+
return function t3(o3) {
|
|
74685
|
+
var n3 = void 0 === o3 ? {} : o3, l2 = n3.doneScrolling, s3 = n3.previousScrollResult, d2 = void 0 === s3 ? {} : s3;
|
|
74686
|
+
setTimeout(function() {
|
|
74687
|
+
try {
|
|
74688
|
+
if (l2) {
|
|
74689
|
+
var o4 = a([r2, v]), n4 = o4.x, s4 = o4.y;
|
|
74690
|
+
return y.push({ x: n4, y: s4, msSinceStart: Date.now() - f }), void (window[e][i] = { status: "SUCCESS", value: y });
|
|
74691
|
+
}
|
|
74692
|
+
var c2 = a([r2, { x: v.x, y: d2.y + u }]), p = c2.x, S = c2.y;
|
|
74693
|
+
y.push({ x: p, y: S, msSinceStart: Date.now() - f }), t3({ doneScrolling: S === d2.y || S === w, previousScrollResult: { x: p, y: S } });
|
|
74694
|
+
} catch (t4) {
|
|
74695
|
+
window[e][i] = { status: "ERROR", error: t4 };
|
|
74696
|
+
}
|
|
74697
|
+
}, c);
|
|
74698
|
+
}(), JSON.stringify(window[e][i]);
|
|
74699
|
+
} catch (t3) {
|
|
74700
|
+
return window[e][i] = { status: "ERROR", error: t3 }, JSON.stringify(window[e][i]);
|
|
74701
|
+
}
|
|
74759
74702
|
});
|
|
74760
74703
|
}();
|
|
74761
74704
|
return s(arg);
|
|
74762
74705
|
};
|
|
74763
|
-
exports.
|
|
74706
|
+
exports.isStaleElement = function(arg) {
|
|
74764
74707
|
var s = function() {
|
|
74765
74708
|
"use strict";
|
|
74766
|
-
function
|
|
74767
|
-
return
|
|
74709
|
+
function n(n2) {
|
|
74710
|
+
return n2 && n2.__esModule && Object.prototype.hasOwnProperty.call(n2, "default") ? n2.default : n2;
|
|
74768
74711
|
}
|
|
74769
|
-
return
|
|
74770
|
-
var e =
|
|
74771
|
-
e
|
|
74712
|
+
return n(function(n2) {
|
|
74713
|
+
var e = n2 && n2[0] || null;
|
|
74714
|
+
return !e || ("isConnected" in window.Node.prototype ? !e.isConnected : document.documentElement.contains ? !document.documentElement.contains(e) : !e.ownerDocument.documentElement.contains(e));
|
|
74772
74715
|
});
|
|
74773
74716
|
}();
|
|
74774
74717
|
return s(arg);
|
|
74775
74718
|
};
|
|
74776
|
-
exports.
|
|
74719
|
+
exports.isEqualElements = function(arg) {
|
|
74777
74720
|
var s = function() {
|
|
74778
74721
|
"use strict";
|
|
74779
74722
|
function t(t2) {
|
|
74780
74723
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74781
74724
|
}
|
|
74782
|
-
return t(function() {
|
|
74783
|
-
|
|
74784
|
-
|
|
74785
|
-
var e = [];
|
|
74786
|
-
r.querySelectorAll("frame, iframe").forEach(function(t3) {
|
|
74787
|
-
return e.push([t3, !t3.contentDocument, t3.src]);
|
|
74788
|
-
});
|
|
74789
|
-
var n = Array.prototype.filter.call(r.querySelectorAll("*"), function(t3) {
|
|
74790
|
-
return t3.shadowRoot;
|
|
74791
|
-
}).map(function(r2) {
|
|
74792
|
-
return t2(r2.shadowRoot);
|
|
74793
|
-
});
|
|
74794
|
-
return e.concat.apply(e, n);
|
|
74795
|
-
}();
|
|
74725
|
+
return t(function(t2) {
|
|
74726
|
+
var r = void 0 === t2 ? [] : t2;
|
|
74727
|
+
return r[0] === r[1];
|
|
74796
74728
|
});
|
|
74797
74729
|
}();
|
|
74798
74730
|
return s(arg);
|
|
74799
74731
|
};
|
|
74800
|
-
exports.
|
|
74732
|
+
exports.isElementScrollable = function(arg) {
|
|
74801
74733
|
var s = function() {
|
|
74802
74734
|
"use strict";
|
|
74803
74735
|
function t(t2) {
|
|
74804
74736
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74805
74737
|
}
|
|
74806
74738
|
var e = function(t2) {
|
|
74807
|
-
var e2 =
|
|
74808
|
-
|
|
74809
|
-
return
|
|
74810
|
-
|
|
74811
|
-
var a = Array.prototype.filter.call(o.parentNode.childNodes, function(t3) {
|
|
74812
|
-
return t3.tagName === o.tagName;
|
|
74813
|
-
}).indexOf(o);
|
|
74814
|
-
n = "/" + o.tagName + "[" + (a + 1) + "]" + n, o = o.parentNode;
|
|
74815
|
-
}
|
|
74816
|
-
return n;
|
|
74739
|
+
var e2 = void 0 === t2 ? [] : t2, o = e2[0], r = e2[1], n = void 0 === r ? [] : r, l = window.getComputedStyle(o);
|
|
74740
|
+
return l ? n.map(function(t3) {
|
|
74741
|
+
return l.getPropertyValue(t3);
|
|
74742
|
+
}) : [];
|
|
74817
74743
|
};
|
|
74818
|
-
return t(function() {
|
|
74819
|
-
var t2,
|
|
74820
|
-
|
|
74821
|
-
t2 = window.top.document === window.document || "root-context" === window.parent.document["applitools-marker"];
|
|
74822
|
-
} catch (e2) {
|
|
74823
|
-
t2 = false;
|
|
74824
|
-
}
|
|
74825
|
-
try {
|
|
74826
|
-
n = !window.parent.document === window.document;
|
|
74827
|
-
} catch (t3) {
|
|
74828
|
-
n = true;
|
|
74829
|
-
}
|
|
74830
|
-
if (!n)
|
|
74831
|
-
try {
|
|
74832
|
-
r = e([window.frameElement]);
|
|
74833
|
-
} catch (t3) {
|
|
74834
|
-
r = null;
|
|
74835
|
-
}
|
|
74836
|
-
return [document.documentElement, r, t2, n];
|
|
74744
|
+
return t(function(t2) {
|
|
74745
|
+
var o = (void 0 === t2 ? [] : t2)[0], r = e([o, ["overflow-x", "overflow-y", "overflow"]]);
|
|
74746
|
+
return ("scroll" === r[0] || "auto" === r[0] || "hidden" === r[2]) && o.scrollWidth > o.clientWidth || ("scroll" === r[1] || "auto" === r[1] || "hidden" === r[2]) && o.scrollHeight > o.clientHeight;
|
|
74837
74747
|
});
|
|
74838
74748
|
}();
|
|
74839
74749
|
return s(arg);
|
|
74840
74750
|
};
|
|
74841
|
-
exports.
|
|
74751
|
+
exports.getViewport = function(arg) {
|
|
74842
74752
|
var s = function() {
|
|
74843
74753
|
"use strict";
|
|
74844
|
-
function
|
|
74845
|
-
return
|
|
74754
|
+
function e(e2) {
|
|
74755
|
+
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
74846
74756
|
}
|
|
74847
|
-
return
|
|
74848
|
-
var
|
|
74849
|
-
return
|
|
74757
|
+
return e(function() {
|
|
74758
|
+
var e2, n = 0, t = 0;
|
|
74759
|
+
return window.innerHeight ? t = window.innerHeight : document.documentElement && document.documentElement.clientHeight ? t = document.documentElement.clientHeight : document.body && document.body.clientHeight && (t = document.body.clientHeight), window.innerWidth ? n = window.innerWidth : document.documentElement && document.documentElement.clientWidth ? n = document.documentElement.clientWidth : document.body && document.body.clientWidth && (n = document.body.clientWidth), window.screen && window.screen.orientation ? e2 = window.screen.orientation.type.replace(/-primary$/, "") : null != window.orientation && (0 === window.orientation ? e2 = "portrait" : 180 === window.orientation ? e2 = "portrait-secondary" : 90 === window.orientation ? e2 = "landscape" : -90 === window.orientation && (e2 = "landscape-secondary")), { viewportSize: { width: n, height: t }, pixelRatio: window.devicePixelRatio, viewportScale: window.visualViewport && window.visualViewport.scale, orientation: e2 };
|
|
74850
74760
|
});
|
|
74851
74761
|
}();
|
|
74852
74762
|
return s(arg);
|
|
74853
74763
|
};
|
|
74854
|
-
exports.
|
|
74764
|
+
exports.getUserAgent = function(arg) {
|
|
74855
74765
|
var s = function() {
|
|
74856
74766
|
"use strict";
|
|
74857
|
-
function
|
|
74858
|
-
return
|
|
74767
|
+
function n(n2) {
|
|
74768
|
+
return n2 && n2.__esModule && Object.prototype.hasOwnProperty.call(n2, "default") ? n2.default : n2;
|
|
74859
74769
|
}
|
|
74860
|
-
|
|
74861
|
-
|
|
74862
|
-
|
|
74770
|
+
function t() {
|
|
74771
|
+
return t = Object.assign ? Object.assign.bind() : function(n2) {
|
|
74772
|
+
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
74773
|
+
var r2 = arguments[t2];
|
|
74774
|
+
for (var e2 in r2)
|
|
74775
|
+
({}).hasOwnProperty.call(r2, e2) && (n2[e2] = r2[e2]);
|
|
74776
|
+
}
|
|
74777
|
+
return n2;
|
|
74778
|
+
}, t.apply(null, arguments);
|
|
74779
|
+
}
|
|
74780
|
+
var r = "__EYES__APPLITOOLS__", e = "userAgent";
|
|
74781
|
+
return window[r] = window[r] || {}, n(function() {
|
|
74782
|
+
try {
|
|
74783
|
+
if (window[r][e]) {
|
|
74784
|
+
var n2 = window[r][e];
|
|
74785
|
+
return "WIP" !== n2.status && delete window[r][e], JSON.stringify(n2);
|
|
74786
|
+
}
|
|
74787
|
+
return window.navigator.userAgentData ? (window[r][e] = { status: "WIP" }, window.navigator.userAgentData.getHighEntropyValues(["brands", "platform", "platformVersion", "model"]).then(function(n3) {
|
|
74788
|
+
window[r][e] = { status: "SUCCESS", value: t({ legacy: window.navigator.userAgent }, n3) };
|
|
74789
|
+
}).catch(function(n3) {
|
|
74790
|
+
window[r][e] = { status: "ERROR", error: n3.message };
|
|
74791
|
+
})) : window[r][e] = { status: "SUCCESS", value: window.navigator.userAgent }, JSON.stringify(window[r][e]);
|
|
74792
|
+
} catch (n3) {
|
|
74793
|
+
return window[r][e] = { status: "ERROR", error: n3.message }, JSON.stringify(window[r][e]);
|
|
74794
|
+
}
|
|
74863
74795
|
});
|
|
74864
74796
|
}();
|
|
74865
74797
|
return s(arg);
|
|
74866
74798
|
};
|
|
74867
|
-
exports.
|
|
74799
|
+
exports.getText = function(arg) {
|
|
74868
74800
|
var s = function() {
|
|
74869
74801
|
"use strict";
|
|
74870
74802
|
function t(t2) {
|
|
74871
74803
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74872
74804
|
}
|
|
74873
74805
|
return t(function(t2) {
|
|
74874
|
-
|
|
74875
|
-
return o ? u.map(function(t3) {
|
|
74876
|
-
return o.getPropertyValue(t3);
|
|
74877
|
-
}) : [];
|
|
74806
|
+
return t2[0].innerText;
|
|
74878
74807
|
});
|
|
74879
74808
|
}();
|
|
74880
74809
|
return s(arg);
|
|
74881
74810
|
};
|
|
74882
|
-
exports.
|
|
74811
|
+
exports.getShadowRoot = function(arg) {
|
|
74883
74812
|
var s = function() {
|
|
74884
74813
|
"use strict";
|
|
74885
74814
|
function t(t2) {
|
|
74886
74815
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74887
74816
|
}
|
|
74888
|
-
var e = function(t2) {
|
|
74889
|
-
var e2 = void 0 === t2 ? [] : t2, r2 = e2[0], o = e2[1], n = Object.keys(o).sort(), a = n.reduce(function(t3, e3) {
|
|
74890
|
-
return t3[e3] = { value: r2.style.getPropertyValue(e3), important: Boolean(r2.style.getPropertyPriority(e3)) }, t3;
|
|
74891
|
-
}, {});
|
|
74892
|
-
return n.forEach(function(t3) {
|
|
74893
|
-
r2.style.setProperty(t3, "string" != typeof o[t3] && o[t3] ? o[t3].value : o[t3], o[t3] && o[t3].important ? "important" : "");
|
|
74894
|
-
}), a;
|
|
74895
|
-
}, r = function() {
|
|
74896
|
-
var t2 = "HTML", e2 = document.scrollingElement;
|
|
74897
|
-
return e2 && (t2 = e2.tagName), t2.toLowerCase();
|
|
74898
|
-
};
|
|
74899
74817
|
return t(function(t2) {
|
|
74900
|
-
|
|
74901
|
-
n !== document.documentElement && n.tagName.toLowerCase() !== r() || (o = e([n, { transform: "none" }]));
|
|
74902
|
-
var a = { width: n.scrollWidth, height: n.scrollHeight };
|
|
74903
|
-
return o && e([n, o]), a;
|
|
74818
|
+
return (void 0 === t2 ? [] : t2)[0].shadowRoot;
|
|
74904
74819
|
});
|
|
74905
74820
|
}();
|
|
74906
74821
|
return s(arg);
|
|
74907
74822
|
};
|
|
74908
|
-
exports.
|
|
74823
|
+
exports.getElementXpath = function(arg) {
|
|
74909
74824
|
var s = function() {
|
|
74910
74825
|
"use strict";
|
|
74911
|
-
function
|
|
74912
|
-
return
|
|
74826
|
+
function e(e2) {
|
|
74827
|
+
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
74913
74828
|
}
|
|
74914
|
-
return
|
|
74915
|
-
|
|
74916
|
-
|
|
74917
|
-
|
|
74829
|
+
return e(function(e2) {
|
|
74830
|
+
var r = (void 0 === e2 ? [] : e2)[0], t = "", n = r.ownerDocument;
|
|
74831
|
+
if (!n)
|
|
74832
|
+
return t;
|
|
74833
|
+
for (var a = r; a !== n; ) {
|
|
74834
|
+
var o = Array.prototype.filter.call(a.parentNode.childNodes, function(e3) {
|
|
74835
|
+
return e3.tagName === a.tagName;
|
|
74836
|
+
}).indexOf(a);
|
|
74837
|
+
t = "/" + a.tagName + "[" + (o + 1) + "]" + t, a = a.parentNode;
|
|
74838
|
+
}
|
|
74839
|
+
return t;
|
|
74918
74840
|
});
|
|
74919
74841
|
}();
|
|
74920
74842
|
return s(arg);
|
|
74921
74843
|
};
|
|
74922
|
-
exports.
|
|
74844
|
+
exports.getElementTranslateOffset = function(arg) {
|
|
74923
74845
|
var s = function() {
|
|
74924
74846
|
"use strict";
|
|
74925
74847
|
function r(r2) {
|
|
74926
74848
|
return r2 && r2.__esModule && Object.prototype.hasOwnProperty.call(r2, "default") ? r2.default : r2;
|
|
74927
74849
|
}
|
|
74928
74850
|
var t = function(r2) {
|
|
74929
|
-
var t2 = void 0 === r2 ? [] : r2,
|
|
74930
|
-
return (void 0 ===
|
|
74931
|
-
return r3[t3] = { value:
|
|
74851
|
+
var t2 = void 0 === r2 ? [] : r2, e = t2[0], n = t2[1];
|
|
74852
|
+
return (void 0 === n ? [] : n).reduce(function(r3, t3) {
|
|
74853
|
+
return r3[t3] = { value: e.style.getPropertyValue(t3), important: Boolean(e.style.getPropertyPriority(t3)) }, r3;
|
|
74932
74854
|
}, {});
|
|
74933
74855
|
};
|
|
74934
|
-
|
|
74935
|
-
var
|
|
74936
|
-
|
|
74937
|
-
|
|
74938
|
-
|
|
74939
|
-
|
|
74940
|
-
|
|
74941
|
-
var o3 = e3.match(/^translate\s*\(\s*(\-?[\d, \.]+)px\s*(,\s*(-?[\d, \.]+)px)?\s*\)/);
|
|
74942
|
-
if (o3) {
|
|
74943
|
-
var u2 = o3[1], a = void 0 !== o3[3] ? o3[3] : 0;
|
|
74856
|
+
return r(function(r2) {
|
|
74857
|
+
var e = (void 0 === r2 ? [] : r2)[0], n = void 0 === e ? document.documentElement : e, o = t([n, ["transform", "-webkit-transform"]]), u = Object.keys(o).reduce(function(r3, t2) {
|
|
74858
|
+
var e2 = o[t2].value;
|
|
74859
|
+
if (e2) {
|
|
74860
|
+
var n2 = e2.match(/^translate\s*\(\s*(\-?[\d, \.]+)px\s*(,\s*(-?[\d, \.]+)px)?\s*\)/);
|
|
74861
|
+
if (n2) {
|
|
74862
|
+
var u2 = n2[1], a = void 0 !== n2[3] ? n2[3] : 0;
|
|
74944
74863
|
r3.push({ x: Math.round(-parseFloat(u2)), y: Math.round(-parseFloat(a)) });
|
|
74945
74864
|
} else
|
|
74946
74865
|
r3.push({ x: 0, y: 0 });
|
|
@@ -74952,29 +74871,38 @@ var require_dist3 = __commonJS({
|
|
|
74952
74871
|
}))
|
|
74953
74872
|
throw new Error("Got different css positions!");
|
|
74954
74873
|
return u[0] || { x: 0, y: 0 };
|
|
74955
|
-
};
|
|
74956
|
-
return r(function(r2) {
|
|
74957
|
-
var t2 = (void 0 === r2 ? [] : r2)[0], n = e([t2]), u = o([t2]);
|
|
74958
|
-
return { x: n.x + u.x, y: n.y + u.y };
|
|
74959
74874
|
});
|
|
74960
74875
|
}();
|
|
74961
74876
|
return s(arg);
|
|
74962
74877
|
};
|
|
74963
|
-
exports.
|
|
74878
|
+
exports.getElementStyleProperties = function(arg) {
|
|
74964
74879
|
var s = function() {
|
|
74965
74880
|
"use strict";
|
|
74966
74881
|
function t(t2) {
|
|
74967
74882
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
74968
74883
|
}
|
|
74969
74884
|
return t(function(t2) {
|
|
74970
|
-
var
|
|
74971
|
-
return (void 0 ===
|
|
74972
|
-
return t3[
|
|
74885
|
+
var e = void 0 === t2 ? [] : t2, r = e[0], o = e[1];
|
|
74886
|
+
return (void 0 === o ? [] : o).reduce(function(t3, e2) {
|
|
74887
|
+
return t3[e2] = { value: r.style.getPropertyValue(e2), important: Boolean(r.style.getPropertyPriority(e2)) }, t3;
|
|
74973
74888
|
}, {});
|
|
74974
74889
|
});
|
|
74975
74890
|
}();
|
|
74976
74891
|
return s(arg);
|
|
74977
74892
|
};
|
|
74893
|
+
exports.getElementScrollOffset = function(arg) {
|
|
74894
|
+
var s = function() {
|
|
74895
|
+
"use strict";
|
|
74896
|
+
function o(o2) {
|
|
74897
|
+
return o2 && o2.__esModule && Object.prototype.hasOwnProperty.call(o2, "default") ? o2.default : o2;
|
|
74898
|
+
}
|
|
74899
|
+
return o(function(o2) {
|
|
74900
|
+
var t = (void 0 === o2 ? [] : o2)[0];
|
|
74901
|
+
return t ? { x: t.scrollLeft, y: t.scrollTop } : { x: window.scrollX || window.pageXOffset, y: window.scrollY || window.pageYOffset };
|
|
74902
|
+
});
|
|
74903
|
+
}();
|
|
74904
|
+
return s(arg);
|
|
74905
|
+
};
|
|
74978
74906
|
exports.getElementRect = function(arg) {
|
|
74979
74907
|
var s = function() {
|
|
74980
74908
|
"use strict";
|
|
@@ -75044,53 +74972,43 @@ var require_dist3 = __commonJS({
|
|
|
75044
74972
|
}();
|
|
75045
74973
|
return s(arg);
|
|
75046
74974
|
};
|
|
75047
|
-
exports.
|
|
75048
|
-
var s = function() {
|
|
75049
|
-
"use strict";
|
|
75050
|
-
function o(o2) {
|
|
75051
|
-
return o2 && o2.__esModule && Object.prototype.hasOwnProperty.call(o2, "default") ? o2.default : o2;
|
|
75052
|
-
}
|
|
75053
|
-
return o(function(o2) {
|
|
75054
|
-
var t = (void 0 === o2 ? [] : o2)[0];
|
|
75055
|
-
return t ? { x: t.scrollLeft, y: t.scrollTop } : { x: window.scrollX || window.pageXOffset, y: window.scrollY || window.pageYOffset };
|
|
75056
|
-
});
|
|
75057
|
-
}();
|
|
75058
|
-
return s(arg);
|
|
75059
|
-
};
|
|
75060
|
-
exports.getElementStyleProperties = function(arg) {
|
|
74975
|
+
exports.getElementProperties = function(arg) {
|
|
75061
74976
|
var s = function() {
|
|
75062
74977
|
"use strict";
|
|
75063
74978
|
function t(t2) {
|
|
75064
74979
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75065
74980
|
}
|
|
75066
74981
|
return t(function(t2) {
|
|
75067
|
-
var
|
|
75068
|
-
return (void 0 ===
|
|
75069
|
-
return t3[
|
|
74982
|
+
var r = void 0 === t2 ? [] : t2, e = r[0], n = r[1];
|
|
74983
|
+
return (void 0 === n ? [] : n).reduce(function(t3, r2) {
|
|
74984
|
+
return t3[r2] = e[r2], t3;
|
|
75070
74985
|
}, {});
|
|
75071
74986
|
});
|
|
75072
74987
|
}();
|
|
75073
74988
|
return s(arg);
|
|
75074
74989
|
};
|
|
75075
|
-
exports.
|
|
74990
|
+
exports.getElementInnerOffset = function(arg) {
|
|
75076
74991
|
var s = function() {
|
|
75077
74992
|
"use strict";
|
|
75078
74993
|
function r(r2) {
|
|
75079
74994
|
return r2 && r2.__esModule && Object.prototype.hasOwnProperty.call(r2, "default") ? r2.default : r2;
|
|
75080
74995
|
}
|
|
75081
74996
|
var t = function(r2) {
|
|
75082
|
-
var t2 = void 0 === r2 ? [] : r2,
|
|
75083
|
-
return (void 0 ===
|
|
75084
|
-
return r3[t3] = { value:
|
|
74997
|
+
var t2 = void 0 === r2 ? [] : r2, e2 = t2[0], o2 = t2[1];
|
|
74998
|
+
return (void 0 === o2 ? [] : o2).reduce(function(r3, t3) {
|
|
74999
|
+
return r3[t3] = { value: e2.style.getPropertyValue(t3), important: Boolean(e2.style.getPropertyPriority(t3)) }, r3;
|
|
75085
75000
|
}, {});
|
|
75086
75001
|
};
|
|
75087
|
-
|
|
75088
|
-
var
|
|
75089
|
-
|
|
75090
|
-
|
|
75091
|
-
|
|
75092
|
-
|
|
75093
|
-
|
|
75002
|
+
var e = function(r2) {
|
|
75003
|
+
var t2 = (void 0 === r2 ? [] : r2)[0];
|
|
75004
|
+
return t2 ? { x: t2.scrollLeft, y: t2.scrollTop } : { x: window.scrollX || window.pageXOffset, y: window.scrollY || window.pageYOffset };
|
|
75005
|
+
}, o = function(r2) {
|
|
75006
|
+
var e2 = (void 0 === r2 ? [] : r2)[0], o2 = void 0 === e2 ? document.documentElement : e2, n = t([o2, ["transform", "-webkit-transform"]]), u = Object.keys(n).reduce(function(r3, t2) {
|
|
75007
|
+
var e3 = n[t2].value;
|
|
75008
|
+
if (e3) {
|
|
75009
|
+
var o3 = e3.match(/^translate\s*\(\s*(\-?[\d, \.]+)px\s*(,\s*(-?[\d, \.]+)px)?\s*\)/);
|
|
75010
|
+
if (o3) {
|
|
75011
|
+
var u2 = o3[1], a = void 0 !== o3[3] ? o3[3] : 0;
|
|
75094
75012
|
r3.push({ x: Math.round(-parseFloat(u2)), y: Math.round(-parseFloat(a)) });
|
|
75095
75013
|
} else
|
|
75096
75014
|
r3.push({ x: 0, y: 0 });
|
|
@@ -75102,293 +75020,375 @@ var require_dist3 = __commonJS({
|
|
|
75102
75020
|
}))
|
|
75103
75021
|
throw new Error("Got different css positions!");
|
|
75104
75022
|
return u[0] || { x: 0, y: 0 };
|
|
75023
|
+
};
|
|
75024
|
+
return r(function(r2) {
|
|
75025
|
+
var t2 = (void 0 === r2 ? [] : r2)[0], n = e([t2]), u = o([t2]);
|
|
75026
|
+
return { x: n.x + u.x, y: n.y + u.y };
|
|
75105
75027
|
});
|
|
75106
75028
|
}();
|
|
75107
75029
|
return s(arg);
|
|
75108
75030
|
};
|
|
75109
|
-
exports.
|
|
75031
|
+
exports.getElementFixedAncestor = function(arg) {
|
|
75110
75032
|
var s = function() {
|
|
75111
75033
|
"use strict";
|
|
75112
|
-
function
|
|
75113
|
-
return
|
|
75034
|
+
function t(t2) {
|
|
75035
|
+
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75114
75036
|
}
|
|
75115
|
-
return
|
|
75116
|
-
var
|
|
75117
|
-
|
|
75118
|
-
|
|
75119
|
-
for (var a = r; a !== n; ) {
|
|
75120
|
-
var o = Array.prototype.filter.call(a.parentNode.childNodes, function(e3) {
|
|
75121
|
-
return e3.tagName === a.tagName;
|
|
75122
|
-
}).indexOf(a);
|
|
75123
|
-
t = "/" + a.tagName + "[" + (o + 1) + "]" + t, a = a.parentNode;
|
|
75124
|
-
}
|
|
75125
|
-
return t;
|
|
75037
|
+
return t(function(t2) {
|
|
75038
|
+
for (var e = (void 0 === t2 ? [] : t2)[0]; e.offsetParent && e.offsetParent !== document.body && e.offsetParent !== document.documentElement; )
|
|
75039
|
+
e = e.offsetParent;
|
|
75040
|
+
return "fixed" === window.getComputedStyle(e).getPropertyValue("position") ? e : null;
|
|
75126
75041
|
});
|
|
75127
75042
|
}();
|
|
75128
75043
|
return s(arg);
|
|
75129
75044
|
};
|
|
75130
|
-
exports.
|
|
75045
|
+
exports.getElementContentSize = function(arg) {
|
|
75131
75046
|
var s = function() {
|
|
75132
75047
|
"use strict";
|
|
75133
75048
|
function t(t2) {
|
|
75134
75049
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75135
75050
|
}
|
|
75051
|
+
var e = function(t2) {
|
|
75052
|
+
var e2 = void 0 === t2 ? [] : t2, r2 = e2[0], o = e2[1], n = Object.keys(o).sort(), a = n.reduce(function(t3, e3) {
|
|
75053
|
+
return t3[e3] = { value: r2.style.getPropertyValue(e3), important: Boolean(r2.style.getPropertyPriority(e3)) }, t3;
|
|
75054
|
+
}, {});
|
|
75055
|
+
return n.forEach(function(t3) {
|
|
75056
|
+
r2.style.setProperty(t3, "string" != typeof o[t3] && o[t3] ? o[t3].value : o[t3], o[t3] && o[t3].important ? "important" : "");
|
|
75057
|
+
}), a;
|
|
75058
|
+
}, r = function() {
|
|
75059
|
+
var t2 = "HTML", e2 = document.scrollingElement;
|
|
75060
|
+
return e2 && (t2 = e2.tagName), t2.toLowerCase();
|
|
75061
|
+
};
|
|
75136
75062
|
return t(function(t2) {
|
|
75137
|
-
|
|
75063
|
+
var o, n = (void 0 === t2 ? [] : t2)[0];
|
|
75064
|
+
n !== document.documentElement && n.tagName.toLowerCase() !== r() || (o = e([n, { transform: "none" }]));
|
|
75065
|
+
var a = { width: n.scrollWidth, height: n.scrollHeight };
|
|
75066
|
+
return o && e([n, o]), a;
|
|
75138
75067
|
});
|
|
75139
75068
|
}();
|
|
75140
75069
|
return s(arg);
|
|
75141
75070
|
};
|
|
75142
|
-
exports.
|
|
75071
|
+
exports.getElementComputedStyleProperties = function(arg) {
|
|
75143
75072
|
var s = function() {
|
|
75144
75073
|
"use strict";
|
|
75145
75074
|
function t(t2) {
|
|
75146
75075
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75147
75076
|
}
|
|
75148
75077
|
return t(function(t2) {
|
|
75149
|
-
|
|
75078
|
+
var e = void 0 === t2 ? [] : t2, r = e[0], n = e[1], u = void 0 === n ? [] : n, o = window.getComputedStyle(r);
|
|
75079
|
+
return o ? u.map(function(t3) {
|
|
75080
|
+
return o.getPropertyValue(t3);
|
|
75081
|
+
}) : [];
|
|
75150
75082
|
});
|
|
75151
75083
|
}();
|
|
75152
75084
|
return s(arg);
|
|
75153
75085
|
};
|
|
75154
|
-
exports.
|
|
75086
|
+
exports.getDocumentSize = function(arg) {
|
|
75155
75087
|
var s = function() {
|
|
75156
75088
|
"use strict";
|
|
75157
|
-
function
|
|
75158
|
-
return
|
|
75159
|
-
}
|
|
75160
|
-
function t() {
|
|
75161
|
-
return t = Object.assign ? Object.assign.bind() : function(n2) {
|
|
75162
|
-
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
75163
|
-
var r2 = arguments[t2];
|
|
75164
|
-
for (var e2 in r2)
|
|
75165
|
-
({}).hasOwnProperty.call(r2, e2) && (n2[e2] = r2[e2]);
|
|
75166
|
-
}
|
|
75167
|
-
return n2;
|
|
75168
|
-
}, t.apply(null, arguments);
|
|
75089
|
+
function t(t2) {
|
|
75090
|
+
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75169
75091
|
}
|
|
75170
|
-
|
|
75171
|
-
|
|
75172
|
-
|
|
75173
|
-
if (window[r][e]) {
|
|
75174
|
-
var n2 = window[r][e];
|
|
75175
|
-
return "WIP" !== n2.status && delete window[r][e], JSON.stringify(n2);
|
|
75176
|
-
}
|
|
75177
|
-
return window.navigator.userAgentData ? (window[r][e] = { status: "WIP" }, window.navigator.userAgentData.getHighEntropyValues(["brands", "platform", "platformVersion", "model"]).then(function(n3) {
|
|
75178
|
-
window[r][e] = { status: "SUCCESS", value: t({ legacy: window.navigator.userAgent }, n3) };
|
|
75179
|
-
}).catch(function(n3) {
|
|
75180
|
-
window[r][e] = { status: "ERROR", error: n3.message };
|
|
75181
|
-
})) : window[r][e] = { status: "SUCCESS", value: window.navigator.userAgent }, JSON.stringify(window[r][e]);
|
|
75182
|
-
} catch (n3) {
|
|
75183
|
-
return window[r][e] = { status: "ERROR", error: n3.message }, JSON.stringify(window[r][e]);
|
|
75184
|
-
}
|
|
75092
|
+
return t(function() {
|
|
75093
|
+
var t2 = document.documentElement.scrollWidth, e = document.documentElement.scrollHeight, n = document.documentElement.clientHeight, o = document.body.scrollWidth, c = document.body.scrollHeight, u = document.body.clientHeight;
|
|
75094
|
+
return { width: Math.max(t2, o), height: Math.max(n, e, u, c) };
|
|
75185
75095
|
});
|
|
75186
75096
|
}();
|
|
75187
75097
|
return s(arg);
|
|
75188
75098
|
};
|
|
75189
|
-
exports.
|
|
75099
|
+
exports.getDocumentScrollingElement = function(arg) {
|
|
75190
75100
|
var s = function() {
|
|
75191
75101
|
"use strict";
|
|
75192
|
-
function
|
|
75193
|
-
return
|
|
75102
|
+
function t(t2) {
|
|
75103
|
+
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75194
75104
|
}
|
|
75195
|
-
return
|
|
75196
|
-
var
|
|
75197
|
-
return
|
|
75105
|
+
return t(function() {
|
|
75106
|
+
var t2 = "HTML", e = document.scrollingElement;
|
|
75107
|
+
return e && (t2 = e.tagName), t2.toLowerCase();
|
|
75198
75108
|
});
|
|
75199
75109
|
}();
|
|
75200
75110
|
return s(arg);
|
|
75201
75111
|
};
|
|
75202
|
-
exports.
|
|
75112
|
+
exports.getContextInfo = function(arg) {
|
|
75203
75113
|
var s = function() {
|
|
75204
75114
|
"use strict";
|
|
75205
75115
|
function t(t2) {
|
|
75206
75116
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75207
75117
|
}
|
|
75208
75118
|
var e = function(t2) {
|
|
75209
|
-
var e2 = void 0 === t2 ? [] : t2
|
|
75210
|
-
|
|
75211
|
-
return
|
|
75212
|
-
|
|
75119
|
+
var e2 = (void 0 === t2 ? [] : t2)[0], n = "", r = e2.ownerDocument;
|
|
75120
|
+
if (!r)
|
|
75121
|
+
return n;
|
|
75122
|
+
for (var o = e2; o !== r; ) {
|
|
75123
|
+
var a = Array.prototype.filter.call(o.parentNode.childNodes, function(t3) {
|
|
75124
|
+
return t3.tagName === o.tagName;
|
|
75125
|
+
}).indexOf(o);
|
|
75126
|
+
n = "/" + o.tagName + "[" + (a + 1) + "]" + n, o = o.parentNode;
|
|
75127
|
+
}
|
|
75128
|
+
return n;
|
|
75213
75129
|
};
|
|
75214
|
-
return t(function(
|
|
75215
|
-
var
|
|
75216
|
-
|
|
75130
|
+
return t(function() {
|
|
75131
|
+
var t2, n, r;
|
|
75132
|
+
try {
|
|
75133
|
+
t2 = window.top.document === window.document || "root-context" === window.parent.document["applitools-marker"];
|
|
75134
|
+
} catch (e2) {
|
|
75135
|
+
t2 = false;
|
|
75136
|
+
}
|
|
75137
|
+
try {
|
|
75138
|
+
n = !window.parent.document === window.document;
|
|
75139
|
+
} catch (t3) {
|
|
75140
|
+
n = true;
|
|
75141
|
+
}
|
|
75142
|
+
if (!n)
|
|
75143
|
+
try {
|
|
75144
|
+
r = e([window.frameElement]);
|
|
75145
|
+
} catch (t3) {
|
|
75146
|
+
r = null;
|
|
75147
|
+
}
|
|
75148
|
+
return [document.documentElement, r, t2, n];
|
|
75217
75149
|
});
|
|
75218
75150
|
}();
|
|
75219
75151
|
return s(arg);
|
|
75220
75152
|
};
|
|
75221
|
-
exports.
|
|
75153
|
+
exports.getChildFramesInfo = function(arg) {
|
|
75222
75154
|
var s = function() {
|
|
75223
75155
|
"use strict";
|
|
75224
75156
|
function t(t2) {
|
|
75225
75157
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75226
75158
|
}
|
|
75227
|
-
return t(function(
|
|
75228
|
-
|
|
75229
|
-
|
|
75159
|
+
return t(function() {
|
|
75160
|
+
return function t2(r) {
|
|
75161
|
+
r = r || document;
|
|
75162
|
+
var e = [];
|
|
75163
|
+
r.querySelectorAll("frame, iframe").forEach(function(t3) {
|
|
75164
|
+
return e.push([t3, !t3.contentDocument, t3.src]);
|
|
75165
|
+
});
|
|
75166
|
+
var n = Array.prototype.filter.call(r.querySelectorAll("*"), function(t3) {
|
|
75167
|
+
return t3.shadowRoot;
|
|
75168
|
+
}).map(function(r2) {
|
|
75169
|
+
return t2(r2.shadowRoot);
|
|
75170
|
+
});
|
|
75171
|
+
return e.concat.apply(e, n);
|
|
75172
|
+
}();
|
|
75230
75173
|
});
|
|
75231
75174
|
}();
|
|
75232
75175
|
return s(arg);
|
|
75233
75176
|
};
|
|
75234
|
-
exports.
|
|
75177
|
+
exports.focusElement = function(arg) {
|
|
75235
75178
|
var s = function() {
|
|
75236
75179
|
"use strict";
|
|
75237
|
-
function
|
|
75238
|
-
return
|
|
75180
|
+
function t(t2) {
|
|
75181
|
+
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75239
75182
|
}
|
|
75240
|
-
return
|
|
75241
|
-
var e =
|
|
75242
|
-
|
|
75183
|
+
return t(function(t2) {
|
|
75184
|
+
var e = (void 0 === t2 ? [] : t2)[0];
|
|
75185
|
+
e && e.focus();
|
|
75243
75186
|
});
|
|
75244
75187
|
}();
|
|
75245
75188
|
return s(arg);
|
|
75246
75189
|
};
|
|
75247
|
-
exports.
|
|
75190
|
+
exports.cleanupPageMarker = function(arg) {
|
|
75248
75191
|
var s = function() {
|
|
75249
75192
|
"use strict";
|
|
75250
75193
|
function t(t2) {
|
|
75251
75194
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75252
75195
|
}
|
|
75253
|
-
var
|
|
75254
|
-
var
|
|
75255
|
-
|
|
75256
|
-
};
|
|
75257
|
-
var r = function(t2) {
|
|
75258
|
-
var o2 = void 0 === t2 ? [] : t2, r2 = o2[0], n2 = o2[1], e2 = Object.keys(n2).sort(), i2 = e2.reduce(function(t3, o3) {
|
|
75259
|
-
return t3[o3] = { value: r2.style.getPropertyValue(o3), important: Boolean(r2.style.getPropertyPriority(o3)) }, t3;
|
|
75196
|
+
var e = function(t2) {
|
|
75197
|
+
var e2 = void 0 === t2 ? [] : t2, r = e2[0], o = e2[1], n = Object.keys(o).sort(), a = n.reduce(function(t3, e3) {
|
|
75198
|
+
return t3[e3] = { value: r.style.getPropertyValue(e3), important: Boolean(r.style.getPropertyPriority(e3)) }, t3;
|
|
75260
75199
|
}, {});
|
|
75261
|
-
return
|
|
75262
|
-
|
|
75263
|
-
}),
|
|
75200
|
+
return n.forEach(function(t3) {
|
|
75201
|
+
r.style.setProperty(t3, "string" != typeof o[t3] && o[t3] ? o[t3].value : o[t3], o[t3] && o[t3].important ? "important" : "");
|
|
75202
|
+
}), a;
|
|
75264
75203
|
};
|
|
75265
|
-
|
|
75266
|
-
var
|
|
75267
|
-
|
|
75268
|
-
var
|
|
75269
|
-
|
|
75270
|
-
}, e = "__EYES__APPLITOOLS__", i = "lazyLoadResult";
|
|
75271
|
-
window[e] = window[e] || {};
|
|
75272
|
-
var l = o, a = n;
|
|
75273
|
-
return t(function(t2) {
|
|
75274
|
-
var o2 = void 0 === t2 ? [] : t2, r2 = o2[0], n2 = o2[1], s2 = void 0 === n2 ? {} : n2, u = s2.scrollLength, c = s2.waitingTime, w = s2.maxAmountToScroll;
|
|
75275
|
-
try {
|
|
75276
|
-
if (window[e][i]) {
|
|
75277
|
-
var d = window[e][i];
|
|
75278
|
-
return "WIP" !== d.status && delete window[e][i], JSON.stringify(d);
|
|
75279
|
-
}
|
|
75280
|
-
window[e][i] = { status: "WIP" };
|
|
75281
|
-
var v = l(), y = [];
|
|
75282
|
-
y.push({ maxAmountToScroll: w, scrollLength: u, waitingTime: c, startingScrollPositionX: v.x, startingScrollPositionY: v.y });
|
|
75283
|
-
var f = Date.now();
|
|
75284
|
-
return function t3(o3) {
|
|
75285
|
-
var n3 = void 0 === o3 ? {} : o3, l2 = n3.doneScrolling, s3 = n3.previousScrollResult, d2 = void 0 === s3 ? {} : s3;
|
|
75286
|
-
setTimeout(function() {
|
|
75287
|
-
try {
|
|
75288
|
-
if (l2) {
|
|
75289
|
-
var o4 = a([r2, v]), n4 = o4.x, s4 = o4.y;
|
|
75290
|
-
return y.push({ x: n4, y: s4, msSinceStart: Date.now() - f }), void (window[e][i] = { status: "SUCCESS", value: y });
|
|
75291
|
-
}
|
|
75292
|
-
var c2 = a([r2, { x: v.x, y: d2.y + u }]), p = c2.x, S = c2.y;
|
|
75293
|
-
y.push({ x: p, y: S, msSinceStart: Date.now() - f }), t3({ doneScrolling: S === d2.y || S === w, previousScrollResult: { x: p, y: S } });
|
|
75294
|
-
} catch (t4) {
|
|
75295
|
-
window[e][i] = { status: "ERROR", error: t4 };
|
|
75296
|
-
}
|
|
75297
|
-
}, c);
|
|
75298
|
-
}(), JSON.stringify(window[e][i]);
|
|
75299
|
-
} catch (t3) {
|
|
75300
|
-
return window[e][i] = { status: "ERROR", error: t3 }, JSON.stringify(window[e][i]);
|
|
75301
|
-
}
|
|
75204
|
+
return t(function() {
|
|
75205
|
+
var t2 = document.querySelector("[data-applitools-marker]");
|
|
75206
|
+
t2 && document.body.removeChild(t2);
|
|
75207
|
+
var r = document.documentElement.getAttribute("data-applitools-original-transforms"), o = document.body.getAttribute("data-applitools-original-transforms");
|
|
75208
|
+
r && e([document.documentElement, JSON.parse(r)]), o && e([document.body, JSON.parse(o)]);
|
|
75302
75209
|
});
|
|
75303
75210
|
}();
|
|
75304
75211
|
return s(arg);
|
|
75305
75212
|
};
|
|
75306
|
-
exports.
|
|
75213
|
+
exports.cleanupElementIds = function(arg) {
|
|
75307
75214
|
var s = function() {
|
|
75308
75215
|
"use strict";
|
|
75309
75216
|
function t(t2) {
|
|
75310
75217
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75311
75218
|
}
|
|
75312
|
-
return t(function() {
|
|
75313
|
-
|
|
75219
|
+
return t(function(t2) {
|
|
75220
|
+
(t2 = t2 && t2[0]) && "function" == typeof t2.forEach && t2.forEach(function(t3) {
|
|
75221
|
+
t3.removeAttribute("data-applitools-selector");
|
|
75222
|
+
var o = t3;
|
|
75223
|
+
if (o.getRootNode)
|
|
75224
|
+
try {
|
|
75225
|
+
for (; o; ) {
|
|
75226
|
+
var e = o.getRootNode();
|
|
75227
|
+
if (!e)
|
|
75228
|
+
break;
|
|
75229
|
+
(o = e.constructor && "ShadowRoot" === e.constructor.name ? e.host : e.defaultView ? e.defaultView.frameElement : null) && o.removeAttribute("data-applitools-selector");
|
|
75230
|
+
}
|
|
75231
|
+
} catch (t4) {
|
|
75232
|
+
}
|
|
75233
|
+
});
|
|
75314
75234
|
});
|
|
75315
75235
|
}();
|
|
75316
75236
|
return s(arg);
|
|
75317
75237
|
};
|
|
75318
|
-
exports.
|
|
75238
|
+
exports.blurElement = function(arg) {
|
|
75319
75239
|
var s = function() {
|
|
75320
75240
|
"use strict";
|
|
75321
75241
|
function t(t2) {
|
|
75322
75242
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75323
75243
|
}
|
|
75324
|
-
var r = function(t2) {
|
|
75325
|
-
var r2 = void 0 === t2 ? [] : t2, o = r2[0], e = r2[1], l = Object.keys(e).sort(), n = l.reduce(function(t3, r3) {
|
|
75326
|
-
return t3[r3] = { value: o.style.getPropertyValue(r3), important: Boolean(o.style.getPropertyPriority(r3)) }, t3;
|
|
75327
|
-
}, {});
|
|
75328
|
-
return l.forEach(function(t3) {
|
|
75329
|
-
o.style.setProperty(t3, "string" != typeof e[t3] && e[t3] ? e[t3].value : e[t3], e[t3] && e[t3].important ? "important" : "");
|
|
75330
|
-
}), n;
|
|
75331
|
-
};
|
|
75332
75244
|
return t(function(t2) {
|
|
75333
|
-
var
|
|
75334
|
-
e
|
|
75335
|
-
var n = r([e, { "scroll-behavior": { value: "auto", important: true } }]);
|
|
75336
|
-
return e.scrollTo ? e.scrollTo(l.x, l.y) : (e.scrollLeft = l.x, e.scrollTop = l.y), r([e, n]), { x: e.scrollLeft, y: e.scrollTop };
|
|
75245
|
+
var e = (void 0 === t2 ? [] : t2)[0] || document.activeElement;
|
|
75246
|
+
return e && e.blur(), e;
|
|
75337
75247
|
});
|
|
75338
75248
|
}();
|
|
75339
75249
|
return s(arg);
|
|
75340
75250
|
};
|
|
75341
|
-
exports.
|
|
75251
|
+
exports.addPageMarker = function(arg) {
|
|
75342
75252
|
var s = function() {
|
|
75343
75253
|
"use strict";
|
|
75344
75254
|
function t(t2) {
|
|
75345
75255
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75346
75256
|
}
|
|
75347
|
-
|
|
75348
|
-
var
|
|
75349
|
-
|
|
75350
|
-
return t3[e2] = r.getAttribute(e2), r.setAttribute(e2, u[e2]), t3;
|
|
75257
|
+
var e = function(t2) {
|
|
75258
|
+
var e2 = void 0 === t2 ? [] : t2, r = e2[0], o = e2[1], n = Object.keys(o).sort(), a = n.reduce(function(t3, e3) {
|
|
75259
|
+
return t3[e3] = { value: r.style.getPropertyValue(e3), important: Boolean(r.style.getPropertyPriority(e3)) }, t3;
|
|
75351
75260
|
}, {});
|
|
75261
|
+
return n.forEach(function(t3) {
|
|
75262
|
+
r.style.setProperty(t3, "string" != typeof o[t3] && o[t3] ? o[t3].value : o[t3], o[t3] && o[t3].important ? "important" : "");
|
|
75263
|
+
}), a;
|
|
75264
|
+
};
|
|
75265
|
+
return t(function(t2) {
|
|
75266
|
+
var r = t2[0], o = r.mask, n = r.size, a = void 0 === n ? 1 : n, i = { 1: "rgb(0, 0, 0)", 0: "rgb(255, 255, 255)" }, s2 = a, p = document.createElement("div");
|
|
75267
|
+
p.setAttribute("data-applitools-marker", ""), p.style.setProperty("position", "fixed", "important"), p.style.setProperty("top", "0", "important"), p.style.setProperty("left", "0", "important"), p.style.setProperty("box-sizing", "content-box", "important"), p.style.setProperty("padding", s2 + "px", "important"), p.style.setProperty("background", "rgb(128, 128, 128)", "important"), p.style.setProperty("z-index", "2147483647", "important");
|
|
75268
|
+
for (var l, y = 0; y < o.length; y += l) {
|
|
75269
|
+
for (l = 1; o[y] === o[y + l]; )
|
|
75270
|
+
++l;
|
|
75271
|
+
var m = o[y], d = document.createElement("div");
|
|
75272
|
+
d.style.setProperty("display", "block", "important"), d.style.setProperty("float", "left", "important"), d.style.setProperty("width", l * a + "px", "important"), d.style.setProperty("height", a + "px", "important"), d.style.setProperty("background", i[m], "important"), p.appendChild(d);
|
|
75273
|
+
}
|
|
75274
|
+
var u = { value: "none", important: true }, c = e([document.documentElement, { transform: u, "-webkit-transform": u }]), f = e([document.body, { transform: u, "-webkit-transform": u }]);
|
|
75275
|
+
return document.documentElement.setAttribute("data-applitools-original-transforms", JSON.stringify(c)), document.body.setAttribute("data-applitools-original-transforms", JSON.stringify(f)), document.body.appendChild(p), { mask: o, size: a, offset: s2 };
|
|
75352
75276
|
});
|
|
75353
75277
|
}();
|
|
75354
75278
|
return s(arg);
|
|
75355
75279
|
};
|
|
75356
|
-
exports.
|
|
75280
|
+
exports.addFallbackSelectorIfNeeded = function(arg) {
|
|
75357
75281
|
var s = function() {
|
|
75358
75282
|
"use strict";
|
|
75359
75283
|
function t(t2) {
|
|
75360
75284
|
return t2 && t2.__esModule && Object.prototype.hasOwnProperty.call(t2, "default") ? t2.default : t2;
|
|
75361
75285
|
}
|
|
75286
|
+
var e = function(t2) {
|
|
75287
|
+
var e2 = t2 && t2[0] || null;
|
|
75288
|
+
return !e2 || ("isConnected" in window.Node.prototype ? !e2.isConnected : document.documentElement.contains ? !document.documentElement.contains(e2) : !e2.ownerDocument.documentElement.contains(e2));
|
|
75289
|
+
};
|
|
75362
75290
|
return t(function(t2) {
|
|
75363
|
-
|
|
75364
|
-
|
|
75365
|
-
|
|
75366
|
-
|
|
75367
|
-
|
|
75368
|
-
|
|
75291
|
+
if (!t2.hasAttribute("data-applitools-fallback-selector")) {
|
|
75292
|
+
if (e([t2]))
|
|
75293
|
+
throw new Error("The element is not connected to the DOM: " + function(t3) {
|
|
75294
|
+
var e2 = t3.attributes, n = t3.tagName, o = t3.children.length, r = [].slice.call(e2).map(function(t4) {
|
|
75295
|
+
return t4.name + '="' + t4.value + '"';
|
|
75296
|
+
}).join(" ");
|
|
75297
|
+
return "<" + n + " " + r + (o ? ">" : "/>");
|
|
75298
|
+
}(t2));
|
|
75299
|
+
t2.setAttribute("data-applitools-fallback-selector", function(t3) {
|
|
75300
|
+
var e2 = [];
|
|
75301
|
+
for (; t3 && t3.nodeType === Node.ELEMENT_NODE; )
|
|
75302
|
+
try {
|
|
75303
|
+
var n, o = t3.tagName.toLowerCase(), r = [].slice.call((null == (n = t3.parentNode) ? void 0 : n.children) || []).indexOf(t3);
|
|
75304
|
+
r > -1 && (o += ":nth-child(" + (r + 1) + ")"), e2.unshift(o), t3 = t3.parentNode;
|
|
75305
|
+
} catch (t4) {
|
|
75306
|
+
break;
|
|
75307
|
+
}
|
|
75308
|
+
return e2.length ? e2.join(" > ") : "html";
|
|
75309
|
+
}(t2));
|
|
75310
|
+
}
|
|
75369
75311
|
});
|
|
75370
75312
|
}();
|
|
75371
75313
|
return s(arg);
|
|
75372
75314
|
};
|
|
75373
|
-
exports.
|
|
75315
|
+
exports.addElementIds = function(arg) {
|
|
75374
75316
|
var s = function() {
|
|
75375
75317
|
"use strict";
|
|
75376
|
-
function
|
|
75377
|
-
return
|
|
75318
|
+
function e(e2) {
|
|
75319
|
+
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
75378
75320
|
}
|
|
75379
|
-
var
|
|
75380
|
-
var
|
|
75381
|
-
|
|
75382
|
-
|
|
75383
|
-
|
|
75384
|
-
|
|
75385
|
-
|
|
75386
|
-
|
|
75387
|
-
|
|
75388
|
-
|
|
75389
|
-
|
|
75390
|
-
|
|
75391
|
-
|
|
75321
|
+
var t = function(e2) {
|
|
75322
|
+
var t2 = e2 && e2[0] || null;
|
|
75323
|
+
return !t2 || ("isConnected" in window.Node.prototype ? !t2.isConnected : document.documentElement.contains ? !document.documentElement.contains(t2) : !t2.ownerDocument.documentElement.contains(t2));
|
|
75324
|
+
}, r = t;
|
|
75325
|
+
var n = function(e2) {
|
|
75326
|
+
if (!e2.hasAttribute("data-applitools-fallback-selector")) {
|
|
75327
|
+
if (r([e2]))
|
|
75328
|
+
throw new Error("The element is not connected to the DOM: " + function(e3) {
|
|
75329
|
+
var t2 = e3.attributes, r2 = e3.tagName, n2 = e3.children.length, o2 = [].slice.call(t2).map(function(e4) {
|
|
75330
|
+
return e4.name + '="' + e4.value + '"';
|
|
75331
|
+
}).join(" ");
|
|
75332
|
+
return "<" + r2 + " " + o2 + (n2 ? ">" : "/>");
|
|
75333
|
+
}(e2));
|
|
75334
|
+
e2.setAttribute("data-applitools-fallback-selector", function(e3) {
|
|
75335
|
+
var t2 = [];
|
|
75336
|
+
for (; e3 && e3.nodeType === Node.ELEMENT_NODE; )
|
|
75337
|
+
try {
|
|
75338
|
+
var r2, n2 = e3.tagName.toLowerCase(), o2 = [].slice.call((null == (r2 = e3.parentNode) ? void 0 : r2.children) || []).indexOf(e3);
|
|
75339
|
+
o2 > -1 && (n2 += ":nth-child(" + (o2 + 1) + ")"), t2.unshift(n2), e3 = e3.parentNode;
|
|
75340
|
+
} catch (e4) {
|
|
75341
|
+
break;
|
|
75342
|
+
}
|
|
75343
|
+
return t2.length ? t2.join(" > ") : "html";
|
|
75344
|
+
}(e2));
|
|
75345
|
+
}
|
|
75346
|
+
}, o = t;
|
|
75347
|
+
function a(e2, t2) {
|
|
75348
|
+
if (o([e2])) {
|
|
75349
|
+
var r2 = function(e3) {
|
|
75350
|
+
if (null == e3 || !e3.getAttribute)
|
|
75351
|
+
return { error: "invalid element: " + JSON.stringify(e3) };
|
|
75352
|
+
var t3 = e3.getAttribute("data-applitools-fallback-selector");
|
|
75353
|
+
return t3;
|
|
75354
|
+
}(e2);
|
|
75355
|
+
if (!r2)
|
|
75356
|
+
return { error: "Failed to recover from stale element" };
|
|
75357
|
+
if (r2.error)
|
|
75358
|
+
return r2;
|
|
75359
|
+
var l = document.querySelectorAll(r2);
|
|
75360
|
+
if (!l || 1 !== l.length)
|
|
75361
|
+
return { error: "Failed to recover from stale element - selector found: " + r2 };
|
|
75362
|
+
var i = l[0];
|
|
75363
|
+
return i.setAttribute("data-applitools-selector", t2), i.setAttribute("data-applitools-recovered", true), a(i, t2);
|
|
75364
|
+
}
|
|
75365
|
+
n(e2);
|
|
75366
|
+
var u = e2.getAttribute("data-applitools-selector"), c = u ? u + " " + t2 : t2;
|
|
75367
|
+
return e2.setAttribute("data-applitools-selector", c), '[data-applitools-selector~="' + t2 + '"]';
|
|
75368
|
+
}
|
|
75369
|
+
return e(function(e2) {
|
|
75370
|
+
return e2.map(function(e3) {
|
|
75371
|
+
var t2 = e3[0], r2 = e3[1];
|
|
75372
|
+
return t2.map(function(e4) {
|
|
75373
|
+
var t3 = function(e5) {
|
|
75374
|
+
var t4 = [{ element: e5, kind: "root" }], r3 = /* @__PURE__ */ new Set([e5]), n2 = e5;
|
|
75375
|
+
for (; n2; ) {
|
|
75376
|
+
var o2, a2 = n2.getRootNode && n2.getRootNode();
|
|
75377
|
+
if (!a2)
|
|
75378
|
+
break;
|
|
75379
|
+
if (a2.constructor && "ShadowRoot" === a2.constructor.name ? (n2 = a2.host, o2 = "shadow") : (n2 = a2.defaultView ? a2.defaultView.frameElement : null, o2 = "frame"), n2) {
|
|
75380
|
+
if (r3.has(n2))
|
|
75381
|
+
break;
|
|
75382
|
+
r3.add(n2), t4.push({ element: n2, kind: o2 });
|
|
75383
|
+
}
|
|
75384
|
+
}
|
|
75385
|
+
return t4;
|
|
75386
|
+
}(e4);
|
|
75387
|
+
return t3.map(function(e5) {
|
|
75388
|
+
return { selector: a(e5.element, r2), kind: e5.kind };
|
|
75389
|
+
});
|
|
75390
|
+
});
|
|
75391
|
+
});
|
|
75392
75392
|
});
|
|
75393
75393
|
}();
|
|
75394
75394
|
return s(arg);
|
|
@@ -80803,7 +80803,7 @@ ${l2}`}`, { bundledCss: u2, unfetchedResources: i2 };
|
|
|
80803
80803
|
return m3 && (k2.shadowRoot = m3), k2;
|
|
80804
80804
|
}
|
|
80805
80805
|
}(t4);
|
|
80806
|
-
f2(l2.doCaptureDoc), d2(l2.waitForImages), await Promise.all(m2), f2(l2.waitForImages), N2.version = "1.4.0", N2.scriptVersion = "11.7.
|
|
80806
|
+
f2(l2.doCaptureDoc), d2(l2.waitForImages), await Promise.all(m2), f2(l2.waitForImages), N2.version = "1.4.0", N2.scriptVersion = "11.7.1";
|
|
80807
80807
|
const A2 = p2.length ? `${p2.join("\n")}
|
|
80808
80808
|
` : "", P2 = h2.size ? `${Array.from(h2).join("\n")}
|
|
80809
80809
|
` : "", v2 = JSON.stringify({ separator: w2, cssStartToken: y2, cssEndToken: y2, iframeStartToken: `"${g2}`, iframeEndToken: `${g2}"` });
|
|
@@ -87750,7 +87750,7 @@ var require_captureDomPollForIE = __commonJS({
|
|
|
87750
87750
|
case 24:
|
|
87751
87751
|
return L2 = e5.sent, A2(E2.prefetchCss), j2 = N0({ parseCss: U0, CSSImportRule, getCssFromCache: L2, absolutizeUrl: L0, unfetchedToken: P2 }), k2 = B0({ getCssFromCache: L2, absolutizeUrl: L0 }), C2 = z0({ extractCssFromNode: k2, getBundledCssFromCssText: j2, unfetchedToken: P2 }), S2(E2.doCaptureDoc), M2 = H2(i3), A2(E2.doCaptureDoc), S2(E2.waitForImages), e5.next = 35, Promise.all(O2);
|
|
87752
87752
|
case 35:
|
|
87753
|
-
return A2(E2.waitForImages), M2.version = "1.4.0", M2.scriptVersion = "11.7.
|
|
87753
|
+
return A2(E2.waitForImages), M2.version = "1.4.0", M2.scriptVersion = "11.7.1", N2 = T2.length ? T2.join("\n") + "\n" : "", U2 = x2.size ? Array.from(x2).join("\n") + "\n" : "", D2 = JSON.stringify({ separator: _2, cssStartToken: P2, cssEndToken: P2, iframeStartToken: '"' + R2, iframeEndToken: R2 + '"' }), A2(E2.total), B2 = JSON.stringify(M2), z2 = D2 + "\n" + U2 + _2 + "\n" + N2 + _2 + "\n" + ("string" == typeof B2 ? B2 : G0(M2)) + F2(), console.log("[captureFrame]", JSON.stringify(E2)), e5.abrupt("return", z2);
|
|
87754
87754
|
case 46:
|
|
87755
87755
|
case "end":
|
|
87756
87756
|
return e5.stop();
|
|
@@ -102606,7 +102606,7 @@ creating temp style for access.`), r3 = Yh(e3);
|
|
|
102606
102606
|
function F2(e3) {
|
|
102607
102607
|
return n4.defaultView && n4.defaultView.frameElement && n4.defaultView.frameElement.getAttribute(e3);
|
|
102608
102608
|
}
|
|
102609
|
-
}(t3).then((e3) => (p2.log("processPage end"), e3.scriptVersion = "4.16.
|
|
102609
|
+
}(t3).then((e3) => (p2.log("processPage end"), e3.scriptVersion = "4.16.4", e3));
|
|
102610
102610
|
}, window[x], "domSnapshotResult");
|
|
102611
102611
|
return function(e3) {
|
|
102612
102612
|
try {
|
|
@@ -103451,7 +103451,7 @@ var require_to_generated_selectors = __commonJS({
|
|
|
103451
103451
|
init_setInterval();
|
|
103452
103452
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
103453
103453
|
exports.toGeneratedSelectors = void 0;
|
|
103454
|
-
function toGeneratedSelectors({ elementReferences, logger }) {
|
|
103454
|
+
function toGeneratedSelectors({ elementReferences, logger, logDeprecations }) {
|
|
103455
103455
|
var _a, _b, _c;
|
|
103456
103456
|
const elementReferencesToMark = [
|
|
103457
103457
|
(_a = elementReferences.target) !== null && _a !== void 0 ? _a : [],
|
|
@@ -103498,6 +103498,9 @@ var require_to_generated_selectors = __commonJS({
|
|
|
103498
103498
|
safeSelector: isError ? null : safeSelector
|
|
103499
103499
|
};
|
|
103500
103500
|
});
|
|
103501
|
+
} else if (target || scrolling || calculate.length) {
|
|
103502
|
+
logDeprecations("toGeneratedSelectors: `transformElementReference` was unexpectedly called.");
|
|
103503
|
+
throw new Error("toGeneratedSelectors: `transformElementReference` was unexpectedly called.");
|
|
103501
103504
|
}
|
|
103502
103505
|
return { target, scrolling, calculate };
|
|
103503
103506
|
}
|
|
@@ -103588,7 +103591,8 @@ var require_take_snapshots2 = __commonJS({
|
|
|
103588
103591
|
const { elementReferences, getSafeCheckSettings } = (0, to_safe_check_settings_1.toSafeCheckSettings)({ settings });
|
|
103589
103592
|
const { elementReferencesToMark, getGeneratedSelectors } = (0, to_generated_selectors_1.toGeneratedSelectors)({
|
|
103590
103593
|
elementReferences,
|
|
103591
|
-
logger
|
|
103594
|
+
logger,
|
|
103595
|
+
logDeprecations
|
|
103592
103596
|
});
|
|
103593
103597
|
let snapshots;
|
|
103594
103598
|
if (environment.isWeb) {
|
|
@@ -103636,6 +103640,7 @@ var require_take_snapshots2 = __commonJS({
|
|
|
103636
103640
|
}
|
|
103637
103641
|
}
|
|
103638
103642
|
} else {
|
|
103643
|
+
logDeprecations("takeSnapshots: taking native snapshots is no longer supported. How did you reach this message? (dead code)");
|
|
103639
103644
|
throw new Error("Taking native (non-web) snapshots via VisualGridRunner is no longer supported. Please use ClassicRunner for native apps.");
|
|
103640
103645
|
}
|
|
103641
103646
|
await currentContext.focus();
|
|
@@ -103671,6 +103676,19 @@ var require_take_snapshots2 = __commonJS({
|
|
|
103671
103676
|
title,
|
|
103672
103677
|
userAgent
|
|
103673
103678
|
}));
|
|
103679
|
+
function logDeprecations(...args) {
|
|
103680
|
+
core.logEvent({
|
|
103681
|
+
settings: {
|
|
103682
|
+
level: "Error",
|
|
103683
|
+
event: {
|
|
103684
|
+
type: "SDK.unreachableCodeReached",
|
|
103685
|
+
message: args.join(" ")
|
|
103686
|
+
},
|
|
103687
|
+
...account.eyesServer
|
|
103688
|
+
},
|
|
103689
|
+
logger
|
|
103690
|
+
});
|
|
103691
|
+
}
|
|
103674
103692
|
};
|
|
103675
103693
|
}
|
|
103676
103694
|
exports.makeTakeSnapshots = makeTakeSnapshots;
|
|
@@ -118123,6 +118141,8 @@ var require_dom = __commonJS({
|
|
|
118123
118141
|
}
|
|
118124
118142
|
do {
|
|
118125
118143
|
newFirst.parentNode = parent;
|
|
118144
|
+
var targetDoc = parent.ownerDocument || parent;
|
|
118145
|
+
_updateOwnerDocument(newFirst, targetDoc);
|
|
118126
118146
|
} while (newFirst !== newLast && (newFirst = newFirst.nextSibling));
|
|
118127
118147
|
_onUpdateChild(parent.ownerDocument || parent, parent);
|
|
118128
118148
|
if (node.nodeType == DOCUMENT_FRAGMENT_NODE) {
|
|
@@ -118130,6 +118150,25 @@ var require_dom = __commonJS({
|
|
|
118130
118150
|
}
|
|
118131
118151
|
return node;
|
|
118132
118152
|
}
|
|
118153
|
+
function _updateOwnerDocument(node, newOwnerDocument) {
|
|
118154
|
+
if (node.ownerDocument === newOwnerDocument) {
|
|
118155
|
+
return;
|
|
118156
|
+
}
|
|
118157
|
+
node.ownerDocument = newOwnerDocument;
|
|
118158
|
+
if (node.nodeType === ELEMENT_NODE && node.attributes) {
|
|
118159
|
+
for (var i = 0; i < node.attributes.length; i++) {
|
|
118160
|
+
var attr = node.attributes.item(i);
|
|
118161
|
+
if (attr) {
|
|
118162
|
+
attr.ownerDocument = newOwnerDocument;
|
|
118163
|
+
}
|
|
118164
|
+
}
|
|
118165
|
+
}
|
|
118166
|
+
var child = node.firstChild;
|
|
118167
|
+
while (child) {
|
|
118168
|
+
_updateOwnerDocument(child, newOwnerDocument);
|
|
118169
|
+
child = child.nextSibling;
|
|
118170
|
+
}
|
|
118171
|
+
}
|
|
118133
118172
|
function _appendSingleChild(parentNode, newChild) {
|
|
118134
118173
|
if (newChild.parentNode) {
|
|
118135
118174
|
newChild.parentNode.removeChild(newChild);
|
|
@@ -118144,6 +118183,8 @@ var require_dom = __commonJS({
|
|
|
118144
118183
|
}
|
|
118145
118184
|
parentNode.lastChild = newChild;
|
|
118146
118185
|
_onUpdateChild(parentNode.ownerDocument, parentNode, newChild);
|
|
118186
|
+
var targetDoc = parentNode.ownerDocument || parentNode;
|
|
118187
|
+
_updateOwnerDocument(newChild, targetDoc);
|
|
118147
118188
|
return newChild;
|
|
118148
118189
|
}
|
|
118149
118190
|
Document2.prototype = {
|
|
@@ -118170,7 +118211,7 @@ var require_dom = __commonJS({
|
|
|
118170
118211
|
return newChild;
|
|
118171
118212
|
}
|
|
118172
118213
|
_insertBefore(this, newChild, refChild);
|
|
118173
|
-
newChild
|
|
118214
|
+
_updateOwnerDocument(newChild, this);
|
|
118174
118215
|
if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) {
|
|
118175
118216
|
this.documentElement = newChild;
|
|
118176
118217
|
}
|
|
@@ -118184,7 +118225,7 @@ var require_dom = __commonJS({
|
|
|
118184
118225
|
},
|
|
118185
118226
|
replaceChild: function(newChild, oldChild) {
|
|
118186
118227
|
_insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument);
|
|
118187
|
-
newChild
|
|
118228
|
+
_updateOwnerDocument(newChild, this);
|
|
118188
118229
|
if (oldChild) {
|
|
118189
118230
|
this.removeChild(oldChild);
|
|
118190
118231
|
}
|
|
@@ -118280,7 +118321,22 @@ var require_dom = __commonJS({
|
|
|
118280
118321
|
node.appendData(data);
|
|
118281
118322
|
return node;
|
|
118282
118323
|
},
|
|
118324
|
+
/**
|
|
118325
|
+
* Returns a new CDATASection node whose data is `data`.
|
|
118326
|
+
*
|
|
118327
|
+
* __This implementation differs from the specification:__
|
|
118328
|
+
* - calling this method on an HTML document does not throw `NotSupportedError`.
|
|
118329
|
+
*
|
|
118330
|
+
* @param {string} data
|
|
118331
|
+
* @returns {CDATASection}
|
|
118332
|
+
* @throws DOMException with code `INVALID_CHARACTER_ERR` if `data` contains `"]]>"`.
|
|
118333
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Document/createCDATASection
|
|
118334
|
+
* @see https://dom.spec.whatwg.org/#dom-document-createcdatasection
|
|
118335
|
+
*/
|
|
118283
118336
|
createCDATASection: function(data) {
|
|
118337
|
+
if (data.indexOf("]]>") !== -1) {
|
|
118338
|
+
throw new DOMException2(INVALID_CHARACTER_ERR, 'data contains "]]>"');
|
|
118339
|
+
}
|
|
118284
118340
|
var node = new CDATASection();
|
|
118285
118341
|
node.ownerDocument = this;
|
|
118286
118342
|
node.appendData(data);
|
|
@@ -118683,7 +118739,7 @@ var require_dom = __commonJS({
|
|
|
118683
118739
|
node.data.replace(/[<&>]/g, _xmlEncoder)
|
|
118684
118740
|
);
|
|
118685
118741
|
case CDATA_SECTION_NODE:
|
|
118686
|
-
return buf.push("<![CDATA[", node.data, "]]>");
|
|
118742
|
+
return buf.push("<![CDATA[", node.data.replace(/]]>/g, "]]]]><![CDATA[>"), "]]>");
|
|
118687
118743
|
case COMMENT_NODE:
|
|
118688
118744
|
return buf.push("<!--", node.data, "-->");
|
|
118689
118745
|
case DOCUMENT_TYPE_NODE:
|
|
@@ -121511,7 +121567,7 @@ var require_sax = __commonJS({
|
|
|
121511
121567
|
function parseInstruction(source, start, domBuilder) {
|
|
121512
121568
|
var end = source.indexOf("?>", start);
|
|
121513
121569
|
if (end) {
|
|
121514
|
-
var match = source.substring(start, end).match(/^<\?(\S*)\s*([\s\S]*?)
|
|
121570
|
+
var match = source.substring(start, end).match(/^<\?(\S*)\s*([\s\S]*?)$/);
|
|
121515
121571
|
if (match) {
|
|
121516
121572
|
var len = match[0].length;
|
|
121517
121573
|
domBuilder.processingInstruction(match[1], match[2]);
|
|
@@ -125093,7 +125149,7 @@ var require_get_base_eyes2 = __commonJS({
|
|
|
125093
125149
|
});
|
|
125094
125150
|
return getBaseEyesWithCache;
|
|
125095
125151
|
async function getBaseEyes({ settings, logger = mainLogger }) {
|
|
125096
|
-
var _a;
|
|
125152
|
+
var _a, _b;
|
|
125097
125153
|
logger = logger.extend(mainLogger);
|
|
125098
125154
|
logger.log(`Command "getBaseEyes" is called with settings`, settings);
|
|
125099
125155
|
const ufgClient = await eyes2.core.getUFGClient({
|
|
@@ -125111,7 +125167,7 @@ var require_get_base_eyes2 = __commonJS({
|
|
|
125111
125167
|
const baseEyes = await eyes2.core.base.openEyes({
|
|
125112
125168
|
settings: {
|
|
125113
125169
|
...defaultSettings,
|
|
125114
|
-
fallbackBaselineId: (_a = settings.environment) === null || _a === void 0 ? void 0 : _a.fallbackBaselineId,
|
|
125170
|
+
fallbackBaselineId: (_b = (_a = settings.environment) === null || _a === void 0 ? void 0 : _a.fallbackBaselineId) !== null && _b !== void 0 ? _b : defaultSettings.fallbackBaselineId,
|
|
125115
125171
|
environment: {
|
|
125116
125172
|
...defaultSettings.environment,
|
|
125117
125173
|
...environment,
|
|
@@ -128224,7 +128280,7 @@ var require_package3 = __commonJS({
|
|
|
128224
128280
|
"../core/package.json"(exports, module) {
|
|
128225
128281
|
module.exports = {
|
|
128226
128282
|
name: "@applitools/core",
|
|
128227
|
-
version: "4.59.
|
|
128283
|
+
version: "4.59.3",
|
|
128228
128284
|
homepage: "https://applitools.com",
|
|
128229
128285
|
bugs: {
|
|
128230
128286
|
url: "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -129766,7 +129822,7 @@ var require_package4 = __commonJS({
|
|
|
129766
129822
|
"../eyes/package.json"(exports, module) {
|
|
129767
129823
|
module.exports = {
|
|
129768
129824
|
name: "@applitools/eyes",
|
|
129769
|
-
version: "1.38.
|
|
129825
|
+
version: "1.38.15",
|
|
129770
129826
|
keywords: [
|
|
129771
129827
|
"applitools",
|
|
129772
129828
|
"eyes",
|
|
@@ -131381,7 +131437,7 @@ var require_package5 = __commonJS({
|
|
|
131381
131437
|
"package.json"(exports, module) {
|
|
131382
131438
|
module.exports = {
|
|
131383
131439
|
name: "@applitools/eyes-browser",
|
|
131384
|
-
version: "1.6.
|
|
131440
|
+
version: "1.6.12",
|
|
131385
131441
|
type: "module",
|
|
131386
131442
|
keywords: [
|
|
131387
131443
|
"applitools",
|