@regulaforensics/idv-capture-web 2.4.157-rc → 2.4.158-rc

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.
@@ -24734,7 +24734,7 @@ var Ft = O3.create("wasm_idv"), gW = /* @__PURE__ */ function() {
24734
24734
  return Pr().wrap(function(v) {
24735
24735
  for (; ; ) switch (v.prev = v.next) {
24736
24736
  case 0:
24737
- return v.prev = 1, v.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/rc/2.4/cb23a44-9c4a9acbd//PlatformAdaptor.worker.js");
24737
+ return v.prev = 1, v.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/rc/2.4/b61e1c7-9c4a9acbd//PlatformAdaptor.worker.js");
24738
24738
  case 4:
24739
24739
  return a = v.sent, v.next = 7, a.blob();
24740
24740
  case 7:
@@ -24761,7 +24761,7 @@ var Ft = O3.create("wasm_idv"), gW = /* @__PURE__ */ function() {
24761
24761
  }), v.next = 23, this.sendMessage({
24762
24762
  target: "worker-init",
24763
24763
  URL: document.URL,
24764
- currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/rc/2.4/cb23a44-9c4a9acbd/",
24764
+ currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/rc/2.4/b61e1c7-9c4a9acbd/",
24765
24765
  preMain: !0
24766
24766
  });
24767
24767
  case 23:
@@ -26066,9 +26066,9 @@ function t5() {
26066
26066
  supportedTemplates: Si.getSupportedTemplates(),
26067
26067
  component: Si
26068
26068
  }], i = r5(r5({}, Qm.LIVENESS, function() {
26069
- return import("./index-DSvYGbK0.js");
26069
+ return import("./index-CGBcUuq5.js");
26070
26070
  }), Qm.DOC_READER, function() {
26071
- return import("./index-DOw5v_RH.js");
26071
+ return import("./index-C_J7qDDH.js");
26072
26072
  }), a = /* @__PURE__ */ Jr().mark(function p() {
26073
26073
  var h, y, m;
26074
26074
  return Jr().wrap(function(C) {
@@ -26386,7 +26386,7 @@ var BW = "*,::after,::before{box-sizing:border-box}h1,h2,h3,h4,p,ul{padding:0;ma
26386
26386
  }, {
26387
26387
  key: "version",
26388
26388
  get: function() {
26389
- return "".concat("2.4.157-rc".trim());
26389
+ return "".concat("2.4.158-rc".trim());
26390
26390
  }
26391
26391
  }, {
26392
26392
  key: "render",
@@ -26856,7 +26856,7 @@ var KW = /* @__PURE__ */ function() {
26856
26856
  key: "version",
26857
26857
  get: function() {
26858
26858
  var t;
26859
- return (t = "2.4.157-rc") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
26859
+ return (t = "2.4.158-rc") !== null && t !== void 0 ? t : "Version unavailable. Something went wrong";
26860
26860
  }
26861
26861
  }, {
26862
26862
  key: "nonce",
@@ -1,4 +1,4 @@
1
- import { B as Vu, r as la, j as lD } from "./index-CS-aPos4.js";
1
+ import { B as Vu, r as la, j as lD } from "./index-BhTNX7R6.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]);
@@ -16395,7 +16395,6 @@ var $l = !1, hi = function(r) {
16395
16395
  var E = A.current;
16396
16396
  E && (console.info("%cFace Liveness web component version: %s", "color: #6e56b0;", E.version), E.settings = {
16397
16397
  url: l || "https://dev-idv.regulaforensics.com/faceapi",
16398
- locale: "en",
16399
16398
  startScreen: !0,
16400
16399
  copyright: !0,
16401
16400
  headers: {
@@ -22,7 +22,7 @@ var N1 = (e) => {
22
22
  throw l;
23
23
  }, "return" in r && i("return"), o;
24
24
  };
25
- import { B as cc, r as Bs, j as gE } from "./index-CS-aPos4.js";
25
+ import { B as cc, r as Bs, j as gE } from "./index-BhTNX7R6.js";
26
26
  var QT = Object.defineProperty, JT = Object.defineProperties, XT = Object.getOwnPropertyDescriptors, RE = Object.getOwnPropertySymbols, $T = Object.prototype.hasOwnProperty, eb = Object.prototype.propertyIsEnumerable, Fo = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), tb = (e) => {
27
27
  throw TypeError(e);
28
28
  }, IE = (e, r, t) => r in e ? QT(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, xe = (e, r) => {
@@ -24184,7 +24184,6 @@ var i0 = !1, ls = function(r) {
24184
24184
  }, []), Bs.useEffect(function() {
24185
24185
  var C = m.current;
24186
24186
  C && (C.settings = {
24187
- locale: "en",
24188
24187
  startScreen: !1,
24189
24188
  skipButton: c == null ? void 0 : c.showSkipNextPageButton,
24190
24189
  videoRecord: c == null ? void 0 : c.recordScanningProcess,
package/dist/main.iife.js CHANGED
@@ -73,7 +73,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
73
73
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dEe(t,r){if(t){if(typeof t=="string")return sq(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)?sq(t,r):void 0}}function sq(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 MEe(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 gEe(t){if(Array.isArray(t))return t}var IEe=function(r){var n=r.option,a=r.layout,u=r.dataSourceQuestion,s=r.register,c=r.watch,f=Tr.useState(!1),d=cEe(f,2),M=d[0],I=d[1],y=rq(),p=String(u.id),N=c(p),v=N===String(n.id),m=a.option,D=a.optionSelected,O={borderRadius:m.cornerRadius,background:Gn(m.backgroundColor),borderColor:Gn(m.borderColor),borderWidth:m.borderWidth},j={borderRadius:D.cornerRadius,background:Gn(D.backgroundColor),borderColor:Gn(D.borderColor),borderWidth:D.borderWidth},S=M&&y?{outline:"2px solid ".concat(T2)}:{};return ie.jsx("div",{style:{display:"flex",flexGrow:1},children:ie.jsxs("label",{style:uq(uq({width:"100%",padding:"8px 16px",cursor:"pointer",borderStyle:"solid",position:"relative"},v?j:O),S),children:[ie.jsx("input",si(St({style:{width:1,height:1,opacity:0,position:"absolute",left:"50%"}},s(p,{required:!!u.required,validate:L4(u.validators,!!u.required)})),{value:n.id,type:"radio",onFocus:function(){return I(!0)},onBlur:function(){return I(!1)}})),ie.jsx(Eo,si(St({},v?D.title:m.title),{text:n.text}))]})},n.id)},pEe=function(r){var n=r.layout,a=r.watch,u=r.register,s=r.dataSourceQuestion;return ie.jsx("div",{style:{boxSizing:"border-box"},children:ie.jsxs("fieldset",{style:{margin:0,padding:0,border:"none"},children:[n.title&&ie.jsx("legend",{style:{margin:0,padding:0,marginBottom:"16px"},children:ie.jsx(Eo,si(St({},n.title),{text:s.text}))}),ie.jsx("div",{style:{display:"flex",justifyContent:"center",gap:5},children:s.options.map(function(c){return ie.jsx(IEe,{register:u,watch:a,layout:n,option:c,dataSourceQuestion:s},c.id)})})]})})};function Q2(t){"@babel/helpers - typeof";return Q2=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},Q2(t)}function lq(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 AS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?lq(Object(n),!0).forEach(function(a){yEe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lq(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function yEe(t,r,n){return(r=hEe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function hEe(t){var r=NEe(t,"string");return Q2(r)=="symbol"?r:r+""}function NEe(t,r){if(Q2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Q2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var vEe=function(r){var n=r.children,a=r.backgroundColor,u=r.cornerRadius,s=u===void 0?0:u,c=r.isError,f=r.isRequired,d=r.validationBorderColor,M=r.validationBorderWidth,I=AS({position:"relative",flexShrink:0,width:"100%",fontWeight:300,lineHeight:"140%",backgroundColor:Gn(a)||"transparent",borderRadius:s,padding:"16px",boxSizing:"border-box",height:"auto"},c&&AS(AS({},Gn(d)&&{borderColor:d,borderStyle:"solid"}),M&&{borderWidth:M}));return ie.jsxs("div",{style:I,children:[f&&ie.jsx("span",{style:{color:Gn(d),position:"absolute",left:"6px",top:"18px"},children:"*"}),n]})};function mEe(t,r){return jEe(t)||TEe(t,r)||DEe(t,r)||EEe()}function EEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
74
74
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DEe(t,r){if(t){if(typeof t=="string")return cq(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)?cq(t,r):void 0}}function cq(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 TEe(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 jEe(t){if(Array.isArray(t))return t}var SEe=function(r){var n=r.validationErrorsTypes,a=r.title;return n?ie.jsx("div",{style:{width:"100%",fontSize:12},children:Object.entries(n).map(function(u){var s=mEe(u,2),c=s[0],f=s[1];return ie.jsx(Eo,si(St({},a),{text:f}),c)})}):null},AEe=function(r){var n,a,u,s,c,f,d,M,I,y,p,N,v,m,D,O,j=r.layout,S=r.dataSourceQuestion,A=r.register,w=String(S.id),R=function(H){return H?H===yh.EMAIL?"email":H===yh.FREE_TEXT?"text":H===yh.NUMBER?"number":H===yh.SECURE?"password":"text":"text"};return ie.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ie.jsx(Eo,si(St({},j.title),{text:S.text,htmlFor:w})),ie.jsx("input",si(St({},A(w,{required:!!S.required,validate:L4(S.validators,!!S.required)})),{id:w,type:R((n=j.textField)===null||n===void 0?void 0:n.inputType),style:{fontFamily:(a=j==null||(u=j.textField)===null||u===void 0?void 0:u.fontName)!==null&&a!==void 0?a:"sans-serif",fontSize:(s=j==null||(c=j.textField)===null||c===void 0?void 0:c.fontSize)!==null&&s!==void 0?s:15,color:(f=Gn(j==null||(d=j.textField)===null||d===void 0?void 0:d.fontColor))!==null&&f!==void 0?f:"#000000",height:"42px",borderWidth:(M=j==null||(I=j.textField)===null||I===void 0?void 0:I.borderWidth)!==null&&M!==void 0?M:1,borderColor:(y=Gn(j==null||(p=j.textField)===null||p===void 0?void 0:p.borderColor))!==null&&y!==void 0?y:"#d9d9d9",borderStyle:"solid",borderRadius:(N=j==null||(v=j.textField)===null||v===void 0?void 0:v.cornerRadius)!==null&&N!==void 0?N:8,padding:"11px",boxSizing:"border-box",backgroundColor:(m=Gn(j==null||(D=j.textField)===null||D===void 0?void 0:D.backgroundColor))!==null&&m!==void 0?m:"#FFFFFF",outlineColor:T2},placeholder:(O=S.placeholder)!==null&&O!==void 0?O:"","data-id":w}))]})},CEe=function(r){var n,a,u,s,c,f,d,M,I,y,p,N,v,m=r.layout,D=r.dataSourceQuestion,O=r.register,j=String(D.id);return ie.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[ie.jsx(Eo,si(St({},m.title),{text:D.text,htmlFor:j})),ie.jsx("textarea",si(St({},O(j,{required:!!D.required,validate:L4(D.validators,!!D.required)})),{id:j,placeholder:(n=D.placeholder)!==null&&n!==void 0?n:"",onChange:function(A){A.target.style.height="auto",A.target.style.height="".concat(A.target.scrollHeight-15,"px")},"data-id":j,style:{fontFamily:"sans-serif",fontSize:(a=m==null||(u=m.textField)===null||u===void 0?void 0:u.fontSize)!==null&&a!==void 0?a:15,color:(s=Gn(m==null||(c=m.textField)===null||c===void 0?void 0:c.fontColor))!==null&&s!==void 0?s:"#000000",resize:"none",overflow:"hidden",height:"42px",minHeight:"42px",borderWidth:(f=m==null||(d=m.textField)===null||d===void 0?void 0:d.borderWidth)!==null&&f!==void 0?f:1,borderColor:(M=Gn(m==null||(I=m.textField)===null||I===void 0?void 0:I.borderColor))!==null&&M!==void 0?M:"#d9d9d9",borderStyle:"solid",borderRadius:(y=m==null||(p=m.textField)===null||p===void 0?void 0:p.cornerRadius)!==null&&y!==void 0?y:8,padding:"11px",boxSizing:"border-box",backgroundColor:(N=Gn(m==null||(v=m.textField)===null||v===void 0?void 0:v.backgroundColor))!==null&&N!==void 0?N:"#FFFFFF",outlineColor:T2}}))]})},fq={},CS,dq;function Mq(){if(dq)return CS;dq=1;var t=Bn(),r=ul(),n=mo(),a=ma(),u=sh(),s=p2(),c=Function,f=t([].concat),d=t([].join),M={},I=function(p,N,v){if(!a(M,N)){for(var m=[],D=0;D<N;D++)m[D]="a["+D+"]";M[N]=c("C,a","return new C("+d(m,",")+")")}return M[N](p,v)};return CS=s?c.bind:function(y){var p=r(this),N=p.prototype,v=u(arguments,1),m=function(){var O=f(v,u(arguments));return this instanceof m?I(p,O.length,O):p.apply(y,O)};return n(N)&&(m.prototype=N),m},CS}var gq;function OEe(){if(gq)return fq;gq=1;var t=xr(),r=Mq();return t({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r}),fq}OEe();var Iq={},pq;function _Ee(){if(pq)return Iq;pq=1;var t=xr(),r=Kn(),n=f1();return t({target:"Object",stat:!0,sham:!r},{create:n}),Iq}_Ee();var yq={},hq;function xEe(){if(hq)return yq;hq=1;var t=xr(),r=fn(),n=sl(),a=m2(),u=wV(),s=r(function(){a(1)});return t({target:"Object",stat:!0,forced:s,sham:!u},{getPrototypeOf:function(f){return a(n(f))}}),yq}xEe();var Nq={},vq;function LEe(){if(vq)return Nq;vq=1;var t=Kn(),r=Y1(),n=mo(),a=$V(),u=sl(),s=jg(),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(y){var p=s(this);a(y)&&n(p)&&f(p,y)}})}catch(I){}return Nq}LEe();var mq={},Eq;function wEe(){if(Eq)return mq;Eq=1;var t=xr(),r=oh();return t({target:"Object",stat:!0},{setPrototypeOf:r}),mq}wEe();var Dq={},OS,Tq;function bEe(){if(Tq)return OS;Tq=1;var t=ch(),r=h2(),n=TypeError;return OS=function(u){if(t(u))return u;throw new n(r(u)+" is not a constructor")},OS}var jq;function kEe(){if(jq)return Dq;jq=1;var t=xr(),r=Rf(),n=ah(),a=Mq(),u=bEe(),s=ga(),c=mo(),f=f1(),d=fn(),M=r("Reflect","construct"),I=Object.prototype,y=[].push,p=d(function(){function m(){}return!(M(function(){},[],m)instanceof m)}),N=!d(function(){M(function(){})}),v=p||N;return t({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(D,O){u(D),s(O);var j=arguments.length<3?D:u(arguments[2]);if(N&&!p)return M(D,O,j);if(D===j){switch(O.length){case 0:return new D;case 1:return new D(O[0]);case 2:return new D(O[0],O[1]);case 3:return new D(O[0],O[1],O[2]);case 4:return new D(O[0],O[1],O[2],O[3])}var S=[null];return n(y,S,O),new(n(a,D,S))}var A=j.prototype,w=f(c(A)?A:I),R=n(D,w,O);return c(R)?R:w}}),Dq}kEe();function F2(t){"@babel/helpers - typeof";return F2=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},F2(t)}function REe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Sq(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,Aq(a.key),a)}}function zEe(t,r,n){return r&&Sq(t.prototype,r),n&&Sq(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function p1(t,r,n){return(r=Aq(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function Aq(t){var r=PEe(t,"string");return F2(r)=="symbol"?r:r+""}function PEe(t,r){if(F2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(F2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Cq=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;REe(this,t),p1(this,"errorCode",void 0),p1(this,"errorCodeKey",void 0),p1(this,"message",void 0),p1(this,"underlyingError",void 0),p1(this,"underlyingBaseError",void 0),p1(this,"domain",void 0),p1(this,"module",void 0),p1(this,"errorEnumName",void 0),p1(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 zEe(t,[{key:"lastUnderlyingError",get:function(){for(var n,a=this.underlyingBaseError;((u=a)===null||u===void 0?void 0:u.underlyingBaseError)instanceof t;){var u;a=a.underlyingBaseError}return(n=a)===null||n===void 0?void 0:n.underlyingError}},{key:"toObject",value:function(){var n={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&&(n.underlyingBaseError=this.underlyingBaseError.toObject()),n}},{key:"shortChain",get:function(){var n="".concat(this.shortDomainCode,":").concat(this.errorCode).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(n+="-".concat(this.underlyingBaseError.shortChain)),n}},{key:"fullChain",get:function(){var n="".concat(this.module,".").concat(this.domain,":").concat(this.errorCodeKey).concat(this.underlyingError?"-"+this.underlyingError:"");return this.underlyingBaseError instanceof t&&(n+="-".concat(this.underlyingBaseError.fullChain)),n}}],[{key:"getErrorKey",value:function(n,a){var u=Object.keys(a).find(function(s){return a[s]===n});if(!u)throw new Error("Invalid errorCode: ".concat(n," in enum"));return u}}])}();function w4(t){"@babel/helpers - typeof";return w4=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},w4(t)}function UEe(t,r,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function YEe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function QEe(t,r,n){return r=Ah(r),FEe(t,Oq()?Reflect.construct(r,n||[],Ah(t).constructor):r.apply(t,n))}function FEe(t,r){if(r&&(w4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Ee(t)}function $Ee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Oq(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(Oq=function(){return!!t})()}function Ah(t){return Ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ah(t)}function HEe(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&&_S(t,r)}function _S(t,r){return _S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_S(t,r)}function xS(t,r,n){return(r=VEe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function VEe(t){var r=BEe(t,"string");return w4(r)=="symbol"?r:r+""}function BEe(t,r){if(w4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(w4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Ch=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;YEe(this,r);var f=Cq.getErrorKey(a,wW);return QEe(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 HEe(r,t),UEe(r)}(Cq);xS(Ch,"MODULE",lS),xS(Ch,"ERROR_ENUM_NAME","GuiModuleError"),xS(Ch,"SHORT_CODE","GM");var GEe=function(r){var n=r.header,a=r.title,u=r.buttons,s=r.footer,c=r.questions,f=r.dataSource,d=r.properties,M=r.backgroundColor,I=ZT(),y=I.perform,p=d?gve(f.questions,d):{},N=Tr.useRef(null),v=N5e({criteriaMode:"all",defaultValues:p}),m=v.register,D=v.handleSubmit,O=v.formState.errors,j=v.reset,S=v.watch,A=v.control,w=function(F){y(dve(F)),j()};return ie.jsx(O2,{header:n,footer:s,backgroundColor:M,children:ie.jsxs("form",{onSubmit:D(w),style:{height:"100%",fontFamily:"sans-serif",display:"flex",flexDirection:"column",gap:"15px"},noValidate:!0,children:[ie.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:Gn(c.backgroundColor)||"transparent"},ref:N,children:[a&&ie.jsx("div",{style:{lineHeight:"39.2px",width:"100%"},children:ie.jsx(Eo,St({},a))}),ie.jsx("div",{"data-ui":"gui-questions",part:"gui-questions",style:{width:"100%",display:"flex",gap:"10px",flexDirection:"column"},children:f.questions.map(function(R){var F,H=f.static,$=function(J,te){return te.find(function(k){var G;if((G=k.questionIds)!==null&&G!==void 0&&G.length)return k.questionIds.find(function(K){return J===K})})},x=function(J,te){return te.find(function(k){return!k.questionIds&&k.answerType===J})},C=H?$(String(R.id),c.itemTypes)||x(R.answerType,c.itemTypes):c.itemTypes.find(function(B){return B.answerType===R.answerType});if(!C){var L=new Ch({errorCode:wW.DECODING_FAILED,message:"The question template has not been found"});y(L);return}var P=C==null?void 0:C.displayType,Y=R.id in O&&((F=O[R.id])===null||F===void 0?void 0:F.types);return ie.jsxs(Tr.Fragment,{children:[ie.jsxs(vEe,{backgroundColor:C==null?void 0:C.backgroundColor,cornerRadius:C==null?void 0:C.cornerRadius,isError:!!Y,isRequired:R.required,validationBorderColor:C==null?void 0:C.validationBorderColor,validationBorderWidth:C==null?void 0:C.validationBorderWidth,children:[P===O4.TEXT_EXPANDABLE&&ie.jsx(CEe,{layout:C,dataSourceQuestion:R,register:m}),P===O4.TEXT_SINGLE_LINE&&ie.jsx(AEe,{layout:C,dataSourceQuestion:R,register:m}),P===O4.SELECTOR_OPTIONS&&ie.jsx(oEe,{layout:C,dataSourceQuestion:R,watch:S,register:m}),P===O4.SELECTOR_BUTTONS&&ie.jsx(pEe,{layout:C,dataSourceQuestion:R,watch:S,register:m}),P===O4.SELECTOR_DROPDOWN&&ie.jsx(Y5e,{control:A,layout:C,dataSourceQuestion:R,parentElementRef:N}),P===O4.MULTI_SELECTOR_DROPDOWN&&ie.jsx(V5e,{control:A,layout:C,dataSourceQuestion:R,parentElementRef:N})]}),Y&&ie.jsx(SEe,{validationErrorsTypes:Y,title:C.validationMessage})]},R.id)})})]}),!!(u!=null&&u.length)&&ie.jsx("div",{style:{display:"flex",width:"100%",flexGrow:0,flexShrink:0,justifyContent:"center",alignItems:"flex-end",padding:"2px"},children:u.map(function(R,F){return ie.jsx(BW,St({dataTestId:"question-button"},R),F)})})]})})},_q=function(r){var n=r.templateId,a=r.templateLayout,u=r.dataSource,s=r.properties;if(!n||!a)return ie.jsx(eK,{});var c=s!=null&&s.length?JSON.stringify(s):"default-key";return n===Q1.STATUS?ie.jsx(Ome,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,image:a==null?void 0:a.image,title:a==null?void 0:a.title,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===Q1.INFO?ie.jsx(kme,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,image:a==null?void 0:a.image,title:a==null?void 0:a.title,description:a==null?void 0:a.description,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor}):n===Q1.PROGRESS?ie.jsx(eK,{header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,progressView:a==null?void 0:a.progressView,backgroundColor:a==null?void 0:a.backgroundColor}):n===Q1.INFO_DETAILS?ie.jsx(qme,{header:a==null?void 0:a.header,title:a==null?void 0:a.title,details:a==null?void 0:a.details,buttons:a==null?void 0:a.buttons,footer:a==null?void 0:a.footer,backgroundColor:a==null?void 0:a.backgroundColor}):u&&u!==null&&u!==void 0&&u.questions.length&&n===Q1.QUESTIONS?ie.jsx(GEe,{dataSource:u,properties:s,questions:a.questions,header:a==null?void 0:a.header,footer:a==null?void 0:a.footer,title:a==null?void 0:a.title,buttons:a==null?void 0:a.buttons,backgroundColor:a==null?void 0:a.backgroundColor},c):n===Q1.QUESTIONS&&!u?ie.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"}):ie.jsx("div",{style:{width:"100%",height:"100%",fontFamily:"sans-serif",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:"IDV Gui :: Unsupported step template"})},LS=!1,Yf=function(r){var n=r.moduleProps,a=r.perform,u=n,s=u.templateId,c=u.templateLayout,f=u.dataSource,d=u.properties,M=function(y){a&&a(y)};return s===Q1.QUESTIONS?ie.jsx(cB,{perform:M,children:ie.jsx(_q,{properties:d,dataSource:f,templateId:s,templateLayout:c})}):ie.jsx(cB,{perform:M,children:ie.jsx(_q,{templateId:s,templateLayout:c})})};Yf.getIdentifier=function(){return lS},Yf.getSupportedTemplates=function(){return Object.values(Q1)},Yf.deinitialize=function(){LS=!1},Yf.initialize=function(){LS=!0},Yf.isReady=function(){return LS},Yf.displayName=lS;var xq={},Lq;function ZEe(){if(Lq)return xq;Lq=1;var t=xt(),r=hr(),n=Date,a=r(n.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new n)}}),xq}ZEe();var wq={},bq={},wS,kq;function Rq(){if(kq)return wS;kq=1;var t=pr(),r=$n(),n=qr(),a=lu(),u=r("iterator");return wS=!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"}),wS}var bS,zq;function WEe(){if(zq)return bS;zq=1;var t=qr(),r=hr(),n=Mn(),a=pr(),u=Q0(),s=Ry(),c=Ly(),f=gu(),d=b0(),M=Object.assign,I=Object.defineProperty,y=r([].concat);return bS=!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 p={},N={},v=Symbol("assign detection"),m="abcdefghijklmnopqrst";return p[v]=7,m.split("").forEach(function(D){N[D]=D}),M({},p)[v]!==7||u(M({},N)).join("")!==m})?function(N,v){for(var m=f(N),D=arguments.length,O=1,j=s.f,S=c.f;D>O;)for(var A=d(arguments[O++]),w=j?y(u(A),j(A)):u(A),R=w.length,F=0,H;R>F;)H=w[F++],(!t||n(S,A,H))&&(m[H]=A[H]);return m}:M,bS}var kS,Pq;function KEe(){if(Pq)return kS;Pq=1;var t=hr(),r=2147483647,n=36,a=1,u=26,s=38,c=700,f=72,d=128,M="-",I=/[^\0-\u007E]/,y=/[.\u3002\uFF0E\uFF61]/g,p="Overflow: input needs wider integers to process",N=n-a,v=RangeError,m=t(y.exec),D=Math.floor,O=String.fromCharCode,j=t("".charCodeAt),S=t([].join),A=t([].push),w=t("".replace),R=t("".split),F=t("".toLowerCase),H=function(L){for(var P=[],Y=0,B=L.length;Y<B;){var J=j(L,Y++);if(J>=55296&&J<=56319&&Y<B){var te=j(L,Y++);(te&64512)===56320?A(P,((J&1023)<<10)+(te&1023)+65536):(A(P,J),Y--)}else A(P,J)}return P},$=function(L){return L+22+75*(L<26)},x=function(L,P,Y){var B=0;for(L=Y?D(L/c):L>>1,L+=D(L/P);L>N*u>>1;)L=D(L/N),B+=n;return D(B+(N+1)*L/(L+s))},C=function(L){var P=[];L=H(L);var Y=L.length,B=d,J=0,te=f,k,G;for(k=0;k<L.length;k++)G=L[k],G<128&&A(P,O(G));var K=P.length,b=K;for(K&&A(P,M);b<Y;){var W=r;for(k=0;k<L.length;k++)G=L[k],G>=B&&G<W&&(W=G);var he=b+1;if(W-B>D((r-J)/he))throw new v(p);for(J+=(W-B)*he,B=W,k=0;k<L.length;k++){if(G=L[k],G<B&&++J>r)throw new v(p);if(G===B){for(var pe=J,le=n;;){var _e=le<=te?a:le>=te+u?u:le-te;if(pe<_e)break;var Ue=pe-_e,De=n-_e;A(P,O($(_e+Ue%De))),pe=D(Ue/De),le+=n}A(P,O($(pe))),te=x(J,he,b===K),J=0,b++}}J++,B++}return S(P,"")};return kS=function(L){var P=[],Y=R(w(F(L),y,"."),"."),B,J;for(B=0;B<Y.length;B++)J=Y[B],A(P,m(I,J)?"xn--"+C(J):J);return S(P,".")},kS}var Uq={},Yq;function qEe(){if(Yq)return Uq;Yq=1;var t=xt(),r=hr(),n=Ev(),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=[],y=arguments.length,p=0,N;y>p;){if(N=+arguments[p++],n(N,1114111)!==N)throw new a(N+" is not a valid code point");I[p]=N<65536?u(N):u(((N-=65536)>>10)+55296,N%1024+56320)}return c(I,"")}}),Uq}var RS,Qq;function JEe(){if(Qq)return RS;Qq=1;var t=w1(),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),y=n(t(a,M),u),p=I.length,N=y.length,v=0,m=0;v<p||m<N;)a[v+m]=v<p&&m<N?u(I[v],y[m])<=0?I[v++]:y[m++]:v<p?I[v++]:y[m++];return a};return RS=n,RS}var zS,Fq;function $q(){if(Fq)return zS;Fq=1,Rm(),qEe();var t=xt(),r=Qr(),n=gQ(),a=Mu(),u=Mn(),s=hr(),c=qr(),f=Rq(),d=Aa(),M=Su(),I=n5(),y=il(),p=jz(),N=Hs(),v=p4(),m=Hn(),D=Mi(),O=b1(),j=Y0(),S=An(),A=ci(),w=wi(),R=Ll(),F=Mg(),H=Wm(),$=Yy(),x=B0(),C=y4(),L=$n(),P=JEe(),Y=L("iterator"),B="URLSearchParams",J=B+"Iterator",te=N.set,k=N.getterFor(B),G=N.getterFor(J),K=n("fetch"),b=n("Request"),W=n("Headers"),he=b&&b.prototype,pe=W&&W.prototype,le=r.TypeError,_e=r.encodeURIComponent,Ue=String.fromCharCode,De=a("String","fromCodePoint"),ke=parseInt,Ze=s("".charAt),et=s([].join),nt=s([].push),ct=s("".replace),Et=s([].shift),mt=s([].splice),ht=s("".split),Je=s("".slice),dt=s(/./.exec),It=/\+/g,Ke="�",Ae=/^[0-9a-f]+$/i,Pe=function(ye,Re){var Qe=Je(ye,Re,Re+2);return dt(Ae,Qe)?ke(Qe,16):NaN},fe=function(ye){for(var Re=0,Qe=128;Qe>0&&(ye&Qe)!==0;Qe>>=1)Re++;return Re},xe=function(ye){var Re=null;switch(ye.length){case 1:Re=ye[0];break;case 2:Re=(ye[0]&31)<<6|ye[1]&63;break;case 3:Re=(ye[0]&15)<<12|(ye[1]&63)<<6|ye[2]&63;break;case 4:Re=(ye[0]&7)<<18|(ye[1]&63)<<12|(ye[2]&63)<<6|ye[3]&63;break}return Re>1114111?null:Re},Ne=function(ye){ye=ct(ye,It," ");for(var Re=ye.length,Qe="",we=0;we<Re;){var ot=Ze(ye,we);if(ot==="%"){if(Ze(ye,we+1)==="%"||we+3>Re){Qe+="%",we++;continue}var pt=Pe(ye,we+1);if(pt!==pt){Qe+=ot,we++;continue}we+=2;var At=fe(pt);if(At===0)ot=Ue(pt);else{if(At===1||At>4){Qe+=Ke,we++;continue}for(var Tt=[pt],Ft=1;Ft<At&&(we++,!(we+3>Re||Ze(ye,we)!=="%"));){var nr=Pe(ye,we+1);if(nr!==nr){we+=3;break}if(nr>191||nr<128)break;nt(Tt,nr),we+=2,Ft++}if(Tt.length!==At){Qe+=Ke;continue}var dr=xe(Tt);dr===null?Qe+=Ke:ot=De(dr)}}Qe+=ot,we++}return Qe},Me=/[!'()~]|%20/g,de={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Le=function(ye){return de[ye]},Xe=function(ye){return ct(_e(ye),Me,Le)},tt=p(function(Re,Qe){te(this,{type:J,target:k(Re).entries,index:0,kind:Qe})},B,function(){var Re=G(this),Qe=Re.target,we=Re.index++;if(!Qe||we>=Qe.length)return Re.target=null,x(void 0,!0);var ot=Qe[we];switch(Re.kind){case"keys":return x(ot.key,!1);case"values":return x(ot.value,!1)}return x([ot.key,ot.value],!1)},!0),Ye=function(ye){this.entries=[],this.url=null,ye!==void 0&&(A(ye)?this.parseObject(ye):this.parseQuery(typeof ye=="string"?Ze(ye,0)==="?"?Je(ye,1):ye:w(ye)))};Ye.prototype={type:B,bindURL:function(ye){this.url=ye,this.update()},parseObject:function(ye){var Re=this.entries,Qe=$(ye),we,ot,pt,At,Tt,Ft,nr;if(Qe)for(we=H(ye,Qe),ot=we.next;!(pt=u(ot,we)).done;){if(At=H(S(pt.value)),Tt=At.next,(Ft=u(Tt,At)).done||(nr=u(Tt,At)).done||!u(Tt,At).done)throw new le("Expected sequence with length 2");nt(Re,{key:w(Ft.value),value:w(nr.value)})}else for(var dr in ye)D(ye,dr)&&nt(Re,{key:dr,value:w(ye[dr])})},parseQuery:function(ye){if(ye)for(var Re=this.entries,Qe=ht(ye,"&"),we=0,ot,pt;we<Qe.length;)ot=Qe[we++],ot.length&&(pt=ht(ot,"="),nt(Re,{key:Ne(Et(pt)),value:Ne(et(pt,"="))}))},serialize:function(){for(var ye=this.entries,Re=[],Qe=0,we;Qe<ye.length;)we=ye[Qe++],nt(Re,Xe(we.key)+"="+Xe(we.value));return et(Re,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Te=function(){v(this,Oe);var Re=arguments.length>0?arguments[0]:void 0,Qe=te(this,new Ye(Re));c||(this.size=Qe.entries.length)},Oe=Te.prototype;if(I(Oe,{append:function(Re,Qe){var we=k(this);C(arguments.length,2),nt(we.entries,{key:w(Re),value:w(Qe)}),c||this.length++,we.updateURL()},delete:function(ye){for(var Re=k(this),Qe=C(arguments.length,1),we=Re.entries,ot=w(ye),pt=Qe<2?void 0:arguments[1],At=pt===void 0?pt:w(pt),Tt=0;Tt<we.length;){var Ft=we[Tt];if(Ft.key===ot&&(At===void 0||Ft.value===At)){if(mt(we,Tt,1),At!==void 0)break}else Tt++}c||(this.size=we.length),Re.updateURL()},get:function(Re){var Qe=k(this).entries;C(arguments.length,1);for(var we=w(Re),ot=0;ot<Qe.length;ot++)if(Qe[ot].key===we)return Qe[ot].value;return null},getAll:function(Re){var Qe=k(this).entries;C(arguments.length,1);for(var we=w(Re),ot=[],pt=0;pt<Qe.length;pt++)Qe[pt].key===we&&nt(ot,Qe[pt].value);return ot},has:function(Re){for(var Qe=k(this).entries,we=C(arguments.length,1),ot=w(Re),pt=we<2?void 0:arguments[1],At=pt===void 0?pt:w(pt),Tt=0;Tt<Qe.length;){var Ft=Qe[Tt++];if(Ft.key===ot&&(At===void 0||Ft.value===At))return!0}return!1},set:function(Re,Qe){var we=k(this);C(arguments.length,1);for(var ot=we.entries,pt=!1,At=w(Re),Tt=w(Qe),Ft=0,nr;Ft<ot.length;Ft++)nr=ot[Ft],nr.key===At&&(pt?mt(ot,Ft--,1):(pt=!0,nr.value=Tt));pt||nt(ot,{key:At,value:Tt}),c||(this.size=ot.length),we.updateURL()},sort:function(){var Re=k(this);P(Re.entries,function(Qe,we){return Qe.key>we.key?1:-1}),Re.updateURL()},forEach:function(Re){for(var Qe=k(this).entries,we=O(Re,arguments.length>1?arguments[1]:void 0),ot=0,pt;ot<Qe.length;)pt=Qe[ot++],we(pt.value,pt.key,this)},keys:function(){return new tt(this,"keys")},values:function(){return new tt(this,"values")},entries:function(){return new tt(this,"entries")}},{enumerable:!0}),d(Oe,Y,Oe.entries,{name:"entries"}),d(Oe,"toString",function(){return k(this).serialize()},{enumerable:!0}),c&&M(Oe,"size",{get:function(){return k(this).entries.length},configurable:!0,enumerable:!0}),y(Te,B),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:Te}),!f&&m(W)){var Be=s(pe.has),Mt=s(pe.set),lt=function(ye){if(A(ye)){var Re=ye.body,Qe;if(j(Re)===B)return Qe=ye.headers?new W(ye.headers):new W,Be(Qe,"content-type")||Mt(Qe,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),R(ye,{body:F(0,w(Re)),headers:F(0,Qe)})}return ye};if(m(K)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Re){return K(Re,arguments.length>1?lt(arguments[1]):{})}}),m(b)){var Pt=function(Re){return v(this,he),new b(Re,arguments.length>1?lt(arguments[1]):{})};he.constructor=Pt,Pt.prototype=he,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Pt})}}return zS={URLSearchParams:Te,getState:k},zS}var Hq;function XEe(){if(Hq)return bq;Hq=1,FP();var t=xt(),r=qr(),n=Rq(),a=Qr(),u=b1(),s=hr(),c=Aa(),f=Su(),d=p4(),M=Mi(),I=WEe(),y=DU(),p=w1(),N=h5().codeAt,v=KEe(),m=wi(),D=il(),O=y4(),j=$q(),S=Hs(),A=S.set,w=S.getterFor("URL"),R=j.URLSearchParams,F=j.getState,H=a.URL,$=a.TypeError,x=a.parseInt,C=Math.floor,L=Math.pow,P=s("".charAt),Y=s(/./.exec),B=s([].join),J=s(1 .toString),te=s([].pop),k=s([].push),G=s("".replace),K=s([].shift),b=s("".split),W=s("".slice),he=s("".toLowerCase),pe=s([].unshift),le="Invalid authority",_e="Invalid scheme",Ue="Invalid host",De="Invalid port",ke=/[a-z]/i,Ze=/[\d+-.a-z]/i,et=/\d/,nt=/^0x/i,ct=/^[0-7]+$/,Et=/^\d+$/,mt=/^[\da-f]+$/i,ht=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Je=/[\0\t\n\r #/:<>?@[\\\]^|]/,dt=/^[\u0000-\u0020]+/,It=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Ke=/[\t\n\r]/g,Ae,Pe=function(ne){var ge=b(ne,"."),se,q,je,ut,$e,Lt,yt;if(ge.length&&ge[ge.length-1]===""&&ge.length--,se=ge.length,se>4)return ne;for(q=[],je=0;je<se;je++){if(ut=ge[je],ut==="")return ne;if($e=10,ut.length>1&&P(ut,0)==="0"&&($e=Y(nt,ut)?16:8,ut=W(ut,$e===8?1:2)),ut==="")Lt=0;else{if(!Y($e===10?Et:$e===8?ct:mt,ut))return ne;Lt=x(ut,$e)}k(q,Lt)}for(je=0;je<se;je++)if(Lt=q[je],je===se-1){if(Lt>=L(256,5-se))return null}else if(Lt>255)return null;for(yt=te(q),je=0;je<q.length;je++)yt+=q[je]*L(256,3-je);return yt},fe=function(ne){var ge=[0,0,0,0,0,0,0,0],se=0,q=null,je=0,ut,$e,Lt,yt,Xt,ur,Ee,wt=function(){return P(ne,je)};if(wt()===":"){if(P(ne,1)!==":")return;je+=2,se++,q=se}for(;wt();){if(se===8)return;if(wt()===":"){if(q!==null)return;je++,se++,q=se;continue}for(ut=$e=0;$e<4&&Y(mt,wt());)ut=ut*16+x(wt(),16),je++,$e++;if(wt()==="."){if($e===0||(je-=$e,se>6))return;for(Lt=0;wt();){if(yt=null,Lt>0)if(wt()==="."&&Lt<4)je++;else return;if(!Y(et,wt()))return;for(;Y(et,wt());){if(Xt=x(wt(),10),yt===null)yt=Xt;else{if(yt===0)return;yt=yt*10+Xt}if(yt>255)return;je++}ge[se]=ge[se]*256+yt,Lt++,(Lt===2||Lt===4)&&se++}if(Lt!==4)return;break}else if(wt()===":"){if(je++,!wt())return}else if(wt())return;ge[se++]=ut}if(q!==null)for(ur=se-q,se=7;se!==0&&ur>0;)Ee=ge[se],ge[se--]=ge[q+ur-1],ge[q+--ur]=Ee;else if(se!==8)return;return ge},xe=function(ne){for(var ge=null,se=1,q=null,je=0,ut=0;ut<8;ut++)ne[ut]!==0?(je>se&&(ge=q,se=je),q=null,je=0):(q===null&&(q=ut),++je);return je>se?q:ge},Ne=function(ne){var ge,se,q,je;if(typeof ne=="number"){for(ge=[],se=0;se<4;se++)pe(ge,ne%256),ne=C(ne/256);return B(ge,".")}if(typeof ne=="object"){for(ge="",q=xe(ne),se=0;se<8;se++)je&&ne[se]===0||(je&&(je=!1),q===se?(ge+=se?":":"::",je=!0):(ge+=J(ne[se],16),se<7&&(ge+=":")));return"["+ge+"]"}return ne},Me={},de=I({},Me,{" ":1,'"':1,"<":1,">":1,"`":1}),Le=I({},de,{"#":1,"?":1,"{":1,"}":1}),Xe=I({},Le,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),tt=function(ne,ge){var se=N(ne,0);return se>32&&se<127&&!M(ge,ne)?ne:encodeURIComponent(ne)},Ye={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Te=function(ne,ge){var se;return ne.length===2&&Y(ke,P(ne,0))&&((se=P(ne,1))===":"||!ge&&se==="|")},Oe=function(ne){var ge;return ne.length>1&&Te(W(ne,0,2))&&(ne.length===2||(ge=P(ne,2))==="/"||ge==="\\"||ge==="?"||ge==="#")},Be=function(ne){return ne==="."||he(ne)==="%2e"},Mt=function(ne){return ne=he(ne),ne===".."||ne==="%2e."||ne===".%2e"||ne==="%2e%2e"},lt={},Pt={},ye={},Re={},Qe={},we={},ot={},pt={},At={},Tt={},Ft={},nr={},dr={},Jn={},jr={},wn={},$t={},Sr={},yn={},Ar={},Mr={},bn=function(ne,ge,se){var q=m(ne),je,ut,$e;if(ge){if(ut=this.parse(q),ut)throw new $(ut);this.searchParams=null}else{if(se!==void 0&&(je=new bn(se,!0)),ut=this.parse(q,null,je),ut)throw new $(ut);$e=F(new R),$e.bindURL(this),this.searchParams=$e}};bn.prototype={type:"URL",parse:function(ne,ge,se){var q=this,je=ge||lt,ut=0,$e="",Lt=!1,yt=!1,Xt=!1,ur,Ee,wt,Hr;for(ne=m(ne),ge||(q.scheme="",q.username="",q.password="",q.host=null,q.port=null,q.path=[],q.query=null,q.fragment=null,q.cannotBeABaseURL=!1,ne=G(ne,dt,""),ne=G(ne,It,"$1")),ne=G(ne,Ke,""),ur=y(ne);ut<=ur.length;){switch(Ee=ur[ut],je){case lt:if(Ee&&Y(ke,Ee))$e+=he(Ee),je=Pt;else{if(ge)return _e;je=ye;continue}break;case Pt:if(Ee&&(Y(Ze,Ee)||Ee==="+"||Ee==="-"||Ee==="."))$e+=he(Ee);else if(Ee===":"){if(ge&&(q.isSpecial()!==M(Ye,$e)||$e==="file"&&(q.includesCredentials()||q.port!==null)||q.scheme==="file"&&!q.host))return;if(q.scheme=$e,ge){q.isSpecial()&&Ye[q.scheme]===q.port&&(q.port=null);return}$e="",q.scheme==="file"?je=Jn:q.isSpecial()&&se&&se.scheme===q.scheme?je=Re:q.isSpecial()?je=pt:ur[ut+1]==="/"?(je=Qe,ut++):(q.cannotBeABaseURL=!0,k(q.path,""),je=yn)}else{if(ge)return _e;$e="",je=ye,ut=0;continue}break;case ye:if(!se||se.cannotBeABaseURL&&Ee!=="#")return _e;if(se.cannotBeABaseURL&&Ee==="#"){q.scheme=se.scheme,q.path=p(se.path),q.query=se.query,q.fragment="",q.cannotBeABaseURL=!0,je=Mr;break}je=se.scheme==="file"?Jn:we;continue;case Re:if(Ee==="/"&&ur[ut+1]==="/")je=At,ut++;else{je=we;continue}break;case Qe:if(Ee==="/"){je=Tt;break}else{je=Sr;continue}case we:if(q.scheme=se.scheme,Ee===Ae)q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,q.path=p(se.path),q.query=se.query;else if(Ee==="/"||Ee==="\\"&&q.isSpecial())je=ot;else if(Ee==="?")q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,q.path=p(se.path),q.query="",je=Ar;else if(Ee==="#")q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,q.path=p(se.path),q.query=se.query,q.fragment="",je=Mr;else{q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,q.path=p(se.path),q.path.length--,je=Sr;continue}break;case ot:if(q.isSpecial()&&(Ee==="/"||Ee==="\\"))je=At;else if(Ee==="/")je=Tt;else{q.username=se.username,q.password=se.password,q.host=se.host,q.port=se.port,je=Sr;continue}break;case pt:if(je=At,Ee!=="/"||P($e,ut+1)!=="/")continue;ut++;break;case At:if(Ee!=="/"&&Ee!=="\\"){je=Tt;continue}break;case Tt:if(Ee==="@"){Lt&&($e="%40"+$e),Lt=!0,wt=y($e);for(var hi=0;hi<wt.length;hi++){var Xn=wt[hi];if(Xn===":"&&!Xt){Xt=!0;continue}var Cr=tt(Xn,Xe);Xt?q.password+=Cr:q.username+=Cr}$e=""}else if(Ee===Ae||Ee==="/"||Ee==="?"||Ee==="#"||Ee==="\\"&&q.isSpecial()){if(Lt&&$e==="")return le;ut-=y($e).length+1,$e="",je=Ft}else $e+=Ee;break;case Ft:case nr:if(ge&&q.scheme==="file"){je=wn;continue}else if(Ee===":"&&!yt){if($e==="")return Ue;if(Hr=q.parseHost($e),Hr)return Hr;if($e="",je=dr,ge===nr)return}else if(Ee===Ae||Ee==="/"||Ee==="?"||Ee==="#"||Ee==="\\"&&q.isSpecial()){if(q.isSpecial()&&$e==="")return Ue;if(ge&&$e===""&&(q.includesCredentials()||q.port!==null))return;if(Hr=q.parseHost($e),Hr)return Hr;if($e="",je=$t,ge)return;continue}else Ee==="["?yt=!0:Ee==="]"&&(yt=!1),$e+=Ee;break;case dr:if(Y(et,Ee))$e+=Ee;else if(Ee===Ae||Ee==="/"||Ee==="?"||Ee==="#"||Ee==="\\"&&q.isSpecial()||ge){if($e!==""){var Ki=x($e,10);if(Ki>65535)return De;q.port=q.isSpecial()&&Ki===Ye[q.scheme]?null:Ki,$e=""}if(ge)return;je=$t;continue}else return De;break;case Jn:if(q.scheme="file",Ee==="/"||Ee==="\\")je=jr;else if(se&&se.scheme==="file")switch(Ee){case Ae:q.host=se.host,q.path=p(se.path),q.query=se.query;break;case"?":q.host=se.host,q.path=p(se.path),q.query="",je=Ar;break;case"#":q.host=se.host,q.path=p(se.path),q.query=se.query,q.fragment="",je=Mr;break;default:Oe(B(p(ur,ut),""))||(q.host=se.host,q.path=p(se.path),q.shortenPath()),je=Sr;continue}else{je=Sr;continue}break;case jr:if(Ee==="/"||Ee==="\\"){je=wn;break}se&&se.scheme==="file"&&!Oe(B(p(ur,ut),""))&&(Te(se.path[0],!0)?k(q.path,se.path[0]):q.host=se.host),je=Sr;continue;case wn:if(Ee===Ae||Ee==="/"||Ee==="\\"||Ee==="?"||Ee==="#"){if(!ge&&Te($e))je=Sr;else if($e===""){if(q.host="",ge)return;je=$t}else{if(Hr=q.parseHost($e),Hr)return Hr;if(q.host==="localhost"&&(q.host=""),ge)return;$e="",je=$t}continue}else $e+=Ee;break;case $t:if(q.isSpecial()){if(je=Sr,Ee!=="/"&&Ee!=="\\")continue}else if(!ge&&Ee==="?")q.query="",je=Ar;else if(!ge&&Ee==="#")q.fragment="",je=Mr;else if(Ee!==Ae&&(je=Sr,Ee!=="/"))continue;break;case Sr:if(Ee===Ae||Ee==="/"||Ee==="\\"&&q.isSpecial()||!ge&&(Ee==="?"||Ee==="#")){if(Mt($e)?(q.shortenPath(),Ee!=="/"&&!(Ee==="\\"&&q.isSpecial())&&k(q.path,"")):Be($e)?Ee!=="/"&&!(Ee==="\\"&&q.isSpecial())&&k(q.path,""):(q.scheme==="file"&&!q.path.length&&Te($e)&&(q.host&&(q.host=""),$e=P($e,0)+":"),k(q.path,$e)),$e="",q.scheme==="file"&&(Ee===Ae||Ee==="?"||Ee==="#"))for(;q.path.length>1&&q.path[0]==="";)K(q.path);Ee==="?"?(q.query="",je=Ar):Ee==="#"&&(q.fragment="",je=Mr)}else $e+=tt(Ee,Le);break;case yn:Ee==="?"?(q.query="",je=Ar):Ee==="#"?(q.fragment="",je=Mr):Ee!==Ae&&(q.path[0]+=tt(Ee,Me));break;case Ar:!ge&&Ee==="#"?(q.fragment="",je=Mr):Ee!==Ae&&(Ee==="'"&&q.isSpecial()?q.query+="%27":Ee==="#"?q.query+="%23":q.query+=tt(Ee,Me));break;case Mr:Ee!==Ae&&(q.fragment+=tt(Ee,de));break}ut++}},parseHost:function(ne){var ge,se,q;if(P(ne,0)==="["){if(P(ne,ne.length-1)!=="]"||(ge=fe(W(ne,1,-1)),!ge))return Ue;this.host=ge}else if(this.isSpecial()){if(ne=v(ne),Y(ht,ne)||(ge=Pe(ne),ge===null))return Ue;this.host=ge}else{if(Y(Je,ne))return Ue;for(ge="",se=y(ne),q=0;q<se.length;q++)ge+=tt(se[q],Me);this.host=ge}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return M(Ye,this.scheme)},shortenPath:function(){var ne=this.path,ge=ne.length;ge&&(this.scheme!=="file"||ge!==1||!Te(ne[0],!0))&&ne.length--},serialize:function(){var ne=this,ge=ne.scheme,se=ne.username,q=ne.password,je=ne.host,ut=ne.port,$e=ne.path,Lt=ne.query,yt=ne.fragment,Xt=ge+":";return je!==null?(Xt+="//",ne.includesCredentials()&&(Xt+=se+(q?":"+q:"")+"@"),Xt+=Ne(je),ut!==null&&(Xt+=":"+ut)):ge==="file"&&(Xt+="//"),Xt+=ne.cannotBeABaseURL?$e[0]:$e.length?"/"+B($e,"/"):"",Lt!==null&&(Xt+="?"+Lt),yt!==null&&(Xt+="#"+yt),Xt},setHref:function(ne){var ge=this.parse(ne);if(ge)throw new $(ge);this.searchParams.update()},getOrigin:function(){var ne=this.scheme,ge=this.port;if(ne==="blob")try{return new hn(ne.path[0]).origin}catch(se){return"null"}return ne==="file"||!this.isSpecial()?"null":ne+"://"+Ne(this.host)+(ge!==null?":"+ge:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ne){this.parse(m(ne)+":",lt)},getUsername:function(){return this.username},setUsername:function(ne){var ge=y(m(ne));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var se=0;se<ge.length;se++)this.username+=tt(ge[se],Xe)}},getPassword:function(){return this.password},setPassword:function(ne){var ge=y(m(ne));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var se=0;se<ge.length;se++)this.password+=tt(ge[se],Xe)}},getHost:function(){var ne=this.host,ge=this.port;return ne===null?"":ge===null?Ne(ne):Ne(ne)+":"+ge},setHost:function(ne){this.cannotBeABaseURL||this.parse(ne,Ft)},getHostname:function(){var ne=this.host;return ne===null?"":Ne(ne)},setHostname:function(ne){this.cannotBeABaseURL||this.parse(ne,nr)},getPort:function(){var ne=this.port;return ne===null?"":m(ne)},setPort:function(ne){this.cannotHaveUsernamePasswordPort()||(ne=m(ne),ne===""?this.port=null:this.parse(ne,dr))},getPathname:function(){var ne=this.path;return this.cannotBeABaseURL?ne[0]:ne.length?"/"+B(ne,"/"):""},setPathname:function(ne){this.cannotBeABaseURL||(this.path=[],this.parse(ne,$t))},getSearch:function(){var ne=this.query;return ne?"?"+ne:""},setSearch:function(ne){ne=m(ne),ne===""?this.query=null:(P(ne,0)==="?"&&(ne=W(ne,1)),this.query="",this.parse(ne,Ar)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ne=this.fragment;return ne?"#"+ne:""},setHash:function(ne){if(ne=m(ne),ne===""){this.fragment=null;return}P(ne,0)==="#"&&(ne=W(ne,1)),this.fragment="",this.parse(ne,Mr)},update:function(){this.query=this.searchParams.serialize()||null}};var hn=function(ge){var se=d(this,tr),q=O(arguments.length,1)>1?arguments[1]:void 0,je=A(se,new bn(ge,!1,q));r||(se.href=je.serialize(),se.origin=je.getOrigin(),se.protocol=je.getProtocol(),se.username=je.getUsername(),se.password=je.getPassword(),se.host=je.getHost(),se.hostname=je.getHostname(),se.port=je.getPort(),se.pathname=je.getPathname(),se.search=je.getSearch(),se.searchParams=je.getSearchParams(),se.hash=je.getHash())},tr=hn.prototype,Nr=function(ne,ge){return{get:function(){return w(this)[ne]()},set:ge&&function(se){return w(this)[ge](se)},configurable:!0,enumerable:!0}};if(r&&(f(tr,"href",Nr("serialize","setHref")),f(tr,"origin",Nr("getOrigin")),f(tr,"protocol",Nr("getProtocol","setProtocol")),f(tr,"username",Nr("getUsername","setUsername")),f(tr,"password",Nr("getPassword","setPassword")),f(tr,"host",Nr("getHost","setHost")),f(tr,"hostname",Nr("getHostname","setHostname")),f(tr,"port",Nr("getPort","setPort")),f(tr,"pathname",Nr("getPathname","setPathname")),f(tr,"search",Nr("getSearch","setSearch")),f(tr,"searchParams",Nr("getSearchParams")),f(tr,"hash",Nr("getHash","setHash"))),c(tr,"toJSON",function(){return w(this).serialize()},{enumerable:!0}),c(tr,"toString",function(){return w(this).serialize()},{enumerable:!0}),H){var rn=H.createObjectURL,Wi=H.revokeObjectURL;rn&&c(hn,"createObjectURL",u(rn,H)),Wi&&c(hn,"revokeObjectURL",u(Wi,H))}return D(hn,"URL"),t({global:!0,constructor:!0,forced:!n,sham:!r},{URL:hn}),bq}var Vq;function eDe(){return Vq||(Vq=1,XEe()),wq}eDe();var Bq={},Gq;function tDe(){if(Gq)return Bq;Gq=1;var t=xt(),r=Mn();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),Bq}tDe();var Zq={},Wq;function rDe(){return Wq||(Wq=1,$q()),Zq}rDe();var Kq={},qq;function nDe(){if(qq)return Kq;qq=1;var t=Aa(),r=hr(),n=wi(),a=y4(),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(y){var p=arguments.length,N=p<2?void 0:arguments[1];if(p&&N===void 0)return f(this,y);var v=[];d(this,function(R,F){M(v,{key:F,value:R})}),a(p,1);for(var m=n(y),D=n(N),O=0,j=0,S=!1,A=v.length,w;O<A;)w=v[O++],S||w.key===m?(S=!0,f(this,w.key)):j++;for(;j<A;)w=v[j++],w.key===m&&w.value===D||c(this,w.key,w.value)},{enumerable:!0,unsafe:!0}),Kq}nDe();var Jq={},Xq;function iDe(){if(Xq)return Jq;Xq=1;var t=Aa(),r=hr(),n=wi(),a=y4(),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 y=arguments.length,p=y<2?void 0:arguments[1];if(y&&p===void 0)return f(this,I);var N=c(this,I);a(y,1);for(var v=n(p),m=0;m<N.length;)if(N[m++]===v)return!0;return!1},{enumerable:!0,unsafe:!0}),Jq}iDe();var eJ={},tJ;function aDe(){if(tJ)return eJ;tJ=1;var t=qr(),r=hr(),n=Su(),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}),eJ}aDe();function $2(t){"@babel/helpers - typeof";return $2=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},$2(t)}function oDe(t,r){return cDe(t)||lDe(t,r)||sDe(t,r)||uDe()}function uDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
75
75
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sDe(t,r){if(t){if(typeof t=="string")return rJ(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)?rJ(t,r):void 0}}function rJ(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 lDe(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 cDe(t){if(Array.isArray(t))return t}function fDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function dDe(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,nJ(a.key),a)}}function MDe(t,r,n){return r&&dDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Oh(t,r,n){return(r=nJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function nJ(t){var r=gDe(t,"string");return $2(r)=="symbol"?r:r+""}function gDe(t,r){if($2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if($2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var IDe=function(){function t(){fDe(this,t),Oh(this,"_levels",[]),Oh(this,"_transports",[]),Oh(this,"_logs",[]),Oh(this,"_prevTime",0);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var n=r.split(">"),a=oDe(n,2),u=a[0],s=a[1];this._levels=u.split(","),s&&(this._transports=s.split(","))}catch(c){return}}return MDe(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(`
76
- `),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()}}}])}(),PS=new IDe;function Cg(t){"@babel/helpers - typeof";return Cg=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},Cg(t)}function Cn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Cn=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(x,C,L,P){return Object.defineProperty(x,C,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,C,L,P){var Y=C&&C.prototype instanceof p?C:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,C,L){try{return{type:"normal",arg:x.call(C,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,O=D&&D(D($([])));O&&O!==n&&a.call(O,s)&&(m=O);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(C){d(x,C,function(L){return this._invoke(C,L)})})}function A(x,C){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&Cg(K)=="object"&&a.call(K,"__await")?C.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):C.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new C(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,C){var L=C.method,P=x.i[L];if(P===t)return C.delegate=null,L==="throw"&&x.i.return&&(C.method="return",C.arg=t,w(x,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,C.arg);if(Y.type==="throw")return C.method="throw",C.arg=Y.arg,C.delegate=null,y;var B=Y.arg;return B?B.done?(C[x.r]=B.value,C.next=x.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var C=x[4]||{};C.type="normal",C.arg=t,x[4]=C}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var C=x[s];if(C)return C.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(Cg(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var C=typeof x=="function"&&x.constructor;return!!C&&(C===N||(C.displayName||C.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,C,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,C,L,P),Y);return r.isGeneratorFunction(C)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var C=Object(x),L=[];for(var P in C)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in C)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(C){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(F),!C)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function P(K){J.type="throw",J.arg=C,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(C,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=C,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===C)return this.complete(P[4],P[3]),F(P),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===C){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,P){return this.delegate={i:$(C),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function iJ(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 cu(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){iJ(s,a,u,c,f,"next",d)}function f(d){iJ(s,a,u,c,f,"throw",d)}c(void 0)})}}function pDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function yDe(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,aJ(a.key),a)}}function hDe(t,r,n){return r&&yDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function b4(t,r,n){return(r=aJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function aJ(t){var r=NDe(t,"string");return Cg(r)=="symbol"?r:r+""}function NDe(t,r){if(Cg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Cg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var To=PS.create("wasm_idv"),vDe=function(){function t(r){pDe(this,t),b4(this,"_worker",null),b4(this,"_initialized",!1),b4(this,"_connectedToIdv",!1),b4(this,"_serviceRunning",!1),b4(this,"_userId",che(Ipe)),b4(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return hDe(t,[{key:"init",value:function(){var r=cu(Cn().mark(function a(){var u,s,c,f;return Cn().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.4/cb23a44-9c4a9acbd//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),To("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.4/cb23a44-9c4a9acbd/",preMain:!0});case 23:return f=M.sent,f.code===0&&To("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=cu(Cn().mark(function a(u){var s,c;return Cn().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:O5.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),To("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=cu(Cn().mark(function a(u){var s;return Cn().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:O5.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),To("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=cu(Cn().mark(function a(u,s,c){var f,d;return Cn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:s},c&&(fhe(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,To("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=cu(Cn().mark(function a(u,s){var c,f;return Cn().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,To("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=cu(Cn().mark(function a(){var u,s,c=arguments;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(u){var s;return Cn().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,To("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=cu(Cn().mark(function a(u,s){var c;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(u){var s=this;return Cn().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 y=I.data.target;if(y==="stdout"){To(JSON.stringify(I.data.content));return}if(y==="custom"){var p=I.data,N=p.method,v=p.data;N==="onRuntimeInitialized"&&(s._initialized=!0),d(v)}if(y==="stderr"){var m=I.data.content;To(JSON.stringify(m)),s._setErrorScreen&&s._setErrorScreen(m)}},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=cu(Cn().mark(function a(){var u;return Cn().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 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 oJ(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 H2(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oJ(Object(n),!0).forEach(function(a){US(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function US(t,r,n){return(r=mDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function mDe(t){var r=EDe(t,"string");return Og(r)=="symbol"?r:r+""}function EDe(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(r==="string"?String:Number)(t)}function Ri(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Ri=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(x,C,L,P){return Object.defineProperty(x,C,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,C,L,P){var Y=C&&C.prototype instanceof p?C:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,C,L){try{return{type:"normal",arg:x.call(C,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,O=D&&D(D($([])));O&&O!==n&&a.call(O,s)&&(m=O);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(C){d(x,C,function(L){return this._invoke(C,L)})})}function A(x,C){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&Og(K)=="object"&&a.call(K,"__await")?C.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):C.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new C(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,C){var L=C.method,P=x.i[L];if(P===t)return C.delegate=null,L==="throw"&&x.i.return&&(C.method="return",C.arg=t,w(x,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,C.arg);if(Y.type==="throw")return C.method="throw",C.arg=Y.arg,C.delegate=null,y;var B=Y.arg;return B?B.done?(C[x.r]=B.value,C.next=x.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var C=x[4]||{};C.type="normal",C.arg=t,x[4]=C}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var C=x[s];if(C)return C.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(Og(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var C=typeof x=="function"&&x.constructor;return!!C&&(C===N||(C.displayName||C.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,C,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,C,L,P),Y);return r.isGeneratorFunction(C)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var C=Object(x),L=[];for(var P in C)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in C)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(C){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(F),!C)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function P(K){J.type="throw",J.arg=C,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(C,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=C,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===C)return this.complete(P[4],P[3]),F(P),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===C){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,P){return this.delegate={i:$(C),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function uJ(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 Pl(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){uJ(s,a,u,c,f,"next",d)}function f(d){uJ(s,a,u,c,f,"throw",d)}c(void 0)})}}var DDe=PS.create("store_idv"),TDe=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Pl(Ri().mark(function s(){var c;return Ri().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new vDe,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 Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){p.next=3;break}return p.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return p.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=p.sent,M=null,d.code===4&&(M=yg.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=yg.PROVIDER_ERROR),M===null){p.next=12;break}return I=new c2({errorCode:M}),p.abrupt("return",{error:I});case 12:return p.abrupt("return",{});case 13:case"end":return p.stop()}},s)}))()},connectByUrl:function(u){return Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=n().wasmService,p.next=3,c.connectByUrl(u);case 3:if(f=p.sent,d=null,f.code===4&&(d=yg.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=yg.PROVIDER_ERROR),d===null){p.next=13;break}return M=new c2({errorCode:d}),I=new Wy({errorCode:L5.CONNECTION_ISSUE,underlyingBaseError:M}),p.abrupt("return",{workflows:[],error:I});case 13:return p.abrupt("return",{workflows:f.data});case 14:case"end":return p.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=H2(H2({},f.results),{},{sessionId:M}),y=H2({results:I},f.error&&{error:f.error});n().setCurrentSessionDataLsAndStore(null),u(y)};r(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Pl(Ri().mark(function s(){var c,f,d,M;return Ri().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().externalModulesNames,y.prev=1,y.next=4,jDe(c);case 4:return f=y.sent,r(function(){return{externalModules:f}}),y.abrupt("return",{});case 9:return y.prev=9,y.t0=y.catch(1),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),M=new l2({errorCode:K0.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=YE(u.find(function(c){return c.templateId===w5}));s.templateLayout=xF(s.templateLayout,n().layout),r({processingTransformedTemplate:s})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Pl(Ri().mark(function s(c,f){var d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=null,M=function(){var N=Pl(Ri().mark(function v(){var m,D,O,j;return Ri().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,n().wasmService.pushData(c,f);case 2:if(m=A.sent,D=null,m.code===4&&(D=ol.HTTP_ISSUE),m.code!==0&&m.code!==4&&(D=ol.PROVIDER_ERROR),D!==null&&(O=new v4({errorCode:ol.HTTP_ISSUE}),j=new vo({errorCode:No.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:O}),d=j),m.code!==0){A.next=12;break}return d=null,A.abrupt("return",m);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},v)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},p.next=5,FE(M,I);case 5:return p.abrupt("return",d?{error:d}:{});case 6:case"end":return p.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=Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=null,f=function(){var N=Pl(Ri().mark(function v(){var m,D,O,j,S,A,w,R,F,H,$,x,C,L;return Ri().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,n().wasmService.getSessionState();case 2:if(j=Y.sent,S=(m=j.data)===null||m===void 0?void 0:m.currentStep,A=(D=j.data)===null||D===void 0?void 0:D.isProcessingFiles,w=(O=j.data)===null||O===void 0||(O=O.workflow)===null||O===void 0?void 0:O.steps,R=uhe(w,S),F=j.code===4,H=j.code!==0&&j.code!==4,$=j.code===0&&(!j.data.workflow||!j.data.currentStep),x=null,w&&!R&&(x=ol.NOT_DATA_TYPE),F&&(x=ol.HTTP_ISSUE),H&&(x=ol.PROVIDER_ERROR),A&&(x=ol.IS_PROCESSING),$&&(x=ol.DECODING_FAILED),x!==null&&(C=new v4({errorCode:x}),L=new vo({errorCode:No.INTERNAL_ISSUE,underlyingBaseError:C}),c=L),DDe(JSON.stringify({nextStep:S,isDataType:R,isProcessingFiles:A})),!(R&&!A&&!F&&!H&&!$)){Y.next=21;break}return c=null,Y.abrupt("return",j.data);case 21:return Y.abrupt("return",null);case 22:case"end":return Y.stop()}},v)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},p.next=5,FE(f,d);case 5:if(M=p.sent,!c){p.next=8;break}return p.abrupt("return",{error:c});case 8:if(!M){p.next=10;break}return p.abrupt("return",{sessionData:M});case 10:return c=new v4({errorCode:ol.DECODING_FAILED}),I=new vo({errorCode:No.INTERNAL_ISSUE,underlyingBaseError:c}),p.abrupt("return",{error:I});case 13:case"end":return p.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:Z0.MESSAGE,message:W0.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Pl(Ri().mark(function s(c){var f,d,M,I,y,p,N,v,m;return Ri().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(f=n().currentStepId,f){O.next=3;break}return O.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){O.next=7;break}return n().setFinalStepAndStopProcess(),O.abrupt("return");case 7:if(!(c instanceof Wn)){O.next=13;break}return d=c,M=new vo({errorCode:No.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:M}),n().resetSession(),O.abrupt("return");case 13:return O.next=15,n()._pushStep(f,c);case 15:if(I=O.sent,!I.error){O.next=20;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),O.abrupt("return");case 20:return O.next=22,n()._waitingForNextStep();case 22:if(y=O.sent,!y.error){O.next=27;break}return n().workflowSessionCompletion({error:y.error}),n().resetSession(),O.abrupt("return");case 27:if(p=y.sessionData.workflow,N=y.sessionData.currentStep,n().setWorkflow(p),n().setLayout(p.client.layout),n().setProcessingTemplate(p.client.steps),n().setSessionProperties(y.sessionData.properties),v=n()._findStepById(N),m=function(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.templateId},!(v!=null&&v.final&&!m(v.client))){O.next=38;break}return n().setFinalStepAndStopProcess(v.id),O.abrupt("return");case 38:v!=null&&v.final&&m(v.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(N),n().setIsProcessing(!1);case 41:case"end":return O.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===w5&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var M,I,y=n()._findStepById(u);if(typeof(y==null||(M=y.client)===null||M===void 0?void 0:M.templateId)=="string"){var p;f=H2(H2({},y==null?void 0:y.client),{},{templateId:y.client.templateId,dataSource:(p=y.dataSource)!==null&&p!==void 0?p: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&&dhe(y==null||(I=y.client)===null||I===void 0?void 0:I.templateLayout)){var v=xF(y.client.templateLayout,n().layout);v&&(f.templateLayout=v)}}var m=ohe(n().externalModules,s.steps,u);if(f===null||!m){var D=new vo({errorCode:No.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:D}),r(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Pl(Ri().mark(function s(){var c,f;return Ri().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 jDe(t){return YS.apply(this,arguments)}function YS(){return YS=Pl(Ri().mark(function t(r){var n,a,u,s,c,f;return Ri().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:Yf.getIdentifier(),supportedTemplates:Yf.getSupportedTemplates(),component:Yf}],a=US(US({},x5.LIVENESS,function(){return Promise.resolve().then(()=>Drt)}),x5.DOC_READER,function(){return Promise.resolve().then(()=>Z9t)}),u=Ri().mark(function I(){var y,p,N;return Ri().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(y=c[s],p=function(){return a[y]()},!p){m.next=7;break}return m.next=5,p();case 5:N=m.sent,n.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return m.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)})),YS.apply(this,arguments)}function V2(t){"@babel/helpers - typeof";return V2=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},V2(t)}function sJ(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 QS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?sJ(Object(n),!0).forEach(function(a){SDe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function SDe(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=CDe(t,"string");return V2(r)=="symbol"?r:r+""}function CDe(t,r){if(V2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(V2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Oa=oye(function(){return QS(QS(QS({},Nhe.apply(void 0,arguments)),khe.apply(void 0,arguments)),TDe.apply(void 0,arguments))}),lJ=function(r){var n=r.children;return li.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 B2(t){"@babel/helpers - typeof";return B2=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},B2(t)}function cJ(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 fJ(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?cJ(Object(n),!0).forEach(function(a){ODe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function ODe(t,r,n){return(r=_De(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function _De(t){var r=xDe(t,"string");return B2(r)=="symbol"?r:r+""}function xDe(t,r){if(B2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(B2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var LDe=function(){var r=Oa(function(N){return N.currentScreenConfig}),n=Oa(function(N){return N.pushStepWaitNextStepAndSet}),a=Oa(function(N){return N.processingTransformedTemplate}),u=Oa(function(N){return N.isProcessing}),s=Oa(function(N){return N.setIsProcessing}),c=Oa(function(N){return N.listener}),f=Oa(function(N){return N.externalModules}),d=Oa(function(N){return N.modulesConfig}),M=function(v,m){c({eventType:Z0.MESSAGE,message:m,module:v})},I=function(v){s(v)},y=function(v){s(!1),n(v)},p=Tr.useCallback(function(){if(!r)return null;var N=f.find(function(v){return v.supportedTemplates.includes(r.templateId)});if(N&&r)return li.jsx(N.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?li.jsx(G5,{direction:Fy.Ltr,children:li.jsx(lJ,{children:"Waiting for play... or process completed"})}):li.jsx(li.Fragment,{children:li.jsx(G5,{direction:Fy.Ltr,children:li.jsxs(li.Fragment,{children:[u&&li.jsx(lJ,{children:a?li.jsx(Yf,{perform:y,moduleProps:fJ(fJ({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),p()]})})})};function wDe(){return li.jsx(Tr.StrictMode,{children:li.jsx(Ppe,{children:li.jsx(LDe,{})})})}function k4(t){"@babel/helpers - typeof";return k4=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},k4(t)}function bDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function dJ(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,gJ(a.key),a)}}function kDe(t,r,n){return r&&dJ(t.prototype,r),n&&dJ(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function RDe(t,r,n){return r=Z2(r),zDe(t,$S()?Reflect.construct(r,[],Z2(t).constructor):r.apply(t,n))}function zDe(t,r){if(r&&(k4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PDe(t)}function PDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function UDe(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&&G2(t,r)}function FS(t){var r=typeof Map=="function"?new Map:void 0;return FS=function(a){if(a===null||!QDe(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 YDe(a,arguments,Z2(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),G2(u,a)},FS(t)}function YDe(t,r,n){if($S())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return n&&G2(u,n.prototype),u}function $S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return($S=function(){return!!t})()}function QDe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function G2(t,r){return G2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},G2(t,r)}function Z2(t){return Z2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z2(t)}function MJ(t,r,n){return(r=gJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function gJ(t){var r=FDe(t,"string");return k4(r)=="symbol"?r:r+""}function FDe(t,r){if(k4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(k4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $De="*,::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%}",IJ=function(t){function r(){var n;return bDe(this,r),n=RDe(this,r),MJ(n,"_root",ope.createRoot(n.attachShadow({mode:"open"}))),MJ(n,"_mounted",!1),n}return UDe(r,t),kDe(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.4.157-rc".trim())}},{key:"render",value:function(){this._root.render(li.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[li.jsx("style",{nonce:Oa.getState().getNonce(),children:$De}),li.jsx(wDe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),PS.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(FS(HTMLElement));function _g(t){"@babel/helpers - typeof";return _g=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},_g(t)}function Gs(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Gs=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(x,C,L,P){return Object.defineProperty(x,C,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,C,L,P){var Y=C&&C.prototype instanceof p?C:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,C,L){try{return{type:"normal",arg:x.call(C,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,O=D&&D(D($([])));O&&O!==n&&a.call(O,s)&&(m=O);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(C){d(x,C,function(L){return this._invoke(C,L)})})}function A(x,C){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&_g(K)=="object"&&a.call(K,"__await")?C.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):C.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new C(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,C){var L=C.method,P=x.i[L];if(P===t)return C.delegate=null,L==="throw"&&x.i.return&&(C.method="return",C.arg=t,w(x,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,C.arg);if(Y.type==="throw")return C.method="throw",C.arg=Y.arg,C.delegate=null,y;var B=Y.arg;return B?B.done?(C[x.r]=B.value,C.next=x.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var C=x[4]||{};C.type="normal",C.arg=t,x[4]=C}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var C=x[s];if(C)return C.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(_g(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var C=typeof x=="function"&&x.constructor;return!!C&&(C===N||(C.displayName||C.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,C,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,C,L,P),Y);return r.isGeneratorFunction(C)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var C=Object(x),L=[];for(var P in C)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in C)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(C){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(F),!C)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function P(K){J.type="throw",J.arg=C,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(C,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=C,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===C)return this.complete(P[4],P[3]),F(P),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===C){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,P){return this.delegate={i:$(C),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function pJ(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 R4(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){pJ(s,a,u,c,f,"next",d)}function f(d){pJ(s,a,u,c,f,"throw",d)}c(void 0)})}}function HDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function VDe(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,GDe(a.key),a)}}function BDe(t,r,n){return r&&VDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function GDe(t){var r=ZDe(t,"string");return _g(r)=="symbol"?r:r+""}function ZDe(t,r){if(_g(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(_g(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var WDe=function(){function t(){HDe(this,t)}return BDe(t,[{key:"initialize",value:function(){var r=R4(Gs().mark(function a(u){var s;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=Oa.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=R4(Gs().mark(function a(u){var s,c;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,Oa.getState().configure(u);case 3:return s=d.sent,d.abrupt("return",s);case 5:return d.next=7,Oa.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=R4(Gs().mark(function a(u){var s;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,Oa.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=R4(Gs().mark(function a(u){var s,c;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=u.workflowId,d.next=3,Oa.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=R4(Gs().mark(function a(u){var s,c,f,d;return Gs().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=Ihe(s),I.next=5,Oa.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(y){var p=function(v){y(v)};Oa.getState().playWorkflow(p)}));case 9:case"end":return I.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var r=R4(Gs().mark(function a(){var u;return Gs().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Oa.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.4.157-rc")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){Oa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Oa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){Oa.getState().setSessionRestoreMode(n)}}])}(),KDe=window.customElements.get("idv-flow");KDe||window.customElements.define("idv-flow",IJ);var qDe=Object.defineProperty,JDe=Object.defineProperties,XDe=Object.getOwnPropertyDescriptors,yJ=Object.getOwnPropertySymbols,eTe=Object.prototype.hasOwnProperty,tTe=Object.prototype.propertyIsEnumerable,hJ=(t,r,n)=>r in t?qDe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,HS=(t,r)=>{for(var n in r||(r={}))eTe.call(r,n)&&hJ(t,n,r[n]);if(yJ)for(var n of yJ(r))tTe.call(r,n)&&hJ(t,n,r[n]);return t},NJ=(t,r)=>JDe(t,XDe(r)),jo=(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())}),vJ=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function mJ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var EJ={exports:{}},W2={},DJ={exports:{}},Jr={},TJ;function rTe(){if(TJ)return Jr;TJ=1;/**
76
+ `),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()}}}])}(),PS=new IDe;function Cg(t){"@babel/helpers - typeof";return Cg=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},Cg(t)}function Cn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Cn=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(x,C,L,P){return Object.defineProperty(x,C,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,C,L,P){var Y=C&&C.prototype instanceof p?C:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,C,L){try{return{type:"normal",arg:x.call(C,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,O=D&&D(D($([])));O&&O!==n&&a.call(O,s)&&(m=O);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(C){d(x,C,function(L){return this._invoke(C,L)})})}function A(x,C){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&Cg(K)=="object"&&a.call(K,"__await")?C.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):C.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new C(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,C){var L=C.method,P=x.i[L];if(P===t)return C.delegate=null,L==="throw"&&x.i.return&&(C.method="return",C.arg=t,w(x,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,C.arg);if(Y.type==="throw")return C.method="throw",C.arg=Y.arg,C.delegate=null,y;var B=Y.arg;return B?B.done?(C[x.r]=B.value,C.next=x.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var C=x[4]||{};C.type="normal",C.arg=t,x[4]=C}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var C=x[s];if(C)return C.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(Cg(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var C=typeof x=="function"&&x.constructor;return!!C&&(C===N||(C.displayName||C.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,C,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,C,L,P),Y);return r.isGeneratorFunction(C)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var C=Object(x),L=[];for(var P in C)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in C)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(C){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(F),!C)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function P(K){J.type="throw",J.arg=C,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(C,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=C,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===C)return this.complete(P[4],P[3]),F(P),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===C){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,P){return this.delegate={i:$(C),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function iJ(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 cu(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){iJ(s,a,u,c,f,"next",d)}function f(d){iJ(s,a,u,c,f,"throw",d)}c(void 0)})}}function pDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function yDe(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,aJ(a.key),a)}}function hDe(t,r,n){return r&&yDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function b4(t,r,n){return(r=aJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function aJ(t){var r=NDe(t,"string");return Cg(r)=="symbol"?r:r+""}function NDe(t,r){if(Cg(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(Cg(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var To=PS.create("wasm_idv"),vDe=function(){function t(r){pDe(this,t),b4(this,"_worker",null),b4(this,"_initialized",!1),b4(this,"_connectedToIdv",!1),b4(this,"_serviceRunning",!1),b4(this,"_userId",che(Ipe)),b4(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return hDe(t,[{key:"init",value:function(){var r=cu(Cn().mark(function a(){var u,s,c,f;return Cn().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.4/b61e1c7-9c4a9acbd//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),To("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.4/b61e1c7-9c4a9acbd/",preMain:!0});case 23:return f=M.sent,f.code===0&&To("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=cu(Cn().mark(function a(u){var s,c;return Cn().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:O5.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),To("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=cu(Cn().mark(function a(u){var s;return Cn().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:O5.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),To("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=cu(Cn().mark(function a(u,s,c){var f,d;return Cn().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f={workflowId:u,locale:s},c&&(fhe(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,To("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=cu(Cn().mark(function a(u,s){var c,f;return Cn().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,To("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=cu(Cn().mark(function a(){var u,s,c=arguments;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(u){var s;return Cn().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,To("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=cu(Cn().mark(function a(u,s){var c;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(){var u;return Cn().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,To("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=cu(Cn().mark(function a(u){var s=this;return Cn().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 y=I.data.target;if(y==="stdout"){To(JSON.stringify(I.data.content));return}if(y==="custom"){var p=I.data,N=p.method,v=p.data;N==="onRuntimeInitialized"&&(s._initialized=!0),d(v)}if(y==="stderr"){var m=I.data.content;To(JSON.stringify(m)),s._setErrorScreen&&s._setErrorScreen(m)}},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=cu(Cn().mark(function a(){var u;return Cn().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 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 oJ(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 H2(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oJ(Object(n),!0).forEach(function(a){US(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function US(t,r,n){return(r=mDe(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function mDe(t){var r=EDe(t,"string");return Og(r)=="symbol"?r:r+""}function EDe(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(r==="string"?String:Number)(t)}function Ri(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Ri=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(x,C,L,P){return Object.defineProperty(x,C,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,C,L,P){var Y=C&&C.prototype instanceof p?C:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,C,L){try{return{type:"normal",arg:x.call(C,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,O=D&&D(D($([])));O&&O!==n&&a.call(O,s)&&(m=O);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(C){d(x,C,function(L){return this._invoke(C,L)})})}function A(x,C){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&Og(K)=="object"&&a.call(K,"__await")?C.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):C.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new C(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,C){var L=C.method,P=x.i[L];if(P===t)return C.delegate=null,L==="throw"&&x.i.return&&(C.method="return",C.arg=t,w(x,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,C.arg);if(Y.type==="throw")return C.method="throw",C.arg=Y.arg,C.delegate=null,y;var B=Y.arg;return B?B.done?(C[x.r]=B.value,C.next=x.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var C=x[4]||{};C.type="normal",C.arg=t,x[4]=C}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var C=x[s];if(C)return C.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(Og(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var C=typeof x=="function"&&x.constructor;return!!C&&(C===N||(C.displayName||C.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,C,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,C,L,P),Y);return r.isGeneratorFunction(C)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var C=Object(x),L=[];for(var P in C)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in C)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(C){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(F),!C)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function P(K){J.type="throw",J.arg=C,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(C,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=C,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===C)return this.complete(P[4],P[3]),F(P),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===C){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,P){return this.delegate={i:$(C),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function uJ(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 Pl(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){uJ(s,a,u,c,f,"next",d)}function f(d){uJ(s,a,u,c,f,"throw",d)}c(void 0)})}}var DDe=PS.create("store_idv"),TDe=function(r,n){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Pl(Ri().mark(function s(){var c;return Ri().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new vDe,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 Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!((c=n().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){p.next=3;break}return p.next=3,(f=n().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return p.next=5,n().wasmService.prepareAndConnect(u);case 5:if(d=p.sent,M=null,d.code===4&&(M=yg.HTTP_ISSUE),d.code!==0&&d.code!==4&&(M=yg.PROVIDER_ERROR),M===null){p.next=12;break}return I=new c2({errorCode:M}),p.abrupt("return",{error:I});case 12:return p.abrupt("return",{});case 13:case"end":return p.stop()}},s)}))()},connectByUrl:function(u){return Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=n().wasmService,p.next=3,c.connectByUrl(u);case 3:if(f=p.sent,d=null,f.code===4&&(d=yg.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=yg.PROVIDER_ERROR),d===null){p.next=13;break}return M=new c2({errorCode:d}),I=new Wy({errorCode:L5.CONNECTION_ISSUE,underlyingBaseError:M}),p.abrupt("return",{workflows:[],error:I});case 13:return p.abrupt("return",{workflows:f.data});case 14:case"end":return p.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=H2(H2({},f.results),{},{sessionId:M}),y=H2({results:I},f.error&&{error:f.error});n().setCurrentSessionDataLsAndStore(null),u(y)};r(function(){return{workflowSessionCompletion:s}})},loadModules:function(){var a=Pl(Ri().mark(function s(){var c,f,d,M;return Ri().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=n().externalModulesNames,y.prev=1,y.next=4,jDe(c);case 4:return f=y.sent,r(function(){return{externalModules:f}}),y.abrupt("return",{});case 9:return y.prev=9,y.t0=y.catch(1),(d=n().wasmService)===null||d===void 0||d.shutdown(),n().resetWasmService(),n().resetProps(),M=new l2({errorCode:K0.MODULES_INSTANTIATION_FAILURE}),y.abrupt("return",{error:M});case 16:case"end":return y.stop()}},s,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var s=YE(u.find(function(c){return c.templateId===w5}));s.templateLayout=xF(s.templateLayout,n().layout),r({processingTransformedTemplate:s})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Pl(Ri().mark(function s(c,f){var d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return d=null,M=function(){var N=Pl(Ri().mark(function v(){var m,D,O,j;return Ri().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,n().wasmService.pushData(c,f);case 2:if(m=A.sent,D=null,m.code===4&&(D=ol.HTTP_ISSUE),m.code!==0&&m.code!==4&&(D=ol.PROVIDER_ERROR),D!==null&&(O=new v4({errorCode:ol.HTTP_ISSUE}),j=new vo({errorCode:No.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:O}),d=j),m.code!==0){A.next=12;break}return d=null,A.abrupt("return",m);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},v)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},p.next=5,FE(M,I);case 5:return p.abrupt("return",d?{error:d}:{});case 6:case"end":return p.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=Pl(Ri().mark(function s(){var c,f,d,M,I;return Ri().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return c=null,f=function(){var N=Pl(Ri().mark(function v(){var m,D,O,j,S,A,w,R,F,H,$,x,C,L;return Ri().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,n().wasmService.getSessionState();case 2:if(j=Y.sent,S=(m=j.data)===null||m===void 0?void 0:m.currentStep,A=(D=j.data)===null||D===void 0?void 0:D.isProcessingFiles,w=(O=j.data)===null||O===void 0||(O=O.workflow)===null||O===void 0?void 0:O.steps,R=uhe(w,S),F=j.code===4,H=j.code!==0&&j.code!==4,$=j.code===0&&(!j.data.workflow||!j.data.currentStep),x=null,w&&!R&&(x=ol.NOT_DATA_TYPE),F&&(x=ol.HTTP_ISSUE),H&&(x=ol.PROVIDER_ERROR),A&&(x=ol.IS_PROCESSING),$&&(x=ol.DECODING_FAILED),x!==null&&(C=new v4({errorCode:x}),L=new vo({errorCode:No.INTERNAL_ISSUE,underlyingBaseError:C}),c=L),DDe(JSON.stringify({nextStep:S,isDataType:R,isProcessingFiles:A})),!(R&&!A&&!F&&!H&&!$)){Y.next=21;break}return c=null,Y.abrupt("return",j.data);case 21:return Y.abrupt("return",null);case 22:case"end":return Y.stop()}},v)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},p.next=5,FE(f,d);case 5:if(M=p.sent,!c){p.next=8;break}return p.abrupt("return",{error:c});case 8:if(!M){p.next=10;break}return p.abrupt("return",{sessionData:M});case 10:return c=new v4({errorCode:ol.DECODING_FAILED}),I=new vo({errorCode:No.INTERNAL_ISSUE,underlyingBaseError:c}),p.abrupt("return",{error:I});case 13:case"end":return p.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:Z0.MESSAGE,message:W0.DID_END_SESSION,module:"IDV"}))}},pushStepWaitNextStepAndSet:function(){var a=Pl(Ri().mark(function s(c){var f,d,M,I,y,p,N,v,m;return Ri().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(f=n().currentStepId,f){O.next=3;break}return O.abrupt("return");case 3:if(n().setIsProcessing(!0),!n().isFinalWaitingUi){O.next=7;break}return n().setFinalStepAndStopProcess(),O.abrupt("return");case 7:if(!(c instanceof Wn)){O.next=13;break}return d=c,M=new vo({errorCode:No.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),n().workflowSessionCompletion({error:M}),n().resetSession(),O.abrupt("return");case 13:return O.next=15,n()._pushStep(f,c);case 15:if(I=O.sent,!I.error){O.next=20;break}return n().workflowSessionCompletion({error:I.error}),n().resetSession(),O.abrupt("return");case 20:return O.next=22,n()._waitingForNextStep();case 22:if(y=O.sent,!y.error){O.next=27;break}return n().workflowSessionCompletion({error:y.error}),n().resetSession(),O.abrupt("return");case 27:if(p=y.sessionData.workflow,N=y.sessionData.currentStep,n().setWorkflow(p),n().setLayout(p.client.layout),n().setProcessingTemplate(p.client.steps),n().setSessionProperties(y.sessionData.properties),v=n()._findStepById(N),m=function(S){return!!S&&Object.prototype.toString.call(S)==="[object Object]"&&S.templateId},!(v!=null&&v.final&&!m(v.client))){O.next=38;break}return n().setFinalStepAndStopProcess(v.id),O.abrupt("return");case 38:v!=null&&v.final&&m(v.client)&&n().setFinalWaitingUi(!0),n().onChangeScreen(N),n().setIsProcessing(!1);case 41:case"end":return O.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===w5&&n().processingTransformedTemplate!==null){var d=n().processingTransformedTemplate;d&&(f={templateId:d.templateId,templateLayout:d.templateLayout,dataSource:null})}else{var M,I,y=n()._findStepById(u);if(typeof(y==null||(M=y.client)===null||M===void 0?void 0:M.templateId)=="string"){var p;f=H2(H2({},y==null?void 0:y.client),{},{templateId:y.client.templateId,dataSource:(p=y.dataSource)!==null&&p!==void 0?p: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&&dhe(y==null||(I=y.client)===null||I===void 0?void 0:I.templateLayout)){var v=xF(y.client.templateLayout,n().layout);v&&(f.templateLayout=v)}}var m=ohe(n().externalModules,s.steps,u);if(f===null||!m){var D=new vo({errorCode:No.UNKNOWN_STEP,message:"Unsupported step template"});n().workflowSessionCompletion({error:D}),r(function(){return{currentScreenConfig:null}}),n().resetSession();return}n().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Pl(Ri().mark(function s(){var c,f;return Ri().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 jDe(t){return YS.apply(this,arguments)}function YS(){return YS=Pl(Ri().mark(function t(r){var n,a,u,s,c,f;return Ri().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:n=[{id:Yf.getIdentifier(),supportedTemplates:Yf.getSupportedTemplates(),component:Yf}],a=US(US({},x5.LIVENESS,function(){return Promise.resolve().then(()=>Drt)}),x5.DOC_READER,function(){return Promise.resolve().then(()=>Z9t)}),u=Ri().mark(function I(){var y,p,N;return Ri().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(y=c[s],p=function(){return a[y]()},!p){m.next=7;break}return m.next=5,p();case 5:N=m.sent,n.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return m.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)})),YS.apply(this,arguments)}function V2(t){"@babel/helpers - typeof";return V2=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},V2(t)}function sJ(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 QS(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?sJ(Object(n),!0).forEach(function(a){SDe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function SDe(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=CDe(t,"string");return V2(r)=="symbol"?r:r+""}function CDe(t,r){if(V2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(V2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Oa=oye(function(){return QS(QS(QS({},Nhe.apply(void 0,arguments)),khe.apply(void 0,arguments)),TDe.apply(void 0,arguments))}),lJ=function(r){var n=r.children;return li.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 B2(t){"@babel/helpers - typeof";return B2=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},B2(t)}function cJ(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 fJ(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?cJ(Object(n),!0).forEach(function(a){ODe(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cJ(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function ODe(t,r,n){return(r=_De(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function _De(t){var r=xDe(t,"string");return B2(r)=="symbol"?r:r+""}function xDe(t,r){if(B2(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(B2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var LDe=function(){var r=Oa(function(N){return N.currentScreenConfig}),n=Oa(function(N){return N.pushStepWaitNextStepAndSet}),a=Oa(function(N){return N.processingTransformedTemplate}),u=Oa(function(N){return N.isProcessing}),s=Oa(function(N){return N.setIsProcessing}),c=Oa(function(N){return N.listener}),f=Oa(function(N){return N.externalModules}),d=Oa(function(N){return N.modulesConfig}),M=function(v,m){c({eventType:Z0.MESSAGE,message:m,module:v})},I=function(v){s(v)},y=function(v){s(!1),n(v)},p=Tr.useCallback(function(){if(!r)return null;var N=f.find(function(v){return v.supportedTemplates.includes(r.templateId)});if(N&&r)return li.jsx(N.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:M,isProcessing:I})},[r,f]);return!r&&!a?li.jsx(G5,{direction:Fy.Ltr,children:li.jsx(lJ,{children:"Waiting for play... or process completed"})}):li.jsx(li.Fragment,{children:li.jsx(G5,{direction:Fy.Ltr,children:li.jsxs(li.Fragment,{children:[u&&li.jsx(lJ,{children:a?li.jsx(Yf,{perform:y,moduleProps:fJ(fJ({},a),{},{templateId:"PROGRESS"}),idvEventListener:M,isProcessing:I}):"Processing..."}),p()]})})})};function wDe(){return li.jsx(Tr.StrictMode,{children:li.jsx(Ppe,{children:li.jsx(LDe,{})})})}function k4(t){"@babel/helpers - typeof";return k4=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},k4(t)}function bDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function dJ(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,gJ(a.key),a)}}function kDe(t,r,n){return r&&dJ(t.prototype,r),n&&dJ(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function RDe(t,r,n){return r=Z2(r),zDe(t,$S()?Reflect.construct(r,[],Z2(t).constructor):r.apply(t,n))}function zDe(t,r){if(r&&(k4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PDe(t)}function PDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function UDe(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&&G2(t,r)}function FS(t){var r=typeof Map=="function"?new Map:void 0;return FS=function(a){if(a===null||!QDe(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 YDe(a,arguments,Z2(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),G2(u,a)},FS(t)}function YDe(t,r,n){if($S())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return n&&G2(u,n.prototype),u}function $S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return($S=function(){return!!t})()}function QDe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function G2(t,r){return G2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},G2(t,r)}function Z2(t){return Z2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Z2(t)}function MJ(t,r,n){return(r=gJ(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function gJ(t){var r=FDe(t,"string");return k4(r)=="symbol"?r:r+""}function FDe(t,r){if(k4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(k4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $De="*,::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%}",IJ=function(t){function r(){var n;return bDe(this,r),n=RDe(this,r),MJ(n,"_root",ope.createRoot(n.attachShadow({mode:"open"}))),MJ(n,"_mounted",!1),n}return UDe(r,t),kDe(r,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat("2.4.158-rc".trim())}},{key:"render",value:function(){this._root.render(li.jsxs("div",{part:"idv",className:"idv",style:{backgroundColor:"white",height:"100%"},children:[li.jsx("style",{nonce:Oa.getState().getNonce(),children:$De}),li.jsx(wDe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount(),PS.cleanLogs())})}}],[{key:"observedAttributes",get:function(){return[]}}])}(FS(HTMLElement));function _g(t){"@babel/helpers - typeof";return _g=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},_g(t)}function Gs(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */Gs=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(x,C,L,P){return Object.defineProperty(x,C,{value:L,enumerable:!P,configurable:!P,writable:!P})}try{d({},"")}catch(x){d=function(L,P,Y){return L[P]=Y}}function M(x,C,L,P){var Y=C&&C.prototype instanceof p?C:p,B=Object.create(Y.prototype);return d(B,"_invoke",function(J,te,k){var G=1;return function(K,b){if(G===3)throw Error("Generator is already running");if(G===4){if(K==="throw")throw b;return{value:t,done:!0}}for(k.method=K,k.arg=b;;){var W=k.delegate;if(W){var he=w(W,k);if(he){if(he===y)continue;return he}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(G===1)throw G=4,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);G=3;var pe=I(J,te,k);if(pe.type==="normal"){if(G=k.done?4:2,pe.arg===y)continue;return{value:pe.arg,done:k.done}}pe.type==="throw"&&(G=4,k.method="throw",k.arg=pe.arg)}}}(x,L,new H(P||[])),!0),B}function I(x,C,L){try{return{type:"normal",arg:x.call(C,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=M;var y={};function p(){}function N(){}function v(){}var m={};d(m,s,function(){return this});var D=Object.getPrototypeOf,O=D&&D(D($([])));O&&O!==n&&a.call(O,s)&&(m=O);var j=v.prototype=p.prototype=Object.create(m);function S(x){["next","throw","return"].forEach(function(C){d(x,C,function(L){return this._invoke(C,L)})})}function A(x,C){function L(Y,B,J,te){var k=I(x[Y],x,B);if(k.type!=="throw"){var G=k.arg,K=G.value;return K&&_g(K)=="object"&&a.call(K,"__await")?C.resolve(K.__await).then(function(b){L("next",b,J,te)},function(b){L("throw",b,J,te)}):C.resolve(K).then(function(b){G.value=b,J(G)},function(b){return L("throw",b,J,te)})}te(k.arg)}var P;d(this,"_invoke",function(Y,B){function J(){return new C(function(te,k){L(Y,B,te,k)})}return P=P?P.then(J,J):J()},!0)}function w(x,C){var L=C.method,P=x.i[L];if(P===t)return C.delegate=null,L==="throw"&&x.i.return&&(C.method="return",C.arg=t,w(x,C),C.method==="throw")||L!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+L+"' method")),y;var Y=I(P,x.i,C.arg);if(Y.type==="throw")return C.method="throw",C.arg=Y.arg,C.delegate=null,y;var B=Y.arg;return B?B.done?(C[x.r]=B.value,C.next=x.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,y):B:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,y)}function R(x){this.tryEntries.push(x)}function F(x){var C=x[4]||{};C.type="normal",C.arg=t,x[4]=C}function H(x){this.tryEntries=[[-1]],x.forEach(R,this),this.reset(!0)}function $(x){if(x!=null){var C=x[s];if(C)return C.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,P=function Y(){for(;++L<x.length;)if(a.call(x,L))return Y.value=x[L],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return P.next=P}}throw new TypeError(_g(x)+" is not iterable")}return N.prototype=v,d(j,"constructor",v),d(v,"constructor",N),N.displayName=d(v,f,"GeneratorFunction"),r.isGeneratorFunction=function(x){var C=typeof x=="function"&&x.constructor;return!!C&&(C===N||(C.displayName||C.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,v):(x.__proto__=v,d(x,f,"GeneratorFunction")),x.prototype=Object.create(j),x},r.awrap=function(x){return{__await:x}},S(A.prototype),d(A.prototype,c,function(){return this}),r.AsyncIterator=A,r.async=function(x,C,L,P,Y){Y===void 0&&(Y=Promise);var B=new A(M(x,C,L,P),Y);return r.isGeneratorFunction(C)?B:B.next().then(function(J){return J.done?J.value:B.next()})},S(j),d(j,f,"Generator"),d(j,s,function(){return this}),d(j,"toString",function(){return"[object Generator]"}),r.keys=function(x){var C=Object(x),L=[];for(var P in C)L.unshift(P);return function Y(){for(;L.length;)if((P=L.pop())in C)return Y.value=P,Y.done=!1,Y;return Y.done=!0,Y}},r.values=$,H.prototype={constructor:H,reset:function(C){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(F),!C)for(var L in this)L.charAt(0)==="t"&&a.call(this,L)&&!isNaN(+L.slice(1))&&(this[L]=t)},stop:function(){this.done=!0;var C=this.tryEntries[0][4];if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var L=this;function P(K){J.type="throw",J.arg=C,L.next=K}for(var Y=L.tryEntries.length-1;Y>=0;--Y){var B=this.tryEntries[Y],J=B[4],te=this.prev,k=B[1],G=B[2];if(B[0]===-1)return P("end"),!1;if(!k&&!G)throw Error("try statement without catch or finally");if(B[0]!=null&&B[0]<=te){if(te<k)return this.method="next",this.arg=t,P(k),!0;if(te<G)return P(G),!1}}},abrupt:function(C,L){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y[0]>-1&&Y[0]<=this.prev&&this.prev<Y[2]){var B=Y;break}}B&&(C==="break"||C==="continue")&&B[0]<=L&&L<=B[2]&&(B=null);var J=B?B[4]:{};return J.type=C,J.arg=L,B?(this.method="next",this.next=B[2],y):this.complete(J)},complete:function(C,L){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&L&&(this.next=L),y},finish:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[2]===C)return this.complete(P[4],P[3]),F(P),y}},catch:function(C){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P[0]===C){var Y=P[4];if(Y.type==="throw"){var B=Y.arg;F(P)}return B}}throw Error("illegal catch attempt")},delegateYield:function(C,L,P){return this.delegate={i:$(C),r:L,n:P},this.method==="next"&&(this.arg=t),y}},r}function pJ(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 R4(t){return function(){var r=this,n=arguments;return new Promise(function(a,u){var s=t.apply(r,n);function c(d){pJ(s,a,u,c,f,"next",d)}function f(d){pJ(s,a,u,c,f,"throw",d)}c(void 0)})}}function HDe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function VDe(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,GDe(a.key),a)}}function BDe(t,r,n){return r&&VDe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function GDe(t){var r=ZDe(t,"string");return _g(r)=="symbol"?r:r+""}function ZDe(t,r){if(_g(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(_g(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var WDe=function(){function t(){HDe(this,t)}return BDe(t,[{key:"initialize",value:function(){var r=R4(Gs().mark(function a(u){var s;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=Oa.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=R4(Gs().mark(function a(u){var s,c;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,Oa.getState().configure(u);case 3:return s=d.sent,d.abrupt("return",s);case 5:return d.next=7,Oa.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=R4(Gs().mark(function a(u){var s;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,Oa.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=R4(Gs().mark(function a(u){var s,c;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=u.workflowId,d.next=3,Oa.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=R4(Gs().mark(function a(u){var s,c,f,d;return Gs().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=Ihe(s),I.next=5,Oa.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(y){var p=function(v){y(v)};Oa.getState().playWorkflow(p)}));case 9:case"end":return I.stop()}},a)}));function n(a){return r.apply(this,arguments)}return n}()},{key:"deinitialize",value:function(){var r=R4(Gs().mark(function a(){var u;return Gs().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Oa.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.4.158-rc")!==null&&n!==void 0?n:"Version unavailable. Something went wrong"}},{key:"nonce",set:function(n){Oa.getState().setNonce(n)}},{key:"eventListener",set:function(n){if(!n||typeof n!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Oa.getState().setListener(n)}},{key:"sessionRestoreMode",set:function(n){Oa.getState().setSessionRestoreMode(n)}}])}(),KDe=window.customElements.get("idv-flow");KDe||window.customElements.define("idv-flow",IJ);var qDe=Object.defineProperty,JDe=Object.defineProperties,XDe=Object.getOwnPropertyDescriptors,yJ=Object.getOwnPropertySymbols,eTe=Object.prototype.hasOwnProperty,tTe=Object.prototype.propertyIsEnumerable,hJ=(t,r,n)=>r in t?qDe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,HS=(t,r)=>{for(var n in r||(r={}))eTe.call(r,n)&&hJ(t,n,r[n]);if(yJ)for(var n of yJ(r))tTe.call(r,n)&&hJ(t,n,r[n]);return t},NJ=(t,r)=>JDe(t,XDe(r)),jo=(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())}),vJ=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function mJ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var EJ={exports:{}},W2={},DJ={exports:{}},Jr={},TJ;function rTe(){if(TJ)return Jr;TJ=1;/**
77
77
  * @license React
78
78
  * react.production.min.js
79
79
  *
@@ -178,7 +178,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
178
178
  }
179
179
  </style>
180
180
  <slot />
181
- `}};const grt=window.customElements.get("face-capture"),Irt=window.customElements.get("face-liveness"),prt=window.customElements.get("fullscreen-container");grt||window.customElements.define("face-capture",Ztt),Irt||window.customElements.define("face-liveness",lrt),prt||window.customElements.define("fullscreen-container",Mrt);var yrt={SYNCHRONOUS_UPLOAD:1},Jae={ERROR:0,OK:1},hrt=["LANDSCAPE_MODE_RESTRICTED","TIMEOUT_ERROR","CHANGE_CAMERA","DEVICE_ROTATE","APP_INACTIVE"],Xae=(t=>(t.LIVENESS="LIVENESS",t))(Xae||{}),e3="IDV_FACE",Z6=(t=>(t[t.NO_INITIALIZED=0]="NO_INITIALIZED",t[t.UNKNOWN_STEP=1]="UNKNOWN_STEP",t[t.LIVENESS_ERROR=2]="LIVENESS_ERROR",t))(Z6||{}),W6=(t=>(t[t.CONFIGURATION_FAILED=0]="CONFIGURATION_FAILED",t[t.INTERNAL_ERROR=1]="INTERNAL_ERROR",t[t.PRESENTER_UNAVAILABLE=2]="PRESENTER_UNAVAILABLE",t))(W6||{});function G4(t){"@babel/helpers - typeof";return G4=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},G4(t)}function eoe(t,r,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function toe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function roe(t,r,n){return r=t3(r),Nrt(t,noe()?Reflect.construct(r,n||[],t3(t).constructor):r.apply(t,n))}function Nrt(t,r){if(r&&(G4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vrt(t)}function vrt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function noe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(noe=function(){return!!t})()}function t3(t){return t3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},t3(t)}function ioe(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&&K6(t,r)}function K6(t,r){return K6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},K6(t,r)}function Z4(t,r,n){return(r=mrt(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function mrt(t){var r=Ert(t,"string");return G4(r)=="symbol"?r:r+""}function Ert(t,r){if(G4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(G4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var r3=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;toe(this,r);var f=Wn.getErrorKey(a,Z6);return roe(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 ioe(r,t),eoe(r)}(Wn);Z4(r3,"MODULE",e3),Z4(r3,"ERROR_ENUM_NAME","FaceModuleError"),Z4(r3,"SHORT_CODE","FM");var n3=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;toe(this,r);var f=Wn.getErrorKey(a,W6);return roe(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 ioe(r,t),eoe(r)}(Wn);Z4(n3,"MODULE",e3),Z4(n3,"ERROR_ENUM_NAME","LivenessError"),Z4(n3,"SHORT_CODE","FML");var q6=!1,Fg=function(r){var n=r.moduleProps,a=r.perform,u=r.idvEventListener,s=r.isProcessing,c=n.config,f=n.serviceURL,d=n.templateId,M=n.recordingProcess,I=n.sessionId,y=n.serviceToken,p=Tr.useRef(null),N=Tr.useRef(null),v=Tr.useRef(!1),m=function(O){var j,S=O.detail,A=(S==null||(j=S.data)===null||j===void 0?void 0:j.transactionId)||"";if(S.action==="PROCESS_FINISHED"){var w,R,F,H;if(v.current)return;if((w=O.detail.data)!==null&&w!==void 0&&w.reason&&((R=O.detail.data)===null||R===void 0?void 0:R.status)===Jae.ERROR&&!hrt.includes(O.detail.data.reason)){var $=O.detail.data.reason,x=new n3({errorCode:W6.INTERNAL_ERROR,underlyingError:"ErrorTypes."+$}),C=new r3({errorCode:Z6.LIVENESS_ERROR,underlyingBaseError:x});a(C)}if(((F=S.data)===null||F===void 0?void 0:F.status)===Jae.OK&&(H=S.data)!==null&&H!==void 0&&H.response){var L=S.data.response.code===0;if(L){s&&s(!0);var P=S.data.response.transactionId;a({transactionId:P,cancel:!1}),v.current=!0;return}}}if(S.action==="RETRY_COUNTER_EXCEEDED"){s&&s(!0),a({transactionId:A,cancel:!1}),v.current=!0;return}(S==null?void 0:S.action)==="CLOSE"&&a({transactionId:A,cancel:!0})};return Tr.useEffect(function(){u(d,{action:"Face Liveness is ready"});var D=p.current;return D&&D.addEventListener("face-liveness",m),function(){D&&D.removeEventListener("face-liveness",m)}},[]),Tr.useEffect(function(){var D=N.current;D&&(console.info("%cFace Liveness web component version: %s","color: #6e56b0;",D.version),D.settings={url:f||"https://dev-idv.regulaforensics.com/faceapi",locale:"en",startScreen:!0,copyright:!0,headers:{Authorization:"Connection ".concat(y)},tag:I,retryCount:c==null?void 0:c.attemptsCount,recordingProcess:M||yrt.SYNCHRONOUS_UPLOAD,customization:{}})},[]),li.jsx("div",{style:{height:"100%"},ref:p,children:li.jsx("face-liveness",{ref:N})})};Fg.getSupportedTemplates=function(){return[Xae.LIVENESS]},Fg.getIdentifier=function(){return e3},Fg.isReady=function(){return q6},Fg.deinitialize=function(){q6=!1},Fg.initialize=function(t){q6=!0},Fg.displayName=e3;const Drt=Object.freeze(Object.defineProperty({__proto__:null,default:Fg},Symbol.toStringTag,{value:"Module"}));var Trt=Object.defineProperty,jrt=Object.defineProperties,Srt=Object.getOwnPropertyDescriptors,aoe=Object.getOwnPropertySymbols,Art=Object.prototype.hasOwnProperty,Crt=Object.prototype.propertyIsEnumerable,W4=(t,r)=>(r=Symbol[t])?r:Symbol.for("Symbol."+t),Ort=t=>{throw TypeError(t)},ooe=(t,r,n)=>r in t?Trt(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,Bt=(t,r)=>{for(var n in r||(r={}))Art.call(r,n)&&ooe(t,n,r[n]);if(aoe)for(var n of aoe(r))Crt.call(r,n)&&ooe(t,n,r[n]);return t},vl=(t,r)=>jrt(t,Srt(r)),Jt=(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())}),K4=function(t,r){this[0]=t,this[1]=r},uoe=(t,r,n)=>{var a=(c,f,d,M)=>{try{var I=n[c](f),y=(f=I.value)instanceof K4,p=I.done;Promise.resolve(y?f[0]:f).then(N=>y?a(c==="return"?c:"next",f[1]?{done:N.done,value:N.value}:N,d,M):d({value:N,done:p})).catch(N=>a("throw",N,d,M))}catch(N){M(N)}},u=c=>s[c]=f=>new Promise((d,M)=>a(c,f,d,M)),s={};return n=n.apply(t,r),s[W4("asyncIterator")]=()=>s,u("next"),u("throw"),u("return"),s},soe=t=>{var r=t[W4("asyncIterator")],n=!1,a,u={};return r==null?(r=t[W4("iterator")](),a=s=>u[s]=c=>r[s](c)):(r=r.call(t),a=s=>u[s]=c=>{if(n){if(n=!1,s==="throw")throw c;return c}return n=!0,{done:!1,value:new K4(new Promise(f=>{var d=r[s](c);d instanceof Object||Ort("Object expected"),f(d)}),1)}}),u[W4("iterator")]=()=>u,a("next"),"throw"in r?a("throw"):u.throw=s=>{throw s},"return"in r&&a("return"),u},_rt=(t,r,n)=>(r=t[W4("asyncIterator")])?r.call(t):(t=t[W4("iterator")](),r={},n=(a,u)=>(u=t[a])&&(r[a]=s=>new Promise((c,f,d)=>(s=u.call(t,s),d=s.done,Promise.resolve(s.value).then(M=>c({value:M,done:d}),f)))),n("next"),n("return"),r),q4=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function gI(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var loe={},II,coe;function Sn(){if(coe)return II;coe=1;var t=function(r){return r&&r.Math===Math&&r};return II=t(typeof globalThis=="object"&&globalThis)||t(typeof window=="object"&&window)||t(typeof self=="object"&&self)||t(typeof q4=="object"&&q4)||t(typeof II=="object"&&II)||function(){return this}()||Function("return this")(),II}var foe,doe;function xrt(){return doe||(doe=1,foe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),foe}var J6,Moe;function Gi(){if(Moe)return J6;Moe=1;var t=typeof document=="object"&&document.all;return J6=typeof t=="undefined"&&t!==void 0?function(r){return typeof r=="function"||r===t}:function(r){return typeof r=="function"},J6}var X6,goe;function Eu(){if(goe)return X6;goe=1;var t=Gi();return X6=function(r){return typeof r=="object"?r!==null:t(r)},X6}var e_,Ioe;function t_(){if(Ioe)return e_;Ioe=1;var t=Sn(),r=Eu(),n=t.document,a=r(n)&&r(n.createElement);return e_=function(u){return a?n.createElement(u):{}},e_}var r_,poe;function Lrt(){if(poe)return r_;poe=1;var t=t_(),r=t("span").classList,n=r&&r.constructor&&r.constructor.prototype;return r_=n===Object.prototype?void 0:n,r_}var yoe,hoe;function Ln(){return hoe||(hoe=1,yoe=function(t){try{return!!t()}catch(r){return!0}}),yoe}var n_,Noe;function i3(){if(Noe)return n_;Noe=1;var t=Ln();return n_=!t(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),n_}var i_,voe;function pn(){if(voe)return i_;voe=1;var t=i3(),r=Function.prototype,n=r.call,a=t&&r.bind.bind(n,n);return i_=t?a:function(u){return function(){return n.apply(u,arguments)}},i_}var a_,moe;function V1(){if(moe)return a_;moe=1;var t=pn(),r=t({}.toString),n=t("".slice);return a_=function(a){return n(r(a),8,-1)},a_}var o_,Eoe;function a3(){if(Eoe)return o_;Eoe=1;var t=pn(),r=Ln(),n=V1(),a=Object,u=t("".split);return o_=r(function(){return!a("z").propertyIsEnumerable(0)})?function(s){return n(s)==="String"?u(s,""):a(s)}:a,o_}var Doe,Toe;function o3(){return Toe||(Toe=1,Doe=function(t){return t==null}),Doe}var u_,joe;function J4(){if(joe)return u_;joe=1;var t=o3(),r=TypeError;return u_=function(n){if(t(n))throw new r("Can't call method on "+n);return n},u_}var s_,Soe;function pI(){if(Soe)return s_;Soe=1;var t=a3(),r=J4();return s_=function(n){return t(r(n))},s_}var l_={exports:{}},Aoe,Coe;function m1(){return Coe||(Coe=1,Aoe=!1),Aoe}var c_,Ooe;function f_(){if(Ooe)return c_;Ooe=1;var t=Sn(),r=Object.defineProperty;return c_=function(n,a){try{r(t,n,{value:a,configurable:!0,writable:!0})}catch(u){t[n]=a}return a},c_}var _oe;function d_(){if(_oe)return l_.exports;_oe=1;var t=m1(),r=Sn(),n=f_(),a="__core-js_shared__",u=l_.exports=r[a]||n(a,{});return(u.versions||(u.versions=[])).push({version:"3.40.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"}),l_.exports}var M_,xoe;function g_(){if(xoe)return M_;xoe=1;var t=d_();return M_=function(r,n){return t[r]||(t[r]=n||{})},M_}var I_,Loe;function ml(){if(Loe)return I_;Loe=1;var t=J4(),r=Object;return I_=function(n){return r(t(n))},I_}var p_,woe;function Du(){if(woe)return p_;woe=1;var t=pn(),r=ml(),n=t({}.hasOwnProperty);return p_=Object.hasOwn||function(a,u){return n(r(a),u)},p_}var y_,boe;function h_(){if(boe)return y_;boe=1;var t=pn(),r=0,n=Math.random(),a=t(1 .toString);return y_=function(u){return"Symbol("+(u===void 0?"":u)+")_"+a(++r+n,36)},y_}var N_,koe;function yI(){if(koe)return N_;koe=1;var t=Sn(),r=t.navigator,n=r&&r.userAgent;return N_=n?String(n):"",N_}var v_,Roe;function u3(){if(Roe)return v_;Roe=1;var t=Sn(),r=yI(),n=t.process,a=t.Deno,u=n&&n.versions||a&&a.version,s=u&&u.v8,c,f;return s&&(c=s.split("."),f=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!f&&r&&(c=r.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=r.match(/Chrome\/(\d+)/),c&&(f=+c[1]))),v_=f,v_}var m_,zoe;function E_(){if(zoe)return m_;zoe=1;var t=u3(),r=Ln(),n=Sn(),a=n.String;return m_=!!Object.getOwnPropertySymbols&&!r(function(){var u=Symbol("symbol detection");return!a(u)||!(Object(u)instanceof Symbol)||!Symbol.sham&&t&&t<41}),m_}var D_,Poe;function Uoe(){if(Poe)return D_;Poe=1;var t=E_();return D_=t&&!Symbol.sham&&typeof Symbol.iterator=="symbol",D_}var T_,Yoe;function _a(){if(Yoe)return T_;Yoe=1;var t=Sn(),r=g_(),n=Du(),a=h_(),u=E_(),s=Uoe(),c=t.Symbol,f=r("wks"),d=s?c.for||c:c&&c.withoutSetter||a;return T_=function(M){return n(f,M)||(f[M]=u&&n(c,M)?c[M]:d("Symbol."+M)),f[M]},T_}var j_,Qoe;function ja(){if(Qoe)return j_;Qoe=1;var t=Eu(),r=String,n=TypeError;return j_=function(a){if(t(a))return a;throw new n(r(a)+" is not an object")},j_}var S_={},A_,Foe;function Yi(){if(Foe)return A_;Foe=1;var t=Ln();return A_=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),A_}var C_,$oe;function Hoe(){if($oe)return C_;$oe=1;var t=Yi(),r=Ln();return C_=t&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),C_}var O_={},__,Voe;function Boe(){if(Voe)return __;Voe=1;var t=Yi(),r=Ln(),n=t_();return __=!t&&!r(function(){return Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a!==7}),__}var x_,Goe;function Zi(){if(Goe)return x_;Goe=1;var t=i3(),r=Function.prototype.call;return x_=t?r.bind(r):function(){return r.apply(r,arguments)},x_}var L_,Zoe;function B1(){if(Zoe)return L_;Zoe=1;var t=Sn(),r=Gi(),n=function(a){return r(a)?a:void 0};return L_=function(a,u){return arguments.length<2?n(t[a]):t[a]&&t[a][u]},L_}var w_,Woe;function X4(){if(Woe)return w_;Woe=1;var t=pn();return w_=t({}.isPrototypeOf),w_}var b_,Koe;function s3(){if(Koe)return b_;Koe=1;var t=B1(),r=Gi(),n=X4(),a=Uoe(),u=Object;return b_=a?function(s){return typeof s=="symbol"}:function(s){var c=t("Symbol");return r(c)&&n(c.prototype,u(s))},b_}var k_,qoe;function e0(){if(qoe)return k_;qoe=1;var t=String;return k_=function(r){try{return t(r)}catch(n){return"Object"}},k_}var R_,Joe;function wu(){if(Joe)return R_;Joe=1;var t=Gi(),r=e0(),n=TypeError;return R_=function(a){if(t(a))return a;throw new n(r(a)+" is not a function")},R_}var z_,Xoe;function hI(){if(Xoe)return z_;Xoe=1;var t=wu(),r=o3();return z_=function(n,a){var u=n[a];return r(u)?void 0:t(u)},z_}var P_,eue;function wrt(){if(eue)return P_;eue=1;var t=Zi(),r=Gi(),n=Eu(),a=TypeError;return P_=function(u,s){var c,f;if(s==="string"&&r(c=u.toString)&&!n(f=t(c,u))||r(c=u.valueOf)&&!n(f=t(c,u))||s!=="string"&&r(c=u.toString)&&!n(f=t(c,u)))return f;throw new a("Can't convert object to primitive value")},P_}var U_,tue;function rue(){if(tue)return U_;tue=1;var t=Zi(),r=Eu(),n=s3(),a=hI(),u=wrt(),s=_a(),c=TypeError,f=s("toPrimitive");return U_=function(d,M){if(!r(d)||n(d))return d;var I=a(d,f),y;if(I){if(M===void 0&&(M="default"),y=t(I,d,M),!r(y)||n(y))return y;throw new c("Can't convert object to primitive value")}return M===void 0&&(M="number"),u(d,M)},U_}var Y_,nue;function Q_(){if(nue)return Y_;nue=1;var t=rue(),r=s3();return Y_=function(n){var a=t(n,"string");return r(a)?a:a+""},Y_}var iue;function $l(){if(iue)return O_;iue=1;var t=Yi(),r=Boe(),n=Hoe(),a=ja(),u=Q_(),s=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,d="enumerable",M="configurable",I="writable";return O_.f=t?n?function(y,p,N){if(a(y),p=u(p),a(N),typeof y=="function"&&p==="prototype"&&"value"in N&&I in N&&!N[I]){var v=f(y,p);v&&v[I]&&(y[p]=N.value,N={configurable:M in N?N[M]:v[M],enumerable:d in N?N[d]:v[d],writable:!1})}return c(y,p,N)}:c:function(y,p,N){if(a(y),p=u(p),a(N),r)try{return c(y,p,N)}catch(v){}if("get"in N||"set"in N)throw new s("Accessors not supported");return"value"in N&&(y[p]=N.value),y},O_}var F_,aue;function brt(){if(aue)return F_;aue=1;var t=Math.ceil,r=Math.floor;return F_=Math.trunc||function(n){var a=+n;return(a>0?r:t)(a)},F_}var $_,oue;function Bf(){if(oue)return $_;oue=1;var t=brt();return $_=function(r){var n=+r;return n!==n||n===0?0:t(n)},$_}var H_,uue;function l3(){if(uue)return H_;uue=1;var t=Bf(),r=Math.max,n=Math.min;return H_=function(a,u){var s=t(a);return s<0?r(s+u,0):n(s,u)},H_}var V_,sue;function t0(){if(sue)return V_;sue=1;var t=Bf(),r=Math.min;return V_=function(n){var a=t(n);return a>0?r(a,9007199254740991):0},V_}var B_,lue;function bu(){if(lue)return B_;lue=1;var t=t0();return B_=function(r){return t(r.length)},B_}var G_,cue;function krt(){if(cue)return G_;cue=1;var t=pI(),r=l3(),n=bu(),a=function(u){return function(s,c,f){var d=t(s),M=n(d);if(M===0)return!u&&-1;var I=r(f,M),y;if(u&&c!==c){for(;M>I;)if(y=d[I++],y!==y)return!0}else for(;M>I;I++)if((u||I in d)&&d[I]===c)return u||I||0;return!u&&-1}};return G_={includes:a(!0),indexOf:a(!1)},G_}var fue,due;function Z_(){return due||(due=1,fue={}),fue}var W_,Mue;function gue(){if(Mue)return W_;Mue=1;var t=pn(),r=Du(),n=pI(),a=krt().indexOf,u=Z_(),s=t([].push);return W_=function(c,f){var d=n(c),M=0,I=[],y;for(y in d)!r(u,y)&&r(d,y)&&s(I,y);for(;f.length>M;)r(d,y=f[M++])&&(~a(I,y)||s(I,y));return I},W_}var Iue,pue;function K_(){return pue||(pue=1,Iue=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Iue}var q_,yue;function hue(){if(yue)return q_;yue=1;var t=gue(),r=K_();return q_=Object.keys||function(n){return t(n,r)},q_}var Nue;function Rrt(){if(Nue)return S_;Nue=1;var t=Yi(),r=Hoe(),n=$l(),a=ja(),u=pI(),s=hue();return S_.f=t&&!r?Object.defineProperties:function(c,f){a(c);for(var d=u(f),M=s(f),I=M.length,y=0,p;I>y;)n.f(c,p=M[y++],d[p]);return c},S_}var J_,vue;function zrt(){if(vue)return J_;vue=1;var t=B1();return J_=t("document","documentElement"),J_}var X_,mue;function e8(){if(mue)return X_;mue=1;var t=g_(),r=h_(),n=t("keys");return X_=function(a){return n[a]||(n[a]=r(a))},X_}var t8,Eue;function $g(){if(Eue)return t8;Eue=1;var t=ja(),r=Rrt(),n=K_(),a=Z_(),u=zrt(),s=t_(),c=e8(),f=">",d="<",M="prototype",I="script",y=c("IE_PROTO"),p=function(){},N=function(j){return d+I+f+j+d+"/"+I+f},v=function(j){j.write(N("")),j.close();var S=j.parentWindow.Object;return j=null,S},m=function(){var j=s("iframe"),S="java"+I+":",A;return j.style.display="none",u.appendChild(j),j.src=String(S),A=j.contentWindow.document,A.open(),A.write(N("document.F=Object")),A.close(),A.F},D,O=function(){try{D=new ActiveXObject("htmlfile")}catch(S){}O=typeof document!="undefined"?document.domain&&D?v(D):m():v(D);for(var j=n.length;j--;)delete O[M][n[j]];return O()};return a[y]=!0,t8=Object.create||function(j,S){var A;return j!==null?(p[M]=t(j),A=new p,p[M]=null,A[y]=j):A=O(),S===void 0?A:r.f(A,S)},t8}var r8,Due;function Prt(){if(Due)return r8;Due=1;var t=_a(),r=$g(),n=$l().f,a=t("unscopables"),u=Array.prototype;return u[a]===void 0&&n(u,a,{configurable:!0,value:r(null)}),r8=function(s){u[a][s]=!0},r8}var Tue,jue;function NI(){return jue||(jue=1,Tue={}),Tue}var n8,Sue;function Urt(){if(Sue)return n8;Sue=1;var t=Sn(),r=Gi(),n=t.WeakMap;return n8=r(n)&&/native code/.test(String(n)),n8}var Aue,Cue;function Hg(){return Cue||(Cue=1,Aue=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}}),Aue}var i8,Oue;function El(){if(Oue)return i8;Oue=1;var t=Yi(),r=$l(),n=Hg();return i8=t?function(a,u,s){return r.f(a,u,n(1,s))}:function(a,u,s){return a[u]=s,a},i8}var a8,_ue;function Gf(){if(_ue)return a8;_ue=1;var t=Urt(),r=Sn(),n=Eu(),a=El(),u=Du(),s=d_(),c=e8(),f=Z_(),d="Object already initialized",M=r.TypeError,I=r.WeakMap,y,p,N,v=function(j){return N(j)?p(j):y(j,{})},m=function(j){return function(S){var A;if(!n(S)||(A=p(S)).type!==j)throw new M("Incompatible receiver, "+j+" required");return A}};if(t||s.state){var D=s.state||(s.state=new I);D.get=D.get,D.has=D.has,D.set=D.set,y=function(j,S){if(D.has(j))throw new M(d);return S.facade=j,D.set(j,S),S},p=function(j){return D.get(j)||{}},N=function(j){return D.has(j)}}else{var O=c("state");f[O]=!0,y=function(j,S){if(u(j,O))throw new M(d);return S.facade=j,a(j,O,S),S},p=function(j){return u(j,O)?j[O]:{}},N=function(j){return u(j,O)}}return a8={set:y,get:p,has:N,enforce:v,getterFor:m},a8}var o8={},u8={},xue;function Lue(){if(xue)return u8;xue=1;var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!t.call({1:2},1);return u8.f=n?function(a){var u=r(this,a);return!!u&&u.enumerable}:t,u8}var wue;function s8(){if(wue)return o8;wue=1;var t=Yi(),r=Zi(),n=Lue(),a=Hg(),u=pI(),s=Q_(),c=Du(),f=Boe(),d=Object.getOwnPropertyDescriptor;return o8.f=t?d:function(M,I){if(M=u(M),I=s(I),f)try{return d(M,I)}catch(y){}if(c(M,I))return a(!r(n.f,M,I),M[I])},o8}var l8={exports:{}},c8,bue;function c3(){if(bue)return c8;bue=1;var t=Yi(),r=Du(),n=Function.prototype,a=t&&Object.getOwnPropertyDescriptor,u=r(n,"name"),s=u&&function(){}.name==="something",c=u&&(!t||t&&a(n,"name").configurable);return c8={EXISTS:u,PROPER:s,CONFIGURABLE:c},c8}var f8,kue;function Rue(){if(kue)return f8;kue=1;var t=pn(),r=Gi(),n=d_(),a=t(Function.toString);return r(n.inspectSource)||(n.inspectSource=function(u){return a(u)}),f8=n.inspectSource,f8}var zue;function Pue(){if(zue)return l8.exports;zue=1;var t=pn(),r=Ln(),n=Gi(),a=Du(),u=Yi(),s=c3().CONFIGURABLE,c=Rue(),f=Gf(),d=f.enforce,M=f.get,I=String,y=Object.defineProperty,p=t("".slice),N=t("".replace),v=t([].join),m=u&&!r(function(){return y(function(){},"length",{value:8}).length!==8}),D=String(String).split("String"),O=l8.exports=function(j,S,A){p(I(S),0,7)==="Symbol("&&(S="["+N(I(S),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(S="get "+S),A&&A.setter&&(S="set "+S),(!a(j,"name")||s&&j.name!==S)&&(u?y(j,"name",{value:S,configurable:!0}):j.name=S),m&&A&&a(A,"arity")&&j.length!==A.arity&&y(j,"length",{value:A.arity});try{A&&a(A,"constructor")&&A.constructor?u&&y(j,"prototype",{writable:!1}):j.prototype&&(j.prototype=void 0)}catch(R){}var w=d(j);return a(w,"source")||(w.source=v(D,typeof S=="string"?S:"")),j};return Function.prototype.toString=O(function(){return n(this)&&M(this).source||c(this)},"toString"),l8.exports}var d8,Uue;function Zf(){if(Uue)return d8;Uue=1;var t=Gi(),r=$l(),n=Pue(),a=f_();return d8=function(u,s,c,f){f||(f={});var d=f.enumerable,M=f.name!==void 0?f.name:s;if(t(c)&&n(c,M,f),f.global)d?u[s]=c:a(s,c);else{try{f.unsafe?u[s]&&(d=!0):delete u[s]}catch(I){}d?u[s]=c:r.f(u,s,{value:c,enumerable:!1,configurable:!f.nonConfigurable,writable:!f.nonWritable})}return u},d8}var M8={},Yue;function Que(){if(Yue)return M8;Yue=1;var t=gue(),r=K_(),n=r.concat("length","prototype");return M8.f=Object.getOwnPropertyNames||function(a){return t(a,n)},M8}var Fue={},$ue;function Hue(){return $ue||($ue=1,Fue.f=Object.getOwnPropertySymbols),Fue}var g8,Vue;function Yrt(){if(Vue)return g8;Vue=1;var t=B1(),r=pn(),n=Que(),a=Hue(),u=ja(),s=r([].concat);return g8=t("Reflect","ownKeys")||function(c){var f=n.f(u(c)),d=a.f;return d?s(f,d(c)):f},g8}var I8,Bue;function p8(){if(Bue)return I8;Bue=1;var t=Du(),r=Yrt(),n=s8(),a=$l();return I8=function(u,s,c){for(var f=r(s),d=a.f,M=n.f,I=0;I<f.length;I++){var y=f[I];!t(u,y)&&!(c&&t(c,y))&&d(u,y,M(s,y))}},I8}var y8,Gue;function Qrt(){if(Gue)return y8;Gue=1;var t=Ln(),r=Gi(),n=/#|\.prototype\./,a=function(d,M){var I=s[u(d)];return I===f?!0:I===c?!1:r(M)?t(M):!!M},u=a.normalize=function(d){return String(d).replace(n,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";return y8=a,y8}var h8,Zue;function Qi(){if(Zue)return h8;Zue=1;var t=Sn(),r=s8().f,n=El(),a=Zf(),u=f_(),s=p8(),c=Qrt();return h8=function(f,d){var M=f.target,I=f.global,y=f.stat,p,N,v,m,D,O;if(I?N=t:y?N=t[M]||u(M,{}):N=t[M]&&t[M].prototype,N)for(v in d){if(D=d[v],f.dontCallGetSet?(O=r(N,v),m=O&&O.value):m=N[v],p=c(I?v:M+(y?".":"#")+v,f.forced),!p&&m!==void 0){if(typeof D==typeof m)continue;s(D,m)}(f.sham||m&&m.sham)&&n(D,"sham",!0),a(N,v,D,f)}},h8}var N8,Wue;function Frt(){if(Wue)return N8;Wue=1;var t=Ln();return N8=!t(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),N8}var v8,Kue;function vI(){if(Kue)return v8;Kue=1;var t=Du(),r=Gi(),n=ml(),a=e8(),u=Frt(),s=a("IE_PROTO"),c=Object,f=c.prototype;return v8=u?c.getPrototypeOf:function(d){var M=n(d);if(t(M,s))return M[s];var I=M.constructor;return r(I)&&M instanceof I?I.prototype:M instanceof c?f:null},v8}var m8,que;function f3(){if(que)return m8;que=1;var t=Ln(),r=Gi(),n=Eu(),a=$g(),u=vI(),s=Zf(),c=_a(),f=m1(),d=c("iterator"),M=!1,I,y,p;[].keys&&(p=[].keys(),"next"in p?(y=u(u(p)),y!==Object.prototype&&(I=y)):M=!0);var N=!n(I)||t(function(){var v={};return I[d].call(v)!==v});return N?I={}:f&&(I=a(I)),r(I[d])||s(I,d,function(){return this}),m8={IteratorPrototype:I,BUGGY_SAFARI_ITERATORS:M},m8}var E8,Jue;function r0(){if(Jue)return E8;Jue=1;var t=$l().f,r=Du(),n=_a(),a=n("toStringTag");return E8=function(u,s,c){u&&!c&&(u=u.prototype),u&&!r(u,a)&&t(u,a,{configurable:!0,value:s})},E8}var D8,Xue;function ese(){if(Xue)return D8;Xue=1;var t=f3().IteratorPrototype,r=$g(),n=Hg(),a=r0(),u=NI(),s=function(){return this};return D8=function(c,f,d,M){var I=f+" Iterator";return c.prototype=r(t,{next:n(+!M,d)}),a(c,I,!1,!0),u[I]=s,c},D8}var T8,tse;function j8(){if(tse)return T8;tse=1;var t=pn(),r=wu();return T8=function(n,a,u){try{return t(r(Object.getOwnPropertyDescriptor(n,a)[u]))}catch(s){}},T8}var S8,rse;function $rt(){if(rse)return S8;rse=1;var t=Eu();return S8=function(r){return t(r)||r===null},S8}var A8,nse;function Hrt(){if(nse)return A8;nse=1;var t=$rt(),r=String,n=TypeError;return A8=function(a){if(t(a))return a;throw new n("Can't set "+r(a)+" as a prototype")},A8}var C8,ise;function n0(){if(ise)return C8;ise=1;var t=j8(),r=Eu(),n=J4(),a=Hrt();return C8=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,s={},c;try{c=t(Object.prototype,"__proto__","set"),c(s,[]),u=s instanceof Array}catch(f){}return function(f,d){return n(f),a(d),r(f)&&(u?c(f,d):f.__proto__=d),f}}():void 0),C8}var O8,ase;function ose(){if(ase)return O8;ase=1;var t=Qi(),r=Zi(),n=m1(),a=c3(),u=Gi(),s=ese(),c=vI(),f=n0(),d=r0(),M=El(),I=Zf(),y=_a(),p=NI(),N=f3(),v=a.PROPER,m=a.CONFIGURABLE,D=N.IteratorPrototype,O=N.BUGGY_SAFARI_ITERATORS,j=y("iterator"),S="keys",A="values",w="entries",R=function(){return this};return O8=function(F,H,$,x,C,L,P){s($,H,x);var Y=function(pe){if(pe===C&&G)return G;if(!O&&pe&&pe in te)return te[pe];switch(pe){case S:return function(){return new $(this,pe)};case A:return function(){return new $(this,pe)};case w:return function(){return new $(this,pe)}}return function(){return new $(this)}},B=H+" Iterator",J=!1,te=F.prototype,k=te[j]||te["@@iterator"]||C&&te[C],G=!O&&k||Y(C),K=H==="Array"&&te.entries||k,b,W,he;if(K&&(b=c(K.call(new F)),b!==Object.prototype&&b.next&&(!n&&c(b)!==D&&(f?f(b,D):u(b[j])||I(b,j,R)),d(b,B,!0,!0),n&&(p[B]=R))),v&&C===A&&k&&k.name!==A&&(!n&&m?M(te,"name",A):(J=!0,G=function(){return r(k,this)})),C)if(W={values:Y(A),keys:L?G:Y(S),entries:Y(w)},P)for(he in W)(O||J||!(he in te))&&I(te,he,W[he]);else t({target:H,proto:!0,forced:O||J},W);return(!n||P)&&te[j]!==G&&I(te,j,G,{name:C}),p[H]=G,W},O8}var use,sse;function d3(){return sse||(sse=1,use=function(t,r){return{value:t,done:r}}),use}var _8,lse;function cse(){if(lse)return _8;lse=1;var t=pI(),r=Prt(),n=NI(),a=Gf(),u=$l().f,s=ose(),c=d3(),f=m1(),d=Yi(),M="Array Iterator",I=a.set,y=a.getterFor(M);_8=s(Array,"Array",function(N,v){I(this,{type:M,target:t(N),index:0,kind:v})},function(){var N=y(this),v=N.target,m=N.index++;if(!v||m>=v.length)return N.target=null,c(void 0,!0);switch(N.kind){case"keys":return c(m,!1);case"values":return c(v[m],!1)}return c([m,v[m]],!1)},"values");var p=n.Arguments=n.Array;if(r("keys"),r("values"),r("entries"),!f&&d&&p.name!=="values")try{u(p,"name",{value:"values"})}catch(N){}return _8}var fse;function Vrt(){if(fse)return loe;fse=1;var t=Sn(),r=xrt(),n=Lrt(),a=cse(),u=El(),s=r0(),c=_a(),f=c("iterator"),d=a.values,M=function(y,p){if(y){if(y[f]!==d)try{u(y,f,d)}catch(v){y[f]=d}if(s(y,p,!0),r[p]){for(var N in a)if(y[N]!==a[N])try{u(y,N,a[N])}catch(v){y[N]=a[N]}}}};for(var I in r)M(t[I]&&t[I].prototype,I);return M(n,"DOMTokenList"),loe}Vrt();var dse={exports:{}},mI={},Mse={exports:{}},Xr={},gse;function Brt(){if(gse)return Xr;gse=1;/**
181
+ `}};const grt=window.customElements.get("face-capture"),Irt=window.customElements.get("face-liveness"),prt=window.customElements.get("fullscreen-container");grt||window.customElements.define("face-capture",Ztt),Irt||window.customElements.define("face-liveness",lrt),prt||window.customElements.define("fullscreen-container",Mrt);var yrt={SYNCHRONOUS_UPLOAD:1},Jae={ERROR:0,OK:1},hrt=["LANDSCAPE_MODE_RESTRICTED","TIMEOUT_ERROR","CHANGE_CAMERA","DEVICE_ROTATE","APP_INACTIVE"],Xae=(t=>(t.LIVENESS="LIVENESS",t))(Xae||{}),e3="IDV_FACE",Z6=(t=>(t[t.NO_INITIALIZED=0]="NO_INITIALIZED",t[t.UNKNOWN_STEP=1]="UNKNOWN_STEP",t[t.LIVENESS_ERROR=2]="LIVENESS_ERROR",t))(Z6||{}),W6=(t=>(t[t.CONFIGURATION_FAILED=0]="CONFIGURATION_FAILED",t[t.INTERNAL_ERROR=1]="INTERNAL_ERROR",t[t.PRESENTER_UNAVAILABLE=2]="PRESENTER_UNAVAILABLE",t))(W6||{});function G4(t){"@babel/helpers - typeof";return G4=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},G4(t)}function eoe(t,r,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function toe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function roe(t,r,n){return r=t3(r),Nrt(t,noe()?Reflect.construct(r,n||[],t3(t).constructor):r.apply(t,n))}function Nrt(t,r){if(r&&(G4(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vrt(t)}function vrt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function noe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(noe=function(){return!!t})()}function t3(t){return t3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},t3(t)}function ioe(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&&K6(t,r)}function K6(t,r){return K6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},K6(t,r)}function Z4(t,r,n){return(r=mrt(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function mrt(t){var r=Ert(t,"string");return G4(r)=="symbol"?r:r+""}function Ert(t,r){if(G4(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(G4(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var r3=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;toe(this,r);var f=Wn.getErrorKey(a,Z6);return roe(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 ioe(r,t),eoe(r)}(Wn);Z4(r3,"MODULE",e3),Z4(r3,"ERROR_ENUM_NAME","FaceModuleError"),Z4(r3,"SHORT_CODE","FM");var n3=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;toe(this,r);var f=Wn.getErrorKey(a,W6);return roe(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 ioe(r,t),eoe(r)}(Wn);Z4(n3,"MODULE",e3),Z4(n3,"ERROR_ENUM_NAME","LivenessError"),Z4(n3,"SHORT_CODE","FML");var q6=!1,Fg=function(r){var n=r.moduleProps,a=r.perform,u=r.idvEventListener,s=r.isProcessing,c=n.config,f=n.serviceURL,d=n.templateId,M=n.recordingProcess,I=n.sessionId,y=n.serviceToken,p=Tr.useRef(null),N=Tr.useRef(null),v=Tr.useRef(!1),m=function(O){var j,S=O.detail,A=(S==null||(j=S.data)===null||j===void 0?void 0:j.transactionId)||"";if(S.action==="PROCESS_FINISHED"){var w,R,F,H;if(v.current)return;if((w=O.detail.data)!==null&&w!==void 0&&w.reason&&((R=O.detail.data)===null||R===void 0?void 0:R.status)===Jae.ERROR&&!hrt.includes(O.detail.data.reason)){var $=O.detail.data.reason,x=new n3({errorCode:W6.INTERNAL_ERROR,underlyingError:"ErrorTypes."+$}),C=new r3({errorCode:Z6.LIVENESS_ERROR,underlyingBaseError:x});a(C)}if(((F=S.data)===null||F===void 0?void 0:F.status)===Jae.OK&&(H=S.data)!==null&&H!==void 0&&H.response){var L=S.data.response.code===0;if(L){s&&s(!0);var P=S.data.response.transactionId;a({transactionId:P,cancel:!1}),v.current=!0;return}}}if(S.action==="RETRY_COUNTER_EXCEEDED"){s&&s(!0),a({transactionId:A,cancel:!1}),v.current=!0;return}(S==null?void 0:S.action)==="CLOSE"&&a({transactionId:A,cancel:!0})};return Tr.useEffect(function(){u(d,{action:"Face Liveness is ready"});var D=p.current;return D&&D.addEventListener("face-liveness",m),function(){D&&D.removeEventListener("face-liveness",m)}},[]),Tr.useEffect(function(){var D=N.current;D&&(console.info("%cFace Liveness web component version: %s","color: #6e56b0;",D.version),D.settings={url:f||"https://dev-idv.regulaforensics.com/faceapi",startScreen:!0,copyright:!0,headers:{Authorization:"Connection ".concat(y)},tag:I,retryCount:c==null?void 0:c.attemptsCount,recordingProcess:M||yrt.SYNCHRONOUS_UPLOAD,customization:{}})},[]),li.jsx("div",{style:{height:"100%"},ref:p,children:li.jsx("face-liveness",{ref:N})})};Fg.getSupportedTemplates=function(){return[Xae.LIVENESS]},Fg.getIdentifier=function(){return e3},Fg.isReady=function(){return q6},Fg.deinitialize=function(){q6=!1},Fg.initialize=function(t){q6=!0},Fg.displayName=e3;const Drt=Object.freeze(Object.defineProperty({__proto__:null,default:Fg},Symbol.toStringTag,{value:"Module"}));var Trt=Object.defineProperty,jrt=Object.defineProperties,Srt=Object.getOwnPropertyDescriptors,aoe=Object.getOwnPropertySymbols,Art=Object.prototype.hasOwnProperty,Crt=Object.prototype.propertyIsEnumerable,W4=(t,r)=>(r=Symbol[t])?r:Symbol.for("Symbol."+t),Ort=t=>{throw TypeError(t)},ooe=(t,r,n)=>r in t?Trt(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,Bt=(t,r)=>{for(var n in r||(r={}))Art.call(r,n)&&ooe(t,n,r[n]);if(aoe)for(var n of aoe(r))Crt.call(r,n)&&ooe(t,n,r[n]);return t},vl=(t,r)=>jrt(t,Srt(r)),Jt=(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())}),K4=function(t,r){this[0]=t,this[1]=r},uoe=(t,r,n)=>{var a=(c,f,d,M)=>{try{var I=n[c](f),y=(f=I.value)instanceof K4,p=I.done;Promise.resolve(y?f[0]:f).then(N=>y?a(c==="return"?c:"next",f[1]?{done:N.done,value:N.value}:N,d,M):d({value:N,done:p})).catch(N=>a("throw",N,d,M))}catch(N){M(N)}},u=c=>s[c]=f=>new Promise((d,M)=>a(c,f,d,M)),s={};return n=n.apply(t,r),s[W4("asyncIterator")]=()=>s,u("next"),u("throw"),u("return"),s},soe=t=>{var r=t[W4("asyncIterator")],n=!1,a,u={};return r==null?(r=t[W4("iterator")](),a=s=>u[s]=c=>r[s](c)):(r=r.call(t),a=s=>u[s]=c=>{if(n){if(n=!1,s==="throw")throw c;return c}return n=!0,{done:!1,value:new K4(new Promise(f=>{var d=r[s](c);d instanceof Object||Ort("Object expected"),f(d)}),1)}}),u[W4("iterator")]=()=>u,a("next"),"throw"in r?a("throw"):u.throw=s=>{throw s},"return"in r&&a("return"),u},_rt=(t,r,n)=>(r=t[W4("asyncIterator")])?r.call(t):(t=t[W4("iterator")](),r={},n=(a,u)=>(u=t[a])&&(r[a]=s=>new Promise((c,f,d)=>(s=u.call(t,s),d=s.done,Promise.resolve(s.value).then(M=>c({value:M,done:d}),f)))),n("next"),n("return"),r),q4=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function gI(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var loe={},II,coe;function Sn(){if(coe)return II;coe=1;var t=function(r){return r&&r.Math===Math&&r};return II=t(typeof globalThis=="object"&&globalThis)||t(typeof window=="object"&&window)||t(typeof self=="object"&&self)||t(typeof q4=="object"&&q4)||t(typeof II=="object"&&II)||function(){return this}()||Function("return this")(),II}var foe,doe;function xrt(){return doe||(doe=1,foe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),foe}var J6,Moe;function Gi(){if(Moe)return J6;Moe=1;var t=typeof document=="object"&&document.all;return J6=typeof t=="undefined"&&t!==void 0?function(r){return typeof r=="function"||r===t}:function(r){return typeof r=="function"},J6}var X6,goe;function Eu(){if(goe)return X6;goe=1;var t=Gi();return X6=function(r){return typeof r=="object"?r!==null:t(r)},X6}var e_,Ioe;function t_(){if(Ioe)return e_;Ioe=1;var t=Sn(),r=Eu(),n=t.document,a=r(n)&&r(n.createElement);return e_=function(u){return a?n.createElement(u):{}},e_}var r_,poe;function Lrt(){if(poe)return r_;poe=1;var t=t_(),r=t("span").classList,n=r&&r.constructor&&r.constructor.prototype;return r_=n===Object.prototype?void 0:n,r_}var yoe,hoe;function Ln(){return hoe||(hoe=1,yoe=function(t){try{return!!t()}catch(r){return!0}}),yoe}var n_,Noe;function i3(){if(Noe)return n_;Noe=1;var t=Ln();return n_=!t(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),n_}var i_,voe;function pn(){if(voe)return i_;voe=1;var t=i3(),r=Function.prototype,n=r.call,a=t&&r.bind.bind(n,n);return i_=t?a:function(u){return function(){return n.apply(u,arguments)}},i_}var a_,moe;function V1(){if(moe)return a_;moe=1;var t=pn(),r=t({}.toString),n=t("".slice);return a_=function(a){return n(r(a),8,-1)},a_}var o_,Eoe;function a3(){if(Eoe)return o_;Eoe=1;var t=pn(),r=Ln(),n=V1(),a=Object,u=t("".split);return o_=r(function(){return!a("z").propertyIsEnumerable(0)})?function(s){return n(s)==="String"?u(s,""):a(s)}:a,o_}var Doe,Toe;function o3(){return Toe||(Toe=1,Doe=function(t){return t==null}),Doe}var u_,joe;function J4(){if(joe)return u_;joe=1;var t=o3(),r=TypeError;return u_=function(n){if(t(n))throw new r("Can't call method on "+n);return n},u_}var s_,Soe;function pI(){if(Soe)return s_;Soe=1;var t=a3(),r=J4();return s_=function(n){return t(r(n))},s_}var l_={exports:{}},Aoe,Coe;function m1(){return Coe||(Coe=1,Aoe=!1),Aoe}var c_,Ooe;function f_(){if(Ooe)return c_;Ooe=1;var t=Sn(),r=Object.defineProperty;return c_=function(n,a){try{r(t,n,{value:a,configurable:!0,writable:!0})}catch(u){t[n]=a}return a},c_}var _oe;function d_(){if(_oe)return l_.exports;_oe=1;var t=m1(),r=Sn(),n=f_(),a="__core-js_shared__",u=l_.exports=r[a]||n(a,{});return(u.versions||(u.versions=[])).push({version:"3.40.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"}),l_.exports}var M_,xoe;function g_(){if(xoe)return M_;xoe=1;var t=d_();return M_=function(r,n){return t[r]||(t[r]=n||{})},M_}var I_,Loe;function ml(){if(Loe)return I_;Loe=1;var t=J4(),r=Object;return I_=function(n){return r(t(n))},I_}var p_,woe;function Du(){if(woe)return p_;woe=1;var t=pn(),r=ml(),n=t({}.hasOwnProperty);return p_=Object.hasOwn||function(a,u){return n(r(a),u)},p_}var y_,boe;function h_(){if(boe)return y_;boe=1;var t=pn(),r=0,n=Math.random(),a=t(1 .toString);return y_=function(u){return"Symbol("+(u===void 0?"":u)+")_"+a(++r+n,36)},y_}var N_,koe;function yI(){if(koe)return N_;koe=1;var t=Sn(),r=t.navigator,n=r&&r.userAgent;return N_=n?String(n):"",N_}var v_,Roe;function u3(){if(Roe)return v_;Roe=1;var t=Sn(),r=yI(),n=t.process,a=t.Deno,u=n&&n.versions||a&&a.version,s=u&&u.v8,c,f;return s&&(c=s.split("."),f=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!f&&r&&(c=r.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=r.match(/Chrome\/(\d+)/),c&&(f=+c[1]))),v_=f,v_}var m_,zoe;function E_(){if(zoe)return m_;zoe=1;var t=u3(),r=Ln(),n=Sn(),a=n.String;return m_=!!Object.getOwnPropertySymbols&&!r(function(){var u=Symbol("symbol detection");return!a(u)||!(Object(u)instanceof Symbol)||!Symbol.sham&&t&&t<41}),m_}var D_,Poe;function Uoe(){if(Poe)return D_;Poe=1;var t=E_();return D_=t&&!Symbol.sham&&typeof Symbol.iterator=="symbol",D_}var T_,Yoe;function _a(){if(Yoe)return T_;Yoe=1;var t=Sn(),r=g_(),n=Du(),a=h_(),u=E_(),s=Uoe(),c=t.Symbol,f=r("wks"),d=s?c.for||c:c&&c.withoutSetter||a;return T_=function(M){return n(f,M)||(f[M]=u&&n(c,M)?c[M]:d("Symbol."+M)),f[M]},T_}var j_,Qoe;function ja(){if(Qoe)return j_;Qoe=1;var t=Eu(),r=String,n=TypeError;return j_=function(a){if(t(a))return a;throw new n(r(a)+" is not an object")},j_}var S_={},A_,Foe;function Yi(){if(Foe)return A_;Foe=1;var t=Ln();return A_=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),A_}var C_,$oe;function Hoe(){if($oe)return C_;$oe=1;var t=Yi(),r=Ln();return C_=t&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),C_}var O_={},__,Voe;function Boe(){if(Voe)return __;Voe=1;var t=Yi(),r=Ln(),n=t_();return __=!t&&!r(function(){return Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a!==7}),__}var x_,Goe;function Zi(){if(Goe)return x_;Goe=1;var t=i3(),r=Function.prototype.call;return x_=t?r.bind(r):function(){return r.apply(r,arguments)},x_}var L_,Zoe;function B1(){if(Zoe)return L_;Zoe=1;var t=Sn(),r=Gi(),n=function(a){return r(a)?a:void 0};return L_=function(a,u){return arguments.length<2?n(t[a]):t[a]&&t[a][u]},L_}var w_,Woe;function X4(){if(Woe)return w_;Woe=1;var t=pn();return w_=t({}.isPrototypeOf),w_}var b_,Koe;function s3(){if(Koe)return b_;Koe=1;var t=B1(),r=Gi(),n=X4(),a=Uoe(),u=Object;return b_=a?function(s){return typeof s=="symbol"}:function(s){var c=t("Symbol");return r(c)&&n(c.prototype,u(s))},b_}var k_,qoe;function e0(){if(qoe)return k_;qoe=1;var t=String;return k_=function(r){try{return t(r)}catch(n){return"Object"}},k_}var R_,Joe;function wu(){if(Joe)return R_;Joe=1;var t=Gi(),r=e0(),n=TypeError;return R_=function(a){if(t(a))return a;throw new n(r(a)+" is not a function")},R_}var z_,Xoe;function hI(){if(Xoe)return z_;Xoe=1;var t=wu(),r=o3();return z_=function(n,a){var u=n[a];return r(u)?void 0:t(u)},z_}var P_,eue;function wrt(){if(eue)return P_;eue=1;var t=Zi(),r=Gi(),n=Eu(),a=TypeError;return P_=function(u,s){var c,f;if(s==="string"&&r(c=u.toString)&&!n(f=t(c,u))||r(c=u.valueOf)&&!n(f=t(c,u))||s!=="string"&&r(c=u.toString)&&!n(f=t(c,u)))return f;throw new a("Can't convert object to primitive value")},P_}var U_,tue;function rue(){if(tue)return U_;tue=1;var t=Zi(),r=Eu(),n=s3(),a=hI(),u=wrt(),s=_a(),c=TypeError,f=s("toPrimitive");return U_=function(d,M){if(!r(d)||n(d))return d;var I=a(d,f),y;if(I){if(M===void 0&&(M="default"),y=t(I,d,M),!r(y)||n(y))return y;throw new c("Can't convert object to primitive value")}return M===void 0&&(M="number"),u(d,M)},U_}var Y_,nue;function Q_(){if(nue)return Y_;nue=1;var t=rue(),r=s3();return Y_=function(n){var a=t(n,"string");return r(a)?a:a+""},Y_}var iue;function $l(){if(iue)return O_;iue=1;var t=Yi(),r=Boe(),n=Hoe(),a=ja(),u=Q_(),s=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,d="enumerable",M="configurable",I="writable";return O_.f=t?n?function(y,p,N){if(a(y),p=u(p),a(N),typeof y=="function"&&p==="prototype"&&"value"in N&&I in N&&!N[I]){var v=f(y,p);v&&v[I]&&(y[p]=N.value,N={configurable:M in N?N[M]:v[M],enumerable:d in N?N[d]:v[d],writable:!1})}return c(y,p,N)}:c:function(y,p,N){if(a(y),p=u(p),a(N),r)try{return c(y,p,N)}catch(v){}if("get"in N||"set"in N)throw new s("Accessors not supported");return"value"in N&&(y[p]=N.value),y},O_}var F_,aue;function brt(){if(aue)return F_;aue=1;var t=Math.ceil,r=Math.floor;return F_=Math.trunc||function(n){var a=+n;return(a>0?r:t)(a)},F_}var $_,oue;function Bf(){if(oue)return $_;oue=1;var t=brt();return $_=function(r){var n=+r;return n!==n||n===0?0:t(n)},$_}var H_,uue;function l3(){if(uue)return H_;uue=1;var t=Bf(),r=Math.max,n=Math.min;return H_=function(a,u){var s=t(a);return s<0?r(s+u,0):n(s,u)},H_}var V_,sue;function t0(){if(sue)return V_;sue=1;var t=Bf(),r=Math.min;return V_=function(n){var a=t(n);return a>0?r(a,9007199254740991):0},V_}var B_,lue;function bu(){if(lue)return B_;lue=1;var t=t0();return B_=function(r){return t(r.length)},B_}var G_,cue;function krt(){if(cue)return G_;cue=1;var t=pI(),r=l3(),n=bu(),a=function(u){return function(s,c,f){var d=t(s),M=n(d);if(M===0)return!u&&-1;var I=r(f,M),y;if(u&&c!==c){for(;M>I;)if(y=d[I++],y!==y)return!0}else for(;M>I;I++)if((u||I in d)&&d[I]===c)return u||I||0;return!u&&-1}};return G_={includes:a(!0),indexOf:a(!1)},G_}var fue,due;function Z_(){return due||(due=1,fue={}),fue}var W_,Mue;function gue(){if(Mue)return W_;Mue=1;var t=pn(),r=Du(),n=pI(),a=krt().indexOf,u=Z_(),s=t([].push);return W_=function(c,f){var d=n(c),M=0,I=[],y;for(y in d)!r(u,y)&&r(d,y)&&s(I,y);for(;f.length>M;)r(d,y=f[M++])&&(~a(I,y)||s(I,y));return I},W_}var Iue,pue;function K_(){return pue||(pue=1,Iue=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Iue}var q_,yue;function hue(){if(yue)return q_;yue=1;var t=gue(),r=K_();return q_=Object.keys||function(n){return t(n,r)},q_}var Nue;function Rrt(){if(Nue)return S_;Nue=1;var t=Yi(),r=Hoe(),n=$l(),a=ja(),u=pI(),s=hue();return S_.f=t&&!r?Object.defineProperties:function(c,f){a(c);for(var d=u(f),M=s(f),I=M.length,y=0,p;I>y;)n.f(c,p=M[y++],d[p]);return c},S_}var J_,vue;function zrt(){if(vue)return J_;vue=1;var t=B1();return J_=t("document","documentElement"),J_}var X_,mue;function e8(){if(mue)return X_;mue=1;var t=g_(),r=h_(),n=t("keys");return X_=function(a){return n[a]||(n[a]=r(a))},X_}var t8,Eue;function $g(){if(Eue)return t8;Eue=1;var t=ja(),r=Rrt(),n=K_(),a=Z_(),u=zrt(),s=t_(),c=e8(),f=">",d="<",M="prototype",I="script",y=c("IE_PROTO"),p=function(){},N=function(j){return d+I+f+j+d+"/"+I+f},v=function(j){j.write(N("")),j.close();var S=j.parentWindow.Object;return j=null,S},m=function(){var j=s("iframe"),S="java"+I+":",A;return j.style.display="none",u.appendChild(j),j.src=String(S),A=j.contentWindow.document,A.open(),A.write(N("document.F=Object")),A.close(),A.F},D,O=function(){try{D=new ActiveXObject("htmlfile")}catch(S){}O=typeof document!="undefined"?document.domain&&D?v(D):m():v(D);for(var j=n.length;j--;)delete O[M][n[j]];return O()};return a[y]=!0,t8=Object.create||function(j,S){var A;return j!==null?(p[M]=t(j),A=new p,p[M]=null,A[y]=j):A=O(),S===void 0?A:r.f(A,S)},t8}var r8,Due;function Prt(){if(Due)return r8;Due=1;var t=_a(),r=$g(),n=$l().f,a=t("unscopables"),u=Array.prototype;return u[a]===void 0&&n(u,a,{configurable:!0,value:r(null)}),r8=function(s){u[a][s]=!0},r8}var Tue,jue;function NI(){return jue||(jue=1,Tue={}),Tue}var n8,Sue;function Urt(){if(Sue)return n8;Sue=1;var t=Sn(),r=Gi(),n=t.WeakMap;return n8=r(n)&&/native code/.test(String(n)),n8}var Aue,Cue;function Hg(){return Cue||(Cue=1,Aue=function(t,r){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:r}}),Aue}var i8,Oue;function El(){if(Oue)return i8;Oue=1;var t=Yi(),r=$l(),n=Hg();return i8=t?function(a,u,s){return r.f(a,u,n(1,s))}:function(a,u,s){return a[u]=s,a},i8}var a8,_ue;function Gf(){if(_ue)return a8;_ue=1;var t=Urt(),r=Sn(),n=Eu(),a=El(),u=Du(),s=d_(),c=e8(),f=Z_(),d="Object already initialized",M=r.TypeError,I=r.WeakMap,y,p,N,v=function(j){return N(j)?p(j):y(j,{})},m=function(j){return function(S){var A;if(!n(S)||(A=p(S)).type!==j)throw new M("Incompatible receiver, "+j+" required");return A}};if(t||s.state){var D=s.state||(s.state=new I);D.get=D.get,D.has=D.has,D.set=D.set,y=function(j,S){if(D.has(j))throw new M(d);return S.facade=j,D.set(j,S),S},p=function(j){return D.get(j)||{}},N=function(j){return D.has(j)}}else{var O=c("state");f[O]=!0,y=function(j,S){if(u(j,O))throw new M(d);return S.facade=j,a(j,O,S),S},p=function(j){return u(j,O)?j[O]:{}},N=function(j){return u(j,O)}}return a8={set:y,get:p,has:N,enforce:v,getterFor:m},a8}var o8={},u8={},xue;function Lue(){if(xue)return u8;xue=1;var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!t.call({1:2},1);return u8.f=n?function(a){var u=r(this,a);return!!u&&u.enumerable}:t,u8}var wue;function s8(){if(wue)return o8;wue=1;var t=Yi(),r=Zi(),n=Lue(),a=Hg(),u=pI(),s=Q_(),c=Du(),f=Boe(),d=Object.getOwnPropertyDescriptor;return o8.f=t?d:function(M,I){if(M=u(M),I=s(I),f)try{return d(M,I)}catch(y){}if(c(M,I))return a(!r(n.f,M,I),M[I])},o8}var l8={exports:{}},c8,bue;function c3(){if(bue)return c8;bue=1;var t=Yi(),r=Du(),n=Function.prototype,a=t&&Object.getOwnPropertyDescriptor,u=r(n,"name"),s=u&&function(){}.name==="something",c=u&&(!t||t&&a(n,"name").configurable);return c8={EXISTS:u,PROPER:s,CONFIGURABLE:c},c8}var f8,kue;function Rue(){if(kue)return f8;kue=1;var t=pn(),r=Gi(),n=d_(),a=t(Function.toString);return r(n.inspectSource)||(n.inspectSource=function(u){return a(u)}),f8=n.inspectSource,f8}var zue;function Pue(){if(zue)return l8.exports;zue=1;var t=pn(),r=Ln(),n=Gi(),a=Du(),u=Yi(),s=c3().CONFIGURABLE,c=Rue(),f=Gf(),d=f.enforce,M=f.get,I=String,y=Object.defineProperty,p=t("".slice),N=t("".replace),v=t([].join),m=u&&!r(function(){return y(function(){},"length",{value:8}).length!==8}),D=String(String).split("String"),O=l8.exports=function(j,S,A){p(I(S),0,7)==="Symbol("&&(S="["+N(I(S),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(S="get "+S),A&&A.setter&&(S="set "+S),(!a(j,"name")||s&&j.name!==S)&&(u?y(j,"name",{value:S,configurable:!0}):j.name=S),m&&A&&a(A,"arity")&&j.length!==A.arity&&y(j,"length",{value:A.arity});try{A&&a(A,"constructor")&&A.constructor?u&&y(j,"prototype",{writable:!1}):j.prototype&&(j.prototype=void 0)}catch(R){}var w=d(j);return a(w,"source")||(w.source=v(D,typeof S=="string"?S:"")),j};return Function.prototype.toString=O(function(){return n(this)&&M(this).source||c(this)},"toString"),l8.exports}var d8,Uue;function Zf(){if(Uue)return d8;Uue=1;var t=Gi(),r=$l(),n=Pue(),a=f_();return d8=function(u,s,c,f){f||(f={});var d=f.enumerable,M=f.name!==void 0?f.name:s;if(t(c)&&n(c,M,f),f.global)d?u[s]=c:a(s,c);else{try{f.unsafe?u[s]&&(d=!0):delete u[s]}catch(I){}d?u[s]=c:r.f(u,s,{value:c,enumerable:!1,configurable:!f.nonConfigurable,writable:!f.nonWritable})}return u},d8}var M8={},Yue;function Que(){if(Yue)return M8;Yue=1;var t=gue(),r=K_(),n=r.concat("length","prototype");return M8.f=Object.getOwnPropertyNames||function(a){return t(a,n)},M8}var Fue={},$ue;function Hue(){return $ue||($ue=1,Fue.f=Object.getOwnPropertySymbols),Fue}var g8,Vue;function Yrt(){if(Vue)return g8;Vue=1;var t=B1(),r=pn(),n=Que(),a=Hue(),u=ja(),s=r([].concat);return g8=t("Reflect","ownKeys")||function(c){var f=n.f(u(c)),d=a.f;return d?s(f,d(c)):f},g8}var I8,Bue;function p8(){if(Bue)return I8;Bue=1;var t=Du(),r=Yrt(),n=s8(),a=$l();return I8=function(u,s,c){for(var f=r(s),d=a.f,M=n.f,I=0;I<f.length;I++){var y=f[I];!t(u,y)&&!(c&&t(c,y))&&d(u,y,M(s,y))}},I8}var y8,Gue;function Qrt(){if(Gue)return y8;Gue=1;var t=Ln(),r=Gi(),n=/#|\.prototype\./,a=function(d,M){var I=s[u(d)];return I===f?!0:I===c?!1:r(M)?t(M):!!M},u=a.normalize=function(d){return String(d).replace(n,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";return y8=a,y8}var h8,Zue;function Qi(){if(Zue)return h8;Zue=1;var t=Sn(),r=s8().f,n=El(),a=Zf(),u=f_(),s=p8(),c=Qrt();return h8=function(f,d){var M=f.target,I=f.global,y=f.stat,p,N,v,m,D,O;if(I?N=t:y?N=t[M]||u(M,{}):N=t[M]&&t[M].prototype,N)for(v in d){if(D=d[v],f.dontCallGetSet?(O=r(N,v),m=O&&O.value):m=N[v],p=c(I?v:M+(y?".":"#")+v,f.forced),!p&&m!==void 0){if(typeof D==typeof m)continue;s(D,m)}(f.sham||m&&m.sham)&&n(D,"sham",!0),a(N,v,D,f)}},h8}var N8,Wue;function Frt(){if(Wue)return N8;Wue=1;var t=Ln();return N8=!t(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),N8}var v8,Kue;function vI(){if(Kue)return v8;Kue=1;var t=Du(),r=Gi(),n=ml(),a=e8(),u=Frt(),s=a("IE_PROTO"),c=Object,f=c.prototype;return v8=u?c.getPrototypeOf:function(d){var M=n(d);if(t(M,s))return M[s];var I=M.constructor;return r(I)&&M instanceof I?I.prototype:M instanceof c?f:null},v8}var m8,que;function f3(){if(que)return m8;que=1;var t=Ln(),r=Gi(),n=Eu(),a=$g(),u=vI(),s=Zf(),c=_a(),f=m1(),d=c("iterator"),M=!1,I,y,p;[].keys&&(p=[].keys(),"next"in p?(y=u(u(p)),y!==Object.prototype&&(I=y)):M=!0);var N=!n(I)||t(function(){var v={};return I[d].call(v)!==v});return N?I={}:f&&(I=a(I)),r(I[d])||s(I,d,function(){return this}),m8={IteratorPrototype:I,BUGGY_SAFARI_ITERATORS:M},m8}var E8,Jue;function r0(){if(Jue)return E8;Jue=1;var t=$l().f,r=Du(),n=_a(),a=n("toStringTag");return E8=function(u,s,c){u&&!c&&(u=u.prototype),u&&!r(u,a)&&t(u,a,{configurable:!0,value:s})},E8}var D8,Xue;function ese(){if(Xue)return D8;Xue=1;var t=f3().IteratorPrototype,r=$g(),n=Hg(),a=r0(),u=NI(),s=function(){return this};return D8=function(c,f,d,M){var I=f+" Iterator";return c.prototype=r(t,{next:n(+!M,d)}),a(c,I,!1,!0),u[I]=s,c},D8}var T8,tse;function j8(){if(tse)return T8;tse=1;var t=pn(),r=wu();return T8=function(n,a,u){try{return t(r(Object.getOwnPropertyDescriptor(n,a)[u]))}catch(s){}},T8}var S8,rse;function $rt(){if(rse)return S8;rse=1;var t=Eu();return S8=function(r){return t(r)||r===null},S8}var A8,nse;function Hrt(){if(nse)return A8;nse=1;var t=$rt(),r=String,n=TypeError;return A8=function(a){if(t(a))return a;throw new n("Can't set "+r(a)+" as a prototype")},A8}var C8,ise;function n0(){if(ise)return C8;ise=1;var t=j8(),r=Eu(),n=J4(),a=Hrt();return C8=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,s={},c;try{c=t(Object.prototype,"__proto__","set"),c(s,[]),u=s instanceof Array}catch(f){}return function(f,d){return n(f),a(d),r(f)&&(u?c(f,d):f.__proto__=d),f}}():void 0),C8}var O8,ase;function ose(){if(ase)return O8;ase=1;var t=Qi(),r=Zi(),n=m1(),a=c3(),u=Gi(),s=ese(),c=vI(),f=n0(),d=r0(),M=El(),I=Zf(),y=_a(),p=NI(),N=f3(),v=a.PROPER,m=a.CONFIGURABLE,D=N.IteratorPrototype,O=N.BUGGY_SAFARI_ITERATORS,j=y("iterator"),S="keys",A="values",w="entries",R=function(){return this};return O8=function(F,H,$,x,C,L,P){s($,H,x);var Y=function(pe){if(pe===C&&G)return G;if(!O&&pe&&pe in te)return te[pe];switch(pe){case S:return function(){return new $(this,pe)};case A:return function(){return new $(this,pe)};case w:return function(){return new $(this,pe)}}return function(){return new $(this)}},B=H+" Iterator",J=!1,te=F.prototype,k=te[j]||te["@@iterator"]||C&&te[C],G=!O&&k||Y(C),K=H==="Array"&&te.entries||k,b,W,he;if(K&&(b=c(K.call(new F)),b!==Object.prototype&&b.next&&(!n&&c(b)!==D&&(f?f(b,D):u(b[j])||I(b,j,R)),d(b,B,!0,!0),n&&(p[B]=R))),v&&C===A&&k&&k.name!==A&&(!n&&m?M(te,"name",A):(J=!0,G=function(){return r(k,this)})),C)if(W={values:Y(A),keys:L?G:Y(S),entries:Y(w)},P)for(he in W)(O||J||!(he in te))&&I(te,he,W[he]);else t({target:H,proto:!0,forced:O||J},W);return(!n||P)&&te[j]!==G&&I(te,j,G,{name:C}),p[H]=G,W},O8}var use,sse;function d3(){return sse||(sse=1,use=function(t,r){return{value:t,done:r}}),use}var _8,lse;function cse(){if(lse)return _8;lse=1;var t=pI(),r=Prt(),n=NI(),a=Gf(),u=$l().f,s=ose(),c=d3(),f=m1(),d=Yi(),M="Array Iterator",I=a.set,y=a.getterFor(M);_8=s(Array,"Array",function(N,v){I(this,{type:M,target:t(N),index:0,kind:v})},function(){var N=y(this),v=N.target,m=N.index++;if(!v||m>=v.length)return N.target=null,c(void 0,!0);switch(N.kind){case"keys":return c(m,!1);case"values":return c(v[m],!1)}return c([m,v[m]],!1)},"values");var p=n.Arguments=n.Array;if(r("keys"),r("values"),r("entries"),!f&&d&&p.name!=="values")try{u(p,"name",{value:"values"})}catch(N){}return _8}var fse;function Vrt(){if(fse)return loe;fse=1;var t=Sn(),r=xrt(),n=Lrt(),a=cse(),u=El(),s=r0(),c=_a(),f=c("iterator"),d=a.values,M=function(y,p){if(y){if(y[f]!==d)try{u(y,f,d)}catch(v){y[f]=d}if(s(y,p,!0),r[p]){for(var N in a)if(y[N]!==a[N])try{u(y,N,a[N])}catch(v){y[N]=a[N]}}}};for(var I in r)M(t[I]&&t[I].prototype,I);return M(n,"DOMTokenList"),loe}Vrt();var dse={exports:{}},mI={},Mse={exports:{}},Xr={},gse;function Brt(){if(gse)return Xr;gse=1;/**
182
182
  * @license React
183
183
  * react.production.min.js
184
184
  *
@@ -254,4 +254,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
254
254
  <slot />
255
255
  `}}var gb=function(t,r){return gb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(n[u]=a[u])},gb(t,r)};function JI(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");gb(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}function Wwt(t,r,n,a){function u(s){return s instanceof n?s:new n(function(c){c(s)})}return new(n||(n=Promise))(function(s,c){function f(I){try{M(a.next(I))}catch(y){c(y)}}function d(I){try{M(a.throw(I))}catch(y){c(y)}}function M(I){I.done?s(I.value):u(I.value).then(f,d)}M((a=a.apply(t,[])).next())})}function T2e(t,r){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,u,s,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=f(0),c.throw=f(1),c.return=f(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(M){return function(I){return d([M,I])}}function d(M){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,M[0]&&(n=0)),n;)try{if(a=1,u&&(s=M[0]&2?u.return:M[0]?u.throw||((s=u.return)&&s.call(u),0):u.next)&&!(s=s.call(u,M[1])).done)return s;switch(u=0,s&&(M=[M[0]&2,s.value]),M[0]){case 0:case 1:s=M;break;case 4:return n.label++,{value:M[1],done:!1};case 5:n.label++,u=M[1],M=[0];continue;case 7:M=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(M[0]===6||M[0]===2)){n=0;continue}if(M[0]===3&&(!s||M[1]>s[0]&&M[1]<s[3])){n.label=M[1];break}if(M[0]===6&&n.label<s[1]){n.label=s[1],s=M;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(M);break}s[2]&&n.ops.pop(),n.trys.pop();continue}M=r.call(t,n)}catch(I){M=[6,I],u=0}finally{a=s=0}if(M[0]&5)throw M[1];return{value:M[0]?M[1]:void 0,done:!0}}}function j0(t){var r=typeof Symbol=="function"&&Symbol.iterator,n=r&&t[r],a=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ib(t,r){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var a=n.call(t),u,s=[],c;try{for(;(r===void 0||r-- >0)&&!(u=a.next()).done;)s.push(u.value)}catch(f){c={error:f}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(c)throw c.error}}return s}function pb(t,r,n){if(arguments.length===2)for(var a=0,u=r.length,s;a<u;a++)(s||!(a in r))&&(s||(s=Array.prototype.slice.call(r,0,a)),s[a]=r[a]);return t.concat(s||Array.prototype.slice.call(r))}function S0(t){return this instanceof S0?(this.v=t,this):new S0(t)}function Kwt(t,r,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=n.apply(t,r||[]),u,s=[];return u=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),f("next"),f("throw"),f("return",c),u[Symbol.asyncIterator]=function(){return this},u;function c(N){return function(v){return Promise.resolve(v).then(N,y)}}function f(N,v){a[N]&&(u[N]=function(m){return new Promise(function(D,O){s.push([N,m,D,O])>1||d(N,m)})},v&&(u[N]=v(u[N])))}function d(N,v){try{M(a[N](v))}catch(m){p(s[0][3],m)}}function M(N){N.value instanceof S0?Promise.resolve(N.value.v).then(I,y):p(s[0][2],N)}function I(N){d("next",N)}function y(N){d("throw",N)}function p(N,v){N(v),s.shift(),s.length&&d(s[0][0],s[0][1])}}function qwt(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t[Symbol.asyncIterator],n;return r?r.call(t):(t=typeof j0=="function"?j0(t):t[Symbol.iterator](),n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n);function a(s){n[s]=t[s]&&function(c){return new Promise(function(f,d){c=t[s](c),u(f,d,c.done,c.value)})}}function u(s,c,f,d){Promise.resolve(d).then(function(M){s({value:M,done:f})},c)}}function go(t){return typeof t=="function"}function j2e(t){var r=function(a){Error.call(a),a.stack=new Error().stack},n=t(r);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var yb=j2e(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
256
256
  `+r.map(function(n,a){return a+1+") "+n.toString()}).join(`
257
- `):"",this.name="UnsubscriptionError",this.errors=r}});function hb(t,r){if(t){var n=t.indexOf(r);0<=n&&t.splice(n,1)}}var cN=function(){function t(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var r,n,a,u,s;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=j0(c),d=f.next();!d.done;d=f.next()){var M=d.value;M.remove(this)}}catch(m){r={error:m}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}else c.remove(this);var I=this.initialTeardown;if(go(I))try{I()}catch(m){s=m instanceof yb?m.errors:[m]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var p=j0(y),N=p.next();!N.done;N=p.next()){var v=N.value;try{C2e(v)}catch(m){s=s!=null?s:[],m instanceof yb?s=pb(pb([],Ib(s)),Ib(m.errors)):s.push(m)}}}catch(m){a={error:m}}finally{try{N&&!N.done&&(u=p.return)&&u.call(p)}finally{if(a)throw a.error}}}if(s)throw new yb(s)}},t.prototype.add=function(r){var n;if(r&&r!==this)if(this.closed)C2e(r);else{if(r instanceof t){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(r)}},t.prototype._hasParent=function(r){var n=this._parentage;return n===r||Array.isArray(n)&&n.includes(r)},t.prototype._addParent=function(r){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(r),n):n?[n,r]:r},t.prototype._removeParent=function(r){var n=this._parentage;n===r?this._parentage=null:Array.isArray(n)&&hb(n,r)},t.prototype.remove=function(r){var n=this._finalizers;n&&hb(n,r),r instanceof t&&r._removeParent(this)},t.EMPTY=function(){var r=new t;return r.closed=!0,r}(),t}(),S2e=cN.EMPTY;function A2e(t){return t instanceof cN||t&&"closed"in t&&go(t.remove)&&go(t.add)&&go(t.unsubscribe)}function C2e(t){go(t)?t():t.unsubscribe()}var Jwt={Promise:void 0},Xwt={setTimeout:function(t,r){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];return setTimeout.apply(void 0,pb([t,r],Ib(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function O2e(t){Xwt.setTimeout(function(){throw t})}function _2e(){}function fN(t){t()}var Nb=function(t){JI(r,t);function r(n){var a=t.call(this)||this;return a.isStopped=!1,n?(a.destination=n,A2e(n)&&n.add(a)):a.destination=r9t,a}return r.create=function(n,a,u){return new vb(n,a,u)},r.prototype.next=function(n){this.isStopped||this._next(n)},r.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(n){this.destination.next(n)},r.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(cN),e9t=function(){function t(r){this.partialObserver=r}return t.prototype.next=function(r){var n=this.partialObserver;if(n.next)try{n.next(r)}catch(a){dN(a)}},t.prototype.error=function(r){var n=this.partialObserver;if(n.error)try{n.error(r)}catch(a){dN(a)}else dN(r)},t.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(n){dN(n)}},t}(),vb=function(t){JI(r,t);function r(n,a,u){var s=t.call(this)||this,c;return go(n)||!n?c={next:n!=null?n:void 0,error:a!=null?a:void 0,complete:u!=null?u:void 0}:c=n,s.destination=new e9t(c),s}return r}(Nb);function dN(t){O2e(t)}function t9t(t){throw t}var r9t={closed:!0,next:_2e,error:t9t,complete:_2e},mb=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function n9t(t){return t}function i9t(t){return t.length===0?n9t:t.length===1?t[0]:function(r){return t.reduce(function(n,a){return a(n)},r)}}var Zl=function(){function t(r){r&&(this._subscribe=r)}return t.prototype.lift=function(r){var n=new t;return n.source=this,n.operator=r,n},t.prototype.subscribe=function(r,n,a){var u=this,s=o9t(r)?r:new vb(r,n,a);return fN(function(){var c=u,f=c.operator,d=c.source;s.add(f?f.call(s,d):d?u._subscribe(s):u._trySubscribe(s))}),s},t.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(n){r.error(n)}},t.prototype.forEach=function(r,n){var a=this;return n=x2e(n),new n(function(u,s){var c=new vb({next:function(f){try{r(f)}catch(d){s(d),c.unsubscribe()}},error:s,complete:u});a.subscribe(c)})},t.prototype._subscribe=function(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)},t.prototype[mb]=function(){return this},t.prototype.pipe=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return i9t(r)(this)},t.prototype.toPromise=function(r){var n=this;return r=x2e(r),new r(function(a,u){var s;n.subscribe(function(c){return s=c},function(c){return u(c)},function(){return a(s)})})},t.create=function(r){return new t(r)},t}();function x2e(t){var r;return(r=t!=null?t:Jwt.Promise)!==null&&r!==void 0?r:Promise}function a9t(t){return t&&go(t.next)&&go(t.error)&&go(t.complete)}function o9t(t){return t&&t instanceof Nb||a9t(t)&&A2e(t)}function u9t(t){return go(t==null?void 0:t.lift)}function XI(t){return function(r){if(u9t(r))return r.lift(function(n){try{return t(n,this)}catch(a){this.error(a)}});throw new TypeError("Unable to lift unknown Observable type")}}function ep(t,r,n,a,u){return new s9t(t,r,n,a,u)}var s9t=function(t){JI(r,t);function r(n,a,u,s,c,f){var d=t.call(this,n)||this;return d.onFinalize=c,d.shouldUnsubscribe=f,d._next=a?function(M){try{a(M)}catch(I){n.error(I)}}:t.prototype._next,d._error=s?function(M){try{s(M)}catch(I){n.error(I)}finally{this.unsubscribe()}}:t.prototype._error,d._complete=u?function(){try{u()}catch(M){n.error(M)}finally{this.unsubscribe()}}:t.prototype._complete,d}return r.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var a=this.closed;t.prototype.unsubscribe.call(this),!a&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},r}(Nb),l9t=j2e(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),L2e=function(t){JI(r,t);function r(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return r.prototype.lift=function(n){var a=new w2e(this,this);return a.operator=n,a},r.prototype._throwIfClosed=function(){if(this.closed)throw new l9t},r.prototype.next=function(n){var a=this;fN(function(){var u,s;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var c=j0(a.currentObservers),f=c.next();!f.done;f=c.next()){var d=f.value;d.next(n)}}catch(M){u={error:M}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(u)throw u.error}}}})},r.prototype.error=function(n){var a=this;fN(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=n;for(var u=a.observers;u.length;)u.shift().error(n)}})},r.prototype.complete=function(){var n=this;fN(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var a=n.observers;a.length;)a.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},r.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},r.prototype._innerSubscribe=function(n){var a=this,u=this,s=u.hasError,c=u.isStopped,f=u.observers;return s||c?S2e:(this.currentObservers=null,f.push(n),new cN(function(){a.currentObservers=null,hb(f,n)}))},r.prototype._checkFinalizedStatuses=function(n){var a=this,u=a.hasError,s=a.thrownError,c=a.isStopped;u?n.error(s):c&&n.complete()},r.prototype.asObservable=function(){var n=new Zl;return n.source=this,n},r.create=function(n,a){return new w2e(n,a)},r}(Zl),w2e=function(t){JI(r,t);function r(n,a){var u=t.call(this)||this;return u.destination=n,u.source=a,u}return r.prototype.next=function(n){var a,u;(u=(a=this.destination)===null||a===void 0?void 0:a.next)===null||u===void 0||u.call(a,n)},r.prototype.error=function(n){var a,u;(u=(a=this.destination)===null||a===void 0?void 0:a.error)===null||u===void 0||u.call(a,n)},r.prototype.complete=function(){var n,a;(a=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||a===void 0||a.call(n)},r.prototype._subscribe=function(n){var a,u;return(u=(a=this.source)===null||a===void 0?void 0:a.subscribe(n))!==null&&u!==void 0?u:S2e},r}(L2e),b2e=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function k2e(t){return go(t==null?void 0:t.then)}function R2e(t){return go(t[mb])}function z2e(t){return Symbol.asyncIterator&&go(t==null?void 0:t[Symbol.asyncIterator])}function P2e(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function c9t(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var U2e=c9t();function Y2e(t){return go(t==null?void 0:t[U2e])}function Q2e(t){return Kwt(this,arguments,function(){var r,n,a,u;return T2e(this,function(s){switch(s.label){case 0:r=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,S0(r.read())];case 3:return n=s.sent(),a=n.value,u=n.done,u?[4,S0(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,S0(a)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function F2e(t){return go(t==null?void 0:t.getReader)}function A0(t){if(t instanceof Zl)return t;if(t!=null){if(R2e(t))return f9t(t);if(b2e(t))return d9t(t);if(k2e(t))return M9t(t);if(z2e(t))return $2e(t);if(Y2e(t))return g9t(t);if(F2e(t))return I9t(t)}throw P2e(t)}function f9t(t){return new Zl(function(r){var n=t[mb]();if(go(n.subscribe))return n.subscribe(r);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function d9t(t){return new Zl(function(r){for(var n=0;n<t.length&&!r.closed;n++)r.next(t[n]);r.complete()})}function M9t(t){return new Zl(function(r){t.then(function(n){r.closed||(r.next(n),r.complete())},function(n){return r.error(n)}).then(null,O2e)})}function g9t(t){return new Zl(function(r){var n,a;try{for(var u=j0(t),s=u.next();!s.done;s=u.next()){var c=s.value;if(r.next(c),r.closed)return}}catch(f){n={error:f}}finally{try{s&&!s.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}r.complete()})}function $2e(t){return new Zl(function(r){p9t(t,r).catch(function(n){return r.error(n)})})}function I9t(t){return $2e(Q2e(t))}function p9t(t,r){var n,a,u,s;return Wwt(this,void 0,void 0,function(){var c,f;return T2e(this,function(d){switch(d.label){case 0:d.trys.push([0,5,6,11]),n=qwt(t),d.label=1;case 1:return[4,n.next()];case 2:if(a=d.sent(),!!a.done)return[3,4];if(c=a.value,r.next(c),r.closed)return[2];d.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=d.sent(),u={error:f},[3,11];case 6:return d.trys.push([6,,9,10]),a&&!a.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:d.sent(),d.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return r.complete(),[2]}})})}function i4(t,r,n,a,u){a===void 0&&(a=0),u===void 0&&(u=!1);var s=r.schedule(function(){n(),u?t.add(this.schedule(null,a)):this.unsubscribe()},a);if(t.add(s),!u)return s}function H2e(t,r){return r===void 0&&(r=0),XI(function(n,a){n.subscribe(ep(a,function(u){return i4(a,t,function(){return a.next(u)},r)},function(){return i4(a,t,function(){return a.complete()},r)},function(u){return i4(a,t,function(){return a.error(u)},r)}))})}function V2e(t,r){return r===void 0&&(r=0),XI(function(n,a){a.add(t.schedule(function(){return n.subscribe(a)},r))})}function y9t(t,r){return A0(t).pipe(V2e(r),H2e(r))}function h9t(t,r){return A0(t).pipe(V2e(r),H2e(r))}function N9t(t,r){return new Zl(function(n){var a=0;return r.schedule(function(){a===t.length?n.complete():(n.next(t[a++]),n.closed||this.schedule())})})}function v9t(t,r){return new Zl(function(n){var a;return i4(n,r,function(){a=t[U2e](),i4(n,r,function(){var u,s,c;try{u=a.next(),s=u.value,c=u.done}catch(f){n.error(f);return}c?n.complete():n.next(s)},0,!0)}),function(){return go(a==null?void 0:a.return)&&a.return()}})}function B2e(t,r){if(!t)throw new Error("Iterable cannot be null");return new Zl(function(n){i4(n,r,function(){var a=t[Symbol.asyncIterator]();i4(n,r,function(){a.next().then(function(u){u.done?n.complete():n.next(u.value)})},0,!0)})})}function m9t(t,r){return B2e(Q2e(t),r)}function E9t(t,r){if(t!=null){if(R2e(t))return y9t(t,r);if(b2e(t))return N9t(t,r);if(k2e(t))return h9t(t,r);if(z2e(t))return B2e(t,r);if(Y2e(t))return v9t(t,r);if(F2e(t))return m9t(t,r)}throw P2e(t)}function G2e(t,r){return r?E9t(t,r):A0(t)}function D9t(t,r){return XI(function(n,a){var u=0;n.subscribe(ep(a,function(s){a.next(t.call(r,s,u++))}))})}function T9t(t,r,n,a,u,s,c,f){var d=[],M=0,I=0,y=!1,p=function(){y&&!d.length&&!M&&r.complete()},N=function(m){return M<a?v(m):d.push(m)},v=function(m){M++;var D=!1;A0(n(m,I++)).subscribe(ep(r,function(O){r.next(O)},function(){D=!0},void 0,function(){if(D)try{M--;for(var O=function(){var j=d.shift();c||v(j)};d.length&&M<a;)O();p()}catch(j){r.error(j)}}))};return t.subscribe(ep(r,N,function(){y=!0,p()})),function(){}}function Eb(t,r,n){return n===void 0&&(n=1/0),go(r)?Eb(function(a,u){return D9t(function(s,c){return r(a,s,u,c)})(A0(t(a,u)))},n):(typeof r=="number"&&(n=r),XI(function(a,u){return T9t(a,u,t,n)}))}function Z2e(t){return XI(function(r,n){var a=null,u=!1,s;a=r.subscribe(ep(n,void 0,void 0,function(c){s=A0(t(c,Z2e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(n)):u=!0})),u&&(a.unsubscribe(),a=null,s.subscribe(n))})}function j9t(t,r){return go(r)?Eb(t,r,1):Eb(t,1)}function S9t(t,r,n){return(r=A9t(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function A9t(t){var r=C9t(t,"string");return typeof r=="symbol"?r:r+""}function C9t(t,r){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class O9t{constructor(){S9t(this,"taskSubject",new L2e),this.taskSubject.pipe(j9t(r=>G2e(r()).pipe(Z2e(n=>G2e(Promise.reject(n)))))).subscribe()}addTask(r){return new Promise((n,a)=>{this.taskSubject.next(()=>Jt(this,null,function*(){try{const u=yield r();n(u)}catch(u){a(u)}}))})}}const _9t="text/plain",x9t="us-ascii",Db=(t,r)=>r.some(n=>n instanceof RegExp?n.test(t):n===t),L9t=new Set(["https:","http:","file:"]),w9t=t=>{try{const{protocol:r}=new URL(t);return r.endsWith(":")&&!r.includes(".")&&!L9t.has(r)}catch(r){return!1}},b9t=(t,{stripHash:r})=>{var n,a;const u=new RegExp("^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$").exec(t);if(!u)throw new Error(`Invalid URL: ${t}`);let{type:s,data:c,hash:f}=u.groups;const d=s.split(";");f=r?"":f;let M=!1;d[d.length-1]==="base64"&&(d.pop(),M=!0);const I=(a=(n=d.shift())==null?void 0:n.toLowerCase())!=null?a:"",y=[...d.map(p=>{let[N,v=""]=p.split("=").map(m=>m.trim());return N==="charset"&&(v=v.toLowerCase(),v===x9t)?"":`${N}${v?`=${v}`:""}`}).filter(Boolean)];return M&&y.push("base64"),(y.length>0||I&&I!==_9t)&&y.unshift(I),`data:${y.join(";")},${M?c.trim():c}${f?`#${f}`:""}`};function k9t(t,r){if(r=Bt({defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0},r),typeof r.defaultProtocol=="string"&&!r.defaultProtocol.endsWith(":")&&(r.defaultProtocol=`${r.defaultProtocol}:`),t=t.trim(),/^data:/i.test(t))return b9t(t,r);if(w9t(t))return t;const n=t.startsWith("//");!n&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,r.defaultProtocol));const a=new URL(t);if(r.forceHttp&&r.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(r.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),r.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),r.stripAuthentication&&(a.username="",a.password=""),r.stripHash?a.hash="":r.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,"")),a.pathname){const s=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let c=0,f="";for(;;){const M=s.exec(a.pathname);if(!M)break;const I=M[0],y=M.index,p=a.pathname.slice(c,y);f+=p.replace(/\/{2,}/g,"/"),f+=I,c=y+I.length}const d=a.pathname.slice(c,a.pathname.length);f+=d.replace(/\/{2,}/g,"/"),a.pathname=f}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch(s){}if(r.removeDirectoryIndex===!0&&(r.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(r.removeDirectoryIndex)&&r.removeDirectoryIndex.length>0){let s=a.pathname.split("/");const c=s[s.length-1];Db(c,r.removeDirectoryIndex)&&(s=s.slice(0,-1),a.pathname=s.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),r.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(r.removeQueryParameters))for(const s of[...a.searchParams.keys()])Db(s,r.removeQueryParameters)&&a.searchParams.delete(s);if(!Array.isArray(r.keepQueryParameters)&&r.removeQueryParameters===!0&&(a.search=""),Array.isArray(r.keepQueryParameters)&&r.keepQueryParameters.length>0)for(const s of[...a.searchParams.keys()])Db(s,r.keepQueryParameters)||a.searchParams.delete(s);if(r.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch(s){}}r.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,"")),r.removeExplicitPort&&a.port&&(a.port="");const u=t;return t=a.toString(),!r.removeSingleSlash&&a.pathname==="/"&&!u.endsWith("/")&&a.hash===""&&(t=t.replace(/\/$/,"")),(r.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&r.removeSingleSlash&&(t=t.replace(/\/$/,"")),n&&!r.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),r.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}function W2e(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 C0(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?W2e(Object(n),!0).forEach(function(a){yo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):W2e(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function yo(t,r,n){return(r=R9t(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function R9t(t){var r=z9t(t,"string");return typeof r=="symbol"?r:r+""}function z9t(t,r){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}const K2e=Tu.create("wasm"),ho=Tu.create("main");class P9t{constructor(){yo(this,"_worker",null),yo(this,"_prepareListener",null),yo(this,"_initializeListener",null),yo(this,"_processingListener",null),yo(this,"_queueService",new O9t),yo(this,"_initProcess",null),yo(this,"onFinalize",null),yo(this,"isAutoPrepare",!1),yo(this,"isPrepared",!1),yo(this,"isInitialized",!1),yo(this,"isProcessing",!1),yo(this,"initData",null),yo(this,"recognizerProcessParam",{processParam:{}}),yo(this,"imageProcessParam",{processParam:{}}),yo(this,"recognizeListener",null),yo(this,"workerPath","https://wasm.regulaforensics.com/document/release/7.7/173f7ed7-278542421"),yo(this,"version",{component:"7.7.2197".trim()})}get processingListener(){return this._processingListener}set processingListener(r){this._processingListener=r,r&&r({isProcessing:this.isProcessing})}get prepareListener(){return this._prepareListener}set prepareListener(r){this._prepareListener=r,r&&r({isPrepared:this.isPrepared})}get initializeListener(){return this._initializeListener}set initializeListener(r){this._initializeListener=r,r&&r({isInitialized:this.isInitialized})}createProcessImageRequest(r,n){const a=r.map((u,s)=>({data:u,light:6,pageIdx:s}));return C0(C0({},n),{},{imagesList:a})}prepareImageData(r){return r.map(n=>n instanceof ImageData?{width:n.width,height:n.height,data:n.data.buffer}:{data:n})}sendMessage(r){return this._queueService.addTask(()=>new Promise((n,a)=>{if(!this._worker)return ho("Worker is missing)"),a("Worker is missing");this._worker.onmessage=u=>{if(u.data.target===qs.custom){const{method:s,response:c,code:f}=u.data.data,d=c&&"reject_message"in c?c.reject_message:"";if(f===sx.ok||f===sx.badLicense&&!d)ho("".concat("Method ".concat(s,": { code: ").concat(f," } "))),n(c);else{const M=Dit[f]||f,I="Method ".concat(s,": ").concat(M);ho(I),a(I)}}u.data.target===qs.stdout&&K2e(JSON.stringify(u.data.content)),u.data.target===qs.stderr&&(K2e(JSON.stringify(u.data.content)),a(u.data.content))},ho("Send message to worker: { target: ".concat(r.target,", method: ").concat(r.method," }")),this._worker.postMessage(r,"data"in r&&r.data?r.data.map(u=>u.data):[])}))}prepare(){return Jt(this,null,function*(){var r,n;ho("Preparing the service");const a="ProcMgr.worker.js",u=this.workerPath==="https://wasm.regulaforensics.com/document/release/7.7/173f7ed7-278542421",s=k9t(this.workerPath);{let c=yield(yield fetch("".concat(s,"/").concat(a))).text();u||(c=jct(c,s));const f=new Blob([c],{type:"text/plain"}),d=URL.createObjectURL(f);this._worker=new Worker(d)}(r=this._worker)===null||r===void 0||r.postMessage({target:qs.gl,method:jl.prepare,preMain:!0,op:"setPrefetched"}),yield this.sendMessage({target:qs.init,method:jl.prepare,preMain:!0,URL:document.URL}),this.isPrepared=!0,(n=this._prepareListener)===null||n===void 0||n.call(this,{isPrepared:this.isPrepared}),ho("Service prepared")})}initialize(r){return Jt(this,null,function*(){return this._initProcess||(this._initProcess=this.doInitialize(r),this._initProcess.catch(()=>{this._initProcess=null})),this._initProcess})}doInitialize(r){return Jt(this,null,function*(){var n,a;this.isPrepared||(this.isAutoPrepare=!0,yield this.prepare()),ho("Initializing the service");const{scenario:u,license:s}=yield this.sendMessage({target:qs.custom,method:jl.initialize,preMain:!0,request:{systemInfo:{userID:_1e(Mfe),hostName:(n=document.location)===null||n===void 0?void 0:n.origin,license:r==null?void 0:r.license}}});return this.initData={scenario:u,license:s},this.isInitialized=!0,(a=this._initializeListener)===null||a===void 0||a.call(this,{isInitialized:this.isInitialized}),ho("Service initialized: ".concat(JSON.stringify({scenario:u,license:s}))),this.initData})}doProcess(r,n,a){return Jt(this,null,function*(){var u,s;ho("Process method ".concat(r," started")),this.isProcessing=!0,(u=this._processingListener)===null||u===void 0||u.call(this,{isProcessing:this.isProcessing});const c=yield this.sendMessage({target:qs.custom,method:r,preMain:!0,request:n,data:a});return this.isProcessing=!1,(s=this._processingListener)===null||s===void 0||s.call(this,{isProcessing:this.isProcessing}),ho("Process method ".concat(r," finished")),new K3(c)})}processImageBase64(r,n){return Jt(this,null,function*(){return this.doProcess(jl.processImage,this.createProcessImageRequest(r,n))})}process(r,n){return Jt(this,null,function*(){var a;const u=this.prepareImageData(r),s=yield this.doProcess(jl.process,n||this.recognizerProcessParam,u);return(a=this.recognizeListener)===null||a===void 0||a.call(this,s),s})}processImage(r,n){return Jt(this,null,function*(){const a=this.prepareImageData(r);return this.doProcess(jl.processImage,n||this.imageProcessParam,a)})}startNewPage(){return Jt(this,null,function*(){ho("Starting new page"),yield this.sendMessage({target:qs.custom,method:jl.startNewPage,preMain:!0})})}startNewDocument(r){return Jt(this,null,function*(){return ho("Starting new document"),yield this.sendMessage({target:qs.custom,method:jl.startNewDocument,preMain:!0,request:C0(C0({},this.recognizerProcessParam),{},{metadata:r})})})}createBackendTransaction(r){return Jt(this,null,function*(){return ho("Create backend transaction"),yield this.sendMessage({target:qs.custom,method:jl.createBackendTransaction,preMain:!0,request:C0(C0({},this.recognizerProcessParam),{},{metadata:r})})})}finalizePackage(){return Jt(this,null,function*(){try{var r;ho("Finalize package");const a=yield this.sendMessage({target:qs.custom,method:jl.finalizePackage,preMain:!0});return(r=this.onFinalize)===null||r===void 0||r.call(this,a),a}catch(a){var n;return(n=this.onFinalize)===null||n===void 0||n.call(this,{tag:"",transactionId:""}),Promise.reject(a)}})}addDataToPackage(r,n){return Jt(this,null,function*(){ho("Add data to package"),yield this.sendMessage({target:qs.custom,method:jl.addDataToPackage,request:n,preMain:!0,data:[{data:r.buffer}]}),ho("Data added to package")})}shutdown(){ho("Shutdown service"),this._worker&&(this._worker.terminate(),ho("Worker terminated")),this.isPrepared=!1,this.isInitialized=!1,this.isProcessing=!1,this._initProcess=null}}function U9t(){return Jt(this,null,function*(){const t=window.customElements.get("document-reader"),r=window.customElements.get("camera-snapshot"),n=window.customElements.get("fullscreen-container");t||window.customElements.define("document-reader",_wt),r||window.customElements.define("camera-snapshot",Hwt),n||window.customElements.define("fullscreen-container",Zwt);const a=window.customElements.whenDefined("document-reader"),u=window.customElements.whenDefined("camera-snapshot"),s=window.customElements.whenDefined("fullscreen-container");yield Promise.all([a,u,s])})}var q2e=(t=>(t.DOC_READER="DOC_READER",t))(q2e||{}),Tb=(t=>(t[t.NO_INITIALIZED=0]="NO_INITIALIZED",t[t.UNKNOWN_STEP=1]="UNKNOWN_STEP",t[t.SCAN_ERROR=2]="SCAN_ERROR",t[t.RFID_ERROR=3]="RFID_ERROR",t))(Tb||{}),jb=(t=>(t[t.CONFIGURATION_FAILED=0]="CONFIGURATION_FAILED",t[t.INTERNAL_ERROR=1]="INTERNAL_ERROR",t[t.PRESENTER_UNAVAILABLE=2]="PRESENTER_UNAVAILABLE",t))(jb||{}),MN="DOCUMENT";function O0(t){"@babel/helpers - typeof";return O0=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},O0(t)}function J2e(t,r,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function X2e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function eIe(t,r,n){return r=gN(r),Y9t(t,tIe()?Reflect.construct(r,n||[],gN(t).constructor):r.apply(t,n))}function Y9t(t,r){if(r&&(O0(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q9t(t)}function Q9t(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tIe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(tIe=function(){return!!t})()}function gN(t){return gN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gN(t)}function rIe(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&&Sb(t,r)}function Sb(t,r){return Sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Sb(t,r)}function _0(t,r,n){return(r=F9t(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function F9t(t){var r=$9t(t,"string");return O0(r)=="symbol"?r:r+""}function $9t(t,r){if(O0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(O0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var IN=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;X2e(this,r);var f=Wn.getErrorKey(a,Tb);return eIe(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 rIe(r,t),J2e(r)}(Wn);_0(IN,"MODULE",MN),_0(IN,"ERROR_ENUM_NAME","ReaderModuleError"),_0(IN,"SHORT_CODE","RM");var pN=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;X2e(this,r);var f=Wn.getErrorKey(a,jb);return eIe(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 rIe(r,t),J2e(r)}(Wn);_0(pN,"MODULE",MN),_0(pN,"ERROR_ENUM_NAME","ScanError"),_0(pN,"SHORT_CODE","RMS");function tp(t){"@babel/helpers - typeof";return tp=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},tp(t)}function nIe(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 H9t(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?nIe(Object(n),!0).forEach(function(a){V9t(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nIe(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function V9t(t,r,n){return(r=B9t(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function B9t(t){var r=G9t(t,"string");return tp(r)=="symbol"?r:r+""}function G9t(t,r){if(tp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(tp(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Ab=!1,a4=function(r){var n=r.perform,a=r.moduleProps,u=r.isProcessing,s=a.processParam,c=a.functionality,f=a.sessionId,d=a.serviceToken,M=Tr.useRef(null),I=Tr.useRef(null),y={"--font-family":"var(--base-font-family)"},p=function(v){var m;if(v.detail.action===$r.PROCESS_FINISHED){var D,O,j;if(((D=v.detail.data)===null||D===void 0?void 0:D.status)===Wf.ERROR){var S=v.detail.data.reason,A=new pN({errorCode:jb.INTERNAL_ERROR,underlyingError:"ErrorTypes."+S}),w=new IN({errorCode:Tb.SCAN_ERROR,underlyingBaseError:A});n(w)}var R=(O=v.detail.data)===null||O===void 0?void 0:O.status,F=R===1,H=R===2;if(!(F||H)||!((j=v.detail.data)!==null&&j!==void 0&&j.response))return;u&&u(!0),window.RegulaDocumentSDK.finalizePackage().then(function($){n({transactionId:($==null?void 0:$.transactionId)||"",has_nfc:!1,cancel:!1})}).catch(function($){console.log("finalizePackage error: ",$),n({transactionId:"",cancel:!0,has_nfc:!1})})}(((m=v.detail)===null||m===void 0?void 0:m.action)===$r.CLOSE||v.detail.action===$r.CAMERA_PROCESS_CLOSED)&&n({transactionId:"",cancel:!0,has_nfc:!1})};return Tr.useEffect(function(){function N(D){return D?(D.internalScenario&&(D.scenario=D.internalScenario),delete D.internalScenario,D):{}}var v=N(s);d&&v!==null&&v!==void 0&&v.backendProcessing&&(v.backendProcessing.httpHeaders={Authorization:"Connection ".concat(d)});var m={processParam:H9t({},v)};f&&(m.tag=f),window.RegulaDocumentSDK.recognizerProcessParam=m,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:nfe.MrzAndLocate}}},[]),Tr.useEffect(function(){var N=I.current;N&&(N.settings={locale:"en",startScreen:!1,skipButton:c==null?void 0:c.showSkipNextPageButton,videoRecord:c==null?void 0:c.recordScanningProcess,captureButton:c==null?void 0:c.showCaptureButton,captureButtonDelay:c==null?void 0:c.showCaptureButtonDelayFromStart})},[I.current]),Tr.useEffect(function(){var N=M.current;return N&&N.addEventListener("document-reader",p),function(){N&&N.removeEventListener("document-reader",p)}},[]),li.jsx("div",{style:{height:"100%",position:"relative"},ref:M,children:li.jsx("document-reader",{style:y,ref:I})})};a4.getSupportedTemplates=function(){return[q2e.DOC_READER]},a4.getIdentifier=function(){return MN},a4.isReady=function(){return Ab},a4.deinitialize=function(){var t;(t=window.RegulaDocumentSDK)===null||t===void 0||t.shutdown(),Ab=!1},a4.initialize=function(t){var r,n=t==null||(r=t.docreader)===null||r===void 0?void 0:r.devLicense;window.RegulaDocumentSDK=new P9t,console.info("%cDocument Reader web component version: %s","color: #6e56b0;",window.RegulaDocumentSDK.version.component),U9t().then(function(){window.RegulaDocumentSDK.initialize({license:n}),Ab=!0})},a4.displayName=MN;const Z9t=Object.freeze(Object.defineProperty({__proto__:null,default:a4},Symbol.toStringTag,{value:"Module"}));return di.ConnectionError=yg,di.DeinitializationError=q0,di.IdvEventTypesEnum=Z0,di.IdvIntegrationService=WDe,di.IdvModules=x5,di.IdvServiceMessages=W0,di.IdvWebComponent=IJ,di.InitializeError=K0,di.PrepareWorkflowError=Af,di.ScenarioError=No,di.SessionError=ol,di.StartSessionError=pg,di.WorkflowError=wl,Object.defineProperty(di,Symbol.toStringTag,{value:"Module"}),di}({});
257
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function hb(t,r){if(t){var n=t.indexOf(r);0<=n&&t.splice(n,1)}}var cN=function(){function t(r){this.initialTeardown=r,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var r,n,a,u,s;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=j0(c),d=f.next();!d.done;d=f.next()){var M=d.value;M.remove(this)}}catch(m){r={error:m}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}else c.remove(this);var I=this.initialTeardown;if(go(I))try{I()}catch(m){s=m instanceof yb?m.errors:[m]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var p=j0(y),N=p.next();!N.done;N=p.next()){var v=N.value;try{C2e(v)}catch(m){s=s!=null?s:[],m instanceof yb?s=pb(pb([],Ib(s)),Ib(m.errors)):s.push(m)}}}catch(m){a={error:m}}finally{try{N&&!N.done&&(u=p.return)&&u.call(p)}finally{if(a)throw a.error}}}if(s)throw new yb(s)}},t.prototype.add=function(r){var n;if(r&&r!==this)if(this.closed)C2e(r);else{if(r instanceof t){if(r.closed||r._hasParent(this))return;r._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(r)}},t.prototype._hasParent=function(r){var n=this._parentage;return n===r||Array.isArray(n)&&n.includes(r)},t.prototype._addParent=function(r){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(r),n):n?[n,r]:r},t.prototype._removeParent=function(r){var n=this._parentage;n===r?this._parentage=null:Array.isArray(n)&&hb(n,r)},t.prototype.remove=function(r){var n=this._finalizers;n&&hb(n,r),r instanceof t&&r._removeParent(this)},t.EMPTY=function(){var r=new t;return r.closed=!0,r}(),t}(),S2e=cN.EMPTY;function A2e(t){return t instanceof cN||t&&"closed"in t&&go(t.remove)&&go(t.add)&&go(t.unsubscribe)}function C2e(t){go(t)?t():t.unsubscribe()}var Jwt={Promise:void 0},Xwt={setTimeout:function(t,r){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];return setTimeout.apply(void 0,pb([t,r],Ib(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function O2e(t){Xwt.setTimeout(function(){throw t})}function _2e(){}function fN(t){t()}var Nb=function(t){JI(r,t);function r(n){var a=t.call(this)||this;return a.isStopped=!1,n?(a.destination=n,A2e(n)&&n.add(a)):a.destination=r9t,a}return r.create=function(n,a,u){return new vb(n,a,u)},r.prototype.next=function(n){this.isStopped||this._next(n)},r.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},r.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(n){this.destination.next(n)},r.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(cN),e9t=function(){function t(r){this.partialObserver=r}return t.prototype.next=function(r){var n=this.partialObserver;if(n.next)try{n.next(r)}catch(a){dN(a)}},t.prototype.error=function(r){var n=this.partialObserver;if(n.error)try{n.error(r)}catch(a){dN(a)}else dN(r)},t.prototype.complete=function(){var r=this.partialObserver;if(r.complete)try{r.complete()}catch(n){dN(n)}},t}(),vb=function(t){JI(r,t);function r(n,a,u){var s=t.call(this)||this,c;return go(n)||!n?c={next:n!=null?n:void 0,error:a!=null?a:void 0,complete:u!=null?u:void 0}:c=n,s.destination=new e9t(c),s}return r}(Nb);function dN(t){O2e(t)}function t9t(t){throw t}var r9t={closed:!0,next:_2e,error:t9t,complete:_2e},mb=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function n9t(t){return t}function i9t(t){return t.length===0?n9t:t.length===1?t[0]:function(r){return t.reduce(function(n,a){return a(n)},r)}}var Zl=function(){function t(r){r&&(this._subscribe=r)}return t.prototype.lift=function(r){var n=new t;return n.source=this,n.operator=r,n},t.prototype.subscribe=function(r,n,a){var u=this,s=o9t(r)?r:new vb(r,n,a);return fN(function(){var c=u,f=c.operator,d=c.source;s.add(f?f.call(s,d):d?u._subscribe(s):u._trySubscribe(s))}),s},t.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(n){r.error(n)}},t.prototype.forEach=function(r,n){var a=this;return n=x2e(n),new n(function(u,s){var c=new vb({next:function(f){try{r(f)}catch(d){s(d),c.unsubscribe()}},error:s,complete:u});a.subscribe(c)})},t.prototype._subscribe=function(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)},t.prototype[mb]=function(){return this},t.prototype.pipe=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return i9t(r)(this)},t.prototype.toPromise=function(r){var n=this;return r=x2e(r),new r(function(a,u){var s;n.subscribe(function(c){return s=c},function(c){return u(c)},function(){return a(s)})})},t.create=function(r){return new t(r)},t}();function x2e(t){var r;return(r=t!=null?t:Jwt.Promise)!==null&&r!==void 0?r:Promise}function a9t(t){return t&&go(t.next)&&go(t.error)&&go(t.complete)}function o9t(t){return t&&t instanceof Nb||a9t(t)&&A2e(t)}function u9t(t){return go(t==null?void 0:t.lift)}function XI(t){return function(r){if(u9t(r))return r.lift(function(n){try{return t(n,this)}catch(a){this.error(a)}});throw new TypeError("Unable to lift unknown Observable type")}}function ep(t,r,n,a,u){return new s9t(t,r,n,a,u)}var s9t=function(t){JI(r,t);function r(n,a,u,s,c,f){var d=t.call(this,n)||this;return d.onFinalize=c,d.shouldUnsubscribe=f,d._next=a?function(M){try{a(M)}catch(I){n.error(I)}}:t.prototype._next,d._error=s?function(M){try{s(M)}catch(I){n.error(I)}finally{this.unsubscribe()}}:t.prototype._error,d._complete=u?function(){try{u()}catch(M){n.error(M)}finally{this.unsubscribe()}}:t.prototype._complete,d}return r.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var a=this.closed;t.prototype.unsubscribe.call(this),!a&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},r}(Nb),l9t=j2e(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),L2e=function(t){JI(r,t);function r(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return r.prototype.lift=function(n){var a=new w2e(this,this);return a.operator=n,a},r.prototype._throwIfClosed=function(){if(this.closed)throw new l9t},r.prototype.next=function(n){var a=this;fN(function(){var u,s;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var c=j0(a.currentObservers),f=c.next();!f.done;f=c.next()){var d=f.value;d.next(n)}}catch(M){u={error:M}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(u)throw u.error}}}})},r.prototype.error=function(n){var a=this;fN(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=n;for(var u=a.observers;u.length;)u.shift().error(n)}})},r.prototype.complete=function(){var n=this;fN(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var a=n.observers;a.length;)a.shift().complete()}})},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},r.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},r.prototype._innerSubscribe=function(n){var a=this,u=this,s=u.hasError,c=u.isStopped,f=u.observers;return s||c?S2e:(this.currentObservers=null,f.push(n),new cN(function(){a.currentObservers=null,hb(f,n)}))},r.prototype._checkFinalizedStatuses=function(n){var a=this,u=a.hasError,s=a.thrownError,c=a.isStopped;u?n.error(s):c&&n.complete()},r.prototype.asObservable=function(){var n=new Zl;return n.source=this,n},r.create=function(n,a){return new w2e(n,a)},r}(Zl),w2e=function(t){JI(r,t);function r(n,a){var u=t.call(this)||this;return u.destination=n,u.source=a,u}return r.prototype.next=function(n){var a,u;(u=(a=this.destination)===null||a===void 0?void 0:a.next)===null||u===void 0||u.call(a,n)},r.prototype.error=function(n){var a,u;(u=(a=this.destination)===null||a===void 0?void 0:a.error)===null||u===void 0||u.call(a,n)},r.prototype.complete=function(){var n,a;(a=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||a===void 0||a.call(n)},r.prototype._subscribe=function(n){var a,u;return(u=(a=this.source)===null||a===void 0?void 0:a.subscribe(n))!==null&&u!==void 0?u:S2e},r}(L2e),b2e=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function k2e(t){return go(t==null?void 0:t.then)}function R2e(t){return go(t[mb])}function z2e(t){return Symbol.asyncIterator&&go(t==null?void 0:t[Symbol.asyncIterator])}function P2e(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function c9t(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var U2e=c9t();function Y2e(t){return go(t==null?void 0:t[U2e])}function Q2e(t){return Kwt(this,arguments,function(){var r,n,a,u;return T2e(this,function(s){switch(s.label){case 0:r=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,S0(r.read())];case 3:return n=s.sent(),a=n.value,u=n.done,u?[4,S0(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,S0(a)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function F2e(t){return go(t==null?void 0:t.getReader)}function A0(t){if(t instanceof Zl)return t;if(t!=null){if(R2e(t))return f9t(t);if(b2e(t))return d9t(t);if(k2e(t))return M9t(t);if(z2e(t))return $2e(t);if(Y2e(t))return g9t(t);if(F2e(t))return I9t(t)}throw P2e(t)}function f9t(t){return new Zl(function(r){var n=t[mb]();if(go(n.subscribe))return n.subscribe(r);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function d9t(t){return new Zl(function(r){for(var n=0;n<t.length&&!r.closed;n++)r.next(t[n]);r.complete()})}function M9t(t){return new Zl(function(r){t.then(function(n){r.closed||(r.next(n),r.complete())},function(n){return r.error(n)}).then(null,O2e)})}function g9t(t){return new Zl(function(r){var n,a;try{for(var u=j0(t),s=u.next();!s.done;s=u.next()){var c=s.value;if(r.next(c),r.closed)return}}catch(f){n={error:f}}finally{try{s&&!s.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}r.complete()})}function $2e(t){return new Zl(function(r){p9t(t,r).catch(function(n){return r.error(n)})})}function I9t(t){return $2e(Q2e(t))}function p9t(t,r){var n,a,u,s;return Wwt(this,void 0,void 0,function(){var c,f;return T2e(this,function(d){switch(d.label){case 0:d.trys.push([0,5,6,11]),n=qwt(t),d.label=1;case 1:return[4,n.next()];case 2:if(a=d.sent(),!!a.done)return[3,4];if(c=a.value,r.next(c),r.closed)return[2];d.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=d.sent(),u={error:f},[3,11];case 6:return d.trys.push([6,,9,10]),a&&!a.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:d.sent(),d.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return r.complete(),[2]}})})}function i4(t,r,n,a,u){a===void 0&&(a=0),u===void 0&&(u=!1);var s=r.schedule(function(){n(),u?t.add(this.schedule(null,a)):this.unsubscribe()},a);if(t.add(s),!u)return s}function H2e(t,r){return r===void 0&&(r=0),XI(function(n,a){n.subscribe(ep(a,function(u){return i4(a,t,function(){return a.next(u)},r)},function(){return i4(a,t,function(){return a.complete()},r)},function(u){return i4(a,t,function(){return a.error(u)},r)}))})}function V2e(t,r){return r===void 0&&(r=0),XI(function(n,a){a.add(t.schedule(function(){return n.subscribe(a)},r))})}function y9t(t,r){return A0(t).pipe(V2e(r),H2e(r))}function h9t(t,r){return A0(t).pipe(V2e(r),H2e(r))}function N9t(t,r){return new Zl(function(n){var a=0;return r.schedule(function(){a===t.length?n.complete():(n.next(t[a++]),n.closed||this.schedule())})})}function v9t(t,r){return new Zl(function(n){var a;return i4(n,r,function(){a=t[U2e](),i4(n,r,function(){var u,s,c;try{u=a.next(),s=u.value,c=u.done}catch(f){n.error(f);return}c?n.complete():n.next(s)},0,!0)}),function(){return go(a==null?void 0:a.return)&&a.return()}})}function B2e(t,r){if(!t)throw new Error("Iterable cannot be null");return new Zl(function(n){i4(n,r,function(){var a=t[Symbol.asyncIterator]();i4(n,r,function(){a.next().then(function(u){u.done?n.complete():n.next(u.value)})},0,!0)})})}function m9t(t,r){return B2e(Q2e(t),r)}function E9t(t,r){if(t!=null){if(R2e(t))return y9t(t,r);if(b2e(t))return N9t(t,r);if(k2e(t))return h9t(t,r);if(z2e(t))return B2e(t,r);if(Y2e(t))return v9t(t,r);if(F2e(t))return m9t(t,r)}throw P2e(t)}function G2e(t,r){return r?E9t(t,r):A0(t)}function D9t(t,r){return XI(function(n,a){var u=0;n.subscribe(ep(a,function(s){a.next(t.call(r,s,u++))}))})}function T9t(t,r,n,a,u,s,c,f){var d=[],M=0,I=0,y=!1,p=function(){y&&!d.length&&!M&&r.complete()},N=function(m){return M<a?v(m):d.push(m)},v=function(m){M++;var D=!1;A0(n(m,I++)).subscribe(ep(r,function(O){r.next(O)},function(){D=!0},void 0,function(){if(D)try{M--;for(var O=function(){var j=d.shift();c||v(j)};d.length&&M<a;)O();p()}catch(j){r.error(j)}}))};return t.subscribe(ep(r,N,function(){y=!0,p()})),function(){}}function Eb(t,r,n){return n===void 0&&(n=1/0),go(r)?Eb(function(a,u){return D9t(function(s,c){return r(a,s,u,c)})(A0(t(a,u)))},n):(typeof r=="number"&&(n=r),XI(function(a,u){return T9t(a,u,t,n)}))}function Z2e(t){return XI(function(r,n){var a=null,u=!1,s;a=r.subscribe(ep(n,void 0,void 0,function(c){s=A0(t(c,Z2e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(n)):u=!0})),u&&(a.unsubscribe(),a=null,s.subscribe(n))})}function j9t(t,r){return go(r)?Eb(t,r,1):Eb(t,1)}function S9t(t,r,n){return(r=A9t(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function A9t(t){var r=C9t(t,"string");return typeof r=="symbol"?r:r+""}function C9t(t,r){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}class O9t{constructor(){S9t(this,"taskSubject",new L2e),this.taskSubject.pipe(j9t(r=>G2e(r()).pipe(Z2e(n=>G2e(Promise.reject(n)))))).subscribe()}addTask(r){return new Promise((n,a)=>{this.taskSubject.next(()=>Jt(this,null,function*(){try{const u=yield r();n(u)}catch(u){a(u)}}))})}}const _9t="text/plain",x9t="us-ascii",Db=(t,r)=>r.some(n=>n instanceof RegExp?n.test(t):n===t),L9t=new Set(["https:","http:","file:"]),w9t=t=>{try{const{protocol:r}=new URL(t);return r.endsWith(":")&&!r.includes(".")&&!L9t.has(r)}catch(r){return!1}},b9t=(t,{stripHash:r})=>{var n,a;const u=new RegExp("^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$").exec(t);if(!u)throw new Error(`Invalid URL: ${t}`);let{type:s,data:c,hash:f}=u.groups;const d=s.split(";");f=r?"":f;let M=!1;d[d.length-1]==="base64"&&(d.pop(),M=!0);const I=(a=(n=d.shift())==null?void 0:n.toLowerCase())!=null?a:"",y=[...d.map(p=>{let[N,v=""]=p.split("=").map(m=>m.trim());return N==="charset"&&(v=v.toLowerCase(),v===x9t)?"":`${N}${v?`=${v}`:""}`}).filter(Boolean)];return M&&y.push("base64"),(y.length>0||I&&I!==_9t)&&y.unshift(I),`data:${y.join(";")},${M?c.trim():c}${f?`#${f}`:""}`};function k9t(t,r){if(r=Bt({defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0},r),typeof r.defaultProtocol=="string"&&!r.defaultProtocol.endsWith(":")&&(r.defaultProtocol=`${r.defaultProtocol}:`),t=t.trim(),/^data:/i.test(t))return b9t(t,r);if(w9t(t))return t;const n=t.startsWith("//");!n&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,r.defaultProtocol));const a=new URL(t);if(r.forceHttp&&r.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(r.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),r.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),r.stripAuthentication&&(a.username="",a.password=""),r.stripHash?a.hash="":r.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,"")),a.pathname){const s=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let c=0,f="";for(;;){const M=s.exec(a.pathname);if(!M)break;const I=M[0],y=M.index,p=a.pathname.slice(c,y);f+=p.replace(/\/{2,}/g,"/"),f+=I,c=y+I.length}const d=a.pathname.slice(c,a.pathname.length);f+=d.replace(/\/{2,}/g,"/"),a.pathname=f}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch(s){}if(r.removeDirectoryIndex===!0&&(r.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(r.removeDirectoryIndex)&&r.removeDirectoryIndex.length>0){let s=a.pathname.split("/");const c=s[s.length-1];Db(c,r.removeDirectoryIndex)&&(s=s.slice(0,-1),a.pathname=s.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),r.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(r.removeQueryParameters))for(const s of[...a.searchParams.keys()])Db(s,r.removeQueryParameters)&&a.searchParams.delete(s);if(!Array.isArray(r.keepQueryParameters)&&r.removeQueryParameters===!0&&(a.search=""),Array.isArray(r.keepQueryParameters)&&r.keepQueryParameters.length>0)for(const s of[...a.searchParams.keys()])Db(s,r.keepQueryParameters)||a.searchParams.delete(s);if(r.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch(s){}}r.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,"")),r.removeExplicitPort&&a.port&&(a.port="");const u=t;return t=a.toString(),!r.removeSingleSlash&&a.pathname==="/"&&!u.endsWith("/")&&a.hash===""&&(t=t.replace(/\/$/,"")),(r.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&r.removeSingleSlash&&(t=t.replace(/\/$/,"")),n&&!r.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),r.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}function W2e(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 C0(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?W2e(Object(n),!0).forEach(function(a){yo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):W2e(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function yo(t,r,n){return(r=R9t(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function R9t(t){var r=z9t(t,"string");return typeof r=="symbol"?r:r+""}function z9t(t,r){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}const K2e=Tu.create("wasm"),ho=Tu.create("main");class P9t{constructor(){yo(this,"_worker",null),yo(this,"_prepareListener",null),yo(this,"_initializeListener",null),yo(this,"_processingListener",null),yo(this,"_queueService",new O9t),yo(this,"_initProcess",null),yo(this,"onFinalize",null),yo(this,"isAutoPrepare",!1),yo(this,"isPrepared",!1),yo(this,"isInitialized",!1),yo(this,"isProcessing",!1),yo(this,"initData",null),yo(this,"recognizerProcessParam",{processParam:{}}),yo(this,"imageProcessParam",{processParam:{}}),yo(this,"recognizeListener",null),yo(this,"workerPath","https://wasm.regulaforensics.com/document/release/7.7/173f7ed7-278542421"),yo(this,"version",{component:"7.7.2197".trim()})}get processingListener(){return this._processingListener}set processingListener(r){this._processingListener=r,r&&r({isProcessing:this.isProcessing})}get prepareListener(){return this._prepareListener}set prepareListener(r){this._prepareListener=r,r&&r({isPrepared:this.isPrepared})}get initializeListener(){return this._initializeListener}set initializeListener(r){this._initializeListener=r,r&&r({isInitialized:this.isInitialized})}createProcessImageRequest(r,n){const a=r.map((u,s)=>({data:u,light:6,pageIdx:s}));return C0(C0({},n),{},{imagesList:a})}prepareImageData(r){return r.map(n=>n instanceof ImageData?{width:n.width,height:n.height,data:n.data.buffer}:{data:n})}sendMessage(r){return this._queueService.addTask(()=>new Promise((n,a)=>{if(!this._worker)return ho("Worker is missing)"),a("Worker is missing");this._worker.onmessage=u=>{if(u.data.target===qs.custom){const{method:s,response:c,code:f}=u.data.data,d=c&&"reject_message"in c?c.reject_message:"";if(f===sx.ok||f===sx.badLicense&&!d)ho("".concat("Method ".concat(s,": { code: ").concat(f," } "))),n(c);else{const M=Dit[f]||f,I="Method ".concat(s,": ").concat(M);ho(I),a(I)}}u.data.target===qs.stdout&&K2e(JSON.stringify(u.data.content)),u.data.target===qs.stderr&&(K2e(JSON.stringify(u.data.content)),a(u.data.content))},ho("Send message to worker: { target: ".concat(r.target,", method: ").concat(r.method," }")),this._worker.postMessage(r,"data"in r&&r.data?r.data.map(u=>u.data):[])}))}prepare(){return Jt(this,null,function*(){var r,n;ho("Preparing the service");const a="ProcMgr.worker.js",u=this.workerPath==="https://wasm.regulaforensics.com/document/release/7.7/173f7ed7-278542421",s=k9t(this.workerPath);{let c=yield(yield fetch("".concat(s,"/").concat(a))).text();u||(c=jct(c,s));const f=new Blob([c],{type:"text/plain"}),d=URL.createObjectURL(f);this._worker=new Worker(d)}(r=this._worker)===null||r===void 0||r.postMessage({target:qs.gl,method:jl.prepare,preMain:!0,op:"setPrefetched"}),yield this.sendMessage({target:qs.init,method:jl.prepare,preMain:!0,URL:document.URL}),this.isPrepared=!0,(n=this._prepareListener)===null||n===void 0||n.call(this,{isPrepared:this.isPrepared}),ho("Service prepared")})}initialize(r){return Jt(this,null,function*(){return this._initProcess||(this._initProcess=this.doInitialize(r),this._initProcess.catch(()=>{this._initProcess=null})),this._initProcess})}doInitialize(r){return Jt(this,null,function*(){var n,a;this.isPrepared||(this.isAutoPrepare=!0,yield this.prepare()),ho("Initializing the service");const{scenario:u,license:s}=yield this.sendMessage({target:qs.custom,method:jl.initialize,preMain:!0,request:{systemInfo:{userID:_1e(Mfe),hostName:(n=document.location)===null||n===void 0?void 0:n.origin,license:r==null?void 0:r.license}}});return this.initData={scenario:u,license:s},this.isInitialized=!0,(a=this._initializeListener)===null||a===void 0||a.call(this,{isInitialized:this.isInitialized}),ho("Service initialized: ".concat(JSON.stringify({scenario:u,license:s}))),this.initData})}doProcess(r,n,a){return Jt(this,null,function*(){var u,s;ho("Process method ".concat(r," started")),this.isProcessing=!0,(u=this._processingListener)===null||u===void 0||u.call(this,{isProcessing:this.isProcessing});const c=yield this.sendMessage({target:qs.custom,method:r,preMain:!0,request:n,data:a});return this.isProcessing=!1,(s=this._processingListener)===null||s===void 0||s.call(this,{isProcessing:this.isProcessing}),ho("Process method ".concat(r," finished")),new K3(c)})}processImageBase64(r,n){return Jt(this,null,function*(){return this.doProcess(jl.processImage,this.createProcessImageRequest(r,n))})}process(r,n){return Jt(this,null,function*(){var a;const u=this.prepareImageData(r),s=yield this.doProcess(jl.process,n||this.recognizerProcessParam,u);return(a=this.recognizeListener)===null||a===void 0||a.call(this,s),s})}processImage(r,n){return Jt(this,null,function*(){const a=this.prepareImageData(r);return this.doProcess(jl.processImage,n||this.imageProcessParam,a)})}startNewPage(){return Jt(this,null,function*(){ho("Starting new page"),yield this.sendMessage({target:qs.custom,method:jl.startNewPage,preMain:!0})})}startNewDocument(r){return Jt(this,null,function*(){return ho("Starting new document"),yield this.sendMessage({target:qs.custom,method:jl.startNewDocument,preMain:!0,request:C0(C0({},this.recognizerProcessParam),{},{metadata:r})})})}createBackendTransaction(r){return Jt(this,null,function*(){return ho("Create backend transaction"),yield this.sendMessage({target:qs.custom,method:jl.createBackendTransaction,preMain:!0,request:C0(C0({},this.recognizerProcessParam),{},{metadata:r})})})}finalizePackage(){return Jt(this,null,function*(){try{var r;ho("Finalize package");const a=yield this.sendMessage({target:qs.custom,method:jl.finalizePackage,preMain:!0});return(r=this.onFinalize)===null||r===void 0||r.call(this,a),a}catch(a){var n;return(n=this.onFinalize)===null||n===void 0||n.call(this,{tag:"",transactionId:""}),Promise.reject(a)}})}addDataToPackage(r,n){return Jt(this,null,function*(){ho("Add data to package"),yield this.sendMessage({target:qs.custom,method:jl.addDataToPackage,request:n,preMain:!0,data:[{data:r.buffer}]}),ho("Data added to package")})}shutdown(){ho("Shutdown service"),this._worker&&(this._worker.terminate(),ho("Worker terminated")),this.isPrepared=!1,this.isInitialized=!1,this.isProcessing=!1,this._initProcess=null}}function U9t(){return Jt(this,null,function*(){const t=window.customElements.get("document-reader"),r=window.customElements.get("camera-snapshot"),n=window.customElements.get("fullscreen-container");t||window.customElements.define("document-reader",_wt),r||window.customElements.define("camera-snapshot",Hwt),n||window.customElements.define("fullscreen-container",Zwt);const a=window.customElements.whenDefined("document-reader"),u=window.customElements.whenDefined("camera-snapshot"),s=window.customElements.whenDefined("fullscreen-container");yield Promise.all([a,u,s])})}var q2e=(t=>(t.DOC_READER="DOC_READER",t))(q2e||{}),Tb=(t=>(t[t.NO_INITIALIZED=0]="NO_INITIALIZED",t[t.UNKNOWN_STEP=1]="UNKNOWN_STEP",t[t.SCAN_ERROR=2]="SCAN_ERROR",t[t.RFID_ERROR=3]="RFID_ERROR",t))(Tb||{}),jb=(t=>(t[t.CONFIGURATION_FAILED=0]="CONFIGURATION_FAILED",t[t.INTERNAL_ERROR=1]="INTERNAL_ERROR",t[t.PRESENTER_UNAVAILABLE=2]="PRESENTER_UNAVAILABLE",t))(jb||{}),MN="DOCUMENT";function O0(t){"@babel/helpers - typeof";return O0=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},O0(t)}function J2e(t,r,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}function X2e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function eIe(t,r,n){return r=gN(r),Y9t(t,tIe()?Reflect.construct(r,n||[],gN(t).constructor):r.apply(t,n))}function Y9t(t,r){if(r&&(O0(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q9t(t)}function Q9t(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tIe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(tIe=function(){return!!t})()}function gN(t){return gN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gN(t)}function rIe(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&&Sb(t,r)}function Sb(t,r){return Sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Sb(t,r)}function _0(t,r,n){return(r=F9t(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function F9t(t){var r=$9t(t,"string");return O0(r)=="symbol"?r:r+""}function $9t(t,r){if(O0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(O0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var IN=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;X2e(this,r);var f=Wn.getErrorKey(a,Tb);return eIe(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 rIe(r,t),J2e(r)}(Wn);_0(IN,"MODULE",MN),_0(IN,"ERROR_ENUM_NAME","ReaderModuleError"),_0(IN,"SHORT_CODE","RM");var pN=function(t){function r(n){var a=n.errorCode,u=n.message,s=n.underlyingError,c=n.underlyingBaseError;X2e(this,r);var f=Wn.getErrorKey(a,jb);return eIe(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 rIe(r,t),J2e(r)}(Wn);_0(pN,"MODULE",MN),_0(pN,"ERROR_ENUM_NAME","ScanError"),_0(pN,"SHORT_CODE","RMS");function tp(t){"@babel/helpers - typeof";return tp=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},tp(t)}function nIe(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 H9t(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?nIe(Object(n),!0).forEach(function(a){V9t(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nIe(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function V9t(t,r,n){return(r=B9t(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function B9t(t){var r=G9t(t,"string");return tp(r)=="symbol"?r:r+""}function G9t(t,r){if(tp(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r);if(tp(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Ab=!1,a4=function(r){var n=r.perform,a=r.moduleProps,u=r.isProcessing,s=a.processParam,c=a.functionality,f=a.sessionId,d=a.serviceToken,M=Tr.useRef(null),I=Tr.useRef(null),y={"--font-family":"var(--base-font-family)"},p=function(v){var m;if(v.detail.action===$r.PROCESS_FINISHED){var D,O,j;if(((D=v.detail.data)===null||D===void 0?void 0:D.status)===Wf.ERROR){var S=v.detail.data.reason,A=new pN({errorCode:jb.INTERNAL_ERROR,underlyingError:"ErrorTypes."+S}),w=new IN({errorCode:Tb.SCAN_ERROR,underlyingBaseError:A});n(w)}var R=(O=v.detail.data)===null||O===void 0?void 0:O.status,F=R===1,H=R===2;if(!(F||H)||!((j=v.detail.data)!==null&&j!==void 0&&j.response))return;u&&u(!0),window.RegulaDocumentSDK.finalizePackage().then(function($){n({transactionId:($==null?void 0:$.transactionId)||"",has_nfc:!1,cancel:!1})}).catch(function($){console.log("finalizePackage error: ",$),n({transactionId:"",cancel:!0,has_nfc:!1})})}(((m=v.detail)===null||m===void 0?void 0:m.action)===$r.CLOSE||v.detail.action===$r.CAMERA_PROCESS_CLOSED)&&n({transactionId:"",cancel:!0,has_nfc:!1})};return Tr.useEffect(function(){function N(D){return D?(D.internalScenario&&(D.scenario=D.internalScenario),delete D.internalScenario,D):{}}var v=N(s);d&&v!==null&&v!==void 0&&v.backendProcessing&&(v.backendProcessing.httpHeaders={Authorization:"Connection ".concat(d)});var m={processParam:H9t({},v)};f&&(m.tag=f),window.RegulaDocumentSDK.recognizerProcessParam=m,window.RegulaDocumentSDK.imageProcessParam={processParam:{scenario:nfe.MrzAndLocate}}},[]),Tr.useEffect(function(){var N=I.current;N&&(N.settings={startScreen:!1,skipButton:c==null?void 0:c.showSkipNextPageButton,videoRecord:c==null?void 0:c.recordScanningProcess,captureButton:c==null?void 0:c.showCaptureButton,captureButtonDelay:c==null?void 0:c.showCaptureButtonDelayFromStart})},[I.current]),Tr.useEffect(function(){var N=M.current;return N&&N.addEventListener("document-reader",p),function(){N&&N.removeEventListener("document-reader",p)}},[]),li.jsx("div",{style:{height:"100%",position:"relative"},ref:M,children:li.jsx("document-reader",{style:y,ref:I})})};a4.getSupportedTemplates=function(){return[q2e.DOC_READER]},a4.getIdentifier=function(){return MN},a4.isReady=function(){return Ab},a4.deinitialize=function(){var t;(t=window.RegulaDocumentSDK)===null||t===void 0||t.shutdown(),Ab=!1},a4.initialize=function(t){var r,n=t==null||(r=t.docreader)===null||r===void 0?void 0:r.devLicense;window.RegulaDocumentSDK=new P9t,console.info("%cDocument Reader web component version: %s","color: #6e56b0;",window.RegulaDocumentSDK.version.component),U9t().then(function(){window.RegulaDocumentSDK.initialize({license:n}),Ab=!0})},a4.displayName=MN;const Z9t=Object.freeze(Object.defineProperty({__proto__:null,default:a4},Symbol.toStringTag,{value:"Module"}));return di.ConnectionError=yg,di.DeinitializationError=q0,di.IdvEventTypesEnum=Z0,di.IdvIntegrationService=WDe,di.IdvModules=x5,di.IdvServiceMessages=W0,di.IdvWebComponent=IJ,di.InitializeError=K0,di.PrepareWorkflowError=Af,di.ScenarioError=No,di.SessionError=ol,di.StartSessionError=pg,di.WorkflowError=wl,Object.defineProperty(di,Symbol.toStringTag,{value:"Module"}),di}({});
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-CS-aPos4.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-BhTNX7R6.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.4.157-rc",
3
+ "version": "2.4.158-rc",
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",