Socket
Socket
Sign inDemoInstall

@applitools/dom-capture

Package Overview
Dependencies
Maintainers
32
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/dom-capture - npm Package Compare versions

Comparing version 11.1.1 to 11.1.2

3

CHANGELOG.md

@@ -6,3 +6,6 @@

## 11.1.2 - 2022/8/15
fix crash when a page contains an iframe in shadow root element structure
## 11.1.1 - 2022/7/17

@@ -9,0 +12,0 @@

4

dist/captureDom.js

@@ -1,7 +0,7 @@

/* @applitools/dom-capture@11.1.1 */
/* @applitools/dom-capture@11.1.2 */
function __captureDom() {
var captureDom=function(){"use strict";function e(e,t=0){const n=e.charCodeAt(t);if(n>=55296&&n<56320){return 1024*(n-55296)+(e.charCodeAt(t+1)-56320)+65536}return 56320<=n&&n<=57343?-1:n}var t=function(t,n){const o=[];let r=0;for(let s=0;s<t.length;++s){const a=e(t,s);let c=0;a>0&&(c=a<128?1:a<2048?2:a<65536?3:a<2097152?4:a<67108864?5:6),r+c>n?(o.push(s),r=c):r+=c}return o};const n="WIP",o="SUCCESS",r="SUCCESS_CHUNKED",s="ERROR";var a=function(e,a,c={}){const i=function(e,{chunkByteLength:a=0}={}){if(e){if(e.value){if(a){if(!e.chunks){const n=JSON.stringify(e.value);e.chunks=t(n,a),e.chunks.length>0&&(e.from=0,e.value=n)}if(e.from>=0)return{status:r,value:e.value.substring(e.from,e.from=e.chunks.shift()),done:!e.from}}return{status:o,value:e.value}}return e.error?{status:s,error:e.error}:{status:n}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((e=e||{})[a],c);return(i.status===o||i.status===s||i.status===r&&i.done)&&(e[a]=null),i};var c={chunkify:t,pollify:function(e,t,n){return o=>function(){return t[n]||(t[n]={},e.apply(null,arguments).then(e=>t[n].value=e).catch(e=>t[n].error=e.message)),a(t,n,o)}},poll:a,absolutizeUrl:function(e,t){return new URL(e,t).href},isInlineFrame:function(e){return e.contentDocument&&e.contentDocument.location&&!/^https?:$/.test(e.contentDocument.location.protocol)},isAccessibleFrame:function(e){try{const t=e.contentDocument;return Boolean(t&&t.defaultView&&t.defaultView.frameElement)}catch(e){return!1}}};const i=/url\((?!['"]?:)['"]?([^'")]*)['"]?\)/;var u=function(e){const t=e?e.match(i):void 0;return t?t[1]:t};var l=async function({bgImages:e,timeout:t=5e3,Image:n=window.Image}){return(await Promise.all(Array.from(e).map(e=>{return Promise.race([new Promise(t=>{const o=new n;o.onload=()=>t({url:e,width:o.naturalWidth,height:o.naturalHeight}),o.onerror=()=>t(),o.src=e}),(o=t,new Promise(e=>{setTimeout(e,o)}))]);var o}))).reduce((e,t)=>(t&&(e[t.url]={width:t.width,height:t.height}),e),{})};function f(e){return Array.prototype.filter.call(e.parentNode.childNodes,t=>t.tagName===e.tagName).indexOf(e)+1}var d=function e(t){if(!t.ownerDocument)return"";let n="",o=t,r=t.ownerDocument,s=r.defaultView.frameElement;for(;o!==r;)n=`${o.tagName}[${f(o)}]/${n}`,o=o.parentNode;return s&&(n=`${e(s)},${n}`),n.replace(/\/$/,"")};var m=function({parseCss:e,CSSImportRule:t,absolutizeUrl:n,getCssFromCache:o,unfetchedToken:r}){return function s(a,c){let i,u="";try{const l=e(a);for(const e of Array.from(l.cssRules))if(e instanceof t){const t=n(e.href,c),a=o(t);if(void 0!==a){const{bundledCss:e,unfetchedResources:n}=s(a,t);n&&(i=new Set(n)),u=`${u}${e}`}else i=new Set([t]),u=`\n${r}${t}${r}`}}catch(e){console.log("error during getBundledCssFromCssText, styleBaseUrl="+c,e)}var l,f;return u=`${u}${l=a,f=c,`\n/** ${f} **/\n${l}`}`,{bundledCss:u,unfetchedResources:i}}};var h=function(e){var t=document.implementation.createHTMLDocument(""),n=t.createElement("style");return n.textContent=e,t.body.appendChild(n),n.sheet};var p=function(e){const t=["before","after"];try{let n=[];return t.forEach(t=>{const o=window.getComputedStyle(e,":"+t);o&&"none"!==o.getPropertyValue("content")&&n.push(t)}),n.join("_and_")}catch(e){return!1}};var g=function(e,{fetchTimeLimit:t}={}){return async function(n){const o=new AbortController,r=[e(n,{cache:"force-cache",signal:o.signal}).then(e=>{if(e.ok)return e.text();console.log("/failed to fetch (status "+e.status+") css from: "+n+"/")}).catch(e=>{console.log("/failed to fetch (error "+e.toString()+") css from: "+n+"/")})];return Number.isNaN(Number(t))||r.push(new Promise(e=>setTimeout(e,t)).then(()=>o.abort())),Promise.race(r)}},y=function(e){const t=Array.from(e.attributes).find(e=>"href"===e.name.toLowerCase());return t&&t.value},C=function(e){if(e.nodeName&&"LINK"===e.nodeName.toUpperCase()&&e.attributes){const t=new Map(Array.from(e.attributes,e=>[e.name.toLowerCase(),e.value.toLowerCase()]));return"stylesheet"===t.get("rel")||"style"===t.get("as")&&["preload","prefetch"].includes(t.get("rel"))}return!1};var w=function(e){return e&&e.startsWith("data:")};var E=function({getCssFromCache:e,absolutizeUrl:t}){return function(n,o){let r,s,a;if(function(e){return e.nodeName&&"STYLE"===e.nodeName.toUpperCase()}(n))r=Array.from(n.childNodes).map(e=>e.nodeValue).join(""),s=o;else if(C(n)){const c=y(n);w(c)?(s=o,r=c.match(/,(.+)/)[1]):(s=t(c,o),r=e(s)),a=void 0===r}return{cssText:r,styleBaseUrl:s,isUnfetched:a}}};var T=function({extractCssFromNode:e,getBundledCssFromCssText:t,unfetchedToken:n}){return function(o,r){const{styleBaseUrl:s,cssText:a,isUnfetched:c}=e(o,r);let i,u="";if(a){const{bundledCss:e,unfetchedResources:n}=t(a,s);u+=e,i=new Set(n)}else c&&(u+=`${n}${s}${n}`,i=new Set([s]));return{bundledCss:u,unfetchedResources:i}}},N={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};const{absolutizeUrl:b,isInlineFrame:S}=c,{NODE_TYPES:v}=N;var A=function(e){return async function(t=document){const n={},o=Date.now(),r=[];return function t(n,o,r,s){function a(t){switch(s.push(async function(t,n,o){let r,s;C(t)&&(s=b(y(t),n),r=await e(s),void 0!==r&&(o[s]=r));r&&await async function t(n,o,r){try{const s=h(n),a=[];for(const n of Array.from(s.cssRules))n instanceof CSSImportRule&&a.push((async()=>{const s=b(n.href,o),a=await e(s);r[s]=a,void 0!==a&&await t(a,s,r)})());await Promise.all(a)}catch(e){console.log("error during fetchBundledCss, resourceUrl="+o,e)}}(r,s,o)}(t,o,r)),t.nodeType){case v.ELEMENT:return"IFRAME"===t.tagName.toUpperCase()?i(t):c(t)}}async function c(e){Array.prototype.map.call(e.childNodes,a)}async function i(e){if(c(e),e.contentDocument)try{const n=S(e)?e.baseURI:e.contentDocument.location.href;t(e.contentDocument,n,r,s)}catch(e){console.log(e)}}a(n.documentElement)}(t,t.location.href,n,r),await Promise.all(r),console.log("[prefetchAllCss]",Date.now()-o),function(e){return n[e]}}};const{absolutizeUrl:R,isInlineFrame:D}=c,{NODE_TYPES:P,DEFAULT_STYLE_PROPS:$,DEFAULT_RECT_PROPS:U,DEFAULT_IGNORED_TAG_NAMES:_}=N;return async function({doc:e=document,styleProps:t=$,rectProps:n=U,ignoredTagNames:o=_,addStats:r=!1,fetchTimeLimit:s=3e4}={}){arguments[1]&&(e=arguments[1]),arguments[2]&&(r=arguments[2]),arguments[3]&&(s=arguments[3]);const a={total:{},prefetchCss:{},doCaptureDoc:{},waitForImages:{}};function c(e){e.startTime=Date.now()}function i(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime}const f=[];c(a.total);const y=new Set,C=[],w="@@@@@",N="#####",b="-----";c(a.prefetchCss);const S=A(g(fetch,{fetchTimeLimit:s})),v=await S(e);i(a.prefetchCss);const F=m({parseCss:h,CSSImportRule:CSSImportRule,getCssFromCache:v,absolutizeUrl:R,unfetchedToken:N}),k=E({getCssFromCache:v,absolutizeUrl:R}),I=T({extractCssFromNode:k,getBundledCssFromCssText:F,unfetchedToken:N});c(a.doCaptureDoc);const L=G(e);i(a.doCaptureDoc),c(a.waitForImages),await Promise.all(f),i(a.waitForImages),L.version="1.3.0",L.scriptVersion="11.1.1";const O=C.length?C.join("\n")+"\n":"",x=y.size?Array.from(y).join("\n")+"\n":"",M=JSON.stringify({separator:b,cssStartToken:N,cssEndToken:N,iframeStartToken:'"'+w,iframeEndToken:w+'"'});function B(){return r?`\n${b}\n${JSON.stringify(a)}`:""}i(a.total);const V=`${M}\n${x}${b}\n${O}${b}\n${JSON.stringify(L)}${B()}`;return console.log("[captureFrame]",JSON.stringify(a)),V;function z(e){return Object.keys(e).length?e:void 0}function Y(e){return{tagName:"#text",text:e.textContent}}function G(e,r=e.location&&e.location.href){const s=new Set;let a="";const c=i(e.documentElement||e);return c.css=a,f.push(l({bgImages:s}).then(e=>c.images=e)),c;function i(e){const{bundledCss:t,unfetchedResources:n}=I(e,r);if(a+=t,n)for(const e of n)y.add(e);switch(e.nodeType){case P.TEXT:return Y(e);case P.ELEMENT:return"IFRAME"===e.tagName.toUpperCase()?function(e){const t=m(e);let n;try{n=e.contentDocument}catch(e){return o(),t}try{n?t.childNodes=[G(n,D(e)?e.baseURI:n.location.href)]:o()}catch(e){console.log("error in iframeToJSON",e)}return t;function o(){const n=d(e);C.push(n),t.childNodes=[`${w}${n}${w}`]}}(e):m(e);case P.DOCUMENT_FRAGMENT:return{childNodes:Array.prototype.map.call(e.childNodes,i).filter(Boolean)};default:return null}}function m(e){const a=Array.prototype.map.call(e.childNodes,i).filter(Boolean),c=e.shadowRoot&&G(e.shadowRoot,r),l=e.tagName.toUpperCase();if(o.indexOf(l)>-1)return null;const f=window.getComputedStyle(e),d=e.getBoundingClientRect(),m={};for(const e of t)m[e]=f.getPropertyValue(e);m["border-width"]||(m["border-width"]=`${f.getPropertyValue("border-top-width")} ${f.getPropertyValue("border-right-width")} ${f.getPropertyValue("border-bottom-width")} ${f.getPropertyValue("border-left-width")}`);const h={};for(const e of n)h[e]=d[e];const g=Array.from(e.attributes).map(e=>({key:e.name,value:e.value})).reduce((e,t)=>(e[t.key]=t.value,e),{}),y=u(f.getPropertyValue("background-image"));y&&s.add(y);const C=p(e);C&&(g["data-applitools-has-pseudo"]=C);const w={tagName:l,style:z(m),rect:z(h),attributes:z(g),childNodes:a};return c&&(w.shadowRoot=c),w}}}}();
var captureDom=function(){"use strict";function e(e,t=0){const n=e.charCodeAt(t);if(n>=55296&&n<56320){return 1024*(n-55296)+(e.charCodeAt(t+1)-56320)+65536}return 56320<=n&&n<=57343?-1:n}var t=function(t,n){const o=[];let r=0;for(let s=0;s<t.length;++s){const a=e(t,s);let c=0;a>0&&(c=a<128?1:a<2048?2:a<65536?3:a<2097152?4:a<67108864?5:6),r+c>n?(o.push(s),r=c):r+=c}return o};const n="WIP",o="SUCCESS",r="SUCCESS_CHUNKED",s="ERROR";var a=function(e,a,c={}){const i=function(e,{chunkByteLength:a=0}={}){if(e){if(e.value){if(a){if(!e.chunks){const n=JSON.stringify(e.value);e.chunks=t(n,a),e.chunks.length>0&&(e.from=0,e.value=n)}if(e.from>=0)return{status:r,value:e.value.substring(e.from,e.from=e.chunks.shift()),done:!e.from}}return{status:o,value:e.value}}return e.error?{status:s,error:e.error}:{status:n}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((e=e||{})[a],c);return(i.status===o||i.status===s||i.status===r&&i.done)&&(e[a]=null),i};var c={chunkify:t,pollify:function(e,t,n){return o=>function(){return t[n]||(t[n]={},e.apply(null,arguments).then(e=>t[n].value=e).catch(e=>t[n].error=e.message)),a(t,n,o)}},poll:a,absolutizeUrl:function(e,t){return new URL(e,t).href},isInlineFrame:function(e){return e.contentDocument&&e.contentDocument.location&&!/^https?:$/.test(e.contentDocument.location.protocol)},isAccessibleFrame:function(e){try{const t=e.contentDocument;return Boolean(t&&t.defaultView&&t.defaultView.frameElement)}catch(e){return!1}}};const i=/url\((?!['"]?:)['"]?([^'")]*)['"]?\)/;var u=function(e){const t=e?e.match(i):void 0;return t?t[1]:t};var l=async function({bgImages:e,timeout:t=5e3,Image:n=window.Image}){return(await Promise.all(Array.from(e).map(e=>{return Promise.race([new Promise(t=>{const o=new n;o.onload=()=>t({url:e,width:o.naturalWidth,height:o.naturalHeight}),o.onerror=()=>t(),o.src=e}),(o=t,new Promise(e=>{setTimeout(e,o)}))]);var o}))).reduce((e,t)=>(t&&(e[t.url]={width:t.width,height:t.height}),e),{})},f={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};const{NODE_TYPES:d}=f;function m(e){return Array.prototype.filter.call(e.parentNode.childNodes,t=>t.tagName===e.tagName).indexOf(e)+1}var h=function e(t){if(!t.ownerDocument)return"";let n="",o=t,r=t.ownerDocument,s=r.defaultView.frameElement;for(;o!==r&&(!o||o.nodeType!==d.DOCUMENT_FRAGMENT);)n=`${o.tagName}[${m(o)}]/${n}`,o=o.parentNode;return s&&(n=`${e(s)},${n}`),n.replace(/\/$/,"")};var p=function({parseCss:e,CSSImportRule:t,absolutizeUrl:n,getCssFromCache:o,unfetchedToken:r}){return function s(a,c){let i,u="";try{const l=e(a);for(const e of Array.from(l.cssRules))if(e instanceof t){const t=n(e.href,c),a=o(t);if(void 0!==a){const{bundledCss:e,unfetchedResources:n}=s(a,t);n&&(i=new Set(n)),u=`${u}${e}`}else i=new Set([t]),u=`\n${r}${t}${r}`}}catch(e){console.log("error during getBundledCssFromCssText, styleBaseUrl="+c,e)}var l,f;return u=`${u}${l=a,f=c,`\n/** ${f} **/\n${l}`}`,{bundledCss:u,unfetchedResources:i}}};var g=function(e){var t=document.implementation.createHTMLDocument(""),n=t.createElement("style");return n.textContent=e,t.body.appendChild(n),n.sheet};var y=function(e){const t=["before","after"];try{let n=[];return t.forEach(t=>{const o=window.getComputedStyle(e,":"+t);o&&"none"!==o.getPropertyValue("content")&&n.push(t)}),n.join("_and_")}catch(e){return!1}};var C=function(e,{fetchTimeLimit:t}={}){return async function(n){const o=new AbortController,r=[e(n,{cache:"force-cache",signal:o.signal}).then(e=>{if(e.ok)return e.text();console.log("/failed to fetch (status "+e.status+") css from: "+n+"/")}).catch(e=>{console.log("/failed to fetch (error "+e.toString()+") css from: "+n+"/")})];return Number.isNaN(Number(t))||r.push(new Promise(e=>setTimeout(e,t)).then(()=>o.abort())),Promise.race(r)}},E=function(e){const t=Array.from(e.attributes).find(e=>"href"===e.name.toLowerCase());return t&&t.value},T=function(e){if(e.nodeName&&"LINK"===e.nodeName.toUpperCase()&&e.attributes){const t=new Map(Array.from(e.attributes,e=>[e.name.toLowerCase(),e.value.toLowerCase()]));return"stylesheet"===t.get("rel")||"style"===t.get("as")&&["preload","prefetch"].includes(t.get("rel"))}return!1};var w=function(e){return e&&e.startsWith("data:")};var N=function({getCssFromCache:e,absolutizeUrl:t}){return function(n,o){let r,s,a;if(function(e){return e.nodeName&&"STYLE"===e.nodeName.toUpperCase()}(n))r=Array.from(n.childNodes).map(e=>e.nodeValue).join(""),s=o;else if(T(n)){const c=E(n);w(c)?(s=o,r=c.match(/,(.+)/)[1]):(s=t(c,o),r=e(s)),a=void 0===r}return{cssText:r,styleBaseUrl:s,isUnfetched:a}}};var S=function({extractCssFromNode:e,getBundledCssFromCssText:t,unfetchedToken:n}){return function(o,r){const{styleBaseUrl:s,cssText:a,isUnfetched:c}=e(o,r);let i,u="";if(a){const{bundledCss:e,unfetchedResources:n}=t(a,s);u+=e,i=new Set(n)}else c&&(u+=`${n}${s}${n}`,i=new Set([s]));return{bundledCss:u,unfetchedResources:i}}};const{absolutizeUrl:b,isInlineFrame:v}=c,{NODE_TYPES:A}=f;var D=function(e){return async function(t=document){const n={},o=Date.now(),r=[];return function t(n,o,r,s){function a(t){switch(s.push(async function(t,n,o){let r,s;T(t)&&(s=b(E(t),n),r=await e(s),void 0!==r&&(o[s]=r));r&&await async function t(n,o,r){try{const s=g(n),a=[];for(const n of Array.from(s.cssRules))n instanceof CSSImportRule&&a.push((async()=>{const s=b(n.href,o),a=await e(s);r[s]=a,void 0!==a&&await t(a,s,r)})());await Promise.all(a)}catch(e){console.log("error during fetchBundledCss, resourceUrl="+o,e)}}(r,s,o)}(t,o,r)),t.nodeType){case A.ELEMENT:return"IFRAME"===t.tagName.toUpperCase()?i(t):c(t)}}async function c(e){Array.prototype.map.call(e.childNodes,a)}async function i(e){if(c(e),e.contentDocument)try{const n=v(e)?e.baseURI:e.contentDocument.location.href;t(e.contentDocument,n,r,s)}catch(e){console.log(e)}}a(n.documentElement)}(t,t.location.href,n,r),await Promise.all(r),console.log("[prefetchAllCss]",Date.now()-o),function(e){return n[e]}}};const{absolutizeUrl:R,isInlineFrame:P}=c,{NODE_TYPES:$,DEFAULT_STYLE_PROPS:U,DEFAULT_RECT_PROPS:_,DEFAULT_IGNORED_TAG_NAMES:F}=f;return async function({doc:e=document,styleProps:t=U,rectProps:n=_,ignoredTagNames:o=F,addStats:r=!1,fetchTimeLimit:s=3e4}={}){arguments[1]&&(e=arguments[1]),arguments[2]&&(r=arguments[2]),arguments[3]&&(s=arguments[3]);const a={total:{},prefetchCss:{},doCaptureDoc:{},waitForImages:{}};function c(e){e.startTime=Date.now()}function i(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime}const f=[];c(a.total);const d=new Set,m=[],E="@@@@@",T="#####",w="-----";c(a.prefetchCss);const b=D(C(fetch,{fetchTimeLimit:s})),v=await b(e);i(a.prefetchCss);const A=p({parseCss:g,CSSImportRule:CSSImportRule,getCssFromCache:v,absolutizeUrl:R,unfetchedToken:T}),O=N({getCssFromCache:v,absolutizeUrl:R}),k=S({extractCssFromNode:O,getBundledCssFromCssText:A,unfetchedToken:T});c(a.doCaptureDoc);const I=G(e);i(a.doCaptureDoc),c(a.waitForImages),await Promise.all(f),i(a.waitForImages),I.version="1.3.0",I.scriptVersion="11.1.2";const L=m.length?m.join("\n")+"\n":"",x=d.size?Array.from(d).join("\n")+"\n":"",M=JSON.stringify({separator:w,cssStartToken:T,cssEndToken:T,iframeStartToken:'"'+E,iframeEndToken:E+'"'});function B(){return r?`\n${w}\n${JSON.stringify(a)}`:""}i(a.total);const V=`${M}\n${x}${w}\n${L}${w}\n${JSON.stringify(I)}${B()}`;return console.log("[captureFrame]",JSON.stringify(a)),V;function z(e){return Object.keys(e).length?e:void 0}function Y(e){return{tagName:"#text",text:e.textContent}}function G(e,r=e.location&&e.location.href){const s=new Set;let a="";const c=i(e.documentElement||e);return c.css=a,f.push(l({bgImages:s}).then(e=>c.images=e)),c;function i(e){const{bundledCss:t,unfetchedResources:n}=k(e,r);if(a+=t,n)for(const e of n)d.add(e);switch(e.nodeType){case $.TEXT:return Y(e);case $.ELEMENT:return"IFRAME"===e.tagName.toUpperCase()?function(e){const t=p(e);let n;try{n=e.contentDocument}catch(e){return o(),t}try{n?t.childNodes=[G(n,P(e)?e.baseURI:n.location.href)]:o()}catch(e){console.log("error in iframeToJSON",e)}return t;function o(){const n=h(e);m.push(n),t.childNodes=[`${E}${n}${E}`]}}(e):p(e);case $.DOCUMENT_FRAGMENT:return{childNodes:Array.prototype.map.call(e.childNodes,i).filter(Boolean)};default:return null}}function p(e){const a=Array.prototype.map.call(e.childNodes,i).filter(Boolean),c=e.shadowRoot&&G(e.shadowRoot,r),l=e.tagName.toUpperCase();if(o.indexOf(l)>-1)return null;const f=window.getComputedStyle(e),d=e.getBoundingClientRect(),m={};for(const e of t)m[e]=f.getPropertyValue(e);m["border-width"]||(m["border-width"]=`${f.getPropertyValue("border-top-width")} ${f.getPropertyValue("border-right-width")} ${f.getPropertyValue("border-bottom-width")} ${f.getPropertyValue("border-left-width")}`);const h={};for(const e of n)h[e]=d[e];const p=Array.from(e.attributes).map(e=>({key:e.name,value:e.value})).reduce((e,t)=>(e[t.key]=t.value,e),{}),g=u(f.getPropertyValue("background-image"));g&&s.add(g);const C=y(e);C&&(p["data-applitools-has-pseudo"]=C);const E={tagName:l,style:z(m),rect:z(h),attributes:z(p),childNodes:a};return c&&(E.shadowRoot=c),E}}}}();
return captureDom.apply(this, arguments);
}

@@ -1,7 +0,7 @@

/* @applitools/dom-capture@11.1.1 */
/* @applitools/dom-capture@11.1.2 */
function __captureDomAndPoll() {
var captureDomAndPoll=function(){"use strict";function e(e,t=0){const n=e.charCodeAt(t);if(n>=55296&&n<56320){return 1024*(n-55296)+(e.charCodeAt(t+1)-56320)+65536}return 56320<=n&&n<=57343?-1:n}var t=function(t,n){const o=[];let r=0;for(let s=0;s<t.length;++s){const a=e(t,s);let c=0;a>0&&(c=a<128?1:a<2048?2:a<65536?3:a<2097152?4:a<67108864?5:6),r+c>n?(o.push(s),r=c):r+=c}return o};const n="WIP",o="SUCCESS",r="SUCCESS_CHUNKED",s="ERROR";var a=function(e,a,c={}){const i=function(e,{chunkByteLength:a=0}={}){if(e){if(e.value){if(a){if(!e.chunks){const n=JSON.stringify(e.value);e.chunks=t(n,a),e.chunks.length>0&&(e.from=0,e.value=n)}if(e.from>=0)return{status:r,value:e.value.substring(e.from,e.from=e.chunks.shift()),done:!e.from}}return{status:o,value:e.value}}return e.error?{status:s,error:e.error}:{status:n}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((e=e||{})[a],c);return(i.status===o||i.status===s||i.status===r&&i.done)&&(e[a]=null),i};var c={chunkify:t,pollify:function(e,t,n){return o=>function(){return t[n]||(t[n]={},e.apply(null,arguments).then(e=>t[n].value=e).catch(e=>t[n].error=e.message)),a(t,n,o)}},poll:a,absolutizeUrl:function(e,t){return new URL(e,t).href},isInlineFrame:function(e){return e.contentDocument&&e.contentDocument.location&&!/^https?:$/.test(e.contentDocument.location.protocol)},isAccessibleFrame:function(e){try{const t=e.contentDocument;return Boolean(t&&t.defaultView&&t.defaultView.frameElement)}catch(e){return!1}}},i={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};const u=/url\((?!['"]?:)['"]?([^'")]*)['"]?\)/;var l=function(e){const t=e?e.match(u):void 0;return t?t[1]:t};var f=async function({bgImages:e,timeout:t=5e3,Image:n=window.Image}){return(await Promise.all(Array.from(e).map(e=>{return Promise.race([new Promise(t=>{const o=new n;o.onload=()=>t({url:e,width:o.naturalWidth,height:o.naturalHeight}),o.onerror=()=>t(),o.src=e}),(o=t,new Promise(e=>{setTimeout(e,o)}))]);var o}))).reduce((e,t)=>(t&&(e[t.url]={width:t.width,height:t.height}),e),{})};function d(e){return Array.prototype.filter.call(e.parentNode.childNodes,t=>t.tagName===e.tagName).indexOf(e)+1}var m=function e(t){if(!t.ownerDocument)return"";let n="",o=t,r=t.ownerDocument,s=r.defaultView.frameElement;for(;o!==r;)n=`${o.tagName}[${d(o)}]/${n}`,o=o.parentNode;return s&&(n=`${e(s)},${n}`),n.replace(/\/$/,"")};var h=function({parseCss:e,CSSImportRule:t,absolutizeUrl:n,getCssFromCache:o,unfetchedToken:r}){return function s(a,c){let i,u="";try{const l=e(a);for(const e of Array.from(l.cssRules))if(e instanceof t){const t=n(e.href,c),a=o(t);if(void 0!==a){const{bundledCss:e,unfetchedResources:n}=s(a,t);n&&(i=new Set(n)),u=`${u}${e}`}else i=new Set([t]),u=`\n${r}${t}${r}`}}catch(e){console.log("error during getBundledCssFromCssText, styleBaseUrl="+c,e)}var l,f;return u=`${u}${l=a,f=c,`\n/** ${f} **/\n${l}`}`,{bundledCss:u,unfetchedResources:i}}};var p=function(e){var t=document.implementation.createHTMLDocument(""),n=t.createElement("style");return n.textContent=e,t.body.appendChild(n),n.sheet};var g=function(e){const t=["before","after"];try{let n=[];return t.forEach(t=>{const o=window.getComputedStyle(e,":"+t);o&&"none"!==o.getPropertyValue("content")&&n.push(t)}),n.join("_and_")}catch(e){return!1}};var y=function(e,{fetchTimeLimit:t}={}){return async function(n){const o=new AbortController,r=[e(n,{cache:"force-cache",signal:o.signal}).then(e=>{if(e.ok)return e.text();console.log("/failed to fetch (status "+e.status+") css from: "+n+"/")}).catch(e=>{console.log("/failed to fetch (error "+e.toString()+") css from: "+n+"/")})];return Number.isNaN(Number(t))||r.push(new Promise(e=>setTimeout(e,t)).then(()=>o.abort())),Promise.race(r)}},w=function(e){const t=Array.from(e.attributes).find(e=>"href"===e.name.toLowerCase());return t&&t.value},C=function(e){if(e.nodeName&&"LINK"===e.nodeName.toUpperCase()&&e.attributes){const t=new Map(Array.from(e.attributes,e=>[e.name.toLowerCase(),e.value.toLowerCase()]));return"stylesheet"===t.get("rel")||"style"===t.get("as")&&["preload","prefetch"].includes(t.get("rel"))}return!1};var E=function(e){return e&&e.startsWith("data:")};var T=function({getCssFromCache:e,absolutizeUrl:t}){return function(n,o){let r,s,a;if(function(e){return e.nodeName&&"STYLE"===e.nodeName.toUpperCase()}(n))r=Array.from(n.childNodes).map(e=>e.nodeValue).join(""),s=o;else if(C(n)){const c=w(n);E(c)?(s=o,r=c.match(/,(.+)/)[1]):(s=t(c,o),r=e(s)),a=void 0===r}return{cssText:r,styleBaseUrl:s,isUnfetched:a}}};var N=function({extractCssFromNode:e,getBundledCssFromCssText:t,unfetchedToken:n}){return function(o,r){const{styleBaseUrl:s,cssText:a,isUnfetched:c}=e(o,r);let i,u="";if(a){const{bundledCss:e,unfetchedResources:n}=t(a,s);u+=e,i=new Set(n)}else c&&(u+=`${n}${s}${n}`,i=new Set([s]));return{bundledCss:u,unfetchedResources:i}}};const{absolutizeUrl:S,isInlineFrame:b}=c,{NODE_TYPES:v}=i;var A=function(e){return async function(t=document){const n={},o=Date.now(),r=[];return function t(n,o,r,s){function a(t){switch(s.push(async function(t,n,o){let r,s;C(t)&&(s=S(w(t),n),r=await e(s),void 0!==r&&(o[s]=r));r&&await async function t(n,o,r){try{const s=p(n),a=[];for(const n of Array.from(s.cssRules))n instanceof CSSImportRule&&a.push((async()=>{const s=S(n.href,o),a=await e(s);r[s]=a,void 0!==a&&await t(a,s,r)})());await Promise.all(a)}catch(e){console.log("error during fetchBundledCss, resourceUrl="+o,e)}}(r,s,o)}(t,o,r)),t.nodeType){case v.ELEMENT:return"IFRAME"===t.tagName.toUpperCase()?i(t):c(t)}}async function c(e){Array.prototype.map.call(e.childNodes,a)}async function i(e){if(c(e),e.contentDocument)try{const n=b(e)?e.baseURI:e.contentDocument.location.href;t(e.contentDocument,n,r,s)}catch(e){console.log(e)}}a(n.documentElement)}(t,t.location.href,n,r),await Promise.all(r),console.log("[prefetchAllCss]",Date.now()-o),function(e){return n[e]}}};const{absolutizeUrl:P,isInlineFrame:R}=c,{NODE_TYPES:D,DEFAULT_STYLE_PROPS:$,DEFAULT_RECT_PROPS:U,DEFAULT_IGNORED_TAG_NAMES:_}=i;var F=async function({doc:e=document,styleProps:t=$,rectProps:n=U,ignoredTagNames:o=_,addStats:r=!1,fetchTimeLimit:s=3e4}={}){arguments[1]&&(e=arguments[1]),arguments[2]&&(r=arguments[2]),arguments[3]&&(s=arguments[3]);const a={total:{},prefetchCss:{},doCaptureDoc:{},waitForImages:{}};function c(e){e.startTime=Date.now()}function i(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime}const u=[];c(a.total);const d=new Set,w=[],C="@@@@@",E="#####",S="-----";c(a.prefetchCss);const b=A(y(fetch,{fetchTimeLimit:s})),v=await b(e);i(a.prefetchCss);const F=h({parseCss:p,CSSImportRule:CSSImportRule,getCssFromCache:v,absolutizeUrl:P,unfetchedToken:E}),O=T({getCssFromCache:v,absolutizeUrl:P}),k=N({extractCssFromNode:O,getBundledCssFromCssText:F,unfetchedToken:E});c(a.doCaptureDoc);const I=J(e);i(a.doCaptureDoc),c(a.waitForImages),await Promise.all(u),i(a.waitForImages),I.version="1.3.0",I.scriptVersion="11.1.1";const L=w.length?w.join("\n")+"\n":"",x=d.size?Array.from(d).join("\n")+"\n":"",M=JSON.stringify({separator:S,cssStartToken:E,cssEndToken:E,iframeStartToken:'"'+C,iframeEndToken:C+'"'});function B(){return r?`\n${S}\n${JSON.stringify(a)}`:""}i(a.total);const V=`${M}\n${x}${S}\n${L}${S}\n${JSON.stringify(I)}${B()}`;return console.log("[captureFrame]",JSON.stringify(a)),V;function z(e){return Object.keys(e).length?e:void 0}function Y(e){return{tagName:"#text",text:e.textContent}}function J(e,r=e.location&&e.location.href){const s=new Set;let a="";const c=i(e.documentElement||e);return c.css=a,u.push(f({bgImages:s}).then(e=>c.images=e)),c;function i(e){const{bundledCss:t,unfetchedResources:n}=k(e,r);if(a+=t,n)for(const e of n)d.add(e);switch(e.nodeType){case D.TEXT:return Y(e);case D.ELEMENT:return"IFRAME"===e.tagName.toUpperCase()?function(e){const t=h(e);let n;try{n=e.contentDocument}catch(e){return o(),t}try{n?t.childNodes=[J(n,R(e)?e.baseURI:n.location.href)]:o()}catch(e){console.log("error in iframeToJSON",e)}return t;function o(){const n=m(e);w.push(n),t.childNodes=[`${C}${n}${C}`]}}(e):h(e);case D.DOCUMENT_FRAGMENT:return{childNodes:Array.prototype.map.call(e.childNodes,i).filter(Boolean)};default:return null}}function h(e){const a=Array.prototype.map.call(e.childNodes,i).filter(Boolean),c=e.shadowRoot&&J(e.shadowRoot,r),u=e.tagName.toUpperCase();if(o.indexOf(u)>-1)return null;const f=window.getComputedStyle(e),d=e.getBoundingClientRect(),m={};for(const e of t)m[e]=f.getPropertyValue(e);m["border-width"]||(m["border-width"]=`${f.getPropertyValue("border-top-width")} ${f.getPropertyValue("border-right-width")} ${f.getPropertyValue("border-bottom-width")} ${f.getPropertyValue("border-left-width")}`);const h={};for(const e of n)h[e]=d[e];const p=Array.from(e.attributes).map(e=>({key:e.name,value:e.value})).reduce((e,t)=>(e[t.key]=t.value,e),{}),y=l(f.getPropertyValue("background-image"));y&&s.add(y);const w=g(e);w&&(p["data-applitools-has-pseudo"]=w);const C={tagName:u,style:z(m),rect:z(h),attributes:z(p),childNodes:a};return c&&(C.shadowRoot=c),C}}};const{pollify:O}=c,{EYES_NAMESPACE:k,DOM_CAPTURE_KEY:I}=i;window[k]=window[k]||{};const L=O(F,window[k],I);return function(e){return JSON.stringify(L(e)(e))}}();
var captureDomAndPoll=function(){"use strict";function e(e,t=0){const n=e.charCodeAt(t);if(n>=55296&&n<56320){return 1024*(n-55296)+(e.charCodeAt(t+1)-56320)+65536}return 56320<=n&&n<=57343?-1:n}var t=function(t,n){const o=[];let r=0;for(let s=0;s<t.length;++s){const a=e(t,s);let c=0;a>0&&(c=a<128?1:a<2048?2:a<65536?3:a<2097152?4:a<67108864?5:6),r+c>n?(o.push(s),r=c):r+=c}return o};const n="WIP",o="SUCCESS",r="SUCCESS_CHUNKED",s="ERROR";var a=function(e,a,c={}){const i=function(e,{chunkByteLength:a=0}={}){if(e){if(e.value){if(a){if(!e.chunks){const n=JSON.stringify(e.value);e.chunks=t(n,a),e.chunks.length>0&&(e.from=0,e.value=n)}if(e.from>=0)return{status:r,value:e.value.substring(e.from,e.from=e.chunks.shift()),done:!e.from}}return{status:o,value:e.value}}return e.error?{status:s,error:e.error}:{status:n}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((e=e||{})[a],c);return(i.status===o||i.status===s||i.status===r&&i.done)&&(e[a]=null),i};var c={chunkify:t,pollify:function(e,t,n){return o=>function(){return t[n]||(t[n]={},e.apply(null,arguments).then(e=>t[n].value=e).catch(e=>t[n].error=e.message)),a(t,n,o)}},poll:a,absolutizeUrl:function(e,t){return new URL(e,t).href},isInlineFrame:function(e){return e.contentDocument&&e.contentDocument.location&&!/^https?:$/.test(e.contentDocument.location.protocol)},isAccessibleFrame:function(e){try{const t=e.contentDocument;return Boolean(t&&t.defaultView&&t.defaultView.frameElement)}catch(e){return!1}}},i={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};const u=/url\((?!['"]?:)['"]?([^'")]*)['"]?\)/;var l=function(e){const t=e?e.match(u):void 0;return t?t[1]:t};var d=async function({bgImages:e,timeout:t=5e3,Image:n=window.Image}){return(await Promise.all(Array.from(e).map(e=>{return Promise.race([new Promise(t=>{const o=new n;o.onload=()=>t({url:e,width:o.naturalWidth,height:o.naturalHeight}),o.onerror=()=>t(),o.src=e}),(o=t,new Promise(e=>{setTimeout(e,o)}))]);var o}))).reduce((e,t)=>(t&&(e[t.url]={width:t.width,height:t.height}),e),{})};const{NODE_TYPES:f}=i;function m(e){return Array.prototype.filter.call(e.parentNode.childNodes,t=>t.tagName===e.tagName).indexOf(e)+1}var h=function e(t){if(!t.ownerDocument)return"";let n="",o=t,r=t.ownerDocument,s=r.defaultView.frameElement;for(;o!==r&&(!o||o.nodeType!==f.DOCUMENT_FRAGMENT);)n=`${o.tagName}[${m(o)}]/${n}`,o=o.parentNode;return s&&(n=`${e(s)},${n}`),n.replace(/\/$/,"")};var p=function({parseCss:e,CSSImportRule:t,absolutizeUrl:n,getCssFromCache:o,unfetchedToken:r}){return function s(a,c){let i,u="";try{const l=e(a);for(const e of Array.from(l.cssRules))if(e instanceof t){const t=n(e.href,c),a=o(t);if(void 0!==a){const{bundledCss:e,unfetchedResources:n}=s(a,t);n&&(i=new Set(n)),u=`${u}${e}`}else i=new Set([t]),u=`\n${r}${t}${r}`}}catch(e){console.log("error during getBundledCssFromCssText, styleBaseUrl="+c,e)}var l,d;return u=`${u}${l=a,d=c,`\n/** ${d} **/\n${l}`}`,{bundledCss:u,unfetchedResources:i}}};var g=function(e){var t=document.implementation.createHTMLDocument(""),n=t.createElement("style");return n.textContent=e,t.body.appendChild(n),n.sheet};var y=function(e){const t=["before","after"];try{let n=[];return t.forEach(t=>{const o=window.getComputedStyle(e,":"+t);o&&"none"!==o.getPropertyValue("content")&&n.push(t)}),n.join("_and_")}catch(e){return!1}};var E=function(e,{fetchTimeLimit:t}={}){return async function(n){const o=new AbortController,r=[e(n,{cache:"force-cache",signal:o.signal}).then(e=>{if(e.ok)return e.text();console.log("/failed to fetch (status "+e.status+") css from: "+n+"/")}).catch(e=>{console.log("/failed to fetch (error "+e.toString()+") css from: "+n+"/")})];return Number.isNaN(Number(t))||r.push(new Promise(e=>setTimeout(e,t)).then(()=>o.abort())),Promise.race(r)}},C=function(e){const t=Array.from(e.attributes).find(e=>"href"===e.name.toLowerCase());return t&&t.value},w=function(e){if(e.nodeName&&"LINK"===e.nodeName.toUpperCase()&&e.attributes){const t=new Map(Array.from(e.attributes,e=>[e.name.toLowerCase(),e.value.toLowerCase()]));return"stylesheet"===t.get("rel")||"style"===t.get("as")&&["preload","prefetch"].includes(t.get("rel"))}return!1};var T=function(e){return e&&e.startsWith("data:")};var N=function({getCssFromCache:e,absolutizeUrl:t}){return function(n,o){let r,s,a;if(function(e){return e.nodeName&&"STYLE"===e.nodeName.toUpperCase()}(n))r=Array.from(n.childNodes).map(e=>e.nodeValue).join(""),s=o;else if(w(n)){const c=C(n);T(c)?(s=o,r=c.match(/,(.+)/)[1]):(s=t(c,o),r=e(s)),a=void 0===r}return{cssText:r,styleBaseUrl:s,isUnfetched:a}}};var S=function({extractCssFromNode:e,getBundledCssFromCssText:t,unfetchedToken:n}){return function(o,r){const{styleBaseUrl:s,cssText:a,isUnfetched:c}=e(o,r);let i,u="";if(a){const{bundledCss:e,unfetchedResources:n}=t(a,s);u+=e,i=new Set(n)}else c&&(u+=`${n}${s}${n}`,i=new Set([s]));return{bundledCss:u,unfetchedResources:i}}};const{absolutizeUrl:b,isInlineFrame:v}=c,{NODE_TYPES:A}=i;var P=function(e){return async function(t=document){const n={},o=Date.now(),r=[];return function t(n,o,r,s){function a(t){switch(s.push(async function(t,n,o){let r,s;w(t)&&(s=b(C(t),n),r=await e(s),void 0!==r&&(o[s]=r));r&&await async function t(n,o,r){try{const s=g(n),a=[];for(const n of Array.from(s.cssRules))n instanceof CSSImportRule&&a.push((async()=>{const s=b(n.href,o),a=await e(s);r[s]=a,void 0!==a&&await t(a,s,r)})());await Promise.all(a)}catch(e){console.log("error during fetchBundledCss, resourceUrl="+o,e)}}(r,s,o)}(t,o,r)),t.nodeType){case A.ELEMENT:return"IFRAME"===t.tagName.toUpperCase()?i(t):c(t)}}async function c(e){Array.prototype.map.call(e.childNodes,a)}async function i(e){if(c(e),e.contentDocument)try{const n=v(e)?e.baseURI:e.contentDocument.location.href;t(e.contentDocument,n,r,s)}catch(e){console.log(e)}}a(n.documentElement)}(t,t.location.href,n,r),await Promise.all(r),console.log("[prefetchAllCss]",Date.now()-o),function(e){return n[e]}}};const{absolutizeUrl:D,isInlineFrame:R}=c,{NODE_TYPES:_,DEFAULT_STYLE_PROPS:U,DEFAULT_RECT_PROPS:$,DEFAULT_IGNORED_TAG_NAMES:F}=i;var O=async function({doc:e=document,styleProps:t=U,rectProps:n=$,ignoredTagNames:o=F,addStats:r=!1,fetchTimeLimit:s=3e4}={}){arguments[1]&&(e=arguments[1]),arguments[2]&&(r=arguments[2]),arguments[3]&&(s=arguments[3]);const a={total:{},prefetchCss:{},doCaptureDoc:{},waitForImages:{}};function c(e){e.startTime=Date.now()}function i(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime}const u=[];c(a.total);const f=new Set,m=[],C="@@@@@",w="#####",T="-----";c(a.prefetchCss);const b=P(E(fetch,{fetchTimeLimit:s})),v=await b(e);i(a.prefetchCss);const A=p({parseCss:g,CSSImportRule:CSSImportRule,getCssFromCache:v,absolutizeUrl:D,unfetchedToken:w}),O=N({getCssFromCache:v,absolutizeUrl:D}),k=S({extractCssFromNode:O,getBundledCssFromCssText:A,unfetchedToken:w});c(a.doCaptureDoc);const I=G(e);i(a.doCaptureDoc),c(a.waitForImages),await Promise.all(u),i(a.waitForImages),I.version="1.3.0",I.scriptVersion="11.1.2";const L=m.length?m.join("\n")+"\n":"",M=f.size?Array.from(f).join("\n")+"\n":"",x=JSON.stringify({separator:T,cssStartToken:w,cssEndToken:w,iframeStartToken:'"'+C,iframeEndToken:C+'"'});function B(){return r?`\n${T}\n${JSON.stringify(a)}`:""}i(a.total);const V=`${x}\n${M}${T}\n${L}${T}\n${JSON.stringify(I)}${B()}`;return console.log("[captureFrame]",JSON.stringify(a)),V;function Y(e){return Object.keys(e).length?e:void 0}function z(e){return{tagName:"#text",text:e.textContent}}function G(e,r=e.location&&e.location.href){const s=new Set;let a="";const c=i(e.documentElement||e);return c.css=a,u.push(d({bgImages:s}).then(e=>c.images=e)),c;function i(e){const{bundledCss:t,unfetchedResources:n}=k(e,r);if(a+=t,n)for(const e of n)f.add(e);switch(e.nodeType){case _.TEXT:return z(e);case _.ELEMENT:return"IFRAME"===e.tagName.toUpperCase()?function(e){const t=p(e);let n;try{n=e.contentDocument}catch(e){return o(),t}try{n?t.childNodes=[G(n,R(e)?e.baseURI:n.location.href)]:o()}catch(e){console.log("error in iframeToJSON",e)}return t;function o(){const n=h(e);m.push(n),t.childNodes=[`${C}${n}${C}`]}}(e):p(e);case _.DOCUMENT_FRAGMENT:return{childNodes:Array.prototype.map.call(e.childNodes,i).filter(Boolean)};default:return null}}function p(e){const a=Array.prototype.map.call(e.childNodes,i).filter(Boolean),c=e.shadowRoot&&G(e.shadowRoot,r),u=e.tagName.toUpperCase();if(o.indexOf(u)>-1)return null;const d=window.getComputedStyle(e),f=e.getBoundingClientRect(),m={};for(const e of t)m[e]=d.getPropertyValue(e);m["border-width"]||(m["border-width"]=`${d.getPropertyValue("border-top-width")} ${d.getPropertyValue("border-right-width")} ${d.getPropertyValue("border-bottom-width")} ${d.getPropertyValue("border-left-width")}`);const h={};for(const e of n)h[e]=f[e];const p=Array.from(e.attributes).map(e=>({key:e.name,value:e.value})).reduce((e,t)=>(e[t.key]=t.value,e),{}),g=l(d.getPropertyValue("background-image"));g&&s.add(g);const E=y(e);E&&(p["data-applitools-has-pseudo"]=E);const C={tagName:u,style:Y(m),rect:Y(h),attributes:Y(p),childNodes:a};return c&&(C.shadowRoot=c),C}}};const{pollify:k}=c,{EYES_NAMESPACE:I,DOM_CAPTURE_KEY:L}=i;window[I]=window[I]||{};const M=k(O,window[I],L);return function(e){return JSON.stringify(M(e)(e))}}();
return captureDomAndPoll.apply(this, arguments);
}

@@ -1,2 +0,2 @@

/* @applitools/dom-capture@11.1.1 */
"use strict";function e(e,t=0){const n=e.charCodeAt(t);if(n>=55296&&n<56320){return 1024*(n-55296)+(e.charCodeAt(t+1)-56320)+65536}return 56320<=n&&n<=57343?-1:n}var t=function(t,n){const o=[];let r=0;for(let s=0;s<t.length;++s){const a=e(t,s);let c=0;a>0&&(c=a<128?1:a<2048?2:a<65536?3:a<2097152?4:a<67108864?5:6),r+c>n?(o.push(s),r=c):r+=c}return o};const n="WIP",o="SUCCESS",r="SUCCESS_CHUNKED",s="ERROR";var a=function(e,a,c={}){const i=function(e,{chunkByteLength:a=0}={}){if(e){if(e.value){if(a){if(!e.chunks){const n=JSON.stringify(e.value);e.chunks=t(n,a),e.chunks.length>0&&(e.from=0,e.value=n)}if(e.from>=0)return{status:r,value:e.value.substring(e.from,e.from=e.chunks.shift()),done:!e.from}}return{status:o,value:e.value}}return e.error?{status:s,error:e.error}:{status:n}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((e=e||{})[a],c);return(i.status===o||i.status===s||i.status===r&&i.done)&&(e[a]=null),i};var c={chunkify:t,pollify:function(e,t,n){return o=>function(){return t[n]||(t[n]={},e.apply(null,arguments).then(e=>t[n].value=e).catch(e=>t[n].error=e.message)),a(t,n,o)}},poll:a,absolutizeUrl:function(e,t){return new URL(e,t).href},isInlineFrame:function(e){return e.contentDocument&&e.contentDocument.location&&!/^https?:$/.test(e.contentDocument.location.protocol)},isAccessibleFrame:function(e){try{const t=e.contentDocument;return Boolean(t&&t.defaultView&&t.defaultView.frameElement)}catch(e){return!1}}};const i=/url\((?!['"]?:)['"]?([^'")]*)['"]?\)/;var u=function(e){const t=e?e.match(i):void 0;return t?t[1]:t};var l=async function({bgImages:e,timeout:t=5e3,Image:n=window.Image}){return(await Promise.all(Array.from(e).map(e=>{return Promise.race([new Promise(t=>{const o=new n;o.onload=()=>t({url:e,width:o.naturalWidth,height:o.naturalHeight}),o.onerror=()=>t(),o.src=e}),(o=t,new Promise(e=>{setTimeout(e,o)}))]);var o}))).reduce((e,t)=>(t&&(e[t.url]={width:t.width,height:t.height}),e),{})};function d(e){return Array.prototype.filter.call(e.parentNode.childNodes,t=>t.tagName===e.tagName).indexOf(e)+1}var f=function e(t){if(!t.ownerDocument)return"";let n="",o=t,r=t.ownerDocument,s=r.defaultView.frameElement;for(;o!==r;)n=`${o.tagName}[${d(o)}]/${n}`,o=o.parentNode;return s&&(n=`${e(s)},${n}`),n.replace(/\/$/,"")};var m=function({parseCss:e,CSSImportRule:t,absolutizeUrl:n,getCssFromCache:o,unfetchedToken:r}){return function s(a,c){let i,u="";try{const l=e(a);for(const e of Array.from(l.cssRules))if(e instanceof t){const t=n(e.href,c),a=o(t);if(void 0!==a){const{bundledCss:e,unfetchedResources:n}=s(a,t);n&&(i=new Set(n)),u=`${u}${e}`}else i=new Set([t]),u=`\n${r}${t}${r}`}}catch(e){console.log("error during getBundledCssFromCssText, styleBaseUrl="+c,e)}var l,d;return u=`${u}${l=a,d=c,`\n/** ${d} **/\n${l}`}`,{bundledCss:u,unfetchedResources:i}}};var h=function(e){var t=document.implementation.createHTMLDocument(""),n=t.createElement("style");return n.textContent=e,t.body.appendChild(n),n.sheet};var p=function(e){const t=["before","after"];try{let n=[];return t.forEach(t=>{const o=window.getComputedStyle(e,":"+t);o&&"none"!==o.getPropertyValue("content")&&n.push(t)}),n.join("_and_")}catch(e){return!1}};var g=function(e,{fetchTimeLimit:t}={}){return async function(n){const o=new AbortController,r=[e(n,{cache:"force-cache",signal:o.signal}).then(e=>{if(e.ok)return e.text();console.log("/failed to fetch (status "+e.status+") css from: "+n+"/")}).catch(e=>{console.log("/failed to fetch (error "+e.toString()+") css from: "+n+"/")})];return Number.isNaN(Number(t))||r.push(new Promise(e=>setTimeout(e,t)).then(()=>o.abort())),Promise.race(r)}},y=function(e){const t=Array.from(e.attributes).find(e=>"href"===e.name.toLowerCase());return t&&t.value},C=function(e){if(e.nodeName&&"LINK"===e.nodeName.toUpperCase()&&e.attributes){const t=new Map(Array.from(e.attributes,e=>[e.name.toLowerCase(),e.value.toLowerCase()]));return"stylesheet"===t.get("rel")||"style"===t.get("as")&&["preload","prefetch"].includes(t.get("rel"))}return!1};var w=function(e){return e&&e.startsWith("data:")};var E=function({getCssFromCache:e,absolutizeUrl:t}){return function(n,o){let r,s,a;if(function(e){return e.nodeName&&"STYLE"===e.nodeName.toUpperCase()}(n))r=Array.from(n.childNodes).map(e=>e.nodeValue).join(""),s=o;else if(C(n)){const c=y(n);w(c)?(s=o,r=c.match(/,(.+)/)[1]):(s=t(c,o),r=e(s)),a=void 0===r}return{cssText:r,styleBaseUrl:s,isUnfetched:a}}};var T=function({extractCssFromNode:e,getBundledCssFromCssText:t,unfetchedToken:n}){return function(o,r){const{styleBaseUrl:s,cssText:a,isUnfetched:c}=e(o,r);let i,u="";if(a){const{bundledCss:e,unfetchedResources:n}=t(a,s);u+=e,i=new Set(n)}else c&&(u+=`${n}${s}${n}`,i=new Set([s]));return{bundledCss:u,unfetchedResources:i}}},N={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};const{absolutizeUrl:b,isInlineFrame:S}=c,{NODE_TYPES:v}=N;var A=function(e){return async function(t=document){const n={},o=Date.now(),r=[];return function t(n,o,r,s){function a(t){switch(s.push(async function(t,n,o){let r,s;C(t)&&(s=b(y(t),n),r=await e(s),void 0!==r&&(o[s]=r));r&&await async function t(n,o,r){try{const s=h(n),a=[];for(const n of Array.from(s.cssRules))n instanceof CSSImportRule&&a.push((async()=>{const s=b(n.href,o),a=await e(s);r[s]=a,void 0!==a&&await t(a,s,r)})());await Promise.all(a)}catch(e){console.log("error during fetchBundledCss, resourceUrl="+o,e)}}(r,s,o)}(t,o,r)),t.nodeType){case v.ELEMENT:return"IFRAME"===t.tagName.toUpperCase()?i(t):c(t)}}async function c(e){Array.prototype.map.call(e.childNodes,a)}async function i(e){if(c(e),e.contentDocument)try{const n=S(e)?e.baseURI:e.contentDocument.location.href;t(e.contentDocument,n,r,s)}catch(e){console.log(e)}}a(n.documentElement)}(t,t.location.href,n,r),await Promise.all(r),console.log("[prefetchAllCss]",Date.now()-o),function(e){return n[e]}}};const{absolutizeUrl:R,isInlineFrame:P}=c,{NODE_TYPES:$,DEFAULT_STYLE_PROPS:D,DEFAULT_RECT_PROPS:U,DEFAULT_IGNORED_TAG_NAMES:_}=N;var F=async function({doc:e=document,styleProps:t=D,rectProps:n=U,ignoredTagNames:o=_,addStats:r=!1,fetchTimeLimit:s=3e4}={}){arguments[1]&&(e=arguments[1]),arguments[2]&&(r=arguments[2]),arguments[3]&&(s=arguments[3]);const a={total:{},prefetchCss:{},doCaptureDoc:{},waitForImages:{}};function c(e){e.startTime=Date.now()}function i(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime}const d=[];c(a.total);const y=new Set,C=[],w="@@@@@",N="#####",b="-----";c(a.prefetchCss);const S=A(g(fetch,{fetchTimeLimit:s})),v=await S(e);i(a.prefetchCss);const F=m({parseCss:h,CSSImportRule:CSSImportRule,getCssFromCache:v,absolutizeUrl:R,unfetchedToken:N}),k=E({getCssFromCache:v,absolutizeUrl:R}),I=T({extractCssFromNode:k,getBundledCssFromCssText:F,unfetchedToken:N});c(a.doCaptureDoc);const L=G(e);i(a.doCaptureDoc),c(a.waitForImages),await Promise.all(d),i(a.waitForImages),L.version="1.3.0",L.scriptVersion="11.1.1";const O=C.length?C.join("\n")+"\n":"",x=y.size?Array.from(y).join("\n")+"\n":"",M=JSON.stringify({separator:b,cssStartToken:N,cssEndToken:N,iframeStartToken:'"'+w,iframeEndToken:w+'"'});function B(){return r?`\n${b}\n${JSON.stringify(a)}`:""}i(a.total);const V=`${M}\n${x}${b}\n${O}${b}\n${JSON.stringify(L)}${B()}`;return console.log("[captureFrame]",JSON.stringify(a)),V;function z(e){return Object.keys(e).length?e:void 0}function Y(e){return{tagName:"#text",text:e.textContent}}function G(e,r=e.location&&e.location.href){const s=new Set;let a="";const c=i(e.documentElement||e);return c.css=a,d.push(l({bgImages:s}).then(e=>c.images=e)),c;function i(e){const{bundledCss:t,unfetchedResources:n}=I(e,r);if(a+=t,n)for(const e of n)y.add(e);switch(e.nodeType){case $.TEXT:return Y(e);case $.ELEMENT:return"IFRAME"===e.tagName.toUpperCase()?function(e){const t=m(e);let n;try{n=e.contentDocument}catch(e){return o(),t}try{n?t.childNodes=[G(n,P(e)?e.baseURI:n.location.href)]:o()}catch(e){console.log("error in iframeToJSON",e)}return t;function o(){const n=f(e);C.push(n),t.childNodes=[`${w}${n}${w}`]}}(e):m(e);case $.DOCUMENT_FRAGMENT:return{childNodes:Array.prototype.map.call(e.childNodes,i).filter(Boolean)};default:return null}}function m(e){const a=Array.prototype.map.call(e.childNodes,i).filter(Boolean),c=e.shadowRoot&&G(e.shadowRoot,r),l=e.tagName.toUpperCase();if(o.indexOf(l)>-1)return null;const d=window.getComputedStyle(e),f=e.getBoundingClientRect(),m={};for(const e of t)m[e]=d.getPropertyValue(e);m["border-width"]||(m["border-width"]=`${d.getPropertyValue("border-top-width")} ${d.getPropertyValue("border-right-width")} ${d.getPropertyValue("border-bottom-width")} ${d.getPropertyValue("border-left-width")}`);const h={};for(const e of n)h[e]=f[e];const g=Array.from(e.attributes).map(e=>({key:e.name,value:e.value})).reduce((e,t)=>(e[t.key]=t.value,e),{}),y=u(d.getPropertyValue("background-image"));y&&s.add(y);const C=p(e);C&&(g["data-applitools-has-pseudo"]=C);const w={tagName:l,style:z(m),rect:z(h),attributes:z(g),childNodes:a};return c&&(w.shadowRoot=c),w}}};module.exports=F;
/* @applitools/dom-capture@11.1.2 */
"use strict";function e(e,t=0){const n=e.charCodeAt(t);if(n>=55296&&n<56320){return 1024*(n-55296)+(e.charCodeAt(t+1)-56320)+65536}return 56320<=n&&n<=57343?-1:n}var t=function(t,n){const o=[];let r=0;for(let s=0;s<t.length;++s){const a=e(t,s);let c=0;a>0&&(c=a<128?1:a<2048?2:a<65536?3:a<2097152?4:a<67108864?5:6),r+c>n?(o.push(s),r=c):r+=c}return o};const n="WIP",o="SUCCESS",r="SUCCESS_CHUNKED",s="ERROR";var a=function(e,a,c={}){const i=function(e,{chunkByteLength:a=0}={}){if(e){if(e.value){if(a){if(!e.chunks){const n=JSON.stringify(e.value);e.chunks=t(n,a),e.chunks.length>0&&(e.from=0,e.value=n)}if(e.from>=0)return{status:r,value:e.value.substring(e.from,e.from=e.chunks.shift()),done:!e.from}}return{status:o,value:e.value}}return e.error?{status:s,error:e.error}:{status:n}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((e=e||{})[a],c);return(i.status===o||i.status===s||i.status===r&&i.done)&&(e[a]=null),i};var c={chunkify:t,pollify:function(e,t,n){return o=>function(){return t[n]||(t[n]={},e.apply(null,arguments).then(e=>t[n].value=e).catch(e=>t[n].error=e.message)),a(t,n,o)}},poll:a,absolutizeUrl:function(e,t){return new URL(e,t).href},isInlineFrame:function(e){return e.contentDocument&&e.contentDocument.location&&!/^https?:$/.test(e.contentDocument.location.protocol)},isAccessibleFrame:function(e){try{const t=e.contentDocument;return Boolean(t&&t.defaultView&&t.defaultView.frameElement)}catch(e){return!1}}};const i=/url\((?!['"]?:)['"]?([^'")]*)['"]?\)/;var u=function(e){const t=e?e.match(i):void 0;return t?t[1]:t};var l=async function({bgImages:e,timeout:t=5e3,Image:n=window.Image}){return(await Promise.all(Array.from(e).map(e=>{return Promise.race([new Promise(t=>{const o=new n;o.onload=()=>t({url:e,width:o.naturalWidth,height:o.naturalHeight}),o.onerror=()=>t(),o.src=e}),(o=t,new Promise(e=>{setTimeout(e,o)}))]);var o}))).reduce((e,t)=>(t&&(e[t.url]={width:t.width,height:t.height}),e),{})},d={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};const{NODE_TYPES:f}=d;function m(e){return Array.prototype.filter.call(e.parentNode.childNodes,t=>t.tagName===e.tagName).indexOf(e)+1}var h=function e(t){if(!t.ownerDocument)return"";let n="",o=t,r=t.ownerDocument,s=r.defaultView.frameElement;for(;o!==r&&(!o||o.nodeType!==f.DOCUMENT_FRAGMENT);)n=`${o.tagName}[${m(o)}]/${n}`,o=o.parentNode;return s&&(n=`${e(s)},${n}`),n.replace(/\/$/,"")};var p=function({parseCss:e,CSSImportRule:t,absolutizeUrl:n,getCssFromCache:o,unfetchedToken:r}){return function s(a,c){let i,u="";try{const l=e(a);for(const e of Array.from(l.cssRules))if(e instanceof t){const t=n(e.href,c),a=o(t);if(void 0!==a){const{bundledCss:e,unfetchedResources:n}=s(a,t);n&&(i=new Set(n)),u=`${u}${e}`}else i=new Set([t]),u=`\n${r}${t}${r}`}}catch(e){console.log("error during getBundledCssFromCssText, styleBaseUrl="+c,e)}var l,d;return u=`${u}${l=a,d=c,`\n/** ${d} **/\n${l}`}`,{bundledCss:u,unfetchedResources:i}}};var g=function(e){var t=document.implementation.createHTMLDocument(""),n=t.createElement("style");return n.textContent=e,t.body.appendChild(n),n.sheet};var y=function(e){const t=["before","after"];try{let n=[];return t.forEach(t=>{const o=window.getComputedStyle(e,":"+t);o&&"none"!==o.getPropertyValue("content")&&n.push(t)}),n.join("_and_")}catch(e){return!1}};var C=function(e,{fetchTimeLimit:t}={}){return async function(n){const o=new AbortController,r=[e(n,{cache:"force-cache",signal:o.signal}).then(e=>{if(e.ok)return e.text();console.log("/failed to fetch (status "+e.status+") css from: "+n+"/")}).catch(e=>{console.log("/failed to fetch (error "+e.toString()+") css from: "+n+"/")})];return Number.isNaN(Number(t))||r.push(new Promise(e=>setTimeout(e,t)).then(()=>o.abort())),Promise.race(r)}},E=function(e){const t=Array.from(e.attributes).find(e=>"href"===e.name.toLowerCase());return t&&t.value},T=function(e){if(e.nodeName&&"LINK"===e.nodeName.toUpperCase()&&e.attributes){const t=new Map(Array.from(e.attributes,e=>[e.name.toLowerCase(),e.value.toLowerCase()]));return"stylesheet"===t.get("rel")||"style"===t.get("as")&&["preload","prefetch"].includes(t.get("rel"))}return!1};var w=function(e){return e&&e.startsWith("data:")};var N=function({getCssFromCache:e,absolutizeUrl:t}){return function(n,o){let r,s,a;if(function(e){return e.nodeName&&"STYLE"===e.nodeName.toUpperCase()}(n))r=Array.from(n.childNodes).map(e=>e.nodeValue).join(""),s=o;else if(T(n)){const c=E(n);w(c)?(s=o,r=c.match(/,(.+)/)[1]):(s=t(c,o),r=e(s)),a=void 0===r}return{cssText:r,styleBaseUrl:s,isUnfetched:a}}};var S=function({extractCssFromNode:e,getBundledCssFromCssText:t,unfetchedToken:n}){return function(o,r){const{styleBaseUrl:s,cssText:a,isUnfetched:c}=e(o,r);let i,u="";if(a){const{bundledCss:e,unfetchedResources:n}=t(a,s);u+=e,i=new Set(n)}else c&&(u+=`${n}${s}${n}`,i=new Set([s]));return{bundledCss:u,unfetchedResources:i}}};const{absolutizeUrl:b,isInlineFrame:v}=c,{NODE_TYPES:A}=d;var R=function(e){return async function(t=document){const n={},o=Date.now(),r=[];return function t(n,o,r,s){function a(t){switch(s.push(async function(t,n,o){let r,s;T(t)&&(s=b(E(t),n),r=await e(s),void 0!==r&&(o[s]=r));r&&await async function t(n,o,r){try{const s=g(n),a=[];for(const n of Array.from(s.cssRules))n instanceof CSSImportRule&&a.push((async()=>{const s=b(n.href,o),a=await e(s);r[s]=a,void 0!==a&&await t(a,s,r)})());await Promise.all(a)}catch(e){console.log("error during fetchBundledCss, resourceUrl="+o,e)}}(r,s,o)}(t,o,r)),t.nodeType){case A.ELEMENT:return"IFRAME"===t.tagName.toUpperCase()?i(t):c(t)}}async function c(e){Array.prototype.map.call(e.childNodes,a)}async function i(e){if(c(e),e.contentDocument)try{const n=v(e)?e.baseURI:e.contentDocument.location.href;t(e.contentDocument,n,r,s)}catch(e){console.log(e)}}a(n.documentElement)}(t,t.location.href,n,r),await Promise.all(r),console.log("[prefetchAllCss]",Date.now()-o),function(e){return n[e]}}};const{absolutizeUrl:D,isInlineFrame:P}=c,{NODE_TYPES:$,DEFAULT_STYLE_PROPS:U,DEFAULT_RECT_PROPS:_,DEFAULT_IGNORED_TAG_NAMES:F}=d;var O=async function({doc:e=document,styleProps:t=U,rectProps:n=_,ignoredTagNames:o=F,addStats:r=!1,fetchTimeLimit:s=3e4}={}){arguments[1]&&(e=arguments[1]),arguments[2]&&(r=arguments[2]),arguments[3]&&(s=arguments[3]);const a={total:{},prefetchCss:{},doCaptureDoc:{},waitForImages:{}};function c(e){e.startTime=Date.now()}function i(e){e.endTime=Date.now(),e.elapsedTime=e.endTime-e.startTime}const d=[];c(a.total);const f=new Set,m=[],E="@@@@@",T="#####",w="-----";c(a.prefetchCss);const b=R(C(fetch,{fetchTimeLimit:s})),v=await b(e);i(a.prefetchCss);const A=p({parseCss:g,CSSImportRule:CSSImportRule,getCssFromCache:v,absolutizeUrl:D,unfetchedToken:T}),O=N({getCssFromCache:v,absolutizeUrl:D}),k=S({extractCssFromNode:O,getBundledCssFromCssText:A,unfetchedToken:T});c(a.doCaptureDoc);const I=G(e);i(a.doCaptureDoc),c(a.waitForImages),await Promise.all(d),i(a.waitForImages),I.version="1.3.0",I.scriptVersion="11.1.2";const L=m.length?m.join("\n")+"\n":"",x=f.size?Array.from(f).join("\n")+"\n":"",M=JSON.stringify({separator:w,cssStartToken:T,cssEndToken:T,iframeStartToken:'"'+E,iframeEndToken:E+'"'});function B(){return r?`\n${w}\n${JSON.stringify(a)}`:""}i(a.total);const V=`${M}\n${x}${w}\n${L}${w}\n${JSON.stringify(I)}${B()}`;return console.log("[captureFrame]",JSON.stringify(a)),V;function z(e){return Object.keys(e).length?e:void 0}function Y(e){return{tagName:"#text",text:e.textContent}}function G(e,r=e.location&&e.location.href){const s=new Set;let a="";const c=i(e.documentElement||e);return c.css=a,d.push(l({bgImages:s}).then(e=>c.images=e)),c;function i(e){const{bundledCss:t,unfetchedResources:n}=k(e,r);if(a+=t,n)for(const e of n)f.add(e);switch(e.nodeType){case $.TEXT:return Y(e);case $.ELEMENT:return"IFRAME"===e.tagName.toUpperCase()?function(e){const t=p(e);let n;try{n=e.contentDocument}catch(e){return o(),t}try{n?t.childNodes=[G(n,P(e)?e.baseURI:n.location.href)]:o()}catch(e){console.log("error in iframeToJSON",e)}return t;function o(){const n=h(e);m.push(n),t.childNodes=[`${E}${n}${E}`]}}(e):p(e);case $.DOCUMENT_FRAGMENT:return{childNodes:Array.prototype.map.call(e.childNodes,i).filter(Boolean)};default:return null}}function p(e){const a=Array.prototype.map.call(e.childNodes,i).filter(Boolean),c=e.shadowRoot&&G(e.shadowRoot,r),l=e.tagName.toUpperCase();if(o.indexOf(l)>-1)return null;const d=window.getComputedStyle(e),f=e.getBoundingClientRect(),m={};for(const e of t)m[e]=d.getPropertyValue(e);m["border-width"]||(m["border-width"]=`${d.getPropertyValue("border-top-width")} ${d.getPropertyValue("border-right-width")} ${d.getPropertyValue("border-bottom-width")} ${d.getPropertyValue("border-left-width")}`);const h={};for(const e of n)h[e]=f[e];const p=Array.from(e.attributes).map(e=>({key:e.name,value:e.value})).reduce((e,t)=>(e[t.key]=t.value,e),{}),g=u(d.getPropertyValue("background-image"));g&&s.add(g);const C=y(e);C&&(p["data-applitools-has-pseudo"]=C);const E={tagName:l,style:z(m),rect:z(h),attributes:z(p),childNodes:a};return c&&(E.shadowRoot=c),E}}};module.exports=O;

@@ -1,2 +0,2 @@

/* @applitools/dom-capture@11.1.1 */
/* @applitools/dom-capture@11.1.2 */

@@ -3,0 +3,0 @@ function __pollResult() {

{
"name": "@applitools/dom-capture",
"version": "11.1.1",
"version": "11.1.2",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc