@regulaforensics/idv-capture-web 2.3.139-nightly → 2.3.141-nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Vu, r as la, j as lD } from "./index-
|
|
1
|
+
import { B as Vu, r as la, j as lD } from "./index-DvD3cGTJ.js";
|
|
2
2
|
var m0 = Object.defineProperty, k0 = Object.defineProperties, h0 = Object.getOwnPropertyDescriptors, jD = Object.getOwnPropertySymbols, v0 = Object.prototype.hasOwnProperty, b0 = Object.prototype.propertyIsEnumerable, sD = (M, r, i) => r in M ? m0(M, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : M[r] = i, sl = (M, r) => {
|
|
3
3
|
for (var i in r || (r = {}))
|
|
4
4
|
v0.call(r, i) && sD(M, i, r[i]);
|
|
@@ -22,7 +22,7 @@ var N1 = (e) => {
|
|
|
22
22
|
throw l;
|
|
23
23
|
}, "return" in r && i("return"), o;
|
|
24
24
|
};
|
|
25
|
-
import { B as cc, r as Bs, j as gE } from "./index-
|
|
25
|
+
import { B as cc, r as Bs, j as gE } from "./index-DvD3cGTJ.js";
|
|
26
26
|
var QT = Object.defineProperty, JT = Object.defineProperties, XT = Object.getOwnPropertyDescriptors, RE = Object.getOwnPropertySymbols, $T = Object.prototype.hasOwnProperty, eb = Object.prototype.propertyIsEnumerable, Fo = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), tb = (e) => {
|
|
27
27
|
throw TypeError(e);
|
|
28
28
|
}, IE = (e, r, t) => r in e ? QT(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, xe = (e, r) => {
|
|
@@ -26660,9 +26660,9 @@ function $6() {
|
|
|
26660
26660
|
supportedTemplates: Ri.getSupportedTemplates(),
|
|
26661
26661
|
component: Ri
|
|
26662
26662
|
}], i = H6(H6({}, Ug.LIVENESS, function() {
|
|
26663
|
-
return import("./index-
|
|
26663
|
+
return import("./index-BPAUL1DE.js");
|
|
26664
26664
|
}), Ug.DOC_READER, function() {
|
|
26665
|
-
return import("./index-
|
|
26665
|
+
return import("./index-CUFakZgo.js");
|
|
26666
26666
|
}), a = /* @__PURE__ */ it().mark(function p() {
|
|
26667
26667
|
var h, m, y;
|
|
26668
26668
|
return it().wrap(function(w) {
|
|
@@ -26980,7 +26980,7 @@ var WG = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
|
|
|
26980
26980
|
}, {
|
|
26981
26981
|
key: "version",
|
|
26982
26982
|
get: function() {
|
|
26983
|
-
return "".concat("2.3.
|
|
26983
|
+
return "".concat("2.3.141-nightly".trim());
|
|
26984
26984
|
}
|
|
26985
26985
|
}, {
|
|
26986
26986
|
key: "render",
|
|
@@ -27450,7 +27450,7 @@ var QG = /* @__PURE__ */ function() {
|
|
|
27450
27450
|
key: "version",
|
|
27451
27451
|
get: function() {
|
|
27452
27452
|
var t;
|
|
27453
|
-
return (t = "2.3.
|
|
27453
|
+
return (t = "2.3.141-nightly") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
|
|
27454
27454
|
}
|
|
27455
27455
|
}, {
|
|
27456
27456
|
key: "setNonce",
|
package/dist/main.iife.js
CHANGED
|
@@ -78,7 +78,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
78
78
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pSe(e,t){if(e){if(typeof e=="string")return lJ(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lJ(e,t):void 0}}function lJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function ISe(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,u,s,l,d=[],f=!0,M=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==t);f=!0);}catch(p){M=!0,u=p}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(M)throw u}}return d}}function ySe(e){if(Array.isArray(e))return e}var hSe=function(e){var t=e.option,n=e.layout,a=e.dataSourceQuestion,u=e.register,s=e.watch,l=ft.useState(!1),d=MSe(l,2),f=d[0],M=d[1],p=nJ(),y=String(a.id),I=s(y),m=I===String(t.id),N=n.option,v=n.optionSelected,E={borderRadius:N.cornerRadius,background:Vr(N.backgroundColor),borderColor:Vr(N.borderColor),borderWidth:N.borderWidth},A={borderRadius:v.cornerRadius,background:Vr(v.backgroundColor),borderColor:Vr(v.borderColor),borderWidth:v.borderWidth},j=f&&p?{outline:"2px solid ".concat(Yp)}:{};return re.jsx("div",{style:{display:"flex",flexGrow:1},children:re.jsxs("label",{style:sJ(sJ({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},m?A:E),j),children:[re.jsx("input",An(Nt({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},u(y,{required:!!a.required,validate:F4(a.validators,!!a.required)})),{value:t.id,type:"radio",onFocus:function(){return M(!0)},onBlur:function(){return M(!1)}})),re.jsx(Tu,An(Nt({},m?v.title:N.title),{text:t.text}))]})},t.id)},mSe=function(e){var t=e.layout,n=e.watch,a=e.register,u=e.dataSourceQuestion;return re.jsx("div",{style:{boxSizing:"border-box"},children:re.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[t.title&&re.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:re.jsx(Tu,An(Nt({},t.title),{text:u.text}))}),re.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:u.options.map(function(s){return re.jsx(hSe,{register:a,watch:n,layout:t,option:s,dataSourceQuestion:u},s.id)})})]})})};function f2(e){"@babel/helpers - typeof";return f2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f2(e)}function cJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,a)}return n}function hC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cJ(Object(n),!0).forEach(function(a){NSe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cJ(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function NSe(e,t,n){return(t=vSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vSe(e){var t=ESe(e,"string");return f2(t)=="symbol"?t:t+""}function ESe(e,t){if(f2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(f2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DSe=function(e){var t=e.children,n=e.backgroundColor,a=e.cornerRadius,u=a===void 0?0:a,s=e.isError,l=e.isRequired,d=e.validationBorderColor,f=e.validationBorderWidth,M=hC({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:Vr(n)||"transparent",borderRadius:u,padding:"16px",boxSizing:"border-box",height:"auto"},s&&hC(hC({},Vr(d)&&{borderColor:d,borderStyle:"solid"}),f&&{borderWidth:f}));return re.jsxs("div",{style:M,children:[l&&re.jsx("span",{style:{color:Vr(d),position:"absolute",left:"6px",top:"18px"},children:"*"}),t]})};function TSe(e,t){return ASe(e)||CSe(e,t)||SSe(e,t)||jSe()}function jSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
79
79
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SSe(e,t){if(e){if(typeof e=="string")return fJ(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fJ(e,t):void 0}}function fJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function CSe(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,u,s,l,d=[],f=!0,M=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==t);f=!0);}catch(p){M=!0,u=p}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(M)throw u}}return d}}function ASe(e){if(Array.isArray(e))return e}var OSe=function(e){var t=e.validationErrorsTypes,n=e.title;return t?re.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(t).map(function(a){var u=TSe(a,2),s=u[0],l=u[1];return re.jsx(Tu,An(Nt({},n),{text:l}),s)})}):null},_Se=function(e){var t,n,a,u,s,l,d,f,M,p,y,I,m,N,v=e.layout,E=e.dataSourceQuestion,A=e.register,j=String(E.id),S=function(C){return C?C===Ph.EMAIL?"email":C===Ph.FREE_TEXT?"text":C===Ph.NUMBER?"number":C===Ph.SECURE?"password":"text":"text"};return re.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[re.jsx(Tu,An(Nt({},v.title),{text:E.text,htmlFor:j})),re.jsx("input",An(Nt({},A(j,{required:!!E.required,validate:F4(E.validators,!!E.required)})),{id:j,type:S((t=v.textField)===null||t===void 0?void 0:t.inputType),style:{fontFamily:(n=v==null||(a=v.textField)===null||a===void 0?void 0:a.fontName)!==null&&n!==void 0?n:"sans-serif",fontSize:(u=v==null||(s=v.textField)===null||s===void 0?void 0:s.fontSize)!==null&&u!==void 0?u:15,color:(l=Vr(v==null||(d=v.textField)===null||d===void 0?void 0:d.fontColor))!==null&&l!==void 0?l:"#000000",height:"42px",borderWidth:(f=v==null||(M=v.textField)===null||M===void 0?void 0:M.borderWidth)!==null&&f!==void 0?f:1,borderColor:(p=Vr(v==null||(y=v.textField)===null||y===void 0?void 0:y.borderColor))!==null&&p!==void 0?p:"#d9d9d9",borderStyle:"solid",borderRadius:(I=v==null||(m=v.textField)===null||m===void 0?void 0:m.cornerRadius)!==null&&I!==void 0?I:8,padding:"11px",boxSizing:"border-box",outlineColor:Yp},placeholder:(N=E.placeholder)!==null&&N!==void 0?N:"","data-id":j}))]})},xSe=function(e){var t,n,a,u,s,l,d,f,M,p,y,I=e.layout,m=e.dataSourceQuestion,N=e.register,v=String(m.id);return re.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[re.jsx(Tu,An(Nt({},I.title),{text:m.text,htmlFor:v})),re.jsx("textarea",An(Nt({},N(v,{required:!!m.required,validate:F4(m.validators,!!m.required)})),{id:v,placeholder:(t=m.placeholder)!==null&&t!==void 0?t:"",onChange:function(E){E.target.style.height="auto",E.target.style.height="".concat(E.target.scrollHeight-15,"px")},"data-id":v,style:{fontFamily:"sans-serif",fontSize:(n=I==null||(a=I.textField)===null||a===void 0?void 0:a.fontSize)!==null&&n!==void 0?n:15,color:(u=Vr(I==null||(s=I.textField)===null||s===void 0?void 0:s.fontColor))!==null&&u!==void 0?u:"#000000",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(l=I==null||(d=I.textField)===null||d===void 0?void 0:d.borderWidth)!==null&&l!==void 0?l:1,borderColor:(f=Vr(I==null||(M=I.textField)===null||M===void 0?void 0:M.borderColor))!==null&&f!==void 0?f:"#d9d9d9",borderStyle:"solid",borderRadius:(p=I==null||(y=I.textField)===null||y===void 0?void 0:y.cornerRadius)!==null&&p!==void 0?p:8,padding:"11px",boxSizing:"border-box",outlineColor:Yp}}))]})},dJ={},mC,MJ;function gJ(){if(MJ)return mC;MJ=1;var e=Wn(),t=N1(),n=So(),a=Ta(),u=bp(),s=Ap(),l=Function,d=e([].concat),f=e([].join),M={},p=function(y,I,m){if(!a(M,I)){for(var N=[],v=0;v<I;v++)N[v]="a["+v+"]";M[I]=l("C,a","return new C("+f(N,",")+")")}return M[I](y,m)};return mC=s?l.bind:function(y){var I=t(this),m=I.prototype,N=u(arguments,1),v=function(){var E=d(N,u(arguments));return this instanceof v?p(I,E.length,E):I.apply(y,E)};return n(m)&&(v.prototype=m),v},mC}var pJ;function LSe(){if(pJ)return dJ;pJ=1;var e=br(),t=gJ();return e({target:"Function",proto:!0,forced:Function.bind!==t},{bind:t}),dJ}LSe();var IJ={},yJ;function wSe(){if(yJ)return IJ;yJ=1;var e=br(),t=Jn(),n=E1();return e({target:"Object",stat:!0,sham:!t},{create:n}),IJ}wSe();var hJ={},mJ;function bSe(){if(mJ)return hJ;mJ=1;var e=br(),t=pn(),n=Ul(),a=wp(),u=vV(),s=t(function(){a(1)});return e({target:"Object",stat:!0,forced:s,sham:!u},{getPrototypeOf:function(l){return a(n(l))}}),hJ}bSe();var NJ={},vJ;function kSe(){if(vJ)return NJ;vJ=1;var e=Jn(),t=Z1(),n=So(),a=xV(),u=Ul(),s=bg(),l=Object.getPrototypeOf,d=Object.setPrototypeOf,f=Object.prototype,M="__proto__";if(e&&l&&d&&!(M in f))try{t(f,M,{configurable:!0,get:function(){return l(u(this))},set:function(p){var y=s(this);a(p)&&n(y)&&d(y,p)}})}catch(p){}return NJ}kSe();var EJ={},DJ;function zSe(){if(DJ)return EJ;DJ=1;var e=br(),t=Ah();return e({target:"Object",stat:!0},{setPrototypeOf:t}),EJ}zSe();var TJ={},NC,jJ;function RSe(){if(jJ)return NC;jJ=1;var e=xh(),t=_p(),n=TypeError;return NC=function(a){if(e(a))return a;throw new n(t(a)+" is not a constructor")},NC}var SJ;function PSe(){if(SJ)return TJ;SJ=1;var e=br(),t=Hf(),n=Ch(),a=gJ(),u=RSe(),s=La(),l=So(),d=E1(),f=pn(),M=t("Reflect","construct"),p=Object.prototype,y=[].push,I=f(function(){function v(){}return!(M(function(){},[],v)instanceof v)}),m=!f(function(){M(function(){})}),N=I||m;return e({target:"Reflect",stat:!0,forced:N,sham:N},{construct:function(v,E){u(v),s(E);var A=arguments.length<3?v:u(arguments[2]);if(m&&!I)return M(v,E,A);if(v===A){switch(E.length){case 0:return new v;case 1:return new v(E[0]);case 2:return new v(E[0],E[1]);case 3:return new v(E[0],E[1],E[2]);case 4:return new v(E[0],E[1],E[2],E[3])}var j=[null];return n(y,j,E),new(n(a,v,j))}var S=A.prototype,C=d(l(S)?S:p),x=n(v,C,E);return l(x)?x:C}}),TJ}PSe();var CJ={},AJ;function USe(){if(AJ)return CJ;AJ=1;var e=br(),t=pn(),n=z4(),a=So(),u=Ul(),s=kg(),l=pG(),d=Rp(),f=vB(),M=wh(),p=Pi(),y=BD(),I=p("isConcatSpreadable"),m=y>=51||!t(function(){var E=[];return E[I]=!1,E.concat()[0]!==E}),N=function(E){if(!a(E))return!1;var A=E[I];return A!==void 0?!!A:n(E)},v=!m||!M("concat");return e({target:"Array",proto:!0,arity:1,forced:v},{concat:function(E){var A=u(this),j=f(A,0),S=0,C,x,b,$,V;for(C=-1,b=arguments.length;C<b;C++)if(V=C===-1?A:arguments[C],N(V))for($=s(V),l(S+$),x=0;x<$;x++,S++)x in V&&d(j,S,V[x]);else l(S+1),d(j,S++,V);return j.length=S,j}}),CJ}USe();function d2(e){"@babel/helpers - typeof";return d2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d2(e)}function YSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OJ(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_J(a.key),a)}}function $Se(e,t,n){return t&&OJ(e.prototype,t),n&&OJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C1(e,t,n){return(t=_J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _J(e){var t=QSe(e,"string");return d2(t)=="symbol"?t:t+""}function QSe(e,t){if(d2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(d2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xJ=function(){function e(t){var n=t.errorCode,a=t.errorCodeKey,u=t.message,s=t.underlyingError,l=t.underlyingBaseError,d=t.domain,f=t.module,M=t.errorEnumName,p=t.shortDomainCode;YSe(this,e),C1(this,"errorCode",void 0),C1(this,"errorCodeKey",void 0),C1(this,"message",void 0),C1(this,"underlyingError",void 0),C1(this,"underlyingBaseError",void 0),C1(this,"domain",void 0),C1(this,"module",void 0),C1(this,"errorEnumName",void 0),C1(this,"shortDomainCode",void 0),this.errorCode=n,this.errorCodeKey=a,this.message=u,this.underlyingError=s,this.underlyingBaseError=l,this.module=f,this.domain=d,this.errorEnumName=M,this.shortDomainCode=p}return $Se(e,[{key:"lastUnderlyingError",get:function(){for(var t,n=this.underlyingBaseError;((a=n)===null||a===void 0?void 0:a.underlyingBaseError)instanceof e;){var a;n=n.underlyingBaseError}return(t=n)===null||t===void 0?void 0:t.underlyingError}},{key:"toObject",value:function(){var t={errorCode:this.errorCode,errorCodeKey:this.errorCodeKey,errorEnumName:this.errorEnumName,message:this.message,module:this.module,underlyingError:this.underlyingError,lastUnderlineError:this.lastUnderlyingError};return this.underlyingBaseError&&this.underlyingBaseError instanceof e&&(t.underlyingBaseError=this.underlyingBaseError.toObject()),t}},{key:"shortChain",get:function(){var t="".concat(this.shortDomainCode,":").concat(this.errorCode).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof e&&(t+="-".concat(this.underlyingBaseError.shortChain)),t}},{key:"fullChain",get:function(){var t="".concat(this.module,".").concat(this.domain,":").concat(this.errorCodeKey).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof e&&(t+="-".concat(this.underlyingBaseError.fullChain)),t}}],[{key:"getErrorKey",value:function(t,n){var a=Object.keys(n).find(function(u){return n[u]===t});if(!a)throw new Error("Invalid errorCode: ".concat(t," in enum"));return a}}])}();function V4(e){"@babel/helpers - typeof";return V4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V4(e)}function HSe(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function FSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VSe(e,t,n){return t=I3(t),BSe(e,LJ()?Reflect.construct(t,n||[],I3(e).constructor):t.apply(e,n))}function BSe(e,t){if(t&&(V4(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GSe(e)}function GSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(LJ=function(){return!!e})()}function I3(e){return I3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I3(e)}function ZSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vC(e,t)}function vC(e,t){return vC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vC(e,t)}function EC(e,t,n){return(t=WSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WSe(e){var t=KSe(e,"string");return V4(t)=="symbol"?t:t+""}function KSe(e,t){if(V4(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(V4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y3=function(e){function t(n){var a=n.errorCode,u=n.message,s=n.underlyingError,l=n.underlyingBaseError;FSe(this,t);var d=xJ.getErrorKey(a,SW);return VSe(this,t,[{errorCode:a,errorCodeKey:d,errorEnumName:t.ERROR_ENUM_NAME,module:t.MODULE,message:u,underlyingError:s,underlyingBaseError:l,domain:t.ERROR_ENUM_NAME,shortDomainCode:t.SHORT_CODE}])}return ZSe(t,e),HSe(t)}(xJ);EC(y3,"MODULE",LS),EC(y3,"ERROR_ENUM_NAME","GuiModuleError"),EC(y3,"SHORT_CODE","GM");var qSe=function(e){var t=e.header,n=e.title,a=e.buttons,u=e.footer,s=e.questions,l=e.dataSource,d=e.backgroundColor,f=pj(),M=f.perform,p=Q5e({criteriaMode:"all"}),y=p.register,I=p.handleSubmit,m=p.formState.errors,N=p.reset,v=p.watch,E=p.control,A=function(j){M(bNe(j)),N()};return re.jsx(Vp,{header:t,footer:u,backgroundColor:d,children:re.jsxs("form",{onSubmit:I(A),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[re.jsxs("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"flex-start",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"10px",height:"100%",width:"100%",overflow:"auto",position:"relative",backgroundColor:Vr(s.backgroundColor)||"transparent"},children:[n&&re.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:re.jsx(Tu,Nt({},n))}),re.jsx("div",{"data-ui":"gui-questions",part:"gui-questions",style:{width:"100%",display:"flex",gap:"10px",flexDirection:"column"},children:l.questions.map(function(j){var S,C=l.static,x=function(_,k){return k.find(function(R){var H;if((H=R.questionIds)!==null&&H!==void 0&&H.length)return R.questionIds.find(function(B){return _===B})})},b=function(_,k){return k.find(function(R){return!R.questionIds&&R.answerType===_})},$=C?x(String(j.id),s.itemTypes)||b(j.answerType,s.itemTypes):s.itemTypes.find(function(_){return _.answerType===j.answerType});if(!$){var V=new y3({errorCode:SW.DECODING_FAILED,message:"The question template has not been found"});M(V);return}var Q=$==null?void 0:$.displayType,w=j.id in m&&((S=m[j.id])===null||S===void 0?void 0:S.types);return re.jsxs(ft.Fragment,{children:[re.jsxs(DSe,{backgroundColor:$==null?void 0:$.backgroundColor,cornerRadius:$==null?void 0:$.cornerRadius,isError:!!w,isRequired:j.required,validationBorderColor:$==null?void 0:$.validationBorderColor,validationBorderWidth:$==null?void 0:$.validationBorderWidth,children:[Q===R4.TEXT_EXPANDABLE&&re.jsx(xSe,{layout:$,dataSourceQuestion:j,register:y}),Q===R4.TEXT_SINGLE_LINE&&re.jsx(_Se,{layout:$,dataSourceQuestion:j,register:y}),Q===R4.SELECTOR_OPTIONS&&re.jsx(lSe,{layout:$,dataSourceQuestion:j,watch:v,register:y}),Q===R4.SELECTOR_BUTTONS&&re.jsx(mSe,{layout:$,dataSourceQuestion:j,watch:v,register:y}),Q===R4.SELECTOR_DROPDOWN&&re.jsx(zje,{control:E,layout:$,dataSourceQuestion:j}),Q===R4.MULTI_SELECTOR_DROPDOWN&&re.jsx(Zje,{control:E,layout:$,dataSourceQuestion:j})]}),w&&re.jsx(OSe,{validationErrorsTypes:w,title:$.validationMessage})]},j.id)})})]}),!!(a!=null&&a.length)&&re.jsx("div",{style:{display:"flex",width:"100%",flexGrow:0,flexShrink:0,justifyContent:"center",alignItems:"flex-end",padding:"2px"},children:a.map(function(j,S){return re.jsx(AW,Nt({dataTestId:"question-button"},j),S)})})]})})},wJ=function(e){var t=e.templateId,n=e.templateLayout,a=e.dataSource;return!t||!n?re.jsx(zW,{}):t===W1.STATUS?re.jsx(Zve,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor}):t===W1.INFO?re.jsx(e5e,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,image:n==null?void 0:n.image,title:n==null?void 0:n.title,description:n==null?void 0:n.description,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor}):t===W1.PROGRESS?re.jsx(zW,{header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,progressView:n==null?void 0:n.progressView,backgroundColor:n==null?void 0:n.backgroundColor}):t===W1.INFO_DETAILS?re.jsx(I5e,{header:n==null?void 0:n.header,title:n==null?void 0:n.title,details:n==null?void 0:n.details,buttons:n==null?void 0:n.buttons,footer:n==null?void 0:n.footer,backgroundColor:n==null?void 0:n.backgroundColor}):a&&a!==null&&a!==void 0&&a.questions.length&&t===W1.QUESTIONS?re.jsx(qSe,{dataSource:a,questions:n.questions,header:n==null?void 0:n.header,footer:n==null?void 0:n.footer,title:n==null?void 0:n.title,buttons:n==null?void 0:n.buttons,backgroundColor:n==null?void 0:n.backgroundColor}):t===W1.QUESTIONS&&!a?re.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: No data for questions"}):re.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},DC=!1,Kf=function(e){var t=e.moduleProps,n=e.perform,a=t,u=a.templateId,s=a.templateLayout,l=a.dataSource,d=function(f){n&&n(f)};return u===W1.QUESTIONS?re.jsx(JV,{perform:d,children:re.jsx(wJ,{dataSource:l,templateId:u,templateLayout:s})}):re.jsx(JV,{perform:d,children:re.jsx(wJ,{templateId:u,templateLayout:s})})};Kf.getIdentifier=function(){return LS},Kf.getSupportedTemplates=function(){return Object.values(W1)},Kf.deinitialize=function(){DC=!1},Kf.initialize=function(){DC=!0},Kf.isReady=function(){return DC},Kf.displayName=LS;var bJ={},kJ;function JSe(){if(kJ)return bJ;kJ=1;var e=Bt(),t=Hr(),n=Date,a=t(n.prototype.getTime);return e({target:"Date",stat:!0},{now:function(){return a(new n)}}),bJ}JSe();var zJ={},RJ={},TC,PJ;function UJ(){if(PJ)return TC;PJ=1;var e=Qr(),t=Mi(),n=wn(),a=Eu(),u=t("iterator");return TC=!e(function(){var s=new URL("b?a=1&b=2&c=3","https://a"),l=s.searchParams,d=new URLSearchParams("a=1&a=2&b=3"),f="";return s.pathname="c%20d",l.forEach(function(M,p){l.delete("b"),f+=p+M}),d.delete("a",2),d.delete("b",void 0),a&&(!s.toJSON||!d.has("a",1)||d.has("a",2)||!d.has("a",void 0)||d.has("b"))||!l.size&&(a||!n)||!l.sort||s.href!=="https://a/c%20d?a=1&c=3"||l.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!l[u]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||f!=="a1c3"||new URL("https://x",void 0).host!=="x"}),TC}var jC,YJ;function XSe(){if(YJ)return jC;YJ=1;var e=wn(),t=Hr(),n=fi(),a=Qr(),u=sh(),s=oh(),l=dN(),d=bu(),f=B0(),M=Object.assign,p=Object.defineProperty,y=t([].concat);return jC=!M||a(function(){if(e&&M({b:1},M(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},m={},N=Symbol("assign detection"),v="abcdefghijklmnopqrst";return I[N]=7,v.split("").forEach(function(E){m[E]=E}),M({},I)[N]!==7||u(M({},m)).join("")!==v})?function(m,N){for(var v=d(m),E=arguments.length,A=1,j=s.f,S=l.f;E>A;)for(var C=f(arguments[A++]),x=j?y(u(C),j(C)):u(C),b=x.length,$=0,V;b>$;)V=x[$++],(!e||n(S,C,V))&&(v[V]=C[V]);return v}:M,jC}var SC,$J;function eCe(){if($J)return SC;$J=1;var e=Hr(),t=2147483647,n=36,a=1,u=26,s=38,l=700,d=72,f=128,M="-",p=/[^\0-\u007E]/,y=/[.\u3002\uFF0E\uFF61]/g,I="Overflow: input needs wider integers to process",m=n-a,N=RangeError,v=e(y.exec),E=Math.floor,A=String.fromCharCode,j=e("".charCodeAt),S=e([].join),C=e([].push),x=e("".replace),b=e("".split),$=e("".toLowerCase),V=function(k){for(var R=[],H=0,B=k.length;H<B;){var q=j(k,H++);if(q>=55296&&q<=56319&&H<B){var se=j(k,H++);(se&64512)===56320?C(R,((q&1023)<<10)+(se&1023)+65536):(C(R,q),H--)}else C(R,q)}return R},Q=function(k){return k+22+75*(k<26)},w=function(k,R,H){var B=0;for(k=H?E(k/l):k>>1,k+=E(k/R);k>m*u>>1;)k=E(k/m),B+=n;return E(B+(m+1)*k/(k+s))},_=function(k){var R=[];k=V(k);var H=k.length,B=f,q=0,se=d,U,Z;for(U=0;U<k.length;U++)Z=k[U],Z<128&&C(R,A(Z));var ee=R.length,L=ee;for(ee&&C(R,M);L<H;){var W=t;for(U=0;U<k.length;U++)Z=k[U],Z>=B&&Z<W&&(W=Z);var me=L+1;if(W-B>E((t-q)/me))throw new N(I);for(q+=(W-B)*me,B=W,U=0;U<k.length;U++){if(Z=k[U],Z<B&&++q>t)throw new N(I);if(Z===B){for(var ye=q,fe=n;;){var xe=fe<=se?a:fe>=se+u?u:fe-se;if(ye<xe)break;var be=ye-xe,Oe=n-xe;C(R,A(Q(xe+be%Oe))),ye=E(be/Oe),fe+=n}C(R,A(Q(ye))),se=w(q,me,L===ee),q=0,L++}}q++,B++}return S(R,"")};return SC=function(k){var R=[],H=b(x($(k),y,"."),"."),B,q;for(B=0;B<H.length;B++)q=H[B],C(R,v(p,q)?"xn--"+_(q):q);return S(R,".")},SC}var QJ={},HJ;function tCe(){if(HJ)return QJ;HJ=1;var e=Bt(),t=Hr(),n=dv(),a=RangeError,u=String.fromCharCode,s=String.fromCodePoint,l=t([].join),d=!!s&&s.length!==1;return e({target:"String",stat:!0,arity:1,forced:d},{fromCodePoint:function(M){for(var p=[],y=arguments.length,I=0,m;y>I;){if(m=+arguments[I++],n(m,1114111)!==m)throw new a(m+" is not a valid code point");p[I]=m<65536?u(m):u(((m-=65536)>>10)+55296,m%1024+56320)}return l(p,"")}}),QJ}var CC,FJ;function rCe(){if(FJ)return CC;FJ=1;var e=F1(),t=Math.floor,n=function(a,u){var s=a.length;if(s<8)for(var l=1,d,f;l<s;){for(f=l,d=a[l];f&&u(a[f-1],d)>0;)a[f]=a[--f];f!==l++&&(a[f]=d)}else for(var M=t(s/2),p=n(e(a,0,M),u),y=n(e(a,M),u),I=p.length,m=y.length,N=0,v=0;N<I||v<m;)a[N+v]=N<I&&v<m?u(p[N],y[v])<=0?p[N++]:y[v++]:N<I?p[N++]:y[v++];return a};return CC=n,CC}var AC,VJ;function BJ(){if(VJ)return AC;VJ=1,j5(),tCe();var e=Bt(),t=dn(),n=nQ(),a=vu(),u=fi(),s=Hr(),l=wn(),d=UJ(),f=mo(),M=wf(),p=B5(),y=kl(),I=yP(),m=xf(),N=C4(),v=di(),E=$i(),A=V1(),j=J0(),S=mi(),C=Gi(),x=gu(),b=Lf(),$=Dg(),V=P5(),Q=dh(),w=np(),_=A4(),k=Mi(),R=rCe(),H=k("iterator"),B="URLSearchParams",q=B+"Iterator",se=m.set,U=m.getterFor(B),Z=m.getterFor(q),ee=n("fetch"),L=n("Request"),W=n("Headers"),me=L&&L.prototype,ye=W&&W.prototype,fe=t.TypeError,xe=t.encodeURIComponent,be=String.fromCharCode,Oe=a("String","fromCodePoint"),Ue=parseInt,Ke=s("".charAt),at=s([].join),ot=s([].push),Mt=s("".replace),_t=s([].shift),jt=s([].splice),mt=s("".split),rt=s("".slice),gt=s(/./.exec),dt=/\+/g,yt="�",ne=/^[0-9a-f]+$/i,pe=function(ve,ze){var $e=rt(ve,ze,ze+2);return gt(ne,$e)?Ue($e,16):NaN},je=function(ve){for(var ze=0,$e=128;$e>0&&(ve&$e)!==0;$e>>=1)ze++;return ze},Ge=function(ve){var ze=null;switch(ve.length){case 1:ze=ve[0];break;case 2:ze=(ve[0]&31)<<6|ve[1]&63;break;case 3:ze=(ve[0]&15)<<12|(ve[1]&63)<<6|ve[2]&63;break;case 4:ze=(ve[0]&7)<<18|(ve[1]&63)<<12|(ve[2]&63)<<6|ve[3]&63;break}return ze>1114111?null:ze},Se=function(ve){ve=Mt(ve,dt," ");for(var ze=ve.length,$e="",ke=0;ke<ze;){var nt=Ke(ve,ke);if(nt==="%"){if(Ke(ve,ke+1)==="%"||ke+3>ze){$e+="%",ke++;continue}var Et=pe(ve,ke+1);if(Et!==Et){$e+=nt,ke++;continue}ke+=2;var St=je(Et);if(St===0)nt=be(Et);else{if(St===1||St>4){$e+=yt,ke++;continue}for(var At=[Et],$t=1;$t<St&&(ke++,!(ke+3>ze||Ke(ve,ke)!=="%"));){var nr=pe(ve,ke+1);if(nr!==nr){ke+=3;break}if(nr>191||nr<128)break;ot(At,nr),ke+=2,$t++}if(At.length!==St){$e+=yt;continue}var gr=Ge(At);gr===null?$e+=yt:nt=Oe(gr)}}$e+=nt,ke++}return $e},Me=/[!'()~]|%20/g,Te={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ye=function(ve){return Te[ve]},st=function(ve){return Mt(xe(ve),Me,Ye)},it=I(function(ze,$e){se(this,{type:q,target:U(ze).entries,index:0,kind:$e})},B,function(){var ze=Z(this),$e=ze.target,ke=ze.index++;if(!$e||ke>=$e.length)return ze.target=null,w(void 0,!0);var nt=$e[ke];switch(ze.kind){case"keys":return w(nt.key,!1);case"values":return w(nt.value,!1)}return w([nt.key,nt.value],!1)},!0),Re=function(ve){this.entries=[],this.url=null,ve!==void 0&&(C(ve)?this.parseObject(ve):this.parseQuery(typeof ve=="string"?Ke(ve,0)==="?"?rt(ve,1):ve:x(ve)))};Re.prototype={type:B,bindURL:function(ve){this.url=ve,this.update()},parseObject:function(ve){var ze=this.entries,$e=Q(ve),ke,nt,Et,St,At,$t,nr;if($e)for(ke=V(ve,$e),nt=ke.next;!(Et=u(nt,ke)).done;){if(St=V(S(Et.value)),At=St.next,($t=u(At,St)).done||(nr=u(At,St)).done||!u(At,St).done)throw new fe("Expected sequence with length 2");ot(ze,{key:x($t.value),value:x(nr.value)})}else for(var gr in ve)E(ve,gr)&&ot(ze,{key:gr,value:x(ve[gr])})},parseQuery:function(ve){if(ve)for(var ze=this.entries,$e=mt(ve,"&"),ke=0,nt,Et;ke<$e.length;)nt=$e[ke++],nt.length&&(Et=mt(nt,"="),ot(ze,{key:Se(_t(Et)),value:Se(at(Et,"="))}))},serialize:function(){for(var ve=this.entries,ze=[],$e=0,ke;$e<ve.length;)ke=ve[$e++],ot(ze,st(ke.key)+"="+st(ke.value));return at(ze,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Ae=function(){N(this,Le);var ze=arguments.length>0?arguments[0]:void 0,$e=se(this,new Re(ze));l||(this.size=$e.entries.length)},Le=Ae.prototype;if(p(Le,{append:function(ze,$e){var ke=U(this);_(arguments.length,2),ot(ke.entries,{key:x(ze),value:x($e)}),l||this.length++,ke.updateURL()},delete:function(ve){for(var ze=U(this),$e=_(arguments.length,1),ke=ze.entries,nt=x(ve),Et=$e<2?void 0:arguments[1],St=Et===void 0?Et:x(Et),At=0;At<ke.length;){var $t=ke[At];if($t.key===nt&&(St===void 0||$t.value===St)){if(jt(ke,At,1),St!==void 0)break}else At++}l||(this.size=ke.length),ze.updateURL()},get:function(ze){var $e=U(this).entries;_(arguments.length,1);for(var ke=x(ze),nt=0;nt<$e.length;nt++)if($e[nt].key===ke)return $e[nt].value;return null},getAll:function(ze){var $e=U(this).entries;_(arguments.length,1);for(var ke=x(ze),nt=[],Et=0;Et<$e.length;Et++)$e[Et].key===ke&&ot(nt,$e[Et].value);return nt},has:function(ze){for(var $e=U(this).entries,ke=_(arguments.length,1),nt=x(ze),Et=ke<2?void 0:arguments[1],St=Et===void 0?Et:x(Et),At=0;At<$e.length;){var $t=$e[At++];if($t.key===nt&&(St===void 0||$t.value===St))return!0}return!1},set:function(ze,$e){var ke=U(this);_(arguments.length,1);for(var nt=ke.entries,Et=!1,St=x(ze),At=x($e),$t=0,nr;$t<nt.length;$t++)nr=nt[$t],nr.key===St&&(Et?jt(nt,$t--,1):(Et=!0,nr.value=At));Et||ot(nt,{key:St,value:At}),l||(this.size=nt.length),ke.updateURL()},sort:function(){var ze=U(this);R(ze.entries,function($e,ke){return $e.key>ke.key?1:-1}),ze.updateURL()},forEach:function(ze){for(var $e=U(this).entries,ke=A(ze,arguments.length>1?arguments[1]:void 0),nt=0,Et;nt<$e.length;)Et=$e[nt++],ke(Et.value,Et.key,this)},keys:function(){return new it(this,"keys")},values:function(){return new it(this,"values")},entries:function(){return new it(this,"entries")}},{enumerable:!0}),f(Le,H,Le.entries,{name:"entries"}),f(Le,"toString",function(){return U(this).serialize()},{enumerable:!0}),l&&M(Le,"size",{get:function(){return U(this).entries.length},configurable:!0,enumerable:!0}),y(Ae,B),e({global:!0,constructor:!0,forced:!d},{URLSearchParams:Ae}),!d&&v(W)){var Ze=s(ye.has),ht=s(ye.set),xt=function(ve){if(C(ve)){var ze=ve.body,$e;if(j(ze)===B)return $e=ve.headers?new W(ve.headers):new W,Ze($e,"content-type")||ht($e,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(ve,{body:$(0,x(ze)),headers:$(0,$e)})}return ve};if(v(ee)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(ze){return ee(ze,arguments.length>1?xt(arguments[1]):{})}}),v(L)){var ur=function(ze){return N(this,me),new L(ze,arguments.length>1?xt(arguments[1]):{})};me.constructor=ur,ur.prototype=me,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ur})}}return AC={URLSearchParams:Ae,getState:U},AC}var GJ;function nCe(){if(GJ)return RJ;GJ=1,PU();var e=Bt(),t=wn(),n=UJ(),a=dn(),u=V1(),s=Hr(),l=mo(),d=wf(),f=C4(),M=$i(),p=XSe(),y=IY(),I=F1(),m=zU().codeAt,N=eCe(),v=gu(),E=kl(),A=A4(),j=BJ(),S=xf(),C=S.set,x=S.getterFor("URL"),b=j.URLSearchParams,$=j.getState,V=a.URL,Q=a.TypeError,w=a.parseInt,_=Math.floor,k=Math.pow,R=s("".charAt),H=s(/./.exec),B=s([].join),q=s(1 .toString),se=s([].pop),U=s([].push),Z=s("".replace),ee=s([].shift),L=s("".split),W=s("".slice),me=s("".toLowerCase),ye=s([].unshift),fe="Invalid authority",xe="Invalid scheme",be="Invalid host",Oe="Invalid port",Ue=/[a-z]/i,Ke=/[\d+-.a-z]/i,at=/\d/,ot=/^0x/i,Mt=/^[0-7]+$/,_t=/^\d+$/,jt=/^[\da-f]+$/i,mt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,rt=/[\0\t\n\r #/:<>?@[\\\]^|]/,gt=/^[\u0000-\u0020]+/,dt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,yt=/[\t\n\r]/g,ne,pe=function(ie){var de=L(ie,"."),le,K,Ee,et,Qe,Lt,ct;if(de.length&&de[de.length-1]===""&&de.length--,le=de.length,le>4)return ie;for(K=[],Ee=0;Ee<le;Ee++){if(et=de[Ee],et==="")return ie;if(Qe=10,et.length>1&&R(et,0)==="0"&&(Qe=H(ot,et)?16:8,et=W(et,Qe===8?1:2)),et==="")Lt=0;else{if(!H(Qe===10?_t:Qe===8?Mt:jt,et))return ie;Lt=w(et,Qe)}U(K,Lt)}for(Ee=0;Ee<le;Ee++)if(Lt=K[Ee],Ee===le-1){if(Lt>=k(256,5-le))return null}else if(Lt>255)return null;for(ct=se(K),Ee=0;Ee<K.length;Ee++)ct+=K[Ee]*k(256,3-Ee);return ct},je=function(ie){var de=[0,0,0,0,0,0,0,0],le=0,K=null,Ee=0,et,Qe,Lt,ct,Xt,sr,Ne,wt=function(){return R(ie,Ee)};if(wt()===":"){if(R(ie,1)!==":")return;Ee+=2,le++,K=le}for(;wt();){if(le===8)return;if(wt()===":"){if(K!==null)return;Ee++,le++,K=le;continue}for(et=Qe=0;Qe<4&&H(jt,wt());)et=et*16+w(wt(),16),Ee++,Qe++;if(wt()==="."){if(Qe===0||(Ee-=Qe,le>6))return;for(Lt=0;wt();){if(ct=null,Lt>0)if(wt()==="."&&Lt<4)Ee++;else return;if(!H(at,wt()))return;for(;H(at,wt());){if(Xt=w(wt(),10),ct===null)ct=Xt;else{if(ct===0)return;ct=ct*10+Xt}if(ct>255)return;Ee++}de[le]=de[le]*256+ct,Lt++,(Lt===2||Lt===4)&&le++}if(Lt!==4)return;break}else if(wt()===":"){if(Ee++,!wt())return}else if(wt())return;de[le++]=et}if(K!==null)for(sr=le-K,le=7;le!==0&&sr>0;)Ne=de[le],de[le--]=de[K+sr-1],de[K+--sr]=Ne;else if(le!==8)return;return de},Ge=function(ie){for(var de=null,le=1,K=null,Ee=0,et=0;et<8;et++)ie[et]!==0?(Ee>le&&(de=K,le=Ee),K=null,Ee=0):(K===null&&(K=et),++Ee);return Ee>le?K:de},Se=function(ie){var de,le,K,Ee;if(typeof ie=="number"){for(de=[],le=0;le<4;le++)ye(de,ie%256),ie=_(ie/256);return B(de,".")}if(typeof ie=="object"){for(de="",K=Ge(ie),le=0;le<8;le++)Ee&&ie[le]===0||(Ee&&(Ee=!1),K===le?(de+=le?":":"::",Ee=!0):(de+=q(ie[le],16),le<7&&(de+=":")));return"["+de+"]"}return ie},Me={},Te=p({},Me,{" ":1,'"':1,"<":1,">":1,"`":1}),Ye=p({},Te,{"#":1,"?":1,"{":1,"}":1}),st=p({},Ye,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),it=function(ie,de){var le=m(ie,0);return le>32&&le<127&&!M(de,ie)?ie:encodeURIComponent(ie)},Re={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ae=function(ie,de){var le;return ie.length===2&&H(Ue,R(ie,0))&&((le=R(ie,1))===":"||!de&&le==="|")},Le=function(ie){var de;return ie.length>1&&Ae(W(ie,0,2))&&(ie.length===2||(de=R(ie,2))==="/"||de==="\\"||de==="?"||de==="#")},Ze=function(ie){return ie==="."||me(ie)==="%2e"},ht=function(ie){return ie=me(ie),ie===".."||ie==="%2e."||ie===".%2e"||ie==="%2e%2e"},xt={},ur={},ve={},ze={},$e={},ke={},nt={},Et={},St={},At={},$t={},nr={},gr={},ti={},Sr={},zn={},Qt={},Cr={},mn={},Ar={},pr={},Rn=function(ie,de,le){var K=v(ie),Ee,et,Qe;if(de){if(et=this.parse(K),et)throw new Q(et);this.searchParams=null}else{if(le!==void 0&&(Ee=new Rn(le,!0)),et=this.parse(K,null,Ee),et)throw new Q(et);Qe=$(new b),Qe.bindURL(this),this.searchParams=Qe}};Rn.prototype={type:"URL",parse:function(ie,de,le){var K=this,Ee=de||xt,et=0,Qe="",Lt=!1,ct=!1,Xt=!1,sr,Ne,wt,Gr;for(ie=v(ie),de||(K.scheme="",K.username="",K.password="",K.host=null,K.port=null,K.path=[],K.query=null,K.fragment=null,K.cannotBeABaseURL=!1,ie=Z(ie,gt,""),ie=Z(ie,dt,"$1")),ie=Z(ie,yt,""),sr=y(ie);et<=sr.length;){switch(Ne=sr[et],Ee){case xt:if(Ne&&H(Ue,Ne))Qe+=me(Ne),Ee=ur;else{if(de)return xe;Ee=ve;continue}break;case ur:if(Ne&&(H(Ke,Ne)||Ne==="+"||Ne==="-"||Ne==="."))Qe+=me(Ne);else if(Ne===":"){if(de&&(K.isSpecial()!==M(Re,Qe)||Qe==="file"&&(K.includesCredentials()||K.port!==null)||K.scheme==="file"&&!K.host))return;if(K.scheme=Qe,de){K.isSpecial()&&Re[K.scheme]===K.port&&(K.port=null);return}Qe="",K.scheme==="file"?Ee=ti:K.isSpecial()&&le&&le.scheme===K.scheme?Ee=ze:K.isSpecial()?Ee=Et:sr[et+1]==="/"?(Ee=$e,et++):(K.cannotBeABaseURL=!0,U(K.path,""),Ee=mn)}else{if(de)return xe;Qe="",Ee=ve,et=0;continue}break;case ve:if(!le||le.cannotBeABaseURL&&Ne!=="#")return xe;if(le.cannotBeABaseURL&&Ne==="#"){K.scheme=le.scheme,K.path=I(le.path),K.query=le.query,K.fragment="",K.cannotBeABaseURL=!0,Ee=pr;break}Ee=le.scheme==="file"?ti:ke;continue;case ze:if(Ne==="/"&&sr[et+1]==="/")Ee=St,et++;else{Ee=ke;continue}break;case $e:if(Ne==="/"){Ee=At;break}else{Ee=Cr;continue}case ke:if(K.scheme=le.scheme,Ne===ne)K.username=le.username,K.password=le.password,K.host=le.host,K.port=le.port,K.path=I(le.path),K.query=le.query;else if(Ne==="/"||Ne==="\\"&&K.isSpecial())Ee=nt;else if(Ne==="?")K.username=le.username,K.password=le.password,K.host=le.host,K.port=le.port,K.path=I(le.path),K.query="",Ee=Ar;else if(Ne==="#")K.username=le.username,K.password=le.password,K.host=le.host,K.port=le.port,K.path=I(le.path),K.query=le.query,K.fragment="",Ee=pr;else{K.username=le.username,K.password=le.password,K.host=le.host,K.port=le.port,K.path=I(le.path),K.path.length--,Ee=Cr;continue}break;case nt:if(K.isSpecial()&&(Ne==="/"||Ne==="\\"))Ee=St;else if(Ne==="/")Ee=At;else{K.username=le.username,K.password=le.password,K.host=le.host,K.port=le.port,Ee=Cr;continue}break;case Et:if(Ee=St,Ne!=="/"||R(Qe,et+1)!=="/")continue;et++;break;case St:if(Ne!=="/"&&Ne!=="\\"){Ee=At;continue}break;case At:if(Ne==="@"){Lt&&(Qe="%40"+Qe),Lt=!0,wt=y(Qe);for(var Di=0;Di<wt.length;Di++){var ri=wt[Di];if(ri===":"&&!Xt){Xt=!0;continue}var Or=it(ri,st);Xt?K.password+=Or:K.username+=Or}Qe=""}else if(Ne===ne||Ne==="/"||Ne==="?"||Ne==="#"||Ne==="\\"&&K.isSpecial()){if(Lt&&Qe==="")return fe;et-=y(Qe).length+1,Qe="",Ee=$t}else Qe+=Ne;break;case $t:case nr:if(de&&K.scheme==="file"){Ee=zn;continue}else if(Ne===":"&&!ct){if(Qe==="")return be;if(Gr=K.parseHost(Qe),Gr)return Gr;if(Qe="",Ee=gr,de===nr)return}else if(Ne===ne||Ne==="/"||Ne==="?"||Ne==="#"||Ne==="\\"&&K.isSpecial()){if(K.isSpecial()&&Qe==="")return be;if(de&&Qe===""&&(K.includesCredentials()||K.port!==null))return;if(Gr=K.parseHost(Qe),Gr)return Gr;if(Qe="",Ee=Qt,de)return;continue}else Ne==="["?ct=!0:Ne==="]"&&(ct=!1),Qe+=Ne;break;case gr:if(H(at,Ne))Qe+=Ne;else if(Ne===ne||Ne==="/"||Ne==="?"||Ne==="#"||Ne==="\\"&&K.isSpecial()||de){if(Qe!==""){var ea=w(Qe,10);if(ea>65535)return Oe;K.port=K.isSpecial()&&ea===Re[K.scheme]?null:ea,Qe=""}if(de)return;Ee=Qt;continue}else return Oe;break;case ti:if(K.scheme="file",Ne==="/"||Ne==="\\")Ee=Sr;else if(le&&le.scheme==="file")switch(Ne){case ne:K.host=le.host,K.path=I(le.path),K.query=le.query;break;case"?":K.host=le.host,K.path=I(le.path),K.query="",Ee=Ar;break;case"#":K.host=le.host,K.path=I(le.path),K.query=le.query,K.fragment="",Ee=pr;break;default:Le(B(I(sr,et),""))||(K.host=le.host,K.path=I(le.path),K.shortenPath()),Ee=Cr;continue}else{Ee=Cr;continue}break;case Sr:if(Ne==="/"||Ne==="\\"){Ee=zn;break}le&&le.scheme==="file"&&!Le(B(I(sr,et),""))&&(Ae(le.path[0],!0)?U(K.path,le.path[0]):K.host=le.host),Ee=Cr;continue;case zn:if(Ne===ne||Ne==="/"||Ne==="\\"||Ne==="?"||Ne==="#"){if(!de&&Ae(Qe))Ee=Cr;else if(Qe===""){if(K.host="",de)return;Ee=Qt}else{if(Gr=K.parseHost(Qe),Gr)return Gr;if(K.host==="localhost"&&(K.host=""),de)return;Qe="",Ee=Qt}continue}else Qe+=Ne;break;case Qt:if(K.isSpecial()){if(Ee=Cr,Ne!=="/"&&Ne!=="\\")continue}else if(!de&&Ne==="?")K.query="",Ee=Ar;else if(!de&&Ne==="#")K.fragment="",Ee=pr;else if(Ne!==ne&&(Ee=Cr,Ne!=="/"))continue;break;case Cr:if(Ne===ne||Ne==="/"||Ne==="\\"&&K.isSpecial()||!de&&(Ne==="?"||Ne==="#")){if(ht(Qe)?(K.shortenPath(),Ne!=="/"&&!(Ne==="\\"&&K.isSpecial())&&U(K.path,"")):Ze(Qe)?Ne!=="/"&&!(Ne==="\\"&&K.isSpecial())&&U(K.path,""):(K.scheme==="file"&&!K.path.length&&Ae(Qe)&&(K.host&&(K.host=""),Qe=R(Qe,0)+":"),U(K.path,Qe)),Qe="",K.scheme==="file"&&(Ne===ne||Ne==="?"||Ne==="#"))for(;K.path.length>1&&K.path[0]==="";)ee(K.path);Ne==="?"?(K.query="",Ee=Ar):Ne==="#"&&(K.fragment="",Ee=pr)}else Qe+=it(Ne,Ye);break;case mn:Ne==="?"?(K.query="",Ee=Ar):Ne==="#"?(K.fragment="",Ee=pr):Ne!==ne&&(K.path[0]+=it(Ne,Me));break;case Ar:!de&&Ne==="#"?(K.fragment="",Ee=pr):Ne!==ne&&(Ne==="'"&&K.isSpecial()?K.query+="%27":Ne==="#"?K.query+="%23":K.query+=it(Ne,Me));break;case pr:Ne!==ne&&(K.fragment+=it(Ne,Te));break}et++}},parseHost:function(ie){var de,le,K;if(R(ie,0)==="["){if(R(ie,ie.length-1)!=="]"||(de=je(W(ie,1,-1)),!de))return be;this.host=de}else if(this.isSpecial()){if(ie=N(ie),H(mt,ie)||(de=pe(ie),de===null))return be;this.host=de}else{if(H(rt,ie))return be;for(de="",le=y(ie),K=0;K<le.length;K++)de+=it(le[K],Me);this.host=de}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return M(Re,this.scheme)},shortenPath:function(){var ie=this.path,de=ie.length;de&&(this.scheme!=="file"||de!==1||!Ae(ie[0],!0))&&ie.length--},serialize:function(){var ie=this,de=ie.scheme,le=ie.username,K=ie.password,Ee=ie.host,et=ie.port,Qe=ie.path,Lt=ie.query,ct=ie.fragment,Xt=de+":";return Ee!==null?(Xt+="//",ie.includesCredentials()&&(Xt+=le+(K?":"+K:"")+"@"),Xt+=Se(Ee),et!==null&&(Xt+=":"+et)):de==="file"&&(Xt+="//"),Xt+=ie.cannotBeABaseURL?Qe[0]:Qe.length?"/"+B(Qe,"/"):"",Lt!==null&&(Xt+="?"+Lt),ct!==null&&(Xt+="#"+ct),Xt},setHref:function(ie){var de=this.parse(ie);if(de)throw new Q(de);this.searchParams.update()},getOrigin:function(){var ie=this.scheme,de=this.port;if(ie==="blob")try{return new Nn(ie.path[0]).origin}catch(le){return"null"}return ie==="file"||!this.isSpecial()?"null":ie+"://"+Se(this.host)+(de!==null?":"+de:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ie){this.parse(v(ie)+":",xt)},getUsername:function(){return this.username},setUsername:function(ie){var de=y(v(ie));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var le=0;le<de.length;le++)this.username+=it(de[le],st)}},getPassword:function(){return this.password},setPassword:function(ie){var de=y(v(ie));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var le=0;le<de.length;le++)this.password+=it(de[le],st)}},getHost:function(){var ie=this.host,de=this.port;return ie===null?"":de===null?Se(ie):Se(ie)+":"+de},setHost:function(ie){this.cannotBeABaseURL||this.parse(ie,$t)},getHostname:function(){var ie=this.host;return ie===null?"":Se(ie)},setHostname:function(ie){this.cannotBeABaseURL||this.parse(ie,nr)},getPort:function(){var ie=this.port;return ie===null?"":v(ie)},setPort:function(ie){this.cannotHaveUsernamePasswordPort()||(ie=v(ie),ie===""?this.port=null:this.parse(ie,gr))},getPathname:function(){var ie=this.path;return this.cannotBeABaseURL?ie[0]:ie.length?"/"+B(ie,"/"):""},setPathname:function(ie){this.cannotBeABaseURL||(this.path=[],this.parse(ie,Qt))},getSearch:function(){var ie=this.query;return ie?"?"+ie:""},setSearch:function(ie){ie=v(ie),ie===""?this.query=null:(R(ie,0)==="?"&&(ie=W(ie,1)),this.query="",this.parse(ie,Ar)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ie=this.fragment;return ie?"#"+ie:""},setHash:function(ie){if(ie=v(ie),ie===""){this.fragment=null;return}R(ie,0)==="#"&&(ie=W(ie,1)),this.fragment="",this.parse(ie,pr)},update:function(){this.query=this.searchParams.serialize()||null}};var Nn=function(de){var le=f(this,tr),K=A(arguments.length,1)>1?arguments[1]:void 0,Ee=C(le,new Rn(de,!1,K));t||(le.href=Ee.serialize(),le.origin=Ee.getOrigin(),le.protocol=Ee.getProtocol(),le.username=Ee.getUsername(),le.password=Ee.getPassword(),le.host=Ee.getHost(),le.hostname=Ee.getHostname(),le.port=Ee.getPort(),le.pathname=Ee.getPathname(),le.search=Ee.getSearch(),le.searchParams=Ee.getSearchParams(),le.hash=Ee.getHash())},tr=Nn.prototype,vr=function(ie,de){return{get:function(){return x(this)[ie]()},set:de&&function(le){return x(this)[de](le)},configurable:!0,enumerable:!0}};if(t&&(d(tr,"href",vr("serialize","setHref")),d(tr,"origin",vr("getOrigin")),d(tr,"protocol",vr("getProtocol","setProtocol")),d(tr,"username",vr("getUsername","setUsername")),d(tr,"password",vr("getPassword","setPassword")),d(tr,"host",vr("getHost","setHost")),d(tr,"hostname",vr("getHostname","setHostname")),d(tr,"port",vr("getPort","setPort")),d(tr,"pathname",vr("getPathname","setPathname")),d(tr,"search",vr("getSearch","setSearch")),d(tr,"searchParams",vr("getSearchParams")),d(tr,"hash",vr("getHash","setHash"))),l(tr,"toJSON",function(){return x(this).serialize()},{enumerable:!0}),l(tr,"toString",function(){return x(this).serialize()},{enumerable:!0}),V){var an=V.createObjectURL,Xi=V.revokeObjectURL;an&&l(Nn,"createObjectURL",u(an,V)),Xi&&l(Nn,"revokeObjectURL",u(Xi,V))}return E(Nn,"URL"),e({global:!0,constructor:!0,forced:!n,sham:!t},{URL:Nn}),RJ}var ZJ;function iCe(){return ZJ||(ZJ=1,nCe()),zJ}iCe();var WJ={},KJ;function aCe(){if(KJ)return WJ;KJ=1;var e=Bt(),t=fi();return e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}}),WJ}aCe();var qJ={},JJ;function oCe(){return JJ||(JJ=1,BJ()),qJ}oCe();var XJ={},eX;function uCe(){if(eX)return XJ;eX=1;var e=mo(),t=Hr(),n=gu(),a=A4(),u=URLSearchParams,s=u.prototype,l=t(s.append),d=t(s.delete),f=t(s.forEach),M=t([].push),p=new u("a=1&a=2&b=3");return p.delete("a",1),p.delete("b",void 0),p+""!="a=2"&&e(s,"delete",function(y){var I=arguments.length,m=I<2?void 0:arguments[1];if(I&&m===void 0)return d(this,y);var N=[];f(this,function(b,$){M(N,{key:$,value:b})}),a(I,1);for(var v=n(y),E=n(m),A=0,j=0,S=!1,C=N.length,x;A<C;)x=N[A++],S||x.key===v?(S=!0,d(this,x.key)):j++;for(;j<C;)x=N[j++],x.key===v&&x.value===E||l(this,x.key,x.value)},{enumerable:!0,unsafe:!0}),XJ}uCe();var tX={},rX;function sCe(){if(rX)return tX;rX=1;var e=mo(),t=Hr(),n=gu(),a=A4(),u=URLSearchParams,s=u.prototype,l=t(s.getAll),d=t(s.has),f=new u("a=1");return(f.has("a",2)||!f.has("a",void 0))&&e(s,"has",function(p){var y=arguments.length,I=y<2?void 0:arguments[1];if(y&&I===void 0)return d(this,p);var m=l(this,p);a(y,1);for(var N=n(I),v=0;v<m.length;)if(m[v++]===N)return!0;return!1},{enumerable:!0,unsafe:!0}),tX}sCe();var nX={},iX;function lCe(){if(iX)return nX;iX=1;var e=wn(),t=Hr(),n=wf(),a=URLSearchParams.prototype,u=t(a.forEach);return e&&!("size"in a)&&n(a,"size",{get:function(){var l=0;return u(this,function(){l++}),l},configurable:!0,enumerable:!0}),nX}lCe();function M2(e){"@babel/helpers - typeof";return M2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M2(e)}function cCe(e,t){return gCe(e)||MCe(e,t)||dCe(e,t)||fCe()}function fCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
80
80
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dCe(e,t){if(e){if(typeof e=="string")return aX(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aX(e,t):void 0}}function aX(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function MCe(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,u,s,l,d=[],f=!0,M=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(f=(a=s.call(n)).done)&&(d.push(a.value),d.length!==t);f=!0);}catch(p){M=!0,u=p}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(M)throw u}}return d}}function gCe(e){if(Array.isArray(e))return e}function pCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ICe(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,oX(a.key),a)}}function yCe(e,t,n){return t&&ICe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function h3(e,t,n){return(t=oX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oX(e){var t=hCe(e,"string");return M2(t)=="symbol"?t:t+""}function hCe(e,t){if(M2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(M2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mCe=function(){function e(){pCe(this,e),h3(this,"_levels",[]),h3(this,"_transports",[]),h3(this,"_logs",[]),h3(this,"_prevTime",0);try{if(!window.localStorage)return;var t=window.localStorage.getItem("logger");if(!t)return;var n=t.split(">"),a=cCe(n,2),u=a[0],s=a[1];this._levels=u.split(","),s&&(this._transports=s.split(","))}catch(l){return}}return yCe(e,[{key:"create",value:function(n,a){var u=this;return function(s){var l=Date.now(),d=0;if(u._prevTime&&(d=l-u._prevTime),u._prevTime=l,u._levels.includes(n)&&u._transports.includes("console")){var f=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(f,";"),n,"",s,"color: ".concat(f,";"),d)}u._logs.push("".concat(n,": ").concat(s," +").concat(d,"ms"))}}},{key:"getLogs",value:function(){return this._logs}},{key:"cleanLogs",value:function(){this._logs=[]}},{key:"saveLogsToFile",value:function(){if(!(!this._transports.includes("file")||!this._logs.length)){var n=this._logs.join(`
|
|
81
|
-
`),a=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=u,s.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),OC=new mCe;function Yg(e){"@babel/helpers - typeof";return Yg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yg(e)}function _n(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */_n=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function f(w,_,k,R){return Object.defineProperty(w,_,{value:k,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(w){f=function(k,R,H){return k[R]=H}}function M(w,_,k,R){var H=_&&_.prototype instanceof I?_:I,B=Object.create(H.prototype);return f(B,"_invoke",function(q,se,U){var Z=1;return function(ee,L){if(Z===3)throw Error("Generator is already running");if(Z===4){if(ee==="throw")throw L;return{value:e,done:!0}}for(U.method=ee,U.arg=L;;){var W=U.delegate;if(W){var me=x(W,U);if(me){if(me===y)continue;return me}}if(U.method==="next")U.sent=U._sent=U.arg;else if(U.method==="throw"){if(Z===1)throw Z=4,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);Z=3;var ye=p(q,se,U);if(ye.type==="normal"){if(Z=U.done?4:2,ye.arg===y)continue;return{value:ye.arg,done:U.done}}ye.type==="throw"&&(Z=4,U.method="throw",U.arg=ye.arg)}}}(w,k,new V(R||[])),!0),B}function p(w,_,k){try{return{type:"normal",arg:w.call(_,k)}}catch(R){return{type:"throw",arg:R}}}t.wrap=M;var y={};function I(){}function m(){}function N(){}var v={};f(v,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(v=A);var j=N.prototype=I.prototype=Object.create(v);function S(w){["next","throw","return"].forEach(function(_){f(w,_,function(k){return this._invoke(_,k)})})}function C(w,_){function k(H,B,q,se){var U=p(w[H],w,B);if(U.type!=="throw"){var Z=U.arg,ee=Z.value;return ee&&Yg(ee)=="object"&&a.call(ee,"__await")?_.resolve(ee.__await).then(function(L){k("next",L,q,se)},function(L){k("throw",L,q,se)}):_.resolve(ee).then(function(L){Z.value=L,q(Z)},function(L){return k("throw",L,q,se)})}se(U.arg)}var R;f(this,"_invoke",function(H,B){function q(){return new _(function(se,U){k(H,B,se,U)})}return R=R?R.then(q,q):q()},!0)}function x(w,_){var k=_.method,R=w.i[k];if(R===e)return _.delegate=null,k==="throw"&&w.i.return&&(_.method="return",_.arg=e,x(w,_),_.method==="throw")||k!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+k+"' method")),y;var H=p(R,w.i,_.arg);if(H.type==="throw")return _.method="throw",_.arg=H.arg,_.delegate=null,y;var B=H.arg;return B?B.done?(_[w.r]=B.value,_.next=w.n,_.method!=="return"&&(_.method="next",_.arg=e),_.delegate=null,y):B:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(w){this.tryEntries.push(w)}function $(w){var _=w[4]||{};_.type="normal",_.arg=e,w[4]=_}function V(w){this.tryEntries=[[-1]],w.forEach(b,this),this.reset(!0)}function Q(w){if(w!=null){var _=w[s];if(_)return _.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var k=-1,R=function H(){for(;++k<w.length;)if(a.call(w,k))return H.value=w[k],H.done=!1,H;return H.value=e,H.done=!0,H};return R.next=R}}throw new TypeError(Yg(w)+" is not iterable")}return m.prototype=N,f(j,"constructor",N),f(N,"constructor",m),m.displayName=f(N,d,"GeneratorFunction"),t.isGeneratorFunction=function(w){var _=typeof w=="function"&&w.constructor;return!!_&&(_===m||(_.displayName||_.name)==="GeneratorFunction")},t.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,N):(w.__proto__=N,f(w,d,"GeneratorFunction")),w.prototype=Object.create(j),w},t.awrap=function(w){return{__await:w}},S(C.prototype),f(C.prototype,l,function(){return this}),t.AsyncIterator=C,t.async=function(w,_,k,R,H){H===void 0&&(H=Promise);var B=new C(M(w,_,k,R),H);return t.isGeneratorFunction(_)?B:B.next().then(function(q){return q.done?q.value:B.next()})},S(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),t.keys=function(w){var _=Object(w),k=[];for(var R in _)k.unshift(R);return function H(){for(;k.length;)if((R=k.pop())in _)return H.value=R,H.done=!1,H;return H.done=!0,H}},t.values=Q,V.prototype={constructor:V,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!_)for(var k in this)k.charAt(0)==="t"&&a.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=e)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var k=this;function R(ee){q.type="throw",q.arg=_,k.next=ee}for(var H=k.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H],q=B[4],se=this.prev,U=B[1],Z=B[2];if(B[0]===-1)return R("end"),!1;if(!U&&!Z)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=se){if(se<U)return this.method="next",this.arg=e,R(U),!0;if(se<Z)return R(Z),!1}}},abrupt:function(_,k){for(var R=this.tryEntries.length-1;R>=0;--R){var H=this.tryEntries[R];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var B=H;break}}B&&(_==="break"||_==="continue")&&B[0]<=k&&k<=B[2]&&(B=null);var q=B?B[4]:{};return q.type=_,q.arg=k,B?(this.method="next",this.next=B[2],y):this.complete(q)},complete:function(_,k){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&k&&(this.next=k),y},finish:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[2]===_)return this.complete(R[4],R[3]),$(R),y}},catch:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[0]===_){var H=R[4];if(H.type==="throw"){var B=H.arg;$(R)}return B}}throw Error("illegal catch attempt")},delegateYield:function(_,k,R){return this.delegate={i:Q(_),r:k,n:R},this.method==="next"&&(this.arg=e),y}},t}function uX(e,t,n,a,u,s,l){try{var d=e[s](l),f=d.value}catch(M){return void n(M)}d.done?t(f):Promise.resolve(f).then(a,u)}function hu(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){uX(s,a,u,l,d,"next",f)}function d(f){uX(s,a,u,l,d,"throw",f)}l(void 0)})}}function NCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vCe(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,sX(a.key),a)}}function ECe(e,t,n){return t&&vCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function B4(e,t,n){return(t=sX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sX(e){var t=DCe(e,"string");return Yg(t)=="symbol"?t:t+""}function DCe(e,t){if(Yg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Yg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Oo=OC.create("wasm_idv"),TCe=function(){function e(t){NCe(this,e),B4(this,"_worker",null),B4(this,"_initialized",!1),B4(this,"_connectedToIdv",!1),B4(this,"_serviceRunning",!1),B4(this,"_userId",D3e(Nye)),B4(this,"_setErrorScreen",null),t&&(this._setErrorScreen=t)}return ECe(e,[{key:"init",value:function(){var t=hu(_n().mark(function a(){var u,s,l,d;return _n().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=1,M.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/a89a854-f47c475cd//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:s=M.sent,l=URL.createObjectURL(s),this._worker=new Worker(l),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),Oo("Creating worker error: ".concat(JSON.stringify(M.t0)));case 15:M.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){M.next=20;break}return M.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),M.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/a89a854-f47c475cd/",preMain:!0});case 23:return d=M.sent,d.code===0&&Oo("Worker was created successfully"),M.abrupt("return",d);case 26:case"end":return M.stop()}},a,this,[[1,12]])}));function n(){return t.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var t=hu(_n().mark(function a(u){var s,l;return _n().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:ME.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(s=u.isSecure)!==null&&s!==void 0?s:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),Oo("IdvWasmService result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var t=hu(_n().mark(function a(u){var s;return _n().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:ME.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return s=d.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),Oo("Connection by URL result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var t=hu(_n().mark(function a(u,s,l){var d,f;return _n().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d={workflowId:u,locale:s},l&&(T3e(l)?d.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),p.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:d,preMain:!0});case 4:return f=p.sent,Oo("Start session result code: ".concat(f.code)),p.abrupt("return",f);case 7:case"end":return p.stop()}},a,this)}));function n(a,u,s){return t.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var t=hu(_n().mark(function a(u){var s,l;return _n().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s={sessionId:u},f.next=3,this.sendMessage({continueParams:s,target:"custom",method:"continue_session",preMain:!0});case 3:return l=f.sent,Oo("Continue session result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var t=hu(_n().mark(function a(){var u,s,l=arguments;return _n().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return u=l.length>0&&l[0]!==void 0?l[0]:{limit:0,skip:0},f.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=f.sent,Oo("listWorkflows result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=l.sent,Oo("getHealth result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=l.sent,Oo("getServiceToken result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=l.sent,Oo("abandonSession result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var t=hu(_n().mark(function a(u){var s;return _n().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=d.sent,Oo("getWorkflow result code: ".concat(s.code)),d.abrupt("return",s);case 5:case"end":return d.stop()}},a,this)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var t=hu(_n().mark(function a(u,s){var l;return _n().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:u},preMain:!0});case 2:return l=f.sent,Oo("pushData result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function n(a,u){return t.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=l.sent,Oo("getSessionState result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=l.sent,Oo("waitForSessionUpdate result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=l.sent,this._connectedToIdv=!1,this._serviceRunning=!1,Oo("disconnect result code: ".concat(u.code)),l.abrupt("return",u);case 7:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var t=hu(_n().mark(function a(u){var s=this;return _n().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",new Promise(function(f,M){if(!s._worker)return M();s._worker.onmessage=function(p){var y=p.data.target;if(y==="stdout"){Oo(JSON.stringify(p.data.content));return}if(y==="custom"){var I=p.data,m=I.method,N=I.data;m==="onRuntimeInitialized"&&(s._initialized=!0),f(N)}if(y==="stderr"){var v=p.data.content;Oo(JSON.stringify(v)),s._setErrorScreen&&s._setErrorScreen(v)}},s._worker.postMessage(u)}));case 1:case"end":return d.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(this._worker){l.next=2;break}return l.abrupt("return",{code:0});case 2:if(this._connectedToIdv){l.next=5;break}return this.terminateWorker(),l.abrupt("return",{code:0});case 5:return l.next=7,this.disconnect();case 7:return u=l.sent,this.terminateWorker(),l.abrupt("return",u);case 10:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()}])}();function $g(e){"@babel/helpers - typeof";return $g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$g(e)}function lX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,a)}return n}function _C(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lX(Object(n),!0).forEach(function(a){xC(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function xC(e,t,n){return(t=jCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jCe(e){var t=SCe(e,"string");return $g(t)=="symbol"?t:t+""}function SCe(e,t){if($g(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if($g(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ui(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Ui=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function f(w,_,k,R){return Object.defineProperty(w,_,{value:k,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(w){f=function(k,R,H){return k[R]=H}}function M(w,_,k,R){var H=_&&_.prototype instanceof I?_:I,B=Object.create(H.prototype);return f(B,"_invoke",function(q,se,U){var Z=1;return function(ee,L){if(Z===3)throw Error("Generator is already running");if(Z===4){if(ee==="throw")throw L;return{value:e,done:!0}}for(U.method=ee,U.arg=L;;){var W=U.delegate;if(W){var me=x(W,U);if(me){if(me===y)continue;return me}}if(U.method==="next")U.sent=U._sent=U.arg;else if(U.method==="throw"){if(Z===1)throw Z=4,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);Z=3;var ye=p(q,se,U);if(ye.type==="normal"){if(Z=U.done?4:2,ye.arg===y)continue;return{value:ye.arg,done:U.done}}ye.type==="throw"&&(Z=4,U.method="throw",U.arg=ye.arg)}}}(w,k,new V(R||[])),!0),B}function p(w,_,k){try{return{type:"normal",arg:w.call(_,k)}}catch(R){return{type:"throw",arg:R}}}t.wrap=M;var y={};function I(){}function m(){}function N(){}var v={};f(v,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(v=A);var j=N.prototype=I.prototype=Object.create(v);function S(w){["next","throw","return"].forEach(function(_){f(w,_,function(k){return this._invoke(_,k)})})}function C(w,_){function k(H,B,q,se){var U=p(w[H],w,B);if(U.type!=="throw"){var Z=U.arg,ee=Z.value;return ee&&$g(ee)=="object"&&a.call(ee,"__await")?_.resolve(ee.__await).then(function(L){k("next",L,q,se)},function(L){k("throw",L,q,se)}):_.resolve(ee).then(function(L){Z.value=L,q(Z)},function(L){return k("throw",L,q,se)})}se(U.arg)}var R;f(this,"_invoke",function(H,B){function q(){return new _(function(se,U){k(H,B,se,U)})}return R=R?R.then(q,q):q()},!0)}function x(w,_){var k=_.method,R=w.i[k];if(R===e)return _.delegate=null,k==="throw"&&w.i.return&&(_.method="return",_.arg=e,x(w,_),_.method==="throw")||k!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+k+"' method")),y;var H=p(R,w.i,_.arg);if(H.type==="throw")return _.method="throw",_.arg=H.arg,_.delegate=null,y;var B=H.arg;return B?B.done?(_[w.r]=B.value,_.next=w.n,_.method!=="return"&&(_.method="next",_.arg=e),_.delegate=null,y):B:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(w){this.tryEntries.push(w)}function $(w){var _=w[4]||{};_.type="normal",_.arg=e,w[4]=_}function V(w){this.tryEntries=[[-1]],w.forEach(b,this),this.reset(!0)}function Q(w){if(w!=null){var _=w[s];if(_)return _.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var k=-1,R=function H(){for(;++k<w.length;)if(a.call(w,k))return H.value=w[k],H.done=!1,H;return H.value=e,H.done=!0,H};return R.next=R}}throw new TypeError($g(w)+" is not iterable")}return m.prototype=N,f(j,"constructor",N),f(N,"constructor",m),m.displayName=f(N,d,"GeneratorFunction"),t.isGeneratorFunction=function(w){var _=typeof w=="function"&&w.constructor;return!!_&&(_===m||(_.displayName||_.name)==="GeneratorFunction")},t.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,N):(w.__proto__=N,f(w,d,"GeneratorFunction")),w.prototype=Object.create(j),w},t.awrap=function(w){return{__await:w}},S(C.prototype),f(C.prototype,l,function(){return this}),t.AsyncIterator=C,t.async=function(w,_,k,R,H){H===void 0&&(H=Promise);var B=new C(M(w,_,k,R),H);return t.isGeneratorFunction(_)?B:B.next().then(function(q){return q.done?q.value:B.next()})},S(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),t.keys=function(w){var _=Object(w),k=[];for(var R in _)k.unshift(R);return function H(){for(;k.length;)if((R=k.pop())in _)return H.value=R,H.done=!1,H;return H.done=!0,H}},t.values=Q,V.prototype={constructor:V,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!_)for(var k in this)k.charAt(0)==="t"&&a.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=e)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var k=this;function R(ee){q.type="throw",q.arg=_,k.next=ee}for(var H=k.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H],q=B[4],se=this.prev,U=B[1],Z=B[2];if(B[0]===-1)return R("end"),!1;if(!U&&!Z)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=se){if(se<U)return this.method="next",this.arg=e,R(U),!0;if(se<Z)return R(Z),!1}}},abrupt:function(_,k){for(var R=this.tryEntries.length-1;R>=0;--R){var H=this.tryEntries[R];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var B=H;break}}B&&(_==="break"||_==="continue")&&B[0]<=k&&k<=B[2]&&(B=null);var q=B?B[4]:{};return q.type=_,q.arg=k,B?(this.method="next",this.next=B[2],y):this.complete(q)},complete:function(_,k){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&k&&(this.next=k),y},finish:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[2]===_)return this.complete(R[4],R[3]),$(R),y}},catch:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[0]===_){var H=R[4];if(H.type==="throw"){var B=H.arg;$(R)}return B}}throw Error("illegal catch attempt")},delegateYield:function(_,k,R){return this.delegate={i:Q(_),r:k,n:R},this.method==="next"&&(this.arg=e),y}},t}function cX(e,t,n,a,u,s,l){try{var d=e[s](l),f=d.value}catch(M){return void n(M)}d.done?t(f):Promise.resolve(f).then(a,u)}function Ql(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){cX(s,a,u,l,d,"next",f)}function d(f){cX(s,a,u,l,d,"throw",f)}l(void 0)})}}var CCe=OC.create("store_idv"),ACe=function(t,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Ql(Ui().mark(function s(){var l;return Ui().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=new TCe,f.next=3,l.init();case 3:t({wasmService:l});case 4:case"end":return f.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){t({isFinalWaitingUi:u})},connectToIdv:function(u){return Ql(Ui().mark(function s(){var l,d,f,M,p;return Ui().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(!((l=n().wasmService)!==null&&l!==void 0&&l.isServiceConnected())){I.next=3;break}return I.next=3,(d=n().wasmService)===null||d===void 0?void 0:d.disconnect();case 3:return I.next=5,n().wasmService.prepareAndConnect(u);case 5:if(f=I.sent,M=null,f.code===4&&(M=Sg.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=Sg.PROVIDER_ERROR),M===null){I.next=12;break}return p=new vp({errorCode:M}),I.abrupt("return",{error:p});case 12:return I.abrupt("return",{});case 13:case"end":return I.stop()}},s)}))()},connectByUrl:function(u){return Ql(Ui().mark(function s(){var l,d,f,M,p;return Ui().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().wasmService,I.next=3,l.connectByUrl(u);case 3:if(d=I.sent,f=null,d.code===4&&(f=Sg.HTTP_ISSUE),d.code!==0&&d.code!==4&&(f=Sg.PROVIDER_ERROR),f===null){I.next=13;break}return M=new vp({errorCode:f}),p=new Nh({errorCode:pE.CONNECTION_ISSUE,underlyingBaseError:M}),I.abrupt("return",{workflows:[],error:p});case 13:return I.abrupt("return",{workflows:d.data});case 14:case"end":return I.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var s=function(d){var f,M=(f=n().currentSessionData)===null||f===void 0?void 0:f.sessionId,p=_C(_C({},d.results),{},{sessionId:M}),y=_C({results:p},d.error&&{error:d.error});n().setCurrentSessionDataLsAndStore(null),u(y)};t(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Ql(Ui().mark(function s(){var l,d,f,M;return Ui().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().externalModulesNames,y.prev=1,y.next=4,OCe(l);case 4:return d=y.sent,t(function(){return{externalModules:d}}),y.abrupt("return",{});case 9:return y.prev=9,y.t0=y.catch(1),(f=n().wasmService)===null||f===void 0||f.shutdown(),n().resetWasmService(),n().resetProps(),M=new Np({errorCode:up.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=ND(u.find(function(l){return l.templateId===IE}));s.templateLayout=NH(s.templateLayout,n().layout),t({processingTransformedTemplate:s})},setIsProcessing:function(u){t({isProcessing:u})},_pushStep:function(){var a=Ql(Ui().mark(function s(l,d){var f,M,p;return Ui().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f=null,M=function(){var m=Ql(Ui().mark(function N(){var v,E,A,j;return Ui().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n().wasmService.pushData(l,d);case 2:if(v=C.sent,E=null,v.code===4&&(E=dl.HTTP_ISSUE),v.code!==0&&v.code!==4&&(E=dl.PROVIDER_ERROR),E!==null&&(A=new Ep({errorCode:dl.HTTP_ISSUE}),j=new Iu({errorCode:pu.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:A}),f=j),v.code!==0){C.next=12;break}return f=null,C.abrupt("return",v);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},N)}));return function(){return m.apply(this,arguments)}}(),p=function(){return null},I.next=5,ED(M,p);case 5:return I.abrupt("return",f?{error:f}:{});case 6:case"end":return I.stop()}},s)}));function u(s,l){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var s=n().workflow;if(!s||!u)return null;var l=s.steps.find(function(d){return d.id===u});return l!=null?l:null},_waitingForNextStep:function(){var a=Ql(Ui().mark(function s(){var l,d,f,M,p;return Ui().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().currentStepId,d=null,f=function(){var m=Ql(Ui().mark(function N(){var v,E,A,j,S,C,x,b,$,V,Q,w,_,k,R;return Ui().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,n().wasmService.getSessionState();case 2:if(j=B.sent,S=(v=j.data)===null||v===void 0?void 0:v.currentStep,C=(E=j.data)===null||E===void 0?void 0:E.isProcessingFiles,x=(A=j.data)===null||A===void 0||(A=A.workflow)===null||A===void 0?void 0:A.steps,b=N3e(x,S),$=j.code===4,V=j.code!==0&&j.code!==4,Q=j.code===0&&(!j.data.workflow||!j.data.currentStep),w=S&&S===l,_=null,x&&!b&&(_=dl.NOT_DATA_TYPE),$&&(_=dl.HTTP_ISSUE),V&&(_=dl.PROVIDER_ERROR),C&&(_=dl.IS_PROCESSING),w&&(_=dl.SAME_STEP),Q&&(_=dl.DECODING_FAILED),_!==null&&(k=new Ep({errorCode:_}),R=new Iu({errorCode:pu.INTERNAL_ISSUE,underlyingBaseError:k}),d=R),CCe(JSON.stringify({nextStep:S,isDataType:b,isProcessingFiles:C})),!(b&&!w&&!C&&!$&&!V&&!Q)){B.next=23;break}return d=null,B.abrupt("return",j.data);case 23:return B.abrupt("return",null);case 24:case"end":return B.stop()}},N)}));return function(){return m.apply(this,arguments)}}(),M=function(){return null},I.next=6,ED(f,M);case 6:if(p=I.sent,!d){I.next=9;break}return I.abrupt("return",{error:d});case 9:return I.abrupt("return",{workflow:p==null?void 0:p.workflow,nextStep:p==null?void 0:p.currentStep});case 10:case"end":return I.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var s=u||n().currentStepId;if(s){var l=n()._findStepById(s);l&&(n().workflowSessionCompletion({results:{finalStep:{id:l.id,name:l.name,final:l.final}}}),n().resetSession(),n().listener({eventType:ap.MESSAGE,message:op.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Ql(Ui().mark(function s(l){var d,f,M,p,y,I,m,N,v;return Ui().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(d=n().currentStepId,d){A.next=3;break}return A.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){A.next=7;break}return n().setFinalStepAndStopProcess(),A.abrupt("return");case 7:if(!(l instanceof qn)){A.next=13;break}return f=l,M=new Iu({errorCode:pu.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:f}),n().workflowSessionCompletion({error:M}),n().resetSession(),A.abrupt("return");case 13:return A.next=15,n()._pushStep(d,l);case 15:if(p=A.sent,!p.error){A.next=20;break}return n().workflowSessionCompletion({error:p.error}),n().resetSession(),A.abrupt("return");case 20:return A.next=22,n()._waitingForNextStep();case 22:if(y=A.sent,!y.error){A.next=27;break}return n().workflowSessionCompletion({error:y.error}),n().resetSession(),A.abrupt("return");case 27:if(I=y.workflow,m=y.nextStep,n().setWorkflow(I),n().setLayout(I.client.layout),n().setProcessingTemplate(I.client.steps),N=n()._findStepById(m),v=function(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.templateId},!(N!=null&&N.final&&!v(N.client))){A.next=37;break}return n().setFinalStepAndStopProcess(N.id),A.abrupt("return");case 37:N!=null&&N.final&&v(N.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(m),n().setIsProcessing(!1);case 40:case"end":return A.stop()}},s)}));function u(s){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return t(function(){return{currentScreenConfig:null}});var s=n().workflow,l=null;if(u===IE&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(l={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var f,M,p=n()._findStepById(u);if(typeof(p==null||(f=p.client)===null||f===void 0?void 0:f.templateId)=="string"){var y;l={templateId:p.client.templateId,dataSource:(y=p.dataSource)!==null&&y!==void 0?y:null}}if(l){var I;l.sessionId=(I=n().currentSessionData)===null||I===void 0?void 0:I.sessionId,l.serviceToken=n().serviceToken}if(l&&j3e(p==null||(M=p.client)===null||M===void 0?void 0:M.templateLayout)){var m=NH(p.client.templateLayout,n().layout);m&&(l.templateLayout=m)}}var N=m3e(n().externalModules,s.steps,u);if(l===null||!N){var v=new Iu({errorCode:pu.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:v}),t(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),t(function(){return{currentScreenConfig:l}})},deinitializationIdv:function(){var a=Ql(Ui().mark(function s(){var l,d;return Ui().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,(l=n().wasmService)===null||l===void 0?void 0:l.shutdown();case 2:if(d=M.sent,n().resetWasmService(),n().externalModules.forEach(function(p){p.component.deinitialize&&p.component.isReady&&p.component.deinitialize()}),(d==null?void 0:d.code)!==0){M.next=7;break}return M.abrupt("return",{});case 7:return M.abrupt("return",{});case 8:case"end":return M.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return t(function(){return{isFinalWaitingUi:!1,isProcessing:!1,processingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return t(function(){return{wasmService:null}})}}};function OCe(e){return LC.apply(this,arguments)}function LC(){return LC=Ql(Ui().mark(function e(t){var n,a,u,s,l,d;return Ui().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:Kf.getIdentifier(),supportedTemplates:Kf.getSupportedTemplates(),component:Kf}],a=xC(xC({},gE.LIVENESS,function(){return Promise.resolve().then(()=>sit)}),gE.DOC_READER,function(){return Promise.resolve().then(()=>wkt)}),u=Ui().mark(function p(){var y,I,m;return Ui().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(y=l[s],I=function(){return a[y]()},!I){v.next=7;break}return v.next=5,I();case 5:m=v.sent,n.push({id:m.default.getIdentifier(),supportedTemplates:m.default.getSupportedTemplates(),component:m.default});case 7:case"end":return v.stop()}},p)}),s=0,l=t;case 4:if(!(s<l.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:s++,M.next=4;break;case 9:return d=n.filter(function(p){return p!==null}),M.abrupt("return",d);case 11:case"end":return M.stop()}},e)})),LC.apply(this,arguments)}function g2(e){"@babel/helpers - typeof";return g2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g2(e)}function fX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,a)}return n}function wC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fX(Object(n),!0).forEach(function(a){_Ce(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _Ce(e,t,n){return(t=xCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xCe(e){var t=LCe(e,"string");return g2(t)=="symbol"?t:t+""}function LCe(e,t){if(g2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(g2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Aa=hhe(function(){return wC(wC(wC({},L3e.apply(void 0,arguments)),Z3e.apply(void 0,arguments)),ACe.apply(void 0,arguments))}),dX=function(t){var n=t.children;return Ii.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:n})};function p2(e){"@babel/helpers - typeof";return p2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p2(e)}function MX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,a)}return n}function gX(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MX(Object(n),!0).forEach(function(a){wCe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function wCe(e,t,n){return(t=bCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bCe(e){var t=kCe(e,"string");return p2(t)=="symbol"?t:t+""}function kCe(e,t){if(p2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(p2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zCe=function(){var t=Aa(function(m){return m.currentScreenConfig}),n=Aa(function(m){return m.pushStepWaitNextStepAndSet}),a=Aa(function(m){return m.processingTransformedTemplate}),u=Aa(function(m){return m.isProcessing}),s=Aa(function(m){return m.setIsProcessing}),l=Aa(function(m){return m.listener}),d=Aa(function(m){return m.externalModules}),f=Aa(function(m){return m.modulesConfig}),M=function(N,v){l({eventType:ap.MESSAGE,message:v,module:N})},p=function(N){s(N)},y=function(N){s(!1),n(N)},I=ft.useCallback(function(){if(!t)return null;var m=d.find(function(N){return N.supportedTemplates.includes(t.templateId)});if(m&&t)return Ii.jsx(m.component,{perform:y,moduleProps:t,modulesConfig:f,idvEventListener:M,isProcessing:p})},[t,d]);return!t&&!a?Ii.jsx(CE,{direction:gh.Ltr,children:Ii.jsx(dX,{children:"Waiting for play... or process completed"})}):Ii.jsx(Ii.Fragment,{children:Ii.jsx(CE,{direction:gh.Ltr,children:Ii.jsxs(Ii.Fragment,{children:[u&&Ii.jsx(dX,{children:a?Ii.jsx(Kf,{perform:y,moduleProps:gX(gX({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:p}):"Processing..."}),I()]})})})};function RCe(){return Ii.jsx(ft.StrictMode,{children:Ii.jsx(Gye,{children:Ii.jsx(zCe,{})})})}function G4(e){"@babel/helpers - typeof";return G4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G4(e)}function PCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pX(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,yX(a.key),a)}}function UCe(e,t,n){return t&&pX(e.prototype,t),n&&pX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YCe(e,t,n){return t=y2(t),$Ce(e,kC()?Reflect.construct(t,[],y2(e).constructor):t.apply(e,n))}function $Ce(e,t){if(t&&(G4(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QCe(e)}function QCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I2(e,t)}function bC(e){var t=typeof Map=="function"?new Map:void 0;return bC=function(a){if(a===null||!VCe(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(a))return t.get(a);t.set(a,u)}function u(){return FCe(a,arguments,y2(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),I2(u,a)},bC(e)}function FCe(e,t,n){if(kC())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var u=new(e.bind.apply(e,a));return n&&I2(u,n.prototype),u}function kC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(kC=function(){return!!e})()}function VCe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function I2(e,t){return I2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},I2(e,t)}function y2(e){return y2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y2(e)}function IX(e,t,n){return(t=yX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yX(e){var t=BCe(e,"string");return G4(t)=="symbol"?t:t+""}function BCe(e,t){if(G4(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(G4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GCe="*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}",hX=function(e){function t(){var n;return PCe(this,t),n=YCe(this,t),IX(n,"_root",gye.createRoot(n.attachShadow({mode:"open"}))),IX(n,"_mounted",!1),n}return HCe(t,e),UCe(t,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.139-nightly".trim())}},{key:"render",value:function(){this._root.render(Ii.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[Ii.jsx("style",{nonce:Aa.getState().getNonce(),children:GCe}),Ii.jsx(RCe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),OC.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(bC(HTMLElement));function Qg(e){"@babel/helpers - typeof";return Qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qg(e)}function nl(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */nl=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function f(w,_,k,R){return Object.defineProperty(w,_,{value:k,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(w){f=function(k,R,H){return k[R]=H}}function M(w,_,k,R){var H=_&&_.prototype instanceof I?_:I,B=Object.create(H.prototype);return f(B,"_invoke",function(q,se,U){var Z=1;return function(ee,L){if(Z===3)throw Error("Generator is already running");if(Z===4){if(ee==="throw")throw L;return{value:e,done:!0}}for(U.method=ee,U.arg=L;;){var W=U.delegate;if(W){var me=x(W,U);if(me){if(me===y)continue;return me}}if(U.method==="next")U.sent=U._sent=U.arg;else if(U.method==="throw"){if(Z===1)throw Z=4,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);Z=3;var ye=p(q,se,U);if(ye.type==="normal"){if(Z=U.done?4:2,ye.arg===y)continue;return{value:ye.arg,done:U.done}}ye.type==="throw"&&(Z=4,U.method="throw",U.arg=ye.arg)}}}(w,k,new V(R||[])),!0),B}function p(w,_,k){try{return{type:"normal",arg:w.call(_,k)}}catch(R){return{type:"throw",arg:R}}}t.wrap=M;var y={};function I(){}function m(){}function N(){}var v={};f(v,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(v=A);var j=N.prototype=I.prototype=Object.create(v);function S(w){["next","throw","return"].forEach(function(_){f(w,_,function(k){return this._invoke(_,k)})})}function C(w,_){function k(H,B,q,se){var U=p(w[H],w,B);if(U.type!=="throw"){var Z=U.arg,ee=Z.value;return ee&&Qg(ee)=="object"&&a.call(ee,"__await")?_.resolve(ee.__await).then(function(L){k("next",L,q,se)},function(L){k("throw",L,q,se)}):_.resolve(ee).then(function(L){Z.value=L,q(Z)},function(L){return k("throw",L,q,se)})}se(U.arg)}var R;f(this,"_invoke",function(H,B){function q(){return new _(function(se,U){k(H,B,se,U)})}return R=R?R.then(q,q):q()},!0)}function x(w,_){var k=_.method,R=w.i[k];if(R===e)return _.delegate=null,k==="throw"&&w.i.return&&(_.method="return",_.arg=e,x(w,_),_.method==="throw")||k!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+k+"' method")),y;var H=p(R,w.i,_.arg);if(H.type==="throw")return _.method="throw",_.arg=H.arg,_.delegate=null,y;var B=H.arg;return B?B.done?(_[w.r]=B.value,_.next=w.n,_.method!=="return"&&(_.method="next",_.arg=e),_.delegate=null,y):B:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(w){this.tryEntries.push(w)}function $(w){var _=w[4]||{};_.type="normal",_.arg=e,w[4]=_}function V(w){this.tryEntries=[[-1]],w.forEach(b,this),this.reset(!0)}function Q(w){if(w!=null){var _=w[s];if(_)return _.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var k=-1,R=function H(){for(;++k<w.length;)if(a.call(w,k))return H.value=w[k],H.done=!1,H;return H.value=e,H.done=!0,H};return R.next=R}}throw new TypeError(Qg(w)+" is not iterable")}return m.prototype=N,f(j,"constructor",N),f(N,"constructor",m),m.displayName=f(N,d,"GeneratorFunction"),t.isGeneratorFunction=function(w){var _=typeof w=="function"&&w.constructor;return!!_&&(_===m||(_.displayName||_.name)==="GeneratorFunction")},t.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,N):(w.__proto__=N,f(w,d,"GeneratorFunction")),w.prototype=Object.create(j),w},t.awrap=function(w){return{__await:w}},S(C.prototype),f(C.prototype,l,function(){return this}),t.AsyncIterator=C,t.async=function(w,_,k,R,H){H===void 0&&(H=Promise);var B=new C(M(w,_,k,R),H);return t.isGeneratorFunction(_)?B:B.next().then(function(q){return q.done?q.value:B.next()})},S(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),t.keys=function(w){var _=Object(w),k=[];for(var R in _)k.unshift(R);return function H(){for(;k.length;)if((R=k.pop())in _)return H.value=R,H.done=!1,H;return H.done=!0,H}},t.values=Q,V.prototype={constructor:V,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!_)for(var k in this)k.charAt(0)==="t"&&a.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=e)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var k=this;function R(ee){q.type="throw",q.arg=_,k.next=ee}for(var H=k.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H],q=B[4],se=this.prev,U=B[1],Z=B[2];if(B[0]===-1)return R("end"),!1;if(!U&&!Z)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=se){if(se<U)return this.method="next",this.arg=e,R(U),!0;if(se<Z)return R(Z),!1}}},abrupt:function(_,k){for(var R=this.tryEntries.length-1;R>=0;--R){var H=this.tryEntries[R];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var B=H;break}}B&&(_==="break"||_==="continue")&&B[0]<=k&&k<=B[2]&&(B=null);var q=B?B[4]:{};return q.type=_,q.arg=k,B?(this.method="next",this.next=B[2],y):this.complete(q)},complete:function(_,k){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&k&&(this.next=k),y},finish:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[2]===_)return this.complete(R[4],R[3]),$(R),y}},catch:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[0]===_){var H=R[4];if(H.type==="throw"){var B=H.arg;$(R)}return B}}throw Error("illegal catch attempt")},delegateYield:function(_,k,R){return this.delegate={i:Q(_),r:k,n:R},this.method==="next"&&(this.arg=e),y}},t}function mX(e,t,n,a,u,s,l){try{var d=e[s](l),f=d.value}catch(M){return void n(M)}d.done?t(f):Promise.resolve(f).then(a,u)}function Z4(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){mX(s,a,u,l,d,"next",f)}function d(f){mX(s,a,u,l,d,"throw",f)}l(void 0)})}}function ZCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WCe(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,qCe(a.key),a)}}function KCe(e,t,n){return t&&WCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qCe(e){var t=JCe(e,"string");return Qg(t)=="symbol"?t:t+""}function JCe(e,t){if(Qg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Qg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var XCe=function(){function e(){ZCe(this,e)}return KCe(e,[{key:"initialize",value:function(){var t=Z4(nl().mark(function a(u){var s;return nl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=Aa.getState().initialize(u),d.abrupt("return",s);case 2:case"end":return d.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"configure",value:function(){var t=Z4(nl().mark(function a(u){var s,l;return nl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(typeof u=="string"){f.next=5;break}return f.next=3,Aa.getState().configure(u);case 3:return s=f.sent,f.abrupt("return",s);case 5:return f.next=7,Aa.getState().configureWithUrl(u);case 7:return l=f.sent,f.abrupt("return",l);case 9:case"end":return f.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var t=Z4(nl().mark(function a(u){var s;return nl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Aa.getState().getWorkflows(u);case 2:return s=d.sent,d.abrupt("return",s);case 4:case"end":return d.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var t=Z4(nl().mark(function a(u){var s,l;return nl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=u.workflowId,f.next=3,Aa.getState().prepareWorkflowAndPrepareUi(s);case 3:return l=f.sent,f.abrupt("return",l);case 5:case"end":return f.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var t=Z4(nl().mark(function a(u){var s,l,d,f;return nl().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return s=u.metadata,l=u.locale,d=A3e(l),p.next=4,Aa.getState().startNewSession(d,s);case 4:if(f=p.sent,!f.error){p.next=7;break}return p.abrupt("return",f);case 7:return p.abrupt("return",new Promise(function(y){var I=function(N){y(N)};Aa.getState().playWorkflow(I)}));case 8:case"end":return p.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var t=Z4(nl().mark(function a(){var u;return nl().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Aa.getState().deinitialize();case 2:return u=l.sent,l.abrupt("return",u);case 4:case"end":return l.stop()}},a)}));function n(){return t.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.3.139-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(n){Aa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Aa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){Aa.getState().setSessionRestoreMode(n)}},{key:"currentSessionId",get:function(){return Aa.getState().getCurrentSessionId()}}])}(),eAe=window.customElements.get("idv-flow");eAe||window.customElements.define("idv-flow",hX);var tAe=Object.defineProperty,rAe=Object.defineProperties,nAe=Object.getOwnPropertyDescriptors,NX=Object.getOwnPropertySymbols,iAe=Object.prototype.hasOwnProperty,aAe=Object.prototype.propertyIsEnumerable,vX=(e,t,n)=>t in e?tAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zC=(e,t)=>{for(var n in t||(t={}))iAe.call(t,n)&&vX(e,n,t[n]);if(NX)for(var n of NX(t))aAe.call(t,n)&&vX(e,n,t[n]);return e},oAe=(e,t)=>rAe(e,nAe(t)),_o=(e,t,n)=>new Promise((a,u)=>{var s=f=>{try{d(n.next(f))}catch(M){u(M)}},l=f=>{try{d(n.throw(f))}catch(M){u(M)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(s,l);d((n=n.apply(e,t)).next())}),EX=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function DX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var TX={exports:{}},h2={},jX={exports:{}},en={},SX;function uAe(){if(SX)return en;SX=1;/**
|
|
81
|
+
`),a=new Blob([n],{type:"text/plain"}),u=window.URL.createObjectURL(a),s=document.createElement("a");s.download="log.txt",s.href=u,s.click(),window.URL.revokeObjectURL(u),this.cleanLogs()}}}])}(),OC=new mCe;function Yg(e){"@babel/helpers - typeof";return Yg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yg(e)}function _n(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */_n=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function f(w,_,k,R){return Object.defineProperty(w,_,{value:k,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(w){f=function(k,R,H){return k[R]=H}}function M(w,_,k,R){var H=_&&_.prototype instanceof I?_:I,B=Object.create(H.prototype);return f(B,"_invoke",function(q,se,U){var Z=1;return function(ee,L){if(Z===3)throw Error("Generator is already running");if(Z===4){if(ee==="throw")throw L;return{value:e,done:!0}}for(U.method=ee,U.arg=L;;){var W=U.delegate;if(W){var me=x(W,U);if(me){if(me===y)continue;return me}}if(U.method==="next")U.sent=U._sent=U.arg;else if(U.method==="throw"){if(Z===1)throw Z=4,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);Z=3;var ye=p(q,se,U);if(ye.type==="normal"){if(Z=U.done?4:2,ye.arg===y)continue;return{value:ye.arg,done:U.done}}ye.type==="throw"&&(Z=4,U.method="throw",U.arg=ye.arg)}}}(w,k,new V(R||[])),!0),B}function p(w,_,k){try{return{type:"normal",arg:w.call(_,k)}}catch(R){return{type:"throw",arg:R}}}t.wrap=M;var y={};function I(){}function m(){}function N(){}var v={};f(v,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(v=A);var j=N.prototype=I.prototype=Object.create(v);function S(w){["next","throw","return"].forEach(function(_){f(w,_,function(k){return this._invoke(_,k)})})}function C(w,_){function k(H,B,q,se){var U=p(w[H],w,B);if(U.type!=="throw"){var Z=U.arg,ee=Z.value;return ee&&Yg(ee)=="object"&&a.call(ee,"__await")?_.resolve(ee.__await).then(function(L){k("next",L,q,se)},function(L){k("throw",L,q,se)}):_.resolve(ee).then(function(L){Z.value=L,q(Z)},function(L){return k("throw",L,q,se)})}se(U.arg)}var R;f(this,"_invoke",function(H,B){function q(){return new _(function(se,U){k(H,B,se,U)})}return R=R?R.then(q,q):q()},!0)}function x(w,_){var k=_.method,R=w.i[k];if(R===e)return _.delegate=null,k==="throw"&&w.i.return&&(_.method="return",_.arg=e,x(w,_),_.method==="throw")||k!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+k+"' method")),y;var H=p(R,w.i,_.arg);if(H.type==="throw")return _.method="throw",_.arg=H.arg,_.delegate=null,y;var B=H.arg;return B?B.done?(_[w.r]=B.value,_.next=w.n,_.method!=="return"&&(_.method="next",_.arg=e),_.delegate=null,y):B:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(w){this.tryEntries.push(w)}function $(w){var _=w[4]||{};_.type="normal",_.arg=e,w[4]=_}function V(w){this.tryEntries=[[-1]],w.forEach(b,this),this.reset(!0)}function Q(w){if(w!=null){var _=w[s];if(_)return _.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var k=-1,R=function H(){for(;++k<w.length;)if(a.call(w,k))return H.value=w[k],H.done=!1,H;return H.value=e,H.done=!0,H};return R.next=R}}throw new TypeError(Yg(w)+" is not iterable")}return m.prototype=N,f(j,"constructor",N),f(N,"constructor",m),m.displayName=f(N,d,"GeneratorFunction"),t.isGeneratorFunction=function(w){var _=typeof w=="function"&&w.constructor;return!!_&&(_===m||(_.displayName||_.name)==="GeneratorFunction")},t.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,N):(w.__proto__=N,f(w,d,"GeneratorFunction")),w.prototype=Object.create(j),w},t.awrap=function(w){return{__await:w}},S(C.prototype),f(C.prototype,l,function(){return this}),t.AsyncIterator=C,t.async=function(w,_,k,R,H){H===void 0&&(H=Promise);var B=new C(M(w,_,k,R),H);return t.isGeneratorFunction(_)?B:B.next().then(function(q){return q.done?q.value:B.next()})},S(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),t.keys=function(w){var _=Object(w),k=[];for(var R in _)k.unshift(R);return function H(){for(;k.length;)if((R=k.pop())in _)return H.value=R,H.done=!1,H;return H.done=!0,H}},t.values=Q,V.prototype={constructor:V,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!_)for(var k in this)k.charAt(0)==="t"&&a.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=e)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var k=this;function R(ee){q.type="throw",q.arg=_,k.next=ee}for(var H=k.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H],q=B[4],se=this.prev,U=B[1],Z=B[2];if(B[0]===-1)return R("end"),!1;if(!U&&!Z)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=se){if(se<U)return this.method="next",this.arg=e,R(U),!0;if(se<Z)return R(Z),!1}}},abrupt:function(_,k){for(var R=this.tryEntries.length-1;R>=0;--R){var H=this.tryEntries[R];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var B=H;break}}B&&(_==="break"||_==="continue")&&B[0]<=k&&k<=B[2]&&(B=null);var q=B?B[4]:{};return q.type=_,q.arg=k,B?(this.method="next",this.next=B[2],y):this.complete(q)},complete:function(_,k){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&k&&(this.next=k),y},finish:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[2]===_)return this.complete(R[4],R[3]),$(R),y}},catch:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[0]===_){var H=R[4];if(H.type==="throw"){var B=H.arg;$(R)}return B}}throw Error("illegal catch attempt")},delegateYield:function(_,k,R){return this.delegate={i:Q(_),r:k,n:R},this.method==="next"&&(this.arg=e),y}},t}function uX(e,t,n,a,u,s,l){try{var d=e[s](l),f=d.value}catch(M){return void n(M)}d.done?t(f):Promise.resolve(f).then(a,u)}function hu(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){uX(s,a,u,l,d,"next",f)}function d(f){uX(s,a,u,l,d,"throw",f)}l(void 0)})}}function NCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vCe(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,sX(a.key),a)}}function ECe(e,t,n){return t&&vCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function B4(e,t,n){return(t=sX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sX(e){var t=DCe(e,"string");return Yg(t)=="symbol"?t:t+""}function DCe(e,t){if(Yg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Yg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Oo=OC.create("wasm_idv"),TCe=function(){function e(t){NCe(this,e),B4(this,"_worker",null),B4(this,"_initialized",!1),B4(this,"_connectedToIdv",!1),B4(this,"_serviceRunning",!1),B4(this,"_userId",D3e(Nye)),B4(this,"_setErrorScreen",null),t&&(this._setErrorScreen=t)}return ECe(e,[{key:"init",value:function(){var t=hu(_n().mark(function a(){var u,s,l,d;return _n().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=1,M.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/2.3/a89a854-f47c475cd//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:s=M.sent,l=URL.createObjectURL(s),this._worker=new Worker(l),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),Oo("Creating worker error: ".concat(JSON.stringify(M.t0)));case 15:M.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){M.next=20;break}return M.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),M.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/2.3/a89a854-f47c475cd/",preMain:!0});case 23:return d=M.sent,d.code===0&&Oo("Worker was created successfully"),M.abrupt("return",d);case 26:case"end":return M.stop()}},a,this,[[1,12]])}));function n(){return t.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var t=hu(_n().mark(function a(u){var s,l;return _n().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:ME.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:(s=u.isSecure)!==null&&s!==void 0?s:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),Oo("IdvWasmService result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var t=hu(_n().mark(function a(u){var s;return _n().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:ME.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return s=d.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),Oo("Connection by URL result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var t=hu(_n().mark(function a(u,s,l){var d,f;return _n().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d={workflowId:u,locale:s},l&&(T3e(l)?d.metadata=l:console.log("WARN (Idv):: metadata is not an object or an empty object")),p.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:d,preMain:!0});case 4:return f=p.sent,Oo("Start session result code: ".concat(f.code)),p.abrupt("return",f);case 7:case"end":return p.stop()}},a,this)}));function n(a,u,s){return t.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var t=hu(_n().mark(function a(u){var s,l;return _n().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s={sessionId:u},f.next=3,this.sendMessage({continueParams:s,target:"custom",method:"continue_session",preMain:!0});case 3:return l=f.sent,Oo("Continue session result code: ".concat(l.code)),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var t=hu(_n().mark(function a(){var u,s,l=arguments;return _n().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return u=l.length>0&&l[0]!==void 0?l[0]:{limit:0,skip:0},f.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=f.sent,Oo("listWorkflows result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=l.sent,Oo("getHealth result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=l.sent,Oo("getServiceToken result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=l.sent,Oo("abandonSession result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var t=hu(_n().mark(function a(u){var s;return _n().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=d.sent,Oo("getWorkflow result code: ".concat(s.code)),d.abrupt("return",s);case 5:case"end":return d.stop()}},a,this)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var t=hu(_n().mark(function a(u,s){var l;return _n().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:u},preMain:!0});case 2:return l=f.sent,Oo("pushData result code: ".concat(l.code)),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function n(a,u){return t.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=l.sent,Oo("getSessionState result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=l.sent,Oo("waitForSessionUpdate result code: ".concat(u.code)),l.abrupt("return",u);case 5:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=l.sent,this._connectedToIdv=!1,this._serviceRunning=!1,Oo("disconnect result code: ".concat(u.code)),l.abrupt("return",u);case 7:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var t=hu(_n().mark(function a(u){var s=this;return _n().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",new Promise(function(f,M){if(!s._worker)return M();s._worker.onmessage=function(p){var y=p.data.target;if(y==="stdout"){Oo(JSON.stringify(p.data.content));return}if(y==="custom"){var I=p.data,m=I.method,N=I.data;m==="onRuntimeInitialized"&&(s._initialized=!0),f(N)}if(y==="stderr"){var v=p.data.content;Oo(JSON.stringify(v)),s._setErrorScreen&&s._setErrorScreen(v)}},s._worker.postMessage(u)}));case 1:case"end":return d.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var n;(n=this._worker)===null||n===void 0||n.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var t=hu(_n().mark(function a(){var u;return _n().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(this._worker){l.next=2;break}return l.abrupt("return",{code:0});case 2:if(this._connectedToIdv){l.next=5;break}return this.terminateWorker(),l.abrupt("return",{code:0});case 5:return l.next=7,this.disconnect();case 7:return u=l.sent,this.terminateWorker(),l.abrupt("return",u);case 10:case"end":return l.stop()}},a,this)}));function n(){return t.apply(this,arguments)}return n}()}])}();function $g(e){"@babel/helpers - typeof";return $g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$g(e)}function lX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,a)}return n}function _C(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lX(Object(n),!0).forEach(function(a){xC(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function xC(e,t,n){return(t=jCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jCe(e){var t=SCe(e,"string");return $g(t)=="symbol"?t:t+""}function SCe(e,t){if($g(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if($g(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ui(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Ui=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function f(w,_,k,R){return Object.defineProperty(w,_,{value:k,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(w){f=function(k,R,H){return k[R]=H}}function M(w,_,k,R){var H=_&&_.prototype instanceof I?_:I,B=Object.create(H.prototype);return f(B,"_invoke",function(q,se,U){var Z=1;return function(ee,L){if(Z===3)throw Error("Generator is already running");if(Z===4){if(ee==="throw")throw L;return{value:e,done:!0}}for(U.method=ee,U.arg=L;;){var W=U.delegate;if(W){var me=x(W,U);if(me){if(me===y)continue;return me}}if(U.method==="next")U.sent=U._sent=U.arg;else if(U.method==="throw"){if(Z===1)throw Z=4,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);Z=3;var ye=p(q,se,U);if(ye.type==="normal"){if(Z=U.done?4:2,ye.arg===y)continue;return{value:ye.arg,done:U.done}}ye.type==="throw"&&(Z=4,U.method="throw",U.arg=ye.arg)}}}(w,k,new V(R||[])),!0),B}function p(w,_,k){try{return{type:"normal",arg:w.call(_,k)}}catch(R){return{type:"throw",arg:R}}}t.wrap=M;var y={};function I(){}function m(){}function N(){}var v={};f(v,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(v=A);var j=N.prototype=I.prototype=Object.create(v);function S(w){["next","throw","return"].forEach(function(_){f(w,_,function(k){return this._invoke(_,k)})})}function C(w,_){function k(H,B,q,se){var U=p(w[H],w,B);if(U.type!=="throw"){var Z=U.arg,ee=Z.value;return ee&&$g(ee)=="object"&&a.call(ee,"__await")?_.resolve(ee.__await).then(function(L){k("next",L,q,se)},function(L){k("throw",L,q,se)}):_.resolve(ee).then(function(L){Z.value=L,q(Z)},function(L){return k("throw",L,q,se)})}se(U.arg)}var R;f(this,"_invoke",function(H,B){function q(){return new _(function(se,U){k(H,B,se,U)})}return R=R?R.then(q,q):q()},!0)}function x(w,_){var k=_.method,R=w.i[k];if(R===e)return _.delegate=null,k==="throw"&&w.i.return&&(_.method="return",_.arg=e,x(w,_),_.method==="throw")||k!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+k+"' method")),y;var H=p(R,w.i,_.arg);if(H.type==="throw")return _.method="throw",_.arg=H.arg,_.delegate=null,y;var B=H.arg;return B?B.done?(_[w.r]=B.value,_.next=w.n,_.method!=="return"&&(_.method="next",_.arg=e),_.delegate=null,y):B:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(w){this.tryEntries.push(w)}function $(w){var _=w[4]||{};_.type="normal",_.arg=e,w[4]=_}function V(w){this.tryEntries=[[-1]],w.forEach(b,this),this.reset(!0)}function Q(w){if(w!=null){var _=w[s];if(_)return _.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var k=-1,R=function H(){for(;++k<w.length;)if(a.call(w,k))return H.value=w[k],H.done=!1,H;return H.value=e,H.done=!0,H};return R.next=R}}throw new TypeError($g(w)+" is not iterable")}return m.prototype=N,f(j,"constructor",N),f(N,"constructor",m),m.displayName=f(N,d,"GeneratorFunction"),t.isGeneratorFunction=function(w){var _=typeof w=="function"&&w.constructor;return!!_&&(_===m||(_.displayName||_.name)==="GeneratorFunction")},t.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,N):(w.__proto__=N,f(w,d,"GeneratorFunction")),w.prototype=Object.create(j),w},t.awrap=function(w){return{__await:w}},S(C.prototype),f(C.prototype,l,function(){return this}),t.AsyncIterator=C,t.async=function(w,_,k,R,H){H===void 0&&(H=Promise);var B=new C(M(w,_,k,R),H);return t.isGeneratorFunction(_)?B:B.next().then(function(q){return q.done?q.value:B.next()})},S(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),t.keys=function(w){var _=Object(w),k=[];for(var R in _)k.unshift(R);return function H(){for(;k.length;)if((R=k.pop())in _)return H.value=R,H.done=!1,H;return H.done=!0,H}},t.values=Q,V.prototype={constructor:V,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!_)for(var k in this)k.charAt(0)==="t"&&a.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=e)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var k=this;function R(ee){q.type="throw",q.arg=_,k.next=ee}for(var H=k.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H],q=B[4],se=this.prev,U=B[1],Z=B[2];if(B[0]===-1)return R("end"),!1;if(!U&&!Z)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=se){if(se<U)return this.method="next",this.arg=e,R(U),!0;if(se<Z)return R(Z),!1}}},abrupt:function(_,k){for(var R=this.tryEntries.length-1;R>=0;--R){var H=this.tryEntries[R];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var B=H;break}}B&&(_==="break"||_==="continue")&&B[0]<=k&&k<=B[2]&&(B=null);var q=B?B[4]:{};return q.type=_,q.arg=k,B?(this.method="next",this.next=B[2],y):this.complete(q)},complete:function(_,k){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&k&&(this.next=k),y},finish:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[2]===_)return this.complete(R[4],R[3]),$(R),y}},catch:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[0]===_){var H=R[4];if(H.type==="throw"){var B=H.arg;$(R)}return B}}throw Error("illegal catch attempt")},delegateYield:function(_,k,R){return this.delegate={i:Q(_),r:k,n:R},this.method==="next"&&(this.arg=e),y}},t}function cX(e,t,n,a,u,s,l){try{var d=e[s](l),f=d.value}catch(M){return void n(M)}d.done?t(f):Promise.resolve(f).then(a,u)}function Ql(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){cX(s,a,u,l,d,"next",f)}function d(f){cX(s,a,u,l,d,"throw",f)}l(void 0)})}}var CCe=OC.create("store_idv"),ACe=function(t,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Ql(Ui().mark(function s(){var l;return Ui().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=new TCe,f.next=3,l.init();case 3:t({wasmService:l});case 4:case"end":return f.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){t({isFinalWaitingUi:u})},connectToIdv:function(u){return Ql(Ui().mark(function s(){var l,d,f,M,p;return Ui().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(!((l=n().wasmService)!==null&&l!==void 0&&l.isServiceConnected())){I.next=3;break}return I.next=3,(d=n().wasmService)===null||d===void 0?void 0:d.disconnect();case 3:return I.next=5,n().wasmService.prepareAndConnect(u);case 5:if(f=I.sent,M=null,f.code===4&&(M=Sg.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=Sg.PROVIDER_ERROR),M===null){I.next=12;break}return p=new vp({errorCode:M}),I.abrupt("return",{error:p});case 12:return I.abrupt("return",{});case 13:case"end":return I.stop()}},s)}))()},connectByUrl:function(u){return Ql(Ui().mark(function s(){var l,d,f,M,p;return Ui().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().wasmService,I.next=3,l.connectByUrl(u);case 3:if(d=I.sent,f=null,d.code===4&&(f=Sg.HTTP_ISSUE),d.code!==0&&d.code!==4&&(f=Sg.PROVIDER_ERROR),f===null){I.next=13;break}return M=new vp({errorCode:f}),p=new Nh({errorCode:pE.CONNECTION_ISSUE,underlyingBaseError:M}),I.abrupt("return",{workflows:[],error:p});case 13:return I.abrupt("return",{workflows:d.data});case 14:case"end":return I.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var s=function(d){var f,M=(f=n().currentSessionData)===null||f===void 0?void 0:f.sessionId,p=_C(_C({},d.results),{},{sessionId:M}),y=_C({results:p},d.error&&{error:d.error});n().setCurrentSessionDataLsAndStore(null),u(y)};t(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Ql(Ui().mark(function s(){var l,d,f,M;return Ui().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().externalModulesNames,y.prev=1,y.next=4,OCe(l);case 4:return d=y.sent,t(function(){return{externalModules:d}}),y.abrupt("return",{});case 9:return y.prev=9,y.t0=y.catch(1),(f=n().wasmService)===null||f===void 0||f.shutdown(),n().resetWasmService(),n().resetProps(),M=new Np({errorCode:up.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=ND(u.find(function(l){return l.templateId===IE}));s.templateLayout=NH(s.templateLayout,n().layout),t({processingTransformedTemplate:s})},setIsProcessing:function(u){t({isProcessing:u})},_pushStep:function(){var a=Ql(Ui().mark(function s(l,d){var f,M,p;return Ui().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f=null,M=function(){var m=Ql(Ui().mark(function N(){var v,E,A,j;return Ui().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,n().wasmService.pushData(l,d);case 2:if(v=C.sent,E=null,v.code===4&&(E=dl.HTTP_ISSUE),v.code!==0&&v.code!==4&&(E=dl.PROVIDER_ERROR),E!==null&&(A=new Ep({errorCode:dl.HTTP_ISSUE}),j=new Iu({errorCode:pu.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:A}),f=j),v.code!==0){C.next=12;break}return f=null,C.abrupt("return",v);case 12:return C.abrupt("return",null);case 13:case"end":return C.stop()}},N)}));return function(){return m.apply(this,arguments)}}(),p=function(){return null},I.next=5,ED(M,p);case 5:return I.abrupt("return",f?{error:f}:{});case 6:case"end":return I.stop()}},s)}));function u(s,l){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var s=n().workflow;if(!s||!u)return null;var l=s.steps.find(function(d){return d.id===u});return l!=null?l:null},_waitingForNextStep:function(){var a=Ql(Ui().mark(function s(){var l,d,f,M,p;return Ui().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().currentStepId,d=null,f=function(){var m=Ql(Ui().mark(function N(){var v,E,A,j,S,C,x,b,$,V,Q,w,_,k,R;return Ui().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,n().wasmService.getSessionState();case 2:if(j=B.sent,S=(v=j.data)===null||v===void 0?void 0:v.currentStep,C=(E=j.data)===null||E===void 0?void 0:E.isProcessingFiles,x=(A=j.data)===null||A===void 0||(A=A.workflow)===null||A===void 0?void 0:A.steps,b=N3e(x,S),$=j.code===4,V=j.code!==0&&j.code!==4,Q=j.code===0&&(!j.data.workflow||!j.data.currentStep),w=S&&S===l,_=null,x&&!b&&(_=dl.NOT_DATA_TYPE),$&&(_=dl.HTTP_ISSUE),V&&(_=dl.PROVIDER_ERROR),C&&(_=dl.IS_PROCESSING),w&&(_=dl.SAME_STEP),Q&&(_=dl.DECODING_FAILED),_!==null&&(k=new Ep({errorCode:_}),R=new Iu({errorCode:pu.INTERNAL_ISSUE,underlyingBaseError:k}),d=R),CCe(JSON.stringify({nextStep:S,isDataType:b,isProcessingFiles:C})),!(b&&!w&&!C&&!$&&!V&&!Q)){B.next=23;break}return d=null,B.abrupt("return",j.data);case 23:return B.abrupt("return",null);case 24:case"end":return B.stop()}},N)}));return function(){return m.apply(this,arguments)}}(),M=function(){return null},I.next=6,ED(f,M);case 6:if(p=I.sent,!d){I.next=9;break}return I.abrupt("return",{error:d});case 9:return I.abrupt("return",{workflow:p==null?void 0:p.workflow,nextStep:p==null?void 0:p.currentStep});case 10:case"end":return I.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var s=u||n().currentStepId;if(s){var l=n()._findStepById(s);l&&(n().workflowSessionCompletion({results:{finalStep:{id:l.id,name:l.name,final:l.final}}}),n().resetSession(),n().listener({eventType:ap.MESSAGE,message:op.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Ql(Ui().mark(function s(l){var d,f,M,p,y,I,m,N,v;return Ui().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(d=n().currentStepId,d){A.next=3;break}return A.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){A.next=7;break}return n().setFinalStepAndStopProcess(),A.abrupt("return");case 7:if(!(l instanceof qn)){A.next=13;break}return f=l,M=new Iu({errorCode:pu.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:f}),n().workflowSessionCompletion({error:M}),n().resetSession(),A.abrupt("return");case 13:return A.next=15,n()._pushStep(d,l);case 15:if(p=A.sent,!p.error){A.next=20;break}return n().workflowSessionCompletion({error:p.error}),n().resetSession(),A.abrupt("return");case 20:return A.next=22,n()._waitingForNextStep();case 22:if(y=A.sent,!y.error){A.next=27;break}return n().workflowSessionCompletion({error:y.error}),n().resetSession(),A.abrupt("return");case 27:if(I=y.workflow,m=y.nextStep,n().setWorkflow(I),n().setLayout(I.client.layout),n().setProcessingTemplate(I.client.steps),N=n()._findStepById(m),v=function(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.templateId},!(N!=null&&N.final&&!v(N.client))){A.next=37;break}return n().setFinalStepAndStopProcess(N.id),A.abrupt("return");case 37:N!=null&&N.final&&v(N.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(m),n().setIsProcessing(!1);case 40:case"end":return A.stop()}},s)}));function u(s){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return t(function(){return{currentScreenConfig:null}});var s=n().workflow,l=null;if(u===IE&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(l={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var f,M,p=n()._findStepById(u);if(typeof(p==null||(f=p.client)===null||f===void 0?void 0:f.templateId)=="string"){var y;l={templateId:p.client.templateId,dataSource:(y=p.dataSource)!==null&&y!==void 0?y:null}}if(l){var I;l.sessionId=(I=n().currentSessionData)===null||I===void 0?void 0:I.sessionId,l.serviceToken=n().serviceToken}if(l&&j3e(p==null||(M=p.client)===null||M===void 0?void 0:M.templateLayout)){var m=NH(p.client.templateLayout,n().layout);m&&(l.templateLayout=m)}}var N=m3e(n().externalModules,s.steps,u);if(l===null||!N){var v=new Iu({errorCode:pu.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:v}),t(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),t(function(){return{currentScreenConfig:l}})},deinitializationIdv:function(){var a=Ql(Ui().mark(function s(){var l,d;return Ui().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,(l=n().wasmService)===null||l===void 0?void 0:l.shutdown();case 2:if(d=M.sent,n().resetWasmService(),n().externalModules.forEach(function(p){p.component.deinitialize&&p.component.isReady&&p.component.deinitialize()}),(d==null?void 0:d.code)!==0){M.next=7;break}return M.abrupt("return",{});case 7:return M.abrupt("return",{});case 8:case"end":return M.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return t(function(){return{isFinalWaitingUi:!1,isProcessing:!1,processingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null,serviceToken:void 0}})},resetWasmService:function(){return t(function(){return{wasmService:null}})}}};function OCe(e){return LC.apply(this,arguments)}function LC(){return LC=Ql(Ui().mark(function e(t){var n,a,u,s,l,d;return Ui().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:Kf.getIdentifier(),supportedTemplates:Kf.getSupportedTemplates(),component:Kf}],a=xC(xC({},gE.LIVENESS,function(){return Promise.resolve().then(()=>sit)}),gE.DOC_READER,function(){return Promise.resolve().then(()=>wkt)}),u=Ui().mark(function p(){var y,I,m;return Ui().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(y=l[s],I=function(){return a[y]()},!I){v.next=7;break}return v.next=5,I();case 5:m=v.sent,n.push({id:m.default.getIdentifier(),supportedTemplates:m.default.getSupportedTemplates(),component:m.default});case 7:case"end":return v.stop()}},p)}),s=0,l=t;case 4:if(!(s<l.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:s++,M.next=4;break;case 9:return d=n.filter(function(p){return p!==null}),M.abrupt("return",d);case 11:case"end":return M.stop()}},e)})),LC.apply(this,arguments)}function g2(e){"@babel/helpers - typeof";return g2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g2(e)}function fX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,a)}return n}function wC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fX(Object(n),!0).forEach(function(a){_Ce(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _Ce(e,t,n){return(t=xCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xCe(e){var t=LCe(e,"string");return g2(t)=="symbol"?t:t+""}function LCe(e,t){if(g2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(g2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Aa=hhe(function(){return wC(wC(wC({},L3e.apply(void 0,arguments)),Z3e.apply(void 0,arguments)),ACe.apply(void 0,arguments))}),dX=function(t){var n=t.children;return Ii.jsx("div",{style:{position:"absolute",top:0,left:0,flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%",background:"white",zIndex:1},children:n})};function p2(e){"@babel/helpers - typeof";return p2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p2(e)}function MX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,a)}return n}function gX(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MX(Object(n),!0).forEach(function(a){wCe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function wCe(e,t,n){return(t=bCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bCe(e){var t=kCe(e,"string");return p2(t)=="symbol"?t:t+""}function kCe(e,t){if(p2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(p2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zCe=function(){var t=Aa(function(m){return m.currentScreenConfig}),n=Aa(function(m){return m.pushStepWaitNextStepAndSet}),a=Aa(function(m){return m.processingTransformedTemplate}),u=Aa(function(m){return m.isProcessing}),s=Aa(function(m){return m.setIsProcessing}),l=Aa(function(m){return m.listener}),d=Aa(function(m){return m.externalModules}),f=Aa(function(m){return m.modulesConfig}),M=function(N,v){l({eventType:ap.MESSAGE,message:v,module:N})},p=function(N){s(N)},y=function(N){s(!1),n(N)},I=ft.useCallback(function(){if(!t)return null;var m=d.find(function(N){return N.supportedTemplates.includes(t.templateId)});if(m&&t)return Ii.jsx(m.component,{perform:y,moduleProps:t,modulesConfig:f,idvEventListener:M,isProcessing:p})},[t,d]);return!t&&!a?Ii.jsx(CE,{direction:gh.Ltr,children:Ii.jsx(dX,{children:"Waiting for play... or process completed"})}):Ii.jsx(Ii.Fragment,{children:Ii.jsx(CE,{direction:gh.Ltr,children:Ii.jsxs(Ii.Fragment,{children:[u&&Ii.jsx(dX,{children:a?Ii.jsx(Kf,{perform:y,moduleProps:gX(gX({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:p}):"Processing..."}),I()]})})})};function RCe(){return Ii.jsx(ft.StrictMode,{children:Ii.jsx(Gye,{children:Ii.jsx(zCe,{})})})}function G4(e){"@babel/helpers - typeof";return G4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G4(e)}function PCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pX(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,yX(a.key),a)}}function UCe(e,t,n){return t&&pX(e.prototype,t),n&&pX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YCe(e,t,n){return t=y2(t),$Ce(e,kC()?Reflect.construct(t,[],y2(e).constructor):t.apply(e,n))}function $Ce(e,t){if(t&&(G4(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QCe(e)}function QCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I2(e,t)}function bC(e){var t=typeof Map=="function"?new Map:void 0;return bC=function(a){if(a===null||!VCe(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(a))return t.get(a);t.set(a,u)}function u(){return FCe(a,arguments,y2(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),I2(u,a)},bC(e)}function FCe(e,t,n){if(kC())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var u=new(e.bind.apply(e,a));return n&&I2(u,n.prototype),u}function kC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(kC=function(){return!!e})()}function VCe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function I2(e,t){return I2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},I2(e,t)}function y2(e){return y2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y2(e)}function IX(e,t,n){return(t=yX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yX(e){var t=BCe(e,"string");return G4(t)=="symbol"?t:t+""}function BCe(e,t){if(G4(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(G4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GCe="*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}",hX=function(e){function t(){var n;return PCe(this,t),n=YCe(this,t),IX(n,"_root",gye.createRoot(n.attachShadow({mode:"open"}))),IX(n,"_mounted",!1),n}return HCe(t,e),UCe(t,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.141-nightly".trim())}},{key:"render",value:function(){this._root.render(Ii.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[Ii.jsx("style",{nonce:Aa.getState().getNonce(),children:GCe}),Ii.jsx(RCe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),OC.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(bC(HTMLElement));function Qg(e){"@babel/helpers - typeof";return Qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qg(e)}function nl(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */nl=function(){return t};var e,t={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function f(w,_,k,R){return Object.defineProperty(w,_,{value:k,enumerable:!R,configurable:!R,writable:!R})}try{f({},"")}catch(w){f=function(k,R,H){return k[R]=H}}function M(w,_,k,R){var H=_&&_.prototype instanceof I?_:I,B=Object.create(H.prototype);return f(B,"_invoke",function(q,se,U){var Z=1;return function(ee,L){if(Z===3)throw Error("Generator is already running");if(Z===4){if(ee==="throw")throw L;return{value:e,done:!0}}for(U.method=ee,U.arg=L;;){var W=U.delegate;if(W){var me=x(W,U);if(me){if(me===y)continue;return me}}if(U.method==="next")U.sent=U._sent=U.arg;else if(U.method==="throw"){if(Z===1)throw Z=4,U.arg;U.dispatchException(U.arg)}else U.method==="return"&&U.abrupt("return",U.arg);Z=3;var ye=p(q,se,U);if(ye.type==="normal"){if(Z=U.done?4:2,ye.arg===y)continue;return{value:ye.arg,done:U.done}}ye.type==="throw"&&(Z=4,U.method="throw",U.arg=ye.arg)}}}(w,k,new V(R||[])),!0),B}function p(w,_,k){try{return{type:"normal",arg:w.call(_,k)}}catch(R){return{type:"throw",arg:R}}}t.wrap=M;var y={};function I(){}function m(){}function N(){}var v={};f(v,s,function(){return this});var E=Object.getPrototypeOf,A=E&&E(E(Q([])));A&&A!==n&&a.call(A,s)&&(v=A);var j=N.prototype=I.prototype=Object.create(v);function S(w){["next","throw","return"].forEach(function(_){f(w,_,function(k){return this._invoke(_,k)})})}function C(w,_){function k(H,B,q,se){var U=p(w[H],w,B);if(U.type!=="throw"){var Z=U.arg,ee=Z.value;return ee&&Qg(ee)=="object"&&a.call(ee,"__await")?_.resolve(ee.__await).then(function(L){k("next",L,q,se)},function(L){k("throw",L,q,se)}):_.resolve(ee).then(function(L){Z.value=L,q(Z)},function(L){return k("throw",L,q,se)})}se(U.arg)}var R;f(this,"_invoke",function(H,B){function q(){return new _(function(se,U){k(H,B,se,U)})}return R=R?R.then(q,q):q()},!0)}function x(w,_){var k=_.method,R=w.i[k];if(R===e)return _.delegate=null,k==="throw"&&w.i.return&&(_.method="return",_.arg=e,x(w,_),_.method==="throw")||k!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+k+"' method")),y;var H=p(R,w.i,_.arg);if(H.type==="throw")return _.method="throw",_.arg=H.arg,_.delegate=null,y;var B=H.arg;return B?B.done?(_[w.r]=B.value,_.next=w.n,_.method!=="return"&&(_.method="next",_.arg=e),_.delegate=null,y):B:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,y)}function b(w){this.tryEntries.push(w)}function $(w){var _=w[4]||{};_.type="normal",_.arg=e,w[4]=_}function V(w){this.tryEntries=[[-1]],w.forEach(b,this),this.reset(!0)}function Q(w){if(w!=null){var _=w[s];if(_)return _.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var k=-1,R=function H(){for(;++k<w.length;)if(a.call(w,k))return H.value=w[k],H.done=!1,H;return H.value=e,H.done=!0,H};return R.next=R}}throw new TypeError(Qg(w)+" is not iterable")}return m.prototype=N,f(j,"constructor",N),f(N,"constructor",m),m.displayName=f(N,d,"GeneratorFunction"),t.isGeneratorFunction=function(w){var _=typeof w=="function"&&w.constructor;return!!_&&(_===m||(_.displayName||_.name)==="GeneratorFunction")},t.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,N):(w.__proto__=N,f(w,d,"GeneratorFunction")),w.prototype=Object.create(j),w},t.awrap=function(w){return{__await:w}},S(C.prototype),f(C.prototype,l,function(){return this}),t.AsyncIterator=C,t.async=function(w,_,k,R,H){H===void 0&&(H=Promise);var B=new C(M(w,_,k,R),H);return t.isGeneratorFunction(_)?B:B.next().then(function(q){return q.done?q.value:B.next()})},S(j),f(j,d,"Generator"),f(j,s,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),t.keys=function(w){var _=Object(w),k=[];for(var R in _)k.unshift(R);return function H(){for(;k.length;)if((R=k.pop())in _)return H.value=R,H.done=!1,H;return H.done=!0,H}},t.values=Q,V.prototype={constructor:V,reset:function(_){if(this.prev=this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach($),!_)for(var k in this)k.charAt(0)==="t"&&a.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=e)},stop:function(){this.done=!0;var _=this.tryEntries[0][4];if(_.type==="throw")throw _.arg;return this.rval},dispatchException:function(_){if(this.done)throw _;var k=this;function R(ee){q.type="throw",q.arg=_,k.next=ee}for(var H=k.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H],q=B[4],se=this.prev,U=B[1],Z=B[2];if(B[0]===-1)return R("end"),!1;if(!U&&!Z)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=se){if(se<U)return this.method="next",this.arg=e,R(U),!0;if(se<Z)return R(Z),!1}}},abrupt:function(_,k){for(var R=this.tryEntries.length-1;R>=0;--R){var H=this.tryEntries[R];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var B=H;break}}B&&(_==="break"||_==="continue")&&B[0]<=k&&k<=B[2]&&(B=null);var q=B?B[4]:{};return q.type=_,q.arg=k,B?(this.method="next",this.next=B[2],y):this.complete(q)},complete:function(_,k){if(_.type==="throw")throw _.arg;return _.type==="break"||_.type==="continue"?this.next=_.arg:_.type==="return"?(this.rval=this.arg=_.arg,this.method="return",this.next="end"):_.type==="normal"&&k&&(this.next=k),y},finish:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[2]===_)return this.complete(R[4],R[3]),$(R),y}},catch:function(_){for(var k=this.tryEntries.length-1;k>=0;--k){var R=this.tryEntries[k];if(R[0]===_){var H=R[4];if(H.type==="throw"){var B=H.arg;$(R)}return B}}throw Error("illegal catch attempt")},delegateYield:function(_,k,R){return this.delegate={i:Q(_),r:k,n:R},this.method==="next"&&(this.arg=e),y}},t}function mX(e,t,n,a,u,s,l){try{var d=e[s](l),f=d.value}catch(M){return void n(M)}d.done?t(f):Promise.resolve(f).then(a,u)}function Z4(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){mX(s,a,u,l,d,"next",f)}function d(f){mX(s,a,u,l,d,"throw",f)}l(void 0)})}}function ZCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WCe(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,qCe(a.key),a)}}function KCe(e,t,n){return t&&WCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qCe(e){var t=JCe(e,"string");return Qg(t)=="symbol"?t:t+""}function JCe(e,t){if(Qg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Qg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var XCe=function(){function e(){ZCe(this,e)}return KCe(e,[{key:"initialize",value:function(){var t=Z4(nl().mark(function a(u){var s;return nl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=Aa.getState().initialize(u),d.abrupt("return",s);case 2:case"end":return d.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"configure",value:function(){var t=Z4(nl().mark(function a(u){var s,l;return nl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(typeof u=="string"){f.next=5;break}return f.next=3,Aa.getState().configure(u);case 3:return s=f.sent,f.abrupt("return",s);case 5:return f.next=7,Aa.getState().configureWithUrl(u);case 7:return l=f.sent,f.abrupt("return",l);case 9:case"end":return f.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var t=Z4(nl().mark(function a(u){var s;return nl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Aa.getState().getWorkflows(u);case 2:return s=d.sent,d.abrupt("return",s);case 4:case"end":return d.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var t=Z4(nl().mark(function a(u){var s,l;return nl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=u.workflowId,f.next=3,Aa.getState().prepareWorkflowAndPrepareUi(s);case 3:return l=f.sent,f.abrupt("return",l);case 5:case"end":return f.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var t=Z4(nl().mark(function a(u){var s,l,d,f;return nl().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return s=u.metadata,l=u.locale,d=A3e(l),p.next=4,Aa.getState().startNewSession(d,s);case 4:if(f=p.sent,!f.error){p.next=7;break}return p.abrupt("return",f);case 7:return p.abrupt("return",new Promise(function(y){var I=function(N){y(N)};Aa.getState().playWorkflow(I)}));case 8:case"end":return p.stop()}},a)}));function n(a){return t.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var t=Z4(nl().mark(function a(){var u;return nl().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Aa.getState().deinitialize();case 2:return u=l.sent,l.abrupt("return",u);case 4:case"end":return l.stop()}},a)}));function n(){return t.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.3.141-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(n){Aa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Aa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){Aa.getState().setSessionRestoreMode(n)}},{key:"currentSessionId",get:function(){return Aa.getState().getCurrentSessionId()}}])}(),eAe=window.customElements.get("idv-flow");eAe||window.customElements.define("idv-flow",hX);var tAe=Object.defineProperty,rAe=Object.defineProperties,nAe=Object.getOwnPropertyDescriptors,NX=Object.getOwnPropertySymbols,iAe=Object.prototype.hasOwnProperty,aAe=Object.prototype.propertyIsEnumerable,vX=(e,t,n)=>t in e?tAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zC=(e,t)=>{for(var n in t||(t={}))iAe.call(t,n)&&vX(e,n,t[n]);if(NX)for(var n of NX(t))aAe.call(t,n)&&vX(e,n,t[n]);return e},oAe=(e,t)=>rAe(e,nAe(t)),_o=(e,t,n)=>new Promise((a,u)=>{var s=f=>{try{d(n.next(f))}catch(M){u(M)}},l=f=>{try{d(n.throw(f))}catch(M){u(M)}},d=f=>f.done?a(f.value):Promise.resolve(f.value).then(s,l);d((n=n.apply(e,t)).next())}),EX=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function DX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var TX={exports:{}},h2={},jX={exports:{}},en={},SX;function uAe(){if(SX)return en;SX=1;/**
|
|
82
82
|
* @license React
|
|
83
83
|
* react.production.min.js
|
|
84
84
|
*
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as e, b as s, I as i, g as n, c as t, a as E, d as v, P as I, S as d, e as S, f as c, W as l } from "./index-
|
|
1
|
+
import { C as a, D as e, b as s, I as i, g as n, c as t, a as E, d as v, P as I, S as d, e as S, f as c, W as l } from "./index-DvD3cGTJ.js";
|
|
2
2
|
export {
|
|
3
3
|
a as ConnectionError,
|
|
4
4
|
e as DeinitializationError,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/idv-capture-web",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.141-nightly",
|
|
4
4
|
"description": "Regula framework agnostic web components to work with webcamera",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "vitest run"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@regulaforensics/idv-gui": "^2.3.
|
|
24
|
+
"@regulaforensics/idv-gui": "^2.3.140-nightly",
|
|
25
25
|
"react-device-detect": "^2.2.3",
|
|
26
26
|
"zustand": "^5.0.3"
|
|
27
27
|
}
|