@idscan/onboarding 2.7.4 → 2.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.
- package/dist/Wrapper.css +1 -0
- package/dist/custom_types/custom.d.ts +20 -0
- package/dist/networks/Blur-chunk.js +1 -1
- package/dist/networks/Bubble-chunk.js +1 -1
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/networks/GeneralTypeDetectionYolo-chunk.js +1 -1
- package/dist/networks/MRZ-chunk.js +1 -1
- package/dist/networks/PDF-chunk.js +1 -1
- package/dist/networks/ZXing-chunk.js +1 -1
- package/dist/networks/angle03032023.onnx.gzip +0 -0
- package/dist/networks/blurWorker.js.gzip +0 -0
- package/dist/networks/bubbleWorker.js.gzip +0 -0
- package/dist/networks/faceDetection03032023.onnx.gzip +0 -0
- package/dist/networks/faceLandmark03032023.onnx.gzip +0 -0
- package/dist/networks/mrz03032023.onnx.gzip +0 -0
- package/dist/networks/mrzWorker.js.gzip +0 -0
- package/dist/networks/ort-wasm-simd.wasm.gzip +0 -0
- package/dist/networks/ort-wasm.wasm.gzip +0 -0
- package/dist/networks/pdfWorker.js.gzip +0 -0
- package/dist/networks/yoloFaceFingers.onnx.gzip +0 -0
- package/dist/{@types/src → src}/@types/Api/Requests.d.ts +1 -1
- package/dist/{@types/src → src}/@types/Api/Responses.d.ts +2 -2
- package/dist/{@types/src → src}/@types/Data.d.ts +4 -4
- package/dist/src/@types/IDVCTypes.d.ts +5 -0
- package/dist/{@types/src → src}/@types/Step.d.ts +2 -1
- package/dist/{@types/src → src}/@types/enums.d.ts +2 -0
- package/dist/{@types/src → src}/Wrapper.d.ts +0 -2
- package/dist/{@types/src → src}/config.d.ts +4 -4
- package/dist/{@types/src → src}/errors/ConfigError.d.ts +1 -1
- package/dist/{@types/src → src}/errors/FaceAuthorizationError.d.ts +1 -1
- package/dist/{@types/src → src}/errors/HttpError.d.ts +1 -1
- package/dist/{@types/src → src}/errors/NotValidApplicant.d.ts +1 -1
- package/dist/{@types/src → src}/errors/RequestTimeoutError.d.ts +1 -1
- package/dist/{@types/src → src}/errors/ValidationError.d.ts +1 -1
- package/dist/{@types/src → src}/helpers/fingerPrint.d.ts +1 -1
- package/dist/{@types/src → src}/helpers/requestModelCheckers.d.ts +2 -2
- package/dist/{@types/src → src}/helpers/utils.d.ts +1 -1
- package/dist/src/mocks/validation.json.d.ts +9 -0
- package/dist/{@types/src → src}/modules/Lib.d.ts +3 -3
- package/dist/{@types/src → src}/modules/QRCodeModal.d.ts +1 -1
- package/dist/{@types/src → src}/modules/Validation.d.ts +1 -1
- package/dist/{@types/src → src}/modules/ValidationModal.d.ts +1 -1
- package/dist/vite.config.d.ts +2 -0
- package/dist/wrapper.es.js +2 -0
- package/dist/wrapper.es.js.map +1 -0
- package/dist/wrapper.umd.js +2 -0
- package/dist/wrapper.umd.js.map +1 -0
- package/package.json +15 -35
- package/readme.md +7 -0
- package/dist/@types/Fingerprinting/src/@types/Data.d.ts +0 -10
- package/dist/@types/Fingerprinting/src/main.d.ts +0 -29
- package/dist/@types/Fingerprinting/src/modules/batteryInfo.d.ts +0 -7
- package/dist/@types/Fingerprinting/src/modules/browserInfo.d.ts +0 -20
- package/dist/@types/Fingerprinting/src/modules/canvasInfo.d.ts +0 -1
- package/dist/@types/Fingerprinting/src/modules/connectionInfo.d.ts +0 -9
- package/dist/@types/Fingerprinting/src/modules/fontsInfo.d.ts +0 -3
- package/dist/@types/Fingerprinting/src/modules/html5Info.d.ts +0 -8
- package/dist/@types/Fingerprinting/src/modules/ipWebRTCInfo.d.ts +0 -1
- package/dist/@types/Fingerprinting/src/modules/screenInfo.d.ts +0 -14
- package/dist/@types/Fingerprinting/src/modules/timeZoneInfo.d.ts +0 -1
- package/dist/@types/Fingerprinting/src/modules/videoCodecsInfo.d.ts +0 -1
- package/dist/@types/Fingerprinting/src/modules/webGLInfo.d.ts +0 -10
- package/dist/@types/Fingerprinting/src/utils/sha256.d.ts +0 -2
- package/dist/@types/src/@types/IDVCTypes.d.ts +0 -5
- package/dist/@types/src/helpers/styleInject.d.ts +0 -1
- package/dist/js/wrapper.js +0 -1
- /package/dist/{@types/src → src}/entry.d.ts +0 -0
- /package/dist/{@types/src → src}/errors/WrapperError.d.ts +0 -0
- /package/dist/{@types/src → src}/helpers/mobileChecker.d.ts +0 -0
- /package/dist/{@types/src → src}/helpers/typeGuard.d.ts +0 -0
- /package/dist/{@types/src → src}/helpers/validators.d.ts +0 -0
- /package/dist/{@types/src → src}/mocks/defaultValues.d.ts +0 -0
- /package/dist/{@types/src → src}/modules/Api.d.ts +0 -0
- /package/dist/{@types/src → src}/modules/ConsentForm.d.ts +0 -0
- /package/dist/{@types/src → src}/modules/Modal.d.ts +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self)["IDVC-DVSO"]=e()}(this,(function(){"use strict";var t=document.createElement("style");t.textContent=".idvc-preload-element{min-width:320px;height:520px}.vh-100{height:100vh}.d-none{display:none!important}.no-scroll{overflow:hidden;-webkit-overflow-scrolling:auto;position:fixed;width:100%}.qr-code__header{background-color:#f3f3f3;padding-left:15px;width:100%}.idvc-modal-background{--color-primary: #5185F3;top:0;left:0;z-index:2000;background-color:#0006}.idvc-after-submit{width:100%;height:100%;position:absolute}.pos-relative{position:relative}.hidden-element{visibility:hidden;position:absolute}.idvc-modal{font-family:Inter,sans-serif;box-sizing:border-box;position:absolute;top:50%;left:50%;background:#fff;box-shadow:0 1px 3px #0000004d;transform:translate(-50%,-50%);z-index:2001;display:flex;gap:20px;align-items:center;justify-content:center;flex-direction:column;padding:20px;border-radius:12px;min-height:150px}.idvc-modal *{box-sizing:border-box}.idvc-modal_validation{min-width:300px;width:30%;max-width:500px}.idvc-modal_qr-code{max-width:480px}.idvc-modal_qr-code .idvc-modal__header{justify-content:flex-start}.idvc-modal .d-flex{display:flex}.idvc-modal .color-danger{color:#cb0b00;fill:#cb0b00}.idvc-modal .color-success{color:#67c23a;fill:#67c23a}.idvc-modal .color-primary{color:#409eff;fill:#409eff}.idvc-modal .w-100{width:100%}.idvc-modal .w-45{width:45%}.idvc-modal .exclamation-sign{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjQ1LjMxMXB4IiBoZWlnaHQ9IjQ1LjMxMXB4IiB2aWV3Qm94PSIwIDAgNDUuMzExIDQ1LjMxMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDUuMzExIDQ1LjMxMTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTIyLjY3NSwwLjAyYy0wLjAwNiwwLTAuMDE0LDAuMDAxLTAuMDIsMC4wMDFjLTAuMDA3LDAtMC4wMTMtMC4wMDEtMC4wMi0wLjAwMUMxMC4xMzUsMC4wMiwwLDEwLjE1NCwwLDIyLjY1Ng0KCQljMCwxMi41LDEwLjEzNSwyMi42MzUsMjIuNjM1LDIyLjYzNWMwLjAwNywwLDAuMDEzLDAsMC4wMiwwYzAuMDA2LDAsMC4wMTQsMCwwLjAyLDBjMTIuNSwwLDIyLjYzNS0xMC4xMzUsMjIuNjM1LTIyLjYzNQ0KCQlDNDUuMzExLDEwLjE1NCwzNS4xNzYsMC4wMiwyMi42NzUsMC4wMnogTTIyLjY3NSwzOC44MTFjLTAuMDA2LDAtMC4wMTQtMC4wMDEtMC4wMi0wLjAwMWMtMC4wMDcsMC0wLjAxMywwLjAwMS0wLjAyLDAuMDAxDQoJCWMtMi4wNDYsMC0zLjcwNS0xLjY1OC0zLjcwNS0zLjcwNWMwLTIuMDQ1LDEuNjU5LTMuNzAzLDMuNzA1LTMuNzAzYzAuMDA3LDAsMC4wMTMsMCwwLjAyLDBjMC4wMDYsMCwwLjAxNCwwLDAuMDIsMA0KCQljMi4wNDUsMCwzLjcwNiwxLjY1OCwzLjcwNiwzLjcwM0MyNi4zODEsMzcuMTUyLDI0LjcyMywzOC44MTEsMjIuNjc1LDM4LjgxMXogTTI3Ljk4OCwxMC41NzgNCgkJYy0wLjI0MiwzLjY5Ny0xLjkzMiwxNC42OTItMS45MzIsMTQuNjkyYzAsMS44NTQtMS41MTksMy4zNTYtMy4zNzMsMy4zNTZjLTAuMDEsMC0wLjAyLDAtMC4wMjksMGMtMC4wMDksMC0wLjAyLDAtMC4wMjksMA0KCQljLTEuODUzLDAtMy4zNzItMS41MDQtMy4zNzItMy4zNTZjMCwwLTEuNjg5LTEwLjk5NS0xLjkzMS0xNC42OTJDMTcuMjAyLDguNzI3LDE4LjYyLDUuMjksMjIuNjI2LDUuMjkNCgkJYzAuMDEsMCwwLjAyLDAuMDAxLDAuMDI5LDAuMDAxYzAuMDA5LDAsMC4wMTktMC4wMDEsMC4wMjktMC4wMDFDMjYuNjg5LDUuMjksMjguMTA5LDguNzI3LDI3Ljk4OCwxMC41Nzh6Ii8+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8L3N2Zz4NCg==)}.idvc-modal__close-btn{width:20px;height:20px;cursor:pointer;margin-left:auto}.idvc-modal__close-btn:hover{background-color:var(--el-color-primary)}.idvc-modal__header{display:flex;align-items:center;justify-content:center;width:100%}.idvc-modal__header__content{line-height:24px;font-size:20px;margin:0 0 0 8px;font-weight:500}.idvc-modal__header__content_qr-code{line-height:44px;font-size:30px;color:#303133}.idvc-modal__header.center{justify-content:center;padding:0}.idvc-modal__body{padding:20px 24px;font-size:16px;word-break:break-word;color:#1c1c1c}.idvc-modal__body__list{margin-left:0;padding-left:20px;text-align:justify;margin-top:0;margin-bottom:0}.idvc-modal__body__list--no-numbers{list-style-type:none;padding-left:0}.idvc-modal__body__list__item{margin-bottom:12px;line-height:22px}.idvc-modal__body__list__item:last-child{margin-bottom:0}.idvc-modal__body_qr-code{color:#000;text-align:left;min-height:360px;position:relative;width:100%}.idvc-modal__body_process_ready-header{font-weight:600;font-size:15px;margin:20px auto 5px}.idvc-modal__body_process_ready-text{display:inline-block;font-style:normal;font-weight:400;font-size:14px;line-height:19px;color:#5a5b62}.idvc-modal__body_process_ready__canvas-container{margin:10px auto}.idvc-modal__body_process_ready-canvas{display:block;margin:0 auto;padding:40px}.idvc-modal__body_process_ready-info{margin:20px auto;padding:8px 12px;border-radius:6px}.idvc-modal__body_process_ready-info__text{margin-left:8px}.idvc-modal__body_process_validating-info-text{display:block;white-space:nowrap}.idvc-modal__body_process_done-container{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:20px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.idvc-modal__body_process_done__text{text-align:center;font-style:normal;font-weight:600;font-size:40px;line-height:48px}.idvc-modal__footer{display:grid;grid-template-columns:1fr 1fr;gap:25px;width:100%}.idvc-modal__footer_qr-code{padding:0 20px 20px;position:absolute;bottom:0;right:0}.idvc-modal.center{justify-content:center}.idvc-consent-form{font-family:Inter,sans-serif;background:#fff;display:flex;flex-direction:column;max-width:480px;z-index:1010;width:100%;height:100%}.idvc-consent-form__header{padding:32px 40px;background:#f5f6f9;border-radius:4px 4px 0 0}.idvc-consent-form__header__content{font-size:30px;line-height:36px;font-weight:500;margin:0}.idvc-consent-form__body{display:flex;flex-direction:column;padding:20px 40px;font-size:16px!important;word-break:break-word;line-height:22px}.idvc-consent-form__body a{text-decoration-line:none}.idvc-consent-form__body a:visited{color:#00e}.idvc-consent-form__body .input-wrapper{display:flex;flex-direction:column;align-items:flex-start}.idvc-consent-form__body .input-wrapper label{color:#555e65;font-weight:500}.idvc-consent-form__body .input-wrapper input[type=text]{box-sizing:border-box;border-radius:6px;border:2px solid #dedfe1;height:40px;font-size:20px;margin-top:10px;width:100%}.idvc-consent-form__body .input-wrapper input[type=text]:focus{outline:none}.idvc-consent-form__body .checkbox-wrapper{display:flex;margin-top:20px;align-items:flex-start}.idvc-consent-form__body .checkbox-wrapper input[type=checkbox]{transform:scale(1.3);margin:7px 3px 3px -3px}.idvc-consent-form__body .checkbox-wrapper__text{margin-left:-20px;line-height:24px;padding-left:25px}.idvc-consent-form__body .checkbox-wrapper__star{margin-right:10px;align-self:flex-start}.idvc-consent-form__footer{display:flex;justify-content:flex-end;column-gap:25px;padding:0 40px 40px;margin-top:30px}.idvc-fixed{position:fixed}.color-red{color:red}.btn{line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #DCDFE6;color:#606266;-webkit-appearance:none;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;margin:0;-webkit-transition:.1s;transition:.1s;font-weight:500;padding:12px 20px;font-size:14px;border-radius:8px}.btn--default:focus,.btn--default:hover{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.btn--default:active{color:#3a8ee6;border-color:#3a8ee6;outline:0}.btn--primary{color:#fff;background-color:#5185f3;border-color:#5185f3}.btn--primary:focus,.btn--primary:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}.btn--primary:active{background:#3a8ee6;border-color:#3a8ee6;color:#fff;outline:0}.btn--info{color:#fff;background-color:#4e5d6e;border-color:#4e5d6e}.btn--disabled{color:#fff;background-color:#a0cfff;border-color:#a0cfff}.btn--disabled:hover{cursor:not-allowed;color:#fff;background-color:#a0cfff;border-color:#a0cfff}.qr-code-wrap{z-index:1000;margin:-10px auto 40px}.qr-code-wrap__button{background:#515d6c;border-radius:4px;width:100%;display:inline-block;white-space:nowrap;cursor:pointer;border:1px solid #515D6C;color:var(--color-white);-webkit-appearance:none;text-align:center;box-sizing:border-box;outline:none;margin:0;transition:.1s;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:18px 20px;font-style:normal;font-weight:500;font-size:14px;line-height:1.4}.qr-code-wrap__content{display:flex;justify-content:center;align-items:center;column-gap:13px}.qr-code-wrap__button:hover{background-color:#909399;border-color:#909399}.el-loading-spinner_qr-code{display:flex;align-items:center;flex-direction:column;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);row-gap:25px;padding:10px}.el-loading-spinner_qr-code .circular{height:100px;width:100px;stroke:#5185f3}.el-loading-spinner_qr-code .circular__background{animation:none;position:absolute}.el-loading-spinner_qr-code .circular .path{stroke-width:1}.el-loading-spinner_qr-code .circular .path__background{stroke:#c6c6c6;stroke-dasharray:none}#idvc-wrapper-container{position:relative}\n/*$vite$:1*/",document.head.appendChild(t);function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var n,o={exports:{}};n||(n=1,function(t){var e=function(t){var e,n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",c=r.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(T){d=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var r=e&&e.prototype instanceof v?e:v,s=Object.create(r.prototype),a=new D(o||[]);return i(s,"_invoke",{value:L(t,n,a)}),s}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(T){return{type:"throw",arg:T}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};d(w,s,(function(){return this}));var C=Object.getPrototypeOf,_=C&&C(C(N([])));_&&_!==n&&o.call(_,s)&&(w=_);var E=b.prototype=v.prototype=Object.create(w);function M(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(i,r,s,a){var c=u(t[i],t,r);if("throw"!==c.type){var d=c.arg,l=d.value;return l&&"object"==typeof l&&o.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(l).then((function(t){d.value=t,s(d)}),(function(t){return n("throw",t,s,a)}))}a(c.arg)}var r;i(this,"_invoke",{value:function(t,o){function i(){return new e((function(e,i){n(t,o,e,i)}))}return r=r?r.then(i,i):i()}})}function L(t,e,n){var o=h;return function(i,r){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw r;return k()}for(n.method=i,n.arg=r;;){var s=n.delegate;if(s){var a=A(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var c=u(t,e,n);if("normal"===c.type){if(o=n.done?g:p,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=g,n.method="throw",n.arg=c.arg)}}}function A(t,n){var o=n.method,i=t.iterator[o];if(i===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,A(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),m;var r=u(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,m;var s=r.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function N(t){if(t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return r.next=r}}return{next:k}}function k(){return{value:e,done:!0}}return y.prototype=b,i(E,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=d(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,d(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},M(x.prototype),d(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,o,i,r){void 0===r&&(r=Promise);var s=new x(l(e,n,o,i),r);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},M(E),d(E,c,"Generator"),d(E,s,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var o in e)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},t.values=N,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(o,i){return a.type="throw",a.arg=t,n.next=o,i&&(n.method="next",n.arg=e),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=o.call(s,"catchLoc"),d=o.call(s,"finallyLoc");if(c&&d){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=t,s.arg=e,r?(this.method="next",this.next=r.finallyLoc,m):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:N(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(o));const i=t=>!!t,r=t=>!!t.match(/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/),s=t=>t.toLowerCase().startsWith("pk_")&&r(t),a=t=>!!document.getElementById(t);class c extends Error{}class d extends c{constructor(t){super(t),this.message=`Configuration parameter error: ${t}`,this.name="ConfigError",this.header="Configuration Error!",this.content=t||""}}const l=[{type:"DL",steps:[{type:"front",name:"Document Front",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1},{type:"pdf",name:"Document Back",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1,enableFourCornerCapture:!1},{type:"face",name:"Face",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1}]},{type:"IC",steps:[{type:"front",name:"Document Front",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1},{type:"pdf",name:"Document Back",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1,enableFourCornerCapture:!0},{type:"face",name:"Face",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1}]},{type:"Passport",steps:[{type:"mrz",name:"Document Front",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1},{type:"face",name:"Face",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1}]},{type:"PassportCard",steps:[{type:"front",name:"Document Front",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1},{type:"mrz",name:"Document Back",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1},{type:"face",name:"Face",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1}]},{type:"GreenCard",steps:[{type:"front",name:"Document Front",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1},{type:"mrz",name:"Document Back",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1},{type:"face",name:"Face",mode:{uploader:!0,video:!0},autocaptureDelay:0,enableDesktopNotification:!1}]},{type:"EmploymentAuthorization",steps:[{type:"front",name:"Document Front",mode:{uploader:!0,video:!0}},{type:"mrz",name:"Document Back",mode:{uploader:!0,video:!0}},{type:"face",name:"Face",mode:{uploader:!0,video:!0}}]}],u=t=>{let e;const n=(o=t.documentTypes)?o.map((t=>({...t,steps:t.steps.filter((t=>!t.mode||Object.values(t.mode).some(Boolean)))}))).filter((t=>t.steps.length)).map((t=>({type:t.type,steps:t.steps}))):[];var o;const i=n.find((t=>"Passport"===t.type));if(i){const t={type:"mrz",name:"Passport MRZ",mode:{uploader:!0,video:!0}},e=i.steps.findIndex((t=>"front"===t.type));-1!==e&&i.steps.splice(e,1,t)}return e=0===n.length?l:n,e},h=t=>new URLSearchParams(window.location.search).get(t),p=({name:t,value:e,validationFunctions:n})=>{if(!n.reduce(((t,n)=>t&&n(e)),!0))throw new d(t)};class f{constructor(t){this.validate=()=>{(({demoMode:t,applicantId:e,domainId:n,domainApi:o,publicKey:c,el:d="videoCapturingEl"})=>{const l=[i,r];[t?null:{name:"applicantId",value:e,validationFunctions:l},{name:"domainId",value:n,validationFunctions:l},{name:"publicKey",value:c,validationFunctions:[i,s]},{name:"el",value:d,validationFunctions:[i,a]},{name:"domainApi should not be empty",value:o,validationFunctions:[i]}].filter(Boolean).forEach((t=>p(t)))})(this.wrapper)},this.wrapper={...t},t.getApplicantIdFromURL&&(this.wrapper.applicantId=h("requestId")||t.applicantId)}parseFromWeb(t){const e=JSON.parse(t?.jsonSettings);this.isAuth||this.faceOnly?this.libConfig=this.faceAuthorizationConfig(e):(e.documentTypes=u(e),this.libConfig=e),this.cssStyles=t?.cssStyles,this.cssVariables=t?.cssVariables}faceAuthorizationConfig(t){return t.isShowDocumentTypeSelect=!1,t.documentTypes=[{type:"DL",steps:[{type:"face",name:"Face",mode:{uploader:!0,video:!0}}]}],t}getFirstStepModeState(){const t=structuredClone(this.firstStepMode);return()=>t}get firstStepMode(){return this.libConfig?.documentTypes[0]?.steps[0]?.mode}set applicantId(t){(t=>{p({name:"applicantId",value:t,validationFunctions:[i,r]})})(t),this.wrapper.applicantId=t}get applicantId(){return this.wrapper.applicantId}get domainId(){return this.wrapper.domainId}get publicKey(){return this.wrapper.publicKey}get domainApi(){return this.wrapper.domainApi}get onValidate(){return this.wrapper?.callbacks?.onValidate?this.wrapper.callbacks.onValidate:()=>{}}get onError(){return this.wrapper?.callbacks?.onError?this.wrapper.callbacks.onError:()=>{}}set libConfig(t){const e=this.IDVCConfig?.licenseKey;this.wrapper.preferApiConfig?this.IDVCConfig={...this.IDVCConfig,...t,...this.wrapper.callbacks}:this.IDVCConfig={...this.IDVCConfig,...t,...this.wrapper,...this.wrapper.callbacks},e&&(this.IDVCConfig.licenseKey=e)}get libConfig(){return this.IDVCConfig||{}}get cssStylesConfig(){return this.cssStyles}get cssVariablesConfig(){return this.cssVariables}get mountElement(){return this.wrapper.el||"videoCapturingEl"}get demoMode(){return this.wrapper.demoMode||!1}get isAuth(){return this.wrapper.isAuth||!1}get faceOnly(){return this.wrapper.faceOnly||!1}get qrCodeLinkOrigin(){return this.wrapper.qrCodeLinkOrigin||"https://diveonline.idscan.net"}get IDVCDownloadVersion(){return t=this.wrapper.IDVCDownloadVersion||"",/^([1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.test(t)?this.wrapper.IDVCDownloadVersion:"latest";var t}}class g extends c{constructor(t){super(t),this.message="This application is closed",this.name="NotValidApplicant",this.header="Request Closed",this.content="This application is closed"}}class m extends c{constructor(t){if(super("ValidationError"),this.message=t.message||"Try again later",this.name="ValidationError",this.setHeader(t),this.content=t.message||"Try again later",t?.propertyErrors){const e=Object.values(t.propertyErrors).reduce(((t,e)=>`${t}<li class="idvc-modal__body__list__item">${e}</li>`),"");this.content=`<ol class="idvc-modal__body__list">${e}</ol>`}}setHeader({code:t=""}){t&&["ApiError","ValidationError","MultipleErrors","BadRequest"].includes(t)?this.header="Something Went Wrong!":this.header="Data invalid"}}class v extends c{constructor(t){super(t.status.toString());const{status:e}=t;let n;switch(e){case 400:n="Bad Request";break;case 401:n="Unauthorized";break;case 403:n="Forbidden";break;case 404:n="Not Found";break;case 500:n="Server Error";break;default:n="Something Went Wrong!"}this.message=`Status code: ${e}. ${n}`,this.name="HttpError",this.statusCode=e,this.header="Server Side Problems",this.content="Please try again later"}}class y extends c{constructor(t){super(t),this.message="This application is closed",this.name="RequestTimeoutError",this.header="Request Timeout",this.content="This application is closed"}}const b={validationResponseId:6223,validationRequestId:"8151f48d-bab1-4491-037d-08d9b3c5cfec",documentType:1,document:{abbr3Country:"USA",abbrCountry:"US",address:"25805 VAN LEUVEN ST 136",city:"LOMA LINDA",class:"C",country:"United States of America",dob:"1961-01-07",expires:"2024-01-07",eyes:"Brown",familyName:"GILMER",firstName:"DARIENNE",fullName:"DARIENNE ELIZABETH GILMER",gender:"Female",hair:"Black",height:"064 IN",id:"C3568758",idType:"DL",issued:"2019-01-07",middleName:"ELIZABETH",postalBox:null,privateName:"ELIZABETH",state:"CA",template:"09",weight:"77",zip:"92354-0000"},attemptsLeft:0,status:0,validationStatus:{expired:!1,documentIsValid:!0,faceIsValid:!0},invalidDataErrors:null,faceSuccess:null,documentSuccess:null,documentHasNotExpired:null,documentValidationTests:[{displayName:"DMV",name:"DMVValidation",status:0,statusString:"Failed",reason:"Internal Server Error"},{displayName:"IdentiFraud",name:"IdentiFraudValidation",status:-1,statusString:"Disabled",reason:"Integration was turned off"}]};class w extends c{constructor(t){if(super("FaceAuthorizationError"),this.message=t.message||"Try again later",this.name="FaceAuthorizationError",this.setHeader(t),this.content=t.message||"Try again later",t?.propertyErrors){const e=Object.values(t.propertyErrors).reduce(((t,e)=>`${t}<li class="idvc-modal__body__list__item">${e}</li>`),"");this.content=`<ol class="idvc-modal__body__list">${e}</ol>`}}setHeader({code:t=""}){t&&["ApiError","ValidationError","MultipleErrors","BadRequest"].includes(t)?this.header="Something Went Wrong!":this.header="Data invalid"}}var C=(t=>(t.DANGER="danger",t.SUCCESS="success",t.PRIMARY="primary",t))(C||{}),_=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.FAIL=1]="FAIL",t[t.INVALID_DATA=2]="INVALID_DATA",t[t.ERROR=3]="ERROR",t[t.COMPLETE=4]="COMPLETE",t))(_||{}),E=(t=>(t.READY="ready",t.VALIDATING="validating",t.DONE_WITH_SUCCESS="doneWithSuccess",t.DONE_WITH_ERROR="doneWithError",t))(E||{}),M=(t=>(t[t.NEVER_OPEN=0]="NEVER_OPEN",t[t.OPEN=1]="OPEN",t[t.CLOSED=2]="CLOSED",t[t.CLOSED_FOREVER=3]="CLOSED_FOREVER",t))(M||{}),x=(t=>(t[t.WebLibStandalone=0]="WebLibStandalone",t[t.WebLibDashboard=1]="WebLibDashboard",t[t.Android=2]="Android",t[t.Ios=3]="Ios",t))(x||{}),L=(t=>(t[t[""]=0]="",t[t["sent via SMS"]=1]="sent via SMS",t[t["sent via email"]=2]="sent via email",t[t["sent via SMS or email"]=3]="sent via SMS or email",t))(L||{}),A=(t=>(t[t.DL=1]="DL",t[t.Passport=2]="Passport",t[t.PassportCard=3]="PassportCard",t[t.CommonAccessCardOld=4]="CommonAccessCardOld",t[t.CommonAccessCard=5]="CommonAccessCard",t[t.GreenCard=6]="GreenCard",t[t.InternationalId=7]="InternationalId",t[t.VIN=8]="VIN",t[t.Barcode=11]="Barcode",t[t.FaceAuthorization=10]="FaceAuthorization",t[t.EmploymentAuthorization=9]="EmploymentAuthorization",t))(A||{}),I=(t=>(t[t.OK=200]="OK",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NoContent=204]="NoContent",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.Gone=410]="Gone",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.LengthRequired=411]="LengthRequired",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.RequestEntityTooLarge=413]="RequestEntityTooLarge",t[t.RequestURITooLong=414]="RequestURITooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATextDocument=423]="ImATextDocument",t[t.Locked=423]="Locked",t[t.MisdirectedRequest=421]="MisdirectedRequest",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HTTPVersionNotSupported=505]="HTTPVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.NetworkConnectTimeoutError=524]="NetworkConnectTimeoutError",t))(I||{});class S{constructor(t,e="https://api-dvsonline.idscan.net"){this.idvcManifestUrl="https://neurons.cdn.idscan.net/manifest.json",this.HEADERS={"Content-Type":"application/json"};const n=`${e}/api/v2/`;this.baseUrl=`${n}public/`,this.baseEmbeddedUrl=`${n}EmbeddedApp/`,this.HEADERS.Authorization=`Bearer ${t}`}async checkApplicantIdIsNotClosed({applicantId:t="",demoMode:e=!1,faceAuth:n=!1,faceOnly:o=!1}){if(e)return!0;const i=`${this.baseUrl}Applicants/${t}/Completed`,r=await fetch(i,{method:"GET",headers:this.HEADERS});if(r.ok&&!n)throw new g("request closed");if(r.ok&&n)return!0;if(I.NotFound===r.status&&n)throw new g("validation not completed");if(I.NotFound===r.status&&(!n||o))return!0;if(I.BadRequest===r.status){const t=await r.json();throw new m(t)}throw new v(r)}async getCurrentIdvcVersion(){try{const t=await fetch(this.idvcManifestUrl);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return(await t.json()).latestVersion}catch(t){throw console.error("Error fetching data:",t),t}}async getOptions(t){const e=`${this.baseUrl}Integrations/${t}/Configuration`;try{const t=await fetch(e,{method:"GET",headers:this.HEADERS});if(t.ok)return await t.json();throw new v(t)}catch(n){throw n instanceof v?n:new v(n)}}async validateApplicant(t,e=!1,n=!1){if(e)return b;const o=`${this.baseUrl}Validation`,i=await fetch(o,{method:"POST",headers:this.HEADERS,body:JSON.stringify(t)});if(i.ok)return i.json();if(I.BadRequest===i.status){const t=await i.json();if(n)throw new w(t);throw new m(t)}if(I.NotFound===i.status){const t=await i.json();throw new w(t)}throw new v(i)}async forceClose(t){const e=`${this.baseUrl}Applicants/${t}/Complete`,n=await fetch(e,{method:"POST",headers:this.HEADERS});if(n.ok)return n.json();if(I.BadRequest===n.status){const t=await n.json();throw new m(t)}throw new v(n)}async closeEmbeddedApplication(t,e){let n;try{const o=`${this.baseEmbeddedUrl}Close/${t}`;if(n=await fetch(o,{method:"POST",headers:this.HEADERS}),!n.ok)throw new Error(`Request Error: ${n.status}`);e()}catch(o){throw o instanceof v?o:new v(n)}}async longPollingRequest(t,e,n){try{const o=`${this.baseEmbeddedUrl}${t}`,i=await fetch(o,e);if(I.RequestTimeout===i.status||I.NetworkConnectTimeoutError===i.status)throw new y("Request Timeout");if(!i.ok)throw new Error(`Request Error: ${i.status}`);n(await i.json())}catch(o){o instanceof y&&await this.longPollingRequest(t,e,n)}}}const D={back:[A.DL,A.InternationalId],mrz:[A.PassportCard,A.GreenCard,A.Passport,A.EmploymentAuthorization],pdf:[A.DL,A.InternationalId]},N=(t,e)=>{const n=e.find((t=>Object.keys(D).includes(t.type)));if(!n)return!1;const o=D[n.type]?.includes(t);return o??!1},k=(t,e)=>{const n=!!e.find((t=>"mrz"===t.type));if(t===A.Passport&&n)return!0;return!!e.find((t=>"front"===t.type))};class T{constructor(){this.cleanBase64=t=>{if(!t||"string"!=typeof t)return"";const e=t.split(/:image\/\w+;base64,/);return e.length?e[e.length-1]:""},this.validationModel=t=>{const e=t.documentType===A.Passport,n=(()=>{const n=t.steps.find((t=>"pdf"===t.type||"mrz"===t.type||"back"===t.type)),o=n?.mrzText||n?.trackString||"";return e?{img:"",trackString:o}:{img:n?.img||"",trackString:o}})();return{frontImageBase64:this.cleanBase64((()=>{if(e){const e=t.steps.find((t=>"mrz"===t.type));if(e)return e.img}return t.steps.find((t=>"front"===t.type))?.img})()),backOrSecondImageBase64:this.cleanBase64(n?.img),faceImageBase64:this.cleanBase64(t.steps.find((t=>"face"===t.type))?.img),trackString:n.trackString,ssn:"",verifyFace:!!t.steps.find((t=>"face"===t.type)),documentType:t.documentType,captureMethod:t.steps.reduce(((t,e)=>`${t}${+e.isAuto}`),""),userAgent:window.navigator.userAgent,frontEndMetadata:t.metaData,isBackOrSecondImageProcessingEnabled:N(t.documentType,t.steps),isOcrEnabled:k(t.documentType,t.steps)}}}async initializeLibrary(t,e,n){this.library||(t?await this.loadFromCDN(e):this.loadFromNodeModules(n),this.postInitialize())}loadFromNodeModules(t){this.library=new t(this.IdvcConfig)}async loadFromCDN(t){return new Promise(((e,n)=>{const o=document.createElement("script");o.src=`https://neurons.cdn.idscan.net/${t}-next/idvc.js`,o.async=!0,o.onload=()=>e(window.IDVC),o.onerror=n,document.body.appendChild(o)})).then((t=>{this.library=new t(this.IdvcConfig)})).catch((t=>{console.log(t)}))}get initialized(){return!!this.library}get version(){return this.library.version}set configs({IdvcConfig:t,CSSStylesConfig:e,CSSVariablesConfig:n}){this.IdvcConfig=t,this.CSSStylesConfig=e,this.CSSVariablesConfig=n}set loading(t){this.library&&this.library.showSpinner(t)}postInitialize(){document.head.insertAdjacentHTML("beforeend",`\n <style id="onboarding-css-variables">${this.CSSVariablesConfig?this.CSSVariablesConfig:""}</style>\n <style id="onboarding-css-config">${this.CSSStylesConfig?this.CSSStylesConfig:""}</style>\n `)}reloadComponent(t){this.library.reloadComponent(t)}updateDocumentTypes(t){this.library.updateDocumentTypes(t)}restart(){this.library.resetAllSteps()}showLoader(t,e,n){this.library.showLoader(t,e,n)}mixSubmit(t,e){const n=this.IdvcConfig[t];this.IdvcConfig[t]=t=>{if(n){Promise.resolve(n(t)).then((()=>{e(this.validationModel(t))})).catch((()=>{e(this.validationModel(t))}))}else e(this.validationModel(t))}}}class R{constructor(t){this._closable=!0,this.mountEl="string"==typeof t?document.getElementById(t):t,this.init()}init(t='<div class="idvc-modal d-none" id="idvc-modal">\n <div class="idvc-modal__close-btn" id="idvc-close-modal-btn"></div>\n <div class="idvc-modal__header">\n <h2 class="idvc-modal__header__content"></h2>\n </div>\n <div class="idvc-modal__body"></div>\n <div class="idvc-modal__footer"></div>\n</div>\n<div class="idvc-modal-background" id="idvc-modal-background">\n <div class="el-loading-spinner" id="idvc-loading-spinner">\n <svg viewBox="25 25 50 50" class="circular">\n <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>\n </svg>\n </div>\n</div>\n'){this.modalContainer=document.createElement("div"),this.mountEl.append(this.modalContainer),this.modalContainer.insertAdjacentHTML("beforeend",t),this.container=this.modalContainer.querySelector("#idvc-modal"),this.headerContainer=this.container.querySelector(".idvc-modal__header"),this.headerText=this.headerContainer.querySelector(".idvc-modal__header__content"),this.background=this.modalContainer.querySelector("#idvc-modal-background"),this.spinner=this.modalContainer.querySelector("#idvc-loading-spinner"),this.closeBtn=this.modalContainer.querySelector("#idvc-close-modal-btn"),this.mountEl.classList.add("pos-relative"),this.body=this.container.querySelector(".idvc-modal__body"),this.footer=this.container.querySelector(".idvc-modal__footer"),this.closeHandler(),this.background.classList.add("idvc-preload-element")}set closable(t){this._closable=t,this.toggleCloseBtn()}set header(t){t?(this.headerText.textContent=t.toString(),this.headerContainer.classList.remove("d-none")):this.headerContainer.classList.add("d-none")}set showBackground(t){t?this.background.classList.remove("d-none"):this.background.classList.add("d-none")}set content(t){t?(this.body.innerHTML=t.toString(),this.body.classList.remove("d-none")):this.body.classList.add("d-none")}toggleCloseBtn(){this._closable?this.closeBtn.classList.remove("d-none"):this.closeBtn.classList.add("d-none")}closeHandler(){this.background.addEventListener("click",(t=>{const e=t.target;this._closable&&e.classList.contains("idvc-modal-background")&&this.hide()})),this.closeBtn.addEventListener("click",(()=>{this.hide()}))}hideSpinner(){this.hide(),this.spinner.classList.add("d-none")}hide(){this.showBackground=!1,this.container.classList.add("d-none"),this.background.classList.remove("idvc-preload-element")}show(){this.modalContainer.querySelector(".circular").classList.add("d-none"),this.showBackground=!0,this.container.classList.remove("d-none")}showSpinner(t){t?this.spinner.classList.remove("d-none"):this.spinner.classList.add("d-none")}prepareBackgroundStyles(){this.background.classList.add("idvc-after-submit"),this.mountEl.classList.add("pos-relative")}}class B extends R{init(t='<div class="idvc-modal-background" id="idvc-modal-background">\n <div class="el-loading-spinner" id="idvc-loading-spinner">\n <svg viewBox="25 25 50 50" class="circular">\n <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>\n </svg>\n </div>\n</div>\n<div class="idvc-modal idvc-modal_validation d-none" id="idvc-modal">\n <div class="idvc-modal__header">\n <svg width="20" height="20" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M8 1C9.97933 1.052 11.6278 1.73683 12.9455 3.0545C14.2632 4.37217 14.948 6.02067 15 8C14.948 9.97933 14.2632 11.6278 12.9455 12.9455C11.6278 14.2632 9.97933 14.948 8 15C6.02067 14.948 4.37217 14.2632 3.0545 12.9455C1.73683 11.6278 1.052 9.97933 1 8C1.052 6.02067 1.73683 4.37217 3.0545 3.0545C4.37217 1.73683 6.02067 1.052 8 1ZM8 4C7.729 4 7.505 4.099 7.328 4.297C7.151 4.495 7.07283 4.72933 7.0935 5L7.453 9C7.474 9.146 7.53383 9.26317 7.6325 9.3515C7.73117 9.43983 7.8535 9.48417 7.9995 9.4845C8.1455 9.48483 8.26783 9.4405 8.3665 9.3515C8.46517 9.2625 8.525 9.14533 8.546 9L8.9055 5C8.9265 4.729 8.84833 4.49467 8.671 4.297C8.49367 4.09933 8.27067 4.00033 8 4ZM8 12C8.22933 11.9897 8.4195 11.9115 8.5705 11.7655C8.7215 11.6195 8.797 11.432 8.797 11.203C8.797 10.974 8.7215 10.7838 8.5705 10.6325C8.4195 10.4812 8.22933 10.4057 8 10.406C7.77067 10.4063 7.5805 10.4818 7.4295 10.6325C7.2785 10.7832 7.203 10.9733 7.203 11.203C7.203 11.4327 7.2785 11.6202 7.4295 11.7655C7.5805 11.9108 7.77067 11.989 8 12Z" fill="#1C1C1C"/>\n </svg>\n <h2 class="idvc-modal__header__content">\n Header\n </h2>\n <div class="idvc-modal__close-btn" id="idvc-close-modal-btn">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path></svg>\n </div>\n </div>\n <div class="idvc-modal__body">\n Please try again\n </div>\n <div class="idvc-modal__footer">\n <button type="button" class="btn btn--primary" id="idvc-modal-try-again-btn"><span>Try again</span></button>\n <button type="button" class="btn btn--default" id="idvc-modal-complete-btn"><span>Complete </span></button>\n </div>\n</div>\n'){super.init(t),this.headerSign=this.headerContainer.querySelector("path"),this.tryAgainBtn=this.container.querySelector("#idvc-modal-try-again-btn"),this.completeBtn=this.container.querySelector("#idvc-modal-complete-btn"),this.addTryAgainHandler(),this.addCompleteHandler()}set type(t){t===C.SUCCESS&&this.applySuccessValidationStyles(),this.headerSign.setAttribute("class",`color-${t}`)}set buttons({tryAgain:t=!1,complete:e=!1}){const n=100/(+t+ +e),o=Number.isFinite(n)?n:0,i=`w-${50===o?45:o}`;this.setBtnVisible("tryAgain",t),this.setBtnVisible("complete",e),t||e?(this.footer.classList.remove("d-none"),this.footer.classList.add("d-flex")):(this.footer.classList.add("d-none"),this.footer.classList.remove("d-flex")),[this.tryAgainBtn,this.completeBtn].forEach((t=>{Array.from(t.classList).forEach((e=>{e.startsWith("w-")&&t.classList.remove(e)})),t.classList.add(i)}))}applySuccessValidationStyles(){this.container.classList.add("center"),this.headerContainer.classList.add("center")}setBtnVisible(t,e){const n="tryAgain"===t?this.tryAgainBtn:this.completeBtn;e?n.classList.remove("d-none"):n.classList.add("d-none")}addTryAgainHandler(){this.tryAgainBtn.onclick=()=>this.hide()}addCompleteHandler(t=()=>{}){this.completeBtn.onclick=()=>{this.hide(),t()}}}class P{constructor({mountElementID:t,consentBodyText:e,consentCheckboxText:n}){this.target={inputState:"",checkboxState:!1};document.getElementById(t).insertAdjacentHTML("afterbegin",'<div class="idvc-consent-form" id="idvc-consent-form">\n <div class="idvc-consent-form__header">\n <h2 class="idvc-consent-form__header__content">\n Consent Agreement\n </h2>\n </div>\n <div class="idvc-consent-form__body" id="idvc-consent-form-body">\n <p id="idvc-consent-form-text">\n </p>\n <div class="input-wrapper">\n <label for="idvc-full-name-input">\n <span>\n <sup class="color-red">*</sup>\n Full Name\n </span>\n </label>\n <input\n type="text"\n name="fullName"\n id="idvc-full-name-input"\n >\n </div>\n <div class="checkbox-wrapper">\n <label class="checkbox-wrapper__star" for="idvc-consent">\n <span>\n <sup class="color-red">*</sup>\n </span>\n </label>\n <input type="checkbox" id="idvc-consent">\n <span class="checkbox-wrapper__text" id="checkbox-wrapper__text"></span>\n </div>\n </div>\n <div class="idvc-consent-form__footer">\n <button type="button" class="btn btn--info" id="idvc-consent-form-cancel-btn">\n <span>Cancel</span>\n </button>\n <button type="button" class="btn btn--primary btn--disabled" id="idvc-consent-form-proceed-btn">\n <span>Proceed</span>\n </button>\n </div>\n</div>\n\n');document.getElementById("idvc-consent-form-text").innerHTML=e;document.getElementById("checkbox-wrapper__text").innerHTML=n,this.init()}init(){this.el=document.getElementById("idvc-consent-form"),this.proceedBtn=document.getElementById("idvc-consent-form-proceed-btn"),this.cancelBtn=document.getElementById("idvc-consent-form-cancel-btn"),this.inputEl=document.getElementById("idvc-full-name-input"),this.checkboxEl=document.getElementById("idvc-consent");const t=this,e={set:(e,n,o,i)=>(Reflect.set(e,n,o,i),t.isValidInput()&&t.target.checkboxState?(t.proceedBtn.disabled=!1,t.proceedBtn.classList.remove("btn--disabled")):(t.proceedBtn.disabled=!0,t.proceedBtn.classList.add("btn--disabled")),!0),get:(t,e)=>t[e]};this.state=new Proxy(this.target,e),this.proceedBtn.disabled=!0,this.proceedBtn.addEventListener("click",(()=>{const t=new Event("proceedEvent",{bubbles:!0});this.el.remove(),this.proceedBtn.dispatchEvent(t)}),{once:!0}),this.cancelBtn.addEventListener("click",(()=>{this.inputEl.value="",this.checkboxEl.checked=!1})),this.inputEl.addEventListener("input",(t=>{const e=t.target;this.state.inputState=e.value})),this.checkboxEl.addEventListener("click",(t=>{const e=t.target;this.state.checkboxState=e.checked}))}get form(){return this.el}isValidInput(){return this.state.inputState.trim().length>=3&&this.state.inputState.trim().length<100}}class z{constructor(t,e){this.statuses={[_.SUCCESS]:"Verification complete!",[_.FAIL]:"Validation failed!",[_.INVALID_DATA]:"Data invalid!",[_.ERROR]:"Something went wrong",4:"Request closed"},this.result={type:C.PRIMARY,header:"",content:"",buttons:{tryAgain:!1,complete:!1}},this.modal=e,this.parseResponse(t)}parseResponse(t){const{code:e="",message:n="",status:o=-1,attemptsLeft:i=-1,attemptsCount:r=-1,invalidDataErrors:s=[],notificationType:a=0}=t;this.code=e,this.message=n,this.status=o,this.attemptsLeft=i,this.attemptsCount=r,this.invalidDataErrors=s||[],this.notificationType=a}calculateType(){let t;t=this.status===_.SUCCESS?C.SUCCESS:this.status===_.ERROR?C.PRIMARY:C.DANGER,this.result.type=t}calculateHeader(){this.result.header=this.statuses[this.status]||this.statuses[3]}calculateContent(){if((this.status===_.FAIL&&this.attemptsLeft>0||this.status===_.ERROR)&&(this.result.content="Please try again"),this.status===_.INVALID_DATA){const t="Image may be blurry. Please try taking photo again in a different room or with different lighting.",e=this.invalidDataErrors.reduce(((e,{code:n,message:o})=>`${e}<li class="idvc-modal__body__list__item">${"OCRError"===n?t:o}</li>`),""),n=1===this.invalidDataErrors.length?"idvc-modal__body__list--no-numbers":"";this.result.content=`<ol class="idvc-modal__body__list ${n}">${e}</ol>`}this.status===_.FAIL&&0===this.attemptsLeft&&this.attemptsCount>0&&(this.result.content=`No more attempts can be made.<br>You have made all ${this.attemptsCount}<br>of the allowed submissions.<br>Please have a new request link<br>${L[this.notificationType]}`),this.code&&this.message&&(this.result.content=this.message)}calculateFooter(){const t=this.status!==_.SUCCESS&&this.attemptsLeft>0;if(4===this.status)return this.result.buttons.tryAgain=!1,void(this.result.buttons.complete=!1);t&&(this.result.buttons.tryAgain=!0,this.result.buttons.complete=!0),[_.FAIL,_.INVALID_DATA].includes(this.status)&&(this.result.buttons.tryAgain=!0)}prepareModal(){this.calculateType(),this.calculateHeader(),this.calculateContent(),this.calculateFooter()}showModal(){this.modal.type=this.result.type,this.modal.header=this.result.header,this.modal.content=this.result.content,this.modal.buttons=this.result.buttons,this.modal.prepareBackgroundStyles(),this.modal.show()}hideModal(){this.modal.hide()}}var V,j,q={};var O,F={},H={};function U(){if(O)return H;let t;O=1;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return H.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},H.getSymbolTotalCodewords=function(t){return e[t]},H.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},H.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},H.isKanjiModeEnabled=function(){return void 0!==t},H.toSJIS=function(e){return t(e)},H}var Q,$,Y,Z,G,K={};function W(){return Q||(Q=1,(t=K).L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(o){return n}}),K;var t}var J,X={};var tt,et={};var nt,ot={};var it,rt={};function st(){if(it)return rt;it=1;const t=W(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return rt.getBlocksCount=function(n,o){switch(o){case t.L:return e[4*(n-1)+0];case t.M:return e[4*(n-1)+1];case t.Q:return e[4*(n-1)+2];case t.H:return e[4*(n-1)+3];default:return}},rt.getTotalCodewordsCount=function(e,o){switch(o){case t.L:return n[4*(e-1)+0];case t.M:return n[4*(e-1)+1];case t.Q:return n[4*(e-1)+2];case t.H:return n[4*(e-1)+3];default:return}},rt}var at,ct,dt,lt,ut={},ht={};function pt(){return ct||(ct=1,function(t){const e=function(){if(at)return ht;at=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let n=1;for(let o=0;o<255;o++)t[o]=n,e[n]=o,n<<=1,256&n&&(n^=285);for(let e=255;e<512;e++)t[e]=t[e-255]}(),ht.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},ht.exp=function(e){return t[e]},ht.mul=function(n,o){return 0===n||0===o?0:t[e[n]+e[o]]},ht}();t.mul=function(t,n){const o=new Uint8Array(t.length+n.length-1);for(let i=0;i<t.length;i++)for(let r=0;r<n.length;r++)o[i+r]^=e.mul(t[i],n[r]);return o},t.mod=function(t,n){let o=new Uint8Array(t);for(;o.length-n.length>=0;){const t=o[0];for(let r=0;r<n.length;r++)o[r]^=e.mul(n[r],t);let i=0;for(;i<o.length&&0===o[i];)i++;o=o.slice(i)}return o},t.generateECPolynomial=function(n){let o=new Uint8Array([1]);for(let i=0;i<n;i++)o=t.mul(o,new Uint8Array([1,e.exp(i)]));return o}}(ut)),ut}var ft,gt={},mt={},vt={};function yt(){return ft||(ft=1,vt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),vt}var bt,wt,Ct,_t={};function Et(){if(bt)return _t;bt=1;const t="[0-9]+";let e="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";e=e.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+e+")(?:.|[\r\n]))+";_t.KANJI=new RegExp(e,"g"),_t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),_t.BYTE=new RegExp(n,"g"),_t.NUMERIC=new RegExp(t,"g"),_t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+e+"$"),i=new RegExp("^"+t+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return _t.testKanji=function(t){return o.test(t)},_t.testNumeric=function(t){return i.test(t)},_t.testAlphanumeric=function(t){return r.test(t)},_t}function Mt(){return wt||(wt=1,function(t){const e=yt(),n=Et();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(t,n){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?t.ccBits[0]:n<27?t.ccBits[1]:t.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},t.isValid=function(t){return t&&t.bit&&t.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(o){return n}}}(mt)),mt}function xt(){return Ct||(Ct=1,function(t){const e=U(),n=st(),o=W(),i=Mt(),r=yt(),s=e.getBCHDigit(7973);function a(t,e){return i.getCharCountIndicator(t,e)+4}function c(t,e){let n=0;return t.forEach((function(t){const o=a(t.mode,e);n+=o+t.getBitsLength()})),n}t.from=function(t,e){return r.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,o,s){if(!r.isValid(t))throw new Error("Invalid QR Code version");void 0===s&&(s=i.BYTE);const c=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,o));if(s===i.MIXED)return c;const d=c-a(s,t);switch(s){case i.NUMERIC:return Math.floor(d/10*3);case i.ALPHANUMERIC:return Math.floor(d/11*2);case i.KANJI:return Math.floor(d/13);case i.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(e,n){let r;const s=o.from(n,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let o=1;o<=40;o++)if(c(e,o)<=t.getCapacity(o,n,i.MIXED))return o}(e,s);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,o){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,o,e))return i}(r.mode,r.getLength(),s)},t.getEncodedBits=function(t){if(!r.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-s>=0;)n^=7973<<e.getBCHDigit(n)-s;return t<<12|n}}(gt)),gt}var Lt,At={};var It,St,Dt,Nt,kt,Tt,Rt,Bt,Pt,zt,Vt={};function jt(){if(Bt)return Rt;Bt=1;const t=Tt?kt:(Tt=1,kt=function(t){for(var e=[],n=t.length,o=0;o<n;o++){var i=t.charCodeAt(o);if(i>=55296&&i<=56319&&n>o+1){var r=t.charCodeAt(o+1);r>=56320&&r<=57343&&(i=1024*(i-55296)+r-56320+65536,o+=1)}i<128?e.push(i):i<2048?(e.push(i>>6|192),e.push(63&i|128)):i<55296||i>=57344&&i<65536?(e.push(i>>12|224),e.push(i>>6&63|128),e.push(63&i|128)):i>=65536&&i<=1114111?(e.push(i>>18|240),e.push(i>>12&63|128),e.push(i>>6&63|128),e.push(63&i|128)):e.push(239,191,189)}return new Uint8Array(e).buffer}),e=Mt();function n(n){this.mode=e.BYTE,"string"==typeof n&&(n=t(n)),this.data=new Uint8Array(n)}return n.getBitsLength=function(t){return 8*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},Rt=n}var qt,Ot,Ft,Ht={exports:{}};function Ut(){return Ot||(Ot=1,function(t){const e=Mt(),n=function(){if(St)return It;St=1;const t=Mt();function e(e){this.mode=t.NUMERIC,this.data=e.toString()}return e.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){let e,n,o;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),o=parseInt(n,10),t.put(o,10);const i=this.data.length-e;i>0&&(n=this.data.substr(e),o=parseInt(n,10),t.put(o,3*i+1))},It=e}(),o=function(){if(Nt)return Dt;Nt=1;const t=Mt(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(e){this.mode=t.ALPHANUMERIC,this.data=e}return n.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let o=45*e.indexOf(this.data[n]);o+=e.indexOf(this.data[n+1]),t.put(o,11)}this.data.length%2&&t.put(e.indexOf(this.data[n]),6)},Dt=n}(),i=jt(),r=function(){if(zt)return Pt;zt=1;const t=Mt(),e=U();function n(e){this.mode=t.KANJI,this.data=e}return n.getBitsLength=function(t){return 13*t},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(t){let n;for(n=0;n<this.data.length;n++){let o=e.toSJIS(this.data[n]);if(o>=33088&&o<=40956)o-=33088;else{if(!(o>=57408&&o<=60351))throw new Error("Invalid SJIS character: "+this.data[n]+"\nMake sure your charset is UTF-8");o-=49472}o=192*(o>>>8&255)+(255&o),t.put(o,13)}},Pt=n}(),s=Et(),a=U(),c=function(){return qt||(qt=1,t={single_source_shortest_paths:function(e,n,o){var i={},r={};r[n]=0;var s,a,c,d,l,u,h,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(c in a=(s=p.pop()).value,d=s.cost,l=e[a]||{})l.hasOwnProperty(c)&&(u=d+l[c],h=r[c],(void 0===r[c]||h>u)&&(r[c]=u,p.push(c,u),i[c]=a));if(void 0!==o&&void 0===r[o]){var f=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(f)}return i},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],o=e;o;)n.push(o),t[o],o=t[o];return n.reverse(),n},find_path:function(e,n,o){var i=t.single_source_shortest_paths(e,n,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(e){var n,o=t.PriorityQueue,i={};for(n in e=e||{},o)o.hasOwnProperty(n)&&(i[n]=o[n]);return i.queue=[],i.sorter=e.sorter||o.default_sorter,i},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}},Ht.exports=t),Ht.exports;var t}();function d(t){return unescape(encodeURIComponent(t)).length}function l(t,e,n){const o=[];let i;for(;null!==(i=t.exec(n));)o.push({data:i[0],index:i.index,mode:e,length:i[0].length});return o}function u(t){const n=l(s.NUMERIC,e.NUMERIC,t),o=l(s.ALPHANUMERIC,e.ALPHANUMERIC,t);let i,r;a.isKanjiModeEnabled()?(i=l(s.BYTE,e.BYTE,t),r=l(s.KANJI,e.KANJI,t)):(i=l(s.BYTE_KANJI,e.BYTE,t),r=[]);return n.concat(o,i,r).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function h(t,s){switch(s){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return o.getBitsLength(t);case e.KANJI:return r.getBitsLength(t);case e.BYTE:return i.getBitsLength(t)}}function p(t,s){let c;const d=e.getBestModeForData(t);if(c=e.from(s,d),c!==e.BYTE&&c.bit<d.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(c)+".\n Suggested mode is: "+e.toString(d));switch(c!==e.KANJI||a.isKanjiModeEnabled()||(c=e.BYTE),c){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new o(t);case e.KANJI:return new r(t);case e.BYTE:return new i(t)}}t.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(p(e,null)):e.data&&t.push(p(e.data,e.mode)),t}),[])},t.fromString=function(n,o){const i=function(t){const n=[];for(let o=0;o<t.length;o++){const i=t[o];switch(i.mode){case e.NUMERIC:n.push([i,{data:i.data,mode:e.ALPHANUMERIC,length:i.length},{data:i.data,mode:e.BYTE,length:i.length}]);break;case e.ALPHANUMERIC:n.push([i,{data:i.data,mode:e.BYTE,length:i.length}]);break;case e.KANJI:n.push([i,{data:i.data,mode:e.BYTE,length:d(i.data)}]);break;case e.BYTE:n.push([{data:i.data,mode:e.BYTE,length:d(i.data)}])}}return n}(u(n,a.isKanjiModeEnabled())),r=function(t,n){const o={},i={start:{}};let r=["start"];for(let s=0;s<t.length;s++){const a=t[s],c=[];for(let t=0;t<a.length;t++){const d=a[t],l=""+s+t;c.push(l),o[l]={node:d,lastCount:0},i[l]={};for(let t=0;t<r.length;t++){const s=r[t];o[s]&&o[s].node.mode===d.mode?(i[s][l]=h(o[s].lastCount+d.length,d.mode)-h(o[s].lastCount,d.mode),o[s].lastCount+=d.length):(o[s]&&(o[s].lastCount=d.length),i[s][l]=h(d.length,d.mode)+4+e.getCharCountIndicator(d.mode,n))}}r=c}for(let e=0;e<r.length;e++)i[r[e]].end=0;return{map:i,table:o}}(i,o),s=c.find_path(r.map,"start","end"),l=[];for(let t=1;t<s.length-1;t++)l.push(r.table[s[t]].node);return t.fromArray(function(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(l))},t.rawSplit=function(e){return t.fromArray(u(e,a.isKanjiModeEnabled()))}}(Vt)),Vt}function Qt(){if(Ft)return F;Ft=1;const t=U(),e=W(),n=function(){if(Y)return $;function t(){this.buffer=[],this.length=0}return Y=1,t.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},$=t}(),o=function(){if(G)return Z;function t(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return G=1,t.prototype.set=function(t,e,n,o){const i=t*this.size+e;this.data[i]=n,o&&(this.reservedBit[i]=!0)},t.prototype.get=function(t,e){return this.data[t*this.size+e]},t.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},t.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},Z=t}(),i=(J||(J=1,function(t){const e=U().getSymbolSize;t.getRowColCoords=function(t){if(1===t)return[];const n=Math.floor(t/7)+2,o=e(t),i=145===o?26:2*Math.ceil((o-13)/(2*n-2)),r=[o-7];for(let e=1;e<n-1;e++)r[e]=r[e-1]-i;return r.push(6),r.reverse()},t.getPositions=function(e){const n=[],o=t.getRowColCoords(e),i=o.length;for(let t=0;t<i;t++)for(let e=0;e<i;e++)0===t&&0===e||0===t&&e===i-1||t===i-1&&0===e||n.push([o[t],o[e]]);return n}}(X)),X),r=function(){if(tt)return et;tt=1;const t=U().getSymbolSize;return et.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},et}(),s=(nt||(nt=1,function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e=3,n=3,o=40,i=10;function r(e,n,o){switch(e){case t.Patterns.PATTERN000:return(n+o)%2==0;case t.Patterns.PATTERN001:return n%2==0;case t.Patterns.PATTERN010:return o%3==0;case t.Patterns.PATTERN011:return(n+o)%3==0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2==0;case t.Patterns.PATTERN101:return n*o%2+n*o%3==0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2==0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(t){const n=t.size;let o=0,i=0,r=0,s=null,a=null;for(let c=0;c<n;c++){i=r=0,s=a=null;for(let d=0;d<n;d++){let n=t.get(c,d);n===s?i++:(i>=5&&(o+=e+(i-5)),s=n,i=1),n=t.get(d,c),n===a?r++:(r>=5&&(o+=e+(r-5)),a=n,r=1)}i>=5&&(o+=e+(i-5)),r>=5&&(o+=e+(r-5))}return o},t.getPenaltyN2=function(t){const e=t.size;let o=0;for(let n=0;n<e-1;n++)for(let i=0;i<e-1;i++){const e=t.get(n,i)+t.get(n,i+1)+t.get(n+1,i)+t.get(n+1,i+1);4!==e&&0!==e||o++}return o*n},t.getPenaltyN3=function(t){const e=t.size;let n=0,i=0,r=0;for(let o=0;o<e;o++){i=r=0;for(let s=0;s<e;s++)i=i<<1&2047|t.get(o,s),s>=10&&(1488===i||93===i)&&n++,r=r<<1&2047|t.get(s,o),s>=10&&(1488===r||93===r)&&n++}return n*o},t.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let o=0;o<n;o++)e+=t.data[o];return Math.abs(Math.ceil(100*e/n/5)-10)*i},t.applyMask=function(t,e){const n=e.size;for(let o=0;o<n;o++)for(let i=0;i<n;i++)e.isReserved(i,o)||e.xor(i,o,r(t,i,o))},t.getBestMask=function(e,n){const o=Object.keys(t.Patterns).length;let i=0,r=1/0;for(let s=0;s<o;s++){n(s),t.applyMask(s,e);const o=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),o<r&&(r=o,i=s)}return i}}(ot)),ot),a=st(),c=function(){if(lt)return dt;lt=1;const t=pt();function e(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(e){this.degree=e,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const n=new Uint8Array(e.length+this.degree);n.set(e);const o=t.mod(n,this.genPoly),i=this.degree-o.length;if(i>0){const t=new Uint8Array(this.degree);return t.set(o,i),t}return o},dt=e}(),d=xt(),l=function(){if(Lt)return At;Lt=1;const t=U(),e=t.getBCHDigit(1335);return At.getEncodedBits=function(n,o){const i=n.bit<<3|o;let r=i<<10;for(;t.getBCHDigit(r)-e>=0;)r^=1335<<t.getBCHDigit(r)-e;return 21522^(i<<10|r)},At}(),u=Mt(),h=Ut();function p(t,e,n){const o=t.size,i=l.getEncodedBits(e,n);let r,s;for(r=0;r<15;r++)s=1==(i>>r&1),r<6?t.set(r,8,s,!0):r<8?t.set(r+1,8,s,!0):t.set(o-15+r,8,s,!0),r<8?t.set(8,o-r-1,s,!0):r<9?t.set(8,15-r-1+1,s,!0):t.set(8,15-r-1,s,!0);t.set(o-8,8,1,!0)}function f(e,o,i){const r=new n;i.forEach((function(t){r.put(t.mode.bit,4),r.put(t.getLength(),u.getCharCountIndicator(t.mode,e)),t.write(r)}));const s=8*(t.getSymbolTotalCodewords(e)-a.getTotalCodewordsCount(e,o));for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const d=(s-r.getLengthInBits())/8;for(let t=0;t<d;t++)r.put(t%2?17:236,8);return function(e,n,o){const i=t.getSymbolTotalCodewords(n),r=a.getTotalCodewordsCount(n,o),s=i-r,d=a.getBlocksCount(n,o),l=i%d,u=d-l,h=Math.floor(i/d),p=Math.floor(s/d),f=p+1,g=h-p,m=new c(g);let v=0;const y=new Array(d),b=new Array(d);let w=0;const C=new Uint8Array(e.buffer);for(let t=0;t<d;t++){const e=t<u?p:f;y[t]=C.slice(v,v+e),b[t]=m.encode(y[t]),v+=e,w=Math.max(w,e)}const _=new Uint8Array(i);let E,M,x=0;for(E=0;E<w;E++)for(M=0;M<d;M++)E<y[M].length&&(_[x++]=y[M][E]);for(E=0;E<g;E++)for(M=0;M<d;M++)_[x++]=b[M][E];return _}(r,e,o)}function g(e,n,a,c){let l;if(Array.isArray(e))l=h.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=h.rawSplit(e);t=d.getBestVersionForData(n,a)}l=h.fromString(e,t||40)}}const u=d.getBestVersionForData(l,a);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(n){if(n<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else n=u;const g=f(n,a,l),m=t.getSymbolSize(n),v=new o(m);return function(t,e){const n=t.size,o=r.getPositions(e);for(let i=0;i<o.length;i++){const e=o[i][0],r=o[i][1];for(let o=-1;o<=7;o++)if(!(e+o<=-1||n<=e+o))for(let i=-1;i<=7;i++)r+i<=-1||n<=r+i||(o>=0&&o<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===o||6===o)||o>=2&&o<=4&&i>=2&&i<=4?t.set(e+o,r+i,!0,!0):t.set(e+o,r+i,!1,!0))}}(v,n),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(v),function(t,e){const n=i.getPositions(e);for(let o=0;o<n.length;o++){const e=n[o][0],i=n[o][1];for(let n=-2;n<=2;n++)for(let o=-2;o<=2;o++)-2===n||2===n||-2===o||2===o||0===n&&0===o?t.set(e+n,i+o,!0,!0):t.set(e+n,i+o,!1,!0)}}(v,n),p(v,a,0),n>=7&&function(t,e){const n=t.size,o=d.getEncodedBits(e);let i,r,s;for(let a=0;a<18;a++)i=Math.floor(a/3),r=a%3+n-8-3,s=1==(o>>a&1),t.set(i,r,s,!0),t.set(r,i,s,!0)}(v,n),function(t,e){const n=t.size;let o=-1,i=n-1,r=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!t.isReserved(i,a-n)){let o=!1;s<e.length&&(o=1==(e[s]>>>r&1)),t.set(i,a-n,o),r--,-1===r&&(s++,r=7)}if(i+=o,i<0||n<=i){i-=o,o=-o;break}}}(v,g),isNaN(c)&&(c=s.getBestMask(v,p.bind(null,v,a))),s.applyMask(c,v),p(v,a,c),{modules:v,version:n,errorCorrectionLevel:a,maskPattern:c,segments:l}}return F.create=function(n,o){if(void 0===n||""===n)throw new Error("No input text");let i,r,a=e.M;return void 0!==o&&(a=e.from(o.errorCorrectionLevel,e.M),i=d.from(o.version),r=s.from(o.maskPattern),o.toSJISFunc&&t.setToSJISFunction(o.toSJISFunc)),g(n,i,a,r)},F}var $t,Yt,Zt={},Gt={};function Kt(){return $t||($t=1,function(t){function e(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}t.getOptions=function(t){t||(t={}),t.color||(t.color={});const n=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,o=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;return{width:o,scale:o?4:i,margin:n,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},t.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},t.getImageWidth=function(e,n){const o=t.getScale(e,n);return Math.floor((e+2*n.margin)*o)},t.qrToImageData=function(e,n,o){const i=n.modules.size,r=n.modules.data,s=t.getScale(i,o),a=Math.floor((i+2*o.margin)*s),c=o.margin*s,d=[o.color.light,o.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let l=4*(t*a+n),u=o.color.light;if(t>=c&&n>=c&&t<a-c&&n<a-c){u=d[r[Math.floor((t-c)/s)*i+Math.floor((n-c)/s)]?1:0]}e[l++]=u.r,e[l++]=u.g,e[l++]=u.b,e[l]=u.a}}}(Gt)),Gt}function Wt(){return Yt||(Yt=1,function(t){const e=Kt();t.render=function(t,n,o){let i=o,r=n;void 0!==i||n&&n.getContext||(i=n,n=void 0),n||(r=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=e.getOptions(i);const s=e.getImageWidth(t.modules.size,i),a=r.getContext("2d"),c=a.createImageData(s,s);return e.qrToImageData(c.data,t,i),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,r,s),a.putImageData(c,0,0),r},t.renderToDataURL=function(e,n,o){let i=o;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const r=t.render(e,n,i),s=i.type||"image/png",a=i.rendererOpts||{};return r.toDataURL(s,a.quality)}}(Zt)),Zt}var Jt,Xt,te={};function ee(){if(Jt)return te;Jt=1;const t=Kt();function e(t,e){const n=t.a/255,o=e+'="'+t.hex+'"';return n<1?o+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':o}function n(t,e,n){let o=t+e;return void 0!==n&&(o+=" "+n),o}return te.render=function(o,i,r){const s=t.getOptions(i),a=o.modules.size,c=o.modules.data,d=a+2*s.margin,l=s.color.light.a?"<path "+e(s.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",u="<path "+e(s.color.dark,"stroke")+' d="'+function(t,e,o){let i="",r=0,s=!1,a=0;for(let c=0;c<t.length;c++){const d=Math.floor(c%e),l=Math.floor(c/e);d||s||(s=!0),t[c]?(a++,c>0&&d>0&&t[c-1]||(i+=s?n("M",d+o,.5+l+o):n("m",r,0),r=0,s=!1),d+1<e&&t[c+1]||(i+=n("h",a),a=0)):r++}return i}(c,a,s.margin)+'"/>',h='viewBox="0 0 '+d+" "+d+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+u+"</svg>\n";return"function"==typeof r&&r(null,p),p},te}var ne=function(){if(Xt)return q;Xt=1;const t=j?V:(j=1,V=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}),e=Qt(),n=Wt(),o=ee();function i(n,o,i,r,s){const a=[].slice.call(arguments,1),c=a.length,d="function"==typeof a[c-1];if(!d&&!t())throw new Error("Callback required as last argument");if(!d){if(c<1)throw new Error("Too few arguments provided");return 1===c?(i=o,o=r=void 0):2!==c||o.getContext||(r=i,i=o,o=void 0),new Promise((function(t,s){try{const s=e.create(i,r);t(n(s,o,r))}catch(a){s(a)}}))}if(c<2)throw new Error("Too few arguments provided");2===c?(s=i,i=o,o=r=void 0):3===c&&(o.getContext&&void 0===s?(s=r,r=void 0):(s=r,r=i,i=o,o=void 0));try{const t=e.create(i,r);s(null,n(t,o,r))}catch(l){s(l)}}return q.create=e.create,q.toCanvas=i.bind(null,n.render),q.toDataURL=i.bind(null,n.renderToDataURL),q.toString=i.bind(null,(function(t,e,n){return o.render(t,n)})),q}();const oe=e(ne);class ie extends R{constructor(t,e,n,o,i,r=E.READY){super(t),this.applicantId=e,this.state=r,this.domainApi=n,this.embeddedAppConnectionId=o,this.qrCodeLinkOrigin=i,this.initQRCodeURL(),r===E.READY&&this.generateQR(this.QRCodeURL)}init(t='<div class="idvc-modal-background" id="idvc-modal-background">\n <div class="el-loading-spinner" id="idvc-loading-spinner">\n <svg viewBox="25 25 50 50" class="circular">\n <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>\n </svg>\n </div>\n</div>\n<div class="idvc-modal idvc-modal_qr-code" id="idvc-modal">\n <div class="idvc-modal__header-wrap qr-code__header">\n <div class="idvc-modal__close-btn" id="idvc-close-modal-btn"></div>\n <div class="idvc-modal__header">\n <h2 class="idvc-modal__header__content idvc-modal__header__content_qr-code">\n Verify Documents by Phone\n </h2>\n </div>\n </div>\n <div class="idvc-modal__body idvc-modal__body_qr-code">\n <div class="idvc-modal__body_process_ready" id="idvc-modal__body_process_ready">\n <h3 class="idvc-modal__body_process_ready-header">Scan the QR Сode below to continue on your mobile device</h3>\n <div class="idvc-modal__body_process_ready__canvas-container">\n <canvas class="idvc-modal__body_process_ready-canvas" id="idvc-modal__body_process_ready-canvas"></canvas>\n </div>\n <div class="idvc-modal__body_process_ready-info qr-code__header">\n <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 0C8.97933 0.052 10.6278 0.736833 11.9455 2.0545C13.2632 3.37217 13.948 5.02067 14 7C13.948 8.97933 13.2632 10.6278 11.9455 11.9455C10.6278 13.2632 8.97933 13.948 7 14C5.02067 13.948 3.37217 13.2632 2.0545 11.9455C0.736833 10.6278 0.052 8.97933 0 7C0.052 5.02067 0.736833 3.37217 2.0545 2.0545C3.37217 0.736833 5.02067 0.052 7 0ZM7 3C6.729 3 6.505 3.099 6.328 3.297C6.151 3.495 6.07283 3.72933 6.0935 4L6.453 8C6.474 8.146 6.53383 8.26317 6.6325 8.3515C6.73117 8.43983 6.8535 8.48417 6.9995 8.4845C7.1455 8.48483 7.26783 8.4405 7.3665 8.3515C7.46517 8.2625 7.525 8.14533 7.546 8L7.9055 4C7.9265 3.729 7.84833 3.49467 7.671 3.297C7.49367 3.09933 7.26967 3.00033 6.999 3H7ZM7 11C7.22933 10.9897 7.4195 10.9115 7.5705 10.7655C7.7215 10.6195 7.797 10.432 7.797 10.203C7.797 9.974 7.7215 9.78383 7.5705 9.6325C7.4195 9.48117 7.22933 9.40567 7 9.406C6.77067 9.40633 6.5805 9.48183 6.4295 9.6325C6.2785 9.78317 6.203 9.97333 6.203 10.203C6.203 10.4327 6.2785 10.6202 6.4295 10.7655C6.5805 10.9108 6.77067 10.989 7 11Z" fill="#F7BA2A"/>\n </svg>\n <span class="idvc-modal__body_process_ready-info__text">Any images you have uploaded will be lost if you scan the QR code and continue the process on your mobile device</span>\n </div>\n </div>\n\n <div class="idvc-modal__body_process_validating d-none" id="idvc-modal__body_process_validating">\n <div class="el-loading-spinner el-loading-spinner_qr-code" id="idvc-validating-spinner">\n <svg viewBox="25 25 50 50" class="circular circular__background">\n <circle cx="50" cy="50" r="20" fill="none" class="path path__background"></circle>\n </svg>\n <svg viewBox="25 25 50 50" class="circular">\n <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>\n </svg>\n <span class="idvc-modal__body_process_validating-info__text">The verification process is currently being completed using a mobile device ...</span>\n </div>\n </div>\n\n <div class="idvc-modal__body_process_done d-none" id="result-success">\n <div class="idvc-modal__body_process_done-container">\n <svg\n width="64"\n height="64"\n viewBox="0 0 64 64"\n fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path d="M31.5 0.5C40.407 0.734 47.8253 3.81575 53.7548 9.74525C59.6842 15.6748 62.766 23.093 63 32C62.766 40.907 59.6842 48.3253 53.7548 54.2548C47.8253 60.1842 40.407 63.266 31.5 63.5C22.593 63.266 15.1748 60.1842 9.24525 54.2548C3.31575 48.3253 0.234 40.907 0 32C0.234 23.093 3.31575 15.6748 9.24525 9.74525C15.1748 3.81575 22.593 0.734 31.5 0.5ZM27.5625 38.1875L20.601 31.226C20.0385 30.71 19.3942 30.452 18.6682 30.452C17.9422 30.452 17.3092 30.7212 16.7693 31.2597C16.2292 31.7982 15.96 32.4193 15.9615 33.1227C15.963 33.8263 16.221 34.4593 16.7355 35.0218L25.6657 43.952C26.1817 44.468 26.8148 44.726 27.5648 44.726C28.3148 44.726 28.9478 44.468 29.4638 43.952L47.9565 25.4593C48.66 24.7558 48.8828 23.9 48.6247 22.892C48.3667 21.884 47.7337 21.251 46.7257 20.993C45.7178 20.735 44.862 20.9578 44.1585 21.6612L27.5625 38.1875Z" fill="#5FCA71"/>\n </svg>\n <div class="idvc-modal__body_process_done__text" id="result__text-success">\n Success\n </div>\n </div>\n </div>\n\n <div class="idvc-modal__body_process_done d-none" id="result-error">\n <div class="idvc-modal__body_process_done-container">\n <svg\n xmlns="http://www.w3.org/2000/svg"\n width="64"\n height="64"\n fill="#ff0000"\n viewBox="0 0 512 512">\n <path d="M502.876 379.713l-189.486-316.329c-6.088-9.895-14.349-17.903-24.154-23.52l-0.329-0.174c-20.048-11.267-45.677-11.292-65.788 0.022-10.123 5.785-18.372 13.786-24.282 23.381l-0.167 0.291c-0.022 0.045-0.042 0.066-0.064 0.109l-189.619 316.546c-18.512 32.098-7.501 73.127 24.596 91.642 9.476 5.56 20.852 8.88 32.997 8.972h379.12c37.046-0.406 66.736-30.765 66.347-67.804-0.137-12.231-3.526-23.642-9.34-33.446l0.171 0.31zM233.656 189.931c0.138-12.246 10.097-22.12 22.363-22.12s22.225 9.874 22.363 22.107v89.466c0 0.002 0 0.003 0 0.005 0 12.347-10.010 22.356-22.356 22.356-0.002 0-0.004 0-0.005 0h0c-0.002 0-0.005 0-0.008 0-12.345 0-22.352-10.005-22.357-22.348v-0zM278.413 368.985c0 12.368-10.026 22.394-22.394 22.394s-22.394-10.026-22.394-22.394c0-12.367 10.024-22.392 22.391-22.394v0c0.001 0 0.002 0 0.002 0 12.368 0 22.394 10.026 22.394 22.394v0z"/>\n </svg>\n <div class="idvc-modal__body_process_done__text" id="result__text-error">\n Validation Failed\n </div>\n </div>\n </div>\n <div class="idvc-modal__footer_qr-code">\n <button type="button" class="btn btn--primary" id="idvc-qr-code-terminate-process-btn">\n <span>Done</span>\n </button>\n </div>\n </div>\n</div>\n'){super.init(t),this.qrCodeCanvas=this.container.querySelector("#idvc-modal__body_process_ready-canvas"),this.successResultContainer=this.container.querySelector("#result-success"),this.errorResultContainer=this.container.querySelector("#result-error"),this.processReadyContainer=this.container.querySelector("#idvc-modal__body_process_ready"),this.processValidatingContainer=this.container.querySelector("#idvc-modal__body_process_validating"),this.terminateProcessingButton=this.container.querySelector("#idvc-qr-code-terminate-process-btn"),this.mappedState={ready:this.processReadyContainer,validating:this.processValidatingContainer,doneWithSuccess:this.successResultContainer,doneWithError:this.errorResultContainer},this.terminateProcessHandler()}initQRCodeURL(){this.QRCodeURL=`${this.qrCodeLinkOrigin}/embedded?requestId=${this.applicantId}&embeddedAppConnectionId=${this.embeddedAppConnectionId}&qrCode=true`}set state(t){this.modalState=t;try{this.changeModalBodyView(this.modalState)}catch(e){throw new Error(`Wrong modal state, error: ${e}`)}}terminateProcessHandler(){this.terminateProcessingButton.addEventListener("click",(()=>{const t=new CustomEvent("terminateEmbedded",{bubbles:!0});this.terminateProcessingButton.dispatchEvent(t)}))}changeModalBodyView(t){Object.entries(this.mappedState).forEach((([e,n])=>{e===t?n.classList.remove("d-none"):n.classList.add("d-none")})),t===E.VALIDATING?this.terminateProcessingButton.classList.remove("d-none"):this.terminateProcessingButton.classList.add("d-none")}async generateQR(t){try{await oe.toCanvas(this.qrCodeCanvas,t,{width:this.qrCodeCanvas.width})}catch(e){throw new Error(`generate qr code error: ${e}`)}}show(){this.prepareBackgroundStyles(),super.show()}}const re=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,se=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,ae=()=>{const{userAgent:t}=navigator,e=window.matchMedia("(any-pointer: coarse)"),n=navigator.maxTouchPoints>0,o=()=>window.PointerEvent&&n;return{isMobileUserAgent:()=>re.test(t)||se.test(t.substring(0,4))||["iPad Simulator","iPhone Simulator","iPad","iPhone"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,isTouchable:o,isTouchScreen:()=>e.matches,isSurface:()=>-1!==t.indexOf("Windows")&&o()}};return class{constructor(t,e){this.wrapperContainerId="idvc-wrapper-container","localhost"===window.location.hostname&&console.info("%c You can pass DVS Online domainApi in config. Ex: {domainApi: 'https://localhost:8000'}","background: #FFCC00; color: #000"),this.config=t,this.IDVCModule=e,this.beforeMount(t)}get isEmbeddedFromQR(){return"true"===h("qrCode")}get QRCodeIsAvailable(){return!this.isEmbeddedFromQR&&!this.config.demoMode&&this.options.showQrCode&&!(()=>{const t=ae(),e=t.isMobileUserAgent(),n=t.isTouchable(),o=t.isTouchScreen(),i=t.isSurface();return e&&n&&o||i})()}updateConfig(t){this.configs.libConfig=this.prepareConfig(t),this.lib.reloadComponent(this.configs.libConfig)}async setApplicant(t){this.lib.loading=!0;try{this.configs.applicantId=t,this.validationModal.hide();if(!(await this.checkApplicantIsValid()))throw this.lib.loading=!1,new Error;await this.restart(),this.lib.loading=!1}catch(e){this.lib.loading=!1,this.onError(e)}}async restart(){this.lib.initialized?this.lib.restart():await this.start()}showLoader(t,e,n){this.lib&&this.lib.showLoader(t,e,n)}wrapIDVCComponent(){const t=document.getElementById(this.configs.mountElement);if(!t)throw new Error("Mount element isn't found");t.classList.add("hidden-element"),t.outerHTML=`<div id="${this.wrapperContainerId}">${t.outerHTML}</div>`}async beforeMount(t){try{this.configs=new f(t),this.api=new S(this.configs.publicKey,this.configs.domainApi),this.lib=new T,this.embeddedAppConnectionId=h("embeddedAppConnectionId")||(()=>{const t=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`})(),this.mountValidationModal(),this.configs.validate(),this.options=await this.api.getOptions(this.configs.domainId),this.config.preferApiConfig||(this.options=this.applyWrapperConfigSettings(this.options)),await this.mount()}catch(e){this.onError(e)}}applyWrapperConfigSettings(t){if(this.config?.wrapperSettings){const e=structuredClone(t),n=this.config?.wrapperSettings||{};return Object.keys(n).forEach((t=>{const o=n[t];void 0!==o&&(e[t]=o)})),e}return t}mountQRCodeButton(){const t=document.getElementById("card-steps");t&&t.insertAdjacentHTML("afterend",'<div class="qr-code-wrap">\n <button class="qr-code-wrap__button" id="qr-code-wrap__button"><span class="qr-code-wrap__content">Verify Documents by Phone<svg class="qr-code-svg" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 8V0H8V8H0ZM2 6H6V2H2V6ZM0 18V10H8V18H0ZM2 16H6V12H2V16ZM10 8V0H18V8H10ZM12 6H16V2H12V6ZM16 18V16H18V18H16ZM10 12V10H12V12H10ZM12 14V12H14V14H12ZM10 16V14H12V16H10ZM12 18V16H14V18H12ZM14 16V14H16V16H14ZM14 12V10H16V12H14ZM16 14V12H18V14H16Z" fill="white"/>\n </svg></span></button>\n</div>\n'),this.qrCodeBtn=document.getElementById("qr-code-wrap__button"),this.qrCodeBtn?.addEventListener("click",(()=>{this.QRCodeModal.show()}))}async mount(){try{const t=await this.checkApplicantIsValid();if(t&&this.options.showConsentForm&&(this.wrapIDVCComponent(),this.form=new P({mountElementID:this.wrapperContainerId,consentBodyText:this.options.consentText,consentCheckboxText:this.options.checkboxText}),this.form.form.addEventListener("proceedEvent",(async()=>{document.getElementById(this.configs.mountElement)?.classList.remove("hidden-element")}),{once:!0})),!t)throw new Error;await this.start(),this.showSpinner(),this.QRCodeIsAvailable&&this.mountQR(),this.isEmbeddedFromQR&&(this.api.longPollingRequest(`IsClosed/${this.configs.applicantId}`,{method:"GET"},(()=>{this.unmount()})),this.api.longPollingRequest(`Open/${this.configs.applicantId}`,{method:"POST"},(()=>{})))}catch(t){this.onError(t)}}unmount(){document.getElementById(this.configs.libConfig.el).remove()}async checkApplicantIsValid(){return this.api.checkApplicantIdIsNotClosed({applicantId:this.configs.applicantId,demoMode:this.configs.demoMode,faceAuth:this.configs.isAuth,faceOnly:this.configs.faceOnly})}prepareConfig(t){const e=JSON.parse(t);return e.documentTypes=u(e),e}showSpinner(){this.validationModal.hideSpinner(),this.validationModal.closable=!1}async submit(t){try{const e={top:"Document has been submitted for processing",bottom:"Please wait for the response"};this.lib.showLoader(!0,e.bottom,e.top);const n=await this.createPostModel(t,this.configs.isAuth||this.configs.faceOnly),o={applicantId:n.applicantId,model:n,embeddedAppConnectionId:this.embeddedAppConnectionId};this.validationOutput=await this.api.validateApplicant(o,this.configs.demoMode,this.configs.isAuth),this.lib.showLoader(!1),this.configs.onValidate(this.validationOutput),this.showSpinner(),this.showValidationSuccess()}catch(e){this.lib.loading=!1,this.onError(e)}}showValidationSuccess(){const t=new z(this.validationOutput,this.validationModal);t.prepareModal(),t.showModal()}async createPostModel(t,e){return{applicantId:this.configs.applicantId,...t,documentType:e?10:t.documentType,clientVersion:this.lib.version,clientType:x.WebLibStandalone}}async start(){if(await this.loadOptions(),this.lib.configs={IdvcConfig:this.configs.libConfig,CSSStylesConfig:this.configs.cssStylesConfig,CSSVariablesConfig:this.configs.cssVariablesConfig},this.lib.mixSubmit("submit",this.submit.bind(this)),"latest"===this.configs.IDVCDownloadVersion&&this.configs.libConfig.useCDN){const t=await this.api.getCurrentIdvcVersion();await this.lib.initializeLibrary(!!this.configs.libConfig.useCDN,t)}else await this.lib.initializeLibrary(!!this.configs.libConfig.useCDN,this.configs.IDVCDownloadVersion,this.IDVCModule);this.mountValidationModal()}mountQR(){this.mountQRCodeModal(),this.mountQRCodeButton()}async loadOptions(){this.configs.parseFromWeb(this.options)}async forceClose(){try{this.lib.loading=!0;if(!(await this.api.forceClose(this.configs.applicantId)))throw new Error;this.configs.onValidate({...this.validationOutput,forceComplete:!0}),this.validationOutput.status=_.COMPLETE,this.showValidationSuccess()}catch(t){this.onError(t)}finally{this.lib.loading=!1}}mountValidationModal(){this.validationModal=new B(this.configs.mountElement),this.validationModal.addCompleteHandler(this.forceClose.bind(this))}mountQRCodeModal(){this.QRCodeModal=new ie(this.configs.mountElement,this.configs.applicantId,this.configs.domainApi,this.embeddedAppConnectionId,this.configs.qrCodeLinkOrigin),this.QRCodeModal.hide(),this.api.longPollingRequest(`Status/${this.configs.applicantId}`,{method:"GET"},(t=>{this.processEmbeddedAppStart(t)})),this.QRCodeModal.modalContainer.addEventListener("terminateEmbedded",(()=>{this.api.closeEmbeddedApplication(this.configs.applicantId,(()=>{this.QRCodeModal.hide(),this.qrCodeBtn.disabled=!0,this.api.longPollingRequest(`Status/${this.configs.applicantId}`,{method:"GET"},(t=>{this.processEmbeddedAppStart(t),this.qrCodeBtn.disabled=!1}))}))}))}processEmbeddedAppStart(t){const e=this.configs.getFirstStepModeState();if(t===M.OPEN)this.QRCodeModal.state=E.VALIDATING,this.QRCodeModal.closable=!1,this.QRCodeModal.show(),this.api.longPollingRequest(`ValidationResponse/${this.configs.applicantId}/${this.embeddedAppConnectionId}`,{method:"GET"},(t=>{this.processEmbeddedAppEnd(t)})),this.configs.firstStepMode&&(this.configs.firstStepMode.video=!1,this.configs.firstStepMode.uploader=!0),this.lib.updateDocumentTypes(this.configs.libConfig.documentTypes);else if(t===M.CLOSED||t===M.NEVER_OPEN){const t=e();t&&this.configs.firstStepMode&&([this.configs.firstStepMode.video,this.configs.firstStepMode.uploader]=[t.video,t.uploader]),this.QRCodeModal.state=E.READY,this.QRCodeModal.closable=!0,this.api.longPollingRequest(`IsOpen/${this.configs.applicantId}`,{method:"GET"},(t=>{t&&this.processEmbeddedAppStart(M.OPEN)}))}else t===M.CLOSED_FOREVER&&(this.QRCodeModal.state=E.DONE_WITH_ERROR,this.QRCodeModal.closable=!1)}processEmbeddedAppEnd(t){t?.status===_.SUCCESS?this.QRCodeModal.state=E.DONE_WITH_SUCCESS:this.api.longPollingRequest(`Status/${this.configs.applicantId}`,{method:"GET"},(t=>{this.processEmbeddedAppStart(t),this.qrCodeBtn.disabled=!1})),this.QRCodeModal.closable=!1,this.validationOutput=t,this.configs.onValidate(this.validationOutput)}onError(t){if(this.configs?.onError){this.configs.onError(t);const e={tryAgain:!1,complete:!1};this.validationModal.type=C.DANGER,this.validationModal.header=t.header||"Something Went Wrong",this.validationModal.content=t.content||"Try again later",["HttpError","ValidationError","FaceAuthorizationError"].includes(t.name)&&(e.tryAgain=!0),this.validationModal.buttons=e,this.validationModal.showSpinner(!1),this.form&&this.form.form.remove(),document.getElementById(this.configs.mountElement)?.classList.remove("hidden-element"),this.validationModal.show()}return t}}}));
|
|
2
|
+
//# sourceMappingURL=wrapper.umd.js.map
|