{"ast":null,"code":"import { Config } from 'common/Config';\nimport { FaceTecSDK } from 'core-sdk/FaceTecSDK.js/FaceTecSDK';\nimport { FaceMapAppUtillities } from './faceMapAppUtilities';\nexport const ThemeHelpers = () => {\n  var currentTheme = \"Sample Bank\";\n  var themeResourceDirectory = \"resources/themes/\";\n\n  function setAppTheme(theme) {\n    Config.currentCustomization = getCustomizationForTheme(theme);\n    var currentLowLightCustomization = getLowLightCustomizationForTheme(theme);\n    FaceTecSDK.setCustomization(Config.currentCustomization);\n    FaceTecSDK.setLowLightCustomization(currentLowLightCustomization);\n  }\n\n  function getCustomizationForTheme(theme = 'Sample Bank') {\n    var currentCustomization = new FaceTecSDK.FaceTecCustomization();\n\n    if (FaceMapAppUtillities.isLikelyMobileDevice()) {\n      // using strings with breaks for Ready Screen text on mobile devices\n      currentCustomization.guidanceCustomization.readyScreenHeaderAttributedString = \"Get Ready For<br/>Your Video Selfie\";\n      currentCustomization.guidanceCustomization.readyScreenSubtextAttributedString = \"Please Frame Your Face In<br/>The Small Oval, Then The Big Oval\";\n    }\n\n    var retryScreenSlideshowImages = [themeResourceDirectory + \"FaceTec_ideal_1.png\", themeResourceDirectory + \"FaceTec_ideal_2.png\", themeResourceDirectory + \"FaceTec_ideal_3.png\", themeResourceDirectory + \"FaceTec_ideal_4.png\", themeResourceDirectory + \"FaceTec_ideal_5.png\"];\n    var primaryColor = \"#03224c\";\n    var primaryColorDark = \"#000025\";\n    var backgroundColor = \"white\"; // navy\n\n    var font = \"'Source Sans Pro', Helvetica, sans-serif\"; // Initial Loading Animation Customization\n\n    currentCustomization.initialLoadingAnimationCustomization.customAnimation = null;\n    currentCustomization.initialLoadingAnimationCustomization.animationRelativeScale = 1.0;\n    currentCustomization.initialLoadingAnimationCustomization.backgroundColor = primaryColor;\n    currentCustomization.initialLoadingAnimationCustomization.foregroundColor = backgroundColor;\n    currentCustomization.initialLoadingAnimationCustomization.messageTextColor = primaryColor;\n    currentCustomization.initialLoadingAnimationCustomization.messageFont = font;\n    currentCustomization.initialLoadingAnimationCustomization.messageTextSpacing = \"normal\";\n    currentCustomization.initialLoadingAnimationCustomization.messageTextSize = \"16px\"; // Overlay Customization\n\n    currentCustomization.overlayCustomization.backgroundColor = backgroundColor;\n    currentCustomization.overlayCustomization.showBrandingImage = true;\n    currentCustomization.overlayCustomization.brandingImage = themeResourceDirectory + \"sample-bank/sample_bank_logo.png\"; // Guidance Customization\n\n    currentCustomization.guidanceCustomization.backgroundColors = backgroundColor;\n    currentCustomization.guidanceCustomization.foregroundColor = primaryColor;\n    currentCustomization.guidanceCustomization.headerFont = font;\n    currentCustomization.guidanceCustomization.headerTextSpacing = \"normal\";\n    currentCustomization.guidanceCustomization.headerTextSize = \"20px\";\n    currentCustomization.guidanceCustomization.subtextFont = font;\n    currentCustomization.guidanceCustomization.subtextTextSpacing = \"normal\";\n    currentCustomization.guidanceCustomization.subtextTextSize = \"12px\";\n    currentCustomization.guidanceCustomization.buttonFont = font;\n    currentCustomization.guidanceCustomization.buttonTextSpacing = \"normal\";\n    currentCustomization.guidanceCustomization.buttonTextSize = \"16px\";\n    currentCustomization.guidanceCustomization.buttonTextNormalColor = backgroundColor;\n    currentCustomization.guidanceCustomization.buttonBackgroundNormalColor = primaryColor;\n    currentCustomization.guidanceCustomization.buttonTextHighlightColor = backgroundColor;\n    currentCustomization.guidanceCustomization.buttonBackgroundHighlightColor = primaryColorDark;\n    currentCustomization.guidanceCustomization.buttonTextDisabledColor = \"rgba(29, 23, 79, 0.3)\";\n    currentCustomization.guidanceCustomization.buttonBackgroundDisabledColor = primaryColor;\n    currentCustomization.guidanceCustomization.buttonBorderColor = backgroundColor;\n    currentCustomization.guidanceCustomization.buttonBorderWidth = \"2px\";\n    currentCustomization.guidanceCustomization.buttonCornerRadius = \"2px\";\n    currentCustomization.guidanceCustomization.buttonRelativeWidth = \"1.0\";\n    currentCustomization.guidanceCustomization.buttonRelativeWidthOnDesktop = \"0.5\";\n    currentCustomization.guidanceCustomization.readyScreenOvalFillColor = \"rgba(255, 255, 255, 0.2)\";\n    currentCustomization.guidanceCustomization.readyScreenTextBackgroundColor = backgroundColor;\n    currentCustomization.guidanceCustomization.readyScreenTextBackgroundCornerRadius = \"2px\";\n    currentCustomization.guidanceCustomization.retryScreenImageBorderColor = primaryColor;\n    currentCustomization.guidanceCustomization.retryScreenImageBorderWidth = \"2px\";\n    currentCustomization.guidanceCustomization.retryScreenImageCornerRadius = \"2px\";\n    currentCustomization.guidanceCustomization.retryScreenOvalStrokeColor = primaryColor;\n    currentCustomization.guidanceCustomization.retryScreenSlideshowImages = retryScreenSlideshowImages;\n    currentCustomization.guidanceCustomization.retryScreenSlideshowInterval = \"1500ms\";\n    currentCustomization.guidanceCustomization.enableRetryScreenSlideshowShuffle = false;\n    currentCustomization.guidanceCustomization.enableRetryScreenBulletedInstructions = true;\n    currentCustomization.guidanceCustomization.cameraPermissionsScreenImage = themeResourceDirectory + \"sample-bank/camera_white_navy.png\"; // ID Scan Customization\n\n    currentCustomization.idScanCustomization.showSelectionScreenBrandingImage = false;\n    currentCustomization.idScanCustomization.selectionScreenBrandingImage = \"\";\n    currentCustomization.idScanCustomization.selectionScreenBackgroundColors = backgroundColor;\n    currentCustomization.idScanCustomization.reviewScreenBackgroundColors = backgroundColor;\n    currentCustomization.idScanCustomization.captureScreenForegroundColor = backgroundColor;\n    currentCustomization.idScanCustomization.reviewScreenForegroundColor = backgroundColor;\n    currentCustomization.idScanCustomization.selectionScreenForegroundColor = primaryColor;\n    currentCustomization.idScanCustomization.headerFont = font;\n    currentCustomization.idScanCustomization.headerTextSpacing = \"normal\";\n    currentCustomization.idScanCustomization.headerTextSize = \"20px\";\n    currentCustomization.idScanCustomization.subtextFont = font;\n    currentCustomization.idScanCustomization.subtextTextSpacing = \"normal\";\n    currentCustomization.idScanCustomization.subtextTextSize = \"12px\";\n    currentCustomization.idScanCustomization.buttonFont = font;\n    currentCustomization.idScanCustomization.buttonTextSpacing = \"normal\";\n    currentCustomization.idScanCustomization.buttonTextSize = \"16px\";\n    currentCustomization.idScanCustomization.buttonTextNormalColor = backgroundColor;\n    currentCustomization.idScanCustomization.buttonBackgroundNormalColor = primaryColor;\n    currentCustomization.idScanCustomization.buttonTextHighlightColor = backgroundColor;\n    currentCustomization.idScanCustomization.buttonBackgroundHighlightColor = \"rgba(255, 255, 255, 0.8)\";\n    currentCustomization.idScanCustomization.buttonTextDisabledColor = \"rgba(29, 23, 79, 0.3)\";\n    currentCustomization.idScanCustomization.buttonBackgroundDisabledColor = primaryColor;\n    currentCustomization.idScanCustomization.buttonBorderColor = backgroundColor;\n    currentCustomization.idScanCustomization.buttonBorderWidth = \"2px\";\n    currentCustomization.idScanCustomization.buttonCornerRadius = \"2px\";\n    currentCustomization.idScanCustomization.buttonRelativeWidth = \"1.0\";\n    currentCustomization.idScanCustomization.buttonRelativeWidthOnDesktop = \"0.5\";\n    currentCustomization.idScanCustomization.captureScreenTextBackgroundColor = primaryColor;\n    currentCustomization.idScanCustomization.captureScreenTextBackgroundBorderColor = backgroundColor;\n    currentCustomization.idScanCustomization.captureScreenTextBackgroundBorderWidth = \"2px\";\n    currentCustomization.idScanCustomization.captureScreenTextBackgroundCornerRadius = \"2px\";\n    currentCustomization.idScanCustomization.reviewScreenTextBackgroundColor = primaryColor;\n    currentCustomization.idScanCustomization.reviewScreenTextBackgroundBorderColor = backgroundColor;\n    currentCustomization.idScanCustomization.reviewScreenTextBackgroundBorderWidth = \"2px\";\n    currentCustomization.idScanCustomization.reviewScreenTextBackgroundBorderCornerRadius = \"2px\";\n    currentCustomization.idScanCustomization.captureScreenBackgroundColor = backgroundColor;\n    currentCustomization.idScanCustomization.captureFrameStrokeColor = primaryColor;\n    currentCustomization.idScanCustomization.captureFrameStrokeWidth = \"2px\";\n    currentCustomization.idScanCustomization.captureFrameCornerRadius = \"12px\"; // Result Screen Customization\n\n    currentCustomization.resultScreenCustomization.backgroundColors = backgroundColor;\n    currentCustomization.resultScreenCustomization.foregroundColor = primaryColor;\n    currentCustomization.resultScreenCustomization.messageFont = font;\n    currentCustomization.resultScreenCustomization.messageTextSpacing = \"normal\";\n    currentCustomization.resultScreenCustomization.messageTextSize = \"16px\";\n    currentCustomization.resultScreenCustomization.activityIndicatorColor = primaryColor;\n    currentCustomization.resultScreenCustomization.customActivityIndicatorImage = themeResourceDirectory + \"sample-bank/activity_indicator_navy.png\";\n    currentCustomization.resultScreenCustomization.customActivityIndicatorRotationInterval = \"1s\";\n    currentCustomization.resultScreenCustomization.customActivityIndicatorAnimation = null;\n    currentCustomization.resultScreenCustomization.resultAnimationBackgroundColor = \"transparent\";\n    currentCustomization.resultScreenCustomization.resultAnimationForegroundColor = primaryColor;\n    currentCustomization.resultScreenCustomization.resultAnimationSuccessBackgroundImage = themeResourceDirectory + \"sample-bank/reticle_navy.png\";\n    currentCustomization.resultScreenCustomization.resultAnimationUnsuccessBackgroundImage = themeResourceDirectory + \"sample-bank/reticle_navy.png\";\n    currentCustomization.resultScreenCustomization.customResultAnimationSuccess = null;\n    currentCustomization.resultScreenCustomization.customResultAnimationUnsuccess = null;\n    currentCustomization.resultScreenCustomization.showUploadProgressBar = true;\n    currentCustomization.resultScreenCustomization.uploadProgressTrackColor = \"rgba(255, 255, 255, 0.2)\";\n    currentCustomization.resultScreenCustomization.uploadProgressFillColor = primaryColor;\n    currentCustomization.resultScreenCustomization.animationRelativeScale = 1.0; // Feedback Customization\n\n    currentCustomization.feedbackCustomization.backgroundColor = primaryColor;\n    currentCustomization.feedbackCustomization.textColor = backgroundColor;\n    currentCustomization.feedbackCustomization.textFont = font;\n    currentCustomization.feedbackCustomization.textSpacing = \"normal\";\n    currentCustomization.feedbackCustomization.textSize = \"18px\";\n    currentCustomization.feedbackCustomization.cornerRadius = \"2px\";\n    currentCustomization.feedbackCustomization.shadow = \"none\";\n    currentCustomization.feedbackCustomization.relativeWidth = \"1.0\";\n    currentCustomization.feedbackCustomization.relativeWidthOnDesktop = \"0.5\"; // Frame Customization\n\n    currentCustomization.frameCustomization.backgroundColor = backgroundColor;\n    currentCustomization.frameCustomization.borderColor = backgroundColor;\n    currentCustomization.frameCustomization.borderWidth = \"2px\";\n    currentCustomization.frameCustomization.borderCornerRadius = \"2px\";\n    currentCustomization.frameCustomization.shadow = \"none\"; // Oval Customization\n\n    currentCustomization.ovalCustomization.strokeColor = primaryColor;\n    currentCustomization.ovalCustomization.progressColor1 = \"rgba(255, 255, 255, 0.8)\";\n    currentCustomization.ovalCustomization.progressColor2 = \"rgba(255, 255, 255, 0.8)\"; // Cancel Button Customization\n\n    currentCustomization.cancelButtonCustomization.customImage = themeResourceDirectory + \"sample-bank/cancel_navy.png\";\n    currentCustomization.cancelButtonCustomization.location = FaceTecSDK.FaceTecCancelButtonLocation.TopLeft;\n    return currentCustomization;\n  }\n\n  function getLowLightCustomizationForTheme(theme) {\n    var currentLowLightCustomization = getCustomizationForTheme(theme);\n    var retryScreenSlideshowImages = [themeResourceDirectory + \"FaceTec_ideal_1.png\", themeResourceDirectory + \"FaceTec_ideal_2.png\", themeResourceDirectory + \"FaceTec_ideal_3.png\", themeResourceDirectory + \"FaceTec_ideal_4.png\", themeResourceDirectory + \"FaceTec_ideal_5.png\"];\n    var primaryColor = \"white\";\n    var backgroundColor = \"rgb(29, 23, 79)\"; // navy\n    // Overlay Customization\n\n    currentLowLightCustomization.overlayCustomization.brandingImage = themeResourceDirectory + \"sample-bank/sample_bank_logo.png\"; // Guidance Customization\n\n    currentLowLightCustomization.guidanceCustomization.foregroundColor = backgroundColor;\n    currentLowLightCustomization.guidanceCustomization.buttonTextNormalColor = primaryColor;\n    currentLowLightCustomization.guidanceCustomization.buttonBackgroundNormalColor = backgroundColor;\n    currentLowLightCustomization.guidanceCustomization.buttonTextHighlightColor = primaryColor;\n    currentLowLightCustomization.guidanceCustomization.buttonBackgroundHighlightColor = \"rgba(29, 23, 79, 0.8)\";\n    currentLowLightCustomization.guidanceCustomization.buttonTextDisabledColor = \"rgba(255, 255, 255, 0.3)\";\n    currentLowLightCustomization.guidanceCustomization.buttonBackgroundDisabledColor = backgroundColor;\n    currentLowLightCustomization.guidanceCustomization.buttonBorderColor = backgroundColor;\n    currentLowLightCustomization.guidanceCustomization.readyScreenOvalFillColor = \"rgba(255, 255, 255, 0.2)\";\n    currentLowLightCustomization.guidanceCustomization.readyScreenTextBackgroundColor = primaryColor;\n    currentLowLightCustomization.guidanceCustomization.retryScreenImageBorderColor = backgroundColor;\n    currentLowLightCustomization.guidanceCustomization.retryScreenOvalStrokeColor = primaryColor;\n    currentLowLightCustomization.guidanceCustomization.retryScreenSlideshowImages = retryScreenSlideshowImages; // ID Scan Customization\n\n    currentLowLightCustomization.idScanCustomization.selectionScreenBrandingImage = \"\";\n    currentLowLightCustomization.idScanCustomization.captureScreenForegroundColor = backgroundColor;\n    currentLowLightCustomization.idScanCustomization.reviewScreenForegroundColor = backgroundColor;\n    currentLowLightCustomization.idScanCustomization.selectionScreenForegroundColor = backgroundColor;\n    currentLowLightCustomization.idScanCustomization.buttonTextNormalColor = primaryColor;\n    currentLowLightCustomization.idScanCustomization.buttonBackgroundNormalColor = backgroundColor;\n    currentLowLightCustomization.idScanCustomization.buttonTextHighlightColor = primaryColor;\n    currentLowLightCustomization.idScanCustomization.buttonBackgroundHighlightColor = \"rgba(29, 23, 79, 0.8)\";\n    currentLowLightCustomization.idScanCustomization.buttonTextDisabledColor = \"rgba(255, 255, 255, 0.3)\";\n    currentLowLightCustomization.idScanCustomization.buttonBackgroundDisabledColor = backgroundColor;\n    currentLowLightCustomization.idScanCustomization.buttonBorderColor = backgroundColor;\n    currentLowLightCustomization.idScanCustomization.captureScreenTextBackgroundColor = primaryColor;\n    currentLowLightCustomization.idScanCustomization.captureScreenTextBackgroundBorderColor = backgroundColor;\n    currentLowLightCustomization.idScanCustomization.reviewScreenTextBackgroundColor = primaryColor;\n    currentLowLightCustomization.idScanCustomization.reviewScreenTextBackgroundBorderColor = backgroundColor;\n    currentLowLightCustomization.idScanCustomization.captureFrameStrokeColor = primaryColor; // Result Screen Customization\n\n    currentLowLightCustomization.resultScreenCustomization.foregroundColor = backgroundColor;\n    currentLowLightCustomization.resultScreenCustomization.activityIndicatorColor = backgroundColor;\n    currentLowLightCustomization.resultScreenCustomization.customActivityIndicatorImage = themeResourceDirectory + \"sample-bank/activity_indicator_navy.png\";\n    currentLowLightCustomization.resultScreenCustomization.customActivityIndicatorAnimation = null;\n    currentLowLightCustomization.resultScreenCustomization.resultAnimationBackgroundColor = \"transparent\";\n    currentLowLightCustomization.resultScreenCustomization.resultAnimationForegroundColor = backgroundColor;\n    currentLowLightCustomization.resultScreenCustomization.resultAnimationSuccessBackgroundImage = themeResourceDirectory + \"sample-bank/reticle_navy.png\";\n    currentLowLightCustomization.resultScreenCustomization.resultAnimationUnsuccessBackgroundImage = themeResourceDirectory + \"sample-bank/reticle_navy.png\";\n    currentLowLightCustomization.resultScreenCustomization.customResultAnimationSuccess = null;\n    currentLowLightCustomization.resultScreenCustomization.customResultAnimationUnsuccess = null;\n    currentLowLightCustomization.resultScreenCustomization.uploadProgressTrackColor = \"rgba(0, 0, 0, 0.2)\";\n    currentLowLightCustomization.resultScreenCustomization.uploadProgressFillColor = backgroundColor; // Feedback Customization\n\n    currentLowLightCustomization.feedbackCustomization.backgroundColor = backgroundColor;\n    currentLowLightCustomization.feedbackCustomization.textColor = primaryColor; // Frame Customization\n\n    currentLowLightCustomization.frameCustomization.borderColor = backgroundColor; // Oval Customization\n\n    currentLowLightCustomization.ovalCustomization.strokeColor = backgroundColor;\n    currentLowLightCustomization.ovalCustomization.progressColor1 = \"rgba(29, 23, 79, 0.8)\";\n    currentLowLightCustomization.ovalCustomization.progressColor2 = \"rgba(29, 23, 79, 0.8)\"; // Cancel Button Customization\n\n    currentLowLightCustomization.cancelButtonCustomization.customImage = themeResourceDirectory + \"sample-bank/cancel_navy.png\";\n    return currentLowLightCustomization;\n  }\n\n  setAppTheme();\n};","map":null,"metadata":{},"sourceType":"module"}