Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@veriff/incontext-sdk

Package Overview
Dependencies
Maintainers
8
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@veriff/incontext-sdk - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

10

dist/index.cjs.js

@@ -46,3 +46,3 @@ 'use strict';

frame.src = url;
frame.allow = 'autoplay; camera; microphone';
frame.allow = 'autoplay; camera; microphone; fullscreen; accelerometer; magnetometer; gyroscope; picture-in-picture;';
frame.id = IFRAME_ID;

@@ -95,3 +95,9 @@ frame.style.cssText = iframeStyles;

(_frame$contentWindow = frame.contentWindow) === null || _frame$contentWindow === void 0 ? void 0 : _frame$contentWindow.postMessage(IFRAME_MESSAGES.VERIFF_RENDER, '*');
(_frame$contentWindow = frame.contentWindow) === null || _frame$contentWindow === void 0 ? void 0 : _frame$contentWindow.postMessage({
name: IFRAME_MESSAGES.VERIFF_RENDER,
payload: {
isFullScreenSupported: true,
version: '1.3.0'
}
}, '*');
}

@@ -98,0 +104,0 @@

@@ -42,3 +42,3 @@ import { lock, unlock } from 'tua-body-scroll-lock';

frame.src = url;
frame.allow = 'autoplay; camera; microphone';
frame.allow = 'autoplay; camera; microphone; fullscreen; accelerometer; magnetometer; gyroscope; picture-in-picture;';
frame.id = IFRAME_ID;

@@ -91,3 +91,9 @@ frame.style.cssText = iframeStyles;

(_frame$contentWindow = frame.contentWindow) === null || _frame$contentWindow === void 0 ? void 0 : _frame$contentWindow.postMessage(IFRAME_MESSAGES.VERIFF_RENDER, '*');
(_frame$contentWindow = frame.contentWindow) === null || _frame$contentWindow === void 0 ? void 0 : _frame$contentWindow.postMessage({
name: IFRAME_MESSAGES.VERIFF_RENDER,
payload: {
isFullScreenSupported: true,
version: '1.3.0'
}
}, '*');
}

@@ -94,0 +100,0 @@

2

dist/index.umd.js

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

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).veriffSDK={})}(this,function(u){"use strict";function d(){return"undefined"==typeof window}function f(n){return document.querySelector(n)}function l(n){n=n||navigator.userAgent;var t=/(iPad).*OS\s([\d_]+)/.test(n);return{ios:!t&&/(iPhone\sOS)\s([\d_]+)/.test(n)||t,android:/(Android);?[\s/]+([\d.]+)?/.test(n)}}function s(n){n.cancelable&&n.preventDefault()}function m(n){n||null!==n&&"production"!==process.env.NODE_ENV&&console.warn("If scrolling is also required in the floating layer, the target element must be provided.")}function a(n){var t;d()||(m(n),0<--C||(l().ios||"function"!=typeof P?(!n||-1!==(t=j.indexOf(n))&&(n.ontouchmove=null,n.ontouchstart=null,j.splice(t,1)),k&&(document.removeEventListener("touchmove",s,q),k=!1)):P()))}function r(n){for(var t=Array(n.length),e=0;e<n.length;++e)t[e]=n[e];return t}function p(n){return Array.isArray(n)?n:[n]}function o(n,t){var e=n.tabIndex-t.tabIndex,o=n.index-t.index;if(e){if(!n.tabIndex)return 1;if(!t.tabIndex)return-1}return e||o}function h(n,t,e){return r(n).map(function(n,t){return{node:n,index:t,tabIndex:e&&-1===n.tabIndex?(n.dataset||{}).focusGuard?0:-1:n.tabIndex}}).filter(function(n){return!t||0<=n.tabIndex}).sort(o)}function v(n,e){return n.reduce(function(n,t){return n.concat(r(t.querySelectorAll(e?K:W)),t.parentNode?r(t.parentNode.querySelectorAll(G.join(","))).filter(function(n){return n===t}):[])},[])}function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!(!(!(t=window.getComputedStyle(n,null))||!t.getPropertyValue)&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}function c(n,t){return(t=1<arguments.length&&void 0!==t?t:[]).push(n),n.parentNode&&c(n.parentNode,t),t}function E(n,t){for(var e=c(n),o=c(t),r=0;r<e.length;r+=1){var i=e[r];if(0<=o.indexOf(i))return i}return!1}function g(n){return r(n).filter(e).filter(function(n){return!(("INPUT"===(n=n).tagName||"BUTTON"===n.tagName)&&("hidden"===n.type||n.disabled))})}function y(n,t){return h(g(v(n,t)),!0,t)}function b(n){return g(function(n){n=n.querySelectorAll("[data-autofocus-inside]");return r(n).map(function(n){return v([n])}).reduce(function(n,t){return n.concat(t)},[])}(n))}function i(n){return"INPUT"===n.tagName&&"radio"===n.type}function S(t,n){return n.filter(i).filter(function(n){return n.name===t.name}).filter(function(n){return n.checked})[0]||t}function w(n){return n[0]&&1<n.length&&i(n[0])&&n[0].name?S(n[0],n):n[0]}function I(n,t){return 1<n.length&&i(n[t])&&n[t].name?n.indexOf(S(n[t],n)):t}function N(e){for(var n=e.length,o=0;o<n;o+=1)for(var t=0;t<n;t+=1){var r=function(t){if(o!==t&&e[o].contains(e[t]))return{v:N(e.filter(function(n){return n!==e[t]}))}}(t);if("object"===(void 0===r?"undefined":z(r)))return r.v}return e}function x(n){return n.parentNode?x(n.parentNode):n}function F(n){return p(n).filter(Boolean).reduce(function(n,t){var e=t.getAttribute(U);return n.push.apply(n,e?N(r(x(t).querySelectorAll("["+U+'="'+e+'"]:not([data-focus-lock-disabled="disabled"])'))):[t]),n},[])}function A(n){return n&&n.dataset&&n.dataset.focusGuard}function T(n){return!A(n)}function R(n,t){var e,o,r,i=document&&document.activeElement,u=F(n).filter(T),n=(f=n,e=u,a=p(a=i||n),f=p(f),o=a[0],r=null,f.filter(Boolean).forEach(function(n){r=E(r||n,n)||r,e.filter(Boolean).forEach(function(n){n=E(o,n);n&&(r=!r||n.contains(r)?n:E(n,r))})}),r),a=y(u).filter(function(n){n=n.node;return T(n)});if(a[0]||(a=h(g(v(u)),!1).filter(function(n){n=n.node;return T(n)}))[0]){var c,d,f=y([n]).map(function(n){return n.node}),a=(n=f,a=a,c=new Map,a.forEach(function(n){return c.set(n.node,n)}),n.map(function(n){return c.get(n)}).filter(Boolean)),n=a.map(function(n){return n.node}),u=function(n,t,e,o,r){var i=n.length,u=n[0],a=n[i-1],c=A(e);if(!(0<=n.indexOf(e))){var d=t.indexOf(e),f=t.indexOf(o||d),e=n.indexOf(o),o=d-f,f=t.indexOf(u),u=t.indexOf(a),t=I(n,0),a=I(n,i-1);return-1===d||-1===e?n.indexOf(r&&r.length?w(r):w(n)):!o&&0<=e?e:d<=f&&c&&1<Math.abs(o)?a:f<=d&&c&&1<Math.abs(o)?t:o&&1<Math.abs(o)?e:d<=f?a:u<d?t:o?1<Math.abs(o)?e:(i+e+o)%i:void 0}}(n,f,i,t,n.filter((d=u.reduce(function(n,t){return n.concat(b(t))},[]),function(n){return!!n.autofocus||n.dataset&&!!n.dataset.autofocus||0<=d.indexOf(n)})));return void 0===u?u:a[u]}}function D(n){return n===document.activeElement}function _(n){var o=document&&document.activeElement;return!(!o||o.dataset&&o.dataset.focusGuard)&&F(n).reduce(function(n,t){return n||t.contains(o)||(t=r((t=t).querySelectorAll("iframe")),e=D,!!t.filter(function(n){return n===e})[0]);var e},!1)}function O(){return document&&document.activeElement===document.body||document&&r(document.querySelectorAll("[data-no-focus-lock]")).some(function(n){return n.contains(document.activeElement)})}function t(){var n,t=!1;return J&&(n=J,O()||(n&&!_(n)&&(t=function(n,t){t=R(n,t);if(!Y&&t){if(2<X)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Y=!0,void setTimeout(function(){Y=!1},1);X++,(t=t.node).focus(),t.contentWindow&&t.contentWindow.focus(),X--}}(n,Q)),Q=document.activeElement)),t}function V(){var n;return n=Z.filter(function(n){return n}).slice(-1)[0],(J=n)&&t(),!1}var L,n,C=0,M=0,H=0,P=null,k=!1,j=[],q=function(n){if(d())return!1;if(!n)throw new Error("options must be provided");function t(){}var e=!1,o={get passive(){e=!0}},r="__TUA_BSL_TEST_PASSIVE__";return window.addEventListener(r,t,o),window.removeEventListener(r,t,o),o=n.capture,e?n:void 0!==o&&o}({passive:!1}),B=function(t){var e,o,n,r,i,u,a,c;d()||(m(t),l().ios?(t&&-1===j.indexOf(t)&&(t.ontouchstart=function(n){M=n.targetTouches[0].clientY,H=n.targetTouches[0].clientX},t.ontouchmove=function(n){1===n.targetTouches.length&&function(n,t){if(t){var e=t.scrollTop,o=t.scrollLeft,r=t.scrollWidth,i=t.scrollHeight,u=t.clientWidth,a=t.clientHeight,c=n.targetTouches[0].clientX-H,d=n.targetTouches[0].clientY-M,t=Math.abs(d)>Math.abs(c);if(t&&(0<d&&0===e||d<0&&i<=e+a+1)||!t&&(0<c&&0===o||c<0&&r<=o+u+1))return s(n)}n.stopPropagation()}(n,t)},j.push(t)),k||(document.addEventListener("touchmove",s,q),k=!0)):C<=0&&(P=l().android?(r=f("html"),i=f("body"),u=r.scrollTop||i.scrollTop,a=Object.assign({},r.style),c=Object.assign({},i.style),r.style.height="100%",r.style.overflow="hidden",i.style.top="-".concat(u,"px"),i.style.width="100%",i.style.height="auto",i.style.position="fixed",i.style.overflow="hidden",function(){r.style.height=a.height||"",r.style.overflow=a.overflow||"",["top","width","height","overflow","position"].forEach(function(n){i.style[n]=c[n]||""}),window.scrollTo(0,u)}):(e=f("body"),o=Object.assign({},e.style),n=window.innerWidth-document.body.clientWidth,e.style.overflow="hidden",e.style.boxSizing="border-box",e.style.paddingRight="".concat(n,"px"),function(){["overflow","boxSizing","paddingRight"].forEach(function(n){e.style[n]=o[n]||""})})),C+=1)},G=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],U="data-focus-lock",W=G.join(","),K=W+", [data-focus-guard]",z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},X=0,Y=!1,J=0,Q=null,Z=[],$={on:function(n){0===Z.length&&document.addEventListener("focusin",V),Z.indexOf(n)<0&&(Z.push(n),V())},off:function(t){Z=Z.filter(function(n){return n!==t}),V(),0===Z.length&&document.removeEventListener("focusin",V)}};(n=L=L||{}).VERIFF_HANDSHAKE="VERIFF_HANDSHAKE",n.VERIFF_RENDER="VERIFF_RENDER",n.VERIFF_STARTED="VERIFF_STARTED",n.VERIFF_FINISHED="VERIFF_FINISHED",n.VERIFF_CANCELED="VERIFF_CANCELED",(n=u.MESSAGES||(u.MESSAGES={})).STARTED="STARTED",n.FINISHED="FINISHED",n.CANCELED="CANCELED";var nn="\n position: fixed !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n z-index: 9999999;\n display: block !important;\n width: 100vw;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n background: rgba(0, 0, 0, 0.6);\n",tn="\n position: absolute !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n width: 100vw;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n background: none;\n border: none\n",en="veriffFrame";function on(n){var t=document.createElement("iframe");t.src=n,t.allow="autoplay; camera; microphone",t.id=en,t.style.cssText=tn;n=document.createElement("div");return n.style.cssText=nn,n.appendChild(t),document.body.appendChild(n),$.on(t),B(t),t}u.createVeriffFrame=function(n){var t=n.url,e=n.lang,o=void 0===(n=n.onEvent)?function(){}:n;if(!t)throw new Error("URL is not provided. Please provide a valid Veriff session url.");function r(){var n,t=document.getElementById(en);t&&t.parentNode?($.off(t),a(t),(n=t.parentNode.parentNode)&&n.removeChild(t.parentNode)):a(),window.removeEventListener("message",i)}function i(n){var t,e=document.getElementById(en);n.data===L.VERIFF_HANDSHAKE&&null!==(t=e.contentWindow)&&void 0!==t&&t.postMessage(L.VERIFF_RENDER,"*"),n.data===L.VERIFF_STARTED&&o(u.MESSAGES.STARTED),n.data===L.VERIFF_CANCELED&&(r(),o(u.MESSAGES.CANCELED)),n.data===L.VERIFF_FINISHED&&(r(),o(u.MESSAGES.FINISHED))}return e&&0<e.length?on(function(n,t,e){if(e){var o=new URL(n),r=o.searchParams;return r.set(t,e),o.search=r.toString(),o.toString()}return n}(t,"lang",e)):on(t),window.addEventListener("message",i),{close:r}},Object.defineProperty(u,"__esModule",{value:!0})});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).veriffSDK={})}(this,function(u){"use strict";function d(){return"undefined"==typeof window}function f(e){return document.querySelector(e)}function l(e){e=e||navigator.userAgent;var n=/(iPad).*OS\s([\d_]+)/.test(e);return{ios:!n&&/(iPhone\sOS)\s([\d_]+)/.test(e)||n,android:/(Android);?[\s/]+([\d.]+)?/.test(e)}}function s(e){e.cancelable&&e.preventDefault()}function m(e){e||null!==e&&"production"!==process.env.NODE_ENV&&console.warn("If scrolling is also required in the floating layer, the target element must be provided.")}function a(e){var n;d()||(m(e),0<--C||(l().ios||"function"!=typeof P?(!e||-1!==(n=j.indexOf(e))&&(e.ontouchmove=null,e.ontouchstart=null,j.splice(n,1)),k&&(document.removeEventListener("touchmove",s,q),k=!1)):P()))}function r(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n}function p(e){return Array.isArray(e)?e:[e]}function o(e,n){var t=e.tabIndex-n.tabIndex,o=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||o}function h(e,n,t){return r(e).map(function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}}).filter(function(e){return!n||0<=e.tabIndex}).sort(o)}function v(e,t){return e.reduce(function(e,n){return e.concat(r(n.querySelectorAll(t?K:W)),n.parentNode?r(n.parentNode.querySelectorAll(G.join(","))).filter(function(e){return e===n}):[])},[])}function t(e){return!e||e===document||e.nodeType===Node.DOCUMENT_NODE||!(!(!(n=window.getComputedStyle(e,null))||!n.getPropertyValue)&&("none"===n.getPropertyValue("display")||"hidden"===n.getPropertyValue("visibility")))&&t(e.parentNode);var n}function c(e,n){return(n=1<arguments.length&&void 0!==n?n:[]).push(e),e.parentNode&&c(e.parentNode,n),n}function E(e,n){for(var t=c(e),o=c(n),r=0;r<t.length;r+=1){var i=t[r];if(0<=o.indexOf(i))return i}return!1}function g(e){return r(e).filter(t).filter(function(e){return!(("INPUT"===(e=e).tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))})}function y(e,n){return h(g(v(e,n)),!0,n)}function b(e){return g(function(e){e=e.querySelectorAll("[data-autofocus-inside]");return r(e).map(function(e){return v([e])}).reduce(function(e,n){return e.concat(n)},[])}(e))}function i(e){return"INPUT"===e.tagName&&"radio"===e.type}function S(n,e){return e.filter(i).filter(function(e){return e.name===n.name}).filter(function(e){return e.checked})[0]||n}function w(e){return e[0]&&1<e.length&&i(e[0])&&e[0].name?S(e[0],e):e[0]}function I(e,n){return 1<e.length&&i(e[n])&&e[n].name?e.indexOf(S(e[n],e)):n}function F(t){for(var e=t.length,o=0;o<e;o+=1)for(var n=0;n<e;n+=1){var r=function(n){if(o!==n&&t[o].contains(t[n]))return{v:F(t.filter(function(e){return e!==t[n]}))}}(n);if("object"===(void 0===r?"undefined":z(r)))return r.v}return t}function N(e){return e.parentNode?N(e.parentNode):e}function x(e){return p(e).filter(Boolean).reduce(function(e,n){var t=n.getAttribute(U);return e.push.apply(e,t?F(r(N(n).querySelectorAll("["+U+'="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e},[])}function A(e){return e&&e.dataset&&e.dataset.focusGuard}function T(e){return!A(e)}function R(e,n){var t,o,r,i=document&&document.activeElement,u=x(e).filter(T),e=(f=e,t=u,a=p(a=i||e),f=p(f),o=a[0],r=null,f.filter(Boolean).forEach(function(e){r=E(r||e,e)||r,t.filter(Boolean).forEach(function(e){e=E(o,e);e&&(r=!r||e.contains(r)?e:E(e,r))})}),r),a=y(u).filter(function(e){e=e.node;return T(e)});if(a[0]||(a=h(g(v(u)),!1).filter(function(e){e=e.node;return T(e)}))[0]){var c,d,f=y([e]).map(function(e){return e.node}),a=(e=f,a=a,c=new Map,a.forEach(function(e){return c.set(e.node,e)}),e.map(function(e){return c.get(e)}).filter(Boolean)),e=a.map(function(e){return e.node}),u=function(e,n,t,o,r){var i=e.length,u=e[0],a=e[i-1],c=A(t);if(!(0<=e.indexOf(t))){var d=n.indexOf(t),f=n.indexOf(o||d),t=e.indexOf(o),o=d-f,f=n.indexOf(u),u=n.indexOf(a),n=I(e,0),a=I(e,i-1);return-1===d||-1===t?e.indexOf(r&&r.length?w(r):w(e)):!o&&0<=t?t:d<=f&&c&&1<Math.abs(o)?a:f<=d&&c&&1<Math.abs(o)?n:o&&1<Math.abs(o)?t:d<=f?a:u<d?n:o?1<Math.abs(o)?t:(i+t+o)%i:void 0}}(e,f,i,n,e.filter((d=u.reduce(function(e,n){return e.concat(b(n))},[]),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||0<=d.indexOf(e)})));return void 0===u?u:a[u]}}function D(e){return e===document.activeElement}function _(e){var o=document&&document.activeElement;return!(!o||o.dataset&&o.dataset.focusGuard)&&x(e).reduce(function(e,n){return e||n.contains(o)||(n=r((n=n).querySelectorAll("iframe")),t=D,!!n.filter(function(e){return e===t})[0]);var t},!1)}function O(){return document&&document.activeElement===document.body||document&&r(document.querySelectorAll("[data-no-focus-lock]")).some(function(e){return e.contains(document.activeElement)})}function n(){var e,n=!1;return J&&(e=J,O()||(e&&!_(e)&&(n=function(e,n){n=R(e,n);if(!Y&&n){if(2<X)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Y=!0,void setTimeout(function(){Y=!1},1);X++,(n=n.node).focus(),n.contentWindow&&n.contentWindow.focus(),X--}}(e,Q)),Q=document.activeElement)),n}function V(){var e;return e=Z.filter(function(e){return e}).slice(-1)[0],(J=e)&&n(),!1}var L,e,C=0,M=0,H=0,P=null,k=!1,j=[],q=function(e){if(d())return!1;if(!e)throw new Error("options must be provided");function n(){}var t=!1,o={get passive(){t=!0}},r="__TUA_BSL_TEST_PASSIVE__";return window.addEventListener(r,n,o),window.removeEventListener(r,n,o),o=e.capture,t?e:void 0!==o&&o}({passive:!1}),B=function(n){var t,o,e,r,i,u,a,c;d()||(m(n),l().ios?(n&&-1===j.indexOf(n)&&(n.ontouchstart=function(e){M=e.targetTouches[0].clientY,H=e.targetTouches[0].clientX},n.ontouchmove=function(e){1===e.targetTouches.length&&function(e,n){if(n){var t=n.scrollTop,o=n.scrollLeft,r=n.scrollWidth,i=n.scrollHeight,u=n.clientWidth,a=n.clientHeight,c=e.targetTouches[0].clientX-H,d=e.targetTouches[0].clientY-M,n=Math.abs(d)>Math.abs(c);if(n&&(0<d&&0===t||d<0&&i<=t+a+1)||!n&&(0<c&&0===o||c<0&&r<=o+u+1))return s(e)}e.stopPropagation()}(e,n)},j.push(n)),k||(document.addEventListener("touchmove",s,q),k=!0)):C<=0&&(P=l().android?(r=f("html"),i=f("body"),u=r.scrollTop||i.scrollTop,a=Object.assign({},r.style),c=Object.assign({},i.style),r.style.height="100%",r.style.overflow="hidden",i.style.top="-".concat(u,"px"),i.style.width="100%",i.style.height="auto",i.style.position="fixed",i.style.overflow="hidden",function(){r.style.height=a.height||"",r.style.overflow=a.overflow||"",["top","width","height","overflow","position"].forEach(function(e){i.style[e]=c[e]||""}),window.scrollTo(0,u)}):(t=f("body"),o=Object.assign({},t.style),e=window.innerWidth-document.body.clientWidth,t.style.overflow="hidden",t.style.boxSizing="border-box",t.style.paddingRight="".concat(e,"px"),function(){["overflow","boxSizing","paddingRight"].forEach(function(e){t.style[e]=o[e]||""})})),C+=1)},G=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],U="data-focus-lock",W=G.join(","),K=W+", [data-focus-guard]",z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X=0,Y=!1,J=0,Q=null,Z=[],$={on:function(e){0===Z.length&&document.addEventListener("focusin",V),Z.indexOf(e)<0&&(Z.push(e),V())},off:function(n){Z=Z.filter(function(e){return e!==n}),V(),0===Z.length&&document.removeEventListener("focusin",V)}};(e=L=L||{}).VERIFF_HANDSHAKE="VERIFF_HANDSHAKE",e.VERIFF_RENDER="VERIFF_RENDER",e.VERIFF_STARTED="VERIFF_STARTED",e.VERIFF_FINISHED="VERIFF_FINISHED",e.VERIFF_CANCELED="VERIFF_CANCELED",(e=u.MESSAGES||(u.MESSAGES={})).STARTED="STARTED",e.FINISHED="FINISHED",e.CANCELED="CANCELED";var ee="\n position: fixed !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n z-index: 9999999;\n display: block !important;\n width: 100vw;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n background: rgba(0, 0, 0, 0.6);\n",ne="\n position: absolute !important;\n top: 0 !important;\n right: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n width: 100vw;\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n background: none;\n border: none\n",te="veriffFrame";function oe(e){var n=document.createElement("iframe");n.src=e,n.allow="autoplay; camera; microphone; fullscreen; accelerometer; magnetometer; gyroscope; picture-in-picture;",n.id=te,n.style.cssText=ne;e=document.createElement("div");return e.style.cssText=ee,e.appendChild(n),document.body.appendChild(e),$.on(n),B(n),n}u.createVeriffFrame=function(e){var n=e.url,t=e.lang,o=void 0===(e=e.onEvent)?function(){}:e;if(!n)throw new Error("URL is not provided. Please provide a valid Veriff session url.");function r(){var e,n=document.getElementById(te);n&&n.parentNode?($.off(n),a(n),(e=n.parentNode.parentNode)&&e.removeChild(n.parentNode)):a(),window.removeEventListener("message",i)}function i(e){var n,t=document.getElementById(te);e.data===L.VERIFF_HANDSHAKE&&null!==(n=t.contentWindow)&&void 0!==n&&n.postMessage({name:L.VERIFF_RENDER,payload:{isFullScreenSupported:!0,version:"1.3.0"}},"*"),e.data===L.VERIFF_STARTED&&o(u.MESSAGES.STARTED),e.data===L.VERIFF_CANCELED&&(r(),o(u.MESSAGES.CANCELED)),e.data===L.VERIFF_FINISHED&&(r(),o(u.MESSAGES.FINISHED))}return t&&0<t.length?oe(function(e,n,t){if(t){var o=new URL(e),r=o.searchParams;return r.set(n,t),o.search=r.toString(),o.toString()}return e}(n,"lang",t)):oe(n),window.addEventListener("message",i),{close:r}},Object.defineProperty(u,"__esModule",{value:!0})});
{
"name": "@veriff/incontext-sdk",
"version": "1.2.0",
"version": "1.3.0",
"description": "In-Context Veriff browser integration",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

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