@applitools/dom-capture 11.7.1 → 11.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- /* @applitools/dom-capture@11.7.1 */
1
+ /* @applitools/dom-capture@11.8.0 */
2
2
  function __pollResult() {
3
- var pollResult=function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e=function(){const t=function(t){return function(){var t={};function e(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var n=function(t,n){const o=[];let r=0;for(let u=0;u<t.length;++u){const c=e(t,u);let a=0;c>0&&(a=c<128?1:c<2048?2:c<65536?3:c<2097152?4:c<67108864?5:6),r+a>n?(o.push(u),r=a):r+=a}return o};const o=function(t){return t&&t.__esModule?t:{default:t}}(n),r="WIP",u="SUCCESS",c="SUCCESS_CHUNKED",a="ERROR";var i=function(t,e,n={}){const i=function(t,{chunkByteLength:e=0}={}){if(t){if(t.value){if(e){if(!t.chunks)try{const n=JSON.stringify(t.value);t.chunks=(0,o.default)(n,e),t.chunks.length>0&&(t.from=0,t.value=n)}catch(t){return{status:a,error:t.message}}if(t.from>=0)return{status:c,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:u,value:t.value}}return t.error?{status:a,error:t.error}:{status:r}}return{status:a,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[e],n);return(i.status===u||i.status===a||i.status===c&&i.done)&&delete t[e],i};const l=i;var s=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=t.poll=t.pollify=t.chunkify=void 0;const d=s(n);t.chunkify=d.default;const f=s((function(t,e,n){return o=>function(...r){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...r))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),l(e,n,o)}}));t.pollify=f.default;const p=s(i);t.poll=p.default;const h=s((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const o=new URL(t,e).href;return n?o:decodeURI(o)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=h.default;const E=s((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=E.default;const m=s((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));t.isAccessibleFrame=m.default;const{poll:_}=t,{EYES_NAMESPACE:y,DOM_CAPTURE_KEY:b}={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-color","background-image","background-origin","background-position","background-repeat","background-size","border-color","border-radius","border-style","border-width","color","cursor","display","font-family","font-size","font-weight","font-style","line-height","margin","opacity","overflow","padding","pointer-events","position","text-align","visibility","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};return function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function(t){return JSON.stringify(_(window[y],b,t))}))}()};let e=!0;try{let n=document.head.querySelector("[data-applitools-sandbox]");n||(n=document.createElement("iframe"),n.setAttribute("data-applitools-sandbox",""),n.setAttribute("data-applitools-skip",""),document.head.appendChild(n));const o=window.crypto.getRandomValues(new Uint32Array(1))[0],r=n.contentDocument.createElement("script");r.textContent=`window['ctor-${o}'] = ${t.toString()};`,n.contentDocument.head.appendChild(r);const u=n.contentWindow[`ctor-${o}`];if("function"!=typeof u)throw new Error("Sandbox failed to extract function");return e=!1,u(document).apply(null,arguments)}catch(n){try{return t(document).apply(null,arguments)}catch(t){throw e?t:n}}};return t(e)}();
3
+ var pollResult=function(){"use strict";return function(...t){const e=function(t,e,n){return function(){var t={};function n(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var o=function(t,e){const o=[];let r=0;for(let i=0;i<t.length;++i){const c=n(t,i);let u=0;c>0&&(u=c<128?1:c<2048?2:c<65536?3:c<2097152?4:c<67108864?5:6),r+u>e?(o.push(i),r=u):r+=u}return o};const r=function(t){return t&&t.__esModule?t:{default:t}}(o),i="WIP",c="SUCCESS",u="SUCCESS_CHUNKED",s="ERROR";var a=function(t,n,o={}){const a=function(t,{chunkByteLength:n=0}={}){var o;if(t){if(t.value){if(n){if(!t.chunks)try{const i=void 0!==e?null===(o=e.__EYES__APPLITOOLS__)||void 0===o?void 0:o._stringify:void 0,c=(null!=i?i:JSON.stringify)(t.value);t.chunks=(0,r.default)(c,n),t.chunks.length>0&&(t.from=0,t.value=c)}catch(t){return{status:s,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:c,value:t.value}}return t.error?{status:s,error:t.error}:{status:i}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[n],o);return(a.status===c||a.status===s||a.status===u&&a.done)&&delete t[n],a};const l=a;var d=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=t.poll=t.pollify=t.chunkify=void 0;const f=d(o);t.chunkify=f.default;const _=d((function(t,e,n){return o=>function(...r){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...r))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),l(e,n,o)}}));t.pollify=_.default;const E=d(a);t.poll=E.default;const h=d((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const o=new URL(t,e).href;return n?o:decodeURI(o)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=h.default;const p=d((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=p.default;const y=d((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));t.isAccessibleFrame=y.default;const{poll:S}=t,{EYES_NAMESPACE:g,DOM_CAPTURE_KEY:O}={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-color","background-image","background-origin","background-position","background-repeat","background-size","border-color","border-radius","border-style","border-width","color","cursor","display","font-family","font-size","font-weight","font-style","line-height","margin","opacity","overflow","padding","pointer-events","position","text-align","visibility","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};return function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function(t){return JSON.stringify(S(e[g],O,t))}))}()};let n=!0;try{let o=window.__applitools_sandbox;o||(o=document.createElement("iframe"),o.setAttribute("data-applitools-sandbox",""),o.setAttribute("data-applitools-skip",""),document.head.appendChild(o),window.__applitools_sandbox=o);const r=Math.floor(4294967296*Math.random()),i=o.contentDocument.createElement("script");i.textContent="window['ctor-"+r+"'] = "+e.toString()+";",o.contentDocument.head.appendChild(i);const c=o.contentWindow["ctor-"+r];if(delete o.contentWindow["ctor-"+r],"function"!=typeof c)throw new Error("Sandbox failed to extract function");n=!1;const u=o.contentWindow,s=u.__EYES__APPLITOOLS__=u.__EYES__APPLITOOLS__||{};s._stringify||(s._stringify=u.JSON.stringify.bind(u.JSON));const a=window.__EYES__APPLITOOLS__=window.__EYES__APPLITOOLS__||{};function l(t){if(u.Array.isArray(t)){const e=new u.Array(t.length);for(let n=0;n<t.length;n++)e[n]=l(t[n]);return e}if(t&&"object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype){const e=new u.Object;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=l(t[n]));return e}return t}a._stringify&&a._stringify!==JSON.stringify||(a._stringify=u.JSON.stringify.bind(u.JSON));const d=new u.Array(t.length);for(let f=0;f<t.length;f++)d[f]=l(t[f]);return c(document,window,u)(...d)}catch(_){try{return e(document,window,window)(...t)}catch(E){throw n?E:_}}}}();
4
4
 
5
5
  return pollResult.apply(this, arguments);
6
6
  }
@@ -1,2 +1,2 @@
1
- /* @applitools/dom-capture@11.7.1 */
2
- "use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e=function(){const t=function(t){return function(){var t={};function e(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var n=function(t,n){const o=[];let r=0;for(let u=0;u<t.length;++u){const c=e(t,u);let a=0;c>0&&(a=c<128?1:c<2048?2:c<65536?3:c<2097152?4:c<67108864?5:6),r+a>n?(o.push(u),r=a):r+=a}return o};const o=function(t){return t&&t.__esModule?t:{default:t}}(n),r="WIP",u="SUCCESS",c="SUCCESS_CHUNKED",a="ERROR";var i=function(t,e,n={}){const i=function(t,{chunkByteLength:e=0}={}){if(t){if(t.value){if(e){if(!t.chunks)try{const n=JSON.stringify(t.value);t.chunks=(0,o.default)(n,e),t.chunks.length>0&&(t.from=0,t.value=n)}catch(t){return{status:a,error:t.message}}if(t.from>=0)return{status:c,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:u,value:t.value}}return t.error?{status:a,error:t.error}:{status:r}}return{status:a,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[e],n);return(i.status===u||i.status===a||i.status===c&&i.done)&&delete t[e],i};const l=i;var s=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=t.poll=t.pollify=t.chunkify=void 0;const d=s(n);t.chunkify=d.default;const f=s((function(t,e,n){return o=>function(...r){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...r))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),l(e,n,o)}}));t.pollify=f.default;const p=s(i);t.poll=p.default;const h=s((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const o=new URL(t,e).href;return n?o:decodeURI(o)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=h.default;const E=s((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=E.default;const m=s((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));t.isAccessibleFrame=m.default;const{poll:_}=t,{EYES_NAMESPACE:y,DOM_CAPTURE_KEY:b}={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-color","background-image","background-origin","background-position","background-repeat","background-size","border-color","border-radius","border-style","border-width","color","cursor","display","font-family","font-size","font-weight","font-style","line-height","margin","opacity","overflow","padding","pointer-events","position","text-align","visibility","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};return function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function(t){return JSON.stringify(_(window[y],b,t))}))}()};let e=!0;try{let n=document.head.querySelector("[data-applitools-sandbox]");n||(n=document.createElement("iframe"),n.setAttribute("data-applitools-sandbox",""),n.setAttribute("data-applitools-skip",""),document.head.appendChild(n));const o=window.crypto.getRandomValues(new Uint32Array(1))[0],r=n.contentDocument.createElement("script");r.textContent=`window['ctor-${o}'] = ${t.toString()};`,n.contentDocument.head.appendChild(r);const u=n.contentWindow[`ctor-${o}`];if("function"!=typeof u)throw new Error("Sandbox failed to extract function");return e=!1,u(document).apply(null,arguments)}catch(n){try{return t(document).apply(null,arguments)}catch(t){throw e?t:n}}},n=t(e);module.exports=n;
1
+ /* @applitools/dom-capture@11.8.0 */
2
+ "use strict";module.exports=function(...t){const e=function(t,e,n){return function(){var t={};function n(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var o=function(t,e){const o=[];let r=0;for(let i=0;i<t.length;++i){const c=n(t,i);let u=0;c>0&&(u=c<128?1:c<2048?2:c<65536?3:c<2097152?4:c<67108864?5:6),r+u>e?(o.push(i),r=u):r+=u}return o};const r=function(t){return t&&t.__esModule?t:{default:t}}(o),i="WIP",c="SUCCESS",u="SUCCESS_CHUNKED",s="ERROR";var a=function(t,n,o={}){const a=function(t,{chunkByteLength:n=0}={}){var o;if(t){if(t.value){if(n){if(!t.chunks)try{const i=void 0!==e?null===(o=e.__EYES__APPLITOOLS__)||void 0===o?void 0:o._stringify:void 0,c=(null!=i?i:JSON.stringify)(t.value);t.chunks=(0,r.default)(c,n),t.chunks.length>0&&(t.from=0,t.value=c)}catch(t){return{status:s,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:c,value:t.value}}return t.error?{status:s,error:t.error}:{status:i}}return{status:s,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[n],o);return(a.status===c||a.status===s||a.status===u&&a.done)&&delete t[n],a};const l=a;var d=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessibleFrame=t.isInlineFrame=t.absolutizeUrl=t.poll=t.pollify=t.chunkify=void 0;const f=d(o);t.chunkify=f.default;const _=d((function(t,e,n){return o=>function(...r){return e[n]||(e[n]={},Promise.resolve().then((()=>t(...r))).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message+"\nStack:"+t.stack))),l(e,n,o)}}));t.pollify=_.default;const E=d(a);t.poll=E.default;const h=d((function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const o=new URL(t,e).href;return n?o:decodeURI(o)}catch(e){return n?t:decodeURI(t)}}));t.absolutizeUrl=h.default;const p=d((function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)}));t.isInlineFrame=p.default;const y=d((function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}));t.isAccessibleFrame=y.default;const{poll:S}=t,{EYES_NAMESPACE:g,DOM_CAPTURE_KEY:O}={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-color","background-image","background-origin","background-position","background-repeat","background-size","border-color","border-radius","border-style","border-width","color","cursor","display","font-family","font-size","font-weight","font-style","line-height","margin","opacity","overflow","padding","pointer-events","position","text-align","visibility","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};return function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function(t){return JSON.stringify(S(e[g],O,t))}))}()};let n=!0;try{let o=window.__applitools_sandbox;o||(o=document.createElement("iframe"),o.setAttribute("data-applitools-sandbox",""),o.setAttribute("data-applitools-skip",""),document.head.appendChild(o),window.__applitools_sandbox=o);const r=Math.floor(4294967296*Math.random()),i=o.contentDocument.createElement("script");i.textContent="window['ctor-"+r+"'] = "+e.toString()+";",o.contentDocument.head.appendChild(i);const c=o.contentWindow["ctor-"+r];if(delete o.contentWindow["ctor-"+r],"function"!=typeof c)throw new Error("Sandbox failed to extract function");n=!1;const u=o.contentWindow,s=u.__EYES__APPLITOOLS__=u.__EYES__APPLITOOLS__||{};s._stringify||(s._stringify=u.JSON.stringify.bind(u.JSON));const a=window.__EYES__APPLITOOLS__=window.__EYES__APPLITOOLS__||{};function l(t){if(u.Array.isArray(t)){const e=new u.Array(t.length);for(let n=0;n<t.length;n++)e[n]=l(t[n]);return e}if(t&&"object"==typeof t&&Object.getPrototypeOf(t)===Object.prototype){const e=new u.Object;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=l(t[n]));return e}return t}a._stringify&&a._stringify!==JSON.stringify||(a._stringify=u.JSON.stringify.bind(u.JSON));const d=new u.Array(t.length);for(let f=0;f<t.length;f++)d[f]=l(t[f]);return c(document,window,u)(...d)}catch(_){try{return e(document,window,window)(...t)}catch(E){throw n?E:_}}};