@regulaforensics/idv-capture-web 0.1.97-nightly → 0.1.98-nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15270,7 +15270,7 @@ var pn = h4.create("wasm_idv"), c_ = /* @__PURE__ */ function() {
|
|
|
15270
15270
|
return fr().wrap(function(h) {
|
|
15271
15271
|
for (; ; ) switch (h.prev = h.next) {
|
|
15272
15272
|
case 0:
|
|
15273
|
-
return h.prev = 1, h.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/
|
|
15273
|
+
return h.prev = 1, h.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/157a35c-7cff4ddf6//PlatformAdaptor.worker.js");
|
|
15274
15274
|
case 4:
|
|
15275
15275
|
return s = h.sent, h.next = 7, s.blob();
|
|
15276
15276
|
case 7:
|
|
@@ -15297,7 +15297,7 @@ var pn = h4.create("wasm_idv"), c_ = /* @__PURE__ */ function() {
|
|
|
15297
15297
|
}), h.next = 23, this.sendMessage({
|
|
15298
15298
|
target: "worker-init",
|
|
15299
15299
|
URL: document.URL,
|
|
15300
|
-
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/0.1/
|
|
15300
|
+
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/0.1/157a35c-7cff4ddf6/",
|
|
15301
15301
|
preMain: !0
|
|
15302
15302
|
});
|
|
15303
15303
|
case 23:
|
|
@@ -16618,9 +16618,9 @@ function D6() {
|
|
|
16618
16618
|
supportedTemplates: Rn.getSupportedTemplates(),
|
|
16619
16619
|
component: Rn
|
|
16620
16620
|
}], a = M6(M6({}, "LIVENESS", function() {
|
|
16621
|
-
return import("./index-
|
|
16621
|
+
return import("./index-m8sOqviw.js");
|
|
16622
16622
|
}), "DOC_READER", function() {
|
|
16623
|
-
return import("./index-
|
|
16623
|
+
return import("./index-Cdueq7CB.js");
|
|
16624
16624
|
}), s = /* @__PURE__ */ wr().mark(function S() {
|
|
16625
16625
|
var E, w, I;
|
|
16626
16626
|
return wr().wrap(function(R) {
|
|
@@ -22,7 +22,7 @@ var S1 = (e) => {
|
|
|
22
22
|
throw l;
|
|
23
23
|
}, "return" in t && o("return"), a;
|
|
24
24
|
};
|
|
25
|
-
import { B as ec, r as xs, j as nE } from "./index-
|
|
25
|
+
import { B as ec, r as xs, j as nE } from "./index-CPxAxpV3.js";
|
|
26
26
|
var KO = Object.defineProperty, qO = Object.defineProperties, XO = Object.getOwnPropertyDescriptors, iE = Object.getOwnPropertySymbols, $O = Object.prototype.hasOwnProperty, QO = Object.prototype.propertyIsEnumerable, wa = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), JO = (e) => {
|
|
27
27
|
throw TypeError(e);
|
|
28
28
|
}, oE = (e, t, r) => t in e ? KO(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, tt = (e, t) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Ju, r as ga, j as Ns } from "./index-
|
|
1
|
+
import { B as Ju, r as ga, j as Ns } from "./index-CPxAxpV3.js";
|
|
2
2
|
var P5 = Object.defineProperty, H5 = Object.defineProperties, V5 = Object.getOwnPropertyDescriptors, ss = Object.getOwnPropertySymbols, R5 = Object.prototype.hasOwnProperty, Z5 = Object.prototype.propertyIsEnumerable, Ds = (r, i, M) => i in r ? P5(r, i, { enumerable: !0, configurable: !0, writable: !0, value: M }) : r[i] = M, yg = (r, i) => {
|
|
3
3
|
for (var M in i || (i = {}))
|
|
4
4
|
R5.call(i, M) && Ds(r, M, i[M]);
|
package/dist/main.iife.js
CHANGED
|
@@ -48,7 +48,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
48
48
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Que(r,n){if(r){if(typeof r=="string")return Ek(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ek(r,n):void 0}}function Ek(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,a=Array(n);i<n;i++)a[i]=r[i];return a}function Fue(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var a,s,l,c,M=[],d=!0,g=!1;try{if(l=(i=i.call(r)).next,n!==0)for(;!(d=(a=l.call(i)).done)&&(M.push(a.value),M.length!==n);d=!0);}catch(p){g=!0,s=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(g)throw s}}return M}}function Bue(r){if(Array.isArray(r))return r}var q2=function(n){var i=n.imageId,a=n.imageURL,s=n.base64,l=n.contentMode,c=l===void 0?Rd.ASPECT_FILL:l,M=n.cornerRadius,d=n.backgroundColor,g=d===void 0?"transparent":d,p=function(A){if(A===Rd.ASPECT_FILL)return"cover";if(A===Rd.ASPECT_FIT)return"contain";if(A===Rd.FILL)return"fill"},h=Wn.useState(!0),y=Vue(h,2),N=y[0],E=y[1],m=N&&a,v=function(){E(!1)};if(i){var w=i in lE?i:"default";return ue.jsx(Hue,{type:w})}if(s||a)return ue.jsxs(ue.Fragment,{children:[m&&ue.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:"#e0e0e0",borderRadius:M}}),ue.jsx("img",{style:{width:"100%",height:"100%",objectFit:p(c),borderRadius:M,backgroundColor:g,display:m?"none":"block"},src:s||a,onLoad:v})]})},Zue=function(n){var i=n.signature;return ue.jsx("footer",{style:{display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:ue.jsx("a",{href:"",children:ue.jsx(q2,{imageId:i==null?void 0:i.imageId})})})},Dk=Wn.createContext(void 0),Gue=function(n){var i=n.perform,a=n.children;return ue.jsx(Dk.Provider,{value:{perform:i},children:a})},mk=function(){var n=Wn.useContext(Dk);if(!n)throw new Error("usePerform must be used within a PerformProvider");return n},jk={},cE,vk;function $ue(){if(vk)return cE;vk=1;var r=hn(),n=kr(),i=Sr(),a=Md(),s=ad(),l=ps(),c=Lg().f,M=i(c),d=i([].push),g=r&&n(function(){var h=Object.create(null);return h[2]=2,!M(h,2)}),p=function(h){return function(y){for(var N=l(y),E=s(N),m=g&&a(N)===null,v=E.length,w=0,O=[],A;v>w;)A=E[w++],(!r||(m?A in N:M(N,A)))&&d(O,h?[A,N[A]]:N[A]);return O}};return cE={entries:p(!0),values:p(!1)},cE}var Tk;function Wue(){if(Tk)return jk;Tk=1;var r=Gt(),n=$ue().entries;return r({target:"Object",stat:!0},{entries:function(a){return n(a)}}),jk}Wue();function t5(r){"@babel/helpers - typeof";return t5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t5(r)}function Ck(r){return r.split("\\n")}function Ak(r){return r===kd.CENTER?"center":r===kd.RIGHT?"right":"left"}function fE(r){if(t5(r)==="object"&&r!==null)for(var n in r)t5(r[n])==="object"?fE(r[n]):r[n]==="true"?r[n]=!0:r[n]==="false"&&(r[n]=!1);return r}var Kue={display:"flex",justifyContent:"center",alignItems:"center",background:"white",borderRadius:"50%",width:"36px",height:"36px",border:"none",cursor:"pointer"},que=function(n){var i=n.dataTestId,a=n.responseBody,s=mk(),l=s.perform,c=function(){var d=JSON.parse(JSON.stringify(a));fE(d),l(d)};return ue.jsx("button",{"data-test":i,onClick:c,style:Kue,children:ue.jsx(q2,{imageId:"cross"})},i)},Jue=function(n){var i=n.closeButton;return ue.jsx("header",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",paddingRight:"16px"},children:ue.jsx("div",{children:i&&ue.jsx(que,Co({dataTestId:"close-btn"},i))})})},Ud=function(n){var i=n.text,a=n.fontName,s=a===void 0?"":a,l=n.fontSize,c=l===void 0?"17px":l,M=n.fontColor,d=M===void 0?"black":M,g=n.alignment,p=g===void 0?kd.LEFT:g,h=n.backgroundColor,y=h===void 0?"transparent":h,N=n.cornerRadius,E=N===void 0?0:N;return ue.jsx("div",{className:"title",style:{fontFamily:s+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:c,color:d,textAlign:Ak(p),backgroundColor:y,borderRadius:E},children:i&&Ck(i)})};function Hd(r){"@babel/helpers - typeof";return Hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hd(r)}function ME(r,n,i){return(n=Xue(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function Xue(r){var n=ese(r,"string");return Hd(n)=="symbol"?n:n+""}function ese(r,n){if(Hd(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(Hd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}var tse=function(n){var i=n.title,a=n.image,s=n.responseBody,l=n.backgroundColor,c=n.cornerRadius,M=n.highlightColor,d=n.dataTestId,g=n.children,p=mk(),h=p.perform,y=function(){var m=JSON.parse(JSON.stringify(s));fE(m),h(m)},N=ME(ME(ME({height:"50px",width:"100%",padding:"10px 16px",textAlign:"center",fontSize:"16px",fontWeight:"400",border:"none",cursor:"pointer",borderRadius:c||0},"--hover-btn-background",M||"red"),"backgroundColor",l||"transparent"),"transition",".3s");return ue.jsxs("button",{"data-test":d,onClick:y,style:N,children:[a&&ue.jsx(q2,{imageURL:a.imageURL}),g||ue.jsx(Ud,Co({},i))]},d)};function Vd(r){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vd(r)}var rse=["items"];function Sk(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function _k(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?Sk(Object(i),!0).forEach(function(a){nse(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Sk(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function nse(r,n,i){return(n=ise(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function ise(r){var n=ase(r,"string");return Vd(n)=="symbol"?n:n+""}function ase(r,n){if(Vd(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(Vd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function ose(r,n){if(r==null)return{};var i,a,s=use(r,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);for(a=0;a<l.length;a++)i=l[a],n.indexOf(i)===-1&&{}.propertyIsEnumerable.call(r,i)&&(s[i]=r[i])}return s}function use(r,n){if(r==null)return{};var i={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(n.indexOf(a)!==-1)continue;i[a]=r[a]}return i}var sse=function(n){var i=n.items,a=ose(n,rse),s={display:"flex",flexDirection:"row",flexWrap:"wrap",alignItems:"center",alignSelf:"flex-end",justifyContent:"center",gap:"8px",width:"100%",height:"auto",alignContent:"flex-end",paddingTop:"20px"};return ue.jsx("div",{className:"buttons",style:_k(_k({},s),a),children:i.map(function(l){var c,M;return ue.jsx(tse,Co({dataTestId:"button-"+((c=l.title)===null||c===void 0?void 0:c.text)},l),(M=l.title)===null||M===void 0?void 0:M.text)})})};function Yd(r){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Yd(r)}function Ok(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function lse(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?Ok(Object(i),!0).forEach(function(a){cse(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Ok(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function cse(r,n,i){return(n=fse(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function fse(r){var n=Mse(r,"string");return Yd(n)=="symbol"?n:n+""}function Mse(r,n){if(Yd(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(Yd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}var r5=function(n){var i=n.children,a=n.header,s=n.footer,l=n.backgroundColor,c=l===void 0?"white":l,M=n.buttons,d=a?60:10,g=s?30:10,p={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"center",alignContent:"center",justifyContent:"center",margin:"0 auto",paddingTop:a?d+10+"px":"10px",paddingBottom:s?g+10+"px":"10px",paddingLeft:"20px",paddingRight:"20px",height:"100%",width:"100%",backgroundColor:c};return ue.jsxs("div",{id:"base-container",style:lse({},p),children:[a&&ue.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:d},children:ue.jsx(Jue,{closeButton:a.closeButton})}),ue.jsx("div",{style:{height:"100%",flex:"1 1 100%",overflow:"hidden"},children:i}),(M==null?void 0:M.length)&&ue.jsx(sse,{items:M}),s&&ue.jsx("div",{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:g},children:ue.jsx(Zue,Co({},s))})]})},dE=function(n){var i=n.text,a=n.fontName,s=a===void 0?"":a,l=n.fontColor,c=l===void 0?"#000000":l,M=n.alignment,d=M===void 0?kd.LEFT:M,g=n.fontSize,p=g===void 0?17:g,h=n.backgroundColor,y=h===void 0?"transparent":h,N=n.cornerRadius,E=N===void 0?0:N;return ue.jsx("div",{style:{fontFamily:s+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:p,textAlign:Ak(d),color:c,borderRadius:E,backgroundColor:y,whiteSpace:"pre-line"},children:i&&Ck(i).map(function(m,v){return m.length===0?ue.jsx("br",{},"description-text_"+v):ue.jsx("p",{children:m},"description-text_"+v)})})};function Qd(r){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qd(r)}function xk(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function Lk(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?xk(Object(i),!0).forEach(function(a){dse(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):xk(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function dse(r,n,i){return(n=gse(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function gse(r){var n=Ise(r,"string");return Qd(n)=="symbol"?n:n+""}function Ise(r,n){if(Qd(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(Qd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}var pse=function(n){var i=n.title,a=n.description,s=n.image,l=n.backgroundColor,c=l===void 0?"transparent":l,M=n.cornerRadius,d=M===void 0?0:M,g=n.isLastChild,p={display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:g?"none":"1px solid #E0E0E0",padding:"16px 0",gap:16};return ue.jsxs("div",{className:"details-item",style:Lk(Lk({},p),{},{backgroundColor:c,borderRadius:d}),children:[ue.jsxs("div",{style:{flex:"0 1 auto"},children:[ue.jsx("div",{style:{marginBottom:5,fontWeight:"bold",lineHeight:"21px"},children:ue.jsx(Ud,Co({},i))}),ue.jsx("div",{style:{lineHeight:"21px",fontWeight:"400"},children:ue.jsx(dE,Co({},a))})]}),ue.jsx("div",{style:{aspectRatio:"1 / 1",width:120,height:120,flex:"0 0 120px"},children:ue.jsx(q2,Co({},s))})]})};function Fd(r){"@babel/helpers - typeof";return Fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fd(r)}function wk(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function bk(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?wk(Object(i),!0).forEach(function(a){yse(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):wk(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function yse(r,n,i){return(n=hse(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function hse(r){var n=Nse(r,"string");return Fd(n)=="symbol"?n:n+""}function Nse(r,n){if(Fd(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(Fd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}var Ese={display:"flex",flexDirection:"column",padding:"0 16px"},Dse=function(n){var i=n.items,a=n.backgroundColor,s=a===void 0?"white":a,l=n.cornerRadius,c=l===void 0?16:l;return ue.jsx("div",{className:"details",style:bk(bk({},Ese),{},{backgroundColor:s,borderRadius:c}),children:i.map(function(M,d){return ue.jsx(pse,Co({isLastChild:d===i.length-1},M),d)})})},mse=function(n){var i=n.title,a=n.indicatorColor,s=a===void 0?"black":a;return ue.jsxs(ue.Fragment,{children:[ue.jsx(Nk,{indicatorColor:s}),ue.jsx("div",{children:i==null?void 0:i.text})]})};function jse(r,n){return Ase(r)||Cse(r,n)||Tse(r,n)||vse()}function vse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
49
49
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tse(r,n){if(r){if(typeof r=="string")return zk(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zk(r,n):void 0}}function zk(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,a=Array(n);i<n;i++)a[i]=r[i];return a}function Cse(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var a,s,l,c,M=[],d=!0,g=!1;try{if(l=(i=i.call(r)).next,n!==0)for(;!(d=(a=l.call(i)).done)&&(M.push(a.value),M.length!==n);d=!0);}catch(p){g=!0,s=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(g)throw s}}return M}}function Ase(r){if(Array.isArray(r))return r}var Sse=function(n){var i=n.title,a=n.header,s=n.footer,l=n.details,c=n.buttons,M=n.backgroundColor,d=Wn.useRef(null),g=Wn.useState(!1),p=jse(g,2),h=p[0],y=p[1];return Wn.useEffect(function(){d.current&&y(d.current.scrollHeight>d.current.clientHeight)},[]),ue.jsx(r5,{header:a,buttons:c,footer:s,backgroundColor:M,children:ue.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:h?"flex-start":"center",height:"100%",minHeight:"100%",overflow:"auto"},ref:d,children:[ue.jsx("div",{style:{marginBottom:i?"16px":"0",fontWeight:400,fontSize:"28px"},children:i&&ue.jsx(Ud,Co({},i))}),l&&ue.jsx(Dse,Co({},l))]})})},_se={width:"100%",height:"auto",marginBottom:"32px",aspectRatio:1.61},Ose={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",alignContent:"center",margin:"0 auto",height:"100%",width:"100%",minHeight:"100%",overflow:"auto"};function Bd(r){"@babel/helpers - typeof";return Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bd(r)}function kk(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function Rk(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?kk(Object(i),!0).forEach(function(a){xse(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):kk(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function xse(r,n,i){return(n=Lse(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function Lse(r){var n=wse(r,"string");return Bd(n)=="symbol"?n:n+""}function wse(r,n){if(Bd(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(Bd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}var bse=function(n){var i=n.title,a=n.header,s=n.footer,l=n.image,c=n.description,M=n.buttons,d=n.backgroundColor;return ue.jsx(r5,{header:a,footer:s,buttons:M,backgroundColor:d,children:ue.jsx(ue.Fragment,{children:ue.jsxs("div",{style:Rk(Rk({},Ose),{},{justifyContent:l?"flex-start":"center"}),children:[l&&ue.jsx("div",{style:_se,children:ue.jsx(q2,Co({},l))}),i&&ue.jsx("div",{style:{marginBottom:20,lineHeight:"39.2px"},children:ue.jsx(Ud,Co({},i))}),c&&ue.jsx("div",{style:{lineHeight:"28px",fontWeight:"400"},children:ue.jsx(dE,Co({},c))})]})})})},Pk=function(n){var i=n.progressView,a=n.footer,s=n.backgroundColor;return ue.jsx(r5,{footer:a,backgroundColor:s,children:ue.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"20px",height:"100%",width:"100%"},children:ue.jsx(mse,{title:(i==null?void 0:i.title)||{text:""},indicatorColor:(i==null?void 0:i.indicatorColor)||"black"})})})},zse={display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flex:1,height:"100%",flexDirection:"column"},kse={width:"86px",height:"86px",marginBottom:"16px",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center"},Rse={fontSize:"20px",fontWeight:700,maxWidth:"345px",textAlign:"center",lineHeight:"24px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",marginBottom:"8px"},Pse={fontSize:"16px",fontWeight:400,lineHeight:"19px",color:"#676767",textAlign:"center"},Use=function(n){var i=n.header,a=n.footer,s=n.image,l=n.title,c=n.description,M=n.buttons,d=n.backgroundColor;return ue.jsx(r5,{header:i,buttons:M,footer:a,backgroundColor:d,children:ue.jsxs("div",{style:zse,children:[s&&ue.jsx("div",{style:kse,children:ue.jsx(q2,Co({},s))}),(l==null?void 0:l.text)&&ue.jsx("div",{style:Rse,children:l&&ue.jsx(Ud,Co({},l))}),(c==null?void 0:c.text)&&ue.jsx("div",{style:Pse,children:ue.jsx(dE,Co({},c))})]})})},gE=!1,Hse=function(n){var i=n.template,a=n.templateLayout;if(i==="STATUS")return ue.jsx(Use,{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,description:a==null?void 0:a.description,backgroundColor:a==null?void 0:a.backgroundColor});if(i==="INFO")return ue.jsx(bse,{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});if(i==="PROGRESS")return ue.jsx(Pk,{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});if(i==="INFO_DETAILS")return ue.jsx(Sse,{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})},Uk="GUI",Pc=function(n){var i=n.moduleProps,a=n.perform,s=i.templateId,l=i.templateLayout,c=Wn.useCallback(function(M){a&&a(M)},[s]);return s&&l?ue.jsx(Gue,{perform:c,children:ue.jsx(Hse,{template:s,templateLayout:l})}):ue.jsx(Pk,{})};Pc.getIdentifier=function(){return Uk},Pc.getSupportedTemplates=function(){return["INFO","INFO_DETAILS","PROGRESS","STATUS"]},Pc.deinitialize=function(){gE=!1},Pc.initialize=function(){gE=!0},Pc.isReady=function(){return gE},Pc.displayName=Uk;var Hk={},Vk;function Vse(){if(Vk)return Hk;Vk=1;var r=Gt(),n=Sr(),i=Date,a=n(i.prototype.getTime);return r({target:"Date",stat:!0},{now:function(){return a(new i)}}),Hk}Vse();var Yk={},Qk={},IE,Fk;function Bk(){if(Fk)return IE;Fk=1;var r=kr(),n=Gn(),i=hn(),a=zo(),s=n("iterator");return IE=!r(function(){var l=new URL("b?a=1&b=2&c=3","https://a"),c=l.searchParams,M=new URLSearchParams("a=1&a=2&b=3"),d="";return l.pathname="c%20d",c.forEach(function(g,p){c.delete("b"),d+=p+g}),M.delete("a",2),M.delete("b",void 0),a&&(!l.toJSON||!M.has("a",1)||M.has("a",2)||!M.has("a",void 0)||M.has("b"))||!c.size&&(a||!i)||!c.sort||l.href!=="https://a/c%20d?a=1&c=3"||c.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!c[s]||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"}),IE}var pE,Zk;function Yse(){if(Zk)return pE;Zk=1;var r=hn(),n=Sr(),i=Ii(),a=kr(),s=ad(),l=Pg(),c=Lg(),M=as(),d=qM(),g=Object.assign,p=Object.defineProperty,h=n([].concat);return pE=!g||a(function(){if(r&&g({b:1},g(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},N={},E=Symbol("assign detection"),m="abcdefghijklmnopqrst";return y[E]=7,m.split("").forEach(function(v){N[v]=v}),g({},y)[E]!==7||s(g({},N)).join("")!==m})?function(N,E){for(var m=M(N),v=arguments.length,w=1,O=l.f,A=c.f;v>w;)for(var x=d(arguments[w++]),U=O?h(s(x),O(x)):s(x),V=U.length,Z=0,W;V>Z;)W=U[Z++],(!r||i(A,x,W))&&(m[W]=x[W]);return m}:g,pE}var yE,Gk;function Qse(){if(Gk)return yE;Gk=1;var r=Sr(),n=2147483647,i=36,a=1,s=26,l=38,c=700,M=72,d=128,g="-",p=/[^\0-\u007E]/,h=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",N=i-a,E=RangeError,m=r(h.exec),v=Math.floor,w=String.fromCharCode,O=r("".charCodeAt),A=r([].join),x=r([].push),U=r("".replace),V=r("".split),Z=r("".toLowerCase),W=function(re){for(var ae=[],se=0,fe=re.length;se<fe;){var k=O(re,se++);if(k>=55296&&k<=56319&&se<fe){var L=O(re,se++);(L&64512)===56320?x(ae,((k&1023)<<10)+(L&1023)+65536):(x(ae,k),se--)}else x(ae,k)}return ae},B=function(re){return re+22+75*(re<26)},ee=function(re,ae,se){var fe=0;for(re=se?v(re/c):re>>1,re+=v(re/ae);re>N*s>>1;)re=v(re/N),fe+=i;return v(fe+(N+1)*re/(re+l))},ie=function(re){var ae=[];re=W(re);var se=re.length,fe=d,k=0,L=M,_,P;for(_=0;_<re.length;_++)P=re[_],P<128&&x(ae,w(P));var Y=ae.length,T=Y;for(Y&&x(ae,g);T<se;){var F=n;for(_=0;_<re.length;_++)P=re[_],P>=fe&&P<F&&(F=P);var Me=T+1;if(F-fe>v((n-k)/Me))throw new E(y);for(k+=(F-fe)*Me,fe=F,_=0;_<re.length;_++){if(P=re[_],P<fe&&++k>n)throw new E(y);if(P===fe){for(var Ie=k,le=i;;){var je=le<=L?a:le>=L+s?s:le-L;if(Ie<je)break;var _e=Ie-je,Se=i-je;x(ae,w(B(je+_e%Se))),Ie=v(_e/Se),le+=i}x(ae,w(B(Ie))),L=ee(k,Me,T===Y),k=0,T++}}k++,fe++}return A(ae,"")};return yE=function(re){var ae=[],se=V(U(Z(re),h,"."),"."),fe,k;for(fe=0;fe<se.length;fe++)k=se[fe],x(ae,m(p,k)?"xn--"+ie(k):k);return A(ae,".")},yE}var $k={},Wk;function Fse(){if(Wk)return $k;Wk=1;var r=Gt(),n=Sr(),i=qp(),a=RangeError,s=String.fromCharCode,l=String.fromCodePoint,c=n([].join),M=!!l&&l.length!==1;return r({target:"String",stat:!0,arity:1,forced:M},{fromCodePoint:function(g){for(var p=[],h=arguments.length,y=0,N;h>y;){if(N=+arguments[y++],i(N,1114111)!==N)throw new a(N+" is not a valid code point");p[y]=N<65536?s(N):s(((N-=65536)>>10)+55296,N%1024+56320)}return c(p,"")}}),$k}var hE,Kk;function Bse(){if(Kk)return hE;Kk=1;var r=h1(),n=Math.floor,i=function(a,s){var l=a.length;if(l<8)for(var c=1,M,d;c<l;){for(d=c,M=a[c];d&&s(a[d-1],M)>0;)a[d]=a[--d];d!==c++&&(a[d]=M)}else for(var g=n(l/2),p=i(r(a,0,g),s),h=i(r(a,g),s),y=p.length,N=h.length,E=0,m=0;E<y||m<N;)a[E+m]=E<y&&m<N?s(p[E],h[m])<=0?p[E++]:h[m++]:E<y?p[E++]:h[m++];return a};return hE=i,hE}var NE,qk;function Jk(){if(qk)return NE;qk=1,dh(),Fse();var r=Gt(),n=rn(),i=Kb(),a=bo(),s=Ii(),l=Sr(),c=hn(),M=Bk(),d=ka(),g=Oc(),p=kh(),h=Ps(),y=ax(),N=Sc(),E=B2(),m=Zn(),v=hi(),w=N1(),O=id(),A=pi(),x=mi(),U=_o(),V=_c(),Z=t2(),W=Sh(),B=Bg(),ee=dd(),ie=G2(),re=Gn(),ae=Bse(),se=re("iterator"),fe="URLSearchParams",k=fe+"Iterator",L=N.set,_=N.getterFor(fe),P=N.getterFor(k),Y=i("fetch"),T=i("Request"),F=i("Headers"),Me=T&&T.prototype,Ie=F&&F.prototype,le=n.TypeError,je=n.encodeURIComponent,_e=String.fromCharCode,Se=a("String","fromCodePoint"),Ye=parseInt,qe=l("".charAt),dt=l([].join),ct=l([].push),ht=l("".replace),Lt=l([].shift),Ct=l([].splice),At=l("".split),at=l("".slice),Mt=l(/./.exec),lt=/\+/g,yt="�",ve=/^[0-9a-f]+$/i,Fe=function(Ne,we){var ze=at(Ne,we,we+2);return Mt(ve,ze)?Ye(ze,16):NaN},Ke=function(Ne){for(var we=0,ze=128;ze>0&&(Ne&ze)!==0;ze>>=1)we++;return we},ft=function(Ne){var we=null;switch(Ne.length){case 1:we=Ne[0];break;case 2:we=(Ne[0]&31)<<6|Ne[1]&63;break;case 3:we=(Ne[0]&15)<<12|(Ne[1]&63)<<6|Ne[2]&63;break;case 4:we=(Ne[0]&7)<<18|(Ne[1]&63)<<12|(Ne[2]&63)<<6|Ne[3]&63;break}return we>1114111?null:we},He=function(Ne){Ne=ht(Ne,lt," ");for(var we=Ne.length,ze="",xe=0;xe<we;){var et=qe(Ne,xe);if(et==="%"){if(qe(Ne,xe+1)==="%"||xe+3>we){ze+="%",xe++;continue}var pt=Fe(Ne,xe+1);if(pt!==pt){ze+=et,xe++;continue}xe+=2;var Dt=Ke(pt);if(Dt===0)et=_e(pt);else{if(Dt===1||Dt>4){ze+=yt,xe++;continue}for(var jt=[pt],Rt=1;Rt<Dt&&(xe++,!(xe+3>we||qe(Ne,xe)!=="%"));){var Jt=Fe(Ne,xe+1);if(Jt!==Jt){xe+=3;break}if(Jt>191||Jt<128)break;ct(jt,Jt),xe+=2,Rt++}if(jt.length!==Dt){ze+=yt;continue}var sr=ft(jt);sr===null?ze+=yt:et=Se(sr)}}ze+=et,xe++}return ze},Ce=/[!'()~]|%20/g,Le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ze=function(Ne){return Le[Ne]},gt=function(Ne){return ht(je(Ne),Ce,Ze)},ot=y(function(we,ze){L(this,{type:k,target:_(we).entries,index:0,kind:ze})},fe,function(){var we=P(this),ze=we.target,xe=we.index++;if(!ze||xe>=ze.length)return we.target=null,ee(void 0,!0);var et=ze[xe];switch(we.kind){case"keys":return ee(et.key,!1);case"values":return ee(et.value,!1)}return ee([et.key,et.value],!1)},!0),Be=function(Ne){this.entries=[],this.url=null,Ne!==void 0&&(x(Ne)?this.parseObject(Ne):this.parseQuery(typeof Ne=="string"?qe(Ne,0)==="?"?at(Ne,1):Ne:U(Ne)))};Be.prototype={type:fe,bindURL:function(Ne){this.url=Ne,this.update()},parseObject:function(Ne){var we=this.entries,ze=B(Ne),xe,et,pt,Dt,jt,Rt,Jt;if(ze)for(xe=W(Ne,ze),et=xe.next;!(pt=s(et,xe)).done;){if(Dt=W(A(pt.value)),jt=Dt.next,(Rt=s(jt,Dt)).done||(Jt=s(jt,Dt)).done||!s(jt,Dt).done)throw new le("Expected sequence with length 2");ct(we,{key:U(Rt.value),value:U(Jt.value)})}else for(var sr in Ne)v(Ne,sr)&&ct(we,{key:sr,value:U(Ne[sr])})},parseQuery:function(Ne){if(Ne)for(var we=this.entries,ze=At(Ne,"&"),xe=0,et,pt;xe<ze.length;)et=ze[xe++],et.length&&(pt=At(et,"="),ct(we,{key:He(Lt(pt)),value:He(dt(pt,"="))}))},serialize:function(){for(var Ne=this.entries,we=[],ze=0,xe;ze<Ne.length;)xe=Ne[ze++],ct(we,gt(xe.key)+"="+gt(xe.value));return dt(we,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Oe=function(){E(this,Pe);var we=arguments.length>0?arguments[0]:void 0,ze=L(this,new Be(we));c||(this.size=ze.entries.length)},Pe=Oe.prototype;if(p(Pe,{append:function(we,ze){var xe=_(this);ie(arguments.length,2),ct(xe.entries,{key:U(we),value:U(ze)}),c||this.length++,xe.updateURL()},delete:function(Ne){for(var we=_(this),ze=ie(arguments.length,1),xe=we.entries,et=U(Ne),pt=ze<2?void 0:arguments[1],Dt=pt===void 0?pt:U(pt),jt=0;jt<xe.length;){var Rt=xe[jt];if(Rt.key===et&&(Dt===void 0||Rt.value===Dt)){if(Ct(xe,jt,1),Dt!==void 0)break}else jt++}c||(this.size=xe.length),we.updateURL()},get:function(we){var ze=_(this).entries;ie(arguments.length,1);for(var xe=U(we),et=0;et<ze.length;et++)if(ze[et].key===xe)return ze[et].value;return null},getAll:function(we){var ze=_(this).entries;ie(arguments.length,1);for(var xe=U(we),et=[],pt=0;pt<ze.length;pt++)ze[pt].key===xe&&ct(et,ze[pt].value);return et},has:function(we){for(var ze=_(this).entries,xe=ie(arguments.length,1),et=U(we),pt=xe<2?void 0:arguments[1],Dt=pt===void 0?pt:U(pt),jt=0;jt<ze.length;){var Rt=ze[jt++];if(Rt.key===et&&(Dt===void 0||Rt.value===Dt))return!0}return!1},set:function(we,ze){var xe=_(this);ie(arguments.length,1);for(var et=xe.entries,pt=!1,Dt=U(we),jt=U(ze),Rt=0,Jt;Rt<et.length;Rt++)Jt=et[Rt],Jt.key===Dt&&(pt?Ct(et,Rt--,1):(pt=!0,Jt.value=jt));pt||ct(et,{key:Dt,value:jt}),c||(this.size=et.length),xe.updateURL()},sort:function(){var we=_(this);ae(we.entries,function(ze,xe){return ze.key>xe.key?1:-1}),we.updateURL()},forEach:function(we){for(var ze=_(this).entries,xe=w(we,arguments.length>1?arguments[1]:void 0),et=0,pt;et<ze.length;)pt=ze[et++],xe(pt.value,pt.key,this)},keys:function(){return new ot(this,"keys")},values:function(){return new ot(this,"values")},entries:function(){return new ot(this,"entries")}},{enumerable:!0}),d(Pe,se,Pe.entries,{name:"entries"}),d(Pe,"toString",function(){return _(this).serialize()},{enumerable:!0}),c&&g(Pe,"size",{get:function(){return _(this).entries.length},configurable:!0,enumerable:!0}),h(Oe,fe),r({global:!0,constructor:!0,forced:!M},{URLSearchParams:Oe}),!M&&m(F)){var rt=l(Ie.has),Tt=l(Ie.set),St=function(Ne){if(x(Ne)){var we=Ne.body,ze;if(O(we)===fe)return ze=Ne.headers?new F(Ne.headers):new F,rt(ze,"content-type")||Tt(ze,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),V(Ne,{body:Z(0,U(we)),headers:Z(0,ze)})}return Ne};if(m(Y)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(we){return Y(we,arguments.length>1?St(arguments[1]):{})}}),m(T)){var gr=function(we){return E(this,Me),new T(we,arguments.length>1?St(arguments[1]):{})};Me.constructor=gr,gr.prototype=Me,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:gr})}}return NE={URLSearchParams:Oe,getState:_},NE}var Xk;function Zse(){if(Xk)return Qk;Xk=1,_L();var r=Gt(),n=hn(),i=Bk(),a=rn(),s=N1(),l=Sr(),c=ka(),M=Oc(),d=B2(),g=hi(),p=Yse(),h=yw(),y=h1(),N=AL().codeAt,E=Qse(),m=_o(),v=Ps(),w=G2(),O=Jk(),A=Sc(),x=A.set,U=A.getterFor("URL"),V=O.URLSearchParams,Z=O.getState,W=a.URL,B=a.TypeError,ee=a.parseInt,ie=Math.floor,re=Math.pow,ae=l("".charAt),se=l(/./.exec),fe=l([].join),k=l(1 .toString),L=l([].pop),_=l([].push),P=l("".replace),Y=l([].shift),T=l("".split),F=l("".slice),Me=l("".toLowerCase),Ie=l([].unshift),le="Invalid authority",je="Invalid scheme",_e="Invalid host",Se="Invalid port",Ye=/[a-z]/i,qe=/[\d+-.a-z]/i,dt=/\d/,ct=/^0x/i,ht=/^[0-7]+$/,Lt=/^\d+$/,Ct=/^[\da-f]+$/i,At=/[\0\t\n\r #%/:<>?@[\\\]^|]/,at=/[\0\t\n\r #/:<>?@[\\\]^|]/,Mt=/^[\u0000-\u0020]+/,lt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,yt=/[\t\n\r]/g,ve,Fe=function(J){var de=T(J,"."),oe,G,Ee,Je,ke,_t,it;if(de.length&&de[de.length-1]===""&&de.length--,oe=de.length,oe>4)return J;for(G=[],Ee=0;Ee<oe;Ee++){if(Je=de[Ee],Je==="")return J;if(ke=10,Je.length>1&&ae(Je,0)==="0"&&(ke=se(ct,Je)?16:8,Je=F(Je,ke===8?1:2)),Je==="")_t=0;else{if(!se(ke===10?Lt:ke===8?ht:Ct,Je))return J;_t=ee(Je,ke)}_(G,_t)}for(Ee=0;Ee<oe;Ee++)if(_t=G[Ee],Ee===oe-1){if(_t>=re(256,5-oe))return null}else if(_t>255)return null;for(it=L(G),Ee=0;Ee<G.length;Ee++)it+=G[Ee]*re(256,3-Ee);return it},Ke=function(J){var de=[0,0,0,0,0,0,0,0],oe=0,G=null,Ee=0,Je,ke,_t,it,$t,nr,he,Ot=function(){return ae(J,Ee)};if(Ot()===":"){if(ae(J,1)!==":")return;Ee+=2,oe++,G=oe}for(;Ot();){if(oe===8)return;if(Ot()===":"){if(G!==null)return;Ee++,oe++,G=oe;continue}for(Je=ke=0;ke<4&&se(Ct,Ot());)Je=Je*16+ee(Ot(),16),Ee++,ke++;if(Ot()==="."){if(ke===0||(Ee-=ke,oe>6))return;for(_t=0;Ot();){if(it=null,_t>0)if(Ot()==="."&&_t<4)Ee++;else return;if(!se(dt,Ot()))return;for(;se(dt,Ot());){if($t=ee(Ot(),10),it===null)it=$t;else{if(it===0)return;it=it*10+$t}if(it>255)return;Ee++}de[oe]=de[oe]*256+it,_t++,(_t===2||_t===4)&&oe++}if(_t!==4)return;break}else if(Ot()===":"){if(Ee++,!Ot())return}else if(Ot())return;de[oe++]=Je}if(G!==null)for(nr=oe-G,oe=7;oe!==0&&nr>0;)he=de[oe],de[oe--]=de[G+nr-1],de[G+--nr]=he;else if(oe!==8)return;return de},ft=function(J){for(var de=null,oe=1,G=null,Ee=0,Je=0;Je<8;Je++)J[Je]!==0?(Ee>oe&&(de=G,oe=Ee),G=null,Ee=0):(G===null&&(G=Je),++Ee);return Ee>oe?G:de},He=function(J){var de,oe,G,Ee;if(typeof J=="number"){for(de=[],oe=0;oe<4;oe++)Ie(de,J%256),J=ie(J/256);return fe(de,".")}if(typeof J=="object"){for(de="",G=ft(J),oe=0;oe<8;oe++)Ee&&J[oe]===0||(Ee&&(Ee=!1),G===oe?(de+=oe?":":"::",Ee=!0):(de+=k(J[oe],16),oe<7&&(de+=":")));return"["+de+"]"}return J},Ce={},Le=p({},Ce,{" ":1,'"':1,"<":1,">":1,"`":1}),Ze=p({},Le,{"#":1,"?":1,"{":1,"}":1}),gt=p({},Ze,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ot=function(J,de){var oe=N(J,0);return oe>32&&oe<127&&!g(de,J)?J:encodeURIComponent(J)},Be={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Oe=function(J,de){var oe;return J.length===2&&se(Ye,ae(J,0))&&((oe=ae(J,1))===":"||!de&&oe==="|")},Pe=function(J){var de;return J.length>1&&Oe(F(J,0,2))&&(J.length===2||(de=ae(J,2))==="/"||de==="\\"||de==="?"||de==="#")},rt=function(J){return J==="."||Me(J)==="%2e"},Tt=function(J){return J=Me(J),J===".."||J==="%2e."||J===".%2e"||J==="%2e%2e"},St={},gr={},Ne={},we={},ze={},xe={},et={},pt={},Dt={},jt={},Rt={},Jt={},sr={},kn={},Er={},Dn={},Pt={},Dr={},ln={},mr={},lr={},mn=function(J,de,oe){var G=m(J),Ee,Je,ke;if(de){if(Je=this.parse(G),Je)throw new B(Je);this.searchParams=null}else{if(oe!==void 0&&(Ee=new mn(oe,!0)),Je=this.parse(G,null,Ee),Je)throw new B(Je);ke=Z(new V),ke.bindURL(this),this.searchParams=ke}};mn.prototype={type:"URL",parse:function(J,de,oe){var G=this,Ee=de||St,Je=0,ke="",_t=!1,it=!1,$t=!1,nr,he,Ot,Pr;for(J=m(J),de||(G.scheme="",G.username="",G.password="",G.host=null,G.port=null,G.path=[],G.query=null,G.fragment=null,G.cannotBeABaseURL=!1,J=P(J,Mt,""),J=P(J,lt,"$1")),J=P(J,yt,""),nr=h(J);Je<=nr.length;){switch(he=nr[Je],Ee){case St:if(he&&se(Ye,he))ke+=Me(he),Ee=gr;else{if(de)return je;Ee=Ne;continue}break;case gr:if(he&&(se(qe,he)||he==="+"||he==="-"||he==="."))ke+=Me(he);else if(he===":"){if(de&&(G.isSpecial()!==g(Be,ke)||ke==="file"&&(G.includesCredentials()||G.port!==null)||G.scheme==="file"&&!G.host))return;if(G.scheme=ke,de){G.isSpecial()&&Be[G.scheme]===G.port&&(G.port=null);return}ke="",G.scheme==="file"?Ee=kn:G.isSpecial()&&oe&&oe.scheme===G.scheme?Ee=we:G.isSpecial()?Ee=pt:nr[Je+1]==="/"?(Ee=ze,Je++):(G.cannotBeABaseURL=!0,_(G.path,""),Ee=ln)}else{if(de)return je;ke="",Ee=Ne,Je=0;continue}break;case Ne:if(!oe||oe.cannotBeABaseURL&&he!=="#")return je;if(oe.cannotBeABaseURL&&he==="#"){G.scheme=oe.scheme,G.path=y(oe.path),G.query=oe.query,G.fragment="",G.cannotBeABaseURL=!0,Ee=lr;break}Ee=oe.scheme==="file"?kn:xe;continue;case we:if(he==="/"&&nr[Je+1]==="/")Ee=Dt,Je++;else{Ee=xe;continue}break;case ze:if(he==="/"){Ee=jt;break}else{Ee=Dr;continue}case xe:if(G.scheme=oe.scheme,he===ve)G.username=oe.username,G.password=oe.password,G.host=oe.host,G.port=oe.port,G.path=y(oe.path),G.query=oe.query;else if(he==="/"||he==="\\"&&G.isSpecial())Ee=et;else if(he==="?")G.username=oe.username,G.password=oe.password,G.host=oe.host,G.port=oe.port,G.path=y(oe.path),G.query="",Ee=mr;else if(he==="#")G.username=oe.username,G.password=oe.password,G.host=oe.host,G.port=oe.port,G.path=y(oe.path),G.query=oe.query,G.fragment="",Ee=lr;else{G.username=oe.username,G.password=oe.password,G.host=oe.host,G.port=oe.port,G.path=y(oe.path),G.path.length--,Ee=Dr;continue}break;case et:if(G.isSpecial()&&(he==="/"||he==="\\"))Ee=Dt;else if(he==="/")Ee=jt;else{G.username=oe.username,G.password=oe.password,G.host=oe.host,G.port=oe.port,Ee=Dr;continue}break;case pt:if(Ee=Dt,he!=="/"||ae(ke,Je+1)!=="/")continue;Je++;break;case Dt:if(he!=="/"&&he!=="\\"){Ee=jt;continue}break;case jt:if(he==="@"){_t&&(ke="%40"+ke),_t=!0,Ot=h(ke);for(var ei=0;ei<Ot.length;ei++){var Rn=Ot[ei];if(Rn===":"&&!$t){$t=!0;continue}var jr=ot(Rn,gt);$t?G.password+=jr:G.username+=jr}ke=""}else if(he===ve||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()){if(_t&&ke==="")return le;Je-=h(ke).length+1,ke="",Ee=Rt}else ke+=he;break;case Rt:case Jt:if(de&&G.scheme==="file"){Ee=Dn;continue}else if(he===":"&&!it){if(ke==="")return _e;if(Pr=G.parseHost(ke),Pr)return Pr;if(ke="",Ee=sr,de===Jt)return}else if(he===ve||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()){if(G.isSpecial()&&ke==="")return _e;if(de&&ke===""&&(G.includesCredentials()||G.port!==null))return;if(Pr=G.parseHost(ke),Pr)return Pr;if(ke="",Ee=Pt,de)return;continue}else he==="["?it=!0:he==="]"&&(it=!1),ke+=he;break;case sr:if(se(dt,he))ke+=he;else if(he===ve||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()||de){if(ke!==""){var Oi=ee(ke,10);if(Oi>65535)return Se;G.port=G.isSpecial()&&Oi===Be[G.scheme]?null:Oi,ke=""}if(de)return;Ee=Pt;continue}else return Se;break;case kn:if(G.scheme="file",he==="/"||he==="\\")Ee=Er;else if(oe&&oe.scheme==="file")switch(he){case ve:G.host=oe.host,G.path=y(oe.path),G.query=oe.query;break;case"?":G.host=oe.host,G.path=y(oe.path),G.query="",Ee=mr;break;case"#":G.host=oe.host,G.path=y(oe.path),G.query=oe.query,G.fragment="",Ee=lr;break;default:Pe(fe(y(nr,Je),""))||(G.host=oe.host,G.path=y(oe.path),G.shortenPath()),Ee=Dr;continue}else{Ee=Dr;continue}break;case Er:if(he==="/"||he==="\\"){Ee=Dn;break}oe&&oe.scheme==="file"&&!Pe(fe(y(nr,Je),""))&&(Oe(oe.path[0],!0)?_(G.path,oe.path[0]):G.host=oe.host),Ee=Dr;continue;case Dn:if(he===ve||he==="/"||he==="\\"||he==="?"||he==="#"){if(!de&&Oe(ke))Ee=Dr;else if(ke===""){if(G.host="",de)return;Ee=Pt}else{if(Pr=G.parseHost(ke),Pr)return Pr;if(G.host==="localhost"&&(G.host=""),de)return;ke="",Ee=Pt}continue}else ke+=he;break;case Pt:if(G.isSpecial()){if(Ee=Dr,he!=="/"&&he!=="\\")continue}else if(!de&&he==="?")G.query="",Ee=mr;else if(!de&&he==="#")G.fragment="",Ee=lr;else if(he!==ve&&(Ee=Dr,he!=="/"))continue;break;case Dr:if(he===ve||he==="/"||he==="\\"&&G.isSpecial()||!de&&(he==="?"||he==="#")){if(Tt(ke)?(G.shortenPath(),he!=="/"&&!(he==="\\"&&G.isSpecial())&&_(G.path,"")):rt(ke)?he!=="/"&&!(he==="\\"&&G.isSpecial())&&_(G.path,""):(G.scheme==="file"&&!G.path.length&&Oe(ke)&&(G.host&&(G.host=""),ke=ae(ke,0)+":"),_(G.path,ke)),ke="",G.scheme==="file"&&(he===ve||he==="?"||he==="#"))for(;G.path.length>1&&G.path[0]==="";)Y(G.path);he==="?"?(G.query="",Ee=mr):he==="#"&&(G.fragment="",Ee=lr)}else ke+=ot(he,Ze);break;case ln:he==="?"?(G.query="",Ee=mr):he==="#"?(G.fragment="",Ee=lr):he!==ve&&(G.path[0]+=ot(he,Ce));break;case mr:!de&&he==="#"?(G.fragment="",Ee=lr):he!==ve&&(he==="'"&&G.isSpecial()?G.query+="%27":he==="#"?G.query+="%23":G.query+=ot(he,Ce));break;case lr:he!==ve&&(G.fragment+=ot(he,Le));break}Je++}},parseHost:function(J){var de,oe,G;if(ae(J,0)==="["){if(ae(J,J.length-1)!=="]"||(de=Ke(F(J,1,-1)),!de))return _e;this.host=de}else if(this.isSpecial()){if(J=E(J),se(At,J)||(de=Fe(J),de===null))return _e;this.host=de}else{if(se(at,J))return _e;for(de="",oe=h(J),G=0;G<oe.length;G++)de+=ot(oe[G],Ce);this.host=de}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return g(Be,this.scheme)},shortenPath:function(){var J=this.path,de=J.length;de&&(this.scheme!=="file"||de!==1||!Oe(J[0],!0))&&J.length--},serialize:function(){var J=this,de=J.scheme,oe=J.username,G=J.password,Ee=J.host,Je=J.port,ke=J.path,_t=J.query,it=J.fragment,$t=de+":";return Ee!==null?($t+="//",J.includesCredentials()&&($t+=oe+(G?":"+G:"")+"@"),$t+=He(Ee),Je!==null&&($t+=":"+Je)):de==="file"&&($t+="//"),$t+=J.cannotBeABaseURL?ke[0]:ke.length?"/"+fe(ke,"/"):"",_t!==null&&($t+="?"+_t),it!==null&&($t+="#"+it),$t},setHref:function(J){var de=this.parse(J);if(de)throw new B(de);this.searchParams.update()},getOrigin:function(){var J=this.scheme,de=this.port;if(J==="blob")try{return new cn(J.path[0]).origin}catch(oe){return"null"}return J==="file"||!this.isSpecial()?"null":J+"://"+He(this.host)+(de!==null?":"+de:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(J){this.parse(m(J)+":",St)},getUsername:function(){return this.username},setUsername:function(J){var de=h(m(J));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var oe=0;oe<de.length;oe++)this.username+=ot(de[oe],gt)}},getPassword:function(){return this.password},setPassword:function(J){var de=h(m(J));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var oe=0;oe<de.length;oe++)this.password+=ot(de[oe],gt)}},getHost:function(){var J=this.host,de=this.port;return J===null?"":de===null?He(J):He(J)+":"+de},setHost:function(J){this.cannotBeABaseURL||this.parse(J,Rt)},getHostname:function(){var J=this.host;return J===null?"":He(J)},setHostname:function(J){this.cannotBeABaseURL||this.parse(J,Jt)},getPort:function(){var J=this.port;return J===null?"":m(J)},setPort:function(J){this.cannotHaveUsernamePasswordPort()||(J=m(J),J===""?this.port=null:this.parse(J,sr))},getPathname:function(){var J=this.path;return this.cannotBeABaseURL?J[0]:J.length?"/"+fe(J,"/"):""},setPathname:function(J){this.cannotBeABaseURL||(this.path=[],this.parse(J,Pt))},getSearch:function(){var J=this.query;return J?"?"+J:""},setSearch:function(J){J=m(J),J===""?this.query=null:(ae(J,0)==="?"&&(J=F(J,1)),this.query="",this.parse(J,mr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var J=this.fragment;return J?"#"+J:""},setHash:function(J){if(J=m(J),J===""){this.fragment=null;return}ae(J,0)==="#"&&(J=F(J,1)),this.fragment="",this.parse(J,lr)},update:function(){this.query=this.searchParams.serialize()||null}};var cn=function(de){var oe=d(this,Kt),G=w(arguments.length,1)>1?arguments[1]:void 0,Ee=x(oe,new mn(de,!1,G));n||(oe.href=Ee.serialize(),oe.origin=Ee.getOrigin(),oe.protocol=Ee.getProtocol(),oe.username=Ee.getUsername(),oe.password=Ee.getPassword(),oe.host=Ee.getHost(),oe.hostname=Ee.getHostname(),oe.port=Ee.getPort(),oe.pathname=Ee.getPathname(),oe.search=Ee.getSearch(),oe.searchParams=Ee.getSearchParams(),oe.hash=Ee.getHash())},Kt=cn.prototype,Ir=function(J,de){return{get:function(){return U(this)[J]()},set:de&&function(oe){return U(this)[de](oe)},configurable:!0,enumerable:!0}};if(n&&(M(Kt,"href",Ir("serialize","setHref")),M(Kt,"origin",Ir("getOrigin")),M(Kt,"protocol",Ir("getProtocol","setProtocol")),M(Kt,"username",Ir("getUsername","setUsername")),M(Kt,"password",Ir("getPassword","setPassword")),M(Kt,"host",Ir("getHost","setHost")),M(Kt,"hostname",Ir("getHostname","setHostname")),M(Kt,"port",Ir("getPort","setPort")),M(Kt,"pathname",Ir("getPathname","setPathname")),M(Kt,"search",Ir("getSearch","setSearch")),M(Kt,"searchParams",Ir("getSearchParams")),M(Kt,"hash",Ir("getHash","setHash"))),c(Kt,"toJSON",function(){return U(this).serialize()},{enumerable:!0}),c(Kt,"toString",function(){return U(this).serialize()},{enumerable:!0}),W){var $r=W.createObjectURL,_i=W.revokeObjectURL;$r&&c(cn,"createObjectURL",s($r,W)),_i&&c(cn,"revokeObjectURL",s(_i,W))}return v(cn,"URL"),r({global:!0,constructor:!0,forced:!i,sham:!n},{URL:cn}),Qk}var eR;function Gse(){return eR||(eR=1,Zse()),Yk}Gse();var tR={},rR;function $se(){if(rR)return tR;rR=1;var r=Gt(),n=Ii();return r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return n(URL.prototype.toString,this)}}),tR}$se();var nR={},iR;function Wse(){return iR||(iR=1,Jk()),nR}Wse();var aR={},oR;function Kse(){if(oR)return aR;oR=1;var r=ka(),n=Sr(),i=_o(),a=G2(),s=URLSearchParams,l=s.prototype,c=n(l.append),M=n(l.delete),d=n(l.forEach),g=n([].push),p=new s("a=1&a=2&b=3");return p.delete("a",1),p.delete("b",void 0),p+""!="a=2"&&r(l,"delete",function(h){var y=arguments.length,N=y<2?void 0:arguments[1];if(y&&N===void 0)return M(this,h);var E=[];d(this,function(V,Z){g(E,{key:Z,value:V})}),a(y,1);for(var m=i(h),v=i(N),w=0,O=0,A=!1,x=E.length,U;w<x;)U=E[w++],A||U.key===m?(A=!0,M(this,U.key)):O++;for(;O<x;)U=E[O++],U.key===m&&U.value===v||c(this,U.key,U.value)},{enumerable:!0,unsafe:!0}),aR}Kse();var uR={},sR;function qse(){if(sR)return uR;sR=1;var r=ka(),n=Sr(),i=_o(),a=G2(),s=URLSearchParams,l=s.prototype,c=n(l.getAll),M=n(l.has),d=new s("a=1");return(d.has("a",2)||!d.has("a",void 0))&&r(l,"has",function(p){var h=arguments.length,y=h<2?void 0:arguments[1];if(h&&y===void 0)return M(this,p);var N=c(this,p);a(h,1);for(var E=i(y),m=0;m<N.length;)if(N[m++]===E)return!0;return!1},{enumerable:!0,unsafe:!0}),uR}qse();var lR={},cR;function Jse(){if(cR)return lR;cR=1;var r=hn(),n=Sr(),i=Oc(),a=URLSearchParams.prototype,s=n(a.forEach);return r&&!("size"in a)&&i(a,"size",{get:function(){var c=0;return s(this,function(){c++}),c},configurable:!0,enumerable:!0}),lR}Jse();function Zd(r){"@babel/helpers - typeof";return Zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zd(r)}function Xse(r,n){return nle(r)||rle(r,n)||tle(r,n)||ele()}function ele(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
50
50
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tle(r,n){if(r){if(typeof r=="string")return fR(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?fR(r,n):void 0}}function fR(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,a=Array(n);i<n;i++)a[i]=r[i];return a}function rle(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var a,s,l,c,M=[],d=!0,g=!1;try{if(l=(i=i.call(r)).next,n!==0)for(;!(d=(a=l.call(i)).done)&&(M.push(a.value),M.length!==n);d=!0);}catch(p){g=!0,s=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(g)throw s}}return M}}function nle(r){if(Array.isArray(r))return r}function ile(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function ale(r,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,MR(a.key),a)}}function ole(r,n,i){return n&&ale(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Gd(r,n,i){return(n=MR(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function MR(r){var n=ule(r,"string");return Zd(n)=="symbol"?n:n+""}function ule(r,n){if(Zd(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(Zd(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var sle=function(){function r(){ile(this,r),Gd(this,"_levels",[]),Gd(this,"_transports",[]),Gd(this,"_logs",[]),Gd(this,"_prevTime",0),Gd(this,"logListener",null);try{if(!window.localStorage)return;var n=window.localStorage.getItem("logger");if(!n)return;var i=n.split(">"),a=Xse(i,2),s=a[0],l=a[1];this._levels=s.split(","),l&&(this._transports=l.split(","))}catch(c){return}}return ole(r,[{key:"create",value:function(i,a){var s=this;return function(l){if(!(!s._levels.includes(i)&&!s._levels.includes("all")&&!s.logListener)){var c=Date.now(),M=0;if(s._prevTime&&(M=c-s._prevTime),s._prevTime=c,s.logListener&&s.logListener("".concat(i,": ").concat(l," +").concat(M,"ms")),s._transports.includes("console")){var d=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(d,";"),i,"",l,"color: ".concat(d,";"),M)}s._transports.includes("file")&&s._logs.push("".concat(i,": ").concat(l," +").concat(M,"ms"))}}}},{key:"saveLogs",value:function(){if(this._logs.length){var i=this._logs.join(`
|
|
51
|
-
`),a=new Blob([i],{type:"text/plain"}),s=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=s,l.click(),window.URL.revokeObjectURL(s),this._logs=[]}}}])}();const EE=new sle;function c2(r){"@babel/helpers - typeof";return c2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},c2(r)}function xn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */xn=function(){return n};var r,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(k,L,_){k[L]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",M=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(k,L,_){return Object.defineProperty(k,L,{value:_,enumerable:!0,configurable:!0,writable:!0}),k[L]}try{g({},"")}catch(k){g=function(_,P,Y){return _[P]=Y}}function p(k,L,_,P){var Y=L&&L.prototype instanceof w?L:w,T=Object.create(Y.prototype),F=new se(P||[]);return s(T,"_invoke",{value:ee(k,_,F)}),T}function h(k,L,_){try{return{type:"normal",arg:k.call(L,_)}}catch(P){return{type:"throw",arg:P}}}n.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",v={};function w(){}function O(){}function A(){}var x={};g(x,c,function(){return this});var U=Object.getPrototypeOf,V=U&&U(U(fe([])));V&&V!==i&&a.call(V,c)&&(x=V);var Z=A.prototype=w.prototype=Object.create(x);function W(k){["next","throw","return"].forEach(function(L){g(k,L,function(_){return this._invoke(L,_)})})}function B(k,L){function _(Y,T,F,Me){var Ie=h(k[Y],k,T);if(Ie.type!=="throw"){var le=Ie.arg,je=le.value;return je&&c2(je)=="object"&&a.call(je,"__await")?L.resolve(je.__await).then(function(_e){_("next",_e,F,Me)},function(_e){_("throw",_e,F,Me)}):L.resolve(je).then(function(_e){le.value=_e,F(le)},function(_e){return _("throw",_e,F,Me)})}Me(Ie.arg)}var P;s(this,"_invoke",{value:function(T,F){function Me(){return new L(function(Ie,le){_(T,F,Ie,le)})}return P=P?P.then(Me,Me):Me()}})}function ee(k,L,_){var P=y;return function(Y,T){if(P===E)throw Error("Generator is already running");if(P===m){if(Y==="throw")throw T;return{value:r,done:!0}}for(_.method=Y,_.arg=T;;){var F=_.delegate;if(F){var Me=ie(F,_);if(Me){if(Me===v)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=E;var Ie=h(k,L,_);if(Ie.type==="normal"){if(P=_.done?m:N,Ie.arg===v)continue;return{value:Ie.arg,done:_.done}}Ie.type==="throw"&&(P=m,_.method="throw",_.arg=Ie.arg)}}}function ie(k,L){var _=L.method,P=k.iterator[_];if(P===r)return L.delegate=null,_==="throw"&&k.iterator.return&&(L.method="return",L.arg=r,ie(k,L),L.method==="throw")||_!=="return"&&(L.method="throw",L.arg=new TypeError("The iterator does not provide a '"+_+"' method")),v;var Y=h(P,k.iterator,L.arg);if(Y.type==="throw")return L.method="throw",L.arg=Y.arg,L.delegate=null,v;var T=Y.arg;return T?T.done?(L[k.resultName]=T.value,L.next=k.nextLoc,L.method!=="return"&&(L.method="next",L.arg=r),L.delegate=null,v):T:(L.method="throw",L.arg=new TypeError("iterator result is not an object"),L.delegate=null,v)}function re(k){var L={tryLoc:k[0]};1 in k&&(L.catchLoc=k[1]),2 in k&&(L.finallyLoc=k[2],L.afterLoc=k[3]),this.tryEntries.push(L)}function ae(k){var L=k.completion||{};L.type="normal",delete L.arg,k.completion=L}function se(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(re,this),this.reset(!0)}function fe(k){if(k||k===""){var L=k[c];if(L)return L.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var _=-1,P=function Y(){for(;++_<k.length;)if(a.call(k,_))return Y.value=k[_],Y.done=!1,Y;return Y.value=r,Y.done=!0,Y};return P.next=P}}throw new TypeError(c2(k)+" is not iterable")}return O.prototype=A,s(Z,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:O,configurable:!0}),O.displayName=g(A,d,"GeneratorFunction"),n.isGeneratorFunction=function(k){var L=typeof k=="function"&&k.constructor;return!!L&&(L===O||(L.displayName||L.name)==="GeneratorFunction")},n.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,A):(k.__proto__=A,g(k,d,"GeneratorFunction")),k.prototype=Object.create(Z),k},n.awrap=function(k){return{__await:k}},W(B.prototype),g(B.prototype,M,function(){return this}),n.AsyncIterator=B,n.async=function(k,L,_,P,Y){Y===void 0&&(Y=Promise);var T=new B(p(k,L,_,P),Y);return n.isGeneratorFunction(L)?T:T.next().then(function(F){return F.done?F.value:T.next()})},W(Z),g(Z,d,"Generator"),g(Z,c,function(){return this}),g(Z,"toString",function(){return"[object Generator]"}),n.keys=function(k){var L=Object(k),_=[];for(var P in L)_.push(P);return _.reverse(),function Y(){for(;_.length;){var T=_.pop();if(T in L)return Y.value=T,Y.done=!1,Y}return Y.done=!0,Y}},n.values=fe,se.prototype={constructor:se,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ae),!L)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=r)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var _=this;function P(le,je){return F.type="throw",F.arg=L,_.next=le,je&&(_.method="next",_.arg=r),!!je}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var T=this.tryEntries[Y],F=T.completion;if(T.tryLoc==="root")return P("end");if(T.tryLoc<=this.prev){var Me=a.call(T,"catchLoc"),Ie=a.call(T,"finallyLoc");if(Me&&Ie){if(this.prev<T.catchLoc)return P(T.catchLoc,!0);if(this.prev<T.finallyLoc)return P(T.finallyLoc)}else if(Me){if(this.prev<T.catchLoc)return P(T.catchLoc,!0)}else{if(!Ie)throw Error("try statement without catch or finally");if(this.prev<T.finallyLoc)return P(T.finallyLoc)}}}},abrupt:function(L,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var T=Y;break}}T&&(L==="break"||L==="continue")&&T.tryLoc<=_&&_<=T.finallyLoc&&(T=null);var F=T?T.completion:{};return F.type=L,F.arg=_,T?(this.method="next",this.next=T.finallyLoc,v):this.complete(F)},complete:function(L,_){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&_&&(this.next=_),v},finish:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===L)return this.complete(P.completion,P.afterLoc),ae(P),v}},catch:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===L){var Y=P.completion;if(Y.type==="throw"){var T=Y.arg;ae(P)}return T}}throw Error("illegal catch attempt")},delegateYield:function(L,_,P){return this.delegate={iterator:fe(L),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=r),v}},n}function dR(r,n,i,a,s,l,c){try{var M=r[l](c),d=M.value}catch(g){return void i(g)}M.done?n(d):Promise.resolve(d).then(a,s)}function Ro(r){return function(){var n=this,i=arguments;return new Promise(function(a,s){var l=r.apply(n,i);function c(d){dR(l,a,s,c,M,"next",d)}function M(d){dR(l,a,s,c,M,"throw",d)}c(void 0)})}}function lle(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function cle(r,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,gR(a.key),a)}}function fle(r,n,i){return n&&cle(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function J2(r,n,i){return(n=gR(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function gR(r){var n=Mle(r,"string");return c2(n)=="symbol"?n:n+""}function Mle(r,n){if(c2(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(c2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Us=EE.create("wasm_idv"),dle=function(){function r(n){lle(this,r),J2(this,"_worker",null),J2(this,"_initialized",!1),J2(this,"_connectedToIdv",!1),J2(this,"_serviceRunning",!1),J2(this,"_userId",nue(rae)),J2(this,"_setErrorScreen",null),n&&(this._setErrorScreen=n)}return fle(r,[{key:"init",value:function(){var n=Ro(xn().mark(function a(){var s,l,c,M;return xn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=1,g.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/a3a6b0e-7cff4ddf6//PlatformAdaptor.worker.js");case 4:return s=g.sent,g.next=7,s.blob();case 7:l=g.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),g.next=15;break;case 12:g.prev=12,g.t0=g.catch(1),Us("Creating worker error: ".concat(JSON.stringify(g.t0)));case 15:g.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){g.next=20;break}return g.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),g.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/0.1/a3a6b0e-7cff4ddf6/",preMain:!0});case 23:return M=g.sent,g.abrupt("return",M);case 25:case"end":return g.stop()}},a,this,[[1,12]])}));function i(){return n.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var n=Ro(xn().mark(function a(s){var l;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:rN.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:s.host,httpRetryCount:s.httpRetryCount||0,httpTimeoutMs:s.httpTimeoutMs||0,isSecure:!0,password:s.password,port:s.port?s.port:0,schema:s.schema?s.schema:"basic",userName:s.userName},preMain:!0});case 2:return l=M.sent,Us("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(l))),l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),M.abrupt("return",l);case 6:case"end":return M.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var n=Ro(xn().mark(function a(s){var l;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:rN.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:s},preMain:!0});case 2:return l=M.sent,l.code===0&&(this._serviceRunning=!0),M.abrupt("return",l);case 5:case"end":return M.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var n=Ro(xn().mark(function a(s){var l,c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l={workflowId:s},d.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:l,preMain:!0});case 3:return c=d.sent,Us("Start session connect result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var n=Ro(xn().mark(function a(s){var l,c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l={sessionId:s},d.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=d.sent,Us("continue session result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var n=Ro(xn().mark(function a(){var s,l,c=arguments;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:s,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=d.sent,Us("listWorkflows result: ".concat(JSON.stringify(l))),d.abrupt("return",l);case 6:case"end":return d.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,c.abrupt("return",s);case 4:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,c.abrupt("return",s);case 4:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var n=Ro(xn().mark(function a(s){var l;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({workflowIdParams:{workflowId:s},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=M.sent,M.abrupt("return",l);case 4:case"end":return M.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var n=Ro(xn().mark(function a(s,l){var c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return Us("Push data: ".concat(s," , ").concat(JSON.stringify(l))),d.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:s},preMain:!0});case 3:return c=d.sent,Us("Push data result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a,s){return n.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,c.abrupt("return",s);case 4:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,Us("Wait for session update result: ".concat(JSON.stringify(s))),c.abrupt("return",s);case 5:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,c.abrupt("return",s);case 6:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var n=Ro(xn().mark(function a(s){var l=this;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.abrupt("return",new Promise(function(d,g){if(!l._worker)return g();l._worker.onmessage=function(p){var h=p.data.target;if(h==="stdout"){Us(JSON.stringify(p.data.content));return}if(h==="custom"){var y=p.data,N=y.method,E=y.data;Us("::: custom method, ".concat(N,", ").concat(JSON.stringify(E))),N==="onRuntimeInitialized"&&(l._initialized=!0),d(E)}if(h==="stderr"){var m=p.data.content;Us(JSON.stringify(m)),l._setErrorScreen&&l._setErrorScreen(m)}},l._worker.postMessage(s)}));case 1:case"end":return M.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var i;(i=this._worker)===null||i===void 0||i.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,this.terminateWorker(),c.abrupt("return",s);case 10:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()}])}();function f2(r){"@babel/helpers - typeof";return f2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f2(r)}function IR(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function M2(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?IR(Object(i),!0).forEach(function(a){DE(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):IR(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function DE(r,n,i){return(n=gle(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function gle(r){var n=Ile(r,"string");return f2(n)=="symbol"?n:n+""}function Ile(r,n){if(f2(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(f2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function Kn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Kn=function(){return n};var r,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(k,L,_){k[L]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",M=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(k,L,_){return Object.defineProperty(k,L,{value:_,enumerable:!0,configurable:!0,writable:!0}),k[L]}try{g({},"")}catch(k){g=function(_,P,Y){return _[P]=Y}}function p(k,L,_,P){var Y=L&&L.prototype instanceof w?L:w,T=Object.create(Y.prototype),F=new se(P||[]);return s(T,"_invoke",{value:ee(k,_,F)}),T}function h(k,L,_){try{return{type:"normal",arg:k.call(L,_)}}catch(P){return{type:"throw",arg:P}}}n.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",v={};function w(){}function O(){}function A(){}var x={};g(x,c,function(){return this});var U=Object.getPrototypeOf,V=U&&U(U(fe([])));V&&V!==i&&a.call(V,c)&&(x=V);var Z=A.prototype=w.prototype=Object.create(x);function W(k){["next","throw","return"].forEach(function(L){g(k,L,function(_){return this._invoke(L,_)})})}function B(k,L){function _(Y,T,F,Me){var Ie=h(k[Y],k,T);if(Ie.type!=="throw"){var le=Ie.arg,je=le.value;return je&&f2(je)=="object"&&a.call(je,"__await")?L.resolve(je.__await).then(function(_e){_("next",_e,F,Me)},function(_e){_("throw",_e,F,Me)}):L.resolve(je).then(function(_e){le.value=_e,F(le)},function(_e){return _("throw",_e,F,Me)})}Me(Ie.arg)}var P;s(this,"_invoke",{value:function(T,F){function Me(){return new L(function(Ie,le){_(T,F,Ie,le)})}return P=P?P.then(Me,Me):Me()}})}function ee(k,L,_){var P=y;return function(Y,T){if(P===E)throw Error("Generator is already running");if(P===m){if(Y==="throw")throw T;return{value:r,done:!0}}for(_.method=Y,_.arg=T;;){var F=_.delegate;if(F){var Me=ie(F,_);if(Me){if(Me===v)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=E;var Ie=h(k,L,_);if(Ie.type==="normal"){if(P=_.done?m:N,Ie.arg===v)continue;return{value:Ie.arg,done:_.done}}Ie.type==="throw"&&(P=m,_.method="throw",_.arg=Ie.arg)}}}function ie(k,L){var _=L.method,P=k.iterator[_];if(P===r)return L.delegate=null,_==="throw"&&k.iterator.return&&(L.method="return",L.arg=r,ie(k,L),L.method==="throw")||_!=="return"&&(L.method="throw",L.arg=new TypeError("The iterator does not provide a '"+_+"' method")),v;var Y=h(P,k.iterator,L.arg);if(Y.type==="throw")return L.method="throw",L.arg=Y.arg,L.delegate=null,v;var T=Y.arg;return T?T.done?(L[k.resultName]=T.value,L.next=k.nextLoc,L.method!=="return"&&(L.method="next",L.arg=r),L.delegate=null,v):T:(L.method="throw",L.arg=new TypeError("iterator result is not an object"),L.delegate=null,v)}function re(k){var L={tryLoc:k[0]};1 in k&&(L.catchLoc=k[1]),2 in k&&(L.finallyLoc=k[2],L.afterLoc=k[3]),this.tryEntries.push(L)}function ae(k){var L=k.completion||{};L.type="normal",delete L.arg,k.completion=L}function se(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(re,this),this.reset(!0)}function fe(k){if(k||k===""){var L=k[c];if(L)return L.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var _=-1,P=function Y(){for(;++_<k.length;)if(a.call(k,_))return Y.value=k[_],Y.done=!1,Y;return Y.value=r,Y.done=!0,Y};return P.next=P}}throw new TypeError(f2(k)+" is not iterable")}return O.prototype=A,s(Z,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:O,configurable:!0}),O.displayName=g(A,d,"GeneratorFunction"),n.isGeneratorFunction=function(k){var L=typeof k=="function"&&k.constructor;return!!L&&(L===O||(L.displayName||L.name)==="GeneratorFunction")},n.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,A):(k.__proto__=A,g(k,d,"GeneratorFunction")),k.prototype=Object.create(Z),k},n.awrap=function(k){return{__await:k}},W(B.prototype),g(B.prototype,M,function(){return this}),n.AsyncIterator=B,n.async=function(k,L,_,P,Y){Y===void 0&&(Y=Promise);var T=new B(p(k,L,_,P),Y);return n.isGeneratorFunction(L)?T:T.next().then(function(F){return F.done?F.value:T.next()})},W(Z),g(Z,d,"Generator"),g(Z,c,function(){return this}),g(Z,"toString",function(){return"[object Generator]"}),n.keys=function(k){var L=Object(k),_=[];for(var P in L)_.push(P);return _.reverse(),function Y(){for(;_.length;){var T=_.pop();if(T in L)return Y.value=T,Y.done=!1,Y}return Y.done=!0,Y}},n.values=fe,se.prototype={constructor:se,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ae),!L)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=r)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var _=this;function P(le,je){return F.type="throw",F.arg=L,_.next=le,je&&(_.method="next",_.arg=r),!!je}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var T=this.tryEntries[Y],F=T.completion;if(T.tryLoc==="root")return P("end");if(T.tryLoc<=this.prev){var Me=a.call(T,"catchLoc"),Ie=a.call(T,"finallyLoc");if(Me&&Ie){if(this.prev<T.catchLoc)return P(T.catchLoc,!0);if(this.prev<T.finallyLoc)return P(T.finallyLoc)}else if(Me){if(this.prev<T.catchLoc)return P(T.catchLoc,!0)}else{if(!Ie)throw Error("try statement without catch or finally");if(this.prev<T.finallyLoc)return P(T.finallyLoc)}}}},abrupt:function(L,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var T=Y;break}}T&&(L==="break"||L==="continue")&&T.tryLoc<=_&&_<=T.finallyLoc&&(T=null);var F=T?T.completion:{};return F.type=L,F.arg=_,T?(this.method="next",this.next=T.finallyLoc,v):this.complete(F)},complete:function(L,_){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&_&&(this.next=_),v},finish:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===L)return this.complete(P.completion,P.afterLoc),ae(P),v}},catch:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===L){var Y=P.completion;if(Y.type==="throw"){var T=Y.arg;ae(P)}return T}}throw Error("illegal catch attempt")},delegateYield:function(L,_,P){return this.delegate={iterator:fe(L),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=r),v}},n}function pR(r,n,i,a,s,l,c){try{var M=r[l](c),d=M.value}catch(g){return void i(g)}M.done?n(d):Promise.resolve(d).then(a,s)}function ys(r){return function(){var n=this,i=arguments;return new Promise(function(a,s){var l=r.apply(n,i);function c(d){pR(l,a,s,c,M,"next",d)}function M(d){pR(l,a,s,c,M,"throw",d)}c(void 0)})}}var ple=EE.create("store_idv"),yle=function(n,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=ys(Kn().mark(function l(){var c;return Kn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new dle,d.next=3,c.init();case 3:n({wasmService:c});case 4:case"end":return d.stop()}},l)}));function s(){return a.apply(this,arguments)}return s}(),setFinalWaitingUi:function(s){n({isFinalWaitingUi:s})},connectToIdv:function(s){return ys(Kn().mark(function l(){var c,M,d,g,p;return Kn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=i().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(M=i().wasmService)===null||M===void 0?void 0:M.disconnect();case 3:return y.next=5,i().wasmService.prepareAndConnect(s);case 5:if(d=y.sent,g=null,d.code===4&&(g=a2.HTTP_ISSUE),d.code!==0&&d.code!==4&&(g=a2.PROVIDER_ERROR),g===null){y.next=12;break}return p=new xd({errorCode:g}),y.abrupt("return",{error:p});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(s){return ys(Kn().mark(function l(){var c,M,d,g,p;return Kn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().wasmService,y.next=3,c.connectByUrl(s);case 3:if(M=y.sent,d=null,M.code===4&&(d=a2.HTTP_ISSUE),M.code!==0&&M.code!==4&&(d=a2.PROVIDER_ERROR),d===null){y.next=13;break}return g=new xd({errorCode:d}),p=new Jg({errorCode:iN.CONNECTION_ISSUE,underlyingBaseError:g}),y.abrupt("return",{workflows:[],error:p});case 13:return y.abrupt("return",{workflows:M.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(s){var l=function(M){var d,g=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId,p=M2(M2({},M.results),{},{sessionId:g}),h=M2({results:p},M.error&&{error:M.error});i().setCurrentSessionDataLsAndStore(null),s(h)};n(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=ys(Kn().mark(function l(){var c,M,d,g;return Kn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=i().externalModulesNames,h.prev=1,h.next=4,hle(c);case 4:return M=h.sent,n(function(){return{externalModules:M}}),h.abrupt("return",{});case 9:return h.prev=9,h.t0=h.catch(1),(d=i().wasmService)===null||d===void 0||d.shutdown(),i().resetWasmService(),i().resetProps(),g=new Od({errorCode:hd.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:g});case 16:case"end":return h.stop()}},l,null,[[1,9]])}));function s(){return a.apply(this,arguments)}return s}(),setProcessingTemplate:function(s){var l=rE(s.find(function(c){return c.templateId===Mw}));l.templateLayout=ck(l.templateLayout,i().layout),n({proccessingTransformedTemplate:l})},setIsProcessing:function(s){n({isProcessing:s})},_pushStep:function(){var a=ys(Kn().mark(function l(c,M){var d,g,p;return Kn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d=null,g=function(){var N=ys(Kn().mark(function E(){var m,v,w,O;return Kn().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,i().wasmService.pushData(c,M);case 2:if(m=x.sent,v=null,m.code===4&&(v=os.HTTP_ISSUE),m.code!==0&&m.code!==4&&(v=os.PROVIDER_ERROR),v!==null&&(w=new Ld({errorCode:os.HTTP_ISSUE}),O=new Bo({errorCode:Fo.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:w}),d=O),m.code!==0){x.next=12;break}return d=null,x.abrupt("return",m);case 12:return x.abrupt("return",null);case 13:case"end":return x.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),p=function(){return null},y.next=5,iE(g,p);case 5:return y.abrupt("return",d?{error:d}:{});case 6:case"end":return y.stop()}},l)}));function s(l,c){return a.apply(this,arguments)}return s}(),_findStepById:function(s){var l=i().workflow;if(!(!l||!s))return l.steps.find(function(c){return c.id===s})},_waitingForNextStep:function(){var a=ys(Kn().mark(function l(){var c,M,d,g,p;return Kn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,M=null,d=function(){var N=ys(Kn().mark(function E(){var m,v,w,O,A,x,U,V,Z,W,B,ee,ie,re,ae;return Kn().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return fe.next=2,i().wasmService.getSessionState();case 2:if(O=fe.sent,A=(m=O.data)===null||m===void 0?void 0:m.currentStep,x=(v=O.data)===null||v===void 0?void 0:v.isProcessingFiles,U=(w=O.data)===null||w===void 0||(w=w.workflow)===null||w===void 0?void 0:w.steps,V=eue(U,A),Z=O.code===4,W=O.code!==0&&O.code!==4,B=O.code===0&&(!O.data.workflow||!O.data.currentStep),ee=A&&A===c,ie=null,U&&!V&&(ie=os.NOT_DATA_TYPE),Z&&(ie=os.HTTP_ISSUE),W&&(ie=os.PROVIDER_ERROR),x&&(ie=os.IS_PROCESSING),ee&&(ie=os.SAME_STEP),B&&(ie=os.DECODING_FAILED),ie!==null&&(re=new Ld({errorCode:ie}),ae=new Bo({errorCode:Fo.INTERNAL_ISSUE,underlyingBaseError:re}),M=ae),ple(JSON.stringify({nextStep:A,isDataType:V,isProcessingFiles:x})),!(V&&!ee&&!x&&!Z&&!W&&!B)){fe.next=23;break}return M=null,fe.abrupt("return",O.data);case 23:return fe.abrupt("return",null);case 24:case"end":return fe.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),g=function(){return null},y.next=6,iE(d,g);case 6:if(p=y.sent,!M){y.next=9;break}return y.abrupt("return",{error:M});case 9:return y.abrupt("return",{workflow:p==null?void 0:p.workflow,nextStep:p==null?void 0:p.currentStep});case 10:case"end":return y.stop()}},l)}));function s(){return a.apply(this,arguments)}return s}(),setFinalStepAndStopProcess:function(s){var l=s||i().currentStepId;if(l){var c=i()._findStepById(l);c&&(i().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),i().resetSession(),i().listener({target:$2.SERVICE,eventType:pd.MESSAGE,message:yd.DID_END_SESSION}))}},pushStepWaitNextStepAndSet:function(){var a=ys(Kn().mark(function l(c,M){var d,g,p,h,y,N,E,m;return Kn().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){w.next=4;break}return i().setFinalStepAndStopProcess(),w.abrupt("return");case 4:if(!(M instanceof bn)){w.next=10;break}return d=M,g=new Bo({errorCode:Fo.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),i().workflowSessionCompletion({error:g}),i().resetSession(),w.abrupt("return");case 10:return w.next=12,i()._pushStep(c,M);case 12:if(p=w.sent,!p.error){w.next=17;break}return i().workflowSessionCompletion({error:p.error}),i().resetSession(),w.abrupt("return");case 17:return w.next=19,i()._waitingForNextStep();case 19:if(h=w.sent,!h.error){w.next=24;break}return i().workflowSessionCompletion({error:h.error}),i().resetSession(),w.abrupt("return");case 24:if(y=h.workflow,N=h.nextStep,i().setWorkflow(y),i().setLayout(y.client.layout),i().setProcessingTemplate(y.client.steps),E=i()._findStepById(N),m=function(A){return!!A&&Object.prototype.toString.call(A)==="[object Object]"&&A.templateId},!(E!=null&&E.final&&!m(E.client))){w.next=34;break}return i().setFinalStepAndStopProcess(E.id),w.abrupt("return");case 34:E!=null&&E.final&&m(E.client)&&i().setFinalWaitingUi(!0),i().onChangeScreen(N),i().setIsProcessing(!1);case 37:case"end":return w.stop()}},l)}));function s(l,c){return a.apply(this,arguments)}return s}(),continueSession:function(){var a=ys(Kn().mark(function l(){var c,M,d,g,p,h,y,N,E,m,v,w,O;return Kn().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(c={isContinue:!1},M=i().workflow,d=i().getCurrentSessionDataLs(),g=i().sessionRestoreMode,g){x.next=6;break}return x.abrupt("return",c);case 6:if(d){x.next=8;break}return x.abrupt("return",c);case 8:if(p=d.sessionId,h=d.workflowId,!(!p||h!==M.id)){x.next=11;break}return x.abrupt("return",c);case 11:return x.next=13,i().wasmService.continueSession(p);case 13:return y=x.sent,N=y.data,E=N.currentStep,"id"in N&&"currentStep"in N||(m=new wd({errorCode:Gg.DECODING_FAILED}),v=new Bo({errorCode:Fo.START_SESSION_ERROR,underlyingBaseError:m}),c=M2(M2({},c),{},{error:v})),w=i()._findStepById(E),(w==null?void 0:w.final)===!1?(O=N.currentStep,i().setIsProcessing(!1),i().setCurrentStepId(O),i().setCurrentSessionDataLsAndStore({sessionId:N.id,workflowId:h}),i().listener({target:$2.SERVICE,eventType:pd.MESSAGE,message:yd.DID_START_RESTORE_SESSION}),c=M2(M2({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),x.abrupt("return",c);case 20:case"end":return x.stop()}},l)}));function s(){return a.apply(this,arguments)}return s}(),onChangeScreen:function(s,l){if(!s&&!l)return n(function(){return{currentScreenConfig:null}});if(l)return n(function(){return{currentScreenConfig:l}});if(s===null)return n(function(){return{currentScreenConfig:null}});var c=i().workflow,M=null;if(s===Mw)M=i().proccessingTransformedTemplate;else{var d;if(M=(d=i()._findStepById(s))===null||d===void 0?void 0:d.client,M!==null){var g;M.sessionId=(g=i().currentSessionData)===null||g===void 0?void 0:g.sessionId}M&&M.templateLayout&&(M.templateLayout=ck(M.templateLayout,i().layout))}var p=Xoe(i().externalModules,c.steps,s);if(M===null||!p){var h=new Bo({errorCode:Fo.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:h}),n(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(s),n(function(){return{currentScreenConfig:M}})},deinitializationIdv:function(){var a=ys(Kn().mark(function l(){var c,M;return Kn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(c=i().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(M=g.sent,i().resetWasmService(),i().externalModules.forEach(function(p){p.component.deinitialize&&p.component.isReady&&p.component.deinitialize()}),(M==null?void 0:M.code)!==0){g.next=7;break}return g.abrupt("return",{});case 7:return g.abrupt("return",{});case 8:case"end":return g.stop()}},l)}));function s(){return a.apply(this,arguments)}return s}(),resetSession:function(){return n(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null}})},resetWasmService:function(){return n(function(){return{wasmService:null}})}}};function hle(r){return mE.apply(this,arguments)}function mE(){return mE=ys(Kn().mark(function r(n){var i,a,s,l,c,M;return Kn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:i=[{id:Pc.getIdentifier(),supportedTemplates:Pc.getSupportedTemplates(),component:Pc}],a=DE(DE({},"LIVENESS",function(){return Promise.resolve().then(()=>lbe)}),"DOC_READER",function(){return Promise.resolve().then(()=>kgt)}),s=Kn().mark(function p(){var h,y,N;return Kn().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(h=c[l],y=function(){return a[h]()},!y){m.next=7;break}return m.next=5,y();case 5:N=m.sent,i.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return m.stop()}},p)}),l=0,c=n;case 4:if(!(l<c.length)){g.next=9;break}return g.delegateYield(s(),"t0",6);case 6:l++,g.next=4;break;case 9:return M=i.filter(function(p){return p!==null}),g.abrupt("return",M);case 11:case"end":return g.stop()}},r)})),mE.apply(this,arguments)}function $d(r){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$d(r)}function yR(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function jE(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?yR(Object(i),!0).forEach(function(a){Nle(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):yR(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function Nle(r,n,i){return(n=Ele(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function Ele(r){var n=Dle(r,"string");return $d(n)=="symbol"?n:n+""}function Dle(r,n){if($d(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if($d(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}var Wi=qae(function(){return jE(jE(jE({},uue.apply(void 0,arguments)),pue.apply(void 0,arguments)),yle.apply(void 0,arguments))}),mle=function(n){var i=n.children;return ue.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:i})},jle=function(){var n=Wi(function(E){return E.currentScreenConfig}),i=Wi(function(E){return E.pushStepWaitNextStepAndSet}),a=Wi(function(E){return E.proccessingTransformedTemplate}),s=Wi(function(E){return E.isProcessing}),l=Wi(function(E){return E.setIsProcessing}),c=Wi(function(E){return E.currentStepId}),M=Wi(function(E){return E.listener}),d=Wi(function(E){return E.externalModules}),g=Wi(function(E){return E.modulesConfig}),p=function(m,v){M({target:$2.WEB_COMPONENT,eventType:pd.MESSAGE,message:v,module:m})},h=function(m){l(m)},y=function(m){c&&(l(!1),i(c,m))},N=Wn.useCallback(function(){if(!n)return ue.jsx(mle,{children:"Waiting for play... or process completed"});var E=d.find(function(m){return m.supportedTemplates.includes(n.templateId)});if(E&&n)return ue.jsx(E.component,{perform:y,moduleProps:n,modulesConfig:g,idvEventListener:p,isProcessing:h})},[n,d]);return ue.jsx(ue.Fragment,{children:ue.jsx(Rw,{direction:nN.Ltr,children:ue.jsxs(ue.Fragment,{children:[s&&ue.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"white",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:a?ue.jsx(Pc,{perform:y,moduleProps:a,idvEventListener:p,isProcessing:h}):"Processing..."}),N()]})})})};function vle(){return ue.jsx(Wn.StrictMode,{children:ue.jsx(Sae,{children:ue.jsx(jle,{})})})}const Tle="*,*:before,*:after{box-sizing:border-box}ul,p,h1,h2,h3,h4{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}._window_tmw1v_24{--base-main-color: #7E57C5;--base-font-family: sans-serif;width:100%;max-width:680px;height:100%;position:relative;background:#fff;overflow:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);margin:0 auto;font-family:var(--base-font-family)}._content_tmw1v_43{overflow:auto;height:100%;display:flex;flex-direction:column}._back_tmw1v_50{position:absolute;width:24px;height:24px;top:16px;left:16px;cursor:pointer}._to-mobile_tmw1v_59{position:absolute;left:calc(50% - 12px);height:24px;width:24px;top:16px;cursor:pointer}",Cle="._error-boundary_mput0_1{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;position:absolute;width:100%;height:100%;top:0;left:0}._title_mput0_14{font-size:20px;font-weight:700;margin-bottom:10px}._subtitle_mput0_20{margin-bottom:10px}._details_mput0_24{font-weight:lighter}";function X2(r){"@babel/helpers - typeof";return X2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},X2(r)}function Ale(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function hR(r,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,ER(a.key),a)}}function Sle(r,n,i){return n&&hR(r.prototype,n),i&&hR(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function _le(r,n,i){return n=Kd(n),Ole(r,TE()?Reflect.construct(n,[],Kd(r).constructor):n.apply(r,i))}function Ole(r,n){if(n&&(X2(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xle(r)}function xle(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Lle(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&Wd(r,n)}function vE(r){var n=typeof Map=="function"?new Map:void 0;return vE=function(a){if(a===null||!ble(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(n!==void 0){if(n.has(a))return n.get(a);n.set(a,s)}function s(){return wle(a,arguments,Kd(this).constructor)}return s.prototype=Object.create(a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Wd(s,a)},vE(r)}function wle(r,n,i){if(TE())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,n);var s=new(r.bind.apply(r,a));return i&&Wd(s,i.prototype),s}function TE(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(TE=function(){return!!r})()}function ble(r){try{return Function.toString.call(r).indexOf("[native code]")!==-1}catch(n){return typeof r=="function"}}function Wd(r,n){return Wd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},Wd(r,n)}function Kd(r){return Kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kd(r)}function NR(r,n,i){return(n=ER(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function ER(r){var n=zle(r,"string");return X2(n)=="symbol"?n:n+""}function zle(r,n){if(X2(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(X2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var kle=[Tle,Cle],Rle=[].concat(kle).reduce(function(r,n){return r+n.toString()},""),DR=function(r){function n(){var i;return Ale(this,n),i=_le(this,n),NR(i,"_root",Kie.createRoot(i.attachShadow({mode:"open"}))),NR(i,"_mounted",!1),i}return Lle(n,r),Sle(n,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(ue.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[ue.jsx("style",{nonce:Wi.getState().getNonce(),children:Rle}),ue.jsx(vle,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount())}),EE.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(vE(HTMLElement));function d2(r){"@babel/helpers - typeof";return d2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},d2(r)}function us(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */us=function(){return n};var r,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(k,L,_){k[L]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",M=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(k,L,_){return Object.defineProperty(k,L,{value:_,enumerable:!0,configurable:!0,writable:!0}),k[L]}try{g({},"")}catch(k){g=function(_,P,Y){return _[P]=Y}}function p(k,L,_,P){var Y=L&&L.prototype instanceof w?L:w,T=Object.create(Y.prototype),F=new se(P||[]);return s(T,"_invoke",{value:ee(k,_,F)}),T}function h(k,L,_){try{return{type:"normal",arg:k.call(L,_)}}catch(P){return{type:"throw",arg:P}}}n.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",v={};function w(){}function O(){}function A(){}var x={};g(x,c,function(){return this});var U=Object.getPrototypeOf,V=U&&U(U(fe([])));V&&V!==i&&a.call(V,c)&&(x=V);var Z=A.prototype=w.prototype=Object.create(x);function W(k){["next","throw","return"].forEach(function(L){g(k,L,function(_){return this._invoke(L,_)})})}function B(k,L){function _(Y,T,F,Me){var Ie=h(k[Y],k,T);if(Ie.type!=="throw"){var le=Ie.arg,je=le.value;return je&&d2(je)=="object"&&a.call(je,"__await")?L.resolve(je.__await).then(function(_e){_("next",_e,F,Me)},function(_e){_("throw",_e,F,Me)}):L.resolve(je).then(function(_e){le.value=_e,F(le)},function(_e){return _("throw",_e,F,Me)})}Me(Ie.arg)}var P;s(this,"_invoke",{value:function(T,F){function Me(){return new L(function(Ie,le){_(T,F,Ie,le)})}return P=P?P.then(Me,Me):Me()}})}function ee(k,L,_){var P=y;return function(Y,T){if(P===E)throw Error("Generator is already running");if(P===m){if(Y==="throw")throw T;return{value:r,done:!0}}for(_.method=Y,_.arg=T;;){var F=_.delegate;if(F){var Me=ie(F,_);if(Me){if(Me===v)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=E;var Ie=h(k,L,_);if(Ie.type==="normal"){if(P=_.done?m:N,Ie.arg===v)continue;return{value:Ie.arg,done:_.done}}Ie.type==="throw"&&(P=m,_.method="throw",_.arg=Ie.arg)}}}function ie(k,L){var _=L.method,P=k.iterator[_];if(P===r)return L.delegate=null,_==="throw"&&k.iterator.return&&(L.method="return",L.arg=r,ie(k,L),L.method==="throw")||_!=="return"&&(L.method="throw",L.arg=new TypeError("The iterator does not provide a '"+_+"' method")),v;var Y=h(P,k.iterator,L.arg);if(Y.type==="throw")return L.method="throw",L.arg=Y.arg,L.delegate=null,v;var T=Y.arg;return T?T.done?(L[k.resultName]=T.value,L.next=k.nextLoc,L.method!=="return"&&(L.method="next",L.arg=r),L.delegate=null,v):T:(L.method="throw",L.arg=new TypeError("iterator result is not an object"),L.delegate=null,v)}function re(k){var L={tryLoc:k[0]};1 in k&&(L.catchLoc=k[1]),2 in k&&(L.finallyLoc=k[2],L.afterLoc=k[3]),this.tryEntries.push(L)}function ae(k){var L=k.completion||{};L.type="normal",delete L.arg,k.completion=L}function se(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(re,this),this.reset(!0)}function fe(k){if(k||k===""){var L=k[c];if(L)return L.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var _=-1,P=function Y(){for(;++_<k.length;)if(a.call(k,_))return Y.value=k[_],Y.done=!1,Y;return Y.value=r,Y.done=!0,Y};return P.next=P}}throw new TypeError(d2(k)+" is not iterable")}return O.prototype=A,s(Z,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:O,configurable:!0}),O.displayName=g(A,d,"GeneratorFunction"),n.isGeneratorFunction=function(k){var L=typeof k=="function"&&k.constructor;return!!L&&(L===O||(L.displayName||L.name)==="GeneratorFunction")},n.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,A):(k.__proto__=A,g(k,d,"GeneratorFunction")),k.prototype=Object.create(Z),k},n.awrap=function(k){return{__await:k}},W(B.prototype),g(B.prototype,M,function(){return this}),n.AsyncIterator=B,n.async=function(k,L,_,P,Y){Y===void 0&&(Y=Promise);var T=new B(p(k,L,_,P),Y);return n.isGeneratorFunction(L)?T:T.next().then(function(F){return F.done?F.value:T.next()})},W(Z),g(Z,d,"Generator"),g(Z,c,function(){return this}),g(Z,"toString",function(){return"[object Generator]"}),n.keys=function(k){var L=Object(k),_=[];for(var P in L)_.push(P);return _.reverse(),function Y(){for(;_.length;){var T=_.pop();if(T in L)return Y.value=T,Y.done=!1,Y}return Y.done=!0,Y}},n.values=fe,se.prototype={constructor:se,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ae),!L)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=r)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var _=this;function P(le,je){return F.type="throw",F.arg=L,_.next=le,je&&(_.method="next",_.arg=r),!!je}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var T=this.tryEntries[Y],F=T.completion;if(T.tryLoc==="root")return P("end");if(T.tryLoc<=this.prev){var Me=a.call(T,"catchLoc"),Ie=a.call(T,"finallyLoc");if(Me&&Ie){if(this.prev<T.catchLoc)return P(T.catchLoc,!0);if(this.prev<T.finallyLoc)return P(T.finallyLoc)}else if(Me){if(this.prev<T.catchLoc)return P(T.catchLoc,!0)}else{if(!Ie)throw Error("try statement without catch or finally");if(this.prev<T.finallyLoc)return P(T.finallyLoc)}}}},abrupt:function(L,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var T=Y;break}}T&&(L==="break"||L==="continue")&&T.tryLoc<=_&&_<=T.finallyLoc&&(T=null);var F=T?T.completion:{};return F.type=L,F.arg=_,T?(this.method="next",this.next=T.finallyLoc,v):this.complete(F)},complete:function(L,_){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&_&&(this.next=_),v},finish:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===L)return this.complete(P.completion,P.afterLoc),ae(P),v}},catch:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===L){var Y=P.completion;if(Y.type==="throw"){var T=Y.arg;ae(P)}return T}}throw Error("illegal catch attempt")},delegateYield:function(L,_,P){return this.delegate={iterator:fe(L),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=r),v}},n}function mR(r,n,i,a,s,l,c){try{var M=r[l](c),d=M.value}catch(g){return void i(g)}M.done?n(d):Promise.resolve(d).then(a,s)}function eM(r){return function(){var n=this,i=arguments;return new Promise(function(a,s){var l=r.apply(n,i);function c(d){mR(l,a,s,c,M,"next",d)}function M(d){mR(l,a,s,c,M,"throw",d)}c(void 0)})}}function Ple(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function Ule(r,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,Vle(a.key),a)}}function Hle(r,n,i){return n&&Ule(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Vle(r){var n=Yle(r,"string");return d2(n)=="symbol"?n:n+""}function Yle(r,n){if(d2(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(d2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Qle=function(){function r(){Ple(this,r)}return Hle(r,[{key:"initialize",value:function(){var n=eM(us().mark(function a(s){var l;return us().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l=Wi.getState().initialize(s),M.abrupt("return",l);case 2:case"end":return M.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"configure",value:function(){var n=eM(us().mark(function a(s){var l,c;return us().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof s=="string"){d.next=5;break}return d.next=3,Wi.getState().configure(s);case 3:return l=d.sent,d.abrupt("return",l);case 5:return d.next=7,Wi.getState().configureWithUrl(s);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var n=eM(us().mark(function a(s){var l;return us().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,Wi.getState().getWorkflows(s);case 2:return l=M.sent,M.abrupt("return",l);case 4:case"end":return M.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var n=eM(us().mark(function a(s){var l,c;return us().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=s.workfowId,d.next=3,Wi.getState().preparareWorkflowAndPrepareUi(l);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var n=eM(us().mark(function a(){var s;return us().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Wi.getState().startNewSession();case 2:if(s=c.sent,!s.error){c.next=5;break}return c.abrupt("return",s);case 5:return c.abrupt("return",new Promise(function(M){var d=function(p){M(p)};Wi.getState().playWorkflow(d)}));case 6:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var n=eM(us().mark(function a(){var s;return us().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Wi.getState().deinitialize();case 2:return s=c.sent,c.abrupt("return",s);case 4:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}()},{key:"setNonce",value:function(i){Wi.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Wi.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){Wi.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return Wi.getState().getCurrentSessionId()}}])}(),Fle=window.customElements.get("idv-flow");Fle||window.customElements.define("idv-flow",DR);var Ble=Object.defineProperty,Zle=Object.defineProperties,Gle=Object.getOwnPropertyDescriptors,jR=Object.getOwnPropertySymbols,$le=Object.prototype.hasOwnProperty,Wle=Object.prototype.propertyIsEnumerable,vR=(r,n,i)=>n in r?Ble(r,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[n]=i,CE=(r,n)=>{for(var i in n||(n={}))$le.call(n,i)&&vR(r,i,n[i]);if(jR)for(var i of jR(n))Wle.call(n,i)&&vR(r,i,n[i]);return r},Kle=(r,n)=>Zle(r,Gle(n)),Qa=(r,n,i)=>new Promise((a,s)=>{var l=d=>{try{M(i.next(d))}catch(g){s(g)}},c=d=>{try{M(i.throw(d))}catch(g){s(g)}},M=d=>d.done?a(d.value):Promise.resolve(d.value).then(l,c);M((i=i.apply(r,n)).next())}),TR=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function CR(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var AR={exports:{}},qd={},SR={exports:{}},Zr={},_R;function qle(){if(_R)return Zr;_R=1;/**
|
|
51
|
+
`),a=new Blob([i],{type:"text/plain"}),s=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=s,l.click(),window.URL.revokeObjectURL(s),this._logs=[]}}}])}();const EE=new sle;function c2(r){"@babel/helpers - typeof";return c2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},c2(r)}function xn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */xn=function(){return n};var r,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(k,L,_){k[L]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",M=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(k,L,_){return Object.defineProperty(k,L,{value:_,enumerable:!0,configurable:!0,writable:!0}),k[L]}try{g({},"")}catch(k){g=function(_,P,Y){return _[P]=Y}}function p(k,L,_,P){var Y=L&&L.prototype instanceof w?L:w,T=Object.create(Y.prototype),F=new se(P||[]);return s(T,"_invoke",{value:ee(k,_,F)}),T}function h(k,L,_){try{return{type:"normal",arg:k.call(L,_)}}catch(P){return{type:"throw",arg:P}}}n.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",v={};function w(){}function O(){}function A(){}var x={};g(x,c,function(){return this});var U=Object.getPrototypeOf,V=U&&U(U(fe([])));V&&V!==i&&a.call(V,c)&&(x=V);var Z=A.prototype=w.prototype=Object.create(x);function W(k){["next","throw","return"].forEach(function(L){g(k,L,function(_){return this._invoke(L,_)})})}function B(k,L){function _(Y,T,F,Me){var Ie=h(k[Y],k,T);if(Ie.type!=="throw"){var le=Ie.arg,je=le.value;return je&&c2(je)=="object"&&a.call(je,"__await")?L.resolve(je.__await).then(function(_e){_("next",_e,F,Me)},function(_e){_("throw",_e,F,Me)}):L.resolve(je).then(function(_e){le.value=_e,F(le)},function(_e){return _("throw",_e,F,Me)})}Me(Ie.arg)}var P;s(this,"_invoke",{value:function(T,F){function Me(){return new L(function(Ie,le){_(T,F,Ie,le)})}return P=P?P.then(Me,Me):Me()}})}function ee(k,L,_){var P=y;return function(Y,T){if(P===E)throw Error("Generator is already running");if(P===m){if(Y==="throw")throw T;return{value:r,done:!0}}for(_.method=Y,_.arg=T;;){var F=_.delegate;if(F){var Me=ie(F,_);if(Me){if(Me===v)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=E;var Ie=h(k,L,_);if(Ie.type==="normal"){if(P=_.done?m:N,Ie.arg===v)continue;return{value:Ie.arg,done:_.done}}Ie.type==="throw"&&(P=m,_.method="throw",_.arg=Ie.arg)}}}function ie(k,L){var _=L.method,P=k.iterator[_];if(P===r)return L.delegate=null,_==="throw"&&k.iterator.return&&(L.method="return",L.arg=r,ie(k,L),L.method==="throw")||_!=="return"&&(L.method="throw",L.arg=new TypeError("The iterator does not provide a '"+_+"' method")),v;var Y=h(P,k.iterator,L.arg);if(Y.type==="throw")return L.method="throw",L.arg=Y.arg,L.delegate=null,v;var T=Y.arg;return T?T.done?(L[k.resultName]=T.value,L.next=k.nextLoc,L.method!=="return"&&(L.method="next",L.arg=r),L.delegate=null,v):T:(L.method="throw",L.arg=new TypeError("iterator result is not an object"),L.delegate=null,v)}function re(k){var L={tryLoc:k[0]};1 in k&&(L.catchLoc=k[1]),2 in k&&(L.finallyLoc=k[2],L.afterLoc=k[3]),this.tryEntries.push(L)}function ae(k){var L=k.completion||{};L.type="normal",delete L.arg,k.completion=L}function se(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(re,this),this.reset(!0)}function fe(k){if(k||k===""){var L=k[c];if(L)return L.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var _=-1,P=function Y(){for(;++_<k.length;)if(a.call(k,_))return Y.value=k[_],Y.done=!1,Y;return Y.value=r,Y.done=!0,Y};return P.next=P}}throw new TypeError(c2(k)+" is not iterable")}return O.prototype=A,s(Z,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:O,configurable:!0}),O.displayName=g(A,d,"GeneratorFunction"),n.isGeneratorFunction=function(k){var L=typeof k=="function"&&k.constructor;return!!L&&(L===O||(L.displayName||L.name)==="GeneratorFunction")},n.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,A):(k.__proto__=A,g(k,d,"GeneratorFunction")),k.prototype=Object.create(Z),k},n.awrap=function(k){return{__await:k}},W(B.prototype),g(B.prototype,M,function(){return this}),n.AsyncIterator=B,n.async=function(k,L,_,P,Y){Y===void 0&&(Y=Promise);var T=new B(p(k,L,_,P),Y);return n.isGeneratorFunction(L)?T:T.next().then(function(F){return F.done?F.value:T.next()})},W(Z),g(Z,d,"Generator"),g(Z,c,function(){return this}),g(Z,"toString",function(){return"[object Generator]"}),n.keys=function(k){var L=Object(k),_=[];for(var P in L)_.push(P);return _.reverse(),function Y(){for(;_.length;){var T=_.pop();if(T in L)return Y.value=T,Y.done=!1,Y}return Y.done=!0,Y}},n.values=fe,se.prototype={constructor:se,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ae),!L)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=r)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var _=this;function P(le,je){return F.type="throw",F.arg=L,_.next=le,je&&(_.method="next",_.arg=r),!!je}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var T=this.tryEntries[Y],F=T.completion;if(T.tryLoc==="root")return P("end");if(T.tryLoc<=this.prev){var Me=a.call(T,"catchLoc"),Ie=a.call(T,"finallyLoc");if(Me&&Ie){if(this.prev<T.catchLoc)return P(T.catchLoc,!0);if(this.prev<T.finallyLoc)return P(T.finallyLoc)}else if(Me){if(this.prev<T.catchLoc)return P(T.catchLoc,!0)}else{if(!Ie)throw Error("try statement without catch or finally");if(this.prev<T.finallyLoc)return P(T.finallyLoc)}}}},abrupt:function(L,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var T=Y;break}}T&&(L==="break"||L==="continue")&&T.tryLoc<=_&&_<=T.finallyLoc&&(T=null);var F=T?T.completion:{};return F.type=L,F.arg=_,T?(this.method="next",this.next=T.finallyLoc,v):this.complete(F)},complete:function(L,_){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&_&&(this.next=_),v},finish:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===L)return this.complete(P.completion,P.afterLoc),ae(P),v}},catch:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===L){var Y=P.completion;if(Y.type==="throw"){var T=Y.arg;ae(P)}return T}}throw Error("illegal catch attempt")},delegateYield:function(L,_,P){return this.delegate={iterator:fe(L),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=r),v}},n}function dR(r,n,i,a,s,l,c){try{var M=r[l](c),d=M.value}catch(g){return void i(g)}M.done?n(d):Promise.resolve(d).then(a,s)}function Ro(r){return function(){var n=this,i=arguments;return new Promise(function(a,s){var l=r.apply(n,i);function c(d){dR(l,a,s,c,M,"next",d)}function M(d){dR(l,a,s,c,M,"throw",d)}c(void 0)})}}function lle(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function cle(r,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,gR(a.key),a)}}function fle(r,n,i){return n&&cle(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function J2(r,n,i){return(n=gR(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function gR(r){var n=Mle(r,"string");return c2(n)=="symbol"?n:n+""}function Mle(r,n){if(c2(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(c2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Us=EE.create("wasm_idv"),dle=function(){function r(n){lle(this,r),J2(this,"_worker",null),J2(this,"_initialized",!1),J2(this,"_connectedToIdv",!1),J2(this,"_serviceRunning",!1),J2(this,"_userId",nue(rae)),J2(this,"_setErrorScreen",null),n&&(this._setErrorScreen=n)}return fle(r,[{key:"init",value:function(){var n=Ro(xn().mark(function a(){var s,l,c,M;return xn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.prev=1,g.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/157a35c-7cff4ddf6//PlatformAdaptor.worker.js");case 4:return s=g.sent,g.next=7,s.blob();case 7:l=g.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),g.next=15;break;case 12:g.prev=12,g.t0=g.catch(1),Us("Creating worker error: ".concat(JSON.stringify(g.t0)));case 15:g.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){g.next=20;break}return g.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),g.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/0.1/157a35c-7cff4ddf6/",preMain:!0});case 23:return M=g.sent,g.abrupt("return",M);case 25:case"end":return g.stop()}},a,this,[[1,12]])}));function i(){return n.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var n=Ro(xn().mark(function a(s){var l;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:rN.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:s.host,httpRetryCount:s.httpRetryCount||0,httpTimeoutMs:s.httpTimeoutMs||0,isSecure:!0,password:s.password,port:s.port?s.port:0,schema:s.schema?s.schema:"basic",userName:s.userName},preMain:!0});case 2:return l=M.sent,Us("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(l))),l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),M.abrupt("return",l);case 6:case"end":return M.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var n=Ro(xn().mark(function a(s){var l;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:rN.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:s},preMain:!0});case 2:return l=M.sent,l.code===0&&(this._serviceRunning=!0),M.abrupt("return",l);case 5:case"end":return M.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var n=Ro(xn().mark(function a(s){var l,c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l={workflowId:s},d.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:l,preMain:!0});case 3:return c=d.sent,Us("Start session connect result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var n=Ro(xn().mark(function a(s){var l,c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l={sessionId:s},d.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=d.sent,Us("continue session result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var n=Ro(xn().mark(function a(){var s,l,c=arguments;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return s=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:s,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=d.sent,Us("listWorkflows result: ".concat(JSON.stringify(l))),d.abrupt("return",l);case 6:case"end":return d.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,c.abrupt("return",s);case 4:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,c.abrupt("return",s);case 4:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var n=Ro(xn().mark(function a(s){var l;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.sendMessage({workflowIdParams:{workflowId:s},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=M.sent,M.abrupt("return",l);case 4:case"end":return M.stop()}},a,this)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var n=Ro(xn().mark(function a(s,l){var c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return Us("Push data: ".concat(s," , ").concat(JSON.stringify(l))),d.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:s},preMain:!0});case 3:return c=d.sent,Us("Push data result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a,s){return n.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,c.abrupt("return",s);case 4:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,Us("Wait for session update result: ".concat(JSON.stringify(s))),c.abrupt("return",s);case 5:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,c.abrupt("return",s);case 6:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var n=Ro(xn().mark(function a(s){var l=this;return xn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.abrupt("return",new Promise(function(d,g){if(!l._worker)return g();l._worker.onmessage=function(p){var h=p.data.target;if(h==="stdout"){Us(JSON.stringify(p.data.content));return}if(h==="custom"){var y=p.data,N=y.method,E=y.data;Us("::: custom method, ".concat(N,", ").concat(JSON.stringify(E))),N==="onRuntimeInitialized"&&(l._initialized=!0),d(E)}if(h==="stderr"){var m=p.data.content;Us(JSON.stringify(m)),l._setErrorScreen&&l._setErrorScreen(m)}},l._worker.postMessage(s)}));case 1:case"end":return M.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"isServiceRunning",value:function(){return this._serviceRunning}},{key:"isServiceConnected",value:function(){return this._connectedToIdv}},{key:"terminateWorker",value:function(){if(this.isServiceRunning()){var i;(i=this._worker)===null||i===void 0||i.terminate(),this._serviceRunning=!1,this._initialized=!1,this._connectedToIdv=!1}}},{key:"shutdown",value:function(){var n=Ro(xn().mark(function a(){var s;return xn().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 s=c.sent,this.terminateWorker(),c.abrupt("return",s);case 10:case"end":return c.stop()}},a,this)}));function i(){return n.apply(this,arguments)}return i}()}])}();function f2(r){"@babel/helpers - typeof";return f2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},f2(r)}function IR(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function M2(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?IR(Object(i),!0).forEach(function(a){DE(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):IR(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function DE(r,n,i){return(n=gle(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function gle(r){var n=Ile(r,"string");return f2(n)=="symbol"?n:n+""}function Ile(r,n){if(f2(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(f2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function Kn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Kn=function(){return n};var r,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(k,L,_){k[L]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",M=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(k,L,_){return Object.defineProperty(k,L,{value:_,enumerable:!0,configurable:!0,writable:!0}),k[L]}try{g({},"")}catch(k){g=function(_,P,Y){return _[P]=Y}}function p(k,L,_,P){var Y=L&&L.prototype instanceof w?L:w,T=Object.create(Y.prototype),F=new se(P||[]);return s(T,"_invoke",{value:ee(k,_,F)}),T}function h(k,L,_){try{return{type:"normal",arg:k.call(L,_)}}catch(P){return{type:"throw",arg:P}}}n.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",v={};function w(){}function O(){}function A(){}var x={};g(x,c,function(){return this});var U=Object.getPrototypeOf,V=U&&U(U(fe([])));V&&V!==i&&a.call(V,c)&&(x=V);var Z=A.prototype=w.prototype=Object.create(x);function W(k){["next","throw","return"].forEach(function(L){g(k,L,function(_){return this._invoke(L,_)})})}function B(k,L){function _(Y,T,F,Me){var Ie=h(k[Y],k,T);if(Ie.type!=="throw"){var le=Ie.arg,je=le.value;return je&&f2(je)=="object"&&a.call(je,"__await")?L.resolve(je.__await).then(function(_e){_("next",_e,F,Me)},function(_e){_("throw",_e,F,Me)}):L.resolve(je).then(function(_e){le.value=_e,F(le)},function(_e){return _("throw",_e,F,Me)})}Me(Ie.arg)}var P;s(this,"_invoke",{value:function(T,F){function Me(){return new L(function(Ie,le){_(T,F,Ie,le)})}return P=P?P.then(Me,Me):Me()}})}function ee(k,L,_){var P=y;return function(Y,T){if(P===E)throw Error("Generator is already running");if(P===m){if(Y==="throw")throw T;return{value:r,done:!0}}for(_.method=Y,_.arg=T;;){var F=_.delegate;if(F){var Me=ie(F,_);if(Me){if(Me===v)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=E;var Ie=h(k,L,_);if(Ie.type==="normal"){if(P=_.done?m:N,Ie.arg===v)continue;return{value:Ie.arg,done:_.done}}Ie.type==="throw"&&(P=m,_.method="throw",_.arg=Ie.arg)}}}function ie(k,L){var _=L.method,P=k.iterator[_];if(P===r)return L.delegate=null,_==="throw"&&k.iterator.return&&(L.method="return",L.arg=r,ie(k,L),L.method==="throw")||_!=="return"&&(L.method="throw",L.arg=new TypeError("The iterator does not provide a '"+_+"' method")),v;var Y=h(P,k.iterator,L.arg);if(Y.type==="throw")return L.method="throw",L.arg=Y.arg,L.delegate=null,v;var T=Y.arg;return T?T.done?(L[k.resultName]=T.value,L.next=k.nextLoc,L.method!=="return"&&(L.method="next",L.arg=r),L.delegate=null,v):T:(L.method="throw",L.arg=new TypeError("iterator result is not an object"),L.delegate=null,v)}function re(k){var L={tryLoc:k[0]};1 in k&&(L.catchLoc=k[1]),2 in k&&(L.finallyLoc=k[2],L.afterLoc=k[3]),this.tryEntries.push(L)}function ae(k){var L=k.completion||{};L.type="normal",delete L.arg,k.completion=L}function se(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(re,this),this.reset(!0)}function fe(k){if(k||k===""){var L=k[c];if(L)return L.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var _=-1,P=function Y(){for(;++_<k.length;)if(a.call(k,_))return Y.value=k[_],Y.done=!1,Y;return Y.value=r,Y.done=!0,Y};return P.next=P}}throw new TypeError(f2(k)+" is not iterable")}return O.prototype=A,s(Z,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:O,configurable:!0}),O.displayName=g(A,d,"GeneratorFunction"),n.isGeneratorFunction=function(k){var L=typeof k=="function"&&k.constructor;return!!L&&(L===O||(L.displayName||L.name)==="GeneratorFunction")},n.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,A):(k.__proto__=A,g(k,d,"GeneratorFunction")),k.prototype=Object.create(Z),k},n.awrap=function(k){return{__await:k}},W(B.prototype),g(B.prototype,M,function(){return this}),n.AsyncIterator=B,n.async=function(k,L,_,P,Y){Y===void 0&&(Y=Promise);var T=new B(p(k,L,_,P),Y);return n.isGeneratorFunction(L)?T:T.next().then(function(F){return F.done?F.value:T.next()})},W(Z),g(Z,d,"Generator"),g(Z,c,function(){return this}),g(Z,"toString",function(){return"[object Generator]"}),n.keys=function(k){var L=Object(k),_=[];for(var P in L)_.push(P);return _.reverse(),function Y(){for(;_.length;){var T=_.pop();if(T in L)return Y.value=T,Y.done=!1,Y}return Y.done=!0,Y}},n.values=fe,se.prototype={constructor:se,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ae),!L)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=r)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var _=this;function P(le,je){return F.type="throw",F.arg=L,_.next=le,je&&(_.method="next",_.arg=r),!!je}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var T=this.tryEntries[Y],F=T.completion;if(T.tryLoc==="root")return P("end");if(T.tryLoc<=this.prev){var Me=a.call(T,"catchLoc"),Ie=a.call(T,"finallyLoc");if(Me&&Ie){if(this.prev<T.catchLoc)return P(T.catchLoc,!0);if(this.prev<T.finallyLoc)return P(T.finallyLoc)}else if(Me){if(this.prev<T.catchLoc)return P(T.catchLoc,!0)}else{if(!Ie)throw Error("try statement without catch or finally");if(this.prev<T.finallyLoc)return P(T.finallyLoc)}}}},abrupt:function(L,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var T=Y;break}}T&&(L==="break"||L==="continue")&&T.tryLoc<=_&&_<=T.finallyLoc&&(T=null);var F=T?T.completion:{};return F.type=L,F.arg=_,T?(this.method="next",this.next=T.finallyLoc,v):this.complete(F)},complete:function(L,_){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&_&&(this.next=_),v},finish:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===L)return this.complete(P.completion,P.afterLoc),ae(P),v}},catch:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===L){var Y=P.completion;if(Y.type==="throw"){var T=Y.arg;ae(P)}return T}}throw Error("illegal catch attempt")},delegateYield:function(L,_,P){return this.delegate={iterator:fe(L),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=r),v}},n}function pR(r,n,i,a,s,l,c){try{var M=r[l](c),d=M.value}catch(g){return void i(g)}M.done?n(d):Promise.resolve(d).then(a,s)}function ys(r){return function(){var n=this,i=arguments;return new Promise(function(a,s){var l=r.apply(n,i);function c(d){pR(l,a,s,c,M,"next",d)}function M(d){pR(l,a,s,c,M,"throw",d)}c(void 0)})}}var ple=EE.create("store_idv"),yle=function(n,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=ys(Kn().mark(function l(){var c;return Kn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new dle,d.next=3,c.init();case 3:n({wasmService:c});case 4:case"end":return d.stop()}},l)}));function s(){return a.apply(this,arguments)}return s}(),setFinalWaitingUi:function(s){n({isFinalWaitingUi:s})},connectToIdv:function(s){return ys(Kn().mark(function l(){var c,M,d,g,p;return Kn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!((c=i().wasmService)!==null&&c!==void 0&&c.isServiceConnected())){y.next=3;break}return y.next=3,(M=i().wasmService)===null||M===void 0?void 0:M.disconnect();case 3:return y.next=5,i().wasmService.prepareAndConnect(s);case 5:if(d=y.sent,g=null,d.code===4&&(g=a2.HTTP_ISSUE),d.code!==0&&d.code!==4&&(g=a2.PROVIDER_ERROR),g===null){y.next=12;break}return p=new xd({errorCode:g}),y.abrupt("return",{error:p});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(s){return ys(Kn().mark(function l(){var c,M,d,g,p;return Kn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().wasmService,y.next=3,c.connectByUrl(s);case 3:if(M=y.sent,d=null,M.code===4&&(d=a2.HTTP_ISSUE),M.code!==0&&M.code!==4&&(d=a2.PROVIDER_ERROR),d===null){y.next=13;break}return g=new xd({errorCode:d}),p=new Jg({errorCode:iN.CONNECTION_ISSUE,underlyingBaseError:g}),y.abrupt("return",{workflows:[],error:p});case 13:return y.abrupt("return",{workflows:M.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(s){var l=function(M){var d,g=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId,p=M2(M2({},M.results),{},{sessionId:g}),h=M2({results:p},M.error&&{error:M.error});i().setCurrentSessionDataLsAndStore(null),s(h)};n(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=ys(Kn().mark(function l(){var c,M,d,g;return Kn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=i().externalModulesNames,h.prev=1,h.next=4,hle(c);case 4:return M=h.sent,n(function(){return{externalModules:M}}),h.abrupt("return",{});case 9:return h.prev=9,h.t0=h.catch(1),(d=i().wasmService)===null||d===void 0||d.shutdown(),i().resetWasmService(),i().resetProps(),g=new Od({errorCode:hd.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:g});case 16:case"end":return h.stop()}},l,null,[[1,9]])}));function s(){return a.apply(this,arguments)}return s}(),setProcessingTemplate:function(s){var l=rE(s.find(function(c){return c.templateId===Mw}));l.templateLayout=ck(l.templateLayout,i().layout),n({proccessingTransformedTemplate:l})},setIsProcessing:function(s){n({isProcessing:s})},_pushStep:function(){var a=ys(Kn().mark(function l(c,M){var d,g,p;return Kn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d=null,g=function(){var N=ys(Kn().mark(function E(){var m,v,w,O;return Kn().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,i().wasmService.pushData(c,M);case 2:if(m=x.sent,v=null,m.code===4&&(v=os.HTTP_ISSUE),m.code!==0&&m.code!==4&&(v=os.PROVIDER_ERROR),v!==null&&(w=new Ld({errorCode:os.HTTP_ISSUE}),O=new Bo({errorCode:Fo.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:w}),d=O),m.code!==0){x.next=12;break}return d=null,x.abrupt("return",m);case 12:return x.abrupt("return",null);case 13:case"end":return x.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),p=function(){return null},y.next=5,iE(g,p);case 5:return y.abrupt("return",d?{error:d}:{});case 6:case"end":return y.stop()}},l)}));function s(l,c){return a.apply(this,arguments)}return s}(),_findStepById:function(s){var l=i().workflow;if(!(!l||!s))return l.steps.find(function(c){return c.id===s})},_waitingForNextStep:function(){var a=ys(Kn().mark(function l(){var c,M,d,g,p;return Kn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,M=null,d=function(){var N=ys(Kn().mark(function E(){var m,v,w,O,A,x,U,V,Z,W,B,ee,ie,re,ae;return Kn().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return fe.next=2,i().wasmService.getSessionState();case 2:if(O=fe.sent,A=(m=O.data)===null||m===void 0?void 0:m.currentStep,x=(v=O.data)===null||v===void 0?void 0:v.isProcessingFiles,U=(w=O.data)===null||w===void 0||(w=w.workflow)===null||w===void 0?void 0:w.steps,V=eue(U,A),Z=O.code===4,W=O.code!==0&&O.code!==4,B=O.code===0&&(!O.data.workflow||!O.data.currentStep),ee=A&&A===c,ie=null,U&&!V&&(ie=os.NOT_DATA_TYPE),Z&&(ie=os.HTTP_ISSUE),W&&(ie=os.PROVIDER_ERROR),x&&(ie=os.IS_PROCESSING),ee&&(ie=os.SAME_STEP),B&&(ie=os.DECODING_FAILED),ie!==null&&(re=new Ld({errorCode:ie}),ae=new Bo({errorCode:Fo.INTERNAL_ISSUE,underlyingBaseError:re}),M=ae),ple(JSON.stringify({nextStep:A,isDataType:V,isProcessingFiles:x})),!(V&&!ee&&!x&&!Z&&!W&&!B)){fe.next=23;break}return M=null,fe.abrupt("return",O.data);case 23:return fe.abrupt("return",null);case 24:case"end":return fe.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),g=function(){return null},y.next=6,iE(d,g);case 6:if(p=y.sent,!M){y.next=9;break}return y.abrupt("return",{error:M});case 9:return y.abrupt("return",{workflow:p==null?void 0:p.workflow,nextStep:p==null?void 0:p.currentStep});case 10:case"end":return y.stop()}},l)}));function s(){return a.apply(this,arguments)}return s}(),setFinalStepAndStopProcess:function(s){var l=s||i().currentStepId;if(l){var c=i()._findStepById(l);c&&(i().workflowSessionCompletion({results:{finalStep:{id:c.id,name:c.name,final:c.final}}}),i().resetSession(),i().listener({target:$2.SERVICE,eventType:pd.MESSAGE,message:yd.DID_END_SESSION}))}},pushStepWaitNextStepAndSet:function(){var a=ys(Kn().mark(function l(c,M){var d,g,p,h,y,N,E,m;return Kn().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){w.next=4;break}return i().setFinalStepAndStopProcess(),w.abrupt("return");case 4:if(!(M instanceof bn)){w.next=10;break}return d=M,g=new Bo({errorCode:Fo.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),i().workflowSessionCompletion({error:g}),i().resetSession(),w.abrupt("return");case 10:return w.next=12,i()._pushStep(c,M);case 12:if(p=w.sent,!p.error){w.next=17;break}return i().workflowSessionCompletion({error:p.error}),i().resetSession(),w.abrupt("return");case 17:return w.next=19,i()._waitingForNextStep();case 19:if(h=w.sent,!h.error){w.next=24;break}return i().workflowSessionCompletion({error:h.error}),i().resetSession(),w.abrupt("return");case 24:if(y=h.workflow,N=h.nextStep,i().setWorkflow(y),i().setLayout(y.client.layout),i().setProcessingTemplate(y.client.steps),E=i()._findStepById(N),m=function(A){return!!A&&Object.prototype.toString.call(A)==="[object Object]"&&A.templateId},!(E!=null&&E.final&&!m(E.client))){w.next=34;break}return i().setFinalStepAndStopProcess(E.id),w.abrupt("return");case 34:E!=null&&E.final&&m(E.client)&&i().setFinalWaitingUi(!0),i().onChangeScreen(N),i().setIsProcessing(!1);case 37:case"end":return w.stop()}},l)}));function s(l,c){return a.apply(this,arguments)}return s}(),continueSession:function(){var a=ys(Kn().mark(function l(){var c,M,d,g,p,h,y,N,E,m,v,w,O;return Kn().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(c={isContinue:!1},M=i().workflow,d=i().getCurrentSessionDataLs(),g=i().sessionRestoreMode,g){x.next=6;break}return x.abrupt("return",c);case 6:if(d){x.next=8;break}return x.abrupt("return",c);case 8:if(p=d.sessionId,h=d.workflowId,!(!p||h!==M.id)){x.next=11;break}return x.abrupt("return",c);case 11:return x.next=13,i().wasmService.continueSession(p);case 13:return y=x.sent,N=y.data,E=N.currentStep,"id"in N&&"currentStep"in N||(m=new wd({errorCode:Gg.DECODING_FAILED}),v=new Bo({errorCode:Fo.START_SESSION_ERROR,underlyingBaseError:m}),c=M2(M2({},c),{},{error:v})),w=i()._findStepById(E),(w==null?void 0:w.final)===!1?(O=N.currentStep,i().setIsProcessing(!1),i().setCurrentStepId(O),i().setCurrentSessionDataLsAndStore({sessionId:N.id,workflowId:h}),i().listener({target:$2.SERVICE,eventType:pd.MESSAGE,message:yd.DID_START_RESTORE_SESSION}),c=M2(M2({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),x.abrupt("return",c);case 20:case"end":return x.stop()}},l)}));function s(){return a.apply(this,arguments)}return s}(),onChangeScreen:function(s,l){if(!s&&!l)return n(function(){return{currentScreenConfig:null}});if(l)return n(function(){return{currentScreenConfig:l}});if(s===null)return n(function(){return{currentScreenConfig:null}});var c=i().workflow,M=null;if(s===Mw)M=i().proccessingTransformedTemplate;else{var d;if(M=(d=i()._findStepById(s))===null||d===void 0?void 0:d.client,M!==null){var g;M.sessionId=(g=i().currentSessionData)===null||g===void 0?void 0:g.sessionId}M&&M.templateLayout&&(M.templateLayout=ck(M.templateLayout,i().layout))}var p=Xoe(i().externalModules,c.steps,s);if(M===null||!p){var h=new Bo({errorCode:Fo.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:h}),n(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(s),n(function(){return{currentScreenConfig:M}})},deinitializationIdv:function(){var a=ys(Kn().mark(function l(){var c,M;return Kn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,(c=i().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(M=g.sent,i().resetWasmService(),i().externalModules.forEach(function(p){p.component.deinitialize&&p.component.isReady&&p.component.deinitialize()}),(M==null?void 0:M.code)!==0){g.next=7;break}return g.abrupt("return",{});case 7:return g.abrupt("return",{});case 8:case"end":return g.stop()}},l)}));function s(){return a.apply(this,arguments)}return s}(),resetSession:function(){return n(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null}})},resetWasmService:function(){return n(function(){return{wasmService:null}})}}};function hle(r){return mE.apply(this,arguments)}function mE(){return mE=ys(Kn().mark(function r(n){var i,a,s,l,c,M;return Kn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:i=[{id:Pc.getIdentifier(),supportedTemplates:Pc.getSupportedTemplates(),component:Pc}],a=DE(DE({},"LIVENESS",function(){return Promise.resolve().then(()=>lbe)}),"DOC_READER",function(){return Promise.resolve().then(()=>kgt)}),s=Kn().mark(function p(){var h,y,N;return Kn().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(h=c[l],y=function(){return a[h]()},!y){m.next=7;break}return m.next=5,y();case 5:N=m.sent,i.push({id:N.default.getIdentifier(),supportedTemplates:N.default.getSupportedTemplates(),component:N.default});case 7:case"end":return m.stop()}},p)}),l=0,c=n;case 4:if(!(l<c.length)){g.next=9;break}return g.delegateYield(s(),"t0",6);case 6:l++,g.next=4;break;case 9:return M=i.filter(function(p){return p!==null}),g.abrupt("return",M);case 11:case"end":return g.stop()}},r)})),mE.apply(this,arguments)}function $d(r){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$d(r)}function yR(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);n&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),i.push.apply(i,a)}return i}function jE(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?yR(Object(i),!0).forEach(function(a){Nle(r,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):yR(Object(i)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(i,a))})}return r}function Nle(r,n,i){return(n=Ele(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function Ele(r){var n=Dle(r,"string");return $d(n)=="symbol"?n:n+""}function Dle(r,n){if($d(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if($d(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}var Wi=qae(function(){return jE(jE(jE({},uue.apply(void 0,arguments)),pue.apply(void 0,arguments)),yle.apply(void 0,arguments))}),mle=function(n){var i=n.children;return ue.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:i})},jle=function(){var n=Wi(function(E){return E.currentScreenConfig}),i=Wi(function(E){return E.pushStepWaitNextStepAndSet}),a=Wi(function(E){return E.proccessingTransformedTemplate}),s=Wi(function(E){return E.isProcessing}),l=Wi(function(E){return E.setIsProcessing}),c=Wi(function(E){return E.currentStepId}),M=Wi(function(E){return E.listener}),d=Wi(function(E){return E.externalModules}),g=Wi(function(E){return E.modulesConfig}),p=function(m,v){M({target:$2.WEB_COMPONENT,eventType:pd.MESSAGE,message:v,module:m})},h=function(m){l(m)},y=function(m){c&&(l(!1),i(c,m))},N=Wn.useCallback(function(){if(!n)return ue.jsx(mle,{children:"Waiting for play... or process completed"});var E=d.find(function(m){return m.supportedTemplates.includes(n.templateId)});if(E&&n)return ue.jsx(E.component,{perform:y,moduleProps:n,modulesConfig:g,idvEventListener:p,isProcessing:h})},[n,d]);return ue.jsx(ue.Fragment,{children:ue.jsx(Rw,{direction:nN.Ltr,children:ue.jsxs(ue.Fragment,{children:[s&&ue.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"white",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:a?ue.jsx(Pc,{perform:y,moduleProps:a,idvEventListener:p,isProcessing:h}):"Processing..."}),N()]})})})};function vle(){return ue.jsx(Wn.StrictMode,{children:ue.jsx(Sae,{children:ue.jsx(jle,{})})})}const Tle="*,*:before,*:after{box-sizing:border-box}ul,p,h1,h2,h3,h4{padding:0;margin:0}li{list-style:none}:host{display:block;container-type:inline-size;container-name:host;width:100%;height:100%}._window_tmw1v_24{--base-main-color: #7E57C5;--base-font-family: sans-serif;width:100%;max-width:680px;height:100%;position:relative;background:#fff;overflow:hidden;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);margin:0 auto;font-family:var(--base-font-family)}._content_tmw1v_43{overflow:auto;height:100%;display:flex;flex-direction:column}._back_tmw1v_50{position:absolute;width:24px;height:24px;top:16px;left:16px;cursor:pointer}._to-mobile_tmw1v_59{position:absolute;left:calc(50% - 12px);height:24px;width:24px;top:16px;cursor:pointer}",Cle="._error-boundary_mput0_1{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:20px;position:absolute;width:100%;height:100%;top:0;left:0}._title_mput0_14{font-size:20px;font-weight:700;margin-bottom:10px}._subtitle_mput0_20{margin-bottom:10px}._details_mput0_24{font-weight:lighter}";function X2(r){"@babel/helpers - typeof";return X2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},X2(r)}function Ale(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function hR(r,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,ER(a.key),a)}}function Sle(r,n,i){return n&&hR(r.prototype,n),i&&hR(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function _le(r,n,i){return n=Kd(n),Ole(r,TE()?Reflect.construct(n,[],Kd(r).constructor):n.apply(r,i))}function Ole(r,n){if(n&&(X2(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xle(r)}function xle(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Lle(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&Wd(r,n)}function vE(r){var n=typeof Map=="function"?new Map:void 0;return vE=function(a){if(a===null||!ble(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(n!==void 0){if(n.has(a))return n.get(a);n.set(a,s)}function s(){return wle(a,arguments,Kd(this).constructor)}return s.prototype=Object.create(a.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Wd(s,a)},vE(r)}function wle(r,n,i){if(TE())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,n);var s=new(r.bind.apply(r,a));return i&&Wd(s,i.prototype),s}function TE(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(TE=function(){return!!r})()}function ble(r){try{return Function.toString.call(r).indexOf("[native code]")!==-1}catch(n){return typeof r=="function"}}function Wd(r,n){return Wd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},Wd(r,n)}function Kd(r){return Kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kd(r)}function NR(r,n,i){return(n=ER(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function ER(r){var n=zle(r,"string");return X2(n)=="symbol"?n:n+""}function zle(r,n){if(X2(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(X2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var kle=[Tle,Cle],Rle=[].concat(kle).reduce(function(r,n){return r+n.toString()},""),DR=function(r){function n(){var i;return Ale(this,n),i=_le(this,n),NR(i,"_root",Kie.createRoot(i.attachShadow({mode:"open"}))),NR(i,"_mounted",!1),i}return Lle(n,r),Sle(n,[{key:"connectedCallback",value:function(){this.render(),this._mounted=!0}},{key:"version",get:function(){return"".concat(VERSION&&VERSION.trim())}},{key:"render",value:function(){this._root.render(ue.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[ue.jsx("style",{nonce:Wi.getState().getNonce(),children:Rle}),ue.jsx(vle,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount())}),EE.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(vE(HTMLElement));function d2(r){"@babel/helpers - typeof";return d2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},d2(r)}function us(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */us=function(){return n};var r,n={},i=Object.prototype,a=i.hasOwnProperty,s=Object.defineProperty||function(k,L,_){k[L]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",M=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(k,L,_){return Object.defineProperty(k,L,{value:_,enumerable:!0,configurable:!0,writable:!0}),k[L]}try{g({},"")}catch(k){g=function(_,P,Y){return _[P]=Y}}function p(k,L,_,P){var Y=L&&L.prototype instanceof w?L:w,T=Object.create(Y.prototype),F=new se(P||[]);return s(T,"_invoke",{value:ee(k,_,F)}),T}function h(k,L,_){try{return{type:"normal",arg:k.call(L,_)}}catch(P){return{type:"throw",arg:P}}}n.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",v={};function w(){}function O(){}function A(){}var x={};g(x,c,function(){return this});var U=Object.getPrototypeOf,V=U&&U(U(fe([])));V&&V!==i&&a.call(V,c)&&(x=V);var Z=A.prototype=w.prototype=Object.create(x);function W(k){["next","throw","return"].forEach(function(L){g(k,L,function(_){return this._invoke(L,_)})})}function B(k,L){function _(Y,T,F,Me){var Ie=h(k[Y],k,T);if(Ie.type!=="throw"){var le=Ie.arg,je=le.value;return je&&d2(je)=="object"&&a.call(je,"__await")?L.resolve(je.__await).then(function(_e){_("next",_e,F,Me)},function(_e){_("throw",_e,F,Me)}):L.resolve(je).then(function(_e){le.value=_e,F(le)},function(_e){return _("throw",_e,F,Me)})}Me(Ie.arg)}var P;s(this,"_invoke",{value:function(T,F){function Me(){return new L(function(Ie,le){_(T,F,Ie,le)})}return P=P?P.then(Me,Me):Me()}})}function ee(k,L,_){var P=y;return function(Y,T){if(P===E)throw Error("Generator is already running");if(P===m){if(Y==="throw")throw T;return{value:r,done:!0}}for(_.method=Y,_.arg=T;;){var F=_.delegate;if(F){var Me=ie(F,_);if(Me){if(Me===v)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(P===y)throw P=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);P=E;var Ie=h(k,L,_);if(Ie.type==="normal"){if(P=_.done?m:N,Ie.arg===v)continue;return{value:Ie.arg,done:_.done}}Ie.type==="throw"&&(P=m,_.method="throw",_.arg=Ie.arg)}}}function ie(k,L){var _=L.method,P=k.iterator[_];if(P===r)return L.delegate=null,_==="throw"&&k.iterator.return&&(L.method="return",L.arg=r,ie(k,L),L.method==="throw")||_!=="return"&&(L.method="throw",L.arg=new TypeError("The iterator does not provide a '"+_+"' method")),v;var Y=h(P,k.iterator,L.arg);if(Y.type==="throw")return L.method="throw",L.arg=Y.arg,L.delegate=null,v;var T=Y.arg;return T?T.done?(L[k.resultName]=T.value,L.next=k.nextLoc,L.method!=="return"&&(L.method="next",L.arg=r),L.delegate=null,v):T:(L.method="throw",L.arg=new TypeError("iterator result is not an object"),L.delegate=null,v)}function re(k){var L={tryLoc:k[0]};1 in k&&(L.catchLoc=k[1]),2 in k&&(L.finallyLoc=k[2],L.afterLoc=k[3]),this.tryEntries.push(L)}function ae(k){var L=k.completion||{};L.type="normal",delete L.arg,k.completion=L}function se(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(re,this),this.reset(!0)}function fe(k){if(k||k===""){var L=k[c];if(L)return L.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var _=-1,P=function Y(){for(;++_<k.length;)if(a.call(k,_))return Y.value=k[_],Y.done=!1,Y;return Y.value=r,Y.done=!0,Y};return P.next=P}}throw new TypeError(d2(k)+" is not iterable")}return O.prototype=A,s(Z,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:O,configurable:!0}),O.displayName=g(A,d,"GeneratorFunction"),n.isGeneratorFunction=function(k){var L=typeof k=="function"&&k.constructor;return!!L&&(L===O||(L.displayName||L.name)==="GeneratorFunction")},n.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,A):(k.__proto__=A,g(k,d,"GeneratorFunction")),k.prototype=Object.create(Z),k},n.awrap=function(k){return{__await:k}},W(B.prototype),g(B.prototype,M,function(){return this}),n.AsyncIterator=B,n.async=function(k,L,_,P,Y){Y===void 0&&(Y=Promise);var T=new B(p(k,L,_,P),Y);return n.isGeneratorFunction(L)?T:T.next().then(function(F){return F.done?F.value:T.next()})},W(Z),g(Z,d,"Generator"),g(Z,c,function(){return this}),g(Z,"toString",function(){return"[object Generator]"}),n.keys=function(k){var L=Object(k),_=[];for(var P in L)_.push(P);return _.reverse(),function Y(){for(;_.length;){var T=_.pop();if(T in L)return Y.value=T,Y.done=!1,Y}return Y.done=!0,Y}},n.values=fe,se.prototype={constructor:se,reset:function(L){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(ae),!L)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=r)},stop:function(){this.done=!0;var L=this.tryEntries[0].completion;if(L.type==="throw")throw L.arg;return this.rval},dispatchException:function(L){if(this.done)throw L;var _=this;function P(le,je){return F.type="throw",F.arg=L,_.next=le,je&&(_.method="next",_.arg=r),!!je}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var T=this.tryEntries[Y],F=T.completion;if(T.tryLoc==="root")return P("end");if(T.tryLoc<=this.prev){var Me=a.call(T,"catchLoc"),Ie=a.call(T,"finallyLoc");if(Me&&Ie){if(this.prev<T.catchLoc)return P(T.catchLoc,!0);if(this.prev<T.finallyLoc)return P(T.finallyLoc)}else if(Me){if(this.prev<T.catchLoc)return P(T.catchLoc,!0)}else{if(!Ie)throw Error("try statement without catch or finally");if(this.prev<T.finallyLoc)return P(T.finallyLoc)}}}},abrupt:function(L,_){for(var P=this.tryEntries.length-1;P>=0;--P){var Y=this.tryEntries[P];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var T=Y;break}}T&&(L==="break"||L==="continue")&&T.tryLoc<=_&&_<=T.finallyLoc&&(T=null);var F=T?T.completion:{};return F.type=L,F.arg=_,T?(this.method="next",this.next=T.finallyLoc,v):this.complete(F)},complete:function(L,_){if(L.type==="throw")throw L.arg;return L.type==="break"||L.type==="continue"?this.next=L.arg:L.type==="return"?(this.rval=this.arg=L.arg,this.method="return",this.next="end"):L.type==="normal"&&_&&(this.next=_),v},finish:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.finallyLoc===L)return this.complete(P.completion,P.afterLoc),ae(P),v}},catch:function(L){for(var _=this.tryEntries.length-1;_>=0;--_){var P=this.tryEntries[_];if(P.tryLoc===L){var Y=P.completion;if(Y.type==="throw"){var T=Y.arg;ae(P)}return T}}throw Error("illegal catch attempt")},delegateYield:function(L,_,P){return this.delegate={iterator:fe(L),resultName:_,nextLoc:P},this.method==="next"&&(this.arg=r),v}},n}function mR(r,n,i,a,s,l,c){try{var M=r[l](c),d=M.value}catch(g){return void i(g)}M.done?n(d):Promise.resolve(d).then(a,s)}function eM(r){return function(){var n=this,i=arguments;return new Promise(function(a,s){var l=r.apply(n,i);function c(d){mR(l,a,s,c,M,"next",d)}function M(d){mR(l,a,s,c,M,"throw",d)}c(void 0)})}}function Ple(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function Ule(r,n){for(var i=0;i<n.length;i++){var a=n[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,Vle(a.key),a)}}function Hle(r,n,i){return n&&Ule(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function Vle(r){var n=Yle(r,"string");return d2(n)=="symbol"?n:n+""}function Yle(r,n){if(d2(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var a=i.call(r,n);if(d2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var Qle=function(){function r(){Ple(this,r)}return Hle(r,[{key:"initialize",value:function(){var n=eM(us().mark(function a(s){var l;return us().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l=Wi.getState().initialize(s),M.abrupt("return",l);case 2:case"end":return M.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"configure",value:function(){var n=eM(us().mark(function a(s){var l,c;return us().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof s=="string"){d.next=5;break}return d.next=3,Wi.getState().configure(s);case 3:return l=d.sent,d.abrupt("return",l);case 5:return d.next=7,Wi.getState().configureWithUrl(s);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var n=eM(us().mark(function a(s){var l;return us().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,Wi.getState().getWorkflows(s);case 2:return l=M.sent,M.abrupt("return",l);case 4:case"end":return M.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var n=eM(us().mark(function a(s){var l,c;return us().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=s.workfowId,d.next=3,Wi.getState().preparareWorkflowAndPrepareUi(l);case 3:return c=d.sent,d.abrupt("return",c);case 5:case"end":return d.stop()}},a)}));function i(a){return n.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var n=eM(us().mark(function a(){var s;return us().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Wi.getState().startNewSession();case 2:if(s=c.sent,!s.error){c.next=5;break}return c.abrupt("return",s);case 5:return c.abrupt("return",new Promise(function(M){var d=function(p){M(p)};Wi.getState().playWorkflow(d)}));case 6:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var n=eM(us().mark(function a(){var s;return us().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Wi.getState().deinitialize();case 2:return s=c.sent,c.abrupt("return",s);case 4:case"end":return c.stop()}},a)}));function i(){return n.apply(this,arguments)}return i}()},{key:"setNonce",value:function(i){Wi.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}Wi.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){Wi.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return Wi.getState().getCurrentSessionId()}}])}(),Fle=window.customElements.get("idv-flow");Fle||window.customElements.define("idv-flow",DR);var Ble=Object.defineProperty,Zle=Object.defineProperties,Gle=Object.getOwnPropertyDescriptors,jR=Object.getOwnPropertySymbols,$le=Object.prototype.hasOwnProperty,Wle=Object.prototype.propertyIsEnumerable,vR=(r,n,i)=>n in r?Ble(r,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[n]=i,CE=(r,n)=>{for(var i in n||(n={}))$le.call(n,i)&&vR(r,i,n[i]);if(jR)for(var i of jR(n))Wle.call(n,i)&&vR(r,i,n[i]);return r},Kle=(r,n)=>Zle(r,Gle(n)),Qa=(r,n,i)=>new Promise((a,s)=>{var l=d=>{try{M(i.next(d))}catch(g){s(g)}},c=d=>{try{M(i.throw(d))}catch(g){s(g)}},M=d=>d.done?a(d.value):Promise.resolve(d.value).then(l,c);M((i=i.apply(r,n)).next())}),TR=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function CR(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var AR={exports:{}},qd={},SR={exports:{}},Zr={},_R;function qle(){if(_R)return Zr;_R=1;/**
|
|
52
52
|
* @license React
|
|
53
53
|
* react.production.min.js
|
|
54
54
|
*
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, D as e, b as s, I as i, h as n, f as t, c as v, a as E, d as I, P as d, S, e as c, g as l, W as f } from "./index-
|
|
1
|
+
import { C as a, D as e, b as s, I as i, h as n, f as t, c as v, a as E, d as I, P as d, S, e as c, g as l, W as f } from "./index-CPxAxpV3.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": "0.1.
|
|
3
|
+
"version": "0.1.98-nightly",
|
|
4
4
|
"description": "Regula framework agnostic web components to work with webcamera",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "vitest run"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@regulaforensics/idv-gui": "^0.1.
|
|
24
|
+
"@regulaforensics/idv-gui": "^0.1.98-nightly",
|
|
25
25
|
"zustand": "^5.0.0-rc.2"
|
|
26
26
|
}
|
|
27
27
|
}
|