@applitools/eyes-browser 1.6.10 → 1.6.11

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 CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.11](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.6.10...js/eyes-browser@1.6.11) (2026-04-13)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * @applitools/dom-snapshot bumped to 4.16.3
9
+ #### Bug Fixes
10
+
11
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
12
+ * @applitools/nml-client bumped to 1.11.23
13
+ #### Bug Fixes
14
+
15
+ * log nml responses | FLD-4433 ([#3757](https://github.com/Applitools-Dev/sdk/issues/3757)) ([70f0bcd](https://github.com/Applitools-Dev/sdk/commit/70f0bcdaa00b60f6fe8f2177b1713b92c8232c27))
16
+ * @applitools/ufg-client bumped to 1.20.2
17
+ #### Bug Fixes
18
+
19
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
20
+ * @applitools/core bumped to 4.59.2
21
+ #### Bug Fixes
22
+
23
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
24
+
25
+
26
+
27
+ * @applitools/eyes bumped to 1.38.14
28
+ #### Bug Fixes
29
+
30
+ * protect page render target from pointing to html instead of cdt | FLD-4313 ([#3758](https://github.com/Applitools-Dev/sdk/issues/3758)) ([fd8008a](https://github.com/Applitools-Dev/sdk/commit/fd8008af0f6b491d3a3a9dce648bef1c18118b9b))
31
+
32
+
33
+
34
+
3
35
  ## [1.6.10](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.6.9...js/eyes-browser@1.6.10) (2026-04-06)
4
36
 
5
37
 
package/dist/index.js CHANGED
@@ -15112,6 +15112,24 @@ var require_Configuration = __commonJS({
15112
15112
  this[key] = value;
15113
15113
  }
15114
15114
  }
15115
+ /** @internal */
15116
+ get skipRootHtmlResource() {
15117
+ return this._config.skipRootHtmlResource;
15118
+ }
15119
+ /** @internal */
15120
+ set skipRootHtmlResource(skipRootHtmlResource) {
15121
+ utils2.guard.isBoolean(skipRootHtmlResource, { name: "skipRootHtmlResource" });
15122
+ this._config.skipRootHtmlResource = skipRootHtmlResource;
15123
+ }
15124
+ /** @internal */
15125
+ getSkipRootHtmlResource() {
15126
+ return this.skipRootHtmlResource;
15127
+ }
15128
+ /** @internal */
15129
+ setSkipRootHtmlResource(skipRootHtmlResource) {
15130
+ this.skipRootHtmlResource = skipRootHtmlResource;
15131
+ return this;
15132
+ }
15115
15133
  get accessibilityValidation() {
15116
15134
  return this.defaultMatchSettings.accessibilitySettings;
15117
15135
  }
@@ -16262,7 +16280,8 @@ var require_Configuration = __commonJS({
16262
16280
  layoutRegions: (_o = this.defaultMatchSettings) === null || _o === void 0 ? void 0 : _o.layoutRegions,
16263
16281
  strictRegions: (_p = this.defaultMatchSettings) === null || _p === void 0 ? void 0 : _p.strictRegions,
16264
16282
  floatingRegions: (_q = this.defaultMatchSettings) === null || _q === void 0 ? void 0 : _q.floatingRegions,
16265
- accessibilityRegions: (_r = this.defaultMatchSettings) === null || _r === void 0 ? void 0 : _r.accessibilityRegions
16283
+ accessibilityRegions: (_r = this.defaultMatchSettings) === null || _r === void 0 ? void 0 : _r.accessibilityRegions,
16284
+ skipRootHtmlResource: this.skipRootHtmlResource
16266
16285
  }),
16267
16286
  close: utils2.general.removeUndefinedProps({
16268
16287
  updateBaselineIfDifferent: this.saveFailedTests,
@@ -94454,6 +94473,7 @@ var require_requests2 = __commonJS({
94454
94473
  logger
94455
94474
  });
94456
94475
  const result = await response.json();
94476
+ logger.log('Received response for "takeScreenshots" with body', result);
94457
94477
  brokerUrl = result.nextPath;
94458
94478
  let screenshots;
94459
94479
  if (Number(result.protocolVersion) >= 2) {
@@ -102160,26 +102180,41 @@ var require_processPagePollCjs = __commonJS({
102160
102180
  function Kh(e3) {
102161
102181
  return e3.reduce((e4, t3) => e4.concat(t3), []);
102162
102182
  }
102163
- function Hh(t3) {
102183
+ let Hh;
102184
+ function Gh() {
102185
+ if (Hh)
102186
+ return Hh;
102187
+ if (void 0 === e2 || window.top === window)
102188
+ return window.fetch;
102189
+ try {
102190
+ const t3 = e2.createElement("iframe");
102191
+ t3.setAttribute("data-applitools-skip", "true"), t3.style.display = "none", e2.head.appendChild(t3);
102192
+ const n3 = t3.contentWindow, r3 = n3.fetch;
102193
+ "function" == typeof r3 && (Hh = r3.bind(n3));
102194
+ } catch (e3) {
102195
+ }
102196
+ return Hh || window.fetch;
102197
+ }
102198
+ function Yh(t3) {
102164
102199
  const n3 = new TextDecoder("utf-8").decode(t3), r3 = e2.head || e2.querySelectorAll("head")[0], o3 = e2.createElement("style");
102165
102200
  return o3.type = "text/css", o3.setAttribute("data-desc", "Applitools tmp variable created by DOM SNAPSHOT"), r3.appendChild(o3), o3.styleSheet ? o3.styleSheet.cssText = n3 : o3.appendChild(e2.createTextNode(n3)), o3.sheet;
102166
102201
  }
102167
- function Gh(e3, t3, n3 = Zh) {
102202
+ function Xh(e3, t3, n3 = Zh) {
102168
102203
  let r3;
102169
102204
  if (t3)
102170
102205
  try {
102171
102206
  t3.cssRules, r3 = t3;
102172
102207
  } catch (o3) {
102173
102208
  n3(`[dom-snapshot] could not access cssRules for ${t3.href} ${o3}
102174
- creating temp style for access.`), r3 = Hh(e3);
102209
+ creating temp style for access.`), r3 = Yh(e3);
102175
102210
  }
102176
102211
  else
102177
- r3 = Hh(e3);
102212
+ r3 = Yh(e3);
102178
102213
  return { corsFreeStyleSheet: r3, cleanStyleSheet: function() {
102179
102214
  r3 !== t3 && r3.ownerNode.parentNode.removeChild(r3.ownerNode);
102180
102215
  } };
102181
102216
  }
102182
- function Yh(e3, { log: t3, compress: n3, serialize: r3 }) {
102217
+ function Qh(e3, { log: t3, compress: n3, serialize: r3 }) {
102183
102218
  return e3.reduce(async (e4, { url: o3, element: i3, cdtNode: a3 }) => {
102184
102219
  const s3 = new Promise(async (e5) => {
102185
102220
  try {
@@ -102205,18 +102240,18 @@ creating temp style for access.`), r3 = Hh(e3);
102205
102240
  }));
102206
102241
  }, Promise.resolve([]));
102207
102242
  }
102208
- const Xh = "__process_resource";
102209
- function Qh(e3) {
102243
+ const Jh = "__process_resource";
102244
+ function ed(e3) {
102210
102245
  return e3 && $h(e3);
102211
102246
  }
102212
102247
  window[x] = window[x] || {};
102213
- const Jh = f(function({ doc: t3 = e2, showLogs: n3, useSessionCache: r3, dontFetchResources: o3, fetchTimeout: i3, fetchConcurrency: a3, skipResources: s3, compressResources: l2, serializeResources: c2, removeReverseProxyURLPrefixes: u2, elements: h2 } = {}) {
102248
+ const td = f(function({ doc: t3 = e2, showLogs: n3, useSessionCache: r3, dontFetchResources: o3, fetchTimeout: i3, fetchConcurrency: a3, skipResources: s3, skipRootHtmlResource: l2, compressResources: c2, serializeResources: u2, removeReverseProxyURLPrefixes: h2, elements: d2 } = {}) {
102214
102249
  if (arguments[0] instanceof Document) {
102215
102250
  t3 = arguments[0];
102216
102251
  const e3 = arguments[1];
102217
- n3 = e3.showLogs, r3 = e3.useSessionCache, o3 = e3.dontFetchResources, i3 = e3.fetchTimeout, a3 = e3.fetchConcurrency, s3 = e3.skipResources, l2 = e3.compressResources, c2 = e3.serializeResources, u2 = e3.removeReverseProxyURLPrefixes;
102252
+ n3 = e3.showLogs, r3 = e3.useSessionCache, o3 = e3.dontFetchResources, i3 = e3.fetchTimeout, a3 = e3.fetchConcurrency, s3 = e3.skipResources, c2 = e3.compressResources, u2 = e3.serializeResources, h2 = e3.removeReverseProxyURLPrefixes;
102218
102253
  }
102219
- const d2 = function(e3, t4 = Date.now()) {
102254
+ const p2 = function(e3, t4 = Date.now()) {
102220
102255
  const n4 = [], r4 = [], o4 = e3 ? (...e4) => console.warn("[dom-snapshot]", `[+${Date.now() - t4}ms]`, ...e4) : () => {
102221
102256
  }, i4 = e3 ? (...e4) => console.error("[dom-snapshot]", `[+${Date.now() - t4}ms]`, ...e4) : () => {
102222
102257
  };
@@ -102235,13 +102270,13 @@ creating temp style for access.`), r3 = Hh(e3);
102235
102270
  i4(e4, ...t5);
102236
102271
  }, getWarnings: () => n4, getErrors: () => r4 };
102237
102272
  }(!!n3, Date.now());
102238
- d2.log("processPage start"), d2.log(`skipResources length: ${s3 && s3.length}`);
102239
- const p2 = r3 && function({ log: e3, sessionStorage: t4 }) {
102273
+ p2.log("processPage start"), p2.log(`skipResources length: ${s3 && s3.length}`);
102274
+ const m2 = r3 && function({ log: e3, sessionStorage: t4 }) {
102240
102275
  let n4;
102241
102276
  try {
102242
102277
  const e4 = t4 || ("undefined" != typeof window ? window.sessionStorage : void 0);
102243
102278
  if (e4) {
102244
- const t5 = e4.getItem(Xh);
102279
+ const t5 = e4.getItem(Jh);
102245
102280
  n4 = t5 ? JSON.parse(t5) : {};
102246
102281
  }
102247
102282
  } catch (t5) {
@@ -102257,10 +102292,10 @@ creating temp style for access.`), r3 = Hh(e3);
102257
102292
  }, persist: function() {
102258
102293
  if (n4) {
102259
102294
  const e4 = t4 || ("undefined" != typeof window ? window.sessionStorage : void 0);
102260
- e4 && e4.setItem(Xh, JSON.stringify(n4));
102295
+ e4 && e4.setItem(Jh, JSON.stringify(n4));
102261
102296
  }
102262
102297
  } };
102263
- }({ log: d2.log }), m2 = {}, f2 = function({ styleSheetCache: e3, CSSRule: t4 = window.CSSRule, removeReverseProxyURLPrefixes: n4 }) {
102298
+ }({ log: p2.log }), f2 = {}, g2 = function({ styleSheetCache: e3, CSSRule: t4 = window.CSSRule, removeReverseProxyURLPrefixes: n4 }) {
102264
102299
  return function r4(o4) {
102265
102300
  return Jl(Array.from(o4.cssRules || []).reduce((o5, i4) => {
102266
102301
  const a4 = { [t4.IMPORT_RULE]: () => {
@@ -102270,7 +102305,7 @@ creating temp style for access.`), r3 = Hh(e3);
102270
102305
  return (null == i4 ? void 0 : i4.cssRules) && s4.push(...r4(i4)), o5.concat(s4);
102271
102306
  }, [])).filter((e4) => "#" !== e4[0]);
102272
102307
  };
102273
- }({ styleSheetCache: m2, removeReverseProxyURLPrefixes: Boolean(null == u2 ? void 0 : u2.length) }), g2 = function({ styleSheetCache: e3 }) {
102308
+ }({ styleSheetCache: f2, removeReverseProxyURLPrefixes: Boolean(null == h2 ? void 0 : h2.length) }), b2 = function({ styleSheetCache: e3 }) {
102274
102309
  return function(t4, n4) {
102275
102310
  const r4 = Kh(n4.map((e4) => {
102276
102311
  try {
@@ -102287,18 +102322,18 @@ creating temp style for access.`), r3 = Hh(e3);
102287
102322
  }(n5) === t4;
102288
102323
  });
102289
102324
  };
102290
- }({ styleSheetCache: m2 }), b2 = function(e3) {
102325
+ }({ styleSheetCache: f2 }), k2 = function(e3) {
102291
102326
  return function(t4, n4 = true) {
102292
102327
  return Jl(Array.from(t4.querySelectorAll("style")).reduce((r4, o4) => {
102293
102328
  const i4 = n4 ? Array.from(t4.styleSheets).find((e4) => e4.ownerNode === o4) : o4.sheet;
102294
102329
  return i4 ? r4.concat(e3(i4)) : r4;
102295
102330
  }, []));
102296
102331
  };
102297
- }(f2), k2 = function(e3) {
102332
+ }(g2), w2 = function(e3) {
102298
102333
  return function(t4) {
102299
102334
  return t4.adoptedStyleSheets ? Jl(t4.adoptedStyleSheets.reduce((t5, n4) => t5.concat(e3(n4)), [])) : [];
102300
102335
  };
102301
- }(f2), w2 = function({ parser: e3, decoder: t4, extractResourceUrlsFromStyleTags: n4 }) {
102336
+ }(g2), v2 = function({ parser: e3, decoder: t4, extractResourceUrlsFromStyleTags: n4 }) {
102302
102337
  return function(r4) {
102303
102338
  const o4 = (t4 || new TextDecoder("utf-8")).decode(r4), i4 = (e3 || new DOMParser()).parseFromString(o4, "image/svg+xml"), a4 = Array.from(i4.querySelectorAll("img[srcset]")).map((e4) => {
102304
102339
  const t5 = e4.getAttribute("srcset");
@@ -102308,7 +102343,7 @@ creating temp style for access.`), r3 = Hh(e3);
102308
102343
  }(i4);
102309
102344
  return a4.concat(s4).concat(l3).concat(c3).concat(u3).concat(h3).filter((e4) => "#" !== e4[0]);
102310
102345
  };
102311
- }({ extractResourceUrlsFromStyleTags: b2 }), v2 = function({ fetch: e3 = window.fetch, AbortController: t4 = window.AbortController, timeout: n4 = 1e4, mediaDownloadTimeout: r4 = 3e4 } = {}) {
102346
+ }({ extractResourceUrlsFromStyleTags: k2 }), x2 = function({ fetch: e3 = Gh(), AbortController: t4 = window.AbortController, timeout: n4 = 1e4, mediaDownloadTimeout: r4 = 3e4 } = {}) {
102312
102347
  return function(o4) {
102313
102348
  return new Promise((i4, a4) => {
102314
102349
  const s4 = new t4(), l3 = () => {
@@ -102324,7 +102359,7 @@ creating temp style for access.`), r3 = Hh(e3);
102324
102359
  }).then(i4).catch((e4) => a4(e4));
102325
102360
  });
102326
102361
  };
102327
- }({ timeout: i3 }), x2 = function({ fetchUrl: e3, findStyleSheetByUrl: t4, getCorsFreeStyleSheet: n4, extractResourcesFromStyleSheet: r4, extractResourcesFromSvg: o4, sessionCache: i4, cache: a4 = {}, compress: s4, serialize: l3, log: c3 = Zh }) {
102362
+ }({ timeout: i3 }), S2 = function({ fetchUrl: e3, findStyleSheetByUrl: t4, getCorsFreeStyleSheet: n4, extractResourcesFromStyleSheet: r4, extractResourcesFromSvg: o4, sessionCache: i4, cache: a4 = {}, compress: s4, serialize: l3, log: c3 = Zh }) {
102328
102363
  return function({ url: u3, documents: h3, getResourceUrlsAndBlobs: d3, forceCreateStyle: p3 = false, skipResources: m3 }) {
102329
102364
  if (!a4[u3])
102330
102365
  if (i4 && i4.getItem(u3)) {
@@ -102382,14 +102417,14 @@ creating temp style for access.`), r3 = Hh(e3);
102382
102417
  }), c3("cleared from sessionStorage:", u3);
102383
102418
  }
102384
102419
  };
102385
- }({ fetchUrl: v2, findStyleSheetByUrl: g2, getCorsFreeStyleSheet: Gh, extractResourcesFromStyleSheet: f2, extractResourcesFromSvg: w2, log: d2.log, sessionCache: p2, compress: l2, serialize: c2 }), S2 = function({ processResource: e3, aggregateResourceUrlsAndBlobs: t4, concurrency: n4 = 100 }) {
102420
+ }({ fetchUrl: x2, findStyleSheetByUrl: b2, getCorsFreeStyleSheet: Xh, extractResourcesFromStyleSheet: g2, extractResourcesFromSvg: v2, log: p2.log, sessionCache: m2, compress: c2, serialize: u2 }), C2 = function({ processResource: e3, aggregateResourceUrlsAndBlobs: t4, concurrency: n4 = 100 }) {
102386
102421
  if (!Number.isInteger(n4) || n4 < 1)
102387
102422
  throw new TypeError(`concurrency must be an integer >= 1, got ${n4}`);
102388
102423
  const r4 = nc(n4);
102389
102424
  return function n5({ documents: o4, urls: i4, forceCreateStyle: a4 = false, skipResources: s4 }) {
102390
102425
  return Promise.all(i4.map((t5) => r4(() => e3({ url: t5, documents: o4, getResourceUrlsAndBlobs: n5, forceCreateStyle: a4, skipResources: s4 })))).then((e4) => t4(e4));
102391
102426
  };
102392
- }({ processResource: x2, aggregateResourceUrlsAndBlobs: ec, concurrency: a3 });
102427
+ }({ processResource: S2, aggregateResourceUrlsAndBlobs: ec, concurrency: a3 });
102393
102428
  return function t4(n4, r4 = n4.location.href) {
102394
102429
  const i4 = function(e3) {
102395
102430
  const t5 = e3.querySelectorAll("base")[0] && e3.querySelectorAll("base")[0].href;
@@ -102444,8 +102479,8 @@ creating temp style for access.`), r3 = Hh(e3);
102444
102479
  return l3.setAttribute("data-applitools-selector", n8), l3.setAttribute("data-applitools-recovered", true), i5(l3, n8);
102445
102480
  }
102446
102481
  r6(t8);
102447
- var c3 = t8.getAttribute("data-applitools-selector"), u4 = c3 ? c3 + " " + n8 : n8;
102448
- return t8.setAttribute("data-applitools-selector", u4), '[data-applitools-selector~="' + n8 + '"]';
102482
+ var c3 = t8.getAttribute("data-applitools-selector"), u3 = c3 ? c3 + " " + n8 : n8;
102483
+ return t8.setAttribute("data-applitools-selector", u3), '[data-applitools-selector~="' + n8 + '"]';
102449
102484
  }
102450
102485
  return function(e3) {
102451
102486
  return e3 && e3.__esModule && Object.prototype.hasOwnProperty.call(e3, "default") ? e3.default : e3;
@@ -102489,12 +102524,12 @@ creating temp style for access.`), r3 = Hh(e3);
102489
102524
  }, void 0);
102490
102525
  return o4 += e3.length, t6;
102491
102526
  });
102492
- }(h2), { cdt: u3, docRoots: m3, canvasElements: f3, frames: g3, inlineFrames: w3, crossFrames: v3, linkUrls: x3, imageBlobs: C2, videoBlobs: z2 } = Gl(n4, i4, d2), A2 = Kh(m3.map((e3) => b2(e3))), T2 = Kh(m3.map((e3) => k2(e3))), O2 = (B2 = i4, function(e3) {
102527
+ }(d2), { cdt: h3, docRoots: f3, canvasElements: g3, frames: b3, inlineFrames: v3, crossFrames: x3, linkUrls: S3, imageBlobs: z2, videoBlobs: A2 } = Gl(n4, i4, p2), T2 = Kh(f3.map((e3) => k2(e3))), O2 = Kh(f3.map((e3) => w2(e3))), L2 = (P2 = i4, function(e3) {
102493
102528
  try {
102494
- return _(y(e3, B2));
102529
+ return _(y(e3, P2));
102495
102530
  } catch (e4) {
102496
102531
  }
102497
- }), L2 = Jl(Array.from(x3).concat(Array.from(A2)).concat(Array.from(T2))).map((e3) => e3.trim()).reduce((e3, t5) => {
102532
+ }), E2 = Jl(Array.from(S3).concat(Array.from(T2)).concat(Array.from(O2))).map((e3) => e3.trim()).reduce((e3, t5) => {
102498
102533
  e3.push(t5);
102499
102534
  const n5 = function(e4) {
102500
102535
  return e4 && e4.replace(/(\\[0-9a-fA-F]{1,6}\s?)/g, (e5) => {
@@ -102503,21 +102538,21 @@ creating temp style for access.`), r3 = Hh(e3);
102503
102538
  }) || e4;
102504
102539
  }(t5);
102505
102540
  return n5 !== t5 && e3.push(n5), e3;
102506
- }, []).map(O2).map(Vh).filter(Qh), E2 = o3 ? Promise.resolve({ resourceUrls: L2, blobsObj: {} }) : S2({ documents: m3, urls: L2, skipResources: s3 }).then((e3) => (p2 && p2.persist(), e3)), R2 = Yh(f3, { log: d2.log, compress: l2, serialize: c2 }), N2 = E2.then((e3) => function(e4, { doc: t5, fetchedBlobs: n5, log: r5, compress: o4, serialize: i5, sessionCache: a5 }) {
102541
+ }, []).map(L2).map(Vh).filter(ed).filter((e3) => !l2 || e3 !== Vh(r4)), R2 = o3 ? Promise.resolve({ resourceUrls: E2, blobsObj: {} }) : C2({ documents: f3, urls: E2, skipResources: s3 }).then((e3) => (m2 && m2.persist(), e3)), N2 = Qh(g3, { log: p2.log, compress: c2, serialize: u2 }), I2 = R2.then((e3) => function(e4, { doc: t5, fetchedBlobs: n5, log: r5, compress: o4, serialize: i5, sessionCache: a5 }) {
102507
102542
  if (!t5.body || 0 === e4.length)
102508
102543
  return Promise.resolve([]);
102509
102544
  const s4 = new Set(Object.keys(n5)), l3 = e4.filter(({ url: e5 }) => !(s4.has("blob:" + e5) || a5 && a5.getItem("blob:" + e5))), c3 = t5.createElement("canvas");
102510
102545
  c3.style.display = "none";
102511
- const u4 = Zl(t5.body);
102512
- return u4.appendChild(c3), Promise.all(l3.map(({ element: e5, url: t6, cdtNode: n6 }) => {
102546
+ const u3 = Zl(t5.body);
102547
+ return u3.appendChild(c3), Promise.all(l3.map(({ element: e5, url: t6, cdtNode: n6 }) => {
102513
102548
  try {
102514
- return c3.width = e5.naturalWidth, c3.height = e5.naturalHeight, c3.getContext("2d").drawImage(Zl.unwrap(e5), 0, 0), Yh([{ url: t6, element: c3, cdtNode: n6 }], { log: r5, compress: o4, serialize: i5 });
102549
+ return c3.width = e5.naturalWidth, c3.height = e5.naturalHeight, c3.getContext("2d").drawImage(Zl.unwrap(e5), 0, 0), Qh([{ url: t6, element: c3, cdtNode: n6 }], { log: r5, compress: o4, serialize: i5 });
102515
102550
  } catch (e6) {
102516
102551
  }
102517
102552
  })).then((e5) => Kh(e5)).catch().finally(() => {
102518
- u4.removeChild(c3);
102553
+ u3.removeChild(c3);
102519
102554
  });
102520
- }(C2, { fetchedBlobs: e3.blobsObj, doc: n4, log: d2.log, compress: l2, serialize: c2, sessionCache: p2 })), I2 = E2.then((e3) => function(e4, { doc: t5, fetchedBlobs: n5, compress: r5, serialize: o4, sessionCache: i5 }) {
102555
+ }(z2, { fetchedBlobs: e3.blobsObj, doc: n4, log: p2.log, compress: c2, serialize: u2, sessionCache: m2 })), j2 = R2.then((e3) => function(e4, { doc: t5, fetchedBlobs: n5, compress: r5, serialize: o4, sessionCache: i5 }) {
102521
102556
  if (!t5.body)
102522
102557
  return Promise.resolve([]);
102523
102558
  const a5 = new Set(Object.keys(n5)), s4 = e4.filter(({ url: e5 }) => !(a5.has("blob:" + e5) || i5 && i5.getItem("blob:" + e5)));
@@ -102533,18 +102568,18 @@ creating temp style for access.`), r3 = Hh(e3);
102533
102568
  }, { once: true }), e5.play(), a6.start(), setTimeout(() => a6.requestData(), 1e3);
102534
102569
  });
102535
102570
  })).then((e5) => Kh(e5));
102536
- }(z2, { fetchedBlobs: e3.blobsObj, doc: n4, log: d2.log, compress: l2, serialize: c2, sessionCache: p2 })), j2 = g3.map(({ element: e3, url: n5 }) => t4(e3.contentDocument, n5)), D2 = w3.map(({ element: e3, url: n5 }) => t4(e3.contentDocument, n5));
102537
- var B2;
102538
- return Promise.all([E2, R2, N2, I2, ...j2, ...D2]).then(function(e3) {
102539
- const { resourceUrls: t5, blobsObj: n5 } = e3[0], o4 = e3[1], s4 = e3[2], l3 = e3[3], c3 = e3.slice(4), p3 = P2("src"), m4 = P2("data-applitools-selector"), f4 = m4 ? `[data-applitools-selector="${m4}"]` : void 0, g4 = function(e4) {
102571
+ }(A2, { fetchedBlobs: e3.blobsObj, doc: n4, log: p2.log, compress: c2, serialize: u2, sessionCache: m2 })), D2 = b3.map(({ element: e3, url: n5 }) => t4(e3.contentDocument, n5)), B2 = v3.map(({ element: e3, url: n5 }) => t4(e3.contentDocument, n5));
102572
+ var P2;
102573
+ return Promise.all([R2, N2, I2, j2, ...D2, ...B2]).then(function(e3) {
102574
+ const { resourceUrls: t5, blobsObj: n5 } = e3[0], o4 = e3[1], s4 = e3[2], l3 = e3[3], c3 = e3.slice(4), u3 = F2("src"), m3 = F2("data-applitools-selector"), f4 = m3 ? `[data-applitools-selector="${m3}"]` : void 0, g4 = function(e4) {
102540
102575
  return Object.keys(e4).map((t6) => Object.assign({ url: t6.replace(/^blob:/, "") }, e4[t6]));
102541
- }(n5).concat(o4).concat(s4).concat(l3), b3 = [...d2.getWarnings()], y2 = [];
102576
+ }(n5).concat(o4).concat(s4).concat(l3), b4 = [...p2.getWarnings()], y2 = [];
102542
102577
  for (const e4 of g4)
102543
- 599 === e4.errorStatusCode || 504 === e4.errorStatusCode ? (t5.push(e4.url), b3.push(`${e4.errorStatusCode}:${e4.url}`)) : y2.push(e4);
102544
- const k3 = { cdt: u3, url: r4, srcAttr: p3, resourceUrls: t5.map((e4) => e4.replace(/^blob:/, "")), blobs: y2, frames: c3, crossFrames: v3 };
102578
+ 599 === e4.errorStatusCode || 504 === e4.errorStatusCode ? (t5.push(e4.url), b4.push(`${e4.errorStatusCode}:${e4.url}`)) : y2.push(e4);
102579
+ const k3 = { cdt: h3, url: r4, srcAttr: u3, resourceUrls: t5.map((e4) => e4.replace(/^blob:/, "")), blobs: y2, frames: c3, crossFrames: x3 };
102545
102580
  void 0 !== a4 && (k3.safeSelectors = a4), void 0 !== f4 && (k3.selector = f4), i4 !== r4 && (k3.baseUri = i4);
102546
102581
  try {
102547
- h2 && (w4 = h2, ((x4 = function(e4) {
102582
+ d2 && (w3 = d2, ((v4 = function(e4) {
102548
102583
  (e4 = e4 && e4[0]) && "function" == typeof e4.forEach && e4.forEach(function(e5) {
102549
102584
  e5.removeAttribute("data-applitools-selector");
102550
102585
  var t6 = e5;
@@ -102559,23 +102594,23 @@ creating temp style for access.`), r3 = Hh(e3);
102559
102594
  } catch (e6) {
102560
102595
  }
102561
102596
  });
102562
- }) && x4.__esModule && Object.prototype.hasOwnProperty.call(x4, "default") ? x4.default : x4)(w4));
102597
+ }) && v4.__esModule && Object.prototype.hasOwnProperty.call(v4, "default") ? v4.default : v4)(w3));
102563
102598
  } catch (e4) {
102564
- b3.push(e4.message);
102599
+ b4.push(e4.message);
102565
102600
  }
102566
- var w4, x4;
102567
- b3.length > 0 && (k3.warnings = b3);
102568
- const _2 = d2.getErrors();
102601
+ var w3, v4;
102602
+ b4.length > 0 && (k3.warnings = b4);
102603
+ const _2 = p2.getErrors();
102569
102604
  return _2.length > 0 && (k3.errors = _2), k3;
102570
102605
  });
102571
- function P2(e3) {
102606
+ function F2(e3) {
102572
102607
  return n4.defaultView && n4.defaultView.frameElement && n4.defaultView.frameElement.getAttribute(e3);
102573
102608
  }
102574
- }(t3).then((e3) => (d2.log("processPage end"), e3.scriptVersion = "4.16.2", e3));
102609
+ }(t3).then((e3) => (p2.log("processPage end"), e3.scriptVersion = "4.16.3", e3));
102575
102610
  }, window[x], "domSnapshotResult");
102576
102611
  return function(e3) {
102577
102612
  try {
102578
- return JSON.stringify(Jh(e3)(e3));
102613
+ return JSON.stringify(td(e3)(e3));
102579
102614
  } catch (e4) {
102580
102615
  return JSON.stringify({ status: "ERROR", error: e4.message });
102581
102616
  }
@@ -102825,6 +102860,7 @@ var require_take_dom_snapshot = __commonJS({
102825
102860
  const arg = {
102826
102861
  dontFetchResources: settings === null || settings === void 0 ? void 0 : settings.disableBrowserFetching,
102827
102862
  skipResources: settings === null || settings === void 0 ? void 0 : settings.skipResources,
102863
+ skipRootHtmlResource: settings === null || settings === void 0 ? void 0 : settings.skipRootHtmlResource,
102828
102864
  fetchConcurrency: settings === null || settings === void 0 ? void 0 : settings.fetchConcurrency,
102829
102865
  removeReverseProxyURLPrefixes: Boolean(process.env.APPLITOOLS_SCRIPT_REMOVE_REVERSE_PROXY_URL_PREFIXES),
102830
102866
  chunkByteLength: (_a2 = settings === null || settings === void 0 ? void 0 : settings.chunkByteLength) !== null && _a2 !== void 0 ? _a2 : Number(process.env.APPLITOOLS_SCRIPT_RESULT_MAX_BYTE_LENGTH) || (environment.isIOS ? 1e5 : 250 * 1024 * 1024),
@@ -103573,6 +103609,7 @@ var require_take_snapshots2 = __commonJS({
103573
103609
  layoutBreakpoints: settings.layoutBreakpoints,
103574
103610
  environments: uniqueEnvironments,
103575
103611
  skipResources: ufgClient.getCachedResourceUrls(),
103612
+ skipRootHtmlResource: settings.skipRootHtmlResource,
103576
103613
  lazyLoad: settings.lazyLoad,
103577
103614
  elementReferences: elementReferencesToMark
103578
103615
  },
@@ -104435,7 +104472,7 @@ var require_create_render_target = __commonJS({
104435
104472
  const [snapshotResources, ...frameResources] = await Promise.all([
104436
104473
  processResources({
104437
104474
  resources: Object.fromEntries([
104438
- ...((_a = snapshot.resourceUrls) !== null && _a !== void 0 ? _a : []).map((url) => {
104475
+ ...((_a = snapshot.resourceUrls) !== null && _a !== void 0 ? _a : []).filter((url) => (settings === null || settings === void 0 ? void 0 : settings.skipRootHtmlResource) ? url !== snapshot.url : true).map((url) => {
104439
104476
  return [url, (0, resource_1.makeResource)({ url, environment: settings === null || settings === void 0 ? void 0 : settings.environment })];
104440
104477
  }),
104441
104478
  ...Object.entries((_b = snapshot.resourceContents) !== null && _b !== void 0 ? _b : {}).map(([url, resource]) => {
@@ -125119,7 +125156,8 @@ var require_create_render_target_from_snapshot = __commonJS({
125119
125156
  ...snapshot.settings.headers
125120
125157
  },
125121
125158
  proxy: snapshot.account.eyesServer.proxy,
125122
- autProxy: snapshot.settings.autProxy
125159
+ autProxy: snapshot.settings.autProxy,
125160
+ skipRootHtmlResource: snapshot.settings.skipRootHtmlResource
125123
125161
  },
125124
125162
  logger
125125
125163
  });
@@ -128186,7 +128224,7 @@ var require_package3 = __commonJS({
128186
128224
  "../core/package.json"(exports, module) {
128187
128225
  module.exports = {
128188
128226
  name: "@applitools/core",
128189
- version: "4.59.1",
128227
+ version: "4.59.2",
128190
128228
  homepage: "https://applitools.com",
128191
128229
  bugs: {
128192
128230
  url: "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -129728,7 +129766,7 @@ var require_package4 = __commonJS({
129728
129766
  "../eyes/package.json"(exports, module) {
129729
129767
  module.exports = {
129730
129768
  name: "@applitools/eyes",
129731
- version: "1.38.13",
129769
+ version: "1.38.14",
129732
129770
  keywords: [
129733
129771
  "applitools",
129734
129772
  "eyes",
@@ -131343,7 +131381,7 @@ var require_package5 = __commonJS({
131343
131381
  "package.json"(exports, module) {
131344
131382
  module.exports = {
131345
131383
  name: "@applitools/eyes-browser",
131346
- version: "1.6.10",
131384
+ version: "1.6.11",
131347
131385
  type: "module",
131348
131386
  keywords: [
131349
131387
  "applitools",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-browser",
3
- "version": "1.6.10",
3
+ "version": "1.6.11",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "applitools",
@@ -51,7 +51,7 @@
51
51
  "test": "run playwright test"
52
52
  },
53
53
  "dependencies": {
54
- "@applitools/eyes": "1.38.13"
54
+ "@applitools/eyes": "1.38.14"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@applitools/test-server": "1.4.2",
@@ -99,6 +99,8 @@ export type Configuration<TSpec extends Core.SpecType = Core.SpecType> = {
99
99
  visualGridOptions?: Record<string, any>;
100
100
  waitBeforeCapture?: number | (() => Promise<void>);
101
101
  waitBeforeScreenshots?: number;
102
+ /** @internal */
103
+ skipRootHtmlResource?: boolean;
102
104
  };
103
105
  export declare class ConfigurationData<TSpec extends Core.SpecType = Core.SpecType> implements Required<Configuration<TSpec>> {
104
106
  protected static readonly _spec: Core.SpecDriver<Core.SpecType>;
@@ -109,6 +111,14 @@ export declare class ConfigurationData<TSpec extends Core.SpecType = Core.SpecTy
109
111
  constructor(config?: Configuration<TSpec>);
110
112
  /** @internal */
111
113
  constructor(config?: Configuration<TSpec>, spec?: Core.SpecDriver<TSpec>);
114
+ /** @internal */
115
+ get skipRootHtmlResource(): boolean;
116
+ /** @internal */
117
+ set skipRootHtmlResource(skipRootHtmlResource: boolean);
118
+ /** @internal */
119
+ getSkipRootHtmlResource(): boolean;
120
+ /** @internal */
121
+ setSkipRootHtmlResource(skipRootHtmlResource: boolean): this;
112
122
  get accessibilityValidation(): AccessibilitySettings;
113
123
  set accessibilityValidation(accessibilityValidation: AccessibilitySettings);
114
124
  getAccessibilityValidation(): AccessibilitySettings;