{"version":3,"sources":["../webpack/bootstrap","UploadDocuments/MobileIdUpload/demo/SelfieTestPage.tsx","UploadDocuments/MobileIdUpload/FeedbackBanner.tsx","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/domain.ts","UploadDocuments/FraudCheckDialog.tsx","UploadDocuments/ChooseMobileDeviceDialog.tsx","UploadDocuments/MobileIdUpload/StickyBottomContainer.tsx","UploadDocuments/MobileIdUpload/zenidUtils.tsx","UploadDocuments/GenericDocumentScanDialog.tsx","UploadDocuments/MobileUploadStatusDialog.tsx","UploadDocuments/MobileIdUpload/common/MobileRequiredDocuments.tsx","UploadDocuments/DocumentDigitalIdSwitch.tsx","UploadDocuments/MobileIdUpload/Photo/MobileIdUpload2.treat.ts","UploadDocuments/BiometricConsent.tsx","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/TakePhoto.treat.ts","UploadDocuments/DocumentUploadField.tsx","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/TakePhoto.tsx","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/ConfirmPhoto.treat.ts","UploadDocuments/MobileIdUpload/StartProcess.tsx","UploadDocuments/MobileIdUpload/StartIdProcess.tsx","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/ReviewAndUpload.tsx","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/ConfirmPhoto.tsx","UploadDocuments/MobileDeviceSelection.tsx","UploadDocuments/MobileDeviceText.tsx","UploadDocuments/MobileIdUpload/UploadIdSteps/WhatToUpload.tsx","UploadDocuments/DocumentToUpload/ChooseDocumentToUpload.tsx","UploadDocuments/DocumentToUpload/Countries.tsx","UploadDocuments/DocumentToUpload/DocumentTypes.tsx","UploadDocuments/DocumentDigitalId.tsx","UploadDocuments/MobileUploadStatusDialogPOI.tsx","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/ProofOfIncomeUploadSameDeviceDialog.tsx","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/ProofOfIncomeUploadSameDeviceFlow.tsx","UploadDocuments/MobileIdUpload/czPrimaryDark.png","UploadDocuments/MobileIdUpload/czPrimaryGlare.png","UploadDocuments/MobileIdUpload/czPrimary.png","UploadDocuments/MobileIdUpload/czSecondaryDark.png","UploadDocuments/MobileIdUpload/czSecondaryGlare.png","UploadDocuments/MobileIdUpload/czSecondary.png","UploadDocuments/MobileIdUpload/skPrimaryDark.png","UploadDocuments/MobileIdUpload/skPrimaryGlare.png","UploadDocuments/MobileIdUpload/skPrimary.png","UploadDocuments/MobileIdUpload/skSecondaryDark.png","UploadDocuments/MobileIdUpload/skSecondaryGlare.png","UploadDocuments/MobileIdUpload/skSecondary.png","UploadDocuments/MobileIdUpload/livenesscheck_ok.png","UploadDocuments/MobileIdUpload/livenesscheck_dark.png","UploadDocuments/MobileIdUpload/livenesscheck_partial.png","UploadDocuments/MobileIdUpload/livenesscheck_sunglasses.png","UploadDocuments/MobileIdUpload/StickyBottomContainer.treat.ts","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/ReviewAndUpload.treat.ts","UploadDocuments/MobileIdUpload/ProofOfIncomeUploadFlow/SealingProofOfIncome.tsx","UploadDocuments/BiometricConsentInfoDialog.tsx","UploadDocuments/DocumentPreviewDialog.tsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","installedCssChunks","22","exports","module","l","e","promises","supportsPreload","document","createElement","relList","supports","cssChunks","Promise","resolve","reject","href","fullhref","p","existingLinkTags","getElementsByTagName","dataHref","tag","getAttribute","rel","existingStyleTags","linkTag","as","type","onload","onerror","event","request","target","src","err","Error","code","parentNode","removeChild","appendChild","then","execLinkTag","body","installedChunkData","promise","onScriptComplete","script","charset","timeout","nc","setAttribute","jsonpScriptSrc","error","clearTimeout","chunk","errorType","realSrc","message","name","undefined","setTimeout","head","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","console","jsonpArray","this","oldJsonpFunction","slice","SelfieTestPage","isTestEnv","useTestEnvironment","state","setState","useState","cameraError","setCameraError","size","heading","unsafeLocalizedString","subheading","option","some","actions","InitFlow","onLoaded","ShowSelfie","onCameraError","log","props","startProcess","useCommand","uploadApi","useZenid","grow","hAlignContent","vAlignContent","none","feedbackText","useCamera","useMemo","feature","cameraPreviewContainer","classes","onError","useSelfieSnapshot","snapshotData","acquiredSelfie","blob","signature","className","MobileUploadState","Completed","Rejected","RejectedByUser","CameraError","CameraDisabled","CameraUnavailable","UploadError","DocumentInvalid","DocumentCountryInvalid","PageInvalid","ConnectionLost","MobileUploadStateSpec","content","MobileUploadFeedbackBanner","formatMessage","useFormatMessage","spec","redirectToMobileApp","useAppRedirect","showOpenMobileAppButton","variant","label","action","banner","onDismiss","title","fromCameraErrorToFeedbackState","fromUploadErrorToFeedbackState","foldDocumentSide","documentSide","onFirstSide","onSecondSide","foldUploadFlowType","match","uploadDocumentFlowType","whenMortgage","whenStandardLoan","whenPersonalProfile","foldFraudCheckType","check","FraudCheckDialog","fraudCheckResult","idUploadApi","status","setStatus","flowType","fraudCheck","recipient","onMaxAttemptsReached","documentIdentificationFlow","onUploadCompleted","pipe","zenIdPurpose","SelfieFraudCheck","constant","HologramFraudCheck","HologramAndSelfieFraudCheck","taskEither","fold","task","fromIO","onAbort","onUploadAgain","onFraudCheck","canUploadAgain","coApplicant","documentToUploadDetails","onContinue","fromPredicate","cta","weight","foldType","getRecipientOptions","recipients","Client","Banker","array","filterMap","phoneNumber","map","nonEmptyArray","fromArray","filter","disabled","ChooseMobileDeviceDialog","useQuery","linkPurpose","foldMobileFlowType","ProofOfIncome","DocumentUpload","portalBlocked","usePortalStatusContext","config","mockScanner","useAppContext","setRecipient","description","uploadAgainAction","selectAction","onSelect","icon","MobileUploadIDIcon","column","units","remoteData","constNull","flow","options","onChange","onMockScannerUpload","StickyBottomContainer","children","isFeedback","u","Feedback","record","x","FeedbackCodec","is","context","validate","either","chain","v","encode","FeedbackEvent","feedback","getDocumentCodes","tenant","isRemote","isPersonalProfile","foldTenant","idCardCodesSK","passportCodesCZ","passportCodesSK","drivingLicenseCodesSK","drivingLicenseCodesCZ","idCardCodesCZ","DocumentCode","IDC2","PAS","DRV","SK_PAS_2008_14","SK_DRV_2004_08_09","SK_DRV_2013","SK_DRV_2015","SK_IDC_2008plus","SK_IDC_2022","SK_IDC_2024","getAllTenantModels","zenidModels","model","includes","documentCode","validateToken","token","NonEmptyString","decode","mapLeft","visualizer","Visualizer","drawText","loadFeatures","features","documentBlurAcceptableScore","specularAcceptableScore","timeToBlurMaxTolerance","enableAimingCircle","drawOutline","models","traverse","tryCatch","settings","enabledModels","ZenidWebSdk","load","loadFeature","testCamera","initializeZenid","exchangeTokenCommand","initializationCallback","fromEither","exchangedToken","of","initialize","autoInitialize","initialized","setInitialized","loadedFeatures","_setLoadedFeatures","window","zenIdLoadedFeatures","environment","useNewMobileIdUploadUx","apiParameters","useIsRemoteChannel","addLogListener","level","warn","info","debug","clearLogListeners","useZenidEvent","detail","newLoadedFeatures","setLoadedFeatures","initializeZenidFn","difference","eq","eqString","newFeatures","getLanguage","language","SupportedLanguages","Czech","English","ZenIDCameraError","CameraNotAllowedException","CameraNotFoundException","isArrayOfDocumentAcceptable","documentCodes","acceptableInput","fromEquals","a","b","dc","isStartingCamera","setIsStartingCamera","setFeedback","stopCamera","videoTouchFromOutside","cutCenter","findGeneralPurposeCamera","cameraSelectionRules","getOrElse","startCamera","useFeedbackEvent","Ok","useEffect","orElse","leftIO","NoMatchFound","fromNullable","flatten","PossibleDocuments","AlignCard","HoldSteady","Blurry","ReflectionPresent","Dark","NoFaceFound","MoveElsewhere","TiltLeftAndRight","TiltUpAndDown","RotateClockwise","RotateCounterClockwise","LookAtMe","TurnHead","Smile","ConfirmingFace","Center","HoldStill","BadFaceAngle","Barcode","useDocumentSnapshot","snapshotPreviewContainer","onSnapshot","pictureBlob","snapshot","hasOtherSide","isSome","findFirst","pageCode","setSnapshotPreview","useVideo","onVideo","isRecording","setIsRecording","videoChunks","setVideoChunks","finishRecording","startRecording","videoStatus","videoStreamChunk","Blob","handler","useEvent","events","errors","failure","join","payload","acquiredDocument","_tag","acquiredDocumentVideo","GenericDocumentScanDialog","hasError","setHasError","shrink","_mockScanner","onDocumentAcquired","onFailure","documentPurpose","documentDetails","foldStage","stage","whenWaitingForConnection","whenMobileConnected","whenUploadInProgress","whenConnectionLost","whenCancellingProcess","whenMaxAttemptsReached","initialMobileModalStage","attemptsBannerMessage","resendLinkTimeout","hasSentLinkError","hasSentLink","MobileUploadStatusDialog","sendLink","cancelProcess","setStage","transition","getNextStage","currentStage","nextStage","shouldUpdate","last_stage","onSendLink","isFirstTime","idType","parameters","countryCode","country","documentType","bimap","id","attemptsLeft","onCancelProcess","usePollingEffect","intervalMS","shouldPollingContinue","constTrue","onSuccess","modalTitle","modalContent","transitionToCancelling","old_stage","constVoid","recoverFromCancelling","cancellingStage","MobileIcon","MobileConnectionOKIcon","MobileConnectionKOIcon","ProblemIcon","optionalBanner","cancelAction","bottomContent","cancelLabel","onCancel","confirmLabel","onConfirm","subtitle","MobileRequiredDocuments","channel","DocumentCard","alt","height","style","alignItems","DocumentCardSelfie","width","productType","exists","primaryDocumentsImages","IdCardImage_SK","Passport_CZ","IdCardImage_CZ","Passport_SK","secondaryDocumentsImages","DrivingLicense_SK","DrivingLicense_CZ","primary","formatDocumentType","documentType1","documentType2","showSecondaryImage","hasSecondaryDocuments","hasPrimaryDocuments","DocumentDigitalIdSwitch","renderOptionChildren","optionKey","toString","isOptionDisabled","renderOption","issues","onBlur","setType","blackVideoCover","feedbackContainer","feedbackContainerSelfie","feedbackConstainerSelfie","divider","negativeFeedbackPopup","negativeResultPopup","landscapeInfoBanner","cameraPreview","cameraPreviewSelfie","cameraHolder","successIcon","successMask","cameraPreviewMask","snapshotPreview","infoButton","loaderContainer","helplineSupportContainer","BiometricConsent","forwardRef","ref","moreInfoModalOpen","setMoreInfoModalOpen","isMobileLayout","useIsMobileLayout","isInfoBannerVisible","biometricConsent","consent","shouldBlockUser","constFalse","mustGiveConsent","color","palette","dark","radioGroup","autoFocus","isNone","onBiometricConsent","isRadioDisabled","isOptionRecommended","identity","recommendedLabel","issuesType","haveErrors","boolean","blockUserError","errorMessage","mobileLayout","desktopLayout","captureButton","captureButtonInside","webcam","foldScanStep","scanStep","whenReady","whenChooseMode","whenScanning","DocumentUploadField","externalCommunication","setScanStep","isContentModalOpen","setIsContentModalOpen","onUploadModalConfirm","onUploadModalDismiss","launcherOrDocument","buttonLabel","FileIcon","fluid","disableMobileUpload","mobileFeatureStatus","scannedDocument","fromTask","Boolean","base64","file","fromOption","fileName","toNullable","TakePhoto","webcamRef","useRef","capture","useCallback","current","imageSrc","getScreenshot","position","left","top","audio","forceScreenshotSourceSize","screenshotFormat","innerWidth","videoConstraints","ideal","facingMode","onUserMedia","media","onUserMediaError","mediaStreamError","onClick","bottom","backgroundColor","border","borderRadius","container","imgWrapper","StartProcess","align","constUndefined","ExampleDocument","image","imageAlt","listStyle","HowToDescription","isBad","error900","success800","StartIdProcess","howToIsOpen","setHowToIsOpen","isPrimaryDocument","idCards","idCardFront","idCardCZ","idCardBack","idCardBackCZ","idCardSK","idCardBackSK","passport","passportCZ","passportSK","drivingLicense","drivingLicenseCZ","drivingLicenseSK","imageSet","normal","czPrimaryImage","czPrimaryDarkImage","glare","czPrimaryGlareImage","czSecondaryImage","czSecondaryDarkImage","czSecondaryGlareImage","skPrimaryImage","skPrimaryDarkImage","skPrimaryGlareImage","skSecondaryImage","skSecondaryDarkImage","skSecondaryGlareImage","livenessCheckImageSet","livenesscheckOkImage","livenesscheckDarkImage","partial","livenesscheckPartialImage","sunglasses","livenesscheckSunglassesImage","howToSection","primaryDocumentsExample","secondaryDocumentsExample","livenessCheckExample","isProofOfIncome","headerIcon","isOpen","ReviewAndUpload","firstImageSource","onOpenImage","DocumentsIcon","onRetakePhoto","secondImageSource","onUploadRejected","onUpload","ConfirmPhoto","innerHeight","imgSource","onRetake","MobileDeviceSelection","defaultRecipient","renderRecipient","MobileDeviceText","text","WhatToUpload","isTestEnvironment","negativeConsentPressed","setNegativeConsentPressed","setMockScanner","padding","blue600","ChooseDocumentToUpload","onSelectionChange","newSelection","fieldProps","onCountryChange","onNoCountries","localCountryCode","restoredData","handleReset","currentValue","placeholder","clearable","onDocTypeChange","Countries","getCountries","api","hasCountries","setHasCountries","selectedCountry","setSelectedCountry","countryDocSelection","inEuropeanUnion","localCountrySelected","setLocalCountrySelected","handleCountrySelection","useUpdateEffect","allCountries","showCountries","setInitialItem","itemToFind","find","foundIdx","findIndex","index","unshift","val","countries","dropdownOptionToValue","searchable","DocumentTypes","acceptableDocTypes","iso3country","types","docType","newVal","DocumentDigitalId","digitalIdSwitch","openChildWindow","useBranchExperienceContext","biometricConsentEnabled","setError","agreement","setAgreement","agreementError","setAgreementError","sendBiometricConsentCommand","extractData","digitalIdApi","clientIdentified","setClientIdentified","extract","extractedAddress","canEdit","showWarning","additionalDocumentType","additionalDocumentDetails","biometricSectionRef","biometricSection","setBiometricConsent","previousConsent","onClientIdentified","applicantIndex","labels","loading","success","selectedMainApplicant","scrollIntoView","behavior","block","data-test-id","MobileUploadStatusDialogPOI","docTypeId","applicationElementID","pollingResponseReceived","setPollingResponseReceived","pollingDisabled","refreshPolling","pollingRunning","setPollingRunning","ProofOfIncomeUploadSameDeviceDialog","ProofOfIncomeUploadSameDeviceFlow","setFirstImageSource","setSecondImageSource","flowState","setFlowState","uploadProofOfIncomeDocumentMobile","documentApi","uploadPOIByClient","confirmPOIByClient","loansApi","proofOfIncomeMortgageCompleteMobile","proofOfIncomeCancel","sequenceS","uploadSingleDocument","FileContent","split","fileContent","filenetDocumentType","product","right","genericError","uploadTwoPageDocuments","files","fileContents","firstPage","mimeType","sameDevice","whenLoading","whenStartProcess","whenFirstPageUploaded","whenUploadFirstSide","whenUploadSecondSide","whenConfirmData","whenAddNote","whenUploadCompleted","whenSealing","whenUploadRejected","whenUploadFailed","whenReviewAndUpload","foldState","onDocumentCancel","maxLengthNote","goToUploadedSuccessfully","onDocumentConfirm","note","uploadNote","fileSizeMax","isNoteMandatory","onDocumentSealed","bottomActionContainer","SealingProofOfIncome","appElementId","BiometricConsentInfoDialog","personalDataProcessingTemplates","documentAPI","personalDataProcessingContent","docsets","items","docId","DocumentPreviewDialog"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAGnBC,EA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,CACE3F,KAAK,UACLwE,KAAK,QACLC,QAASgD,EAAc,aACvB9C,WAAYC,IAAOgB,W,iCC1E3B,2FAWO,SAASsuB,EAA2B9uB,GACzC,MAAMqC,EAAgBC,cAEhBysB,EAAkC7uB,YAAW8uB,KAC7CC,EAAgC/uB,YAAW8uB,KAEjD,OACE,cAAC,IAAD,CACEjsB,UAAW/C,EAAM+C,UACjBC,MAAOX,EACL,gEAEFyc,KAAMpa,YACJqqB,EAAgC,CAC9BG,QAAS,CAAC,4BAEZlqB,IAAWiE,MAAMkmB,GACfF,EAA8B,CAAEG,MAAOD,EAAM,GAAGC,c,iCC5B1D,oEAgBO,SAASC,EAAsBrvB,GACpC,MAAMqC,EAAgBC,cAEtB,OACE,cAAC,IAAD,CACEwc,KAAM9Z,IAAW8H,GAAG9M,EAAMxG,SAASkzB,aACnC1pB,MAAOX,EACL,sDAEFU,UAAW/C,EAAM+C,UACjBic,SAAUhf,EAAMxG,SAASwlB","file":"static/js/index~2ae4f6d9.b30151e6.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t22: 0\n \t}\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t22: 0\n \t};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t22: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"static/js/\" + ({}[chunkId]||chunkId) + \".\" + {\"0\":\"e920b819\",\"2\":\"f5ef68f0\",\"3\":\"0f8780c2\",\"4\":\"a022faad\",\"6\":\"8c0017e2\",\"7\":\"550b3d1c\",\"8\":\"b85b5fd5\",\"9\":\"9ffab842\",\"11\":\"c7d86d7e\",\"12\":\"1c19eda3\",\"13\":\"b854ad21\",\"14\":\"fdd77f25\",\"93\":\"552a433f\",\"98\":\"a12c979d\",\"109\":\"367fafc6\",\"119\":\"d906717c\",\"120\":\"eaab9d6f\",\"122\":\"6872e56d\",\"124\":\"f21570d5\",\"125\":\"9e919035\",\"136\":\"3eaa6b2b\",\"138\":\"cb57cfff\",\"142\":\"39e2cc8a\",\"147\":\"13d0dade\",\"151\":\"59b2a690\",\"156\":\"199c493d\",\"163\":\"db8be3ab\",\"165\":\"8dcad290\",\"170\":\"36e0bc6a\",\"172\":\"e416b0b1\",\"173\":\"029d043a\",\"174\":\"03d50758\",\"175\":\"dd7e5e96\",\"176\":\"57ca540e\",\"177\":\"29918366\",\"178\":\"84ff3a72\",\"179\":\"a83c7383\",\"180\":\"75c68a45\",\"181\":\"a11c0c0d\",\"182\":\"0ffe62ac\",\"183\":\"e4054d61\",\"184\":\"49e56bba\",\"185\":\"2a51ee5a\",\"186\":\"c42672d0\",\"187\":\"85edb43c\",\"188\":\"afaf5ad5\",\"189\":\"c888f50f\",\"190\":\"9c768635\",\"191\":\"eafa7449\",\"192\":\"711930b5\",\"193\":\"a82153d5\",\"194\":\"9e396309\",\"195\":\"45b31c32\",\"196\":\"0a8e868a\",\"197\":\"5625dbd5\",\"198\":\"de4b95f8\",\"199\":\"54b93c04\",\"200\":\"b6760e6d\",\"201\":\"f8fa1765\",\"202\":\"914dd5d2\",\"203\":\"da55aa6f\",\"204\":\"febaf418\",\"205\":\"a7b44741\",\"206\":\"f50c9aa1\",\"207\":\"1c71ea1e\",\"208\":\"19488636\",\"209\":\"a17a302b\",\"210\":\"de34e59b\",\"211\":\"6608f12f\",\"212\":\"51dee016\",\"213\":\"8f52bdef\",\"214\":\"b9a2b682\",\"215\":\"986d55df\",\"216\":\"92420627\",\"217\":\"e31ea58a\",\"218\":\"6375ab2b\",\"219\":\"4371bd00\",\"220\":\"3b27e853\",\"221\":\"e8d0e425\",\"222\":\"8e23da4f\",\"223\":\"95cc8f00\",\"224\":\"1e61555c\",\"225\":\"b192f579\",\"226\":\"10df0c7d\",\"227\":\"e2b8d81b\",\"228\":\"a0aa6e60\",\"229\":\"9da17e50\",\"230\":\"4acb1c60\",\"231\":\"e723a129\",\"232\":\"13d5a566\",\"233\":\"f45a6187\",\"234\":\"71def1c5\",\"235\":\"b8a6a076\",\"236\":\"143a888d\",\"237\":\"6f165b7e\",\"238\":\"b67ec78a\",\"239\":\"4912f060\",\"240\":\"9447a92b\",\"241\":\"944c814a\",\"242\":\"276ed8fc\",\"243\":\"3b6df777\",\"244\":\"bc0759c2\",\"245\":\"b1053dae\",\"246\":\"9e6cd215\",\"247\":\"9d393ab8\",\"248\":\"c4659fac\",\"249\":\"2fd7dcc9\",\"250\":\"ef0bddca\",\"251\":\"4d3c9a87\",\"252\":\"1b2efda1\",\"253\":\"51de8708\",\"254\":\"ecd7c9c4\",\"255\":\"426cd866\",\"256\":\"b9ac22cb\",\"257\":\"a729b243\",\"258\":\"ef1327a5\",\"259\":\"b46198b5\",\"260\":\"bbe1e03a\",\"261\":\"117a6656\",\"262\":\"3eace83a\",\"263\":\"f43cc51e\",\"264\":\"6fe4de53\",\"265\":\"d50f33c1\",\"266\":\"32cb5667\",\"267\":\"6ab6cc6e\",\"268\":\"350013e7\",\"269\":\"08f456e8\",\"270\":\"2eb3f19c\",\"271\":\"66431006\",\"272\":\"7f51a888\",\"273\":\"454e2324\",\"274\":\"6035538c\",\"275\":\"4ea6fb70\",\"276\":\"6d5c98ea\",\"277\":\"bbad787c\",\"278\":\"ca0fc83c\",\"279\":\"a17dc007\",\"280\":\"997b3cc5\",\"281\":\"6ad563f0\",\"282\":\"8afb3a58\",\"283\":\"eee6272e\",\"284\":\"2a25970b\",\"285\":\"830fd19e\",\"286\":\"463eddd0\",\"287\":\"b46cbb7d\",\"288\":\"7c3c983b\",\"289\":\"9d16eb17\",\"290\":\"a95fedde\",\"291\":\"af8cfcd5\",\"292\":\"28097dad\",\"293\":\"dc37e332\",\"294\":\"88625df4\",\"295\":\"55caa47c\",\"296\":\"7795e9a8\",\"297\":\"b54d4daa\",\"298\":\"b120a2ae\",\"299\":\"65735172\",\"300\":\"dc659172\",\"301\":\"d04ad658\",\"302\":\"4b5a06e2\",\"303\":\"0a81c354\",\"304\":\"147444b1\",\"305\":\"0267706f\",\"306\":\"39919ad3\",\"307\":\"032373b2\",\"308\":\"b028bbc9\",\"309\":\"a67008d2\",\"310\":\"a9b894ef\",\"311\":\"a86c3d1b\",\"312\":\"4cfc4f5d\",\"313\":\"118c3077\",\"314\":\"382d1e9e\",\"315\":\"f8d25de1\",\"316\":\"21002749\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// extract-css-chunks-webpack-plugin CSS loading\n \t\tvar supportsPreload = (function() { try { return document.createElement(\"link\").relList.supports(\"preload\"); } catch(e) { return false; }}());\n \t\tvar cssChunks = {\"4\":1,\"8\":1,\"9\":1,\"11\":1,\"12\":1,\"13\":1,\"93\":1,\"98\":1,\"109\":1,\"119\":1,\"120\":1,\"122\":1,\"124\":1,\"125\":1,\"136\":1,\"138\":1,\"142\":1,\"147\":1,\"151\":1,\"170\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"\" + chunkId + \"-\" + \"acde06dd3f0adc1bd92d\" + \".css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif((tag.rel === \"stylesheet\" || tag.rel === \"preload\") && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = supportsPreload ? \"preload\": \"stylesheet\";\n \t\t\t\tsupportsPreload ? linkTag.as = \"style\" : linkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0]; head.appendChild(linkTag)\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t\tif(supportsPreload) {\n \t\t\t\t\tvar execLinkTag = document.createElement(\"link\");\n \t\t\t\t\texecLinkTag.href = __webpack_require__.p + \"\" + chunkId + \"-\" + \"acde06dd3f0adc1bd92d\" + \".css\";\n \t\t\t\t\texecLinkTag.rel = \"stylesheet\";\n \t\t\t\t\texecLinkTag.type = \"text/css\";\n \t\t\t\t\tdocument.body.appendChild(execLinkTag);\n \t\t\t\t}\n \t\t\t}));\n \t\t}\n\n \t\t// mini-css-extract-plugin CSS loading\n \t\tvar cssChunks = {\"142\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"static/css/\" + ({}[chunkId]||chunkId) + \".\" + {\"0\":\"31d6cfe0\",\"2\":\"31d6cfe0\",\"3\":\"31d6cfe0\",\"4\":\"31d6cfe0\",\"6\":\"31d6cfe0\",\"7\":\"31d6cfe0\",\"8\":\"31d6cfe0\",\"9\":\"31d6cfe0\",\"11\":\"31d6cfe0\",\"12\":\"31d6cfe0\",\"13\":\"31d6cfe0\",\"14\":\"31d6cfe0\",\"93\":\"31d6cfe0\",\"98\":\"31d6cfe0\",\"109\":\"31d6cfe0\",\"119\":\"31d6cfe0\",\"120\":\"31d6cfe0\",\"122\":\"31d6cfe0\",\"124\":\"31d6cfe0\",\"125\":\"31d6cfe0\",\"136\":\"31d6cfe0\",\"138\":\"31d6cfe0\",\"142\":\"5bb98a8b\",\"147\":\"31d6cfe0\",\"151\":\"31d6cfe0\",\"156\":\"31d6cfe0\",\"163\":\"31d6cfe0\",\"165\":\"31d6cfe0\",\"170\":\"31d6cfe0\",\"172\":\"31d6cfe0\",\"173\":\"31d6cfe0\",\"174\":\"31d6cfe0\",\"175\":\"31d6cfe0\",\"176\":\"31d6cfe0\",\"177\":\"31d6cfe0\",\"178\":\"31d6cfe0\",\"179\":\"31d6cfe0\",\"180\":\"31d6cfe0\",\"181\":\"31d6cfe0\",\"182\":\"31d6cfe0\",\"183\":\"31d6cfe0\",\"184\":\"31d6cfe0\",\"185\":\"31d6cfe0\",\"186\":\"31d6cfe0\",\"187\":\"31d6cfe0\",\"188\":\"31d6cfe0\",\"189\":\"31d6cfe0\",\"190\":\"31d6cfe0\",\"191\":\"31d6cfe0\",\"192\":\"31d6cfe0\",\"193\":\"31d6cfe0\",\"194\":\"31d6cfe0\",\"195\":\"31d6cfe0\",\"196\":\"31d6cfe0\",\"197\":\"31d6cfe0\",\"198\":\"31d6cfe0\",\"199\":\"31d6cfe0\",\"200\":\"31d6cfe0\",\"201\":\"31d6cfe0\",\"202\":\"31d6cfe0\",\"203\":\"31d6cfe0\",\"204\":\"31d6cfe0\",\"205\":\"31d6cfe0\",\"206\":\"31d6cfe0\",\"207\":\"31d6cfe0\",\"208\":\"31d6cfe0\",\"209\":\"31d6cfe0\",\"210\":\"31d6cfe0\",\"211\":\"31d6cfe0\",\"212\":\"31d6cfe0\",\"213\":\"31d6cfe0\",\"214\":\"31d6cfe0\",\"215\":\"31d6cfe0\",\"216\":\"31d6cfe0\",\"217\":\"31d6cfe0\",\"218\":\"31d6cfe0\",\"219\":\"31d6cfe0\",\"220\":\"31d6cfe0\",\"221\":\"31d6cfe0\",\"222\":\"31d6cfe0\",\"223\":\"31d6cfe0\",\"224\":\"31d6cfe0\",\"225\":\"31d6cfe0\",\"226\":\"31d6cfe0\",\"227\":\"31d6cfe0\",\"228\":\"31d6cfe0\",\"229\":\"31d6cfe0\",\"230\":\"31d6cfe0\",\"231\":\"31d6cfe0\",\"232\":\"31d6cfe0\",\"233\":\"31d6cfe0\",\"234\":\"31d6cfe0\",\"235\":\"31d6cfe0\",\"236\":\"31d6cfe0\",\"237\":\"31d6cfe0\",\"238\":\"31d6cfe0\",\"239\":\"31d6cfe0\",\"240\":\"31d6cfe0\",\"241\":\"31d6cfe0\",\"242\":\"31d6cfe0\",\"243\":\"31d6cfe0\",\"244\":\"31d6cfe0\",\"245\":\"31d6cfe0\",\"246\":\"31d6cfe0\",\"247\":\"31d6cfe0\",\"248\":\"31d6cfe0\",\"249\":\"31d6cfe0\",\"250\":\"31d6cfe0\",\"251\":\"31d6cfe0\",\"252\":\"31d6cfe0\",\"253\":\"31d6cfe0\",\"254\":\"31d6cfe0\",\"255\":\"31d6cfe0\",\"256\":\"31d6cfe0\",\"257\":\"31d6cfe0\",\"258\":\"31d6cfe0\",\"259\":\"31d6cfe0\",\"260\":\"31d6cfe0\",\"261\":\"31d6cfe0\",\"262\":\"31d6cfe0\",\"263\":\"31d6cfe0\",\"264\":\"31d6cfe0\",\"265\":\"31d6cfe0\",\"266\":\"31d6cfe0\",\"267\":\"31d6cfe0\",\"268\":\"31d6cfe0\",\"269\":\"31d6cfe0\",\"270\":\"31d6cfe0\",\"271\":\"31d6cfe0\",\"272\":\"31d6cfe0\",\"273\":\"31d6cfe0\",\"274\":\"31d6cfe0\",\"275\":\"31d6cfe0\",\"276\":\"31d6cfe0\",\"277\":\"31d6cfe0\",\"278\":\"31d6cfe0\",\"279\":\"31d6cfe0\",\"280\":\"31d6cfe0\",\"281\":\"31d6cfe0\",\"282\":\"31d6cfe0\",\"283\":\"31d6cfe0\",\"284\":\"31d6cfe0\",\"285\":\"31d6cfe0\",\"286\":\"31d6cfe0\",\"287\":\"31d6cfe0\",\"288\":\"31d6cfe0\",\"289\":\"31d6cfe0\",\"290\":\"31d6cfe0\",\"291\":\"31d6cfe0\",\"292\":\"31d6cfe0\",\"293\":\"31d6cfe0\",\"294\":\"31d6cfe0\",\"295\":\"31d6cfe0\",\"296\":\"31d6cfe0\",\"297\":\"31d6cfe0\",\"298\":\"31d6cfe0\",\"299\":\"31d6cfe0\",\"300\":\"31d6cfe0\",\"301\":\"31d6cfe0\",\"302\":\"31d6cfe0\",\"303\":\"31d6cfe0\",\"304\":\"31d6cfe0\",\"305\":\"31d6cfe0\",\"306\":\"31d6cfe0\",\"307\":\"31d6cfe0\",\"308\":\"31d6cfe0\",\"309\":\"31d6cfe0\",\"310\":\"31d6cfe0\",\"311\":\"31d6cfe0\",\"312\":\"31d6cfe0\",\"313\":\"31d6cfe0\",\"314\":\"31d6cfe0\",\"315\":\"31d6cfe0\",\"316\":\"31d6cfe0\"}[chunkId] + \".chunk.css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = \"stylesheet\";\n \t\t\t\tlinkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n \t\t\t\thead.appendChild(linkTag);\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t}));\n \t\t}\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = this[\"webpackJsonpapp\"] = this[\"webpackJsonpapp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1178,31,36,44,37,20,32,18,26,42,33,24,27,41,34,25,23,15,29,16,43,40,39,19,35,28,38,17,21,30]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { useCommand } from \"../../../useAPI\";\nimport * as uploadApi from \"../../api\";\nimport {\n acquiredSelfie,\n CameraError,\n useCamera,\n useSelfieSnapshot,\n useZenid,\n} from \"../zenidUtils\";\nimport { Box, FeedbackBlock, unsafeLocalizedString } from \"design-system\";\nimport { useMemo, useState } from \"react\";\nimport { option } from \"fp-ts\";\nimport * as classes from \"../Photo/MobileIdUpload2.treat\";\nimport { SelfieData } from \"zenid\";\nimport { useTestEnvironment } from \"../../../Common/useTestEnvironment\";\n\nexport function SelfieTestPage() {\n type STATE = \"Loading\" | \"Loaded\" | \"N/A\" | \"CameraError\";\n const isTestEnv = useTestEnvironment();\n const [state, setState] = useState(isTestEnv ? \"Loading\" : \"N/A\");\n const [cameraError, setCameraError] = useState(\"\");\n\n switch (state) {\n case \"CameraError\":\n return (\n \n );\n case \"N/A\":\n return null;\n case \"Loading\":\n return setState(\"Loaded\")} />;\n case \"Loaded\":\n return (\n {\n setCameraError(e);\n setState(\"CameraError\");\n console.log(e);\n }}\n />\n );\n }\n}\n\ntype InitProps = {\n onLoaded: () => unknown;\n};\n\nfunction InitFlow(props: InitProps) {\n const startProcess = useCommand(uploadApi.startProcess);\n\n useZenid(\n false,\n [\"selfieVideo\"],\n startProcess,\n props.onLoaded,\n true,\n undefined\n );\n\n return (\n \n \n \n );\n}\n\ntype SelfieProps = {\n onCameraError: (e: CameraError) => unknown;\n};\n\nfunction ShowSelfie(props: SelfieProps) {\n const { feedbackText } = useCamera(\n useMemo(\n () => ({\n feature: \"selfieVideo\",\n cameraPreviewContainer: classes.cameraPreviewSelfie,\n onError: props.onCameraError,\n }),\n []\n )\n );\n\n console.log(\"feedbackText\", feedbackText);\n\n useSelfieSnapshot(classes.snapshotPreview, (snapshotData: SelfieData) => {\n const data = acquiredSelfie({\n blob: snapshotData.blob,\n signature: snapshotData.signature,\n });\n console.log(data);\n });\n\n return
;\n}\n","import { FeedbackBlock, ValueOf } from \"design-system\";\nimport { option } from \"fp-ts\";\nimport { CameraError } from \"./zenidUtils\";\nimport { MobileUploadStatusError } from \"../api\";\nimport { useFormatMessage, LocaleKey } from \"../../intl\";\nimport { useAppRedirect } from \"../../Common/useSBDeepLink\";\n\nexport const MobileUploadState = {\n Completed: \"Completed\" as const,\n Rejected: \"Rejected\" as const,\n RejectedByUser: \"RejectedByUser\" as const,\n CameraError: \"CameraError\" as const,\n CameraDisabled: \"CameraDisabled\" as const,\n CameraUnavailable: \"CameraUnavailable\" as const,\n UploadError: \"UploadError\" as const,\n DocumentInvalid: \"DocumentInvalid\" as const,\n DocumentCountryInvalid: \"DocumentCountryInvalid\" as const,\n PageInvalid: \"PageInvalid\" as const,\n ConnectionLost: \"ConnectionLost\" as const,\n};\n\nexport const MobileUploadStateSpec: MobileUploadStateSpec = {\n Completed: {\n type: \"positive\",\n heading: \"Identification.UploadDocuments.mobile.successTitle\",\n subheading: \"Identification.UploadDocuments.mobile.successDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n Rejected: {\n type: \"negative\",\n heading: \"Identification.UploadDocuments.mobile.rejectTitle\",\n subheading: \"Identification.UploadDocuments.mobile.rejectDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n RejectedByUser: {\n type: \"negative\",\n heading:\n \"Identification.UploadDocuments.proofOfIncome.rejectedByUser.title\",\n subheading:\n \"Identification.UploadDocuments.proofOfIncome.rejectedByUser.subtitle\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n CameraError: {\n type: \"negative\",\n heading: \"Identification.UploadDocuments.mobileCheck.cameraErrorTitle\",\n subheading:\n \"Identification.UploadDocuments.mobileCheck.cameraErrorDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n CameraDisabled: {\n type: \"negative\",\n heading: \"Identification.UploadDocuments.mobileCheck.cameraDisabledTitle\",\n subheading:\n \"Identification.UploadDocuments.mobileCheck.cameraDisabledDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n CameraUnavailable: {\n type: \"negative\",\n heading:\n \"Identification.UploadDocuments.mobileCheck.cameraUnavailableTitle\",\n subheading:\n \"Identification.UploadDocuments.mobileCheck.cameraUnavailableDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n UploadError: {\n type: \"negative\",\n heading: \"Identification.UploadDocuments.mobile.uploadErrorTitle\",\n subheading: \"Identification.UploadDocuments.mobile.uploadErrorDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n DocumentInvalid: {\n type: \"negative\",\n heading: \"Identification.UploadDocuments.mobile.invalidDocumentTitle\",\n subheading:\n \"Identification.UploadDocuments.mobile.invalidDocumentDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n DocumentCountryInvalid: {\n type: \"negative\",\n heading:\n \"Identification.UploadDocuments.mobile.invalidDocumentCountryTitle\",\n subheading:\n \"Identification.UploadDocuments.mobile.invalidDocumentCountryDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n PageInvalid: {\n type: \"negative\",\n heading: \"Identification.UploadDocuments.mobile.invalidPageTitle\",\n subheading: \"Identification.UploadDocuments.mobile.invalidPageDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n ConnectionLost: {\n type: \"negative\",\n heading: \"Identification.UploadDocuments.mobile.connectionLostTitle\",\n subheading:\n \"Identification.UploadDocuments.mobile.connectionLostDescription\",\n content: \"Identification.UploadDocuments.mobile.canCloseWindow\",\n },\n};\n\nexport function MobileUploadFeedbackBanner(\n props: MobileUploadFeedbackBannerProps\n) {\n const { state } = props;\n const formatMessage = useFormatMessage();\n const spec = MobileUploadStateSpec[state] || MobileUploadState.UploadError;\n const redirectToMobileApp = useAppRedirect();\n\n return (\n \n );\n}\n\nexport function fromCameraErrorToFeedbackState(error: CameraError) {\n switch (error) {\n case \"generic\":\n return MobileUploadState.CameraError;\n case \"disabled\":\n return MobileUploadState.CameraDisabled;\n case \"unavailable\":\n return MobileUploadState.CameraUnavailable;\n }\n}\n\nexport function fromUploadErrorToFeedbackState(error: MobileUploadStatusError) {\n switch (error) {\n case \"GenericError\":\n return MobileUploadState.ConnectionLost;\n case \"InvalidDocument\":\n return MobileUploadState.DocumentInvalid;\n case \"InvalidDocumentCountry\":\n return MobileUploadState.DocumentCountryInvalid;\n case \"InvalidPage\":\n return MobileUploadState.PageInvalid;\n }\n}\n\nexport interface MobileUploadFeedbackBannerProps {\n state: MobileUploadState;\n showOpenMobileAppButton?: boolean;\n}\n\nexport type MobileUploadState = ValueOf;\n\nexport type MobileUploadStateSpec = {\n [key in keyof typeof MobileUploadState]: {\n type: \"positive\" | \"negative\";\n heading: LocaleKey;\n subheading: LocaleKey;\n content: LocaleKey;\n };\n};\n","import { UploadDocumentFlowType } from \"../../../globalDomain\";\n\nexport type DocumentSide = \"FirstSide\" | \"SecondSide\";\n\nexport function foldDocumentSide(\n documentSide: DocumentSide,\n onFirstSide: () => T,\n onSecondSide: () => T\n) {\n switch (documentSide) {\n case \"FirstSide\":\n return onFirstSide();\n case \"SecondSide\":\n return onSecondSide();\n }\n}\n\nexport function foldUploadFlowType(match: {\n whenMortgage: () => T;\n whenStandardLoan: () => T;\n whenPersonalProfile: () => T;\n}) {\n return function (uploadDocumentFlowType: UploadDocumentFlowType) {\n switch (uploadDocumentFlowType) {\n case \"MORTGAGE\":\n return match.whenMortgage();\n case \"CL\":\n case \"RL\":\n case \"RPL\":\n case \"SL\":\n case \"TL\":\n return match.whenStandardLoan();\n case \"PersonalProfile\":\n return match.whenPersonalProfile();\n }\n };\n}\n\nexport const ratio = 1920 / 1080;\n","import { useState } from \"react\";\nimport { constant, pipe } from \"fp-ts/function\";\nimport { Task } from \"fp-ts/Task\";\nimport { Option } from \"fp-ts/Option\";\nimport { option, task, taskEither } from \"fp-ts\";\nimport { ClientDataCheck } from \"./domain\";\nimport { useCommand } from \"../useAPI\";\nimport * as idUploadApi from \"../IdUpload/api\";\nimport { CoApplicant, DocumentIdentificationFlow } from \"../globalDomain\";\nimport { RedoFraudCheckDialog } from \"./RedoFraudCheckDialog\";\nimport { MobileUploadStatusDialog } from \"./MobileUploadStatusDialog\";\nimport { Box, Heading, FeedbackDialog } from \"design-system\";\nimport { useFormatMessage } from \"../intl\";\nimport { MobileRecipientOptionType } from \"./state\";\n\ntype Props = {\n coApplicant: Option;\n fraudCheck: ClientDataCheck;\n recipient: MobileRecipientOptionType;\n documentIdentificationFlow: DocumentIdentificationFlow;\n canUploadAgain: boolean;\n onDismiss: () => unknown;\n onError: (reason: \"GenericError\" | \"MaxAttemptsReached\") => unknown;\n onAbort: () => unknown;\n onUploadAgain: () => unknown;\n onFraudCheck: (check: ClientDataCheck, canUploadAgain: boolean) => unknown;\n onContinue: () => unknown;\n};\n\nexport function foldFraudCheckType(\n check: ClientDataCheck,\n match: { [k in ClientDataCheck]: () => T }\n) {\n return match[check]();\n}\n\nexport function FraudCheckDialog(props: Props) {\n const formatMessage = useFormatMessage();\n const fraudCheckResult = useCommand(idUploadApi.fraudCheckResult);\n\n const [status, setStatus] = useState<\n \"FraudCheck\" | \"RedoMessage\" | \"Completed\"\n >(\"FraudCheck\");\n\n const handleFraudCheckResult = (check: ClientDataCheck): Task => {\n return pipe(\n fraudCheckResult({\n zenIdPurpose: foldFraudCheckType(check, {\n SelfieFraudCheck: constant(\"FRAUD_CHECK_SELFIE\"),\n HologramFraudCheck: constant(\"FRAUD_CHECK_HOLOGRAM\"),\n HologramAndSelfieFraudCheck: constant(\n \"FRAUD_CHECK_SELFIE_AND_HOLOGRAM\"\n ),\n }),\n }),\n taskEither.fold(\n () => task.fromIO(() => props.onError(\"GenericError\")),\n result => {\n switch (result) {\n case \"Redo\":\n return task.fromIO(() => setStatus(\"RedoMessage\"));\n case \"Abort\":\n return task.fromIO(props.onAbort);\n case \"UploadAgain\":\n return task.fromIO(props.onUploadAgain);\n case \"HologramAndSelfieFraudCheck\":\n case \"HologramFraudCheck\":\n case \"SelfieFraudCheck\":\n return task.fromIO(() =>\n props.onFraudCheck(result, props.canUploadAgain)\n );\n case \"Continue\":\n case \"ContinueWithWarning\":\n case \"EditDataWithWarning\":\n case \"EditData\":\n return task.fromIO(() => setStatus(\"Completed\"));\n }\n }\n )\n );\n };\n\n switch (status) {\n case \"FraudCheck\":\n return (\n props.onError(\"MaxAttemptsReached\")}\n documentIdentificationFlow={props.documentIdentificationFlow}\n onUploadCompleted={handleFraudCheckResult(props.fraudCheck)}\n coApplicant={props.coApplicant}\n documentToUploadDetails={option.none}\n />\n );\n case \"RedoMessage\":\n return (\n setStatus(\"FraudCheck\"))}\n onUploadAgain={pipe(\n task.fromIO(props.onUploadAgain),\n option.fromPredicate(() => props.canUploadAgain)\n )}\n />\n );\n case \"Completed\":\n return (\n \n \n \n {formatMessage(\n \"Identification.UploadDocuments.FraudChecksModal.successDescription\"\n )}\n \n \n \n );\n }\n}\n","import { ComponentProps, useState } from \"react\";\nimport {\n Body,\n Space,\n Loader,\n Box,\n Heading,\n MobileUploadIDIcon,\n Dialog,\n Action,\n Stack,\n unsafeLocalizedString,\n Button,\n} from \"design-system\";\nimport { useQuery } from \"../useAPI\";\nimport * as uploadApi from \"./api\";\nimport { useFormatMessage } from \"../intl\";\nimport { Option } from \"fp-ts/Option\";\nimport { option, array, nonEmptyArray } from \"fp-ts\";\nimport { pipe, constNull, constant, flow } from \"fp-ts/function\";\nimport * as remoteData from \"../RemoteData\";\nimport { MobileDeviceSelection } from \"./MobileDeviceSelection\";\nimport { LinkPurpose, MobileRecipientType } from \"./domain\";\nimport { Task } from \"fp-ts/Task\";\nimport { NonEmptyArray } from \"fp-ts/NonEmptyArray\";\nimport { MobileFlowType, MobileRecipientOptionType } from \"./state\";\nimport { CoApplicantInput } from \"../globalDomain\";\nimport { foldMobileFlowType } from \"./utils\";\nimport { useAppContext } from \"../useAppContext\";\nimport { usePortalStatusContext } from \"../PortalStatusContext\";\n\ntype Props = {\n type: MobileFlowType;\n onSelect: (recipient: MobileRecipientOptionType) => unknown;\n onDismiss: () => unknown;\n onUploadAgain: Option>;\n onMockScannerUpload: Option<() => unknown>;\n} & CoApplicantInput;\n\nfunction foldType(\n type: Props[\"type\"],\n match: {\n [k in Props[\"type\"]]: () => T;\n }\n) {\n return match[type]();\n}\n\nexport function getRecipientOptions(\n recipients: uploadApi.MobileRecipientsOutput\n): Option> {\n return pipe(\n [\n {\n key: \"Client\" as MobileRecipientType,\n ...recipients.Client,\n },\n { key: \"Banker\" as MobileRecipientType, ...recipients.Banker },\n ],\n array.filterMap(r =>\n pipe(\n r.phoneNumber,\n option.map(phoneNumber => ({ ...r, phoneNumber }))\n )\n ),\n nonEmptyArray.fromArray,\n option.filter>(\n array.some(r => !r.disabled)\n )\n );\n}\n\nexport function ChooseMobileDeviceDialog(props: Props) {\n const formatMessage = useFormatMessage();\n const [recipients] = useQuery(uploadApi.mobileRecipients, {\n coApplicant: props.coApplicant,\n linkPurpose: foldMobileFlowType(props.type, {\n ProofOfIncome: constant(\"proofOfIncome\"),\n DocumentUpload: constant(\"mobileIdUpload\"),\n SelfieFraudCheck: constant(\"selfieFraudCheck\"),\n HologramFraudCheck: constant(\"hologramFraudCheck\"),\n HologramAndSelfieFraudCheck: constant(\"hologramAndSelfieFraudCheck\"),\n }),\n });\n const { portalBlocked } = usePortalStatusContext();\n\n const {\n config: { mockScanner },\n } = useAppContext();\n\n const [recipient, setRecipient] = useState>(\n option.none\n );\n\n const title = foldType(props.type, {\n DocumentUpload: constant(\n formatMessage(\"Identification.UploadDocuments.chooseMobileRecipientTitle\")\n ),\n ProofOfIncome: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseProofOfIncomeMobileRecipientTitle\"\n )\n ),\n SelfieFraudCheck: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseSelfieMobileRecipientTitle\"\n )\n ),\n HologramFraudCheck: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseHologramMobileRecipientTitle\"\n )\n ),\n HologramAndSelfieFraudCheck: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseSelfieAndHologramMobileRecipientTitle\"\n )\n ),\n });\n\n const description = foldType(props.type, {\n DocumentUpload: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseMobileRecipientDescription\"\n )\n ),\n ProofOfIncome: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseProofOfIncomeMobileRecipientDescription\"\n )\n ),\n SelfieFraudCheck: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseFraudCheckMobileRecipientDescription\"\n )\n ),\n HologramFraudCheck: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseFraudCheckMobileRecipientDescription\"\n )\n ),\n HologramAndSelfieFraudCheck: constant(\n formatMessage(\n \"Identification.UploadDocuments.chooseFraudCheckMobileRecipientDescription\"\n )\n ),\n });\n\n const uploadAgainAction: Option = pipe(\n props.onUploadAgain,\n option.map(onUploadAgain => ({\n variant: \"secondary\",\n label: formatMessage(\"Identification.UploadDocuments.uploadAgain\"),\n action: onUploadAgain,\n }))\n );\n\n const selectAction: Action = {\n variant: \"primary\",\n label: formatMessage(\"Identification.UploadDocuments.sendLink\"),\n action: () => pipe(recipient, option.map(props.onSelect)),\n };\n\n const actions: ComponentProps[\"actions\"] = pipe(\n uploadAgainAction,\n option.fold[\"actions\"]>(\n () => [selectAction],\n uploadAgainAction => [uploadAgainAction, selectAction]\n )\n );\n return (\n \n \n {pipe(\n recipients,\n remoteData.fold(\n () => (\n \n \n \n ),\n constNull,\n flow(\n getRecipientOptions,\n option.fold(constNull, options => (\n \n \n {description}\n \n \n \n {formatMessage(\n \"Identification.UploadDocuments.chooseMobileRecipientSubtitle\"\n )}\n \n \n setRecipient(option.some(value))}\n disabled={portalBlocked}\n />\n \n ))\n )\n )\n )}\n {mockScanner &&\n pipe(\n props.onMockScannerUpload,\n option.fold(constNull, onMockScannerUpload => (\n \n ))\n )}\n \n \n );\n}\n","import { Box } from \"design-system\";\nimport * as classes from \"./StickyBottomContainer.treat\";\ntype Props = {\n children: JSX.Element;\n};\n\nexport const StickyBottomContainer = (props: Props) => {\n return (\n \n {props.children}\n \n );\n};\n","import { useEffect, useMemo, useState } from \"react\";\nimport {\n Feature,\n ZenidWebSdk,\n zenidModels,\n Events,\n SupportedLanguages,\n AcceptableInput,\n PageCode,\n DocumentCode,\n SupportedLanguage,\n DocumentData,\n SelfieData,\n Feedback,\n Visualizer,\n PossibleDocument,\n Model,\n} from \"zenid\";\nimport { pipe, constant, flow } from \"fp-ts/function\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport {\n taskEither,\n task,\n either,\n option,\n array,\n record,\n eq,\n nonEmptyArray,\n} from \"fp-ts\";\nimport { TaskEither } from \"fp-ts/TaskEither\";\nimport { ReaderTaskEither } from \"fp-ts/ReaderTaskEither\";\nimport { Either } from \"fp-ts/Either\";\nimport { useEvent } from \"react-use\";\nimport { Option } from \"fp-ts/Option\";\nimport { useAppContext } from \"../../useAppContext\";\nimport {\n APIParameters,\n DocumentIdentificationFlow,\n foldTenant,\n Tenant,\n} from \"../../globalDomain\";\nimport { NonEmptyArray } from \"fp-ts/NonEmptyArray\";\nimport * as t from \"io-ts\";\nimport { failure } from \"io-ts/lib/PathReporter\";\nimport { LocalizedString } from \"design-system\";\nimport { useFormatMessage } from \"../../intl\";\nimport { useIsRemoteChannel } from \"../../useChannel\";\n\nconst isFeedback = (u: number): u is Feedback =>\n pipe(\n Feedback,\n record.some(x => x === u)\n );\n\nconst FeedbackCodec = new t.Type(\n \"Feedback\",\n (u): u is Feedback => t.number.is(u) && isFeedback(u),\n (value, context) =>\n pipe(\n t.number.validate(value, context),\n either.chain(v =>\n isFeedback(v) ? t.success(v) : t.failure(value, context)\n )\n ),\n t.number.encode\n);\n\nconst FeedbackEvent = t.type({\n feedback: FeedbackCodec,\n});\n\nexport type ZenidError =\n | \"InitializationFailed\"\n | \"InvalidToken\"\n | \"LoadFeatureFailed\"\n | \"CameraTestFailed\"\n | \"StartCameraFailed\";\n\nexport const getDocumentCodes = (\n tenant: Tenant,\n isRemote: boolean,\n isPersonalProfile: boolean,\n documentIdentificationFlow: DocumentIdentificationFlow\n) => {\n return foldTenant(\n tenant,\n () => {\n switch (documentIdentificationFlow) {\n case \"PrimaryAndLivenessCheck\":\n case \"Primary\":\n return isRemote && !isPersonalProfile\n ? [...idCardCodesSK]\n : [...idCardCodesSK, ...passportCodesCZ];\n case \"Secondary\":\n return !isPersonalProfile\n ? []\n : [\n ...passportCodesSK,\n ...drivingLicenseCodesSK,\n ...drivingLicenseCodesCZ,\n ];\n case \"PrimaryAndSecondary\":\n return [\n ...idCardCodesSK,\n ...passportCodesCZ,\n ...passportCodesSK,\n ...drivingLicenseCodesSK,\n ...drivingLicenseCodesCZ,\n ];\n }\n },\n () => {\n switch (documentIdentificationFlow) {\n case \"PrimaryAndLivenessCheck\":\n case \"Primary\":\n return !isPersonalProfile && isRemote\n ? [...idCardCodesCZ]\n : [...idCardCodesCZ, ...passportCodesSK];\n case \"Secondary\":\n return isPersonalProfile\n ? [\n ...passportCodesCZ,\n ...drivingLicenseCodesCZ,\n ...drivingLicenseCodesSK,\n ]\n : isRemote\n ? [...passportCodesCZ, ...drivingLicenseCodesCZ]\n : [];\n case \"PrimaryAndSecondary\":\n return [\n ...idCardCodesCZ,\n ...passportCodesSK,\n ...passportCodesCZ,\n ...drivingLicenseCodesCZ,\n ...drivingLicenseCodesSK,\n ];\n }\n }\n );\n};\n\nconst idCardCodesCZ: DocumentCode[] = [DocumentCode.IDC2];\nconst passportCodesCZ: DocumentCode[] = [DocumentCode.PAS];\nconst drivingLicenseCodesCZ: DocumentCode[] = [DocumentCode.DRV];\n// const residencePermitCodesCZ: DocumentCode[] = [DocumentCode.CZ_RES_2006_T, DocumentCode.CZ_RES_2006_07, DocumentCode.CZ_RES_2011_14];\n// ^^ Could be useful in future ^^\nconst passportCodesSK: DocumentCode[] = [DocumentCode.SK_PAS_2008_14];\nconst drivingLicenseCodesSK: DocumentCode[] = [\n DocumentCode.SK_DRV_2004_08_09,\n DocumentCode.SK_DRV_2013,\n DocumentCode.SK_DRV_2015,\n];\nconst idCardCodesSK: DocumentCode[] = [\n DocumentCode.SK_IDC_2008plus,\n DocumentCode.SK_IDC_2022,\n DocumentCode.SK_IDC_2024,\n];\n\nconst getAllTenantModels = (\n tenant: Tenant,\n isRemote: boolean,\n isPersonalProfile: boolean\n) =>\n zenidModels.filter(model => {\n return getDocumentCodes(\n tenant,\n isRemote,\n isPersonalProfile,\n \"PrimaryAndSecondary\"\n ).includes(model.documentCode);\n });\n\nconst validateToken = (token: string): Either =>\n pipe(\n token,\n NonEmptyString.decode,\n either.mapLeft(constant(\"InvalidToken\"))\n );\n\nconst initialize = (\n exchangeTokenCommand: ReaderTaskEither<\n { token: NonEmptyString },\n unknown,\n { token: NonEmptyString }\n >\n): Either => {\n const initializationCallback = (token: string): Promise =>\n pipe(\n token,\n validateToken,\n taskEither.fromEither,\n taskEither.chain(token => exchangeTokenCommand({ token })),\n taskEither.fold(\n e => constant(Promise.reject(e)),\n ({ token: exchangedToken }) => task.of(exchangedToken)\n )\n )();\n\n return either.tryCatch(\n () => ZenidWebSdk.initialize(initializationCallback),\n constant(\"InitializationFailed\")\n );\n};\n\nconst visualizer = new Visualizer({\n drawText: false,\n});\n\nconst loadFeature = (\n tenant: Tenant,\n isRemote: boolean,\n isPersonalProfile: boolean,\n documentBlurAcceptableScore: number,\n specularAcceptableScore: number,\n timeToBlurMaxTolerance: number,\n enableAimingCircle?: boolean,\n drawOutline?: boolean,\n models?: Model[]\n): ((feature: Feature) => TaskEither) => {\n return (feature: Feature) =>\n taskEither.tryCatch(() => {\n const settings = {\n feature,\n enabledModels:\n feature !== \"selfie\" && feature !== \"selfieVideo\"\n ? models\n ? models\n : getAllTenantModels(tenant, isRemote, isPersonalProfile)\n : undefined,\n visualizer,\n enableAimingCircle: enableAimingCircle,\n documentBlurAcceptableScore:\n feature !== \"selfie\" && feature !== \"selfieVideo\"\n ? documentBlurAcceptableScore\n : undefined,\n specularAcceptableScore:\n feature !== \"selfie\" && feature !== \"selfieVideo\"\n ? specularAcceptableScore\n : undefined,\n timeToBlurMaxTolerance:\n feature !== \"selfie\" && feature !== \"selfieVideo\"\n ? timeToBlurMaxTolerance\n : undefined,\n };\n //\"drawOutline\" is bugged in zenId as it checks whether it is present instead of undefined\n return ZenidWebSdk.load(\n feature === \"document\"\n ? { ...settings, drawOutline: drawOutline }\n : settings\n );\n }, constant(\"LoadFeatureFailed\" as ZenidError));\n};\n\nconst loadFeatures: (\n tenant: Tenant,\n isRemote: boolean,\n isPersonalProfile: boolean,\n features: NonEmptyArray,\n documentBlurAcceptableScore: number,\n specularAcceptableScore: number,\n timeToBlurMaxTolerance: number,\n enableAimingCircle?: boolean,\n drawOutline?: boolean,\n models?: Model[]\n) => TaskEither = (\n tenant,\n isRemote,\n isPersonalProfile,\n features,\n documentBlurAcceptableScore,\n specularAcceptableScore,\n timeToBlurMaxTolerance,\n enableAimingCircle?: boolean,\n drawOutline?: boolean,\n models?: Model[]\n) =>\n pipe(\n features,\n array.traverse(taskEither.taskEither)(\n loadFeature(\n tenant,\n isRemote,\n isPersonalProfile,\n documentBlurAcceptableScore,\n specularAcceptableScore,\n timeToBlurMaxTolerance,\n enableAimingCircle,\n drawOutline,\n models\n )\n ),\n taskEither.map(() => {})\n );\n\nconst testCamera: TaskEither = taskEither.tryCatch(\n () => ZenidWebSdk.testCamera(),\n constant(\"CameraTestFailed\")\n);\n\nconst initializeZenid = (\n tenant: Tenant,\n isRemote: boolean,\n isPersonalProfile: boolean,\n features: NonEmptyArray,\n exchangeTokenCommand: ReaderTaskEither<\n { token: NonEmptyString },\n unknown,\n { token: NonEmptyString }\n >,\n documentBlurAcceptableScore: number,\n specularAcceptableScore: number,\n timeToBlurMaxTolerance: number,\n enableAimingCircle?: boolean,\n drawOutline?: boolean,\n models?: Model[]\n): TaskEither =>\n pipe(\n initialize(exchangeTokenCommand),\n taskEither.fromEither,\n taskEither.chain(() =>\n loadFeatures(\n tenant,\n isRemote,\n isPersonalProfile,\n features,\n documentBlurAcceptableScore,\n specularAcceptableScore,\n timeToBlurMaxTolerance,\n enableAimingCircle,\n drawOutline,\n models\n )\n ),\n taskEither.chain(() => testCamera)\n );\n\nexport const useZenid = (\n isPersonalProfile: boolean,\n features: NonEmptyArray,\n exchangeTokenCommand: ReaderTaskEither<\n { token: NonEmptyString },\n unknown,\n { token: NonEmptyString }\n >,\n onLoaded: (feature: Feature[]) => unknown,\n autoInitialize: boolean,\n models?: Model[]\n): {\n initializeZenid: TaskEither;\n loadedFeatures: Feature[];\n} => {\n const [initialized, setInitialized] = useState(false);\n const [loadedFeatures, _setLoadedFeatures] = useState(\n (window as any).zenIdLoadedFeatures !== undefined\n ? (window as any).zenIdLoadedFeatures\n : []\n );\n\n const setLoadedFeatures = (features: Feature[]) => {\n (window as any).zenIdLoadedFeatures = features;\n _setLoadedFeatures(features);\n };\n\n const {\n config: {\n environment,\n documentBlurAcceptableScore,\n specularAcceptableScore,\n timeToBlurMaxTolerance,\n useNewMobileIdUploadUx,\n },\n apiParameters: { tenant },\n } = useAppContext();\n\n const isRemote = useIsRemoteChannel();\n\n useMemo(() => {\n ZenidWebSdk.addLogListener(\n function ({ level, message }) {\n switch (level) {\n case \"error\":\n console.error(message);\n break;\n case \"warn\":\n console.warn(message);\n break;\n case \"info\":\n console.info(message);\n break;\n case \"debug\":\n console.debug(message);\n break;\n }\n },\n { level: environment !== \"prod\" ? \"debug\" : \"warn\" }\n );\n\n return ZenidWebSdk.clearLogListeners;\n }, []);\n\n useZenidEvent(\"loaded\", (event: any) => {\n if (event && event.detail && features.includes(event.detail.feature)) {\n const newLoadedFeatures = [...loadedFeatures, event.detail.feature];\n setLoadedFeatures(newLoadedFeatures);\n if (newLoadedFeatures.length == features.length) {\n onLoaded(newLoadedFeatures);\n }\n }\n });\n\n const initializeZenidFn: TaskEither = pipe(\n features,\n array.difference(eq.eqString)(loadedFeatures),\n nonEmptyArray.fromArray,\n option.fold(\n () => taskEither.fromIO(() => onLoaded(features)),\n newFeatures =>\n initializeZenid(\n tenant,\n isRemote,\n isPersonalProfile,\n newFeatures,\n exchangeTokenCommand,\n documentBlurAcceptableScore,\n specularAcceptableScore,\n timeToBlurMaxTolerance,\n useNewMobileIdUploadUx ? false : undefined,\n useNewMobileIdUploadUx ? false : undefined,\n models\n )\n )\n );\n\n if (autoInitialize && !initialized) {\n initializeZenidFn();\n setInitialized(true);\n }\n\n return {\n initializeZenid: initializeZenidFn,\n loadedFeatures: loadedFeatures,\n };\n};\n\nconst getLanguage = (\n language: APIParameters[\"language\"]\n): SupportedLanguage => {\n switch (language) {\n case \"cs\":\n return SupportedLanguages.Czech;\n case \"en\":\n return SupportedLanguages.English;\n case \"sk\":\n return SupportedLanguages.English;\n }\n};\n\nexport type CameraError = \"unavailable\" | \"disabled\" | \"generic\";\n\ntype UseCameraSettings = {\n cameraPreviewContainer: string;\n onError: (cameraError: CameraError) => unknown;\n} & (\n | {\n feature: Extract;\n acceptableInput: Option;\n }\n | {\n feature: Extract;\n acceptableInput?: never;\n }\n | {\n feature: Extract;\n acceptableInput?: never;\n }\n);\n\nconst ZenIDCameraError = t.type(\n {\n name: t.keyof(\n {\n CameraNotAllowedException: true,\n CameraNotFoundException: true,\n },\n \"CameraErrorName\"\n ),\n },\n \"CameraError\"\n);\n\nexport function useCamera(\n props: UseCameraSettings\n): {\n startCamera: TaskEither;\n stopCamera: () => unknown;\n isStartingCamera: boolean;\n feedback: Option;\n feedbackText: Option;\n} {\n const formatMessage = useFormatMessage();\n\n function isArrayOfDocumentAcceptable(documentCodes: DocumentCode[]) {\n return (acceptableInput: PossibleDocument[]): boolean =>\n pipe(\n acceptableInput,\n array.difference(\n eq.fromEquals(\n (a: PossibleDocument, b: PossibleDocument) =>\n a.DocumentCode === b.DocumentCode\n )\n )(\n pipe(\n documentCodes,\n array.map(dc => ({\n DocumentCode: dc,\n }))\n )\n )\n ).length === 0;\n }\n\n function formatFeedback(feedback: Feedback) {\n switch (feedback) {\n case Feedback.Ok:\n return formatMessage(\"Zenid.Feedback.ok\");\n case Feedback.NoMatchFound:\n return pipe(\n option.fromNullable(props.acceptableInput),\n option.flatten,\n option.map(acceptableInput => {\n if (\n \"documentCode\" in acceptableInput &&\n \"pageCode\" in acceptableInput\n ) {\n return formatMessage(\"Zenid.Feedback.noMatchFound.backIdCard\");\n } else if (\"PossibleDocuments\" in acceptableInput) {\n if (\n pipe(\n acceptableInput.PossibleDocuments,\n isArrayOfDocumentAcceptable(idCardCodesCZ)\n ) ||\n pipe(\n acceptableInput.PossibleDocuments,\n isArrayOfDocumentAcceptable(idCardCodesSK)\n )\n ) {\n return formatMessage(\"Zenid.Feedback.noMatchFound.frontIdCard\");\n } else if (\n pipe(\n acceptableInput.PossibleDocuments,\n isArrayOfDocumentAcceptable([\n ...idCardCodesSK,\n ...passportCodesCZ,\n ])\n ) ||\n pipe(\n acceptableInput.PossibleDocuments,\n isArrayOfDocumentAcceptable([\n ...idCardCodesCZ,\n ...passportCodesSK,\n ])\n )\n ) {\n return formatMessage(\n \"Zenid.Feedback.noMatchFound.primaryFront\"\n );\n } else if (\n pipe(\n acceptableInput.PossibleDocuments,\n isArrayOfDocumentAcceptable([\n ...passportCodesSK,\n ...drivingLicenseCodesSK,\n ...drivingLicenseCodesCZ,\n ])\n ) ||\n pipe(\n acceptableInput.PossibleDocuments,\n isArrayOfDocumentAcceptable([\n ...passportCodesCZ,\n ...drivingLicenseCodesCZ,\n ...drivingLicenseCodesSK,\n ])\n )\n ) {\n return formatMessage(\n \"Zenid.Feedback.noMatchFound.secondaryFront\"\n );\n } else if (\n pipe(\n acceptableInput.PossibleDocuments,\n isArrayOfDocumentAcceptable([\n ...drivingLicenseCodesSK,\n ...drivingLicenseCodesCZ,\n ])\n )\n ) {\n return formatMessage(\n \"Zenid.Feedback.noMatchFound.driverLicense\"\n );\n }\n }\n return formatMessage(\"Zenid.Feedback.noMatchFound\");\n }),\n option.getOrElse(\n constant(formatMessage(\"Zenid.Feedback.noMatchFound\"))\n )\n );\n case Feedback.AlignCard:\n return formatMessage(\"Zenid.Feedback.alignCard\");\n case Feedback.HoldSteady:\n return formatMessage(\"Zenid.Feedback.holdSteady\");\n case Feedback.Blurry:\n return formatMessage(\"Zenid.Feedback.blurry\");\n case Feedback.ReflectionPresent:\n return formatMessage(\"Zenid.Feedback.reflectionPresent\");\n case Feedback.Dark:\n return formatMessage(\"Zenid.Feedback.dark\");\n case Feedback.NoFaceFound:\n return formatMessage(\"Zenid.Feedback.noFaceFound\");\n case Feedback.MoveElsewhere:\n return formatMessage(\"Zenid.Feedback.moveElsewhere\");\n case Feedback.TiltLeftAndRight:\n return formatMessage(\"Zenid.Feedback.tiltLeftAndRight\");\n case Feedback.TiltUpAndDown:\n return formatMessage(\"Zenid.Feedback.tiltUpAndDown\");\n case Feedback.RotateClockwise:\n return formatMessage(\"Zenid.Feedback.rotateClockwise\");\n case Feedback.RotateCounterClockwise:\n return formatMessage(\"Zenid.Feedback.rotateCounterClockwise\");\n case Feedback.LookAtMe:\n return formatMessage(\"Zenid.Feedback.LookAtMe\");\n case Feedback.TurnHead:\n return formatMessage(\"Zenid.Feedback.TurnHead\");\n case Feedback.Smile:\n return formatMessage(\"Zenid.Feedback.Smile\");\n case Feedback.ConfirmingFace:\n return formatMessage(\"Zenid.Feedback.ConfirmingFace\");\n case Feedback.Center:\n return formatMessage(\"Zenid.Feedback.center\");\n case Feedback.HoldStill:\n return formatMessage(\"Zenid.Feedback.holdStill\");\n case Feedback.BadFaceAngle:\n return formatMessage(\"Zenid.Feedback.badFaceAngle\");\n case Feedback.Barcode:\n return formatMessage(\"Zenid.Feedback.Barcode\");\n default:\n return formatMessage(\"Zenid.Feedback.otherError\");\n }\n }\n\n const [isStartingCamera, setIsStartingCamera] = useState(false);\n const [feedback, setFeedback] = useState>(option.none);\n\n const stopCamera = () => {\n setIsStartingCamera(false);\n ZenidWebSdk.stopCamera();\n };\n\n const context = useAppContext();\n const settings = useMemo(\n () => ({\n language: getLanguage(context.apiParameters.language),\n videoTouchFromOutside: false,\n cutCenter: false,\n findGeneralPurposeCamera: true,\n cameraSelectionRules: \"auto\",\n acceptableInput:\n props.feature === \"selfie\" || props.feature === \"selfieVideo\"\n ? {}\n : pipe(props.acceptableInput, option.getOrElse(constant({}))),\n }),\n [props.feature, props.acceptableInput, context.apiParameters.language]\n );\n\n const startCamera = useMemo(() => {\n return pipe(\n taskEither.fromIO(() => setIsStartingCamera(true)),\n taskEither.chain(() =>\n taskEither.tryCatch(\n () =>\n ZenidWebSdk.startCamera(\n props.feature,\n `.${props.cameraPreviewContainer}`,\n settings\n ),\n flow(\n ZenIDCameraError.decode,\n either.map(\n (err): CameraError => {\n switch (err.name) {\n case \"CameraNotAllowedException\":\n return \"disabled\";\n case \"CameraNotFoundException\":\n return \"unavailable\";\n }\n }\n ),\n either.getOrElse(\n (e): CameraError => {\n console.log(\"ZenId error \", e);\n return \"generic\";\n }\n )\n )\n )\n ),\n taskEither.chain(() =>\n taskEither.fromIO(() => setIsStartingCamera(false))\n )\n );\n }, [props.feature, props.cameraPreviewContainer, settings]);\n\n useFeedbackEvent(feedback => {\n setFeedback(\n pipe(\n feedback,\n option.fromPredicate(feedback => feedback !== Feedback.Ok)\n )\n );\n if (isStartingCamera) {\n setIsStartingCamera(false);\n }\n });\n\n useEffect(() => {\n pipe(\n startCamera,\n taskEither.orElse(cameraError =>\n taskEither.leftIO(() => props.onError && props.onError(cameraError))\n )\n )();\n\n return stopCamera;\n }, [startCamera]);\n\n return {\n startCamera,\n stopCamera,\n isStartingCamera,\n feedback,\n feedbackText: pipe(feedback, option.map(formatFeedback)),\n };\n}\n\nexport interface UseSnapshot {\n (\n snapshotPreviewContainer: string,\n onSnapshot: (\n snapshotData: T,\n hasOtherSide?: T extends DocumentData ? boolean : never\n ) => unknown\n ): void;\n}\n\nexport const useDocumentSnapshot: UseSnapshot = (\n snapshotPreviewContainer,\n onSnapshot\n) => {\n const _onSnapshot = (event: any) => {\n const { pictureBlob, ...snapshot } = event.detail;\n const hasOtherSide: boolean = option.isSome(\n pipe(\n zenidModels,\n array.findFirst(\n model =>\n model.documentCode === snapshot.documentCode &&\n model.pageCode !== snapshot.pageCode\n )\n )\n );\n onSnapshot(\n {\n ...snapshot,\n blob: pictureBlob,\n },\n hasOtherSide\n );\n ZenidWebSdk.stopCamera();\n ZenidWebSdk.setSnapshotPreview(`.${snapshotPreviewContainer}`);\n };\n\n useZenidEvent(\"snapshot\", _onSnapshot);\n};\n\nexport const useSelfieSnapshot: UseSnapshot = (\n snapshotPreviewContainer,\n onSnapshot\n) => {\n const _onSnapshot = (event: any) => {\n const { pictureBlob, ...snapshot } = event.detail;\n onSnapshot({\n ...snapshot,\n blob: pictureBlob,\n });\n ZenidWebSdk.stopCamera();\n ZenidWebSdk.setSnapshotPreview(`.${snapshotPreviewContainer}`);\n };\n\n useZenidEvent(\"snapshot\", _onSnapshot);\n};\n\nexport const useVideo = (onVideo: (video: DocumentData) => unknown) => {\n const [isRecording, setIsRecording] = useState(false);\n const [videoChunks, setVideoChunks] = useState>([]);\n\n const finishRecording = () => {\n if (ZenidWebSdk.isRecording()) {\n ZenidWebSdk.finishRecording();\n ZenidWebSdk.stopCamera();\n setIsRecording(false);\n }\n };\n\n const onVideoChunk = (event: any) => {\n switch (event.detail.videoStatus) {\n case \"started\":\n setVideoChunks([]);\n return;\n case \"running\":\n setVideoChunks([...videoChunks, event.detail.videoStreamChunk]);\n return;\n case \"finished\":\n onVideo({\n ...event.detail,\n blob: new Blob(videoChunks, { type: \"video/webm\" }),\n });\n setVideoChunks([]);\n return;\n }\n };\n\n useFeedbackEvent(feedback => {\n if (\n !ZenidWebSdk.isRecording() &&\n feedback > Feedback.NoMatchFound &&\n !videoChunks.length\n ) {\n ZenidWebSdk.startRecording();\n setIsRecording(true);\n }\n });\n\n useZenidEvent(\"videoChunk\", onVideoChunk);\n\n useZenidEvent(\"snapshot\", finishRecording);\n\n return {\n finishRecording,\n isRecording,\n };\n};\n\nexport const useFeedbackEvent = (handler: (feedback: Feedback) => void) => {\n useEvent(ZenidWebSdk.events.feedback, event => {\n pipe(\n event.detail,\n FeedbackEvent.decode,\n either.fold(\n errors => {\n console.warn(\n `Invalid feedback event provided: ${failure(errors).join(\"\\n\")}`\n );\n },\n payload => handler(payload.feedback)\n )\n );\n });\n};\n\nexport const useZenidEvent = (\n event: keyof Events,\n handler: (event: unknown) => void\n) => {\n useEvent(ZenidWebSdk.events[event], handler);\n};\n\nexport type AcquiredDocument = {\n _tag: \"Document\";\n blob: Blob;\n documentCode: DocumentCode;\n pageCode: PageCode;\n hasOtherSide: boolean;\n signature: string;\n};\n\nexport type AcquiredDocumentVideo = {\n _tag: \"DocumentVideo\";\n blob: Blob;\n documentCode: DocumentCode;\n pageCode: PageCode;\n signature: string;\n};\n\nexport type AcquiredSelfie = {\n _tag: \"Selfie\";\n blob: Blob;\n signature: string;\n};\n\nexport type AcquiredSelfieVideo = {\n _tag: \"SelfieVideo\";\n blob: Blob;\n signature: string;\n};\n\nexport type AcquiredData =\n | AcquiredDocument\n | AcquiredDocumentVideo\n | AcquiredSelfie\n | AcquiredSelfieVideo;\n\nexport function acquiredDocument>(\n data: A\n): AcquiredDocument {\n return { _tag: \"Document\", ...data };\n}\n\nexport function acquiredDocumentVideo<\n A extends Omit\n>(data: A): AcquiredDocumentVideo {\n return { _tag: \"DocumentVideo\", ...data };\n}\n\nexport function acquiredSelfie>(\n data: A\n): AcquiredSelfie {\n return { _tag: \"Selfie\", ...data };\n}\n\nexport function acquiredSelfieVideo<\n A extends Omit\n>(data: A): AcquiredSelfieVideo {\n return { _tag: \"SelfieVideo\", ...data };\n}\n\nexport function isAcquiredDocument(\n document: AcquiredData\n): document is AcquiredDocument {\n return document._tag === \"Document\";\n}\n\nexport function isAcquiredVideo(\n document: AcquiredData\n): document is AcquiredDocumentVideo {\n return document._tag === \"DocumentVideo\";\n}\n\nexport function isAcquiredSelfie(\n document: AcquiredData\n): document is AcquiredSelfie {\n return document._tag === \"Selfie\";\n}\n\nexport function isAcquiredSelfieVideo(\n document: AcquiredData\n): document is AcquiredSelfieVideo {\n return document._tag === \"SelfieVideo\";\n}\n","import { useState } from \"react\";\nimport { option } from \"fp-ts\";\nimport { ScannedDocument } from \"./domain\";\nimport { useFormatMessage } from \"../intl\";\nimport { ScanDocument } from \"./ScanDocument\";\nimport { TaskEither } from \"fp-ts/TaskEither\";\nimport { Body, Box, Dialog, ErrorBanner, Space } from \"design-system\";\n\ntype Props = {\n _mockScanner: boolean;\n onDocumentAcquired: (\n scannedDocument: ScannedDocument\n ) => TaskEither;\n onDismiss: () => unknown;\n};\n\nexport function GenericDocumentScanDialog(props: Props) {\n const formatMessage = useFormatMessage();\n\n const [hasError, setHasError] = useState(false);\n\n return (\n \n \n \n {formatMessage(\n \"Identification.UploadDocuments.scanner.customScanDescription\"\n )}\n \n \n \n \n setHasError(false)}\n documentPurpose={option.none}\n documentDetails={option.none}\n />\n \n {hasError && (\n \n {formatMessage(\"Identification.UploadDocuments.genericError\")}\n \n )}\n \n );\n}\n","import { ComponentProps, useEffect, useState } from \"react\";\nimport { useCommand, usePollingEffect } from \"../useAPI\";\nimport * as uploadApi from \"./api\";\nimport {\n Button,\n Banner,\n Box,\n Body,\n Space,\n ErrorBanner,\n MobileUploadIDIcon,\n MobileIcon,\n MobileConnectionOKIcon,\n MobileConnectionKOIcon,\n Dialog,\n AlertDialog,\n ProblemIcon,\n} from \"design-system\";\nimport {\n constant,\n constNull,\n constTrue,\n constVoid,\n pipe,\n} from \"fp-ts/function\";\nimport { taskEither } from \"fp-ts\";\nimport { useFormatMessage } from \"../intl\";\nimport * as option from \"fp-ts/Option\";\nimport { Option } from \"fp-ts/Option\";\nimport { CoApplicantInput, DocumentIdentificationFlow } from \"../globalDomain\";\nimport { Task } from \"fp-ts/Task\";\nimport { DocumentToUploadDetail, LinkPurpose } from \"./domain\";\nimport { MobileFlowType, MobileRecipientOptionType } from \"./state\";\nimport { foldMobileFlowType } from \"./utils\";\n\ntype Props = {\n flowType: MobileFlowType;\n recipient: MobileRecipientOptionType;\n onDismiss: () => unknown;\n onMaxAttemptsReached: () => unknown;\n onUploadCompleted: Task;\n documentIdentificationFlow: DocumentIdentificationFlow;\n documentToUploadDetails: Option;\n} & CoApplicantInput;\n\ninterface WaitingForConnectionStage {\n name: \"WaitingForConnection\";\n attemptsBannerMessage: Option<\"LastLink\">;\n resendLinkTimeout: Option;\n hasSentLinkError: boolean;\n hasSentLink: boolean;\n}\n\ninterface MobileConnectedStage {\n name: \"MobileConnected\";\n}\n\ninterface UploadInProgressStage {\n name: \"UploadInProgress\";\n}\n\ninterface ConnectionLostStage {\n name: \"ConnectionLost\";\n}\n\ninterface IsCancellingProcessStage {\n name: \"IsCancellingProcess\";\n last_stage: MobileModalStage;\n}\n\ninterface MaxAttemptsReached {\n name: \"MaxAttemptsReached\";\n}\n\ntype MobileModalStage =\n | WaitingForConnectionStage\n | MobileConnectedStage\n | UploadInProgressStage\n | ConnectionLostStage\n | IsCancellingProcessStage\n | MaxAttemptsReached;\n\nconst RESEND_LINK_TIMEOUT = 60000;\n\nfunction foldStage(\n stage: MobileModalStage,\n match: {\n whenWaitingForConnection: (stage: WaitingForConnectionStage) => T;\n whenMobileConnected: (stage: MobileConnectedStage) => T;\n whenUploadInProgress: (stage: UploadInProgressStage) => T;\n whenConnectionLost: (stage: ConnectionLostStage) => T;\n whenCancellingProcess: (stage: IsCancellingProcessStage) => T;\n whenMaxAttemptsReached: (stage: MaxAttemptsReached) => T;\n }\n) {\n switch (stage.name) {\n case \"WaitingForConnection\":\n return match.whenWaitingForConnection(stage);\n case \"MobileConnected\":\n return match.whenMobileConnected(stage);\n case \"UploadInProgress\":\n return match.whenUploadInProgress(stage);\n case \"ConnectionLost\":\n return match.whenConnectionLost(stage);\n case \"IsCancellingProcess\":\n return match.whenCancellingProcess(stage);\n case \"MaxAttemptsReached\":\n return match.whenMaxAttemptsReached(stage);\n }\n}\n\nfunction shouldUpdate(stage: MobileModalStage): boolean {\n return foldStage(stage, {\n whenWaitingForConnection: () => false,\n whenMobileConnected: () => false,\n whenUploadInProgress: () => false,\n whenConnectionLost: () => false,\n whenCancellingProcess: () => true,\n whenMaxAttemptsReached: () => true,\n });\n}\n\nconst initialMobileModalStage: MobileModalStage = {\n name: \"WaitingForConnection\",\n attemptsBannerMessage: option.none,\n resendLinkTimeout: option.none,\n hasSentLinkError: false,\n hasSentLink: false,\n};\n\nexport function MobileUploadStatusDialog(props: Props) {\n const formatMessage = useFormatMessage();\n const sendLink = useCommand(uploadApi.sendMobileLink);\n const cancelProcess = useCommand(uploadApi.cancelProcess);\n\n const [stage, setStage] = useState(initialMobileModalStage);\n\n function transition(\n getNextStage: (currentStage: MobileModalStage) => MobileModalStage\n ): void {\n setStage(currentStage => {\n const nextStage = getNextStage(currentStage);\n\n if (currentStage.name !== nextStage.name) {\n if (\n currentStage.name === \"WaitingForConnection\" &&\n nextStage.name !== \"WaitingForConnection\" &&\n option.isSome(currentStage.resendLinkTimeout)\n ) {\n clearTimeout(currentStage.resendLinkTimeout.value);\n }\n }\n\n if (shouldUpdate(currentStage)) {\n return { ...currentStage, last_stage: nextStage };\n } else {\n return nextStage;\n }\n });\n }\n\n const onSendLink = (isFirstTime: boolean) => {\n if (stage.name !== \"WaitingForConnection\") {\n return;\n }\n\n pipe(\n sendLink({\n recipient: props.recipient.key,\n linkPurpose: foldMobileFlowType(props.flowType, {\n DocumentUpload: constant(\"mobileIdUpload\"),\n SelfieFraudCheck: constant(\"selfieFraudCheck\"),\n HologramFraudCheck: constant(\"hologramFraudCheck\"),\n HologramAndSelfieFraudCheck: constant(\"hologramAndSelfieFraudCheck\"),\n ProofOfIncome: constant(\"proofOfIncome\"),\n }),\n idType: props.documentIdentificationFlow,\n coApplicant: props.coApplicant,\n parameters: {\n countryCode: option.isSome(props.documentToUploadDetails)\n ? option.some(\n props.documentToUploadDetails.value.country.countryCode\n )\n : option.none,\n documentType: option.isSome(props.documentToUploadDetails)\n ? props.documentToUploadDetails.value.type\n : option.none,\n },\n }),\n taskEither.bimap(\n error => {\n if (error.id !== \"MaxLinksAttemptsReached\") {\n transition(stage => ({\n ...stage,\n hasSentLinkError: true,\n hasSentLink: false,\n }));\n\n return;\n }\n setStage({ name: \"MaxAttemptsReached\" });\n props.onMaxAttemptsReached();\n },\n ({ attemptsLeft }) => {\n transition(stage =>\n stage.name !== \"WaitingForConnection\"\n ? stage\n : {\n ...stage,\n hasSentLinkError: false,\n hasSentLink: true,\n attemptsBannerMessage:\n attemptsLeft === 0 ? option.some(\"LastLink\") : option.none,\n resendLinkTimeout: isFirstTime\n ? option.none\n : option.some(\n window.setTimeout(\n () =>\n transition(stage =>\n stage.name !== \"WaitingForConnection\"\n ? stage\n : {\n ...stage,\n resendLinkTimeout: option.none,\n }\n ),\n RESEND_LINK_TIMEOUT\n )\n ),\n }\n );\n }\n )\n )();\n };\n\n const onCancellingProcess = (\n old_stage: Exclude\n ) => () => {\n transition(() => ({\n name: \"IsCancellingProcess\",\n last_stage: old_stage,\n }));\n };\n\n const onCancelProcess = () =>\n pipe(\n cancelProcess(),\n taskEither.bimap(\n () =>\n transition(() => ({\n name: \"ConnectionLost\",\n })),\n () => props.onDismiss()\n )\n )();\n usePollingEffect(\n uploadApi.mobileStatus,\n {\n disabled: stage.name === \"WaitingForConnection\" && !stage.hasSentLink,\n intervalMS: 5000,\n shouldPollingContinue: constTrue,\n onError: () => transition(() => ({ name: \"ConnectionLost\" })),\n onSuccess: ({ status }) => {\n if (status === \"WaitingForConnection\") {\n transition(stage =>\n stage.name === \"WaitingForConnection\"\n ? stage\n : initialMobileModalStage\n );\n } else if (\n status === \"UploadCompleted\" ||\n status === \"MustEditData\" ||\n status === \"VerificationCompleted\"\n ) {\n props.onUploadCompleted();\n } else {\n transition(() => ({ name: status }));\n }\n },\n },\n { coApplicant: props.coApplicant }\n );\n\n useEffect(() => {\n if (stage.name === \"WaitingForConnection\") {\n onSendLink(true);\n }\n }, []);\n\n const modalTitle = foldStage(stage, {\n whenWaitingForConnection: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.waitingTitle\"\n ),\n whenMobileConnected: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.connectedTitle\"\n ),\n whenUploadInProgress: () =>\n formatMessage(\n foldMobileFlowType(props.flowType, {\n DocumentUpload: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingTitle\"\n ),\n ProofOfIncome: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingProofOfIncomeTitle\"\n ),\n SelfieFraudCheck: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingSelfieCheckTitle\"\n ),\n HologramFraudCheck: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingFraudCheckTitle\"\n ),\n HologramAndSelfieFraudCheck: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingFraudCheckTitle\"\n ),\n })\n ),\n whenConnectionLost: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.errorTitle\"\n ),\n whenCancellingProcess: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.exitingTitle\"\n ),\n whenMaxAttemptsReached: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.maxAttemptsLimitErrorTitle\"\n ),\n });\n\n const modalContent = foldStage(stage, {\n whenWaitingForConnection: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.waitingDescription\",\n { phoneNumber: props.recipient.phoneNumber }\n ),\n whenMobileConnected: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.connectedDescription\"\n ),\n whenUploadInProgress: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingDescription\"\n ),\n whenConnectionLost: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.errorDescription\"\n ),\n whenCancellingProcess: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.exitingDescription\"\n ),\n whenMaxAttemptsReached: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.maxAttemptsLimitError\"\n ),\n });\n\n const transitionToCancelling = (stage: MobileModalStage) => {\n if (stage.name !== \"IsCancellingProcess\") {\n return onCancellingProcess(stage);\n } else {\n return constVoid;\n }\n };\n\n const recoverFromCancelling = (cancellingStage: IsCancellingProcessStage) => {\n setStage(cancellingStage.last_stage);\n };\n\n const banner = (\n \n );\n\n const icon = foldStage(stage, {\n whenWaitingForConnection: constant(MobileIcon),\n whenMobileConnected: constant(MobileConnectionOKIcon),\n whenUploadInProgress: constant(MobileUploadIDIcon),\n whenConnectionLost: constant(MobileConnectionKOIcon),\n whenCancellingProcess: constant(MobileIcon), // TODO(gabro): double check this\n whenMaxAttemptsReached: constant(ProblemIcon),\n });\n\n const optionalBanner = foldStage(stage, {\n whenWaitingForConnection: () => option.some(banner),\n whenMobileConnected: () => option.some(banner),\n whenUploadInProgress: () => option.some(banner),\n whenConnectionLost: () => option.none,\n whenCancellingProcess: () => option.none,\n whenMaxAttemptsReached: () => option.none,\n });\n\n const cancelAction = {\n variant: \"text\",\n action: transitionToCancelling(stage),\n label: formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.cancelAction\"\n ),\n } as const;\n\n const actions = foldStage[\"actions\"]>(stage, {\n whenWaitingForConnection: constant([]),\n whenMobileConnected: constant([cancelAction]),\n whenUploadInProgress: constant([cancelAction]),\n whenConnectionLost: constant([\n {\n variant: \"primary\",\n action: props.onDismiss,\n label: formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.closeAction\"\n ),\n },\n ]),\n // these are handled separately, see below\n whenCancellingProcess: constant([]),\n whenMaxAttemptsReached: constant([\n {\n variant: \"primary\",\n action: props.onDismiss,\n label: formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.closeAction\"\n ),\n },\n ]),\n });\n\n const bottomContent = foldStage(stage, {\n whenWaitingForConnection: stage =>\n option.some(\n <>\n \n \n {formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.waitingResendLabel\"\n )}\n \n \n onSendLink(false)}\n label={formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.waitingResendAction\"\n )}\n disabled={option.isSome(stage.resendLinkTimeout)}\n />\n \n \n {option.isSome(stage.resendLinkTimeout) &&\n !pipe(\n stage.attemptsBannerMessage,\n option.exists(\n attemptsBannerMessage => attemptsBannerMessage === \"LastLink\"\n )\n ) ? (\n \n ) : null}\n {pipe(\n stage.attemptsBannerMessage,\n option.fold(constNull, attemptsBannerMessage => {\n switch (attemptsBannerMessage) {\n case \"LastLink\":\n return (\n <>\n \n \n \n );\n }\n })\n )}\n {stage.hasSentLinkError ? (\n \n {formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.genericError\"\n )}\n \n ) : null}\n \n ),\n whenMobileConnected: () => option.none,\n whenUploadInProgress: () => option.none,\n whenConnectionLost: () => option.none,\n whenCancellingProcess: () => option.none,\n whenMaxAttemptsReached: () => option.none,\n });\n\n switch (stage.name) {\n case \"IsCancellingProcess\":\n return (\n recoverFromCancelling(stage)}\n onCancel={() => recoverFromCancelling(stage)}\n confirmLabel={formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.exitingConfirmation\"\n )}\n onConfirm={onCancelProcess}\n />\n );\n case \"MaxAttemptsReached\":\n case \"WaitingForConnection\":\n case \"MobileConnected\":\n case \"ConnectionLost\":\n case \"UploadInProgress\":\n return (\n \n {pipe(optionalBanner, option.toNullable)}\n \n {pipe(bottomContent, option.toNullable)}\n \n );\n }\n}\n","import { useFormatMessage } from \"../../../intl\";\nimport { useAppContext } from \"../../../useAppContext\";\nimport { useIsRemoteChannel } from \"../../../useChannel\";\nimport { Body, Box, LocalizedString, SelfieIcon, Space } from \"design-system\";\nimport * as classes from \"../../UploadId.treat\";\nimport { pipe } from \"fp-ts/function\";\nimport { option } from \"fp-ts\";\nimport { DocumentObject } from \"../../domain\";\nimport {\n DocumentIdentificationFlow,\n foldTenant,\n UploadDocumentFlowType,\n} from \"../../../globalDomain\";\nimport IdCardImage_SK from \"../../idcard_sk.png\";\nimport Passport_CZ from \"../../passport_cz.png\";\nimport IdCardImage_CZ from \"../../idcard_cz.png\";\nimport Passport_SK from \"../../passport_sk.png\";\nimport DrivingLicense_SK from \"../../drivinglicense_sk.png\";\nimport DrivingLicense_CZ from \"../../drivinglicense_cz.png\";\nimport { formatDocumentType } from \"../../utils\";\nimport { Option } from \"fp-ts/Option\";\n\nexport type Props = {\n hasPrimaryDocuments: boolean;\n hasSecondaryDocuments: boolean;\n productType: Option;\n documentIdentificationFlow: DocumentIdentificationFlow;\n};\n\nexport function MobileRequiredDocuments(props: Props) {\n const formatMessage = useFormatMessage();\n const {\n apiParameters: { tenant, channel },\n } = useAppContext();\n const isRemote = useIsRemoteChannel();\n\n const DocumentCard = ({\n src,\n message,\n }: {\n src: string;\n message: LocalizedString;\n }) => {\n return (\n \n \n {message}\n \n \n \n \n {message}\n \n \n \n );\n };\n\n const DocumentCardSelfie = () => {\n return (\n \n \n \n \n \n \n \n {formatMessage(\n \"Identification.UploadDocuments.step1.validDocuments.Selfie\"\n )}\n \n \n \n );\n };\n\n const isPersonalProfile = pipe(\n props.productType,\n option.exists(value => value === \"PersonalProfile\")\n );\n\n const primaryDocumentsImages: DocumentObject[] = foldTenant(\n tenant,\n () =>\n isRemote && !isPersonalProfile\n ? [{ src: IdCardImage_SK, type: \"IDCard\" }]\n : [\n { src: IdCardImage_SK, type: \"IDCard\" },\n { src: Passport_CZ, type: \"Passport\" },\n ],\n () =>\n (isRemote || channel === \"TLS_Remote\") && !isPersonalProfile\n ? [{ src: IdCardImage_CZ, type: \"IDCard\" }]\n : [\n { src: IdCardImage_CZ, type: \"IDCard\" },\n { src: Passport_SK, type: \"Passport\" },\n ]\n );\n\n const secondaryDocumentsImages: DocumentObject[] = foldTenant(\n tenant,\n () =>\n !isPersonalProfile\n ? []\n : [\n { src: DrivingLicense_SK, type: \"DrivingLicenseSK\" },\n { src: Passport_SK, type: \"Passport\" },\n { src: DrivingLicense_CZ, type: \"DrivingLicenseCZ\" },\n ],\n () =>\n isPersonalProfile\n ? [\n { src: DrivingLicense_CZ, type: \"DrivingLicenseCZ\" },\n { src: Passport_CZ, type: \"Passport\" },\n { src: DrivingLicense_SK, type: \"DrivingLicenseSK\" },\n ]\n : isRemote || channel === \"TLS_Remote\"\n ? [\n { src: DrivingLicense_CZ, type: \"DrivingLicenseCZ\" },\n { src: Passport_CZ, type: \"Passport\" },\n ]\n : []\n );\n\n const primary = (\n \n );\n const showSecondaryImage =\n props.hasSecondaryDocuments ||\n props.documentIdentificationFlow === \"PrimaryAndLivenessCheck\";\n const secondary = () =>\n props.documentIdentificationFlow === \"PrimaryAndLivenessCheck\" ? (\n \n ) : (\n \n );\n\n return (\n <>\n {props.hasPrimaryDocuments && primary}\n {showSecondaryImage && (\n <>\n \n {secondary()}\n \n )}\n \n );\n}\n","import { RadioGroupField, unsafeLocalizedString } from \"design-system\";\nimport { option } from \"fp-ts\";\nimport { useFormatMessage } from \"../intl\";\nimport { constant, pipe } from \"fp-ts/function\";\n\ntype Props = {\n type: \"upload\" | \"digital\";\n setType: (type: \"upload\" | \"digital\") => unknown;\n};\n\nexport function DocumentDigitalIdSwitch(props: Props) {\n const formatMessage = useFormatMessage();\n\n return (\n v.toString()}\n isOptionDisabled={() => false}\n renderOption={v =>\n v === \"upload\"\n ? formatMessage(\"Identification.UploadDocuments.title\")\n : formatMessage(\"Identification.DigitalId.title\")\n }\n options={[\"upload\", \"digital\"]}\n label={unsafeLocalizedString(\"\")}\n issues={option.none}\n name=\"digitalIdSwitch\"\n onBlur={() => {}}\n onChange={v =>\n pipe(\n v,\n option.fold(\n () => {},\n t => props.setType(t as \"upload\" | \"digital\")\n )\n )\n }\n value={option.some(props.type)}\n />\n );\n}\n","import \"!../../../../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js!css-loader?{\\\"modules\\\":false,\\\"url\\\":false}!./MobileIdUpload2.treat.2DY77Q3.css\";\nexport var preview = 'ElSoB';\nexport var blackVideoCover = '_26WQe';\nexport var feedbackContainer = '_36Tma';\nexport var feedbackContainerSelfie = '_1HYn5';\nexport var translucidCard = '_2IOJu';\nexport var feedbackConstainerSelfie = '_3oAtl';\nexport var divider = '_3toqr';\nexport var negativeFeedbackPopup = '_2x2GM';\nexport var negativeResultPopup = '_1z81_';\nexport var landscapeInfoBanner = '_1m_iW';\nexport var cameraPreview = '_4cBmC';\nexport var cameraPreviewSelfie = '_2HaaQ';\nexport var cameraHolder = '_2qike';\nexport var successIcon = '_1m0L4';\nexport var successMask = '_3cjlN';\nexport var cameraPreviewMask = '_3MhTV';\nexport var snapshotPreview = '_2zEm4';\nexport var infoButton = '_2gVRx';\nexport var loaderContainer = '_19roz';\nexport var helplineSupportContainer = '_2lr9j';","import { forwardRef, useState } from \"react\";\nimport {\n BiometricIcon,\n Body,\n Box,\n Button,\n Heading,\n InlineMessage,\n RadioGroup,\n Space,\n Stack,\n Banner,\n useIsMobileLayout,\n} from \"design-system\";\nimport { palette } from \"design-system/lib/styleConstants\";\nimport { boolean, option } from \"fp-ts\";\nimport { constant, constFalse, identity, pipe } from \"fp-ts/function\";\nimport { Option } from \"fp-ts/Option\";\nimport { useFormatMessage } from \"../intl\";\nimport { BiometricConsentInfoDialog } from \"./BiometricConsentInfoDialog\";\n\ntype Props = {\n haveErrors: boolean;\n biometricConsent: Option;\n onBiometricConsent: (state: Option) => unknown;\n isRadioDisabled: boolean;\n mustGiveConsent: boolean;\n};\nexport const BiometricConsent = forwardRef((props, ref) => {\n const formatMessage = useFormatMessage();\n\n const [moreInfoModalOpen, setMoreInfoModalOpen] = useState(false);\n\n const isMobileLayout = useIsMobileLayout();\n\n const handleBiometricConsent = (consent: Option) => {\n if (option.isNone(consent)) {\n return;\n }\n props.onBiometricConsent(consent);\n };\n\n const isInfoBannerVisible = pipe(\n props.biometricConsent,\n option.fold(\n () => false,\n consent => !consent\n )\n );\n\n const shouldBlockUser = pipe(\n props.biometricConsent,\n option.fold(constFalse, consent => !consent && props.mustGiveConsent)\n );\n\n const heading = (\n \n {formatMessage(\"Identification.UploadDocuments.biometricData.title\")}\n \n );\n\n const description = (\n \n {formatMessage(\n \"Identification.UploadDocuments.biometricData.description\"\n )}\n \n );\n\n const radioGroup = (\n props.isRadioDisabled}\n isOptionRecommended={identity}\n recommendedLabel={formatMessage(\n \"Identification.UploadDocuments.biometricData.optionLabel.recommended\"\n )}\n issuesType={props.haveErrors ? option.some(\"error\") : option.none}\n optionKey={value => value.toString()}\n renderOptionChildren={constant(option.none)}\n renderOption={boolean.fold(\n () =>\n formatMessage(\n \"Identification.UploadDocuments.biometricData.optionLabel.no\"\n ),\n () =>\n formatMessage(\n \"Identification.UploadDocuments.biometricData.optionLabel.yes\"\n )\n )}\n />\n );\n\n const banner = isInfoBannerVisible && !shouldBlockUser && (\n \n );\n\n const blockUserError = shouldBlockUser && (\n <>\n \n \n \n );\n\n const errorMessage = props.haveErrors && (\n \n );\n\n const mobileLayout = (\n <>\n {heading}\n \n {description}\n \n {radioGroup}\n {banner}\n {errorMessage}\n {blockUserError}\n \n );\n\n const desktopLayout = (\n <>\n {moreInfoModalOpen && (\n setMoreInfoModalOpen(false)}\n />\n )}\n \n {heading}\n setMoreInfoModalOpen(true)}\n />\n \n \n \n \n \n {description}\n {radioGroup}\n {banner}\n {errorMessage}\n {blockUserError}\n \n \n \n );\n\n return isMobileLayout ? mobileLayout : desktopLayout;\n});\n","import \"!../../../../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js!css-loader?{\\\"modules\\\":false,\\\"url\\\":false}!./TakePhoto.treat.1TiZv4F.css\";\nexport var captureButton = 'rskIS';\nexport var captureButtonInside = '_2ihLF';\nexport var webcam = '_3Se2Q';","import { useState } from \"react\";\nimport { Option } from \"fp-ts/Option\";\nimport {\n LocalizedString,\n Box,\n Button,\n Heading,\n FileIcon,\n FieldIssues,\n Launcher,\n Stack,\n FieldProps,\n} from \"design-system\";\nimport { useFormatMessage } from \"../intl\";\nimport { option, task, taskEither } from \"fp-ts\";\nimport { constant, constNull, pipe } from \"fp-ts/function\";\nimport { FileImageDialog } from \"../Common/Dialogs/FileImageDialog\";\nimport { ScannedDocument } from \"./domain\";\nimport { GenericDocumentScanDialog } from \"./GenericDocumentScanDialog\";\nimport { UploadModeDialog } from \"./UploadModeDialog\";\nimport { UploadModeDialogWithMobile } from \"./UploadModeDialogWithMobile\";\nimport { useAppContext } from \"../useAppContext\";\nimport { UploadMode } from \"./state\";\nimport { CoApplicantInput } from \"../globalDomain\";\n\ntype Props = FieldProps> & {\n id?: string;\n label: LocalizedString;\n disableMobileUpload?: boolean;\n} & CoApplicantInput;\n\ntype ScanStep =\n | { id: \"Ready\" }\n | { id: \"ChooseMode\" }\n | { id: \"Scanning\"; mode: UploadMode };\n\nfunction foldScanStep(\n scanStep: ScanStep,\n match: {\n whenReady: () => T;\n whenChooseMode: () => T;\n whenScanning: (mode: UploadMode) => T;\n }\n) {\n switch (scanStep.id) {\n case \"Ready\":\n return match.whenReady();\n case \"ChooseMode\":\n return match.whenChooseMode();\n case \"Scanning\":\n return match.whenScanning(scanStep.mode);\n }\n}\n\nexport function DocumentUploadField(props: Props) {\n const formatMessage = useFormatMessage();\n\n const {\n config: { externalCommunication },\n } = useAppContext();\n\n const [scanStep, setScanStep] = useState({ id: \"Ready\" });\n const [isContentModalOpen, setIsContentModalOpen] = useState(false);\n\n const onDocumentAcquired = (scannedDocument: ScannedDocument) => {\n setScanStep({ id: \"Ready\" });\n props.onChange(\n pipe(\n scannedDocument,\n option.fromPredicate(scannedDocument => Boolean(scannedDocument.base64))\n )\n );\n };\n\n const onUploadModalConfirm = ({ mode }: { mode: UploadMode }) =>\n setScanStep({ id: \"Scanning\", mode });\n\n const onUploadModalDismiss = () => setScanStep({ id: \"Ready\" });\n\n const launcherOrDocument = pipe(\n props.value,\n option.fold(\n () => (\n setScanStep({ id: \"ChooseMode\" })}\n icon={FileIcon}\n />\n ),\n () => (\n \n \n {props.label}\n \n \n props.onChange(option.none)}\n disabled={props.disabled}\n />\n \n \n )\n )\n );\n\n return (\n \n {launcherOrDocument}\n {foldScanStep(scanStep, {\n whenReady: constNull,\n whenChooseMode: () =>\n externalCommunication && !props.disableMobileUpload ? (\n \n ) : (\n \n ),\n whenScanning: (mode: UploadMode) => {\n switch (mode) {\n case \"Scanner\":\n case \"_MockScanner\":\n return (\n \n taskEither.fromTask(\n task.fromIO(() => onDocumentAcquired(scannedDocument))\n )\n }\n onDismiss={() => setScanStep({ id: \"Ready\" })}\n />\n );\n case \"Mobile\":\n return null;\n }\n },\n })}\n {isContentModalOpen && (\n v.base64),\n taskEither.fromOption(constant(\"MissingDocument\"))\n )}\n title={props.label}\n onDismiss={() => setIsContentModalOpen(false)}\n fileName={props.label}\n />\n )}\n {pipe(\n props.issues,\n option.map(issues => ),\n option.toNullable\n )}\n \n );\n}\n","import { useRef, useCallback } from \"react\";\nimport Webcam from \"react-webcam\";\nimport { Box } from \"design-system\";\nimport * as classes from \"./TakePhoto.treat\";\n\ntype Props = {\n onContinue: (imgSource: string) => void;\n};\n\nexport const TakePhoto = (props: Props) => {\n const videoConstraints = {\n width: { ideal: 1920 },\n height: { ideal: 1080 },\n facingMode: { ideal: \"environment\" },\n };\n\n const webcamRef = useRef(null);\n\n const capture = useCallback(() => {\n if (webcamRef.current) {\n const imageSrc = webcamRef.current.getScreenshot();\n if (imageSrc) props.onContinue(imageSrc);\n }\n }, [webcamRef]);\n\n // TODO @Mirel: check why TakePhoto.treat.ts is not applied correctly\n\n return (\n <>\n \n console.log(\"success\", media)}\n onUserMediaError={mediaStreamError =>\n console.log(\"error\", mediaStreamError)\n }\n />\n \n \n \n \n \n );\n};\n","import \"!../../../../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js!css-loader?{\\\"modules\\\":false,\\\"url\\\":false}!./ConfirmPhoto.treat.yUwv9ub.css\";\nexport var container = '_2Ew1m';\nexport var imgWrapper = '_3NojU';","import {\n Box,\n Heading,\n Space,\n Button,\n Body,\n Children,\n LocalizedString,\n} from \"design-system\";\nimport { useFormatMessage } from \"../../intl\";\nimport { Option } from \"fp-ts/Option\";\nimport { constUndefined, pipe } from \"fp-ts/function\";\nimport { option } from \"fp-ts\";\nimport { StickyBottomContainer } from \"./StickyBottomContainer\";\n\ntype Props = {\n onContinue: () => unknown;\n title: LocalizedString;\n subtitle: Option;\n children: Children;\n};\n\nexport function StartProcess(props: Props) {\n const formatMessage = useFormatMessage();\n\n return (\n \n \n {props.title}\n \n \n\n {pipe(\n props.subtitle,\n option.fold(constUndefined, subtitle => (\n \n {subtitle}\n \n ))\n )}\n\n \n {props.children}\n \n \n \n \n \n );\n}\n","import {\n Box,\n Space,\n Body,\n ErrorIcon,\n SuccessIcon,\n Panel,\n Heading,\n Stack,\n UnorderedList,\n LocalizedString,\n useIsMobileLayout,\n} from \"design-system\";\nimport { palette } from \"design-system/lib/styleConstants\";\nimport { useFormatMessage } from \"../../intl\";\n\nimport czPrimaryDarkImage from \"./czPrimaryDark.png\";\nimport czPrimaryGlareImage from \"./czPrimaryGlare.png\";\nimport czPrimaryImage from \"./czPrimary.png\";\n\nimport czSecondaryDarkImage from \"./czSecondaryDark.png\";\nimport czSecondaryGlareImage from \"./czSecondaryGlare.png\";\nimport czSecondaryImage from \"./czSecondary.png\";\n\nimport skPrimaryDarkImage from \"./skPrimaryDark.png\";\nimport skPrimaryGlareImage from \"./skPrimaryGlare.png\";\nimport skPrimaryImage from \"./skPrimary.png\";\n\nimport skSecondaryDarkImage from \"./skSecondaryDark.png\";\nimport skSecondaryGlareImage from \"./skSecondaryGlare.png\";\nimport skSecondaryImage from \"./skSecondary.png\";\n\nimport livenesscheckOkImage from \"./livenesscheck_ok.png\";\nimport livenesscheckDarkImage from \"./livenesscheck_dark.png\";\nimport livenesscheckPartialImage from \"./livenesscheck_partial.png\";\nimport livenesscheckSunglassesImage from \"./livenesscheck_sunglasses.png\";\n\nimport idCardCZ from \"./../idcard_cz.png\";\nimport idCardSK from \"./../idcard_sk.png\";\nimport idCardBackCZ from \"./../idcard_back_cz.png\";\nimport idCardBackSK from \"./../idcard_back_sk.png\";\nimport drivingLicenseCZ from \"./../drivinglicense_cz.png\";\nimport drivingLicenseSK from \"./../drivinglicense_sk.png\";\nimport passportCZ from \"./../passport_cz.png\";\nimport passportSK from \"./../passport_sk.png\";\n\nimport { StartProcess } from \"./StartProcess\";\nimport { useAppContext } from \"../../useAppContext\";\nimport { DocumentIdentificationFlow, Tenant } from \"../../globalDomain\";\nimport { useState } from \"react\";\nimport { option } from \"fp-ts\";\nimport { Option } from \"fp-ts/Option\";\nimport { constant, constUndefined, pipe } from \"fp-ts/function\";\nimport { HelpLineSupportDocumentId } from \"../../Common/HelplineSupportDocumentId/HelplineSupportDocumentId\";\n\ntype Props = {\n onContinue: () => unknown;\n documentIdentificationFlow: DocumentIdentificationFlow;\n isProofOfIncome?: boolean;\n};\n\nfunction ExampleDocument(props: {\n image: string;\n imageAlt: LocalizedString;\n description: Option;\n}) {\n return (\n \n {props.imageAlt}\n \n {pipe(\n props.description,\n option.fold(constUndefined, description => (\n \n {[description]}\n \n ))\n )}\n \n );\n}\n\nfunction HowToDescription(props: {\n image: string;\n imageAlt: LocalizedString;\n isBad?: boolean;\n description: LocalizedString;\n}) {\n return (\n \n {props.imageAlt}\n \n \n {props.isBad ? (\n \n ) : (\n \n )}\n \n \n {props.description}\n \n \n \n );\n}\n\nexport function StartIdProcess(props: Props) {\n const formatMessage = useFormatMessage();\n const {\n apiParameters: { tenant },\n } = useAppContext();\n\n const [howToIsOpen, setHowToIsOpen] = useState(false);\n\n const isMobileLayout = useIsMobileLayout();\n\n const isPrimaryDocument =\n props.documentIdentificationFlow === \"Primary\" ||\n props.documentIdentificationFlow === \"PrimaryAndSecondary\" ||\n props.documentIdentificationFlow === \"PrimaryAndLivenessCheck\";\n\n const idCards = (() => {\n switch (tenant) {\n case \"CZ\":\n return {\n idCardFront: idCardCZ,\n idCardBack: idCardBackCZ,\n };\n case \"SK\":\n return {\n idCardFront: idCardSK,\n idCardBack: idCardBackSK,\n };\n }\n })();\n\n const passport = (() => {\n switch (tenant) {\n case \"CZ\":\n return passportCZ;\n case \"SK\":\n return passportSK;\n }\n })();\n\n const drivingLicense = (() => {\n switch (tenant) {\n case \"CZ\":\n return drivingLicenseCZ;\n case \"SK\":\n return drivingLicenseSK;\n }\n })();\n\n const imageSet = (tenant: Tenant) => {\n switch (tenant) {\n case \"CZ\":\n if (isPrimaryDocument) {\n return {\n normal: czPrimaryImage,\n dark: czPrimaryDarkImage,\n glare: czPrimaryGlareImage,\n };\n } else {\n return {\n normal: czSecondaryImage,\n dark: czSecondaryDarkImage,\n glare: czSecondaryGlareImage,\n };\n }\n case \"SK\":\n if (isPrimaryDocument) {\n return {\n normal: skPrimaryImage,\n dark: skPrimaryDarkImage,\n glare: skPrimaryGlareImage,\n };\n } else {\n return {\n normal: skSecondaryImage,\n dark: skSecondaryDarkImage,\n glare: skSecondaryGlareImage,\n };\n }\n }\n };\n\n const livenessCheckImageSet = {\n normal: livenesscheckOkImage,\n dark: livenesscheckDarkImage,\n partial: livenesscheckPartialImage,\n sunglasses: livenesscheckSunglassesImage,\n };\n\n const howToSection = (\n \n \n \n \n \n );\n\n const primaryDocumentsExample = (\n \n \n {formatMessage(\"Identification.UploadDocuments.mobile.primary\")}\n \n \n \n \n \n \n );\n\n const secondaryDocumentsExample = (\n \n \n {formatMessage(\"Identification.UploadDocuments.mobile.secondary\")}\n \n\n \n \n {formatMessage(\n \"Identification.UploadDocuments.mobile.secondary.validDocuments\"\n )}\n \n\n \n {[\n formatMessage(\n \"Identification.UploadDocuments.step1.validDocuments.DrivingLicense\"\n ),\n formatMessage(\n \"Identification.UploadDocuments.step1.validDocuments.Passport\"\n ),\n ]}\n \n \n\n \n \n \n \n \n );\n\n const livenessCheckExample = (\n \n \n {formatMessage(\"Identification.UploadDocuments.mobile.livenessCheck\")}\n \n\n \n \n \n \n \n \n \n );\n\n return (\n \n {props.documentIdentificationFlow === \"PrimaryAndSecondary\" ? (\n \n {primaryDocumentsExample}\n {secondaryDocumentsExample}\n setHowToIsOpen(!howToIsOpen))}\n content={constant(howToSection)}\n />\n \n ) : props.documentIdentificationFlow === \"PrimaryAndLivenessCheck\" ? (\n \n {primaryDocumentsExample}\n setHowToIsOpen(!howToIsOpen))}\n content={constant(howToSection)}\n />\n {livenessCheckExample}\n \n ) : (\n howToSection\n )}\n {isMobileLayout && (\n <>\n \n \n \n )}\n \n );\n}\n","import {\n Space,\n Stack,\n DocumentsIcon,\n Box,\n Heading,\n Button,\n} from \"design-system\";\nimport { Option } from \"fp-ts/Option\";\nimport { option } from \"fp-ts\";\nimport { pipe, constNull } from \"fp-ts/function\";\nimport * as classes from \"./ReviewAndUpload.treat\";\nimport { DocumentSide } from \"./domain\";\nimport { StickyBottomContainer } from \"../StickyBottomContainer\";\nimport { useFormatMessage } from \"../../../intl\";\n\ntype Props = {\n onRetakePhoto: (documentSide: DocumentSide) => void;\n onOpenImage: (documentSide: DocumentSide) => void;\n onUpload: () => void;\n onUploadRejected: () => void;\n firstImageSource: Option;\n secondImageSource: Option;\n};\n\nexport const ReviewAndUpload = (props: Props) => {\n const formatMessage = useFormatMessage();\n\n return (\n \n \n {formatMessage(\n \"Identification.UploadDocuments.proofOfIncome.reviewAndUpload.title\"\n )}\n \n \n {formatMessage(\n \"Identification.UploadDocuments.proofOfIncome.reviewAndUpload.subtitle\"\n )}\n \n \n {pipe(\n props.firstImageSource,\n option.fold(constNull, () => (\n \n props.onOpenImage(\"FirstSide\")}\n icon={DocumentsIcon}\n />\n \n props.onRetakePhoto(\"FirstSide\")}\n />\n \n ))\n )}\n {pipe(\n props.secondImageSource,\n option.fold(constNull, () => (\n \n props.onOpenImage(\"SecondSide\")}\n icon={DocumentsIcon}\n />\n \n props.onRetakePhoto(\"SecondSide\")}\n />\n \n ))\n )}\n \n \n \n \n \n \n \n \n );\n};\n","import { Box, Button, Heading, Space } from \"design-system\";\nimport * as classes from \"./ConfirmPhoto.treat\";\nimport { StickyBottomContainer } from \"../StickyBottomContainer\";\nimport { useFormatMessage } from \"../../../intl\";\n\ntype Props = {\n imgSource: string;\n onContinue: () => void;\n onRetake: () => void;\n};\n\nexport const ConfirmPhoto = (props: Props) => {\n const formatMessage = useFormatMessage();\n return (\n \n \n {formatMessage(\n \"Identification.UploadDocuments.proofOfIncome.confirmPhoto.title\"\n )}\n \n \n {formatMessage(\n \"Identification.UploadDocuments.proofOfIncome.confirmPhoto.subtitle\"\n )}\n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { useEffect, useMemo } from \"react\";\nimport { MobileRecipientType } from \"./domain\";\nimport { Option } from \"fp-ts/Option\";\nimport { constVoid, pipe } from \"fp-ts/function\";\nimport { array, option } from \"fp-ts\";\nimport {\n LocalizedString,\n unsafeLocalizedString,\n RadioGroup,\n} from \"design-system\";\nimport { useFormatMessage } from \"../intl\";\n\nimport { NonEmptyArray } from \"fp-ts/NonEmptyArray\";\nimport { MobileRecipientOptionType } from \"./state\";\n\ntype Props = {\n recipients: NonEmptyArray;\n value: Option;\n onChange: (recipient: MobileRecipientOptionType) => unknown;\n disabled?: boolean;\n};\n\nexport function MobileDeviceSelection(props: Props) {\n const formatMessage = useFormatMessage();\n\n const defaultRecipient: Option = useMemo(\n () =>\n pipe(\n props.recipients,\n array.filter(r => !r.disabled),\n array.head\n ),\n [props.recipients]\n );\n\n useEffect(() => {\n pipe(\n props.value,\n option.fold(\n () => pipe(defaultRecipient, option.fold(constVoid, props.onChange)),\n constVoid\n )\n );\n }, [defaultRecipient]);\n\n const renderRecipient = (recipient: MobileRecipientType): LocalizedString => {\n switch (recipient) {\n case \"Banker\":\n return formatMessage(\n \"Identification.UploadDocuments.bankerPhoneNumber\"\n );\n case \"Client\":\n return formatMessage(\n \"Identification.UploadDocuments.clientPhoneNumber\"\n );\n }\n };\n\n return (\n recipient.key}\n isOptionDisabled={recipient => recipient.disabled}\n renderOption={option => renderRecipient(option.key)}\n renderOptionChildren={recipient =>\n option.some(unsafeLocalizedString(recipient.phoneNumber))\n }\n issuesType={option.none}\n disabled={props.disabled}\n />\n );\n}\n","import {\n Box,\n Stack,\n Space,\n LocalizedString,\n unsafeLocalizedString,\n} from \"design-system\";\n\ntype Props = {\n phoneNumber: string;\n text: LocalizedString;\n};\n\nconst MobileDeviceText = ({ phoneNumber, text }: Props) => {\n return (\n \n {text}\n \n {unsafeLocalizedString(phoneNumber)}\n \n );\n};\n\nexport default MobileDeviceText;\n","import {\n Banner,\n Body,\n Box,\n Button,\n CheckboxField,\n Divider,\n LightIcon,\n Space,\n Stack,\n unsafeLocalizedString,\n} from \"design-system\";\nimport * as classes from \"../../UploadId.treat\";\nimport { palette } from \"design-system/lib/styleConstants\";\nimport { option } from \"fp-ts\";\nimport {\n DocumentIdentificationFlow,\n UploadDocumentFlowType,\n} from \"../../../globalDomain\";\nimport { Option } from \"fp-ts/Option\";\nimport { pipe } from \"fp-ts/function\";\nimport { useFormatMessage } from \"../../../intl\";\nimport { useState } from \"react\";\nimport { useTestEnvironment } from \"../../../Common/useTestEnvironment\";\nimport { MobileRequiredDocuments } from \"../common/MobileRequiredDocuments\";\n\nexport type WhatToUploadProps = {\n hasPrimaryDocuments: boolean;\n hasSecondaryDocuments: boolean;\n productType: Option;\n documentIdentificationFlow: DocumentIdentificationFlow;\n biometricConsent: Option;\n mustGiveConsent: boolean;\n onBiometricConsent: (positive: boolean, mockScanner: boolean) => unknown;\n};\n\nexport default function WhatToUpload(props: WhatToUploadProps) {\n const formatMessage = useFormatMessage();\n const isTestEnvironment = useTestEnvironment();\n const shouldBlockUser = props.mustGiveConsent;\n\n const [negativeConsentPressed, setNegativeConsentPressed] = useState(false);\n const blockUserError = shouldBlockUser && negativeConsentPressed && (\n <>\n \n \n \n );\n\n const isPersonalProfile = pipe(\n props.productType,\n option.exists(value => value === \"PersonalProfile\")\n );\n\n const [mockScanner, setMockScanner] = useState(false);\n\n return (\n \n \n {formatMessage(\"Identification.UploadDocuments.mobile.whatToScanTitle\")}\n \n \n \n {formatMessage(\"Identification.UploadDocuments.mobile.whatToScanText1\")}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {formatMessage(\n \"Identification.UploadDocuments.mobile.whatToScanHint\"\n )}\n \n \n \n \n \n \n \n {formatMessage(\"Identification.UploadDocuments.mobile.whatToScanText2\")}\n \n \n {isTestEnvironment && (\n <>\n \n \n \n )}\n {\n props.onBiometricConsent(true, mockScanner);\n }}\n />\n \n \n shouldBlockUser\n ? setNegativeConsentPressed(true)\n : props.onBiometricConsent(false, mockScanner)\n }\n />\n {blockUserError}\n \n );\n}\n","import {\n Box,\n ComputedFieldProps,\n DropdownOption,\n Space,\n unsafeLocalizedString,\n} from \"design-system\";\nimport { constNull, pipe } from \"fp-ts/function\";\nimport { option } from \"fp-ts\";\nimport { Countries } from \"./Countries\";\nimport { DocumentTypes } from \"./DocumentTypes\";\nimport { CountryFormState } from \"../UploadDocuments\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { Option } from \"fp-ts/Option\";\nimport { RestoreApplicationData } from \"../../UKontoSecondPart/api\";\nimport { Country } from \"../domain\";\nimport { useFormatMessage } from \"../../intl\";\nimport { IO } from \"fp-ts/IO\";\nimport { formatDocumentType } from \"../utils\";\n\nexport type Props = {\n localCountryCode: NonEmptyString;\n fieldProps: (\n name: K\n ) => ComputedFieldProps;\n handleReset: IO;\n onNoCountries: () => unknown;\n onDocTypeChange?: (type: Option<\"IDCard\" | \"Passport\">) => unknown;\n onCountryChange?: (country: Option) => unknown;\n restoredData?: RestoreApplicationData;\n disabled: boolean;\n};\n\nexport function ChooseDocumentToUpload(props: Props) {\n const formatMessage = useFormatMessage();\n return (\n \n {\n props.fieldProps(\"country\").onChange(newSelection);\n if (props.onCountryChange) {\n props.onCountryChange(newSelection);\n }\n props.fieldProps(\"docType\").onChange(option.none);\n }}\n issues={props.fieldProps(\"country\").issues}\n onNoCountries={props.onNoCountries}\n localCountryCode={props.localCountryCode}\n restoredData={props.restoredData}\n disabled={props.disabled}\n handleReset={props.handleReset}\n />\n \n {pipe(\n props.fieldProps(\"country\").value,\n option.fold(constNull, country =>\n country.countryCode === props.localCountryCode ? null : (\n \n ({\n value: currentValue,\n label: formatDocumentType(currentValue),\n } as DropdownOption<\"IDCard\" | \"Passport\">)\n )\n )}\n name={unsafeLocalizedString(\"name\")}\n placeholder={formatMessage(\n \"Identification.UploadDocuments.documentType.placeholder\"\n )}\n clearable={false}\n country={country}\n onSelectionChange={type => {\n props.fieldProps(\"docType\").onChange(option.some(type));\n if (props.onDocTypeChange) {\n props.onDocTypeChange(option.some(type));\n }\n }}\n disabled={props.disabled}\n />\n )\n )\n )}\n \n );\n}\n","import { useFormatMessage } from \"../../intl\";\nimport { useQuery } from \"../../useAPI\";\nimport * as api from \"../api\";\nimport { constant, constFalse, constVoid, pipe } from \"fp-ts/function\";\nimport { array, boolean, nonEmptyArray, option } from \"fp-ts\";\nimport * as remoteData from \"../../RemoteData\";\nimport {\n Box,\n DropdownOption,\n Issue,\n Loader,\n RadioGroup,\n unsafeLocalizedString,\n} from \"design-system\";\nimport { useState } from \"react\";\nimport { Country } from \"../domain\";\nimport { useUpdateEffect } from \"react-use\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { Option } from \"fp-ts/Option\";\nimport { RestoreApplicationData } from \"../../UKontoSecondPart/api\";\nimport { DropdownField } from \"../../Common/DropdownField/DropdownField\";\nimport { dropdownOptionToValue } from \"../../Common/selectDropdownOption\";\nimport { IO } from \"fp-ts/IO\";\n\nexport type Props = {\n onSelectionChange: (newSelection: Option) => unknown;\n issues: option.Option>;\n onNoCountries?: () => unknown;\n localCountryCode: NonEmptyString;\n restoredData?: RestoreApplicationData;\n disabled: boolean;\n handleReset: IO;\n};\n\n//supported foreign countries for onboarding\nexport function Countries(props: Props) {\n const formatMessage = useFormatMessage();\n\n const [getCountries] = useQuery(api.allCountries);\n const [hasCountries, setHasCountries] = useState(true);\n const [selectedCountry, setSelectedCountry] = useState>(\n props.restoredData &&\n option.isSome(props.restoredData.countryDocSelection) &&\n option.isSome(props.restoredData.countryDocSelection.value.country)\n ? option.some({\n label:\n props.restoredData.countryDocSelection.value.country.value.label,\n countryCode:\n props.restoredData.countryDocSelection.value.country.value\n .countryCode,\n inEuropeanUnion:\n props.restoredData.countryDocSelection.value.country.value\n .inEuropeanUnion,\n })\n : option.none\n );\n\n const [localCountrySelected, setLocalCountrySelected] = useState<\n Option\n >(\n props.restoredData &&\n option.isSome(props.restoredData.countryDocSelection) &&\n option.isSome(props.restoredData.countryDocSelection.value.country)\n ? option.of(\n props.localCountryCode ===\n props.restoredData.countryDocSelection.value.country.value\n .countryCode\n )\n : option.of(props.localCountryCode !== undefined)\n );\n\n const handleCountrySelection = (newSelection: Option) => {\n setSelectedCountry(newSelection);\n props.onSelectionChange(newSelection);\n };\n\n useUpdateEffect(() => {\n if (!hasCountries && props.onNoCountries) props.onNoCountries();\n }, [hasCountries]);\n\n pipe(\n getCountries,\n remoteData.fold(constVoid, constVoid, allCountries => {\n if (allCountries.length === 0 && hasCountries) {\n setHasCountries(false);\n }\n })\n );\n\n const getCountryLabel = (countries: Country[], code: NonEmptyString) =>\n pipe(\n countries,\n array.findFirst(p => p.countryCode === code),\n option.map(c => c.label),\n option.getOrElse(constant(\"\"))\n );\n\n const showCountries = pipe(\n localCountrySelected,\n option.fold(constFalse, v => !v)\n );\n\n const setInitialItem = (allCountries: Array): Array => {\n let itemToFind = allCountries.find(\n p => p.countryCode === props.localCountryCode\n );\n if (props.localCountryCode === \"CZE\") {\n itemToFind = allCountries.find(p => p.countryCode === \"SVK\");\n } else {\n itemToFind = allCountries.find(p => p.countryCode === \"CZE\");\n }\n\n if (itemToFind !== undefined) {\n const foundIdx = allCountries.findIndex(index => index === itemToFind);\n allCountries.splice(foundIdx, 1);\n allCountries.unshift(itemToFind);\n }\n return allCountries;\n };\n\n return pipe(\n getCountries,\n remoteData.fold(\n constant(),\n constant(),\n allCountries => (\n \n {\n props.handleReset();\n setLocalCountrySelected(val);\n setSelectedCountry(option.none);\n if (option.isSome(val) && val.value) {\n pipe(\n setInitialItem(allCountries),\n array.findFirst(\n p => p.countryCode === props.localCountryCode\n ),\n option.map(c => handleCountrySelection(option.some(c)))\n );\n } else {\n props.onSelectionChange(option.none);\n }\n }}\n renderOption={boolean.fold(\n () =>\n formatMessage(\"Identification.personalData.citizenship.OTHER\"),\n () =>\n unsafeLocalizedString(\n getCountryLabel(allCountries, props.localCountryCode)\n )\n )}\n renderOptionChildren={constant(option.none)}\n optionKey={value => value.toString()}\n isOptionDisabled={constFalse}\n issuesType={option.none}\n disabled={props.disabled}\n />\n {showCountries && (\n \n ({\n value: country,\n label: country.label,\n } as DropdownOption)\n )\n )}\n label={formatMessage(\n \"Identification.UploadDocuments.countries.label\"\n )}\n onChange={val =>\n handleCountrySelection(dropdownOptionToValue(val))\n }\n options={pipe(\n setInitialItem(allCountries),\n array.filter(p => p.countryCode !== props.localCountryCode),\n array.map(\n country =>\n ({\n value: country,\n label: country.label,\n } as DropdownOption)\n )\n )}\n searchable\n clearable={false}\n issues={props.issues}\n onBlur={constVoid}\n disabled={props.disabled}\n />\n )}\n \n )\n )\n );\n}\n","import { Country, DocumentTypeUpload } from \"../domain\";\nimport {\n DropdownField,\n DropdownFieldProps,\n} from \"../../Common/DropdownField/DropdownField\";\nimport { useFormatMessage } from \"../../intl\";\nimport { array, option } from \"fp-ts\";\nimport { constVoid, pipe } from \"fp-ts/function\";\nimport { useQuery } from \"../../useAPI\";\nimport * as api from \"../api\";\nimport * as remoteData from \"../../RemoteData\";\nimport { ErrorBanner, Loader } from \"design-system\";\nimport { formatDocumentType } from \"../utils\";\nimport { dropdownOptionToValue } from \"../../Common/selectDropdownOption\";\n\nexport type Props = Omit<\n DropdownFieldProps<\"IDCard\" | \"Passport\">,\n \"options\" | \"onChange\" | \"searchable\"\n> & {\n country: Country;\n onSelectionChange: (type: \"IDCard\" | \"Passport\") => unknown;\n disabled: boolean;\n};\n\nexport function DocumentTypes(props: Props) {\n const formatMessage = useFormatMessage();\n const [acceptableDocTypes] = useQuery(api.documentTypes, {\n iso3country: props.country.countryCode,\n });\n\n return pipe(\n acceptableDocTypes,\n remoteData.fold(\n () => ,\n () => ,\n types => (\n ({\n value: docType as \"IDCard\" | \"Passport\",\n label: formatMessage(\n formatDocumentType(docType as \"IDCard\" | \"Passport\")\n ),\n }))\n )}\n onChange={newVal =>\n pipe(\n dropdownOptionToValue(newVal),\n option.fold(constVoid, val =>\n props.onSelectionChange(val as \"IDCard\" | \"Passport\")\n )\n )\n }\n searchable={false}\n disabled={props.disabled}\n value={\n option.isSome(props.value)\n ? option.some({\n value: props.value.value.value,\n label: formatMessage(\n formatDocumentType(\n props.value.value.value as DocumentTypeUpload\n )\n ),\n })\n : option.none\n }\n />\n )\n )\n );\n}\n","import { useEffect, useRef, useState } from \"react\";\nimport {\n Box,\n CheckboxField,\n Divider,\n LoadingButton,\n Space,\n Stack,\n} from \"design-system\";\nimport { option, taskEither } from \"fp-ts\";\nimport { Option } from \"fp-ts/Option\";\nimport { useFormatMessage } from \"../intl\";\nimport { constant, pipe } from \"fp-ts/function\";\nimport { useAppContext } from \"../useAppContext\";\nimport { CoApplicantInput } from \"../globalDomain\";\nimport { useCommand } from \"../useAPI\";\nimport * as uploadApi from \"./api\";\nimport * as digitalIdApi from \"../DigitalId/api\";\nimport { BiometricConsentStatus } from \"../IdUpload/types\";\nimport { BiometricConsent } from \"./BiometricConsent\";\nimport { selectedMainApplicant } from \"../MortgageDashboard/mortgageDashboardUtils\";\nimport { CheckClientDataResult } from \"./useCheckClientDataResult\";\nimport { DocumentDigitalIdSwitch } from \"./DocumentDigitalIdSwitch\";\nimport { useBranchExperienceContext } from \"../BranchExperience/BranchExperienceContext\";\nimport { DigitalId } from \"../DigitalId/DigitalId\";\nimport { ClientDataOutput } from \"../IdUpload/api\";\nimport { TaskEither } from \"fp-ts/TaskEither\";\n\ntype Props = {\n onContinue: (data: CheckClientDataResult) => unknown;\n biometricConsent: BiometricConsentStatus;\n setBiometricConsent: (consent: BiometricConsentStatus) => void;\n digitalIdSwitch: {\n type: \"upload\" | \"digital\";\n setType: (type: \"upload\" | \"digital\") => unknown;\n };\n} & CoApplicantInput;\n\nexport function DocumentDigitalId({\n digitalIdSwitch: { type, setType },\n ...props\n}: Props) {\n const { openChildWindow } = useBranchExperienceContext();\n const {\n config: { biometricConsent: biometricConsentEnabled },\n } = useAppContext();\n const formatMessage = useFormatMessage();\n const [error, setError] = useState(false);\n const [agreement, setAgreement] = useState(false);\n const [agreementError, setAgreementError] = useState(false);\n const sendBiometricConsentCommand = useCommand(\n uploadApi.sendBiometricConsent\n );\n const extractData = useCommand(digitalIdApi.digitalIdExtractData);\n const [clientIdentified, setClientIdentified] = useState(false);\n\n useEffect(() => {\n openChildWindow();\n }, []);\n\n const scrollToBiometricError = () => {\n if (!biometricSectionRef.current) {\n return;\n }\n biometricSectionRef.current.scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n });\n };\n\n const extract = pipe(\n extractData(),\n taskEither.map(\n ({ primary, canUploadAgain, extractedAddress }: ClientDataOutput) =>\n pipe(\n primary,\n option.fold(\n () => {},\n data =>\n props.onContinue({\n ...data,\n canUploadAgain,\n canEdit: false,\n showWarning: false,\n fraudCheck: option.none,\n additionalDocumentType: option.none,\n additionalDocumentDetails: option.none,\n extractedAddress: extractedAddress ?? undefined,\n })\n )\n )\n )\n );\n\n const onContinue = (): TaskEither => {\n if (!agreement) {\n return taskEither.leftIO(() => {\n setAgreementError(true);\n });\n }\n const applicantIndex = pipe(\n props.coApplicant,\n option.fold(constant(selectedMainApplicant.index), c => c.index)\n );\n\n return pipe(\n props.biometricConsent.consent,\n option.fold(\n () =>\n taskEither.leftIO(() => {\n setError(true);\n scrollToBiometricError();\n }),\n consent =>\n pipe(\n sendBiometricConsentCommand({ consent, applicantIndex }),\n taskEither.chain(() => extract)\n )\n )\n );\n };\n\n const updateBiometricConsent = (consent: Option) => {\n setError(false);\n props.setBiometricConsent({\n consent,\n previousConsent: option.none,\n });\n };\n\n const biometricSectionRef = useRef(null);\n\n const biometricSection = (\n <>\n \n \n \n \n );\n\n return (\n \n {biometricConsentEnabled && biometricSection}\n \n setClientIdentified(true)}\n applicantIndex={pipe(\n props.coApplicant,\n option.fold(\n () => undefined,\n coApplicant => coApplicant.index + \"\"\n )\n )}\n />\n {\n setAgreement(val);\n setAgreementError(false);\n }}\n />\n \n \n \n \n );\n}\n","import { ComponentProps, useEffect, useState } from \"react\";\nimport { useCommand, usePollingEffect } from \"../useAPI\";\nimport * as uploadApi from \"./api\";\nimport {\n Button,\n Banner,\n Box,\n Body,\n Space,\n MobileUploadIDIcon,\n MobileIcon,\n MobileConnectionOKIcon,\n MobileConnectionKOIcon,\n Dialog,\n AlertDialog,\n ProblemIcon,\n} from \"design-system\";\nimport {\n constant,\n constNull,\n constTrue,\n constVoid,\n pipe,\n} from \"fp-ts/function\";\nimport { taskEither } from \"fp-ts\";\nimport { useFormatMessage } from \"../intl\";\nimport * as option from \"fp-ts/Option\";\nimport { Option } from \"fp-ts/Option\";\nimport { CoApplicantInput, DocumentIdentificationFlow } from \"../globalDomain\";\nimport { Task } from \"fp-ts/Task\";\nimport { LinkPurpose } from \"./domain\";\nimport { MobileFlowType, MobileRecipientOptionType } from \"./state\";\nimport { foldMobileFlowType } from \"./utils\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\n\ntype Props = {\n flowType: MobileFlowType;\n recipient: MobileRecipientOptionType;\n onDismiss: () => unknown;\n onMaxAttemptsReached: () => unknown;\n onUploadCompleted: Task;\n documentIdentificationFlow: DocumentIdentificationFlow;\n docTypeId: Option;\n applicationElementID: Option;\n} & CoApplicantInput;\n\ninterface WaitingForConnectionStage {\n name: \"WaitingForConnection\";\n attemptsBannerMessage: Option<\"LastLink\">;\n resendLinkTimeout: Option;\n hasSentLinkError: boolean;\n hasSentLink: boolean;\n}\n\ninterface MobileConnectedStage {\n name: \"MobileConnected\";\n}\n\ninterface UploadInProgressStage {\n name: \"UploadInProgress\";\n}\n\ninterface ConnectionLostStage {\n name: \"ConnectionLost\";\n}\n\ninterface IsCancellingProcessStage {\n name: \"IsCancellingProcess\";\n last_stage: MobileModalStage;\n}\n\ninterface MaxAttemptsReached {\n name: \"MaxAttemptsReached\";\n}\n\ntype MobileModalStage =\n | WaitingForConnectionStage\n | MobileConnectedStage\n | UploadInProgressStage\n | ConnectionLostStage\n | IsCancellingProcessStage\n | MaxAttemptsReached;\n\nconst RESEND_LINK_TIMEOUT = 60000;\n\nfunction foldStage(\n stage: MobileModalStage,\n match: {\n whenWaitingForConnection: (stage: WaitingForConnectionStage) => T;\n whenMobileConnected: (stage: MobileConnectedStage) => T;\n whenUploadInProgress: (stage: UploadInProgressStage) => T;\n whenConnectionLost: (stage: ConnectionLostStage) => T;\n whenCancellingProcess: (stage: IsCancellingProcessStage) => T;\n whenMaxAttemptsReached: (stage: MaxAttemptsReached) => T;\n }\n) {\n switch (stage.name) {\n case \"WaitingForConnection\":\n return match.whenWaitingForConnection(stage);\n case \"MobileConnected\":\n return match.whenMobileConnected(stage);\n case \"UploadInProgress\":\n return match.whenUploadInProgress(stage);\n case \"ConnectionLost\":\n return match.whenConnectionLost(stage);\n case \"IsCancellingProcess\":\n return match.whenCancellingProcess(stage);\n case \"MaxAttemptsReached\":\n return match.whenMaxAttemptsReached(stage);\n }\n}\n\nfunction shouldUpdate(stage: MobileModalStage): boolean {\n return foldStage(stage, {\n whenWaitingForConnection: () => false,\n whenMobileConnected: () => false,\n whenUploadInProgress: () => false,\n whenConnectionLost: () => false,\n whenCancellingProcess: () => true,\n whenMaxAttemptsReached: () => true,\n });\n}\n\nconst initialMobileModalStage: MobileModalStage = {\n name: \"WaitingForConnection\",\n attemptsBannerMessage: option.none,\n resendLinkTimeout: option.none,\n hasSentLinkError: false,\n hasSentLink: false,\n};\n\nexport function MobileUploadStatusDialogPOI(props: Props) {\n const formatMessage = useFormatMessage();\n const sendLink = useCommand(uploadApi.sendMobileLinkPOI);\n const cancelProcess = useCommand(uploadApi.cancelProcess);\n\n const [stage, setStage] = useState(initialMobileModalStage);\n\n function transition(\n getNextStage: (currentStage: MobileModalStage) => MobileModalStage\n ): void {\n setStage(currentStage => {\n const nextStage = getNextStage(currentStage);\n\n if (currentStage.name !== nextStage.name) {\n if (\n currentStage.name === \"WaitingForConnection\" &&\n nextStage.name !== \"WaitingForConnection\" &&\n option.isSome(currentStage.resendLinkTimeout)\n ) {\n clearTimeout(currentStage.resendLinkTimeout.value);\n }\n }\n\n if (shouldUpdate(currentStage)) {\n return { ...currentStage, last_stage: nextStage };\n } else {\n return nextStage;\n }\n });\n }\n\n const onSendLink = (isFirstTime: boolean) => {\n if (stage.name !== \"WaitingForConnection\") {\n return;\n }\n\n pipe(\n sendLink({\n recipient: props.recipient.key,\n linkPurpose: foldMobileFlowType(props.flowType, {\n DocumentUpload: constant(\"mobileIdUpload\"),\n SelfieFraudCheck: constant(\"selfieFraudCheck\"),\n HologramFraudCheck: constant(\"hologramFraudCheck\"),\n HologramAndSelfieFraudCheck: constant(\"hologramAndSelfieFraudCheck\"),\n ProofOfIncome: constant(\"proofOfIncome\"),\n }),\n idType: props.documentIdentificationFlow,\n coApplicant: props.coApplicant,\n parameters: {\n docTypeId: props.docTypeId,\n applicationElementID: props.applicationElementID,\n },\n }),\n taskEither.bimap(\n error => {\n if (error.id !== \"MaxLinksAttemptsReached\") {\n transition(stage => ({\n ...stage,\n hasSentLinkError: true,\n hasSentLink: false,\n }));\n\n return;\n }\n setStage({ name: \"MaxAttemptsReached\" });\n props.onMaxAttemptsReached();\n },\n ({ attemptsLeft }) => {\n transition(stage =>\n stage.name !== \"WaitingForConnection\"\n ? stage\n : {\n ...stage,\n hasSentLinkError: false,\n hasSentLink: true,\n attemptsBannerMessage:\n attemptsLeft === 0 ? option.some(\"LastLink\") : option.none,\n resendLinkTimeout: isFirstTime\n ? option.none\n : option.some(\n window.setTimeout(\n () =>\n transition(stage =>\n stage.name !== \"WaitingForConnection\"\n ? stage\n : {\n ...stage,\n resendLinkTimeout: option.none,\n }\n ),\n RESEND_LINK_TIMEOUT\n )\n ),\n }\n );\n }\n )\n )();\n };\n\n const onCancellingProcess = (\n old_stage: Exclude\n ) => () => {\n transition(() => ({\n name: \"IsCancellingProcess\",\n last_stage: old_stage,\n }));\n };\n\n const onCancelProcess = () =>\n pipe(\n cancelProcess(),\n taskEither.bimap(\n () =>\n transition(() => ({\n name: \"ConnectionLost\",\n })),\n () => props.onDismiss()\n )\n )();\n\n const [pollingResponseReceived, setPollingResponseReceived] = useState(false);\n const pollingDisabled =\n stage.name === \"ConnectionLost\" ||\n stage.name === \"IsCancellingProcess\" ||\n (stage.name === \"WaitingForConnection\" && !stage.hasSentLink);\n\n const refreshPolling = usePollingEffect(\n uploadApi.mobileStatus,\n {\n disabled: pollingDisabled || pollingResponseReceived,\n intervalMS: 5000,\n shouldPollingContinue: constTrue,\n onError: () => transition(() => ({ name: \"ConnectionLost\" })),\n onSuccess: ({ status }) => {\n if (status === \"WaitingForConnection\") {\n transition(stage =>\n stage.name === \"WaitingForConnection\"\n ? stage\n : initialMobileModalStage\n );\n } else if (\n status === \"UploadCompleted\" ||\n status === \"MustEditData\" ||\n status === \"VerificationCompleted\"\n ) {\n setPollingResponseReceived(true);\n props.onUploadCompleted();\n } else {\n transition(() => ({ name: status }));\n }\n },\n },\n { coApplicant: props.coApplicant }\n );\n const [pollingRunning, setPollingRunning] = useState(false);\n useEffect(() => {\n if (pollingDisabled) {\n setPollingRunning(false);\n }\n if (!pollingDisabled && !pollingRunning) {\n refreshPolling();\n setPollingRunning(true);\n }\n }, [pollingDisabled, refreshPolling, pollingRunning]);\n\n useEffect(() => {\n if (stage.name === \"WaitingForConnection\") {\n onSendLink(true);\n }\n }, []);\n\n const modalTitle = foldStage(stage, {\n whenWaitingForConnection: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.waitingTitle\"\n ),\n whenMobileConnected: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.connectedTitle\"\n ),\n whenUploadInProgress: () =>\n formatMessage(\n foldMobileFlowType(props.flowType, {\n DocumentUpload: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingTitle\"\n ),\n ProofOfIncome: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingProofOfIncomeTitle\"\n ),\n SelfieFraudCheck: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingSelfieCheckTitle\"\n ),\n HologramFraudCheck: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingFraudCheckTitle\"\n ),\n HologramAndSelfieFraudCheck: constant(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingFraudCheckTitle\"\n ),\n })\n ),\n whenConnectionLost: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.errorTitle\"\n ),\n whenCancellingProcess: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.exitingTitle\"\n ),\n whenMaxAttemptsReached: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.maxAttemptsLimitErrorTitle\"\n ),\n });\n\n const modalContent = foldStage(stage, {\n whenWaitingForConnection: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.waitingDescription\",\n { phoneNumber: props.recipient.phoneNumber }\n ),\n whenMobileConnected: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.connectedDescription\"\n ),\n whenUploadInProgress: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.uploadingDescription\"\n ),\n whenConnectionLost: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.errorDescription\"\n ),\n whenMaxAttemptsReached: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.maxAttemptsLimitError\"\n ),\n whenCancellingProcess: () =>\n formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.exitingDescription\"\n ),\n });\n\n const transitionToCancelling = (stage: MobileModalStage) => {\n if (stage.name !== \"IsCancellingProcess\") {\n return onCancellingProcess(stage);\n } else {\n return constVoid;\n }\n };\n\n const recoverFromCancelling = (cancellingStage: IsCancellingProcessStage) => {\n setStage(cancellingStage.last_stage);\n };\n\n const banner = (\n \n );\n\n const icon = foldStage(stage, {\n whenWaitingForConnection: constant(MobileIcon),\n whenMobileConnected: constant(MobileConnectionOKIcon),\n whenUploadInProgress: constant(MobileUploadIDIcon),\n whenConnectionLost: constant(MobileConnectionKOIcon),\n whenCancellingProcess: constant(MobileIcon), // TODO(gabro): double check this\n whenMaxAttemptsReached: constant(ProblemIcon),\n });\n\n const optionalBanner = foldStage(stage, {\n whenWaitingForConnection: () => option.some(banner),\n whenMobileConnected: () => option.some(banner),\n whenUploadInProgress: () => option.some(banner),\n whenConnectionLost: () => option.none,\n whenCancellingProcess: () => option.none,\n whenMaxAttemptsReached: () => option.none,\n });\n\n const cancelAction = {\n variant: \"text\",\n action: transitionToCancelling(stage),\n label: formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.cancelAction\"\n ),\n } as const;\n\n const actions = foldStage[\"actions\"]>(stage, {\n whenWaitingForConnection: constant([]),\n whenMobileConnected: constant([cancelAction]),\n whenUploadInProgress: constant([cancelAction]),\n whenConnectionLost: constant([\n {\n variant: \"primary\",\n action: props.onDismiss,\n label: formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.closeAction\"\n ),\n },\n ]),\n // these are handled separately, see below\n whenCancellingProcess: constant([]),\n whenMaxAttemptsReached: constant([\n {\n variant: \"primary\",\n action: props.onDismiss,\n label: formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.closeAction\"\n ),\n },\n ]),\n });\n\n const bottomContent = foldStage(stage, {\n whenWaitingForConnection: stage =>\n option.some(\n <>\n \n \n {formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.waitingResendLabel\"\n )}\n \n \n onSendLink(false)}\n label={formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.waitingResendAction\"\n )}\n disabled={option.isSome(stage.resendLinkTimeout)}\n />\n \n \n {option.isSome(stage.resendLinkTimeout) &&\n !pipe(\n stage.attemptsBannerMessage,\n option.exists(\n attemptsBannerMessage => attemptsBannerMessage === \"LastLink\"\n )\n ) ? (\n \n ) : null}\n {pipe(\n stage.attemptsBannerMessage,\n option.fold(constNull, attemptsBannerMessage => {\n switch (attemptsBannerMessage) {\n case \"LastLink\":\n return (\n <>\n \n \n \n );\n }\n })\n )}\n \n ),\n whenMobileConnected: () => option.none,\n whenUploadInProgress: () => option.none,\n whenConnectionLost: () => option.none,\n whenCancellingProcess: () => option.none,\n whenMaxAttemptsReached: () => option.none,\n });\n\n switch (stage.name) {\n case \"IsCancellingProcess\":\n return (\n recoverFromCancelling(stage)}\n onCancel={() => recoverFromCancelling(stage)}\n confirmLabel={formatMessage(\n \"Identification.UploadDocuments.MobileUploadStatusModal.exitingConfirmation\"\n )}\n onConfirm={onCancelProcess}\n />\n );\n case \"MaxAttemptsReached\":\n case \"WaitingForConnection\":\n case \"MobileConnected\":\n case \"ConnectionLost\":\n case \"UploadInProgress\":\n return (\n \n {pipe(optionalBanner, option.toNullable)}\n \n {pipe(bottomContent, option.toNullable)}\n \n );\n }\n}\n","import { Dialog } from \"design-system\";\n\nimport { option } from \"fp-ts\";\nimport { Option } from \"fp-ts/Option\";\nimport { NonEmptyString } from \"io-ts-types/NonEmptyString\";\nimport { useFormatMessage } from \"../../../intl\";\nimport {\n CoApplicantInput,\n UploadDocumentFlowType,\n} from \"../../../globalDomain\";\nimport { ProofOfIncomeUploadSameDeviceFlow } from \"./ProofOfIncomeUploadSameDeviceFlow\";\n\ntype Props = {\n onDismiss: () => void;\n productType: Option;\n parameters: Option<{\n docTypeId: Option;\n applicationElementID: Option;\n }>;\n onDocumentCancel?: () => void;\n} & CoApplicantInput;\n\nexport function ProofOfIncomeUploadSameDeviceDialog(props: Props) {\n const formatMessage = useFormatMessage();\n return (\n \n \n \n );\n}\n","import { useState } from \"react\";\nimport { option, taskEither, either, array } from \"fp-ts\";\nimport { pipe } from \"fp-ts/function\";\nimport { Option } from \"fp-ts/Option\";\nimport { StartIdProcess as StartProcess } from \"../StartIdProcess\";\nimport * as uploadApi from \"../../api\";\nimport * as loansApi from \"../../../StandardLoan/api\";\nimport * as documentApi from \"../../../MortgageDashboard/Documents/api\";\nimport {\n Box,\n FeedbackBlock,\n FileContent,\n PositiveInteger,\n} from \"design-system\";\nimport {\n fromUploadErrorToFeedbackState,\n MobileUploadFeedbackBanner,\n MobileUploadState,\n} from \"../FeedbackBanner\";\nimport { useFormatMessage } from \"../../../intl\";\nimport {\n CoApplicantInput,\n genericError,\n UploadDocumentFlowType,\n} from \"../../../globalDomain\";\nimport { DocumentSide, foldDocumentSide, foldUploadFlowType } from \"./domain\";\nimport { ReviewAndUpload } from \"./ReviewAndUpload\";\nimport { SealingProofOfIncome } from \"./SealingProofOfIncome\";\nimport { ConfirmPhoto } from \"./ConfirmPhoto\";\nimport { TakePhoto } from \"./TakePhoto\";\nimport { useCommand } from \"../../../useAPI\";\nimport { sequenceS } from \"fp-ts/Apply\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { AddDocumentNote } from \"../../../Common/Dialogs/DocumentUploadDialog/AddDocumentNote\";\nimport { DocumentNoteUploadError } from \"../../../Common/Dialogs/DocumentUploadDialog/domain\";\n\ntype FlowState =\n | { id: \"StartProcess\" }\n | { id: \"Loading\" }\n | { id: \"FirstPageUploaded\" }\n | { id: \"UploadFirstSide\" }\n | { id: \"UploadSecondSide\" }\n | { id: \"ConfirmData\"; imgSource: string; documentSide: DocumentSide }\n | { id: \"AddNote\" }\n | { id: \"UploadCompleted\" }\n | { id: \"Sealing\" }\n | { id: \"UploadRejected\" }\n | { id: \"UploadFailed\" }\n | { id: \"ConnectionLost\"; error: uploadApi.MobileUploadStatusError }\n | { id: \"ReviewAndUpload\" };\n\nfunction foldState(\n state: FlowState,\n match: {\n whenLoading: () => T;\n whenStartProcess: () => T;\n whenFirstPageUploaded: () => T;\n whenUploadFirstSide: () => T;\n whenUploadSecondSide: () => T;\n whenConfirmData: ({\n imgSource,\n documentSide,\n }: {\n imgSource: string;\n documentSide: DocumentSide;\n }) => T;\n whenAddNote: () => T;\n whenUploadCompleted: () => T;\n whenSealing: () => T;\n whenUploadRejected: () => T;\n whenUploadFailed: () => T;\n whenConnectionLost: (error: uploadApi.MobileUploadStatusError) => T;\n whenReviewAndUpload: () => T;\n }\n) {\n switch (state.id) {\n case \"Loading\":\n return match.whenLoading();\n case \"StartProcess\":\n return match.whenStartProcess();\n case \"FirstPageUploaded\":\n return match.whenFirstPageUploaded();\n case \"UploadFirstSide\":\n return match.whenUploadFirstSide();\n case \"UploadSecondSide\":\n return match.whenUploadSecondSide();\n case \"ConfirmData\":\n return match.whenConfirmData({\n imgSource: state.imgSource,\n documentSide: state.documentSide,\n });\n case \"AddNote\":\n return match.whenAddNote();\n case \"UploadCompleted\":\n return match.whenUploadCompleted();\n case \"Sealing\":\n return match.whenSealing();\n case \"UploadRejected\":\n return match.whenUploadRejected();\n case \"UploadFailed\":\n return match.whenUploadFailed();\n case \"ConnectionLost\":\n return match.whenConnectionLost(state.error);\n case \"ReviewAndUpload\":\n return match.whenReviewAndUpload();\n }\n}\n\ntype Props = {\n productType: Option;\n parameters: Option<{\n docTypeId: Option;\n applicationElementID: Option;\n }>;\n maxLengthNote?: Option;\n fileSizeMax?: number;\n isNoteMandatory?: boolean;\n onDocumentCancel?: () => void;\n} & CoApplicantInput;\n\nexport function ProofOfIncomeUploadSameDeviceFlow(props: Props) {\n const [firstImageSource, setFirstImageSource] = useState>(\n option.none\n );\n const [secondImageSource, setSecondImageSource] = useState>(\n option.none\n );\n const [flowState, setFlowState] = useState({\n id: \"StartProcess\",\n });\n const uploadProofOfIncomeDocumentMobile = useCommand(\n documentApi.uploadProofOfIncomeDocumentMobile\n );\n const uploadPOIByClient = useCommand(documentApi.uploadPOIByClient);\n\n const confirmPOIByClient = useCommand(loansApi.confirmPOIByClient);\n // const cancelUpload = useCommand(loansApi.cancelUploadByClient);\n\n const proofOfIncomeMortgageCompleteMobile = useCommand(\n documentApi.proofOfIncomeMortgageCompleteMobile\n );\n const proofOfIncomeCancel = useCommand(uploadApi.cancelProcess);\n\n const formatMessage = useFormatMessage();\n\n const uploadSingleDocument = (imgSource: string) =>\n pipe(\n FileContent.decode(imgSource.split(\",\")[1]),\n either.fold(\n () => taskEither.left(\"GenericError\"),\n fileContent =>\n pipe(\n {\n productType: props.productType,\n parameters: props.parameters,\n },\n sequenceS(option.option),\n option.fold(\n () => taskEither.left(\"GenericError\"),\n ({ productType, parameters }) => {\n if (productType === \"PersonalProfile\") {\n return taskEither.left(\"GenericError\");\n }\n\n return pipe(\n parameters.docTypeId,\n option.fold(\n () => taskEither.left(\"GenericError\"),\n docTypeId =>\n uploadProofOfIncomeDocumentMobile({\n applicantIndex: pipe(\n props.coApplicant,\n option.fold(\n () => \"0\",\n coApplicant => coApplicant.index.toString()\n )\n ),\n filenetDocumentType: \"PROOF_OF_INCOME\",\n product: productType,\n fileContent,\n docTypeId,\n applicationElementID: parameters.applicationElementID,\n })\n ),\n taskEither.chain(({ status }) =>\n status === \"OK\"\n ? taskEither.right(status)\n : taskEither.left(genericError)\n )\n );\n }\n )\n )\n )\n );\n\n const uploadTwoPageDocuments = (files: string[]) =>\n pipe(\n files,\n array.traverse(either.either)(file =>\n FileContent.decode(file.split(\",\")[1])\n ),\n either.fold(\n () => taskEither.left(\"GenericError\"),\n fileContents =>\n pipe(\n {\n productType: props.productType,\n parameters: props.parameters,\n },\n sequenceS(option.option),\n option.fold(\n () => taskEither.left(\"GenericError\"),\n ({ productType, parameters }) => {\n if (productType === \"PersonalProfile\") {\n return taskEither.left(\"GenericError\");\n }\n\n return pipe(\n {\n docTypeId: parameters.docTypeId,\n applicationElementID: parameters.applicationElementID,\n },\n sequenceS(option.option),\n option.fold(\n () => taskEither.left(\"GenericError\"),\n parameters =>\n fileContents[0] &&\n uploadPOIByClient({\n ...parameters,\n filenetDocumentType: \"PROOF_OF_INCOME\",\n product: productType,\n firstPage: {\n content: fileContents[0],\n mimeType: \"image/jpeg\",\n },\n sameDevice: true,\n })\n ),\n taskEither.chain(({ status }) =>\n status === \"OK\"\n ? taskEither.right(status)\n : taskEither.left(genericError)\n )\n );\n }\n )\n )\n )\n );\n\n // SK should upload 2 photos, CZ just 1.\n const onUpload = () =>\n pipe(\n {\n productType: props.productType,\n firstImageSource,\n },\n sequenceS(option.option),\n option.fold(\n () => taskEither.left(\"GenericError\"),\n ({ productType, firstImageSource }) =>\n pipe(\n productType,\n foldUploadFlowType({\n whenMortgage: () => uploadSingleDocument(firstImageSource),\n whenPersonalProfile: () => taskEither.left(\"GenericError\"),\n whenStandardLoan: () =>\n uploadTwoPageDocuments([firstImageSource]),\n }),\n taskEither.mapLeft(() => \"GenericError\"),\n taskEither.chain(() =>\n pipe(\n productType,\n foldUploadFlowType({\n whenMortgage: () => proofOfIncomeMortgageCompleteMobile(),\n whenPersonalProfile: () => taskEither.left(\"GenericError\"),\n whenStandardLoan: () =>\n taskEither.fromIO(() => setFlowState({ id: \"AddNote\" })),\n }),\n taskEither.mapLeft(() => \"GenericError\")\n )\n ),\n taskEither.chain(() =>\n taskEither.fromIO(() =>\n pipe(\n productType,\n foldUploadFlowType({\n whenMortgage: () => setFlowState({ id: \"UploadCompleted\" }),\n whenPersonalProfile: () =>\n setFlowState({ id: \"UploadCompleted\" }),\n whenStandardLoan: () => setFlowState({ id: \"AddNote\" }),\n })\n )\n )\n )\n )\n )\n )();\n\n return foldState(flowState, {\n whenLoading: () => (\n \n \n \n ),\n whenStartProcess: () => (\n {\n setFlowState({ id: \"UploadFirstSide\" });\n }}\n isProofOfIncome\n />\n ),\n whenFirstPageUploaded: () => (\n setFlowState({ id: \"UploadSecondSide\" }),\n },\n ]}\n />\n ),\n whenUploadFirstSide: () => (\n \n setFlowState({\n id: \"ConfirmData\",\n imgSource,\n documentSide: \"FirstSide\",\n })\n }\n />\n ),\n whenUploadSecondSide: () => (\n \n setFlowState({\n id: \"ConfirmData\",\n imgSource,\n documentSide: \"SecondSide\",\n })\n }\n />\n ),\n whenConfirmData: ({ imgSource, documentSide }) => (\n {\n foldDocumentSide(\n documentSide,\n () => setFirstImageSource(option.some(imgSource)),\n () => setSecondImageSource(option.some(imgSource))\n );\n\n setFlowState({ id: \"ReviewAndUpload\" });\n }}\n onRetake={() => {\n foldDocumentSide(\n documentSide,\n () => setFlowState({ id: \"UploadFirstSide\" }),\n () => setFlowState({ id: \"UploadSecondSide\" })\n );\n }}\n />\n ),\n whenReviewAndUpload: () => (\n {\n foldDocumentSide(\n documentSide,\n () => setFlowState({ id: \"UploadFirstSide\" }),\n () => setFlowState({ id: \"UploadSecondSide\" })\n );\n }}\n onOpenImage={documentSide => {\n foldDocumentSide(\n documentSide,\n () =>\n setFlowState({\n id: \"ConfirmData\",\n documentSide,\n imgSource: pipe(\n firstImageSource,\n option.getOrElse(() => \"\")\n ),\n }),\n () =>\n setFlowState({\n id: \"ConfirmData\",\n documentSide,\n imgSource: pipe(\n secondImageSource,\n option.getOrElse(() => \"\")\n ),\n })\n );\n }}\n onUpload={pipe(\n onUpload,\n taskEither.mapLeft(() => {\n setFlowState({ id: \"UploadFailed\" });\n })\n )}\n onUploadRejected={pipe(\n proofOfIncomeCancel(),\n taskEither.chain(() =>\n taskEither.fromIO(() => setFlowState({ id: \"UploadRejected\" }))\n )\n )}\n />\n ),\n whenAddNote: () => {\n return (\n {\n if (props.onDocumentCancel) {\n props.onDocumentCancel();\n }\n setFlowState({ id: \"UploadRejected\" });\n }}\n maxLengthNote={252 as PositiveInteger}\n goToUploadedSuccessfully={() => setFlowState({ id: \"Sealing\" })}\n onDocumentConfirm={note =>\n pipe(\n confirmPOIByClient({\n uploadNote: option.isSome(note) ? note.value : \"\",\n }),\n taskEither.mapLeft(\n () => \"GenericError\" as DocumentNoteUploadError\n ),\n taskEither.chain(({ status }) =>\n status === \"OK\"\n ? taskEither.fromIO(() => setFlowState({ id: \"Sealing\" }))\n : taskEither.leftIO(\n () => \"GenericError\" as DocumentNoteUploadError\n )\n )\n )\n }\n fileSizeMax={props.fileSizeMax ? props.fileSizeMax : 10}\n isNoteMandatory={props.isNoteMandatory}\n />\n );\n },\n whenUploadCompleted: () => (\n \n ),\n whenSealing: () => (\n \n setFlowState({ id: \"ConnectionLost\", error: \"GenericError\" })\n }\n onDocumentSealed={() => setFlowState({ id: \"UploadCompleted\" })}\n parameters={props.parameters}\n />\n ),\n whenUploadRejected: () => (\n \n ),\n whenUploadFailed: () => (\n \n ),\n whenConnectionLost: error => (\n \n ),\n });\n}\n","export default __webpack_public_path__ + \"static/media/czPrimaryDark.926699c3.png\";","export default __webpack_public_path__ + \"static/media/czPrimaryGlare.c07041f4.png\";","export default __webpack_public_path__ + \"static/media/czPrimary.b03462ce.png\";","export default __webpack_public_path__ + \"static/media/czSecondaryDark.ceba2ef6.png\";","export default __webpack_public_path__ + \"static/media/czSecondaryGlare.b7566377.png\";","export default __webpack_public_path__ + \"static/media/czSecondary.18daaca3.png\";","export default __webpack_public_path__ + \"static/media/skPrimaryDark.f2af498e.png\";","export default __webpack_public_path__ + \"static/media/skPrimaryGlare.d855a946.png\";","export default __webpack_public_path__ + \"static/media/skPrimary.cf8e0748.png\";","export default __webpack_public_path__ + \"static/media/skSecondaryDark.706bd862.png\";","export default __webpack_public_path__ + \"static/media/skSecondaryGlare.3b59bbba.png\";","export default __webpack_public_path__ + \"static/media/skSecondary.f89c6480.png\";","export default __webpack_public_path__ + \"static/media/livenesscheck_ok.f3629199.png\";","export default __webpack_public_path__ + \"static/media/livenesscheck_dark.5c03c0ff.png\";","export default __webpack_public_path__ + \"static/media/livenesscheck_partial.9215bac8.png\";","export default __webpack_public_path__ + \"static/media/livenesscheck_sunglasses.77b702aa.png\";","import \"!../../../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js!css-loader?{\\\"modules\\\":false,\\\"url\\\":false}!./StickyBottomContainer.treat.jdUFFhW.css\";\nexport var bottomActionContainer = '_2Bg_r';","import \"!../../../../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js!css-loader?{\\\"modules\\\":false,\\\"url\\\":false}!./ReviewAndUpload.treat.xikrG0I.css\";\nexport var container = '_120vx';","import { Box, FeedbackBlock } from \"design-system\";\nimport { option } from \"fp-ts\";\nimport { useFormatMessage } from \"../../../intl\";\nimport { usePollingEffect } from \"../../../useAPI\";\nimport * as documentApi from \"../../../MortgageDashboard/Documents/api\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\nimport { Option } from \"fp-ts/Option\";\nimport { pipe } from \"fp-ts/function\";\n\ntype Props = {\n onError: () => void;\n onDocumentSealed: () => void;\n parameters: Option<{\n docTypeId: Option;\n applicationElementID: Option;\n }>;\n};\n\nexport const SealingProofOfIncome = (props: Props) => {\n const formatMessage = useFormatMessage();\n\n const docTypeId = pipe(\n props.parameters,\n option.fold(\n () => option.none,\n parameters => parameters.docTypeId\n ),\n option.fold(\n () => \"\",\n docTypeId => docTypeId\n )\n );\n\n const appElementId = pipe(\n props.parameters,\n option.fold(\n () => option.none,\n parameters => parameters.applicationElementID\n ),\n option.fold(\n () => \"\",\n appElementId => appElementId\n )\n );\n\n usePollingEffect(\n documentApi.ProofOfIncomeSealingStatus,\n {\n disabled: false,\n intervalMS: 5000,\n shouldPollingContinue: ({ status }) =>\n status === \"unsealed\" || status === \"sealing\",\n onError: () => props.onError(),\n onSuccess: ({ status }) => {\n if (status === \"sealed\") {\n props.onDocumentSealed();\n }\n if (status === \"unsealed\" || status === \"sealing\") {\n return;\n }\n },\n },\n {\n docTypeId: docTypeId as NonEmptyString,\n appElementId: appElementId as NonEmptyString,\n }\n );\n\n return (\n \n \n \n );\n};\n","import { useFormatMessage } from \"../intl\";\nimport { useCommand } from \"../useAPI\";\nimport { FilePDFDialog } from \"../Common/Dialogs/FilePDFDialog/FilePDFDialog\";\nimport * as documentAPI from \"../Common/documentAPI\";\nimport { pipe } from \"fp-ts/function\";\nimport { taskEither } from \"fp-ts\";\n\ntype Props = {\n onDismiss: () => unknown;\n};\n\nexport function BiometricConsentInfoDialog(props: Props) {\n const formatMessage = useFormatMessage();\n\n const personalDataProcessingTemplates = useCommand(documentAPI.templates);\n const personalDataProcessingContent = useCommand(documentAPI.content);\n\n return (\n \n personalDataProcessingContent({ docId: items[0].docId })\n )\n )}\n />\n );\n}\n","import { useFormatMessage } from \"../intl\";\nimport { taskEither } from \"fp-ts\";\nimport { FileImageDialog } from \"../Common/Dialogs/FileImageDialog\";\nimport { CompressedFileContent } from \"../globalDomain\";\nimport { NonEmptyString } from \"io-ts-types/lib/NonEmptyString\";\n\nexport type DocumentPreview = {\n fileName: NonEmptyString;\n fileContent: CompressedFileContent;\n};\n\ntype Props = {\n document: DocumentPreview;\n onDismiss: () => unknown;\n};\n\nexport function DocumentPreviewDialog(props: Props) {\n const formatMessage = useFormatMessage();\n\n return (\n \n );\n}\n"],"sourceRoot":""}