@incodetech/web 2.2.0 → 2.3.0-rc.0

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.
Files changed (296) hide show
  1. package/THIRD_PARTY_NOTICES.txt +398 -0
  2. package/dist/ae-signature/ae-signature.es.js +4 -4
  3. package/dist/af-ZA-DTqKc5t4.js +3041 -0
  4. package/dist/am-EGNy2cbo.js +3041 -0
  5. package/dist/antifraud/antifraud.es.js +4 -4
  6. package/dist/ar-AE-Cb55U6s-.js +3057 -0
  7. package/dist/ar-EG-C8ucZII6.js +3057 -0
  8. package/dist/ar-MUpu33jy.js +3057 -0
  9. package/dist/assets/dm-sans-latin-400-normal.woff2 +0 -0
  10. package/dist/assets/dm-sans-latin-500-normal.woff2 +0 -0
  11. package/dist/assets/dm-sans-latin-600-normal.woff2 +0 -0
  12. package/dist/assets/dm-sans-latin-700-normal.woff2 +0 -0
  13. package/dist/assets/rethink-sans-latin-800-normal.woff2 +0 -0
  14. package/dist/authentication/authentication.es.js +15 -11
  15. package/dist/{autoFocusTitle-DB-23sv_.js → autoFocusTitle-CIbcUW_x.js} +2 -2
  16. package/dist/az-DlXjPSya.js +3041 -0
  17. package/dist/{back-horizontal-hint-CjdigFZj.js → back-horizontal-hint-UQ7Nof6k.js} +1 -1
  18. package/dist/{back-vertical-hint-OhaKsINF.js → back-vertical-hint-Crc8ybfk.js} +1 -1
  19. package/dist/base.css +917 -283
  20. package/dist/baseTutorial-DkL0vjUa.js +172 -0
  21. package/dist/bn-BuTjJr44.js +3041 -0
  22. package/dist/bottomSheet-DtUFrIAG.js +101 -0
  23. package/dist/bs-DUzGtLhU.js +3045 -0
  24. package/dist/ca-B6SY43GQ.js +3041 -0
  25. package/dist/cameraOverlay-Dn0r4NR9.js +2 -0
  26. package/dist/cameraOverlayHeader-CsokPtuL.js +43 -0
  27. package/dist/cameraView-DrTBPNWX.js +49 -0
  28. package/dist/captureFooter-DWCaAdIU.js +67 -0
  29. package/dist/ceb-DmXy5txv.js +3041 -0
  30. package/dist/certificate-issuance/certificate-issuance.es.js +19 -14
  31. package/dist/certificate-issuance/styles.css.js +1 -0
  32. package/dist/{checkbox-FGA-Ij-D.js → checkbox-D0wfscwg.js} +9 -8
  33. package/dist/{connectionError-BurQq_4R.js → connectionError-B61O7L3N.js} +4 -4
  34. package/dist/consent/consent.es.js +26 -33
  35. package/dist/consent/styles.css +4 -4
  36. package/dist/consent/styles.css.js +1 -0
  37. package/dist/countries-5e8kwG_m.js +8560 -0
  38. package/dist/{countrySelector-COZ7XQHp.js → countrySelector-C60Cdc5P.js} +8 -10
  39. package/dist/cross-document-data-match/cross-document-data-match.es.js +4 -4
  40. package/dist/cs-CZ-Gn3ZmW27.js +3049 -0
  41. package/dist/cs-dsQ7umNS.js +3049 -0
  42. package/dist/curp-validation/curp-validation.es.js +15 -22
  43. package/dist/curp-validation/styles.css.js +1 -0
  44. package/dist/custom-fields/styles.css.js +1 -0
  45. package/dist/{customFields-rVMTo1Yu.js → customFields-BdnLB6L1.js} +44 -19
  46. package/dist/{customWatchlist-DgpXtVRf.js → customWatchlist-DzeHJAa3.js} +14 -11
  47. package/dist/da-DK-CFQaOERk.js +3041 -0
  48. package/dist/{dashboardTheme-BUDq5UYs.js → dashboardTheme-BwKtcRSO.js} +31 -7
  49. package/dist/{dateInputComposed-DSgV0wnb.js → dateInputComposed-BcmKKwRL.js} +5 -5
  50. package/dist/dateInputComposed-DPM6l_SL.js +1 -0
  51. package/dist/de-BqG02U9o.js +3041 -0
  52. package/dist/document-capture/document-capture.es.js +1 -1
  53. package/dist/document-capture/styles.css +4 -4
  54. package/dist/document-capture/styles.css.js +1 -0
  55. package/dist/{documentCapture-sZj09g0I.js → documentCapture-CoMsW_gC.js} +16 -17
  56. package/dist/documentCapture-DMxz9eqT.js +2 -0
  57. package/dist/dropdownComposed-CXwC9j18.js +1 -0
  58. package/dist/{dropdownComposed-CEegNzG4.js → dropdownComposed-DYdI3B4r.js} +9 -9
  59. package/dist/{dynamicForms-t3vepXqJ.js → dynamic-forms/dynamic-forms.es.js} +24 -19
  60. package/dist/dynamic-forms/styles.css +5 -0
  61. package/dist/dynamic-forms/styles.css.js +1 -0
  62. package/dist/ekyb/ekyb.es.js +1 -1
  63. package/dist/ekyb/styles.css +15 -13
  64. package/dist/ekyb/styles.css.js +1 -0
  65. package/dist/{ekybModule-Dvkf5WAr.js → ekybModule-BRh9D01p.js} +17 -30
  66. package/dist/ekybModule-C5NPsc0F.js +2 -0
  67. package/dist/ekyc/ekyc.es.js +1 -1
  68. package/dist/ekyc/styles.css +17 -16
  69. package/dist/ekyc/styles.css.js +1 -0
  70. package/dist/{ekycModule-C5QXVGP7.js → ekycModule-Da6Bl3jg.js} +14 -29
  71. package/dist/ekycModule-DwKPvgA8.js +2 -0
  72. package/dist/el-BP_RmMeB.js +3041 -0
  73. package/dist/el-GR-9I2fVd-W.js +3041 -0
  74. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  75. package/dist/electronic-signature/styles.css +62 -2
  76. package/dist/electronic-signature/styles.css.js +1 -0
  77. package/dist/{electronic-signature-CyE8F7LZ.js → electronic-signature-KFF7qbid.js} +65 -18
  78. package/dist/email/email.es.js +9 -8
  79. package/dist/email/styles.css.js +1 -0
  80. package/dist/{emailInput-CsT8_C01.js → emailInput-B_qAEKBC.js} +4 -4
  81. package/dist/en-DG-poeSJZ7W.js +3041 -0
  82. package/dist/en-DnIfMNS1.js +3041 -0
  83. package/dist/errorContent-CMNfCIo_.js +58 -0
  84. package/dist/es-2x55EFTs.js +3041 -0
  85. package/dist/es-419-DgAnO5DV.js +3041 -0
  86. package/dist/es-ES-BSnroYMU.js +3041 -0
  87. package/dist/es-MX-CfztSSs4.js +3041 -0
  88. package/dist/et-CPoI8fYI.js +3041 -0
  89. package/dist/{expiredId-BQ1uPh7b.js → expiredId-DJYL_--M.js} +22 -27
  90. package/dist/extensibility.es.js +701 -24
  91. package/dist/fa-IR-CVf6F8GG.js +3041 -0
  92. package/dist/face-match/face-match.es.js +1 -1
  93. package/dist/face-match/styles.css +76 -40
  94. package/dist/face-match/styles.css.js +1 -0
  95. package/dist/{faceMatch-Rf-MMdto.js → faceMatch-CwoYbKBB.js} +7 -8
  96. package/dist/faceMatch-DCkrehin.js +2 -0
  97. package/dist/fi-FI-A4oUFztt.js +3041 -0
  98. package/dist/field-comparison/field-comparison.es.js +1 -1
  99. package/dist/field-comparison/styles.css +12 -0
  100. package/dist/field-comparison/styles.css.js +1 -0
  101. package/dist/{fieldComparison-BnGj3nNp.js → fieldComparison-D2WI5cYb.js} +27 -11
  102. package/dist/fieldComparison-OwqIkMRe.js +2 -0
  103. package/dist/fieldLabelHint-CxjArYkQ.js +16 -0
  104. package/dist/{finalSuccessScreen-B9uB3bST.js → finalSuccessScreen-BtJ5o2pi.js} +13 -14
  105. package/dist/fiscal-qr/fiscal-qr.es.js +22 -9
  106. package/dist/fiscal-qr/styles.css +13 -1
  107. package/dist/fiscal-qr/styles.css.js +1 -0
  108. package/dist/{extensibility-C5XqL_A3.js → flipAnimation-Bb5FQVF-.js} +608 -1005
  109. package/dist/flow/flow.es.js +308 -62
  110. package/dist/flow/shell/styles.css +402 -0
  111. package/dist/flow/shell/styles.css.js +1 -0
  112. package/dist/flow/styles.css +582 -312
  113. package/dist/formField-CBwWQ7wD.js +60 -0
  114. package/dist/fr-CA-CI4CD8PC.js +3045 -0
  115. package/dist/fr-ON88Zj-c.js +3045 -0
  116. package/dist/{front-horizontal-hint-Bhz1rq-w.js → front-horizontal-hint-mgovnJf3.js} +1 -1
  117. package/dist/{front-vertical-hint-C4FC1ksx.js → front-vertical-hint-qXMVdLri.js} +1 -1
  118. package/dist/geolocation/geolocation.es.js +9 -9
  119. package/dist/geolocation/styles.css +4 -4
  120. package/dist/geolocation/styles.css.js +1 -0
  121. package/dist/government-validation/government-validation.es.js +38 -86
  122. package/dist/government-validation/styles.css +2 -38
  123. package/dist/government-validation/styles.css.js +1 -0
  124. package/dist/he-pbmbYdr4.js +3049 -0
  125. package/dist/hi-DUIfQ6FS.js +3041 -0
  126. package/dist/hmn-DL-aQCTc.js +3041 -0
  127. package/dist/{homeScreen-Bv9mUUOF.js → homeScreen-vLMuzGDq.js} +8 -7
  128. package/dist/hr-DfJZSVnR.js +3045 -0
  129. package/dist/ht-DkZi3f0t.js +3041 -0
  130. package/dist/hu-ClhgOpVy.js +3041 -0
  131. package/dist/{icons-ChHV5iHi.js → icons-eIgP34nj.js} +99 -11
  132. package/dist/id/id.es.js +575 -62
  133. package/dist/id/styles.css +114 -45
  134. package/dist/id/styles.css.js +1 -0
  135. package/dist/id-DzyWelEE.js +3035 -0
  136. package/dist/{id-back-of-card-C4XViC7W.js → id-back-of-card-B6EcmiCs.js} +1 -1
  137. package/dist/{id-back-of-card-vertical-DCz0rj8m.js → id-back-of-card-vertical-B3FXhPpj.js} +1 -1
  138. package/dist/{id-front-of-card-CUA1ocVF.js → id-front-of-card-V_BlLaZr.js} +1 -1
  139. package/dist/{id-front-of-card-vertical-Ddm_BwD3.js → id-front-of-card-vertical-CuZjL8kc.js} +1 -1
  140. package/dist/id-ocr/styles.css.js +1 -0
  141. package/dist/id-selfie-flow/id-selfie-flow.es.js +10 -9
  142. package/dist/id-selfie-flow/styles.css +40 -8
  143. package/dist/id-verification/id-verification.es.js +5 -5
  144. package/dist/{idOcr-Da1-2sWY.js → idOcr-C5R3RWuL.js} +13 -16
  145. package/dist/identity-reuse/identity-reuse.es.js +8 -113
  146. package/dist/identity-reuse/styles.css +1 -1
  147. package/dist/{incode-logo-DeIDDejm.js → incode-logo-BzJOZr3f.js} +1 -64
  148. package/dist/{incodeComponent-BtFz-bx2.js → incodeComponent-D3_BSWan.js} +192 -22
  149. package/dist/{incodeModule-9K8KUs61.js → incodeModule-BQgvYKyr.js} +3 -3
  150. package/dist/index.es.js +4 -3
  151. package/dist/{inputComposed-C2zTEXsp.js → inputComposed-CTZnsHLi.js} +9 -9
  152. package/dist/inputComposed-wy0-orhJ.js +1 -0
  153. package/dist/it-D_u7w6N4.js +3041 -0
  154. package/dist/ja-Drh4oAoU.js +3035 -0
  155. package/dist/ja-JP-Pdxq82Pi.js +3035 -0
  156. package/dist/jv-DFcKF0Jp.js +3035 -0
  157. package/dist/ka--2y3Ae63.js +3041 -0
  158. package/dist/kk-CAs7inco.js +3041 -0
  159. package/dist/km-BlxkLYfw.js +3035 -0
  160. package/dist/ko-B1XhW0dx.js +3035 -0
  161. package/dist/ko-KP-DO1TCCY3.js +3035 -0
  162. package/dist/ky-BN92RThU.js +3041 -0
  163. package/dist/lo-DPUo8xJT.js +3035 -0
  164. package/dist/lt-CYBwI4Sq.js +3049 -0
  165. package/dist/lv-eBlwWu05.js +3045 -0
  166. package/dist/{mandatoryConsent-CxShVycM.js → mandatoryConsent-D96_9XTp.js} +10 -7
  167. package/dist/manualCaptureButton-C9H2_SJS.js +63 -0
  168. package/dist/{manualCaptureButton-DzJFIEfu.js → manualCaptureButton-igyQk3Yb.js} +10 -55
  169. package/dist/mk-QMUTND8Y.js +3041 -0
  170. package/dist/mn-CCTUOA1D.js +3041 -0
  171. package/dist/{modal-BH2wi8Q0.js → modal-CmF_MYIK.js} +7 -6
  172. package/dist/{modal.hooks-DcakflQ4.js → modal.hooks-B0Wrc9s2.js} +7 -1
  173. package/dist/ms-BKJgaJfx.js +3035 -0
  174. package/dist/my-DyLbN8b0.js +3035 -0
  175. package/dist/nb-NO-TVHxhuqB.js +3041 -0
  176. package/dist/ne-gBLZraiK.js +3041 -0
  177. package/dist/nl-CrO6Mvej.js +3041 -0
  178. package/dist/{numberedStep-DqtXyT11.js → numberedStep-DYznpDKc.js} +1 -1
  179. package/dist/{optionAccessibleLabel-C5iZCrlq.js → optionAccessibleLabel-CqBUOBxK.js} +6 -6
  180. package/dist/{otpInput-CvPR3ZpP.js → otpInput-tEovwPs7.js} +8 -83
  181. package/dist/{passport-horizontal-hint-DzkhjC8Q.js → passport-horizontal-hint-6Ghn2EEN.js} +1 -1
  182. package/dist/{passport-vertical-hint-Bd0BQn2Y.js → passport-vertical-hint-UPFFpdf4.js} +1 -1
  183. package/dist/passwordInputComposed-DNlYgHHW.js +74 -0
  184. package/dist/{pdf-BUoY_2gv.js → pdf-CFubyG0B.js} +1 -1
  185. package/dist/{pdfViewer-TTZmPABh.js → pdfViewer-4u14PDPr.js} +4 -4
  186. package/dist/pdfViewer-e2o97yIv.js +2 -0
  187. package/dist/{manualCaptureButton-D58WsS-x.js → permissions-DowRodJj.js} +200 -105
  188. package/dist/phone/phone.es.js +10 -9
  189. package/dist/phone/styles.css +1 -1
  190. package/dist/phone/styles.css.js +1 -0
  191. package/dist/{phoneInputComposed-byyszNoS.js → phoneInputComposed-B6sv-uB2.js} +20 -8412
  192. package/dist/pl-Bde7cCcc.js +3049 -0
  193. package/dist/{processing-B2eaSGLu.js → processing-s6GfNwuL.js} +2 -2
  194. package/dist/pt-BR-DFr2fPNi.js +3041 -0
  195. package/dist/pt-DhDCeOLY.js +3041 -0
  196. package/dist/pt-PT-CpiPMuNf.js +3041 -0
  197. package/dist/qe-signature/qe-signature.es.js +4 -4
  198. package/dist/radioGroupComposed-CJkzLiFc.js +1 -0
  199. package/dist/{radioGroupComposed-DQzTWutW.js → radioGroupComposed-DmoMukus.js} +15 -71
  200. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +34 -178
  201. package/dist/redirect-to-mobile/styles.css +2 -27
  202. package/dist/redirect-to-mobile/styles.css.js +1 -0
  203. package/dist/{registerIncodeElement-DW2PE_DX.js → registerIncodeElement-CbZczi4S.js} +1 -1
  204. package/dist/resendTimer-Cskll9rx.js +79 -0
  205. package/dist/{useModuleLoader-DxOEZ0vn.js → resolveApiKey-CB1_7ISm.js} +70 -222
  206. package/dist/{richText-CEwM8jib.js → richText-C8-Ny2SD.js} +9 -9
  207. package/dist/ro-B_ITJxYh.js +3045 -0
  208. package/dist/ru-Cg4U-rYv.js +3049 -0
  209. package/dist/ru-RU-fR_tbAfz.js +3049 -0
  210. package/dist/selfie/selfie.es.js +184 -8
  211. package/dist/selfie/styles.css +225 -36
  212. package/dist/selfie/styles.css.js +1 -0
  213. package/dist/signature/signature.es.js +8 -9
  214. package/dist/signature/styles.css.js +1 -0
  215. package/dist/sk-DbraxlnX.js +3049 -0
  216. package/dist/sl-DXgvmUsz.js +3049 -0
  217. package/dist/smsTabContent-Dado9q8t.js +172 -0
  218. package/dist/so-HI13bXme.js +3041 -0
  219. package/dist/{spacer-DLEDuWEx.js → spacer-ayyj5lMa.js} +10 -10
  220. package/dist/spinner-Z-5sEEDQ.js +88 -0
  221. package/dist/sr-DAb2JkvB.js +3045 -0
  222. package/dist/sr-Latn-DzSc6KyA.js +3045 -0
  223. package/dist/sr-YU-C9HskKa8.js +3045 -0
  224. package/dist/{statusPage-BF4qGjF3.js → statusPage-Bqz3Ci4f.js} +4 -4
  225. package/dist/sv-SE-B3X2fvQj.js +3041 -0
  226. package/dist/sw-BVL9Boua.js +3041 -0
  227. package/dist/{tabs-BGL1oRLb.js → tabs-B-ERCzA4.js} +2 -2
  228. package/dist/th-Cq87oDI8.js +3035 -0
  229. package/dist/th-TH-CY5gd6Bd.js +3035 -0
  230. package/dist/themes/dark.css +125 -0
  231. package/dist/themes/light.css +124 -0
  232. package/dist/tl-DUm9tRZ_.js +3041 -0
  233. package/dist/tl-PH-CNYNkY1M.js +3041 -0
  234. package/dist/tr-Cg3WJqb6.js +3041 -0
  235. package/dist/{tutorial-LQuJ4dse.js → tutorial-CHNfV-I3.js} +40 -226
  236. package/dist/types/certificate-issuance.d.ts +4 -4
  237. package/dist/types/dynamic-forms.d.ts +177 -0
  238. package/dist/types/extensibility.d.ts +75 -23
  239. package/dist/types/flow.d.ts +37 -0
  240. package/dist/types/government-validation.d.ts +2 -1
  241. package/dist/types/index.d.ts +28 -4
  242. package/dist/types/video-selfie.d.ts +6 -161
  243. package/dist/typography-ikD4-Z8S.js +53 -0
  244. package/dist/{uiConfig-Dqnjankd.js → uiConfig-C1jdTj-i.js} +184 -8
  245. package/dist/uk-C7hhE-77.js +3049 -0
  246. package/dist/uk-UA-DRsynQ5S.js +3049 -0
  247. package/dist/ur-BEX50SCe.js +3041 -0
  248. package/dist/useCoverMedia-VLw3OYN_.js +149 -0
  249. package/dist/useModuleLoader-DpcbSKBH.js +176 -0
  250. package/dist/uz-BYlUXaIK.js +3041 -0
  251. package/dist/{vendor-preact-BPXMFRom.js → vendor-preact-C0jX1Cbq.js} +68 -181
  252. package/dist/{verificationResult-q_zD_Pxh.js → verificationResult-B26DDXFT.js} +32 -25
  253. package/dist/vi-DddAM-WF.js +3035 -0
  254. package/dist/video-selfie/styles.css +51 -17
  255. package/dist/video-selfie/styles.css.js +1 -0
  256. package/dist/video-selfie/video-selfie.es.js +35 -23
  257. package/dist/watchlist/watchlist.es.js +7 -7
  258. package/dist/watchlist-for-business/styles.css.js +1 -0
  259. package/dist/{watchlistForBusiness-C_zqdY4P.js → watchlistForBusiness-o4F6Czxp.js} +28 -16
  260. package/dist/workflow/styles.css +1073 -356
  261. package/dist/workflow/workflow.es.js +17 -15
  262. package/dist/zh-CN-B8y9prPe.js +3035 -0
  263. package/dist/zh-HANT-ChrXbHBA.js +3035 -0
  264. package/dist/zh-TW-DrkMIR_e.js +3035 -0
  265. package/dist/zh-aG_wPYUs.js +3035 -0
  266. package/package.json +32 -22
  267. package/dist/bottomSheet-BWEUBq8m.js +0 -38
  268. package/dist/dateInputComposed-BGC37jC7.js +0 -1
  269. package/dist/documentCapture-CO9kIxru.js +0 -2
  270. package/dist/dropdownComposed-Bf4EcKFw.js +0 -1
  271. package/dist/ekybModule-uN0ComAn.js +0 -2
  272. package/dist/ekycModule-B7KRJ7l3.js +0 -2
  273. package/dist/faceMatch-DjD2hgBp.js +0 -2
  274. package/dist/fieldComparison-DFH4hUM_.js +0 -2
  275. package/dist/inputComposed-kKtrvJU5.js +0 -1
  276. package/dist/pdfViewer-C1B-07Wu.js +0 -2
  277. package/dist/requiredLabelHint-Dx0WS2cR.js +0 -17
  278. package/dist/snackbar-eBOj46AK.js +0 -16
  279. package/dist/spinner-CJCOHUKx.js +0 -95
  280. package/dist/successIcon-DS8BLsgy.js +0 -30
  281. package/dist/types/dynamic-forms/styles.d.ts +0 -1
  282. /package/dist/{aligndevicelottie-CfoZ5Uus.js → aligndevicelottie-B12hbVhG.js} +0 -0
  283. /package/dist/{back-tutorial-BHyRHyET.js → back-tutorial-XdmQ0Wml.js} +0 -0
  284. /package/dist/{backdevicelottie-yKkczgFy.js → backdevicelottie-m_DOD8xE.js} +0 -0
  285. /package/dist/{blurdevicelottie-8BbophdM.js → blurdevicelottie-DQo_hTMD.js} +0 -0
  286. /package/dist/{browser-ponyfill-CBjGwwPW.js → browser-ponyfill-ZkeBm4ji.js} +0 -0
  287. /package/dist/{defineProperty-BbpBna-2.js → defineProperty-BojnCa44.js} +0 -0
  288. /package/dist/{flip-animation-CvN8FLNc.js → flip-animation-VicedlT5.js} +0 -0
  289. /package/dist/{frontdevicelottie-CFcahVLk.js → frontdevicelottie-CyIerlMv.js} +0 -0
  290. /package/dist/{glaredevicelottie-Cnvah0kz.js → glaredevicelottie-QM2C6Ivp.js} +0 -0
  291. /package/dist/{id-laser-h-BaUHzX-d.js → id-laser-h-B0-iXcvl.js} +0 -0
  292. /package/dist/{id-laser-v-Dv9yEYJE.js → id-laser-v-Bqh6vimi.js} +0 -0
  293. /package/dist/{id-tutorial-BOOsXlAJ.js → id-tutorial-IhmAzrIF.js} +0 -0
  294. /package/dist/{lottie_light-Bv56F2Ae.js → lottie_light-CzZ3CHBk.js} +0 -0
  295. /package/dist/{passport-tutorial-CeSup6m9.js → passport-tutorial-61vlloJS.js} +0 -0
  296. /package/dist/{selfieTutorial-CYa8bq6B.js → selfieTutorial-BRQ2QNxQ.js} +0 -0
@@ -0,0 +1,149 @@
1
+ import { _ as y, h as q } from "./vendor-preact-C0jX1Cbq.js";
2
+ //#region src/hooks/useCoverMedia.ts
3
+ var CONVERGENCE_TIMEOUT_MS = 1e4;
4
+ var CONVERGENCE_INTERVAL_MS = 100;
5
+ var PENDING_CLASS = "IncodeMediaCoverPending";
6
+ /**
7
+ * Returns the explicit box that produces `object-fit: cover` geometry.
8
+ * Kept pure so the visual calculation is independently testable.
9
+ */
10
+ function calculateCoverMediaGeometry(sourceWidth, sourceHeight, containerWidth, containerHeight) {
11
+ if (!Number.isFinite(sourceWidth) || !Number.isFinite(sourceHeight) || !Number.isFinite(containerWidth) || !Number.isFinite(containerHeight) || sourceWidth <= 0 || sourceHeight <= 0 || containerWidth <= 0 || containerHeight <= 0) return;
12
+ const scale = Math.max(containerWidth / sourceWidth, containerHeight / sourceHeight);
13
+ const width = sourceWidth * scale;
14
+ const height = sourceHeight * scale;
15
+ return {
16
+ width: `${width.toFixed(2)}px`,
17
+ height: `${height.toFixed(2)}px`,
18
+ left: `${((containerWidth - width) / 2).toFixed(2)}px`,
19
+ top: `${((containerHeight - height) / 2).toFixed(2)}px`
20
+ };
21
+ }
22
+ /**
23
+ * Safari reports `object-fit` support even when its MediaStream paint is
24
+ * incorrect, so CSS.supports cannot detect this bug. Keep the workaround
25
+ * narrowly scoped to the affected iOS/iPadOS 27 WebKit builds instead.
26
+ */
27
+ function needsExplicitMediaCover(userAgent, platform, maxTouchPoints) {
28
+ const iosDevice = /\b(?:iPhone|iPad|iPod)\b/.test(userAgent);
29
+ const iosVersion = userAgent.match(/CPU (?:iPhone )?OS (\d+)[_.]/)?.[1];
30
+ if (iosDevice && iosVersion === "27") return true;
31
+ const desktopModeIPad = platform === "MacIntel" && maxTouchPoints > 1;
32
+ const safariVersion = userAgent.match(/Version\/(\d+)[._]/)?.[1];
33
+ return desktopModeIPad && safariVersion === "27";
34
+ }
35
+ function isExplicitMediaCoverNeeded() {
36
+ if (typeof navigator === "undefined") return false;
37
+ return needsExplicitMediaCover(navigator.userAgent, navigator.platform, navigator.maxTouchPoints);
38
+ }
39
+ /**
40
+ * Applies explicit `cover` geometry only to iOS/iPadOS 27 MediaStream media.
41
+ * Compliant browsers retain native `object-fit: cover`, with no observers,
42
+ * event listeners, polling, or inline geometry.
43
+ *
44
+ * `reattachKey` restarts the workaround when the media source changes. Pass a
45
+ * MediaStream for video and the canvas instance for imperative avatar canvases.
46
+ */
47
+ function useCoverMedia(mediaRef, reattachKey) {
48
+ const explicitCoverNeeded = isExplicitMediaCoverNeeded();
49
+ const applyCover = q(() => {
50
+ const media = mediaRef.current;
51
+ const container = media?.parentElement;
52
+ if (!media || !container) return false;
53
+ const sourceWidth = media instanceof HTMLVideoElement ? media.videoWidth : media.width;
54
+ const sourceHeight = media instanceof HTMLVideoElement ? media.videoHeight : media.height;
55
+ const { width: containerWidth, height: containerHeight } = container.getBoundingClientRect();
56
+ const geometry = calculateCoverMediaGeometry(sourceWidth, sourceHeight, containerWidth, containerHeight);
57
+ if (!geometry) return false;
58
+ if (media.style.width === geometry.width && media.style.height === geometry.height && media.style.left === geometry.left && media.style.top === geometry.top) return true;
59
+ media.style.maxWidth = "none";
60
+ media.style.maxHeight = "none";
61
+ media.style.right = "auto";
62
+ media.style.bottom = "auto";
63
+ media.style.width = geometry.width;
64
+ media.style.height = geometry.height;
65
+ media.style.left = geometry.left;
66
+ media.style.top = geometry.top;
67
+ return true;
68
+ }, [mediaRef]);
69
+ y(() => {
70
+ if (!explicitCoverNeeded) return;
71
+ const media = mediaRef.current;
72
+ if (!media) return;
73
+ const cleanups = [];
74
+ media.classList.add(PENDING_CLASS);
75
+ cleanups.push(() => media.classList.remove(PENDING_CLASS));
76
+ const reveal = () => media.classList.remove(PENDING_CLASS);
77
+ let pollId;
78
+ let timeoutId;
79
+ const stopPolling = () => {
80
+ if (pollId !== void 0) {
81
+ clearInterval(pollId);
82
+ pollId = void 0;
83
+ }
84
+ if (timeoutId !== void 0) {
85
+ clearTimeout(timeoutId);
86
+ timeoutId = void 0;
87
+ }
88
+ };
89
+ cleanups.push(stopPolling);
90
+ const tryApply = () => {
91
+ const applied = applyCover();
92
+ if (applied) {
93
+ reveal();
94
+ stopPolling();
95
+ }
96
+ return applied;
97
+ };
98
+ let frame1 = 0;
99
+ let frame2 = 0;
100
+ const applyCoverSettled = () => {
101
+ tryApply();
102
+ cancelAnimationFrame(frame1);
103
+ cancelAnimationFrame(frame2);
104
+ frame1 = requestAnimationFrame(() => {
105
+ tryApply();
106
+ frame2 = requestAnimationFrame(tryApply);
107
+ });
108
+ };
109
+ if (media instanceof HTMLVideoElement) for (const event of ["loadedmetadata", "resize"]) {
110
+ media.addEventListener(event, applyCoverSettled);
111
+ cleanups.push(() => media.removeEventListener(event, applyCoverSettled));
112
+ }
113
+ if (typeof ResizeObserver !== "undefined") {
114
+ const observer = new ResizeObserver(() => tryApply());
115
+ const container = media.parentElement;
116
+ if (container) observer.observe(container);
117
+ observer.observe(media);
118
+ cleanups.push(() => observer.disconnect());
119
+ }
120
+ window.addEventListener("resize", applyCoverSettled);
121
+ window.addEventListener("orientationchange", applyCoverSettled);
122
+ cleanups.push(() => {
123
+ window.removeEventListener("resize", applyCoverSettled);
124
+ window.removeEventListener("orientationchange", applyCoverSettled);
125
+ });
126
+ const startPolling = () => {
127
+ pollId = setInterval(tryApply, CONVERGENCE_INTERVAL_MS);
128
+ timeoutId = setTimeout(() => {
129
+ stopPolling();
130
+ reveal();
131
+ }, CONVERGENCE_TIMEOUT_MS);
132
+ };
133
+ if (!tryApply()) startPolling();
134
+ applyCoverSettled();
135
+ return () => {
136
+ cancelAnimationFrame(frame1);
137
+ cancelAnimationFrame(frame2);
138
+ for (const cleanup of cleanups) cleanup();
139
+ };
140
+ }, [
141
+ applyCover,
142
+ explicitCoverNeeded,
143
+ mediaRef,
144
+ reattachKey
145
+ ]);
146
+ return applyCover;
147
+ }
148
+ //#endregion
149
+ export { useCoverMedia as t };
@@ -0,0 +1,176 @@
1
+ import { _ as y, c as A, f as d } from "./vendor-preact-C0jX1Cbq.js";
2
+ //#region src/modules/flow/headlessModule.ts
3
+ var HeadlessWorkflowModule = () => null;
4
+ var lazyHeadlessWorkflowModule = () => Promise.resolve(HeadlessWorkflowModule);
5
+ var HEADLESS_WORKFLOW_MODULE_KEYS = new Set(["IDENTITY_SEARCH"]);
6
+ //#endregion
7
+ //#region src/modules/flow/useModuleLoader.ts
8
+ function getLoadErrorMessage(error, fallbackMessage) {
9
+ return error instanceof Error ? error.message : fallbackMessage;
10
+ }
11
+ var loadedComponents = /* @__PURE__ */ new WeakMap();
12
+ var inflightLoaders = /* @__PURE__ */ new WeakMap();
13
+ function getLoaderKey(loader) {
14
+ return loader;
15
+ }
16
+ function getCachedComponent(loader) {
17
+ if (!loader) return void 0;
18
+ return loadedComponents.get(getLoaderKey(loader));
19
+ }
20
+ function loadComponent(loader) {
21
+ const key = getLoaderKey(loader);
22
+ const cached = loadedComponents.get(key);
23
+ if (cached) return Promise.resolve(cached);
24
+ const inflight = inflightLoaders.get(key);
25
+ if (inflight) return inflight;
26
+ const promise = loader().then((Component) => {
27
+ loadedComponents.set(key, Component);
28
+ inflightLoaders.delete(key);
29
+ return Component;
30
+ }).catch((error) => {
31
+ inflightLoaders.delete(key);
32
+ throw error;
33
+ });
34
+ inflightLoaders.set(key, promise);
35
+ return promise;
36
+ }
37
+ function computeInitialState(loader) {
38
+ if (!loader) return { status: "idle" };
39
+ const cached = getCachedComponent(loader);
40
+ if (cached) return {
41
+ status: "loaded",
42
+ Component: cached
43
+ };
44
+ return { status: "loading" };
45
+ }
46
+ function resolveModuleLoader(moduleKey, modules, headlessModuleKeys) {
47
+ if (!moduleKey) return void 0;
48
+ return modules[moduleKey] ?? (headlessModuleKeys?.has(moduleKey) ? lazyHeadlessWorkflowModule : void 0);
49
+ }
50
+ function useLazyComponentLoader(options) {
51
+ const { loader, onLoading, onLoaded, onError } = options;
52
+ const [state, setState] = d(() => computeInitialState(loader));
53
+ const prevLoaderRef = A(loader);
54
+ const onLoadingRef = A(onLoading);
55
+ const onLoadedRef = A(onLoaded);
56
+ const onErrorRef = A(onError);
57
+ y(() => {
58
+ onLoadingRef.current = onLoading;
59
+ onLoadedRef.current = onLoaded;
60
+ onErrorRef.current = onError;
61
+ }, [
62
+ onLoading,
63
+ onLoaded,
64
+ onError
65
+ ]);
66
+ if (prevLoaderRef.current !== loader) {
67
+ prevLoaderRef.current = loader;
68
+ setState(computeInitialState(loader));
69
+ }
70
+ y(() => {
71
+ if (!loader) return;
72
+ if (getCachedComponent(loader)) {
73
+ onLoadedRef.current?.();
74
+ return;
75
+ }
76
+ onLoadingRef.current?.();
77
+ let cancelled = false;
78
+ loadComponent(loader).then((Component) => {
79
+ if (!cancelled) {
80
+ setState({
81
+ status: "loaded",
82
+ Component
83
+ });
84
+ onLoadedRef.current?.();
85
+ }
86
+ }).catch((error) => {
87
+ if (!cancelled) {
88
+ const errorMessage = getLoadErrorMessage(error, "Failed to load component");
89
+ setState({
90
+ status: "error",
91
+ error: errorMessage
92
+ });
93
+ onErrorRef.current?.(errorMessage);
94
+ }
95
+ });
96
+ return () => {
97
+ cancelled = true;
98
+ };
99
+ }, [loader]);
100
+ return state;
101
+ }
102
+ function useModuleLoader(options) {
103
+ const { moduleKey, modules, headlessModuleKeys, onModuleLoading, onModuleLoaded, onError } = options;
104
+ const [unsupportedModuleKey, setUnsupportedModuleKey] = d(void 0);
105
+ const loader = resolveModuleLoader(moduleKey, modules, headlessModuleKeys);
106
+ const state = useLazyComponentLoader({
107
+ loader,
108
+ onLoading: moduleKey ? () => onModuleLoading?.(moduleKey) : void 0,
109
+ onLoaded: moduleKey ? () => onModuleLoaded?.(moduleKey) : void 0,
110
+ onError: moduleKey ? (errorMessage) => onError?.(`Failed to load ${moduleKey}: ${errorMessage}`) : void 0
111
+ });
112
+ y(() => {
113
+ if (!moduleKey) {
114
+ setUnsupportedModuleKey(void 0);
115
+ return;
116
+ }
117
+ if (!loader) setUnsupportedModuleKey(moduleKey);
118
+ else setUnsupportedModuleKey(void 0);
119
+ }, [loader, moduleKey]);
120
+ if (!moduleKey) return { status: "idle" };
121
+ if (unsupportedModuleKey) return {
122
+ status: "unsupported",
123
+ moduleKey: unsupportedModuleKey
124
+ };
125
+ if (state.status === "idle" || state.status === "loading") return {
126
+ status: "loading",
127
+ moduleKey
128
+ };
129
+ if (state.status === "error") return {
130
+ status: "error",
131
+ moduleKey,
132
+ error: state.error
133
+ };
134
+ return {
135
+ status: "loaded",
136
+ moduleKey,
137
+ Component: state.Component
138
+ };
139
+ }
140
+ function useModulePreloader(options) {
141
+ const { moduleKey, modules } = options;
142
+ const loader = moduleKey ? modules[moduleKey] : void 0;
143
+ const state = useLazyComponentLoader({ loader });
144
+ return loader != null && state.status === "loaded";
145
+ }
146
+ function schedulePrefetch(run) {
147
+ if (typeof requestIdleCallback !== "undefined") requestIdleCallback(() => {
148
+ run();
149
+ });
150
+ else setTimeout(run, 0);
151
+ }
152
+ function usePrefetchNextModule(steps, currentStepIndex, modules, currentModuleLoaded) {
153
+ const prefetchedRef = A(/* @__PURE__ */ new Set());
154
+ y(() => {
155
+ if (!currentModuleLoaded) return;
156
+ if (currentStepIndex < steps.length - 1) {
157
+ const nextStep = steps[currentStepIndex + 1];
158
+ if (nextStep && !prefetchedRef.current.has(nextStep)) {
159
+ prefetchedRef.current.add(nextStep);
160
+ const loader = modules[nextStep];
161
+ if (loader) schedulePrefetch(() => {
162
+ loader().catch(() => {
163
+ prefetchedRef.current.delete(nextStep);
164
+ });
165
+ });
166
+ }
167
+ }
168
+ }, [
169
+ steps,
170
+ currentStepIndex,
171
+ modules,
172
+ currentModuleLoaded
173
+ ]);
174
+ }
175
+ //#endregion
176
+ export { HEADLESS_WORKFLOW_MODULE_KEYS as a, usePrefetchNextModule as i, useModuleLoader as n, useModulePreloader as r, useLazyComponentLoader as t };