@smileid/web-components 11.4.0 → 11.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/DocumentCaptureScreens-wvJcTVkA.js +4147 -0
- package/dist/esm/DocumentCaptureScreens-wvJcTVkA.js.map +1 -0
- package/dist/esm/{EndUserConsent-BGO3oZ-m.js → EndUserConsent-BXvS7t8z.js} +4 -4
- package/dist/esm/{EndUserConsent-BGO3oZ-m.js.map → EndUserConsent-BXvS7t8z.js.map} +1 -1
- package/dist/esm/Navigation-BRFmg7s1.js +138 -0
- package/dist/esm/Navigation-BRFmg7s1.js.map +1 -0
- package/dist/esm/{SelfieCaptureScreens-bmwnmeS9.js → SelfieCaptureScreens-BkJBfzHv.js} +2498 -2960
- package/dist/esm/SelfieCaptureScreens-BkJBfzHv.js.map +1 -0
- package/dist/esm/{TotpConsent-V3_Ip2Kw.js → TotpConsent-Cn2DkVza.js} +2 -2
- package/dist/esm/{TotpConsent-V3_Ip2Kw.js.map → TotpConsent-Cn2DkVza.js.map} +1 -1
- package/dist/esm/combobox.js +14 -16
- package/dist/esm/combobox.js.map +1 -1
- package/dist/esm/document.js +1 -1
- package/dist/esm/end-user-consent.js +1 -1
- package/dist/esm/{index-Dnpp-kwk.js → index-DBUdxnp9.js} +57 -57
- package/dist/esm/{index-Dnpp-kwk.js.map → index-DBUdxnp9.js.map} +1 -1
- package/dist/esm/localisation.js +1 -1
- package/dist/esm/main.js +6 -6
- package/dist/esm/navigation.js +1 -1
- package/dist/esm/package-Dax8ezDK.js +565 -0
- package/dist/esm/package-Dax8ezDK.js.map +1 -0
- package/dist/esm/selfie.js +1 -1
- package/dist/esm/smart-camera-web.js +16 -11
- package/dist/esm/smart-camera-web.js.map +1 -1
- package/dist/esm/{styles-BOEZtbuc.js → styles-BTEClL7R.js} +2 -2
- package/dist/esm/{styles-BOEZtbuc.js.map → styles-BTEClL7R.js.map} +1 -1
- package/dist/esm/totp-consent.js +1 -1
- package/dist/smart-camera-web.js +445 -178
- package/dist/smart-camera-web.js.map +1 -1
- package/dist/types/main.d.ts +183 -33
- package/lib/components/combobox/src/Combobox.js +14 -12
- package/lib/components/document/src/DocumentCaptureScreens.js +15 -5
- package/lib/components/document/src/assets/icons/guidelines/greenbook/good.svg +77 -0
- package/lib/components/document/src/assets/icons/guidelines/greenbook/not-blurry.svg +84 -0
- package/lib/components/document/src/assets/icons/guidelines/greenbook/not-cropped.svg +83 -0
- package/lib/components/document/src/assets/icons/guidelines/greenbook/not-reflective.svg +89 -0
- package/lib/components/document/src/assets/icons/guidelines/id-card/good.svg +87 -0
- package/lib/components/document/src/assets/icons/guidelines/id-card/not-blurry.svg +100 -0
- package/lib/components/document/src/assets/icons/guidelines/id-card/not-cropped.svg +93 -0
- package/lib/components/document/src/assets/icons/guidelines/id-card/not-reflective.svg +98 -0
- package/lib/components/document/src/assets/icons/guidelines/passport/good.svg +91 -0
- package/lib/components/document/src/assets/icons/guidelines/passport/not-blurry.svg +109 -0
- package/lib/components/document/src/assets/icons/guidelines/passport/not-cropped.svg +102 -0
- package/lib/components/document/src/assets/icons/guidelines/passport/not-reflective.svg +207 -0
- package/lib/components/document/src/assets/lottie/taking photo of ID FLIP 2D.lottie +0 -0
- package/lib/components/document/src/assets/lottie/taking photo of ID.lottie +0 -0
- package/lib/components/document/src/assets/lottie/taking photo of green book passport.lottie +0 -0
- package/lib/components/document/src/assets/lottie/taking photo of passport 2.lottie +0 -0
- package/lib/components/document/src/document-capture-instructions/DocumentCaptureInstructions.stories.js +123 -12
- package/lib/components/document/src/document-capture-instructions/DocumentCaptureInstructions.tsx +808 -0
- package/lib/components/document/src/document-capture-instructions/index.js +1 -0
- package/lib/components/navigation/src/Navigation.js +57 -56
- package/lib/components/navigation/src/Navigation.stories.js +7 -0
- package/lib/components/signature-pad/package-lock.json +11 -9
- package/lib/components/signature-pad/package.json +1 -1
- package/lib/components/smart-camera-web/src/SmartCameraWeb.js +7 -1
- package/lib/styles/src/styles.js +1 -1
- package/package.json +4 -3
- package/dist/README.md +0 -15
- package/dist/components/README.md +0 -14
- package/dist/components/document/src/README.md +0 -111
- package/dist/components/document/src/document-capture/README.md +0 -90
- package/dist/components/document/src/document-capture-instructions/README.md +0 -56
- package/dist/components/document/src/document-capture-review/README.md +0 -79
- package/dist/components/selfie/README.md +0 -225
- package/dist/components/smart-camera-web/src/README.md +0 -206
- package/dist/domain/camera/src/README.md +0 -38
- package/dist/domain/file-upload/README.md +0 -35
- package/dist/esm/DocumentCaptureScreens-DbU8ZxMx.js +0 -1580
- package/dist/esm/DocumentCaptureScreens-DbU8ZxMx.js.map +0 -1
- package/dist/esm/Navigation-DH44dkMT.js +0 -144
- package/dist/esm/Navigation-DH44dkMT.js.map +0 -1
- package/dist/esm/SelfieCaptureScreens-bmwnmeS9.js.map +0 -1
- package/dist/esm/package-7J5h4EOW.js +0 -90
- package/dist/esm/package-7J5h4EOW.js.map +0 -1
- package/dist/package-lock.json +0 -4948
- package/dist/package.json +0 -59
- package/dist/smart-camera-web.js.gz +0 -0
- package/dist/src/components/combobox/src/index.js +0 -425
- package/dist/src/components/combobox/src/index.js.map +0 -7
- package/dist/src/components/document/src/index.js +0 -1423
- package/dist/src/components/document/src/index.js.map +0 -7
- package/dist/src/components/end-user-consent/src/index.js +0 -1586
- package/dist/src/components/end-user-consent/src/index.js.map +0 -7
- package/dist/src/components/selfie/src/index.js +0 -1221
- package/dist/src/components/selfie/src/index.js.map +0 -7
- package/dist/src/components/signature-pad/src/index.js +0 -796
- package/dist/src/components/signature-pad/src/index.js.map +0 -7
- package/dist/src/components/smart-camera-web/src/SmartCameraWeb.js +0 -2754
- package/dist/src/components/smart-camera-web/src/SmartCameraWeb.js.map +0 -7
- package/dist/src/components/totp-consent/src/index.js +0 -1305
- package/dist/src/components/totp-consent/src/index.js.map +0 -7
- package/dist/src/index.js.map +0 -7
- package/dist/styles/README.md +0 -3
- package/dist/types/document-auto-capture.d.ts +0 -34
- package/dist/types/locale.d.ts +0 -19
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/domain/constants/src/Constants.js", "../../../../../src/domain/camera/src/SmartCamera.js", "../../../../../src/styles/src/typography.js", "../../../../../src/styles/src/styles.js", "../../../../../package.json", "../../../../../src/components/navigation/src/Navigation.js", "../../../../../src/components/selfie/src/selfie-capture/SelfieCapture.js", "../../../../../src/components/selfie/src/selfie-capture-instructions/SelfieCaptureInstructions.js", "../../../../../src/components/selfie/src/selfie-capture-review/SelfieCaptureReview.js", "../../../../../src/components/selfie/src/SelfieCaptureScreens.js", "../../../../../src/components/selfie/src/index.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * The type of image submitted in the job request\n * @readonly\n * @enum {number}\n */\nexport const IMAGE_TYPE = {\n /** ID_CARD_BACK_IMAGE_BASE64 Base64 encoded back of ID card image (.jpg or .png) */\n ID_CARD_BACK_IMAGE_BASE64: 7,\n /** ID_CARD_BACK_IMAGE_FILE Back of ID card image in .png or .jpg file format */\n ID_CARD_BACK_IMAGE_FILE: 5,\n /** ID_CARD_IMAGE_BASE64 Base64 encoded ID card image (.png or .jpg) */\n ID_CARD_IMAGE_BASE64: 3,\n /** ID_CARD_IMAGE_FILE ID card image in .png or .jpg file format */\n ID_CARD_IMAGE_FILE: 1,\n /** LIVENESS_IMAGE_BASE64 Base64 encoded liveness image (.jpg or .png) */\n LIVENESS_IMAGE_BASE64: 6,\n /** LIVENESS_IMAGE_FILE Liveness image in .png or .jpg file format */\n LIVENESS_IMAGE_FILE: 4,\n /** SELFIE_IMAGE_BASE64 Base64 encoded selfie image (.png or .jpg) */\n SELFIE_IMAGE_BASE64: 2,\n /** SELFIE_IMAGE_FILE Selfie image in .png or .jpg file format */\n SELFIE_IMAGE_FILE: 0,\n};\n\nexport const DEFAULT_NO_OF_LIVENESS_FRAMES = 8;\nexport const PORTRAIT_ID_PREVIEW_WIDTH = 396;\nexport const PORTRAIT_ID_PREVIEW_HEIGHT = 527;\n", "class SmartCamera {\n static stream = null;\n\n static async getMedia(constraints) {\n SmartCamera.stream = await navigator.mediaDevices.getUserMedia(constraints);\n return SmartCamera.stream;\n }\n\n static environmentOptions = {\n facingMode: 'environment',\n height: {\n ideal: 1080,\n max: 1440,\n min: 720,\n },\n width: {\n ideal: 1920,\n max: 2560,\n min: 1280,\n },\n // NOTE: Special case for multi-camera Samsung devices (learnt from Acuant)\n // \"We found out that some triple camera Samsung devices (S10, S20, Note 20, etc) capture images blurry at edges.\n // Zooming to 2X, matching the telephoto lens, doesn't solve it completely but mitigates it.\"\n zoom: SmartCamera.isSamsungMultiCameraDevice() ? 2.0 : 1.0,\n };\n\n static stopMedia() {\n if (SmartCamera.stream) {\n SmartCamera.stream.getTracks().forEach((track) => track.stop());\n SmartCamera.stream = null;\n }\n }\n\n static async supportsAgentMode() {\n try {\n const devices = await navigator.mediaDevices.enumerateDevices();\n const videoDevices = devices.filter(\n (device) => device.kind === 'videoinput',\n );\n\n let hasBackCamera = false;\n\n videoDevices.forEach((device) => {\n // Check if the device label or device ID indicates a back camera\n if (\n device.label.toLowerCase().includes('back') ||\n device.label.toLowerCase().includes('rear')\n ) {\n hasBackCamera = true;\n return true;\n }\n return false;\n });\n\n return hasBackCamera;\n } catch (error) {\n console.warn('Error accessing media devices: ', error);\n return false;\n }\n }\n\n static isSamsungMultiCameraDevice() {\n const matchedModelNumber = navigator.userAgent.match(/SM-[N|G]\\d{3}/);\n if (!matchedModelNumber) {\n return false;\n }\n\n const modelNumber = parseInt(matchedModelNumber[0].match(/\\d{3}/)[0], 10);\n const smallerModelNumber = 970; // S10e\n return !Number.isNaN(modelNumber) && modelNumber >= smallerModelNumber;\n }\n\n static handleCameraError(e) {\n switch (e.name) {\n case 'NotAllowedError':\n case 'SecurityError':\n return `\n Looks like camera access was not granted, or was blocked by a browser\n level setting / extension. Please follow the prompt from the URL bar,\n or extensions, and enable access.\n You may need to refresh to start all over again\n `;\n case 'AbortError':\n return `\n Oops! Something happened, and we lost access to your stream.\n Please refresh to start all over again\n `;\n case 'NotReadableError':\n return `\n There seems to be a problem with your device's camera, or its connection.\n Please check this, and when resolved, try again. Or try another device.\n `;\n case 'NotFoundError':\n return `\n We are unable to find a video stream.\n You may need to refresh to start all over again\n `;\n case 'TypeError':\n return `\n This site is insecure, and as such cannot have access to your camera.\n Try to navigate to a secure version of this page, or contact the owner.\n `;\n default:\n return e.message;\n }\n }\n}\n\nexport default SmartCamera;\n", "const typography = `\n .text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n }\n .text-sm {\n font-size: 0.875rem;\n line-height: 1.125rem;\n }\n .text-base {\n font-size: 1rem;\n line-height: 1rem;\n }\n .text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n }\n .text-xl {\n font-size: 1.25rem;\n line-height: 1.75rem;\n }\n .text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n }\n .text-3xl {\n font-size: 1.875rem;\n line-height: 2.25rem;\n }\n .text-4xl {\n font-size: 2rem;\n line-height: 2.5rem;\n }\n .text-5xl {\n font-size: 2.25rem;\n line-height: 2.5rem;\n }\n .font-bold {\n font-weight: 700;\n }\n .font-semibold {\n font-weight: 600;\n }\n .font-medium {\n font-weight: 500;\n }\n .font-normal {\n font-weight: 400;\n }\n`;\n\nexport default typography;\n", "import typography from './typography';\n\nconst styles = (\n themeColor,\n) => `<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" />\n<link\n href=\"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap\"\n rel=\"stylesheet\"\n as=\"style\"\n/>\n<style>\n${typography}\n:host {\n --theme-color: ${themeColor || '#001096'};\n --color-active: #001096;\n --color-default: #2d2b2a;\n --color-disabled: #848282;\n --web-digital-blue: #001096;\n }\n\n * {\n font-family: \"DM Sans\", sans-serif;\n }\n\n [hidden] {\n display: none !important;\n }\n\n [disabled] {\n cursor: not-allowed !important;\n filter: grayscale(75%);\n }\n\n .visually-hidden {\n border: 0;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n height: auto;\n margin: 0;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n }\n\n img {\n height: auto;\n max-width: 100%;\n }\n\n video {\n background-color: black;\n }\n\n a {\n color: currentColor;\n text-decoration: none;\n }\n\n svg {\n max-width: 100%;\n }\n\n .color-gray {\n color: #797979;\n }\n\n .color-red {\n color: red;\n }\n\n .color-richblue {\n color: #4e6577;\n }\n\n .color-richblue-shade {\n color: #0e1b42;\n }\n\n .color-digital-blue {\n color: var(--web-digital-blue) !important;\n }\n\n .color-deep-blue {\n color: #001096;\n }\n\n .title-color {\n color: ${themeColor || '#001096'};\n }\n \n .theme-color {\n color: ${themeColor || '#001096'};\n }\n\n .center {\n text-align: center;\n margin-left: auto;\n margin-right: auto;\n }\n\n .font-size-small {\n font-size: 0.75rem;\n }\n\n .font-size-large {\n font-size: 1.5rem;\n }\n\n .text-transform-uppercase {\n text-transform: uppercase;\n }\n\n [id*=-\"screen\"] {\n min-block-size: 100%;\n }\n\n [data-variant~=\"full-width\"] {\n inline-size: 100%;\n }\n\n .flow > * + * {\n margin-top: var(--flow-space, 1rem);\n }\n\n .button {\n --button-color: ${themeColor || 'var(--active-color)'};\n -webkit-appearance: none;\n appearance: none;\n border-radius: 2.5rem;\n border: 0;\n background-color: transparent;\n color: #fff;\n cursor: pointer;\n display: block;\n font-size: 18px;\n font-weight: 600;\n padding: 0.75rem 1.5rem;\n text-align: center;\n }\n\n .button:hover,\n .button:focus,\n .button:active {\n --button-color: var(--color-default);\n }\n\n .button:disabled {\n --button-color: var(--color-disabled);\n }\n\n .button[data-variant~=\"solid\"] {\n background-color: var(--button-color);\n border: 2px solid var(--button-color);\n }\n\n .button[data-variant~=\"outline\"] {\n color: var(--button-color);\n border: 2px solid var(--button-color);\n }\n\n .button[data-variant~=\"ghost\"] {\n padding: 0px;\n color: var(--button-color);\n background-color: transparent;\n }\n\n .icon-btn {\n appearance: none;\n background: none;\n border: none;\n color: hsl(0deg 0% 94%);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n }\n .justify-right {\n justify-content: end !important;\n }\n .nav {\n display: flex;\n justify-content: space-between;\n }\n\n .back-wrapper {\n display: flex;\n align-items: center;\n }\n\n .back-button-text {\n font-size: 11px;\n line-height: 11px;\n color: rgb(21, 31, 114);\n }\n\n\n .selfie-capture-review-image {\n overflow: hidden;\n aspect-ratio: 1/1;\n }\n\n #review-image {\n scale: 1.75;\n }\n\n @media (max-aspect-ratio: 1/1) {\n #review-image {\n transform: scaleX(-1) translateY(-10%);\n }\n }\n\n .tips,\n .powered-by {\n align-items: center;\n border-radius: 0.25rem;\n color: #4e6577;\n display: flex;\n justify-content: center;\n letter-spacing: 0.075em;\n }\n\n .powered-by {\n box-shadow: 0px 2.57415px 2.57415px rgba(0, 0, 0, 0.06);\n display: inline-flex;\n font-size: 0.5rem;\n }\n\n .tips {\n margin-left: auto;\n margin-right: auto;\n max-width: 17rem;\n }\n\n .tips > * + *,\n .powered-by > * + * {\n display: inline-block;\n margin-left: 0.5em;\n }\n\n .powered-by .company {\n color: #18406d;\n font-weight: 700;\n letter-spacing: 0.15rem;\n }\n\n .logo-mark {\n background-color: #004071;\n display: inline-block;\n padding: 0.25em 0.5em;\n }\n\n .logo-mark svg {\n height: auto;\n justify-self: center;\n width: 0.75em;\n }\n\n #document-capture-instructions-screen,\n #back-of-document-capture-instructions-screen {\n padding-block: 2rem;\n display: flex;\n flex-direction: column;\n max-block-size: 100%;\n max-inline-size: 40ch;\n justify-content: space-between;\n }\n\n #document-capture-instructions-screen header p {\n margin-block: 0 !important;\n }\n\n .description {\n color: var(--neutral-off-black, #2D2B2A);\n text-align: center;\n\n /* p */\n font-family: DM Sans;\n font-size: 0.875rem;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n }\n\n .padding-bottom-2 {\n padding-bottom: 2rem;\n }\n\n .instructions-wrapper {\n display: inline-flex;\n flex-direction: column;\n gap: 1.5rem;\n margin-block-start: 2rem;\n margin-block-end: 2rem;\n }\n .instructions {\n display: flex;\n align-items: center;\n text-align: initial;\n }\n\n .instructions svg {\n flex-shrink: 0;\n margin-inline-end: 2rem;\n }\n\n .instructions p {\n margin-block: 0;\n }\n\n .instruction {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n }\n\n .instruction-body {\n font-size: 0.75rem;\n }\n\n .instruction-header {\n color: ${themeColor};\n }\n\n .flex-column {\n display: flex;\n flex-direction: column;\n }\n\n @keyframes spin {\n 0% {\n transform: translate3d(-50%, -50%, 0) rotate(0deg);\n }\n 100% {\n transform: translate3d(-50%, -50%, 0) rotate(360deg);\n }\n}\n\n.spinner {\n animation: 1.5s linear infinite spin;\n animation-play-state: inherit;\n border: solid 5px #cfd0d1;\n border-bottom-color: var(--color-active);\n border-radius: 50%;\n content: \"\";\n display: block;\n height: 25px;\n width: 25px;\n will-change: transform;\n position: relative;\n top: .675rem;\n left: 1.25rem;\n }\n\n</style>`;\n\nexport default styles;\n", "{\n \"name\": \"@smileid/web-components\",\n \"version\": \"2.0.3\",\n \"private\": \"true\",\n \"main\": \"index.js\",\n \"exports\": {\n \".\": \"./index.js\",\n \"./combobox\": \"./src/components/combobox/src/index.js\",\n \"./document-capture\": \"./src/components/document/src/index.js\",\n \"./end-user-consent\": \"./src/components/end-user-consent/src/index.js\",\n \"./navigation\": \"./src/components/navigation/src/index.js\",\n \"./selfie-capture\": \"./src/components/selfie/src/index.js\",\n \"./signature-pad\": \"./src/components/signature-pad/src/index.js\",\n \"./totp-consent\": \"./src/components/totp-consent/src/index.js\",\n \"./smart-camera-web\": \"./src/components/smart-camera-web/src/SmartCameraWeb.js\"\n },\n \"files\": [\n \"./src/components/\",\n \"./src/domain/\",\n \"./src/styles/\",\n \"./README.md\",\n \"index.js\",\n \"package.json\"\n ],\n \"scripts\": {\n \"build\": \"cross-env NODE_ENV=production node esbuild.js\",\n \"build:dev\": \"cross-env NODE_ENV=development node esbuild.js\",\n \"clean\": \"rm -rf build dist\",\n \"prepublishOnly\": \"npm run build\",\n \"lint:fix\": \"eslint . --ext .js --fix\",\n \"lint:html\": \"npx prettier --write $(git ls-files '*.html')\",\n \"lint\": \"eslint . --ext .js\",\n \"start\": \"npm run build && npx serve -p 8000 dist\",\n \"test\": \"npx cypress run\"\n },\n \"description\": \"A collection of Web Components used by SmileID\",\n \"keywords\": [\n \"Web Components\"\n ],\n \"type\": \"module\",\n \"author\": \"SmileID <support@usesmileid.com> (https://usesmileid.com)\",\n \"dependencies\": {\n \"signature_pad\": \"^5.0.2\",\n \"validate.js\": \"^0.13.1\"\n },\n \"devDependencies\": {\n \"cross-env\": \"^7.0.3\",\n \"cypress\": \"^13.15.0\",\n \"esbuild\": \"^0.24.0\",\n \"eslint\": \"^8.57.0\",\n \"eslint-config-airbnb-base\": \"^15.0.0\",\n \"eslint-config-prettier\": \"^9.1.0\",\n \"eslint-plugin-cypress\": \"^3.3.0\",\n \"eslint-plugin-import\": \"^2.29.1\",\n \"eslint-plugin-jest\": \"^28.8.3\",\n \"eslint-plugin-prettier\": \"^5.2.1\",\n \"prettier\": \"^3.3.3\"\n }\n}\n", "class Navigation extends HTMLElement {\n connectedCallback() {\n const shadow = this.attachShadow({ mode: 'open' });\n\n const style = document.createElement('style');\n style.textContent = `\n:host {\n display: flex;\n max-inline-size: 100%;\n justify-content: ${this.showBackButton ? 'space-between' : 'flex-end'};\n}\n\nbutton {\n --button-color: var(--color-default);\n --flow-space: 3rem;\n -webkit-appearance: none;\n -moz-appearance: none;\n align-items: center;\n appearance: none;\n background-color: transparent;\n border-radius: 2.5rem;\n border: none;\n color: #ffffff;\n cursor: pointer;\n display: inline-flex;\n font-size: 20px;\n font-weight: 500;\n inline-size: 100%;\n justify-content: center;\n letter-spacing: 0.05ch;\n line-height: 1;\n padding: 1rem 2.5rem;\n text-align: center;\n text-decoration: none;\n}\n\nbutton[data-type=\"icon\"] {\n align-items: center;\n background-color: transparent;\n border: 0;\n cursor: pointer;\n display: flex;\n padding: 0;\n width: auto;\n}\n\n:host::part(back-button) {\n display: flex;\n align-items: center;\n}\n\n:host::part(back-button-text) {\n line-height: 1;\n color: ${this.hasThemeColor ? this.themeColor : 'rgb(21, 31, 114)'} !important;\n}\n\n:host::part(close-button) {\n}\n\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n block-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n inline-size: 1px;\n}\n `;\n\n const backButton = document.createElement('button');\n backButton.setAttribute('class', 'back-button');\n backButton.setAttribute('data-type', 'icon');\n backButton.setAttribute('part', 'back-button');\n backButton.setAttribute('type', 'button');\n backButton.innerHTML = `\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"40\"\n height=\"40\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n fill=\"#DBDBC4\"\n d=\"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z\"\n opacity=\".4\"\n />\n <path\n fill=\"${this.themeColor}\"\n d=\"M15.5 11.25h-5.19l1.72-1.72c.29-.29.29-.77 0-1.06a.754.754 0 0 0-1.06 0l-3 3c-.29.29-.29.77 0 1.06l3 3c.15.15.34.22.53.22s.38-.07.53-.22c.29-.29.29-.77 0-1.06l-1.72-1.72h5.19c.41 0 .75-.34.75-.75s-.34-.75-.75-.75Z\"\n />\n </svg>\n <span part=\"back-button-text\">Back</span>\n `;\n\n const closeButton = document.createElement('button');\n closeButton.setAttribute('class', 'close-button');\n closeButton.setAttribute('data-type', 'icon');\n closeButton.setAttribute('part', 'close-button');\n closeButton.setAttribute('type', 'button');\n closeButton.innerHTML = `\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width=\"40\"\n height=\"40\"\n fill=\"none\"\n >\n <path\n fill=\"#DBDBC4\"\n d=\"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z\"\n opacity=\".4\"\n />\n <path\n fill=\"#91190F\"\n d=\"m13.06 12 2.3-2.3c.29-.29.29-.77 0-1.06a.754.754 0 0 0-1.06 0l-2.3 2.3-2.3-2.3a.754.754 0 0 0-1.06 0c-.29.29-.29.77 0 1.06l2.3 2.3-2.3 2.3c-.29.29-.29.77 0 1.06.15.15.34.22.53.22s.38-.07.53-.22l2.3-2.3 2.3 2.3c.15.15.34.22.53.22s.38-.07.53-.22c.29-.29.29-.77 0-1.06l-2.3-2.3Z\"\n />\n </svg>\n <span class=\"visually-hidden\"\n >Close SmileIdentity Verification frame</span\n >\n `;\n\n shadow.appendChild(style);\n if (this.showBackButton) shadow.appendChild(backButton);\n shadow.appendChild(closeButton);\n\n // Back Button Controls\n this.backButton = backButton;\n this.backButton.addEventListener('click', () => this.handleBack());\n\n // Close Button Controls\n this.closeButton = closeButton;\n this.closeButton.addEventListener('click', () => this.handleClose());\n }\n\n disconnectedCallback() {\n this.backButton.removeEventListener('click', () => this.handleBack());\n this.closeButton.removeEventListener('click', () => this.handleClose());\n }\n\n handleBack() {\n this.dispatchEvent(new CustomEvent('navigation.back'));\n }\n\n handleClose() {\n this.dispatchEvent(new CustomEvent('navigation.close'));\n }\n\n get showBackButton() {\n return !this.hasAttribute('hide-back');\n }\n\n get themeColor() {\n return this.getAttribute('theme-color') || '#001096';\n }\n\n get hasThemeColor() {\n return this.getAttribute('theme-color')?.trim();\n }\n}\n\nif (\n 'customElements' in window &&\n !window.customElements.get('smileid-navigation')\n) {\n window.customElements.define('smileid-navigation', Navigation);\n}\n\nexport default Navigation;\n", "import { IMAGE_TYPE } from '../../../../domain/constants/src/Constants';\nimport SmartCamera from '../../../../domain/camera/src/SmartCamera';\nimport styles from '../../../../styles/src/styles';\nimport packageJson from '../../../../../package.json';\nimport '../../../navigation/src';\n\nconst COMPONENTS_VERSION = packageJson.version;\n\nconst DEFAULT_NO_OF_LIVENESS_FRAMES = 8;\n\nfunction hasMoreThanNColors(data, n = 16) {\n const colors = new Set();\n for (let i = 0; i < Math.min(data.length, 10000); i += 4) {\n // eslint-disable-next-line no-bitwise\n colors.add((data[i] << 16) | (data[i + 1] << 8) | data[i + 2]);\n if (colors.size > n) {\n return true;\n }\n }\n return false;\n}\n\nfunction getLivenessFramesIndices(\n totalNoOfFrames,\n numberOfFramesRequired = DEFAULT_NO_OF_LIVENESS_FRAMES,\n) {\n const selectedFrames = [];\n\n if (totalNoOfFrames < numberOfFramesRequired) {\n throw new Error(\n 'SmartCameraWeb: Minimum required no of frames is ',\n numberOfFramesRequired,\n );\n }\n\n const frameDivisor = numberOfFramesRequired - 1;\n const frameInterval = Math.floor(totalNoOfFrames / frameDivisor);\n\n // NOTE: when we have satisfied our required 8 frames, but have good\n // candidates, we need to start replacing from the second frame\n let replacementFrameIndex = 1;\n\n for (let i = 0; i < totalNoOfFrames; i += frameInterval) {\n if (selectedFrames.length < 8) {\n selectedFrames.push(i);\n } else {\n // ACTION: replace frame, then sort selectedframes\n selectedFrames[replacementFrameIndex] = i;\n selectedFrames.sort((a, b) => a - b);\n\n // ACTION: update replacement frame index\n replacementFrameIndex += 1;\n }\n }\n\n // INFO: if we don't satisfy our requirement, we add the last index\n const lastFrameIndex = totalNoOfFrames - 1;\n\n if (selectedFrames.length < 8 && !selectedFrames.includes(lastFrameIndex)) {\n selectedFrames.push(lastFrameIndex);\n }\n\n return selectedFrames;\n}\n\nfunction templateString() {\n return `\n ${styles(this.themeColor)}\n <style>\n :host {\n --theme-color: ${this.themeColor || '#001096'};\n --color-active: #001096;\n --color-default: #2D2B2A;\n --color-disabled: #848282;\n }\n\n * {\n font-family: 'DM Sans', sans-serif;\n }\n\n [hidden] {\n display: none !important;\n }\n\n [disabled] {\n cursor: not-allowed !important;\n filter: grayscale(75%);\n }\n\n .visually-hidden {\n border: 0;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n height: auto;\n margin: 0;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n }\n\n img {\n height: auto;\n max-width: 100%;\n transform: scaleX(-1);\n }\n\n video {\n background-color: black;\n }\n\n a {\n color: currentColor;\n text-decoration: none;\n }\n\n svg {\n max-width: 100%;\n }\n\n .color-gray {\n color: #797979;\n }\n\n .color-red {\n color: red;\n }\n\n .color-richblue {\n color: #4E6577;\n }\n\n .color-richblue-shade {\n color: #0E1B42;\n }\n\n .color-digital-blue {\n color: #001096 !important;\n }\n\n .color-deep-blue {\n color: #001096;\n }\n\n .title-color {\n color: ${this.themeColor};\n }\n \n .theme-color {\n color: ${this.themeColor};\n }\n\n .center {\n text-align: center;\n margin-left: auto;\n margin-right: auto;\n }\n\n .font-size-small {\n font-size: .75rem;\n }\n\n .font-size-large {\n font-size: 1.5rem;\n }\n\n .text-transform-uppercase {\n text-transform: uppercase;\n }\n\n [id*=-\"screen\"] {\n min-block-size: 100%;\n }\n\n [data-variant~=\"full-width\"] {\n inline-size: 100%;\n }\n\n .flow > * + * {\n margin-top: 1rem;\n }\n\n .button {\n --button-color: ${this.themeColor};\n -webkit-appearance: none;\n appearance: none;\n border-radius: 2.5rem;\n border: 0;\n background-color: transparent;\n color: #fff;\n cursor: pointer;\n display: block;\n font-size: 18px;\n font-weight: 600;\n padding: .75rem 1.5rem;\n text-align: center;\n }\n\n .button:hover,\n .button:focus,\n .button:active {\n --button-color: var(--color-default);\n }\n\n .button:disabled {\n --button-color: var(--color-disabled);\n }\n\n .button[data-variant~='solid'] {\n background-color: var(--button-color);\n border: 2px solid var(--button-color);\n }\n\n .button[data-variant~='outline'] {\n color: var(--button-color);\n border: 2px solid var(--button-color);\n }\n\n .button[data-variant~='ghost'] {\n padding: 0px;\n color: var(--button-color);\n background-color: transparent;\n }\n\n .icon-btn {\n appearance: none;\n background: none;\n border: none;\n color: hsl(0deg 0% 94%);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n }\n .justify-right {\n justify-content: end !important;\n }\n .nav {\n display: flex;\n justify-content: space-between;\n }\n\n .back-wrapper {\n display: flex;\n align-items: center;\n }\n\n .back-button {\n display: block !important;\n }\n .back-button-text {\n font-size: 11px;\n line-height: 11px;\n color: rgb(21, 31, 114);\n }\n .section {\n border-radius: .5rem;\n margin-left: auto;\n margin-right: auto;\n max-width: 35ch;\n padding: 1rem;\n }\n\n .selfie-capture-review-image {\n overflow: hidden;\n aspect-ratio: 1/1;\n }\n\n #review-image {\n scale: 1.75;\n }\n\n @media (max-aspect-ratio: 1/1) {\n #review-image {\n transform: scaleX(-1) translateY(-10%);\n }\n }\n\n .tips,\n .powered-by {\n align-items: center;\n border-radius: .25rem;\n display: flex;\n justify-content: center;\n letter-spacing: .075em;\n }\n\n .powered-by {\n box-shadow: 0px 2.57415px 2.57415px rgba(0, 0, 0, 0.06);\n display: inline-flex;\n font-size: .5rem;\n }\n\n .tips {\n margin-left: auto;\n margin-right: auto;\n max-width: 17rem;\n font-size: 0.875rem;\n font-weight: 600;\n }\n\n .tips > * + *,\n .powered-by > * + * {\n display: inline-block;\n margin-left: .5em;\n }\n\n .powered-by .company {\n color: #18406D;\n font-weight: 700;\n letter-spacing: .15rem;\n }\n\n .logo-mark {\n background-color: #004071;\n display: inline-block;\n padding: .25em .5em;\n }\n\n .logo-mark svg {\n height: auto;\n justify-self: center;\n width: .75em;\n }\n\n .id-video-container.portrait {\n width: 100%;\n position: relative;\n height: calc(200px * 1.4);\n }\n\n .id-video-container.portrait video {\n width: calc(213px + 0.9rem);\n height: 100%;\n position: absolute;\n top: 239px;\n left: 161px;\n padding-bottom: calc((214px * 1.4) / 3);\n padding-top: calc((191px * 1.4) / 3);\n object-fit: cover;\n\n transform: translateX(-50%) translateY(-50%);\n z-index: 1;\n block-size: 100%;\n }\n\n .video-container,\n .id-video-container.landscape {\n position: relative;\n z-index: 1;\n width: 100%;\n }\n\n .video-container video,\n .id-video-container.landscape video {\n left: 50%;\n min-width: auto;\n position: absolute;\n top: calc(50% - 3px);\n transform: translateX(-50%) translateY(50%);\n }\n\n .video-container #smile-cta-box {\n color: #fff;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n padding: 2rem 0;\n opacity: 0;\n transition: opacity 0.5s ease-in-out;\n }\n\n .video-container #smile-cta {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .video-container video {\n min-height: 100%;\n transform: scaleX(-1) translateX(50%) translateY(-50%);\n }\n\n .video-container video.agent-mode {\n min-height: 100%;\n transform: scaleX(1) translateX(-50%) translateY(-50%);\n }\n\n .video-container .video {\n background-color: black;\n position: absolute;\n left: 50%;\n height: calc(100% - 6px);\n clip-path: ellipse(101px 118px);\n }\n\n .id-video-container.landscape {\n min-height: calc((2 * 10rem) + 198px);\n height: auto;\n }\n\n .id-video-container.portrait .image-frame-portrait {\n border-width: 0.9rem;\n border-color: rgba(0, 0, 0, 0.7);\n border-style: solid;\n height: auto;\n position: absolute;\n top: 80px;\n left: 47px;\n z-index: 2;\n width: 200px;\n height: calc(200px * 1.4);\n }\n\n .id-video-container.landscape .image-frame {\n border-width: 10rem 1rem;\n border-color: rgba(0, 0, 0, 0.7);\n border-style: solid;\n height: auto;\n width: 90%;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n }\n\n .id-video-container.landscape video {\n width: 100%;\n transform: translateX(-50%) translateY(-50%);\n z-index: 1;\n height: 100%;\n block-size: 100%;\n }\n\n .id-video-container.landscape img {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n max-width: 90%;\n }\n\n .actions {\n background-color: rgba(0, 0, 0, .7);\n bottom: 0;\n display: flex;\n justify-content: space-between;\n padding: 1rem;\n position: absolute;\n width: 90%;\n z-index: 2;\n }\n\n #back-of-id-camera-screen .id-video-container.portrait .actions,\n #id-camera-screen .id-video-container.portrait .actions {\n top: 145%;\n width: calc(200px * 1.4);\n }\n\n #back-of-id-camera-screen .section.portrait, #id-camera-screen .section.portrait {\n min-height: calc((200px * 1.4) + 260px);\n }\n\n #selfie-capture-screen,\n #back-of-id-entry-screen {\n block-size: 45rem;\n padding-block: 2rem;\n display: flex;\n flex-direction: column;\n max-block-size: 100%;\n max-inline-size: 40ch;\n }\n\n #selfie-capture-screen header p {\n margin-block: 0 !important;\n }\n\n .document-tips {\n margin-block-start: 1.5rem;\n display: flex;\n align-items: center;\n text-align: initial;\n }\n\n .document-tips svg {\n flex-shrink: 0;\n margin-inline-end: 1rem;\n }\n\n .document-tips p {\n margin-block: 0;\n }\n\n .document-tips p:first-of-type {\n font-size; 1.875rem;\n font-weight: bold\n }\n\n [type='file'] {\n display: none;\n }\n\n .document-tips > * + * {\n margin-inline-start; 1em;\n }\n </style>\n <div id='selfie-capture-screen' class='flow center'>\n <smileid-navigation theme-color='${this.themeColor}' ${this.showNavigation ? 'show-navigation' : ''} ${this.hideBack ? 'hide-back' : ''}></smileid-navigation>\n\n <div class='tips'>Fit your head inside the oval frame</div>\n\n <div className=\"error\">\n ${this.cameraError ? `<p class=\"color-red\">${this.cameraError}</p>` : ''}\n </div>\n <div class='section | flow' ${this.cameraError ? 'hidden' : ''}>\n <div class='video-container'>\n <div class='video'>\n </div>\n <svg id=\"image-outline\" width=\"215\" height=\"245\" viewBox=\"0 0 215 245\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M210.981 122.838C210.981 188.699 164.248 241.268 107.55 241.268C50.853 241.268 4.12018 188.699 4.12018 122.838C4.12018 56.9763 50.853 4.40771 107.55 4.40771C164.248 4.40771 210.981 56.9763 210.981 122.838Z\" stroke=\"${this.themeColor}\" stroke-width=\"7.13965\"/>\n </svg>\n <div id=\"smile-cta-box\">\n <div>\n <svg width=\"120\" height=\"120\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"70 70 360 360\" fill=\"currentColor\">\n <path d=\"M354.02,247.69c4.12-12.26,6.39-24.53,6.39-35.75,0-54.63-50.19-99.08-111.88-99.08s-111.95,44.45-111.95,99.08c0,11.22,2.28,23.49,6.39,35.75-6.6,4.66-10.94,12.33-10.94,21.04,0,13.45,10.36,24.4,23.46,25.51.52,26.93,12.56,53.51,35.04,71.64v.73c.07.03.14.05.21.08,3.66,1.63,6.74,4.28,9.92,6.66.08.06.17.12.25.17,0-.08-.01-.16-.01-.25,15.23,9.12,32.95,13.89,51.85,12.96h0c15.54-.72,30.01-5.37,42.59-12.99,2.91-2.85,7.01-4.93,10.42-6.71.25-.16.51-.28.77-.43v-.76c20.36-16.83,33.62-42.32,34.85-71.11,13.15-1.05,23.57-12.03,23.57-25.53,0-8.7-4.35-16.38-10.94-21.04ZM155.53,283.54c-7.18-1.09-12.71-7.31-12.71-14.85s5.53-13.75,12.71-14.85v29.7ZM330.53,289.9c0,45.26-33.98,83.65-78.48,85.72-47.29,2.31-86.52-35.65-86.52-83.18v-40.7c15.63-4.03,38.45-15.61,65.91-46.31.08.59.13,1.21.11,1.87-.13,4.43-3.09,9.32-8.58,14.14-1.79,1.57-2.32,4.13-1.31,6.28,1.01,2.14,3.29,3.35,5.68,3,2.19-.35,48.6-8.13,71.88-38.36,3.84,13.25,12.48,33.59,31.31,48.79v48.75ZM339.42,234.31c-27.83-21.03-32.1-56.22-32.15-56.57-.26-2.37-2.08-4.28-4.43-4.67-2.33-.39-4.68.83-5.69,2.99-11.08,23.62-39.34,35.42-56.72,40.63,1.35-2.97,2.08-6,2.16-9.06.26-9.11-5.24-14.81-5.88-15.43-1.06-1.05-2.53-1.59-3.99-1.53-1.48.07-2.87.75-3.83,1.88-32.09,37.93-57.18,47.4-69.28,49.67-.68.13-1.29.39-1.84.74-.11,0-.18-.03-.29-.03-1.65,0-3.26.19-4.82.49-3.58-10.9-5.56-21.72-5.56-31.57,0-48.78,45.46-88.46,101.33-88.46s101.26,39.68,101.26,88.46c0,9.84-1.98,20.67-5.56,31.57-.85-.16-1.73-.19-2.61-.27v-4.6c0-1.67-.78-3.25-2.12-4.26ZM341.53,283.54v-29.7c7.18,1.09,12.72,7.3,12.72,14.85s-5.53,13.76-12.72,14.85Z\"/>\n <path d=\"M259.05,305.3c2.08-2.08,2.08-5.46,0-7.55-2.09-2.08-5.47-2.07-7.54,0-1.75,1.75-4.79,1.75-6.54,0-2.08-2.08-5.45-2.09-7.54,0-2.08,2.08-2.08,5.46,0,7.55,5.98,5.98,15.65,5.98,21.63,0h0Z\"/>\n <path id=\"mouth\"\n d=\"m 213.88314,319.4551 c -1.58,0.97 -0.35309,9.33393 1.50671,9.30586 6.05679,-0.0914 16.11631,0.17227 34.57066,0.13346 18.45435,-0.0388 28.15778,-0.0418 31.09964,-0.79956 1.80122,-0.46394 2.75061,-7.48365 1.16061,-8.45365 -1.6,-1.74874 -2.96432,-0.94348 -6.77747,-1.56441 -12.83012,0.04 -36.52534,0.50197 -41.29469,0.43262 -2.51525,-0.0713 -18.41588,-0.61 -20.01588,0.35 z m 57.29363,1.36599 c -9.24417,-2.23757 -8.08363,-2.42362 -20.78363,-2.42362 -12.7,0 -17.77931,2.69528 -26.84042,5.36549 12.57883,3.28731 33.57775,-4.29887 49.70067,2.24964 z\">\n <animate\n id=\"mouthAnim\"\n attributeName=\"d\"\n begin=\"indefinite\"\n dur=\"1s\"\n fill=\"freeze\"\n to=\"m 211.72,312.36 c -1.58,0.97 -2.56,2.86 -2.56,4.72 0,21.54 17.40021,38.7239 38.94021,38.7239 21.54,0 39.18979,-17.1739 39.18979,-39.0439 0,-1.86 -0.97,-3.59 -2.56,-4.56 -1.6,-0.97 -3.57,-1.03 -5.22,-0.18 -21.07,10.85 -41.53,10.85 -62.58,0 -1.65,-0.85 -3.62,-0.61 -5.22,0.35 z m 63.61,13.22 c -3.62,11.52 -14.4,19.9 -27.1,19.9 -12.7,0 -23.49,-8.38 -27.1,-19.9 18.03,6.94 36.2,6.94 54.2,0 z\" />\n </path>\n <circle fill=\"none\" stroke=\"currentColor\" stroke-width=\"10px\" cx=\"287.3\" cy=\"263.68\" r=\"14\"/>\n <circle fill=\"none\" stroke=\"currentColor\" stroke-width=\"10px\" cx=\"209.16\" cy=\"263.68\" r=\"14\"/>\n </svg>\n </div>\n <div>\n <p id='smile-cta'>SMILE</p>\n </div>\n </div>\n </div>\n\n ${this.allowAgentMode ? `<button data-variant='outline small' id='switch-camera' class='button | center' type='button'>${this.inAgentMode ? 'Agent Mode On' : 'Agent Mode Off'}</button>` : ''}\n\n <button data-variant='solid' id='start-image-capture' class='button | center' type='button'>\n Take Selfie\n </button>\n\n ${this.hideAttribution ? '' : '<powered-by-smile-id></powered-by-smile-id>'}\n </div>\n </div>\n `;\n}\n\nasync function getPermissions(\n captureScreen,\n constraints = { facingMode: 'user' },\n) {\n try {\n const stream = await SmartCamera.getMedia({\n audio: false,\n video: constraints,\n });\n const devices = await navigator.mediaDevices.enumerateDevices();\n const videoDevice = devices.find(\n (device) =>\n device.kind === 'videoinput' &&\n stream.getVideoTracks()[0].getSettings().deviceId === device.deviceId,\n );\n window.dispatchEvent(\n new CustomEvent('metadata.camera-name', {\n detail: { cameraName: videoDevice?.label },\n }),\n );\n captureScreen?.removeAttribute('data-camera-error');\n captureScreen?.setAttribute('data-camera-ready', true);\n } catch (error) {\n captureScreen?.removeAttribute('data-camera-ready');\n captureScreen?.setAttribute(\n 'data-camera-error',\n SmartCamera.handleCameraError(error),\n );\n }\n}\n\nclass SelfieCaptureScreen extends HTMLElement {\n constructor() {\n super();\n this.templateString = templateString.bind(this);\n this.render = () => this.templateString();\n\n this.attachShadow({ mode: 'open' });\n this.facingMode = 'user';\n if (this.allowAgentMode) {\n this.facingMode = 'environment';\n }\n }\n\n connectedCallback() {\n const template = document.createElement('template');\n template.innerHTML = this.render();\n this.shadowRoot.innerHTML = '';\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n this.videoContainer = this.shadowRoot.querySelector(\n '.video-container > .video',\n );\n this.init();\n }\n\n init() {\n this._videoStreamDurationInMS = 7800;\n this._imageCaptureIntervalInMS = 200;\n\n this._data = {\n images: [],\n meta: {\n libraryVersion: COMPONENTS_VERSION,\n },\n };\n this._rawImages = [];\n\n this.setUpEventListeners();\n }\n\n reset() {\n this.disconnectedCallback();\n this.connectedCallback();\n }\n\n _startImageCapture() {\n this.startImageCapture.disabled = true;\n if (this.switchCamera) {\n this.switchCamera.disabled = true;\n }\n\n /**\n * this was culled from https://jakearchibald.com/2013/animated-line-drawing-svg/\n */\n // NOTE: initialise image outline\n const imageOutlineLength = this.imageOutline.getTotalLength();\n // Clear any previous transition\n this.imageOutline.style.transition = 'none';\n // Set up the starting positions\n this.imageOutline.style.strokeDasharray = `${imageOutlineLength} ${imageOutlineLength}`;\n this.imageOutline.style.strokeDashoffset = imageOutlineLength;\n // Trigger a layout so styles are calculated & the browser\n // picks up the starting position before animating\n this.imageOutline.getBoundingClientRect();\n // Define our transition\n this.imageOutline.style.transition = `stroke-dashoffset ${this._videoStreamDurationInMS / 1000}s ease-in-out`;\n // Go!\n this.imageOutline.style.strokeDashoffset = '0';\n\n setTimeout(() => {\n this.smileCTABox.style.opacity = 1;\n this.mouthAnim.beginElement();\n }, 1500);\n\n setTimeout(() => {\n this.smileCTABox.style.opacity = 0;\n }, 3500);\n\n setTimeout(() => {\n this.smileCTABox.style.opacity = 1;\n this.smileCTA.textContent = 'BIGGER SMILE';\n this.mouth.setAttribute(\n 'd',\n 'm 213.88314,319.4551 c -1.58,0.97 -0.35309,9.33393 1.50671,9.30586 6.05679,-0.0914 16.11631,0.17227 34.57066,0.13346 18.45435,-0.0388 28.15778,-0.0418 31.09964,-0.79956 1.80122,-0.46394 2.75061,-7.48365 1.16061,-8.45365 -1.6,-1.74874 -2.96432,-0.94348 -6.77747,-1.56441 -12.83012,0.04 -36.52534,0.50197 -41.29469,0.43262 -2.51525,-0.0713 -18.41588,-0.61 -20.01588,0.35 z m 57.29363,1.36599 c -9.24417,-2.23757 -8.08363,-2.42362 -20.78363,-2.42362 -12.7,0 -17.77931,2.69528 -26.84042,5.36549 12.57883,3.28731 33.57775,-4.29887 49.70067,2.24964 z',\n );\n this.mouthAnim.beginElement();\n }, 4000);\n\n this._imageCaptureInterval = setInterval(() => {\n this._capturePOLPhoto();\n }, this._imageCaptureIntervalInMS);\n\n this._videoStreamTimeout = setTimeout(() => {\n this._stopVideoStream();\n }, this._videoStreamDurationInMS);\n }\n\n async _switchCamera() {\n this.facingMode = this.facingMode === 'user' ? 'environment' : 'user';\n if (this.facingMode === 'user') {\n this.shadowRoot.querySelector('video').classList.remove('agent-mode');\n } else {\n this.shadowRoot.querySelector('video').classList.add('agent-mode');\n }\n this.startImageCapture.disabled = true;\n this.switchCamera.disabled = true;\n SmartCamera.stopMedia();\n await getPermissions(this, { facingMode: this.facingMode });\n this.handleStream(SmartCamera.stream);\n }\n\n _stopVideoStream() {\n try {\n clearTimeout(this._videoStreamTimeout);\n clearInterval(this._imageCaptureInterval);\n clearInterval(this._drawingInterval);\n\n this._capturePOLPhoto(); // NOTE: capture the last photo\n this._captureReferencePhoto();\n SmartCamera.stopMedia();\n\n const totalNoOfFrames = this._rawImages.length;\n this._data.referenceImage = this._referenceImage;\n this._data.previewImage = this._referenceImage;\n\n const livenessFramesIndices = getLivenessFramesIndices(totalNoOfFrames);\n\n this._data.images = this._data.images.concat(\n livenessFramesIndices.map((imageIndex) => ({\n image: this._rawImages[imageIndex].split(',')[1],\n image_type_id: IMAGE_TYPE.LIVENESS_IMAGE_BASE64,\n })),\n );\n\n this._publishImages();\n } catch (error) {\n console.error(error);\n // Todo: handle error\n }\n }\n\n _capturePOLPhoto() {\n const canvas = document.createElement('canvas');\n // Determine orientation of the video\n const isPortrait = this._video.videoHeight > this._video.videoWidth;\n\n // Set dimensions based on orientation, ensuring minimums\n if (isPortrait) {\n // Portrait orientation (taller than wide)\n canvas.width = 240;\n canvas.height = Math.max(\n 320,\n (canvas.width * this._video.videoHeight) / this._video.videoWidth,\n );\n } else {\n // Landscape orientation (wider than tall)\n canvas.height = 240;\n canvas.width = Math.max(\n 320,\n (canvas.height * this._video.videoWidth) / this._video.videoHeight,\n );\n }\n\n // NOTE: we do not want to test POL images\n this._drawImage(canvas, false);\n\n this._rawImages.push(canvas.toDataURL('image/jpeg'));\n }\n\n _captureReferencePhoto() {\n const canvas = document.createElement('canvas');\n // Determine orientation of the video\n const isPortrait = this._video.videoHeight > this._video.videoWidth;\n\n // Set dimensions based on orientation, ensuring minimums\n if (isPortrait) {\n // Portrait orientation (taller than wide)\n canvas.width = 480;\n canvas.height = Math.max(\n 640,\n (canvas.width * this._video.videoHeight) / this._video.videoWidth,\n );\n } else {\n // Landscape orientation (wider than tall)\n canvas.height = 480;\n canvas.width = Math.max(\n 640,\n (canvas.height * this._video.videoWidth) / this._video.videoHeight,\n );\n }\n\n // NOTE: we want to test the image quality of the reference photo\n this._drawImage(canvas, !this.disableImageTests);\n\n const image = canvas.toDataURL('image/jpeg');\n\n this._referenceImage = image;\n\n this._data.images.push({\n image: image.split(',')[1],\n image_type_id: IMAGE_TYPE.SELFIE_IMAGE_BASE64,\n });\n }\n\n _publishImages() {\n this.dispatchEvent(\n new CustomEvent('selfie-capture.publish', {\n detail: this._data,\n }),\n );\n }\n\n resetErrorMessage() {\n this.errorMessage.textContent = '';\n }\n\n _drawImage(canvas, enableImageTests = true, video = this._video) {\n // this.resetErrorMessage();\n const context = canvas.getContext('2d');\n\n context.drawImage(\n video,\n 0,\n 0,\n video.videoWidth,\n video.videoHeight,\n 0,\n 0,\n canvas.width,\n canvas.height,\n );\n\n if (enableImageTests) {\n const imageData = context.getImageData(0, 0, canvas.width, canvas.height);\n\n const hasEnoughColors = hasMoreThanNColors(imageData.data);\n\n if (hasEnoughColors) {\n return context;\n }\n throw new Error(\n 'Unable to capture webcam images - Please try another device',\n );\n } else {\n return context;\n }\n }\n\n handleStream(stream) {\n try {\n const videoExists = this.shadowRoot.querySelector('video');\n let video = null;\n if (videoExists) {\n video = this.shadowRoot.querySelector('video');\n } else {\n video = document.createElement('video');\n }\n\n video.autoplay = true;\n video.playsInline = true;\n video.muted = true;\n\n if ('srcObject' in video) {\n video.srcObject = stream;\n } else {\n video.src = window.URL.createObjectURL(stream);\n }\n\n video.onloadedmetadata = () => {\n video.play();\n };\n\n this._video = video;\n const videoContainer = this.shadowRoot.querySelector(\n '.video-container > .video',\n );\n this._data.permissionGranted = true;\n\n if (!videoExists) {\n videoContainer.prepend(video);\n }\n } catch (error) {\n this.setAttribute(\n 'data-camera-error',\n SmartCamera.handleCameraError(error),\n );\n if (error.name !== 'AbortError') {\n console.error(error);\n }\n SmartCamera.stopMedia();\n }\n }\n\n setUpEventListeners() {\n this.navigation = this.shadowRoot.querySelector('smileid-navigation');\n\n this.startImageCapture = this.shadowRoot.querySelector(\n '#start-image-capture',\n );\n\n this.switchCamera = this.shadowRoot.querySelector('#switch-camera');\n this.imageOutline = this.shadowRoot.querySelector('#image-outline path');\n this.smileCTABox = this.shadowRoot.querySelector('#smile-cta-box');\n this.smileCTA = this.shadowRoot.querySelector('#smile-cta');\n this.mouth = this.shadowRoot.querySelector('#mouth');\n this.mouthAnim = this.shadowRoot.querySelector('#mouthAnim');\n\n this.startImageCapture.addEventListener('click', () => {\n this._startImageCapture();\n });\n\n this.switchCamera?.addEventListener('click', () => {\n this._switchCamera();\n });\n\n this.navigation.addEventListener('navigation.back', () => {\n this.handleBackEvents();\n });\n\n this.navigation.addEventListener('navigation.close', () => {\n this.closeWindow();\n });\n\n if (SmartCamera.stream) {\n this.handleStream(SmartCamera.stream);\n } else if (this.hasAttribute('data-camera-ready')) {\n getPermissions(this, { facingMode: this.facingMode });\n }\n\n this.setupAgentMode();\n }\n\n disconnectedCallback() {\n SmartCamera.stopMedia();\n clearTimeout(this._videoStreamTimeout);\n }\n\n get hideBack() {\n return this.hasAttribute('hide-back');\n }\n\n get showNavigation() {\n return this.hasAttribute('show-navigation');\n }\n\n get themeColor() {\n return this.getAttribute('theme-color') || '#001096';\n }\n\n get hideAttribution() {\n return this.hasAttribute('hide-attribution');\n }\n\n async setupAgentMode() {\n if (!this.allowAgentMode) {\n return;\n }\n\n const supportAgentMode = await SmartCamera.supportsAgentMode();\n\n if (supportAgentMode || this.hasAttribute('show-agent-mode-for-tests')) {\n this.switchCamera.hidden = false;\n if (this.facingMode === 'user') {\n this.shadowRoot.querySelector('video')?.classList?.remove('agent-mode');\n } else {\n this.shadowRoot.querySelector('video')?.classList?.add('agent-mode');\n }\n } else {\n this.switchCamera.hidden = true;\n }\n }\n\n get hasAgentSupport() {\n return this.hasAttribute('has-agent-support');\n }\n\n get title() {\n return this.getAttribute('title') || 'Submit Front of ID';\n }\n\n get hidden() {\n return this.getAttribute('hidden');\n }\n\n get cameraError() {\n return this.getAttribute('data-camera-error');\n }\n\n get disableImageTests() {\n return this.hasAttribute('disable-image-tests');\n }\n\n get allowAgentMode() {\n return this.getAttribute('allow-agent-mode') === 'true';\n }\n\n get inAgentMode() {\n return this.facingMode === 'environment';\n }\n\n static get observedAttributes() {\n return [\n 'allow-agent-mode',\n 'data-camera-error',\n 'data-camera-ready',\n 'disable-image-tests',\n 'hidden',\n 'hide-back-to-host',\n 'show-navigation',\n 'title',\n ];\n }\n\n attributeChangedCallback(name) {\n switch (name) {\n case 'data-camera-error':\n case 'data-camera-ready':\n case 'hidden':\n case 'title':\n case 'allow-agent-mode':\n this.shadowRoot.innerHTML = this.render();\n this.init();\n break;\n default:\n break;\n }\n }\n\n handleBackEvents() {\n this.stopMedia();\n this.dispatchEvent(new CustomEvent('selfie-capture.cancelled'));\n }\n\n closeWindow() {\n this.stopMedia();\n this.dispatchEvent(new CustomEvent('selfie-capture.close'));\n }\n\n stopMedia() {\n this.removeAttribute('data-camera-ready');\n SmartCamera.stopMedia();\n }\n}\n\nif ('customElements' in window && !customElements.get('selfie-capture')) {\n window.customElements.define('selfie-capture', SelfieCaptureScreen);\n}\n\nexport default SelfieCaptureScreen;\n", "import styles from '../../../../styles/src/styles';\nimport '../../../navigation/src';\n\nfunction templateString() {\n return `\n <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" />\n <link\n href=\"https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&display=swap\"\n rel=\"stylesheet\"\n />\n <style>\n :host {\n --theme-color: ${this.themeColor || '#001096'}\n --color-active: #001096;\n --color-default: #2d2b2a;\n --color-disabled: #848282;\n }\n\n * {\n font-family: \"DM Sans\", sans-serif;\n }\n\n [hidden] {\n display: none !important;\n }\n\n [disabled] {\n cursor: not-allowed !important;\n filter: grayscale(75%);\n }\n\n .visually-hidden {\n border: 0;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n height: auto;\n margin: 0;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n }\n\n img {\n height: auto;\n max-width: 100%;\n transform: scaleX(-1);\n }\n\n video {\n background-color: black;\n }\n\n a {\n color: currentColor;\n text-decoration: none;\n }\n\n svg {\n max-width: 100%;\n }\n\n .color-gray {\n color: #797979;\n }\n\n .color-red {\n color: red;\n }\n\n .color-richblue {\n color: #4e6577;\n }\n\n .color-richblue-shade {\n color: #0e1b42;\n }\n\n .color-digital-blue {\n color: #001096 !important;\n }\n\n .color-deep-blue {\n color: #001096;\n }\n\n .center {\n text-align: center;\n margin-left: auto;\n margin-right: auto;\n }\n\n .font-size-small {\n font-size: 0.75rem;\n }\n\n .font-size-large {\n font-size: 1.5rem;\n }\n\n .text-transform-uppercase {\n text-transform: uppercase;\n }\n\n [id*=-\"screen\"] {\n min-block-size: 100%;\n }\n\n [data-variant~=\"full-width\"] {\n inline-size: 100%;\n }\n\n .flow > * + * {\n margin-top: 1rem;\n }\n\n .button {\n --button-color: var(--theme-color);\n -webkit-appearance: none;\n appearance: none;\n border-radius: 2.5rem;\n border: 0;\n background-color: transparent;\n color: #fff;\n cursor: pointer;\n display: block;\n font-size: 18px;\n font-weight: 600;\n padding: 0.75rem 1.5rem;\n text-align: center;\n }\n\n .button:hover,\n .button:focus,\n .button:active {\n --button-color: var(--color-default);\n }\n\n .button:disabled {\n --button-color: var(--color-disabled);\n }\n\n .button[data-variant~=\"solid\"] {\n background-color: var(--button-color);\n border: 2px solid var(--button-color);\n }\n\n .button[data-variant~=\"outline\"] {\n color: var(--button-color);\n border: 2px solid var(--button-color);\n }\n\n .button[data-variant~=\"ghost\"] {\n padding: 0px;\n color: var(--button-color);\n background-color: transparent;\n }\n\n .icon-btn {\n appearance: none;\n background: none;\n border: none;\n color: hsl(0deg 0% 94%);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n }\n .justify-right {\n justify-content: end !important;\n }\n .nav {\n display: flex;\n justify-content: space-between;\n }\n\n .back-wrapper {\n display: flex;\n align-items: center;\n }\n\n .back-button {\n display: block !important;\n }\n .back-button-text {\n font-size: 11px;\n line-height: 11px;\n color: rgb(21, 31, 114);\n }\n .section {\n border: 1px solid #f4f4f4;\n border-radius: 0.5rem;\n margin-left: auto;\n margin-right: auto;\n max-width: 35ch;\n padding: 1rem;\n }\n\n .selfie-capture-review-image {\n overflow: hidden;\n aspect-ratio: 1/1;\n }\n\n #review-image {\n scale: 1.75;\n }\n\n @media (max-aspect-ratio: 1/1) {\n #review-image {\n transform: scaleX(-1) translateY(-10%);\n }\n }\n\n .tips,\n .powered-by {\n align-items: center;\n border-radius: 0.25rem;\n color: #4e6577;\n display: flex;\n justify-content: center;\n letter-spacing: 0.075em;\n }\n\n .powered-by {\n box-shadow: 0px 2.57415px 2.57415px rgba(0, 0, 0, 0.06);\n display: inline-flex;\n font-size: 0.5rem;\n }\n\n .tips {\n margin-left: auto;\n margin-right: auto;\n max-width: 17rem;\n }\n\n .tips > * + *,\n .powered-by > * + * {\n display: inline-block;\n margin-left: 0.5em;\n }\n\n .powered-by .company {\n color: #18406d;\n font-weight: 700;\n letter-spacing: 0.15rem;\n }\n\n .logo-mark {\n background-color: #004071;\n display: inline-block;\n padding: 0.25em 0.5em;\n }\n\n .logo-mark svg {\n height: auto;\n justify-self: center;\n width: 0.75em;\n }\n\n #selfie-capture-instruction-screen {\n padding-block: 2rem;\n display: flex;\n flex-direction: column;\n max-block-size: 100%;\n max-inline-size: 40ch;\n }\n\n #selfie-capture-instruction-screen header p {\n margin-block: 0 !important;\n }\n\n .instructions {\n margin-block-start: 1.5rem;\n display: flex;\n align-items: center;\n text-align: initial;\n gap: 1rem;\n }\n\n .instructions svg {\n flex-shrink: 0;\n margin-inline-end: 1rem;\n }\n\n .instructions p {\n margin-block: 0;\n }\n\n h1 {\n color: ${this.themeColor};\n text-align: center;\n\n /* h1 */\n font-size: 1.5rem;\n font-style: normal;\n font-weight: 700;\n line-height: 36px; /* 150% */\n }\n\n .tip-header {\n color: ${this.themeColor};\n }\n </style>\n ${styles(this.themeColor)}\n <div id=\"selfie-capture-instruction-screen\" class=\"flow center\">\n <smileid-navigation theme-color=${this.themeColor} ${this.hideBack ? 'hide-back' : ''} ${this.showNavigation ? '' : 'hidden'}></smileid-navigation>\n <header>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"65\" height=\"91\" viewBox=\"0 0 65 91\" fill=\"none\">\n <g clip-path=\"url(#clip0_604_692)\">\n <path d=\"M36.6833 60.4888C26.9272 54.8682 13.1977 54.3026 5.53473 59.2162C-2.12824 64.1298 -0.851078 72.9318 8.05358 78.9413L17.8806 85.1274L51.5126 69.6797L36.7188 60.4534H36.6478L36.6833 60.4888Z\" fill=\"#3B3837\"/>\n <path d=\"M27.5624 90.5007L17.9127 85.0923C17.9127 85.0923 17.9127 74.6288 18.1256 70.4929C18.232 68.2305 23.2342 37.441 44.1655 34.6484C48.1389 34.1182 56.8662 40.5871 56.8662 40.5871\" fill=\"#91190F\"/>\n <path d=\"M27.5624 90.5007L17.9127 85.0923C17.9127 85.0923 17.9127 74.6288 18.1256 70.4929C18.232 68.2305 23.2342 37.441 44.1655 34.6484C48.1389 34.1182 56.8662 40.5871 56.8662 40.5871\" fill=\"#3B3837\"/>\n <path d=\"M64.0705 51.9698C63.8931 41.0114 56.2301 36.5927 46.7224 42.0366C37.0727 47.5511 29.055 60.9486 28.3454 72.2958L27.5649 90.4655L63.7512 69.5739L64.1769 51.8991H64.106L64.0705 51.9698Z\" fill=\"#7ECAF0\"/>\n <path d=\"M44.2729 28.3906L30.0112 36.521L30.4015 19.73L44.6631 11.5643L44.2729 28.3906Z\" fill=\"#F8CEEB\"/>\n <path d=\"M53.959 33.8711L39.6974 42.0368L40.0876 25.2104L54.3493 17.0447L53.959 33.8711Z\" fill=\"#7ECAF0\"/>\n <path d=\"M44.6631 11.5643L54.3483 17.0434L40.0866 25.2092L39.6964 42.0356L30.0112 36.521L30.4015 19.73L44.6631 11.5643Z\" fill=\"#3B3837\"/>\n <path d=\"M53.0767 51.0497L59.9591 46.8785L59.9237 36.9099L64.4647 34.3294L64.5002 49.4236L53.0767 56.2461V51.0497Z\" fill=\"#FF5805\"/>\n <path d=\"M54.0676 54.5139L63.5044 48.8933L63.469 36.026L60.9146 37.4754V47.4439L54.0676 51.5798V54.5139Z\" fill=\"#FF5805\"/>\n <path d=\"M30.4053 52.2515L34.9463 49.6356V60.8414L44.0638 55.1855V60.4172L30.4407 68.7244L30.4053 52.2515Z\" fill=\"#FF5805\"/>\n <path d=\"M31.4317 66.9921L43.0681 59.8869V56.9529L33.9506 62.6088V51.3323L31.3962 52.817L31.4317 66.9921Z\" fill=\"#FF5805\"/>\n <path d=\"M30.4053 19.7312L42.5383 13.0148V18.1759L34.9463 22.3471V32.4924L30.4407 35.073L30.4053 19.7312Z\" fill=\"#FF5805\"/>\n <path d=\"M31.3962 33.377L33.9506 31.9276V21.7823L41.5426 17.6111V14.6771L31.3962 20.2976V28.7815V33.377Z\" fill=\"#FF5805\"/>\n <path d=\"M59.9223 8.27746L53.5365 11.9538V6.79277L64.4279 0.500549L64.4633 16.5846L59.9578 19.1651L59.9223 8.27746Z\" fill=\"#FF5805\"/>\n <path d=\"M60.9142 17.4682L63.504 16.0189L63.4685 2.19722L54.4929 7.35826L54.5284 10.2569L60.9142 6.58057V17.4682Z\" fill=\"#FF5805\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_604_692\">\n <rect width=\"64\" height=\"90\" fill=\"white\" transform=\"translate(0.5 0.5)\"/>\n </clipPath>\n </defs>\n </svg>\n <h1 class='text-2xl title-color font-bold'>Next, we'll take a quick selfie</h1>\n </header>\n <div class=\"flow instructions-wrapper\">\n <div class=\"instructions\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"38\"\n height=\"38\"\n viewBox=\"0 0 38 38\"\n fill=\"none\"\n >\n <g clip-path=\"url(#clip0_604_670)\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M31.8569 19C31.8569 21.5428 31.1029 24.0285 29.6902 26.1428C28.2774 28.2571 26.2695 29.9049 23.9203 30.878C21.571 31.8511 18.986 32.1057 16.492 31.6096C13.9981 31.1136 11.7072 29.8891 9.90919 28.091C8.11115 26.293 6.88668 24.0022 6.3906 21.5082C5.89452 19.0143 6.14913 16.4292 7.12222 14.08C8.09531 11.7307 9.74318 9.72279 11.8574 8.31008C13.9717 6.89737 16.4574 6.14334 19.0002 6.14334C22.41 6.14334 25.6802 7.49788 28.0913 9.90897C30.5024 12.3201 31.8569 15.5902 31.8569 19Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M19.6064 4.5419H18.394L18.9912 0L19.6064 4.5419Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M26.7541 6.77667L25.7046 6.17048L28.4913 2.54239L26.7541 6.77667Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M31.8298 12.2957L31.2236 11.2462L35.4489 9.49097L31.8298 12.2957Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M33.4674 19.6062V18.3938L38.0003 18.9909L33.4674 19.6062Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M31.2236 26.7538L31.8298 25.7043L35.4579 28.491L31.2236 26.7538Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M25.7046 31.8295L26.7541 31.2233L28.5094 35.4486L25.7046 31.8295Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M18.394 33.4671H19.6064L19.0093 38L18.394 33.4671Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M11.2464 31.2233L12.2959 31.8295L9.50928 35.4576L11.2464 31.2233Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M6.17068 25.7043L6.77687 26.7538L2.55164 28.509L6.17068 25.7043Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M4.54215 18.3938V19.6062L0.000244141 19.009L4.54215 18.3938Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M6.77689 11.2462L6.1707 12.2957L2.5426 9.50903L6.77689 11.2462Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M12.296 6.17047L11.2464 6.77666L9.49121 2.55142L12.296 6.17047Z\"\n fill=\"${this.themeColor}\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_604_670\">\n <rect\n width=\"38\"\n height=\"38\"\n fill=\"white\"\n transform=\"translate(0.000244141)\"\n />\n </clipPath>\n </defs>\n </svg>\n <div class=\"instruction\">\n <p class=\"text-base title-color font-bold tip-header\">Good Light</p>\n <p class=\"tip-body\">\n Make sure you are in a well-lit environment where your face is\n clear and visible.\n </p>\n </div>\n </div>\n <div class=\"instructions\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"38\"\n height=\"36\"\n viewBox=\"0 0 38 36\"\n fill=\"none\"\n >\n <g clip-path=\"url(#clip0_604_672)\">\n <path\n d=\"M36.7211 12.6391H1.22537C1.06275 13.0909 0.910962 13.5427 0.77002 14.0055H37.1764C37.0463 13.5427 36.8946 13.0909 36.7211 12.6391Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M37.3716 14.7438H0.574875C0.466458 15.1625 0.379725 15.5813 0.303833 16.011H37.6426C37.5667 15.5813 37.48 15.1625 37.3716 14.7438Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M37.7727 16.8485H0.173703C0.119494 17.2342 0.0869685 17.6198 0.0544434 18.0055H37.892C37.8594 17.6198 37.8269 17.2342 37.7727 16.8485Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M37.9462 19.4711C37.9462 19.2948 37.9462 19.1295 37.9353 18.9532H0.0110865C0.000244802 19.1295 0.000244141 19.2948 0.000244141 19.4711C0.000244141 19.6474 0.000244802 19.8347 0.0110865 20.011H37.9353C37.9462 19.8347 37.9462 19.6474 37.9462 19.4711Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M37.8811 21.0579H0.0653076C0.086991 21.3774 0.119515 21.697 0.162882 22.0055H37.7836C37.8269 21.697 37.8595 21.3774 37.8811 21.0579Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M37.5992 23.1625H0.347168C0.401376 23.449 0.466426 23.7245 0.531477 24H37.4149C37.48 23.7245 37.545 23.449 37.5992 23.1625Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M37.0788 25.2672H0.867554C0.954287 25.5096 1.03018 25.7631 1.11691 26.0055H36.8295C36.9162 25.7631 37.0029 25.5096 37.0788 25.2672Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M36.2874 27.3719H1.65906L1.95178 28H35.9947L36.2874 27.3719Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M35.2032 29.4766H2.75403C2.84799 29.6529 2.95641 29.8292 3.07928 30.0055H34.878L35.2032 29.4766Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M33.7396 31.5813H4.20679L4.54288 32H33.4035L33.7396 31.5813Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M31.7989 33.6859H6.14746L6.49439 33.9945H31.452L31.7989 33.6859Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M29.0993 35.7906H8.84705L9.18314 36H28.7632L29.0993 35.7906Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M34.2384 8.01102C33.8914 7.53719 33.5228 7.07438 33.1325 6.63361C29.8258 2.60055 24.6977 0 18.9407 0C12.891 0 7.53525 2.86501 4.25021 7.26171H4.28274C4.08759 7.51515 3.89244 7.75757 3.70813 8.01102H34.2384Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M34.531 8.44077H3.41533C3.06839 8.94765 2.74314 9.47658 2.43958 10.0165H35.5068C35.2124 9.47215 34.8866 8.94597 34.531 8.44077Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M35.7887 10.5344H2.15776C1.9084 11.0193 1.68072 11.5151 1.47473 12.011H36.4717C36.2657 11.5151 36.0381 11.0193 35.7887 10.5344Z\"\n fill=\"${this.themeColor}\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_604_672\">\n <rect\n width=\"37.9459\"\n height=\"36\"\n fill=\"white\"\n transform=\"translate(0.000244141)\"\n />\n </clipPath>\n </defs>\n </svg>\n <div class=\"instruction\">\n <p class=\"text-base title-color font-bold tip-header\">Clear Image</p>\n <p>\n Hold your phone steady so the selfie is clear and sharp. Don't\n take blurry images.\n </p>\n </div>\n </div>\n <div class=\"instructions\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"38\"\n height=\"38\"\n viewBox=\"0 0 38 38\"\n fill=\"none\"\n >\n <path\n d=\"M18.9496 0C18.9496 0 13.9842 6.03205e-06 11.1469 1.09139C8.30957 2.18277 8.41092 4.46476 7.80292 6.15145C7.28787 7.56786 6.91455 9.02989 6.68824 10.517C6.68824 10.517 4.86424 11.3107 3.24291 12.2036C2.43378 12.6113 1.72475 13.1862 1.16487 13.8886C0.604986 14.5909 0.207618 15.404 0.000244141 16.2715C0.506911 21.4308 6.68824 23.6136 6.68824 23.6136C6.67321 21.7242 6.77473 19.8356 6.99225 17.9582C7.29625 16.47 7.90424 15.7754 10.4376 14.6841C12.9709 13.5927 18.9496 13.1958 18.9496 13.1958C18.9496 13.1958 24.9282 13.5927 27.4616 14.6841C29.9949 15.7754 30.7042 16.47 31.0082 17.9582C31.2258 19.8356 31.3273 21.7242 31.3122 23.6136C31.3122 23.6136 37.3922 21.4308 38.0002 16.2715C37.5126 14.5484 36.3463 13.0853 34.7576 12.2036L31.2109 10.517C30.9867 9.03874 30.6479 7.57936 30.1976 6.15145C29.4882 4.46476 28.4749 1.78591 26.8536 1.09139C25.2322 0.396873 18.9496 0 18.9496 0Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M10.7416 21.53C12.8058 21.6524 14.8473 22.0188 16.8216 22.6214C18.6235 23.1643 20.5642 23.0588 22.2936 22.3238C24.8269 21.2324 27.5629 21.4308 30.1976 21.6292C30.7849 21.6319 31.3675 21.7326 31.9202 21.9269C32.4269 22.1253 32.4269 22.423 32.4269 23.2167C32.14 24.7237 31.6635 26.19 31.0083 27.5822C30.7799 28.1169 30.4019 28.5776 29.9179 28.9111C29.4338 29.2446 28.8634 29.4375 28.2723 29.4674C27.2359 29.6525 26.1773 29.6859 25.1309 29.5666C24.279 29.5405 23.4506 29.2863 22.736 28.8315C22.0214 28.3766 21.4478 27.7387 21.0776 26.987C20.8887 26.3594 20.6161 25.7589 20.2669 25.201C19.8616 24.705 19.5576 24.5065 19.0509 24.6057C18.7188 24.5693 18.3842 24.6489 18.1061 24.8304C17.828 25.0119 17.6243 25.2837 17.5309 25.5979C16.9229 27.0862 16.4162 28.6736 14.6936 29.2689C13.939 29.5055 13.1548 29.6391 12.3629 29.6658C11.2345 29.6928 10.1081 29.5591 9.01892 29.2689C7.39759 28.7728 6.89092 27.3838 6.38425 25.8956C6.24296 25.2819 6.03928 24.6836 5.77625 24.1096C5.57359 23.5143 5.37092 23.1175 5.67492 22.5222C5.97892 21.9269 6.18159 22.0261 6.68825 21.9269C8.02604 21.6866 9.38168 21.5538 10.7416 21.53ZM12.0589 28.8721C14.4909 28.5744 14.8963 28.5744 15.6056 27.3838C16.0105 26.8072 16.3184 26.1708 16.5176 25.4987C16.9229 24.3081 16.7203 23.7128 15.6056 23.2167C13.2959 22.2331 10.6949 22.127 8.30959 22.9191C8.07105 23.0198 7.85723 23.1693 7.68248 23.3575C7.50772 23.5458 7.37604 23.7684 7.29626 24.0105C7.12045 24.8478 7.19957 25.7172 7.52382 26.5109C7.84807 27.3046 8.40315 27.9876 9.12025 28.4752C10.0603 28.8088 11.0617 28.9441 12.0589 28.8721ZM25.7389 28.9713C26.8173 28.9934 27.8881 28.7904 28.8802 28.376C30.7042 27.5823 30.7043 25.7963 30.7043 24.1096C30.7043 22.423 29.9949 22.9191 29.2856 22.7206C27.3226 22.2044 25.2509 22.2387 23.3069 22.8198C23.0246 22.8282 22.7476 22.8972 22.4956 23.0221C22.2436 23.1469 22.0228 23.3245 21.8487 23.5423C21.6746 23.7601 21.5516 24.0127 21.4884 24.2822C21.4252 24.5517 21.4233 24.8315 21.4829 25.1018C21.6856 27.3838 23.1043 28.5744 25.7389 28.9713Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M11.9576 24.4073C10.8429 24.4073 9.93091 25.1018 9.93091 25.7963V26.2924C9.9546 26.4062 10.0183 26.5082 10.1109 26.5807C10.2034 26.6532 10.319 26.6916 10.4376 26.6893C10.8429 26.6893 11.0456 26.4909 11.0456 26.2924V25.7963C11.0456 25.4987 11.4509 25.201 11.9576 25.201C12.4642 25.201 12.8696 25.4987 12.8696 25.7963V26.2924C12.8696 26.4909 13.1736 26.6893 13.4776 26.6893C13.5961 26.6916 13.7117 26.6532 13.8043 26.5807C13.8969 26.5082 13.9606 26.4062 13.9842 26.2924V25.7963C13.9842 25.1018 13.0722 24.4073 11.9576 24.4073Z\"\n fill=\"${this.themeColor}\"\n />\n <path\n d=\"M26.1442 24.4073C24.9282 24.4073 24.0162 25.1018 24.0162 25.7963V26.2924C24.0162 26.4909 24.3202 26.6893 24.6242 26.6893C24.9282 26.6893 25.2322 26.4909 25.2322 26.2924V25.7963C25.2322 25.4987 25.6376 25.201 26.1442 25.201C26.6509 25.201 27.0562 25.4987 27.0562 25.7963V26.2924C27.0799 26.4062 27.1436 26.5082 27.2362 26.5807C27.3287 26.6532 27.4444 26.6916 27.5629 26.6893C27.8669 26.6893 28.1709 26.4909 28.1709 26.2924V25.7963C28.1709 25.1018 27.2589 24.4073 26.1442 24.4073Z\"\n fill=\"${this.themeColor}\"\n />\n </svg>\n <div class=\"instruction\">\n <p class=\"text-base title-color font-bold tip-header\">Remove Obstructions</p>\n <p>\n Remove anything that covers your face, such glasses, masks, hats\n and scarves.\n </p>\n </div>\n </div>\n <div class=\"instructions\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"38\" height=\"38\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"${this.themeColor}\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-mood-happy\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0\" /><path d=\"M9 9l.01 0\" /><path d=\"M15 9l.01 0\" /><path d=\"M8 13a4 4 0 1 0 8 0h-8\" /></svg>\n <div class=\"instruction\">\n <p class=\"text-base title-color font-bold tip-header\">Big Smile</p>\n <p>\n When asked to smile, give a big smile, showing your teeth and keep your eyes open.\n </p>\n </div>\n </div>\n <section class='flow' style='--flow-space: 2.5rem'>\n <button id='allow' data-variant='solid full-width' class='button theme-background'>\n Allow\n </button>\n <button id='cancel' data-variant='outline full-width' class=\"button\" style='--flow-space: 1.5rem' ${this.hideBack || !this.showNavigation ? 'hidden' : ''}>\n Cancel\n </button>\n </section>\n </div>\n ${\n this.hideAttribution\n ? ''\n : `\n <powered-by-smile-id></powered-by-smile-id>\n `\n }\n </div>\n `;\n}\n\nclass SelfieCaptureInstructions extends HTMLElement {\n constructor() {\n super();\n this.templateString = templateString.bind(this);\n this.render = () => this.templateString();\n\n this.attachShadow({ mode: 'open' });\n }\n\n connectedCallback() {\n this.pages = [];\n const template = document.createElement('template');\n template.innerHTML = this.render();\n\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n\n this.allowButton = this.shadowRoot.querySelector('#allow');\n this.navigation = this.shadowRoot.querySelector('smileid-navigation');\n this.cancelButton = this.shadowRoot.querySelector('#cancel');\n\n this.navigation.addEventListener('navigation.back', () => {\n this.handleBackEvents();\n });\n\n if (this.allowButton) {\n this.allowButton.addEventListener('click', () => {\n this.dispatchEvent(\n new CustomEvent('selfie-capture-instructions.capture'),\n );\n });\n }\n\n this.navigation.addEventListener(\n 'navigation.close',\n () => {\n this.handleCloseEvents();\n },\n false,\n );\n\n this.cancelButton.addEventListener('click', () => {\n this.handleBackEvents();\n });\n }\n\n get hideBack() {\n return this.hasAttribute('hide-back');\n }\n\n get themeColor() {\n return this.getAttribute('theme-color') || '#001096';\n }\n\n get hideAttribution() {\n return this.hasAttribute('hide-attribution');\n }\n\n handleBackEvents() {\n this.dispatchEvent(\n new CustomEvent('selfie-capture-instructions.cancelled'),\n );\n }\n\n get showNavigation() {\n return this.hasAttribute('show-navigation');\n }\n\n handleCloseEvents() {\n this.dispatchEvent(new CustomEvent('selfie-capture-instructions.close'));\n }\n\n static get observedAttributes() {\n return ['show-navigation'];\n }\n}\n\nif (\n 'customElements' in window &&\n !window.customElements.get('selfie-capture-instructions')\n) {\n window.customElements.define(\n 'selfie-capture-instructions',\n SelfieCaptureInstructions,\n );\n}\n\nexport default SelfieCaptureInstructions;\n", "import styles from '../../../../styles/src/styles';\nimport '../../../navigation/src';\n\nfunction templateString() {\n return `\n <style>\n .retake-photo.button[data-variant~=\"ghost\"] {\n color: #FF5805;\n }\n .icon-btn {\n appearance: none;\n background: none;\n border: none;\n color: hsl(0deg 0% 94%);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 4px 8px;\n }\n .justify-right {\n justify-content: end !important;\n }\n .nav {\n display: flex;\n justify-content: space-between;\n }\n .back-wrapper {\n display: flex;\n align-items: center;\n }\n .back-button-text {\n font-size: 11px;\n line-height: 11px;\n color: rgb(21, 31, 114);\n }\n .section {\n border-radius: .5rem;\n margin-left: auto;\n margin-right: auto;\n max-width: 35ch;\n padding: 1rem;\n }\n .selfie-capture-review-image {\n overflow: hidden;\n aspect-ratio: 1/1;\n }\n #review-image {\n scale: 1.75;\n }\n @media (max-aspect-ratio: 1/1) {\n #review-image {\n transform: scaleX(-1) translateY(-10%);\n }\n }\n .tips,\n .powered-by {\n align-items: center;\n border-radius: 0.25rem;\n color: #4e6577;\n display: flex;\n justify-content: center;\n letter-spacing: 0.075em;\n }\n .powered-by {\n box-shadow: 0px 2.57415px 2.57415px rgba(0, 0, 0, 0.06);\n display: inline-flex;\n font-size: 0.5rem;\n }\n .tips {\n margin-left: auto;\n margin-right: auto;\n max-width: 17rem;\n }\n .tips > * + *,\n .powered-by > * + * {\n display: inline-block;\n margin-left: 0.5em;\n }\n .powered-by .company {\n color: #18406d;\n font-weight: 700;\n letter-spacing: 0.15rem;\n }\n .logo-mark {\n background-color: #004071;\n display: inline-block;\n padding: 0.25em 0.5em;\n }\n .logo-mark svg {\n height: auto;\n justify-self: center;\n width: 0.75em;\n }\n #selfie-capture-review-screen {\n block-size: 45rem;\n padding-block: 2rem;\n display: flex;\n flex-direction: column;\n max-block-size: 100%;\n max-inline-size: 40ch;\n }\n #selfie-capture-review-screen .selfie-review-container.landscape {\n height: auto;\n }\n #selfie-capture-review-screen header p {\n margin-block: 0 !important;\n }\n .selfie-review-container.portrait {\n width: 100%;\n position: relative;\n height: calc(200px * 1.4);\n }\n \n .selfie-review-container.portrait img {\n width: calc(213px + 0.9rem);\n height: 100%;\n position: absolute;\n top: 239px;\n left: 161px;\n padding-bottom: calc((214px * 1.4) / 3);\n padding-top: calc((191px * 1.4) / 3);\n object-fit: cover;\n \n transform: translateX(-50%) translateY(-50%);\n z-index: 1;\n block-size: 100%;\n }\n \n .selfie-container,\n .selfie-review-container.landscape {\n height: auto;\n clip-path: inset(15% 20% 20% 20% round 10px);\n overflow: hidden;\n }\n\n .selfie-container img {\n background-color: black;\n position: absolute;\n left: 50%;\n height: calc(100% - 6px);\n clip-path: ellipse(101px 118px);\n }\n\n .description {\n color: var(--neutral-off-black, #2D2B2A);\n text-align: center;\n /* p */\n font-family: DM Sans;\n font-size: 0.875rem;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n }\n .padding-bottom-2 {\n padding-bottom: 2rem;\n }\n .instructions-wrapper {\n display: inline-flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2rem;\n margin-block-start: 2rem;\n margin-block-end: 4rem;\n }\n .instructions {\n display: flex;\n align-items: center;\n text-align: initial;\n }\n .instructions svg {\n flex-shrink: 0;\n margin-inline-end: 2rem;\n }\n .instructions p {\n margin-block: 0;\n }\n .instruction-body {\n font-size: 0.75rem;\n }\n h1 {\n color: var(--web-digital-blue, #001096);\n text-align: center;\n /* h1 */\n font-size: 1.5rem;\n font-style: normal;\n font-weight: 700;\n line-height: 36px; /* 150% */\n }\n .p2 {\n font-size: 1rem;\n font-style: normal;\n font-weight: 500;\n line-height: 1rem;\n }\n .instruction-header {\n color: var(--web-digital-blue, #001096);\n }\n .h2 {\n font-size: 1rem;\n font-style: normal;\n font-weight: 700;\n line-height: 1.5rem;\n }\n </style>\n ${styles(this.themeColor)}\n <div id='selfie-capture-review-screen' class='flow center'>\n <smileid-navigation ${this.showNavigation ? 'show-navigation' : ''} hide-back></smileid-navigation>\n <h1 class=\"header-title text-2xl title-color font-bold\">\n Is your whole face visible and clear in this photo?\n </h1>\n <div class='section | flow'>\n <div class='selfie-review-container ${this.isPortraitCaptureView ? 'portrait' : 'landscape'}'>\n ${\n this.imageSrc\n ? `<img\n alt='your ID card'\n id='document-capture-review-image'\n src='${this.imageSrc}'\n width='396'\n />`\n : ''\n }\n </div>\n <div class='flow action-buttons'>\n <button data-variant='solid full-width' class='button' type='button' id='select-id-image'>\n Yes, use this\n </button>\n <button data-variant='ghost full-width' class='button retake-photo' type='button' id='re-capture-image'>\n No, Retake Selfie\n </button>\n </div>\n ${\n this.hideAttribution\n ? ''\n : `\n <powered-by-smile-id></powered-by-smile-id>\n `\n }\n </div>\n </div>\n `;\n}\n\nclass SelfieCaptureReview extends HTMLElement {\n constructor() {\n super();\n this.templateString = templateString.bind(this);\n this.render = () => this.templateString();\n\n this.attachShadow({ mode: 'open' });\n }\n\n connectedCallback() {\n const template = document.createElement('template');\n template.innerHTML = this.render();\n this.shadowRoot.innerHTML = '';\n this.shadowRoot.appendChild(template.content.cloneNode(true));\n this.setUpEventListeners();\n }\n\n static get observedAttributes() {\n return ['hide-back-to-host', 'show-navigation', 'data-image'];\n }\n\n get hideBack() {\n return this.hasAttribute('hide-back-to-host');\n }\n\n get showNavigation() {\n return this.hasAttribute('show-navigation');\n }\n\n get themeColor() {\n return this.getAttribute('theme-color') || '#001096';\n }\n\n get hideAttribution() {\n return this.hasAttribute('hide-attribution');\n }\n\n get imageSrc() {\n return this.getAttribute('data-image');\n }\n\n get title() {\n return this.getAttribute('title') || 'Submit Front of ID';\n }\n\n handleBackEvents() {\n this.dispatchEvent(new CustomEvent('selfie-capture-review.cancelled'));\n }\n\n handleCloseEvents() {\n this.dispatchEvent(new CustomEvent('selfie-capture-review.close'));\n }\n\n attributeChangedCallback(name) {\n switch (name) {\n case 'data-image':\n case 'hide-back-to-host':\n case 'show-navigation':\n this.shadowRoot.innerHTML = this.render();\n this.setUpEventListeners();\n break;\n default:\n break;\n }\n }\n\n setUpEventListeners() {\n this.selectImage = this.shadowRoot.querySelector('#select-id-image');\n this.reCaptureImage = this.shadowRoot.querySelector('#re-capture-image');\n this.navigation = this.shadowRoot.querySelector('smileid-navigation');\n\n this.navigation.addEventListener('navigation.back', () => {\n this.handleBackEvents();\n });\n this.navigation.addEventListener('navigation.close', () => {\n this.handleCloseEvents();\n });\n\n this.selectImage.addEventListener('click', () => {\n this.dispatchEvent(\n new CustomEvent('selfie-capture-review.accepted', {\n detail: {},\n }),\n );\n });\n this.reCaptureImage.addEventListener('click', () => {\n this.dispatchEvent(\n new CustomEvent('selfie-capture-review.rejected', {\n detail: {},\n }),\n );\n });\n }\n}\n\nif (\n 'customElements' in window &&\n !customElements.get('selfie-capture-review')\n) {\n window.customElements.define('selfie-capture-review', SelfieCaptureReview);\n}\n\nexport default SelfieCaptureReview;\n", "import './selfie-capture';\nimport './selfie-capture-instructions';\nimport './selfie-capture-review';\nimport SmartCamera from '../../../domain/camera/src/SmartCamera';\nimport styles from '../../../styles/src/styles';\nimport packageJson from '../../../../package.json';\n\nconst COMPONENTS_VERSION = packageJson.version;\n\nconst smartCameraWeb = document.querySelector('smart-camera-web');\n\nasync function getPermissions(captureScreen, facingMode = 'user') {\n try {\n const stream = await SmartCamera.getMedia({\n audio: false,\n video: { facingMode },\n });\n const devices = await navigator.mediaDevices.enumerateDevices();\n const videoDevice = devices.find(\n (device) =>\n device.kind === 'videoinput' &&\n stream.getVideoTracks()[0].getSettings().deviceId === device.deviceId,\n );\n smartCameraWeb?.dispatchEvent(\n new CustomEvent('metadata.camera-name', {\n detail: { cameraName: videoDevice?.label },\n }),\n );\n captureScreen.removeAttribute('data-camera-error');\n captureScreen.setAttribute('data-camera-ready', true);\n } catch (error) {\n captureScreen.removeAttribute('data-camera-ready');\n captureScreen.setAttribute(\n 'data-camera-error',\n SmartCamera.handleCameraError(error),\n );\n }\n}\n\nclass SelfieCaptureScreens extends HTMLElement {\n constructor() {\n super();\n this.activeScreen = null;\n smartCameraWeb?.dispatchEvent(new CustomEvent('metadata.initialize'));\n }\n\n connectedCallback() {\n this.innerHTML = `\n ${styles(this.themeColor)}\n <div>\n <selfie-capture-instructions theme-color='${this.themeColor}' ${this.showNavigation} ${this.hideAttribution} ${this.hideBack} hidden></selfie-capture-instructions>\n <selfie-capture theme-color='${this.themeColor}' ${this.showNavigation} ${this.allowAgentMode} ${this.allowAgentModeTests} ${this.hideAttribution} ${this.disableImageTests} hidden></selfie-capture>\n <selfie-capture-review theme-color='${this.themeColor}' ${this.showNavigation} ${this.hideAttribution} hidden></selfie-capture-review>\n </div>\n `;\n\n this._data = {\n images: [],\n meta: {\n libraryVersion: COMPONENTS_VERSION,\n },\n };\n\n this.selfieInstruction = this.querySelector('selfie-capture-instructions');\n this.selfieCapture = this.querySelector('selfie-capture');\n this.selfieReview = this.querySelector('selfie-capture-review');\n\n if (this.hideInstructions && !this.hasAttribute('hidden')) {\n getPermissions(this.selfieCapture, this.getAgentMode());\n }\n\n // If the initial screen is selfie-capture, we need to get permissions\n if (this.getAttribute('initial-screen') === 'selfie-capture') {\n getPermissions(this.selfieCapture, this.getAgentMode()).then(() =>\n this.setActiveScreen(this.selfieCapture),\n );\n } else if (this.hideInstructions) {\n this.setActiveScreen(this.selfieCapture);\n } else {\n this.setActiveScreen(this.selfieInstruction);\n }\n\n this.setUpEventListeners();\n }\n\n getAgentMode() {\n return this.inAgentMode ? 'environment' : 'user';\n }\n\n disconnectedCallback() {\n SmartCamera.stopMedia();\n if (this.activeScreen) {\n this.activeScreen.removeAttribute('hidden');\n }\n this.activeScreen = null;\n this.innerHTML = '';\n }\n\n setUpEventListeners() {\n this.selfieInstruction.addEventListener(\n 'selfie-capture-instructions.capture',\n async () => {\n await getPermissions(this.selfieCapture, this.getAgentMode()).then(() =>\n this.setActiveScreen(this.selfieCapture),\n );\n smartCameraWeb?.dispatchEvent(\n new CustomEvent('metadata.selfie-capture-start'),\n );\n smartCameraWeb?.dispatchEvent(\n new CustomEvent('metadata.selfie-origin', {\n detail: {\n imageOrigin: {\n environment: 'back_camera',\n user: 'front_camera',\n }[this.getAgentMode()],\n },\n }),\n );\n },\n );\n this.selfieInstruction.addEventListener(\n 'selfie-capture-instructions.cancelled',\n () => {\n this.handleBackEvents();\n },\n );\n\n this.selfieCapture.addEventListener('selfie-capture.cancelled', () => {\n this.selfieCapture.reset();\n SmartCamera.stopMedia();\n if (this.hideInstructions) {\n this.handleBackEvents();\n return;\n }\n\n this.setActiveScreen(this.selfieInstruction);\n });\n\n this.selfieCapture.addEventListener('selfie-capture.publish', (event) => {\n smartCameraWeb?.dispatchEvent(\n new CustomEvent('metadata.selfie-capture-end'),\n );\n this.selfieReview.setAttribute('data-image', event.detail.referenceImage);\n this._data.images = event.detail.images;\n SmartCamera.stopMedia();\n this.setActiveScreen(this.selfieReview);\n });\n\n this.selfieReview.addEventListener(\n 'selfie-capture-review.rejected',\n async () => {\n smartCameraWeb?.dispatchEvent(\n new CustomEvent('metadata.selfie-capture-retry'),\n );\n this.selfieReview.removeAttribute('data-image');\n this._data.images = [];\n if (this.hideInstructions) {\n this.setActiveScreen(this.selfieCapture);\n await getPermissions(this.selfieCapture, this.getAgentMode());\n } else {\n this.setActiveScreen(this.selfieInstruction);\n }\n },\n );\n\n this.selfieReview.addEventListener(\n 'selfie-capture-review.accepted',\n async () => {\n this._publishSelectedImages();\n },\n );\n\n [this.selfieInstruction, this.selfieCapture, this.selfieReview].forEach(\n (screen) => {\n screen.addEventListener(\n `${screen.nodeName.toLowerCase()}.close`,\n () => {\n this.handleCloseEvent();\n },\n );\n },\n );\n }\n\n _publishSelectedImages() {\n this.dispatchEvent(\n new CustomEvent('selfie-capture-screens.publish', { detail: this._data }),\n );\n }\n\n get hideInstructions() {\n return this.hasAttribute('hide-instructions');\n }\n\n get hideAttribution() {\n return this.hasAttribute('hide-attribution') ? 'hide-attribution' : '';\n }\n\n get hideBackOfId() {\n return this.hasAttribute('hide-back-of-id');\n }\n\n get showNavigation() {\n return this.hasAttribute('show-navigation') ? 'show-navigation' : '';\n }\n\n get inAgentMode() {\n return this.getAttribute('allow-agent-mode') === 'true';\n }\n\n get allowAgentMode() {\n return this.inAgentMode ? \"allow-agent-mode='true'\" : '';\n }\n\n get allowAgentModeTests() {\n return this.hasAttribute('show-agent-mode-for-tests')\n ? 'show-agent-mode-for-tests'\n : '';\n }\n\n get hideBack() {\n return this.hasAttribute('hide-back-to-host') ||\n this.hasAttribute('hide-back')\n ? 'hide-back'\n : '';\n }\n\n get disableImageTests() {\n return this.hasAttribute('disable-image-tests')\n ? 'disable-image-tests'\n : '';\n }\n\n get themeColor() {\n return this.getAttribute('theme-color') || '#001096';\n }\n\n setActiveScreen(screen) {\n this.activeScreen?.setAttribute('hidden', '');\n screen.removeAttribute('hidden');\n this.activeScreen = screen;\n }\n\n handleBackEvents() {\n this.dispatchEvent(new CustomEvent('selfie-capture-screens.cancelled'));\n }\n\n handleCloseEvent() {\n this.dispatchEvent(new CustomEvent('selfie-capture-screens.close'));\n }\n\n static get observedAttributes() {\n return [\n 'title',\n 'hidden',\n 'show-navigation',\n 'hide-back-to-host',\n 'initial-screen',\n ];\n }\n\n attributeChangedCallback(name) {\n switch (name) {\n case 'title':\n case 'hidden':\n case 'initial-screen':\n this.connectedCallback();\n break;\n default:\n break;\n }\n }\n}\n\nif (\n 'customElements' in window &&\n !customElements.get('selfie-capture-screens')\n) {\n customElements.define('selfie-capture-screens', SelfieCaptureScreens);\n}\n\nexport default SelfieCaptureScreens;\n", "import SelfieCaptureScreens from './SelfieCaptureScreens';\nimport SelfieCapture from './selfie-capture/SelfieCapture';\n\nexport default SelfieCaptureScreens;\nexport { SelfieCapture };\n"],
|
|
5
|
-
"mappings": "0KAKO,IAAMA,EAAa,CAExB,0BAA2B,EAE3B,wBAAyB,EAEzB,qBAAsB,EAEtB,mBAAoB,EAEpB,sBAAuB,EAEvB,oBAAqB,EAErB,oBAAqB,EAErB,kBAAmB,CACrB,ECtBA,IAAMC,EAAN,MAAMA,CAAY,CAGhB,aAAa,SAASC,EAAa,CACjC,OAAAD,EAAY,OAAS,MAAM,UAAU,aAAa,aAAaC,CAAW,EACnED,EAAY,MACrB,CAoBA,OAAO,WAAY,CACbA,EAAY,SACdA,EAAY,OAAO,UAAU,EAAE,QAASE,GAAUA,EAAM,KAAK,CAAC,EAC9DF,EAAY,OAAS,KAEzB,CAEA,aAAa,mBAAoB,CAC/B,GAAI,CAEF,IAAMG,GADU,MAAM,UAAU,aAAa,iBAAiB,GACjC,OAC1BC,GAAWA,EAAO,OAAS,YAC9B,EAEIC,EAAgB,GAEpB,OAAAF,EAAa,QAASC,GAG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kBAAkB,EACvB,MACF,QACE,KACJ,CACF,CACF,EAGE,mBAAoB,QACpB,CAAC,eAAe,IAAI,wBAAwB,GAE5C,eAAe,OAAO,yBAA0BL,CAAoB,EAGtE,IAAOM,EAAQN,ECtRf,IAAOO,GAAQC",
|
|
6
|
-
"names": ["IMAGE_TYPE", "_SmartCamera", "constraints", "track", "videoDevices", "device", "hasBackCamera", "error", "matchedModelNumber", "modelNumber", "__publicField", "SmartCamera", "SmartCamera_default", "typography", "typography_default", "styles", "themeColor", "typography_default", "styles_default", "package_default", "Navigation", "shadow", "style", "backButton", "closeButton", "_a", "COMPONENTS_VERSION", "package_default", "DEFAULT_NO_OF_LIVENESS_FRAMES", "hasMoreThanNColors", "data", "n", "colors", "getLivenessFramesIndices", "totalNoOfFrames", "numberOfFramesRequired", "selectedFrames", "frameDivisor", "frameInterval", "replacementFrameIndex", "i", "a", "b", "lastFrameIndex", "templateString", "styles_default", "getPermissions", "captureScreen", "constraints", "stream", "SmartCamera_default", "videoDevice", "device", "error", "SelfieCaptureScreen", "template", "imageOutlineLength", "livenessFramesIndices", "imageIndex", "IMAGE_TYPE", "canvas", "image", "enableImageTests", "video", "context", "imageData", "videoExists", "videoContainer", "_a", "_b", "_c", "_d", "name", "SelfieCapture_default", "templateString", "styles_default", "SelfieCaptureInstructions", "template", "templateString", "styles_default", "SelfieCaptureReview", "template", "name", "COMPONENTS_VERSION", "package_default", "smartCameraWeb", "getPermissions", "captureScreen", "facingMode", "stream", "SmartCamera_default", "videoDevice", "device", "error", "SelfieCaptureScreens", "styles_default", "event", "screen", "_a", "name", "SelfieCaptureScreens_default", "src_default", "SelfieCaptureScreens_default"]
|
|
7
|
-
}
|