@authme/util 2.1.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +308 -0
  2. package/README.md +7 -0
  3. package/package.json +11 -0
  4. package/src/index.d.ts +2 -0
  5. package/src/index.js +6 -0
  6. package/src/index.js.map +1 -0
  7. package/src/lib/common/index.d.ts +7 -0
  8. package/src/lib/common/index.js +95 -0
  9. package/src/lib/common/index.js.map +1 -0
  10. package/src/lib/shared-util.d.ts +2 -0
  11. package/src/lib/shared-util.js +6 -0
  12. package/src/lib/shared-util.js.map +1 -0
  13. package/src/lib/storage/index.d.ts +1 -0
  14. package/src/lib/storage/index.js +5 -0
  15. package/src/lib/storage/index.js.map +1 -0
  16. package/src/lib/storage/storage.d.ts +11 -0
  17. package/src/lib/storage/storage.js +26 -0
  18. package/src/lib/storage/storage.js.map +1 -0
  19. package/src/ui/camera.d.ts +30 -0
  20. package/src/ui/camera.js +64 -0
  21. package/src/ui/camera.js.map +1 -0
  22. package/src/ui/canvas/clear-canvas.d.ts +1 -0
  23. package/src/ui/canvas/clear-canvas.js +9 -0
  24. package/src/ui/canvas/clear-canvas.js.map +1 -0
  25. package/src/ui/canvas/get-canvas-size.d.ts +19 -0
  26. package/src/ui/canvas/get-canvas-size.js +85 -0
  27. package/src/ui/canvas/get-canvas-size.js.map +1 -0
  28. package/src/ui/canvas/index.d.ts +3 -0
  29. package/src/ui/canvas/index.js +7 -0
  30. package/src/ui/canvas/index.js.map +1 -0
  31. package/src/ui/canvas/video-to-image.d.ts +14 -0
  32. package/src/ui/canvas/video-to-image.js +27 -0
  33. package/src/ui/canvas/video-to-image.js.map +1 -0
  34. package/src/ui/element-style.d.ts +2 -0
  35. package/src/ui/element-style.js +14 -0
  36. package/src/ui/element-style.js.map +1 -0
  37. package/src/ui/error-message.d.ts +5 -0
  38. package/src/ui/error-message.js +80 -0
  39. package/src/ui/error-message.js.map +1 -0
  40. package/src/ui/icon.d.ts +3 -0
  41. package/src/ui/icon.js +8 -0
  42. package/src/ui/icon.js.map +1 -0
  43. package/src/ui/index.d.ts +7 -0
  44. package/src/ui/index.js +11 -0
  45. package/src/ui/index.js.map +1 -0
  46. package/src/ui/popup.d.ts +3 -0
  47. package/src/ui/popup.js +58 -0
  48. package/src/ui/popup.js.map +1 -0
  49. package/src/ui/spinner.d.ts +2 -0
  50. package/src/ui/spinner.js +28 -0
  51. package/src/ui/spinner.js.map +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,308 @@
1
+ # Changelog
2
+
3
+ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
+
5
+ ## [2.1.1](https://github.com/AuthMe01/web-client-sdk/compare/prod-2.1.0...prod-2.1.1) (2022-09-08)
6
+
7
+ ## 1.2.2 (2022-07-28)
8
+
9
+ ### Bug Fixes
10
+
11
+ - Fix Liveness Verify bugs ([2233d91](https://github.com/AuthMe01/web-client-sdk/commit/2233d913d8356ba55129ba442a7b36bc790cff0d))
12
+ - PR-81 fix canvas size calculation ([b6ae89a](https://github.com/AuthMe01/web-client-sdk/commit/b6ae89ab2f0a3163b996e6adc9331efa45716d63))
13
+ - PR-83 fix calculate canvas size ([aed08b8](https://github.com/AuthMe01/web-client-sdk/commit/aed08b8b194037c0378e6e54559b6e86625f83f1))
14
+ - PROD-1279 fix style issue on ios webview ([4fc578a](https://github.com/AuthMe01/web-client-sdk/commit/4fc578afe1d882de67d384cb9e0499a00b0fc920))
15
+ - PROD-135 adjust fas config ([3d89ba7](https://github.com/AuthMe01/web-client-sdk/commit/3d89ba716d6b0bfd07ec2d5353213d8e8306c83d))
16
+ - PROD-255 fix rotate and process ([62d6c13](https://github.com/AuthMe01/web-client-sdk/commit/62d6c13dacf93369701e229e5f4950addfc94c1a))
17
+ - PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
18
+ - PROD-255 refactor process ([3ddcc9a](https://github.com/AuthMe01/web-client-sdk/commit/3ddcc9a75af048692bbc62652643a83cb889a150))
19
+ - PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
20
+ - PROD-298 fix memory leak & compress frame size ([03ddfd1](https://github.com/AuthMe01/web-client-sdk/commit/03ddfd122ba01e21bb3feef7c25efc3fa895d855))
21
+ - PROD-327 ios border css bug ([d6135fa](https://github.com/AuthMe01/web-client-sdk/commit/d6135fa6a6c7650ac2aec74b43bc4ab2c89044c7))
22
+ - PROD-428 adjust ocr mask size ([852c6f0](https://github.com/AuthMe01/web-client-sdk/commit/852c6f0caab92871b2b5d057b3a7aea5f5f3a0cd))
23
+ - PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
24
+ - PROD-514 header, lottie, step content size ([12c4228](https://github.com/AuthMe01/web-client-sdk/commit/12c422844d533ed7d98f8c990b199194ce6beb04))
25
+ - PROD-560 optimize load time(for view) ([7a38e1b](https://github.com/AuthMe01/web-client-sdk/commit/7a38e1b5ec1588013935f8f69f19f67ae22dedaa))
26
+ - PROD-572 add verify api error msg & favicon ([e3c7936](https://github.com/AuthMe01/web-client-sdk/commit/e3c7936c02b17a5eb3cf73c7f24a580599638d00))
27
+ - PROD-588 rotate timer, text content ([2938a37](https://github.com/AuthMe01/web-client-sdk/commit/2938a376b7dd42fa4c2ac6a48ddfde28eb190bd2))
28
+ - PROD-650 fix option order, add error&state hint ([2758980](https://github.com/AuthMe01/web-client-sdk/commit/275898079f173f77b8609cb02e84dca6c06daac4))
29
+ - PROD-650 ocr rotate style and idcard text ([b7f1b7c](https://github.com/AuthMe01/web-client-sdk/commit/b7f1b7cf62b21122021ebf8cf29b27f316da50ca))
30
+ - PROD-714 ipad camera, input zoon in on mobile, ios15 rotate bug ([851baeb](https://github.com/AuthMe01/web-client-sdk/commit/851baeb94ce7563db62a452882cdc136a3505ecd))
31
+ - PROD-756 sync ocr rotate action ([57bc8ea](https://github.com/AuthMe01/web-client-sdk/commit/57bc8ea9f6dd3e36a2281de48a047b4691799998))
32
+ - PROD-760 disable frame resize ([8210508](https://github.com/AuthMe01/web-client-sdk/commit/8210508bfac11a3b94deb233891d9ef576ef1fb3))
33
+ - PROD-792 fix camera blur & limit frame size ([ea56557](https://github.com/AuthMe01/web-client-sdk/commit/ea56557797ce050bce4b478237e1853f030fc9ac))
34
+ - PROD-892 rename function name ([ef47ca8](https://github.com/AuthMe01/web-client-sdk/commit/ef47ca817b30a14bbcdba8ba2d9a4a10fc7bc9bb))
35
+ - PROD-892 rename isMobile function name ([9233f1d](https://github.com/AuthMe01/web-client-sdk/commit/9233f1d3a1f55ce5bc77ae6f4b874fd3533252fe))
36
+
37
+ ### Features
38
+
39
+ - PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
40
+ - PR-83 ocr sdk ui ([a414e99](https://github.com/AuthMe01/web-client-sdk/commit/a414e993406071b58bbad5b3db17c0e1c2a86d43))
41
+ - PROD-114 fix liveness issue ([96edf70](https://github.com/AuthMe01/web-client-sdk/commit/96edf70125a2385b1ada8e63a0eb411bf341dc62))
42
+ - PROD-115 custom ui color ([cb9033a](https://github.com/AuthMe01/web-client-sdk/commit/cb9033a89ae5948f3789432981e477d882d02e37))
43
+ - PROD-127 sdk ocr rotate ([8ea76c8](https://github.com/AuthMe01/web-client-sdk/commit/8ea76c84a4ed2cd13bd139b9e31b89f6daa2e64d))
44
+ - PROD-127 sdk orc rotate ([e33ae65](https://github.com/AuthMe01/web-client-sdk/commit/e33ae657908e2e751efcf1fb52b57b406277f233))
45
+ - PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
46
+ - PROD-242 Adjust fps ([883c9ed](https://github.com/AuthMe01/web-client-sdk/commit/883c9ed917f6536114f5d12cdadffd705b834951))
47
+ - PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
48
+ - PROD-255 add spinner when ocrstart and fraudstart ([342777a](https://github.com/AuthMe01/web-client-sdk/commit/342777a250b46271e0d675fb920f7ecb1721d072))
49
+ - PROD-279 add sdk info in request header ([ca871cf](https://github.com/AuthMe01/web-client-sdk/commit/ca871cf9182aab3499c1918a8b946dc6d2cfed9a))
50
+ - PROD-327 add error message ([6ef47d9](https://github.com/AuthMe01/web-client-sdk/commit/6ef47d9daa633fb8c42e2c01369c032ac7af3147))
51
+ - PROD-327 change lottie second ([5eff08e](https://github.com/AuthMe01/web-client-sdk/commit/5eff08edcda22a0bd8dd71b73370c8f08009a250))
52
+ - PROD-327 replace liveness ui ([9c5934a](https://github.com/AuthMe01/web-client-sdk/commit/9c5934ad743a0ce5f8fccdabec323c1b3e93f79c))
53
+ - PROD-327 replace ocr ui ([73d4759](https://github.com/AuthMe01/web-client-sdk/commit/73d4759012bdfd0cb0bed9bc338f36af8ec27536))
54
+ - PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
55
+ - PROD-375 add popup panel ([77f4672](https://github.com/AuthMe01/web-client-sdk/commit/77f467240474190a276961a86fe48fb66d520b54))
56
+ - PROD-375 replace lottie animate and refactor mask border ([39ce902](https://github.com/AuthMe01/web-client-sdk/commit/39ce90241c60bda0e65f648b8ed61b4c577ffae2))
57
+ - PROD-571 add network listener ([39e2db3](https://github.com/AuthMe01/web-client-sdk/commit/39e2db352859070704122bd6672bcdcea5f3fd53))
58
+ - PROD-892 update confirm image page and add MRZ ocr ([90916f7](https://github.com/AuthMe01/web-client-sdk/commit/90916f7a1323103a3dc3a8f2ea825b6a4098dd54))
59
+
60
+ ## 1.2.1 (2022-07-28)
61
+
62
+ ### Bug Fixes
63
+
64
+ - PR-81 fix canvas size calculation ([b6ae89a](https://github.com/AuthMe01/web-client-sdk/commit/b6ae89ab2f0a3163b996e6adc9331efa45716d63))
65
+ - PR-83 fix calculate canvas size ([aed08b8](https://github.com/AuthMe01/web-client-sdk/commit/aed08b8b194037c0378e6e54559b6e86625f83f1))
66
+ - PROD-1279 fix style issue on ios webview ([4fc578a](https://github.com/AuthMe01/web-client-sdk/commit/4fc578afe1d882de67d384cb9e0499a00b0fc920))
67
+ - PROD-135 adjust fas config ([3d89ba7](https://github.com/AuthMe01/web-client-sdk/commit/3d89ba716d6b0bfd07ec2d5353213d8e8306c83d))
68
+ - PROD-255 fix rotate and process ([62d6c13](https://github.com/AuthMe01/web-client-sdk/commit/62d6c13dacf93369701e229e5f4950addfc94c1a))
69
+ - PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
70
+ - PROD-255 refactor process ([3ddcc9a](https://github.com/AuthMe01/web-client-sdk/commit/3ddcc9a75af048692bbc62652643a83cb889a150))
71
+ - PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
72
+ - PROD-298 fix memory leak & compress frame size ([03ddfd1](https://github.com/AuthMe01/web-client-sdk/commit/03ddfd122ba01e21bb3feef7c25efc3fa895d855))
73
+ - PROD-327 ios border css bug ([d6135fa](https://github.com/AuthMe01/web-client-sdk/commit/d6135fa6a6c7650ac2aec74b43bc4ab2c89044c7))
74
+ - PROD-428 adjust ocr mask size ([852c6f0](https://github.com/AuthMe01/web-client-sdk/commit/852c6f0caab92871b2b5d057b3a7aea5f5f3a0cd))
75
+ - PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
76
+ - PROD-514 header, lottie, step content size ([12c4228](https://github.com/AuthMe01/web-client-sdk/commit/12c422844d533ed7d98f8c990b199194ce6beb04))
77
+ - PROD-560 optimize load time(for view) ([7a38e1b](https://github.com/AuthMe01/web-client-sdk/commit/7a38e1b5ec1588013935f8f69f19f67ae22dedaa))
78
+ - PROD-572 add verify api error msg & favicon ([e3c7936](https://github.com/AuthMe01/web-client-sdk/commit/e3c7936c02b17a5eb3cf73c7f24a580599638d00))
79
+ - PROD-588 rotate timer, text content ([2938a37](https://github.com/AuthMe01/web-client-sdk/commit/2938a376b7dd42fa4c2ac6a48ddfde28eb190bd2))
80
+ - PROD-650 fix option order, add error&state hint ([2758980](https://github.com/AuthMe01/web-client-sdk/commit/275898079f173f77b8609cb02e84dca6c06daac4))
81
+ - PROD-650 ocr rotate style and idcard text ([b7f1b7c](https://github.com/AuthMe01/web-client-sdk/commit/b7f1b7cf62b21122021ebf8cf29b27f316da50ca))
82
+ - PROD-714 ipad camera, input zoon in on mobile, ios15 rotate bug ([851baeb](https://github.com/AuthMe01/web-client-sdk/commit/851baeb94ce7563db62a452882cdc136a3505ecd))
83
+ - PROD-756 sync ocr rotate action ([57bc8ea](https://github.com/AuthMe01/web-client-sdk/commit/57bc8ea9f6dd3e36a2281de48a047b4691799998))
84
+ - PROD-760 disable frame resize ([8210508](https://github.com/AuthMe01/web-client-sdk/commit/8210508bfac11a3b94deb233891d9ef576ef1fb3))
85
+ - PROD-792 fix camera blur & limit frame size ([ea56557](https://github.com/AuthMe01/web-client-sdk/commit/ea56557797ce050bce4b478237e1853f030fc9ac))
86
+ - PROD-892 rename function name ([ef47ca8](https://github.com/AuthMe01/web-client-sdk/commit/ef47ca817b30a14bbcdba8ba2d9a4a10fc7bc9bb))
87
+ - PROD-892 rename isMobile function name ([9233f1d](https://github.com/AuthMe01/web-client-sdk/commit/9233f1d3a1f55ce5bc77ae6f4b874fd3533252fe))
88
+
89
+ ### Features
90
+
91
+ - PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
92
+ - PR-83 ocr sdk ui ([a414e99](https://github.com/AuthMe01/web-client-sdk/commit/a414e993406071b58bbad5b3db17c0e1c2a86d43))
93
+ - PROD-114 fix liveness issue ([96edf70](https://github.com/AuthMe01/web-client-sdk/commit/96edf70125a2385b1ada8e63a0eb411bf341dc62))
94
+ - PROD-115 custom ui color ([cb9033a](https://github.com/AuthMe01/web-client-sdk/commit/cb9033a89ae5948f3789432981e477d882d02e37))
95
+ - PROD-127 sdk ocr rotate ([8ea76c8](https://github.com/AuthMe01/web-client-sdk/commit/8ea76c84a4ed2cd13bd139b9e31b89f6daa2e64d))
96
+ - PROD-127 sdk orc rotate ([e33ae65](https://github.com/AuthMe01/web-client-sdk/commit/e33ae657908e2e751efcf1fb52b57b406277f233))
97
+ - PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
98
+ - PROD-242 Adjust fps ([883c9ed](https://github.com/AuthMe01/web-client-sdk/commit/883c9ed917f6536114f5d12cdadffd705b834951))
99
+ - PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
100
+ - PROD-255 add spinner when ocrstart and fraudstart ([342777a](https://github.com/AuthMe01/web-client-sdk/commit/342777a250b46271e0d675fb920f7ecb1721d072))
101
+ - PROD-279 add sdk info in request header ([ca871cf](https://github.com/AuthMe01/web-client-sdk/commit/ca871cf9182aab3499c1918a8b946dc6d2cfed9a))
102
+ - PROD-327 add error message ([6ef47d9](https://github.com/AuthMe01/web-client-sdk/commit/6ef47d9daa633fb8c42e2c01369c032ac7af3147))
103
+ - PROD-327 change lottie second ([5eff08e](https://github.com/AuthMe01/web-client-sdk/commit/5eff08edcda22a0bd8dd71b73370c8f08009a250))
104
+ - PROD-327 replace liveness ui ([9c5934a](https://github.com/AuthMe01/web-client-sdk/commit/9c5934ad743a0ce5f8fccdabec323c1b3e93f79c))
105
+ - PROD-327 replace ocr ui ([73d4759](https://github.com/AuthMe01/web-client-sdk/commit/73d4759012bdfd0cb0bed9bc338f36af8ec27536))
106
+ - PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
107
+ - PROD-375 add popup panel ([77f4672](https://github.com/AuthMe01/web-client-sdk/commit/77f467240474190a276961a86fe48fb66d520b54))
108
+ - PROD-375 replace lottie animate and refactor mask border ([39ce902](https://github.com/AuthMe01/web-client-sdk/commit/39ce90241c60bda0e65f648b8ed61b4c577ffae2))
109
+ - PROD-571 add network listener ([39e2db3](https://github.com/AuthMe01/web-client-sdk/commit/39e2db352859070704122bd6672bcdcea5f3fd53))
110
+ - PROD-892 update confirm image page and add MRZ ocr ([90916f7](https://github.com/AuthMe01/web-client-sdk/commit/90916f7a1323103a3dc3a8f2ea825b6a4098dd54))
111
+
112
+ # 1.2.0 (2022-07-25)
113
+
114
+ ### Bug Fixes
115
+
116
+ - PR-81 fix canvas size calculation ([b6ae89a](https://github.com/AuthMe01/web-client-sdk/commit/b6ae89ab2f0a3163b996e6adc9331efa45716d63))
117
+ - PR-83 fix calculate canvas size ([aed08b8](https://github.com/AuthMe01/web-client-sdk/commit/aed08b8b194037c0378e6e54559b6e86625f83f1))
118
+ - PROD-1279 fix style issue on ios webview ([4fc578a](https://github.com/AuthMe01/web-client-sdk/commit/4fc578afe1d882de67d384cb9e0499a00b0fc920))
119
+ - PROD-135 adjust fas config ([3d89ba7](https://github.com/AuthMe01/web-client-sdk/commit/3d89ba716d6b0bfd07ec2d5353213d8e8306c83d))
120
+ - PROD-255 fix rotate and process ([62d6c13](https://github.com/AuthMe01/web-client-sdk/commit/62d6c13dacf93369701e229e5f4950addfc94c1a))
121
+ - PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
122
+ - PROD-255 refactor process ([3ddcc9a](https://github.com/AuthMe01/web-client-sdk/commit/3ddcc9a75af048692bbc62652643a83cb889a150))
123
+ - PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
124
+ - PROD-298 fix memory leak & compress frame size ([03ddfd1](https://github.com/AuthMe01/web-client-sdk/commit/03ddfd122ba01e21bb3feef7c25efc3fa895d855))
125
+ - PROD-327 ios border css bug ([d6135fa](https://github.com/AuthMe01/web-client-sdk/commit/d6135fa6a6c7650ac2aec74b43bc4ab2c89044c7))
126
+ - PROD-428 adjust ocr mask size ([852c6f0](https://github.com/AuthMe01/web-client-sdk/commit/852c6f0caab92871b2b5d057b3a7aea5f5f3a0cd))
127
+ - PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
128
+ - PROD-514 header, lottie, step content size ([12c4228](https://github.com/AuthMe01/web-client-sdk/commit/12c422844d533ed7d98f8c990b199194ce6beb04))
129
+ - PROD-560 optimize load time(for view) ([7a38e1b](https://github.com/AuthMe01/web-client-sdk/commit/7a38e1b5ec1588013935f8f69f19f67ae22dedaa))
130
+ - PROD-572 add verify api error msg & favicon ([e3c7936](https://github.com/AuthMe01/web-client-sdk/commit/e3c7936c02b17a5eb3cf73c7f24a580599638d00))
131
+ - PROD-588 rotate timer, text content ([2938a37](https://github.com/AuthMe01/web-client-sdk/commit/2938a376b7dd42fa4c2ac6a48ddfde28eb190bd2))
132
+ - PROD-650 fix option order, add error&state hint ([2758980](https://github.com/AuthMe01/web-client-sdk/commit/275898079f173f77b8609cb02e84dca6c06daac4))
133
+ - PROD-650 ocr rotate style and idcard text ([b7f1b7c](https://github.com/AuthMe01/web-client-sdk/commit/b7f1b7cf62b21122021ebf8cf29b27f316da50ca))
134
+ - PROD-714 ipad camera, input zoon in on mobile, ios15 rotate bug ([851baeb](https://github.com/AuthMe01/web-client-sdk/commit/851baeb94ce7563db62a452882cdc136a3505ecd))
135
+ - PROD-756 sync ocr rotate action ([57bc8ea](https://github.com/AuthMe01/web-client-sdk/commit/57bc8ea9f6dd3e36a2281de48a047b4691799998))
136
+ - PROD-760 disable frame resize ([8210508](https://github.com/AuthMe01/web-client-sdk/commit/8210508bfac11a3b94deb233891d9ef576ef1fb3))
137
+ - PROD-792 fix camera blur & limit frame size ([ea56557](https://github.com/AuthMe01/web-client-sdk/commit/ea56557797ce050bce4b478237e1853f030fc9ac))
138
+ - PROD-892 rename function name ([ef47ca8](https://github.com/AuthMe01/web-client-sdk/commit/ef47ca817b30a14bbcdba8ba2d9a4a10fc7bc9bb))
139
+ - PROD-892 rename isMobile function name ([9233f1d](https://github.com/AuthMe01/web-client-sdk/commit/9233f1d3a1f55ce5bc77ae6f4b874fd3533252fe))
140
+
141
+ ### Features
142
+
143
+ - PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
144
+ - PR-83 ocr sdk ui ([a414e99](https://github.com/AuthMe01/web-client-sdk/commit/a414e993406071b58bbad5b3db17c0e1c2a86d43))
145
+ - PROD-114 fix liveness issue ([96edf70](https://github.com/AuthMe01/web-client-sdk/commit/96edf70125a2385b1ada8e63a0eb411bf341dc62))
146
+ - PROD-115 custom ui color ([cb9033a](https://github.com/AuthMe01/web-client-sdk/commit/cb9033a89ae5948f3789432981e477d882d02e37))
147
+ - PROD-127 sdk ocr rotate ([8ea76c8](https://github.com/AuthMe01/web-client-sdk/commit/8ea76c84a4ed2cd13bd139b9e31b89f6daa2e64d))
148
+ - PROD-127 sdk orc rotate ([e33ae65](https://github.com/AuthMe01/web-client-sdk/commit/e33ae657908e2e751efcf1fb52b57b406277f233))
149
+ - PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
150
+ - PROD-242 Adjust fps ([883c9ed](https://github.com/AuthMe01/web-client-sdk/commit/883c9ed917f6536114f5d12cdadffd705b834951))
151
+ - PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
152
+ - PROD-255 add spinner when ocrstart and fraudstart ([342777a](https://github.com/AuthMe01/web-client-sdk/commit/342777a250b46271e0d675fb920f7ecb1721d072))
153
+ - PROD-279 add sdk info in request header ([ca871cf](https://github.com/AuthMe01/web-client-sdk/commit/ca871cf9182aab3499c1918a8b946dc6d2cfed9a))
154
+ - PROD-327 add error message ([6ef47d9](https://github.com/AuthMe01/web-client-sdk/commit/6ef47d9daa633fb8c42e2c01369c032ac7af3147))
155
+ - PROD-327 change lottie second ([5eff08e](https://github.com/AuthMe01/web-client-sdk/commit/5eff08edcda22a0bd8dd71b73370c8f08009a250))
156
+ - PROD-327 replace liveness ui ([9c5934a](https://github.com/AuthMe01/web-client-sdk/commit/9c5934ad743a0ce5f8fccdabec323c1b3e93f79c))
157
+ - PROD-327 replace ocr ui ([73d4759](https://github.com/AuthMe01/web-client-sdk/commit/73d4759012bdfd0cb0bed9bc338f36af8ec27536))
158
+ - PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
159
+ - PROD-375 add popup panel ([77f4672](https://github.com/AuthMe01/web-client-sdk/commit/77f467240474190a276961a86fe48fb66d520b54))
160
+ - PROD-375 replace lottie animate and refactor mask border ([39ce902](https://github.com/AuthMe01/web-client-sdk/commit/39ce90241c60bda0e65f648b8ed61b4c577ffae2))
161
+ - PROD-571 add network listener ([39e2db3](https://github.com/AuthMe01/web-client-sdk/commit/39e2db352859070704122bd6672bcdcea5f3fd53))
162
+ - PROD-892 update confirm image page and add MRZ ocr ([90916f7](https://github.com/AuthMe01/web-client-sdk/commit/90916f7a1323103a3dc3a8f2ea825b6a4098dd54))
163
+
164
+ ## 1.1.1 (2022-07-07)
165
+
166
+ ### Bug Fixes
167
+
168
+ - PR-81 fix canvas size calculation ([b6ae89a](https://github.com/AuthMe01/web-client-sdk/commit/b6ae89ab2f0a3163b996e6adc9331efa45716d63))
169
+ - PR-83 fix calculate canvas size ([aed08b8](https://github.com/AuthMe01/web-client-sdk/commit/aed08b8b194037c0378e6e54559b6e86625f83f1))
170
+ - PROD-135 adjust fas config ([3d89ba7](https://github.com/AuthMe01/web-client-sdk/commit/3d89ba716d6b0bfd07ec2d5353213d8e8306c83d))
171
+ - PROD-255 fix rotate and process ([62d6c13](https://github.com/AuthMe01/web-client-sdk/commit/62d6c13dacf93369701e229e5f4950addfc94c1a))
172
+ - PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
173
+ - PROD-255 refactor process ([3ddcc9a](https://github.com/AuthMe01/web-client-sdk/commit/3ddcc9a75af048692bbc62652643a83cb889a150))
174
+ - PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
175
+ - PROD-298 fix memory leak & compress frame size ([03ddfd1](https://github.com/AuthMe01/web-client-sdk/commit/03ddfd122ba01e21bb3feef7c25efc3fa895d855))
176
+ - PROD-327 ios border css bug ([d6135fa](https://github.com/AuthMe01/web-client-sdk/commit/d6135fa6a6c7650ac2aec74b43bc4ab2c89044c7))
177
+ - PROD-428 adjust ocr mask size ([852c6f0](https://github.com/AuthMe01/web-client-sdk/commit/852c6f0caab92871b2b5d057b3a7aea5f5f3a0cd))
178
+ - PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
179
+ - PROD-514 header, lottie, step content size ([12c4228](https://github.com/AuthMe01/web-client-sdk/commit/12c422844d533ed7d98f8c990b199194ce6beb04))
180
+ - PROD-560 optimize load time(for view) ([7a38e1b](https://github.com/AuthMe01/web-client-sdk/commit/7a38e1b5ec1588013935f8f69f19f67ae22dedaa))
181
+ - PROD-572 add verify api error msg & favicon ([e3c7936](https://github.com/AuthMe01/web-client-sdk/commit/e3c7936c02b17a5eb3cf73c7f24a580599638d00))
182
+ - PROD-588 rotate timer, text content ([2938a37](https://github.com/AuthMe01/web-client-sdk/commit/2938a376b7dd42fa4c2ac6a48ddfde28eb190bd2))
183
+ - PROD-650 fix option order, add error&state hint ([2758980](https://github.com/AuthMe01/web-client-sdk/commit/275898079f173f77b8609cb02e84dca6c06daac4))
184
+ - PROD-650 ocr rotate style and idcard text ([b7f1b7c](https://github.com/AuthMe01/web-client-sdk/commit/b7f1b7cf62b21122021ebf8cf29b27f316da50ca))
185
+ - PROD-714 ipad camera, input zoon in on mobile, ios15 rotate bug ([851baeb](https://github.com/AuthMe01/web-client-sdk/commit/851baeb94ce7563db62a452882cdc136a3505ecd))
186
+ - PROD-756 sync ocr rotate action ([57bc8ea](https://github.com/AuthMe01/web-client-sdk/commit/57bc8ea9f6dd3e36a2281de48a047b4691799998))
187
+ - PROD-760 disable frame resize ([8210508](https://github.com/AuthMe01/web-client-sdk/commit/8210508bfac11a3b94deb233891d9ef576ef1fb3))
188
+ - PROD-792 fix camera blur & limit frame size ([ea56557](https://github.com/AuthMe01/web-client-sdk/commit/ea56557797ce050bce4b478237e1853f030fc9ac))
189
+ - PROD-892 rename function name ([ef47ca8](https://github.com/AuthMe01/web-client-sdk/commit/ef47ca817b30a14bbcdba8ba2d9a4a10fc7bc9bb))
190
+ - PROD-892 rename isMobile function name ([9233f1d](https://github.com/AuthMe01/web-client-sdk/commit/9233f1d3a1f55ce5bc77ae6f4b874fd3533252fe))
191
+
192
+ ### Features
193
+
194
+ - PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
195
+ - PR-83 ocr sdk ui ([a414e99](https://github.com/AuthMe01/web-client-sdk/commit/a414e993406071b58bbad5b3db17c0e1c2a86d43))
196
+ - PROD-114 fix liveness issue ([96edf70](https://github.com/AuthMe01/web-client-sdk/commit/96edf70125a2385b1ada8e63a0eb411bf341dc62))
197
+ - PROD-115 custom ui color ([cb9033a](https://github.com/AuthMe01/web-client-sdk/commit/cb9033a89ae5948f3789432981e477d882d02e37))
198
+ - PROD-127 sdk ocr rotate ([8ea76c8](https://github.com/AuthMe01/web-client-sdk/commit/8ea76c84a4ed2cd13bd139b9e31b89f6daa2e64d))
199
+ - PROD-127 sdk orc rotate ([e33ae65](https://github.com/AuthMe01/web-client-sdk/commit/e33ae657908e2e751efcf1fb52b57b406277f233))
200
+ - PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
201
+ - PROD-242 Adjust fps ([883c9ed](https://github.com/AuthMe01/web-client-sdk/commit/883c9ed917f6536114f5d12cdadffd705b834951))
202
+ - PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
203
+ - PROD-255 add spinner when ocrstart and fraudstart ([342777a](https://github.com/AuthMe01/web-client-sdk/commit/342777a250b46271e0d675fb920f7ecb1721d072))
204
+ - PROD-279 add sdk info in request header ([ca871cf](https://github.com/AuthMe01/web-client-sdk/commit/ca871cf9182aab3499c1918a8b946dc6d2cfed9a))
205
+ - PROD-327 add error message ([6ef47d9](https://github.com/AuthMe01/web-client-sdk/commit/6ef47d9daa633fb8c42e2c01369c032ac7af3147))
206
+ - PROD-327 change lottie second ([5eff08e](https://github.com/AuthMe01/web-client-sdk/commit/5eff08edcda22a0bd8dd71b73370c8f08009a250))
207
+ - PROD-327 replace liveness ui ([9c5934a](https://github.com/AuthMe01/web-client-sdk/commit/9c5934ad743a0ce5f8fccdabec323c1b3e93f79c))
208
+ - PROD-327 replace ocr ui ([73d4759](https://github.com/AuthMe01/web-client-sdk/commit/73d4759012bdfd0cb0bed9bc338f36af8ec27536))
209
+ - PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
210
+ - PROD-375 add popup panel ([77f4672](https://github.com/AuthMe01/web-client-sdk/commit/77f467240474190a276961a86fe48fb66d520b54))
211
+ - PROD-375 replace lottie animate and refactor mask border ([39ce902](https://github.com/AuthMe01/web-client-sdk/commit/39ce90241c60bda0e65f648b8ed61b4c577ffae2))
212
+ - PROD-571 add network listener ([39e2db3](https://github.com/AuthMe01/web-client-sdk/commit/39e2db352859070704122bd6672bcdcea5f3fd53))
213
+ - PROD-892 update confirm image page and add MRZ ocr ([90916f7](https://github.com/AuthMe01/web-client-sdk/commit/90916f7a1323103a3dc3a8f2ea825b6a4098dd54))
214
+
215
+ # 1.1.0 (2022-07-06)
216
+
217
+ ### Bug Fixes
218
+
219
+ - PR-81 fix canvas size calculation ([b6ae89a](https://github.com/AuthMe01/web-client-sdk/commit/b6ae89ab2f0a3163b996e6adc9331efa45716d63))
220
+ - PR-83 fix calculate canvas size ([aed08b8](https://github.com/AuthMe01/web-client-sdk/commit/aed08b8b194037c0378e6e54559b6e86625f83f1))
221
+ - PROD-135 adjust fas config ([3d89ba7](https://github.com/AuthMe01/web-client-sdk/commit/3d89ba716d6b0bfd07ec2d5353213d8e8306c83d))
222
+ - PROD-255 fix rotate and process ([62d6c13](https://github.com/AuthMe01/web-client-sdk/commit/62d6c13dacf93369701e229e5f4950addfc94c1a))
223
+ - PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
224
+ - PROD-255 refactor process ([3ddcc9a](https://github.com/AuthMe01/web-client-sdk/commit/3ddcc9a75af048692bbc62652643a83cb889a150))
225
+ - PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
226
+ - PROD-298 fix memory leak & compress frame size ([03ddfd1](https://github.com/AuthMe01/web-client-sdk/commit/03ddfd122ba01e21bb3feef7c25efc3fa895d855))
227
+ - PROD-327 ios border css bug ([d6135fa](https://github.com/AuthMe01/web-client-sdk/commit/d6135fa6a6c7650ac2aec74b43bc4ab2c89044c7))
228
+ - PROD-428 adjust ocr mask size ([852c6f0](https://github.com/AuthMe01/web-client-sdk/commit/852c6f0caab92871b2b5d057b3a7aea5f5f3a0cd))
229
+ - PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
230
+ - PROD-514 header, lottie, step content size ([12c4228](https://github.com/AuthMe01/web-client-sdk/commit/12c422844d533ed7d98f8c990b199194ce6beb04))
231
+ - PROD-560 optimize load time(for view) ([7a38e1b](https://github.com/AuthMe01/web-client-sdk/commit/7a38e1b5ec1588013935f8f69f19f67ae22dedaa))
232
+ - PROD-572 add verify api error msg & favicon ([e3c7936](https://github.com/AuthMe01/web-client-sdk/commit/e3c7936c02b17a5eb3cf73c7f24a580599638d00))
233
+ - PROD-588 rotate timer, text content ([2938a37](https://github.com/AuthMe01/web-client-sdk/commit/2938a376b7dd42fa4c2ac6a48ddfde28eb190bd2))
234
+ - PROD-650 fix option order, add error&state hint ([2758980](https://github.com/AuthMe01/web-client-sdk/commit/275898079f173f77b8609cb02e84dca6c06daac4))
235
+ - PROD-650 ocr rotate style and idcard text ([b7f1b7c](https://github.com/AuthMe01/web-client-sdk/commit/b7f1b7cf62b21122021ebf8cf29b27f316da50ca))
236
+ - PROD-714 ipad camera, input zoon in on mobile, ios15 rotate bug ([851baeb](https://github.com/AuthMe01/web-client-sdk/commit/851baeb94ce7563db62a452882cdc136a3505ecd))
237
+ - PROD-756 sync ocr rotate action ([57bc8ea](https://github.com/AuthMe01/web-client-sdk/commit/57bc8ea9f6dd3e36a2281de48a047b4691799998))
238
+ - PROD-760 disable frame resize ([8210508](https://github.com/AuthMe01/web-client-sdk/commit/8210508bfac11a3b94deb233891d9ef576ef1fb3))
239
+ - PROD-792 fix camera blur & limit frame size ([ea56557](https://github.com/AuthMe01/web-client-sdk/commit/ea56557797ce050bce4b478237e1853f030fc9ac))
240
+ - PROD-892 rename function name ([ef47ca8](https://github.com/AuthMe01/web-client-sdk/commit/ef47ca817b30a14bbcdba8ba2d9a4a10fc7bc9bb))
241
+ - PROD-892 rename isMobile function name ([9233f1d](https://github.com/AuthMe01/web-client-sdk/commit/9233f1d3a1f55ce5bc77ae6f4b874fd3533252fe))
242
+
243
+ ### Features
244
+
245
+ - PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
246
+ - PR-83 ocr sdk ui ([a414e99](https://github.com/AuthMe01/web-client-sdk/commit/a414e993406071b58bbad5b3db17c0e1c2a86d43))
247
+ - PROD-114 fix liveness issue ([96edf70](https://github.com/AuthMe01/web-client-sdk/commit/96edf70125a2385b1ada8e63a0eb411bf341dc62))
248
+ - PROD-115 custom ui color ([cb9033a](https://github.com/AuthMe01/web-client-sdk/commit/cb9033a89ae5948f3789432981e477d882d02e37))
249
+ - PROD-127 sdk ocr rotate ([8ea76c8](https://github.com/AuthMe01/web-client-sdk/commit/8ea76c84a4ed2cd13bd139b9e31b89f6daa2e64d))
250
+ - PROD-127 sdk orc rotate ([e33ae65](https://github.com/AuthMe01/web-client-sdk/commit/e33ae657908e2e751efcf1fb52b57b406277f233))
251
+ - PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
252
+ - PROD-242 Adjust fps ([883c9ed](https://github.com/AuthMe01/web-client-sdk/commit/883c9ed917f6536114f5d12cdadffd705b834951))
253
+ - PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
254
+ - PROD-255 add spinner when ocrstart and fraudstart ([342777a](https://github.com/AuthMe01/web-client-sdk/commit/342777a250b46271e0d675fb920f7ecb1721d072))
255
+ - PROD-279 add sdk info in request header ([ca871cf](https://github.com/AuthMe01/web-client-sdk/commit/ca871cf9182aab3499c1918a8b946dc6d2cfed9a))
256
+ - PROD-327 add error message ([6ef47d9](https://github.com/AuthMe01/web-client-sdk/commit/6ef47d9daa633fb8c42e2c01369c032ac7af3147))
257
+ - PROD-327 change lottie second ([5eff08e](https://github.com/AuthMe01/web-client-sdk/commit/5eff08edcda22a0bd8dd71b73370c8f08009a250))
258
+ - PROD-327 replace liveness ui ([9c5934a](https://github.com/AuthMe01/web-client-sdk/commit/9c5934ad743a0ce5f8fccdabec323c1b3e93f79c))
259
+ - PROD-327 replace ocr ui ([73d4759](https://github.com/AuthMe01/web-client-sdk/commit/73d4759012bdfd0cb0bed9bc338f36af8ec27536))
260
+ - PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
261
+ - PROD-375 add popup panel ([77f4672](https://github.com/AuthMe01/web-client-sdk/commit/77f467240474190a276961a86fe48fb66d520b54))
262
+ - PROD-375 replace lottie animate and refactor mask border ([39ce902](https://github.com/AuthMe01/web-client-sdk/commit/39ce90241c60bda0e65f648b8ed61b4c577ffae2))
263
+ - PROD-571 add network listener ([39e2db3](https://github.com/AuthMe01/web-client-sdk/commit/39e2db352859070704122bd6672bcdcea5f3fd53))
264
+ - PROD-892 update confirm image page and add MRZ ocr ([90916f7](https://github.com/AuthMe01/web-client-sdk/commit/90916f7a1323103a3dc3a8f2ea825b6a4098dd54))
265
+
266
+ # 1.0.0 (2022-05-30)
267
+
268
+ ### Bug Fixes
269
+
270
+ - PR-81 fix canvas size calculation ([b6ae89a](https://github.com/AuthMe01/web-client-sdk/commit/b6ae89ab2f0a3163b996e6adc9331efa45716d63))
271
+ - PR-83 fix calculate canvas size ([aed08b8](https://github.com/AuthMe01/web-client-sdk/commit/aed08b8b194037c0378e6e54559b6e86625f83f1))
272
+ - PROD-135 adjust fas config ([3d89ba7](https://github.com/AuthMe01/web-client-sdk/commit/3d89ba716d6b0bfd07ec2d5353213d8e8306c83d))
273
+ - PROD-255 fix rotate and process ([62d6c13](https://github.com/AuthMe01/web-client-sdk/commit/62d6c13dacf93369701e229e5f4950addfc94c1a))
274
+ - PROD-255 reduce frame size to 720p ([540e24d](https://github.com/AuthMe01/web-client-sdk/commit/540e24d9aa34e442ef6f23dc398ee7778de7fd60))
275
+ - PROD-255 refactor process ([3ddcc9a](https://github.com/AuthMe01/web-client-sdk/commit/3ddcc9a75af048692bbc62652643a83cb889a150))
276
+ - PROD-255 tuning recognition frame performance ([7e8306f](https://github.com/AuthMe01/web-client-sdk/commit/7e8306f8e8567bc745e01b9836efc627601a5269))
277
+ - PROD-298 fix memory leak & compress frame size ([03ddfd1](https://github.com/AuthMe01/web-client-sdk/commit/03ddfd122ba01e21bb3feef7c25efc3fa895d855))
278
+ - PROD-327 ios border css bug ([d6135fa](https://github.com/AuthMe01/web-client-sdk/commit/d6135fa6a6c7650ac2aec74b43bc4ab2c89044c7))
279
+ - PROD-428 adjust ocr mask size ([852c6f0](https://github.com/AuthMe01/web-client-sdk/commit/852c6f0caab92871b2b5d057b3a7aea5f5f3a0cd))
280
+ - PROD-462 Adjust frame quality ([00e9f31](https://github.com/AuthMe01/web-client-sdk/commit/00e9f319a05176e112704a575acf4146aebd9ab0))
281
+ - PROD-514 header, lottie, step content size ([12c4228](https://github.com/AuthMe01/web-client-sdk/commit/12c422844d533ed7d98f8c990b199194ce6beb04))
282
+ - PROD-560 optimize load time(for view) ([7a38e1b](https://github.com/AuthMe01/web-client-sdk/commit/7a38e1b5ec1588013935f8f69f19f67ae22dedaa))
283
+ - PROD-572 add verify api error msg & favicon ([e3c7936](https://github.com/AuthMe01/web-client-sdk/commit/e3c7936c02b17a5eb3cf73c7f24a580599638d00))
284
+ - PROD-588 rotate timer, text content ([2938a37](https://github.com/AuthMe01/web-client-sdk/commit/2938a376b7dd42fa4c2ac6a48ddfde28eb190bd2))
285
+ - PROD-650 fix option order, add error&state hint ([2758980](https://github.com/AuthMe01/web-client-sdk/commit/275898079f173f77b8609cb02e84dca6c06daac4))
286
+ - PROD-650 ocr rotate style and idcard text ([b7f1b7c](https://github.com/AuthMe01/web-client-sdk/commit/b7f1b7cf62b21122021ebf8cf29b27f316da50ca))
287
+
288
+ ### Features
289
+
290
+ - PR-46 passive fas impl ([307aa7d](https://github.com/AuthMe01/web-client-sdk/commit/307aa7dd85e43ebe41ee9074d2bea6981517de2d))
291
+ - PR-83 ocr sdk ui ([a414e99](https://github.com/AuthMe01/web-client-sdk/commit/a414e993406071b58bbad5b3db17c0e1c2a86d43))
292
+ - PROD-114 fix liveness issue ([96edf70](https://github.com/AuthMe01/web-client-sdk/commit/96edf70125a2385b1ada8e63a0eb411bf341dc62))
293
+ - PROD-115 custom ui color ([cb9033a](https://github.com/AuthMe01/web-client-sdk/commit/cb9033a89ae5948f3789432981e477d882d02e37))
294
+ - PROD-127 sdk ocr rotate ([8ea76c8](https://github.com/AuthMe01/web-client-sdk/commit/8ea76c84a4ed2cd13bd139b9e31b89f6daa2e64d))
295
+ - PROD-127 sdk orc rotate ([e33ae65](https://github.com/AuthMe01/web-client-sdk/commit/e33ae657908e2e751efcf1fb52b57b406277f233))
296
+ - PROD-135 v3 fas api ([8e1e9cc](https://github.com/AuthMe01/web-client-sdk/commit/8e1e9cc9b8e5acbdbc4d49564bad8d42146a3c61))
297
+ - PROD-242 Adjust fps ([883c9ed](https://github.com/AuthMe01/web-client-sdk/commit/883c9ed917f6536114f5d12cdadffd705b834951))
298
+ - PROD-255 add OCR api impl ([40098a8](https://github.com/AuthMe01/web-client-sdk/commit/40098a8e76b02d3a3e7f4ef642da8d1806818496))
299
+ - PROD-255 add spinner when ocrstart and fraudstart ([342777a](https://github.com/AuthMe01/web-client-sdk/commit/342777a250b46271e0d675fb920f7ecb1721d072))
300
+ - PROD-279 add sdk info in request header ([ca871cf](https://github.com/AuthMe01/web-client-sdk/commit/ca871cf9182aab3499c1918a8b946dc6d2cfed9a))
301
+ - PROD-327 add error message ([6ef47d9](https://github.com/AuthMe01/web-client-sdk/commit/6ef47d9daa633fb8c42e2c01369c032ac7af3147))
302
+ - PROD-327 change lottie second ([5eff08e](https://github.com/AuthMe01/web-client-sdk/commit/5eff08edcda22a0bd8dd71b73370c8f08009a250))
303
+ - PROD-327 replace liveness ui ([9c5934a](https://github.com/AuthMe01/web-client-sdk/commit/9c5934ad743a0ce5f8fccdabec323c1b3e93f79c))
304
+ - PROD-327 replace ocr ui ([73d4759](https://github.com/AuthMe01/web-client-sdk/commit/73d4759012bdfd0cb0bed9bc338f36af8ec27536))
305
+ - PROD-334 Add Network Error Retry ([1dafbfd](https://github.com/AuthMe01/web-client-sdk/commit/1dafbfd2d51024abed9611cda4b7bd04401ed7f1))
306
+ - PROD-375 add popup panel ([77f4672](https://github.com/AuthMe01/web-client-sdk/commit/77f467240474190a276961a86fe48fb66d520b54))
307
+ - PROD-375 replace lottie animate and refactor mask border ([39ce902](https://github.com/AuthMe01/web-client-sdk/commit/39ce90241c60bda0e65f648b8ed61b4c577ffae2))
308
+ - PROD-571 add network listener ([39e2db3](https://github.com/AuthMe01/web-client-sdk/commit/39e2db352859070704122bd6672bcdcea5f3fd53))
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # shared-util
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test shared-util` to execute the unit tests via [Jest](https://jestjs.io).
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@authme/util",
3
+ "version": "2.1.1",
4
+ "peerDependencies": {
5
+ "three": "^0.136.0",
6
+ "tslib": "^2.3.0"
7
+ },
8
+ "main": "./src/index.js",
9
+ "typings": "./src/index.d.ts",
10
+ "dependencies": {}
11
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lib/shared-util';
2
+ export * from './ui';
package/src/index.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./lib/shared-util"), exports);
5
+ tslib_1.__exportStar(require("./ui"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/shared/util/src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,+CAAqB"}
@@ -0,0 +1,7 @@
1
+ export declare function dataURItoBlob(dataURI: string): Blob;
2
+ export declare function UintArrayToBlob(width: number, height: number, data: Uint8Array | Uint8ClampedArray, canvasEle?: HTMLCanvasElement, imageFormat?: 'jpg' | 'png'): Blob;
3
+ export declare function waitTime(ms: number): Promise<void>;
4
+ export declare function retryPromiseWithCondition<T>(promiseFactory: () => Promise<T>, conditionFactory: (...args: any[]) => Promise<any>): Promise<T>;
5
+ export declare function getUserAgent(): string;
6
+ export declare function isMobileOrTablet(): boolean;
7
+ export declare function isMobile(): boolean;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isMobile = exports.isMobileOrTablet = exports.getUserAgent = exports.retryPromiseWithCondition = exports.waitTime = exports.UintArrayToBlob = exports.dataURItoBlob = void 0;
4
+ const tslib_1 = require("tslib");
5
+ function dataURItoBlob(dataURI) {
6
+ // convert base64/URLEncoded data component to raw binary data held in a string
7
+ const byteString = atob(dataURI.split(',')[1]);
8
+ // separate out the mime component
9
+ const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
10
+ // write the bytes of the string to a typed array
11
+ const ia = new Uint8Array(byteString.length);
12
+ for (let i = 0; i < byteString.length; i++) {
13
+ ia[i] = byteString.charCodeAt(i);
14
+ }
15
+ const blob = new Blob([ia], { type: mimeString });
16
+ return blob;
17
+ }
18
+ exports.dataURItoBlob = dataURItoBlob;
19
+ function UintArrayToBlob(width, height, data, canvasEle, imageFormat) {
20
+ if (document) {
21
+ if (!canvasEle) {
22
+ canvasEle = document.createElement('canvas');
23
+ }
24
+ const ctx = canvasEle.getContext('2d');
25
+ canvasEle.height = height;
26
+ canvasEle.width = width;
27
+ if (ctx) {
28
+ const imageData = ctx.createImageData(canvasEle.width, canvasEle.height);
29
+ imageData.data.set(data);
30
+ ctx.putImageData(imageData, 0, 0);
31
+ if (imageFormat === 'png') {
32
+ return dataURItoBlob(canvasEle.toDataURL('image/png'));
33
+ }
34
+ else {
35
+ return dataURItoBlob(canvasEle.toDataURL('image/jpeg', 0.85));
36
+ }
37
+ }
38
+ throw '[UintArrayToBlob] not running in browser.';
39
+ }
40
+ else {
41
+ throw '[UintArrayToBlob] not running in browser.';
42
+ }
43
+ }
44
+ exports.UintArrayToBlob = UintArrayToBlob;
45
+ function waitTime(ms) {
46
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
+ return new Promise((res) => {
48
+ setTimeout(() => {
49
+ res();
50
+ }, ms);
51
+ });
52
+ });
53
+ }
54
+ exports.waitTime = waitTime;
55
+ function retryPromiseWithCondition(promiseFactory, conditionFactory) {
56
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
57
+ try {
58
+ const res = yield promiseFactory();
59
+ return res;
60
+ }
61
+ catch (e) {
62
+ console.error(e);
63
+ const retry = yield conditionFactory(e);
64
+ if (retry) {
65
+ return retryPromiseWithCondition(promiseFactory, conditionFactory);
66
+ }
67
+ else {
68
+ throw e;
69
+ }
70
+ }
71
+ });
72
+ }
73
+ exports.retryPromiseWithCondition = retryPromiseWithCondition;
74
+ function getUserAgent() {
75
+ return `platform: ${navigator === null || navigator === void 0 ? void 0 : navigator.platform}`;
76
+ }
77
+ exports.getUserAgent = getUserAgent;
78
+ function isMobileOrTablet() {
79
+ return (function (a) {
80
+ return !!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) ||
81
+ /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(a.substr(0, 4)) ||
82
+ /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ||
83
+ (navigator.maxTouchPoints && navigator.maxTouchPoints > 2));
84
+ })(navigator.userAgent || navigator.vendor || window.opera);
85
+ }
86
+ exports.isMobileOrTablet = isMobileOrTablet;
87
+ function isMobile() {
88
+ return (function (a) {
89
+ return !!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) ||
90
+ /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(a.substr(0, 4)) ||
91
+ /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
92
+ })(navigator.userAgent || navigator.vendor || window.opera);
93
+ }
94
+ exports.isMobile = isMobile;
95
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/util/src/lib/common/index.ts"],"names":[],"mappings":";;;;AAAA,SAAgB,aAAa,CAAC,OAAe;IAC3C,+EAA+E;IAE/E,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,kCAAkC;IAClC,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,iDAAiD;IACjD,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC1C,EAAE,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;KAClC;IACD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAClD,OAAO,IAAI,CAAC;AACd,CAAC;AAbD,sCAaC;AAED,SAAgB,eAAe,CAC7B,KAAa,EACb,MAAc,E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I,SAAS,CAAC,MAAM,IAAK,MAAc,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAdD,4BAcC"}
@@ -0,0 +1,2 @@
1
+ export * from './storage';
2
+ export * from './common';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./storage"), exports);
5
+ tslib_1.__exportStar(require("./common"), exports);
6
+ //# sourceMappingURL=shared-util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-util.js","sourceRoot":"","sources":["../../../../../../libs/shared/util/src/lib/shared-util.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,mDAAyB"}
@@ -0,0 +1 @@
1
+ export * from './storage';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./storage"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/util/src/lib/storage/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B"}
@@ -0,0 +1,11 @@
1
+ declare function getItem(key: string): any;
2
+ declare function setItem(key: string, val: any): void;
3
+ declare function removeItem(key: string): boolean;
4
+ declare function clear(): void;
5
+ export declare const Storage: {
6
+ getItem: typeof getItem;
7
+ setItem: typeof setItem;
8
+ removeItem: typeof removeItem;
9
+ clear: typeof clear;
10
+ };
11
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Storage = void 0;
4
+ const GLOBAL_KEY = '_AuthmeConfig';
5
+ function getItem(key) {
6
+ return window[GLOBAL_KEY][key];
7
+ }
8
+ function setItem(key, val) {
9
+ if (!window[GLOBAL_KEY]) {
10
+ window[GLOBAL_KEY] = {};
11
+ }
12
+ return (window[GLOBAL_KEY][key] = val);
13
+ }
14
+ function removeItem(key) {
15
+ return delete window[GLOBAL_KEY][key];
16
+ }
17
+ function clear() {
18
+ window[GLOBAL_KEY] = {};
19
+ }
20
+ exports.Storage = {
21
+ getItem,
22
+ setItem,
23
+ removeItem,
24
+ clear,
25
+ };
26
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../../../../libs/shared/util/src/lib/storage/storage.ts"],"names":[],"mappings":";;;AAAA,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC,SAAS,OAAO,CAAC,GAAW;IAC1B,OAAQ,MAAc,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,OAAO,CAAC,GAAW,EAAE,GAAQ;IACpC,IAAI,CAAE,MAAc,CAAC,UAAU,CAAC,EAAE;QAC/B,MAAc,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;KAClC;IACD,OAAO,CAAE,MAAc,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,OAAQ,MAAc,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,KAAK;IACX,MAAc,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;AACnC,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,OAAO;IACP,OAAO;IACP,UAAU;IACV,KAAK;CACN,CAAC"}
@@ -0,0 +1,30 @@
1
+ export declare const videoConstraintsFactory: (isPC: boolean, facingMode: 'user' | 'environment') => {
2
+ video: {
3
+ width: {
4
+ min: number;
5
+ ideal: number;
6
+ max: number;
7
+ };
8
+ height: {
9
+ min: number;
10
+ ideal: number;
11
+ max: number;
12
+ };
13
+ facingMode: "user" | "environment";
14
+ };
15
+ } | {
16
+ video: {
17
+ width: {
18
+ ideal: number;
19
+ min?: undefined;
20
+ max?: undefined;
21
+ };
22
+ height: {
23
+ ideal: number;
24
+ min?: undefined;
25
+ max?: undefined;
26
+ };
27
+ facingMode: "user" | "environment";
28
+ };
29
+ };
30
+ export declare const requestCamera: (video: HTMLVideoElement, constraints: MediaStreamConstraints, facingMode: 'front' | 'back') => Promise<boolean>;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.requestCamera = exports.videoConstraintsFactory = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const videoConstraintsFactory = (isPC, facingMode) => {
6
+ return isPC
7
+ ? {
8
+ video: {
9
+ width: { min: 1280, ideal: 1920, max: 1920 },
10
+ height: { min: 720, ideal: 1080, max: 1080 },
11
+ facingMode,
12
+ },
13
+ }
14
+ : {
15
+ video: {
16
+ width: { ideal: 1920 },
17
+ height: { ideal: 1080 },
18
+ facingMode,
19
+ },
20
+ };
21
+ };
22
+ exports.videoConstraintsFactory = videoConstraintsFactory;
23
+ const requestCamera = (video, constraints, facingMode) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
24
+ if (!('mediaDevices' in navigator)) {
25
+ throw 'NOT_SUPPORT';
26
+ }
27
+ const backCamera = [];
28
+ const frontCamera = [];
29
+ const devices = yield navigator.mediaDevices.enumerateDevices();
30
+ devices
31
+ .filter((device) => device.kind === 'videoinput')
32
+ .map((videoDevice) => {
33
+ const backCameraKeywords = 'rear|back|rück|arrière|trasera|trás|traseira|posteriore|后|後|背|задней|الخلفية|후|arka|achterzijde|หลัง|baksidan|bagside|sau|bak|tylny|takakamera|belakang|אחורית|πίσω|spate|hátsó|zadní|darrere|zadná|задня|stražnja|belakang|बैक';
34
+ const regex = new RegExp(backCameraKeywords, 'i');
35
+ if (regex.test(videoDevice.label)) {
36
+ backCamera.push(videoDevice.deviceId);
37
+ }
38
+ else {
39
+ frontCamera.push(videoDevice.deviceId);
40
+ }
41
+ });
42
+ const deviceId = facingMode === 'front'
43
+ ? frontCamera.length > 0
44
+ ? frontCamera[0]
45
+ : ''
46
+ : backCamera.length > 0
47
+ ? backCamera[0]
48
+ : '';
49
+ if (deviceId) {
50
+ constraints['deviceId'] = { exact: deviceId };
51
+ }
52
+ constraints['focusMode'] = 'auto';
53
+ const stream = yield navigator.mediaDevices.getUserMedia(constraints);
54
+ video.srcObject = stream;
55
+ yield video.play();
56
+ // Note: Fix Safari 15 video not showing bug
57
+ video.srcObject = null;
58
+ setTimeout(() => {
59
+ video.srcObject = stream;
60
+ }, 10);
61
+ return true;
62
+ });
63
+ exports.requestCamera = requestCamera;
64
+ //# sourceMappingURL=camera.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"camera.js","sourceRoot":"","sources":["../../../../../../libs/shared/util/src/ui/camera.ts"],"names":[],"mappings":";;;;AAAO,MAAM,uBAAuB,GAAG,CACrC,IAAa,EACb,UAAkC,EAClC,EAAE;IACF,OAAO,IAAI;QACT,CAAC,CAAC;YACE,KAAK,EAAE;gBACL,KAAK,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE;gBAC5C,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE;gBAC5C,UAAU;aACX;SACF;QACH,CAAC,CAAC;YACE,KAAK,EAAE;gBACL,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;gBACtB,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;gBACvB,UAAU;aACX;SACF,CAAC;AACR,CAAC,CAAC;AAnBW,QAAA,uBAAuB,2BAmBlC;AAEK,MAAM,aAAa,GAAG,CAC3B,KAAuB,EACvB,WAAmC,EACnC,UAA4B,EAC5B,EAAE;IACF,IAAI,CAAC,CAAC,cAAc,IAAI,SAAS,CAAC,EAAE;QAClC,MAAM,aAAa,CAAC;KACrB;IACD,MAAM,UAAU,GAAa,EAAE,CAAC;IACh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IAAI,CAAC;IACvB,UAAU,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,IAAI,CAAC;AACd,CAAC,CAAA,CAAC;AA9CW,QAAA,aAAa,iBA8CxB"}
@@ -0,0 +1 @@
1
+ export declare function clearCanvas(canvas: HTMLCanvasElement): void;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clearCanvas = void 0;
4
+ function clearCanvas(canvas) {
5
+ const ctx = canvas.getContext('2d');
6
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
7
+ }
8
+ exports.clearCanvas = clearCanvas;
9
+ //# sourceMappingURL=clear-canvas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clear-canvas.js","sourceRoot":"","sources":["../../../../../../../libs/shared/util/src/ui/canvas/clear-canvas.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,MAAyB;IACnD,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAA6B,CAAC;IAChE,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AACnD,CAAC;AAHD,kCAGC"}
@@ -0,0 +1,19 @@
1
+ export interface CanvasSizeInfo {
2
+ height: number;
3
+ width: number;
4
+ startX: number;
5
+ startY: number;
6
+ canvasWidth: number;
7
+ canvasHeight: number;
8
+ }
9
+ export declare function resize(originWidth: number, originHeight: number, targetWidth: number, targetHeight: number): {
10
+ width: number;
11
+ height: number;
12
+ startX: number;
13
+ startY: number;
14
+ };
15
+ export declare function getCanvasSize(video: HTMLVideoElement): Promise<CanvasSizeInfo>;
16
+ export declare function cropByRatio(width: number, height: number, ratio: number): {
17
+ width: number;
18
+ height: number;
19
+ };
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cropByRatio = exports.getCanvasSize = exports.resize = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("../../lib/common");
6
+ function resize(originWidth, originHeight, targetWidth, targetHeight) {
7
+ const originRatio = originWidth / originHeight;
8
+ const targetRatio = targetWidth / targetHeight;
9
+ if (originRatio > targetRatio) {
10
+ return {
11
+ width: originHeight * targetRatio,
12
+ height: originHeight,
13
+ startX: (originWidth - originHeight * targetRatio) / 2,
14
+ startY: 0,
15
+ };
16
+ }
17
+ else {
18
+ return {
19
+ width: originWidth,
20
+ height: originWidth * targetRatio,
21
+ startX: 0,
22
+ startY: (originHeight - originWidth * targetRatio) / 2,
23
+ };
24
+ }
25
+ }
26
+ exports.resize = resize;
27
+ function getCanvasSize(video) {
28
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
29
+ let videoWidth = video.videoWidth;
30
+ let videoHeight = video.videoHeight;
31
+ while (video.videoWidth === 0 || video.videoHeight === 0) {
32
+ yield (0, common_1.waitTime)(200);
33
+ videoWidth = video.videoWidth;
34
+ videoHeight = video.videoHeight;
35
+ }
36
+ const result = {
37
+ height: 0,
38
+ width: 0,
39
+ startX: 0,
40
+ startY: 0,
41
+ canvasWidth: 0,
42
+ canvasHeight: 0,
43
+ };
44
+ const windowWidth = window.innerWidth;
45
+ const windowHeight = window.innerHeight;
46
+ const videoRatio = videoWidth / videoHeight;
47
+ const windowRatio = windowWidth / windowHeight;
48
+ if (videoRatio > windowRatio) {
49
+ result.height = videoHeight;
50
+ result.width = Math.floor(videoHeight * windowRatio);
51
+ result.startX = Math.floor((videoWidth - result.width) / 2);
52
+ result.startY = 0;
53
+ }
54
+ else {
55
+ result.width = videoWidth;
56
+ result.height = Math.floor(videoWidth / windowRatio);
57
+ result.startX = 0;
58
+ result.startY = Math.floor((videoHeight - result.height) / 2);
59
+ }
60
+ const maxHeight = videoHeight > videoWidth ? 1280 : 720;
61
+ const maxWidth = videoHeight > videoWidth ? 720 : 1280;
62
+ const resizeRatioH = maxHeight / Math.max(result.height, maxHeight);
63
+ const resizeRatioW = maxWidth / Math.max(result.width, maxWidth);
64
+ const resizeRatio = Math.max(resizeRatioH, resizeRatioW);
65
+ // const resizeRatio = 1;
66
+ result.canvasWidth = Math.floor(result.width * resizeRatio);
67
+ result.canvasHeight = Math.floor(result.height * resizeRatio);
68
+ return result;
69
+ });
70
+ }
71
+ exports.getCanvasSize = getCanvasSize;
72
+ function cropByRatio(width, height, ratio) {
73
+ let expectedHeight = height;
74
+ let expectedWidth = Math.floor(height * ratio);
75
+ if (expectedWidth > width) {
76
+ expectedWidth = width;
77
+ expectedHeight = Math.floor(width / ratio);
78
+ }
79
+ return {
80
+ width: expectedWidth,
81
+ height: expectedHeight,
82
+ };
83
+ }
84
+ exports.cropByRatio = cropByRatio;
85
+ //# sourceMappingURL=get-canvas-size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-canvas-size.js","sourceRoot":"","sources":["../../../../../../../libs/shared/util/src/ui/canvas/get-canvas-size.ts"],"names":[],"mappings":";;;;AAAA,6CAA4C;AAW5C,SAAgB,MAAM,CACpB,WAAmB,EACnB,YAAoB,EACpB,WAAmB,EACnB,YAAoB;IAEpB,MAAM,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;IAC/C,MAAM,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;IAC/C,IAAI,WAAW,GAAG,WAAW,EAAE;QAC7B,OAAO;YACL,KAAK,EAAE,YAAY,GAAG,WAAW;YACjC,MAAM,EAAE,YAAY;YACpB,MAAM,EAAE,CAAC,WAAW,GAAG,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC;YACtD,MAAM,EAAE,CAAC;SACV,CAAC;KACH;SAAM;QACL,OAAO;YACL,KAAK,EAAE,WAAW;YAClB,MAAM,EAAE,WAAW,GAAG,WAAW;YACjC,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,CAAC,YAAY,GAAG,WAAW,GAAG,WA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KAAK,CAAC,CAAC;KAC5C;IACD,OAAO;QACL,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,cAAc;KACvB,CAAC;AACJ,CAAC;AAXD,kCAWC"}
@@ -0,0 +1,3 @@
1
+ export * from './video-to-image';
2
+ export * from './clear-canvas';
3
+ export * from './get-canvas-size';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./video-to-image"), exports);
5
+ tslib_1.__exportStar(require("./clear-canvas"), exports);
6
+ tslib_1.__exportStar(require("./get-canvas-size"), exports);
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/util/src/ui/canvas/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,yDAA+B;AAC/B,4DAAkC"}
@@ -0,0 +1,14 @@
1
+ export declare function getImageData(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D, video: HTMLVideoElement, sizeInfo: {
2
+ width: number;
3
+ height: number;
4
+ startX: number;
5
+ startY: number;
6
+ canvasWidth: number;
7
+ canvasHeight: number;
8
+ }, base64?: boolean, imageType?: 'jpg' | 'png' | 'all'): {
9
+ data: Uint8ClampedArray;
10
+ base64: {
11
+ jpg: string;
12
+ png: string;
13
+ };
14
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getImageData = void 0;
4
+ function getImageData(canvas, ctx, video, sizeInfo, base64 = false, imageType = 'jpg') {
5
+ canvas.width = sizeInfo.canvasWidth;
6
+ canvas.height = sizeInfo.canvasHeight;
7
+ ctx.drawImage(video, sizeInfo.startX, sizeInfo.startY, sizeInfo.width, sizeInfo.height, 0, 0, sizeInfo.canvasWidth, sizeInfo.canvasHeight);
8
+ return {
9
+ data: ctx.getImageData(0, 0, sizeInfo.canvasWidth, sizeInfo.canvasHeight)
10
+ .data,
11
+ base64: base64
12
+ ? {
13
+ jpg: imageType === 'jpg' || imageType === 'all'
14
+ ? canvas.toDataURL('image/jpeg', 0.85)
15
+ : '',
16
+ png: imageType === 'png' || imageType === 'all'
17
+ ? canvas.toDataURL('image/png')
18
+ : '',
19
+ }
20
+ : {
21
+ jpg: '',
22
+ png: '',
23
+ },
24
+ };
25
+ }
26
+ exports.getImageData = getImageData;
27
+ //# sourceMappingURL=video-to-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-to-image.js","sourceRoot":"","sources":["../../../../../../../libs/shared/util/src/ui/canvas/video-to-image.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAC1B,MAAyB,EACzB,GAA6B,EAC7B,KAAuB,EACvB,QAOC,EACD,MAAM,GAAG,KAAK,EACd,YAAmC,KAAK;IAExC,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,WAAW,CAAC;IACpC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC;IACtC,GAAG,CAAC,SAAS,CACX,KAAK,EACL,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,KAAK,EACd,QAAQ,CAAC,MAAM,EACf,CAAC,EACD,CAAC,EACD,QAAQ,CAAC,WAAW,EACpB,QAAQ,CAAC,YAAY,CACtB,CAAC;IACF,OAAO;QACL,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,YAAY,CAAC;aACtE,IAAI;QACP,MAAM,EAAE,MAAM;YACZ,CAAC,CAAC;gBACE,GAAG,EACD,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,KAAK;oBACxC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC;oBACtC,CAAC,CAAC,EAAE;gBACR,GAAG,EACD,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,KAAK;oBACxC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC;oBAC/B,CAAC,CAAC,EAAE;aACT;YACH,CAAC,CAAC;gBACE,GAAG,EAAE,EAAE;gBACP,GAAG,EAAE,EAAE;aACR;KACN,CAAC;AACJ,CAAC;AA/CD,oCA+CC"}
@@ -0,0 +1,2 @@
1
+ export declare function showElement(element: HTMLElement): void;
2
+ export declare function hideElement(element: HTMLElement): void;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hideElement = exports.showElement = void 0;
4
+ function showElement(element) {
5
+ element.classList.remove('hide');
6
+ element.classList.add('show');
7
+ }
8
+ exports.showElement = showElement;
9
+ function hideElement(element) {
10
+ element.classList.remove('show');
11
+ element.classList.add('hide');
12
+ }
13
+ exports.hideElement = hideElement;
14
+ //# sourceMappingURL=element-style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element-style.js","sourceRoot":"","sources":["../../../../../../libs/shared/util/src/ui/element-style.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,OAAoB;IAC9C,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAHD,kCAGC;AAED,SAAgB,WAAW,CAAC,OAAoB;IAC9C,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAHD,kCAGC"}
@@ -0,0 +1,5 @@
1
+ export declare function showErrorMessage(text: string, showRetryBtn?: boolean, callback?: (e: Event) => void): Promise<void>;
2
+ export declare function hideErrorMessage(): void;
3
+ export declare function asyncShowErrorMessage(text: string, showRetryBtn?: boolean): Promise<boolean>;
4
+ export declare function asyncOnLineShowErrorMessage(text: string, showRetryBtn?: boolean): Promise<boolean>;
5
+ export declare function checkOnlineStatus(msg: string): Promise<void>;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkOnlineStatus = exports.asyncOnLineShowErrorMessage = exports.asyncShowErrorMessage = exports.hideErrorMessage = exports.showErrorMessage = void 0;
4
+ const tslib_1 = require("tslib");
5
+ function showErrorMessage(text, showRetryBtn, callback) {
6
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
7
+ const target = document.querySelector('.authme-container');
8
+ if (!target) {
9
+ return;
10
+ }
11
+ const errorMessagePanel = document.createElement('div');
12
+ errorMessagePanel.className = 'error-message-panel';
13
+ const icon = document.createElement('img');
14
+ icon.className = 'error-icon';
15
+ icon.src =
16
+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIoSURBVHgBrZY9TxRBGMdn5XwpOCRyJlZoI8HTShNfGkqNEs8GrO4z2HqFwQr9DpYWaGKuUKOJL5XxMxATTSBCAwcFHITjLcPvYf9HNhd2doF7kt/uZud5mdmZ+c9GLsW89xG3q/AURqAMJbD3DfgDX+EbTEdR5F1eI/kw1KHpY2vBAszCfz3vqM183sGVvMnHYUnBczAJt2EACnAaLsE9mJCPV9FqVvIabAkLLuboUFGdWFNcLc2xKodFGNUc5B11BE8UaznGOh0uq9F6UXHHNHVsE5bhWrL6e33HybSe875HEz8F51z6SF4qV30/F5cbWglzoW9OWz/MiP6AXx/MK+fQKd49gF54w1puuhMaOVa5vVXOcSvwEHbhh+uefYRNGLECw7AMM6579g9sJGUrcBFaKtItW4ENKFmB/BqS36I2BS5LYMvuvAuPYh1+wxk9h2xAORu2rL5LzO5kBLX3QuYOl06ZGP60T/QLzkIlI8iW3Wf4xPOFjBr3oQe+WOBQYqP1BQrc0g7dhpsBv+RGu97e3nUFTwSkoheewYuAj+V6rVxTB34mTD4+A0wJR90xTYq6prNhsLNxTEpoqlrxR5frxwm5rqY5PpfDOrwKzUkipigF3VIHa1kBVQ3Ra+JtXu76+JgsiJIta3ViXr4N33nQBIoM+vggbx/6OypqB/6snltqa2qRlA/LFQWKWJsFmZw/crEomm6ZtNhvy7SL99AH+Jv227IHljuhn5g7LqwAAAAASUVORK5CYII=';
17
+ const errorText = document.createElement('div');
18
+ errorText.className = 'error-text';
19
+ errorText.textContent = text;
20
+ errorMessagePanel.appendChild(icon);
21
+ errorMessagePanel.appendChild(errorText);
22
+ if (showRetryBtn) {
23
+ const retryText = document.createElement('div');
24
+ retryText.className = 'retry-text';
25
+ retryText.textContent = '重試';
26
+ errorMessagePanel.appendChild(retryText);
27
+ if (callback) {
28
+ retryText.addEventListener('click', (e) => {
29
+ target.removeChild(errorMessagePanel);
30
+ callback(e);
31
+ });
32
+ }
33
+ }
34
+ target === null || target === void 0 ? void 0 : target.appendChild(errorMessagePanel);
35
+ });
36
+ }
37
+ exports.showErrorMessage = showErrorMessage;
38
+ function hideErrorMessage() {
39
+ const body = document.querySelector('.authme-container');
40
+ const errorMessagePanel = document.querySelector('.error-message-panel');
41
+ if (body && errorMessagePanel) {
42
+ body === null || body === void 0 ? void 0 : body.removeChild(errorMessagePanel);
43
+ }
44
+ }
45
+ exports.hideErrorMessage = hideErrorMessage;
46
+ function asyncShowErrorMessage(text, showRetryBtn) {
47
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
+ return new Promise((res, rej) => {
49
+ const callback = () => {
50
+ res(true);
51
+ hideErrorMessage();
52
+ };
53
+ showErrorMessage(text, showRetryBtn, callback);
54
+ });
55
+ });
56
+ }
57
+ exports.asyncShowErrorMessage = asyncShowErrorMessage;
58
+ function asyncOnLineShowErrorMessage(text, showRetryBtn) {
59
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
60
+ return new Promise((res, rej) => {
61
+ const callback = () => {
62
+ if (window.navigator.onLine) {
63
+ res(true);
64
+ hideErrorMessage();
65
+ }
66
+ };
67
+ showErrorMessage(text, showRetryBtn, callback);
68
+ });
69
+ });
70
+ }
71
+ exports.asyncOnLineShowErrorMessage = asyncOnLineShowErrorMessage;
72
+ function checkOnlineStatus(msg) {
73
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
74
+ if (!window.navigator.onLine) {
75
+ yield asyncOnLineShowErrorMessage(msg, true);
76
+ }
77
+ });
78
+ }
79
+ exports.checkOnlineStatus = checkOnlineStatus;
80
+ //# sourceMappingURL=error-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-message.js","sourceRoot":"","sources":["../../../../../../libs/shared/util/src/ui/error-message.ts"],"names":[],"mappings":";;;;AAAA,SAAsB,gBAAgB,CACpC,IAAY,EACZ,YAAsB,EACtB,QAA6B;;QAE7B,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,EAAE;YACX,OAAO;SACR;QAED,MAAM,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACxD,iBAAiB,CAAC,SAAS,GAAG,qBAAqB,CAAC;QACpD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC;QAC9B,IAAI,CAAC,GAAG;YACN,w4BAAw4B,CAAC;QAE34B,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAChD,SAAS,CAAC,SAAS,GAAG,YAAY,CAAC;QACnC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC;QAE7B,iBAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACpC,iBAAiB,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,YAAY,EAAE;YAChB,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAA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rFYRHrH/419OSYFjbyopPdqOqPoMXqOHqSAoCeD4nq9ntum4JEC38nDC2gSJrJYLJoSRwo5WYO/oH/4XBP0lvfOgDjippnU4ohfCIUZFEdKR8g4FLjEDgSnOC66NVnuJHBbtPqn24BIh1F8Bs00EyaObVwK0uQ7BTLFvNIZFZfnDIr8xCm+1x3V6XRiozUY3RyTAjsvp1dH7SaJb26z2czdWweDQWQq8TzJvtzqND3oyHHr0jsPWvAdEjPCSAS+8fLgNbLHFX9cger8f4PsMPLKIsE7yU5J2xAOlPfI+topwfJHguURminnGbj0l+o27sW8j4rIY3k8wWG4EXEb9/Kw2gzP5i3slwcR1wi+DDvNnCNFAt8BGyEOiSxgiieZfi7wvHBaQy9tkfVBWZNfZE3+xL8atEmYMd6LOCuqU2yFlRVQEflZHhk8DZiBOfc8SWFdt4hewVO+5EW/Aj28zeB6W6EyDC2BftSFn/YST2Jp/r8haAy0O7Zp/4b4C0A7bruoqtIMAAAAAElFTkSuQmCC"
3
+ }
package/src/ui/icon.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Icon = void 0;
4
+ var Icon;
5
+ (function (Icon) {
6
+ Icon["CloseIcon"] = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALdSURBVHgBzZm/bhpBEMY/TINEgxuUEjoKpNDhzrhLid8geQDkuAopUM6ioYstXoA2lUmXVJy7hMoukOhyaWlCCqS4y3znPXJcuD97rOF+0rCnu13p0+zO7O6QQ0ra7XZLmobYqWpLyshSzFH2IGaPx2MbKcjpdBZRFHAh9tYnJimOmC12JWKdpIMSCVTCPihhJhghodB8XAcRR4+NxVowB5dEu1ar/Z7P5/dRHSMFiriP0lhiBZiHs0KRJRH5NaxTLkQYB9/CrNeioBfPZMqXwQ9HIQNs7E8c4ZTfbvvw3xSraW1j/1S2TfeGQBH3WpoBDseJCpxv3ov1GhRxFWkmYhUcFq7Dqrce/WvQwuHFES/nurgeVN77gWxxTC96HrSQPdxdyxN4Cg3K5TL6/b7bmuwbgDsY8upUorXHdrtd1Ot1NJtNTKdTrFYrRImrVquuTSYTaFCQiL6jB1vQZDgcYrFYRHrH/419OSYFjbyopPdqOqPoMXqOHqSAoCeD4nq9ntum4JEC38nDC2gSJrJYLJoSRwo5WYO/oH/4XBP0lvfOgDjippnU4ohfCIUZFEdKR8g4FLjEDgSnOC66NVnuJHBbtPqn24BIh1F8Bs00EyaObVwK0uQ7BTLFvNIZFZfnDIr8xCm+1x3V6XRiozUY3RyTAjsvp1dH7SaJb26z2czdWweDQWQq8TzJvtzqND3oyHHr0jsPWvAdEjPCSAS+8fLgNbLHFX9cger8f4PsMPLKIsE7yU5J2xAOlPfI+topwfJHguURminnGbj0l+o27sW8j4rIY3k8wWG4EXEb9/Kw2gzP5i3slwcR1wi+DDvNnCNFAt8BGyEOiSxgiieZfi7wvHBaQy9tkfVBWZNfZE3+xL8atEmYMd6LOCuqU2yFlRVQEflZHhk8DZiBOfc8SWFdt4hewVO+5EW/Aj28zeB6W6EyDC2BftSFn/YST2Jp/r8haAy0O7Zp/4b4C0A7bruoqtIMAAAAAElFTkSuQmCC";
7
+ })(Icon = exports.Icon || (exports.Icon = {}));
8
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../../../../libs/shared/util/src/ui/icon.ts"],"names":[],"mappings":";;;AAAA,IAAY,IAEX;AAFD,WAAY,IAAI;IACd,4oCAAooC,CAAA;AACtoC,CAAC,EAFW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAEf"}
@@ -0,0 +1,7 @@
1
+ export * from './canvas';
2
+ export * from './spinner';
3
+ export * from './icon';
4
+ export * from './error-message';
5
+ export * from './popup';
6
+ export * from './camera';
7
+ export * from './element-style';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./canvas"), exports);
5
+ tslib_1.__exportStar(require("./spinner"), exports);
6
+ tslib_1.__exportStar(require("./icon"), exports);
7
+ tslib_1.__exportStar(require("./error-message"), exports);
8
+ tslib_1.__exportStar(require("./popup"), exports);
9
+ tslib_1.__exportStar(require("./camera"), exports);
10
+ tslib_1.__exportStar(require("./element-style"), exports);
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/shared/util/src/ui/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,oDAA0B;AAC1B,iDAAuB;AACvB,0DAAgC;AAChC,kDAAwB;AACxB,mDAAyB;AACzB,0DAAgC"}
@@ -0,0 +1,3 @@
1
+ export declare function showPopup(title: string, content: string, showButton?: boolean, button?: any, callback?: (e: Event) => void): Promise<void>;
2
+ export declare function hidePopup(): void;
3
+ export declare function asyncShowPopup(title: string, content: string, showButton?: boolean, button?: any): Promise<boolean>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.asyncShowPopup = exports.hidePopup = exports.showPopup = void 0;
4
+ const tslib_1 = require("tslib");
5
+ function showPopup(title, content, showButton = true, button, callback) {
6
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
7
+ const target = document.querySelector('.authme-container');
8
+ const popupBackground = document.createElement('div');
9
+ popupBackground.className = 'popup-background';
10
+ const popupPanel = document.createElement('div');
11
+ popupPanel.className = 'popup-panel';
12
+ const popupTitle = document.createElement('div');
13
+ popupTitle.className = 'popup-title';
14
+ popupTitle.textContent = title;
15
+ const popupContent = document.createElement('div');
16
+ popupContent.className = 'popup-content';
17
+ popupContent.textContent = content;
18
+ const popupConfirmBtn = document.createElement('button');
19
+ popupConfirmBtn.className = 'popup-btn';
20
+ popupConfirmBtn.textContent = '確定';
21
+ popupPanel.appendChild(popupTitle);
22
+ popupPanel.appendChild(popupContent);
23
+ if (showButton) {
24
+ popupPanel.appendChild(popupConfirmBtn);
25
+ }
26
+ if (callback && showButton) {
27
+ popupConfirmBtn.addEventListener('click', callback);
28
+ }
29
+ target === null || target === void 0 ? void 0 : target.appendChild(popupPanel);
30
+ target === null || target === void 0 ? void 0 : target.appendChild(popupBackground);
31
+ });
32
+ }
33
+ exports.showPopup = showPopup;
34
+ function hidePopup() {
35
+ const body = document.querySelector('.authme-container');
36
+ const popupPanel = document.querySelector('.popup-panel');
37
+ if (popupPanel) {
38
+ body === null || body === void 0 ? void 0 : body.removeChild(popupPanel);
39
+ }
40
+ const popupBackground = document.querySelector('.popup-background');
41
+ if (popupBackground) {
42
+ body === null || body === void 0 ? void 0 : body.removeChild(popupBackground);
43
+ }
44
+ }
45
+ exports.hidePopup = hidePopup;
46
+ function asyncShowPopup(title, content, showButton = true, button) {
47
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
+ return new Promise((res, rej) => {
49
+ const callback = () => {
50
+ res(true);
51
+ hidePopup();
52
+ };
53
+ showPopup(title, content, showButton, button, callback);
54
+ });
55
+ });
56
+ }
57
+ exports.asyncShowPopup = asyncShowPopup;
58
+ //# sourceMappingURL=popup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup.js","sourceRoot":"","sources":["../../../../../../libs/shared/util/src/ui/popup.ts"],"names":[],"mappings":";;;;AAAA,SAAsB,SAAS,CAC7B,KAAa,EACb,OAAe,EACf,UAAU,GAAG,IAAI,EACjB,MAAY,EACZ,QAA6B;;QAE7B,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;QAC3D,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACtD,eAAe,CAAC,SAAS,GAAG,kBAAkB,CAAC;QAC/C,MAAM,UAAU,GAAG,QAAQ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AC,UAAU,CAAC,CAAC;KAC/B;IACD,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACpE,IAAI,eAAe,EAAE;QACnB,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,eAAe,CAAC,CAAC;KACpC;AACH,CAAC;AAVD,8BAUC;AAED,SAAsB,cAAc,CAClC,KAAa,EACb,OAAe,EACf,UAAU,GAAG,IAAI,EACjB,MAAY;;QAEZ,OAAO,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC9B,MAAM,QAAQ,GAAG,GAAG,EAAE;gBACpB,GAAG,CAAC,IAAI,CAAC,CAAC;gBACV,SAAS,EAAE,CAAC;YACd,CAAC,CAAC;YACF,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACL,CAAC;CAAA;AAbD,wCAaC"}
@@ -0,0 +1,2 @@
1
+ export declare function startSpinner(text?: string): void;
2
+ export declare function stopSpinner(): void;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stopSpinner = exports.startSpinner = void 0;
4
+ function startSpinner(text) {
5
+ const body = document.querySelector('.authme-container');
6
+ const spinnerOuter = document.createElement('div');
7
+ spinnerOuter.className = 'loading-outer';
8
+ const spinner = document.createElement('div');
9
+ spinner.className = 'loading';
10
+ const spinnerText = document.createElement('div');
11
+ spinnerOuter.appendChild(spinner);
12
+ if (text) {
13
+ spinnerText.className = 'loading-text';
14
+ spinnerText.textContent = text;
15
+ spinnerOuter.appendChild(spinnerText);
16
+ }
17
+ body === null || body === void 0 ? void 0 : body.appendChild(spinnerOuter);
18
+ }
19
+ exports.startSpinner = startSpinner;
20
+ function stopSpinner() {
21
+ const body = document.querySelector('.authme-container');
22
+ const spinner = document.querySelector('.loading-outer');
23
+ if (spinner) {
24
+ body === null || body === void 0 ? void 0 : body.removeChild(spinner);
25
+ }
26
+ }
27
+ exports.stopSpinner = stopSpinner;
28
+ //# sourceMappingURL=spinner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../../../../../libs/shared/util/src/ui/spinner.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,IAAa;IACxC,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnD,YAAY,CAAC,SAAS,GAAG,eAAe,CAAC;IACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAC9B,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAClD,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,IAAI,IAAI,EAAE;QACR,WAAW,CAAC,SAAS,GAAG,cAAc,CAAC;QACvC,WAAW,CAAC,WAAW,GAAG,IAAI,CAAC;QAC/B,YAAY,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;KACvC;IACD,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,YAAY,CAAC,CAAC;AAClC,CAAC;AAdD,oCAcC;AAED,SAAgB,WAAW;IACzB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACzD,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACzD,IAAI,OAAO,EAAE;QACX,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,OAAO,CAAC,CAAC;KAC5B;AACH,CAAC;AAND,kCAMC"}