@regulaforensics/idv-capture-web 2.5.194-rc → 2.5.195

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 Qu = (e) => {
22
22
  throw l;
23
23
  }, "return" in r && i("return"), o;
24
24
  };
25
- import { B as Hc, r as dl, j as L4 } from "./index-_djGM_-z.js";
25
+ import { B as Hc, r as dl, j as L4 } from "./index-DLrTj7_E.js";
26
26
  var pO = Object.defineProperty, hO = Object.defineProperties, EO = Object.getOwnPropertyDescriptors, y4 = Object.getOwnPropertySymbols, mO = Object.prototype.hasOwnProperty, SO = Object.prototype.propertyIsEnumerable, h2 = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), CO = (e) => {
27
27
  throw TypeError(e);
28
28
  }, b4 = (e, r, t) => r in e ? pO(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, tt = (e, r) => {
@@ -21378,7 +21378,7 @@ var At = $5.create("wasm_idv"), pB = /* @__PURE__ */ function() {
21378
21378
  return br().wrap(function(v) {
21379
21379
  for (; ; ) switch (v.prev = v.next) {
21380
21380
  case 0:
21381
- return v.prev = 1, v.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/rc/2.5/86dc740-c49957c66//PlatformAdaptor.worker.js");
21381
+ return v.prev = 1, v.next = 4, fetch("https://wasm.regulaforensics.com/idv/release/2.5/86dc740-c49957c66//PlatformAdaptor.worker.js");
21382
21382
  case 4:
21383
21383
  return a = v.sent, v.next = 7, a.blob();
21384
21384
  case 7:
@@ -21405,7 +21405,7 @@ var At = $5.create("wasm_idv"), pB = /* @__PURE__ */ function() {
21405
21405
  }), v.next = 23, this.sendMessage({
21406
21406
  target: "worker-init",
21407
21407
  URL: document.URL,
21408
- currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/rc/2.5/86dc740-c49957c66/",
21408
+ currentScriptUrl: "https://wasm.regulaforensics.com/idv/release/2.5/86dc740-c49957c66/",
21409
21409
  preMain: !0
21410
21410
  });
21411
21411
  case 23:
@@ -22710,9 +22710,9 @@ function D6() {
22710
22710
  supportedTemplates: fi.getSupportedTemplates(),
22711
22711
  component: fi
22712
22712
  }], o = N6(N6({}, gm.LIVENESS, function() {
22713
- return import("./index-DK971U5K.js");
22713
+ return import("./index-DyExO-85.js");
22714
22714
  }), gm.DOC_READER, function() {
22715
- return import("./index-0QTthvzN.js");
22715
+ return import("./index-Bno6669E.js");
22716
22716
  }), a = /* @__PURE__ */ Qr().mark(function p() {
22717
22717
  var h, m, g;
22718
22718
  return Qr().wrap(function(b) {
@@ -23030,7 +23030,7 @@ var MB = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
23030
23030
  }, {
23031
23031
  key: "version",
23032
23032
  get: function() {
23033
- return "".concat("2.5.194-rc".trim());
23033
+ return "".concat("2.5.195".trim());
23034
23034
  }
23035
23035
  }, {
23036
23036
  key: "render",
@@ -23500,7 +23500,7 @@ var HB = /* @__PURE__ */ function() {
23500
23500
  key: "version",
23501
23501
  get: function() {
23502
23502
  var t;
23503
- return (t = "2.5.194-rc") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
23503
+ return (t = "2.5.195") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
23504
23504
  }
23505
23505
  }, {
23506
23506
  key: "nonce",
@@ -1,4 +1,4 @@
1
- import { B as Vu, r as la, j as lD } from "./index-_djGM_-z.js";
1
+ import { B as Vu, r as la, j as lD } from "./index-DLrTj7_E.js";
2
2
  var p0 = Object.defineProperty, k0 = Object.defineProperties, m0 = Object.getOwnPropertyDescriptors, jD = Object.getOwnPropertySymbols, w0 = Object.prototype.hasOwnProperty, h0 = Object.prototype.propertyIsEnumerable, sD = (M, r, i) => r in M ? p0(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
  w0.call(r, i) && sD(M, i, r[i]);
package/dist/main.iife.js CHANGED
@@ -70,7 +70,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
70
70
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SEe(t,r){if(t){if(typeof t=="string")return zW(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zW(t,r):void 0}}function zW(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function AEe(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function CEe(t){if(Array.isArray(t))return t}var jEe=function(t){var r=t.option,n=t.layout,a=t.dataSourceQuestion,u=t.register,s=t.watch,c=Ar.useState(!1),f=_Ee(c,2),d=f[0],M=f[1],I=LW(),h=String(a.id),y=s(h),N=y===String(r.id),E=n.option,D=n.optionSelected,v={borderRadius:E.cornerRadius,background:Zn(E.backgroundColor),borderColor:Zn(E.borderColor),borderWidth:E.borderWidth},C={borderRadius:D.cornerRadius,background:Zn(D.backgroundColor),borderColor:Zn(D.borderColor),borderWidth:D.borderWidth},T=d&&I?{outline:"2px solid ".concat(VM)}:{};return ae.jsx("div",{style:{display:"flex",flexGrow:1},children:ae.jsxs("label",{style:kW(kW({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},N?C:v),T),children:[ae.jsx("input",Mi(At({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},u(h,{required:!!a.required,validate:r4(a.validators,!!a.required)})),{value:r.id,type:"radio",onFocus:function(){return M(!0)},onBlur:function(){return M(!1)}})),ae.jsx(Ao,Mi(At({},N?D.title:E.title),{text:r.text}))]})},r.id)},OEe=function(t){var r=t.layout,n=t.watch,a=t.register,u=t.dataSourceQuestion;return ae.jsx("div",{style:{boxSizing:"border-box"},children:ae.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[r.title&&ae.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:ae.jsx(Ao,Mi(At({},r.title),{text:u.text}))}),ae.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:u.options.map(function(s){return ae.jsx(jEe,{register:a,watch:n,layout:r,option:s,dataSourceQuestion:u},s.id)})})]})})};function ig(t){"@babel/helpers - typeof";return ig=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ig(t)}function PW(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function NS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?PW(Object(n),!0).forEach(function(a){LEe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):PW(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function LEe(t,r,n){return(r=xEe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function xEe(t){var r=wEe(t,"string");return ig(r)=="symbol"?r:r+""}function wEe(t,r){if(ig(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(ig(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var bEe=function(t){var r=t.children,n=t.backgroundColor,a=t.cornerRadius,u=a===void 0?0:a,s=t.isError,c=t.isRequired,f=t.validationBorderColor,d=t.validationBorderWidth,M=NS({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:Zn(n)||"transparent",borderRadius:u,padding:"16px",boxSizing:"border-box",height:"auto"},s&&NS(NS({},Zn(f)&&{borderColor:f,borderStyle:"solid"}),d&&{borderWidth:d}));return ae.jsxs("div",{style:M,children:[c&&ae.jsx("span",{style:{color:Zn(f),position:"absolute",left:"6px",top:"18px"},children:"*"}),r]})};function REe(t,r){return UEe(t)||PEe(t,r)||zEe(t,r)||kEe()}function kEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
71
71
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zEe(t,r){if(t){if(typeof t=="string")return UW(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UW(t,r):void 0}}function UW(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function PEe(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function UEe(t){if(Array.isArray(t))return t}var HEe=function(t){var r=t.validationErrorsTypes,n=t.title;return r?ae.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(r).map(function(a){var u=REe(a,2),s=u[0],c=u[1];return ae.jsx(Ao,Mi(At({},n),{text:c}),s)})}):null},VEe=function(t){var r,n,a,u,s,c,f,d,M,I,h,y,N,E,D,v,C=t.layout,T=t.dataSourceQuestion,S=t.register,A=String(T.id),L=function(b){return b?b===Op.EMAIL?"email":b===Op.FREE_TEXT?"text":b===Op.NUMBER?"number":b===Op.SECURE?"password":"text":"text"};return ae.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ae.jsx(Ao,Mi(At({},C.title),{text:T.text,htmlFor:A})),ae.jsx("input",Mi(At({},S(A,{required:!!T.required,validate:r4(T.validators,!!T.required)})),{id:A,type:L((r=C.textField)===null||r===void 0?void 0:r.inputType),style:{fontFamily:(n=C==null||(a=C.textField)===null||a===void 0?void 0:a.fontName)!==null&&n!==void 0?n:"sans-serif",fontSize:(u=C==null||(s=C.textField)===null||s===void 0?void 0:s.fontSize)!==null&&u!==void 0?u:15,color:(c=Zn(C==null||(f=C.textField)===null||f===void 0?void 0:f.fontColor))!==null&&c!==void 0?c:"#000000",height:"42px",borderWidth:(d=C==null||(M=C.textField)===null||M===void 0?void 0:M.borderWidth)!==null&&d!==void 0?d:1,borderColor:(I=Zn(C==null||(h=C.textField)===null||h===void 0?void 0:h.borderColor))!==null&&I!==void 0?I:"#d9d9d9",borderStyle:"solid",borderRadius:(y=C==null||(N=C.textField)===null||N===void 0?void 0:N.cornerRadius)!==null&&y!==void 0?y:8,padding:"11px",boxSizing:"border-box",backgroundColor:(E=Zn(C==null||(D=C.textField)===null||D===void 0?void 0:D.backgroundColor))!==null&&E!==void 0?E:"#FFFFFF",outlineColor:VM},placeholder:(v=T.placeholder)!==null&&v!==void 0?v:"","data-id":A}))]})},YEe=function(t){var r,n,a,u,s,c,f,d,M,I,h,y,N,E=t.layout,D=t.dataSourceQuestion,v=t.register,C=String(D.id);return ae.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ae.jsx(Ao,Mi(At({},E.title),{text:D.text,htmlFor:C})),ae.jsx("textarea",Mi(At({},v(C,{required:!!D.required,validate:r4(D.validators,!!D.required)})),{id:C,placeholder:(r=D.placeholder)!==null&&r!==void 0?r:"",onChange:function(T){T.target.style.height="auto",T.target.style.height="".concat(T.target.scrollHeight-15,"px")},"data-id":C,style:{fontFamily:"sans-serif",fontSize:(n=E==null||(a=E.textField)===null||a===void 0?void 0:a.fontSize)!==null&&n!==void 0?n:15,color:(u=Zn(E==null||(s=E.textField)===null||s===void 0?void 0:s.fontColor))!==null&&u!==void 0?u:"#000000",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(c=E==null||(f=E.textField)===null||f===void 0?void 0:f.borderWidth)!==null&&c!==void 0?c:1,borderColor:(d=Zn(E==null||(M=E.textField)===null||M===void 0?void 0:M.borderColor))!==null&&d!==void 0?d:"#d9d9d9",borderStyle:"solid",borderRadius:(I=E==null||(h=E.textField)===null||h===void 0?void 0:h.cornerRadius)!==null&&I!==void 0?I:8,padding:"11px",boxSizing:"border-box",backgroundColor:(y=Zn(E==null||(N=E.textField)===null||N===void 0?void 0:N.backgroundColor))!==null&&y!==void 0?y:"#FFFFFF",outlineColor:VM}}))]})},HW={},ES,VW;function YW(){if(VW)return ES;VW=1;var t=Gn(),r=fl(),n=So(),a=ma(),u=Dp(),s=wM(),c=Function,f=t([].concat),d=t([].join),M={},I=function(h,y,N){if(!a(M,y)){for(var E=[],D=0;D<y;D++)E[D]="a["+D+"]";M[y]=c("C,a","return new C("+d(E,",")+")")}return M[y](h,N)};return ES=s?c.bind:function(h){var y=r(this),N=y.prototype,E=u(arguments,1),D=function(){var v=f(E,u(arguments));return this instanceof D?I(y,v.length,v):y.apply(h,v)};return n(N)&&(D.prototype=N),D},ES}var FW;function FEe(){if(FW)return HW;FW=1;var t=br(),r=YW();return t({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r}),HW}FEe();var QW={},$W;function QEe(){if($W)return QW;$W=1;var t=br(),r=qn(),n=S1();return t({target:"Object",stat:!0,sham:!r},{create:n}),QW}QEe();var BW={},GW;function $Ee(){if(GW)return BW;GW=1;var t=br(),r=In(),n=dl(),a=PM(),u=sQ(),s=r(function(){a(1)});return t({target:"Object",stat:!0,forced:s,sham:!u},{getPrototypeOf:function(c){return a(n(c))}}),BW}$Ee();var ZW={},WW;function BEe(){if(WW)return ZW;WW=1;var t=qn(),r=r0(),n=So(),a=hQ(),u=dl(),s=Vd(),c=Object.getPrototypeOf,f=Object.setPrototypeOf,d=Object.prototype,M="__proto__";if(t&&c&&f&&!(M in d))try{r(d,M,{configurable:!0,get:function(){return c(u(this))},set:function(I){var h=s(this);a(I)&&n(h)&&f(h,I)}})}catch(I){}return ZW}BEe();var KW={},qW;function GEe(){if(qW)return KW;qW=1;var t=br(),r=Np();return t({target:"Object",stat:!0},{setPrototypeOf:r}),KW}GEe();var XW={},DS,JW;function ZEe(){if(JW)return DS;JW=1;var t=vp(),r=RM(),n=TypeError;return DS=function(a){if(t(a))return a;throw new n(r(a)+" is not a constructor")},DS}var eK;function WEe(){if(eK)return XW;eK=1;var t=br(),r=G2(),n=hp(),a=YW(),u=ZEe(),s=ya(),c=So(),f=S1(),d=In(),M=r("Reflect","construct"),I=Object.prototype,h=[].push,y=d(function(){function D(){}return!(M(function(){},[],D)instanceof D)}),N=!d(function(){M(function(){})}),E=y||N;return t({target:"Reflect",stat:!0,forced:E,sham:E},{construct:function(D,v){u(D),s(v);var C=arguments.length<3?D:u(arguments[2]);if(N&&!y)return M(D,v,C);if(D===C){switch(v.length){case 0:return new D;case 1:return new D(v[0]);case 2:return new D(v[0],v[1]);case 3:return new D(v[0],v[1],v[2]);case 4:return new D(v[0],v[1],v[2],v[3])}var T=[null];return n(h,T,v),new(n(a,D,T))}var S=C.prototype,A=f(c(S)?S:I),L=n(D,A,v);return c(L)?L:A}}),XW}WEe();function ag(t){"@babel/helpers - typeof";return ag=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ag(t)}function KEe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tK(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,rK(a.key),a)}}function qEe(t,r,n){return r&&tK(t.prototype,r),n&&tK(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function L1(t,r,n){return(r=rK(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function rK(t){var r=XEe(t,"string");return ag(r)=="symbol"?r:r+""}function XEe(t,r){if(ag(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(ag(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var nK=function(){function t(r){var n=r.errorCode,a=r.errorCodeKey,u=r.message,s=r.underlyingError,c=r.underlyingBaseError,f=r.domain,d=r.module,M=r.errorEnumName,I=r.shortDomainCode;KEe(this,t),L1(this,"errorCode",void 0),L1(this,"errorCodeKey",void 0),L1(this,"message",void 0),L1(this,"underlyingError",void 0),L1(this,"underlyingBaseError",void 0),L1(this,"domain",void 0),L1(this,"module",void 0),L1(this,"errorEnumName",void 0),L1(this,"shortDomainCode",void 0),this.errorCode=n,this.errorCodeKey=a,this.message=u,this.underlyingError=s,this.underlyingBaseError=c,this.module=d,this.domain=f,this.errorEnumName=M,this.shortDomainCode=I}return qEe(t,[{key:"lastUnderlyingError",get:function(){for(var r,n=this.underlyingBaseError;((a=n)===null||a===void 0?void 0:a.underlyingBaseError)instanceof t;){var a;n=n.underlyingBaseError}return(r=n)===null||r===void 0?void 0:r.underlyingError}},{key:"toObject",value:function(){var r={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 t&&(r.underlyingBaseError=this.underlyingBaseError.toObject()),r}},{key:"shortChain",get:function(){var r="".concat(this.shortDomainCode,":").concat(this.errorCode).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(r+="-".concat(this.underlyingBaseError.shortChain)),r}},{key:"fullChain",get:function(){var r="".concat(this.module,".").concat(this.domain,":").concat(this.errorCodeKey).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(r+="-".concat(this.underlyingBaseError.fullChain)),r}}],[{key:"getErrorKey",value:function(r,n){var a=Object.keys(n).find(function(u){return n[u]===r});if(!a)throw new Error("Invalid errorCode: ".concat(r," in enum"));return a}}])}();function n4(t){"@babel/helpers - typeof";return n4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},n4(t)}function JEe(t,r,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function eDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function tDe(t,r,n){return r=Hp(r),rDe(t,iK()?Reflect.construct(r,n||[],Hp(t).constructor):r.apply(t,n))}function rDe(t,r){if(r&&(n4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nDe(t)}function nDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function iK(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(iK=function(){return!!t})()}function Hp(t){return Hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Hp(t)}function iDe(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&mS(t,r)}function mS(t,r){return mS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},mS(t,r)}function vS(t,r,n){return(r=aDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function aDe(t){var r=oDe(t,"string");return n4(r)=="symbol"?r:r+""}function oDe(t,r){if(n4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(n4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Vp=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;eDe(this,r);var f=nK.getErrorKey(a,sZ);return tDe(this,r,[{errorCode:a,errorCodeKey:f,errorEnumName:r.ERROR_ENUM_NAME,module:r.MODULE,message:u,underlyingError:s,underlyingBaseError:c,domain:r.ERROR_ENUM_NAME,shortDomainCode:r.SHORT_CODE}])}return iDe(r,t),JEe(r)}(nK);vS(Vp,"MODULE",tS),vS(Vp,"ERROR_ENUM_NAME","GuiModuleError"),vS(Vp,"SHORT_CODE","GM");var uDe=function(t){var r=t.header,n=t.title,a=t.buttons,u=t.footer,s=t.questions,c=t.dataSource,f=t.properties,d=t.backgroundColor,M=H_(),I=M.perform,h=f?Cye(c.questions,f):{},y=Ar.useRef(null),N=wNe({criteriaMode:"all",defaultValues:h}),E=N.register,D=N.handleSubmit,v=N.formState.errors,C=N.reset,T=N.watch,S=N.control,A=function(L){I(Sye(L)),C()};return ae.jsx(BM,{header:r,footer:u,backgroundColor:d,children:ae.jsxs("form",{onSubmit:D(A),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[ae.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:Zn(s.backgroundColor)||"transparent"},ref:y,children:[n&&ae.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:ae.jsx(Ao,At({},n))}),ae.jsx("div",{"data-ui":"gui-questions",part:"gui-questions",style:{width:"100%",display:"flex",gap:"10px",flexDirection:"column"},children:c.questions.map(function(L){var b,$=c.static,Q=function(H,G){return G.find(function(W){var oe;if((oe=W.questionIds)!==null&&oe!==void 0&&oe.length)return W.questionIds.find(function(P){return H===P})})},Y=function(H,G){return G.find(function(W){return!W.questionIds&&W.answerType===H})},O=$?Q(String(L.id),s.itemTypes)||Y(L.answerType,s.itemTypes):s.itemTypes.find(function(H){return H.answerType===L.answerType});if(!O){var j=new Vp({errorCode:sZ.DECODING_FAILED,message:"The question template has not been found"});I(j);return}var x=O==null?void 0:O.displayType,z=L.id in v&&((b=v[L.id])===null||b===void 0?void 0:b.types);return ae.jsxs(Ar.Fragment,{children:[ae.jsxs(bEe,{backgroundColor:O==null?void 0:O.backgroundColor,cornerRadius:O==null?void 0:O.cornerRadius,isError:!!z,isRequired:L.required,validationBorderColor:O==null?void 0:O.validationBorderColor,validationBorderWidth:O==null?void 0:O.validationBorderWidth,children:[x===J3.TEXT_EXPANDABLE&&ae.jsx(YEe,{layout:O,dataSourceQuestion:L,register:E}),x===J3.TEXT_SINGLE_LINE&&ae.jsx(VEe,{layout:O,dataSourceQuestion:L,register:E}),x===J3.SELECTOR_OPTIONS&&ae.jsx(EEe,{layout:O,dataSourceQuestion:L,watch:T,register:E}),x===J3.SELECTOR_BUTTONS&&ae.jsx(OEe,{layout:O,dataSourceQuestion:L,watch:T,register:E}),x===J3.SELECTOR_DROPDOWN&&ae.jsx(eEe,{control:S,layout:O,dataSourceQuestion:L,parentElementRef:y}),x===J3.MULTI_SELECTOR_DROPDOWN&&ae.jsx(aEe,{control:S,layout:O,dataSourceQuestion:L,parentElementRef:y})]}),z&&ae.jsx(HEe,{validationErrorsTypes:z,title:O.validationMessage})]},L.id)})})]}),!!(a!=null&&a.length)&&ae.jsx("div",{style:{display:"flex",width:"100%",flexGrow:0,flexShrink:0,justifyContent:"center",alignItems:"flex-end",padding:"2px"},children:a.map(function(L,b){return ae.jsx(DZ,At({dataTestId:"question-button"},L),b)})})]})})},aK=function(t){var r=t.templateId,n=t.templateLayout,a=t.dataSource,u=t.properties;if(!r||!n)return ae.jsx(jZ,{});var s=u!=null&&u.length?JSON.stringify(u):"default-key";return r===n0.STATUS?ae.jsx(Fhe,{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}):r===n0.INFO?ae.jsx(Whe,{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}):r===n0.PROGRESS?ae.jsx(jZ,{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}):r===n0.INFO_DETAILS?ae.jsx(fNe,{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&&r===n0.QUESTIONS?ae.jsx(uDe,{dataSource:a,properties:u,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},s):r===n0.QUESTIONS&&!a?ae.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"}):ae.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},_S=!1,q2=function(t){var r=t.moduleProps,n=t.perform,a=r,u=a.templateId,s=a.templateLayout,c=a.dataSource,f=a.properties,d=function(M){n&&n(M)};return u===n0.QUESTIONS?ae.jsx(UQ,{perform:d,children:ae.jsx(aK,{properties:f,dataSource:c,templateId:u,templateLayout:s})}):ae.jsx(UQ,{perform:d,children:ae.jsx(aK,{templateId:u,templateLayout:s})})};q2.getIdentifier=function(){return tS},q2.getSupportedTemplates=function(){return Object.values(n0)},q2.deinitialize=function(){_S=!1},q2.initialize=function(){_S=!0},q2.isReady=function(){return _S},q2.displayName=tS;var oK={},uK;function sDe(){if(uK)return oK;uK=1;var t=Wt(),r=Qr(),n=Date,a=r(n.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new n)}}),oK}sDe();var sK={},lK={},TS,cK;function fK(){if(cK)return TS;cK=1;var t=Fr(),r=di(),n=On(),a=vu(),u=r("iterator");return TS=!t(function(){var s=new URL("b?a=1&b=2&c=3","https://a"),c=s.searchParams,f=new URLSearchParams("a=1&a=2&b=3"),d="";return s.pathname="c%20d",c.forEach(function(M,I){c.delete("b"),d+=I+M}),f.delete("a",2),f.delete("b",void 0),a&&(!s.toJSON||!f.has("a",1)||f.has("a",2)||!f.has("a",void 0)||f.has("b"))||!c.size&&(a||!n)||!c.sort||s.href!=="https://a/c%20d?a=1&c=3"||c.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!c[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"||d!=="a1c3"||new URL("https://x",void 0).host!=="x"}),TS}var SS,dK;function lDe(){if(dK)return SS;dK=1;var t=On(),r=Qr(),n=ci(),a=Fr(),u=nM(),s=X5(),c=B5(),f=Ru(),d=K4(),M=Object.assign,I=Object.defineProperty,h=r([].concat);return SS=!M||a(function(){if(t&&M({b:1},M(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},N={},E=Symbol("assign detection"),D="abcdefghijklmnopqrst";return y[E]=7,D.split("").forEach(function(v){N[v]=v}),M({},y)[E]!==7||u(M({},N)).join("")!==D})?function(N,E){for(var D=f(N),v=arguments.length,C=1,T=s.f,S=c.f;v>C;)for(var A=d(arguments[C++]),L=T?h(u(A),T(A)):u(A),b=L.length,$=0,Q;b>$;)Q=L[$++],(!t||n(S,A,Q))&&(D[Q]=A[Q]);return D}:M,SS}var AS,MK;function cDe(){if(MK)return AS;MK=1;var t=Qr(),r=2147483647,n=36,a=1,u=26,s=38,c=700,f=72,d=128,M="-",I=/[^\0-\u007E]/,h=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",N=n-a,E=RangeError,D=t(h.exec),v=Math.floor,C=String.fromCharCode,T=t("".charCodeAt),S=t([].join),A=t([].push),L=t("".replace),b=t("".split),$=t("".toLowerCase),Q=function(x){for(var z=[],H=0,G=x.length;H<G;){var W=T(x,H++);if(W>=55296&&W<=56319&&H<G){var oe=T(x,H++);(oe&64512)===56320?A(z,((W&1023)<<10)+(oe&1023)+65536):(A(z,W),H--)}else A(z,W)}return z},Y=function(x){return x+22+75*(x<26)},O=function(x,z,H){var G=0;for(x=H?v(x/c):x>>1,x+=v(x/z);x>N*u>>1;)x=v(x/N),G+=n;return v(G+(N+1)*x/(x+s))},j=function(x){var z=[];x=Q(x);var H=x.length,G=d,W=0,oe=f,P,Z;for(P=0;P<x.length;P++)Z=x[P],Z<128&&A(z,C(Z));var te=z.length,w=te;for(te&&A(z,M);w<H;){var q=r;for(P=0;P<x.length;P++)Z=x[P],Z>=G&&Z<q&&(q=Z);var Ie=w+1;if(q-G>v((r-W)/Ie))throw new E(y);for(W+=(q-G)*Ie,G=q,P=0;P<x.length;P++){if(Z=x[P],Z<G&&++W>r)throw new E(y);if(Z===G){for(var pe=W,le=n;;){var Oe=le<=oe?a:le>=oe+u?u:le-oe;if(pe<Oe)break;var we=pe-Oe,Te=n-Oe;A(z,C(Y(Oe+we%Te))),pe=v(we/Te),le+=n}A(z,C(Y(pe))),oe=O(W,Ie,w===te),W=0,w++}}W++,G++}return S(z,"")};return AS=function(x){var z=[],H=b(L($(x),h,"."),"."),G,W;for(G=0;G<H.length;G++)W=H[G],A(z,D(I,W)?"xn--"+j(W):W);return S(z,".")},AS}var gK={},IK;function fDe(){if(IK)return gK;IK=1;var t=Wt(),r=Qr(),n=zN(),a=RangeError,u=String.fromCharCode,s=String.fromCodePoint,c=r([].join),f=!!s&&s.length!==1;return t({target:"String",stat:!0,arity:1,forced:f},{fromCodePoint:function(M){for(var I=[],h=arguments.length,y=0,N;h>y;){if(N=+arguments[y++],n(N,1114111)!==N)throw new a(N+" is not a valid code point");I[y]=N<65536?u(N):u(((N-=65536)>>10)+55296,N%1024+56320)}return c(I,"")}}),gK}var CS,pK;function dDe(){if(pK)return CS;pK=1;var t=q1(),r=Math.floor,n=function(a,u){var s=a.length;if(s<8)for(var c=1,f,d;c<s;){for(d=c,f=a[c];d&&u(a[d-1],f)>0;)a[d]=a[--d];d!==c++&&(a[d]=f)}else for(var M=r(s/2),I=n(t(a,0,M),u),h=n(t(a,M),u),y=I.length,N=h.length,E=0,D=0;E<y||D<N;)a[E+D]=E<y&&D<N?u(I[E],h[D])<=0?I[E++]:h[D++]:E<y?I[E++]:h[D++];return a};return CS=n,CS}var jS,yK;function hK(){if(yK)return jS;yK=1,KE(),fDe();var t=Wt(),r=Mn(),n=QH(),a=mu(),u=ci(),s=Qr(),c=On(),f=fK(),d=No(),M=z2(),I=yD(),h=zl(),y=rz(),N=R2(),E=U3(),D=fi(),v=Hi(),C=X1(),T=rM(),S=yi(),A=Bi(),L=yu(),b=k2(),$=Od(),Q=lD(),Y=rp(),O=lM(),j=H3(),x=di(),z=dDe(),H=x("iterator"),G="URLSearchParams",W=G+"Iterator",oe=N.set,P=N.getterFor(G),Z=N.getterFor(W),te=n("fetch"),w=n("Request"),q=n("Headers"),Ie=w&&w.prototype,pe=q&&q.prototype,le=r.TypeError,Oe=r.encodeURIComponent,we=String.fromCharCode,Te=a("String","fromCodePoint"),He=parseInt,rt=s("".charAt),It=s([].join),st=s([].push),ht=s("".replace),vt=s([].shift),jt=s([].splice),Tt=s("".split),it=s("".slice),pt=s(/./.exec),dt=/\+/g,Et="�",re=/^[0-9a-f]+$/i,ge=function(Ee,Ue){var Qe=it(Ee,Ue,Ue+2);return pt(re,Qe)?He(Qe,16):NaN},ve=function(Ee){for(var Ue=0,Qe=128;Qe>0&&(Ee&Qe)!==0;Qe>>=1)Ue++;return Ue},qe=function(Ee){var Ue=null;switch(Ee.length){case 1:Ue=Ee[0];break;case 2:Ue=(Ee[0]&31)<<6|Ee[1]&63;break;case 3:Ue=(Ee[0]&15)<<12|(Ee[1]&63)<<6|Ee[2]&63;break;case 4:Ue=(Ee[0]&7)<<18|(Ee[1]&63)<<12|(Ee[2]&63)<<6|Ee[3]&63;break}return Ue>1114111?null:Ue},Se=function(Ee){Ee=ht(Ee,dt," ");for(var Ue=Ee.length,Qe="",Pe=0;Pe<Ue;){var at=rt(Ee,Pe);if(at==="%"){if(rt(Ee,Pe+1)==="%"||Pe+3>Ue){Qe+="%",Pe++;continue}var _t=ge(Ee,Pe+1);if(_t!==_t){Qe+=at,Pe++;continue}Pe+=2;var Ot=ve(_t);if(Ot===0)at=we(_t);else{if(Ot===1||Ot>4){Qe+=Et,Pe++;continue}for(var xt=[_t],$t=1;$t<Ot&&(Pe++,!(Pe+3>Ue||rt(Ee,Pe)!=="%"));){var or=ge(Ee,Pe+1);if(or!==or){Pe+=3;break}if(or>191||or<128)break;st(xt,or),Pe+=2,$t++}if(xt.length!==Ot){Qe+=Et;continue}var hr=qe(xt);hr===null?Qe+=Et:at=Te(hr)}}Qe+=at,Pe++}return Qe},Me=/[!'()~]|%20/g,_e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Fe=function(Ee){return _e[Ee]},lt=function(Ee){return ht(Oe(Ee),Me,Fe)},ot=y(function(Ue,Qe){oe(this,{type:W,target:P(Ue).entries,index:0,kind:Qe})},G,function(){var Ue=Z(this),Qe=Ue.target,Pe=Ue.index++;if(!Qe||Pe>=Qe.length)return Ue.target=null,O(void 0,!0);var at=Qe[Pe];switch(Ue.kind){case"keys":return O(at.key,!1);case"values":return O(at.value,!1)}return O([at.key,at.value],!1)},!0),Ve=function(Ee){this.entries=[],this.url=null,Ee!==void 0&&(A(Ee)?this.parseObject(Ee):this.parseQuery(typeof Ee=="string"?rt(Ee,0)==="?"?it(Ee,1):Ee:L(Ee)))};Ve.prototype={type:G,bindURL:function(Ee){this.url=Ee,this.update()},parseObject:function(Ee){var Ue=this.entries,Qe=Y(Ee),Pe,at,_t,Ot,xt,$t,or;if(Qe)for(Pe=Q(Ee,Qe),at=Pe.next;!(_t=u(at,Pe)).done;){if(Ot=Q(S(_t.value)),xt=Ot.next,($t=u(xt,Ot)).done||(or=u(xt,Ot)).done||!u(xt,Ot).done)throw new le("Expected sequence with length 2");st(Ue,{key:L($t.value),value:L(or.value)})}else for(var hr in Ee)v(Ee,hr)&&st(Ue,{key:hr,value:L(Ee[hr])})},parseQuery:function(Ee){if(Ee)for(var Ue=this.entries,Qe=Tt(Ee,"&"),Pe=0,at,_t;Pe<Qe.length;)at=Qe[Pe++],at.length&&(_t=Tt(at,"="),st(Ue,{key:Se(vt(_t)),value:Se(It(_t,"="))}))},serialize:function(){for(var Ee=this.entries,Ue=[],Qe=0,Pe;Qe<Ee.length;)Pe=Ee[Qe++],st(Ue,lt(Pe.key)+"="+lt(Pe.value));return It(Ue,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var je=function(){E(this,xe);var Ue=arguments.length>0?arguments[0]:void 0,Qe=oe(this,new Ve(Ue));c||(this.size=Qe.entries.length)},xe=je.prototype;if(I(xe,{append:function(Ue,Qe){var Pe=P(this);j(arguments.length,2),st(Pe.entries,{key:L(Ue),value:L(Qe)}),c||this.length++,Pe.updateURL()},delete:function(Ee){for(var Ue=P(this),Qe=j(arguments.length,1),Pe=Ue.entries,at=L(Ee),_t=Qe<2?void 0:arguments[1],Ot=_t===void 0?_t:L(_t),xt=0;xt<Pe.length;){var $t=Pe[xt];if($t.key===at&&(Ot===void 0||$t.value===Ot)){if(jt(Pe,xt,1),Ot!==void 0)break}else xt++}c||(this.size=Pe.length),Ue.updateURL()},get:function(Ue){var Qe=P(this).entries;j(arguments.length,1);for(var Pe=L(Ue),at=0;at<Qe.length;at++)if(Qe[at].key===Pe)return Qe[at].value;return null},getAll:function(Ue){var Qe=P(this).entries;j(arguments.length,1);for(var Pe=L(Ue),at=[],_t=0;_t<Qe.length;_t++)Qe[_t].key===Pe&&st(at,Qe[_t].value);return at},has:function(Ue){for(var Qe=P(this).entries,Pe=j(arguments.length,1),at=L(Ue),_t=Pe<2?void 0:arguments[1],Ot=_t===void 0?_t:L(_t),xt=0;xt<Qe.length;){var $t=Qe[xt++];if($t.key===at&&(Ot===void 0||$t.value===Ot))return!0}return!1},set:function(Ue,Qe){var Pe=P(this);j(arguments.length,1);for(var at=Pe.entries,_t=!1,Ot=L(Ue),xt=L(Qe),$t=0,or;$t<at.length;$t++)or=at[$t],or.key===Ot&&(_t?jt(at,$t--,1):(_t=!0,or.value=xt));_t||st(at,{key:Ot,value:xt}),c||(this.size=at.length),Pe.updateURL()},sort:function(){var Ue=P(this);z(Ue.entries,function(Qe,Pe){return Qe.key>Pe.key?1:-1}),Ue.updateURL()},forEach:function(Ue){for(var Qe=P(this).entries,Pe=C(Ue,arguments.length>1?arguments[1]:void 0),at=0,_t;at<Qe.length;)_t=Qe[at++],Pe(_t.value,_t.key,this)},keys:function(){return new ot(this,"keys")},values:function(){return new ot(this,"values")},entries:function(){return new ot(this,"entries")}},{enumerable:!0}),d(xe,H,xe.entries,{name:"entries"}),d(xe,"toString",function(){return P(this).serialize()},{enumerable:!0}),c&&M(xe,"size",{get:function(){return P(this).entries.length},configurable:!0,enumerable:!0}),h(je,G),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:je}),!f&&D(q)){var Xe=s(pe.has),Dt=s(pe.set),bt=function(Ee){if(A(Ee)){var Ue=Ee.body,Qe;if(T(Ue)===G)return Qe=Ee.headers?new q(Ee.headers):new q,Xe(Qe,"content-type")||Dt(Qe,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),b(Ee,{body:$(0,L(Ue)),headers:$(0,Qe)})}return Ee};if(D(te)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Ue){return te(Ue,arguments.length>1?bt(arguments[1]):{})}}),D(w)){var fr=function(Ue){return E(this,Ie),new w(Ue,arguments.length>1?bt(arguments[1]):{})};Ie.constructor=fr,fr.prototype=Ie,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:fr})}}return jS={URLSearchParams:je,getState:P},jS}var NK;function MDe(){if(NK)return lK;NK=1,vP();var t=Wt(),r=On(),n=fK(),a=Mn(),u=X1(),s=Qr(),c=No(),f=z2(),d=U3(),M=Hi(),I=lDe(),h=nU(),y=q1(),N=DP().codeAt,E=cDe(),D=yu(),v=zl(),C=H3(),T=hK(),S=R2(),A=S.set,L=S.getterFor("URL"),b=T.URLSearchParams,$=T.getState,Q=a.URL,Y=a.TypeError,O=a.parseInt,j=Math.floor,x=Math.pow,z=s("".charAt),H=s(/./.exec),G=s([].join),W=s(1 .toString),oe=s([].pop),P=s([].push),Z=s("".replace),te=s([].shift),w=s("".split),q=s("".slice),Ie=s("".toLowerCase),pe=s([].unshift),le="Invalid authority",Oe="Invalid scheme",we="Invalid host",Te="Invalid port",He=/[a-z]/i,rt=/[\d+-.a-z]/i,It=/\d/,st=/^0x/i,ht=/^[0-7]+$/,vt=/^\d+$/,jt=/^[\da-f]+$/i,Tt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,it=/[\0\t\n\r #/:<>?@[\\\]^|]/,pt=/^[\u0000-\u0020]+/,dt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Et=/[\t\n\r]/g,re,ge=function(ne){var de=w(ne,"."),se,K,De,nt,$e,Rt,Mt;if(de.length&&de[de.length-1]===""&&de.length--,se=de.length,se>4)return ne;for(K=[],De=0;De<se;De++){if(nt=de[De],nt==="")return ne;if($e=10,nt.length>1&&z(nt,0)==="0"&&($e=H(st,nt)?16:8,nt=q(nt,$e===8?1:2)),nt==="")Rt=0;else{if(!H($e===10?vt:$e===8?ht:jt,nt))return ne;Rt=O(nt,$e)}P(K,Rt)}for(De=0;De<se;De++)if(Rt=K[De],De===se-1){if(Rt>=x(256,5-se))return null}else if(Rt>255)return null;for(Mt=oe(K),De=0;De<K.length;De++)Mt+=K[De]*x(256,3-De);return Mt},ve=function(ne){var de=[0,0,0,0,0,0,0,0],se=0,K=null,De=0,nt,$e,Rt,Mt,rr,dr,Ne,kt=function(){return z(ne,De)};if(kt()===":"){if(z(ne,1)!==":")return;De+=2,se++,K=se}for(;kt();){if(se===8)return;if(kt()===":"){if(K!==null)return;De++,se++,K=se;continue}for(nt=$e=0;$e<4&&H(jt,kt());)nt=nt*16+O(kt(),16),De++,$e++;if(kt()==="."){if($e===0||(De-=$e,se>6))return;for(Rt=0;kt();){if(Mt=null,Rt>0)if(kt()==="."&&Rt<4)De++;else return;if(!H(It,kt()))return;for(;H(It,kt());){if(rr=O(kt(),10),Mt===null)Mt=rr;else{if(Mt===0)return;Mt=Mt*10+rr}if(Mt>255)return;De++}de[se]=de[se]*256+Mt,Rt++,(Rt===2||Rt===4)&&se++}if(Rt!==4)return;break}else if(kt()===":"){if(De++,!kt())return}else if(kt())return;de[se++]=nt}if(K!==null)for(dr=se-K,se=7;se!==0&&dr>0;)Ne=de[se],de[se--]=de[K+dr-1],de[K+--dr]=Ne;else if(se!==8)return;return de},qe=function(ne){for(var de=null,se=1,K=null,De=0,nt=0;nt<8;nt++)ne[nt]!==0?(De>se&&(de=K,se=De),K=null,De=0):(K===null&&(K=nt),++De);return De>se?K:de},Se=function(ne){var de,se,K,De;if(typeof ne=="number"){for(de=[],se=0;se<4;se++)pe(de,ne%256),ne=j(ne/256);return G(de,".")}if(typeof ne=="object"){for(de="",K=qe(ne),se=0;se<8;se++)De&&ne[se]===0||(De&&(De=!1),K===se?(de+=se?":":"::",De=!0):(de+=W(ne[se],16),se<7&&(de+=":")));return"["+de+"]"}return ne},Me={},_e=I({},Me,{" ":1,'"':1,"<":1,">":1,"`":1}),Fe=I({},_e,{"#":1,"?":1,"{":1,"}":1}),lt=I({},Fe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ot=function(ne,de){var se=N(ne,0);return se>32&&se<127&&!M(de,ne)?ne:encodeURIComponent(ne)},Ve={ftp:21,file:null,http:80,https:443,ws:80,wss:443},je=function(ne,de){var se;return ne.length===2&&H(He,z(ne,0))&&((se=z(ne,1))===":"||!de&&se==="|")},xe=function(ne){var de;return ne.length>1&&je(q(ne,0,2))&&(ne.length===2||(de=z(ne,2))==="/"||de==="\\"||de==="?"||de==="#")},Xe=function(ne){return ne==="."||Ie(ne)==="%2e"},Dt=function(ne){return ne=Ie(ne),ne===".."||ne==="%2e."||ne===".%2e"||ne==="%2e%2e"},bt={},fr={},Ee={},Ue={},Qe={},Pe={},at={},_t={},Ot={},xt={},$t={},or={},hr={},ei={},Cr={},kn={},Bt={},jr={},En={},Or={},Nr={},zn=function(ne,de,se){var K=D(ne),De,nt,$e;if(de){if(nt=this.parse(K),nt)throw new Y(nt);this.searchParams=null}else{if(se!==void 0&&(De=new zn(se,!0)),nt=this.parse(K,null,De),nt)throw new Y(nt);$e=$(new b),$e.bindURL(this),this.searchParams=$e}};zn.prototype={type:"URL",parse:function(ne,de,se){var K=this,De=de||bt,nt=0,$e="",Rt=!1,Mt=!1,rr=!1,dr,Ne,kt,Wr;for(ne=D(ne),de||(K.scheme="",K.username="",K.password="",K.host=null,K.port=null,K.path=[],K.query=null,K.fragment=null,K.cannotBeABaseURL=!1,ne=Z(ne,pt,""),ne=Z(ne,dt,"$1")),ne=Z(ne,Et,""),dr=h(ne);nt<=dr.length;){switch(Ne=dr[nt],De){case bt:if(Ne&&H(He,Ne))$e+=Ie(Ne),De=fr;else{if(de)return Oe;De=Ee;continue}break;case fr:if(Ne&&(H(rt,Ne)||Ne==="+"||Ne==="-"||Ne==="."))$e+=Ie(Ne);else if(Ne===":"){if(de&&(K.isSpecial()!==M(Ve,$e)||$e==="file"&&(K.includesCredentials()||K.port!==null)||K.scheme==="file"&&!K.host))return;if(K.scheme=$e,de){K.isSpecial()&&Ve[K.scheme]===K.port&&(K.port=null);return}$e="",K.scheme==="file"?De=ei:K.isSpecial()&&se&&se.scheme===K.scheme?De=Ue:K.isSpecial()?De=_t:dr[nt+1]==="/"?(De=Qe,nt++):(K.cannotBeABaseURL=!0,P(K.path,""),De=En)}else{if(de)return Oe;$e="",De=Ee,nt=0;continue}break;case Ee:if(!se||se.cannotBeABaseURL&&Ne!=="#")return Oe;if(se.cannotBeABaseURL&&Ne==="#"){K.scheme=se.scheme,K.path=y(se.path),K.query=se.query,K.fragment="",K.cannotBeABaseURL=!0,De=Nr;break}De=se.scheme==="file"?ei:Pe;continue;case Ue:if(Ne==="/"&&dr[nt+1]==="/")De=Ot,nt++;else{De=Pe;continue}break;case Qe:if(Ne==="/"){De=xt;break}else{De=jr;continue}case Pe:if(K.scheme=se.scheme,Ne===re)K.username=se.username,K.password=se.password,K.host=se.host,K.port=se.port,K.path=y(se.path),K.query=se.query;else if(Ne==="/"||Ne==="\\"&&K.isSpecial())De=at;else if(Ne==="?")K.username=se.username,K.password=se.password,K.host=se.host,K.port=se.port,K.path=y(se.path),K.query="",De=Or;else if(Ne==="#")K.username=se.username,K.password=se.password,K.host=se.host,K.port=se.port,K.path=y(se.path),K.query=se.query,K.fragment="",De=Nr;else{K.username=se.username,K.password=se.password,K.host=se.host,K.port=se.port,K.path=y(se.path),K.path.length--,De=jr;continue}break;case at:if(K.isSpecial()&&(Ne==="/"||Ne==="\\"))De=Ot;else if(Ne==="/")De=xt;else{K.username=se.username,K.password=se.password,K.host=se.host,K.port=se.port,De=jr;continue}break;case _t:if(De=Ot,Ne!=="/"||z($e,nt+1)!=="/")continue;nt++;break;case Ot:if(Ne!=="/"&&Ne!=="\\"){De=xt;continue}break;case xt:if(Ne==="@"){Rt&&($e="%40"+$e),Rt=!0,kt=h($e);for(var Ei=0;Ei<kt.length;Ei++){var ti=kt[Ei];if(ti===":"&&!rr){rr=!0;continue}var Lr=ot(ti,lt);rr?K.password+=Lr:K.username+=Lr}$e=""}else if(Ne===re||Ne==="/"||Ne==="?"||Ne==="#"||Ne==="\\"&&K.isSpecial()){if(Rt&&$e==="")return le;nt-=h($e).length+1,$e="",De=$t}else $e+=Ne;break;case $t:case or:if(de&&K.scheme==="file"){De=kn;continue}else if(Ne===":"&&!Mt){if($e==="")return we;if(Wr=K.parseHost($e),Wr)return Wr;if($e="",De=hr,de===or)return}else if(Ne===re||Ne==="/"||Ne==="?"||Ne==="#"||Ne==="\\"&&K.isSpecial()){if(K.isSpecial()&&$e==="")return we;if(de&&$e===""&&(K.includesCredentials()||K.port!==null))return;if(Wr=K.parseHost($e),Wr)return Wr;if($e="",De=Bt,de)return;continue}else Ne==="["?Mt=!0:Ne==="]"&&(Mt=!1),$e+=Ne;break;case hr:if(H(It,Ne))$e+=Ne;else if(Ne===re||Ne==="/"||Ne==="?"||Ne==="#"||Ne==="\\"&&K.isSpecial()||de){if($e!==""){var Ji=O($e,10);if(Ji>65535)return Te;K.port=K.isSpecial()&&Ji===Ve[K.scheme]?null:Ji,$e=""}if(de)return;De=Bt;continue}else return Te;break;case ei:if(K.scheme="file",Ne==="/"||Ne==="\\")De=Cr;else if(se&&se.scheme==="file")switch(Ne){case re:K.host=se.host,K.path=y(se.path),K.query=se.query;break;case"?":K.host=se.host,K.path=y(se.path),K.query="",De=Or;break;case"#":K.host=se.host,K.path=y(se.path),K.query=se.query,K.fragment="",De=Nr;break;default:xe(G(y(dr,nt),""))||(K.host=se.host,K.path=y(se.path),K.shortenPath()),De=jr;continue}else{De=jr;continue}break;case Cr:if(Ne==="/"||Ne==="\\"){De=kn;break}se&&se.scheme==="file"&&!xe(G(y(dr,nt),""))&&(je(se.path[0],!0)?P(K.path,se.path[0]):K.host=se.host),De=jr;continue;case kn:if(Ne===re||Ne==="/"||Ne==="\\"||Ne==="?"||Ne==="#"){if(!de&&je($e))De=jr;else if($e===""){if(K.host="",de)return;De=Bt}else{if(Wr=K.parseHost($e),Wr)return Wr;if(K.host==="localhost"&&(K.host=""),de)return;$e="",De=Bt}continue}else $e+=Ne;break;case Bt:if(K.isSpecial()){if(De=jr,Ne!=="/"&&Ne!=="\\")continue}else if(!de&&Ne==="?")K.query="",De=Or;else if(!de&&Ne==="#")K.fragment="",De=Nr;else if(Ne!==re&&(De=jr,Ne!=="/"))continue;break;case jr:if(Ne===re||Ne==="/"||Ne==="\\"&&K.isSpecial()||!de&&(Ne==="?"||Ne==="#")){if(Dt($e)?(K.shortenPath(),Ne!=="/"&&!(Ne==="\\"&&K.isSpecial())&&P(K.path,"")):Xe($e)?Ne!=="/"&&!(Ne==="\\"&&K.isSpecial())&&P(K.path,""):(K.scheme==="file"&&!K.path.length&&je($e)&&(K.host&&(K.host=""),$e=z($e,0)+":"),P(K.path,$e)),$e="",K.scheme==="file"&&(Ne===re||Ne==="?"||Ne==="#"))for(;K.path.length>1&&K.path[0]==="";)te(K.path);Ne==="?"?(K.query="",De=Or):Ne==="#"&&(K.fragment="",De=Nr)}else $e+=ot(Ne,Fe);break;case En:Ne==="?"?(K.query="",De=Or):Ne==="#"?(K.fragment="",De=Nr):Ne!==re&&(K.path[0]+=ot(Ne,Me));break;case Or:!de&&Ne==="#"?(K.fragment="",De=Nr):Ne!==re&&(Ne==="'"&&K.isSpecial()?K.query+="%27":Ne==="#"?K.query+="%23":K.query+=ot(Ne,Me));break;case Nr:Ne!==re&&(K.fragment+=ot(Ne,_e));break}nt++}},parseHost:function(ne){var de,se,K;if(z(ne,0)==="["){if(z(ne,ne.length-1)!=="]"||(de=ve(q(ne,1,-1)),!de))return we;this.host=de}else if(this.isSpecial()){if(ne=E(ne),H(Tt,ne)||(de=ge(ne),de===null))return we;this.host=de}else{if(H(it,ne))return we;for(de="",se=h(ne),K=0;K<se.length;K++)de+=ot(se[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(Ve,this.scheme)},shortenPath:function(){var ne=this.path,de=ne.length;de&&(this.scheme!=="file"||de!==1||!je(ne[0],!0))&&ne.length--},serialize:function(){var ne=this,de=ne.scheme,se=ne.username,K=ne.password,De=ne.host,nt=ne.port,$e=ne.path,Rt=ne.query,Mt=ne.fragment,rr=de+":";return De!==null?(rr+="//",ne.includesCredentials()&&(rr+=se+(K?":"+K:"")+"@"),rr+=Se(De),nt!==null&&(rr+=":"+nt)):de==="file"&&(rr+="//"),rr+=ne.cannotBeABaseURL?$e[0]:$e.length?"/"+G($e,"/"):"",Rt!==null&&(rr+="?"+Rt),Mt!==null&&(rr+="#"+Mt),rr},setHref:function(ne){var de=this.parse(ne);if(de)throw new Y(de);this.searchParams.update()},getOrigin:function(){var ne=this.scheme,de=this.port;if(ne==="blob")try{return new Dn(ne.path[0]).origin}catch(se){return"null"}return ne==="file"||!this.isSpecial()?"null":ne+"://"+Se(this.host)+(de!==null?":"+de:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ne){this.parse(D(ne)+":",bt)},getUsername:function(){return this.username},setUsername:function(ne){var de=h(D(ne));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var se=0;se<de.length;se++)this.username+=ot(de[se],lt)}},getPassword:function(){return this.password},setPassword:function(ne){var de=h(D(ne));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var se=0;se<de.length;se++)this.password+=ot(de[se],lt)}},getHost:function(){var ne=this.host,de=this.port;return ne===null?"":de===null?Se(ne):Se(ne)+":"+de},setHost:function(ne){this.cannotBeABaseURL||this.parse(ne,$t)},getHostname:function(){var ne=this.host;return ne===null?"":Se(ne)},setHostname:function(ne){this.cannotBeABaseURL||this.parse(ne,or)},getPort:function(){var ne=this.port;return ne===null?"":D(ne)},setPort:function(ne){this.cannotHaveUsernamePasswordPort()||(ne=D(ne),ne===""?this.port=null:this.parse(ne,hr))},getPathname:function(){var ne=this.path;return this.cannotBeABaseURL?ne[0]:ne.length?"/"+G(ne,"/"):""},setPathname:function(ne){this.cannotBeABaseURL||(this.path=[],this.parse(ne,Bt))},getSearch:function(){var ne=this.query;return ne?"?"+ne:""},setSearch:function(ne){ne=D(ne),ne===""?this.query=null:(z(ne,0)==="?"&&(ne=q(ne,1)),this.query="",this.parse(ne,Or)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ne=this.fragment;return ne?"#"+ne:""},setHash:function(ne){if(ne=D(ne),ne===""){this.fragment=null;return}z(ne,0)==="#"&&(ne=q(ne,1)),this.fragment="",this.parse(ne,Nr)},update:function(){this.query=this.searchParams.serialize()||null}};var Dn=function(de){var se=d(this,ir),K=C(arguments.length,1)>1?arguments[1]:void 0,De=A(se,new zn(de,!1,K));r||(se.href=De.serialize(),se.origin=De.getOrigin(),se.protocol=De.getProtocol(),se.username=De.getUsername(),se.password=De.getPassword(),se.host=De.getHost(),se.hostname=De.getHostname(),se.port=De.getPort(),se.pathname=De.getPathname(),se.search=De.getSearch(),se.searchParams=De.getSearchParams(),se.hash=De.getHash())},ir=Dn.prototype,mr=function(ne,de){return{get:function(){return L(this)[ne]()},set:de&&function(se){return L(this)[de](se)},configurable:!0,enumerable:!0}};if(r&&(f(ir,"href",mr("serialize","setHref")),f(ir,"origin",mr("getOrigin")),f(ir,"protocol",mr("getProtocol","setProtocol")),f(ir,"username",mr("getUsername","setUsername")),f(ir,"password",mr("getPassword","setPassword")),f(ir,"host",mr("getHost","setHost")),f(ir,"hostname",mr("getHostname","setHostname")),f(ir,"port",mr("getPort","setPort")),f(ir,"pathname",mr("getPathname","setPathname")),f(ir,"search",mr("getSearch","setSearch")),f(ir,"searchParams",mr("getSearchParams")),f(ir,"hash",mr("getHash","setHash"))),c(ir,"toJSON",function(){return L(this).serialize()},{enumerable:!0}),c(ir,"toString",function(){return L(this).serialize()},{enumerable:!0}),Q){var on=Q.createObjectURL,Xi=Q.revokeObjectURL;on&&c(Dn,"createObjectURL",u(on,Q)),Xi&&c(Dn,"revokeObjectURL",u(Xi,Q))}return v(Dn,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!r},{URL:Dn}),lK}var EK;function gDe(){return EK||(EK=1,MDe()),sK}gDe();var DK={},mK;function IDe(){if(mK)return DK;mK=1;var t=Wt(),r=ci();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),DK}IDe();var vK={},_K;function pDe(){return _K||(_K=1,hK()),vK}pDe();var TK={},SK;function yDe(){if(SK)return TK;SK=1;var t=No(),r=Qr(),n=yu(),a=H3(),u=URLSearchParams,s=u.prototype,c=r(s.append),f=r(s.delete),d=r(s.forEach),M=r([].push),I=new u("a=1&a=2&b=3");return I.delete("a",1),I.delete("b",void 0),I+""!="a=2"&&t(s,"delete",function(h){var y=arguments.length,N=y<2?void 0:arguments[1];if(y&&N===void 0)return f(this,h);var E=[];d(this,function(b,$){M(E,{key:$,value:b})}),a(y,1);for(var D=n(h),v=n(N),C=0,T=0,S=!1,A=E.length,L;C<A;)L=E[C++],S||L.key===D?(S=!0,f(this,L.key)):T++;for(;T<A;)L=E[T++],L.key===D&&L.value===v||c(this,L.key,L.value)},{enumerable:!0,unsafe:!0}),TK}yDe();var AK={},CK;function hDe(){if(CK)return AK;CK=1;var t=No(),r=Qr(),n=yu(),a=H3(),u=URLSearchParams,s=u.prototype,c=r(s.getAll),f=r(s.has),d=new u("a=1");return(d.has("a",2)||!d.has("a",void 0))&&t(s,"has",function(I){var h=arguments.length,y=h<2?void 0:arguments[1];if(h&&y===void 0)return f(this,I);var N=c(this,I);a(h,1);for(var E=n(y),D=0;D<N.length;)if(N[D++]===E)return!0;return!1},{enumerable:!0,unsafe:!0}),AK}hDe();var jK={},OK;function NDe(){if(OK)return jK;OK=1;var t=On(),r=Qr(),n=z2(),a=URLSearchParams.prototype,u=r(a.forEach);return t&&!("size"in a)&&n(a,"size",{get:function(){var c=0;return u(this,function(){c++}),c},configurable:!0,enumerable:!0}),jK}NDe();function og(t){"@babel/helpers - typeof";return og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},og(t)}function EDe(t,r){return _De(t)||vDe(t,r)||mDe(t,r)||DDe()}function DDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
72
72
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mDe(t,r){if(t){if(typeof t=="string")return LK(t,r);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LK(t,r):void 0}}function LK(t,r){(r==null||r>t.length)&&(r=t.length);for(var n=0,a=Array(r);n<r;n++)a[n]=t[n];return a}function vDe(t,r){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a,u,s,c,f=[],d=!0,M=!1;try{if(s=(n=n.call(t)).next,r!==0)for(;!(d=(a=s.call(n)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(I){M=!0,u=I}finally{try{if(!d&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(M)throw u}}return f}}function _De(t){if(Array.isArray(t))return t}function TDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function SDe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,xK(a.key),a)}}function ADe(t,r,n){return r&&SDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Yp(t,r,n){return(r=xK(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function xK(t){var r=CDe(t,"string");return og(r)=="symbol"?r:r+""}function CDe(t,r){if(og(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(og(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var jDe=function(){function t(){TDe(this,t),Yp(this,"_levels",[]),Yp(this,"_transports",[]),Yp(this,"_logs",[]),Yp(this,"_prevTime",0);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var n=r.split(">"),a=EDe(n,2),u=a[0],s=a[1];this._levels=u.split(","),s&&(this._transports=s.split(","))}catch(c){return}}return ADe(t,[{key:"create",value:function(n,a){var u=this;return function(s){var c=Date.now(),f=0;if(u._prevTime&&(f=c-u._prevTime),u._prevTime=c,u._levels.includes(n)&&u._transports.includes("console")){var d=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(d,";"),n,"",s,"color: ".concat(d,";"),f)}u._logs.push("".concat(n,": ").concat(s," +").concat(f,"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(`
73
- `),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()}}}])}(),OS=new jDe;function Qd(t){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qd(t)}function Ln(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Ln=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,j,x,z){return Object.defineProperty(O,j,{value:x,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(x,z,H){return x[z]=H}}function M(O,j,x,z){var H=j&&j.prototype instanceof y?j:y,G=Object.create(H.prototype);return d(G,"_invoke",function(W,oe,P){var Z=1;return function(te,w){if(Z===3)throw Error("Generator is already running");if(Z===4){if(te==="throw")throw w;return{value:t,done:!0}}for(P.method=te,P.arg=w;;){var q=P.delegate;if(q){var Ie=L(q,P);if(Ie){if(Ie===h)continue;return Ie}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(Z===1)throw Z=4,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);Z=3;var pe=I(W,oe,P);if(pe.type==="normal"){if(Z=P.done?4:2,pe.arg===h)continue;return{value:pe.arg,done:P.done}}pe.type==="throw"&&(Z=4,P.method="throw",P.arg=pe.arg)}}}(O,x,new Q(z||[])),!0),G}function I(O,j,x){try{return{type:"normal",arg:O.call(j,x)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var h={};function y(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var v=Object.getPrototypeOf,C=v&&v(v(Y([])));C&&C!==n&&a.call(C,s)&&(D=C);var T=E.prototype=y.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(j){d(O,j,function(x){return this._invoke(j,x)})})}function A(O,j){function x(H,G,W,oe){var P=I(O[H],O,G);if(P.type!=="throw"){var Z=P.arg,te=Z.value;return te&&Qd(te)=="object"&&a.call(te,"__await")?j.resolve(te.__await).then(function(w){x("next",w,W,oe)},function(w){x("throw",w,W,oe)}):j.resolve(te).then(function(w){Z.value=w,W(Z)},function(w){return x("throw",w,W,oe)})}oe(P.arg)}var z;d(this,"_invoke",function(H,G){function W(){return new j(function(oe,P){x(H,G,oe,P)})}return z=z?z.then(W,W):W()},!0)}function L(O,j){var x=j.method,z=O.i[x];if(z===t)return j.delegate=null,x==="throw"&&O.i.return&&(j.method="return",j.arg=t,L(O,j),j.method==="throw")||x!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+x+"' method")),h;var H=I(z,O.i,j.arg);if(H.type==="throw")return j.method="throw",j.arg=H.arg,j.delegate=null,h;var G=H.arg;return G?G.done?(j[O.r]=G.value,j.next=O.n,j.method!=="return"&&(j.method="next",j.arg=t),j.delegate=null,h):G:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,h)}function b(O){this.tryEntries.push(O)}function $(O){var j=O[4]||{};j.type="normal",j.arg=t,O[4]=j}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var j=O[s];if(j)return j.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var x=-1,z=function H(){for(;++x<O.length;)if(a.call(O,x))return H.value=O[x],H.done=!1,H;return H.value=t,H.done=!0,H};return z.next=z}}throw new TypeError(Qd(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var j=typeof O=="function"&&O.constructor;return!!j&&(j===N||(j.displayName||j.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,j,x,z,H){H===void 0&&(H=Promise);var G=new A(M(O,j,x,z),H);return r.isGeneratorFunction(j)?G:G.next().then(function(W){return W.done?W.value:G.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var j=Object(O),x=[];for(var z in j)x.unshift(z);return function H(){for(;x.length;)if((z=x.pop())in j)return H.value=z,H.done=!1,H;return H.done=!0,H}},r.values=Y,Q.prototype={constructor:Q,reset:function(j){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!j)for(var x in this)x.charAt(0)==="t"&&a.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=t)},stop:function(){this.done=!0;var j=this.tryEntries[0][4];if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var x=this;function z(te){W.type="throw",W.arg=j,x.next=te}for(var H=x.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H],W=G[4],oe=this.prev,P=G[1],Z=G[2];if(G[0]===-1)return z("end"),!1;if(!P&&!Z)throw Error("try statement without catch or finally");if(G[0]!=null&&G[0]<=oe){if(oe<P)return this.method="next",this.arg=t,z(P),!0;if(oe<Z)return z(Z),!1}}},abrupt:function(j,x){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var G=H;break}}G&&(j==="break"||j==="continue")&&G[0]<=x&&x<=G[2]&&(G=null);var W=G?G[4]:{};return W.type=j,W.arg=x,G?(this.method="next",this.next=G[2],h):this.complete(W)},complete:function(j,x){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&x&&(this.next=x),h},finish:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[2]===j)return this.complete(z[4],z[3]),$(z),h}},catch:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[0]===j){var H=z[4];if(H.type==="throw"){var G=H.arg;$(z)}return G}}throw Error("illegal catch attempt")},delegateYield:function(j,x,z){return this.delegate={i:Y(j),r:x,n:z},this.method==="next"&&(this.arg=t),h}},r}function wK(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function hu(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){wK(s,a,u,c,f,"next",d)}function f(d){wK(s,a,u,c,f,"throw",d)}c(void 0)})}}function ODe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function LDe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,bK(a.key),a)}}function xDe(t,r,n){return r&&LDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i4(t,r,n){return(r=bK(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function bK(t){var r=wDe(t,"string");return Qd(r)=="symbol"?r:r+""}function wDe(t,r){if(Qd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Qd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var jo=OS.create("wasm_idv"),bDe=function(){function t(r){ODe(this,t),i4(this,"_worker",null),i4(this,"_initialized",!1),i4(this,"_connectedToIdv",!1),i4(this,"_serviceRunning",!1),i4(this,"_userId",u5e(ige)),i4(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return xDe(t,[{key:"init",value:function(){var r=hu(Ln().mark(function a(){var u,s,c,f;return Ln().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/rc/2.5/86dc740-c49957c66//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:s=M.sent,c=URL.createObjectURL(s),this._worker=new Worker(c),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),jo("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/rc/2.5/86dc740-c49957c66/",preMain:!0});case 23:return f=M.sent,f.code===0&&jo("Worker was created successfully"),M.abrupt("return",f);case 26:case"end":return M.stop()}},a,this,[[1,12]])}));function n(){return r.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var r=hu(Ln().mark(function a(u){var s,c;return Ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:PD.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 c=d.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),jo("IdvWasmService result code: ".concat(c.code)),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var r=hu(Ln().mark(function a(u){var s;return Ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:PD.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return s=f.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),jo("Connection by URL result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var r=hu(Ln().mark(function a(u,s,c){var f,d;return Ln().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:s},c&&(s5e(c)?f.metadata=c:console.log("WARN (Idv):: metadata is not an object or an empty object")),I.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:f,preMain:!0});case 4:return d=I.sent,jo("Start session result code: ".concat(d.code)),I.abrupt("return",d);case 7:case"end":return I.stop()}},a,this)}));function n(a,u,s){return r.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var r=hu(Ln().mark(function a(u,s){var c,f;return Ln().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c={sessionId:u,locale:s},M.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=M.sent,jo("Continue session result code: ".concat(f.code)),M.abrupt("return",f);case 6:case"end":return M.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var r=hu(Ln().mark(function a(){var u,s,c=arguments;return Ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=d.sent,jo("listWorkflows result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,jo("getHealth result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,jo("getServiceToken result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,jo("abandonSession result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var r=hu(Ln().mark(function a(u){var s;return Ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=f.sent,jo("getWorkflow result code: ".concat(s.code)),f.abrupt("return",s);case 5:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var r=hu(Ln().mark(function a(u,s){var c;return Ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:u},preMain:!0});case 2:return c=d.sent,jo("pushData result code: ".concat(c.code)),d.abrupt("return",c);case 5:case"end":return d.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,jo("getSessionState result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,jo("waitForSessionUpdate result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,jo("disconnect result code: ".concat(u.code)),c.abrupt("return",u);case 7:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var r=hu(Ln().mark(function a(u){var s=this;return Ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,M){if(!s._worker)return M();s._worker.onmessage=function(I){var h=I.data.target;if(h==="stdout"){jo(JSON.stringify(I.data.content));return}if(h==="custom"){var y=I.data,N=y.method,E=y.data;N==="onRuntimeInitialized"&&(s._initialized=!0),d(E)}if(h==="stderr"){var D=I.data.content;jo(JSON.stringify(D)),s._setErrorScreen&&s._setErrorScreen(D)}},s._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function n(a){return r.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 r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()}])}();function $d(t){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$d(t)}function RK(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function ug(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?RK(Object(n),!0).forEach(function(a){LS(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):RK(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function LS(t,r,n){return(r=RDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function RDe(t){var r=kDe(t,"string");return $d(r)=="symbol"?r:r+""}function kDe(t,r){if($d(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if($d(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function zi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */zi=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,j,x,z){return Object.defineProperty(O,j,{value:x,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(x,z,H){return x[z]=H}}function M(O,j,x,z){var H=j&&j.prototype instanceof y?j:y,G=Object.create(H.prototype);return d(G,"_invoke",function(W,oe,P){var Z=1;return function(te,w){if(Z===3)throw Error("Generator is already running");if(Z===4){if(te==="throw")throw w;return{value:t,done:!0}}for(P.method=te,P.arg=w;;){var q=P.delegate;if(q){var Ie=L(q,P);if(Ie){if(Ie===h)continue;return Ie}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(Z===1)throw Z=4,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);Z=3;var pe=I(W,oe,P);if(pe.type==="normal"){if(Z=P.done?4:2,pe.arg===h)continue;return{value:pe.arg,done:P.done}}pe.type==="throw"&&(Z=4,P.method="throw",P.arg=pe.arg)}}}(O,x,new Q(z||[])),!0),G}function I(O,j,x){try{return{type:"normal",arg:O.call(j,x)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var h={};function y(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var v=Object.getPrototypeOf,C=v&&v(v(Y([])));C&&C!==n&&a.call(C,s)&&(D=C);var T=E.prototype=y.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(j){d(O,j,function(x){return this._invoke(j,x)})})}function A(O,j){function x(H,G,W,oe){var P=I(O[H],O,G);if(P.type!=="throw"){var Z=P.arg,te=Z.value;return te&&$d(te)=="object"&&a.call(te,"__await")?j.resolve(te.__await).then(function(w){x("next",w,W,oe)},function(w){x("throw",w,W,oe)}):j.resolve(te).then(function(w){Z.value=w,W(Z)},function(w){return x("throw",w,W,oe)})}oe(P.arg)}var z;d(this,"_invoke",function(H,G){function W(){return new j(function(oe,P){x(H,G,oe,P)})}return z=z?z.then(W,W):W()},!0)}function L(O,j){var x=j.method,z=O.i[x];if(z===t)return j.delegate=null,x==="throw"&&O.i.return&&(j.method="return",j.arg=t,L(O,j),j.method==="throw")||x!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+x+"' method")),h;var H=I(z,O.i,j.arg);if(H.type==="throw")return j.method="throw",j.arg=H.arg,j.delegate=null,h;var G=H.arg;return G?G.done?(j[O.r]=G.value,j.next=O.n,j.method!=="return"&&(j.method="next",j.arg=t),j.delegate=null,h):G:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,h)}function b(O){this.tryEntries.push(O)}function $(O){var j=O[4]||{};j.type="normal",j.arg=t,O[4]=j}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var j=O[s];if(j)return j.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var x=-1,z=function H(){for(;++x<O.length;)if(a.call(O,x))return H.value=O[x],H.done=!1,H;return H.value=t,H.done=!0,H};return z.next=z}}throw new TypeError($d(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var j=typeof O=="function"&&O.constructor;return!!j&&(j===N||(j.displayName||j.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,j,x,z,H){H===void 0&&(H=Promise);var G=new A(M(O,j,x,z),H);return r.isGeneratorFunction(j)?G:G.next().then(function(W){return W.done?W.value:G.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var j=Object(O),x=[];for(var z in j)x.unshift(z);return function H(){for(;x.length;)if((z=x.pop())in j)return H.value=z,H.done=!1,H;return H.done=!0,H}},r.values=Y,Q.prototype={constructor:Q,reset:function(j){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!j)for(var x in this)x.charAt(0)==="t"&&a.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=t)},stop:function(){this.done=!0;var j=this.tryEntries[0][4];if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var x=this;function z(te){W.type="throw",W.arg=j,x.next=te}for(var H=x.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H],W=G[4],oe=this.prev,P=G[1],Z=G[2];if(G[0]===-1)return z("end"),!1;if(!P&&!Z)throw Error("try statement without catch or finally");if(G[0]!=null&&G[0]<=oe){if(oe<P)return this.method="next",this.arg=t,z(P),!0;if(oe<Z)return z(Z),!1}}},abrupt:function(j,x){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var G=H;break}}G&&(j==="break"||j==="continue")&&G[0]<=x&&x<=G[2]&&(G=null);var W=G?G[4]:{};return W.type=j,W.arg=x,G?(this.method="next",this.next=G[2],h):this.complete(W)},complete:function(j,x){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&x&&(this.next=x),h},finish:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[2]===j)return this.complete(z[4],z[3]),$(z),h}},catch:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[0]===j){var H=z[4];if(H.type==="throw"){var G=H.arg;$(z)}return G}}throw Error("illegal catch attempt")},delegateYield:function(j,x,z){return this.delegate={i:Y(j),r:x,n:z},this.method==="next"&&(this.arg=t),h}},r}function kK(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function Fl(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){kK(s,a,u,c,f,"next",d)}function f(d){kK(s,a,u,c,f,"throw",d)}c(void 0)})}}var zDe=OS.create("store_idv"),PDe=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Fl(zi().mark(function s(){var c;return zi().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new bDe,d.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return d.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Fl(zi().mark(function s(){var c,f,d,M,I;return zi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=y.sent,M=null,d.code===4&&(M=wd.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=wd.PROVIDER_ERROR),M===null){y.next=12;break}return I=new AM({errorCode:M}),y.abrupt("return",{error:I});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},s)}))()},connectByUrl:function(u){return Fl(zi().mark(function s(){var c,f,d,M,I;return zi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,d=null,f.code===4&&(d=wd.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=wd.PROVIDER_ERROR),d===null){y.next=13;break}return M=new AM({errorCode:d}),I=new cp({errorCode:VD.CONNECTION_ISSUE,underlyingBaseError:M}),y.abrupt("return",{workflows:[],error:I});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var s=function(f){var d,M=(d=n().currentSessionData)===null||d===void 0?void 0:d.sessionId,I=ug(ug({},f.results),{},{sessionId:M}),h=ug({results:I},f.error&&{error:f.error});n().setCurrentSessionDataLsAndStore(null),u(h)};r(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Fl(zi().mark(function s(){var c,f,d,M;return zi().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=n().externalModulesNames,h.prev=1,h.next=4,UDe(c);case 4:return f=h.sent,r(function(){return{externalModules:f}}),h.abrupt("return",{});case 9:return h.prev=9,h.t0=h.catch(1),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),M=new SM({errorCode:MM.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:M});case 16:case"end":return h.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=Bm(u.find(function(c){return c.templateId===YD}));s.templateLayout=uY(s.templateLayout,n().layout),r({processingTransformedTemplate:s})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Fl(zi().mark(function s(c,f){var d,M,I;return zi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d=null,M=function(){var N=Fl(zi().mark(function E(){var D,v,C,T;return zi().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,n().wasmService.pushData(c,f);case 2:if(D=A.sent,v=null,D.code===4&&(v=cl.HTTP_ISSUE),D.code!==0&&D.code!==4&&(v=cl.PROVIDER_ERROR),v!==null&&(C=new Q3({errorCode:cl.HTTP_ISSUE}),T=new To({errorCode:_o.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:C}),d=T),D.code!==0){A.next=12;break}return d=null,A.abrupt("return",D);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},y.next=5,Zm(M,I);case 5:return y.abrupt("return",d?{error:d}:{});case 6:case"end":return y.stop()}},s)}));function u(s,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var s=n().workflow;if(!s||!u)return null;var c=s.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var a=Fl(zi().mark(function s(){var c,f,d,M,I;return zi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=null,f=function(){var N=Fl(zi().mark(function E(){var D,v,C,T,S,A,L,b,$,Q,Y,O,j,x;return zi().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.next=2,n().wasmService.getSessionState();case 2:if(T=H.sent,S=(D=T.data)===null||D===void 0?void 0:D.currentStep,A=(v=T.data)===null||v===void 0?void 0:v.isProcessingFiles,L=(C=T.data)===null||C===void 0||(C=C.workflow)===null||C===void 0?void 0:C.steps,b=i5e(L,S),$=T.code===4,Q=T.code!==0&&T.code!==4,Y=T.code===0&&(!T.data.workflow||!T.data.currentStep),O=null,L&&!b&&(O=cl.NOT_DATA_TYPE),$&&(O=cl.HTTP_ISSUE),Q&&(O=cl.PROVIDER_ERROR),A&&(O=cl.IS_PROCESSING),Y&&(O=cl.DECODING_FAILED),O!==null&&(j=new Q3({errorCode:O}),x=new To({errorCode:_o.INTERNAL_ISSUE,underlyingBaseError:j}),c=x),zDe(JSON.stringify({nextStep:S,isDataType:b,isProcessingFiles:A})),!(b&&!A&&!$&&!Q&&!Y)){H.next=21;break}return c=null,H.abrupt("return",T.data);case 21:return H.abrupt("return",null);case 22:case"end":return H.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},y.next=5,Zm(f,d);case 5:if(M=y.sent,!c){y.next=8;break}return y.abrupt("return",{error:c});case 8:if(!M){y.next=10;break}return y.abrupt("return",{sessionData:M});case 10:return c=new Q3({errorCode:cl.DECODING_FAILED}),I=new To({errorCode:_o.INTERNAL_ISSUE,underlyingBaseError:c}),y.abrupt("return",{error:I});case 13:case"end":return y.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var s=u||n().currentStepId;if(s){var c=n()._findStepById(s);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:fM.MESSAGE,message:dM.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Fl(zi().mark(function s(c){var f,d,M,I,h,y,N,E,D;return zi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(f=n().currentStepId,f){C.next=3;break}return C.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){C.next=7;break}return n().setFinalStepAndStopProcess(),C.abrupt("return");case 7:if(!(c instanceof Kn)){C.next=13;break}return d=c,M=new To({errorCode:_o.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:M}),n().resetSession(),C.abrupt("return");case 13:return C.next=15,n()._pushStep(f,c);case 15:if(I=C.sent,!I.error){C.next=20;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),C.abrupt("return");case 20:return C.next=22,n()._waitingForNextStep();case 22:if(h=C.sent,!h.error){C.next=27;break}return n().workflowSessionCompletion({error:h.error}),n().resetSession(),C.abrupt("return");case 27:if(y=h.sessionData.workflow,N=h.sessionData.currentStep,n().setWorkflow(y),n().setLayout(y.client.layout),n().setProcessingTemplate(y.client.steps),n().setSessionProperties(h.sessionData.properties),E=n()._findStepById(N),D=function(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.templateId},!(E!=null&&E.final&&!D(E.client))){C.next=38;break}return n().setFinalStepAndStopProcess(E.id),C.abrupt("return");case 38:E!=null&&E.final&&D(E.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(N),n().setIsProcessing(!1);case 41:case"end":return C.stop()}},s)}));function u(s){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return r(function(){return{currentScreenConfig:null}});var s=n().workflow,c=n().sessionProperties,f=null;if(u===YD&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var M,I,h=n()._findStepById(u);if(typeof(h==null||(M=h.client)===null||M===void 0?void 0:M.templateId)=="string"){var y;f=ug(ug({},h==null?void 0:h.client),{},{templateId:h.client.templateId,dataSource:(y=h.dataSource)!==null&&y!==void 0?y:null,properties:c})}if(f){var N;f.sessionId=(N=n().currentSessionData)===null||N===void 0?void 0:N.sessionId,f.serviceToken=n().serviceToken}if(f&&l5e(h==null||(I=h.client)===null||I===void 0?void 0:I.templateLayout)){var E=uY(h.client.templateLayout,n().layout);E&&(f.templateLayout=E)}}var D=n5e(n().externalModules,s.steps,u);if(f===null||!D){var v=new To({errorCode:_o.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:v}),r(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Fl(zi().mark(function s(){var c,f;return zi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,(c=n().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=M.sent,n().resetWasmService(),n().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.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 r(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 r(function(){return{wasmService:null}})}}};function UDe(t){return xS.apply(this,arguments)}function xS(){return xS=Fl(zi().mark(function t(r){var n,a,u,s,c,f;return zi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:q2.getIdentifier(),supportedTemplates:q2.getSupportedTemplates(),component:q2}],a=LS(LS({},HD.LIVENESS,function(){return Promise.resolve().then(()=>zet)}),HD.DOC_READER,function(){return Promise.resolve().then(()=>WOt)}),u=zi().mark(function I(){var h,y,N;return zi().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(h=c[s],y=function(){return a[h]()},!y){D.next=7;break}return D.next=5,y();case 5:N=D.sent,n.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return D.stop()}},I)}),s=0,c=r;case 4:if(!(s<c.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:s++,M.next=4;break;case 9:return f=n.filter(function(I){return I!==null}),M.abrupt("return",f);case 11:case"end":return M.stop()}},t)})),xS.apply(this,arguments)}function sg(t){"@babel/helpers - typeof";return sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},sg(t)}function zK(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function wS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?zK(Object(n),!0).forEach(function(a){HDe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zK(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function HDe(t,r,n){return(r=VDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function VDe(t){var r=YDe(t,"string");return sg(r)=="symbol"?r:r+""}function YDe(t,r){if(sg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(sg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var xa=rIe(function(){return wS(wS(wS({},p5e.apply(void 0,arguments)),x5e.apply(void 0,arguments)),PDe.apply(void 0,arguments))}),PK=function(r){var n=r.children;return gi.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 lg(t){"@babel/helpers - typeof";return lg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lg(t)}function UK(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function HK(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?UK(Object(n),!0).forEach(function(a){FDe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):UK(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function FDe(t,r,n){return(r=QDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function QDe(t){var r=$De(t,"string");return lg(r)=="symbol"?r:r+""}function $De(t,r){if(lg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(lg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var BDe=function(){var r=xa(function(N){return N.currentScreenConfig}),n=xa(function(N){return N.pushStepWaitNextStepAndSet}),a=xa(function(N){return N.processingTransformedTemplate}),u=xa(function(N){return N.isProcessing}),s=xa(function(N){return N.setIsProcessing}),c=xa(function(N){return N.listener}),f=xa(function(N){return N.externalModules}),d=xa(function(N){return N.modulesConfig}),M=function(E,D){c({eventType:fM.MESSAGE,message:D,module:E})},I=function(E){s(E)},h=function(E){s(!1),n(E)},y=Ar.useCallback(function(){if(!r)return null;var N=f.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(N&&r)return gi.jsx(N.component,{perform:h,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?gi.jsx(JD,{direction:ip.Ltr,children:gi.jsx(PK,{children:"Waiting for play... or process completed"})}):gi.jsx(gi.Fragment,{children:gi.jsx(JD,{direction:ip.Ltr,children:gi.jsxs(gi.Fragment,{children:[u&&gi.jsx(PK,{children:a?gi.jsx(q2,{perform:h,moduleProps:HK(HK({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),y()]})})})};function GDe(){return gi.jsx(Ar.StrictMode,{children:gi.jsx(Lge,{children:gi.jsx(BDe,{})})})}function a4(t){"@babel/helpers - typeof";return a4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},a4(t)}function ZDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function VK(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,FK(a.key),a)}}function WDe(t,r,n){return r&&VK(t.prototype,r),n&&VK(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function KDe(t,r,n){return r=fg(r),qDe(t,RS()?Reflect.construct(r,[],fg(t).constructor):r.apply(t,n))}function qDe(t,r){if(r&&(a4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XDe(t)}function XDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function JDe(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&cg(t,r)}function bS(t){var r=typeof Map=="function"?new Map:void 0;return bS=function(a){if(a===null||!tme(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return eme(a,arguments,fg(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),cg(u,a)},bS(t)}function eme(t,r,n){if(RS())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return n&&cg(u,n.prototype),u}function RS(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(RS=function(){return!!t})()}function tme(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function cg(t,r){return cg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},cg(t,r)}function fg(t){return fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fg(t)}function YK(t,r,n){return(r=FK(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function FK(t){var r=rme(t,"string");return a4(r)=="symbol"?r:r+""}function rme(t,r){if(a4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(a4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var nme="*,::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%}",QK=function(t){function r(){var n;return ZDe(this,r),n=KDe(this,r),YK(n,"_root",ZMe.createRoot(n.attachShadow({mode:"open"}))),YK(n,"_mounted",!1),n}return JDe(r,t),WDe(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.5.194-rc".trim())}},{key:"render",value:function(){this._root.render(gi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[gi.jsx("style",{nonce:xa.getState().getNonce(),children:nme}),gi.jsx(GDe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),OS.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(bS(HTMLElement));function Bd(t){"@babel/helpers - typeof";return Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bd(t)}function Js(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Js=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,j,x,z){return Object.defineProperty(O,j,{value:x,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(x,z,H){return x[z]=H}}function M(O,j,x,z){var H=j&&j.prototype instanceof y?j:y,G=Object.create(H.prototype);return d(G,"_invoke",function(W,oe,P){var Z=1;return function(te,w){if(Z===3)throw Error("Generator is already running");if(Z===4){if(te==="throw")throw w;return{value:t,done:!0}}for(P.method=te,P.arg=w;;){var q=P.delegate;if(q){var Ie=L(q,P);if(Ie){if(Ie===h)continue;return Ie}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(Z===1)throw Z=4,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);Z=3;var pe=I(W,oe,P);if(pe.type==="normal"){if(Z=P.done?4:2,pe.arg===h)continue;return{value:pe.arg,done:P.done}}pe.type==="throw"&&(Z=4,P.method="throw",P.arg=pe.arg)}}}(O,x,new Q(z||[])),!0),G}function I(O,j,x){try{return{type:"normal",arg:O.call(j,x)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var h={};function y(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var v=Object.getPrototypeOf,C=v&&v(v(Y([])));C&&C!==n&&a.call(C,s)&&(D=C);var T=E.prototype=y.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(j){d(O,j,function(x){return this._invoke(j,x)})})}function A(O,j){function x(H,G,W,oe){var P=I(O[H],O,G);if(P.type!=="throw"){var Z=P.arg,te=Z.value;return te&&Bd(te)=="object"&&a.call(te,"__await")?j.resolve(te.__await).then(function(w){x("next",w,W,oe)},function(w){x("throw",w,W,oe)}):j.resolve(te).then(function(w){Z.value=w,W(Z)},function(w){return x("throw",w,W,oe)})}oe(P.arg)}var z;d(this,"_invoke",function(H,G){function W(){return new j(function(oe,P){x(H,G,oe,P)})}return z=z?z.then(W,W):W()},!0)}function L(O,j){var x=j.method,z=O.i[x];if(z===t)return j.delegate=null,x==="throw"&&O.i.return&&(j.method="return",j.arg=t,L(O,j),j.method==="throw")||x!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+x+"' method")),h;var H=I(z,O.i,j.arg);if(H.type==="throw")return j.method="throw",j.arg=H.arg,j.delegate=null,h;var G=H.arg;return G?G.done?(j[O.r]=G.value,j.next=O.n,j.method!=="return"&&(j.method="next",j.arg=t),j.delegate=null,h):G:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,h)}function b(O){this.tryEntries.push(O)}function $(O){var j=O[4]||{};j.type="normal",j.arg=t,O[4]=j}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var j=O[s];if(j)return j.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var x=-1,z=function H(){for(;++x<O.length;)if(a.call(O,x))return H.value=O[x],H.done=!1,H;return H.value=t,H.done=!0,H};return z.next=z}}throw new TypeError(Bd(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var j=typeof O=="function"&&O.constructor;return!!j&&(j===N||(j.displayName||j.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,j,x,z,H){H===void 0&&(H=Promise);var G=new A(M(O,j,x,z),H);return r.isGeneratorFunction(j)?G:G.next().then(function(W){return W.done?W.value:G.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var j=Object(O),x=[];for(var z in j)x.unshift(z);return function H(){for(;x.length;)if((z=x.pop())in j)return H.value=z,H.done=!1,H;return H.done=!0,H}},r.values=Y,Q.prototype={constructor:Q,reset:function(j){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!j)for(var x in this)x.charAt(0)==="t"&&a.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=t)},stop:function(){this.done=!0;var j=this.tryEntries[0][4];if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var x=this;function z(te){W.type="throw",W.arg=j,x.next=te}for(var H=x.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H],W=G[4],oe=this.prev,P=G[1],Z=G[2];if(G[0]===-1)return z("end"),!1;if(!P&&!Z)throw Error("try statement without catch or finally");if(G[0]!=null&&G[0]<=oe){if(oe<P)return this.method="next",this.arg=t,z(P),!0;if(oe<Z)return z(Z),!1}}},abrupt:function(j,x){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var G=H;break}}G&&(j==="break"||j==="continue")&&G[0]<=x&&x<=G[2]&&(G=null);var W=G?G[4]:{};return W.type=j,W.arg=x,G?(this.method="next",this.next=G[2],h):this.complete(W)},complete:function(j,x){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&x&&(this.next=x),h},finish:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[2]===j)return this.complete(z[4],z[3]),$(z),h}},catch:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[0]===j){var H=z[4];if(H.type==="throw"){var G=H.arg;$(z)}return G}}throw Error("illegal catch attempt")},delegateYield:function(j,x,z){return this.delegate={i:Y(j),r:x,n:z},this.method==="next"&&(this.arg=t),h}},r}function $K(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function o4(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){$K(s,a,u,c,f,"next",d)}function f(d){$K(s,a,u,c,f,"throw",d)}c(void 0)})}}function ime(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function ame(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,ume(a.key),a)}}function ome(t,r,n){return r&&ame(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ume(t){var r=sme(t,"string");return Bd(r)=="symbol"?r:r+""}function sme(t,r){if(Bd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Bd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var lme=function(){function t(){ime(this,t)}return ome(t,[{key:"initialize",value:function(){var r=o4(Js().mark(function a(u){var s;return Js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=xa.getState().initialize(u),f.abrupt("return",s);case 2:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"configure",value:function(){var r=o4(Js().mark(function a(u){var s,c;return Js().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,xa.getState().configure(u);case 3:return s=d.sent,d.abrupt("return",s);case 5:return d.next=7,xa.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var r=o4(Js().mark(function a(u){var s;return Js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,xa.getState().getWorkflows(u);case 2:return s=f.sent,f.abrupt("return",s);case 4:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var r=o4(Js().mark(function a(u){var s,c;return Js().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=u.workflowId,d.next=3,xa.getState().prepareWorkflowAndPrepareUi(s);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var r=o4(Js().mark(function a(u){var s,c,f,d;return Js().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return s=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=d5e(s),I.next=5,xa.getState().startNewSession(f,c);case 5:if(d=I.sent,!d.error){I.next=8;break}return I.abrupt("return",d);case 8:return I.abrupt("return",new Promise(function(h){var y=function(E){h(E)};xa.getState().playWorkflow(y)}));case 9:case"end":return I.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var r=o4(Js().mark(function a(){var u;return Js().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,xa.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function n(){return r.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.5.194-rc")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){xa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}xa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){xa.getState().setSessionRestoreMode(n)}}])}(),cme=window.customElements.get("idv-flow");cme||window.customElements.define("idv-flow",QK);var fme=Object.defineProperty,dme=Object.defineProperties,Mme=Object.getOwnPropertyDescriptors,BK=Object.getOwnPropertySymbols,gme=Object.prototype.hasOwnProperty,Ime=Object.prototype.propertyIsEnumerable,GK=(t,r,n)=>r in t?fme(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,kS=(t,r)=>{for(var n in r||(r={}))gme.call(r,n)&&GK(t,n,r[n]);if(BK)for(var n of BK(r))Ime.call(r,n)&&GK(t,n,r[n]);return t},ZK=(t,r)=>dme(t,Mme(r)),Oo=(t,r,n)=>new Promise((a,u)=>{var s=d=>{try{f(n.next(d))}catch(M){u(M)}},c=d=>{try{f(n.throw(d))}catch(M){u(M)}},f=d=>d.done?a(d.value):Promise.resolve(d.value).then(s,c);f((n=n.apply(t,r)).next())}),WK=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function KK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qK={exports:{}},dg={},XK={exports:{}},rn={},JK;function pme(){if(JK)return rn;JK=1;/**
73
+ `),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()}}}])}(),OS=new jDe;function Qd(t){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qd(t)}function Ln(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Ln=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,j,x,z){return Object.defineProperty(O,j,{value:x,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(x,z,H){return x[z]=H}}function M(O,j,x,z){var H=j&&j.prototype instanceof y?j:y,G=Object.create(H.prototype);return d(G,"_invoke",function(W,oe,P){var Z=1;return function(te,w){if(Z===3)throw Error("Generator is already running");if(Z===4){if(te==="throw")throw w;return{value:t,done:!0}}for(P.method=te,P.arg=w;;){var q=P.delegate;if(q){var Ie=L(q,P);if(Ie){if(Ie===h)continue;return Ie}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(Z===1)throw Z=4,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);Z=3;var pe=I(W,oe,P);if(pe.type==="normal"){if(Z=P.done?4:2,pe.arg===h)continue;return{value:pe.arg,done:P.done}}pe.type==="throw"&&(Z=4,P.method="throw",P.arg=pe.arg)}}}(O,x,new Q(z||[])),!0),G}function I(O,j,x){try{return{type:"normal",arg:O.call(j,x)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var h={};function y(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var v=Object.getPrototypeOf,C=v&&v(v(Y([])));C&&C!==n&&a.call(C,s)&&(D=C);var T=E.prototype=y.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(j){d(O,j,function(x){return this._invoke(j,x)})})}function A(O,j){function x(H,G,W,oe){var P=I(O[H],O,G);if(P.type!=="throw"){var Z=P.arg,te=Z.value;return te&&Qd(te)=="object"&&a.call(te,"__await")?j.resolve(te.__await).then(function(w){x("next",w,W,oe)},function(w){x("throw",w,W,oe)}):j.resolve(te).then(function(w){Z.value=w,W(Z)},function(w){return x("throw",w,W,oe)})}oe(P.arg)}var z;d(this,"_invoke",function(H,G){function W(){return new j(function(oe,P){x(H,G,oe,P)})}return z=z?z.then(W,W):W()},!0)}function L(O,j){var x=j.method,z=O.i[x];if(z===t)return j.delegate=null,x==="throw"&&O.i.return&&(j.method="return",j.arg=t,L(O,j),j.method==="throw")||x!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+x+"' method")),h;var H=I(z,O.i,j.arg);if(H.type==="throw")return j.method="throw",j.arg=H.arg,j.delegate=null,h;var G=H.arg;return G?G.done?(j[O.r]=G.value,j.next=O.n,j.method!=="return"&&(j.method="next",j.arg=t),j.delegate=null,h):G:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,h)}function b(O){this.tryEntries.push(O)}function $(O){var j=O[4]||{};j.type="normal",j.arg=t,O[4]=j}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var j=O[s];if(j)return j.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var x=-1,z=function H(){for(;++x<O.length;)if(a.call(O,x))return H.value=O[x],H.done=!1,H;return H.value=t,H.done=!0,H};return z.next=z}}throw new TypeError(Qd(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var j=typeof O=="function"&&O.constructor;return!!j&&(j===N||(j.displayName||j.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,j,x,z,H){H===void 0&&(H=Promise);var G=new A(M(O,j,x,z),H);return r.isGeneratorFunction(j)?G:G.next().then(function(W){return W.done?W.value:G.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var j=Object(O),x=[];for(var z in j)x.unshift(z);return function H(){for(;x.length;)if((z=x.pop())in j)return H.value=z,H.done=!1,H;return H.done=!0,H}},r.values=Y,Q.prototype={constructor:Q,reset:function(j){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!j)for(var x in this)x.charAt(0)==="t"&&a.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=t)},stop:function(){this.done=!0;var j=this.tryEntries[0][4];if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var x=this;function z(te){W.type="throw",W.arg=j,x.next=te}for(var H=x.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H],W=G[4],oe=this.prev,P=G[1],Z=G[2];if(G[0]===-1)return z("end"),!1;if(!P&&!Z)throw Error("try statement without catch or finally");if(G[0]!=null&&G[0]<=oe){if(oe<P)return this.method="next",this.arg=t,z(P),!0;if(oe<Z)return z(Z),!1}}},abrupt:function(j,x){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var G=H;break}}G&&(j==="break"||j==="continue")&&G[0]<=x&&x<=G[2]&&(G=null);var W=G?G[4]:{};return W.type=j,W.arg=x,G?(this.method="next",this.next=G[2],h):this.complete(W)},complete:function(j,x){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&x&&(this.next=x),h},finish:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[2]===j)return this.complete(z[4],z[3]),$(z),h}},catch:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[0]===j){var H=z[4];if(H.type==="throw"){var G=H.arg;$(z)}return G}}throw Error("illegal catch attempt")},delegateYield:function(j,x,z){return this.delegate={i:Y(j),r:x,n:z},this.method==="next"&&(this.arg=t),h}},r}function wK(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function hu(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){wK(s,a,u,c,f,"next",d)}function f(d){wK(s,a,u,c,f,"throw",d)}c(void 0)})}}function ODe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function LDe(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,bK(a.key),a)}}function xDe(t,r,n){return r&&LDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i4(t,r,n){return(r=bK(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function bK(t){var r=wDe(t,"string");return Qd(r)=="symbol"?r:r+""}function wDe(t,r){if(Qd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Qd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var jo=OS.create("wasm_idv"),bDe=function(){function t(r){ODe(this,t),i4(this,"_worker",null),i4(this,"_initialized",!1),i4(this,"_connectedToIdv",!1),i4(this,"_serviceRunning",!1),i4(this,"_userId",u5e(ige)),i4(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return xDe(t,[{key:"init",value:function(){var r=hu(Ln().mark(function a(){var u,s,c,f;return Ln().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=1,M.next=4,fetch("https://wasm.regulaforensics.com/idv/release/2.5/86dc740-c49957c66//PlatformAdaptor.worker.js");case 4:return u=M.sent,M.next=7,u.blob();case 7:s=M.sent,c=URL.createObjectURL(s),this._worker=new Worker(c),M.next=15;break;case 12:M.prev=12,M.t0=M.catch(1),jo("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.regulaforensics.com/idv/release/2.5/86dc740-c49957c66/",preMain:!0});case 23:return f=M.sent,f.code===0&&jo("Worker was created successfully"),M.abrupt("return",f);case 26:case"end":return M.stop()}},a,this,[[1,12]])}));function n(){return r.apply(this,arguments)}return n}()},{key:"prepareAndConnect",value:function(){var r=hu(Ln().mark(function a(u){var s,c;return Ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:PD.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 c=d.sent,c.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),jo("IdvWasmService result code: ".concat(c.code)),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"connectByUrl",value:function(){var r=hu(Ln().mark(function a(u){var s;return Ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:PD.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return s=f.sent,s.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),jo("Connection by URL result code: ".concat(s.code)),f.abrupt("return",s);case 6:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startSession",value:function(){var r=hu(Ln().mark(function a(u,s,c){var f,d;return Ln().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:s},c&&(s5e(c)?f.metadata=c:console.log("WARN (Idv):: metadata is not an object or an empty object")),I.next=4,this.sendMessage({target:"custom",method:"start_session",sessionParams:f,preMain:!0});case 4:return d=I.sent,jo("Start session result code: ".concat(d.code)),I.abrupt("return",d);case 7:case"end":return I.stop()}},a,this)}));function n(a,u,s){return r.apply(this,arguments)}return n}()},{key:"continueSession",value:function(){var r=hu(Ln().mark(function a(u,s){var c,f;return Ln().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c={sessionId:u,locale:s},M.next=3,this.sendMessage({continueParams:c,target:"custom",method:"continue_session",preMain:!0});case 3:return f=M.sent,jo("Continue session result code: ".concat(f.code)),M.abrupt("return",f);case 6:case"end":return M.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"listWorkflows",value:function(){var r=hu(Ln().mark(function a(){var u,s,c=arguments;return Ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return s=d.sent,jo("listWorkflows result code: ".concat(s.code)),d.abrupt("return",s);case 6:case"end":return d.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_health",preMain:!0});case 2:return u=c.sent,jo("getHealth result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getServiceToken",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_service_token",preMain:!0});case 2:return u=c.sent,jo("getServiceToken result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"abandonSession",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"abandon_session",preMain:!0});case 2:return u=c.sent,jo("abandonSession result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"getWorkflow",value:function(){var r=hu(Ln().mark(function a(u){var s;return Ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return s=f.sent,jo("getWorkflow result code: ".concat(s.code)),f.abrupt("return",s);case 5:case"end":return f.stop()}},a,this)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"pushData",value:function(){var r=hu(Ln().mark(function a(u,s){var c;return Ln().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:s,stage:0,step:u},preMain:!0});case 2:return c=d.sent,jo("pushData result code: ".concat(c.code)),d.abrupt("return",c);case 5:case"end":return d.stop()}},a,this)}));function n(a,u){return r.apply(this,arguments)}return n}()},{key:"getSessionState",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"get_session_state",preMain:!0});case 2:return u=c.sent,jo("getSessionState result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"waitForSessionUpdate",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({waitingSessionParams:{periodMs:1e3},target:"custom",method:"wait_for_session_update",preMain:!0});case 2:return u=c.sent,jo("waitForSessionUpdate result code: ".concat(u.code)),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"disconnect",value:function(){var r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.sendMessage({target:"custom",method:"disconnect",preMain:!0});case 2:return u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,jo("disconnect result code: ".concat(u.code)),c.abrupt("return",u);case 7:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()},{key:"sendMessage",value:function(){var r=hu(Ln().mark(function a(u){var s=this;return Ln().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(d,M){if(!s._worker)return M();s._worker.onmessage=function(I){var h=I.data.target;if(h==="stdout"){jo(JSON.stringify(I.data.content));return}if(h==="custom"){var y=I.data,N=y.method,E=y.data;N==="onRuntimeInitialized"&&(s._initialized=!0),d(E)}if(h==="stderr"){var D=I.data.content;jo(JSON.stringify(D)),s._setErrorScreen&&s._setErrorScreen(D)}},s._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function n(a){return r.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 r=hu(Ln().mark(function a(){var u;return Ln().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(this._worker){c.next=2;break}return c.abrupt("return",{code:0});case 2:if(this._connectedToIdv){c.next=5;break}return this.terminateWorker(),c.abrupt("return",{code:0});case 5:return c.next=7,this.disconnect();case 7:return u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function n(){return r.apply(this,arguments)}return n}()}])}();function $d(t){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$d(t)}function RK(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function ug(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?RK(Object(n),!0).forEach(function(a){LS(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):RK(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function LS(t,r,n){return(r=RDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function RDe(t){var r=kDe(t,"string");return $d(r)=="symbol"?r:r+""}function kDe(t,r){if($d(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if($d(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function zi(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */zi=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,j,x,z){return Object.defineProperty(O,j,{value:x,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(x,z,H){return x[z]=H}}function M(O,j,x,z){var H=j&&j.prototype instanceof y?j:y,G=Object.create(H.prototype);return d(G,"_invoke",function(W,oe,P){var Z=1;return function(te,w){if(Z===3)throw Error("Generator is already running");if(Z===4){if(te==="throw")throw w;return{value:t,done:!0}}for(P.method=te,P.arg=w;;){var q=P.delegate;if(q){var Ie=L(q,P);if(Ie){if(Ie===h)continue;return Ie}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(Z===1)throw Z=4,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);Z=3;var pe=I(W,oe,P);if(pe.type==="normal"){if(Z=P.done?4:2,pe.arg===h)continue;return{value:pe.arg,done:P.done}}pe.type==="throw"&&(Z=4,P.method="throw",P.arg=pe.arg)}}}(O,x,new Q(z||[])),!0),G}function I(O,j,x){try{return{type:"normal",arg:O.call(j,x)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var h={};function y(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var v=Object.getPrototypeOf,C=v&&v(v(Y([])));C&&C!==n&&a.call(C,s)&&(D=C);var T=E.prototype=y.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(j){d(O,j,function(x){return this._invoke(j,x)})})}function A(O,j){function x(H,G,W,oe){var P=I(O[H],O,G);if(P.type!=="throw"){var Z=P.arg,te=Z.value;return te&&$d(te)=="object"&&a.call(te,"__await")?j.resolve(te.__await).then(function(w){x("next",w,W,oe)},function(w){x("throw",w,W,oe)}):j.resolve(te).then(function(w){Z.value=w,W(Z)},function(w){return x("throw",w,W,oe)})}oe(P.arg)}var z;d(this,"_invoke",function(H,G){function W(){return new j(function(oe,P){x(H,G,oe,P)})}return z=z?z.then(W,W):W()},!0)}function L(O,j){var x=j.method,z=O.i[x];if(z===t)return j.delegate=null,x==="throw"&&O.i.return&&(j.method="return",j.arg=t,L(O,j),j.method==="throw")||x!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+x+"' method")),h;var H=I(z,O.i,j.arg);if(H.type==="throw")return j.method="throw",j.arg=H.arg,j.delegate=null,h;var G=H.arg;return G?G.done?(j[O.r]=G.value,j.next=O.n,j.method!=="return"&&(j.method="next",j.arg=t),j.delegate=null,h):G:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,h)}function b(O){this.tryEntries.push(O)}function $(O){var j=O[4]||{};j.type="normal",j.arg=t,O[4]=j}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var j=O[s];if(j)return j.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var x=-1,z=function H(){for(;++x<O.length;)if(a.call(O,x))return H.value=O[x],H.done=!1,H;return H.value=t,H.done=!0,H};return z.next=z}}throw new TypeError($d(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var j=typeof O=="function"&&O.constructor;return!!j&&(j===N||(j.displayName||j.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,j,x,z,H){H===void 0&&(H=Promise);var G=new A(M(O,j,x,z),H);return r.isGeneratorFunction(j)?G:G.next().then(function(W){return W.done?W.value:G.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var j=Object(O),x=[];for(var z in j)x.unshift(z);return function H(){for(;x.length;)if((z=x.pop())in j)return H.value=z,H.done=!1,H;return H.done=!0,H}},r.values=Y,Q.prototype={constructor:Q,reset:function(j){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!j)for(var x in this)x.charAt(0)==="t"&&a.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=t)},stop:function(){this.done=!0;var j=this.tryEntries[0][4];if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var x=this;function z(te){W.type="throw",W.arg=j,x.next=te}for(var H=x.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H],W=G[4],oe=this.prev,P=G[1],Z=G[2];if(G[0]===-1)return z("end"),!1;if(!P&&!Z)throw Error("try statement without catch or finally");if(G[0]!=null&&G[0]<=oe){if(oe<P)return this.method="next",this.arg=t,z(P),!0;if(oe<Z)return z(Z),!1}}},abrupt:function(j,x){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var G=H;break}}G&&(j==="break"||j==="continue")&&G[0]<=x&&x<=G[2]&&(G=null);var W=G?G[4]:{};return W.type=j,W.arg=x,G?(this.method="next",this.next=G[2],h):this.complete(W)},complete:function(j,x){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&x&&(this.next=x),h},finish:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[2]===j)return this.complete(z[4],z[3]),$(z),h}},catch:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[0]===j){var H=z[4];if(H.type==="throw"){var G=H.arg;$(z)}return G}}throw Error("illegal catch attempt")},delegateYield:function(j,x,z){return this.delegate={i:Y(j),r:x,n:z},this.method==="next"&&(this.arg=t),h}},r}function kK(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function Fl(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){kK(s,a,u,c,f,"next",d)}function f(d){kK(s,a,u,c,f,"throw",d)}c(void 0)})}}var zDe=OS.create("store_idv"),PDe=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Fl(zi().mark(function s(){var c;return zi().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new bDe,d.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return d.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Fl(zi().mark(function s(){var c,f,d,M,I;return zi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=y.sent,M=null,d.code===4&&(M=wd.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=wd.PROVIDER_ERROR),M===null){y.next=12;break}return I=new AM({errorCode:M}),y.abrupt("return",{error:I});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},s)}))()},connectByUrl:function(u){return Fl(zi().mark(function s(){var c,f,d,M,I;return zi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,d=null,f.code===4&&(d=wd.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=wd.PROVIDER_ERROR),d===null){y.next=13;break}return M=new AM({errorCode:d}),I=new cp({errorCode:VD.CONNECTION_ISSUE,underlyingBaseError:M}),y.abrupt("return",{workflows:[],error:I});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},s)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var s=function(f){var d,M=(d=n().currentSessionData)===null||d===void 0?void 0:d.sessionId,I=ug(ug({},f.results),{},{sessionId:M}),h=ug({results:I},f.error&&{error:f.error});n().setCurrentSessionDataLsAndStore(null),u(h)};r(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Fl(zi().mark(function s(){var c,f,d,M;return zi().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=n().externalModulesNames,h.prev=1,h.next=4,UDe(c);case 4:return f=h.sent,r(function(){return{externalModules:f}}),h.abrupt("return",{});case 9:return h.prev=9,h.t0=h.catch(1),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),M=new SM({errorCode:MM.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:M});case 16:case"end":return h.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=Bm(u.find(function(c){return c.templateId===YD}));s.templateLayout=uY(s.templateLayout,n().layout),r({processingTransformedTemplate:s})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Fl(zi().mark(function s(c,f){var d,M,I;return zi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d=null,M=function(){var N=Fl(zi().mark(function E(){var D,v,C,T;return zi().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,n().wasmService.pushData(c,f);case 2:if(D=A.sent,v=null,D.code===4&&(v=cl.HTTP_ISSUE),D.code!==0&&D.code!==4&&(v=cl.PROVIDER_ERROR),v!==null&&(C=new Q3({errorCode:cl.HTTP_ISSUE}),T=new To({errorCode:_o.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:C}),d=T),D.code!==0){A.next=12;break}return d=null,A.abrupt("return",D);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},y.next=5,Zm(M,I);case 5:return y.abrupt("return",d?{error:d}:{});case 6:case"end":return y.stop()}},s)}));function u(s,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var s=n().workflow;if(!s||!u)return null;var c=s.steps.find(function(f){return f.id===u});return c!=null?c:null},_waitingForNextStep:function(){var a=Fl(zi().mark(function s(){var c,f,d,M,I;return zi().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=null,f=function(){var N=Fl(zi().mark(function E(){var D,v,C,T,S,A,L,b,$,Q,Y,O,j,x;return zi().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.next=2,n().wasmService.getSessionState();case 2:if(T=H.sent,S=(D=T.data)===null||D===void 0?void 0:D.currentStep,A=(v=T.data)===null||v===void 0?void 0:v.isProcessingFiles,L=(C=T.data)===null||C===void 0||(C=C.workflow)===null||C===void 0?void 0:C.steps,b=i5e(L,S),$=T.code===4,Q=T.code!==0&&T.code!==4,Y=T.code===0&&(!T.data.workflow||!T.data.currentStep),O=null,L&&!b&&(O=cl.NOT_DATA_TYPE),$&&(O=cl.HTTP_ISSUE),Q&&(O=cl.PROVIDER_ERROR),A&&(O=cl.IS_PROCESSING),Y&&(O=cl.DECODING_FAILED),O!==null&&(j=new Q3({errorCode:O}),x=new To({errorCode:_o.INTERNAL_ISSUE,underlyingBaseError:j}),c=x),zDe(JSON.stringify({nextStep:S,isDataType:b,isProcessingFiles:A})),!(b&&!A&&!$&&!Q&&!Y)){H.next=21;break}return c=null,H.abrupt("return",T.data);case 21:return H.abrupt("return",null);case 22:case"end":return H.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},y.next=5,Zm(f,d);case 5:if(M=y.sent,!c){y.next=8;break}return y.abrupt("return",{error:c});case 8:if(!M){y.next=10;break}return y.abrupt("return",{sessionData:M});case 10:return c=new Q3({errorCode:cl.DECODING_FAILED}),I=new To({errorCode:_o.INTERNAL_ISSUE,underlyingBaseError:c}),y.abrupt("return",{error:I});case 13:case"end":return y.stop()}},s)}));function u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var s=u||n().currentStepId;if(s){var c=n()._findStepById(s);c&&(n().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),n().resetSession(),n().listener({eventType:fM.MESSAGE,message:dM.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Fl(zi().mark(function s(c){var f,d,M,I,h,y,N,E,D;return zi().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(f=n().currentStepId,f){C.next=3;break}return C.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){C.next=7;break}return n().setFinalStepAndStopProcess(),C.abrupt("return");case 7:if(!(c instanceof Kn)){C.next=13;break}return d=c,M=new To({errorCode:_o.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:M}),n().resetSession(),C.abrupt("return");case 13:return C.next=15,n()._pushStep(f,c);case 15:if(I=C.sent,!I.error){C.next=20;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),C.abrupt("return");case 20:return C.next=22,n()._waitingForNextStep();case 22:if(h=C.sent,!h.error){C.next=27;break}return n().workflowSessionCompletion({error:h.error}),n().resetSession(),C.abrupt("return");case 27:if(y=h.sessionData.workflow,N=h.sessionData.currentStep,n().setWorkflow(y),n().setLayout(y.client.layout),n().setProcessingTemplate(y.client.steps),n().setSessionProperties(h.sessionData.properties),E=n()._findStepById(N),D=function(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.templateId},!(E!=null&&E.final&&!D(E.client))){C.next=38;break}return n().setFinalStepAndStopProcess(E.id),C.abrupt("return");case 38:E!=null&&E.final&&D(E.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(N),n().setIsProcessing(!1);case 41:case"end":return C.stop()}},s)}));function u(s){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u){if(!u)return r(function(){return{currentScreenConfig:null}});var s=n().workflow,c=n().sessionProperties,f=null;if(u===YD&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var M,I,h=n()._findStepById(u);if(typeof(h==null||(M=h.client)===null||M===void 0?void 0:M.templateId)=="string"){var y;f=ug(ug({},h==null?void 0:h.client),{},{templateId:h.client.templateId,dataSource:(y=h.dataSource)!==null&&y!==void 0?y:null,properties:c})}if(f){var N;f.sessionId=(N=n().currentSessionData)===null||N===void 0?void 0:N.sessionId,f.serviceToken=n().serviceToken}if(f&&l5e(h==null||(I=h.client)===null||I===void 0?void 0:I.templateLayout)){var E=uY(h.client.templateLayout,n().layout);E&&(f.templateLayout=E)}}var D=n5e(n().externalModules,s.steps,u);if(f===null||!D){var v=new To({errorCode:_o.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:v}),r(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Fl(zi().mark(function s(){var c,f;return zi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,(c=n().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=M.sent,n().resetWasmService(),n().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.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 r(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 r(function(){return{wasmService:null}})}}};function UDe(t){return xS.apply(this,arguments)}function xS(){return xS=Fl(zi().mark(function t(r){var n,a,u,s,c,f;return zi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:q2.getIdentifier(),supportedTemplates:q2.getSupportedTemplates(),component:q2}],a=LS(LS({},HD.LIVENESS,function(){return Promise.resolve().then(()=>zet)}),HD.DOC_READER,function(){return Promise.resolve().then(()=>WOt)}),u=zi().mark(function I(){var h,y,N;return zi().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(h=c[s],y=function(){return a[h]()},!y){D.next=7;break}return D.next=5,y();case 5:N=D.sent,n.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return D.stop()}},I)}),s=0,c=r;case 4:if(!(s<c.length)){M.next=9;break}return M.delegateYield(u(),"t0",6);case 6:s++,M.next=4;break;case 9:return f=n.filter(function(I){return I!==null}),M.abrupt("return",f);case 11:case"end":return M.stop()}},t)})),xS.apply(this,arguments)}function sg(t){"@babel/helpers - typeof";return sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},sg(t)}function zK(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function wS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?zK(Object(n),!0).forEach(function(a){HDe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zK(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function HDe(t,r,n){return(r=VDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function VDe(t){var r=YDe(t,"string");return sg(r)=="symbol"?r:r+""}function YDe(t,r){if(sg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(sg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var xa=rIe(function(){return wS(wS(wS({},p5e.apply(void 0,arguments)),x5e.apply(void 0,arguments)),PDe.apply(void 0,arguments))}),PK=function(r){var n=r.children;return gi.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 lg(t){"@babel/helpers - typeof";return lg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lg(t)}function UK(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,a)}return n}function HK(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?UK(Object(n),!0).forEach(function(a){FDe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):UK(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function FDe(t,r,n){return(r=QDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function QDe(t){var r=$De(t,"string");return lg(r)=="symbol"?r:r+""}function $De(t,r){if(lg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(lg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var BDe=function(){var r=xa(function(N){return N.currentScreenConfig}),n=xa(function(N){return N.pushStepWaitNextStepAndSet}),a=xa(function(N){return N.processingTransformedTemplate}),u=xa(function(N){return N.isProcessing}),s=xa(function(N){return N.setIsProcessing}),c=xa(function(N){return N.listener}),f=xa(function(N){return N.externalModules}),d=xa(function(N){return N.modulesConfig}),M=function(E,D){c({eventType:fM.MESSAGE,message:D,module:E})},I=function(E){s(E)},h=function(E){s(!1),n(E)},y=Ar.useCallback(function(){if(!r)return null;var N=f.find(function(E){return E.supportedTemplates.includes(r.templateId)});if(N&&r)return gi.jsx(N.component,{perform:h,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?gi.jsx(JD,{direction:ip.Ltr,children:gi.jsx(PK,{children:"Waiting for play... or process completed"})}):gi.jsx(gi.Fragment,{children:gi.jsx(JD,{direction:ip.Ltr,children:gi.jsxs(gi.Fragment,{children:[u&&gi.jsx(PK,{children:a?gi.jsx(q2,{perform:h,moduleProps:HK(HK({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),y()]})})})};function GDe(){return gi.jsx(Ar.StrictMode,{children:gi.jsx(Lge,{children:gi.jsx(BDe,{})})})}function a4(t){"@babel/helpers - typeof";return a4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},a4(t)}function ZDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function VK(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,FK(a.key),a)}}function WDe(t,r,n){return r&&VK(t.prototype,r),n&&VK(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function KDe(t,r,n){return r=fg(r),qDe(t,RS()?Reflect.construct(r,[],fg(t).constructor):r.apply(t,n))}function qDe(t,r){if(r&&(a4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XDe(t)}function XDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function JDe(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&cg(t,r)}function bS(t){var r=typeof Map=="function"?new Map:void 0;return bS=function(a){if(a===null||!tme(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return eme(a,arguments,fg(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),cg(u,a)},bS(t)}function eme(t,r,n){if(RS())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return n&&cg(u,n.prototype),u}function RS(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(RS=function(){return!!t})()}function tme(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function cg(t,r){return cg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},cg(t,r)}function fg(t){return fg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fg(t)}function YK(t,r,n){return(r=FK(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function FK(t){var r=rme(t,"string");return a4(r)=="symbol"?r:r+""}function rme(t,r){if(a4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(a4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var nme="*,::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%}",QK=function(t){function r(){var n;return ZDe(this,r),n=KDe(this,r),YK(n,"_root",ZMe.createRoot(n.attachShadow({mode:"open"}))),YK(n,"_mounted",!1),n}return JDe(r,t),WDe(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.5.195".trim())}},{key:"render",value:function(){this._root.render(gi.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[gi.jsx("style",{nonce:xa.getState().getNonce(),children:nme}),gi.jsx(GDe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),OS.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(bS(HTMLElement));function Bd(t){"@babel/helpers - typeof";return Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bd(t)}function Js(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Js=function(){return r};var t,r={},n=Object.prototype,a=n.hasOwnProperty,u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function d(O,j,x,z){return Object.defineProperty(O,j,{value:x,enumerable:!z,configurable:!z,writable:!z})}try{d({},"")}catch(O){d=function(x,z,H){return x[z]=H}}function M(O,j,x,z){var H=j&&j.prototype instanceof y?j:y,G=Object.create(H.prototype);return d(G,"_invoke",function(W,oe,P){var Z=1;return function(te,w){if(Z===3)throw Error("Generator is already running");if(Z===4){if(te==="throw")throw w;return{value:t,done:!0}}for(P.method=te,P.arg=w;;){var q=P.delegate;if(q){var Ie=L(q,P);if(Ie){if(Ie===h)continue;return Ie}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(Z===1)throw Z=4,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);Z=3;var pe=I(W,oe,P);if(pe.type==="normal"){if(Z=P.done?4:2,pe.arg===h)continue;return{value:pe.arg,done:P.done}}pe.type==="throw"&&(Z=4,P.method="throw",P.arg=pe.arg)}}}(O,x,new Q(z||[])),!0),G}function I(O,j,x){try{return{type:"normal",arg:O.call(j,x)}}catch(z){return{type:"throw",arg:z}}}r.wrap=M;var h={};function y(){}function N(){}function E(){}var D={};d(D,s,function(){return this});var v=Object.getPrototypeOf,C=v&&v(v(Y([])));C&&C!==n&&a.call(C,s)&&(D=C);var T=E.prototype=y.prototype=Object.create(D);function S(O){["next","throw","return"].forEach(function(j){d(O,j,function(x){return this._invoke(j,x)})})}function A(O,j){function x(H,G,W,oe){var P=I(O[H],O,G);if(P.type!=="throw"){var Z=P.arg,te=Z.value;return te&&Bd(te)=="object"&&a.call(te,"__await")?j.resolve(te.__await).then(function(w){x("next",w,W,oe)},function(w){x("throw",w,W,oe)}):j.resolve(te).then(function(w){Z.value=w,W(Z)},function(w){return x("throw",w,W,oe)})}oe(P.arg)}var z;d(this,"_invoke",function(H,G){function W(){return new j(function(oe,P){x(H,G,oe,P)})}return z=z?z.then(W,W):W()},!0)}function L(O,j){var x=j.method,z=O.i[x];if(z===t)return j.delegate=null,x==="throw"&&O.i.return&&(j.method="return",j.arg=t,L(O,j),j.method==="throw")||x!=="return"&&(j.method="throw",j.arg=new TypeError("The iterator does not provide a '"+x+"' method")),h;var H=I(z,O.i,j.arg);if(H.type==="throw")return j.method="throw",j.arg=H.arg,j.delegate=null,h;var G=H.arg;return G?G.done?(j[O.r]=G.value,j.next=O.n,j.method!=="return"&&(j.method="next",j.arg=t),j.delegate=null,h):G:(j.method="throw",j.arg=new TypeError("iterator result is not an object"),j.delegate=null,h)}function b(O){this.tryEntries.push(O)}function $(O){var j=O[4]||{};j.type="normal",j.arg=t,O[4]=j}function Q(O){this.tryEntries=[[-1]],O.forEach(b,this),this.reset(!0)}function Y(O){if(O!=null){var j=O[s];if(j)return j.call(O);if(typeof O.next=="function")return O;if(!isNaN(O.length)){var x=-1,z=function H(){for(;++x<O.length;)if(a.call(O,x))return H.value=O[x],H.done=!1,H;return H.value=t,H.done=!0,H};return z.next=z}}throw new TypeError(Bd(O)+" is not iterable")}return N.prototype=E,d(T,"constructor",E),d(E,"constructor",N),N.displayName=d(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(O){var j=typeof O=="function"&&O.constructor;return!!j&&(j===N||(j.displayName||j.name)==="GeneratorFunction")},r.mark=function(O){return Object.setPrototypeOf?Object.setPrototypeOf(O,E):(O.__proto__=E,d(O,f,"GeneratorFunction")),O.prototype=Object.create(T),O},r.awrap=function(O){return{__await:O}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(O,j,x,z,H){H===void 0&&(H=Promise);var G=new A(M(O,j,x,z),H);return r.isGeneratorFunction(j)?G:G.next().then(function(W){return W.done?W.value:G.next()})},S(T),d(T,f,"Generator"),d(T,s,function(){return this}),d(T,"toString",function(){return"[object Generator]"}),r.keys=function(O){var j=Object(O),x=[];for(var z in j)x.unshift(z);return function H(){for(;x.length;)if((z=x.pop())in j)return H.value=z,H.done=!1,H;return H.done=!0,H}},r.values=Y,Q.prototype={constructor:Q,reset:function(j){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!j)for(var x in this)x.charAt(0)==="t"&&a.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=t)},stop:function(){this.done=!0;var j=this.tryEntries[0][4];if(j.type==="throw")throw j.arg;return this.rval},dispatchException:function(j){if(this.done)throw j;var x=this;function z(te){W.type="throw",W.arg=j,x.next=te}for(var H=x.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H],W=G[4],oe=this.prev,P=G[1],Z=G[2];if(G[0]===-1)return z("end"),!1;if(!P&&!Z)throw Error("try statement without catch or finally");if(G[0]!=null&&G[0]<=oe){if(oe<P)return this.method="next",this.arg=t,z(P),!0;if(oe<Z)return z(Z),!1}}},abrupt:function(j,x){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H[0]>-1&&H[0]<=this.prev&&this.prev<H[2]){var G=H;break}}G&&(j==="break"||j==="continue")&&G[0]<=x&&x<=G[2]&&(G=null);var W=G?G[4]:{};return W.type=j,W.arg=x,G?(this.method="next",this.next=G[2],h):this.complete(W)},complete:function(j,x){if(j.type==="throw")throw j.arg;return j.type==="break"||j.type==="continue"?this.next=j.arg:j.type==="return"?(this.rval=this.arg=j.arg,this.method="return",this.next="end"):j.type==="normal"&&x&&(this.next=x),h},finish:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[2]===j)return this.complete(z[4],z[3]),$(z),h}},catch:function(j){for(var x=this.tryEntries.length-1;x>=0;--x){var z=this.tryEntries[x];if(z[0]===j){var H=z[4];if(H.type==="throw"){var G=H.arg;$(z)}return G}}throw Error("illegal catch attempt")},delegateYield:function(j,x,z){return this.delegate={i:Y(j),r:x,n:z},this.method==="next"&&(this.arg=t),h}},r}function $K(t,r,n,a,u,s,c){try{var f=t[s](c),d=f.value}catch(M){return void n(M)}f.done?r(d):Promise.resolve(d).then(a,u)}function o4(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){$K(s,a,u,c,f,"next",d)}function f(d){$K(s,a,u,c,f,"throw",d)}c(void 0)})}}function ime(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function ame(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,ume(a.key),a)}}function ome(t,r,n){return r&&ame(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ume(t){var r=sme(t,"string");return Bd(r)=="symbol"?r:r+""}function sme(t,r){if(Bd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Bd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var lme=function(){function t(){ime(this,t)}return ome(t,[{key:"initialize",value:function(){var r=o4(Js().mark(function a(u){var s;return Js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=xa.getState().initialize(u),f.abrupt("return",s);case 2:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"configure",value:function(){var r=o4(Js().mark(function a(u){var s,c;return Js().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,xa.getState().configure(u);case 3:return s=d.sent,d.abrupt("return",s);case 5:return d.next=7,xa.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"getWorkFlows",value:function(){var r=o4(Js().mark(function a(u){var s;return Js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,xa.getState().getWorkflows(u);case 2:return s=f.sent,f.abrupt("return",s);case 4:case"end":return f.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"prepareWorkflow",value:function(){var r=o4(Js().mark(function a(u){var s,c;return Js().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=u.workflowId,d.next=3,xa.getState().prepareWorkflowAndPrepareUi(s);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"startWorkflow",value:function(){var r=o4(Js().mark(function a(u){var s,c,f,d;return Js().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return s=u==null?void 0:u.locale,c=u==null?void 0:u.metadata,f=d5e(s),I.next=5,xa.getState().startNewSession(f,c);case 5:if(d=I.sent,!d.error){I.next=8;break}return I.abrupt("return",d);case 8:return I.abrupt("return",new Promise(function(h){var y=function(E){h(E)};xa.getState().playWorkflow(y)}));case 9:case"end":return I.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var r=o4(Js().mark(function a(){var u;return Js().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,xa.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function n(){return r.apply(this,arguments)}return n}()},{key:"version",get:function(){var n;return(n="2.5.195")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){xa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}xa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){xa.getState().setSessionRestoreMode(n)}}])}(),cme=window.customElements.get("idv-flow");cme||window.customElements.define("idv-flow",QK);var fme=Object.defineProperty,dme=Object.defineProperties,Mme=Object.getOwnPropertyDescriptors,BK=Object.getOwnPropertySymbols,gme=Object.prototype.hasOwnProperty,Ime=Object.prototype.propertyIsEnumerable,GK=(t,r,n)=>r in t?fme(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,kS=(t,r)=>{for(var n in r||(r={}))gme.call(r,n)&&GK(t,n,r[n]);if(BK)for(var n of BK(r))Ime.call(r,n)&&GK(t,n,r[n]);return t},ZK=(t,r)=>dme(t,Mme(r)),Oo=(t,r,n)=>new Promise((a,u)=>{var s=d=>{try{f(n.next(d))}catch(M){u(M)}},c=d=>{try{f(n.throw(d))}catch(M){u(M)}},f=d=>d.done?a(d.value):Promise.resolve(d.value).then(s,c);f((n=n.apply(t,r)).next())}),WK=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function KK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qK={exports:{}},dg={},XK={exports:{}},rn={},JK;function pme(){if(JK)return rn;JK=1;/**
74
74
  * @license React
75
75
  * react.production.min.js
76
76
  *
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-_djGM_-z.js";
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-DLrTj7_E.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.5.194-rc",
3
+ "version": "2.5.195",
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",