@idscan/onboarding 2.9.3 → 2.10.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/src/Wrapper.d.ts +1 -0
- package/dist/src/helpers/fingerPrint.d.ts +0 -1
- package/dist/wrapper.es.js +565 -3
- package/dist/wrapper.es.js.map +1 -1
- package/dist/wrapper.umd.js +1 -1
- package/dist/wrapper.umd.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +4 -0
package/dist/wrapper.umd.js
CHANGED
|
@@ -1,2 +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,E=C&&C(C(k([])));E&&E!==n&&o.call(E,s)&&(w=E);var _=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 N()}for(n.method=i,n.arg=r;;){var s=n.delegate;if(s){var a=I(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 I(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,I(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 A(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(A,this),this.reset(!0)}function k(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:N}}function N(){return{value:e,done:!0}}return y.prototype=b,i(_,"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(_),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(_),d(_,c,"Generator"),d(_,s,function(){return this}),d(_,"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=k,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:k(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(null==t?void 0:t.jsonSettings);this.isAuth||this.faceOnly?this.libConfig=this.faceAuthorizationConfig(e):(e.documentTypes=u(e),this.libConfig=e),this.cssStyles=null==t?void 0:t.cssStyles,this.cssVariables=null==t?void 0: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(){var t,e,n;return null==(n=null==(e=null==(t=this.libConfig)?void 0:t.documentTypes[0])?void 0:e.steps[0])?void 0:n.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(){var t,e;return(null==(e=null==(t=this.wrapper)?void 0:t.callbacks)?void 0:e.onValidate)?this.wrapper.callbacks.onValidate:()=>{}}get onError(){var t,e;return(null==(e=null==(t=this.wrapper)?void 0:t.callbacks)?void 0:e.onError)?this.wrapper.callbacks.onError:()=>{}}get onGetOptionsStart(){var t,e;return(null==(e=null==(t=this.wrapper)?void 0:t.callbacks)?void 0:e.onGetOptionsStart)?this.wrapper.callbacks.onGetOptionsStart:()=>{}}get onGetOptionsComplete(){var t,e;return(null==(e=null==(t=this.wrapper)?void 0:t.callbacks)?void 0:e.onGetOptionsComplete)?this.wrapper.callbacks.onGetOptionsComplete:()=>{}}set libConfig(t){var e;const n=null==(e=this.IDVCConfig)?void 0:e.licenseKey;this.wrapper.preferApiConfig?this.IDVCConfig={...this.IDVCConfig,...t,...this.wrapper.callbacks}:this.IDVCConfig={...this.IDVCConfig,...t,...this.wrapper,...this.wrapper.callbacks},n&&(this.IDVCConfig.licenseKey=n)}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){const e="RequestValidationError"===t.code?t.code:"ValidationError";if(super(e),this.message=t.message||"Try again later",this.name=e,this.setHeader(t),this.content=t.message||"Try again later",null==t?void 0: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",null==t?void 0: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||{}),E=(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))(_||{}),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||{}),I=(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))(I||{}),A=(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))(A||{});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(A.NotFound===r.status&&n)throw new g("validation not completed");if(A.NotFound===r.status&&(!n||o))return!0;if(A.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(A.BadRequest===i.status){const t=await i.json();if(n)throw new w(t);throw new m(t)}if(A.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(A.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(A.RequestTimeout===i.status||A.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:[I.DL,I.InternationalId],mrz:[I.PassportCard,I.GreenCard,I.Passport,I.EmploymentAuthorization],pdf:[I.DL,I.InternationalId]},k=(t,e)=>{var n;const o=e.find(t=>Object.keys(D).includes(t.type));if(!o)return!1;return(null==(n=D[o.type])?void 0:n.includes(t))??!1},N=(t,e)=>{const n=!!e.find(t=>"mrz"===t.type);if(t===I.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=>{var e;const n=t.documentType===I.Passport,o=(()=>{const e=t.steps.find(t=>"pdf"===t.type||"mrz"===t.type||"back"===t.type),o=(null==e?void 0:e.mrzText)||(null==e?void 0:e.trackString)||"";return n?{img:"",trackString:o}:{img:(null==e?void 0:e.img)||"",trackString:o}})();return{frontImageBase64:this.cleanBase64((()=>{var e;if(n){const e=t.steps.find(t=>"mrz"===t.type);if(e)return e.img}return null==(e=t.steps.find(t=>"front"===t.type))?void 0:e.img})()),backOrSecondImageBase64:this.cleanBase64(null==o?void 0:o.img),faceImageBase64:this.cleanBase64(null==(e=t.steps.find(t=>"face"===t.type))?void 0:e.img),trackString:o.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:k(t.documentType,t.steps),isOcrEnabled:N(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={[E.SUCCESS]:"Verification complete!",[E.FAIL]:"Validation failed!",[E.INVALID_DATA]:"Data invalid!",[E.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,isCompleted:c}=t;this.code=e,this.message=n,this.status=o,this.isCompleted=c,this.attemptsLeft=i,this.attemptsCount=r,this.invalidDataErrors=s||[],this.notificationType=a}calculateType(){let t;t=this.status===E.SUCCESS?C.SUCCESS:this.status===E.ERROR?C.PRIMARY:C.DANGER,this.result.type=t}calculateHeader(){this.result.header=this.statuses[this.status]||this.statuses[3]}calculateContent(){if((this.status===E.FAIL&&this.attemptsLeft>0||this.status===E.ERROR)&&(this.result.content="Please try again"),this.status===E.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===E.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(){if(this.status===E.COMPLETE||this.status===E.SUCCESS||this.isCompleted)return;const t=this.attemptsLeft>0;this.result.buttons.tryAgain=t,this.result.buttons.complete=t}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,O={};var q,F={},H={};function U(){if(q)return H;let t;q=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,Et={};function _t(){if(bt)return Et;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]))+";Et.KANJI=new RegExp(e,"g"),Et.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Et.BYTE=new RegExp(n,"g"),Et.NUMERIC=new RegExp(t,"g"),Et.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+e+"$"),i=new RegExp("^"+t+"$"),r=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Et.testKanji=function(t){return o.test(t)},Et.testNumeric=function(t){return i.test(t)},Et.testAlphanumeric=function(t){return r.test(t)},Et}function Mt(){return wt||(wt=1,function(t){const e=yt(),n=_t();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,It={};var At,St,Dt,kt,Nt,Tt,Rt,Bt,Pt={};var zt,Vt,jt,Ot={exports:{}};function qt(){return Vt||(Vt=1,function(t){const e=Mt(),n=function(){if(St)return At;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))},At=e}(),o=function(){if(kt)return Dt;kt=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=function(){if(Tt)return Nt;Tt=1;const t=Mt();function e(e){this.mode=t.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}return e.getBitsLength=function(t){return 8*t},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},Nt=e}(),r=function(){if(Bt)return Rt;Bt=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)}},Rt=n}(),s=_t(),a=U(),c=function(){return zt||(zt=1,Ot.exports=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}}}),Ot.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()))}}(Pt)),Pt}function Ft(){if(jt)return F;jt=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 It;Lt=1;const t=U(),e=t.getBCHDigit(1335);return It.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)},It}(),u=Mt(),h=qt();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 E=new Uint8Array(i);let _,M,x=0;for(_=0;_<w;_++)for(M=0;M<d;M++)_<y[M].length&&(E[x++]=y[M][_]);for(_=0;_<g;_++)for(M=0;M<d;M++)E[x++]=b[M][_];return E}(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 Ht,Ut,Qt={},$t={};function Yt(){return Ht||(Ht=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}}}($t)),$t}function Zt(){return Ut||(Ut=1,function(t){const e=Yt();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)}}(Qt)),Qt}var Gt,Kt,Wt={};function Jt(){if(Gt)return Wt;Gt=1;const t=Yt();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 Wt.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},Wt}var Xt=function(){if(Kt)return O;Kt=1;const t=j?V:(j=1,V=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}),e=Ft(),n=Zt(),o=Jt();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 O.create=e.create,O.toCanvas=i.bind(null,n.render),O.toDataURL=i.bind(null,n.renderToDataURL),O.toString=i.bind(null,function(t,e,n){return o.render(t,n)}),O}();const te=e(Xt);class ee extends R{constructor(t,e,n,o,i,r=_.READY){super(t),this.applicantId=e,this.state=r,this.domainApi=n,this.embeddedAppConnectionId=o,this.qrCodeLinkOrigin=i,this.initQRCodeURL(),r===_.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===_.VALIDATING?this.terminateProcessingButton.classList.remove("d-none"):this.terminateProcessingButton.classList.add("d-none")}async generateQR(t){try{await te.toCanvas(this.qrCodeCanvas,t,{width:this.qrCodeCanvas.width})}catch(e){throw new Error(`generate qr code error: ${e}`)}}show(){this.prepareBackgroundStyles(),super.show()}}const ne=/(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,oe=/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,ie=()=>{const{userAgent:t}=navigator,e=window.matchMedia("(any-pointer: coarse)"),n=navigator.maxTouchPoints>0,o=()=>window.PointerEvent&&n;return{isMobileUserAgent:()=>ne.test(t)||oe.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()}},re="2.9.3";return class{constructor(t,e){this.wrapperContainerId="idvc-wrapper-container",console.info(`%cIDVCO version: ${re}`,"background-color:#f48020; color:#fff; padding: 4px 8px"),"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=ie(),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.configs.onGetOptionsStart(),this.options=await this.api.getOptions(this.configs.domainId),this.configs.onGetOptionsComplete(this.options),this.config.preferApiConfig||(this.options=this.applyWrapperConfigSettings(this.options)),await this.mount()}catch(e){this.onError(e)}}applyWrapperConfigSettings(t){var e,n;if(null==(e=this.config)?void 0:e.wrapperSettings){const e=structuredClone(t),o=(null==(n=this.config)?void 0:n.wrapperSettings)||{};return Object.keys(o).forEach(t=>{const n=o[t];void 0!==n&&(e[t]=n)}),e}return t}mountQRCodeButton(){var t;const e=document.getElementById("card-steps");e&&e.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"),null==(t=this.qrCodeBtn)||t.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()=>{var t;null==(t=document.getElementById(this.configs.mountElement))||t.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=E.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 ee(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=_.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=_.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=_.DONE_WITH_ERROR,this.QRCodeModal.closable=!1)}processEmbeddedAppEnd(t){(null==t?void 0:t.status)===E.SUCCESS?this.QRCodeModal.state=_.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){var e,n;if(null==(e=this.configs)?void 0:e.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(),null==(n=document.getElementById(this.configs.mountElement))||n.classList.remove("hidden-element"),this.validationModal.show()}return t}}});
|
|
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},a="function"==typeof Symbol?Symbol:{},r=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(x){c=function(t,e,n){return t[e]=n}}function d(t,e,n,o){var a=e&&e.prototype instanceof v?e:v,r=Object.create(a.prototype),s=new B(o||[]);return i(r,"_invoke",{value:T(t,n,s)}),r}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(x){return{type:"throw",arg:x}}}t.wrap=d;var h="suspendedStart",p="suspendedYield",g="executing",m="completed",f={};function v(){}function y(){}function b(){}var M={};c(M,r,function(){return this});var S=Object.getPrototypeOf,w=S&&S(S(L([])));w&&w!==n&&o.call(w,r)&&(M=w);var E=b.prototype=v.prototype=Object.create(M);function C(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function _(t,e){function n(i,a,r,s){var l=u(t[i],t,a);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&o.call(d,"__await")?e.resolve(d.__await).then(function(t){n("next",t,r,s)},function(t){n("throw",t,r,s)}):e.resolve(d).then(function(t){c.value=t,r(c)},function(t){return n("throw",t,r,s)})}s(l.arg)}var a;i(this,"_invoke",{value:function(t,o){function i(){return new e(function(e,i){n(t,o,e,i)})}return a=a?a.then(i,i):i()}})}function T(t,e,n){var o=h;return function(i,a){if(o===g)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return R()}for(n.method=i,n.arg=a;;){var r=n.delegate;if(r){var s=A(r,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var l=u(t,e,n);if("normal"===l.type){if(o=n.done?m:p,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.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")),f;var a=u(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,f;var r=a.arg;return r?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,f):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function L(t){if(t){var n=t[r];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=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 a.next=a}}return{next:R}}function R(){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=c(b,l,"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,c(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},C(_.prototype),c(_.prototype,s,function(){return this}),t.AsyncIterator=_,t.async=function(e,n,o,i,a){void 0===a&&(a=Promise);var r=new _(d(e,n,o,i),a);return t.isGeneratorFunction(n)?r:r.next().then(function(t){return t.done?t.value:r.next()})},C(E),c(E,l,"Generator"),c(E,r,function(){return this}),c(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=L,B.prototype={constructor:B,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(N),!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 s.type="throw",s.arg=t,n.next=o,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a],s=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var l=o.call(r,"catchLoc"),c=o.call(r,"finallyLoc");if(l&&c){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(l){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.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 a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var r=a?a.completion:{};return r.type=t,r.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(r)},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),f},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),N(n),f}},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;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:L(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),f}},t}(t.exports);try{regeneratorRuntime=e}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(o));const i=t=>!!t,a=t=>!!t.match(/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/),r=t=>t.toLowerCase().startsWith("pk_")&&a(t),s=t=>!!document.getElementById(t);class l extends Error{}class c extends l{constructor(t){super(t),this.message=`Configuration parameter error: ${t}`,this.name="ConfigError",this.header="Configuration Error!",this.content=t||""}}const d=[{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?d: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 c(t)};class g{constructor(t){this.validate=()=>{(({demoMode:t,applicantId:e,domainId:n,domainApi:o,publicKey:l,el:c="videoCapturingEl"})=>{const d=[i,a];[t?null:{name:"applicantId",value:e,validationFunctions:d},{name:"domainId",value:n,validationFunctions:d},{name:"publicKey",value:l,validationFunctions:[i,r]},{name:"el",value:c,validationFunctions:[i,s]},{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(null==t?void 0:t.jsonSettings);this.isAuth||this.faceOnly?this.libConfig=this.faceAuthorizationConfig(e):(e.documentTypes=u(e),this.libConfig=e),this.cssStyles=null==t?void 0:t.cssStyles,this.cssVariables=null==t?void 0: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(){var t,e,n;return null==(n=null==(e=null==(t=this.libConfig)?void 0:t.documentTypes[0])?void 0:e.steps[0])?void 0:n.mode}set applicantId(t){(t=>{p({name:"applicantId",value:t,validationFunctions:[i,a]})})(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(){var t,e;return(null==(e=null==(t=this.wrapper)?void 0:t.callbacks)?void 0:e.onValidate)?this.wrapper.callbacks.onValidate:()=>{}}get onError(){var t,e;return(null==(e=null==(t=this.wrapper)?void 0:t.callbacks)?void 0:e.onError)?this.wrapper.callbacks.onError:()=>{}}get onGetOptionsStart(){var t,e;return(null==(e=null==(t=this.wrapper)?void 0:t.callbacks)?void 0:e.onGetOptionsStart)?this.wrapper.callbacks.onGetOptionsStart:()=>{}}get onGetOptionsComplete(){var t,e;return(null==(e=null==(t=this.wrapper)?void 0:t.callbacks)?void 0:e.onGetOptionsComplete)?this.wrapper.callbacks.onGetOptionsComplete:()=>{}}set libConfig(t){var e;const n=null==(e=this.IDVCConfig)?void 0:e.licenseKey;this.wrapper.preferApiConfig?this.IDVCConfig={...this.IDVCConfig,...t,...this.wrapper.callbacks}:this.IDVCConfig={...this.IDVCConfig,...t,...this.wrapper,...this.wrapper.callbacks},n&&(this.IDVCConfig.licenseKey=n)}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 m extends l{constructor(t){super(t),this.message="This application is closed",this.name="NotValidApplicant",this.header="Request Closed",this.content="This application is closed"}}class f extends l{constructor(t){const e="RequestValidationError"===t.code?t.code:"ValidationError";if(super(e),this.message=t.message||"Try again later",this.name=e,this.setHeader(t),this.content=t.message||"Try again later",null==t?void 0: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 l{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 l{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 M extends l{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",null==t?void 0: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 S=(t=>(t.DANGER="danger",t.SUCCESS="success",t.PRIMARY="primary",t))(S||{}),w=(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))(w||{}),E=(t=>(t.READY="ready",t.VALIDATING="validating",t.DONE_WITH_SUCCESS="doneWithSuccess",t.DONE_WITH_ERROR="doneWithError",t))(E||{}),C=(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))(C||{}),_=(t=>(t[t.WebLibStandalone=0]="WebLibStandalone",t[t.WebLibDashboard=1]="WebLibDashboard",t[t.Android=2]="Android",t[t.Ios=3]="Ios",t))(_||{}),T=(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))(T||{}),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 N{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`,a=await fetch(i,{method:"GET",headers:this.HEADERS});if(a.ok&&!n)throw new m("request closed");if(a.ok&&n)return!0;if(I.NotFound===a.status&&n)throw new m("validation not completed");if(I.NotFound===a.status&&(!n||o))return!0;if(I.BadRequest===a.status){const t=await a.json();throw new f(t)}throw new v(a)}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 M(t);throw new f(t)}if(I.NotFound===i.status){const t=await i.json();throw new M(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 f(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 B={back:[A.DL,A.InternationalId],mrz:[A.PassportCard,A.GreenCard,A.Passport,A.EmploymentAuthorization],pdf:[A.DL,A.InternationalId]},L=(t,e)=>{var n;const o=e.find(t=>Object.keys(B).includes(t.type));if(!o)return!1;return(null==(n=B[o.type])?void 0:n.includes(t))??!1},R=(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 x{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=>{var e;const n=t.documentType===A.Passport,o=(()=>{const e=t.steps.find(t=>"pdf"===t.type||"mrz"===t.type||"back"===t.type),o=(null==e?void 0:e.mrzText)||(null==e?void 0:e.trackString)||"";return n?{img:"",trackString:o}:{img:(null==e?void 0:e.img)||"",trackString:o}})();return{frontImageBase64:this.cleanBase64((()=>{var e;if(n){const e=t.steps.find(t=>"mrz"===t.type);if(e)return e.img}return null==(e=t.steps.find(t=>"front"===t.type))?void 0:e.img})()),backOrSecondImageBase64:this.cleanBase64(null==o?void 0:o.img),faceImageBase64:this.cleanBase64(null==(e=t.steps.find(t=>"face"===t.type))?void 0:e.img),trackString:o.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:L(t.documentType,t.steps),isOcrEnabled:R(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 D{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 k extends D{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===S.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 O{constructor(t,e){this.statuses={[w.SUCCESS]:"Verification complete!",[w.FAIL]:"Validation failed!",[w.INVALID_DATA]:"Data invalid!",[w.ERROR]:"Something went wrong",4:"Request closed"},this.result={type:S.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:a=-1,invalidDataErrors:r=[],notificationType:s=0,isCompleted:l}=t;this.code=e,this.message=n,this.status=o,this.isCompleted=l,this.attemptsLeft=i,this.attemptsCount=a,this.invalidDataErrors=r||[],this.notificationType=s}calculateType(){let t;t=this.status===w.SUCCESS?S.SUCCESS:this.status===w.ERROR?S.PRIMARY:S.DANGER,this.result.type=t}calculateHeader(){this.result.header=this.statuses[this.status]||this.statuses[3]}calculateContent(){if((this.status===w.FAIL&&this.attemptsLeft>0||this.status===w.ERROR)&&(this.result.content="Please try again"),this.status===w.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===w.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>${T[this.notificationType]}`),this.code&&this.message&&(this.result.content=this.message)}calculateFooter(){if(this.status===w.COMPLETE||this.status===w.SUCCESS||this.isCompleted)return;const t=this.attemptsLeft>0;this.result.buttons.tryAgain=t,this.result.buttons.complete=t}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()}}const F={apiKeys:["scheduling","userActivation","geolocation","webkitTemporaryStorage","webkitPersistentStorage","getGamepads","javaEnabled","sendBeacon","vibrate","clipboard","credentials","keyboard","managed","mediaDevices","storage","serviceWorker","virtualKeyboard","wakeLock","ink","hid","locks","mediaCapabilities","mediaSession","presentation","serial","usb","windowControlsOverlay","xr","userAgentData","canShare","share","clearAppBadge","getBattery","getUserMedia","requestMIDIAccess","requestMediaKeySystemAccess","setAppBadge","webkitGetUserMedia","getInstalledRelatedApps","registerProtocolHandler","unregisterProtocolHandler"]};function U(){const t=navigator.language;if(t&&window.Intl){const e=new Intl.DateTimeFormat(t,{dateStyle:"full",timeStyle:"long"}),{calendar:n,numberingSystem:o}=e.resolvedOptions(),{weekInfo:i,collations:a}=new Intl.Locale(t);return{locale:t,calendar:n,numberingSystem:o,weekInfo:i,collations:a}}return{}}function G(){const{userAgent:t,cookieEnabled:e,platform:n,hardwareConcurrency:o,languages:i}=navigator;return{userAgent:t,cookieEnabled:e,platform:n,hardwareConcurrency:o,languages:i}}async function H(t=""){if(window.crypto){const e=(new TextEncoder).encode(t),n=crypto.subtle||crypto.webkitSubtle,o=await n.digest("SHA-256",e);return Array.from(new Uint8Array(o)).map(t=>t.toString(16).padStart(2,"0")).join("")}return t}const V={fonts:JSON.parse('[".Aqua Kana",".Helvetica LT MM",".Times LT MM","18thCentury","8514oem","AR BERKLEY","AR JULIAN","AR PL UKai CN","AR PL UMing CN","AR PL UMing HK","AR PL UMing TW","AR PL UMing TW MBE","Aakar","Abadi MT Condensed Extra Bold","Abadi MT Condensed Light","Abyssinica SIL","AcmeFont","Adobe Arabic","Agency FB","Aharoni","Aharoni Bold","Al Bayan","Al Bayan Bold","Al Bayan Plain","Al Nile","Al Tarikh","Aldhabi","Alfredo","Algerian","Alien Encounters","Almonte Snow","American Typewriter","American Typewriter Bold","American Typewriter Condensed","American Typewriter Light","Amethyst","Andale Mono","Andale Mono Version","Andalus","Angsana New","AngsanaUPC","Ani","AnjaliOldLipi","Aparajita","Apple Braille","Apple Braille Outline 6 Dot","Apple Braille Outline 8 Dot","Apple Braille Pinpoint 6 Dot","Apple Braille Pinpoint 8 Dot","Apple Chancery","Apple Color Emoji","Apple LiGothic Medium","Apple LiSung Light","Apple SD Gothic Neo","Apple SD Gothic Neo Regular","Apple SD GothicNeo ExtraBold","Apple Symbols","AppleGothic","AppleGothic Regular","AppleMyungjo","AppleMyungjo Regular","AquaKana","Arabic Transparent","Arabic Typesetting","Arial","Arial Baltic","Arial Black","Arial Bold","Arial Bold Italic","Arial CE","Arial CYR","Arial Greek","Arial Hebrew","Arial Hebrew Bold","Arial Italic","Arial Narrow","Arial Narrow Bold","Arial Narrow Bold Italic","Arial Narrow Italic","Arial Rounded Bold","Arial Rounded MT Bold","Arial TUR","Arial Unicode MS","ArialHB","Arimo","Asimov","Autumn","Avenir","Avenir Black","Avenir Book","Avenir Next","Avenir Next Bold","Avenir Next Condensed","Avenir Next Condensed Bold","Avenir Next Demi Bold","Avenir Next Heavy","Avenir Next Regular","Avenir Roman","Ayuthaya","BN Jinx","BN Machine","BOUTON International Symbols","Baby Kruffy","Baghdad","Bahnschrift","Balthazar","Bangla MN","Bangla MN Bold","Bangla Sangam MN","Bangla Sangam MN Bold","Baskerville","Baskerville Bold","Baskerville Bold Italic","Baskerville Old Face","Baskerville SemiBold","Baskerville SemiBold Italic","Bastion","Batang","BatangChe","Bauhaus 93","Beirut","Bell MT","Bell MT Bold","Bell MT Italic","Bellerose","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BiauKai","Big Caslon","Big Caslon Medium","Birch Std","Bitstream Charter","Bitstream Vera Sans","Blackadder ITC","Blackoak Std","Bobcat","Bodoni 72","Bodoni MT","Bodoni MT Black","Bodoni MT Poster Compressed","Bodoni Ornaments","BolsterBold","Book Antiqua","Book Antiqua Bold","Bookman Old Style","Bookman Old Style Bold","Bookshelf Symbol 7","Borealis","Bradley Hand","Bradley Hand ITC","Braggadocio","Brandish","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script","Brush Script MT","Brush Script MT Italic","Brush Script Std","Brussels","Calibri","Calibri Bold","Calibri Light","Californian FB","Calisto MT","Calisto MT Bold","Calligraphic","Calvin","Cambria","Cambria Bold","Cambria Math","Candara","Candara Bold","Candles","Carrois Gothic SC","Castellar","Centaur","Century","Century Gothic","Century Gothic Bold","Century Schoolbook","Century Schoolbook Bold","Century Schoolbook L","Chalkboard","Chalkboard Bold","Chalkboard SE","Chalkboard SE Bold","ChalkboardBold","Chalkduster","Chandas","Chaparral Pro","Chaparral Pro Light","Charlemagne Std","Charter","Chilanka","Chiller","Chinyen","Clarendon","Cochin","Cochin Bold","Colbert","Colonna MT","Comic Sans MS","Comic Sans MS Bold","Commons","Consolas","Consolas Bold","Constantia","Constantia Bold","Coolsville","Cooper Black","Cooper Std Black","Copperplate","Copperplate Bold","Copperplate Gothic Bold","Copperplate Light","Corbel","Corbel Bold","Cordia New","CordiaUPC","Corporate","Corsiva","Corsiva Hebrew","Corsiva Hebrew Bold","Courier","Courier 10 Pitch","Courier Bold","Courier New","Courier New Baltic","Courier New Bold","Courier New CE","Courier New Italic","Courier Oblique","Cracked Johnnie","Creepygirl","Curlz MT","Cursor","Cutive Mono","DFKai-SB","DIN Alternate","DIN Condensed","Damascus","Damascus Bold","Dancing Script","DaunPenh","David","Dayton","DecoType Naskh","Deja Vu","DejaVu LGC Sans","DejaVu Sans","DejaVu Sans Mono","DejaVu Serif","Deneane","Desdemona","Detente","Devanagari MT","Devanagari MT Bold","Devanagari Sangam MN","Didot","Didot Bold","Digifit","DilleniaUPC","Dingbats","Distant Galaxy","Diwan Kufi","Diwan Kufi Regular","Diwan Thuluth","Diwan Thuluth Regular","DokChampa","Dominican","Dotum","DotumChe","Droid Sans","Droid Sans Fallback","Droid Sans Mono","Dyuthi","Ebrima","Edwardian Script ITC","Elephant","Emmett","Engravers MT","Engravers MT Bold","Enliven","Eras Bold ITC","Estrangelo Edessa","Ethnocentric","EucrosiaUPC","Euphemia","Euphemia UCAS","Euphemia UCAS Bold","Eurostile","Eurostile Bold","Expressway Rg","FangSong","Farah","Farisi","Felix Titling","Fingerpop","Fixedsys","Flubber","Footlight MT Light","Forte","FrankRuehl","Frankfurter Venetian TT","Franklin Gothic Book","Franklin Gothic Book Italic","Franklin Gothic Medium","Franklin Gothic Medium Cond","Franklin Gothic Medium Italic","FreeMono","FreeSans","FreeSerif","FreesiaUPC","Freestyle Script","French Script MT","Futura","Futura Condensed ExtraBold","Futura Medium","GB18030 Bitmap","Gabriola","Gadugi","Garamond","Garamond Bold","Gargi","Garuda","Gautami","Gazzarelli","Geeza Pro","Geeza Pro Bold","Geneva","GenevaCY","Gentium","Gentium Basic","Gentium Book Basic","GentiumAlt","Georgia","Georgia Bold","Geotype TT","Giddyup Std","Gigi","Gill","Gill Sans","Gill Sans Bold","Gill Sans MT","Gill Sans MT Bold","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans MT Italic","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Glockenspiel","Gloucester MT Extra Condensed","Good Times","Goudy","Goudy Old Style","Goudy Old Style Bold","Goudy Stout","Greek Diner Inline TT","Gubbi","Gujarati MT","Gujarati MT Bold","Gujarati Sangam MN","Gujarati Sangam MN Bold","Gulim","GulimChe","GungSeo Regular","Gungseouche","Gungsuh","GungsuhChe","Gurmukhi","Gurmukhi MN","Gurmukhi MN Bold","Gurmukhi MT","Gurmukhi Sangam MN","Gurmukhi Sangam MN Bold","Haettenschweiler","Hand Me Down S (BRK)","Hansen","Harlow Solid Italic","Harrington","Harvest","HarvestItal","Haxton Logos TT","HeadLineA Regular","HeadlineA","Heavy Heap","Hei","Hei Regular","Heiti SC","Heiti SC Light","Heiti SC Medium","Heiti TC","Heiti TC Light","Heiti TC Medium","Helvetica","Helvetica Bold","Helvetica CY Bold","Helvetica CY Plain","Helvetica LT Std","Helvetica Light","Helvetica Neue","Helvetica Neue Bold","Helvetica Neue Medium","Helvetica Oblique","HelveticaCY","HelveticaNeueLT Com 107 XBlkCn","Herculanum","High Tower Text","Highboot","Hiragino Kaku Gothic Pro W3","Hiragino Kaku Gothic Pro W6","Hiragino Kaku Gothic ProN W3","Hiragino Kaku Gothic ProN W6","Hiragino Kaku Gothic Std W8","Hiragino Kaku Gothic StdN W8","Hiragino Maru Gothic Pro W4","Hiragino Maru Gothic ProN W4","Hiragino Mincho Pro W3","Hiragino Mincho Pro W6","Hiragino Mincho ProN W3","Hiragino Mincho ProN W6","Hiragino Sans GB W3","Hiragino Sans GB W6","Hiragino Sans W0","Hiragino Sans W1","Hiragino Sans W2","Hiragino Sans W3","Hiragino Sans W4","Hiragino Sans W5","Hiragino Sans W6","Hiragino Sans W7","Hiragino Sans W8","Hiragino Sans W9","Hobo Std","Hoefler Text","Hoefler Text Black","Hoefler Text Ornaments","Hollywood Hills","Hombre","Huxley Titling","ITC Stone Serif","ITF Devanagari","ITF Devanagari Marathi","ITF Devanagari Medium","Impact","Imprint MT Shadow","InaiMathi","Induction","Informal Roman","Ink Free","IrisUPC","Iskoola Pota","Italianate","Jamrul","JasmineUPC","Javanese Text","Jokerman","Juice ITC","KacstArt","KacstBook","KacstDecorative","KacstDigital","KacstFarsi","KacstLetter","KacstNaskh","KacstOffice","KacstOne","KacstPen","KacstPoster","KacstQurn","KacstScreen","KacstTitle","KacstTitleL","Kai","Kai Regular","KaiTi","Kailasa","Kailasa Regular","Kaiti SC","Kaiti SC Black","Kalapi","Kalimati","Kalinga","Kannada MN","Kannada MN Bold","Kannada Sangam MN","Kannada Sangam MN Bold","Kartika","Karumbi","Kedage","Kefa","Kefa Bold","Keraleeyam","Keyboard","Khmer MN","Khmer MN Bold","Khmer OS","Khmer OS System","Khmer Sangam MN","Khmer UI","Kinnari","Kino MT","KodchiangUPC","Kohinoor Bangla","Kohinoor Devanagari","Kohinoor Telugu","Kokila","Kokonor","Kokonor Regular","Kozuka Gothic Pr6N B","Kristen ITC","Krungthep","KufiStandardGK","KufiStandardGK Regular","Kunstler Script","Laksaman","Lao MN","Lao Sangam MN","Lao UI","LastResort","Latha","Leelawadee","Letter Gothic Std","LetterOMatic!","Levenim MT","LiHei Pro","LiSong Pro","Liberation Mono","Liberation Sans","Liberation Sans Narrow","Liberation Serif","Likhan","LilyUPC","Limousine","Lithos Pro Regular","LittleLordFontleroy","Lohit Assamese","Lohit Bengali","Lohit Devanagari","Lohit Gujarati","Lohit Gurmukhi","Lohit Hindi","Lohit Kannada","Lohit Malayalam","Lohit Odia","Lohit Punjabi","Lohit Tamil","Lohit Tamil Classical","Lohit Telugu","Loma","Lucida Blackletter","Lucida Bright","Lucida Bright Demibold","Lucida Bright Demibold Italic","Lucida Bright Italic","Lucida Calligraphy","Lucida Calligraphy Italic","Lucida Console","Lucida Fax","Lucida Fax Demibold","Lucida Fax Regular","Lucida Grande","Lucida Grande Bold","Lucida Handwriting","Lucida Handwriting Italic","Lucida Sans","Lucida Sans Demibold Italic","Lucida Sans Typewriter","Lucida Sans Typewriter Bold","Lucida Sans Unicode","Luminari","Luxi Mono","MS Gothic","MS Mincho","MS Outlook","MS PGothic","MS PMincho","MS Reference Sans Serif","MS Reference Specialty","MS Sans Serif","MS Serif","MS UI Gothic","MT Extra","MV Boli","Mael","Magneto","Maiandra GD","Malayalam MN","Malayalam MN Bold","Malayalam Sangam MN","Malayalam Sangam MN Bold","Malgun Gothic","Mallige","Mangal","Manorly","Marion","Marion Bold","Marker Felt","Marker Felt Thin","Marlett","Martina","Matura MT Script Capitals","Meera","Meiryo","Meiryo Bold","Meiryo UI","MelodBold","Menlo","Menlo Bold","Mesquite Std","Microsoft","Microsoft Himalaya","Microsoft JhengHei","Microsoft JhengHei UI","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Sans Serif","Microsoft Tai Le","Microsoft Tai Le Bold","Microsoft Uighur","Microsoft YaHei","Microsoft YaHei UI","Microsoft Yi Baiti","Minerva","MingLiU","MingLiU-ExtB","MingLiU_HKSCS","Minion Pro","Miriam","Mishafi","Mishafi Gold","Mistral","Modern","Modern No. 20","Monaco","Mongolian Baiti","Monospace","Monotype Corsiva","Monotype Sorts","MoolBoran","Moonbeam","MotoyaLMaru","Mshtakan","Mshtakan Bold","Mukti Narrow","Muna","Myanmar MN","Myanmar MN Bold","Myanmar Sangam MN","Myanmar Text","Mycalc","Myriad Arabic","Myriad Hebrew","Myriad Pro","NISC18030","NSimSun","Nadeem","Nadeem Regular","Nakula","Nanum Barun Gothic","Nanum Gothic","Nanum Myeongjo","NanumBarunGothic","NanumGothic","NanumGothic Bold","NanumGothicCoding","NanumMyeongjo","NanumMyeongjo Bold","Narkisim","Nasalization","Navilu","Neon Lights","New Peninim MT","New Peninim MT Bold","News Gothic MT","News Gothic MT Bold","Niagara Engraved","Niagara Solid","Nimbus Mono L","Nimbus Roman No9 L","Nimbus Sans L","Nimbus Sans L Condensed","Nina","Nirmala UI","Nirmala.ttf","Norasi","Noteworthy","Noteworthy Bold","Noto Color Emoji","Noto Emoji","Noto Mono","Noto Naskh Arabic","Noto Nastaliq Urdu","Noto Sans","Noto Sans Armenian","Noto Sans Bengali","Noto Sans CJK","Noto Sans Canadian Aboriginal","Noto Sans Cherokee","Noto Sans Devanagari","Noto Sans Ethiopic","Noto Sans Georgian","Noto Sans Gujarati","Noto Sans Gurmukhi","Noto Sans Hebrew","Noto Sans JP","Noto Sans KR","Noto Sans Kannada","Noto Sans Khmer","Noto Sans Lao","Noto Sans Malayalam","Noto Sans Myanmar","Noto Sans Oriya","Noto Sans SC","Noto Sans Sinhala","Noto Sans Symbols","Noto Sans TC","Noto Sans Tamil","Noto Sans Telugu","Noto Sans Thai","Noto Sans Yi","Noto Serif","Notram","November","Nueva Std","Nueva Std Cond","Nyala","OCR A Extended","OCR A Std","Old English Text MT","OldeEnglish","Onyx","OpenSymbol","OpineHeavy","Optima","Optima Bold","Optima Regular","Orator Std","Oriya MN","Oriya MN Bold","Oriya Sangam MN","Oriya Sangam MN Bold","Osaka","Osaka-Mono","OsakaMono","PCMyungjo Regular","PCmyoungjo","PMingLiU","PMingLiU-ExtB","PR Celtic Narrow","PT Mono","PT Sans","PT Sans Bold","PT Sans Caption Bold","PT Sans Narrow Bold","PT Serif","Padauk","Padauk Book","Padmaa","Pagul","Palace Script MT","Palatino","Palatino Bold","Palatino Linotype","Palatino Linotype Bold","Papyrus","Papyrus Condensed","Parchment","Parry Hotter","PenultimateLight","Perpetua","Perpetua Bold","Perpetua Titling MT","Perpetua Titling MT Bold","Phetsarath OT","Phosphate","Phosphate Inline","Phosphate Solid","PhrasticMedium","PilGi Regular","Pilgiche","PingFang HK","PingFang SC","PingFang TC","Pirate","Plantagenet Cherokee","Playbill","Poor Richard","Poplar Std","Pothana2000","Prestige Elite Std","Pristina","Purisa","QuiverItal","Raanana","Raanana Bold","Raavi","Rachana","Rage Italic","RaghuMalayalam","Ravie","Rekha","Roboto","Rockwell","Rockwell Bold","Rockwell Condensed","Rockwell Extra Bold","Rockwell Italic","Rod","Roland","Rondalo","Rosewood Std Regular","RowdyHeavy","Russel Write TT","SF Movie Poster","STFangsong","STHeiti","STIXGeneral","STIXGeneral-Bold","STIXGeneral-Regular","STIXIntegralsD","STIXIntegralsD-Bold","STIXIntegralsSm","STIXIntegralsSm-Bold","STIXIntegralsUp","STIXIntegralsUp-Bold","STIXIntegralsUp-Regular","STIXIntegralsUpD","STIXIntegralsUpD-Bold","STIXIntegralsUpD-Regular","STIXIntegralsUpSm","STIXIntegralsUpSm-Bold","STIXNonUnicode","STIXNonUnicode-Bold","STIXSizeFiveSym","STIXSizeFiveSym-Regular","STIXSizeFourSym","STIXSizeFourSym-Bold","STIXSizeOneSym","STIXSizeOneSym-Bold","STIXSizeThreeSym","STIXSizeThreeSym-Bold","STIXSizeTwoSym","STIXSizeTwoSym-Bold","STIXVariants","STIXVariants-Bold","STKaiti","STSong","STXihei","SWGamekeys MT","Saab","Sahadeva","Sakkal Majalla","Salina","Samanata","Samyak Devanagari","Samyak Gujarati","Samyak Malayalam","Samyak Tamil","Sana","Sana Regular","Sans","Sarai","Sathu","Savoye LET Plain:1.0","Sawasdee","Script","Script MT Bold","Segoe MDL2 Assets","Segoe Print","Segoe Pseudo","Segoe Script","Segoe UI","Segoe UI Emoji","Segoe UI Historic","Segoe UI Semilight","Segoe UI Symbol","Serif","Shonar Bangla","Showcard Gothic","Shree Devanagari 714","Shruti","SignPainter-HouseScript","Silom","SimHei","SimSun","SimSun-ExtB","Simplified Arabic","Simplified Arabic Fixed","Sinhala MN","Sinhala MN Bold","Sinhala Sangam MN","Sinhala Sangam MN Bold","Sitka","Skia","Skia Regular","Skinny","Small Fonts","Snap ITC","Snell Roundhand","Snowdrift","Songti SC","Songti SC Black","Songti TC","Source Code Pro","Splash","Standard Symbols L","Stencil","Stencil Std","Stephen","Sukhumvit Set","Suruma","Sylfaen","Symbol","Symbole","System","System Font","TAMu_Kadambri","TAMu_Kalyani","TAMu_Maduram","TSCu_Comic","TSCu_Paranar","TSCu_Times","Tahoma","Tahoma Negreta","TakaoExGothic","TakaoExMincho","TakaoGothic","TakaoMincho","TakaoPGothic","TakaoPMincho","Tamil MN","Tamil MN Bold","Tamil Sangam MN","Tamil Sangam MN Bold","Tarzan","Tekton Pro","Tekton Pro Cond","Tekton Pro Ext","Telugu MN","Telugu MN Bold","Telugu Sangam MN","Telugu Sangam MN Bold","Tempus Sans ITC","Terminal","Terminator Two","Thonburi","Thonburi Bold","Tibetan Machine Uni","Times","Times Bold","Times New Roman","Times New Roman Baltic","Times New Roman Bold","Times New Roman Italic","Times Roman","Tlwg Mono","Tlwg Typewriter","Tlwg Typist","Tlwg Typo","TlwgMono","TlwgTypewriter","Toledo","Traditional Arabic","Trajan Pro","Trattatello","Trebuchet MS","Trebuchet MS Bold","Tunga","Tw Cen MT","Tw Cen MT Bold","Tw Cen MT Italic","URW Bookman L","URW Chancery L","URW Gothic L","URW Palladio L","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ukai","Ume Gothic","Ume Mincho","Ume P Gothic","Ume P Mincho","Ume UI Gothic","Uming","Umpush","UnBatang","UnDinaru","UnDotum","UnGraphic","UnGungseo","UnPilgi","Untitled1","Urdu Typesetting","Uroob","Utkal","Utopia","Utsaah","Valken","Vani","Vemana2000","Verdana","Verdana Bold","Vijaya","Viner Hand ITC","Vivaldi","Vivian","Vladimir Script","Vrinda","Waree","Waseem","Waverly","Webdings","WenQuanYi Bitmap Song","WenQuanYi Micro Hei","WenQuanYi Micro Hei Mono","WenQuanYi Zen Hei","Whimsy TT","Wide Latin","Wingdings","Wingdings 2","Wingdings 3","Woodcut","X-Files","Year supply of fairy cakes","Yu Gothic","Yu Mincho","Yuppy SC","Yuppy SC Regular","Yuppy TC","Yuppy TC Regular","Zapf Dingbats","Zapfino","Zawgyi-One","gargi","lklug","mry_KacstQurn","ori1Uni"]')},j="40px",z="IDScan2023",K="sans-serif",X=document.body,W={};async function q(){!function(){const t=document.createElement("span");t.style.fontSize=j,t.textContent=z,t.style.fontFamily=K,X.appendChild(t),W[K]={width:t.offsetWidth,height:t.offsetHeight},X.removeChild(t)}();const t=new Array(V.fonts.length).fill(!1),e=new DocumentFragment,n=V.fonts.map(async t=>{const e=document.createElement("span");return e.style.fontSize=j,e.textContent=z,e.style.fontFamily=`"${t}",${K}`,e});return await Promise.all(n).then(n=>{n.forEach(t=>e.appendChild(t));const o=document.createElement("div");X.appendChild(o),o.append(e),Array.from(o.children).forEach((e,n)=>{const o=e.offsetWidth!==W[K].width||e.offsetHeight!==W[K].height;t[n]=o}),o.remove()}),t}const Y={videoCodecs:["video/mp4; codecs=avc1.42E01E","video/mp4; codecs=mp4a.40.2","video/webm; codecs=vorbis","video/webm; codecs=vp8","video/webm; codecs=vp9","video/ogg; codecs=vorbis","video/ogg; codecs=theora","video/mp4; codecs=hev1","application/vnd.apple.mpegurl; codecs=avc1.42E01E, mp4a.40.2"],audioCodecs:["audio/mpeg","audio/aac","audio/alac","audio/flac","audio/ogg; codecs=vorbis","audio/ogg; codecs=opus","audio/flac","audio/webm; codecs=vorbis","audio/webm; codecs=opus","audio/mp4"],apiKeys:["history","speechSynthesis","webkitSpeechRecognition","IntersectionObserver","ResizeObserver","PushManager","TextTrack","postMessage","structuredClone","worker","SharedWorker","ServiceWorker"],inputTypes:["color","date","datetime-local","datetime","email","month","number","password","search","tel","text","time","url","week","file","range"],inputAvailableAttributes:["accept","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","value","width"]};function Q(){const t=document.createElement("audio");return Y.audioCodecs.reduce((e,n)=>(e[n]=!!t.canPlayType(n),e),{})}function Z(){const t=document.createElement("input");return{inputTypes:Y.inputTypes.reduce((e,n)=>(t.setAttribute("type",n),e[n]=t.type===n,e),{}),inputAvailableAttributes:Y.inputAvailableAttributes.reduce((e,n)=>(e[n]=n in t,e),{})}}const $={WebGLConstants:["ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE","ALPHA_BITS","BLUE_BITS","DEPTH_BITS","GREEN_BITS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_CUBE_MAP_TEXTURE_SIZE","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_RENDERBUFFER_SIZE","MAX_TEXTURE_IMAGE_UNITS","MAX_TEXTURE_SIZE","MAX_VARYING_VECTORS","MAX_VERTEX_ATTRIBS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_UNIFORM_VECTORS","MAX_VIEWPORT_DIMS","RED_BITS","RENDERER","SHADING_LANGUAGE_VERSION","STENCIL_BITS","VERSION"],WebGL2Constants:["MAX_VARYING_COMPONENTS","MAX_VERTEX_UNIFORM_COMPONENTS","MAX_VERTEX_UNIFORM_BLOCKS","MAX_VERTEX_OUTPUT_COMPONENTS","MAX_PROGRAM_TEXEL_OFFSET","MAX_3D_TEXTURE_SIZE","MAX_ARRAY_TEXTURE_LAYERS","MAX_COLOR_ATTACHMENTS","MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS","MAX_COMBINED_UNIFORM_BLOCKS","MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS","MAX_DRAW_BUFFERS","MAX_ELEMENT_INDEX","MAX_FRAGMENT_INPUT_COMPONENTS","MAX_FRAGMENT_UNIFORM_COMPONENTS","MAX_FRAGMENT_UNIFORM_BLOCKS","MAX_SAMPLES","MAX_SERVER_WAIT_TIMEOUT","MAX_TEXTURE_LOD_BIAS","MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS","MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS","MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS","MAX_UNIFORM_BLOCK_SIZE","MAX_UNIFORM_BUFFER_BINDINGS","MIN_PROGRAM_TEXEL_OFFSET","UNIFORM_BUFFER_OFFSET_ALIGNMENT"],Categories:{uniformBuffers:["MAX_UNIFORM_BUFFER_BINDINGS","MAX_UNIFORM_BLOCK_SIZE","UNIFORM_BUFFER_OFFSET_ALIGNMENT","MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS","MAX_COMBINED_UNIFORM_BLOCKS","MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS"],debugRendererInfo:["UNMASKED_VENDOR_WEBGL","UNMASKED_RENDERER_WEBGL"],fragmentShader:["MAX_FRAGMENT_UNIFORM_VECTORS","MAX_TEXTURE_IMAGE_UNITS","MAX_FRAGMENT_INPUT_COMPONENTS","MAX_FRAGMENT_UNIFORM_COMPONENTS","MAX_FRAGMENT_UNIFORM_BLOCKS","FRAGMENT_SHADER_BEST_FLOAT_PRECISION","MIN_PROGRAM_TEXEL_OFFSET","MAX_PROGRAM_TEXEL_OFFSET"],frameBuffer:["MAX_DRAW_BUFFERS","MAX_COLOR_ATTACHMENTS","MAX_SAMPLES","RGBA_BITS","DEPTH_STENCIL_BITS","MAX_RENDERBUFFER_SIZE","MAX_VIEWPORT_DIMS"],rasterizer:["ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE"],textures:["MAX_TEXTURE_SIZE","MAX_CUBE_MAP_TEXTURE_SIZE","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_TEXTURE_MAX_ANISOTROPY_EXT","MAX_3D_TEXTURE_SIZE","MAX_ARRAY_TEXTURE_LAYERS","MAX_TEXTURE_LOD_BIAS"],transformFeedback:["MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS","MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS","MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS"],vertexShader:["MAX_VARYING_VECTORS","MAX_VERTEX_ATTRIBS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_UNIFORM_VECTORS","MAX_VERTEX_UNIFORM_COMPONENTS","MAX_VERTEX_UNIFORM_BLOCKS","MAX_VERTEX_OUTPUT_COMPONENTS","MAX_VARYING_COMPONENTS","VERTEX_SHADER_BEST_FLOAT_PRECISION"],webGLContextInfo:["CONTEXT","ANTIALIAS","DIRECT_3D","MAJOR_PERFORMANCE_CAVEAT","RENDERER","SHADING_LANGUAGE_VERSION","VERSION"]}};function J(t){try{const e=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic");return t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}catch(e){return void console.error(e)}}function tt(t){try{const e=t.getExtension("WEBGL_draw_buffers")||t.getExtension("WEBKIT_WEBGL_draw_buffers")||t.getExtension("MOZ_WEBGL_draw_buffers");return t.getParameter(e.MAX_DRAW_BUFFERS_WEBGL)}catch(e){return}}function et(t){const e={};try{return Object.keys(t).forEach(n=>{const o=t[n];e[n]={precision:o.precision,rangeMax:o.rangeMax,rangeMin:o.rangeMin}}),e}catch(n){return}}function nt(t,e){const n=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT"],o={};try{return n.forEach(n=>{o[n]=t.getShaderPrecisionFormat(t[e],t[n])}),o}catch(i){return}}function ot(t,e){try{const n=t.getExtension("WEBGL_debug_renderer_info");return t.getParameter(n[e])}catch(n){return}}function it(t){return t?[...new Set(Object.values(t).filter(t=>t&&"string"!=typeof t).flat().map(t=>Number(t)||0))].sort((t,e)=>t-e):[]}function at(t){var e;const n=[];let o={};const i=/^webgl$/.test(t)&&"WebGLRenderingContext"in window,a=/^webgl2$/.test(t)&&"WebGLRenderingContext"in window;if(!i&&!a)return n.push("not supported"),[o,n];let r,s,l,c;try{if(r=document.createElement("canvas"),s=r.getContext(t,{failIfMajorPerformanceCaveat:!0}),!s&&(l=!0,s=r.getContext(t),!s))throw new Error("context of type "+typeof s)}catch(g){return console.error(g),n.push("context blocked"),[o,n]}try{c=s.getSupportedExtensions()}catch(m){console.error(m),n.push("extensions blocked")}let d={};try{const n=et(nt(s,"VERTEX_SHADER")),o=et(nt(s,"FRAGMENT_SHADER"));d={ANTIALIAS:null==(e=null==s?void 0:s.getContextAttributes())?void 0:e.antialias,CONTEXT:t,MAJOR_PERFORMANCE_CAVEAT:l,MAX_TEXTURE_MAX_ANISOTROPY_EXT:J(s),MAX_DRAW_BUFFERS_WEBGL:tt(s),VERTEX_SHADER:n,VERTEX_SHADER_BEST_FLOAT_PRECISION:Object.values(null==n?void 0:n.HIGH_FLOAT),FRAGMENT_SHADER:o,FRAGMENT_SHADER_BEST_FLOAT_PRECISION:Object.values(null==o?void 0:o.HIGH_FLOAT),UNMASKED_VENDOR_WEBGL:ot(s,"UNMASKED_VENDOR_WEBGL"),UNMASKED_RENDERER_WEBGL:ot(s,"UNMASKED_RENDERER_WEBGL")};[...$.WebGLConstants,...a?$.WebGL2Constants:[]].forEach(t=>{const e=null==s?void 0:s.getParameter(s[t]),n=e&&(e.constructor===Float32Array||e.constructor===Int32Array);d[t]=n?[...e]:e}),d.RGBA_BITS=[d.RED_BITS,d.GREEN_BITS,d.BLUE_BITS,d.ALPHA_BITS],d.DEPTH_STENCIL_BITS=[d.DEPTH_BITS,d.STENCIL_BITS],d.DIRECT_3D=/Direct3D|D3D(\d+)/.test(d.UNMASKED_RENDERER_WEBGL)}catch(m){console.error(m),n.push("parameters blocked")}const u=String([d.UNMASKED_VENDOR_WEBGL,d.UNMASKED_RENDERER_WEBGL]),h=function(t){if(!t)return"";const e=/(adreno|amd|apple|intel|llvm|mali|microsoft|nvidia|parallels|powervr|samsung|swiftshader|virtualbox|vmware)/i;let n;return n=/radeon/i.test(t)?"AMD":/geforce/i.test(t)?"NVIDIA":(e.exec(t)||[])[0]||"Other",n}(u),p={};return d&&Object.keys($.Categories).forEach(t=>{const e=$.Categories[t].reduce((t,e)=>(void 0!==d[e]&&(t[e]=d[e]),t),{});Object.keys(e).length&&(p[t]=e)}),o={gpuHash:d?[h,...it(d)].join(":"):void 0,gpu:u,gpuBrand:h,...p,webGLExtensions:c},[o,n]}const rt={browserInfo:async function(){return{internationalizationInfo:U(),navigatorInfo:G(),availableNavigatorApiInfo:F.apiKeys.reduce((t,e)=>(t[e]=!!window.navigator[e],t),{}),additionalApiInfo:["BatteryManager","NetworkInformation"].reduce((t,e)=>(t[e]=!!window.navigator[e],t),{})}},screenInfo:async function(){const{width:t,height:e,availWidth:n,availHeight:o,colorDepth:i,pixelDepth:a,orientation:r}=window.screen,{innerWidth:s,innerHeight:l,outerWidth:c,outerHeight:d}=window;return{width:t,height:e,availWidth:n,availHeight:o,colorDepth:i,pixelDepth:a,orientationAngle:r.angle,orientationType:r.type,innerWidth:s,innerHeight:l,outerWidth:c,outerHeight:d}},batteryInfo:async function(){if(null==navigator?void 0:navigator.getBattery){const{charging:t,chargingTime:e,dischargingTime:n,level:o}=await navigator.getBattery();return{charging:t,chargingTime:e,dischargingTime:n,level:o}}return{}},connectionInfo:async function(){if(navigator.connection){const{effectiveType:t,downlink:e,rtt:n,saveData:o,type:i,downlinkMax:a}=navigator.connection;return{effectiveType:t,downlink:e,rtt:n,saveData:o,type:i,downlinkMax:a}}return{}},canvasInfo:async function(){const t=document.createElement("canvas"),e=t.getContext("2d");e.canvas.width=500,e.fillStyle="rgb(255,0,255)",e.beginPath(),e.rect(20,20,150,100),e.fill(),e.stroke(),e.closePath(),e.beginPath(),e.fillStyle="rgb(0,255,255)",e.arc(50,50,50,0,2*Math.PI,!0),e.fill(),e.stroke(),e.closePath();const n="i9as..$#po((^@KbXrw!~cz#$%^@£éúöüà情報çõ能的Fr<🍏🍎🍐🍊🍋";return e.textBaseline="top",e.font="14px 'Arial'",e.textBaseline="alphabetic",e.fillStyle="rgb(255,5,5)",e.rotate(.03),e.fillText(n,4,17),e.fillStyle="#069",e.fillText(n,2,15),e.fillStyle="rgba(102, 204, 0, 0.7)",e.fillText(n,4,17),e.shadowBlur=8,e.shadowColor="red",e.fillRect(20,12,100,5),e.globalCompositeOperation="multiply",e.fillStyle="rgb(255,0,255)",e.beginPath(),e.arc(50,50,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(0,255,255)",e.beginPath(),e.arc(100,50,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(255,255,0)",e.beginPath(),e.arc(75,100,50,0,2*Math.PI,!0),e.closePath(),e.fill(),e.fillStyle="rgb(255,0,255)",e.arc(75,75,75,0,2*Math.PI,!0),e.arc(75,75,25,0,2*Math.PI,!0),e.fill("evenodd"),H(t.toDataURL())},fontsInfo:async function(){return{availableFontsInfo:await q()}},HTML5Info:async function(){return{audioInfo:Q(),availableAPIInfo:Y.apiKeys.reduce((t,e)=>(t[e]=!!window[e],t),{}),inputInfo:Z()}},videoCodecsInfo:async function(){const t=document.createElement("video");return Y.videoCodecs.reduce((e,n)=>(e[n]=t.canPlayType(n),e),{})},timeZoneInfo:async function(){var t,e;return window.Intl?null==(e=null==(t=Intl.DateTimeFormat())?void 0:t.resolvedOptions())?void 0:e.timeZone:""},webGLInfo:async function(){const t=await Promise.allSettled([at("webgl"),at("webgl2")]),[e,n]=t;return{webGL:{result:"rejected"!==e.status?e.value[0]:{},errors:"rejected"!==e.status?e.value[1]:[]},webGL2:{result:"rejected"!==n.status?n.value[0]:{},errors:"rejected"!==n.status?n.value[1]:[]}}},utils:{sha256:H}},st=async()=>({browserMetadata:await(async()=>{const[{value:t},{value:e},{value:n},{value:o}]=await Promise.allSettled([rt.browserInfo(),rt.screenInfo(),rt.batteryInfo(),rt.connectionInfo()]),{sha256:i}=rt.utils,[{value:a},{value:r},{value:s},{value:l},{value:c}]=await Promise.allSettled([i(JSON.stringify(t)),i(JSON.stringify(await rt.canvasInfo())),i(JSON.stringify(await rt.fontsInfo())),i(JSON.stringify(await rt.HTML5Info())),i(JSON.stringify(await rt.webGLInfo()))]);return{navigatorInfo:t.navigatorInfo,screenInfo:e,batteryInfo:n,connectionInfo:o,browserInfo:a,canvasInfo:r,fontsInfo:s,html5Info:l,webGlInfo:c}})(),deviceMetadata:await(async()=>({timeZone:await rt.timeZoneInfo(),userLanguage:navigator.language}))()});var lt,ct,dt={};var ut,ht={},pt={};function gt(){if(ut)return pt;let t;ut=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 pt.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},pt.getSymbolTotalCodewords=function(t){return e[t]},pt.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},pt.setToSJISFunction=function(e){if("function"!=typeof e)throw new Error('"toSJISFunc" is not a valid function.');t=e},pt.isKanjiModeEnabled=function(){return void 0!==t},pt.toSJIS=function(e){return t(e)},pt}var mt,ft,vt,yt,bt,Mt={};function St(){return mt||(mt=1,(t=Mt).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}}),Mt;var t}var wt,Et={};var Ct,_t={};var Tt,At={};var It,Nt={};function Bt(){if(It)return Nt;It=1;const t=St(),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 Nt.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}},Nt.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}},Nt}var Lt,Rt,xt,Dt,kt={},Pt={};function Ot(){return Rt||(Rt=1,function(t){const e=function(){if(Lt)return Pt;Lt=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]}(),Pt.log=function(t){if(t<1)throw new Error("log("+t+")");return e[t]},Pt.exp=function(e){return t[e]},Pt.mul=function(n,o){return 0===n||0===o?0:t[e[n]+e[o]]},Pt}();t.mul=function(t,n){const o=new Uint8Array(t.length+n.length-1);for(let i=0;i<t.length;i++)for(let a=0;a<n.length;a++)o[i+a]^=e.mul(t[i],n[a]);return o},t.mod=function(t,n){let o=new Uint8Array(t);for(;o.length-n.length>=0;){const t=o[0];for(let a=0;a<n.length;a++)o[a]^=e.mul(n[a],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}}(kt)),kt}var Ft,Ut={},Gt={},Ht={};function Vt(){return Ft||(Ft=1,Ht.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Ht}var jt,zt,Kt,Xt={};function Wt(){if(jt)return Xt;jt=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]))+";Xt.KANJI=new RegExp(e,"g"),Xt.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Xt.BYTE=new RegExp(n,"g"),Xt.NUMERIC=new RegExp(t,"g"),Xt.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+e+"$"),i=new RegExp("^"+t+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Xt.testKanji=function(t){return o.test(t)},Xt.testNumeric=function(t){return i.test(t)},Xt.testAlphanumeric=function(t){return a.test(t)},Xt}function qt(){return zt||(zt=1,function(t){const e=Vt(),n=Wt();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}}}(Gt)),Gt}function Yt(){return Kt||(Kt=1,function(t){const e=gt(),n=Bt(),o=St(),i=qt(),a=Vt(),r=e.getBCHDigit(7973);function s(t,e){return i.getCharCountIndicator(t,e)+4}function l(t,e){let n=0;return t.forEach(function(t){const o=s(t.mode,e);n+=o+t.getBitsLength()}),n}t.from=function(t,e){return a.isValid(t)?parseInt(t,10):e},t.getCapacity=function(t,o,r){if(!a.isValid(t))throw new Error("Invalid QR Code version");void 0===r&&(r=i.BYTE);const l=8*(e.getSymbolTotalCodewords(t)-n.getTotalCodewordsCount(t,o));if(r===i.MIXED)return l;const c=l-s(r,t);switch(r){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let a;const r=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(l(e,o)<=t.getCapacity(o,n,i.MIXED))return o}(e,r);if(0===e.length)return 1;a=e[0]}else a=e;return function(e,n,o){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,o,e))return i}(a.mode,a.getLength(),r)},t.getEncodedBits=function(t){if(!a.isValid(t)||t<7)throw new Error("Invalid QR Code version");let n=t<<12;for(;e.getBCHDigit(n)-r>=0;)n^=7973<<e.getBCHDigit(n)-r;return t<<12|n}}(Ut)),Ut}var Qt,Zt={};var $t,Jt,te,ee,ne,oe,ie,ae,re={};var se,le,ce,de={exports:{}};function ue(){return le||(le=1,function(t){const e=qt(),n=function(){if(Jt)return $t;Jt=1;const t=qt();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))},$t=e}(),o=function(){if(ee)return te;ee=1;const t=qt(),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)},te=n}(),i=function(){if(oe)return ne;oe=1;const t=qt();function e(e){this.mode=t.BYTE,this.data="string"==typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}return e.getBitsLength=function(t){return 8*t},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},ne=e}(),a=function(){if(ae)return ie;ae=1;const t=qt(),e=gt();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)}},ie=n}(),r=Wt(),s=gt(),l=function(){return se||(se=1,de.exports=t={single_source_shortest_paths:function(e,n,o){var i={},a={};a[n]=0;var r,s,l,c,d,u,h,p=t.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(l in s=(r=p.pop()).value,c=r.cost,d=e[s]||{})d.hasOwnProperty(l)&&(u=c+d[l],h=a[l],(void 0===a[l]||h>u)&&(a[l]=u,p.push(l,u),i[l]=s));if(void 0!==o&&void 0===a[o]){var g=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(g)}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}}}),de.exports;var t}();function c(t){return unescape(encodeURIComponent(t)).length}function d(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=d(r.NUMERIC,e.NUMERIC,t),o=d(r.ALPHANUMERIC,e.ALPHANUMERIC,t);let i,a;s.isKanjiModeEnabled()?(i=d(r.BYTE,e.BYTE,t),a=d(r.KANJI,e.KANJI,t)):(i=d(r.BYTE_KANJI,e.BYTE,t),a=[]);return n.concat(o,i,a).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,r){switch(r){case e.NUMERIC:return n.getBitsLength(t);case e.ALPHANUMERIC:return o.getBitsLength(t);case e.KANJI:return a.getBitsLength(t);case e.BYTE:return i.getBitsLength(t)}}function p(t,r){let l;const c=e.getBestModeForData(t);if(l=e.from(r,c),l!==e.BYTE&&l.bit<c.bit)throw new Error('"'+t+'" cannot be encoded with mode '+e.toString(l)+".\n Suggested mode is: "+e.toString(c));switch(l!==e.KANJI||s.isKanjiModeEnabled()||(l=e.BYTE),l){case e.NUMERIC:return new n(t);case e.ALPHANUMERIC:return new o(t);case e.KANJI:return new a(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:c(i.data)}]);break;case e.BYTE:n.push([{data:i.data,mode:e.BYTE,length:c(i.data)}])}}return n}(u(n,s.isKanjiModeEnabled())),a=function(t,n){const o={},i={start:{}};let a=["start"];for(let r=0;r<t.length;r++){const s=t[r],l=[];for(let t=0;t<s.length;t++){const c=s[t],d=""+r+t;l.push(d),o[d]={node:c,lastCount:0},i[d]={};for(let t=0;t<a.length;t++){const r=a[t];o[r]&&o[r].node.mode===c.mode?(i[r][d]=h(o[r].lastCount+c.length,c.mode)-h(o[r].lastCount,c.mode),o[r].lastCount+=c.length):(o[r]&&(o[r].lastCount=c.length),i[r][d]=h(c.length,c.mode)+4+e.getCharCountIndicator(c.mode,n))}}a=l}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:o}}(i,o),r=l.find_path(a.map,"start","end"),d=[];for(let t=1;t<r.length-1;t++)d.push(a.table[r[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)},[])}(d))},t.rawSplit=function(e){return t.fromArray(u(e,s.isKanjiModeEnabled()))}}(re)),re}function he(){if(ce)return ht;ce=1;const t=gt(),e=St(),n=function(){if(vt)return ft;function t(){this.buffer=[],this.length=0}return vt=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++}},ft=t}(),o=function(){if(bt)return yt;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 bt=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]},yt=t}(),i=(wt||(wt=1,function(t){const e=gt().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)),a=[o-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.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}}(Et)),Et),a=function(){if(Ct)return _t;Ct=1;const t=gt().getSymbolSize;return _t.getPositions=function(e){const n=t(e);return[[0,0],[n-7,0],[0,n-7]]},_t}(),r=(Tt||(Tt=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 a(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,a=0,r=null,s=null;for(let l=0;l<n;l++){i=a=0,r=s=null;for(let c=0;c<n;c++){let n=t.get(l,c);n===r?i++:(i>=5&&(o+=e+(i-5)),r=n,i=1),n=t.get(c,l),n===s?a++:(a>=5&&(o+=e+(a-5)),s=n,a=1)}i>=5&&(o+=e+(i-5)),a>=5&&(o+=e+(a-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,a=0;for(let o=0;o<e;o++){i=a=0;for(let r=0;r<e;r++)i=i<<1&2047|t.get(o,r),r>=10&&(1488===i||93===i)&&n++,a=a<<1&2047|t.get(r,o),r>=10&&(1488===a||93===a)&&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,a(t,i,o))},t.getBestMask=function(e,n){const o=Object.keys(t.Patterns).length;let i=0,a=1/0;for(let r=0;r<o;r++){n(r),t.applyMask(r,e);const o=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(r,e),o<a&&(a=o,i=r)}return i}}(At)),At),s=Bt(),l=function(){if(Dt)return xt;Dt=1;const t=Ot();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},xt=e}(),c=Yt(),d=function(){if(Qt)return Zt;Qt=1;const t=gt(),e=t.getBCHDigit(1335);return Zt.getEncodedBits=function(n,o){const i=n.bit<<3|o;let a=i<<10;for(;t.getBCHDigit(a)-e>=0;)a^=1335<<t.getBCHDigit(a)-e;return 21522^(i<<10|a)},Zt}(),u=qt(),h=ue();function p(t,e,n){const o=t.size,i=d.getEncodedBits(e,n);let a,r;for(a=0;a<15;a++)r=1==(i>>a&1),a<6?t.set(a,8,r,!0):a<8?t.set(a+1,8,r,!0):t.set(o-15+a,8,r,!0),a<8?t.set(8,o-a-1,r,!0):a<9?t.set(8,15-a-1+1,r,!0):t.set(8,15-a-1,r,!0);t.set(o-8,8,1,!0)}function g(e,o,i){const a=new n;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),u.getCharCountIndicator(t.mode,e)),t.write(a)});const r=8*(t.getSymbolTotalCodewords(e)-s.getTotalCodewordsCount(e,o));for(a.getLengthInBits()+4<=r&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);const c=(r-a.getLengthInBits())/8;for(let t=0;t<c;t++)a.put(t%2?17:236,8);return function(e,n,o){const i=t.getSymbolTotalCodewords(n),a=s.getTotalCodewordsCount(n,o),r=i-a,c=s.getBlocksCount(n,o),d=i%c,u=c-d,h=Math.floor(i/c),p=Math.floor(r/c),g=p+1,m=h-p,f=new l(m);let v=0;const y=new Array(c),b=new Array(c);let M=0;const S=new Uint8Array(e.buffer);for(let t=0;t<c;t++){const e=t<u?p:g;y[t]=S.slice(v,v+e),b[t]=f.encode(y[t]),v+=e,M=Math.max(M,e)}const w=new Uint8Array(i);let E,C,_=0;for(E=0;E<M;E++)for(C=0;C<c;C++)E<y[C].length&&(w[_++]=y[C][E]);for(E=0;E<m;E++)for(C=0;C<c;C++)w[_++]=b[C][E];return w}(a,e,o)}function m(e,n,s,l){let d;if(Array.isArray(e))d=h.fromArray(e);else{if("string"!=typeof e)throw new Error("Invalid data");{let t=n;if(!t){const n=h.rawSplit(e);t=c.getBestVersionForData(n,s)}d=h.fromString(e,t||40)}}const u=c.getBestVersionForData(d,s);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 m=g(n,s,d),f=t.getSymbolSize(n),v=new o(f);return function(t,e){const n=t.size,o=a.getPositions(e);for(let i=0;i<o.length;i++){const e=o[i][0],a=o[i][1];for(let o=-1;o<=7;o++)if(!(e+o<=-1||n<=e+o))for(let i=-1;i<=7;i++)a+i<=-1||n<=a+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,a+i,!0,!0):t.set(e+o,a+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,s,0),n>=7&&function(t,e){const n=t.size,o=c.getEncodedBits(e);let i,a,r;for(let s=0;s<18;s++)i=Math.floor(s/3),a=s%3+n-8-3,r=1==(o>>s&1),t.set(i,a,r,!0),t.set(a,i,r,!0)}(v,n),function(t,e){const n=t.size;let o=-1,i=n-1,a=7,r=0;for(let s=n-1;s>0;s-=2)for(6===s&&s--;;){for(let n=0;n<2;n++)if(!t.isReserved(i,s-n)){let o=!1;r<e.length&&(o=1==(e[r]>>>a&1)),t.set(i,s-n,o),a--,-1===a&&(r++,a=7)}if(i+=o,i<0||n<=i){i-=o,o=-o;break}}}(v,m),isNaN(l)&&(l=r.getBestMask(v,p.bind(null,v,s))),r.applyMask(l,v),p(v,s,l),{modules:v,version:n,errorCorrectionLevel:s,maskPattern:l,segments:d}}return ht.create=function(n,o){if(void 0===n||""===n)throw new Error("No input text");let i,a,s=e.M;return void 0!==o&&(s=e.from(o.errorCorrectionLevel,e.M),i=c.from(o.version),a=r.from(o.maskPattern),o.toSJISFunc&&t.setToSJISFunction(o.toSJISFunc)),m(n,i,s,a)},ht}var pe,ge,me={},fe={};function ve(){return pe||(pe=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,a=n.modules.data,r=t.getScale(i,o),s=Math.floor((i+2*o.margin)*r),l=o.margin*r,c=[o.color.light,o.color.dark];for(let t=0;t<s;t++)for(let n=0;n<s;n++){let d=4*(t*s+n),u=o.color.light;if(t>=l&&n>=l&&t<s-l&&n<s-l){u=c[a[Math.floor((t-l)/r)*i+Math.floor((n-l)/r)]?1:0]}e[d++]=u.r,e[d++]=u.g,e[d++]=u.b,e[d]=u.a}}}(fe)),fe}function ye(){return ge||(ge=1,function(t){const e=ve();t.render=function(t,n,o){let i=o,a=n;void 0!==i||n&&n.getContext||(i=n,n=void 0),n||(a=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),i=e.getOptions(i);const r=e.getImageWidth(t.modules.size,i),s=a.getContext("2d"),l=s.createImageData(r,r);return e.qrToImageData(l.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"}(s,a,r),s.putImageData(l,0,0),a},t.renderToDataURL=function(e,n,o){let i=o;void 0!==i||n&&n.getContext||(i=n,n=void 0),i||(i={});const a=t.render(e,n,i),r=i.type||"image/png",s=i.rendererOpts||{};return a.toDataURL(r,s.quality)}}(me)),me}var be,Me,Se={};function we(){if(be)return Se;be=1;const t=ve();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 Se.render=function(o,i,a){const r=t.getOptions(i),s=o.modules.size,l=o.modules.data,c=s+2*r.margin,d=r.color.light.a?"<path "+e(r.color.light,"fill")+' d="M0 0h'+c+"v"+c+'H0z"/>':"",u="<path "+e(r.color.dark,"stroke")+' d="'+function(t,e,o){let i="",a=0,r=!1,s=0;for(let l=0;l<t.length;l++){const c=Math.floor(l%e),d=Math.floor(l/e);c||r||(r=!0),t[l]?(s++,l>0&&c>0&&t[l-1]||(i+=r?n("M",c+o,.5+d+o):n("m",a,0),a=0,r=!1),c+1<e&&t[l+1]||(i+=n("h",s),s=0)):a++}return i}(l,s,r.margin)+'"/>',h='viewBox="0 0 '+c+" "+c+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+h+' shape-rendering="crispEdges">'+d+u+"</svg>\n";return"function"==typeof a&&a(null,p),p},Se}var Ee=function(){if(Me)return dt;Me=1;const t=ct?lt:(ct=1,lt=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}),e=he(),n=ye(),o=we();function i(n,o,i,a,r){const s=[].slice.call(arguments,1),l=s.length,c="function"==typeof s[l-1];if(!c&&!t())throw new Error("Callback required as last argument");if(!c){if(l<1)throw new Error("Too few arguments provided");return 1===l?(i=o,o=a=void 0):2!==l||o.getContext||(a=i,i=o,o=void 0),new Promise(function(t,r){try{const r=e.create(i,a);t(n(r,o,a))}catch(s){r(s)}})}if(l<2)throw new Error("Too few arguments provided");2===l?(r=i,i=o,o=a=void 0):3===l&&(o.getContext&&void 0===r?(r=a,a=void 0):(r=a,a=i,i=o,o=void 0));try{const t=e.create(i,a);r(null,n(t,o,a))}catch(d){r(d)}}return dt.create=e.create,dt.toCanvas=i.bind(null,n.render),dt.toDataURL=i.bind(null,n.renderToDataURL),dt.toString=i.bind(null,function(t,e,n){return o.render(t,n)}),dt}();const Ce=e(Ee);class _e extends D{constructor(t,e,n,o,i,a=E.READY){super(t),this.applicantId=e,this.state=a,this.domainApi=n,this.embeddedAppConnectionId=o,this.qrCodeLinkOrigin=i,this.initQRCodeURL(),a===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 Ce.toCanvas(this.qrCodeCanvas,t,{width:this.qrCodeCanvas.width})}catch(e){throw new Error(`generate qr code error: ${e}`)}}show(){this.prepareBackgroundStyles(),super.show()}}const Te=/(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,Ae=/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,Ie=()=>{const{userAgent:t}=navigator,e=window.matchMedia("(any-pointer: coarse)"),n=navigator.maxTouchPoints>0,o=()=>window.PointerEvent&&n;return{isMobileUserAgent:()=>Te.test(t)||Ae.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()}},Ne="2.10.0";return class{constructor(t,e){this.wrapperContainerId="idvc-wrapper-container",console.info(`%cIDVCO version: ${Ne}`,"background-color:#f48020; color:#fff; padding: 4px 8px"),"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),this.fingerPrintData=st()}get isEmbeddedFromQR(){return"true"===h("qrCode")}get QRCodeIsAvailable(){return!this.isEmbeddedFromQR&&!this.config.demoMode&&this.options.showQrCode&&!(()=>{const t=Ie(),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 g(t),this.api=new N(this.configs.publicKey,this.configs.domainApi),this.lib=new x,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.configs.onGetOptionsStart(),this.options=await this.api.getOptions(this.configs.domainId),this.configs.onGetOptionsComplete(this.options),this.config.preferApiConfig||(this.options=this.applyWrapperConfigSettings(this.options)),await this.mount()}catch(e){this.onError(e)}}applyWrapperConfigSettings(t){var e,n;if(null==(e=this.config)?void 0:e.wrapperSettings){const e=structuredClone(t),o=(null==(n=this.config)?void 0:n.wrapperSettings)||{};return Object.keys(o).forEach(t=>{const n=o[t];void 0!==n&&(e[t]=n)}),e}return t}mountQRCodeButton(){var t;const e=document.getElementById("card-steps");e&&e.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"),null==(t=this.qrCodeBtn)||t.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()=>{var t;null==(t=document.getElementById(this.configs.mountElement))||t.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 O(this.validationOutput,this.validationModal);t.prepareModal(),t.showModal()}async createPostModel(t,e){const n=await this.fingerPrintData;return{applicantId:this.configs.applicantId,...t,documentType:e?10:t.documentType,...n,clientVersion:this.lib.version,clientType:_.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=w.COMPLETE,this.showValidationSuccess()}catch(t){this.onError(t)}finally{this.lib.loading=!1}}mountValidationModal(){this.validationModal=new k(this.configs.mountElement),this.validationModal.addCompleteHandler(this.forceClose.bind(this))}mountQRCodeModal(){this.QRCodeModal=new _e(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===C.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===C.CLOSED||t===C.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(C.OPEN)})}else t===C.CLOSED_FOREVER&&(this.QRCodeModal.state=E.DONE_WITH_ERROR,this.QRCodeModal.closable=!1)}processEmbeddedAppEnd(t){(null==t?void 0:t.status)===w.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){var e,n;if(null==(e=this.configs)?void 0:e.onError){this.configs.onError(t);const e={tryAgain:!1,complete:!1};this.validationModal.type=S.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(),null==(n=document.getElementById(this.configs.mountElement))||n.classList.remove("hidden-element"),this.validationModal.show()}return t}}});
|
|
2
2
|
//# sourceMappingURL=wrapper.umd.js.map
|