@tsocial/tvweb-sdk 5.38.0 → 5.38.1
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.
- package/build/esm/{chunk-71bc3d31.js → chunk-265525fb.js} +1 -1
- package/build/esm/{chunk-37cdf0c6.js → chunk-2a4cb9f5.js} +1 -1
- package/build/esm/chunk-2bdac502.js +1 -0
- package/build/esm/{chunk-47f573ed.js → chunk-37a2eeaf.js} +1 -1
- package/build/esm/{chunk-0e095921.js → chunk-411ea759.js} +1 -1
- package/build/esm/{chunk-7b389c71.js → chunk-4377ca3e.js} +1 -1
- package/build/esm/{chunk-27a081f0.js → chunk-4552fd9e.js} +1 -1
- package/build/esm/{chunk-f003d34d.js → chunk-575fb45a.js} +29 -10
- package/build/esm/{chunk-da9e4f99.js → chunk-7b93e41f.js} +1 -1
- package/build/esm/{chunk-c74892c9.js → chunk-7fd19a76.js} +1 -1
- package/build/esm/{chunk-4bdebcdd.js → chunk-84471c81.js} +1 -1
- package/build/esm/{chunk-d8a92cb1.js → chunk-8c9bb671.js} +1 -1
- package/build/esm/{chunk-32ffba48.js → chunk-906e840c.js} +1 -1
- package/build/esm/{chunk-99247a2f.js → chunk-9d0b0fc7.js} +31 -12
- package/build/esm/{chunk-191cab03.js → chunk-9fe80ed2.js} +1 -1
- package/build/esm/{chunk-b2a6294d.js → chunk-b8138130.js} +1 -1
- package/build/esm/{chunk-61824c72.js → chunk-d15b739a.js} +1 -1
- package/build/esm/{chunk-825b5b31.js → chunk-ddb2ebe0.js} +1 -1
- package/build/esm/{chunk-60dc6fe1.js → chunk-e2211b41.js} +1 -1
- package/build/esm/{chunk-4c5427d3.js → chunk-f703e0a4.js} +1 -1
- package/build/esm/chunk-fa315830.js +1 -0
- package/build/esm/{chunk-6a6c84e6.js → chunk-fd4614fe.js} +1 -1
- package/build/esm/tvweb-sdk.esm.min.js +1 -1
- package/build/tvweb-sdk.cjs.min.js +92 -54
- package/build/tvweb-sdk.standalone.js +250 -196
- package/build/tvweb-sdk.standalone.min.js +89 -51
- package/package.json +5 -5
- package/build/esm/chunk-0ffdb7d1.js +0 -1
- package/build/esm/chunk-17ccf2c0.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
let e,t;import{b as n,s as a,d as s,r as r,P as i,L as o,j as l,f as u,c as c,u as f,p as p,g as d}from"./chunk-
|
|
1
|
+
let e,t;import{b as n,s as a,d as s,r as r,P as i,L as o,j as l,f as u,c as c,u as f,p as p,g as d}from"./chunk-575fb45a.js";import{L as g,C as m,S as h,u as v}from"./chunk-8c9bb671.js";import{W as A}from"./chunk-2bdac502.js";var C,S,b,y,F,T,E,I,x,_={exports:{}};function M(){if(C)return _.exports;C=1;var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var t=new Uint8Array(16);_.exports=function(){return e(t),t}}else{var n=Array(16);_.exports=function(){for(var e,t=0;t<16;t++)(3&t)==0&&(e=0x100000000*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}}return _.exports}function D(){if(b)return S;b=1;for(var e=[],t=0;t<256;++t)e[t]=(t+256).toString(16).substr(1);return S=function(t,n){var a=n||0;return""+e[t[a++]]+e[t[a++]]+e[t[a++]]+e[t[a++]]+"-"+e[t[a++]]+e[t[a++]]+"-"+e[t[a++]]+e[t[a++]]+"-"+e[t[a++]]+e[t[a++]]+"-"+e[t[a++]]+e[t[a++]]+e[t[a++]]+e[t[a++]]+e[t[a++]]+e[t[a++]]}}var U=function(){if(x)return I;x=1;var e=function(){if(F)return y;F=1;var e,t,n=M(),a=D(),s=0,r=0;return y=function(i,o,l){var u=o&&l||0,c=o||[],f=(i=i||{}).node||e,p=void 0!==i.clockseq?i.clockseq:t;if(null==f||null==p){var d=n();null==f&&(f=e=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==p&&(p=t=(d[6]<<8|d[7])&16383)}var g=void 0!==i.msecs?i.msecs:new Date().getTime(),m=void 0!==i.nsecs?i.nsecs:r+1,h=g-s+(m-r)/1e4;if(h<0&&void 0===i.clockseq&&(p=p+1&16383),(h<0||g>s)&&void 0===i.nsecs&&(m=0),m>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");s=g,r=m,t=p;var v=((0xfffffff&(g+=122192928e5))*1e4+m)%0x100000000;c[u++]=v>>>24&255,c[u++]=v>>>16&255,c[u++]=v>>>8&255,c[u++]=255&v;var A=g/0x100000000*1e4&0xfffffff;c[u++]=A>>>8&255,c[u++]=255&A,c[u++]=A>>>24&15|16,c[u++]=A>>>16&255,c[u++]=p>>>8|128,c[u++]=255&p;for(var C=0;C<6;++C)c[u+C]=f[C];return o||a(c)}}(),t=function(){if(E)return T;E=1;var e=M(),t=D();return T=function(n,a,s){var r=a&&s||0;"string"==typeof n&&(a="binary"===n?Array(16):null,n=null);var i=(n=n||{}).random||(n.rng||e)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,a)for(var o=0;o<16;++o)a[r+o]=i[o];return a||t(i)}}();return t.v1=e,t.v4=t,I=t}();let k=e=>{let t={};return Object.entries(e).forEach(([e,n])=>{if(n){if("customerUserId"===e){t.cus_user_id=n;return}if("faces"===e){t.faces=n.map(e=>({id:e.id}));return}if("gestureFaces"===e){t.gesture_faces=n.map(e=>({gesture:e.gesture,images:e.images.map(e=>({id:e.id}))}));return}if("videos"===e){t.videos=n;return}t[e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)]=n}}),t},R={enableVerifySanityPortrait:!1,enableVerifyFaceLiveness:!1};function w(e){let{apiCheck:t,mode:i,authType:o,authMethod:g,apiCredentials:m,onDone:h,onError:C,onClose:S,onReset:b,captureFrameSettings:y,onFramesCaptured:F,clientSettings:T,outputEncryptionSettings:E,logCredentials:I,flowId:x,serviceSettings:_,cameraScale:M,offsetFaceY:D,frontalMinSize:w,customTheme:N,livenessDetectionComponent:j,customComponent:L,customTexts:V,extraConfig:H}=e,B=v(),G=r.useMemo(()=>{let e={..._,...R};return u.getEnabledServices(e,B)},[B,_]),{FaceAuthenticationLoading:O}=L,[P,K]=r.useState(!1),{registerFace:W,authenFace:q}=function({apiCredentials:e,authMethod:t,enabledServices:a,authType:i}){let{apiClient:o}=s.useApiClient({apiCredentials:e}),l=r.useCallback(async e=>{let n=e.frontalFaces?.map(e=>({id:e.id}))??[],s=e.steps?.map(e=>({gesture:e.name,images:[{id:e.id}]})),r=[];return{selfieType:t,faces:n,gestureFaces:s,videos:r=a.enableUploadFrames?e.uploadFramesResult??[]:e.capturedFrames??[]}},[t,a.enableUploadFrames]),u=r.useCallback(async({sdkResult:e})=>{let t=await l(e),s=U.v4();t={...t,faceType:"selfie",customerUserId:s};let r=null;if(a.enableRegisterFace){let e=k(t);"success"===n(r=await o.httpClient.post("/v1/face_auth_register",e),"data.status")&&localStorage.setItem("tv:cus-user-id",s)}return{...t,apiResult:r}},[o.httpClient,l,a.enableRegisterFace]);return{registerFace:u,authenFace:r.useCallback(async({sdkResult:e})=>{let t=await l(e),n=localStorage.getItem("tv:cus-user-id");t={...t,customerUserId:n,authType:i};let s=null;if(a.enableAuthenticateFace){let e=k(t);s=await o.httpClient.post("/v1/face_auth",e)}return{...t,apiResult:s}},[o.httpClient,i,l,a.enableAuthenticateFace])}}({apiCredentials:m,authMethod:g,enabledServices:G,authType:o}),{billingSettings:z,enableBilling:Y}=c.useSDKSettings(),Z=f.getWebSetting(B,"data.settings.sdk_settings.billing_settings.billing_config"),$=f.getWebSetting(B,"data.settings.sdk_settings.billing_settings.url"),J=p.buildBillingInput(e),{submitBilling:Q}=d({enable:Y,onError:C,billingSettings:z??{json:Z??{}},billingUrl:$}),X=r.useCallback(e=>{let t={sdkStatus:a.BillingStatus.success,result:p.buildBillingOutput(e)};Q({service:a.BillingService.faceAuth,input:J,output:t}),h&&h(e)},[J,h,Q]),ee=r.useCallback(e=>{if(a.ErrorsWithoutBilling.includes(e.code))return void C(e);let t={error:e,sdkStatus:a.BillingStatus.fail};Q({service:a.BillingService.faceAuth,input:J,output:t}),C&&C(e)},[J,C,Q]),et=r.useCallback(e=>{var t,s;let r,l,u,c=(s={...e,frontalFaces:(r=n(t=e,"frontalFaces",[]),l=n(t,"frontalFacesEncrypted",[]),r.map((e,t)=>({blob:e,encrypted:l[t]??null})))},u={},u.faces=n(s,"frontalFaces"),u.videos=Array.isArray(n(s,"capturedFrames"))&&n(s,"capturedFrames").length>0?[{frames:n(s,"capturedFrames")}]:null,u.gestureFaces=Array.isArray(n(s,"steps"))&&n(s,"steps").length>0?n(s,"steps").map(e=>{let{name:t}=e;return{gesture:t,images:[{...e?.image}]}}):null,u);i===a.FaceAuthenticationMode.REGISTRATION&&(c={...c,customerUserID:U.v4(),faceType:"selfie",selfieType:g}),i===a.FaceAuthenticationMode.AUTHENTICATION&&(c={...c,selfieType:g,authType:o}),X(c)},[i,X,g,o]),en=r.useCallback(async e=>{if(!t||!G.enableUploadImages)return void et(e);try{let t;K(!0),i===a.FaceAuthenticationMode.REGISTRATION&&(t=await W({sdkResult:e})),i===a.FaceAuthenticationMode.AUTHENTICATION&&(t=await q({sdkResult:e})),X(t)}catch(e){console.error(e),ee({...a.Errors.api_call_error,details:e})}finally{K(!1)}},[t,G.enableUploadImages,et,i,X,W,q,ee]);return l.jsxs(A,{isWrappedBy:"face_authen",children:[l.jsx(j,{mode:(e=>{switch(e){case a.FaceAuthMethod.STANDARD_AUTHEN:return a.Mode.PASSIVE;case a.FaceAuthMethod.ADVANCED_AUTHEN_ACTIVE:return a.Mode.ACTIVE;case a.FaceAuthMethod.EDGE_AUTHEN:return a.Mode.FLASH_EDGE;case a.FaceAuthMethod.ADVANCED_AUTHEN_FLASH:return a.Mode.FLASH_ADVANCED;case a.FaceAuthMethod.LIGHT_AUTHEN:return a.Mode.PASSIVE;default:return e}})(g),cameraScale:M,offsetFaceY:D,frontalMinSize:w,captureFrameSettings:y,logCredentials:I,onLivenessDetectionDone:en,outputEncryptionSettings:E,onFramesCaptured:F,onError:C,onClose:S,onReset:b,clientSettings:T,customTheme:N,extraConfig:H,customComponent:L,apiCheck:t,apiCredentials:m,serviceSettings:G,flowId:x,customTexts:V}),l.jsx(O,{loading:P})]})}w.propTypes={apiCheck:i.bool,mode:i.string,authMethod:i.string,authType:i.string,onDone:i.func,onError:i.func,onClose:i.func,outputEncryptionSettings:i.shape({}),captureFrameSettings:i.shape({enable:i.bool,framesIntervalTime:i.number,framesBatchLength:i.number}),cameraScale:i.number,offsetFaceY:i.number,frontalMinSize:i.number,apiCredentials:i.shape({accessKey:i.string,secretKey:i.string,apiUrl:i.string}),logCredentials:i.shape({}),customTheme:i.shape({}),serviceSettings:i.shape({}),flowId:i.string,clientSettings:i.shape({}),livenessDetectionComponent:i.elementType,customComponent:i.shape({FaceAuthenticationLoading:i.elementType}),extraConfig:i.shape({}),onReset:i.func,onFramesCaptured:i.func,customTexts:i.shape({})},w.defaultProps={apiCheck:!1,mode:a.FaceAuthenticationMode.REGISTRATION,authMethod:a.FaceAuthMethod.EDGE_AUTHEN,authType:"transfer",onDone:()=>{},onError:()=>{},onClose:()=>{},outputEncryptionSettings:null,captureFrameSettings:{enable:!0,framesIntervalTime:180,framesBatchLength:15},cameraScale:1,offsetFaceY:0,frontalMinSize:null,apiCredentials:{accessKey:"",secretKey:"",apiUrl:""},logCredentials:null,customTheme:null,serviceSettings:{enableUploadFrames:!0,enableUploadImages:!0,enableRegisterFace:!0,enableAuthenticateFace:!0},flowId:"face_authen",clientSettings:null,livenessDetectionComponent:g,customComponent:{FaceAuthenticationLoading:o},extraConfig:null,onReset:()=>{},onFramesCaptured:()=>{},customTexts:{}};var N=(e=w,t=function(t){let{customTexts:n}=t;return l.jsx(h,{customTexts:n,children:l.jsx(e,{...t})})},function(e){let{apiCheck:n,apiCredentials:a,serviceSettings:s,flowId:r,clientSettings:i}=e,o=n&&(s?.enableGetClientSettings??!0);return l.jsx(m,{enableGetClientSettings:o,clientSettings:i,apiCredentials:a,flowId:r,children:l.jsx(t,{...e})})});function j(e){return l.jsx(N,{...e})}j.propTypes={logCredentials:i.shape({}),clientSettings:i.shape({})},j.defaultProps={logCredentials:null,clientSettings:null};export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,C as r,U as s,r as n,m as a,c as t,s as o,j as i,a4 as c,b as l,P as u,k as p}from"./chunk-
|
|
1
|
+
import{A as e,C as r,U as s,r as n,m as a,c as t,s as o,j as i,a4 as c,b as l,P as u,k as p}from"./chunk-575fb45a.js";import{p as m,g as d,S as f,a as h,O as g,C as C,E as j,b as y,B as D,c as F,L as S}from"./chunk-906e840c.js";import{u as x,C as b}from"./chunk-7b93e41f.js";import{M as k,O as I,W as T,C as E}from"./chunk-e2211b41.js";import{D as R}from"./chunk-4552fd9e.js";import{u as L}from"./chunk-2bdac502.js";import"./chunk-d15b739a.js";import"./chunk-37a2eeaf.js";import"./chunk-8c9bb671.js";let v=p.isMobile?{width:{ideal:640}}:null;function P(u){let{apiCheck:p,onLivenessDetectionDone:R,captureFrameSettings:P,onFramesCaptured:A,frontCamera:M,flipVideoHorizontal:O,customDirectionIcon:H,customStepTimeConstraints:U,onProcessing:V,customErrors:w,apiCredentials:$,outputEncryptionSettings:_,cameraScale:B,defaultCameraId:K,passiveModeAuto:N,offsetFaceY:z,styledComponent:G,serviceSettings:Y,onReset:W,isLoading:q}=u,J=e(),{onErrorCallback:Q,onCloseCallback:X}=L(),Z=r.useAsset("bg_camera_mask.png"),ee=r.useAsset("bg_camera_mask_red.png"),er=s("IDCapturing.loadingIcon.src","ic_loading.gif"),[es,en]=n.useState({}),{yFaceDetectionError:ea,yFaceVerificationStepsWrapper:et}=es,[eo,ei]=n.useState(""),[ec,el]=n.useState(),eu=n.useMemo(()=>({backgroundColor:a("Selfie.backgroundColor")({theme:J})}),[J]),ep=n.useCallback(({lostY:e,height:r,clientHeight:s})=>{let n=e+25,a=n+30;en({yFaceDetectionError:n,yFaceVerificationStepsWrapper:a+r+20});let t=Math.floor(e),o=Math.floor(s-e),i=Math.floor(a);return 0!==z&&(i+z<t||i+z+r>o)?Q({code:`offsetFaceY must be in [-${i-t}, ${o-r-i}]`}):i+=z,{y:i}},[z,Q]),{shouldResetFlowOnOrientationChange:em,countdownToTakePicture:ed,cropArea:ef,curStepIndex:eh,faceDetectionError:eg,resetFlow:eC,handleTriggerPassiveMode:ej,handleVideoPlayed:ey,refVideo:eD,showCountdown:eF,steps:eS,refIsReseting:ex,videoPlayed:eb,warmupDone:ek,showCaptureButton:eI,shouldShowCountdown:eT,showLoading:eE}=x({currentOrientation:ec,apiCheck:p,bgCameraMask:Z,bgCameraMaskRed:ee,surroundStyle:eu,onLivenessDetectionDone:R,onError:Q,cropAreaDimension:ep,customDirectionIcon:H,captureFrameSettings:P,onFramesCaptured:A,setRemainingTime:ei,customStepTimeConstraints:U,onProcessing:V,customErrors:w,apiCredentials:$,outputEncryptionSettings:_,cameraScale:B,passiveModeAuto:N,serviceSettings:Y,onReset:W});n.useEffect(()=>{"string"==typeof eS[0]?.directionIcon&&Promise.all(eS.map(e=>m(e.directionIcon)))},[eS]);let{CloseCameraButton:eR}=G,eL=d(u,J),ev=ex.current?0:eh/eS.length*100,{lang:eP}=t.useSDKSettings(),eA=n.useRef(0),eM=n.useRef({}),eO=n.useRef(o.ErrorDuration.SHORT),eH=n.useMemo(()=>{let{msg:e,duration:r=o.ErrorDuration.SHORT}=eg||{},s=e?.[eP];return Date.now()-eA.current>=eO.current&&(eA.current=Date.now(),eO.current=r,eM.current=s),eM.current},[eg,eh]),eU=n.useCallback(e=>{el(e),em?eC():e===k.LANDSCAPE?eD.current?.pause():eD.current?.play()},[eD,eC,em]);return i.jsx(I,{onOrientationChange:eU,children:i.jsxs(c,{frontCamera:M,onVideoPlayed:ey,onClose:X,flipHorizontal:O??M,ref:eD,videoSettings:v,onError:Q,scale:B,defaultCameraId:K,closeButton:eR||null,children:[!ek&&i.jsx(T,{}),eb?i.jsxs(i.Fragment,{children:["string"==typeof eH?i.jsx(f,{top:ea-15,className:"face-detection-error",children:eH}):null,ef.current?i.jsxs(E,{x:`${ef.current.x}px`,y:`${ef.current.y}px`,width:`${ef.current.width}px`,height:`${ef.current.height}px`,surroundStyle:ef.current.surroundStyle,children:[i.jsx(h,{}),i.jsx(g,{...eL,progress:ev,showErrorRing:!!eg&&a("Selfie.progressCircle.showErrorRing")({theme:J})}),eT?i.jsx(C,{children:ed}):null,eg&&i.jsx(j,{})]}):null,eo&&i.jsx(y,{top:et-30,children:eo}),eI?i.jsx(D,{children:i.jsx(F,{onClick:ej,disabled:eF,children:l(J,"Selfie.captureIcon.src")?i.jsx("img",{src:l(J,"Selfie.captureIcon.src"),alt:""}):i.jsx(b,{fillColor:"rgba(193, 197, 204, 1)"})})}):null]}):null,(eE||q)&&i.jsx(S,{children:i.jsx("img",{src:er,alt:""})})]})})}P.propTypes={apiCheck:u.bool,mode:u.string,onLivenessDetectionDone:u.func,onClose:u.func,onError:u.func,onReset:u.func,captureFrameSettings:u.shape({}),onFramesCaptured:u.func,frontCamera:u.bool,isLoading:u.bool,flipVideoHorizontal:u.bool,customDirectionIcon:u.shape({}),customStepTimeConstraints:u.shape({}),onProcessing:u.func,customErrors:u.shape({}),apiCredentials:u.shape({accessKey:u.string,secretKey:u.string,apiUrl:u.string}),outputEncryptionSettings:u.shape({}),cameraScale:u.number,defaultCameraId:u.string,passiveModeAuto:u.bool,offsetFaceY:u.number,styledComponent:u.shape({CloseCameraButton:u.node}),serviceSettings:u.shape({})},P.defaultProps={apiCheck:!1,mode:null,onLivenessDetectionDone:null,onClose:null,onError:()=>{},onReset:()=>{},captureFrameSettings:{enable:!1,framesIntervalTime:180,framesBatchLength:0},onFramesCaptured:()=>{},frontCamera:!0,isLoading:!1,flipVideoHorizontal:null,customDirectionIcon:{[o.FaceDirection.LEFT]:i.jsx(R,{type:o.FaceDirection.LEFT}),[o.FaceDirection.RIGHT]:i.jsx(R,{type:o.FaceDirection.RIGHT}),[o.FaceDirection.UP]:i.jsx(R,{type:o.FaceDirection.UP}),[o.FaceDirection.FRONTAL]:i.jsx(R,{type:o.FaceDirection.FRONTAL})},customStepTimeConstraints:{[o.FaceDirection.UP]:{delayTime:0},[o.FaceDirection.LEFT]:{delayTime:0},[o.FaceDirection.RIGHT]:{delayTime:0},[o.FaceDirection.FRONTAL]:{delayTime:2e3}},onProcessing:()=>{},customErrors:null,apiCredentials:{accessKey:"",secretKey:"",apiUrl:""},outputEncryptionSettings:null,cameraScale:1,defaultCameraId:void 0,passiveModeAuto:!1,offsetFaceY:0,styledComponent:{CloseCameraButton:null},serviceSettings:{enableUploadFrames:!0,enableUploadImages:!0,enableVerifySanityPortrait:!0,enableVerifySanityIDCard:!0,enableVerifyFaceLiveness:!0,enableDetectIDCardTampering:!0,enableReadIDCardInfo:!0}};export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r,r as o,s as e,a2 as n,ac as t,ad as i,ae as a,af as s,ag as u,ah as d,ai as c,aj as l,ak as g,al as f,am as p,an as h,$ as b,u as y,ao as x}from"./chunk-575fb45a.js";let k=o.createContext(!1),C=({children:o,debug:e=!1})=>r.jsx(k.Provider,{value:e,children:o}),T=()=>o.useContext(k),v={tsBlue:"#0276f1",tsSecondary:"rgba(0, 47, 117, 0.6)"},m={IDCapturing:{backgroundColor:"rgba(0, 0, 0, 0.6)",titleFront:{color:"#fff",fontSize:"20px",fontWeight:"normal",backgroundColor:"unset"},titleBack:{color:"#fff",fontSize:"20px",fontWeight:"normal",backgroundColor:"unset"},instruction:{padding:"unset",color:"#fff",fontSize:"16px",fontWeight:"normal",backgroundColor:"unset",border:"unset",borderRadius:"unset"},captureInstruction:{capturing:{padding:"12px 12px",color:"#ffffff",fontSize:"14px",fontWeight:"normal",background:"rgba(15, 23, 42, 0.25)",border:"none",borderRadius:"100px"},captured:{padding:"12px 12px",color:"#ffffff",fontSize:"14px",fontWeight:"normal",background:"rgba(15, 23, 42, 0.25)",border:"none",borderRadius:"100px"}},error:{padding:"5px 10px",color:"#fff",fontSize:"16px",fontWeight:"normal",backgroundColor:"#ea3223",border:"unset",borderRadius:"3px"},toggle:{color:"#d1d1d1",fontSize:"16px",fontWeight:"500",gap:"16px",backgroundColor:"#fff",active:{backgroundColor:"#2196f3"},inactive:{backgroundColor:"#ccc"}},countdown:{color:"#fff",fontSize:"18px",fontWeight:"normal",backgroundColor:"#ea3223",border:"unset",borderRadius:"3px"},cardIcon:{src:"",width:"auto",height:"38px"},captureIcon:{src:"",width:"60px",height:"60px",disabled:{src:""}},loadingIcon:{src:"",width:"100px",height:"100px"},rectangleMask:{width:600,height:400,strokeWidth:2,strokeStyles:{},radius:10,paddingStyle:{fill:"rgba(0, 0, 0, 0.6)"},default:{fill:"none",stroke:"#fff",strokeWidth:2,strokeDasharray:"7, 4",opacity:.6},error:{fill:"rgba(234,50,35, 0.1)",strokeWidth:2,stroke:"#ea3223"}}},IDConfirmPopup:{image:{borderRadius:"5px"}},IDUploadButton:{background:"rgba(255, 255, 255, 0.2)",border:"1px solid rgba(255, 255, 255, 0.25)",borderRadius:"8px",color:"#ffffff",padding:"12px",leftOffset:"24px",focusOutlineColor:"#ffffff"},IDUploadErrorToast:{background:"rgba(0, 0, 0, 0.75)",color:"#ffffff",borderRadius:"8px",fontSize:"14px",padding:"10px 16px",maxWidthInset:"48px"},QRStep:{title:{color:"#fff",fontSize:"20px",fontWeight:"700",backgroundColor:"unset"},guidelinePopup:{image:{src:"",borderRadius:"5px",backgroundColor:"#e7e6e6"},guideText:{color:v.tsSecondary,fontSize:"16px",fontWeight:"normal",textAlign:"center",lineHeight:"20px"},countdownText:{color:v.tsSecondary,fontSize:"16px",fontWeight:"normal",textAlign:"center",lineHeight:"20px"}},scanTooltip:{backgroundColor:"#00ce78",borderRadius:"8px",color:"#fff",padding:"10px",textAlign:"center"},scanCountdown:{textAlign:"center",color:"#fff",fontSize:"18px",fontWeight:"normal",backgroundColor:"#ea3223",border:"none",borderRadius:"3px",padding:"5px 10px"},invalidPopup:{padding:"10px",title:{display:"block",color:v.tsSecondary,fontSize:"16px",fontWeight:"bold",margin:"25px 0 0 0",padding:"0 0 0 0"},description:{color:v.tsSecondary,fontSize:"16px",fontWeight:"normal",textAlign:"center",margin:"30px 0 0 0",padding:"0 0 0 0"},retryButton:{color:"#fff",fontSize:"1rem",fontWeight:"normal",backgroundColor:v.tsBlue,border:"none",borderRadius:"3px",outline:"none",height:"66px",margin:"30px 0 0 0"},skipButton:{color:v.tsBlue,fontSize:"1rem",fontWeight:"normal",backgroundColor:"unset",border:"none",borderRadius:"unset",outline:"none",height:"unset",margin:"20px 0"}},resultText:{success:{textColor:"#000",fontSize:"1rem",fontWeight:"normal",mainColor:"#34ce60"},error:{textColor:"#000",fontSize:"1rem",fontWeight:"normal",mainColor:"#ff9532"}}}},D={IDCapturing:{backgroundColor:"rgba(0, 0, 0, 0.6)",titleFront:{...e.DesignToken.Typography.h4,color:e.DesignToken.Color.base.white,backgroundColor:"unset"},titleBack:{...e.DesignToken.Typography.h4,color:e.DesignToken.Color.base.white,backgroundColor:"unset"},instruction:{...e.DesignToken.Typography.body,padding:"5px 10px",color:"rgba(255, 255, 255, 0.8)",backgroundColor:"unset",border:"unset",borderRadius:"unset"},captureInstruction:{capturing:{...e.DesignToken.Typography.label,color:e.DesignToken.Color.base.white,padding:`6px ${e.DesignToken.Spacing.sm}`,background:"rgba(15, 23, 42, 0.35)",border:"none",borderRadius:"100px"},captured:{...e.DesignToken.Typography.label,color:e.DesignToken.Color.base.white,padding:`6px ${e.DesignToken.Spacing.sm}`,background:"rgba(15, 23, 42, 0.35)",border:"none",borderRadius:"100px"}},error:{...e.DesignToken.Typography.body,padding:"5px 10px",color:e.DesignToken.Color.semantic.error[400],backgroundColor:"transparent",border:"unset",borderRadius:e.DesignToken.CornerRadius["2xs"]},toggle:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.base.white,gap:e.DesignToken.Spacing.base,backgroundColor:e.DesignToken.Color.base.white,active:{backgroundColor:e.DesignToken.Color.base.blue},inactive:{backgroundColor:e.DesignToken.Color.neutral[300]}},countdown:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.semantic.error[400],backgroundColor:"transparent",border:"unset",borderRadius:e.DesignToken.CornerRadius["2xs"]},cardIcon:{src:"",width:"auto",height:"38px"},captureIcon:{src:"",width:e.DesignToken.Height["7xl"],height:e.DesignToken.Height["7xl"],disabled:{src:""}},loadingIcon:{src:"",width:"47px",height:"47px"},rectangleMask:{width:600,height:400,strokeWidth:n.getCSSNumericValue(e.DesignToken.BorderWidth["3xl"]),strokeStyles:{},radius:n.getCSSNumericValue(e.DesignToken.CornerRadius.base),paddingStyle:{fill:"rgba(0, 0, 0, 0.6)"},default:{fill:"none",stroke:e.DesignToken.Color.neutral[400],strokeWidth:n.getCSSNumericValue(e.DesignToken.BorderWidth["3xl"])},error:{fill:"none",strokeWidth:n.getCSSNumericValue(e.DesignToken.BorderWidth["3xl"]),stroke:e.DesignToken.Color.semantic.error[400]}}},IDConfirmPopup:{image:{borderRadius:e.DesignToken.CornerRadius["2xs"]}},IDUploadButton:{background:"rgba(255, 255, 255, 0.2)",border:"1px solid rgba(255, 255, 255, 0.25)",borderRadius:e.DesignToken.CornerRadius.xs,color:e.DesignToken.Color.base.white,padding:e.DesignToken.Spacing.sm,leftOffset:"24px",focusOutlineColor:e.DesignToken.Color.base.white},IDUploadErrorToast:{background:"rgba(0, 0, 0, 0.75)",color:e.DesignToken.Color.base.white,borderRadius:e.DesignToken.CornerRadius.xs,fontSize:"14px",padding:"10px 16px",maxWidthInset:"48px"},QRStep:{title:{...e.DesignToken.Typography.h4,backgroundColor:"unset"},guidelinePopup:{image:{src:"",borderRadius:e.DesignToken.CornerRadius["2xs"],backgroundColor:"transparent"},guideText:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.neutral[600],textAlign:"center"},countdownText:{...e.DesignToken.UIText.medium,color:e.DesignToken.Color.neutral[500],textAlign:"center"}},scanTooltip:{backgroundColor:"transparent",borderRadius:e.DesignToken.CornerRadius.xs,color:e.DesignToken.Color.base.white,padding:"10px",textAlign:"center"},scanCountdown:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.semantic.error[400],textAlign:"center",backgroundColor:"transparent",border:"none",borderRadius:e.DesignToken.CornerRadius["2xs"],padding:"0px"},invalidPopup:{padding:"10px",title:{...e.DesignToken.Typography.h6,color:e.DesignToken.Color.content.primary,display:"none",margin:"25px 0 0 0",padding:"0 0 0 0"},description:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.content.secondary,textAlign:"center",margin:"30px 0 0 0",padding:"0 0 0 0"},retryButton:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.base.white,backgroundColor:e.DesignToken.Color.base.blue,borderRadius:e.DesignToken.CornerRadius.xs,border:"none",outline:"none",height:e.DesignToken.Height["3xl"],margin:"24px 0 0 0"},skipButton:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.content.primary,backgroundColor:e.DesignToken.Color.background.tertiary,borderRadius:e.DesignToken.CornerRadius.xs,border:"none",outline:"none",height:e.DesignToken.Height["3xl"],margin:"12px 0"}},resultText:{success:{...e.DesignToken.Typography.body,textColor:e.DesignToken.Color.content.primary,mainColor:e.DesignToken.Color.semantic.success[400]},error:{...e.DesignToken.Typography.body,textColor:e.DesignToken.Color.content.primary,mainColor:e.DesignToken.Color.semantic.warning[500]}}}},R=m,S=D,{DesignToken:W}=e,w={FlashLiveness:{maskFill:"#fff",mask:{strokeColor:W.Color.separators.secondary,strokeColorError:W.Color.semantic.error[400],strokeWidth:4,path:"M118.5 2.5C54.2233 2.5 2.5 59.5579 2.5 129.447C2.5 146.072 3.68394 172.618 8.16415 200.483C12.6369 228.301 20.4309 257.673 33.7816 279.787C46.9667 301.626 59.6817 317.047 73.3658 327.003C87.1207 337.011 101.735 341.41 118.5 341.41C135.265 341.41 149.879 337.011 163.634 327.003C177.318 317.047 190.033 301.626 203.218 279.787C216.569 257.673 224.363 228.301 228.836 200.483C233.316 172.618 234.5 146.072 234.5 129.447C234.5 59.5579 182.777 2.5 118.5 2.5Z",width:237,height:344},title:{hidden:!1,height:"auto",color:W.Color.content.primary,fontSize:W.Typography.h5.fontSize,fontWeight:W.Typography.h5.fontWeight,lineHeight:W.Typography.h5.lineHeight},guideline:{text:{close:{color:W.Color.content.primary,fontSize:W.Typography.h6.fontSize,fontWeight:W.FontWeight["semi-bold"],background:W.Color.background.secondary,border:`${W.BorderWidth.base} solid ${W.Color.separators.tertiary}`,borderRadius:"100px",padding:"12px 16px"},far:{color:W.Color.content.primary,fontSize:W.Typography.h6.fontSize,fontWeight:W.FontWeight["semi-bold"],background:W.Color.background.secondary,border:`${W.BorderWidth.base} solid ${W.Color.separators.tertiary}`,borderRadius:"100px",padding:"12px 16px"},flashing:{color:W.Color.content["on-bg-color"],fontSize:W.Typography.label.fontSize,fontWeight:W.Typography.label.fontWeight,background:"rgba(15, 23, 42, 0.35)",border:"none",borderRadius:"100px",padding:"12px 16px"}},icon:{color:W.Color.blue[900],src:""}},instruction:{color:W.Color.content["on-bg-color"],fontSize:W.Typography.label.fontSize,fontWeight:W.Typography.label.fontWeight,background:"rgba(15, 23, 42, 0.35)",border:"none",borderRadius:"100px"},timeoutText:{color:W.Color.semantic.error[400],fontSize:W.Typography.body.fontSize,fontWeight:W.Typography.body.fontWeight,padding:"0"},errorOverlay:{backgroundColor:"transparent",opacity:0},progressBar:{mainColor:W.Color.blue[900],secondaryColor:W.Color.blue[100],textColor:W.Color.blue[900],fontSize:W.Typography.body.fontSize,fontWeight:W.FontWeight["semi-bold"]},flashing:{logo:{src:"",width:"140px",height:"auto"},backgroundPattern:{srcMobile:"",srcDesktop:"",width:"100%",height:"auto"}}}},z=w,j=w,{DesignToken:_}=e,I={Selfie:{backgroundColor:"#FFF",title:{...e.DesignToken.Typography.h5,color:e.DesignToken.Color.content.primary},countdown:{color:_.Color.semantic.error[400],fontSize:_.Typography.body.fontSize,fontWeight:_.Typography.body.fontWeight,backgroundColor:"transparent",border:"unset",borderRadius:"3px",padding:"0px"},loadingIcon:{src:"",width:"47px",height:"47px"},error:{color:_.Color.semantic.error[400],fontSize:_.Typography.body.fontSize,fontWeight:_.Typography.body.fontWeight,backgroundColor:"transparent",border:"unset",borderRadius:"3px",padding:"5px 10px"},progressCircle:{activeColor:"rgba(52, 152, 211, 1)",innerPadding:3,showDashedRing:!0,showOutsideRing:!1,dashedRingLineThick:"2",dashedRingLineSpacing:"3.5",dashedRingColor:"rgba(193, 197, 204, 1)",dashedRingOpacity:1,insideRingColor:"#fff",insideRingWidth:10,insideRingStrokeDash:"0",outsideRingOpacity:1,outsideRingColor:"#fff",errorRingWidth:0,radius:160,strokeWidth:3,progress:0,showErrorRing:!1,errorRingColor:"#df0000",dashedRingWidth:10,dashedInsideRingColor:"#fff",dashedInsideRingWidth:3,showInsideRing:!0},progressCircleV2:{activeColor:_.Color.blue[900],neutralColor:_.Color.neutral[300],errorColor:_.Color.semantic.error[400],radius:160,strokeWidth:2,progress:0,tickWidth:15,numberOfTicks:200},Active:{instruction:{color:_.Color.content.primary,fontSize:_.Typography.body.fontSize,fontWeight:_.Typography.body.fontWeight,textShadow:"none",backgroundColor:"unset",border:"unset",borderRadius:"unset"},directionIcon:{frontal:"",frontalWidth:"168px",left:"",leftWidth:"150px",right:"",rightWidth:"150px",up:"",upWidth:"150px"},imageHolder:{width:"72px",height:"72px",borderRadius:"50%",border:`3px solid ${_.Color.blue[900]}`,fontSize:"16px",color:"#fff",fontWeight:"700",frontal:"",left:"",right:"",up:"",activeStepBorder:`1px solid ${_.Color.separators.tertiary}`,activeStepBorderRadius:"50%"}}}},O={Selfie:{backgroundColor:"rgba(0, 0, 0, 0.6)",captureIcon:{src:"",width:"50px"},countdown:{color:"#fff",fontSize:"18px",fontWeight:"normal",backgroundColor:"#ea3223",border:"unset",borderRadius:"3px",padding:"5px 10px"},loadingIcon:{src:"",width:"47px",height:"47px"},error:{color:"#fff",fontSize:"18px",fontWeight:"normal",backgroundColor:"#ea3223",border:"unset",borderRadius:"3px",padding:"5px 10px"},progressCircle:{radius:160,strokeWidth:3,progress:0,showErrorRing:!0,activeColor:"#0092ff",innerPadding:5,outsideRingColor:"#f2f6f9",outsideRingOpacity:.1,insideRingColor:"#f2f6f9",insideRingWidth:1,insideRingStrokeDash:"2",errorRingColor:"#df0000",errorRingWidth:1,dashedRingColor:"#ffffff",dashedRingOpacity:.3,dashedRingWidth:10,dashedRingLineThick:1,dashedRingLineSpacing:6,dashedInsideRingColor:"#ffffff",dashedInsideRingWidth:0,showOutsideRing:!1,showDashedRing:!1,showInsideRing:!0},Active:{instruction:{color:"#fff",fontSize:"20px",fontWeight:"normal",textShadow:"2px 2px 4px #000000",backgroundColor:"unset",border:"unset",borderRadius:"unset"},directionIcon:{frontal:"",frontalWidth:"140px",left:"",leftWidth:"80px",right:"",rightWidth:"80px",up:"",upWidth:"80px"},imageHolder:{width:"40px",height:"40px",borderRadius:"50%",border:"2px solid #fff",fontSize:"16px",color:"#fff",fontWeight:"700",frontal:"",left:"",right:"",up:""}}}},A=I,{DesignToken:B}=e,P={PassiveLiveness:{instruction:{color:B.Color.content["on-bg-color"],fontSize:B.Typography.label.fontSize,fontWeight:B.Typography.label.fontWeight,background:"rgba(15, 23, 42, 0.35)",border:"none",borderRadius:"100px",backdropFilter:"blur(28px)",padding:"12px 12px"}}},F=P,q=P,U={closeButton:{top:e.DesignToken.Spacing.base,right:e.DesignToken.Spacing.base,left:"auto",bottom:"auto",display:"block",src:"",width:"24px",height:"auto"},popup:{backgroundColor:e.DesignToken.Color.base.white,padding:"10px",border:"none",borderRadius:e.DesignToken.CornerRadius.sm,overlay:{backgroundColor:e.DesignToken.Color.mask[70]},title:{...e.DesignToken.Typography.h6,fontWeight:e.DesignToken.FontWeight["semi-bold"],color:e.DesignToken.Color.content.primary,textAlign:"center",display:"initial",margin:"25px 0 0 0",padding:"0 0 0 0"},description:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.content.secondary,textAlign:"center",border:"unset",borderRadius:"unset",margin:"30px 0 0 0",padding:"0 0 0 0"},primaryButton:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.base.white,backgroundColor:e.DesignToken.Color.base.blue,borderRadius:e.DesignToken.CornerRadius.xs,border:"none",outline:"none",height:e.DesignToken.Height["3xl"],maxWidth:"unset"},secondaryButton:{...e.DesignToken.Typography.body,color:e.DesignToken.Color.content.primary,backgroundColor:e.DesignToken.Color.background.tertiary,borderRadius:e.DesignToken.CornerRadius.xs,border:"none",outline:"none",height:e.DesignToken.Height["3xl"],maxWidth:"unset"}}},H={v1:{...R,...z,...O,...F,...U},v2:{...S,...j,...A,...q,...U}};function $(){if(rn)return re;rn=1;var r=s();return re=function(){try{var o=r(Object,"defineProperty");return o({},"",{}),o}catch(r){}}()}function E(){if(ri)return rt;ri=1;var r=$();return rt=function(o,e,n){"__proto__"==e&&r?r(o,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):o[e]=n}}function L(){if(rs)return ra;rs=1;var r=E(),o=u();return ra=function(e,n,t){(void 0===t||o(e[n],t))&&(void 0!==t||n in e)||r(e,n,t)}}var M,V,K,N,Q,Z,G,J,X,Y,rr,ro,re,rn,rt,ri,ra,rs,ru,rd,rc,rl,rg,rf,rp,rh,rb,ry,rx,rk,rC,rT,rv,rm,rD,rR,rS,rW,rw,rz,rj,r_,rI,rO,rA,rB,rP,rF,rq,rU,rH,r$,rE,rL,rM,rV,rK,rN,rQ,rZ,rG,rJ,rX,rY,r0,r1,r2,r3,r5,r4,r6,r7,r8,r9,or,oo,oe,on,ot,oi,oa,os,ou,od,oc,ol,og,of,op,oh,ob,oy,ox,ok,oC,oT,ov,om,oD,oR,oS,oW,ow,oz,oj,o_,oI,oO,oA,oB={exports:{}};oB.exports;function oP(){return rD?rm:(rD=1,rm=function(r,o){return function(e){return r(o(e))}})}function oF(){return rS?rR:(rS=1,rR=oP()(Object.getPrototypeOf,Object))}function oq(){if(rw)return rW;rw=1;var r=Object.prototype;return rW=function(o){var e=o&&o.constructor;return o===("function"==typeof e&&e.prototype||r)}}function oU(){if(rA)return rO;rA=1;var r=function(){if(rI)return r_;rI=1;var r=l(),o=g();return r_=function(e){return o(e)&&"[object Arguments]"==r(e)}}(),o=g(),e=Object.prototype,n=e.hasOwnProperty,t=e.propertyIsEnumerable;return rO=r(function(){return arguments}())?r:function(r){return o(r)&&n.call(r,"callee")&&!t.call(r,"callee")}}function oH(){return rP?rB:(rP=1,rB=function(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=0x1fffffffffffff})}function o$(){if(rq)return rF;rq=1;var r=f(),o=oH();return rF=function(e){return null!=e&&o(e.length)&&!r(e)}}var oE={exports:{}};function oL(){var r,o,e,n,t,i,a,s;if(rL)return oE.exports;return rL=1,r=oE,o=oE.exports,e=d(),n=rE?r$:(rE=1,r$=function(){return!1}),s=(a=(i=(t=o&&!o.nodeType&&o)&&r&&!r.nodeType&&r)&&i.exports===t?e.Buffer:void 0)?a.isBuffer:void 0,r.exports=s||n,oE.exports}function oM(){if(rV)return rM;rV=1;var r=l(),o=oF(),e=g(),n=Object.prototype,t=Function.prototype.toString,i=n.hasOwnProperty,a=t.call(Object);return rM=function(n){if(!e(n)||"[object Object]"!=r(n))return!1;var s=o(n);if(null===s)return!0;var u=i.call(s,"constructor")&&s.constructor;return"function"==typeof u&&u instanceof u&&t.call(u)==a}}oE.exports;var oV={exports:{}};oV.exports;function oK(){if(rX)return rJ;rX=1;var r=function(){if(rN)return rK;rN=1;var r=l(),o=oH(),e=g(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,rK=function(t){return e(t)&&o(t.length)&&!!n[r(t)]}}(),o=rZ?rQ:(rZ=1,rQ=function(r){return function(o){return r(o)}}),e=function(){var r,o,e,n,t,i;if(rG)return oV.exports;return rG=1,r=oV,o=oV.exports,e=p(),i=(t=(n=o&&!o.nodeType&&o)&&r&&!r.nodeType&&r)&&t.exports===n&&e.process,r.exports=function(){try{var r=t&&t.require&&t.require("util").types;if(r)return r;return i&&i.binding&&i.binding("util")}catch(r){}}(),oV.exports}(),n=e&&e.isTypedArray;return rJ=n?o(n):r}function oN(){return r0?rY:(r0=1,rY=function(r,o){if("constructor"!==o||"function"!=typeof r[o]){if("__proto__"!=o)return r[o]}})}function oQ(){if(r5)return r3;r5=1;var r=function(){if(r2)return r1;r2=1;var r=E(),o=u(),e=Object.prototype.hasOwnProperty;return r1=function(n,t,i){var a=n[t];e.call(n,t)&&o(a,i)&&(void 0!==i||t in n)||r(n,t,i)}}(),o=E();return r3=function(e,n,t,i){var a=!t;t||(t={});for(var s=-1,u=n.length;++s<u;){var d=n[s],c=i?i(t[d],e[d],d,t,e):void 0;void 0===c&&(c=e[d]),a?o(t,d,c):r(t,d,c)}return t}}function oZ(){if(r8)return r7;r8=1;var r=/^(?:0|[1-9]\d*)$/;return r7=function(o,e){var n=typeof o;return!!(e=null==e?0x1fffffffffffff:e)&&("number"==n||"symbol"!=n&&r.test(o))&&o>-1&&o%1==0&&o<e}}function oG(){if(or)return r9;or=1;var r=r6?r4:(r6=1,r4=function(r,o){for(var e=-1,n=Array(r);++e<r;)n[e]=o(e);return n}),o=oU(),e=h(),n=oL(),t=oZ(),i=oK(),a=Object.prototype.hasOwnProperty;return r9=function(s,u){var d=e(s),c=!d&&o(s),l=!d&&!c&&n(s),g=!d&&!c&&!l&&i(s),f=d||c||l||g,p=f?r(s.length,String):[],h=p.length;for(var b in s)(u||a.call(s,b))&&!(f&&("length"==b||l&&("offset"==b||"parent"==b)||g&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||t(b,h)))&&p.push(b);return p}}function oJ(){if(oa)return oi;oa=1;var r=oG(),o=function(){if(ot)return on;ot=1;var r=c(),o=oq(),e=oe?oo:(oe=1,oo=function(r){var o=[];if(null!=r)for(var e in Object(r))o.push(e);return o}),n=Object.prototype.hasOwnProperty;return on=function(t){if(!r(t))return e(t);var i=o(t),a=[];for(var s in t)"constructor"==s&&(i||!n.call(t,s))||a.push(s);return a}}(),e=o$();return oi=function(n){return e(n)?r(n,!0):o(n)}}function oX(){return op?of:(op=1,of=function(r){return r})}function oY(){return ob?oh:(ob=1,oh=function(r,o,e){switch(e.length){case 0:return r.call(o);case 1:return r.call(o,e[0]);case 2:return r.call(o,e[0],e[1]);case 3:return r.call(o,e[0],e[1],e[2])}return r.apply(o,e)})}function o0(){if(ow)return oW;ow=1;var r=oX(),o=function(){if(ox)return oy;ox=1;var r=oY(),o=Math.max;return oy=function(e,n,t){return n=o(void 0===n?e.length-1:n,0),function(){for(var i=arguments,a=-1,s=o(i.length-n,0),u=Array(s);++a<s;)u[a]=i[n+a];a=-1;for(var d=Array(n+1);++a<n;)d[a]=i[a];return d[n]=t(u),r(e,this,d)}}}(),e=function(){if(oS)return oR;oS=1;var r=function(){if(ov)return oT;ov=1;var r=oC?ok:(oC=1,ok=function(r){return function(){return r}}),o=$(),e=oX();return oT=o?function(e,n){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(n),writable:!0})}:e}();return oR=(function(){if(oD)return om;oD=1;var r=Date.now;return om=function(o){var e=0,n=0;return function(){var t=r(),i=16-(t-n);if(n=t,i>0){if(++e>=800)return arguments[0]}else e=0;return o.apply(void 0,arguments)}}})()(r)}();return oW=function(n,t){return e(o(n,t,r),n+"")}}function o1(){if(oj)return oz;oj=1;var r=u(),o=o$(),e=oZ(),n=c();return oz=function(t,i,a){if(!n(a))return!1;var s=typeof i;return("number"==s?!!(o(a)&&e(i,a.length)):"string"==s&&i in a)&&r(a[i],t)}}function o2(){if(oI)return o_;oI=1;var r=o0(),o=o1();return o_=function(e){return r(function(r,n){var t=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),r=Object(r);++t<i;){var u=n[t];u&&e(r,u,t,a)}return r})}}var o3=b(function(){if(oA)return oO;oA=1;var r=function(){if(og)return ol;og=1;var r=function(){if(ro)return rr;ro=1;var r=t(),o=function(){if(V)return M;V=1;var r=t();return M=function(){this.__data__=new r,this.size=0}}(),e=N?K:(N=1,K=function(r){var o=this.__data__,e=o.delete(r);return this.size=o.size,e}),n=Z?Q:(Z=1,Q=function(r){return this.__data__.get(r)}),s=J?G:(J=1,G=function(r){return this.__data__.has(r)}),u=function(){if(Y)return X;Y=1;var r=t(),o=i(),e=a();return X=function(n,t){var i=this.__data__;if(i instanceof r){var a=i.__data__;if(!o||a.length<199)return a.push([n,t]),this.size=++i.size,this;i=this.__data__=new e(a)}return i.set(n,t),this.size=i.size,this}}();function d(o){var e=this.__data__=new r(o);this.size=e.size}return d.prototype.clear=o,d.prototype.delete=e,d.prototype.get=n,d.prototype.has=s,d.prototype.set=u,rr=d}(),o=L(),e=rl?rc:(rl=1,rc=(rd?ru:(rd=1,ru=function(r){return function(o,e,n){for(var t=-1,i=Object(o),a=n(o),s=a.length;s--;){var u=a[r?s:++t];if(!1===e(i[u],u,i))break}return o}}))()),n=function(){if(oc)return od;oc=1;var r=L(),o=function(){var r,o,e,n,t,i,a;if(rg)return oB.exports;return rg=1,r=oB,o=oB.exports,e=d(),a=(i=(t=(n=o&&!o.nodeType&&o)&&r&&!r.nodeType&&r)&&t.exports===n?e.Buffer:void 0)?i.allocUnsafe:void 0,r.exports=function(r,o){if(o)return r.slice();var e=r.length,n=a?a(e):new r.constructor(e);return r.copy(n),n},oB.exports}(),e=function(){if(rx)return ry;rx=1;var r=function(){if(rb)return rh;rb=1;var r=rp?rf:(rp=1,rf=d().Uint8Array);return rh=function(o){var e=new o.constructor(o.byteLength);return new r(e).set(new r(o)),e}}();return ry=function(o,e){var n=e?r(o.buffer):o.buffer;return new o.constructor(n,o.byteOffset,o.length)}}(),n=rC?rk:(rC=1,rk=function(r,o){var e=-1,n=r.length;for(o||(o=Array(n));++e<n;)o[e]=r[e];return o}),t=function(){if(rj)return rz;rj=1;var r=function(){if(rv)return rT;rv=1;var r=c(),o=Object.create;return rT=function(){function e(){}return function(n){if(!r(n))return{};if(o)return o(n);e.prototype=n;var t=new e;return e.prototype=void 0,t}}()}(),o=oF(),e=oq();return rz=function(n){return"function"!=typeof n.constructor||e(n)?{}:r(o(n))}}(),i=oU(),a=h(),s=function(){if(rH)return rU;rH=1;var r=o$(),o=g();return rU=function(e){return o(e)&&r(e)}}(),u=oL(),l=f(),p=c(),b=oM(),y=oK(),x=oN(),k=function(){if(ou)return os;ou=1;var r=oQ(),o=oJ();return os=function(e){return r(e,o(e))}}();return od=function(d,c,g,f,h,C,T){var v=x(d,g),m=x(c,g),D=T.get(m);if(D)return void r(d,g,D);var R=C?C(v,m,g+"",d,c,T):void 0,S=void 0===R;if(S){var W=a(m),w=!W&&u(m),z=!W&&!w&&y(m);R=m,W||w||z?a(v)?R=v:s(v)?R=n(v):w?(S=!1,R=o(m,!0)):z?(S=!1,R=e(m,!0)):R=[]:b(m)||i(m)?(R=v,i(v)?R=k(v):(!p(v)||l(v))&&(R=t(m))):S=!1}S&&(T.set(m,R),h(R,m,f,C,T),T.delete(m)),r(d,g,R)}}(),s=c(),u=oJ(),l=oN();return ol=function t(i,a,d,c,g){i!==a&&e(a,function(e,u){if(g||(g=new r),s(e))n(i,a,u,d,t,c,g);else{var f=c?c(l(i,u),e,u+"",i,a,g):void 0;void 0===f&&(f=e),o(i,u,f)}},u)}}();return oO=o2()(function(o,e,n){r(o,e,n)})}());let o5=r=>{let{customTheme:e,clientSettings:n,themeVersion:t,uiSettings:i,defaultThemes:a=H}=r,s=y.getWebSetting(n,"data.settings.sdk_settings.ui_custom_settings");return o.useMemo(()=>{let r=x.selectUiSettings(i,s);return{...o3({},x.mapUISettingsToCustomTheme(r),e),themeVersion:t,defaultThemes:a}},[e,a,t,i,s])},o4=()=>{},o6=o.createContext({onDoneCallback:o4,onErrorCallback:o4,onCloseCallback:o4}),o7=({children:e,onDone:n=o4,onError:t=o4,onClose:i=o4})=>{let a=o.useCallback(r=>{n&&n(r)},[n]),s=o.useCallback(r=>{t&&t(r)},[t]),u=o.useCallback(()=>{i&&i()},[i]),d=o.useMemo(()=>({onDoneCallback:a,onErrorCallback:s,onCloseCallback:u}),[a,s,u]);return r.jsx(o6.Provider,{value:d,children:e})},o8=()=>{let r=o.useContext(o6);if(void 0===r)throw Error("useSDKCallback must be used within a SDKCallbackProvider");return r},o9=o.createContext(""),er=({children:o,isWrappedBy:e=""})=>r.jsx(o9.Provider,{value:e,children:o}),eo=()=>o.useContext(o9);export{C as D,o7 as S,er as W,D as a,T as b,eo as c,H as d,o5 as e,o2 as f,oJ as g,oM as h,o0 as i,oY as j,oP as k,oq as l,o3 as m,oG as n,o$ as o,o1 as p,oQ as r,v as t,o8 as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aj as r,ak as n,aR as t,ag as e,aS as u,$ as o}from"./chunk-
|
|
1
|
+
import{aj as r,ak as n,aR as t,ag as e,aS as u,$ as o}from"./chunk-575fb45a.js";import{r as a,f as i,g as c,h as s,i as p,j as f,k as l,l as _,n as v,o as g,p as b}from"./chunk-2bdac502.js";function j(){if(d)return O;d=1;var t=r(),e=n(),u=s();return O=function(r){if(!e(r))return!1;var n=t(r);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof r.message&&"string"==typeof r.name&&!u(r)}}function m(){return M?I:(M=1,I=/<%=([\s\S]+?)%>/g)}var y,h,O,d,w,E,R,$,k,S,x,L,P,U,q,A,D,F,I,M,z,B,C,G,H,J,K,N,Q,T,V,W,X,Y,Z=o(function(){if(Y)return X;Y=1;var r=function(){if(h)return y;h=1;var r=a(),n=i(),t=c();return y=n(function(n,e,u,o){r(e,t(e),n,o)})}(),n=function(){if(E)return w;E=1;var r=f(),n=p(),t=j();return w=n(function(n,e){try{return r(n,void 0,e)}catch(r){return t(r)?r:Error(r)}})}(),o=function(){if($)return R;$=1;var r=t();return R=function(n,t){return r(t,function(r){return n[r]})}}(),s=function(){if(S)return k;S=1;var r=e(),n=Object.prototype,t=n.hasOwnProperty;return k=function(e,u,o,a){return void 0===e||r(e,n[o])&&!t.call(a,o)?u:e}}(),O=function(){if(L)return x;L=1;var r={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};return x=function(n){return"\\"+r[n]}}(),d=j(),I=b(),M=function(){if(F)return D;F=1;var r=v(),n=function(){if(A)return q;A=1;var r=_(),n=U?P:(U=1,P=l()(Object.keys,Object)),t=Object.prototype.hasOwnProperty;return q=function(e){if(!r(e))return n(e);var u=[];for(var o in Object(e))t.call(e,o)&&"constructor"!=o&&u.push(o);return u}}(),t=g();return D=function(e){return t(e)?r(e):n(e)}}(),Z=m(),rr=function(){if(W)return V;W=1;var r=function(){if(J)return H;J=1;var r=function(){if(G)return C;G=1;var r=B?z:(B=1,z=function(r){return function(n){return null==r?void 0:r[n]}});return C=r({"&":"&","<":"<",">":">",'"':""","'":"'"})}(),n=u(),t=/[&<>"']/g,e=RegExp(t.source);return H=function(u){return(u=n(u))&&e.test(u)?u.replace(t,r):u}}(),n=N?K:(N=1,K=/<%-([\s\S]+?)%>/g),t=T?Q:(T=1,Q=/<%([\s\S]+?)%>/g),e=m();return V={escape:n,evaluate:t,interpolate:e,variable:"",imports:{_:{escape:r}}}}(),rn=u(),rt=/\b__p \+= '';/g,re=/\b(__p \+=) '' \+/g,ru=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ro=/[()=,{}\[\]\/\s]/,ra=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ri=/($^)/,rc=/['\n\r\u2028\u2029\\]/g,rs=Object.prototype.hasOwnProperty;return X=function(t,e,u){var a=rr.imports._.templateSettings||rr;u&&I(t,e,u)&&(e=void 0),t=rn(t),e=r({},e,a,s);var i=r({},e.imports,a.imports,s),c=M(i),p=o(i,c),f,l,_=0,v=e.interpolate||ri,g="__p += '",b=RegExp((e.escape||ri).source+"|"+v.source+"|"+(v===Z?ra:ri).source+"|"+(e.evaluate||ri).source+"|$","g"),j=rs.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(b,function(r,n,e,u,o,a){return e||(e=u),g+=t.slice(_,a).replace(rc,O),n&&(f=!0,g+="' +\n__e("+n+") +\n'"),o&&(l=!0,g+="';\n"+o+";\n__p += '"),e&&(g+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),_=a+r.length,r}),g+="';\n";var m=rs.call(e,"variable")&&e.variable;if(m){if(ro.test(m))throw Error("Invalid `variable` option passed into `_.template`")}else g="with (obj) {\n"+g+"\n}\n";g=(l?g.replace(rt,""):g).replace(re,"$1").replace(ru,"$1;"),g="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(l?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+g+"return __p\n}";var y=n(function(){return Function(c,j+"return "+g).apply(void 0,p)});if(y.source=g,d(y))throw y;return y}}());export{Z as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e,r as t,d as r,f as a,c as i,p as n,u as l,g as s,l as d,j as o,a as u,P as c}from"./chunk-
|
|
1
|
+
import{s as e,r as t,d as r,f as a,c as i,p as n,u as l,g as s,l as d,j as o,a as u,P as c}from"./chunk-575fb45a.js";import{g as p,S as g,R as f}from"./chunk-9d0b0fc7.js";import{W as m}from"./chunk-2bdac502.js";import"./chunk-e2211b41.js";let{IDCardSide:y,Errors:I}=e;async function b({image:e,cardType:t,cardSide:r,apiClient:a,outputEncryptionSettings:i}){let n={label:`id_card.${t}.${r}`};if(i&&i.key){let t=new File([e.encrypted.hex],`${Date.now()}.jpg`,{type:"image/jpeg"});return a.uploadImage({file:t,...n},{"X-TV-Key":i.key})}let l=new File([e.blob],`${Date.now()}.jpg`,{type:"image/jpeg"});return a.uploadImage({file:l,...n})}let S={data:{image_id:null}};async function _({image:e,apiClient:t,rawString:r,results:a,outputEncryptionSettings:i}){if(!e||!e.blob||!r)return Promise.resolve(S);let n={raw:r};a&&a.length>1&&(n=a.reduce((e,t,r)=>(e[0===r?"raw":`raw${r+1}`]=t,e),{}));let l={label:"qr_code",metadata:JSON.stringify(n)};if(i&&i.key){let r=new Blob([e.encrypted.hex]);return t.uploadImage({file:r,...l},{"X-TV-Key":i.key})}return t.uploadImage({file:e.blob,...l})}let C={data:{file_id:null}};async function h({video:e,apiClient:t,outputEncryptionSettings:r}){if(!e||!e.blob)return Promise.resolve(C);let a={label:"video"};if(r&&r.key){let i=new Blob([e.encrypted.hex]);return t.uploadFile({file:i,...a},{"X-TV-Key":r.key})}return t.uploadFile({file:e.blob,...a})}async function v({imageId:e,cardType:t,apiClient:r}){return r.requestVerifyIDCard({card_type:t,image1:{id:e}})}async function D({apiClient:e,cardType:t,frontCardId:r,isCapturingFrontSide:a,backCardId:i,recordedVideos:n=[],qrImageId:l,previousCapturingVideoId:s,previousFullVideoId:d,latestCapturingVideoId:o,latestFullVideoId:u}){let c=n.filter(e=>null!==e.id),p=n.filter(e=>null===e.id&&e.frames.length>0),g=await Promise.all(p.map(t=>e.fileService.request({frames:t.frames}))),f={card_type:t,image:{id:r},image2:a?void 0:{id:i},videos:[...[s,d,o,u].filter(e=>null!=e).map(e=>({id:e})),...c.map(e=>({id:e.id})),...g.map(e=>({id:e.data.file_id}))]};return l&&(f.qr1_images=[{id:l}]),e.detectIDTampering(f)}async function w({cardType:e,apiClient:t,cardImageId:r,qrImageId:a}){let i={card_type:e,image1:{id:r}};return a&&(i.qr1_images=[{id:a}]),t.readIDCard(i)}async function k({image:e,frontCardId:t,qrImageId:r,onError:a,recordedVideos:i,apiClient:n,cardType:l,cardSide:s,qrScannedResult:d,outputEncryptionSettings:o,enabledServices:u,fullVideo:c,capturingVideo:p,previousCapturingVideoId:g,previousFullVideoId:f}){let m=[b({image:e,cardType:l,cardSide:s,apiClient:n,outputEncryptionSettings:o})];m.push(_({image:d?.image,apiClient:n,rawString:d?.result,results:d?.results,outputEncryptionSettings:o})),m.push(h({video:c,apiClient:n,outputEncryptionSettings:o}),h({video:p,apiClient:n,outputEncryptionSettings:o}));let[S,C,k,E]=await Promise.all(m);if(S.errors)return void a({...I.upload_error,details:S.errors});let V=S.data.image_id,j=C?.data?.image_id||r,R={data:null};if(u?.enableVerifySanityIDCard){let e=await v({imageId:V,cardType:l,apiClient:n});if(e.errors)return void a({...I.sanity_check_error,details:e.errors});R.data=e.data}let B={data:null};if(u?.enableReadIDCardInfo){let e=await w({cardType:l,apiClient:n,cardImageId:V,qrImageId:j});if(e.errors)return void a({...I.read_id_card_error,details:e.errors});B.data=e.data}let F=k?.data?.file_id||null,T=E?.data?.file_id||null,K={data:null};if(u?.enableDetectIDCardTampering){let e,r;if(s===y.BACK&&!t)return void a(I.missing_front_id_card);let d=s===y.FRONT;d?e=V:(e=t,r=V);let o=await D({apiClient:n,cardType:l,frontCardId:e,isCapturingFrontSide:d,backCardId:r,recordedVideos:i,qrImageId:j,previousCapturingVideoId:g,previousFullVideoId:f,latestCapturingVideoId:T,latestFullVideoId:F});if(o.errors)return void a({...I.detect_id_tampering_error,details:o.errors});K.data=o.data}return{sanityResult:R.data,tamperingInfo:K.data,cardInfo:B.data,cardImageId:V,qrImageId:j,mp4VideoIds:{full:F,capturing:T}}}let{Errors:E}=e,V=({readIDCardUIOnlyComponent:c,...f})=>{let{onError:y,onStepDone:I,apiCredentials:b,logCredentials:S,outputEncryptionSettings:_,serviceSettings:C,flowId:h,clientSettings:v,...D}=f,[w,V]=t.useState(v),[j,R]=t.useState(!1),{apiClient:B}=r.useApiClient({apiCredentials:b,logCredentials:S}),F=t.useRef(""),T=t.useRef(""),K=t.useRef(null),U=t.useRef(null),q=a.getEnabledServices(C,w),{billingSettings:O,enableBilling:P}=i.useSDKSettings(),x=n.buildBillingInput(f),A=l.getWebSetting(w,"data.settings.sdk_settings.billing_settings.billing_config"),{submitBilling:W}=s({enable:P,onError:y,billingSettings:O??{json:A??{}},billingUrl:l.getWebSetting(w,"data.settings.sdk_settings.billing_settings.url")}),$=t.useCallback(t=>{if(e.ErrorsWithoutBilling.includes(t.code))return void y(t);let r={error:t,sdkStatus:e.BillingStatus.fail};W({service:p(D.steps),input:x,output:r}),y&&y(t)},[W,D.steps,x,y]),G=t.useCallback((t,r)=>{if(r){let r={sdkStatus:e.BillingStatus.success,result:n.buildBillingOutput(t)},a={service:p(D.steps),input:x,output:r};if(Array.isArray(D.steps)&&1===D.steps.length&&D.steps[0].scannerType===g.QR_CODE){let{qrScannedResult:r={}}=t,i=r.result;if(i){let e=i.split("|")[0];a.id_num=d.SHA256(e),a.full_hash=d.SHA256(i)}else a.output={...a.output,sdkStatus:e.BillingStatus.cancel}}W(a)}I&&I(t)},[I,D.steps,x,W]);t.useEffect(()=>{async function e(){try{let e=await B.clientSettings({flow_id:h});V(e)}catch(e){console.error("Error fetching client settings:",e)}finally{R(!0)}}q.enableGetClientSettings&&e()},[B,q.enableGetClientSettings,h]);let N=t.useCallback(async(t,{shouldBilling:r})=>{let{cardType:a,cardSide:i,recordedVideos:n,qrScannedResult:l,image:s,fullVideo:d,capturingVideo:o}=t;try{if(!q.enableUploadImages||!s.blob)return void G(t,r);let u=null;(u=await k({image:s,cardSide:i,frontCardId:F.current,qrImageId:T.current,onError:$,apiClient:B,cardType:a,recordedVideos:n,qrScannedResult:l,outputEncryptionSettings:_,enabledServices:q,fullVideo:d,capturingVideo:o,previousCapturingVideoId:U.current,previousFullVideoId:K.current}))&&(i===e.IDCardSide.FRONT&&(F.current=u.cardImageId),U.current=u?.mp4VideoIds?.capturing,K.current=u?.mp4VideoIds?.full,T.current=u.qrImageId,G({...t,apiResult:u},r))}catch(e){$({...E.api_call_error,details:e})}},[B,q,$,G,_]);return q.enableGetClientSettings&&!j?null:o.jsx(u.LicenseProvider,{clientSettings:w,onError:y,children:o.jsx(m,{isWrappedBy:"id_with_api_call",children:o.jsx(c,{logCredentials:S,onError:y,onStepDone:N,outputEncryptionSettings:_,...D,clientSettings:w})})})};V.propTypes={onError:c.func,onStepDone:c.func,apiCredentials:c.shape({accessKey:c.string,secretKey:c.string,apiUrl:c.string}),logCredentials:c.shape({}),outputEncryptionSettings:c.shape({}),readIDCardUIOnlyComponent:c.func,serviceSettings:c.shape({}),flowId:c.string,clientSettings:c.shape({})},V.defaultProps={onError:()=>{},onStepDone:()=>{},apiCredentials:{accessKey:"",secretKey:"",apiUrl:""},logCredentials:{enable:!1},outputEncryptionSettings:{key:""},readIDCardUIOnlyComponent:f,serviceSettings:{enableUploadFrames:!0,enableUploadImages:!0,enableVerifySanityPortrait:!0,enableVerifySanityIDCard:!0,enableVerifyFaceLiveness:!0,enableDetectIDCardTampering:!0,enableReadIDCardInfo:!0},flowId:"",clientSettings:null};export{V as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
let e,t;import{r as r,i as a,j as o,e as i,G as n,aE as l,I as s,au as c,aF as u,aG as h,s as d,c as f,J as m,t as g,aH as _,v as p,av as b,k as y,K as w,P as E,d as C}from"./chunk-
|
|
1
|
+
let e,t;import{r as r,i as a,j as o,e as i,G as n,aE as l,I as s,au as c,aF as u,aG as h,s as d,c as f,J as m,t as g,aH as _,v as p,av as b,k as y,K as w,P as E,d as C}from"./chunk-575fb45a.js";import{W as v}from"./chunk-e2211b41.js";let A=({onVideoPlayed:e})=>{let[t,a]=r.useState(!1),[o,i]=r.useState({});return{onVideoPlayed:r.useCallback(t=>{i((e=>{let{videoAreaWidth:t,videoAreaHeight:r,lostX:a,lostY:o}=e;return{width:t,height:r,x:Math.max(a,0),y:Math.max(o,0)}})(t)),a(!0),"function"==typeof e&&e(t)},[e]),cropArea:o,isPlaying:t}},F={LOADING:"loading",FAR_FACE:"far_face",CLOSE_FACE:"close_face",START_FLASHING:"start_flashing",STOP_DECTECTING:"stop_detecting"},R={FAR_FACE:"far",CLOSE_FACE:"close",FLASHING:"flashing"},S={timeout:"timeout",no_face:"no_face"},x=({prediction:e,canvas:t,index:r,quality:a=.8})=>{let o=t.toDataURL("image/jpeg",a);return e?{label:"portrait",base64:o.split(",")[1],landmarks:e.landmarks,index:r}:{label:"portrait",base64:o.split(",")[1],index:r}},k=a.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{i as i,P as e,s as t,A as c,U as o,m as r,b as n,j as a}from"./chunk-
|
|
1
|
+
import{i as i,P as e,s as t,A as c,U as o,m as r,b as n,j as a}from"./chunk-575fb45a.js";let s=i.img`
|
|
2
2
|
width: ${({width:i})=>i};
|
|
3
3
|
`;function l({type:i}){let e=c(),l=o(`Selfie.Active.directionIcon.${i}`,`${i}_arrow.gif`),F=o(`Selfie.Active.directionIcon.${t.FaceDirection.FRONTAL}`,"frontal_arrow.svg"),d=r(`Selfie.Active.directionIcon.${i}Width`)({theme:e}),f=n(e,`Selfie.Active.directionIcon.${i}`);return null===f?a.jsx(a.Fragment,{}):i===t.FaceDirection.FRONTAL&&F?a.jsx(s,{src:F,width:d,alt:""}):f&&null!==f?a.jsx(s,{src:n(e,`Selfie.Active.directionIcon.${i}`),width:d,alt:""}):a.jsx(s,{src:l,alt:"",width:d})}l.propTypes={type:e.oneOf([t.FaceDirection.LEFT,t.FaceDirection.RIGHT,t.FaceDirection.UP,t.FaceDirection.FRONTAL])},l.defaultProps={type:t.FaceDirection.LEFT};export{l as D};
|