@regulaforensics/idv-capture-web 0.1.99-nightly → 0.1.100-nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,7 +22,7 @@ var 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-ddoxD3zI.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-ddoxD3zI.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]);
|
|
@@ -18048,7 +18048,7 @@ var In = d5.create("wasm_idv"), lA = /* @__PURE__ */ function() {
|
|
|
18048
18048
|
return yr().wrap(function(d) {
|
|
18049
18049
|
for (; ; ) switch (d.prev = d.next) {
|
|
18050
18050
|
case 0:
|
|
18051
|
-
return d.prev = 1, d.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/
|
|
18051
|
+
return d.prev = 1, d.next = 4, fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/20752c9-7cff4ddf6//PlatformAdaptor.worker.js");
|
|
18052
18052
|
case 4:
|
|
18053
18053
|
return u = d.sent, d.next = 7, u.blob();
|
|
18054
18054
|
case 7:
|
|
@@ -18075,7 +18075,7 @@ var In = d5.create("wasm_idv"), lA = /* @__PURE__ */ function() {
|
|
|
18075
18075
|
}), d.next = 23, this.sendMessage({
|
|
18076
18076
|
target: "worker-init",
|
|
18077
18077
|
URL: document.URL,
|
|
18078
|
-
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/0.1/
|
|
18078
|
+
currentScriptUrl: "https://wasm-development.regulaforensics.com/idv/nightly/0.1/20752c9-7cff4ddf6/",
|
|
18079
18079
|
preMain: !0
|
|
18080
18080
|
});
|
|
18081
18081
|
case 23:
|
|
@@ -18108,7 +18108,8 @@ var In = d5.create("wasm_idv"), lA = /* @__PURE__ */ function() {
|
|
|
18108
18108
|
deviceType: J4.deviceType,
|
|
18109
18109
|
serial: "1111111222211",
|
|
18110
18110
|
macAddress: "00:00:00:00:00:00",
|
|
18111
|
-
heartbeatCadence: 2
|
|
18111
|
+
heartbeatCadence: 2,
|
|
18112
|
+
workflowId: "111"
|
|
18112
18113
|
},
|
|
18113
18114
|
host: u.host,
|
|
18114
18115
|
httpRetryCount: u.httpRetryCount || 0,
|
|
@@ -19396,9 +19397,9 @@ function s2() {
|
|
|
19396
19397
|
supportedTemplates: Wn.getSupportedTemplates(),
|
|
19397
19398
|
component: Wn
|
|
19398
19399
|
}], o = u2(u2({}, "LIVENESS", function() {
|
|
19399
|
-
return import("./index-
|
|
19400
|
+
return import("./index-DZTAcT3k.js");
|
|
19400
19401
|
}), "DOC_READER", function() {
|
|
19401
|
-
return import("./index-
|
|
19402
|
+
return import("./index-BW81LH9H.js");
|
|
19402
19403
|
}), u = /* @__PURE__ */ br().mark(function h() {
|
|
19403
19404
|
var w, g, S;
|
|
19404
19405
|
return br().wrap(function(O) {
|
package/dist/main.iife.js
CHANGED
|
@@ -59,7 +59,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
59
59
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P3e(t,r){if(t){if(typeof t=="string")return j$(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?j$(t,r):void 0}}function j$(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function U3e(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],d=!0,g=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(d=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(p){g=!0,u=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(g)throw u}}return f}}function H3e(t){if(Array.isArray(t))return t}var CM=function(t){var r=t.imageId,i=t.imageURL,a=t.base64,u=t.contentMode,l=u===void 0?y0.ASPECT_FILL:u,c=t.cornerRadius,f=t.backgroundColor,d=f===void 0?"transparent":f,g=function(L){if(L===y0.ASPECT_FILL)return"cover";if(L===y0.ASPECT_FIT)return"contain";if(L===y0.FILL)return"fill"},p=Kn.useState(!0),h=k3e(p,2),y=h[0],N=h[1],E=y&&i,m=function(){N(!1)};if(r){var j=r in ov?r:"default";return ce.jsx(z3e,{type:j})}if(a||i)return ce.jsxs(ce.Fragment,{children:[E&&ce.jsx("div",{style:{width:"100%",height:"100%",backgroundColor:"#e0e0e0",borderRadius:c}}),ce.jsx("img",{style:{width:"100%",height:"100%",objectFit:g(l),borderRadius:c,backgroundColor:d,display:E?"none":"block"},src:a||i,onLoad:m})]})},V3e=function(t){var r=t.signature;return ce.jsx("footer",{style:{display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:ce.jsx("a",{href:"",children:ce.jsx(CM,{imageId:r==null?void 0:r.imageId})})})},T$={},C$;function Y3e(){if(C$)return T$;C$=1;var t=En(),r=zn(),i=Q1(),a=$m(),u=r(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});return t({target:"Date",proto:!0,arity:1,forced:u},{toJSON:function(l){var c=i(this),f=a(c,"number");return typeof f=="number"&&!isFinite(f)?null:c.toISOString()}}),T$}Y3e(),RY();var A$=Kn.createContext(void 0),Q3e=function(t){var r=t.perform,i=t.children;return ce.jsx(A$.Provider,{value:{perform:r},children:i})},S$=function(){var t=Kn.useContext(A$);if(!t)throw new Error("usePerform must be used within a PerformProvider");return t},O$={},uv,_$;function F3e(){if(_$)return uv;_$=1;var t=Ai(),r=zn(),i=qn(),a=W5(),u=Q5(),l=qs(),c=dm().f,f=i(c),d=i([].push),g=t&&r(function(){var h=Object.create(null);return h[2]=2,!f(h,2)}),p=function(h){return function(y){for(var N=l(y),E=u(N),m=g&&a(N)===null,j=E.length,L=0,C=[],T;j>L;)T=E[L++],(!t||(m?T in N:f(N,T)))&&d(C,h?[T,N[T]]:N[T]);return C}};return uv={entries:p(!0),values:p(!1)},uv}var x$;function $3e(){if(x$)return O$;x$=1;var t=En(),r=F3e().entries;return t({target:"Object",stat:!0},{entries:function(i){return r(i)}}),O$}$3e();function J5(t){"@babel/helpers - typeof";return J5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},J5(t)}function L$(t){return t.split("\\n")}function w$(t){return t===p0.CENTER?"center":t===p0.RIGHT?"right":"left"}function sv(t){if(J5(t)==="object"&&t!==null)for(var r in t)J5(t[r])==="object"?sv(t[r]):t[r]==="true"?t[r]=!0:t[r]==="false"&&(t[r]=!1);return t}var B3e={display:"flex",justifyContent:"center",alignItems:"center",background:"white",borderRadius:"50%",width:"36px",height:"36px",border:"none",cursor:"pointer"},Z3e=function(t){var r=t.dataTestId,i=t.responseBody,a=S$(),u=a.perform,l=function(){var c=JSON.parse(JSON.stringify(i));sv(c),u(c)};return ce.jsx("button",{"data-test":r,onClick:l,style:B3e,children:ce.jsx(CM,{imageId:"cross"})},r)},G3e=function(t){var r=t.closeButton;return ce.jsx("header",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"flex-end",alignItems:"center",paddingRight:"16px"},children:ce.jsx("div",{children:r&&ce.jsx(Z3e,Uo({dataTestId:"close-btn"},r))})})},b$={},z$;function W3e(){if(z$)return b$;z$=1;var t=En(),r=NY(),i=HV().indexOf,a=AF(),u=r([].indexOf),l=!!u&&1/u([1],1,-0)<0,c=l||!a("indexOf");return t({target:"Array",proto:!0,forced:c},{indexOf:function(f){var d=arguments.length>1?arguments[1]:void 0;return l?u(this,f,d)||0:i(this,f,d)}}),b$}W3e();var k$={},R$;function K3e(){if(R$)return k$;R$=1;var t=En(),r=Z5().map,i=RD(),a=i("map");return t({target:"Array",proto:!0,forced:!a},{map:function(u){return r(this,u,arguments.length>1?arguments[1]:void 0)}}),k$}K3e();var q3e={},P$={},lv,U$;function J3e(){if(U$)return lv;U$=1;var t=Ja(),r=x2(),i=$a(),a=XD(),u=a$(),l=hD(),c=u(function(){var f=this.iterator,d=i(t(this.next,f)),g=this.done=!!d.done;if(!g)return l(f,this.mapper,[d.value,this.counter++],!0)});return lv=function(f){return i(this),r(f),new c(a(this),{mapper:f})},lv}var H$;function X3e(){if(H$)return P$;H$=1;var t=En(),r=J3e(),i=Xc();return t({target:"Iterator",proto:!0,real:!0,forced:i},{map:r}),P$}var V$;function ege(){return V$||(V$=1,X3e()),q3e}ege();var N0=function(t){var r=t.text,i=t.fontName,a=i===void 0?"":i,u=t.fontSize,l=u===void 0?"17px":u,c=t.fontColor,f=c===void 0?"black":c,d=t.alignment,g=d===void 0?p0.LEFT:d,p=t.backgroundColor,h=p===void 0?"transparent":p,y=t.cornerRadius,N=y===void 0?0:y;return ce.jsx("div",{className:"title",style:{fontFamily:a+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:l,color:f,textAlign:w$(g),backgroundColor:h,borderRadius:N},children:r&&L$(r)})};function E0(t){"@babel/helpers - typeof";return E0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},E0(t)}function cv(t,r,i){return(r=tge(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function tge(t){var r=rge(t,"string");return E0(r)=="symbol"?r:r+""}function rge(t,r){if(E0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(E0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var nge=function(t){var r=t.title,i=t.image,a=t.responseBody,u=t.backgroundColor,l=t.cornerRadius,c=t.highlightColor,f=t.dataTestId,d=t.children,g=S$(),p=g.perform,h=function(){var N=JSON.parse(JSON.stringify(a));sv(N),p(N)},y=cv(cv(cv({height:"50px",width:"100%",padding:"10px 16px",textAlign:"center",fontSize:"16px",fontWeight:"400",border:"none",cursor:"pointer",borderRadius:l||0},"--hover-btn-background",c||"red"),"backgroundColor",u||"transparent"),"transition",".3s");return ce.jsxs("button",{"data-test":f,onClick:h,style:y,children:[i&&ce.jsx(CM,{imageURL:i.imageURL}),d||ce.jsx(N0,Uo({},r))]},f)};function m0(t){"@babel/helpers - typeof";return m0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},m0(t)}var ige=["items"];function Y$(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function Q$(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?Y$(Object(i),!0).forEach(function(a){age(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Y$(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function age(t,r,i){return(r=oge(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function oge(t){var r=uge(t,"string");return m0(r)=="symbol"?r:r+""}function uge(t,r){if(m0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(m0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function sge(t,r){if(t==null)return{};var i,a,u=lge(t,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a<l.length;a++)i=l[a],r.indexOf(i)===-1&&{}.propertyIsEnumerable.call(t,i)&&(u[i]=t[i])}return u}function lge(t,r){if(t==null)return{};var i={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(r.indexOf(a)!==-1)continue;i[a]=t[a]}return i}var cge=function(t){var r=t.items,i=sge(t,ige),a={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 ce.jsx("div",{className:"buttons",style:Q$(Q$({},a),i),children:r.map(function(u){var l,c;return ce.jsx(nge,Uo({dataTestId:"button-"+((l=u.title)===null||l===void 0?void 0:l.text)},u),(c=u.title)===null||c===void 0?void 0:c.text)})})};function D0(t){"@babel/helpers - typeof";return D0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},D0(t)}function F$(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function fge(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?F$(Object(i),!0).forEach(function(a){Mge(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):F$(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Mge(t,r,i){return(r=dge(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function dge(t){var r=gge(t,"string");return D0(r)=="symbol"?r:r+""}function gge(t,r){if(D0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(D0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var X5=function(t){var r=t.children,i=t.header,a=t.footer,u=t.backgroundColor,l=u===void 0?"white":u,c=t.buttons,f=i?60:10,d=a?30:10,g={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"center",alignContent:"center",justifyContent:"center",margin:"0 auto",paddingTop:i?f+10+"px":"10px",paddingBottom:a?d+10+"px":"10px",paddingLeft:"20px",paddingRight:"20px",height:"100%",width:"100%",backgroundColor:l};return ce.jsxs("div",{id:"base-container",style:fge({},g),children:[i&&ce.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:f},children:ce.jsx(G3e,{closeButton:i.closeButton})}),ce.jsx("div",{style:{height:"100%",flex:"1 1 100%",overflow:"hidden"},children:r}),(c==null?void 0:c.length)&&ce.jsx(cge,{items:c}),a&&ce.jsx("div",{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:d},children:ce.jsx(V3e,Uo({},a))})]})},fv=function(t){var r=t.text,i=t.fontName,a=i===void 0?"":i,u=t.fontColor,l=u===void 0?"#000000":u,c=t.alignment,f=c===void 0?p0.LEFT:c,d=t.fontSize,g=d===void 0?17:d,p=t.backgroundColor,h=p===void 0?"transparent":p,y=t.cornerRadius,N=y===void 0?0:y;return ce.jsx("div",{style:{fontFamily:a+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:g,textAlign:w$(f),color:l,borderRadius:N,backgroundColor:h,whiteSpace:"pre-line"},children:r&&L$(r).map(function(E,m){return E.length===0?ce.jsx("br",{},"description-text_"+m):ce.jsx("p",{children:E},"description-text_"+m)})})};function v0(t){"@babel/helpers - typeof";return v0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},v0(t)}function $$(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function B$(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?$$(Object(i),!0).forEach(function(a){Ige(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$$(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Ige(t,r,i){return(r=pge(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function pge(t){var r=yge(t,"string");return v0(r)=="symbol"?r:r+""}function yge(t,r){if(v0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(v0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var hge=function(t){var r=t.title,i=t.description,a=t.image,u=t.backgroundColor,l=u===void 0?"transparent":u,c=t.cornerRadius,f=c===void 0?0:c,d=t.isLastChild,g={display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:d?"none":"1px solid #E0E0E0",padding:"16px 0",gap:16};return ce.jsxs("div",{className:"details-item",style:B$(B$({},g),{},{backgroundColor:l,borderRadius:f}),children:[ce.jsxs("div",{style:{flex:"0 1 auto"},children:[ce.jsx("div",{style:{marginBottom:5,fontWeight:"bold",lineHeight:"21px"},children:ce.jsx(N0,Uo({},r))}),ce.jsx("div",{style:{lineHeight:"21px",fontWeight:"400"},children:ce.jsx(fv,Uo({},i))})]}),ce.jsx("div",{style:{aspectRatio:"1 / 1",width:120,height:120,flex:"0 0 120px"},children:ce.jsx(CM,Uo({},a))})]})};function j0(t){"@babel/helpers - typeof";return j0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},j0(t)}function Z$(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function G$(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?Z$(Object(i),!0).forEach(function(a){Nge(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Z$(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Nge(t,r,i){return(r=Ege(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Ege(t){var r=mge(t,"string");return j0(r)=="symbol"?r:r+""}function mge(t,r){if(j0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(j0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var Dge={display:"flex",flexDirection:"column",padding:"0 16px"},vge=function(t){var r=t.items,i=t.backgroundColor,a=i===void 0?"white":i,u=t.cornerRadius,l=u===void 0?16:u;return ce.jsx("div",{className:"details",style:G$(G$({},Dge),{},{backgroundColor:a,borderRadius:l}),children:r.map(function(c,f){return ce.jsx(hge,Uo({isLastChild:f===r.length-1},c),f)})})},jge=function(t){var r=t.title,i=t.indicatorColor,a=i===void 0?"black":i;return ce.jsxs(ce.Fragment,{children:[ce.jsx(v$,{indicatorColor:a}),ce.jsx("div",{children:r==null?void 0:r.text})]})};function Tge(t,r){return Oge(t)||Sge(t,r)||Age(t,r)||Cge()}function Cge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
60
60
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Age(t,r){if(t){if(typeof t=="string")return W$(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?W$(t,r):void 0}}function W$(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function Sge(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],d=!0,g=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(d=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(p){g=!0,u=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(g)throw u}}return f}}function Oge(t){if(Array.isArray(t))return t}var _ge=function(t){var r=t.title,i=t.header,a=t.footer,u=t.details,l=t.buttons,c=t.backgroundColor,f=Kn.useRef(null),d=Kn.useState(!1),g=Tge(d,2),p=g[0],h=g[1];return Kn.useEffect(function(){f.current&&h(f.current.scrollHeight>f.current.clientHeight)},[]),ce.jsx(X5,{header:i,buttons:l,footer:a,backgroundColor:c,children:ce.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:p?"flex-start":"center",height:"100%",minHeight:"100%",overflow:"auto"},ref:f,children:[ce.jsx("div",{style:{marginBottom:r?"16px":"0",fontWeight:400,fontSize:"28px"},children:r&&ce.jsx(N0,Uo({},r))}),u&&ce.jsx(vge,Uo({},u))]})})},xge={width:"100%",height:"auto",marginBottom:"32px",aspectRatio:1.61},Lge={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",alignContent:"center",margin:"0 auto",height:"100%",width:"100%",minHeight:"100%",overflow:"auto"};function T0(t){"@babel/helpers - typeof";return T0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},T0(t)}function K$(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function q$(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?K$(Object(i),!0).forEach(function(a){wge(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):K$(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function wge(t,r,i){return(r=bge(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function bge(t){var r=zge(t,"string");return T0(r)=="symbol"?r:r+""}function zge(t,r){if(T0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(T0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var kge=function(t){var r=t.title,i=t.header,a=t.footer,u=t.image,l=t.description,c=t.buttons,f=t.backgroundColor;return ce.jsx(X5,{header:i,footer:a,buttons:c,backgroundColor:f,children:ce.jsx(ce.Fragment,{children:ce.jsxs("div",{style:q$(q$({},Lge),{},{justifyContent:u?"flex-start":"center"}),children:[u&&ce.jsx("div",{style:xge,children:ce.jsx(CM,Uo({},u))}),r&&ce.jsx("div",{style:{marginBottom:20,lineHeight:"39.2px"},children:ce.jsx(N0,Uo({},r))}),l&&ce.jsx("div",{style:{lineHeight:"28px",fontWeight:"400"},children:ce.jsx(fv,Uo({},l))})]})})})},J$=function(t){var r=t.progressView,i=t.footer,a=t.backgroundColor;return ce.jsx(X5,{footer:i,backgroundColor:a,children:ce.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flexDirection:"column",gap:"20px",height:"100%",width:"100%"},children:ce.jsx(jge,{title:(r==null?void 0:r.title)||{text:""},indicatorColor:(r==null?void 0:r.indicatorColor)||"black"})})})},Rge={display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flex:1,height:"100%",flexDirection:"column"},Pge={width:"86px",height:"86px",marginBottom:"16px",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center"},Uge={fontSize:"20px",fontWeight:700,maxWidth:"345px",textAlign:"center",lineHeight:"24px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",marginBottom:"8px"},Hge={fontSize:"16px",fontWeight:400,lineHeight:"19px",color:"#676767",textAlign:"center"},Vge=function(t){var r=t.header,i=t.footer,a=t.image,u=t.title,l=t.description,c=t.buttons,f=t.backgroundColor;return ce.jsx(X5,{header:r,buttons:c,footer:i,backgroundColor:f,children:ce.jsxs("div",{style:Rge,children:[a&&ce.jsx("div",{style:Pge,children:ce.jsx(CM,Uo({},a))}),(u==null?void 0:u.text)&&ce.jsx("div",{style:Uge,children:u&&ce.jsx(N0,Uo({},u))}),(l==null?void 0:l.text)&&ce.jsx("div",{style:Hge,children:ce.jsx(fv,Uo({},l))})]})})},Mv=!1,Yge=function(t){var r=t.template,i=t.templateLayout;if(r==="STATUS")return ce.jsx(Vge,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,image:i==null?void 0:i.image,title:i==null?void 0:i.title,buttons:i==null?void 0:i.buttons,description:i==null?void 0:i.description,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="INFO")return ce.jsx(kge,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,image:i==null?void 0:i.image,title:i==null?void 0:i.title,description:i==null?void 0:i.description,buttons:i==null?void 0:i.buttons,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="PROGRESS")return ce.jsx(J$,{header:i==null?void 0:i.header,footer:i==null?void 0:i.footer,progressView:i==null?void 0:i.progressView,backgroundColor:i==null?void 0:i.backgroundColor});if(r==="INFO_DETAILS")return ce.jsx(_ge,{header:i==null?void 0:i.header,title:i==null?void 0:i.title,details:i==null?void 0:i.details,buttons:i==null?void 0:i.buttons,footer:i==null?void 0:i.footer,backgroundColor:i==null?void 0:i.backgroundColor})},X$="GUI",e1=function(t){var r=t.moduleProps,i=t.perform,a=r.templateId,u=r.templateLayout,l=Kn.useCallback(function(c){i&&i(c)},[a]);return a&&u?ce.jsx(Q3e,{perform:l,children:ce.jsx(Yge,{template:a,templateLayout:u})}):ce.jsx(J$,{})};e1.getIdentifier=function(){return X$},e1.getSupportedTemplates=function(){return["INFO","INFO_DETAILS","PROGRESS","STATUS"]},e1.deinitialize=function(){Mv=!1},e1.initialize=function(){Mv=!0},e1.isReady=function(){return Mv},e1.displayName=X$;var eB={},tB;function Qge(){if(tB)return eB;tB=1;var t=Zt(),r=zr(),i=Date,a=r(i.prototype.getTime);return t({target:"Date",stat:!0},{now:function(){return a(new i)}}),eB}Qge();var rB={},nB={},dv,iB;function aB(){if(iB)return dv;iB=1;var t=Rr(),r=Gn(),i=Nn(),a=$o(),u=r("iterator");return dv=!t(function(){var l=new URL("b?a=1&b=2&c=3","https://a"),c=l.searchParams,f=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}),f.delete("a",2),f.delete("b",void 0),a&&(!l.toJSON||!f.has("a",1)||f.has("a",2)||!f.has("a",void 0)||f.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[u]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||d!=="a1c3"||new URL("https://x",void 0).host!=="x"}),dv}var gv,oB;function Fge(){if(oB)return gv;oB=1;var t=Nn(),r=zr(),i=Ni(),a=Rr(),u=N5(),l=y5(),c=Wp(),f=ps(),d=Ad(),g=Object.assign,p=Object.defineProperty,h=r([].concat);return gv=!g||a(function(){if(t&&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(j){N[j]=j}),g({},y)[E]!==7||u(g({},N)).join("")!==m})?function(N,E){for(var m=f(N),j=arguments.length,L=1,C=l.f,T=c.f;j>L;)for(var S=d(arguments[L++]),R=C?h(u(S),C(S)):u(S),P=R.length,B=0,Z;P>B;)Z=R[B++],(!t||i(T,S,Z))&&(m[Z]=S[Z]);return m}:g,gv}var Iv,uB;function $ge(){if(uB)return Iv;uB=1;var t=zr(),r=2147483647,i=36,a=1,u=26,l=38,c=700,f=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=t(h.exec),j=Math.floor,L=String.fromCharCode,C=t("".charCodeAt),T=t([].join),S=t([].push),R=t("".replace),P=t("".split),B=t("".toLowerCase),Z=function(J){for(var ne=[],oe=0,le=J.length;oe<le;){var z=C(J,oe++);if(z>=55296&&z<=56319&&oe<le){var w=C(J,oe++);(w&64512)===56320?S(ne,((z&1023)<<10)+(w&1023)+65536):(S(ne,z),oe--)}else S(ne,z)}return ne},F=function(J){return J+22+75*(J<26)},q=function(J,ne,oe){var le=0;for(J=oe?j(J/c):J>>1,J+=j(J/ne);J>N*u>>1;)J=j(J/N),le+=i;return j(le+(N+1)*J/(J+l))},re=function(J){var ne=[];J=Z(J);var oe=J.length,le=d,z=0,w=f,_,U;for(_=0;_<J.length;_++)U=J[_],U<128&&S(ne,L(U));var Y=ne.length,A=Y;for(Y&&S(ne,g);A<oe;){var Q=r;for(_=0;_<J.length;_++)U=J[_],U>=le&&U<Q&&(Q=U);var Me=A+1;if(Q-le>j((r-z)/Me))throw new E(y);for(z+=(Q-le)*Me,le=Q,_=0;_<J.length;_++){if(U=J[_],U<le&&++z>r)throw new E(y);if(U===le){for(var de=z,se=i;;){var De=se<=w?a:se>=w+u?u:se-w;if(de<De)break;var Oe=de-De,Se=i-De;S(ne,L(F(De+Oe%Se))),de=j(Oe/Se),se+=i}S(ne,L(F(de))),w=q(z,Me,A===Y),z=0,A++}}z++,le++}return T(ne,"")};return Iv=function(J){var ne=[],oe=P(R(B(J),h,"."),"."),le,z;for(le=0;le<oe.length;le++)z=oe[le],S(ne,m(p,z)?"xn--"+re(z):z);return T(ne,".")},Iv}var sB={},lB;function Bge(){if(lB)return sB;lB=1;var t=Zt(),r=zr(),i=Wy(),a=RangeError,u=String.fromCharCode,l=String.fromCodePoint,c=r([].join),f=!!l&&l.length!==1;return t({target:"String",stat:!0,arity:1,forced:f},{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?u(N):u(((N-=65536)>>10)+55296,N%1024+56320)}return c(p,"")}}),sB}var pv,cB;function Zge(){if(cB)return pv;cB=1;var t=z1(),r=Math.floor,i=function(a,u){var l=a.length;if(l<8)for(var c=1,f,d;c<l;){for(d=c,f=a[c];d&&u(a[d-1],f)>0;)a[d]=a[--d];d!==c++&&(a[d]=f)}else for(var g=r(l/2),p=i(t(a,0,g),u),h=i(t(a,g),u),y=p.length,N=h.length,E=0,m=0;E<y||m<N;)a[E+m]=E<y&&m<N?u(p[E],h[m])<=0?p[E++]:h[m++]:E<y?p[E++]:h[m++];return a};return pv=i,pv}var yv,fB;function MB(){if(fB)return yv;fB=1,fN(),Bge();var t=Zt(),r=rn(),i=ZP(),a=Fo(),u=Ni(),l=zr(),c=Nn(),f=aB(),d=Fa(),g=$c(),p=bN(),h=Ks(),y=nz(),N=Qc(),E=dM(),m=Zn(),j=Di(),L=k1(),C=bd(),T=Ei(),S=Ci(),R=Po(),P=Fc(),B=m2(),Z=CN(),F=C5(),q=Vd(),re=IM(),J=Gn(),ne=Zge(),oe=J("iterator"),le="URLSearchParams",z=le+"Iterator",w=N.set,_=N.getterFor(le),U=N.getterFor(z),Y=i("fetch"),A=i("Request"),Q=i("Headers"),Me=A&&A.prototype,de=Q&&Q.prototype,se=r.TypeError,De=r.encodeURIComponent,Oe=String.fromCharCode,Se=a("String","fromCodePoint"),Qe=parseInt,Je=l("".charAt),dt=l([].join),st=l([].push),gt=l("".replace),Ot=l([].shift),Ct=l([].splice),At=l("".split),it=l("".slice),Mt=l(/./.exec),lt=/\+/g,yt="�",je=/^[0-9a-f]+$/i,$e=function(Ne,be){var Re=it(Ne,be,be+2);return Mt(je,Re)?Qe(Re,16):NaN},Ge=function(Ne){for(var be=0,Re=128;Re>0&&(Ne&Re)!==0;Re>>=1)be++;return be},ft=function(Ne){var be=null;switch(Ne.length){case 1:be=Ne[0];break;case 2:be=(Ne[0]&31)<<6|Ne[1]&63;break;case 3:be=(Ne[0]&15)<<12|(Ne[1]&63)<<6|Ne[2]&63;break;case 4:be=(Ne[0]&7)<<18|(Ne[1]&63)<<12|(Ne[2]&63)<<6|Ne[3]&63;break}return be>1114111?null:be},He=function(Ne){Ne=gt(Ne,lt," ");for(var be=Ne.length,Re="",we=0;we<be;){var tt=Je(Ne,we);if(tt==="%"){if(Je(Ne,we+1)==="%"||we+3>be){Re+="%",we++;continue}var Nt=$e(Ne,we+1);if(Nt!==Nt){Re+=tt,we++;continue}we+=2;var Dt=Ge(Nt);if(Dt===0)tt=Oe(Nt);else{if(Dt===1||Dt>4){Re+=yt,we++;continue}for(var jt=[Nt],Rt=1;Rt<Dt&&(we++,!(we+3>be||Je(Ne,we)!=="%"));){var Jt=$e(Ne,we+1);if(Jt!==Jt){we+=3;break}if(Jt>191||Jt<128)break;st(jt,Jt),we+=2,Rt++}if(jt.length!==Dt){Re+=yt;continue}var lr=ft(jt);lr===null?Re+=yt:tt=Se(lr)}}Re+=tt,we++}return Re},Ae=/[!'()~]|%20/g,Le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ze=function(Ne){return Le[Ne]},It=function(Ne){return gt(De(Ne),Ae,Ze)},ot=y(function(be,Re){w(this,{type:z,target:_(be).entries,index:0,kind:Re})},le,function(){var be=U(this),Re=be.target,we=be.index++;if(!Re||we>=Re.length)return be.target=null,q(void 0,!0);var tt=Re[we];switch(be.kind){case"keys":return q(tt.key,!1);case"values":return q(tt.value,!1)}return q([tt.key,tt.value],!1)},!0),ke=function(Ne){this.entries=[],this.url=null,Ne!==void 0&&(S(Ne)?this.parseObject(Ne):this.parseQuery(typeof Ne=="string"?Je(Ne,0)==="?"?it(Ne,1):Ne:R(Ne)))};ke.prototype={type:le,bindURL:function(Ne){this.url=Ne,this.update()},parseObject:function(Ne){var be=this.entries,Re=F(Ne),we,tt,Nt,Dt,jt,Rt,Jt;if(Re)for(we=Z(Ne,Re),tt=we.next;!(Nt=u(tt,we)).done;){if(Dt=Z(T(Nt.value)),jt=Dt.next,(Rt=u(jt,Dt)).done||(Jt=u(jt,Dt)).done||!u(jt,Dt).done)throw new se("Expected sequence with length 2");st(be,{key:R(Rt.value),value:R(Jt.value)})}else for(var lr in Ne)j(Ne,lr)&&st(be,{key:lr,value:R(Ne[lr])})},parseQuery:function(Ne){if(Ne)for(var be=this.entries,Re=At(Ne,"&"),we=0,tt,Nt;we<Re.length;)tt=Re[we++],tt.length&&(Nt=At(tt,"="),st(be,{key:He(Ot(Nt)),value:He(dt(Nt,"="))}))},serialize:function(){for(var Ne=this.entries,be=[],Re=0,we;Re<Ne.length;)we=Ne[Re++],st(be,It(we.key)+"="+It(we.value));return dt(be,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Te=function(){E(this,xe);var be=arguments.length>0?arguments[0]:void 0,Re=w(this,new ke(be));c||(this.size=Re.entries.length)},xe=Te.prototype;if(p(xe,{append:function(be,Re){var we=_(this);re(arguments.length,2),st(we.entries,{key:R(be),value:R(Re)}),c||this.length++,we.updateURL()},delete:function(Ne){for(var be=_(this),Re=re(arguments.length,1),we=be.entries,tt=R(Ne),Nt=Re<2?void 0:arguments[1],Dt=Nt===void 0?Nt:R(Nt),jt=0;jt<we.length;){var Rt=we[jt];if(Rt.key===tt&&(Dt===void 0||Rt.value===Dt)){if(Ct(we,jt,1),Dt!==void 0)break}else jt++}c||(this.size=we.length),be.updateURL()},get:function(be){var Re=_(this).entries;re(arguments.length,1);for(var we=R(be),tt=0;tt<Re.length;tt++)if(Re[tt].key===we)return Re[tt].value;return null},getAll:function(be){var Re=_(this).entries;re(arguments.length,1);for(var we=R(be),tt=[],Nt=0;Nt<Re.length;Nt++)Re[Nt].key===we&&st(tt,Re[Nt].value);return tt},has:function(be){for(var Re=_(this).entries,we=re(arguments.length,1),tt=R(be),Nt=we<2?void 0:arguments[1],Dt=Nt===void 0?Nt:R(Nt),jt=0;jt<Re.length;){var Rt=Re[jt++];if(Rt.key===tt&&(Dt===void 0||Rt.value===Dt))return!0}return!1},set:function(be,Re){var we=_(this);re(arguments.length,1);for(var tt=we.entries,Nt=!1,Dt=R(be),jt=R(Re),Rt=0,Jt;Rt<tt.length;Rt++)Jt=tt[Rt],Jt.key===Dt&&(Nt?Ct(tt,Rt--,1):(Nt=!0,Jt.value=jt));Nt||st(tt,{key:Dt,value:jt}),c||(this.size=tt.length),we.updateURL()},sort:function(){var be=_(this);ne(be.entries,function(Re,we){return Re.key>we.key?1:-1}),be.updateURL()},forEach:function(be){for(var Re=_(this).entries,we=L(be,arguments.length>1?arguments[1]:void 0),tt=0,Nt;tt<Re.length;)Nt=Re[tt++],we(Nt.value,Nt.key,this)},keys:function(){return new ot(this,"keys")},values:function(){return new ot(this,"values")},entries:function(){return new ot(this,"entries")}},{enumerable:!0}),d(xe,oe,xe.entries,{name:"entries"}),d(xe,"toString",function(){return _(this).serialize()},{enumerable:!0}),c&&g(xe,"size",{get:function(){return _(this).entries.length},configurable:!0,enumerable:!0}),h(Te,le),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:Te}),!f&&m(Q)){var Be=l(de.has),pt=l(de.set),St=function(Ne){if(S(Ne)){var be=Ne.body,Re;if(C(be)===le)return Re=Ne.headers?new Q(Ne.headers):new Q,Be(Re,"content-type")||pt(Re,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),P(Ne,{body:B(0,R(be)),headers:B(0,Re)})}return Ne};if(m(Y)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(be){return Y(be,arguments.length>1?St(arguments[1]):{})}}),m(A)){var sr=function(be){return E(this,Me),new A(be,arguments.length>1?St(arguments[1]):{})};Me.constructor=sr,sr.prototype=Me,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:sr})}}return yv={URLSearchParams:Te,getState:_},yv}var dB;function Gge(){if(dB)return nB;dB=1,Ak();var t=Zt(),r=Nn(),i=aB(),a=rn(),u=k1(),l=zr(),c=Fa(),f=$c(),d=dM(),g=Di(),p=Fge(),h=gR(),y=z1(),N=Tk().codeAt,E=$ge(),m=Po(),j=Ks(),L=IM(),C=MB(),T=Qc(),S=T.set,R=T.getterFor("URL"),P=C.URLSearchParams,B=C.getState,Z=a.URL,F=a.TypeError,q=a.parseInt,re=Math.floor,J=Math.pow,ne=l("".charAt),oe=l(/./.exec),le=l([].join),z=l(1 .toString),w=l([].pop),_=l([].push),U=l("".replace),Y=l([].shift),A=l("".split),Q=l("".slice),Me=l("".toLowerCase),de=l([].unshift),se="Invalid authority",De="Invalid scheme",Oe="Invalid host",Se="Invalid port",Qe=/[a-z]/i,Je=/[\d+-.a-z]/i,dt=/\d/,st=/^0x/i,gt=/^[0-7]+$/,Ot=/^\d+$/,Ct=/^[\da-f]+$/i,At=/[\0\t\n\r #%/:<>?@[\\\]^|]/,it=/[\0\t\n\r #/:<>?@[\\\]^|]/,Mt=/^[\u0000-\u0020]+/,lt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,yt=/[\t\n\r]/g,je,$e=function(ee){var ge=A(ee,"."),ue,G,Ee,Xe,Pe,_t,at;if(ge.length&&ge[ge.length-1]===""&&ge.length--,ue=ge.length,ue>4)return ee;for(G=[],Ee=0;Ee<ue;Ee++){if(Xe=ge[Ee],Xe==="")return ee;if(Pe=10,Xe.length>1&&ne(Xe,0)==="0"&&(Pe=oe(st,Xe)?16:8,Xe=Q(Xe,Pe===8?1:2)),Xe==="")_t=0;else{if(!oe(Pe===10?Ot:Pe===8?gt:Ct,Xe))return ee;_t=q(Xe,Pe)}_(G,_t)}for(Ee=0;Ee<ue;Ee++)if(_t=G[Ee],Ee===ue-1){if(_t>=J(256,5-ue))return null}else if(_t>255)return null;for(at=w(G),Ee=0;Ee<G.length;Ee++)at+=G[Ee]*J(256,3-Ee);return at},Ge=function(ee){var ge=[0,0,0,0,0,0,0,0],ue=0,G=null,Ee=0,Xe,Pe,_t,at,Gt,nr,he,xt=function(){return ne(ee,Ee)};if(xt()===":"){if(ne(ee,1)!==":")return;Ee+=2,ue++,G=ue}for(;xt();){if(ue===8)return;if(xt()===":"){if(G!==null)return;Ee++,ue++,G=ue;continue}for(Xe=Pe=0;Pe<4&&oe(Ct,xt());)Xe=Xe*16+q(xt(),16),Ee++,Pe++;if(xt()==="."){if(Pe===0||(Ee-=Pe,ue>6))return;for(_t=0;xt();){if(at=null,_t>0)if(xt()==="."&&_t<4)Ee++;else return;if(!oe(dt,xt()))return;for(;oe(dt,xt());){if(Gt=q(xt(),10),at===null)at=Gt;else{if(at===0)return;at=at*10+Gt}if(at>255)return;Ee++}ge[ue]=ge[ue]*256+at,_t++,(_t===2||_t===4)&&ue++}if(_t!==4)return;break}else if(xt()===":"){if(Ee++,!xt())return}else if(xt())return;ge[ue++]=Xe}if(G!==null)for(nr=ue-G,ue=7;ue!==0&&nr>0;)he=ge[ue],ge[ue--]=ge[G+nr-1],ge[G+--nr]=he;else if(ue!==8)return;return ge},ft=function(ee){for(var ge=null,ue=1,G=null,Ee=0,Xe=0;Xe<8;Xe++)ee[Xe]!==0?(Ee>ue&&(ge=G,ue=Ee),G=null,Ee=0):(G===null&&(G=Xe),++Ee);return Ee>ue?G:ge},He=function(ee){var ge,ue,G,Ee;if(typeof ee=="number"){for(ge=[],ue=0;ue<4;ue++)de(ge,ee%256),ee=re(ee/256);return le(ge,".")}if(typeof ee=="object"){for(ge="",G=ft(ee),ue=0;ue<8;ue++)Ee&&ee[ue]===0||(Ee&&(Ee=!1),G===ue?(ge+=ue?":":"::",Ee=!0):(ge+=z(ee[ue],16),ue<7&&(ge+=":")));return"["+ge+"]"}return ee},Ae={},Le=p({},Ae,{" ":1,'"':1,"<":1,">":1,"`":1}),Ze=p({},Le,{"#":1,"?":1,"{":1,"}":1}),It=p({},Ze,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ot=function(ee,ge){var ue=N(ee,0);return ue>32&&ue<127&&!g(ge,ee)?ee:encodeURIComponent(ee)},ke={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Te=function(ee,ge){var ue;return ee.length===2&&oe(Qe,ne(ee,0))&&((ue=ne(ee,1))===":"||!ge&&ue==="|")},xe=function(ee){var ge;return ee.length>1&&Te(Q(ee,0,2))&&(ee.length===2||(ge=ne(ee,2))==="/"||ge==="\\"||ge==="?"||ge==="#")},Be=function(ee){return ee==="."||Me(ee)==="%2e"},pt=function(ee){return ee=Me(ee),ee===".."||ee==="%2e."||ee===".%2e"||ee==="%2e%2e"},St={},sr={},Ne={},be={},Re={},we={},tt={},Nt={},Dt={},jt={},Rt={},Jt={},lr={},Rn={},Er={},mn={},Pt={},mr={},sn={},Dr={},cr={},Dn=function(ee,ge,ue){var G=m(ee),Ee,Xe,Pe;if(ge){if(Xe=this.parse(G),Xe)throw new F(Xe);this.searchParams=null}else{if(ue!==void 0&&(Ee=new Dn(ue,!0)),Xe=this.parse(G,null,Ee),Xe)throw new F(Xe);Pe=B(new P),Pe.bindURL(this),this.searchParams=Pe}};Dn.prototype={type:"URL",parse:function(ee,ge,ue){var G=this,Ee=ge||St,Xe=0,Pe="",_t=!1,at=!1,Gt=!1,nr,he,xt,Pr;for(ee=m(ee),ge||(G.scheme="",G.username="",G.password="",G.host=null,G.port=null,G.path=[],G.query=null,G.fragment=null,G.cannotBeABaseURL=!1,ee=U(ee,Mt,""),ee=U(ee,lt,"$1")),ee=U(ee,yt,""),nr=h(ee);Xe<=nr.length;){switch(he=nr[Xe],Ee){case St:if(he&&oe(Qe,he))Pe+=Me(he),Ee=sr;else{if(ge)return De;Ee=Ne;continue}break;case sr:if(he&&(oe(Je,he)||he==="+"||he==="-"||he==="."))Pe+=Me(he);else if(he===":"){if(ge&&(G.isSpecial()!==g(ke,Pe)||Pe==="file"&&(G.includesCredentials()||G.port!==null)||G.scheme==="file"&&!G.host))return;if(G.scheme=Pe,ge){G.isSpecial()&&ke[G.scheme]===G.port&&(G.port=null);return}Pe="",G.scheme==="file"?Ee=Rn:G.isSpecial()&&ue&&ue.scheme===G.scheme?Ee=be:G.isSpecial()?Ee=Nt:nr[Xe+1]==="/"?(Ee=Re,Xe++):(G.cannotBeABaseURL=!0,_(G.path,""),Ee=sn)}else{if(ge)return De;Pe="",Ee=Ne,Xe=0;continue}break;case Ne:if(!ue||ue.cannotBeABaseURL&&he!=="#")return De;if(ue.cannotBeABaseURL&&he==="#"){G.scheme=ue.scheme,G.path=y(ue.path),G.query=ue.query,G.fragment="",G.cannotBeABaseURL=!0,Ee=cr;break}Ee=ue.scheme==="file"?Rn:we;continue;case be:if(he==="/"&&nr[Xe+1]==="/")Ee=Dt,Xe++;else{Ee=we;continue}break;case Re:if(he==="/"){Ee=jt;break}else{Ee=mr;continue}case we:if(G.scheme=ue.scheme,he===je)G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,G.path=y(ue.path),G.query=ue.query;else if(he==="/"||he==="\\"&&G.isSpecial())Ee=tt;else if(he==="?")G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,G.path=y(ue.path),G.query="",Ee=Dr;else if(he==="#")G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,G.path=y(ue.path),G.query=ue.query,G.fragment="",Ee=cr;else{G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,G.path=y(ue.path),G.path.length--,Ee=mr;continue}break;case tt:if(G.isSpecial()&&(he==="/"||he==="\\"))Ee=Dt;else if(he==="/")Ee=jt;else{G.username=ue.username,G.password=ue.password,G.host=ue.host,G.port=ue.port,Ee=mr;continue}break;case Nt:if(Ee=Dt,he!=="/"||ne(Pe,Xe+1)!=="/")continue;Xe++;break;case Dt:if(he!=="/"&&he!=="\\"){Ee=jt;continue}break;case jt:if(he==="@"){_t&&(Pe="%40"+Pe),_t=!0,xt=h(Pe);for(var ii=0;ii<xt.length;ii++){var Pn=xt[ii];if(Pn===":"&&!Gt){Gt=!0;continue}var vr=ot(Pn,It);Gt?G.password+=vr:G.username+=vr}Pe=""}else if(he===je||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()){if(_t&&Pe==="")return se;Xe-=h(Pe).length+1,Pe="",Ee=Rt}else Pe+=he;break;case Rt:case Jt:if(ge&&G.scheme==="file"){Ee=mn;continue}else if(he===":"&&!at){if(Pe==="")return Oe;if(Pr=G.parseHost(Pe),Pr)return Pr;if(Pe="",Ee=lr,ge===Jt)return}else if(he===je||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()){if(G.isSpecial()&&Pe==="")return Oe;if(ge&&Pe===""&&(G.includesCredentials()||G.port!==null))return;if(Pr=G.parseHost(Pe),Pr)return Pr;if(Pe="",Ee=Pt,ge)return;continue}else he==="["?at=!0:he==="]"&&(at=!1),Pe+=he;break;case lr:if(oe(dt,he))Pe+=he;else if(he===je||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()||ge){if(Pe!==""){var zi=q(Pe,10);if(zi>65535)return Se;G.port=G.isSpecial()&&zi===ke[G.scheme]?null:zi,Pe=""}if(ge)return;Ee=Pt;continue}else return Se;break;case Rn:if(G.scheme="file",he==="/"||he==="\\")Ee=Er;else if(ue&&ue.scheme==="file")switch(he){case je:G.host=ue.host,G.path=y(ue.path),G.query=ue.query;break;case"?":G.host=ue.host,G.path=y(ue.path),G.query="",Ee=Dr;break;case"#":G.host=ue.host,G.path=y(ue.path),G.query=ue.query,G.fragment="",Ee=cr;break;default:xe(le(y(nr,Xe),""))||(G.host=ue.host,G.path=y(ue.path),G.shortenPath()),Ee=mr;continue}else{Ee=mr;continue}break;case Er:if(he==="/"||he==="\\"){Ee=mn;break}ue&&ue.scheme==="file"&&!xe(le(y(nr,Xe),""))&&(Te(ue.path[0],!0)?_(G.path,ue.path[0]):G.host=ue.host),Ee=mr;continue;case mn:if(he===je||he==="/"||he==="\\"||he==="?"||he==="#"){if(!ge&&Te(Pe))Ee=mr;else if(Pe===""){if(G.host="",ge)return;Ee=Pt}else{if(Pr=G.parseHost(Pe),Pr)return Pr;if(G.host==="localhost"&&(G.host=""),ge)return;Pe="",Ee=Pt}continue}else Pe+=he;break;case Pt:if(G.isSpecial()){if(Ee=mr,he!=="/"&&he!=="\\")continue}else if(!ge&&he==="?")G.query="",Ee=Dr;else if(!ge&&he==="#")G.fragment="",Ee=cr;else if(he!==je&&(Ee=mr,he!=="/"))continue;break;case mr:if(he===je||he==="/"||he==="\\"&&G.isSpecial()||!ge&&(he==="?"||he==="#")){if(pt(Pe)?(G.shortenPath(),he!=="/"&&!(he==="\\"&&G.isSpecial())&&_(G.path,"")):Be(Pe)?he!=="/"&&!(he==="\\"&&G.isSpecial())&&_(G.path,""):(G.scheme==="file"&&!G.path.length&&Te(Pe)&&(G.host&&(G.host=""),Pe=ne(Pe,0)+":"),_(G.path,Pe)),Pe="",G.scheme==="file"&&(he===je||he==="?"||he==="#"))for(;G.path.length>1&&G.path[0]==="";)Y(G.path);he==="?"?(G.query="",Ee=Dr):he==="#"&&(G.fragment="",Ee=cr)}else Pe+=ot(he,Ze);break;case sn:he==="?"?(G.query="",Ee=Dr):he==="#"?(G.fragment="",Ee=cr):he!==je&&(G.path[0]+=ot(he,Ae));break;case Dr:!ge&&he==="#"?(G.fragment="",Ee=cr):he!==je&&(he==="'"&&G.isSpecial()?G.query+="%27":he==="#"?G.query+="%23":G.query+=ot(he,Ae));break;case cr:he!==je&&(G.fragment+=ot(he,Le));break}Xe++}},parseHost:function(ee){var ge,ue,G;if(ne(ee,0)==="["){if(ne(ee,ee.length-1)!=="]"||(ge=Ge(Q(ee,1,-1)),!ge))return Oe;this.host=ge}else if(this.isSpecial()){if(ee=E(ee),oe(At,ee)||(ge=$e(ee),ge===null))return Oe;this.host=ge}else{if(oe(it,ee))return Oe;for(ge="",ue=h(ee),G=0;G<ue.length;G++)ge+=ot(ue[G],Ae);this.host=ge}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return g(ke,this.scheme)},shortenPath:function(){var ee=this.path,ge=ee.length;ge&&(this.scheme!=="file"||ge!==1||!Te(ee[0],!0))&&ee.length--},serialize:function(){var ee=this,ge=ee.scheme,ue=ee.username,G=ee.password,Ee=ee.host,Xe=ee.port,Pe=ee.path,_t=ee.query,at=ee.fragment,Gt=ge+":";return Ee!==null?(Gt+="//",ee.includesCredentials()&&(Gt+=ue+(G?":"+G:"")+"@"),Gt+=He(Ee),Xe!==null&&(Gt+=":"+Xe)):ge==="file"&&(Gt+="//"),Gt+=ee.cannotBeABaseURL?Pe[0]:Pe.length?"/"+le(Pe,"/"):"",_t!==null&&(Gt+="?"+_t),at!==null&&(Gt+="#"+at),Gt},setHref:function(ee){var ge=this.parse(ee);if(ge)throw new F(ge);this.searchParams.update()},getOrigin:function(){var ee=this.scheme,ge=this.port;if(ee==="blob")try{return new ln(ee.path[0]).origin}catch(ue){return"null"}return ee==="file"||!this.isSpecial()?"null":ee+"://"+He(this.host)+(ge!==null?":"+ge:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(ee){this.parse(m(ee)+":",St)},getUsername:function(){return this.username},setUsername:function(ee){var ge=h(m(ee));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var ue=0;ue<ge.length;ue++)this.username+=ot(ge[ue],It)}},getPassword:function(){return this.password},setPassword:function(ee){var ge=h(m(ee));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var ue=0;ue<ge.length;ue++)this.password+=ot(ge[ue],It)}},getHost:function(){var ee=this.host,ge=this.port;return ee===null?"":ge===null?He(ee):He(ee)+":"+ge},setHost:function(ee){this.cannotBeABaseURL||this.parse(ee,Rt)},getHostname:function(){var ee=this.host;return ee===null?"":He(ee)},setHostname:function(ee){this.cannotBeABaseURL||this.parse(ee,Jt)},getPort:function(){var ee=this.port;return ee===null?"":m(ee)},setPort:function(ee){this.cannotHaveUsernamePasswordPort()||(ee=m(ee),ee===""?this.port=null:this.parse(ee,lr))},getPathname:function(){var ee=this.path;return this.cannotBeABaseURL?ee[0]:ee.length?"/"+le(ee,"/"):""},setPathname:function(ee){this.cannotBeABaseURL||(this.path=[],this.parse(ee,Pt))},getSearch:function(){var ee=this.query;return ee?"?"+ee:""},setSearch:function(ee){ee=m(ee),ee===""?this.query=null:(ne(ee,0)==="?"&&(ee=Q(ee,1)),this.query="",this.parse(ee,Dr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var ee=this.fragment;return ee?"#"+ee:""},setHash:function(ee){if(ee=m(ee),ee===""){this.fragment=null;return}ne(ee,0)==="#"&&(ee=Q(ee,1)),this.fragment="",this.parse(ee,cr)},update:function(){this.query=this.searchParams.serialize()||null}};var ln=function(ge){var ue=d(this,Kt),G=L(arguments.length,1)>1?arguments[1]:void 0,Ee=S(ue,new Dn(ge,!1,G));r||(ue.href=Ee.serialize(),ue.origin=Ee.getOrigin(),ue.protocol=Ee.getProtocol(),ue.username=Ee.getUsername(),ue.password=Ee.getPassword(),ue.host=Ee.getHost(),ue.hostname=Ee.getHostname(),ue.port=Ee.getPort(),ue.pathname=Ee.getPathname(),ue.search=Ee.getSearch(),ue.searchParams=Ee.getSearchParams(),ue.hash=Ee.getHash())},Kt=ln.prototype,Ir=function(ee,ge){return{get:function(){return R(this)[ee]()},set:ge&&function(ue){return R(this)[ge](ue)},configurable:!0,enumerable:!0}};if(r&&(f(Kt,"href",Ir("serialize","setHref")),f(Kt,"origin",Ir("getOrigin")),f(Kt,"protocol",Ir("getProtocol","setProtocol")),f(Kt,"username",Ir("getUsername","setUsername")),f(Kt,"password",Ir("getPassword","setPassword")),f(Kt,"host",Ir("getHost","setHost")),f(Kt,"hostname",Ir("getHostname","setHostname")),f(Kt,"port",Ir("getPort","setPort")),f(Kt,"pathname",Ir("getPathname","setPathname")),f(Kt,"search",Ir("getSearch","setSearch")),f(Kt,"searchParams",Ir("getSearchParams")),f(Kt,"hash",Ir("getHash","setHash"))),c(Kt,"toJSON",function(){return R(this).serialize()},{enumerable:!0}),c(Kt,"toString",function(){return R(this).serialize()},{enumerable:!0}),Z){var Gr=Z.createObjectURL,bi=Z.revokeObjectURL;Gr&&c(ln,"createObjectURL",u(Gr,Z)),bi&&c(ln,"revokeObjectURL",u(bi,Z))}return j(ln,"URL"),t({global:!0,constructor:!0,forced:!i,sham:!r},{URL:ln}),nB}var gB;function Wge(){return gB||(gB=1,Gge()),rB}Wge();var IB={},pB;function Kge(){if(pB)return IB;pB=1;var t=Zt(),r=Ni();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),IB}Kge();var yB={},hB;function qge(){return hB||(hB=1,MB()),yB}qge();var NB={},EB;function Jge(){if(EB)return NB;EB=1;var t=Fa(),r=zr(),i=Po(),a=IM(),u=URLSearchParams,l=u.prototype,c=r(l.append),f=r(l.delete),d=r(l.forEach),g=r([].push),p=new u("a=1&a=2&b=3");return p.delete("a",1),p.delete("b",void 0),p+""!="a=2"&&t(l,"delete",function(h){var y=arguments.length,N=y<2?void 0:arguments[1];if(y&&N===void 0)return f(this,h);var E=[];d(this,function(P,B){g(E,{key:B,value:P})}),a(y,1);for(var m=i(h),j=i(N),L=0,C=0,T=!1,S=E.length,R;L<S;)R=E[L++],T||R.key===m?(T=!0,f(this,R.key)):C++;for(;C<S;)R=E[C++],R.key===m&&R.value===j||c(this,R.key,R.value)},{enumerable:!0,unsafe:!0}),NB}Jge();var mB={},DB;function Xge(){if(DB)return mB;DB=1;var t=Fa(),r=zr(),i=Po(),a=IM(),u=URLSearchParams,l=u.prototype,c=r(l.getAll),f=r(l.has),d=new u("a=1");return(d.has("a",2)||!d.has("a",void 0))&&t(l,"has",function(p){var h=arguments.length,y=h<2?void 0:arguments[1];if(h&&y===void 0)return f(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}),mB}Xge();var vB={},jB;function e5e(){if(jB)return vB;jB=1;var t=Nn(),r=zr(),i=$c(),a=URLSearchParams.prototype,u=r(a.forEach);return t&&!("size"in a)&&i(a,"size",{get:function(){var c=0;return u(this,function(){c++}),c},configurable:!0,enumerable:!0}),vB}e5e();function C0(t){"@babel/helpers - typeof";return C0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},C0(t)}function t5e(t,r){return a5e(t)||i5e(t,r)||n5e(t,r)||r5e()}function r5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
61
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n5e(t,r){if(t){if(typeof t=="string")return TB(t,r);var i={}.toString.call(t).slice(8,-1);return i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set"?Array.from(t):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?TB(t,r):void 0}}function TB(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}function i5e(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],d=!0,g=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(d=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);d=!0);}catch(p){g=!0,u=p}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(g)throw u}}return f}}function a5e(t){if(Array.isArray(t))return t}function o5e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u5e(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,CB(a.key),a)}}function s5e(t,r,i){return r&&u5e(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function A0(t,r,i){return(r=CB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function CB(t){var r=l5e(t,"string");return C0(r)=="symbol"?r:r+""}function l5e(t,r){if(C0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(C0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var c5e=function(){function t(){o5e(this,t),A0(this,"_levels",[]),A0(this,"_transports",[]),A0(this,"_logs",[]),A0(this,"_prevTime",0),A0(this,"logListener",null);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var i=r.split(">"),a=t5e(i,2),u=a[0],l=a[1];this._levels=u.split(","),l&&(this._transports=l.split(","))}catch(c){return}}return s5e(t,[{key:"create",value:function(i,a){var u=this;return function(l){if(!(!u._levels.includes(i)&&!u._levels.includes("all")&&!u.logListener)){var c=Date.now(),f=0;if(u._prevTime&&(f=c-u._prevTime),u._prevTime=c,u.logListener&&u.logListener("".concat(i,": ").concat(l," +").concat(f,"ms")),u._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,";"),f)}u._transports.includes("file")&&u._logs.push("".concat(i,": ").concat(l," +").concat(f,"ms"))}}}},{key:"saveLogs",value:function(){if(this._logs.length){var i=this._logs.join(`
|
|
62
|
-
`),a=new Blob([i],{type:"text/plain"}),u=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this._logs=[]}}}])}();const hv=new c5e;function L2(t){"@babel/helpers - typeof";return L2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},L2(t)}function xn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */xn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,w,_){z[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(z,w,_){return Object.defineProperty(z,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[w]}try{g({},"")}catch(z){g=function(_,U,Y){return _[U]=Y}}function p(z,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),Q=new oe(U||[]);return u(A,"_invoke",{value:q(z,_,Q)}),A}function h(z,w,_){try{return{type:"normal",arg:z.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var S={};g(S,c,function(){return this});var R=Object.getPrototypeOf,P=R&&R(R(le([])));P&&P!==i&&a.call(P,c)&&(S=P);var B=T.prototype=L.prototype=Object.create(S);function Z(z){["next","throw","return"].forEach(function(w){g(z,w,function(_){return this._invoke(w,_)})})}function F(z,w){function _(Y,A,Q,Me){var de=h(z[Y],z,A);if(de.type!=="throw"){var se=de.arg,De=se.value;return De&&L2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,Q,Me)},function(Oe){_("throw",Oe,Q,Me)}):w.resolve(De).then(function(Oe){se.value=Oe,Q(se)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,Q){function Me(){return new w(function(de,se){_(A,Q,de,se)})}return U=U?U.then(Me,Me):Me()}})}function q(z,w,_){var U=y;return function(Y,A){if(U===E)throw Error("Generator is already running");if(U===m){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var Q=_.delegate;if(Q){var Me=re(Q,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=E;var de=h(z,w,_);if(de.type==="normal"){if(U=_.done?m:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=m,_.method="throw",_.arg=de.arg)}}}function re(z,w){var _=w.method,U=z.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&z.iterator.return&&(w.method="return",w.arg=t,re(z,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,z.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[z.resultName]=A.value,w.next=z.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(z){var w={tryLoc:z[0]};1 in z&&(w.catchLoc=z[1]),2 in z&&(w.finallyLoc=z[2],w.afterLoc=z[3]),this.tryEntries.push(w)}function ne(z){var w=z.completion||{};w.type="normal",delete w.arg,z.completion=w}function oe(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(J,this),this.reset(!0)}function le(z){if(z||z===""){var w=z[c];if(w)return w.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,U=function Y(){for(;++_<z.length;)if(a.call(z,_))return Y.value=z[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(L2(z)+" is not iterable")}return C.prototype=T,u(B,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=g(T,d,"GeneratorFunction"),r.isGeneratorFunction=function(z){var w=typeof z=="function"&&z.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,T):(z.__proto__=T,g(z,d,"GeneratorFunction")),z.prototype=Object.create(B),z},r.awrap=function(z){return{__await:z}},Z(F.prototype),g(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(z,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new F(p(z,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(Q){return Q.done?Q.value:A.next()})},Z(B),g(B,d,"Generator"),g(B,c,function(){return this}),g(B,"toString",function(){return"[object Generator]"}),r.keys=function(z){var w=Object(z),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=le,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ne),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(se,De){return Q.type="throw",Q.arg=w,_.next=se,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],Q=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var Q=A?A.completion:{};return Q.type=w,Q.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(Q)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),ne(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;ne(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:le(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function AB(t,r,i,a,u,l,c){try{var f=t[l](c),d=f.value}catch(g){return void i(g)}f.done?r(d):Promise.resolve(d).then(a,u)}function Zo(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(d){AB(l,a,u,c,f,"next",d)}function f(d){AB(l,a,u,c,f,"throw",d)}c(void 0)})}}function f5e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function M5e(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,SB(a.key),a)}}function d5e(t,r,i){return r&&M5e(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function AM(t,r,i){return(r=SB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function SB(t){var r=g5e(t,"string");return L2(r)=="symbol"?r:r+""}function g5e(t,r){if(L2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(L2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var el=hv.create("wasm_idv"),I5e=function(){function t(r){f5e(this,t),AM(this,"_worker",null),AM(this,"_initialized",!1),AM(this,"_connectedToIdv",!1),AM(this,"_serviceRunning",!1),AM(this,"_userId",Ide(g2e)),AM(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return d5e(t,[{key:"init",value:function(){var r=Zo(xn().mark(function a(){var u,l,c,f;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/c3256ef-7cff4ddf6//PlatformAdaptor.worker.js");case 4:return u=g.sent,g.next=7,u.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),el("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/c3256ef-7cff4ddf6/",preMain:!0});case 23:return f=g.sent,g.abrupt("return",f);case 25:case"end":return g.stop()}},a,this,[[1,12]])}));function i(){return r.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var r=Zo(xn().mark(function a(u){var l;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:tE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return l=f.sent,el("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(l))),l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var r=Zo(xn().mark(function a(u){var l;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:tE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var r=Zo(xn().mark(function a(u){var l,c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l={workflowId:u},d.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:l,preMain:!0});case 3:return c=d.sent,el("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 r.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var r=Zo(xn().mark(function a(u){var l,c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l={sessionId:u},d.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=d.sent,el("continue session result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var r=Zo(xn().mark(function a(){var u,l,c=arguments;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=d.sent,el("listWorkflows result: ".concat(JSON.stringify(l))),d.abrupt("return",l);case 6:case"end":return d.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var r=Zo(xn().mark(function a(u){var l;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var r=Zo(xn().mark(function a(u,l){var c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return el("Push data: ".concat(u," , ").concat(JSON.stringify(l))),d.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 3:return c=d.sent,el("Push data result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,el("Wait for session update result: ".concat(JSON.stringify(u))),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,c.abrupt("return",u);case 6:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var r=Zo(xn().mark(function a(u){var l=this;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.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"){el(JSON.stringify(p.data.content));return}if(h==="custom"){var y=p.data,N=y.method,E=y.data;el("::: custom method, ".concat(N,", ").concat(JSON.stringify(E))),N==="onRuntimeInitialized"&&(l._initialized=!0),d(E)}if(h==="stderr"){var m=p.data.content;el(JSON.stringify(m)),l._setErrorScreen&&l._setErrorScreen(m)}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function i(a){return r.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 r=Zo(xn().mark(function a(){var u;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 u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()}])}();function w2(t){"@babel/helpers - typeof";return w2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},w2(t)}function OB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function b2(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?OB(Object(i),!0).forEach(function(a){Nv(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):OB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Nv(t,r,i){return(r=p5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function p5e(t){var r=y5e(t,"string");return w2(r)=="symbol"?r:r+""}function y5e(t,r){if(w2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(w2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Jn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Jn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,w,_){z[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(z,w,_){return Object.defineProperty(z,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[w]}try{g({},"")}catch(z){g=function(_,U,Y){return _[U]=Y}}function p(z,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),Q=new oe(U||[]);return u(A,"_invoke",{value:q(z,_,Q)}),A}function h(z,w,_){try{return{type:"normal",arg:z.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var S={};g(S,c,function(){return this});var R=Object.getPrototypeOf,P=R&&R(R(le([])));P&&P!==i&&a.call(P,c)&&(S=P);var B=T.prototype=L.prototype=Object.create(S);function Z(z){["next","throw","return"].forEach(function(w){g(z,w,function(_){return this._invoke(w,_)})})}function F(z,w){function _(Y,A,Q,Me){var de=h(z[Y],z,A);if(de.type!=="throw"){var se=de.arg,De=se.value;return De&&w2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,Q,Me)},function(Oe){_("throw",Oe,Q,Me)}):w.resolve(De).then(function(Oe){se.value=Oe,Q(se)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,Q){function Me(){return new w(function(de,se){_(A,Q,de,se)})}return U=U?U.then(Me,Me):Me()}})}function q(z,w,_){var U=y;return function(Y,A){if(U===E)throw Error("Generator is already running");if(U===m){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var Q=_.delegate;if(Q){var Me=re(Q,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=E;var de=h(z,w,_);if(de.type==="normal"){if(U=_.done?m:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=m,_.method="throw",_.arg=de.arg)}}}function re(z,w){var _=w.method,U=z.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&z.iterator.return&&(w.method="return",w.arg=t,re(z,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,z.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[z.resultName]=A.value,w.next=z.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(z){var w={tryLoc:z[0]};1 in z&&(w.catchLoc=z[1]),2 in z&&(w.finallyLoc=z[2],w.afterLoc=z[3]),this.tryEntries.push(w)}function ne(z){var w=z.completion||{};w.type="normal",delete w.arg,z.completion=w}function oe(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(J,this),this.reset(!0)}function le(z){if(z||z===""){var w=z[c];if(w)return w.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,U=function Y(){for(;++_<z.length;)if(a.call(z,_))return Y.value=z[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(w2(z)+" is not iterable")}return C.prototype=T,u(B,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=g(T,d,"GeneratorFunction"),r.isGeneratorFunction=function(z){var w=typeof z=="function"&&z.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,T):(z.__proto__=T,g(z,d,"GeneratorFunction")),z.prototype=Object.create(B),z},r.awrap=function(z){return{__await:z}},Z(F.prototype),g(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(z,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new F(p(z,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(Q){return Q.done?Q.value:A.next()})},Z(B),g(B,d,"Generator"),g(B,c,function(){return this}),g(B,"toString",function(){return"[object Generator]"}),r.keys=function(z){var w=Object(z),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=le,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ne),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(se,De){return Q.type="throw",Q.arg=w,_.next=se,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],Q=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var Q=A?A.completion:{};return Q.type=w,Q.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(Q)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),ne(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;ne(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:le(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function _B(t,r,i,a,u,l,c){try{var f=t[l](c),d=f.value}catch(g){return void i(g)}f.done?r(d):Promise.resolve(d).then(a,u)}function Ss(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(d){_B(l,a,u,c,f,"next",d)}function f(d){_B(l,a,u,c,f,"throw",d)}c(void 0)})}}var h5e=hv.create("store_idv"),N5e=function(r,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Ss(Jn().mark(function l(){var c;return Jn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new I5e,d.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return d.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Ss(Jn().mark(function l(){var c,f,d,g,p;return Jn().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,(f=i().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,i().wasmService.prepareAndConnect(u);case 5:if(d=y.sent,g=null,d.code===4&&(g=T2.HTTP_ISSUE),d.code!==0&&d.code!==4&&(g=T2.PROVIDER_ERROR),g===null){y.next=12;break}return p=new a0({errorCode:g}),y.abrupt("return",{error:p});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return Ss(Jn().mark(function l(){var c,f,d,g,p;return Jn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,d=null,f.code===4&&(d=T2.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=T2.PROVIDER_ERROR),d===null){y.next=13;break}return g=new a0({errorCode:d}),p=new w5({errorCode:nE.CONNECTION_ISSUE,underlyingBaseError:g}),y.abrupt("return",{workflows:[],error:p});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var d,g=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId,p=b2(b2({},f.results),{},{sessionId:g}),h=b2({results:p},f.error&&{error:f.error});i().setCurrentSessionDataLsAndStore(null),u(h)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=Ss(Jn().mark(function l(){var c,f,d,g;return Jn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=i().externalModulesNames,h.prev=1,h.next=4,E5e(c);case 4:return f=h.sent,r(function(){return{externalModules:f}}),h.abrupt("return",{});case 9:return h.prev=9,h.t0=h.catch(1),(d=i().wasmService)===null||d===void 0||d.shutdown(),i().resetWasmService(),i().resetProps(),g=new i0({errorCode:Bd.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:g});case 16:case"end":return h.stop()}},l,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=tm(u.find(function(c){return c.templateId===lR}));l.templateLayout=uH(l.templateLayout,i().layout),r({proccessingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Ss(Jn().mark(function l(c,f){var d,g,p;return Jn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d=null,g=function(){var N=Ss(Jn().mark(function E(){var m,j,L,C;return Jn().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,i().wasmService.pushData(c,f);case 2:if(m=S.sent,j=null,m.code===4&&(j=ys.HTTP_ISSUE),m.code!==0&&m.code!==4&&(j=ys.PROVIDER_ERROR),j!==null&&(L=new o0({errorCode:ys.HTTP_ISSUE}),C=new tu({errorCode:eu.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:L}),d=C),m.code!==0){S.next=12;break}return d=null,S.abrupt("return",m);case 12:return S.abrupt("return",null);case 13:case"end":return S.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),p=function(){return null},y.next=5,nm(g,p);case 5:return y.abrupt("return",d?{error:d}:{});case 6:case"end":return y.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var l=i().workflow;if(!(!l||!u))return l.steps.find(function(c){return c.id===u})},_waitingForNextStep:function(){var a=Ss(Jn().mark(function l(){var c,f,d,g,p;return Jn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,f=null,d=function(){var N=Ss(Jn().mark(function E(){var m,j,L,C,T,S,R,P,B,Z,F,q,re,J,ne;return Jn().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return le.next=2,i().wasmService.getSessionState();case 2:if(C=le.sent,T=(m=C.data)===null||m===void 0?void 0:m.currentStep,S=(j=C.data)===null||j===void 0?void 0:j.isProcessingFiles,R=(L=C.data)===null||L===void 0||(L=L.workflow)===null||L===void 0?void 0:L.steps,P=Mde(R,T),B=C.code===4,Z=C.code!==0&&C.code!==4,F=C.code===0&&(!C.data.workflow||!C.data.currentStep),q=T&&T===c,re=null,R&&!P&&(re=ys.NOT_DATA_TYPE),B&&(re=ys.HTTP_ISSUE),Z&&(re=ys.PROVIDER_ERROR),S&&(re=ys.IS_PROCESSING),q&&(re=ys.SAME_STEP),F&&(re=ys.DECODING_FAILED),re!==null&&(J=new o0({errorCode:re}),ne=new tu({errorCode:eu.INTERNAL_ISSUE,underlyingBaseError:J}),f=ne),h5e(JSON.stringify({nextStep:T,isDataType:P,isProcessingFiles:S})),!(P&&!q&&!S&&!B&&!Z&&!F)){le.next=23;break}return f=null,le.abrupt("return",C.data);case 23:return le.abrupt("return",null);case 24:case"end":return le.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),g=function(){return null},y.next=6,nm(d,g);case 6:if(p=y.sent,!f){y.next=9;break}return y.abrupt("return",{error:f});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 u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||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:pM.SERVICE,eventType:Fd.MESSAGE,message:$d.DID_END_SESSION}))}},pushStepWaitNextStepAndSet:function(){var a=Ss(Jn().mark(function l(c,f){var d,g,p,h,y,N,E,m;return Jn().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){L.next=4;break}return i().setFinalStepAndStopProcess(),L.abrupt("return");case 4:if(!(f instanceof bn)){L.next=10;break}return d=f,g=new tu({errorCode:eu.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),i().workflowSessionCompletion({error:g}),i().resetSession(),L.abrupt("return");case 10:return L.next=12,i()._pushStep(c,f);case 12:if(p=L.sent,!p.error){L.next=17;break}return i().workflowSessionCompletion({error:p.error}),i().resetSession(),L.abrupt("return");case 17:return L.next=19,i()._waitingForNextStep();case 19:if(h=L.sent,!h.error){L.next=24;break}return i().workflowSessionCompletion({error:h.error}),i().resetSession(),L.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(T){return!!T&&Object.prototype.toString.call(T)==="[object Object]"&&T.templateId},!(E!=null&&E.final&&!m(E.client))){L.next=34;break}return i().setFinalStepAndStopProcess(E.id),L.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 L.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),continueSession:function(){var a=Ss(Jn().mark(function l(){var c,f,d,g,p,h,y,N,E,m,j,L,C;return Jn().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(c={isContinue:!1},f=i().workflow,d=i().getCurrentSessionDataLs(),g=i().sessionRestoreMode,g){S.next=6;break}return S.abrupt("return",c);case 6:if(d){S.next=8;break}return S.abrupt("return",c);case 8:if(p=d.sessionId,h=d.workflowId,!(!p||h!==f.id)){S.next=11;break}return S.abrupt("return",c);case 11:return S.next=13,i().wasmService.continueSession(p);case 13:return y=S.sent,N=y.data,E=N.currentStep,"id"in N&&"currentStep"in N||(m=new u0({errorCode:S5.DECODING_FAILED}),j=new tu({errorCode:eu.START_SESSION_ERROR,underlyingBaseError:m}),c=b2(b2({},c),{},{error:j})),L=i()._findStepById(E),(L==null?void 0:L.final)===!1?(C=N.currentStep,i().setIsProcessing(!1),i().setCurrentStepId(C),i().setCurrentSessionDataLsAndStore({sessionId:N.id,workflowId:h}),i().listener({target:pM.SERVICE,eventType:Fd.MESSAGE,message:$d.DID_START_RESTORE_SESSION}),c=b2(b2({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),S.abrupt("return",c);case 20:case"end":return S.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u,l){if(!u&&!l)return r(function(){return{currentScreenConfig:null}});if(l)return r(function(){return{currentScreenConfig:l}});if(u===null)return r(function(){return{currentScreenConfig:null}});var c=i().workflow,f=null;if(u===lR)f=i().proccessingTransformedTemplate;else{var d;if(f=(d=i()._findStepById(u))===null||d===void 0?void 0:d.client,f!==null){var g;f.sessionId=(g=i().currentSessionData)===null||g===void 0?void 0:g.sessionId}f&&f.templateLayout&&(f.templateLayout=uH(f.templateLayout,i().layout))}var p=fde(i().externalModules,c.steps,u);if(f===null||!p){var h=new tu({errorCode:eu.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:h}),r(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Ss(Jn().mark(function l(){var c,f;return Jn().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(f=g.sent,i().resetWasmService(),i().externalModules.forEach(function(p){p.component.deinitialize&&p.component.isReady&&p.component.deinitialize()}),(f==null?void 0:f.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 u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null}})},resetWasmService:function(){return r(function(){return{wasmService:null}})}}};function E5e(t){return Ev.apply(this,arguments)}function Ev(){return Ev=Ss(Jn().mark(function t(r){var i,a,u,l,c,f;return Jn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:i=[{id:e1.getIdentifier(),supportedTemplates:e1.getSupportedTemplates(),component:e1}],a=Nv(Nv({},"LIVENESS",function(){return Promise.resolve().then(()=>f$e)}),"DOC_READER",function(){return Promise.resolve().then(()=>Pvt)}),u=Jn().mark(function p(){var h,y,N;return Jn().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=r;case 4:if(!(l<c.length)){g.next=9;break}return g.delegateYield(u(),"t0",6);case 6:l++,g.next=4;break;case 9:return f=i.filter(function(p){return p!==null}),g.abrupt("return",f);case 11:case"end":return g.stop()}},t)})),Ev.apply(this,arguments)}function S0(t){"@babel/helpers - typeof";return S0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},S0(t)}function xB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function mv(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?xB(Object(i),!0).forEach(function(a){m5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function m5e(t,r,i){return(r=D5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function D5e(t){var r=v5e(t,"string");return S0(r)=="symbol"?r:r+""}function v5e(t,r){if(S0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(S0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ta=lMe(function(){return mv(mv(mv({},Nde.apply(void 0,arguments)),Sde.apply(void 0,arguments)),N5e.apply(void 0,arguments))}),j5e=function(r){var i=r.children;return Xn.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:i})},T5e=function(){var r=ta(function(E){return E.currentScreenConfig}),i=ta(function(E){return E.pushStepWaitNextStepAndSet}),a=ta(function(E){return E.proccessingTransformedTemplate}),u=ta(function(E){return E.isProcessing}),l=ta(function(E){return E.setIsProcessing}),c=ta(function(E){return E.currentStepId}),f=ta(function(E){return E.listener}),d=ta(function(E){return E.externalModules}),g=ta(function(E){return E.modulesConfig}),p=function(m,j){f({target:pM.WEB_COMPONENT,eventType:Fd.MESSAGE,message:j,module:m})},h=function(m){l(m)},y=function(m){c&&(l(!1),i(c,m))},N=Kn.useCallback(function(){if(!r)return Xn.jsx(j5e,{children:"Waiting for play... or process completed"});var E=d.find(function(m){return m.supportedTemplates.includes(r.templateId)});if(E&&r)return Xn.jsx(E.component,{perform:y,moduleProps:r,modulesConfig:g,idvEventListener:p,isProcessing:h})},[r,d]);return Xn.jsx(Xn.Fragment,{children:Xn.jsx(bR,{direction:rE.Ltr,children:Xn.jsxs(Xn.Fragment,{children:[u&&Xn.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?Xn.jsx(e1,{perform:y,moduleProps:a,idvEventListener:p,isProcessing:h}):"Processing..."}),N()]})})})};function C5e(){return Xn.jsx(Kn.StrictMode,{children:Xn.jsx(H2e,{children:Xn.jsx(T5e,{})})})}const A5e="*,*: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}",S5e="._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 SM(t){"@babel/helpers - typeof";return SM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},SM(t)}function O5e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function LB(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,bB(a.key),a)}}function _5e(t,r,i){return r&&LB(t.prototype,r),i&&LB(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function x5e(t,r,i){return r=_0(r),L5e(t,vv()?Reflect.construct(r,[],_0(t).constructor):r.apply(t,i))}function L5e(t,r){if(r&&(SM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w5e(t)}function w5e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b5e(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&O0(t,r)}function Dv(t){var r=typeof Map=="function"?new Map:void 0;return Dv=function(a){if(a===null||!k5e(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return z5e(a,arguments,_0(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),O0(u,a)},Dv(t)}function z5e(t,r,i){if(vv())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return i&&O0(u,i.prototype),u}function vv(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(vv=function(){return!!t})()}function k5e(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function O0(t,r){return O0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},O0(t,r)}function _0(t){return _0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_0(t)}function wB(t,r,i){return(r=bB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function bB(t){var r=R5e(t,"string");return SM(r)=="symbol"?r:r+""}function R5e(t,r){if(SM(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(SM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var P5e=[A5e,S5e],U5e=[].concat(P5e).reduce(function(t,r){return t+r.toString()},""),zB=function(t){function r(){var i;return O5e(this,r),i=x5e(this,r),wB(i,"_root",s2e.createRoot(i.attachShadow({mode:"open"}))),wB(i,"_mounted",!1),i}return b5e(r,t),_5e(r,[{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(Xn.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[Xn.jsx("style",{nonce:ta.getState().getNonce(),children:U5e}),Xn.jsx(C5e,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount())}),hv.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(Dv(HTMLElement));function z2(t){"@babel/helpers - typeof";return z2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},z2(t)}function hs(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */hs=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,w,_){z[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(z,w,_){return Object.defineProperty(z,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[w]}try{g({},"")}catch(z){g=function(_,U,Y){return _[U]=Y}}function p(z,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),Q=new oe(U||[]);return u(A,"_invoke",{value:q(z,_,Q)}),A}function h(z,w,_){try{return{type:"normal",arg:z.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var S={};g(S,c,function(){return this});var R=Object.getPrototypeOf,P=R&&R(R(le([])));P&&P!==i&&a.call(P,c)&&(S=P);var B=T.prototype=L.prototype=Object.create(S);function Z(z){["next","throw","return"].forEach(function(w){g(z,w,function(_){return this._invoke(w,_)})})}function F(z,w){function _(Y,A,Q,Me){var de=h(z[Y],z,A);if(de.type!=="throw"){var se=de.arg,De=se.value;return De&&z2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,Q,Me)},function(Oe){_("throw",Oe,Q,Me)}):w.resolve(De).then(function(Oe){se.value=Oe,Q(se)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,Q){function Me(){return new w(function(de,se){_(A,Q,de,se)})}return U=U?U.then(Me,Me):Me()}})}function q(z,w,_){var U=y;return function(Y,A){if(U===E)throw Error("Generator is already running");if(U===m){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var Q=_.delegate;if(Q){var Me=re(Q,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=E;var de=h(z,w,_);if(de.type==="normal"){if(U=_.done?m:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=m,_.method="throw",_.arg=de.arg)}}}function re(z,w){var _=w.method,U=z.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&z.iterator.return&&(w.method="return",w.arg=t,re(z,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,z.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[z.resultName]=A.value,w.next=z.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(z){var w={tryLoc:z[0]};1 in z&&(w.catchLoc=z[1]),2 in z&&(w.finallyLoc=z[2],w.afterLoc=z[3]),this.tryEntries.push(w)}function ne(z){var w=z.completion||{};w.type="normal",delete w.arg,z.completion=w}function oe(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(J,this),this.reset(!0)}function le(z){if(z||z===""){var w=z[c];if(w)return w.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,U=function Y(){for(;++_<z.length;)if(a.call(z,_))return Y.value=z[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(z2(z)+" is not iterable")}return C.prototype=T,u(B,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=g(T,d,"GeneratorFunction"),r.isGeneratorFunction=function(z){var w=typeof z=="function"&&z.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,T):(z.__proto__=T,g(z,d,"GeneratorFunction")),z.prototype=Object.create(B),z},r.awrap=function(z){return{__await:z}},Z(F.prototype),g(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(z,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new F(p(z,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(Q){return Q.done?Q.value:A.next()})},Z(B),g(B,d,"Generator"),g(B,c,function(){return this}),g(B,"toString",function(){return"[object Generator]"}),r.keys=function(z){var w=Object(z),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=le,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ne),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(se,De){return Q.type="throw",Q.arg=w,_.next=se,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],Q=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var Q=A?A.completion:{};return Q.type=w,Q.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(Q)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),ne(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;ne(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:le(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function kB(t,r,i,a,u,l,c){try{var f=t[l](c),d=f.value}catch(g){return void i(g)}f.done?r(d):Promise.resolve(d).then(a,u)}function OM(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(d){kB(l,a,u,c,f,"next",d)}function f(d){kB(l,a,u,c,f,"throw",d)}c(void 0)})}}function H5e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function V5e(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Q5e(a.key),a)}}function Y5e(t,r,i){return r&&V5e(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Q5e(t){var r=F5e(t,"string");return z2(r)=="symbol"?r:r+""}function F5e(t,r){if(z2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(z2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $5e=function(){function t(){H5e(this,t)}return Y5e(t,[{key:"initialize",value:function(){var r=OM(hs().mark(function a(u){var l;return hs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ta.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"configure",value:function(){var r=OM(hs().mark(function a(u){var l,c;return hs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,ta.getState().configure(u);case 3:return l=d.sent,d.abrupt("return",l);case 5:return d.next=7,ta.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var r=OM(hs().mark(function a(u){var l;return hs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ta.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var r=OM(hs().mark(function a(u){var l,c;return hs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=u.workfowId,d.next=3,ta.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 r.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var r=OM(hs().mark(function a(){var u;return hs().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ta.getState().startNewSession();case 2:if(u=c.sent,!u.error){c.next=5;break}return c.abrupt("return",u);case 5:return c.abrupt("return",new Promise(function(f){var d=function(p){f(p)};ta.getState().playWorkflow(d)}));case 6:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var r=OM(hs().mark(function a(){var u;return hs().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ta.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"setNonce",value:function(i){ta.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ta.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){ta.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return ta.getState().getCurrentSessionId()}}])}(),B5e=window.customElements.get("idv-flow");B5e||window.customElements.define("idv-flow",zB);var Z5e=Object.defineProperty,G5e=Object.defineProperties,W5e=Object.getOwnPropertyDescriptors,RB=Object.getOwnPropertySymbols,K5e=Object.prototype.hasOwnProperty,q5e=Object.prototype.propertyIsEnumerable,PB=(t,r,i)=>r in t?Z5e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,jv=(t,r)=>{for(var i in r||(r={}))K5e.call(r,i)&&PB(t,i,r[i]);if(RB)for(var i of RB(r))q5e.call(r,i)&&PB(t,i,r[i]);return t},J5e=(t,r)=>G5e(t,W5e(r)),Xa=(t,r,i)=>new Promise((a,u)=>{var l=d=>{try{f(i.next(d))}catch(g){u(g)}},c=d=>{try{f(i.throw(d))}catch(g){u(g)}},f=d=>d.done?a(d.value):Promise.resolve(d.value).then(l,c);f((i=i.apply(t,r)).next())}),UB=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function HB(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var VB={exports:{}},x0={},YB={exports:{}},Br={},QB;function X5e(){if(QB)return Br;QB=1;/**
|
|
62
|
+
`),a=new Blob([i],{type:"text/plain"}),u=window.URL.createObjectURL(a),l=document.createElement("a");l.download="log.txt",l.href=u,l.click(),window.URL.revokeObjectURL(u),this._logs=[]}}}])}();const hv=new c5e;function L2(t){"@babel/helpers - typeof";return L2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},L2(t)}function xn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */xn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,w,_){z[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(z,w,_){return Object.defineProperty(z,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[w]}try{g({},"")}catch(z){g=function(_,U,Y){return _[U]=Y}}function p(z,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),Q=new oe(U||[]);return u(A,"_invoke",{value:q(z,_,Q)}),A}function h(z,w,_){try{return{type:"normal",arg:z.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var S={};g(S,c,function(){return this});var R=Object.getPrototypeOf,P=R&&R(R(le([])));P&&P!==i&&a.call(P,c)&&(S=P);var B=T.prototype=L.prototype=Object.create(S);function Z(z){["next","throw","return"].forEach(function(w){g(z,w,function(_){return this._invoke(w,_)})})}function F(z,w){function _(Y,A,Q,Me){var de=h(z[Y],z,A);if(de.type!=="throw"){var se=de.arg,De=se.value;return De&&L2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,Q,Me)},function(Oe){_("throw",Oe,Q,Me)}):w.resolve(De).then(function(Oe){se.value=Oe,Q(se)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,Q){function Me(){return new w(function(de,se){_(A,Q,de,se)})}return U=U?U.then(Me,Me):Me()}})}function q(z,w,_){var U=y;return function(Y,A){if(U===E)throw Error("Generator is already running");if(U===m){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var Q=_.delegate;if(Q){var Me=re(Q,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=E;var de=h(z,w,_);if(de.type==="normal"){if(U=_.done?m:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=m,_.method="throw",_.arg=de.arg)}}}function re(z,w){var _=w.method,U=z.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&z.iterator.return&&(w.method="return",w.arg=t,re(z,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,z.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[z.resultName]=A.value,w.next=z.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(z){var w={tryLoc:z[0]};1 in z&&(w.catchLoc=z[1]),2 in z&&(w.finallyLoc=z[2],w.afterLoc=z[3]),this.tryEntries.push(w)}function ne(z){var w=z.completion||{};w.type="normal",delete w.arg,z.completion=w}function oe(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(J,this),this.reset(!0)}function le(z){if(z||z===""){var w=z[c];if(w)return w.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,U=function Y(){for(;++_<z.length;)if(a.call(z,_))return Y.value=z[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(L2(z)+" is not iterable")}return C.prototype=T,u(B,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=g(T,d,"GeneratorFunction"),r.isGeneratorFunction=function(z){var w=typeof z=="function"&&z.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,T):(z.__proto__=T,g(z,d,"GeneratorFunction")),z.prototype=Object.create(B),z},r.awrap=function(z){return{__await:z}},Z(F.prototype),g(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(z,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new F(p(z,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(Q){return Q.done?Q.value:A.next()})},Z(B),g(B,d,"Generator"),g(B,c,function(){return this}),g(B,"toString",function(){return"[object Generator]"}),r.keys=function(z){var w=Object(z),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=le,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ne),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(se,De){return Q.type="throw",Q.arg=w,_.next=se,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],Q=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var Q=A?A.completion:{};return Q.type=w,Q.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(Q)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),ne(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;ne(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:le(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function AB(t,r,i,a,u,l,c){try{var f=t[l](c),d=f.value}catch(g){return void i(g)}f.done?r(d):Promise.resolve(d).then(a,u)}function Zo(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(d){AB(l,a,u,c,f,"next",d)}function f(d){AB(l,a,u,c,f,"throw",d)}c(void 0)})}}function f5e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function M5e(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,SB(a.key),a)}}function d5e(t,r,i){return r&&M5e(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function AM(t,r,i){return(r=SB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function SB(t){var r=g5e(t,"string");return L2(r)=="symbol"?r:r+""}function g5e(t,r){if(L2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(L2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var el=hv.create("wasm_idv"),I5e=function(){function t(r){f5e(this,t),AM(this,"_worker",null),AM(this,"_initialized",!1),AM(this,"_connectedToIdv",!1),AM(this,"_serviceRunning",!1),AM(this,"_userId",Ide(g2e)),AM(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return d5e(t,[{key:"init",value:function(){var r=Zo(xn().mark(function a(){var u,l,c,f;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/20752c9-7cff4ddf6//PlatformAdaptor.worker.js");case 4:return u=g.sent,g.next=7,u.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),el("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/20752c9-7cff4ddf6/",preMain:!0});case 23:return f=g.sent,g.abrupt("return",f);case 25:case"end":return g.stop()}},a,this,[[1,12]])}));function i(){return r.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var r=Zo(xn().mark(function a(u){var l;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_idv",connectionParams:{deviceDescriptor:{deviceId:this._userId,deviceType:tE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2,workflowId:"111"},host:u.host,httpRetryCount:u.httpRetryCount||0,httpTimeoutMs:u.httpTimeoutMs||0,isSecure:!0,password:u.password,port:u.port?u.port:0,schema:u.schema?u.schema:"basic",userName:u.userName},preMain:!0});case 2:return l=f.sent,el("IdvWasmService is running succesfully. Connect result: ".concat(JSON.stringify(l))),l.code===0&&(this._serviceRunning=!0,this._connectedToIdv=!0),f.abrupt("return",l);case 6:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"connectByUrl",value:function(){var r=Zo(xn().mark(function a(u){var l;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({target:"custom",method:"connect_by_url",connectByUrlParams:{deviceDescriptor:{deviceId:this._userId,deviceType:tE.deviceType,serial:"1111111222211",macAddress:"00:00:00:00:00:00",heartbeatCadence:2},httpRetryCount:5,httpTimeoutMs:1e3,url:u},preMain:!0});case 2:return l=f.sent,l.code===0&&(this._serviceRunning=!0),f.abrupt("return",l);case 5:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startSession",value:function(){var r=Zo(xn().mark(function a(u){var l,c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l={workflowId:u},d.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:l,preMain:!0});case 3:return c=d.sent,el("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 r.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var r=Zo(xn().mark(function a(u){var l,c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l={sessionId:u},d.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=d.sent,el("continue session result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var r=Zo(xn().mark(function a(){var u,l,c=arguments;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},d.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=d.sent,el("listWorkflows result: ".concat(JSON.stringify(l))),d.abrupt("return",l);case 6:case"end":return d.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"abandonSession",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getWorkflow",value:function(){var r=Zo(xn().mark(function a(u){var l;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.sendMessage({workflowIdParams:{workflowId:u},target:"custom",method:"get_workflow",preMain:!0});case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"pushData",value:function(){var r=Zo(xn().mark(function a(u,l){var c;return xn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return el("Push data: ".concat(u," , ").concat(JSON.stringify(l))),d.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 3:return c=d.sent,el("Push data result: ".concat(JSON.stringify(c))),d.abrupt("return",c);case 6:case"end":return d.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"waitForSessionUpdate",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,el("Wait for session update result: ".concat(JSON.stringify(u))),c.abrupt("return",u);case 5:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"disconnect",value:function(){var r=Zo(xn().mark(function a(){var u;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 u=c.sent,this._connectedToIdv=!1,this._serviceRunning=!1,c.abrupt("return",u);case 6:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"sendMessage",value:function(){var r=Zo(xn().mark(function a(u){var l=this;return xn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.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"){el(JSON.stringify(p.data.content));return}if(h==="custom"){var y=p.data,N=y.method,E=y.data;el("::: custom method, ".concat(N,", ").concat(JSON.stringify(E))),N==="onRuntimeInitialized"&&(l._initialized=!0),d(E)}if(h==="stderr"){var m=p.data.content;el(JSON.stringify(m)),l._setErrorScreen&&l._setErrorScreen(m)}},l._worker.postMessage(u)}));case 1:case"end":return f.stop()}},a)}));function i(a){return r.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 r=Zo(xn().mark(function a(){var u;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 u=c.sent,this.terminateWorker(),c.abrupt("return",u);case 10:case"end":return c.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()}])}();function w2(t){"@babel/helpers - typeof";return w2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},w2(t)}function OB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function b2(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?OB(Object(i),!0).forEach(function(a){Nv(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):OB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Nv(t,r,i){return(r=p5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function p5e(t){var r=y5e(t,"string");return w2(r)=="symbol"?r:r+""}function y5e(t,r){if(w2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(w2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Jn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Jn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,w,_){z[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(z,w,_){return Object.defineProperty(z,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[w]}try{g({},"")}catch(z){g=function(_,U,Y){return _[U]=Y}}function p(z,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),Q=new oe(U||[]);return u(A,"_invoke",{value:q(z,_,Q)}),A}function h(z,w,_){try{return{type:"normal",arg:z.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var S={};g(S,c,function(){return this});var R=Object.getPrototypeOf,P=R&&R(R(le([])));P&&P!==i&&a.call(P,c)&&(S=P);var B=T.prototype=L.prototype=Object.create(S);function Z(z){["next","throw","return"].forEach(function(w){g(z,w,function(_){return this._invoke(w,_)})})}function F(z,w){function _(Y,A,Q,Me){var de=h(z[Y],z,A);if(de.type!=="throw"){var se=de.arg,De=se.value;return De&&w2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,Q,Me)},function(Oe){_("throw",Oe,Q,Me)}):w.resolve(De).then(function(Oe){se.value=Oe,Q(se)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,Q){function Me(){return new w(function(de,se){_(A,Q,de,se)})}return U=U?U.then(Me,Me):Me()}})}function q(z,w,_){var U=y;return function(Y,A){if(U===E)throw Error("Generator is already running");if(U===m){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var Q=_.delegate;if(Q){var Me=re(Q,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=E;var de=h(z,w,_);if(de.type==="normal"){if(U=_.done?m:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=m,_.method="throw",_.arg=de.arg)}}}function re(z,w){var _=w.method,U=z.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&z.iterator.return&&(w.method="return",w.arg=t,re(z,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,z.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[z.resultName]=A.value,w.next=z.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(z){var w={tryLoc:z[0]};1 in z&&(w.catchLoc=z[1]),2 in z&&(w.finallyLoc=z[2],w.afterLoc=z[3]),this.tryEntries.push(w)}function ne(z){var w=z.completion||{};w.type="normal",delete w.arg,z.completion=w}function oe(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(J,this),this.reset(!0)}function le(z){if(z||z===""){var w=z[c];if(w)return w.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,U=function Y(){for(;++_<z.length;)if(a.call(z,_))return Y.value=z[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(w2(z)+" is not iterable")}return C.prototype=T,u(B,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=g(T,d,"GeneratorFunction"),r.isGeneratorFunction=function(z){var w=typeof z=="function"&&z.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,T):(z.__proto__=T,g(z,d,"GeneratorFunction")),z.prototype=Object.create(B),z},r.awrap=function(z){return{__await:z}},Z(F.prototype),g(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(z,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new F(p(z,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(Q){return Q.done?Q.value:A.next()})},Z(B),g(B,d,"Generator"),g(B,c,function(){return this}),g(B,"toString",function(){return"[object Generator]"}),r.keys=function(z){var w=Object(z),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=le,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ne),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(se,De){return Q.type="throw",Q.arg=w,_.next=se,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],Q=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var Q=A?A.completion:{};return Q.type=w,Q.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(Q)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),ne(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;ne(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:le(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function _B(t,r,i,a,u,l,c){try{var f=t[l](c),d=f.value}catch(g){return void i(g)}f.done?r(d):Promise.resolve(d).then(a,u)}function Ss(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(d){_B(l,a,u,c,f,"next",d)}function f(d){_B(l,a,u,c,f,"throw",d)}c(void 0)})}}var h5e=hv.create("store_idv"),N5e=function(r,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=Ss(Jn().mark(function l(){var c;return Jn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return c=new I5e,d.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return d.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return Ss(Jn().mark(function l(){var c,f,d,g,p;return Jn().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,(f=i().wasmService)===null||f===void 0?void 0:f.disconnect();case 3:return y.next=5,i().wasmService.prepareAndConnect(u);case 5:if(d=y.sent,g=null,d.code===4&&(g=T2.HTTP_ISSUE),d.code!==0&&d.code!==4&&(g=T2.PROVIDER_ERROR),g===null){y.next=12;break}return p=new a0({errorCode:g}),y.abrupt("return",{error:p});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return Ss(Jn().mark(function l(){var c,f,d,g,p;return Jn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().wasmService,y.next=3,c.connectByUrl(u);case 3:if(f=y.sent,d=null,f.code===4&&(d=T2.HTTP_ISSUE),f.code!==0&&f.code!==4&&(d=T2.PROVIDER_ERROR),d===null){y.next=13;break}return g=new a0({errorCode:d}),p=new w5({errorCode:nE.CONNECTION_ISSUE,underlyingBaseError:g}),y.abrupt("return",{workflows:[],error:p});case 13:return y.abrupt("return",{workflows:f.data});case 14:case"end":return y.stop()}},l)}))()},workflowSessionCompletion:function(){},setWorkflowSessionCompletion:function(u){var l=function(f){var d,g=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId,p=b2(b2({},f.results),{},{sessionId:g}),h=b2({results:p},f.error&&{error:f.error});i().setCurrentSessionDataLsAndStore(null),u(h)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=Ss(Jn().mark(function l(){var c,f,d,g;return Jn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=i().externalModulesNames,h.prev=1,h.next=4,E5e(c);case 4:return f=h.sent,r(function(){return{externalModules:f}}),h.abrupt("return",{});case 9:return h.prev=9,h.t0=h.catch(1),(d=i().wasmService)===null||d===void 0||d.shutdown(),i().resetWasmService(),i().resetProps(),g=new i0({errorCode:Bd.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:g});case 16:case"end":return h.stop()}},l,null,[[1,9]])}));function u(){return a.apply(this,arguments)}return u}(),setProcessingTemplate:function(u){var l=tm(u.find(function(c){return c.templateId===lR}));l.templateLayout=uH(l.templateLayout,i().layout),r({proccessingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=Ss(Jn().mark(function l(c,f){var d,g,p;return Jn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return d=null,g=function(){var N=Ss(Jn().mark(function E(){var m,j,L,C;return Jn().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,i().wasmService.pushData(c,f);case 2:if(m=S.sent,j=null,m.code===4&&(j=ys.HTTP_ISSUE),m.code!==0&&m.code!==4&&(j=ys.PROVIDER_ERROR),j!==null&&(L=new o0({errorCode:ys.HTTP_ISSUE}),C=new tu({errorCode:eu.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:L}),d=C),m.code!==0){S.next=12;break}return d=null,S.abrupt("return",m);case 12:return S.abrupt("return",null);case 13:case"end":return S.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),p=function(){return null},y.next=5,nm(g,p);case 5:return y.abrupt("return",d?{error:d}:{});case 6:case"end":return y.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),_findStepById:function(u){var l=i().workflow;if(!(!l||!u))return l.steps.find(function(c){return c.id===u})},_waitingForNextStep:function(){var a=Ss(Jn().mark(function l(){var c,f,d,g,p;return Jn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,f=null,d=function(){var N=Ss(Jn().mark(function E(){var m,j,L,C,T,S,R,P,B,Z,F,q,re,J,ne;return Jn().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return le.next=2,i().wasmService.getSessionState();case 2:if(C=le.sent,T=(m=C.data)===null||m===void 0?void 0:m.currentStep,S=(j=C.data)===null||j===void 0?void 0:j.isProcessingFiles,R=(L=C.data)===null||L===void 0||(L=L.workflow)===null||L===void 0?void 0:L.steps,P=Mde(R,T),B=C.code===4,Z=C.code!==0&&C.code!==4,F=C.code===0&&(!C.data.workflow||!C.data.currentStep),q=T&&T===c,re=null,R&&!P&&(re=ys.NOT_DATA_TYPE),B&&(re=ys.HTTP_ISSUE),Z&&(re=ys.PROVIDER_ERROR),S&&(re=ys.IS_PROCESSING),q&&(re=ys.SAME_STEP),F&&(re=ys.DECODING_FAILED),re!==null&&(J=new o0({errorCode:re}),ne=new tu({errorCode:eu.INTERNAL_ISSUE,underlyingBaseError:J}),f=ne),h5e(JSON.stringify({nextStep:T,isDataType:P,isProcessingFiles:S})),!(P&&!q&&!S&&!B&&!Z&&!F)){le.next=23;break}return f=null,le.abrupt("return",C.data);case 23:return le.abrupt("return",null);case 24:case"end":return le.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),g=function(){return null},y.next=6,nm(d,g);case 6:if(p=y.sent,!f){y.next=9;break}return y.abrupt("return",{error:f});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 u(){return a.apply(this,arguments)}return u}(),setFinalStepAndStopProcess:function(u){var l=u||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:pM.SERVICE,eventType:Fd.MESSAGE,message:$d.DID_END_SESSION}))}},pushStepWaitNextStepAndSet:function(){var a=Ss(Jn().mark(function l(c,f){var d,g,p,h,y,N,E,m;return Jn().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(i().setIsProcessing(!0),!i().isFinalWaitingUi){L.next=4;break}return i().setFinalStepAndStopProcess(),L.abrupt("return");case 4:if(!(f instanceof bn)){L.next=10;break}return d=f,g=new tu({errorCode:eu.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:d}),i().workflowSessionCompletion({error:g}),i().resetSession(),L.abrupt("return");case 10:return L.next=12,i()._pushStep(c,f);case 12:if(p=L.sent,!p.error){L.next=17;break}return i().workflowSessionCompletion({error:p.error}),i().resetSession(),L.abrupt("return");case 17:return L.next=19,i()._waitingForNextStep();case 19:if(h=L.sent,!h.error){L.next=24;break}return i().workflowSessionCompletion({error:h.error}),i().resetSession(),L.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(T){return!!T&&Object.prototype.toString.call(T)==="[object Object]"&&T.templateId},!(E!=null&&E.final&&!m(E.client))){L.next=34;break}return i().setFinalStepAndStopProcess(E.id),L.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 L.stop()}},l)}));function u(l,c){return a.apply(this,arguments)}return u}(),continueSession:function(){var a=Ss(Jn().mark(function l(){var c,f,d,g,p,h,y,N,E,m,j,L,C;return Jn().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(c={isContinue:!1},f=i().workflow,d=i().getCurrentSessionDataLs(),g=i().sessionRestoreMode,g){S.next=6;break}return S.abrupt("return",c);case 6:if(d){S.next=8;break}return S.abrupt("return",c);case 8:if(p=d.sessionId,h=d.workflowId,!(!p||h!==f.id)){S.next=11;break}return S.abrupt("return",c);case 11:return S.next=13,i().wasmService.continueSession(p);case 13:return y=S.sent,N=y.data,E=N.currentStep,"id"in N&&"currentStep"in N||(m=new u0({errorCode:S5.DECODING_FAILED}),j=new tu({errorCode:eu.START_SESSION_ERROR,underlyingBaseError:m}),c=b2(b2({},c),{},{error:j})),L=i()._findStepById(E),(L==null?void 0:L.final)===!1?(C=N.currentStep,i().setIsProcessing(!1),i().setCurrentStepId(C),i().setCurrentSessionDataLsAndStore({sessionId:N.id,workflowId:h}),i().listener({target:pM.SERVICE,eventType:Fd.MESSAGE,message:$d.DID_START_RESTORE_SESSION}),c=b2(b2({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),S.abrupt("return",c);case 20:case"end":return S.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),onChangeScreen:function(u,l){if(!u&&!l)return r(function(){return{currentScreenConfig:null}});if(l)return r(function(){return{currentScreenConfig:l}});if(u===null)return r(function(){return{currentScreenConfig:null}});var c=i().workflow,f=null;if(u===lR)f=i().proccessingTransformedTemplate;else{var d;if(f=(d=i()._findStepById(u))===null||d===void 0?void 0:d.client,f!==null){var g;f.sessionId=(g=i().currentSessionData)===null||g===void 0?void 0:g.sessionId}f&&f.templateLayout&&(f.templateLayout=uH(f.templateLayout,i().layout))}var p=fde(i().externalModules,c.steps,u);if(f===null||!p){var h=new tu({errorCode:eu.UNKNOWN_STEP,message:"Unsupported step template"});i().workflowSessionCompletion({error:h}),r(function(){return{currentScreenConfig:null}}),i().resetSession();return}i().setCurrentStepId(u),r(function(){return{currentScreenConfig:f}})},deinitializationIdv:function(){var a=Ss(Jn().mark(function l(){var c,f;return Jn().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(f=g.sent,i().resetWasmService(),i().externalModules.forEach(function(p){p.component.deinitialize&&p.component.isReady&&p.component.deinitialize()}),(f==null?void 0:f.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 u(){return a.apply(this,arguments)}return u}(),resetSession:function(){return r(function(){return{isFinalWaitingUi:!1,isProcessing:!1,proccessingTransformedTemplate:null,currentStepId:null,layout:null,currentScreenConfig:null,workflowId:void 0,workflow:null}})},resetWasmService:function(){return r(function(){return{wasmService:null}})}}};function E5e(t){return Ev.apply(this,arguments)}function Ev(){return Ev=Ss(Jn().mark(function t(r){var i,a,u,l,c,f;return Jn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:i=[{id:e1.getIdentifier(),supportedTemplates:e1.getSupportedTemplates(),component:e1}],a=Nv(Nv({},"LIVENESS",function(){return Promise.resolve().then(()=>f$e)}),"DOC_READER",function(){return Promise.resolve().then(()=>Pvt)}),u=Jn().mark(function p(){var h,y,N;return Jn().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=r;case 4:if(!(l<c.length)){g.next=9;break}return g.delegateYield(u(),"t0",6);case 6:l++,g.next=4;break;case 9:return f=i.filter(function(p){return p!==null}),g.abrupt("return",f);case 11:case"end":return g.stop()}},t)})),Ev.apply(this,arguments)}function S0(t){"@babel/helpers - typeof";return S0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},S0(t)}function xB(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),i.push.apply(i,a)}return i}function mv(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?xB(Object(i),!0).forEach(function(a){m5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function m5e(t,r,i){return(r=D5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function D5e(t){var r=v5e(t,"string");return S0(r)=="symbol"?r:r+""}function v5e(t,r){if(S0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(S0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ta=lMe(function(){return mv(mv(mv({},Nde.apply(void 0,arguments)),Sde.apply(void 0,arguments)),N5e.apply(void 0,arguments))}),j5e=function(r){var i=r.children;return Xn.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:i})},T5e=function(){var r=ta(function(E){return E.currentScreenConfig}),i=ta(function(E){return E.pushStepWaitNextStepAndSet}),a=ta(function(E){return E.proccessingTransformedTemplate}),u=ta(function(E){return E.isProcessing}),l=ta(function(E){return E.setIsProcessing}),c=ta(function(E){return E.currentStepId}),f=ta(function(E){return E.listener}),d=ta(function(E){return E.externalModules}),g=ta(function(E){return E.modulesConfig}),p=function(m,j){f({target:pM.WEB_COMPONENT,eventType:Fd.MESSAGE,message:j,module:m})},h=function(m){l(m)},y=function(m){c&&(l(!1),i(c,m))},N=Kn.useCallback(function(){if(!r)return Xn.jsx(j5e,{children:"Waiting for play... or process completed"});var E=d.find(function(m){return m.supportedTemplates.includes(r.templateId)});if(E&&r)return Xn.jsx(E.component,{perform:y,moduleProps:r,modulesConfig:g,idvEventListener:p,isProcessing:h})},[r,d]);return Xn.jsx(Xn.Fragment,{children:Xn.jsx(bR,{direction:rE.Ltr,children:Xn.jsxs(Xn.Fragment,{children:[u&&Xn.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?Xn.jsx(e1,{perform:y,moduleProps:a,idvEventListener:p,isProcessing:h}):"Processing..."}),N()]})})})};function C5e(){return Xn.jsx(Kn.StrictMode,{children:Xn.jsx(H2e,{children:Xn.jsx(T5e,{})})})}const A5e="*,*: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}",S5e="._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 SM(t){"@babel/helpers - typeof";return SM=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},SM(t)}function O5e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function LB(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,bB(a.key),a)}}function _5e(t,r,i){return r&&LB(t.prototype,r),i&&LB(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function x5e(t,r,i){return r=_0(r),L5e(t,vv()?Reflect.construct(r,[],_0(t).constructor):r.apply(t,i))}function L5e(t,r){if(r&&(SM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w5e(t)}function w5e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b5e(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&O0(t,r)}function Dv(t){var r=typeof Map=="function"?new Map:void 0;return Dv=function(a){if(a===null||!k5e(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(a))return r.get(a);r.set(a,u)}function u(){return z5e(a,arguments,_0(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),O0(u,a)},Dv(t)}function z5e(t,r,i){if(vv())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return i&&O0(u,i.prototype),u}function vv(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(vv=function(){return!!t})()}function k5e(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function O0(t,r){return O0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},O0(t,r)}function _0(t){return _0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_0(t)}function wB(t,r,i){return(r=bB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function bB(t){var r=R5e(t,"string");return SM(r)=="symbol"?r:r+""}function R5e(t,r){if(SM(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(SM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var P5e=[A5e,S5e],U5e=[].concat(P5e).reduce(function(t,r){return t+r.toString()},""),zB=function(t){function r(){var i;return O5e(this,r),i=x5e(this,r),wB(i,"_root",s2e.createRoot(i.attachShadow({mode:"open"}))),wB(i,"_mounted",!1),i}return b5e(r,t),_5e(r,[{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(Xn.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[Xn.jsx("style",{nonce:ta.getState().getNonce(),children:U5e}),Xn.jsx(C5e,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount())}),hv.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(Dv(HTMLElement));function z2(t){"@babel/helpers - typeof";return z2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},z2(t)}function hs(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */hs=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(z,w,_){z[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(z,w,_){return Object.defineProperty(z,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),z[w]}try{g({},"")}catch(z){g=function(_,U,Y){return _[U]=Y}}function p(z,w,_,U){var Y=w&&w.prototype instanceof L?w:L,A=Object.create(Y.prototype),Q=new oe(U||[]);return u(A,"_invoke",{value:q(z,_,Q)}),A}function h(z,w,_){try{return{type:"normal",arg:z.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=p;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var S={};g(S,c,function(){return this});var R=Object.getPrototypeOf,P=R&&R(R(le([])));P&&P!==i&&a.call(P,c)&&(S=P);var B=T.prototype=L.prototype=Object.create(S);function Z(z){["next","throw","return"].forEach(function(w){g(z,w,function(_){return this._invoke(w,_)})})}function F(z,w){function _(Y,A,Q,Me){var de=h(z[Y],z,A);if(de.type!=="throw"){var se=de.arg,De=se.value;return De&&z2(De)=="object"&&a.call(De,"__await")?w.resolve(De.__await).then(function(Oe){_("next",Oe,Q,Me)},function(Oe){_("throw",Oe,Q,Me)}):w.resolve(De).then(function(Oe){se.value=Oe,Q(se)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(A,Q){function Me(){return new w(function(de,se){_(A,Q,de,se)})}return U=U?U.then(Me,Me):Me()}})}function q(z,w,_){var U=y;return function(Y,A){if(U===E)throw Error("Generator is already running");if(U===m){if(Y==="throw")throw A;return{value:t,done:!0}}for(_.method=Y,_.arg=A;;){var Q=_.delegate;if(Q){var Me=re(Q,_);if(Me){if(Me===j)continue;return Me}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(U===y)throw U=m,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);U=E;var de=h(z,w,_);if(de.type==="normal"){if(U=_.done?m:N,de.arg===j)continue;return{value:de.arg,done:_.done}}de.type==="throw"&&(U=m,_.method="throw",_.arg=de.arg)}}}function re(z,w){var _=w.method,U=z.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&z.iterator.return&&(w.method="return",w.arg=t,re(z,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var Y=h(U,z.iterator,w.arg);if(Y.type==="throw")return w.method="throw",w.arg=Y.arg,w.delegate=null,j;var A=Y.arg;return A?A.done?(w[z.resultName]=A.value,w.next=z.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):A:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(z){var w={tryLoc:z[0]};1 in z&&(w.catchLoc=z[1]),2 in z&&(w.finallyLoc=z[2],w.afterLoc=z[3]),this.tryEntries.push(w)}function ne(z){var w=z.completion||{};w.type="normal",delete w.arg,z.completion=w}function oe(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(J,this),this.reset(!0)}function le(z){if(z||z===""){var w=z[c];if(w)return w.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var _=-1,U=function Y(){for(;++_<z.length;)if(a.call(z,_))return Y.value=z[_],Y.done=!1,Y;return Y.value=t,Y.done=!0,Y};return U.next=U}}throw new TypeError(z2(z)+" is not iterable")}return C.prototype=T,u(B,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=g(T,d,"GeneratorFunction"),r.isGeneratorFunction=function(z){var w=typeof z=="function"&&z.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(z){return Object.setPrototypeOf?Object.setPrototypeOf(z,T):(z.__proto__=T,g(z,d,"GeneratorFunction")),z.prototype=Object.create(B),z},r.awrap=function(z){return{__await:z}},Z(F.prototype),g(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(z,w,_,U,Y){Y===void 0&&(Y=Promise);var A=new F(p(z,w,_,U),Y);return r.isGeneratorFunction(w)?A:A.next().then(function(Q){return Q.done?Q.value:A.next()})},Z(B),g(B,d,"Generator"),g(B,c,function(){return this}),g(B,"toString",function(){return"[object Generator]"}),r.keys=function(z){var w=Object(z),_=[];for(var U in w)_.push(U);return _.reverse(),function Y(){for(;_.length;){var A=_.pop();if(A in w)return Y.value=A,Y.done=!1,Y}return Y.done=!0,Y}},r.values=le,oe.prototype={constructor:oe,reset:function(w){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(ne),!w)for(var _ in this)_.charAt(0)==="t"&&a.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=t)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function U(se,De){return Q.type="throw",Q.arg=w,_.next=se,De&&(_.method="next",_.arg=t),!!De}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var A=this.tryEntries[Y],Q=A.completion;if(A.tryLoc==="root")return U("end");if(A.tryLoc<=this.prev){var Me=a.call(A,"catchLoc"),de=a.call(A,"finallyLoc");if(Me&&de){if(this.prev<A.catchLoc)return U(A.catchLoc,!0);if(this.prev<A.finallyLoc)return U(A.finallyLoc)}else if(Me){if(this.prev<A.catchLoc)return U(A.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return U(A.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&a.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var A=Y;break}}A&&(w==="break"||w==="continue")&&A.tryLoc<=_&&_<=A.finallyLoc&&(A=null);var Q=A?A.completion:{};return Q.type=w,Q.arg=_,A?(this.method="next",this.next=A.finallyLoc,j):this.complete(Q)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),j},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.finallyLoc===w)return this.complete(U.completion,U.afterLoc),ne(U),j}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var U=this.tryEntries[_];if(U.tryLoc===w){var Y=U.completion;if(Y.type==="throw"){var A=Y.arg;ne(U)}return A}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:le(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function kB(t,r,i,a,u,l,c){try{var f=t[l](c),d=f.value}catch(g){return void i(g)}f.done?r(d):Promise.resolve(d).then(a,u)}function OM(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(d){kB(l,a,u,c,f,"next",d)}function f(d){kB(l,a,u,c,f,"throw",d)}c(void 0)})}}function H5e(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function V5e(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Q5e(a.key),a)}}function Y5e(t,r,i){return r&&V5e(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Q5e(t){var r=F5e(t,"string");return z2(r)=="symbol"?r:r+""}function F5e(t,r){if(z2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(z2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $5e=function(){function t(){H5e(this,t)}return Y5e(t,[{key:"initialize",value:function(){var r=OM(hs().mark(function a(u){var l;return hs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ta.getState().initialize(u),f.abrupt("return",l);case 2:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"configure",value:function(){var r=OM(hs().mark(function a(u){var l,c;return hs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(typeof u=="string"){d.next=5;break}return d.next=3,ta.getState().configure(u);case 3:return l=d.sent,d.abrupt("return",l);case 5:return d.next=7,ta.getState().configureWithUrl(u);case 7:return c=d.sent,d.abrupt("return",c);case 9:case"end":return d.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var r=OM(hs().mark(function a(u){var l;return hs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ta.getState().getWorkflows(u);case 2:return l=f.sent,f.abrupt("return",l);case 4:case"end":return f.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"prepareWorkflow",value:function(){var r=OM(hs().mark(function a(u){var l,c;return hs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return l=u.workfowId,d.next=3,ta.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 r.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var r=OM(hs().mark(function a(){var u;return hs().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ta.getState().startNewSession();case 2:if(u=c.sent,!u.error){c.next=5;break}return c.abrupt("return",u);case 5:return c.abrupt("return",new Promise(function(f){var d=function(p){f(p)};ta.getState().playWorkflow(d)}));case 6:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var r=OM(hs().mark(function a(){var u;return hs().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ta.getState().deinitialize();case 2:return u=c.sent,c.abrupt("return",u);case 4:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"setNonce",value:function(i){ta.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ta.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){ta.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return ta.getState().getCurrentSessionId()}}])}(),B5e=window.customElements.get("idv-flow");B5e||window.customElements.define("idv-flow",zB);var Z5e=Object.defineProperty,G5e=Object.defineProperties,W5e=Object.getOwnPropertyDescriptors,RB=Object.getOwnPropertySymbols,K5e=Object.prototype.hasOwnProperty,q5e=Object.prototype.propertyIsEnumerable,PB=(t,r,i)=>r in t?Z5e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,jv=(t,r)=>{for(var i in r||(r={}))K5e.call(r,i)&&PB(t,i,r[i]);if(RB)for(var i of RB(r))q5e.call(r,i)&&PB(t,i,r[i]);return t},J5e=(t,r)=>G5e(t,W5e(r)),Xa=(t,r,i)=>new Promise((a,u)=>{var l=d=>{try{f(i.next(d))}catch(g){u(g)}},c=d=>{try{f(i.throw(d))}catch(g){u(g)}},f=d=>d.done?a(d.value):Promise.resolve(d.value).then(l,c);f((i=i.apply(t,r)).next())}),UB=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function HB(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var VB={exports:{}},x0={},YB={exports:{}},Br={},QB;function X5e(){if(QB)return Br;QB=1;/**
|
|
63
63
|
* @license React
|
|
64
64
|
* react.production.min.js
|
|
65
65
|
*
|
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-ddoxD3zI.js";
|
|
2
2
|
export {
|
|
3
3
|
a as ConnectionError,
|
|
4
4
|
e as DeinitializationError,
|
package/package.json
CHANGED