@regulaforensics/idv-capture-web 0.1.107-nightly → 0.1.110-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.
|
@@ -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-D-DKVc4t.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]);
|
|
@@ -22,7 +22,7 @@ var b1 = (e) => {
|
|
|
22
22
|
throw l;
|
|
23
23
|
}, "return" in r && i("return"), o;
|
|
24
24
|
};
|
|
25
|
-
import { B as cc, r as Bs, j as CE } from "./index-
|
|
25
|
+
import { B as cc, r as Bs, j as CE } from "./index-D-DKVc4t.js";
|
|
26
26
|
var KT = Object.defineProperty, qT = Object.defineProperties, QT = Object.getOwnPropertyDescriptors, SE = Object.getOwnPropertySymbols, JT = Object.prototype.hasOwnProperty, XT = Object.prototype.propertyIsEnumerable, Fo = (e, r) => (r = Symbol[e]) ? r : Symbol.for("Symbol." + e), $T = (e) => {
|
|
27
27
|
throw TypeError(e);
|
|
28
28
|
}, gE = (e, r, t) => r in e ? KT(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, tt = (e, r) => {
|
|
@@ -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/40e5940-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/40e5940-7cff4ddf6/",
|
|
18079
18079
|
preMain: !0
|
|
18080
18080
|
});
|
|
18081
18081
|
case 23:
|
|
@@ -19396,9 +19396,9 @@ function s2() {
|
|
|
19396
19396
|
supportedTemplates: Wn.getSupportedTemplates(),
|
|
19397
19397
|
component: Wn
|
|
19398
19398
|
}], o = u2(u2({}, "LIVENESS", function() {
|
|
19399
|
-
return import("./index-
|
|
19399
|
+
return import("./index-BLjDnfNm.js");
|
|
19400
19400
|
}), "DOC_READER", function() {
|
|
19401
|
-
return import("./index-
|
|
19401
|
+
return import("./index-BNxImuVK.js");
|
|
19402
19402
|
}), u = /* @__PURE__ */ br().mark(function h() {
|
|
19403
19403
|
var w, g, S;
|
|
19404
19404
|
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 Pge(t,r){if(t){if(typeof t=="string")return U$(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)?U$(t,r):void 0}}function U$(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 Uge(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function Hge(t){if(Array.isArray(t))return t}var wM=function(t){var r=t.imageId,i=t.imageURL,a=t.base64,u=t.contentMode,l=u===void 0?j0.ASPECT_FILL:u,c=t.cornerRadius,f=t.backgroundColor,M=f===void 0?"transparent":f,d=function(L){if(L===j0.ASPECT_FILL)return"cover";if(L===j0.ASPECT_FIT)return"contain";if(L===j0.FILL)return"fill"},I=Jn.useState(!0),h=kge(I,2),y=h[0],N=h[1],E=y&&i,m=function(){N(!1)};if(r){var j=r in Iv?r:"default";return ce.jsx(zge,{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:d(l),borderRadius:c,backgroundColor:M,display:E?"none":"block"},src:a||i,onLoad:m})]})},Vge=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(wM,{imageId:r==null?void 0:r.imageId})})})},H$={},V$;function Yge(){if(V$)return H$;V$=1;var t=Dn(),r=Pn(),i=q1(),a=eD(),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()}}),H$}Yge(),JY();var Y$=Jn.createContext(void 0),Qge=function(t){var r=t.perform,i=t.children;return ce.jsx(Y$.Provider,{value:{perform:r},children:i})},Q$=function(){var t=Jn.useContext(Y$);if(!t)throw new Error("usePerform must be used within a PerformProvider");return t},F$={},pv,$$;function Fge(){if($$)return pv;$$=1;var t=xi(),r=Pn(),i=Xn(),a=iI(),u=J5(),l=rl(),c=Dm().f,f=i(c),M=i([].push),d=t&&r(function(){var h=Object.create(null);return h[2]=2,!f(h,2)}),I=function(h){return function(y){for(var N=l(y),E=u(N),m=d&&a(N)===null,j=E.length,L=0,C=[],T;j>L;)T=E[L++],(!t||(m?T in N:f(N,T)))&&M(C,h?[T,N[T]]:N[T]);return C}};return pv={entries:I(!0),values:I(!1)},pv}var B$;function $ge(){if(B$)return F$;B$=1;var t=Dn(),r=Fge().entries;return t({target:"Object",stat:!0},{entries:function(i){return r(i)}}),F$}$ge();function uI(t){"@babel/helpers - typeof";return uI=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},uI(t)}function Z$(t){return t.split("\\n")}function G$(t){return t===v0.CENTER?"center":t===v0.RIGHT?"right":"left"}function yv(t){if(uI(t)==="object"&&t!==null)for(var r in t)uI(t[r])==="object"?yv(t[r]):t[r]==="true"?t[r]=!0:t[r]==="false"&&(t[r]=!1);return t}var Bge={display:"flex",justifyContent:"center",alignItems:"center",background:"white",borderRadius:"50%",width:"36px",height:"36px",border:"none",cursor:"pointer"},Zge=function(t){var r=t.dataTestId,i=t.responseBody,a=Q$(),u=a.perform,l=function(){var c=JSON.parse(JSON.stringify(i));yv(c),u(c)};return ce.jsx("button",{"data-test":r,onClick:l,style:Bge,children:ce.jsx(wM,{imageId:"cross"})},r)},Gge=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(Zge,Fo({dataTestId:"close-btn"},r))})})},W$={},K$;function Wge(){if(K$)return W$;K$=1;var t=Dn(),r=bY(),i=tY().indexOf,a=YF(),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 M=arguments.length>1?arguments[1]:void 0;return l?u(this,f,M)||0:i(this,f,M)}}),W$}Wge();var q$={},J$;function Kge(){if(J$)return q$;J$=1;var t=Dn(),r=rI().map,i=B6(),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)}}),q$}Kge();var qge={},X$={},hv,eB;function Jge(){if(eB)return hv;eB=1;var t=no(),r=k2(),i=qa(),a=sv(),u=E$(),l=A6(),c=u(function(){var f=this.iterator,M=i(t(this.next,f)),d=this.done=!!M.done;if(!d)return l(f,this.mapper,[M.value,this.counter++],!0)});return hv=function(f){return i(this),r(f),new c(a(this),{mapper:f})},hv}var tB;function Xge(){if(tB)return X$;tB=1;var t=Dn(),r=Jge(),i=n1();return t({target:"Iterator",proto:!0,real:!0,forced:i},{map:r}),X$}var rB;function e5e(){return rB||(rB=1,Xge()),qge}e5e();var C0=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,M=t.alignment,d=M===void 0?v0.LEFT:M,I=t.backgroundColor,h=I===void 0?"transparent":I,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:G$(d),backgroundColor:h,borderRadius:N},children:r&&Z$(r)})};function A0(t){"@babel/helpers - typeof";return A0=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},A0(t)}function Nv(t,r,i){return(r=t5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function t5e(t){var r=r5e(t,"string");return A0(r)=="symbol"?r:r+""}function r5e(t,r){if(A0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(A0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var n5e=function(t){var r=t.title,i=t.image,a=t.responseBody,u=t.backgroundColor,l=t.cornerRadius,c=t.highlightColor,f=t.dataTestId,M=t.children,d=Q$(),I=d.perform,h=function(){var N=JSON.parse(JSON.stringify(a));yv(N),I(N)},y=Nv(Nv(Nv({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(wM,{imageURL:i.imageURL}),M||ce.jsx(C0,Fo({},r))]},f)};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)}var i5e=["items"];function nB(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 iB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?nB(Object(i),!0).forEach(function(a){a5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):nB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function a5e(t,r,i){return(r=o5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function o5e(t){var r=u5e(t,"string");return S0(r)=="symbol"?r:r+""}function u5e(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)}function s5e(t,r){if(t==null)return{};var i,a,u=l5e(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 l5e(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 c5e=function(t){var r=t.items,i=s5e(t,i5e),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:iB(iB({},a),i),children:r.map(function(u){var l,c;return ce.jsx(n5e,Fo({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 O0(t){"@babel/helpers - typeof";return O0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},O0(t)}function aB(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 f5e(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?aB(Object(i),!0).forEach(function(a){M5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):aB(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=g5e(t,"string");return O0(r)=="symbol"?r:r+""}function g5e(t,r){if(O0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(O0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var sI=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,M=a?30:10,d={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?M+10+"px":"10px",paddingLeft:"20px",paddingRight:"20px",height:"100%",width:"100%",backgroundColor:l};return ce.jsxs("div",{id:"base-container",style:f5e({},d),children:[i&&ce.jsx("div",{style:{position:"absolute",top:"0",left:"0",width:"100%",height:f},children:ce.jsx(Gge,{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(c5e,{items:c}),a&&ce.jsx("div",{style:{position:"absolute",bottom:"0",left:"0",width:"100%",height:M},children:ce.jsx(Vge,Fo({},a))})]})},Ev=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?v0.LEFT:c,M=t.fontSize,d=M===void 0?17:M,I=t.backgroundColor,h=I===void 0?"transparent":I,y=t.cornerRadius,N=y===void 0?0:y;return ce.jsx("div",{style:{fontFamily:a+", -apple-system, BlinkMacSystemFont, sans-serif",fontSize:d,textAlign:G$(f),color:l,borderRadius:N,backgroundColor:h,whiteSpace:"pre-line"},children:r&&Z$(r).map(function(E,m){return E.length===0?ce.jsx("br",{},"description-text_"+m):ce.jsx("p",{children:E},"description-text_"+m)})})};function _0(t){"@babel/helpers - typeof";return _0=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},_0(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 uB(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){I5e(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 I5e(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 _0(r)=="symbol"?r:r+""}function y5e(t,r){if(_0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(_0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var h5e=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,M=t.isLastChild,d={display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:M?"none":"1px solid #E0E0E0",padding:"16px 0",gap:16};return ce.jsxs("div",{className:"details-item",style:uB(uB({},d),{},{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(C0,Fo({},r))}),ce.jsx("div",{style:{lineHeight:"21px",fontWeight:"400"},children:ce.jsx(Ev,Fo({},i))})]}),ce.jsx("div",{style:{aspectRatio:"1 / 1",width:120,height:120,flex:"0 0 120px"},children:ce.jsx(wM,Fo({},a))})]})};function x0(t){"@babel/helpers - typeof";return x0=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},x0(t)}function sB(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 lB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?sB(Object(i),!0).forEach(function(a){N5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):sB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function N5e(t,r,i){return(r=E5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function E5e(t){var r=m5e(t,"string");return x0(r)=="symbol"?r:r+""}function m5e(t,r){if(x0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(x0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var D5e={display:"flex",flexDirection:"column",padding:"0 16px"},v5e=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:lB(lB({},D5e),{},{backgroundColor:a,borderRadius:l}),children:r.map(function(c,f){return ce.jsx(h5e,Fo({isLastChild:f===r.length-1},c),f)})})},j5e=function(t){var r=t.title,i=t.indicatorColor,a=i===void 0?"black":i;return ce.jsxs(ce.Fragment,{children:[ce.jsx(P$,{indicatorColor:a}),ce.jsx("div",{children:r==null?void 0:r.text})]})};function T5e(t,r){return O5e(t)||S5e(t,r)||A5e(t,r)||C5e()}function C5e(){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 A5e(t,r){if(t){if(typeof t=="string")return cB(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)?cB(t,r):void 0}}function cB(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 S5e(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function O5e(t){if(Array.isArray(t))return t}var _5e=function(t){var r=t.title,i=t.header,a=t.footer,u=t.details,l=t.buttons,c=t.backgroundColor,f=Jn.useRef(null),M=Jn.useState(!1),d=T5e(M,2),I=d[0],h=d[1];return Jn.useEffect(function(){f.current&&h(f.current.scrollHeight>f.current.clientHeight)},[]),ce.jsx(sI,{header:i,buttons:l,footer:a,backgroundColor:c,children:ce.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:I?"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(C0,Fo({},r))}),u&&ce.jsx(v5e,Fo({},u))]})})},x5e={width:"100%",height:"auto",marginBottom:"32px",aspectRatio:1.61},L5e={position:"relative",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",alignContent:"center",margin:"0 auto",height:"100%",width:"100%",minHeight:"100%",overflow:"auto"};function L0(t){"@babel/helpers - typeof";return L0=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},L0(t)}function fB(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 MB(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?fB(Object(i),!0).forEach(function(a){w5e(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function w5e(t,r,i){return(r=b5e(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function b5e(t){var r=z5e(t,"string");return L0(r)=="symbol"?r:r+""}function z5e(t,r){if(L0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(L0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var k5e=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(sI,{header:i,footer:a,buttons:c,backgroundColor:f,children:ce.jsx(ce.Fragment,{children:ce.jsxs("div",{style:MB(MB({},L5e),{},{justifyContent:u?"flex-start":"center"}),children:[u&&ce.jsx("div",{style:x5e,children:ce.jsx(wM,Fo({},u))}),r&&ce.jsx("div",{style:{marginBottom:20,lineHeight:"39.2px"},children:ce.jsx(C0,Fo({},r))}),l&&ce.jsx("div",{style:{lineHeight:"28px",fontWeight:"400"},children:ce.jsx(Ev,Fo({},l))})]})})})},dB=function(t){var r=t.progressView,i=t.footer,a=t.backgroundColor;return ce.jsx(sI,{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(j5e,{title:(r==null?void 0:r.title)||{text:""},indicatorColor:(r==null?void 0:r.indicatorColor)||"black"})})})},R5e={display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",flex:1,height:"100%",flexDirection:"column"},P5e={width:"86px",height:"86px",marginBottom:"16px",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center"},U5e={fontSize:"20px",fontWeight:700,maxWidth:"345px",textAlign:"center",lineHeight:"24px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",marginBottom:"8px"},H5e={fontSize:"16px",fontWeight:400,lineHeight:"19px",color:"#676767",textAlign:"center"},V5e=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(sI,{header:r,buttons:c,footer:i,backgroundColor:f,children:ce.jsxs("div",{style:R5e,children:[a&&ce.jsx("div",{style:P5e,children:ce.jsx(wM,Fo({},a))}),(u==null?void 0:u.text)&&ce.jsx("div",{style:U5e,children:u&&ce.jsx(C0,Fo({},u))}),(l==null?void 0:l.text)&&ce.jsx("div",{style:H5e,children:ce.jsx(Ev,Fo({},l))})]})})},mv=!1,Y5e=function(t){var r=t.template,i=t.templateLayout;if(r==="STATUS")return ce.jsx(V5e,{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(k5e,{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(dB,{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(_5e,{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})},gB="GUI",i1=function(t){var r=t.moduleProps,i=t.perform,a=r.templateId,u=r.templateLayout,l=Jn.useCallback(function(c){i&&i(c)},[a]);return a&&u?ce.jsx(Qge,{perform:l,children:ce.jsx(Y5e,{template:a,templateLayout:u})}):ce.jsx(dB,{})};i1.getIdentifier=function(){return gB},i1.getSupportedTemplates=function(){return["INFO","INFO_DETAILS","PROGRESS","STATUS"]},i1.deinitialize=function(){mv=!1},i1.initialize=function(){mv=!0},i1.isReady=function(){return mv},i1.displayName=gB;var IB={},pB;function Q5e(){if(pB)return IB;pB=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)}}),IB}Q5e();var yB={},hB={},Dv,NB;function EB(){if(NB)return Dv;NB=1;var t=Rr(),r=Kn(),i=mn(),a=Ko(),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"),M="";return l.pathname="c%20d",c.forEach(function(d,I){c.delete("b"),M+=I+d}),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"||M!=="a1c3"||new URL("https://x",void 0).host!=="x"}),Dv}var vv,mB;function F5e(){if(mB)return vv;mB=1;var t=mn(),r=zr(),i=mi(),a=Rr(),u=S5(),l=C5(),c=iy(),f=Ds(),M=bd(),d=Object.assign,I=Object.defineProperty,h=r([].concat);return vv=!d||a(function(){if(t&&d({b:1},d(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},N={},E=Symbol("assign detection"),m="abcdefghijklmnopqrst";return y[E]=7,m.split("").forEach(function(j){N[j]=j}),d({},y)[E]!==7||u(d({},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 A=M(arguments[L++]),b=C?h(u(A),C(A)):u(A),k=b.length,$=0,Z;k>$;)Z=b[$++],(!t||i(T,A,Z))&&(m[Z]=A[Z]);return m}:d,vv}var jv,DB;function $5e(){if(DB)return jv;DB=1;var t=zr(),r=2147483647,i=36,a=1,u=26,l=38,c=700,f=72,M=128,d="-",I=/[^\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),A=t([].push),b=t("".replace),k=t("".split),$=t("".toLowerCase),Z=function(J){for(var ne=[],oe=0,se=J.length;oe<se;){var R=C(J,oe++);if(R>=55296&&R<=56319&&oe<se){var w=C(J,oe++);(w&64512)===56320?A(ne,((R&1023)<<10)+(w&1023)+65536):(A(ne,R),oe--)}else A(ne,R)}return ne},F=function(J){return J+22+75*(J<26)},K=function(J,ne,oe){var se=0;for(J=oe?j(J/c):J>>1,J+=j(J/ne);J>N*u>>1;)J=j(J/N),se+=i;return j(se+(N+1)*J/(J+l))},ee=function(J){var ne=[];J=Z(J);var oe=J.length,se=M,R=0,w=f,_,U;for(_=0;_<J.length;_++)U=J[_],U<128&&A(ne,L(U));var V=ne.length,S=V;for(V&&A(ne,d);S<oe;){var Q=r;for(_=0;_<J.length;_++)U=J[_],U>=se&&U<Q&&(Q=U);var Me=S+1;if(Q-se>j((r-R)/Me))throw new E(y);for(R+=(Q-se)*Me,se=Q,_=0;_<J.length;_++){if(U=J[_],U<se&&++R>r)throw new E(y);if(U===se){for(var de=R,le=i;;){var De=le<=w?a:le>=w+u?u:le-w;if(de<De)break;var Oe=de-De,Ae=i-De;A(ne,L(F(De+Oe%Ae))),de=j(Oe/Ae),le+=i}A(ne,L(F(de))),w=K(R,Me,S===V),R=0,S++}}R++,se++}return T(ne,"")};return jv=function(J){var ne=[],oe=k(b($(J),h,"."),"."),se,R;for(se=0;se<oe.length;se++)R=oe[se],A(ne,m(I,R)?"xn--"+ee(R):R);return T(ne,".")},jv}var vB={},jB;function B5e(){if(jB)return vB;jB=1;var t=Zt(),r=zr(),i=ih(),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(d){for(var I=[],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");I[y]=N<65536?u(N):u(((N-=65536)>>10)+55296,N%1024+56320)}return c(I,"")}}),vB}var Tv,TB;function Z5e(){if(TB)return Tv;TB=1;var t=Q1(),r=Math.floor,i=function(a,u){var l=a.length;if(l<8)for(var c=1,f,M;c<l;){for(M=c,f=a[c];M&&u(a[M-1],f)>0;)a[M]=a[--M];M!==c++&&(a[M]=f)}else for(var d=r(l/2),I=i(t(a,0,d),u),h=i(t(a,d),u),y=I.length,N=h.length,E=0,m=0;E<y||m<N;)a[E+m]=E<y&&m<N?u(I[E],h[m])<=0?I[E++]:h[m++]:E<y?I[E++]:h[m++];return a};return Tv=i,Tv}var Cv,CB;function AB(){if(CB)return Cv;CB=1,EN(),B5e();var t=Zt(),r=an(),i=sU(),a=Wo(),u=mi(),l=zr(),c=mn(),f=EB(),M=Ka(),d=Wc(),I=QN(),h=tl(),y=hz(),N=Zc(),E=EM(),m=Wn(),j=ji(),L=F1(),C=Vd(),T=Di(),A=_i(),b=Qo(),k=Gc(),$=C2(),Z=zN(),F=z5(),K=Gd(),ee=DM(),J=Kn(),ne=Z5e(),oe=J("iterator"),se="URLSearchParams",R=se+"Iterator",w=N.set,_=N.getterFor(se),U=N.getterFor(R),V=i("fetch"),S=i("Request"),Q=i("Headers"),Me=S&&S.prototype,de=Q&&Q.prototype,le=r.TypeError,De=r.encodeURIComponent,Oe=String.fromCharCode,Ae=a("String","fromCodePoint"),Qe=parseInt,rt=l("".charAt),ot=l([].join),st=l([].push),pt=l("".replace),Ot=l([].shift),At=l([].splice),Ct=l("".split),it=l("".slice),dt=l(/./.exec),ct=/\+/g,yt="�",je=/^[0-9a-f]+$/i,$e=function(Ne,be){var Re=it(Ne,be,be+2);return dt(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},Mt=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=pt(Ne,ct," ");for(var be=Ne.length,Re="",we=0;we<be;){var et=rt(Ne,we);if(et==="%"){if(rt(Ne,we+1)==="%"||we+3>be){Re+="%",we++;continue}var Nt=$e(Ne,we+1);if(Nt!==Nt){Re+=et,we++;continue}we+=2;var Dt=Ge(Nt);if(Dt===0)et=Oe(Nt);else{if(Dt===1||Dt>4){Re+=yt,we++;continue}for(var jt=[Nt],Pt=1;Pt<Dt&&(we++,!(we+3>be||rt(Ne,we)!=="%"));){var Xt=$e(Ne,we+1);if(Xt!==Xt){we+=3;break}if(Xt>191||Xt<128)break;st(jt,Xt),we+=2,Pt++}if(jt.length!==Dt){Re+=yt;continue}var lr=Mt(jt);lr===null?Re+=yt:et=Ae(lr)}}Re+=et,we++}return Re},Se=/[!'()~]|%20/g,Le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ze=function(Ne){return Le[Ne]},gt=function(Ne){return pt(De(Ne),Se,Ze)},ut=y(function(be,Re){w(this,{type:R,target:_(be).entries,index:0,kind:Re})},se,function(){var be=U(this),Re=be.target,we=be.index++;if(!Re||we>=Re.length)return be.target=null,K(void 0,!0);var et=Re[we];switch(be.kind){case"keys":return K(et.key,!1);case"values":return K(et.value,!1)}return K([et.key,et.value],!1)},!0),ke=function(Ne){this.entries=[],this.url=null,Ne!==void 0&&(A(Ne)?this.parseObject(Ne):this.parseQuery(typeof Ne=="string"?rt(Ne,0)==="?"?it(Ne,1):Ne:b(Ne)))};ke.prototype={type:se,bindURL:function(Ne){this.url=Ne,this.update()},parseObject:function(Ne){var be=this.entries,Re=F(Ne),we,et,Nt,Dt,jt,Pt,Xt;if(Re)for(we=Z(Ne,Re),et=we.next;!(Nt=u(et,we)).done;){if(Dt=Z(T(Nt.value)),jt=Dt.next,(Pt=u(jt,Dt)).done||(Xt=u(jt,Dt)).done||!u(jt,Dt).done)throw new le("Expected sequence with length 2");st(be,{key:b(Pt.value),value:b(Xt.value)})}else for(var lr in Ne)j(Ne,lr)&&st(be,{key:lr,value:b(Ne[lr])})},parseQuery:function(Ne){if(Ne)for(var be=this.entries,Re=Ct(Ne,"&"),we=0,et,Nt;we<Re.length;)et=Re[we++],et.length&&(Nt=Ct(et,"="),st(be,{key:He(Ot(Nt)),value:He(ot(Nt,"="))}))},serialize:function(){for(var Ne=this.entries,be=[],Re=0,we;Re<Ne.length;)we=Ne[Re++],st(be,gt(we.key)+"="+gt(we.value));return ot(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(I(xe,{append:function(be,Re){var we=_(this);ee(arguments.length,2),st(we.entries,{key:b(be),value:b(Re)}),c||this.length++,we.updateURL()},delete:function(Ne){for(var be=_(this),Re=ee(arguments.length,1),we=be.entries,et=b(Ne),Nt=Re<2?void 0:arguments[1],Dt=Nt===void 0?Nt:b(Nt),jt=0;jt<we.length;){var Pt=we[jt];if(Pt.key===et&&(Dt===void 0||Pt.value===Dt)){if(At(we,jt,1),Dt!==void 0)break}else jt++}c||(this.size=we.length),be.updateURL()},get:function(be){var Re=_(this).entries;ee(arguments.length,1);for(var we=b(be),et=0;et<Re.length;et++)if(Re[et].key===we)return Re[et].value;return null},getAll:function(be){var Re=_(this).entries;ee(arguments.length,1);for(var we=b(be),et=[],Nt=0;Nt<Re.length;Nt++)Re[Nt].key===we&&st(et,Re[Nt].value);return et},has:function(be){for(var Re=_(this).entries,we=ee(arguments.length,1),et=b(be),Nt=we<2?void 0:arguments[1],Dt=Nt===void 0?Nt:b(Nt),jt=0;jt<Re.length;){var Pt=Re[jt++];if(Pt.key===et&&(Dt===void 0||Pt.value===Dt))return!0}return!1},set:function(be,Re){var we=_(this);ee(arguments.length,1);for(var et=we.entries,Nt=!1,Dt=b(be),jt=b(Re),Pt=0,Xt;Pt<et.length;Pt++)Xt=et[Pt],Xt.key===Dt&&(Nt?At(et,Pt--,1):(Nt=!0,Xt.value=jt));Nt||st(et,{key:Dt,value:jt}),c||(this.size=et.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),et=0,Nt;et<Re.length;)Nt=Re[et++],we(Nt.value,Nt.key,this)},keys:function(){return new ut(this,"keys")},values:function(){return new ut(this,"values")},entries:function(){return new ut(this,"entries")}},{enumerable:!0}),M(xe,oe,xe.entries,{name:"entries"}),M(xe,"toString",function(){return _(this).serialize()},{enumerable:!0}),c&&d(xe,"size",{get:function(){return _(this).entries.length},configurable:!0,enumerable:!0}),h(Te,se),t({global:!0,constructor:!0,forced:!f},{URLSearchParams:Te}),!f&&m(Q)){var Be=l(de.has),It=l(de.set),St=function(Ne){if(A(Ne)){var be=Ne.body,Re;if(C(be)===se)return Re=Ne.headers?new Q(Ne.headers):new Q,Be(Re,"content-type")||It(Re,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),k(Ne,{body:$(0,b(be)),headers:$(0,Re)})}return Ne};if(m(V)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(be){return V(be,arguments.length>1?St(arguments[1]):{})}}),m(S)){var sr=function(be){return E(this,Me),new S(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 Cv={URLSearchParams:Te,getState:_},Cv}var SB;function G5e(){if(SB)return hB;SB=1,Yk();var t=Zt(),r=mn(),i=EB(),a=an(),u=F1(),l=zr(),c=Ka(),f=Wc(),M=EM(),d=ji(),I=F5e(),h=OR(),y=Q1(),N=Hk().codeAt,E=$5e(),m=Qo(),j=tl(),L=DM(),C=AB(),T=Zc(),A=T.set,b=T.getterFor("URL"),k=C.URLSearchParams,$=C.getState,Z=a.URL,F=a.TypeError,K=a.parseInt,ee=Math.floor,J=Math.pow,ne=l("".charAt),oe=l(/./.exec),se=l([].join),R=l(1 .toString),w=l([].pop),_=l([].push),U=l("".replace),V=l([].shift),S=l("".split),Q=l("".slice),Me=l("".toLowerCase),de=l([].unshift),le="Invalid authority",De="Invalid scheme",Oe="Invalid host",Ae="Invalid port",Qe=/[a-z]/i,rt=/[\d+-.a-z]/i,ot=/\d/,st=/^0x/i,pt=/^[0-7]+$/,Ot=/^\d+$/,At=/^[\da-f]+$/i,Ct=/[\0\t\n\r #%/:<>?@[\\\]^|]/,it=/[\0\t\n\r #/:<>?@[\\\]^|]/,dt=/^[\u0000-\u0020]+/,ct=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,yt=/[\t\n\r]/g,je,$e=function(te){var ge=S(te,"."),ue,G,Ee,Je,Pe,_t,at;if(ge.length&&ge[ge.length-1]===""&&ge.length--,ue=ge.length,ue>4)return te;for(G=[],Ee=0;Ee<ue;Ee++){if(Je=ge[Ee],Je==="")return te;if(Pe=10,Je.length>1&&ne(Je,0)==="0"&&(Pe=oe(st,Je)?16:8,Je=Q(Je,Pe===8?1:2)),Je==="")_t=0;else{if(!oe(Pe===10?Ot:Pe===8?pt:At,Je))return te;_t=K(Je,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(te){var ge=[0,0,0,0,0,0,0,0],ue=0,G=null,Ee=0,Je,Pe,_t,at,Gt,nr,he,xt=function(){return ne(te,Ee)};if(xt()===":"){if(ne(te,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(Je=Pe=0;Pe<4&&oe(At,xt());)Je=Je*16+K(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(ot,xt()))return;for(;oe(ot,xt());){if(Gt=K(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++]=Je}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},Mt=function(te){for(var ge=null,ue=1,G=null,Ee=0,Je=0;Je<8;Je++)te[Je]!==0?(Ee>ue&&(ge=G,ue=Ee),G=null,Ee=0):(G===null&&(G=Je),++Ee);return Ee>ue?G:ge},He=function(te){var ge,ue,G,Ee;if(typeof te=="number"){for(ge=[],ue=0;ue<4;ue++)de(ge,te%256),te=ee(te/256);return se(ge,".")}if(typeof te=="object"){for(ge="",G=Mt(te),ue=0;ue<8;ue++)Ee&&te[ue]===0||(Ee&&(Ee=!1),G===ue?(ge+=ue?":":"::",Ee=!0):(ge+=R(te[ue],16),ue<7&&(ge+=":")));return"["+ge+"]"}return te},Se={},Le=I({},Se,{" ":1,'"':1,"<":1,">":1,"`":1}),Ze=I({},Le,{"#":1,"?":1,"{":1,"}":1}),gt=I({},Ze,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ut=function(te,ge){var ue=N(te,0);return ue>32&&ue<127&&!d(ge,te)?te:encodeURIComponent(te)},ke={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Te=function(te,ge){var ue;return te.length===2&&oe(Qe,ne(te,0))&&((ue=ne(te,1))===":"||!ge&&ue==="|")},xe=function(te){var ge;return te.length>1&&Te(Q(te,0,2))&&(te.length===2||(ge=ne(te,2))==="/"||ge==="\\"||ge==="?"||ge==="#")},Be=function(te){return te==="."||Me(te)==="%2e"},It=function(te){return te=Me(te),te===".."||te==="%2e."||te===".%2e"||te==="%2e%2e"},St={},sr={},Ne={},be={},Re={},we={},et={},Nt={},Dt={},jt={},Pt={},Xt={},lr={},Un={},Er={},jn={},Ut={},mr={},cn={},Dr={},cr={},Tn=function(te,ge,ue){var G=m(te),Ee,Je,Pe;if(ge){if(Je=this.parse(G),Je)throw new F(Je);this.searchParams=null}else{if(ue!==void 0&&(Ee=new Tn(ue,!0)),Je=this.parse(G,null,Ee),Je)throw new F(Je);Pe=$(new k),Pe.bindURL(this),this.searchParams=Pe}};Tn.prototype={type:"URL",parse:function(te,ge,ue){var G=this,Ee=ge||St,Je=0,Pe="",_t=!1,at=!1,Gt=!1,nr,he,xt,Ur;for(te=m(te),ge||(G.scheme="",G.username="",G.password="",G.host=null,G.port=null,G.path=[],G.query=null,G.fragment=null,G.cannotBeABaseURL=!1,te=U(te,dt,""),te=U(te,ct,"$1")),te=U(te,yt,""),nr=h(te);Je<=nr.length;){switch(he=nr[Je],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(rt,he)||he==="+"||he==="-"||he==="."))Pe+=Me(he);else if(he===":"){if(ge&&(G.isSpecial()!==d(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=Un:G.isSpecial()&&ue&&ue.scheme===G.scheme?Ee=be:G.isSpecial()?Ee=Nt:nr[Je+1]==="/"?(Ee=Re,Je++):(G.cannotBeABaseURL=!0,_(G.path,""),Ee=cn)}else{if(ge)return De;Pe="",Ee=Ne,Je=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"?Un:we;continue;case be:if(he==="/"&&nr[Je+1]==="/")Ee=Dt,Je++;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=et;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 et: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,Je+1)!=="/")continue;Je++;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 oi=0;oi<xt.length;oi++){var Hn=xt[oi];if(Hn===":"&&!Gt){Gt=!0;continue}var vr=ut(Hn,gt);Gt?G.password+=vr:G.username+=vr}Pe=""}else if(he===je||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()){if(_t&&Pe==="")return le;Je-=h(Pe).length+1,Pe="",Ee=Pt}else Pe+=he;break;case Pt:case Xt:if(ge&&G.scheme==="file"){Ee=jn;continue}else if(he===":"&&!at){if(Pe==="")return Oe;if(Ur=G.parseHost(Pe),Ur)return Ur;if(Pe="",Ee=lr,ge===Xt)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(Ur=G.parseHost(Pe),Ur)return Ur;if(Pe="",Ee=Ut,ge)return;continue}else he==="["?at=!0:he==="]"&&(at=!1),Pe+=he;break;case lr:if(oe(ot,he))Pe+=he;else if(he===je||he==="/"||he==="?"||he==="#"||he==="\\"&&G.isSpecial()||ge){if(Pe!==""){var Pi=K(Pe,10);if(Pi>65535)return Ae;G.port=G.isSpecial()&&Pi===ke[G.scheme]?null:Pi,Pe=""}if(ge)return;Ee=Ut;continue}else return Ae;break;case Un: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(se(y(nr,Je),""))||(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=jn;break}ue&&ue.scheme==="file"&&!xe(se(y(nr,Je),""))&&(Te(ue.path[0],!0)?_(G.path,ue.path[0]):G.host=ue.host),Ee=mr;continue;case jn:if(he===je||he==="/"||he==="\\"||he==="?"||he==="#"){if(!ge&&Te(Pe))Ee=mr;else if(Pe===""){if(G.host="",ge)return;Ee=Ut}else{if(Ur=G.parseHost(Pe),Ur)return Ur;if(G.host==="localhost"&&(G.host=""),ge)return;Pe="",Ee=Ut}continue}else Pe+=he;break;case Ut: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(It(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]==="";)V(G.path);he==="?"?(G.query="",Ee=Dr):he==="#"&&(G.fragment="",Ee=cr)}else Pe+=ut(he,Ze);break;case cn:he==="?"?(G.query="",Ee=Dr):he==="#"?(G.fragment="",Ee=cr):he!==je&&(G.path[0]+=ut(he,Se));break;case Dr:!ge&&he==="#"?(G.fragment="",Ee=cr):he!==je&&(he==="'"&&G.isSpecial()?G.query+="%27":he==="#"?G.query+="%23":G.query+=ut(he,Se));break;case cr:he!==je&&(G.fragment+=ut(he,Le));break}Je++}},parseHost:function(te){var ge,ue,G;if(ne(te,0)==="["){if(ne(te,te.length-1)!=="]"||(ge=Ge(Q(te,1,-1)),!ge))return Oe;this.host=ge}else if(this.isSpecial()){if(te=E(te),oe(Ct,te)||(ge=$e(te),ge===null))return Oe;this.host=ge}else{if(oe(it,te))return Oe;for(ge="",ue=h(te),G=0;G<ue.length;G++)ge+=ut(ue[G],Se);this.host=ge}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return d(ke,this.scheme)},shortenPath:function(){var te=this.path,ge=te.length;ge&&(this.scheme!=="file"||ge!==1||!Te(te[0],!0))&&te.length--},serialize:function(){var te=this,ge=te.scheme,ue=te.username,G=te.password,Ee=te.host,Je=te.port,Pe=te.path,_t=te.query,at=te.fragment,Gt=ge+":";return Ee!==null?(Gt+="//",te.includesCredentials()&&(Gt+=ue+(G?":"+G:"")+"@"),Gt+=He(Ee),Je!==null&&(Gt+=":"+Je)):ge==="file"&&(Gt+="//"),Gt+=te.cannotBeABaseURL?Pe[0]:Pe.length?"/"+se(Pe,"/"):"",_t!==null&&(Gt+="?"+_t),at!==null&&(Gt+="#"+at),Gt},setHref:function(te){var ge=this.parse(te);if(ge)throw new F(ge);this.searchParams.update()},getOrigin:function(){var te=this.scheme,ge=this.port;if(te==="blob")try{return new fn(te.path[0]).origin}catch(ue){return"null"}return te==="file"||!this.isSpecial()?"null":te+"://"+He(this.host)+(ge!==null?":"+ge:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(te){this.parse(m(te)+":",St)},getUsername:function(){return this.username},setUsername:function(te){var ge=h(m(te));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var ue=0;ue<ge.length;ue++)this.username+=ut(ge[ue],gt)}},getPassword:function(){return this.password},setPassword:function(te){var ge=h(m(te));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var ue=0;ue<ge.length;ue++)this.password+=ut(ge[ue],gt)}},getHost:function(){var te=this.host,ge=this.port;return te===null?"":ge===null?He(te):He(te)+":"+ge},setHost:function(te){this.cannotBeABaseURL||this.parse(te,Pt)},getHostname:function(){var te=this.host;return te===null?"":He(te)},setHostname:function(te){this.cannotBeABaseURL||this.parse(te,Xt)},getPort:function(){var te=this.port;return te===null?"":m(te)},setPort:function(te){this.cannotHaveUsernamePasswordPort()||(te=m(te),te===""?this.port=null:this.parse(te,lr))},getPathname:function(){var te=this.path;return this.cannotBeABaseURL?te[0]:te.length?"/"+se(te,"/"):""},setPathname:function(te){this.cannotBeABaseURL||(this.path=[],this.parse(te,Ut))},getSearch:function(){var te=this.query;return te?"?"+te:""},setSearch:function(te){te=m(te),te===""?this.query=null:(ne(te,0)==="?"&&(te=Q(te,1)),this.query="",this.parse(te,Dr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var te=this.fragment;return te?"#"+te:""},setHash:function(te){if(te=m(te),te===""){this.fragment=null;return}ne(te,0)==="#"&&(te=Q(te,1)),this.fragment="",this.parse(te,cr)},update:function(){this.query=this.searchParams.serialize()||null}};var fn=function(ge){var ue=M(this,Kt),G=L(arguments.length,1)>1?arguments[1]:void 0,Ee=A(ue,new Tn(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=fn.prototype,Ir=function(te,ge){return{get:function(){return b(this)[te]()},set:ge&&function(ue){return b(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 b(this).serialize()},{enumerable:!0}),c(Kt,"toString",function(){return b(this).serialize()},{enumerable:!0}),Z){var Kr=Z.createObjectURL,Ri=Z.revokeObjectURL;Kr&&c(fn,"createObjectURL",u(Kr,Z)),Ri&&c(fn,"revokeObjectURL",u(Ri,Z))}return j(fn,"URL"),t({global:!0,constructor:!0,forced:!i,sham:!r},{URL:fn}),hB}var OB;function W5e(){return OB||(OB=1,G5e()),yB}W5e();var _B={},xB;function K5e(){if(xB)return _B;xB=1;var t=Zt(),r=mi();return t({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),_B}K5e();var LB={},wB;function q5e(){return wB||(wB=1,AB()),LB}q5e();var bB={},zB;function J5e(){if(zB)return bB;zB=1;var t=Ka(),r=zr(),i=Qo(),a=DM(),u=URLSearchParams,l=u.prototype,c=r(l.append),f=r(l.delete),M=r(l.forEach),d=r([].push),I=new u("a=1&a=2&b=3");return I.delete("a",1),I.delete("b",void 0),I+""!="a=2"&&t(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=[];M(this,function(k,$){d(E,{key:$,value:k})}),a(y,1);for(var m=i(h),j=i(N),L=0,C=0,T=!1,A=E.length,b;L<A;)b=E[L++],T||b.key===m?(T=!0,f(this,b.key)):C++;for(;C<A;)b=E[C++],b.key===m&&b.value===j||c(this,b.key,b.value)},{enumerable:!0,unsafe:!0}),bB}J5e();var kB={},RB;function X5e(){if(RB)return kB;RB=1;var t=Ka(),r=zr(),i=Qo(),a=DM(),u=URLSearchParams,l=u.prototype,c=r(l.getAll),f=r(l.has),M=new u("a=1");return(M.has("a",2)||!M.has("a",void 0))&&t(l,"has",function(I){var h=arguments.length,y=h<2?void 0:arguments[1];if(h&&y===void 0)return f(this,I);var N=c(this,I);a(h,1);for(var E=i(y),m=0;m<N.length;)if(N[m++]===E)return!0;return!1},{enumerable:!0,unsafe:!0}),kB}X5e();var PB={},UB;function eIe(){if(UB)return PB;UB=1;var t=mn(),r=zr(),i=Wc(),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}),PB}eIe();function w0(t){"@babel/helpers - typeof";return w0=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},w0(t)}function tIe(t,r){return aIe(t)||iIe(t,r)||nIe(t,r)||rIe()}function rIe(){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 nIe(t,r){if(t){if(typeof t=="string")return HB(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)?HB(t,r):void 0}}function HB(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 iIe(t,r){var i=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a,u,l,c,f=[],M=!0,d=!1;try{if(l=(i=i.call(t)).next,r!==0)for(;!(M=(a=l.call(i)).done)&&(f.push(a.value),f.length!==r);M=!0);}catch(I){d=!0,u=I}finally{try{if(!M&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(d)throw u}}return f}}function aIe(t){if(Array.isArray(t))return t}function oIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function uIe(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,VB(a.key),a)}}function sIe(t,r,i){return r&&uIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function b0(t,r,i){return(r=VB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function VB(t){var r=lIe(t,"string");return w0(r)=="symbol"?r:r+""}function lIe(t,r){if(w0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(w0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var cIe=function(){function t(){oIe(this,t),b0(this,"_levels",[]),b0(this,"_transports",[]),b0(this,"_logs",[]),b0(this,"_prevTime",0),b0(this,"logListener",null);try{if(!window.localStorage)return;var r=window.localStorage.getItem("logger");if(!r)return;var i=r.split(">"),a=tIe(i,2),u=a[0],l=a[1];this._levels=u.split(","),l&&(this._transports=l.split(","))}catch(c){return}}return sIe(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 M=(a==null?void 0:a.color)||"blue";console.log("%c%s: %c%s %c+%dms","color: ".concat(M,";"),i,"",l,"color: ".concat(M,";"),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 Av=new cIe;function R2(t){"@babel/helpers - typeof";return R2=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},R2(t)}function bn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,V){return _[U]=V}}function I(R,w,_,U){var V=w&&w.prototype instanceof L?w:L,S=Object.create(V.prototype),Q=new oe(U||[]);return u(S,"_invoke",{value:K(R,_,Q)}),S}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var A={};d(A,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(se([])));k&&k!==i&&a.call(k,c)&&(A=k);var $=T.prototype=L.prototype=Object.create(A);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function F(R,w){function _(V,S,Q,Me){var de=h(R[V],R,S);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&R2(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){le.value=Oe,Q(le)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(S,Q){function Me(){return new w(function(de,le){_(S,Q,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(V,S){if(U===E)throw Error("Generator is already running");if(U===m){if(V==="throw")throw S;return{value:t,done:!0}}for(_.method=V,_.arg=S;;){var Q=_.delegate;if(Q){var Me=ee(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(R,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 ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var V=h(U,R.iterator,w.arg);if(V.type==="throw")return w.method="throw",w.arg=V.arg,w.delegate=null,j;var S=V.arg;return S?S.done?(w[R.resultName]=S.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):S:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function ne(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function se(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function V(){for(;++_<R.length;)if(a.call(R,_))return V.value=R[_],V.done=!1,V;return V.value=t,V.done=!0,V};return U.next=U}}throw new TypeError(R2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(F.prototype),d(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(R,w,_,U,V){V===void 0&&(V=Promise);var S=new F(I(R,w,_,U),V);return r.isGeneratorFunction(w)?S:S.next().then(function(Q){return Q.done?Q.value:S.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function V(){for(;_.length;){var S=_.pop();if(S in w)return V.value=S,V.done=!1,V}return V.done=!0,V}},r.values=se,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(le,De){return Q.type="throw",Q.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var V=this.tryEntries.length-1;V>=0;--V){var S=this.tryEntries[V],Q=S.completion;if(S.tryLoc==="root")return U("end");if(S.tryLoc<=this.prev){var Me=a.call(S,"catchLoc"),de=a.call(S,"finallyLoc");if(Me&&de){if(this.prev<S.catchLoc)return U(S.catchLoc,!0);if(this.prev<S.finallyLoc)return U(S.finallyLoc)}else if(Me){if(this.prev<S.catchLoc)return U(S.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return U(S.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var V=this.tryEntries[U];if(V.tryLoc<=this.prev&&a.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var S=V;break}}S&&(w==="break"||w==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var Q=S?S.completion:{};return Q.type=w,Q.arg=_,S?(this.method="next",this.next=S.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 V=U.completion;if(V.type==="throw"){var S=V.arg;ne(U)}return S}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:se(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function YB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Jo(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){YB(l,a,u,c,f,"next",M)}function f(M){YB(l,a,u,c,f,"throw",M)}c(void 0)})}}function fIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function MIe(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,QB(a.key),a)}}function dIe(t,r,i){return r&&MIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bM(t,r,i){return(r=QB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function QB(t){var r=gIe(t,"string");return R2(r)=="symbol"?r:r+""}function gIe(t,r){if(R2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(R2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var al=Av.create("wasm_idv"),IIe=function(){function t(r){fIe(this,t),bM(this,"_worker",null),bM(this,"_initialized",!1),bM(this,"_connectedToIdv",!1),bM(this,"_serviceRunning",!1),bM(this,"_userId",I0e(gMe)),bM(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return dIe(t,[{key:"init",value:function(){var r=Jo(bn().mark(function a(){var u,l,c,f;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=1,d.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/b6441b5-7cff4ddf6//PlatformAdaptor.worker.js");case 4:return u=d.sent,d.next=7,u.blob();case 7:l=d.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),al("Creating worker error: ".concat(JSON.stringify(d.t0)));case 15:d.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){d.next=20;break}return d.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),d.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/0.1/b6441b5-7cff4ddf6/",preMain:!0});case 23:return f=d.sent,d.abrupt("return",f);case 25:case"end":return d.stop()}},a,this,[[1,12]])}));function i(){return r.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var r=Jo(bn().mark(function a(u){var l;return bn().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:cE.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,al("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=Jo(bn().mark(function a(u){var l;return bn().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:cE.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=Jo(bn().mark(function a(u){var l,c;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l={workflowId:u},M.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:l,preMain:!0});case 3:return c=M.sent,al("Start session connect result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var r=Jo(bn().mark(function a(u){var l,c;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l={sessionId:u},M.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=M.sent,al("continue session result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var r=Jo(bn().mark(function a(){var u,l,c=arguments;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},M.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=M.sent,al("listWorkflows result: ".concat(JSON.stringify(l))),M.abrupt("return",l);case 6:case"end":return M.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var r=Jo(bn().mark(function a(){var u;return bn().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=Jo(bn().mark(function a(){var u;return bn().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=Jo(bn().mark(function a(u){var l;return bn().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=Jo(bn().mark(function a(u,l){var c;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return al("Push data: ".concat(u," , ").concat(JSON.stringify(l))),M.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 3:return c=M.sent,al("Push data result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var r=Jo(bn().mark(function a(){var u;return bn().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=Jo(bn().mark(function a(){var u;return bn().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,al("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=Jo(bn().mark(function a(){var u;return bn().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=Jo(bn().mark(function a(u){var l=this;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(M,d){if(!l._worker)return d();l._worker.onmessage=function(I){var h=I.data.target;if(h==="stdout"){al(JSON.stringify(I.data.content));return}if(h==="custom"){var y=I.data,N=y.method,E=y.data;al("::: custom method, ".concat(N,", ").concat(JSON.stringify(E))),N==="onRuntimeInitialized"&&(l._initialized=!0),M(E)}if(h==="stderr"){var m=I.data.content;al(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=Jo(bn().mark(function a(){var u;return bn().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 P2(t){"@babel/helpers - typeof";return P2=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},P2(t)}function FB(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 U2(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?FB(Object(i),!0).forEach(function(a){Sv(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):FB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Sv(t,r,i){return(r=pIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function pIe(t){var r=yIe(t,"string");return P2(r)=="symbol"?r:r+""}function yIe(t,r){if(P2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(P2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function ei(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ei=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,V){return _[U]=V}}function I(R,w,_,U){var V=w&&w.prototype instanceof L?w:L,S=Object.create(V.prototype),Q=new oe(U||[]);return u(S,"_invoke",{value:K(R,_,Q)}),S}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var A={};d(A,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(se([])));k&&k!==i&&a.call(k,c)&&(A=k);var $=T.prototype=L.prototype=Object.create(A);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function F(R,w){function _(V,S,Q,Me){var de=h(R[V],R,S);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&P2(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){le.value=Oe,Q(le)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(S,Q){function Me(){return new w(function(de,le){_(S,Q,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(V,S){if(U===E)throw Error("Generator is already running");if(U===m){if(V==="throw")throw S;return{value:t,done:!0}}for(_.method=V,_.arg=S;;){var Q=_.delegate;if(Q){var Me=ee(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(R,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 ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var V=h(U,R.iterator,w.arg);if(V.type==="throw")return w.method="throw",w.arg=V.arg,w.delegate=null,j;var S=V.arg;return S?S.done?(w[R.resultName]=S.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):S:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function ne(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function se(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function V(){for(;++_<R.length;)if(a.call(R,_))return V.value=R[_],V.done=!1,V;return V.value=t,V.done=!0,V};return U.next=U}}throw new TypeError(P2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(F.prototype),d(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(R,w,_,U,V){V===void 0&&(V=Promise);var S=new F(I(R,w,_,U),V);return r.isGeneratorFunction(w)?S:S.next().then(function(Q){return Q.done?Q.value:S.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function V(){for(;_.length;){var S=_.pop();if(S in w)return V.value=S,V.done=!1,V}return V.done=!0,V}},r.values=se,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(le,De){return Q.type="throw",Q.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var V=this.tryEntries.length-1;V>=0;--V){var S=this.tryEntries[V],Q=S.completion;if(S.tryLoc==="root")return U("end");if(S.tryLoc<=this.prev){var Me=a.call(S,"catchLoc"),de=a.call(S,"finallyLoc");if(Me&&de){if(this.prev<S.catchLoc)return U(S.catchLoc,!0);if(this.prev<S.finallyLoc)return U(S.finallyLoc)}else if(Me){if(this.prev<S.catchLoc)return U(S.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return U(S.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var V=this.tryEntries[U];if(V.tryLoc<=this.prev&&a.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var S=V;break}}S&&(w==="break"||w==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var Q=S?S.completion:{};return Q.type=w,Q.arg=_,S?(this.method="next",this.next=S.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 V=U.completion;if(V.type==="throw"){var S=V.arg;ne(U)}return S}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:se(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),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function ws(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){$B(l,a,u,c,f,"next",M)}function f(M){$B(l,a,u,c,f,"throw",M)}c(void 0)})}}var hIe=Av.create("store_idv"),NIe=function(r,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=ws(ei().mark(function l(){var c;return ei().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c=new IIe,M.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return M.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return ws(ei().mark(function l(){var c,f,M,d,I;return ei().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(M=y.sent,d=null,M.code===4&&(d=_2.HTTP_ISSUE),M.code!==0&&M.code!==4&&(d=_2.PROVIDER_ERROR),d===null){y.next=12;break}return I=new M0({errorCode:d}),y.abrupt("return",{error:I});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return ws(ei().mark(function l(){var c,f,M,d,I;return ei().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,M=null,f.code===4&&(M=_2.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=_2.PROVIDER_ERROR),M===null){y.next=13;break}return d=new M0({errorCode:M}),I=new Y5({errorCode:ME.CONNECTION_ISSUE,underlyingBaseError:d}),y.abrupt("return",{workflows:[],error:I});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 M,d=(M=i().currentSessionData)===null||M===void 0?void 0:M.sessionId,I=U2(U2({},f.results),{},{sessionId:d}),h=U2({results:I},f.error&&{error:f.error});i().setCurrentSessionDataLsAndStore(null),u(h)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=ws(ei().mark(function l(){var c,f,M,d;return ei().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=i().externalModulesNames,h.prev=1,h.next=4,EIe(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),(M=i().wasmService)===null||M===void 0||M.shutdown(),i().resetWasmService(),i().resetProps(),d=new f0({errorCode:Xd.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:d});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=cm(u.find(function(c){return c.templateId===jR}));l.templateLayout=DH(l.templateLayout,i().layout),r({proccessingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=ws(ei().mark(function l(c,f){var M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return M=null,d=function(){var N=ws(ei().mark(function E(){var m,j,L,C;return ei().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,i().wasmService.pushData(c,f);case 2:if(m=A.sent,j=null,m.code===4&&(j=vs.HTTP_ISSUE),m.code!==0&&m.code!==4&&(j=vs.PROVIDER_ERROR),j!==null&&(L=new d0({errorCode:vs.HTTP_ISSUE}),C=new uu({errorCode:ou.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:L}),M=C),m.code!==0){A.next=12;break}return M=null,A.abrupt("return",m);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},y.next=5,Mm(d,I);case 5:return y.abrupt("return",M?{error:M}:{});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=ws(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,f=null,M=function(){var N=ws(ei().mark(function E(){var m,j,L,C,T,A,b,k,$,Z,F,K,ee,J,ne;return ei().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return se.next=2,i().wasmService.getSessionState();case 2:if(C=se.sent,T=(m=C.data)===null||m===void 0?void 0:m.currentStep,A=(j=C.data)===null||j===void 0?void 0:j.isProcessingFiles,b=(L=C.data)===null||L===void 0||(L=L.workflow)===null||L===void 0?void 0:L.steps,k=M0e(b,T),$=C.code===4,Z=C.code!==0&&C.code!==4,F=C.code===0&&(!C.data.workflow||!C.data.currentStep),K=T&&T===c,ee=null,b&&!k&&(ee=vs.NOT_DATA_TYPE),$&&(ee=vs.HTTP_ISSUE),Z&&(ee=vs.PROVIDER_ERROR),A&&(ee=vs.IS_PROCESSING),K&&(ee=vs.SAME_STEP),F&&(ee=vs.DECODING_FAILED),ee!==null&&(J=new d0({errorCode:ee}),ne=new uu({errorCode:ou.INTERNAL_ISSUE,underlyingBaseError:J}),f=ne),hIe(JSON.stringify({nextStep:T,isDataType:k,isProcessingFiles:A})),!(k&&!K&&!A&&!$&&!Z&&!F)){se.next=23;break}return f=null,se.abrupt("return",C.data);case 23:return se.abrupt("return",null);case 24:case"end":return se.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},y.next=6,Mm(M,d);case 6:if(I=y.sent,!f){y.next=9;break}return y.abrupt("return",{error:f});case 9:return y.abrupt("return",{workflow:I==null?void 0:I.workflow,nextStep:I==null?void 0:I.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:vM.SERVICE,eventType:qd.MESSAGE,message:Jd.DID_END_SESSION}))}},pushStepWaitNextStepAndSet:function(){var a=ws(ei().mark(function l(c,f){var M,d,I,h,y,N,E,m;return ei().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 Rn)){L.next=10;break}return M=f,d=new uu({errorCode:ou.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:M}),i().workflowSessionCompletion({error:d}),i().resetSession(),L.abrupt("return");case 10:return L.next=12,i()._pushStep(c,f);case 12:if(I=L.sent,!I.error){L.next=17;break}return i().workflowSessionCompletion({error:I.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=ws(ei().mark(function l(){var c,f,M,d,I,h,y,N,E,m,j,L,C;return ei().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(c={isContinue:!1},f=i().workflow,M=i().getCurrentSessionDataLs(),d=i().sessionRestoreMode,d){A.next=6;break}return A.abrupt("return",c);case 6:if(M){A.next=8;break}return A.abrupt("return",c);case 8:if(I=M.sessionId,h=M.workflowId,!(!I||h!==f.id)){A.next=11;break}return A.abrupt("return",c);case 11:return A.next=13,i().wasmService.continueSession(I);case 13:return y=A.sent,N=y.data,E=N.currentStep,"id"in N&&"currentStep"in N||(m=new g0({errorCode:R5.DECODING_FAILED}),j=new uu({errorCode:ou.START_SESSION_ERROR,underlyingBaseError:m}),c=U2(U2({},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:vM.SERVICE,eventType:qd.MESSAGE,message:Jd.DID_START_RESTORE_SESSION}),c=U2(U2({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),A.abrupt("return",c);case 20:case"end":return A.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===jR)f=i().proccessingTransformedTemplate;else{var M;if(f=(M=i()._findStepById(u))===null||M===void 0?void 0:M.client,f!==null){var d;f.sessionId=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId}f&&f.templateLayout&&(f.templateLayout=DH(f.templateLayout,i().layout))}var I=f0e(i().externalModules,c.steps,u);if(f===null||!I){var h=new uu({errorCode:ou.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=ws(ei().mark(function l(){var c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(c=i().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=d.sent,i().resetWasmService(),i().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){d.next=7;break}return d.abrupt("return",{});case 7:return d.abrupt("return",{});case 8:case"end":return d.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 EIe(t){return Ov.apply(this,arguments)}function Ov(){return Ov=ws(ei().mark(function t(r){var i,a,u,l,c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i=[{id:i1.getIdentifier(),supportedTemplates:i1.getSupportedTemplates(),component:i1}],a=Sv(Sv({},"LIVENESS",function(){return Promise.resolve().then(()=>fBe)}),"DOC_READER",function(){return Promise.resolve().then(()=>RTt)}),u=ei().mark(function I(){var h,y,N;return ei().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()}},I)}),l=0,c=r;case 4:if(!(l<c.length)){d.next=9;break}return d.delegateYield(u(),"t0",6);case 6:l++,d.next=4;break;case 9:return f=i.filter(function(I){return I!==null}),d.abrupt("return",f);case 11:case"end":return d.stop()}},t)})),Ov.apply(this,arguments)}function z0(t){"@babel/helpers - typeof";return z0=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},z0(t)}function BB(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 _v(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?BB(Object(i),!0).forEach(function(a){mIe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):BB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function mIe(t,r,i){return(r=DIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function DIe(t){var r=vIe(t,"string");return z0(r)=="symbol"?r:r+""}function vIe(t,r){if(z0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(z0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ia=lde(function(){return _v(_v(_v({},N0e.apply(void 0,arguments)),S0e.apply(void 0,arguments)),NIe.apply(void 0,arguments))}),jIe=function(r){var i=r.children;return ti.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:i})},TIe=function(){var r=ia(function(E){return E.currentScreenConfig}),i=ia(function(E){return E.pushStepWaitNextStepAndSet}),a=ia(function(E){return E.proccessingTransformedTemplate}),u=ia(function(E){return E.isProcessing}),l=ia(function(E){return E.setIsProcessing}),c=ia(function(E){return E.currentStepId}),f=ia(function(E){return E.listener}),M=ia(function(E){return E.externalModules}),d=ia(function(E){return E.modulesConfig}),I=function(m,j){f({target:vM.WEB_COMPONENT,eventType:qd.MESSAGE,message:j,module:m})},h=function(m){l(m)},y=function(m){c&&(l(!1),i(c,m))},N=Jn.useCallback(function(){if(!r)return ti.jsx(jIe,{children:"Waiting for play... or process completed"});var E=M.find(function(m){return m.supportedTemplates.includes(r.templateId)});if(E&&r)return ti.jsx(E.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:I,isProcessing:h})},[r,M]);return ti.jsx(ti.Fragment,{children:ti.jsx(WR,{direction:fE.Ltr,children:ti.jsxs(ti.Fragment,{children:[u&&ti.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?ti.jsx(i1,{perform:y,moduleProps:a,idvEventListener:I,isProcessing:h}):"Processing..."}),N()]})})})};function CIe(){return ti.jsx(Jn.StrictMode,{children:ti.jsx(HMe,{children:ti.jsx(TIe,{})})})}const AIe="*,*: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}",SIe="._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 zM(t){"@babel/helpers - typeof";return zM=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},zM(t)}function OIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function ZB(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,WB(a.key),a)}}function _Ie(t,r,i){return r&&ZB(t.prototype,r),i&&ZB(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function xIe(t,r,i){return r=R0(r),LIe(t,Lv()?Reflect.construct(r,[],R0(t).constructor):r.apply(t,i))}function LIe(t,r){if(r&&(zM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wIe(t)}function wIe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bIe(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&&k0(t,r)}function xv(t){var r=typeof Map=="function"?new Map:void 0;return xv=function(a){if(a===null||!kIe(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 zIe(a,arguments,R0(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),k0(u,a)},xv(t)}function zIe(t,r,i){if(Lv())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return i&&k0(u,i.prototype),u}function Lv(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(Lv=function(){return!!t})()}function kIe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function k0(t,r){return k0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},k0(t,r)}function R0(t){return R0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},R0(t)}function GB(t,r,i){return(r=WB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function WB(t){var r=RIe(t,"string");return zM(r)=="symbol"?r:r+""}function RIe(t,r){if(zM(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(zM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var PIe=[AIe,SIe],UIe=[].concat(PIe).reduce(function(t,r){return t+r.toString()},""),KB=function(t){function r(){var i;return OIe(this,r),i=xIe(this,r),GB(i,"_root",sMe.createRoot(i.attachShadow({mode:"open"}))),GB(i,"_mounted",!1),i}return bIe(r,t),_Ie(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(ti.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[ti.jsx("style",{nonce:ia.getState().getNonce(),children:UIe}),ti.jsx(CIe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount())}),Av.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(xv(HTMLElement));function H2(t){"@babel/helpers - typeof";return H2=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},H2(t)}function js(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */js=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,V){return _[U]=V}}function I(R,w,_,U){var V=w&&w.prototype instanceof L?w:L,S=Object.create(V.prototype),Q=new oe(U||[]);return u(S,"_invoke",{value:K(R,_,Q)}),S}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var A={};d(A,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(se([])));k&&k!==i&&a.call(k,c)&&(A=k);var $=T.prototype=L.prototype=Object.create(A);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function F(R,w){function _(V,S,Q,Me){var de=h(R[V],R,S);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&H2(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){le.value=Oe,Q(le)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(S,Q){function Me(){return new w(function(de,le){_(S,Q,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(V,S){if(U===E)throw Error("Generator is already running");if(U===m){if(V==="throw")throw S;return{value:t,done:!0}}for(_.method=V,_.arg=S;;){var Q=_.delegate;if(Q){var Me=ee(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(R,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 ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var V=h(U,R.iterator,w.arg);if(V.type==="throw")return w.method="throw",w.arg=V.arg,w.delegate=null,j;var S=V.arg;return S?S.done?(w[R.resultName]=S.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):S:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function ne(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function se(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function V(){for(;++_<R.length;)if(a.call(R,_))return V.value=R[_],V.done=!1,V;return V.value=t,V.done=!0,V};return U.next=U}}throw new TypeError(H2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(F.prototype),d(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(R,w,_,U,V){V===void 0&&(V=Promise);var S=new F(I(R,w,_,U),V);return r.isGeneratorFunction(w)?S:S.next().then(function(Q){return Q.done?Q.value:S.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function V(){for(;_.length;){var S=_.pop();if(S in w)return V.value=S,V.done=!1,V}return V.done=!0,V}},r.values=se,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(le,De){return Q.type="throw",Q.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var V=this.tryEntries.length-1;V>=0;--V){var S=this.tryEntries[V],Q=S.completion;if(S.tryLoc==="root")return U("end");if(S.tryLoc<=this.prev){var Me=a.call(S,"catchLoc"),de=a.call(S,"finallyLoc");if(Me&&de){if(this.prev<S.catchLoc)return U(S.catchLoc,!0);if(this.prev<S.finallyLoc)return U(S.finallyLoc)}else if(Me){if(this.prev<S.catchLoc)return U(S.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return U(S.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var V=this.tryEntries[U];if(V.tryLoc<=this.prev&&a.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var S=V;break}}S&&(w==="break"||w==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var Q=S?S.completion:{};return Q.type=w,Q.arg=_,S?(this.method="next",this.next=S.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 V=U.completion;if(V.type==="throw"){var S=V.arg;ne(U)}return S}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:se(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function qB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function kM(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){qB(l,a,u,c,f,"next",M)}function f(M){qB(l,a,u,c,f,"throw",M)}c(void 0)})}}function HIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function VIe(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,QIe(a.key),a)}}function YIe(t,r,i){return r&&VIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function QIe(t){var r=FIe(t,"string");return H2(r)=="symbol"?r:r+""}function FIe(t,r){if(H2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(H2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $Ie=function(){function t(){HIe(this,t)}return YIe(t,[{key:"initialize",value:function(){var r=kM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ia.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=kM(js().mark(function a(u){var l,c;return js().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(typeof u=="string"){M.next=5;break}return M.next=3,ia.getState().configure(u);case 3:return l=M.sent,M.abrupt("return",l);case 5:return M.next=7,ia.getState().configureWithUrl(u);case 7:return c=M.sent,M.abrupt("return",c);case 9:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var r=kM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.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=kM(js().mark(function a(u){var l,c;return js().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l=u.workfowId,M.next=3,ia.getState().preparareWorkflowAndPrepareUi(l);case 3:return c=M.sent,M.abrupt("return",c);case 5:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var r=kM(js().mark(function a(){var u;return js().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ia.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 M=function(I){f(I)};ia.getState().playWorkflow(M)}));case 6:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var r=kM(js().mark(function a(){var u;return js().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ia.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){ia.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ia.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){ia.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return ia.getState().getCurrentSessionId()}}])}(),BIe=window.customElements.get("idv-flow");BIe||window.customElements.define("idv-flow",KB);var ZIe=Object.defineProperty,GIe=Object.defineProperties,WIe=Object.getOwnPropertyDescriptors,JB=Object.getOwnPropertySymbols,KIe=Object.prototype.hasOwnProperty,qIe=Object.prototype.propertyIsEnumerable,XB=(t,r,i)=>r in t?ZIe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,wv=(t,r)=>{for(var i in r||(r={}))KIe.call(r,i)&&XB(t,i,r[i]);if(JB)for(var i of JB(r))qIe.call(r,i)&&XB(t,i,r[i]);return t},JIe=(t,r)=>GIe(t,WIe(r)),io=(t,r,i)=>new Promise((a,u)=>{var l=M=>{try{f(i.next(M))}catch(d){u(d)}},c=M=>{try{f(i.throw(M))}catch(d){u(d)}},f=M=>M.done?a(M.value):Promise.resolve(M.value).then(l,c);f((i=i.apply(t,r)).next())}),eZ=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function tZ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rZ={exports:{}},P0={},nZ={exports:{}},Br={},iZ;function XIe(){if(iZ)return Br;iZ=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 Av=new cIe;function R2(t){"@babel/helpers - typeof";return R2=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},R2(t)}function bn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bn=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,V){return _[U]=V}}function I(R,w,_,U){var V=w&&w.prototype instanceof L?w:L,S=Object.create(V.prototype),Q=new oe(U||[]);return u(S,"_invoke",{value:K(R,_,Q)}),S}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var A={};d(A,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(se([])));k&&k!==i&&a.call(k,c)&&(A=k);var $=T.prototype=L.prototype=Object.create(A);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function F(R,w){function _(V,S,Q,Me){var de=h(R[V],R,S);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&R2(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){le.value=Oe,Q(le)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(S,Q){function Me(){return new w(function(de,le){_(S,Q,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(V,S){if(U===E)throw Error("Generator is already running");if(U===m){if(V==="throw")throw S;return{value:t,done:!0}}for(_.method=V,_.arg=S;;){var Q=_.delegate;if(Q){var Me=ee(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(R,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 ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var V=h(U,R.iterator,w.arg);if(V.type==="throw")return w.method="throw",w.arg=V.arg,w.delegate=null,j;var S=V.arg;return S?S.done?(w[R.resultName]=S.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):S:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function ne(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function se(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function V(){for(;++_<R.length;)if(a.call(R,_))return V.value=R[_],V.done=!1,V;return V.value=t,V.done=!0,V};return U.next=U}}throw new TypeError(R2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(F.prototype),d(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(R,w,_,U,V){V===void 0&&(V=Promise);var S=new F(I(R,w,_,U),V);return r.isGeneratorFunction(w)?S:S.next().then(function(Q){return Q.done?Q.value:S.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function V(){for(;_.length;){var S=_.pop();if(S in w)return V.value=S,V.done=!1,V}return V.done=!0,V}},r.values=se,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(le,De){return Q.type="throw",Q.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var V=this.tryEntries.length-1;V>=0;--V){var S=this.tryEntries[V],Q=S.completion;if(S.tryLoc==="root")return U("end");if(S.tryLoc<=this.prev){var Me=a.call(S,"catchLoc"),de=a.call(S,"finallyLoc");if(Me&&de){if(this.prev<S.catchLoc)return U(S.catchLoc,!0);if(this.prev<S.finallyLoc)return U(S.finallyLoc)}else if(Me){if(this.prev<S.catchLoc)return U(S.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return U(S.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var V=this.tryEntries[U];if(V.tryLoc<=this.prev&&a.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var S=V;break}}S&&(w==="break"||w==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var Q=S?S.completion:{};return Q.type=w,Q.arg=_,S?(this.method="next",this.next=S.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 V=U.completion;if(V.type==="throw"){var S=V.arg;ne(U)}return S}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:se(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function YB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function Jo(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){YB(l,a,u,c,f,"next",M)}function f(M){YB(l,a,u,c,f,"throw",M)}c(void 0)})}}function fIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function MIe(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,QB(a.key),a)}}function dIe(t,r,i){return r&&MIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bM(t,r,i){return(r=QB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function QB(t){var r=gIe(t,"string");return R2(r)=="symbol"?r:r+""}function gIe(t,r){if(R2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(R2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var al=Av.create("wasm_idv"),IIe=function(){function t(r){fIe(this,t),bM(this,"_worker",null),bM(this,"_initialized",!1),bM(this,"_connectedToIdv",!1),bM(this,"_serviceRunning",!1),bM(this,"_userId",I0e(gMe)),bM(this,"_setErrorScreen",null),r&&(this._setErrorScreen=r)}return dIe(t,[{key:"init",value:function(){var r=Jo(bn().mark(function a(){var u,l,c,f;return bn().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=1,d.next=4,fetch("https://wasm-development.regulaforensics.com/idv/nightly/0.1/40e5940-7cff4ddf6//PlatformAdaptor.worker.js");case 4:return u=d.sent,d.next=7,u.blob();case 7:l=d.sent,c=URL.createObjectURL(l),this._worker=new Worker(c),d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),al("Creating worker error: ".concat(JSON.stringify(d.t0)));case 15:d.next=18;break;case 17:this._worker=new Worker("./PlatformAdaptor.worker.js");case 18:if(this._worker){d.next=20;break}return d.abrupt("return");case 20:return this._worker.postMessage({target:"gl",op:"setPrefetched",preMain:!0}),d.next=23,this.sendMessage({target:"worker-init",URL:document.URL,currentScriptUrl:"https://wasm-development.regulaforensics.com/idv/nightly/0.1/40e5940-7cff4ddf6/",preMain:!0});case 23:return f=d.sent,d.abrupt("return",f);case 25:case"end":return d.stop()}},a,this,[[1,12]])}));function i(){return r.apply(this,arguments)}return i}()},{key:"prepareAndConnect",value:function(){var r=Jo(bn().mark(function a(u){var l;return bn().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:cE.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,al("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=Jo(bn().mark(function a(u){var l;return bn().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:cE.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=Jo(bn().mark(function a(u){var l,c;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l={workflowId:u},M.next=3,this.sendMessage({target:"custom",method:"start_session",sessionParams:l,preMain:!0});case 3:return c=M.sent,al("Start session connect result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"continueSession",value:function(){var r=Jo(bn().mark(function a(u){var l,c;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l={sessionId:u},M.next=3,this.sendMessage({continueParams:l,target:"custom",method:"continue_session",preMain:!0});case 3:return c=M.sent,al("continue session result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"listWorkflows",value:function(){var r=Jo(bn().mark(function a(){var u,l,c=arguments;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return u=c.length>0&&c[0]!==void 0?c[0]:{limit:0,skip:0},M.next=3,this.sendMessage({workflowsParams:u,target:"custom",method:"list_workflows",preMain:!0});case 3:return l=M.sent,al("listWorkflows result: ".concat(JSON.stringify(l))),M.abrupt("return",l);case 6:case"end":return M.stop()}},a,this)}));function i(){return r.apply(this,arguments)}return i}()},{key:"getHealth",value:function(){var r=Jo(bn().mark(function a(){var u;return bn().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=Jo(bn().mark(function a(){var u;return bn().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=Jo(bn().mark(function a(u){var l;return bn().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=Jo(bn().mark(function a(u,l){var c;return bn().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return al("Push data: ".concat(u," , ").concat(JSON.stringify(l))),M.next=3,this.sendMessage({target:"custom",method:"push_data",pushDataParams:{data:l,stage:0,step:u},preMain:!0});case 3:return c=M.sent,al("Push data result: ".concat(JSON.stringify(c))),M.abrupt("return",c);case 6:case"end":return M.stop()}},a,this)}));function i(a,u){return r.apply(this,arguments)}return i}()},{key:"getSessionState",value:function(){var r=Jo(bn().mark(function a(){var u;return bn().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=Jo(bn().mark(function a(){var u;return bn().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,al("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=Jo(bn().mark(function a(){var u;return bn().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=Jo(bn().mark(function a(u){var l=this;return bn().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",new Promise(function(M,d){if(!l._worker)return d();l._worker.onmessage=function(I){var h=I.data.target;if(h==="stdout"){al(JSON.stringify(I.data.content));return}if(h==="custom"){var y=I.data,N=y.method,E=y.data;al("::: custom method, ".concat(N,", ").concat(JSON.stringify(E))),N==="onRuntimeInitialized"&&(l._initialized=!0),M(E)}if(h==="stderr"){var m=I.data.content;al(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=Jo(bn().mark(function a(){var u;return bn().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 P2(t){"@babel/helpers - typeof";return P2=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},P2(t)}function FB(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 U2(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?FB(Object(i),!0).forEach(function(a){Sv(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):FB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function Sv(t,r,i){return(r=pIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function pIe(t){var r=yIe(t,"string");return P2(r)=="symbol"?r:r+""}function yIe(t,r){if(P2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(P2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function ei(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ei=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,V){return _[U]=V}}function I(R,w,_,U){var V=w&&w.prototype instanceof L?w:L,S=Object.create(V.prototype),Q=new oe(U||[]);return u(S,"_invoke",{value:K(R,_,Q)}),S}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var A={};d(A,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(se([])));k&&k!==i&&a.call(k,c)&&(A=k);var $=T.prototype=L.prototype=Object.create(A);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function F(R,w){function _(V,S,Q,Me){var de=h(R[V],R,S);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&P2(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){le.value=Oe,Q(le)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(S,Q){function Me(){return new w(function(de,le){_(S,Q,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(V,S){if(U===E)throw Error("Generator is already running");if(U===m){if(V==="throw")throw S;return{value:t,done:!0}}for(_.method=V,_.arg=S;;){var Q=_.delegate;if(Q){var Me=ee(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(R,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 ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var V=h(U,R.iterator,w.arg);if(V.type==="throw")return w.method="throw",w.arg=V.arg,w.delegate=null,j;var S=V.arg;return S?S.done?(w[R.resultName]=S.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):S:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function ne(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function se(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function V(){for(;++_<R.length;)if(a.call(R,_))return V.value=R[_],V.done=!1,V;return V.value=t,V.done=!0,V};return U.next=U}}throw new TypeError(P2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(F.prototype),d(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(R,w,_,U,V){V===void 0&&(V=Promise);var S=new F(I(R,w,_,U),V);return r.isGeneratorFunction(w)?S:S.next().then(function(Q){return Q.done?Q.value:S.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function V(){for(;_.length;){var S=_.pop();if(S in w)return V.value=S,V.done=!1,V}return V.done=!0,V}},r.values=se,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(le,De){return Q.type="throw",Q.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var V=this.tryEntries.length-1;V>=0;--V){var S=this.tryEntries[V],Q=S.completion;if(S.tryLoc==="root")return U("end");if(S.tryLoc<=this.prev){var Me=a.call(S,"catchLoc"),de=a.call(S,"finallyLoc");if(Me&&de){if(this.prev<S.catchLoc)return U(S.catchLoc,!0);if(this.prev<S.finallyLoc)return U(S.finallyLoc)}else if(Me){if(this.prev<S.catchLoc)return U(S.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return U(S.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var V=this.tryEntries[U];if(V.tryLoc<=this.prev&&a.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var S=V;break}}S&&(w==="break"||w==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var Q=S?S.completion:{};return Q.type=w,Q.arg=_,S?(this.method="next",this.next=S.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 V=U.completion;if(V.type==="throw"){var S=V.arg;ne(U)}return S}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:se(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),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function ws(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){$B(l,a,u,c,f,"next",M)}function f(M){$B(l,a,u,c,f,"throw",M)}c(void 0)})}}var hIe=Av.create("store_idv"),NIe=function(r,i){return{wasmService:null,isProcessing:!1,isFinalWaitingUi:!1,setAndInitWasmService:function(){var a=ws(ei().mark(function l(){var c;return ei().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return c=new IIe,M.next=3,c.init();case 3:r({wasmService:c});case 4:case"end":return M.stop()}},l)}));function u(){return a.apply(this,arguments)}return u}(),setFinalWaitingUi:function(u){r({isFinalWaitingUi:u})},connectToIdv:function(u){return ws(ei().mark(function l(){var c,f,M,d,I;return ei().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(M=y.sent,d=null,M.code===4&&(d=_2.HTTP_ISSUE),M.code!==0&&M.code!==4&&(d=_2.PROVIDER_ERROR),d===null){y.next=12;break}return I=new M0({errorCode:d}),y.abrupt("return",{error:I});case 12:return y.abrupt("return",{});case 13:case"end":return y.stop()}},l)}))()},connectByUrl:function(u){return ws(ei().mark(function l(){var c,f,M,d,I;return ei().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,M=null,f.code===4&&(M=_2.HTTP_ISSUE),f.code!==0&&f.code!==4&&(M=_2.PROVIDER_ERROR),M===null){y.next=13;break}return d=new M0({errorCode:M}),I=new Y5({errorCode:ME.CONNECTION_ISSUE,underlyingBaseError:d}),y.abrupt("return",{workflows:[],error:I});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 M,d=(M=i().currentSessionData)===null||M===void 0?void 0:M.sessionId,I=U2(U2({},f.results),{},{sessionId:d}),h=U2({results:I},f.error&&{error:f.error});i().setCurrentSessionDataLsAndStore(null),u(h)};r(function(){return{workflowSessionCompletion:l}})},loadModules:function(){var a=ws(ei().mark(function l(){var c,f,M,d;return ei().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return c=i().externalModulesNames,h.prev=1,h.next=4,EIe(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),(M=i().wasmService)===null||M===void 0||M.shutdown(),i().resetWasmService(),i().resetProps(),d=new f0({errorCode:Xd.MODULES_INSTANTIATION_FAILURE}),h.abrupt("return",{error:d});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=cm(u.find(function(c){return c.templateId===jR}));l.templateLayout=DH(l.templateLayout,i().layout),r({proccessingTransformedTemplate:l})},setIsProcessing:function(u){r({isProcessing:u})},_pushStep:function(){var a=ws(ei().mark(function l(c,f){var M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return M=null,d=function(){var N=ws(ei().mark(function E(){var m,j,L,C;return ei().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,i().wasmService.pushData(c,f);case 2:if(m=A.sent,j=null,m.code===4&&(j=vs.HTTP_ISSUE),m.code!==0&&m.code!==4&&(j=vs.PROVIDER_ERROR),j!==null&&(L=new d0({errorCode:vs.HTTP_ISSUE}),C=new uu({errorCode:ou.INTERNAL_ISSUE,message:"Error from external module",underlyingBaseError:L}),M=C),m.code!==0){A.next=12;break}return M=null,A.abrupt("return",m);case 12:return A.abrupt("return",null);case 13:case"end":return A.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),I=function(){return null},y.next=5,Mm(d,I);case 5:return y.abrupt("return",M?{error:M}:{});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=ws(ei().mark(function l(){var c,f,M,d,I;return ei().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c=i().currentStepId,f=null,M=function(){var N=ws(ei().mark(function E(){var m,j,L,C,T,A,b,k,$,Z,F,K,ee,J,ne;return ei().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return se.next=2,i().wasmService.getSessionState();case 2:if(C=se.sent,T=(m=C.data)===null||m===void 0?void 0:m.currentStep,A=(j=C.data)===null||j===void 0?void 0:j.isProcessingFiles,b=(L=C.data)===null||L===void 0||(L=L.workflow)===null||L===void 0?void 0:L.steps,k=M0e(b,T),$=C.code===4,Z=C.code!==0&&C.code!==4,F=C.code===0&&(!C.data.workflow||!C.data.currentStep),K=T&&T===c,ee=null,b&&!k&&(ee=vs.NOT_DATA_TYPE),$&&(ee=vs.HTTP_ISSUE),Z&&(ee=vs.PROVIDER_ERROR),A&&(ee=vs.IS_PROCESSING),K&&(ee=vs.SAME_STEP),F&&(ee=vs.DECODING_FAILED),ee!==null&&(J=new d0({errorCode:ee}),ne=new uu({errorCode:ou.INTERNAL_ISSUE,underlyingBaseError:J}),f=ne),hIe(JSON.stringify({nextStep:T,isDataType:k,isProcessingFiles:A})),!(k&&!K&&!A&&!$&&!Z&&!F)){se.next=23;break}return f=null,se.abrupt("return",C.data);case 23:return se.abrupt("return",null);case 24:case"end":return se.stop()}},E)}));return function(){return N.apply(this,arguments)}}(),d=function(){return null},y.next=6,Mm(M,d);case 6:if(I=y.sent,!f){y.next=9;break}return y.abrupt("return",{error:f});case 9:return y.abrupt("return",{workflow:I==null?void 0:I.workflow,nextStep:I==null?void 0:I.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:vM.SERVICE,eventType:qd.MESSAGE,message:Jd.DID_END_SESSION}))}},pushStepWaitNextStepAndSet:function(){var a=ws(ei().mark(function l(c,f){var M,d,I,h,y,N,E,m;return ei().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 Rn)){L.next=10;break}return M=f,d=new uu({errorCode:ou.MODULES_ISSUE,message:"Error from external module",underlyingBaseError:M}),i().workflowSessionCompletion({error:d}),i().resetSession(),L.abrupt("return");case 10:return L.next=12,i()._pushStep(c,f);case 12:if(I=L.sent,!I.error){L.next=17;break}return i().workflowSessionCompletion({error:I.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=ws(ei().mark(function l(){var c,f,M,d,I,h,y,N,E,m,j,L,C;return ei().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(c={isContinue:!1},f=i().workflow,M=i().getCurrentSessionDataLs(),d=i().sessionRestoreMode,d){A.next=6;break}return A.abrupt("return",c);case 6:if(M){A.next=8;break}return A.abrupt("return",c);case 8:if(I=M.sessionId,h=M.workflowId,!(!I||h!==f.id)){A.next=11;break}return A.abrupt("return",c);case 11:return A.next=13,i().wasmService.continueSession(I);case 13:return y=A.sent,N=y.data,E=N.currentStep,"id"in N&&"currentStep"in N||(m=new g0({errorCode:R5.DECODING_FAILED}),j=new uu({errorCode:ou.START_SESSION_ERROR,underlyingBaseError:m}),c=U2(U2({},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:vM.SERVICE,eventType:qd.MESSAGE,message:Jd.DID_START_RESTORE_SESSION}),c=U2(U2({},c),{},{isContinue:!0})):i().setCurrentSessionDataLsAndStore(null),A.abrupt("return",c);case 20:case"end":return A.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===jR)f=i().proccessingTransformedTemplate;else{var M;if(f=(M=i()._findStepById(u))===null||M===void 0?void 0:M.client,f!==null){var d;f.sessionId=(d=i().currentSessionData)===null||d===void 0?void 0:d.sessionId}f&&f.templateLayout&&(f.templateLayout=DH(f.templateLayout,i().layout))}var I=f0e(i().externalModules,c.steps,u);if(f===null||!I){var h=new uu({errorCode:ou.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=ws(ei().mark(function l(){var c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(c=i().wasmService)===null||c===void 0?void 0:c.shutdown();case 2:if(f=d.sent,i().resetWasmService(),i().externalModules.forEach(function(I){I.component.deinitialize&&I.component.isReady&&I.component.deinitialize()}),(f==null?void 0:f.code)!==0){d.next=7;break}return d.abrupt("return",{});case 7:return d.abrupt("return",{});case 8:case"end":return d.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 EIe(t){return Ov.apply(this,arguments)}function Ov(){return Ov=ws(ei().mark(function t(r){var i,a,u,l,c,f;return ei().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i=[{id:i1.getIdentifier(),supportedTemplates:i1.getSupportedTemplates(),component:i1}],a=Sv(Sv({},"LIVENESS",function(){return Promise.resolve().then(()=>fBe)}),"DOC_READER",function(){return Promise.resolve().then(()=>RTt)}),u=ei().mark(function I(){var h,y,N;return ei().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()}},I)}),l=0,c=r;case 4:if(!(l<c.length)){d.next=9;break}return d.delegateYield(u(),"t0",6);case 6:l++,d.next=4;break;case 9:return f=i.filter(function(I){return I!==null}),d.abrupt("return",f);case 11:case"end":return d.stop()}},t)})),Ov.apply(this,arguments)}function z0(t){"@babel/helpers - typeof";return z0=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},z0(t)}function BB(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 _v(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?BB(Object(i),!0).forEach(function(a){mIe(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):BB(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function mIe(t,r,i){return(r=DIe(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function DIe(t){var r=vIe(t,"string");return z0(r)=="symbol"?r:r+""}function vIe(t,r){if(z0(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(z0(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}var ia=lde(function(){return _v(_v(_v({},N0e.apply(void 0,arguments)),S0e.apply(void 0,arguments)),NIe.apply(void 0,arguments))}),jIe=function(r){var i=r.children;return ti.jsx("div",{style:{flex:"1 1 100%",display:"flex",justifyContent:"center",alignItems:"center",alignContent:"center",height:"100%",width:"100%"},children:i})},TIe=function(){var r=ia(function(E){return E.currentScreenConfig}),i=ia(function(E){return E.pushStepWaitNextStepAndSet}),a=ia(function(E){return E.proccessingTransformedTemplate}),u=ia(function(E){return E.isProcessing}),l=ia(function(E){return E.setIsProcessing}),c=ia(function(E){return E.currentStepId}),f=ia(function(E){return E.listener}),M=ia(function(E){return E.externalModules}),d=ia(function(E){return E.modulesConfig}),I=function(m,j){f({target:vM.WEB_COMPONENT,eventType:qd.MESSAGE,message:j,module:m})},h=function(m){l(m)},y=function(m){c&&(l(!1),i(c,m))},N=Jn.useCallback(function(){if(!r)return ti.jsx(jIe,{children:"Waiting for play... or process completed"});var E=M.find(function(m){return m.supportedTemplates.includes(r.templateId)});if(E&&r)return ti.jsx(E.component,{perform:y,moduleProps:r,modulesConfig:d,idvEventListener:I,isProcessing:h})},[r,M]);return ti.jsx(ti.Fragment,{children:ti.jsx(WR,{direction:fE.Ltr,children:ti.jsxs(ti.Fragment,{children:[u&&ti.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?ti.jsx(i1,{perform:y,moduleProps:a,idvEventListener:I,isProcessing:h}):"Processing..."}),N()]})})})};function CIe(){return ti.jsx(Jn.StrictMode,{children:ti.jsx(HMe,{children:ti.jsx(TIe,{})})})}const AIe="*,*: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}",SIe="._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 zM(t){"@babel/helpers - typeof";return zM=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},zM(t)}function OIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function ZB(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,WB(a.key),a)}}function _Ie(t,r,i){return r&&ZB(t.prototype,r),i&&ZB(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function xIe(t,r,i){return r=R0(r),LIe(t,Lv()?Reflect.construct(r,[],R0(t).constructor):r.apply(t,i))}function LIe(t,r){if(r&&(zM(r)=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wIe(t)}function wIe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bIe(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&&k0(t,r)}function xv(t){var r=typeof Map=="function"?new Map:void 0;return xv=function(a){if(a===null||!kIe(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 zIe(a,arguments,R0(this).constructor)}return u.prototype=Object.create(a.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),k0(u,a)},xv(t)}function zIe(t,r,i){if(Lv())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var u=new(t.bind.apply(t,a));return i&&k0(u,i.prototype),u}function Lv(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(r){}return(Lv=function(){return!!t})()}function kIe(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(r){return typeof t=="function"}}function k0(t,r){return k0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},k0(t,r)}function R0(t){return R0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},R0(t)}function GB(t,r,i){return(r=WB(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function WB(t){var r=RIe(t,"string");return zM(r)=="symbol"?r:r+""}function RIe(t,r){if(zM(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(zM(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var PIe=[AIe,SIe],UIe=[].concat(PIe).reduce(function(t,r){return t+r.toString()},""),KB=function(t){function r(){var i;return OIe(this,r),i=xIe(this,r),GB(i,"_root",sMe.createRoot(i.attachShadow({mode:"open"}))),GB(i,"_mounted",!1),i}return bIe(r,t),_Ie(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(ti.jsxs("div",{className:"idv",style:{backgroundColor:"white",height:"100%"},children:[ti.jsx("style",{nonce:ia.getState().getNonce(),children:UIe}),ti.jsx(CIe,{})]}))}},{key:"disconnectedCallback",value:function(){var a=this;setTimeout(function(){a._mounted&&(a._mounted=!1,a._root.unmount())}),Av.saveLogs()}}],[{key:"observedAttributes",get:function(){return[]}}])}(xv(HTMLElement));function H2(t){"@babel/helpers - typeof";return H2=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},H2(t)}function js(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */js=function(){return r};var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(R,w,_){R[w]=_.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",M=l.toStringTag||"@@toStringTag";function d(R,w,_){return Object.defineProperty(R,w,{value:_,enumerable:!0,configurable:!0,writable:!0}),R[w]}try{d({},"")}catch(R){d=function(_,U,V){return _[U]=V}}function I(R,w,_,U){var V=w&&w.prototype instanceof L?w:L,S=Object.create(V.prototype),Q=new oe(U||[]);return u(S,"_invoke",{value:K(R,_,Q)}),S}function h(R,w,_){try{return{type:"normal",arg:R.call(w,_)}}catch(U){return{type:"throw",arg:U}}}r.wrap=I;var y="suspendedStart",N="suspendedYield",E="executing",m="completed",j={};function L(){}function C(){}function T(){}var A={};d(A,c,function(){return this});var b=Object.getPrototypeOf,k=b&&b(b(se([])));k&&k!==i&&a.call(k,c)&&(A=k);var $=T.prototype=L.prototype=Object.create(A);function Z(R){["next","throw","return"].forEach(function(w){d(R,w,function(_){return this._invoke(w,_)})})}function F(R,w){function _(V,S,Q,Me){var de=h(R[V],R,S);if(de.type!=="throw"){var le=de.arg,De=le.value;return De&&H2(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){le.value=Oe,Q(le)},function(Oe){return _("throw",Oe,Q,Me)})}Me(de.arg)}var U;u(this,"_invoke",{value:function(S,Q){function Me(){return new w(function(de,le){_(S,Q,de,le)})}return U=U?U.then(Me,Me):Me()}})}function K(R,w,_){var U=y;return function(V,S){if(U===E)throw Error("Generator is already running");if(U===m){if(V==="throw")throw S;return{value:t,done:!0}}for(_.method=V,_.arg=S;;){var Q=_.delegate;if(Q){var Me=ee(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(R,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 ee(R,w){var _=w.method,U=R.iterator[_];if(U===t)return w.delegate=null,_==="throw"&&R.iterator.return&&(w.method="return",w.arg=t,ee(R,w),w.method==="throw")||_!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+_+"' method")),j;var V=h(U,R.iterator,w.arg);if(V.type==="throw")return w.method="throw",w.arg=V.arg,w.delegate=null,j;var S=V.arg;return S?S.done?(w[R.resultName]=S.value,w.next=R.nextLoc,w.method!=="return"&&(w.method="next",w.arg=t),w.delegate=null,j):S:(w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,j)}function J(R){var w={tryLoc:R[0]};1 in R&&(w.catchLoc=R[1]),2 in R&&(w.finallyLoc=R[2],w.afterLoc=R[3]),this.tryEntries.push(w)}function ne(R){var w=R.completion||{};w.type="normal",delete w.arg,R.completion=w}function oe(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(J,this),this.reset(!0)}function se(R){if(R||R===""){var w=R[c];if(w)return w.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var _=-1,U=function V(){for(;++_<R.length;)if(a.call(R,_))return V.value=R[_],V.done=!1,V;return V.value=t,V.done=!0,V};return U.next=U}}throw new TypeError(H2(R)+" is not iterable")}return C.prototype=T,u($,"constructor",{value:T,configurable:!0}),u(T,"constructor",{value:C,configurable:!0}),C.displayName=d(T,M,"GeneratorFunction"),r.isGeneratorFunction=function(R){var w=typeof R=="function"&&R.constructor;return!!w&&(w===C||(w.displayName||w.name)==="GeneratorFunction")},r.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,T):(R.__proto__=T,d(R,M,"GeneratorFunction")),R.prototype=Object.create($),R},r.awrap=function(R){return{__await:R}},Z(F.prototype),d(F.prototype,f,function(){return this}),r.AsyncIterator=F,r.async=function(R,w,_,U,V){V===void 0&&(V=Promise);var S=new F(I(R,w,_,U),V);return r.isGeneratorFunction(w)?S:S.next().then(function(Q){return Q.done?Q.value:S.next()})},Z($),d($,M,"Generator"),d($,c,function(){return this}),d($,"toString",function(){return"[object Generator]"}),r.keys=function(R){var w=Object(R),_=[];for(var U in w)_.push(U);return _.reverse(),function V(){for(;_.length;){var S=_.pop();if(S in w)return V.value=S,V.done=!1,V}return V.done=!0,V}},r.values=se,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(le,De){return Q.type="throw",Q.arg=w,_.next=le,De&&(_.method="next",_.arg=t),!!De}for(var V=this.tryEntries.length-1;V>=0;--V){var S=this.tryEntries[V],Q=S.completion;if(S.tryLoc==="root")return U("end");if(S.tryLoc<=this.prev){var Me=a.call(S,"catchLoc"),de=a.call(S,"finallyLoc");if(Me&&de){if(this.prev<S.catchLoc)return U(S.catchLoc,!0);if(this.prev<S.finallyLoc)return U(S.finallyLoc)}else if(Me){if(this.prev<S.catchLoc)return U(S.catchLoc,!0)}else{if(!de)throw Error("try statement without catch or finally");if(this.prev<S.finallyLoc)return U(S.finallyLoc)}}}},abrupt:function(w,_){for(var U=this.tryEntries.length-1;U>=0;--U){var V=this.tryEntries[U];if(V.tryLoc<=this.prev&&a.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var S=V;break}}S&&(w==="break"||w==="continue")&&S.tryLoc<=_&&_<=S.finallyLoc&&(S=null);var Q=S?S.completion:{};return Q.type=w,Q.arg=_,S?(this.method="next",this.next=S.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 V=U.completion;if(V.type==="throw"){var S=V.arg;ne(U)}return S}}throw Error("illegal catch attempt")},delegateYield:function(w,_,U){return this.delegate={iterator:se(w),resultName:_,nextLoc:U},this.method==="next"&&(this.arg=t),j}},r}function qB(t,r,i,a,u,l,c){try{var f=t[l](c),M=f.value}catch(d){return void i(d)}f.done?r(M):Promise.resolve(M).then(a,u)}function kM(t){return function(){var r=this,i=arguments;return new Promise(function(a,u){var l=t.apply(r,i);function c(M){qB(l,a,u,c,f,"next",M)}function f(M){qB(l,a,u,c,f,"throw",M)}c(void 0)})}}function HIe(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function VIe(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,QIe(a.key),a)}}function YIe(t,r,i){return r&&VIe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function QIe(t){var r=FIe(t,"string");return H2(r)=="symbol"?r:r+""}function FIe(t,r){if(H2(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r);if(H2(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $Ie=function(){function t(){HIe(this,t)}return YIe(t,[{key:"initialize",value:function(){var r=kM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=ia.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=kM(js().mark(function a(u){var l,c;return js().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(typeof u=="string"){M.next=5;break}return M.next=3,ia.getState().configure(u);case 3:return l=M.sent,M.abrupt("return",l);case 5:return M.next=7,ia.getState().configureWithUrl(u);case 7:return c=M.sent,M.abrupt("return",c);case 9:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"getWorkFlows",value:function(){var r=kM(js().mark(function a(u){var l;return js().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,ia.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=kM(js().mark(function a(u){var l,c;return js().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return l=u.workfowId,M.next=3,ia.getState().preparareWorkflowAndPrepareUi(l);case 3:return c=M.sent,M.abrupt("return",c);case 5:case"end":return M.stop()}},a)}));function i(a){return r.apply(this,arguments)}return i}()},{key:"startWorkflow",value:function(){var r=kM(js().mark(function a(){var u;return js().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ia.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 M=function(I){f(I)};ia.getState().playWorkflow(M)}));case 6:case"end":return c.stop()}},a)}));function i(){return r.apply(this,arguments)}return i}()},{key:"deinitialize",value:function(){var r=kM(js().mark(function a(){var u;return js().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,ia.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){ia.getState().setNonce(i)}},{key:"eventListener",set:function(i){if(!i||typeof i!="function"){console.warn("IdvIntegrationService:: listener is not a function");return}ia.getState().setListener(i)}},{key:"sessionRestoreMode",set:function(i){ia.getState().setSessionRestoreMode(i)}},{key:"currentSessionId",get:function(){return ia.getState().getCurrentSessionId()}}])}(),BIe=window.customElements.get("idv-flow");BIe||window.customElements.define("idv-flow",KB);var ZIe=Object.defineProperty,GIe=Object.defineProperties,WIe=Object.getOwnPropertyDescriptors,JB=Object.getOwnPropertySymbols,KIe=Object.prototype.hasOwnProperty,qIe=Object.prototype.propertyIsEnumerable,XB=(t,r,i)=>r in t?ZIe(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,wv=(t,r)=>{for(var i in r||(r={}))KIe.call(r,i)&&XB(t,i,r[i]);if(JB)for(var i of JB(r))qIe.call(r,i)&&XB(t,i,r[i]);return t},JIe=(t,r)=>GIe(t,WIe(r)),io=(t,r,i)=>new Promise((a,u)=>{var l=M=>{try{f(i.next(M))}catch(d){u(d)}},c=M=>{try{f(i.throw(M))}catch(d){u(d)}},f=M=>M.done?a(M.value):Promise.resolve(M.value).then(l,c);f((i=i.apply(t,r)).next())}),eZ=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function tZ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rZ={exports:{}},P0={},nZ={exports:{}},Br={},iZ;function XIe(){if(iZ)return Br;iZ=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-D-DKVc4t.js";
|
|
2
2
|
export {
|
|
3
3
|
a as ConnectionError,
|
|
4
4
|
e as DeinitializationError,
|
package/package.json
CHANGED