@regulaforensics/idv-capture-web 2.3.133-nightly → 2.3.134-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.
|
@@ -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-pk9S360k.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) => {
|
|
@@ -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-pk9S360k.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]);
|
|
@@ -26655,9 +26655,9 @@ function H6() {
|
|
|
26655
26655
|
supportedTemplates: xi.getSupportedTemplates(),
|
|
26656
26656
|
component: xi
|
|
26657
26657
|
}], i = z6(z6({}, Fg.LIVENESS, function() {
|
|
26658
|
-
return import("./index-
|
|
26658
|
+
return import("./index-DWJB3IE7.js");
|
|
26659
26659
|
}), Fg.DOC_READER, function() {
|
|
26660
|
-
return import("./index-
|
|
26660
|
+
return import("./index-Ce5adMx3.js");
|
|
26661
26661
|
}), a = /* @__PURE__ */ nt().mark(function p() {
|
|
26662
26662
|
var h, m, y;
|
|
26663
26663
|
return nt().wrap(function(w) {
|
|
@@ -26975,7 +26975,7 @@ var BG = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
|
|
|
26975
26975
|
}, {
|
|
26976
26976
|
key: "version",
|
|
26977
26977
|
get: function() {
|
|
26978
|
-
return "".concat("2.3.
|
|
26978
|
+
return "".concat("2.3.134-nightly".trim());
|
|
26979
26979
|
}
|
|
26980
26980
|
}, {
|
|
26981
26981
|
key: "render",
|
|
@@ -27445,7 +27445,7 @@ var YG = /* @__PURE__ */ function() {
|
|
|
27445
27445
|
key: "version",
|
|
27446
27446
|
get: function() {
|
|
27447
27447
|
var t;
|
|
27448
|
-
return (t = "2.3.
|
|
27448
|
+
return (t = "2.3.134-nightly") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
|
|
27449
27449
|
}
|
|
27450
27450
|
}, {
|
|
27451
27451
|
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 gSe(e,t){if(e){if(typeof e=="string")return sJ(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)?sJ(e,t):void 0}}function sJ(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 pSe(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 ISe(e){if(Array.isArray(e))return e}var ySe=function(e){var t=e.option,n=e.layout,a=e.dataSourceQuestion,u=e.register,s=e.watch,l=ft.useState(!1),d=dSe(l,2),f=d[0],M=d[1],p=rJ(),y=String(a.id),I=s(y),m=I===String(t.id),N=n.option,v=n.optionSelected,E={borderRadius:N.cornerRadius,background:N.backgroundColor,borderColor:N.borderColor,borderWidth:N.borderWidth},A={borderRadius:v.cornerRadius,background:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth},j=f&&p?{outline:"2px solid ".concat(Up)}:{};return re.jsx("div",{style:{display:"flex",flexGrow:1},children:re.jsxs("label",{style:uJ(uJ({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},m?A:E),j),children:[re.jsx("input",Cn(Nt({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},u(y,{required:!!a.required,validate:H4(a.validators,!!a.required)})),{value:t.id,type:"radio",onFocus:function(){return M(!0)},onBlur:function(){return M(!1)}})),re.jsx(Du,Cn(Nt({},m?v.title:N.title),{text:t.text}))]})},t.id)},hSe=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(Du,Cn(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(ySe,{register:a,watch:n,layout:t,option:s,dataSourceQuestion:u},s.id)})})]})})};function c2(e){"@babel/helpers - typeof";return c2=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},c2(e)}function lJ(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 yC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lJ(Object(n),!0).forEach(function(a){mSe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lJ(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function mSe(e,t,n){return(t=NSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NSe(e){var t=vSe(e,"string");return c2(t)=="symbol"?t:t+""}function vSe(e,t){if(c2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(c2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ESe=function(e){var t=e.children,n=e.backgroundColor,a=n===void 0?"transparent":n,u=e.cornerRadius,s=u===void 0?0:u,l=e.isError,d=e.isRequired,f=e.validationBorderColor,M=e.validationBorderWidth,p=yC({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:a,borderRadius:s,padding:"16px",boxSizing:"border-box",height:"auto"},l&&yC(yC({},f&&{borderColor:f,borderStyle:"solid"}),M&&{borderWidth:M}));return re.jsxs("div",{style:p,children:[d&&re.jsx("span",{style:{color:f!=null?f:void 0,position:"absolute",left:"6px",top:"18px"},children:"*"}),t]})};function DSe(e,t){return CSe(e)||SSe(e,t)||jSe(e,t)||TSe()}function TSe(){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 jSe(e,t){if(e){if(typeof e=="string")return cJ(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)?cJ(e,t):void 0}}function cJ(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 SSe(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 CSe(e){if(Array.isArray(e))return e}var ASe=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=DSe(a,2),s=u[0],l=u[1];return re.jsx(Du,Cn(Nt({},n),{text:l}),s)})}):null},OSe=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===Rh.EMAIL?"email":C===Rh.FREE_TEXT?"text":C===Rh.NUMBER?"number":C===Rh.SECURE?"password":"text":"text"};return re.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[re.jsx(Du,Cn(Nt({},v.title),{text:E.text,htmlFor:j})),re.jsx("input",Cn(Nt({},A(j,{required:!!E.required,validate:H4(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=v==null||(d=v.textField)===null||d===void 0?void 0:d.fontColor)!==null&&l!==void 0?l:"black",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=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:Up},placeholder:(N=E.placeholder)!==null&&N!==void 0?N:"","data-id":j}))]})},_Se=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(Du,Cn(Nt({},I.title),{text:m.text,htmlFor:v})),re.jsx("textarea",Cn(Nt({},N(v,{required:!!m.required,validate:H4(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=I==null||(s=I.textField)===null||s===void 0?void 0:s.fontColor)!==null&&u!==void 0?u:"black",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=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:Up}}))]})},fJ={},hC,dJ;function MJ(){if(dJ)return hC;dJ=1;var e=Zn(),t=m1(),n=jo(),a=Da(),u=wp(),s=Cp(),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 hC=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},hC}var gJ;function xSe(){if(gJ)return fJ;gJ=1;var e=br(),t=MJ();return e({target:"Function",proto:!0,forced:Function.bind!==t},{bind:t}),fJ}xSe();var pJ={},IJ;function LSe(){if(IJ)return pJ;IJ=1;var e=br(),t=qn(),n=v1();return e({target:"Object",stat:!0,sham:!t},{create:n}),pJ}LSe();var yJ={},hJ;function wSe(){if(hJ)return yJ;hJ=1;var e=br(),t=gn(),n=Pl(),a=Lp(),u=NV(),s=t(function(){a(1)});return e({target:"Object",stat:!0,forced:s,sham:!u},{getPrototypeOf:function(l){return a(n(l))}}),yJ}wSe();var mJ={},NJ;function bSe(){if(NJ)return mJ;NJ=1;var e=qn(),t=G1(),n=jo(),a=_V(),u=Pl(),s=wg(),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 mJ}bSe();var vJ={},EJ;function kSe(){if(EJ)return vJ;EJ=1;var e=br(),t=Ch();return e({target:"Object",stat:!0},{setPrototypeOf:t}),vJ}kSe();var DJ={},mC,TJ;function zSe(){if(TJ)return mC;TJ=1;var e=_h(),t=Op(),n=TypeError;return mC=function(a){if(e(a))return a;throw new n(t(a)+" is not a constructor")},mC}var jJ;function RSe(){if(jJ)return DJ;jJ=1;var e=br(),t=Qf(),n=Sh(),a=MJ(),u=zSe(),s=xa(),l=jo(),d=v1(),f=gn(),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}}),DJ}RSe();var SJ={},CJ;function PSe(){if(CJ)return SJ;CJ=1;var e=br(),t=gn(),n=k4(),a=jo(),u=Pl(),s=bg(),l=gG(),d=zp(),f=NB(),M=Lh(),p=Ri(),y=VD(),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}}),SJ}PSe();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 USe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AJ(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,OJ(a.key),a)}}function YSe(e,t,n){return t&&AJ(e.prototype,t),n&&AJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function S1(e,t,n){return(t=OJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OJ(e){var t=$Se(e,"string");return f2(t)=="symbol"?t:t+""}function $Se(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 String(e)}var _J=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;USe(this,e),S1(this,"errorCode",void 0),S1(this,"errorCodeKey",void 0),S1(this,"message",void 0),S1(this,"underlyingError",void 0),S1(this,"underlyingBaseError",void 0),S1(this,"domain",void 0),S1(this,"module",void 0),S1(this,"errorEnumName",void 0),S1(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 YSe(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 F4(e){"@babel/helpers - typeof";return F4=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},F4(e)}function QSe(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function HSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FSe(e,t,n){return t=p3(t),VSe(e,xJ()?Reflect.construct(t,n||[],p3(e).constructor):t.apply(e,n))}function VSe(e,t){if(t&&(F4(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BSe(e)}function BSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(xJ=function(){return!!e})()}function p3(e){return p3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p3(e)}function GSe(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&&NC(e,t)}function NC(e,t){return NC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},NC(e,t)}function vC(e,t,n){return(t=ZSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZSe(e){var t=WSe(e,"string");return F4(t)=="symbol"?t:t+""}function WSe(e,t){if(F4(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(F4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var I3=function(e){function t(n){var a=n.errorCode,u=n.message,s=n.underlyingError,l=n.underlyingBaseError;HSe(this,t);var d=_J.getErrorKey(a,jW);return FSe(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 GSe(t,e),QSe(t)}(_J);vC(I3,"MODULE",xS),vC(I3,"ERROR_ENUM_NAME","GuiModuleError"),vC(I3,"SHORT_CODE","GM");var KSe=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=gj(),M=f.perform,p=$5e({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(pve(j)),N()};return re.jsx(Fp,{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:s.backgroundColor||"transparent"},children:[n&&re.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:re.jsx(Du,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 I3({errorCode:jW.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(ESe,{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===z4.TEXT_EXPANDABLE&&re.jsx(_Se,{layout:$,dataSourceQuestion:j,register:y}),Q===z4.TEXT_SINGLE_LINE&&re.jsx(OSe,{layout:$,dataSourceQuestion:j,register:y}),Q===z4.SELECTOR_OPTIONS&&re.jsx(sSe,{layout:$,dataSourceQuestion:j,watch:v,register:y}),Q===z4.SELECTOR_BUTTONS&&re.jsx(hSe,{layout:$,dataSourceQuestion:j,watch:v,register:y}),Q===z4.SELECTOR_DROPDOWN&&re.jsx(kje,{control:E,layout:$,dataSourceQuestion:j}),Q===z4.MULTI_SELECTOR_DROPDOWN&&re.jsx(Gje,{control:E,layout:$,dataSourceQuestion:j})]}),w&&re.jsx(ASe,{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(CW,Nt({dataTestId:"question-button"},j),S)})})]})})},LJ=function(e){var t=e.templateId,n=e.templateLayout,a=e.dataSource;return!t||!n?re.jsx(kW,{}):t===Z1.STATUS?re.jsx(Gve,{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===Z1.INFO?re.jsx(Xve,{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===Z1.PROGRESS?re.jsx(kW,{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===Z1.INFO_DETAILS?re.jsx(p5e,{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===Z1.QUESTIONS?re.jsx(KSe,{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===Z1.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"})},EC=!1,Wf=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===Z1.QUESTIONS?re.jsx(qV,{perform:d,children:re.jsx(LJ,{dataSource:l,templateId:u,templateLayout:s})}):re.jsx(qV,{perform:d,children:re.jsx(LJ,{templateId:u,templateLayout:s})})};Wf.getIdentifier=function(){return xS},Wf.getSupportedTemplates=function(){return Object.values(Z1)},Wf.deinitialize=function(){EC=!1},Wf.initialize=function(){EC=!0},Wf.isReady=function(){return EC},Wf.displayName=xS;var wJ={},bJ;function qSe(){if(bJ)return wJ;bJ=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)}}),wJ}qSe();var kJ={},zJ={},DC,RJ;function PJ(){if(RJ)return DC;RJ=1;var e=Qr(),t=di(),n=Ln(),a=vu(),u=t("iterator");return DC=!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"}),DC}var TC,UJ;function JSe(){if(UJ)return TC;UJ=1;var e=Ln(),t=Hr(),n=ci(),a=Qr(),u=uh(),s=ah(),l=fN(),d=wu(),f=V0(),M=Object.assign,p=Object.defineProperty,y=t([].concat);return TC=!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,TC}var jC,YJ;function XSe(){if(YJ)return jC;YJ=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 jC=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,".")},jC}var $J={},QJ;function eCe(){if(QJ)return $J;QJ=1;var e=Bt(),t=Hr(),n=fv(),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,"")}}),$J}var SC,HJ;function tCe(){if(HJ)return SC;HJ=1;var e=H1(),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 SC=n,SC}var CC,FJ;function VJ(){if(FJ)return CC;FJ=1,T5(),eCe();var e=Bt(),t=fn(),n=rQ(),a=Nu(),u=ci(),s=Hr(),l=Ln(),d=PJ(),f=ho(),M=Lf(),p=V5(),y=bl(),I=IP(),m=_f(),N=S4(),v=fi(),E=Yi(),A=F1(),j=q0(),S=hi(),C=Bi(),x=Mu(),b=xf(),$=Eg(),V=R5(),Q=fh(),w=rp(),_=C4(),k=di(),R=tCe(),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 CC={URLSearchParams:Ae,getState:U},CC}var BJ;function rCe(){if(BJ)return zJ;BJ=1,RU();var e=Bt(),t=Ln(),n=PJ(),a=fn(),u=F1(),s=Hr(),l=ho(),d=Lf(),f=S4(),M=Yi(),p=JSe(),y=pY(),I=H1(),m=kU().codeAt,N=XSe(),v=Mu(),E=bl(),A=C4(),j=VJ(),S=_f(),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={},ei={},Sr={},kn={},Qt={},Cr={},hn={},Ar={},pr={},zn=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 zn(le,!0)),et=this.parse(K,null,Ee),et)throw new Q(et);Qe=$(new b),Qe.bindURL(this),this.searchParams=Qe}};zn.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,Br;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=ei: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=hn)}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"?ei: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 Ei=0;Ei<wt.length;Ei++){var ti=wt[Ei];if(ti===":"&&!Xt){Xt=!0;continue}var Or=it(ti,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=kn;continue}else if(Ne===":"&&!ct){if(Qe==="")return be;if(Br=K.parseHost(Qe),Br)return Br;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(Br=K.parseHost(Qe),Br)return Br;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 Xi=w(Qe,10);if(Xi>65535)return Oe;K.port=K.isSpecial()&&Xi===Re[K.scheme]?null:Xi,Qe=""}if(de)return;Ee=Qt;continue}else return Oe;break;case ei: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=kn;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 kn: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(Br=K.parseHost(Qe),Br)return Br;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 hn: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 mn(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 mn=function(de){var le=f(this,tr),K=A(arguments.length,1)>1?arguments[1]:void 0,Ee=C(le,new zn(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=mn.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 nn=V.createObjectURL,Ji=V.revokeObjectURL;nn&&l(mn,"createObjectURL",u(nn,V)),Ji&&l(mn,"revokeObjectURL",u(Ji,V))}return E(mn,"URL"),e({global:!0,constructor:!0,forced:!n,sham:!t},{URL:mn}),zJ}var GJ;function nCe(){return GJ||(GJ=1,rCe()),kJ}nCe();var ZJ={},WJ;function iCe(){if(WJ)return ZJ;WJ=1;var e=Bt(),t=ci();return e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return t(URL.prototype.toString,this)}}),ZJ}iCe();var KJ={},qJ;function aCe(){return qJ||(qJ=1,VJ()),KJ}aCe();var JJ={},XJ;function oCe(){if(XJ)return JJ;XJ=1;var e=ho(),t=Hr(),n=Mu(),a=C4(),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}),JJ}oCe();var eX={},tX;function uCe(){if(tX)return eX;tX=1;var e=ho(),t=Hr(),n=Mu(),a=C4(),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}),eX}uCe();var rX={},nX;function sCe(){if(nX)return rX;nX=1;var e=Ln(),t=Hr(),n=Lf(),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}),rX}sCe();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 lCe(e,t){return MCe(e)||dCe(e,t)||fCe(e,t)||cCe()}function cCe(){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 fCe(e,t){if(e){if(typeof e=="string")return iX(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)?iX(e,t):void 0}}function iX(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 dCe(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 MCe(e){if(Array.isArray(e))return e}function gCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pCe(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,aX(a.key),a)}}function ICe(e,t,n){return t&&pCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y3(e,t,n){return(t=aX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aX(e){var t=yCe(e,"string");return d2(t)=="symbol"?t:t+""}function yCe(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 hCe=function(){function e(){gCe(this,e),y3(this,"_levels",[]),y3(this,"_transports",[]),y3(this,"_logs",[]),y3(this,"_prevTime",0);try{if(!window.localStorage)return;var t=window.localStorage.getItem("logger");if(!t)return;var n=t.split(">"),a=lCe(n,2),u=a[0],s=a[1];this._levels=u.split(","),s&&(this._transports=s.split(","))}catch(l){return}}return ICe(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()}}}])}(),AC=new hCe;function Ug(e){"@babel/helpers - typeof";return Ug=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},Ug(e)}function On(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */On=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&&Ug(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(Ug(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 oX(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 yu(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){oX(s,a,u,l,d,"next",f)}function d(f){oX(s,a,u,l,d,"throw",f)}l(void 0)})}}function mCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NCe(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,uX(a.key),a)}}function vCe(e,t,n){return t&&NCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V4(e,t,n){return(t=uX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uX(e){var t=ECe(e,"string");return Ug(t)=="symbol"?t:t+""}function ECe(e,t){if(Ug(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Ug(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ao=AC.create("wasm_idv"),DCe=function(){function e(t){mCe(this,e),V4(this,"_worker",null),V4(this,"_initialized",!1),V4(this,"_connectedToIdv",!1),V4(this,"_serviceRunning",!1),V4(this,"_userId",E3e(mye)),V4(this,"_setErrorScreen",null),t&&(this._setErrorScreen=t)}return vCe(e,[{key:"init",value:function(){var t=yu(On().mark(function a(){var u,s,l,d;return On().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/5c0a23d-64622d44b//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),Ao("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/5c0a23d-64622d44b/",preMain:!0});case 23:return d=M.sent,d.code===0&&Ao("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=yu(On().mark(function a(u){var s,l;return On().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:dE.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),Ao("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=yu(On().mark(function a(u){var s;return On().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:dE.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,Ao("Connection by URL 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:"startSession",value:function(){var t=yu(On().mark(function a(u,s,l){var d,f;return On().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d={workflowId:u,locale:s},l&&(D3e(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,Ao("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=yu(On().mark(function a(u){var s,l;return On().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,Ao("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=yu(On().mark(function a(){var u,s,l=arguments;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(u){var s;return On().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,Ao("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=yu(On().mark(function a(u,s){var l;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(u){var s=this;return On().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"){Ao(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;Ao(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=yu(On().mark(function a(){var u;return On().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 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 sX(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 OC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sX(Object(n),!0).forEach(function(a){_C(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _C(e,t,n){return(t=TCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TCe(e){var t=jCe(e,"string");return Yg(t)=="symbol"?t:t+""}function jCe(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(t==="string"?String:Number)(e)}function Pi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Pi=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 lX(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 $l(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){lX(s,a,u,l,d,"next",f)}function d(f){lX(s,a,u,l,d,"throw",f)}l(void 0)})}}var SCe=AC.create("store_idv"),CCe=function(t,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=$l(Pi().mark(function s(){var l;return Pi().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=new DCe,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 $l(Pi().mark(function s(){var l,d,f,M,p;return Pi().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=jg.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=jg.PROVIDER_ERROR),M===null){I.next=12;break}return p=new Np({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 $l(Pi().mark(function s(){var l,d,f,M,p;return Pi().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=jg.HTTP_ISSUE),d.code!==0&&d.code!==4&&(f=jg.PROVIDER_ERROR),f===null){I.next=13;break}return M=new Np({errorCode:f}),p=new mh({errorCode:gE.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=OC(OC({},d.results),{},{sessionId:M}),y=OC({results:p},d.error&&{error:d.error});n().setCurrentSessionDataLsAndStore(null),u(y)};t(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=$l(Pi().mark(function s(){var l,d,f,M;return Pi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().externalModulesNames,y.prev=1,y.next=4,ACe(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 mp({errorCode:op.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=mD(u.find(function(l){return l.templateId===pE}));s.templateLayout=mH(s.templateLayout,n().layout),t({processingTransformedTemplate:s})},setIsProcessing:function(u){t({isProcessing:u})},_pushStep:function(){var a=$l(Pi().mark(function s(l,d){var f,M,p;return Pi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f=null,M=function(){var m=$l(Pi().mark(function N(){var v,E,A,j;return Pi().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=fl.HTTP_ISSUE),v.code!==0&&v.code!==4&&(E=fl.PROVIDER_ERROR),E!==null&&(A=new vp({errorCode:fl.HTTP_ISSUE}),j=new pu({errorCode:gu.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,vD(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=$l(Pi().mark(function s(){var l,d,f,M,p;return Pi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().currentStepId,d=null,f=function(){var m=$l(Pi().mark(function N(){var v,E,A,j,S,C,x,b,$,V,Q,w,_,k,R;return Pi().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=m3e(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&&(_=fl.NOT_DATA_TYPE),$&&(_=fl.HTTP_ISSUE),V&&(_=fl.PROVIDER_ERROR),C&&(_=fl.IS_PROCESSING),w&&(_=fl.SAME_STEP),Q&&(_=fl.DECODING_FAILED),_!==null&&(k=new vp({errorCode:_}),R=new pu({errorCode:gu.INTERNAL_ISSUE,underlyingBaseError:k}),d=R),SCe(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,vD(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:ip.MESSAGE,message:ap.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=$l(Pi().mark(function s(l){var d,f,M,p,y,I,m,N,v;return Pi().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 Kn)){A.next=13;break}return f=l,M=new pu({errorCode:gu.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===pE&&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&&T3e(p==null||(M=p.client)===null||M===void 0?void 0:M.templateLayout)){var m=mH(p.client.templateLayout,n().layout);m&&(l.templateLayout=m)}}var N=h3e(n().externalModules,s.steps,u);if(l===null||!N){var v=new pu({errorCode:gu.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=$l(Pi().mark(function s(){var l,d;return Pi().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 ACe(e){return xC.apply(this,arguments)}function xC(){return xC=$l(Pi().mark(function e(t){var n,a,u,s,l,d;return Pi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:Wf.getIdentifier(),supportedTemplates:Wf.getSupportedTemplates(),component:Wf}],a=_C(_C({},ME.LIVENESS,function(){return Promise.resolve().then(()=>uit)}),ME.DOC_READER,function(){return Promise.resolve().then(()=>Lkt)}),u=Pi().mark(function p(){var y,I,m;return Pi().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)})),xC.apply(this,arguments)}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 cX(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 LC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cX(Object(n),!0).forEach(function(a){OCe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function OCe(e,t,n){return(t=_Ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Ce(e){var t=xCe(e,"string");return M2(t)=="symbol"?t:t+""}function xCe(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(t==="string"?String:Number)(e)}var Ca=yhe(function(){return LC(LC(LC({},x3e.apply(void 0,arguments)),G3e.apply(void 0,arguments)),CCe.apply(void 0,arguments))}),fX=function(t){var n=t.children;return pi.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 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 dX(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 MX(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dX(Object(n),!0).forEach(function(a){LCe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function LCe(e,t,n){return(t=wCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wCe(e){var t=bCe(e,"string");return g2(t)=="symbol"?t:t+""}function bCe(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 kCe=function(){var t=Ca(function(m){return m.currentScreenConfig}),n=Ca(function(m){return m.pushStepWaitNextStepAndSet}),a=Ca(function(m){return m.processingTransformedTemplate}),u=Ca(function(m){return m.isProcessing}),s=Ca(function(m){return m.setIsProcessing}),l=Ca(function(m){return m.listener}),d=Ca(function(m){return m.externalModules}),f=Ca(function(m){return m.modulesConfig}),M=function(N,v){l({eventType:ip.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 pi.jsx(m.component,{perform:y,moduleProps:t,modulesConfig:f,idvEventListener:M,isProcessing:p})},[t,d]);return!t&&!a?pi.jsx(SE,{direction:Mh.Ltr,children:pi.jsx(fX,{children:"Waiting for play... or process completed"})}):pi.jsx(pi.Fragment,{children:pi.jsx(SE,{direction:Mh.Ltr,children:pi.jsxs(pi.Fragment,{children:[u&&pi.jsx(fX,{children:a?pi.jsx(Wf,{perform:y,moduleProps:MX(MX({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:p}):"Processing..."}),I()]})})})};function zCe(){return pi.jsx(ft.StrictMode,{children:pi.jsx(Bye,{children:pi.jsx(kCe,{})})})}function B4(e){"@babel/helpers - typeof";return B4=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},B4(e)}function RCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gX(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,IX(a.key),a)}}function PCe(e,t,n){return t&&gX(e.prototype,t),n&&gX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function UCe(e,t,n){return t=I2(t),YCe(e,bC()?Reflect.construct(t,[],I2(e).constructor):t.apply(e,n))}function YCe(e,t){if(t&&(B4(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Ce(e)}function $Ce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QCe(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&&p2(e,t)}function wC(e){var t=typeof Map=="function"?new Map:void 0;return wC=function(a){if(a===null||!FCe(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 HCe(a,arguments,I2(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),p2(u,a)},wC(e)}function HCe(e,t,n){if(bC())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var u=new(e.bind.apply(e,a));return n&&p2(u,n.prototype),u}function bC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(bC=function(){return!!e})()}function FCe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function p2(e,t){return p2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},p2(e,t)}function I2(e){return I2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I2(e)}function pX(e,t,n){return(t=IX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IX(e){var t=VCe(e,"string");return B4(t)=="symbol"?t:t+""}function VCe(e,t){if(B4(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(B4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var BCe="*,::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%}",yX=function(e){function t(){var n;return RCe(this,t),n=UCe(this,t),pX(n,"_root",Mye.createRoot(n.attachShadow({mode:"open"}))),pX(n,"_mounted",!1),n}return QCe(t,e),PCe(t,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.133-nightly".trim())}},{key:"render",value:function(){this._root.render(pi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[pi.jsx("style",{nonce:Ca.getState().getNonce(),children:BCe}),pi.jsx(zCe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),AC.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(wC(HTMLElement));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 rl(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */rl=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 hX(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 G4(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){hX(s,a,u,l,d,"next",f)}function d(f){hX(s,a,u,l,d,"throw",f)}l(void 0)})}}function GCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZCe(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,KCe(a.key),a)}}function WCe(e,t,n){return t&&ZCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KCe(e){var t=qCe(e,"string");return $g(t)=="symbol"?t:t+""}function qCe(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 String(e)}var JCe=function(){function e(){GCe(this,e)}return WCe(e,[{key:"initialize",value:function(){var t=G4(rl().mark(function a(u){var s;return rl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=Ca.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=G4(rl().mark(function a(u){var s,l;return rl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(typeof u=="string"){f.next=5;break}return f.next=3,Ca.getState().configure(u);case 3:return s=f.sent,f.abrupt("return",s);case 5:return f.next=7,Ca.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=G4(rl().mark(function a(u){var s;return rl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Ca.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=G4(rl().mark(function a(u){var s,l;return rl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=u.workflowId,f.next=3,Ca.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=G4(rl().mark(function a(u){var s,l,d,f;return rl().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return s=u.metadata,l=u.locale,d=C3e(l),p.next=4,Ca.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)};Ca.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=G4(rl().mark(function a(){var u;return rl().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Ca.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.133-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(n){Ca.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Ca.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){Ca.getState().setSessionRestoreMode(n)}},{key:"currentSessionId",get:function(){return Ca.getState().getCurrentSessionId()}}])}(),XCe=window.customElements.get("idv-flow");XCe||window.customElements.define("idv-flow",yX);var eAe=Object.defineProperty,tAe=Object.defineProperties,rAe=Object.getOwnPropertyDescriptors,mX=Object.getOwnPropertySymbols,nAe=Object.prototype.hasOwnProperty,iAe=Object.prototype.propertyIsEnumerable,NX=(e,t,n)=>t in e?eAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kC=(e,t)=>{for(var n in t||(t={}))nAe.call(t,n)&&NX(e,n,t[n]);if(mX)for(var n of mX(t))iAe.call(t,n)&&NX(e,n,t[n]);return e},aAe=(e,t)=>tAe(e,rAe(t)),Oo=(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())}),vX=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function EX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var DX={exports:{}},y2={},TX={exports:{}},Xr={},jX;function oAe(){if(jX)return Xr;jX=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()}}}])}(),AC=new hCe;function Ug(e){"@babel/helpers - typeof";return Ug=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},Ug(e)}function On(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */On=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&&Ug(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(Ug(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 oX(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 yu(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){oX(s,a,u,l,d,"next",f)}function d(f){oX(s,a,u,l,d,"throw",f)}l(void 0)})}}function mCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NCe(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,uX(a.key),a)}}function vCe(e,t,n){return t&&NCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V4(e,t,n){return(t=uX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uX(e){var t=ECe(e,"string");return Ug(t)=="symbol"?t:t+""}function ECe(e,t){if(Ug(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(Ug(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ao=AC.create("wasm_idv"),DCe=function(){function e(t){mCe(this,e),V4(this,"_worker",null),V4(this,"_initialized",!1),V4(this,"_connectedToIdv",!1),V4(this,"_serviceRunning",!1),V4(this,"_userId",E3e(mye)),V4(this,"_setErrorScreen",null),t&&(this._setErrorScreen=t)}return vCe(e,[{key:"init",value:function(){var t=yu(On().mark(function a(){var u,s,l,d;return On().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/5c0a23d-64622d44b//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),Ao("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/5c0a23d-64622d44b/",preMain:!0});case 23:return d=M.sent,d.code===0&&Ao("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=yu(On().mark(function a(u){var s,l;return On().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:dE.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),Ao("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=yu(On().mark(function a(u){var s;return On().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:dE.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,Ao("Connection by URL 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:"startSession",value:function(){var t=yu(On().mark(function a(u,s,l){var d,f;return On().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d={workflowId:u,locale:s},l&&(D3e(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,Ao("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=yu(On().mark(function a(u){var s,l;return On().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,Ao("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=yu(On().mark(function a(){var u,s,l=arguments;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(u){var s;return On().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,Ao("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=yu(On().mark(function a(u,s){var l;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(){var u;return On().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,Ao("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=yu(On().mark(function a(u){var s=this;return On().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"){Ao(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;Ao(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=yu(On().mark(function a(){var u;return On().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 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 sX(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 OC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sX(Object(n),!0).forEach(function(a){_C(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _C(e,t,n){return(t=TCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TCe(e){var t=jCe(e,"string");return Yg(t)=="symbol"?t:t+""}function jCe(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(t==="string"?String:Number)(e)}function Pi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Pi=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 lX(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 $l(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){lX(s,a,u,l,d,"next",f)}function d(f){lX(s,a,u,l,d,"throw",f)}l(void 0)})}}var SCe=AC.create("store_idv"),CCe=function(t,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=$l(Pi().mark(function s(){var l;return Pi().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=new DCe,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 $l(Pi().mark(function s(){var l,d,f,M,p;return Pi().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=jg.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=jg.PROVIDER_ERROR),M===null){I.next=12;break}return p=new Np({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 $l(Pi().mark(function s(){var l,d,f,M,p;return Pi().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=jg.HTTP_ISSUE),d.code!==0&&d.code!==4&&(f=jg.PROVIDER_ERROR),f===null){I.next=13;break}return M=new Np({errorCode:f}),p=new mh({errorCode:gE.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=OC(OC({},d.results),{},{sessionId:M}),y=OC({results:p},d.error&&{error:d.error});n().setCurrentSessionDataLsAndStore(null),u(y)};t(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=$l(Pi().mark(function s(){var l,d,f,M;return Pi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return l=n().externalModulesNames,y.prev=1,y.next=4,ACe(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 mp({errorCode:op.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=mD(u.find(function(l){return l.templateId===pE}));s.templateLayout=mH(s.templateLayout,n().layout),t({processingTransformedTemplate:s})},setIsProcessing:function(u){t({isProcessing:u})},_pushStep:function(){var a=$l(Pi().mark(function s(l,d){var f,M,p;return Pi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f=null,M=function(){var m=$l(Pi().mark(function N(){var v,E,A,j;return Pi().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=fl.HTTP_ISSUE),v.code!==0&&v.code!==4&&(E=fl.PROVIDER_ERROR),E!==null&&(A=new vp({errorCode:fl.HTTP_ISSUE}),j=new pu({errorCode:gu.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,vD(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=$l(Pi().mark(function s(){var l,d,f,M,p;return Pi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return l=n().currentStepId,d=null,f=function(){var m=$l(Pi().mark(function N(){var v,E,A,j,S,C,x,b,$,V,Q,w,_,k,R;return Pi().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=m3e(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&&(_=fl.NOT_DATA_TYPE),$&&(_=fl.HTTP_ISSUE),V&&(_=fl.PROVIDER_ERROR),C&&(_=fl.IS_PROCESSING),w&&(_=fl.SAME_STEP),Q&&(_=fl.DECODING_FAILED),_!==null&&(k=new vp({errorCode:_}),R=new pu({errorCode:gu.INTERNAL_ISSUE,underlyingBaseError:k}),d=R),SCe(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,vD(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:ip.MESSAGE,message:ap.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=$l(Pi().mark(function s(l){var d,f,M,p,y,I,m,N,v;return Pi().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 Kn)){A.next=13;break}return f=l,M=new pu({errorCode:gu.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===pE&&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&&T3e(p==null||(M=p.client)===null||M===void 0?void 0:M.templateLayout)){var m=mH(p.client.templateLayout,n().layout);m&&(l.templateLayout=m)}}var N=h3e(n().externalModules,s.steps,u);if(l===null||!N){var v=new pu({errorCode:gu.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=$l(Pi().mark(function s(){var l,d;return Pi().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 ACe(e){return xC.apply(this,arguments)}function xC(){return xC=$l(Pi().mark(function e(t){var n,a,u,s,l,d;return Pi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:Wf.getIdentifier(),supportedTemplates:Wf.getSupportedTemplates(),component:Wf}],a=_C(_C({},ME.LIVENESS,function(){return Promise.resolve().then(()=>uit)}),ME.DOC_READER,function(){return Promise.resolve().then(()=>Lkt)}),u=Pi().mark(function p(){var y,I,m;return Pi().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)})),xC.apply(this,arguments)}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 cX(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 LC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cX(Object(n),!0).forEach(function(a){OCe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function OCe(e,t,n){return(t=_Ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Ce(e){var t=xCe(e,"string");return M2(t)=="symbol"?t:t+""}function xCe(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(t==="string"?String:Number)(e)}var Ca=yhe(function(){return LC(LC(LC({},x3e.apply(void 0,arguments)),G3e.apply(void 0,arguments)),CCe.apply(void 0,arguments))}),fX=function(t){var n=t.children;return pi.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 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 dX(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 MX(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dX(Object(n),!0).forEach(function(a){LCe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dX(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function LCe(e,t,n){return(t=wCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wCe(e){var t=bCe(e,"string");return g2(t)=="symbol"?t:t+""}function bCe(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 kCe=function(){var t=Ca(function(m){return m.currentScreenConfig}),n=Ca(function(m){return m.pushStepWaitNextStepAndSet}),a=Ca(function(m){return m.processingTransformedTemplate}),u=Ca(function(m){return m.isProcessing}),s=Ca(function(m){return m.setIsProcessing}),l=Ca(function(m){return m.listener}),d=Ca(function(m){return m.externalModules}),f=Ca(function(m){return m.modulesConfig}),M=function(N,v){l({eventType:ip.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 pi.jsx(m.component,{perform:y,moduleProps:t,modulesConfig:f,idvEventListener:M,isProcessing:p})},[t,d]);return!t&&!a?pi.jsx(SE,{direction:Mh.Ltr,children:pi.jsx(fX,{children:"Waiting for play... or process completed"})}):pi.jsx(pi.Fragment,{children:pi.jsx(SE,{direction:Mh.Ltr,children:pi.jsxs(pi.Fragment,{children:[u&&pi.jsx(fX,{children:a?pi.jsx(Wf,{perform:y,moduleProps:MX(MX({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:p}):"Processing..."}),I()]})})})};function zCe(){return pi.jsx(ft.StrictMode,{children:pi.jsx(Bye,{children:pi.jsx(kCe,{})})})}function B4(e){"@babel/helpers - typeof";return B4=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},B4(e)}function RCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gX(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,IX(a.key),a)}}function PCe(e,t,n){return t&&gX(e.prototype,t),n&&gX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function UCe(e,t,n){return t=I2(t),YCe(e,bC()?Reflect.construct(t,[],I2(e).constructor):t.apply(e,n))}function YCe(e,t){if(t&&(B4(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Ce(e)}function $Ce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QCe(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&&p2(e,t)}function wC(e){var t=typeof Map=="function"?new Map:void 0;return wC=function(a){if(a===null||!FCe(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 HCe(a,arguments,I2(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),p2(u,a)},wC(e)}function HCe(e,t,n){if(bC())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,t);var u=new(e.bind.apply(e,a));return n&&p2(u,n.prototype),u}function bC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(bC=function(){return!!e})()}function FCe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch(t){return typeof e=="function"}}function p2(e,t){return p2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},p2(e,t)}function I2(e){return I2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I2(e)}function pX(e,t,n){return(t=IX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IX(e){var t=VCe(e,"string");return B4(t)=="symbol"?t:t+""}function VCe(e,t){if(B4(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(B4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var BCe="*,::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%}",yX=function(e){function t(){var n;return RCe(this,t),n=UCe(this,t),pX(n,"_root",Mye.createRoot(n.attachShadow({mode:"open"}))),pX(n,"_mounted",!1),n}return QCe(t,e),PCe(t,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.3.134-nightly".trim())}},{key:"render",value:function(){this._root.render(pi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[pi.jsx("style",{nonce:Ca.getState().getNonce(),children:BCe}),pi.jsx(zCe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),AC.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(wC(HTMLElement));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 rl(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */rl=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 hX(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 G4(e){return function(){var t=this,n=arguments;return new Promise(function(a,u){var s=e.apply(t,n);function l(f){hX(s,a,u,l,d,"next",f)}function d(f){hX(s,a,u,l,d,"throw",f)}l(void 0)})}}function GCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZCe(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,KCe(a.key),a)}}function WCe(e,t,n){return t&&ZCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KCe(e){var t=qCe(e,"string");return $g(t)=="symbol"?t:t+""}function qCe(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 String(e)}var JCe=function(){function e(){GCe(this,e)}return WCe(e,[{key:"initialize",value:function(){var t=G4(rl().mark(function a(u){var s;return rl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=Ca.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=G4(rl().mark(function a(u){var s,l;return rl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(typeof u=="string"){f.next=5;break}return f.next=3,Ca.getState().configure(u);case 3:return s=f.sent,f.abrupt("return",s);case 5:return f.next=7,Ca.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=G4(rl().mark(function a(u){var s;return rl().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,Ca.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=G4(rl().mark(function a(u){var s,l;return rl().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=u.workflowId,f.next=3,Ca.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=G4(rl().mark(function a(u){var s,l,d,f;return rl().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return s=u.metadata,l=u.locale,d=C3e(l),p.next=4,Ca.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)};Ca.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=G4(rl().mark(function a(){var u;return rl().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Ca.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.134-nightly")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"setNonce",value:function(n){Ca.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Ca.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){Ca.getState().setSessionRestoreMode(n)}},{key:"currentSessionId",get:function(){return Ca.getState().getCurrentSessionId()}}])}(),XCe=window.customElements.get("idv-flow");XCe||window.customElements.define("idv-flow",yX);var eAe=Object.defineProperty,tAe=Object.defineProperties,rAe=Object.getOwnPropertyDescriptors,mX=Object.getOwnPropertySymbols,nAe=Object.prototype.hasOwnProperty,iAe=Object.prototype.propertyIsEnumerable,NX=(e,t,n)=>t in e?eAe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kC=(e,t)=>{for(var n in t||(t={}))nAe.call(t,n)&&NX(e,n,t[n]);if(mX)for(var n of mX(t))iAe.call(t,n)&&NX(e,n,t[n]);return e},aAe=(e,t)=>tAe(e,rAe(t)),Oo=(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())}),vX=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function EX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var DX={exports:{}},y2={},TX={exports:{}},Xr={},jX;function oAe(){if(jX)return Xr;jX=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-pk9S360k.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.134-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.133-nightly",
|
|
25
25
|
"react-device-detect": "^2.2.3",
|
|
26
26
|
"zustand": "^5.0.3"
|
|
27
27
|
}
|