@applitools/dom-capture 11.6.2 → 11.6.4
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 +24 -0
- package/dist/captureDom.js +3 -3
- package/dist/captureDomForIE.js +3 -3
- package/dist/captureDomPoll.js +3 -3
- package/dist/captureDomPollCjs.js +3 -3
- package/dist/captureDomPollForIE.js +3 -3
- package/dist/pollResult.js +2 -2
- package/dist/pollResultCjs.js +2 -2
- package/dist/pollResultForIE.js +2 -2
- package/package.json +3 -3
package/dist/pollResult.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* @applitools/dom-capture@11.6.
|
|
1
|
+
/* @applitools/dom-capture@11.6.4 */
|
|
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(){function
|
|
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-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","font-family","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index","pointer-events","cursor"],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)}();
|
|
4
4
|
|
|
5
5
|
return pollResult.apply(this, arguments);
|
|
6
6
|
}
|
package/dist/pollResultCjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* @applitools/dom-capture@11.6.
|
|
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(){function
|
|
1
|
+
/* @applitools/dom-capture@11.6.4 */
|
|
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-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","font-family","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index","pointer-events","cursor"],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;
|