santoid-sdk 5.1.0 → 5.2.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.
@@ -1,286 +1,295 @@
1
- 18:08:54.370 INFO Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
2
- 18:08:54.376 INFO Project root configuration file: NONE
3
- 18:08:54.399 INFO SonarScanner CLI 6.2.1.4610
4
- 18:08:54.403 INFO Java 17.0.12 Amazon.com Inc. (64-bit)
5
- 18:08:54.404 INFO Linux 6.1.79 amd64
6
- 18:08:54.406 INFO SONAR_SCANNER_OPTS=-Xmx2048m
7
- 18:08:54.447 INFO User cache: /opt/sonar-scanner/.sonar/cache
8
- 18:08:55.273 INFO JRE provisioning: os[linux], arch[x86_64]
9
- 18:09:01.192 INFO Communicating with SonarCloud
10
- 18:09:01.936 INFO Starting SonarScanner Engine...
11
- 18:09:01.937 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
12
- 18:09:03.467 INFO Load global settings
13
- 18:09:03.955 INFO Load global settings (done) | time=489ms
14
- 18:09:03.960 INFO Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
15
- 18:09:04.400 INFO Loading required plugins
16
- 18:09:04.400 INFO Load plugins index
17
- 18:09:04.609 INFO Load plugins index (done) | time=208ms
18
- 18:09:04.609 INFO Load/download plugins
19
- 18:09:06.205 INFO Load/download plugins (done) | time=1597ms
20
- 18:09:07.069 INFO Found an active CI vendor: 'Bitbucket Pipelines'
21
- 18:09:07.253 INFO Detected project key 'santodigital_santoid-sdk-javascript' from 'Bitbucket Cloud Pipelines'
22
- 18:09:07.255 INFO Detected organization key 'santodigital' from 'Bitbucket Cloud Pipelines'
23
- 18:09:07.257 INFO Load project settings for component key: 'santodigital_santoid-sdk-javascript'
24
- 18:09:07.465 INFO Load project settings for component key: 'santodigital_santoid-sdk-javascript' (done) | time=208ms
25
- 18:09:07.472 INFO Process project properties
26
- 18:09:07.483 INFO Project key: santodigital_santoid-sdk-javascript
27
- 18:09:07.484 INFO Base dir: /opt/atlassian/pipelines/agent/build
28
- 18:09:07.484 INFO Working dir: /opt/atlassian/pipelines/agent/build/.scannerwork
29
- 18:09:07.488 INFO Load project branches
30
- 18:09:07.887 INFO Load project branches (done) | time=387ms
31
- 18:09:07.887 INFO Check ALM binding of project 'santodigital_santoid-sdk-javascript'
32
- 18:09:08.102 INFO Detected project binding: BOUND
33
- 18:09:08.103 INFO Check ALM binding of project 'santodigital_santoid-sdk-javascript' (done) | time=224ms
34
- 18:09:08.105 INFO Load project pull requests
35
- 18:09:08.360 INFO Load project pull requests (done) | time=256ms
36
- 18:09:08.364 INFO Load branch configuration
37
- 18:09:08.367 INFO Detected analysis for branch 'master'
38
- 18:09:08.369 INFO Auto-configuring branch master
39
- 18:09:08.370 INFO Load branch configuration (done) | time=6ms
40
- 18:09:08.378 INFO Load quality profiles
41
- 18:09:09.152 INFO Load quality profiles (done) | time=773ms
42
- 18:09:09.159 INFO Load active rules
43
- 18:09:19.061 INFO Load active rules (done) | time=9901ms
44
- 18:09:19.274 INFO Organization key: santodigital
45
- 18:09:19.276 INFO Branch name: master, type: long-lived
46
- 18:09:19.299 INFO Preprocessing files...
47
- 18:09:19.491 INFO 1 language detected in 40 preprocessed files
48
- 18:09:19.491 INFO 0 files ignored because of inclusion/exclusion patterns
49
- 18:09:19.491 INFO 0 files ignored because of scm ignore settings
50
- 18:09:19.518 INFO Loading plugins for detected languages
51
- 18:09:19.519 INFO Load/download plugins
52
- 18:09:20.607 INFO Load/download plugins (done) | time=1089ms
53
- 18:09:20.798 INFO Load project repositories
54
- 18:09:20.999 INFO Load project repositories (done) | time=201ms
55
- 18:09:21.006 INFO Indexing files...
56
- 18:09:21.015 INFO Project configuration:
57
- 18:09:21.015 INFO Excluded sources: **/build-wrapper-dump.json, __tests__/**/*.test.ts
58
- 18:09:21.015 INFO Included tests: __tests__/**/*.test.ts
59
- 18:09:21.073 INFO 40 files indexed
60
- 18:09:21.078 INFO Quality profile for ts: Sonar way
61
- 18:09:21.079 INFO ------------- Run sensors on module santodigital_santoid-sdk-javascript
62
- 18:09:21.126 INFO Load metrics repository
63
- 18:09:21.295 INFO Load metrics repository (done) | time=169ms
64
- 18:09:21.301 INFO Sensor cache enabled
65
- 18:09:21.639 INFO Load sensor cache
66
- 18:09:23.189 INFO Load sensor cache (97 KB) | time=1550ms
67
- 18:09:23.985 INFO Sensor JaCoCo XML Report Importer [jacoco]
68
- 18:09:23.987 INFO 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
69
- 18:09:23.987 INFO No report imported, no coverage information will be imported by JaCoCo XML Report Importer
70
- 18:09:23.987 INFO Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
71
- 18:09:23.988 INFO Sensor Java Config Sensor [iac]
72
- 18:09:24.021 INFO 0 source files to be analyzed
73
- 18:09:24.030 INFO 0/0 source files have been analyzed
74
- 18:09:24.032 INFO Sensor Java Config Sensor [iac] (done) | time=44ms
75
- 18:09:24.032 INFO Sensor JavaScript/TypeScript analysis [javascript]
76
- 18:09:24.269 INFO Detected os: Linux arch: amd64 alpine: false. Platform: LINUX_X64
77
- 18:09:24.270 INFO Deploy location /opt/sonar-scanner/.sonar/js/node-runtime, tagetRuntime: /opt/sonar-scanner/.sonar/js/node-runtime/node, version: /opt/sonar-scanner/.sonar/js/node-runtime/version.txt
78
- 18:09:28.330 INFO Using embedded Node.js runtime.
79
- 18:09:28.331 INFO Using Node.js executable: '/opt/sonar-scanner/.sonar/js/node-runtime/node'.
80
- 18:09:32.065 INFO Memory configuration: OS (10191 MB), Node.js (2096 MB).
81
- 18:09:35.133 WARN Access to the multi-values/property set property 'sonar.javascript.file.suffixes' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.
82
- 18:09:35.134 WARN Access to the multi-values/property set property 'sonar.typescript.file.suffixes' should be made using 'getStringArray' method. The SonarQube plugin using this property should be updated.
83
- 18:09:35.162 INFO Found 1 tsconfig.json file(s): [/opt/atlassian/pipelines/agent/build/tsconfig.json]
84
- 18:09:35.163 INFO Creating TypeScript program
85
- 18:09:35.163 INFO TypeScript configuration file /opt/atlassian/pipelines/agent/build/tsconfig.json
86
- 18:09:35.165 INFO 40 source files to be analyzed
87
- 18:09:36.210 INFO Starting analysis with current program
88
- 18:09:40.712 INFO Analyzed 40 file(s) with current program
89
- 18:09:40.721 INFO 40/40 source files have been analyzed
90
- 18:09:40.723 INFO Hit the cache for 0 out of 40
91
- 18:09:40.725 INFO Miss the cache for 40 out of 40: ANALYSIS_MODE_INELIGIBLE [40/40]
92
- 18:09:40.726 INFO Sensor JavaScript/TypeScript analysis [javascript] (done) | time=16694ms
93
- 18:09:40.727 INFO Sensor CSS Rules [javascript]
94
- 18:09:40.728 INFO No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
95
- 18:09:40.729 INFO Sensor CSS Rules [javascript] (done) | time=1ms
96
- 18:09:40.729 INFO Sensor JavaScript/TypeScript Coverage [javascript]
97
- 18:09:40.730 INFO Analysing [/opt/atlassian/pipelines/agent/build/coverage/lcov.info]
98
- 18:09:40.749 INFO Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=19ms
99
- 18:09:40.749 INFO Sensor IaC Docker Sensor [iac]
100
- 18:09:40.836 INFO 0 source files to be analyzed
101
- 18:09:40.837 INFO 0/0 source files have been analyzed
102
- 18:09:40.837 INFO Sensor IaC Docker Sensor [iac] (done) | time=88ms
103
- 18:09:40.838 INFO Sensor Serverless configuration file sensor [security]
104
- 18:09:40.839 INFO 0 Serverless function entries were found in the project
105
- 18:09:40.842 INFO 0 Serverless function handlers were kept as entrypoints
106
- 18:09:40.842 INFO Sensor Serverless configuration file sensor [security] (done) | time=4ms
107
- 18:09:40.843 INFO Sensor AWS SAM template file sensor [security]
108
- 18:09:40.844 INFO Sensor AWS SAM template file sensor [security] (done) | time=1ms
109
- 18:09:40.844 INFO Sensor AWS SAM Inline template file sensor [security]
110
- 18:09:40.845 INFO Sensor AWS SAM Inline template file sensor [security] (done) | time=1ms
111
- 18:09:40.846 INFO Sensor EnterpriseTextAndSecretsSensor [textenterprise]
112
- 18:09:40.846 INFO Available processors: 4
113
- 18:09:40.847 INFO Using 4 threads for analysis.
114
- 18:09:41.395 INFO Using git CLI to retrieve untracked files
115
- 18:09:41.399 WARN Analyzing only language associated files, make sure to run the analysis inside a git repository to make use of inclusions specified via "sonar.text.inclusions"
116
- 18:09:41.417 INFO 40 source files to be analyzed
117
- 18:09:41.839 INFO 40/40 source files have been analyzed
118
- 18:09:41.840 INFO Sensor EnterpriseTextAndSecretsSensor [textenterprise] (done) | time=993ms
119
- 18:09:41.840 INFO Sensor JavaSecuritySensor [security]
120
- 18:09:41.846 INFO Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5496, S5883, S6096, S6173, S6287, S6350, S6384, S6390, S6398, S6399, S6547, S6549, S7044
121
- 18:09:41.846 INFO Load type hierarchy and UCFGs: Starting
122
- 18:09:41.846 INFO Load type hierarchy: Starting
123
- 18:09:41.846 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/java
124
- 18:09:41.847 INFO Read 0 type definitions
125
- 18:09:41.850 INFO Load type hierarchy: Time spent was 00:00:00.002
126
- 18:09:41.850 INFO Load UCFGs: Starting
127
- 18:09:41.851 INFO Load UCFGs: Time spent was 00:00:00.000
128
- 18:09:41.851 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.004
129
- 18:09:41.851 INFO No UCFGs have been included for analysis.
130
- 18:09:41.863 INFO java security sensor: Time spent was 00:00:00.020
131
- 18:09:41.864 INFO java security sensor: Begin: 2025-02-20T18:09:41.842431022Z, End: 2025-02-20T18:09:41.862719367Z, Duration: 00:00:00.020
132
- Load type hierarchy and UCFGs: Begin: 2025-02-20T18:09:41.846414292Z, End: 2025-02-20T18:09:41.851198747Z, Duration: 00:00:00.004
133
- Load type hierarchy: Begin: 2025-02-20T18:09:41.846694260Z, End: 2025-02-20T18:09:41.849561475Z, Duration: 00:00:00.002
134
- Load UCFGs: Begin: 2025-02-20T18:09:41.849922343Z, End: 2025-02-20T18:09:41.850005124Z, Duration: 00:00:00.000
135
- 18:09:41.864 INFO java security sensor peak memory: 208 MB
136
- 18:09:41.864 INFO Sensor JavaSecuritySensor [security] (done) | time=24ms
137
- 18:09:41.865 INFO Sensor CSharpSecuritySensor [security]
138
- 18:09:41.866 INFO Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5883, S6096, S6173, S6287, S6350, S6399, S6547, S6549, S6639, S6641, S6680, S6776, S7044
139
- 18:09:41.866 INFO Load type hierarchy and UCFGs: Starting
140
- 18:09:41.867 INFO Load type hierarchy: Starting
141
- 18:09:41.867 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/ucfg2/cs
142
- 18:09:41.868 INFO Read 0 type definitions
143
- 18:09:41.868 INFO Load type hierarchy: Time spent was 00:00:00.001
144
- 18:09:41.868 INFO Load UCFGs: Starting
145
- 18:09:41.869 INFO Load UCFGs: Time spent was 00:00:00.000
146
- 18:09:41.869 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.003
147
- 18:09:41.869 INFO No UCFGs have been included for analysis.
148
- 18:09:41.869 INFO csharp security sensor: Time spent was 00:00:00.004
149
- 18:09:41.871 INFO csharp security sensor: Begin: 2025-02-20T18:09:41.865118305Z, End: 2025-02-20T18:09:41.869725702Z, Duration: 00:00:00.004
150
- Load type hierarchy and UCFGs: Begin: 2025-02-20T18:09:41.865964329Z, End: 2025-02-20T18:09:41.869215926Z, Duration: 00:00:00.003
151
- Load type hierarchy: Begin: 2025-02-20T18:09:41.865986645Z, End: 2025-02-20T18:09:41.867853400Z, Duration: 00:00:00.001
152
- Load UCFGs: Begin: 2025-02-20T18:09:41.868092351Z, End: 2025-02-20T18:09:41.868136129Z, Duration: 00:00:00.000
153
- 18:09:41.871 INFO csharp security sensor peak memory: 208 MB
154
- 18:09:41.871 INFO Sensor CSharpSecuritySensor [security] (done) | time=6ms
155
- 18:09:41.871 INFO Sensor PhpSecuritySensor [security]
156
- 18:09:41.872 INFO Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5335, S5883, S6173, S6287, S6350, S7044
157
- 18:09:41.872 INFO Load type hierarchy and UCFGs: Starting
158
- 18:09:41.872 INFO Load type hierarchy: Starting
159
- 18:09:41.872 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/php
160
- 18:09:41.872 INFO Read 0 type definitions
161
- 18:09:41.872 INFO Load type hierarchy: Time spent was 00:00:00.000
162
- 18:09:41.872 INFO Load UCFGs: Starting
163
- 18:09:41.872 INFO Load UCFGs: Time spent was 00:00:00.000
164
- 18:09:41.873 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.000
165
- 18:09:41.873 INFO No UCFGs have been included for analysis.
166
- 18:09:41.873 INFO php security sensor: Time spent was 00:00:00.002
167
- 18:09:41.879 INFO php security sensor: Begin: 2025-02-20T18:09:41.871414614Z, End: 2025-02-20T18:09:41.873573582Z, Duration: 00:00:00.002
168
- Load type hierarchy and UCFGs: Begin: 2025-02-20T18:09:41.871922233Z, End: 2025-02-20T18:09:41.872505997Z, Duration: 00:00:00.000
169
- Load type hierarchy: Begin: 2025-02-20T18:09:41.871950676Z, End: 2025-02-20T18:09:41.872098737Z, Duration: 00:00:00.000
170
- Load UCFGs: Begin: 2025-02-20T18:09:41.872278531Z, End: 2025-02-20T18:09:41.872311753Z, Duration: 00:00:00.000
171
- 18:09:41.879 INFO php security sensor peak memory: 208 MB
172
- 18:09:41.879 INFO Sensor PhpSecuritySensor [security] (done) | time=7ms
173
- 18:09:41.880 INFO Sensor PythonSecuritySensor [security]
174
- 18:09:41.881 INFO Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5496, S6287, S6350, S6639, S6680, S6776, S6839, S7044
175
- 18:09:41.881 INFO Load type hierarchy and UCFGs: Starting
176
- 18:09:41.881 INFO Load type hierarchy: Starting
177
- 18:09:41.881 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/python
178
- 18:09:41.882 INFO Read 0 type definitions
179
- 18:09:41.883 INFO Load type hierarchy: Time spent was 00:00:00.000
180
- 18:09:41.883 INFO Load UCFGs: Starting
181
- 18:09:41.884 INFO Load UCFGs: Time spent was 00:00:00.000
182
- 18:09:41.885 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.003
183
- 18:09:41.885 INFO No UCFGs have been included for analysis.
184
- 18:09:41.886 INFO python security sensor: Time spent was 00:00:00.005
185
- 18:09:41.887 INFO python security sensor: Begin: 2025-02-20T18:09:41.880298088Z, End: 2025-02-20T18:09:41.886053438Z, Duration: 00:00:00.005
186
- Load type hierarchy and UCFGs: Begin: 2025-02-20T18:09:41.881406327Z, End: 2025-02-20T18:09:41.884613384Z, Duration: 00:00:00.003
187
- Load type hierarchy: Begin: 2025-02-20T18:09:41.881438349Z, End: 2025-02-20T18:09:41.881853418Z, Duration: 00:00:00.000
188
- Load UCFGs: Begin: 2025-02-20T18:09:41.883348487Z, End: 2025-02-20T18:09:41.883417955Z, Duration: 00:00:00.000
189
- 18:09:41.887 INFO python security sensor peak memory: 208 MB
190
- 18:09:41.887 INFO Sensor PythonSecuritySensor [security] (done) | time=7ms
191
- 18:09:41.889 INFO Sensor JsSecuritySensor [security]
192
- 18:09:41.890 INFO Enabled taint analysis rules: S2076, S2083, S2631, S3649, S5131, S5144, S5146, S5147, S5334, S5696, S5883, S6096, S6105, S6287, S6350
193
- 18:09:41.890 INFO Load type hierarchy and UCFGs: Starting
194
- 18:09:41.890 INFO Load type hierarchy: Starting
195
- 18:09:41.890 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/js
196
- 18:09:41.891 INFO Read 0 type definitions
197
- 18:09:41.892 INFO Load type hierarchy: Time spent was 00:00:00.001
198
- 18:09:41.892 INFO Load UCFGs: Starting
199
- 18:09:41.892 INFO Reading UCFGs from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/js
200
- 18:09:42.115 INFO Load UCFGs: Time spent was 00:00:00.222
201
- 18:09:42.115 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.224
202
- 18:09:42.115 INFO Analyzing 157 UCFGs to detect vulnerabilities.
203
- 18:09:42.115 INFO Check cache: Starting
204
- 18:09:42.115 INFO Load cache: Starting
205
- 18:09:42.116 INFO Load cache: Time spent was 00:00:00.000
206
- 18:09:42.118 INFO Check cache: Time spent was 00:00:00.002
207
- 18:09:42.118 INFO Create runtime call graph: Starting
208
- 18:09:42.119 INFO Variable Type Analysis #1: Starting
209
- 18:09:42.121 INFO Create runtime type propagation graph: Starting
210
- 18:09:42.151 INFO Create runtime type propagation graph: Time spent was 00:00:00.028
211
- 18:09:42.154 INFO Run SCC (Tarjan) on 882 nodes: Starting
212
- 18:09:42.159 INFO Run SCC (Tarjan) on 882 nodes: Time spent was 00:00:00.007
213
- 18:09:42.159 INFO Tarjan found 882 strongly connected components
214
- 18:09:42.159 INFO Propagate runtime types to strongly connected components: Starting
215
- 18:09:42.164 INFO Propagate runtime types to strongly connected components: Time spent was 00:00:00.005
216
- 18:09:42.165 INFO Variable Type Analysis #1: Time spent was 00:00:00.045
217
- 18:09:42.167 INFO Variable Type Analysis #2: Starting
218
- 18:09:42.167 INFO Create runtime type propagation graph: Starting
219
- 18:09:42.178 INFO Create runtime type propagation graph: Time spent was 00:00:00.010
220
- 18:09:42.178 INFO Run SCC (Tarjan) on 882 nodes: Starting
221
- 18:09:42.179 INFO Run SCC (Tarjan) on 882 nodes: Time spent was 00:00:00.001
222
- 18:09:42.179 INFO Tarjan found 882 strongly connected components
223
- 18:09:42.179 INFO Propagate runtime types to strongly connected components: Starting
224
- 18:09:42.182 INFO Propagate runtime types to strongly connected components: Time spent was 00:00:00.002
225
- 18:09:42.182 INFO Variable Type Analysis #2: Time spent was 00:00:00.015
226
- 18:09:42.183 INFO Create runtime call graph: Time spent was 00:00:00.065
227
- 18:09:42.184 INFO Load config: Starting
228
- 18:09:42.262 INFO Load config: Time spent was 00:00:00.078
229
- 18:09:42.263 INFO Compute entry points: Starting
230
- 18:09:42.278 INFO Compute entry points: Time spent was 00:00:00.014
231
- 18:09:42.278 INFO All rules entry points : 28
232
- 18:09:42.278 INFO Slice call graph: Starting
233
- 18:09:42.278 INFO Slice call graph: Time spent was 00:00:00.000
234
- 18:09:42.279 INFO Live variable analysis: Starting
235
- 18:09:42.318 INFO Live variable analysis: Time spent was 00:00:00.039
236
- 18:09:42.318 INFO Taint analysis for js: Starting
237
- 18:09:43.369 INFO 0 / 157 UCFGs simulated, memory usage: 116 MB
238
- 18:09:43.903 INFO 28 / 157 UCFGs simulated, memory usage: 121 MB
239
- 18:09:43.904 INFO Taint analysis for js: Time spent was 00:00:01.585
240
- 18:09:43.904 INFO Report issues: Starting
241
- 18:09:43.909 INFO Report issues: Time spent was 00:00:00.004
242
- 18:09:43.911 INFO Store cache: Starting
243
- 18:09:43.914 INFO Store cache: Time spent was 00:00:00.002
244
- 18:09:43.915 INFO js security sensor: Time spent was 00:00:02.026
245
- 18:09:43.917 INFO js security sensor: Begin: 2025-02-20T18:09:41.888906909Z, End: 2025-02-20T18:09:43.915407187Z, Duration: 00:00:02.026
246
- Load type hierarchy and UCFGs: Begin: 2025-02-20T18:09:41.890187528Z, End: 2025-02-20T18:09:42.114906521Z, Duration: 00:00:00.224
247
- Load type hierarchy: Begin: 2025-02-20T18:09:41.890209067Z, End: 2025-02-20T18:09:41.891712734Z, Duration: 00:00:00.001
248
- Load UCFGs: Begin: 2025-02-20T18:09:41.891838886Z, End: 2025-02-20T18:09:42.114556453Z, Duration: 00:00:00.222
249
- Check cache: Begin: 2025-02-20T18:09:42.115013872Z, End: 2025-02-20T18:09:42.117801785Z, Duration: 00:00:00.002
250
- Load cache: Begin: 2025-02-20T18:09:42.115033564Z, End: 2025-02-20T18:09:42.115069273Z, Duration: 00:00:00.000
251
- Create runtime call graph: Begin: 2025-02-20T18:09:42.118052277Z, End: 2025-02-20T18:09:42.183657266Z, Duration: 00:00:00.065
252
- Variable Type Analysis #1: Begin: 2025-02-20T18:09:42.119137972Z, End: 2025-02-20T18:09:42.164526152Z, Duration: 00:00:00.045
253
- Create runtime type propagation graph: Begin: 2025-02-20T18:09:42.121591798Z, End: 2025-02-20T18:09:42.150583113Z, Duration: 00:00:00.028
254
- Run SCC (Tarjan) on 882 nodes: Begin: 2025-02-20T18:09:42.151143162Z, End: 2025-02-20T18:09:42.158585964Z, Duration: 00:00:00.007
255
- Propagate runtime types to strongly connected components: Begin: 2025-02-20T18:09:42.158901033Z, End: 2025-02-20T18:09:42.164292035Z, Duration: 00:00:00.005
256
- Variable Type Analysis #2: Begin: 2025-02-20T18:09:42.166684171Z, End: 2025-02-20T18:09:42.182011195Z, Duration: 00:00:00.015
257
- Create runtime type propagation graph: Begin: 2025-02-20T18:09:42.166766439Z, End: 2025-02-20T18:09:42.177683179Z, Duration: 00:00:00.010
258
- Run SCC (Tarjan) on 882 nodes: Begin: 2025-02-20T18:09:42.177984954Z, End: 2025-02-20T18:09:42.179180033Z, Duration: 00:00:00.001
259
- Propagate runtime types to strongly connected components: Begin: 2025-02-20T18:09:42.179374257Z, End: 2025-02-20T18:09:42.181834972Z, Duration: 00:00:00.002
260
- Load config: Begin: 2025-02-20T18:09:42.183826340Z, End: 2025-02-20T18:09:42.262249479Z, Duration: 00:00:00.078
261
- Compute entry points: Begin: 2025-02-20T18:09:42.262520527Z, End: 2025-02-20T18:09:42.277281560Z, Duration: 00:00:00.014
262
- Slice call graph: Begin: 2025-02-20T18:09:42.277581349Z, End: 2025-02-20T18:09:42.277600006Z, Duration: 00:00:00.000
263
- Live variable analysis: Begin: 2025-02-20T18:09:42.277702730Z, End: 2025-02-20T18:09:42.317458365Z, Duration: 00:00:00.039
264
- Taint analysis for js: Begin: 2025-02-20T18:09:42.317907889Z, End: 2025-02-20T18:09:43.903076025Z, Duration: 00:00:01.585
265
- Report issues: Begin: 2025-02-20T18:09:43.903834895Z, End: 2025-02-20T18:09:43.908783712Z, Duration: 00:00:00.004
266
- Store cache: Begin: 2025-02-20T18:09:43.910684637Z, End: 2025-02-20T18:09:43.913560702Z, Duration: 00:00:00.002
267
- 18:09:43.918 INFO js security sensor peak memory: 211 MB
268
- 18:09:43.918 INFO Sensor JsSecuritySensor [security] (done) | time=2029ms
269
- 18:09:43.934 INFO ------------- Run sensors on project
270
- 18:09:44.193 INFO Sensor Zero Coverage Sensor
271
- 18:09:44.193 INFO Sensor Zero Coverage Sensor (done) | time=1ms
272
- 18:09:44.235 INFO CPD Executor 7 files had no CPD blocks
273
- 18:09:44.236 INFO CPD Executor Calculating CPD for 20 files
274
- 18:09:44.236 INFO CPD Executor CPD calculation finished (done) | time=20ms
275
- 18:09:44.400 INFO Analysis report generated in 158ms, dir size=407 KB
276
- 18:09:44.506 INFO Analysis report compressed in 106ms, zip size=144 KB
277
- 18:09:45.218 INFO Analysis report uploaded in 713ms
278
- 18:09:45.220 INFO ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=santodigital_santoid-sdk-javascript&branch=master
279
- 18:09:45.220 INFO Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
280
- 18:09:45.220 INFO More about the report processing at https://sonarcloud.io/api/ce/task?id=AZUkjSZU28NixYytveya
281
- 18:09:46.959 INFO Sensor cache published successfully
282
- 18:09:46.972 INFO Time spent writing ucfgs 112ms
283
- 18:09:47.064 INFO Analysis total time: 40.563 s
284
- 18:09:47.065 INFO SonarScanner Engine completed successfully
285
- 18:09:48.067 INFO EXECUTION SUCCESS
286
- 18:09:48.069 INFO Total time: 53.704s
1
+ 19:07:55.059 INFO Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
2
+ 19:07:55.064 INFO Project root configuration file: NONE
3
+ 19:07:55.083 INFO SonarScanner CLI 6.2.1.4610
4
+ 19:07:55.086 INFO Java 17.0.12 Amazon.com Inc. (64-bit)
5
+ 19:07:55.088 INFO Linux 6.1.79 amd64
6
+ 19:07:55.090 INFO SONAR_SCANNER_OPTS=-Xmx2048m
7
+ 19:07:55.142 INFO User cache: /opt/sonar-scanner/.sonar/cache
8
+ 19:07:55.942 INFO JRE provisioning: os[linux], arch[x86_64]
9
+ 19:08:00.737 INFO Communicating with SonarCloud
10
+ 19:08:01.636 INFO Starting SonarScanner Engine...
11
+ 19:08:01.637 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
12
+ 19:08:02.943 INFO Load global settings
13
+ 19:08:03.430 INFO Load global settings (done) | time=488ms
14
+ 19:08:03.434 INFO Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
15
+ 19:08:03.726 INFO Loading required plugins
16
+ 19:08:03.726 INFO Load plugins index
17
+ 19:08:03.867 INFO Load plugins index (done) | time=141ms
18
+ 19:08:03.868 INFO Load/download plugins
19
+ 19:08:04.778 INFO Load/download plugins (done) | time=911ms
20
+ 19:08:05.237 INFO Found an active CI vendor: 'Bitbucket Pipelines'
21
+ 19:08:05.385 INFO Detected project key 'santodigital_santoid-sdk-javascript' from 'Bitbucket Cloud Pipelines'
22
+ 19:08:05.386 INFO Detected organization key 'santodigital' from 'Bitbucket Cloud Pipelines'
23
+ 19:08:05.390 INFO Load project settings for component key: 'santodigital_santoid-sdk-javascript'
24
+ 19:08:05.606 INFO Load project settings for component key: 'santodigital_santoid-sdk-javascript' (done) | time=214ms
25
+ 19:08:05.629 INFO Process project properties
26
+ 19:08:05.643 INFO Project key: santodigital_santoid-sdk-javascript
27
+ 19:08:05.644 INFO Base dir: /opt/atlassian/pipelines/agent/build
28
+ 19:08:05.644 INFO Working dir: /opt/atlassian/pipelines/agent/build/.scannerwork
29
+ 19:08:05.650 INFO Load project branches
30
+ 19:08:05.844 INFO Load project branches (done) | time=195ms
31
+ 19:08:05.848 INFO Check ALM binding of project 'santodigital_santoid-sdk-javascript'
32
+ 19:08:05.987 INFO Detected project binding: BOUND
33
+ 19:08:05.987 INFO Check ALM binding of project 'santodigital_santoid-sdk-javascript' (done) | time=139ms
34
+ 19:08:05.989 INFO Load project pull requests
35
+ 19:08:06.226 INFO Load project pull requests (done) | time=236ms
36
+ 19:08:06.229 INFO Load branch configuration
37
+ 19:08:06.231 INFO Detected analysis for branch 'master'
38
+ 19:08:06.231 INFO Auto-configuring branch master
39
+ 19:08:06.232 INFO Load branch configuration (done) | time=4ms
40
+ 19:08:06.243 INFO Load quality profiles
41
+ 19:08:06.512 INFO Load quality profiles (done) | time=269ms
42
+ 19:08:06.520 INFO Load active rules
43
+ 19:08:16.694 INFO Load active rules (done) | time=10137ms
44
+ 19:08:17.322 INFO Organization key: santodigital
45
+ 19:08:17.324 INFO Branch name: master, type: long-lived
46
+ 19:08:17.345 INFO Preprocessing files...
47
+ 19:08:17.515 INFO 1 language detected in 40 preprocessed files
48
+ 19:08:17.516 INFO 0 files ignored because of inclusion/exclusion patterns
49
+ 19:08:17.516 INFO 0 files ignored because of scm ignore settings
50
+ 19:08:17.597 INFO Loading plugins for detected languages
51
+ 19:08:17.598 INFO Load/download plugins
52
+ 19:08:19.790 INFO Load/download plugins (done) | time=2193ms
53
+ 19:08:20.255 INFO Load project repositories
54
+ 19:08:20.419 INFO Load project repositories (done) | time=164ms
55
+ 19:08:20.428 INFO Indexing files...
56
+ 19:08:20.429 INFO Project configuration:
57
+ 19:08:20.430 INFO Excluded sources: **/build-wrapper-dump.json, __tests__/**/*.test.ts
58
+ 19:08:20.431 INFO Included tests: __tests__/**/*.test.ts
59
+ 19:08:20.506 INFO 40 files indexed
60
+ 19:08:20.511 INFO Quality profile for ts: Sonar way
61
+ 19:08:20.512 INFO ------------- Run sensors on module santodigital_santoid-sdk-javascript
62
+ 19:08:20.561 INFO Load metrics repository
63
+ 19:08:20.699 INFO Load metrics repository (done) | time=138ms
64
+ 19:08:20.705 INFO Sensor cache enabled
65
+ 19:08:21.036 INFO Load sensor cache
66
+ 19:08:22.505 INFO Load sensor cache (101 KB) | time=1469ms
67
+ 19:08:23.143 INFO Sensor JaCoCo XML Report Importer [jacoco]
68
+ 19:08:23.144 INFO 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
69
+ 19:08:23.145 INFO No report imported, no coverage information will be imported by JaCoCo XML Report Importer
70
+ 19:08:23.148 INFO Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
71
+ 19:08:23.149 INFO Sensor Java Config Sensor [iac]
72
+ 19:08:23.183 INFO 0 source files to be analyzed
73
+ 19:08:23.193 INFO 0/0 source files have been analyzed
74
+ 19:08:23.194 INFO Sensor Java Config Sensor [iac] (done) | time=48ms
75
+ 19:08:23.194 INFO Sensor JavaScript/TypeScript analysis [javascript]
76
+ 19:08:23.427 INFO Detected os: Linux arch: amd64 alpine: false. Platform: LINUX_X64
77
+ 19:08:23.428 INFO Deploy location /opt/sonar-scanner/.sonar/js/node-runtime, tagetRuntime: /opt/sonar-scanner/.sonar/js/node-runtime/node, version: /opt/sonar-scanner/.sonar/js/node-runtime/version.txt
78
+ 19:08:27.425 INFO Using embedded Node.js runtime.
79
+ 19:08:27.425 INFO Using Node.js executable: '/opt/sonar-scanner/.sonar/js/node-runtime/node'.
80
+ 19:08:30.068 INFO Memory configuration: OS (10191 MB), Node.js (2096 MB).
81
+ 19:08:33.895 INFO Found 1 tsconfig.json file(s): [/opt/atlassian/pipelines/agent/build/tsconfig.json]
82
+ 19:08:33.898 INFO Creating TypeScript program
83
+ 19:08:33.898 INFO TypeScript configuration file /opt/atlassian/pipelines/agent/build/tsconfig.json
84
+ 19:08:33.898 INFO 40 source files to be analyzed
85
+ 19:08:35.301 INFO Starting analysis with current program
86
+ 19:08:40.644 INFO Analyzed 40 file(s) with current program
87
+ 19:08:40.668 INFO 40/40 source files have been analyzed
88
+ 19:08:40.670 INFO Hit the cache for 0 out of 40
89
+ 19:08:40.672 INFO Miss the cache for 40 out of 40: ANALYSIS_MODE_INELIGIBLE [40/40]
90
+ 19:08:40.673 INFO Sensor JavaScript/TypeScript analysis [javascript] (done) | time=17478ms
91
+ 19:08:40.673 INFO Sensor CSS Rules [javascript]
92
+ 19:08:40.674 INFO No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
93
+ 19:08:40.674 INFO Sensor CSS Rules [javascript] (done) | time=1ms
94
+ 19:08:40.676 INFO Sensor JavaScript/TypeScript Coverage [javascript]
95
+ 19:08:40.676 INFO Analysing [/opt/atlassian/pipelines/agent/build/coverage/lcov.info]
96
+ 19:08:40.702 INFO Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=27ms
97
+ 19:08:40.704 INFO Sensor IaC Docker Sensor [iac]
98
+ 19:08:40.801 INFO 0 source files to be analyzed
99
+ 19:08:40.802 INFO 0/0 source files have been analyzed
100
+ 19:08:40.803 INFO Sensor IaC Docker Sensor [iac] (done) | time=99ms
101
+ 19:08:40.804 INFO Sensor Serverless configuration file sensor [security]
102
+ 19:08:40.805 INFO 0 Serverless function entries were found in the project
103
+ 19:08:40.811 INFO 0 Serverless function handlers were kept as entrypoints
104
+ 19:08:40.812 INFO Sensor Serverless configuration file sensor [security] (done) | time=8ms
105
+ 19:08:40.812 INFO Sensor AWS SAM template file sensor [security]
106
+ 19:08:40.813 INFO Sensor AWS SAM template file sensor [security] (done) | time=1ms
107
+ 19:08:40.814 INFO Sensor AWS SAM Inline template file sensor [security]
108
+ 19:08:40.820 INFO Sensor AWS SAM Inline template file sensor [security] (done) | time=6ms
109
+ 19:08:40.821 INFO Sensor EnterpriseTextAndSecretsSensor [textenterprise]
110
+ 19:08:40.821 INFO Available processors: 4
111
+ 19:08:40.821 INFO Using 4 threads for analysis.
112
+ 19:08:41.467 INFO Using git CLI to retrieve untracked files
113
+ 19:08:41.471 WARN Analyzing only language associated files, make sure to run the analysis inside a git repository to make use of inclusions specified via "sonar.text.inclusions"
114
+ 19:08:41.497 INFO 40 source files to be analyzed
115
+ 19:08:42.017 INFO 40/40 source files have been analyzed
116
+ 19:08:42.019 INFO Sensor EnterpriseTextAndSecretsSensor [textenterprise] (done) | time=1198ms
117
+ 19:08:42.020 INFO Sensor JavaSecuritySensor [security]
118
+ 19:08:42.029 INFO Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5496, S5883, S6096, S6173, S6287, S6350, S6384, S6390, S6398, S6399, S6547, S6549, S7044
119
+ 19:08:42.031 INFO Load type hierarchy and UCFGs: Starting
120
+ 19:08:42.031 INFO Load type hierarchy: Starting
121
+ 19:08:42.031 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/java
122
+ 19:08:42.032 INFO Read 0 type definitions
123
+ 19:08:42.034 INFO Load type hierarchy: Time spent was 00:00:00.002
124
+ 19:08:42.034 INFO Load UCFGs: Starting
125
+ 19:08:42.035 INFO Load UCFGs: Time spent was 00:00:00.000
126
+ 19:08:42.035 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.004
127
+ 19:08:42.035 INFO No UCFGs have been included for analysis.
128
+ 19:08:42.052 INFO java security sensor: Time spent was 00:00:00.027
129
+ 19:08:42.054 INFO java security sensor: Begin: 2025-03-27T19:08:42.024243642Z, End: 2025-03-27T19:08:42.051289905Z, Duration: 00:00:00.027
130
+ Load type hierarchy and UCFGs: Begin: 2025-03-27T19:08:42.030648933Z, End: 2025-03-27T19:08:42.034774543Z, Duration: 00:00:00.004
131
+ Load type hierarchy: Begin: 2025-03-27T19:08:42.030917834Z, End: 2025-03-27T19:08:42.033687887Z, Duration: 00:00:00.002
132
+ Load UCFGs: Begin: 2025-03-27T19:08:42.034369602Z, End: 2025-03-27T19:08:42.034529817Z, Duration: 00:00:00.000
133
+ 19:08:42.054 INFO java security sensor peak memory: 212 MB
134
+ 19:08:42.055 INFO Sensor JavaSecuritySensor [security] (done) | time=35ms
135
+ 19:08:42.055 INFO Sensor CSharpSecuritySensor [security]
136
+ 19:08:42.056 INFO Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5883, S6096, S6173, S6287, S6350, S6399, S6547, S6549, S6639, S6641, S6680, S6776, S7044
137
+ 19:08:42.057 INFO Load type hierarchy and UCFGs: Starting
138
+ 19:08:42.057 INFO Load type hierarchy: Starting
139
+ 19:08:42.058 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/ucfg2/cs
140
+ 19:08:42.058 INFO Read 0 type definitions
141
+ 19:08:42.058 INFO Load type hierarchy: Time spent was 00:00:00.000
142
+ 19:08:42.058 INFO Load UCFGs: Starting
143
+ 19:08:42.059 INFO Load UCFGs: Time spent was 00:00:00.000
144
+ 19:08:42.059 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.002
145
+ 19:08:42.059 INFO No UCFGs have been included for analysis.
146
+ 19:08:42.060 INFO csharp security sensor: Time spent was 00:00:00.004
147
+ 19:08:42.061 INFO csharp security sensor: Begin: 2025-03-27T19:08:42.055261236Z, End: 2025-03-27T19:08:42.059906005Z, Duration: 00:00:00.004
148
+ Load type hierarchy and UCFGs: Begin: 2025-03-27T19:08:42.056536545Z, End: 2025-03-27T19:08:42.058885037Z, Duration: 00:00:00.002
149
+ Load type hierarchy: Begin: 2025-03-27T19:08:42.056570285Z, End: 2025-03-27T19:08:42.057544572Z, Duration: 00:00:00.000
150
+ Load UCFGs: Begin: 2025-03-27T19:08:42.058007978Z, End: 2025-03-27T19:08:42.058527630Z, Duration: 00:00:00.000
151
+ 19:08:42.061 INFO csharp security sensor peak memory: 212 MB
152
+ 19:08:42.061 INFO Sensor CSharpSecuritySensor [security] (done) | time=7ms
153
+ 19:08:42.062 INFO Sensor PhpSecuritySensor [security]
154
+ 19:08:42.064 INFO Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5334, S5335, S5883, S6173, S6287, S6350, S7044
155
+ 19:08:42.064 INFO Load type hierarchy and UCFGs: Starting
156
+ 19:08:42.065 INFO Load type hierarchy: Starting
157
+ 19:08:42.065 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/php
158
+ 19:08:42.065 INFO Read 0 type definitions
159
+ 19:08:42.066 INFO Load type hierarchy: Time spent was 00:00:00.000
160
+ 19:08:42.066 INFO Load UCFGs: Starting
161
+ 19:08:42.066 INFO Load UCFGs: Time spent was 00:00:00.000
162
+ 19:08:42.066 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.001
163
+ 19:08:42.067 INFO No UCFGs have been included for analysis.
164
+ 19:08:42.067 INFO php security sensor: Time spent was 00:00:00.004
165
+ 19:08:42.068 INFO php security sensor: Begin: 2025-03-27T19:08:42.062546881Z, End: 2025-03-27T19:08:42.067251210Z, Duration: 00:00:00.004
166
+ Load type hierarchy and UCFGs: Begin: 2025-03-27T19:08:42.064366568Z, End: 2025-03-27T19:08:42.065657360Z, Duration: 00:00:00.001
167
+ Load type hierarchy: Begin: 2025-03-27T19:08:42.064390140Z, End: 2025-03-27T19:08:42.064608067Z, Duration: 00:00:00.000
168
+ Load UCFGs: Begin: 2025-03-27T19:08:42.065216397Z, End: 2025-03-27T19:08:42.065352691Z, Duration: 00:00:00.000
169
+ 19:08:42.068 INFO php security sensor peak memory: 212 MB
170
+ 19:08:42.069 INFO Sensor PhpSecuritySensor [security] (done) | time=6ms
171
+ 19:08:42.071 INFO Sensor PythonSecuritySensor [security]
172
+ 19:08:42.074 INFO Enabled taint analysis rules: S2076, S2078, S2083, S2091, S2631, S3649, S5131, S5135, S5144, S5145, S5146, S5147, S5334, S5496, S6287, S6350, S6639, S6680, S6776, S6839, S7044
173
+ 19:08:42.075 INFO Load type hierarchy and UCFGs: Starting
174
+ 19:08:42.077 INFO Load type hierarchy: Starting
175
+ 19:08:42.077 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/python
176
+ 19:08:42.078 INFO Read 0 type definitions
177
+ 19:08:42.078 INFO Load type hierarchy: Time spent was 00:00:00.000
178
+ 19:08:42.078 INFO Load UCFGs: Starting
179
+ 19:08:42.078 INFO Load UCFGs: Time spent was 00:00:00.000
180
+ 19:08:42.079 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.000
181
+ 19:08:42.079 INFO No UCFGs have been included for analysis.
182
+ 19:08:42.079 INFO python security sensor: Time spent was 00:00:00.001
183
+ 19:08:42.079 INFO python security sensor: Begin: 2025-03-27T19:08:42.069796092Z, End: 2025-03-27T19:08:42.071231069Z, Duration: 00:00:00.001
184
+ Load type hierarchy and UCFGs: Begin: 2025-03-27T19:08:42.070285882Z, End: 2025-03-27T19:08:42.070791979Z, Duration: 00:00:00.000
185
+ Load type hierarchy: Begin: 2025-03-27T19:08:42.070305338Z, End: 2025-03-27T19:08:42.070496844Z, Duration: 00:00:00.000
186
+ Load UCFGs: Begin: 2025-03-27T19:08:42.070658582Z, End: 2025-03-27T19:08:42.070704327Z, Duration: 00:00:00.000
187
+ 19:08:42.079 INFO python security sensor peak memory: 212 MB
188
+ 19:08:42.079 INFO Sensor PythonSecuritySensor [security] (done) | time=3ms
189
+ 19:08:42.080 INFO Sensor JsSecuritySensor [security]
190
+ 19:08:42.080 INFO Enabled taint analysis rules: S2076, S2083, S2631, S3649, S5131, S5144, S5146, S5147, S5334, S5696, S5883, S6096, S6105, S6287, S6350
191
+ 19:08:42.080 INFO Load type hierarchy and UCFGs: Starting
192
+ 19:08:42.080 INFO Load type hierarchy: Starting
193
+ 19:08:42.081 INFO Reading type hierarchy from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/js
194
+ 19:08:42.081 INFO Read 0 type definitions
195
+ 19:08:42.081 INFO Load type hierarchy: Time spent was 00:00:00.001
196
+ 19:08:42.081 INFO Load UCFGs: Starting
197
+ 19:08:42.081 INFO Reading UCFGs from: /opt/atlassian/pipelines/agent/build/.scannerwork/ucfg2/js
198
+ 19:08:42.443 INFO Load UCFGs: Time spent was 00:00:00.366
199
+ 19:08:42.444 INFO Load type hierarchy and UCFGs: Time spent was 00:00:00.369
200
+ 19:08:42.444 INFO Analyzing 162 UCFGs to detect vulnerabilities.
201
+ 19:08:42.445 INFO Check cache: Starting
202
+ 19:08:42.446 INFO Load cache: Starting
203
+ 19:08:42.447 INFO Load cache: Time spent was 00:00:00.000
204
+ 19:08:42.448 INFO Check cache: Time spent was 00:00:00.002
205
+ 19:08:42.448 INFO Create runtime call graph: Starting
206
+ 19:08:42.450 INFO Variable Type Analysis #1: Starting
207
+ 19:08:42.452 INFO Create runtime type propagation graph: Starting
208
+ 19:08:42.508 INFO Create runtime type propagation graph: Time spent was 00:00:00.056
209
+ 19:08:42.509 INFO Run SCC (Tarjan) on 914 nodes: Starting
210
+ 19:08:42.516 INFO Run SCC (Tarjan) on 914 nodes: Time spent was 00:00:00.005
211
+ 19:08:42.516 INFO Tarjan found 914 strongly connected components
212
+ 19:08:42.517 INFO Propagate runtime types to strongly connected components: Starting
213
+ 19:08:42.534 INFO Propagate runtime types to strongly connected components: Time spent was 00:00:00.017
214
+ 19:08:42.535 INFO Variable Type Analysis #1: Time spent was 00:00:00.084
215
+ 19:08:42.540 INFO Variable Type Analysis #2: Starting
216
+ 19:08:42.541 INFO Create runtime type propagation graph: Starting
217
+ 19:08:42.560 INFO Create runtime type propagation graph: Time spent was 00:00:00.021
218
+ 19:08:42.561 INFO Run SCC (Tarjan) on 914 nodes: Starting
219
+ 19:08:42.562 INFO Run SCC (Tarjan) on 914 nodes: Time spent was 00:00:00.001
220
+ 19:08:42.562 INFO Tarjan found 914 strongly connected components
221
+ 19:08:42.563 INFO Propagate runtime types to strongly connected components: Starting
222
+ 19:08:42.566 INFO Propagate runtime types to strongly connected components: Time spent was 00:00:00.003
223
+ 19:08:42.566 INFO Variable Type Analysis #2: Time spent was 00:00:00.028
224
+ 19:08:42.568 INFO Create runtime call graph: Time spent was 00:00:00.119
225
+ 19:08:42.568 INFO Load config: Starting
226
+ 19:08:42.757 INFO Load config: Time spent was 00:00:00.188
227
+ 19:08:42.758 INFO Compute entry points: Starting
228
+ 19:08:42.774 INFO Compute entry points: Time spent was 00:00:00.016
229
+ 19:08:42.774 INFO All rules entry points : 28
230
+ 19:08:42.774 INFO Slice call graph: Starting
231
+ 19:08:42.775 INFO Slice call graph: Time spent was 00:00:00.000
232
+ 19:08:42.775 INFO Live variable analysis: Starting
233
+ 19:08:42.814 INFO Live variable analysis: Time spent was 00:00:00.039
234
+ 19:08:42.815 INFO Taint analysis for js: Starting
235
+ 19:08:43.933 INFO 0 / 162 UCFGs simulated, memory usage: 141 MB
236
+ 19:08:44.171 INFO 28 / 162 UCFGs simulated, memory usage: 115 MB
237
+ 19:08:44.172 INFO Taint analysis for js: Time spent was 00:00:01.357
238
+ 19:08:44.172 INFO Report issues: Starting
239
+ 19:08:44.176 INFO Report issues: Time spent was 00:00:00.004
240
+ 19:08:44.178 INFO Store cache: Starting
241
+ 19:08:44.180 INFO Store cache: Time spent was 00:00:00.001
242
+ 19:08:44.181 INFO js security sensor: Time spent was 00:00:02.108
243
+ 19:08:44.182 INFO js security sensor: Begin: 2025-03-27T19:08:42.072562680Z, End: 2025-03-27T19:08:44.181158565Z, Duration: 00:00:02.108
244
+ Load type hierarchy and UCFGs: Begin: 2025-03-27T19:08:42.073669779Z, End: 2025-03-27T19:08:42.442824914Z, Duration: 00:00:00.369
245
+ Load type hierarchy: Begin: 2025-03-27T19:08:42.073690061Z, End: 2025-03-27T19:08:42.075389129Z, Duration: 00:00:00.001
246
+ Load UCFGs: Begin: 2025-03-27T19:08:42.075612612Z, End: 2025-03-27T19:08:42.442399360Z, Duration: 00:00:00.366
247
+ Check cache: Begin: 2025-03-27T19:08:42.443023588Z, End: 2025-03-27T19:08:42.445647119Z, Duration: 00:00:00.002
248
+ Load cache: Begin: 2025-03-27T19:08:42.443051611Z, End: 2025-03-27T19:08:42.443129839Z, Duration: 00:00:00.000
249
+ Create runtime call graph: Begin: 2025-03-27T19:08:42.448062673Z, End: 2025-03-27T19:08:42.567769300Z, Duration: 00:00:00.119
250
+ Variable Type Analysis #1: Begin: 2025-03-27T19:08:42.449492561Z, End: 2025-03-27T19:08:42.533786065Z, Duration: 00:00:00.084
251
+ Create runtime type propagation graph: Begin: 2025-03-27T19:08:42.451874617Z, End: 2025-03-27T19:08:42.507980200Z, Duration: 00:00:00.056
252
+ Run SCC (Tarjan) on 914 nodes: Begin: 2025-03-27T19:08:42.509033172Z, End: 2025-03-27T19:08:42.514977603Z, Duration: 00:00:00.005
253
+ Propagate runtime types to strongly connected components: Begin: 2025-03-27T19:08:42.515570261Z, End: 2025-03-27T19:08:42.533316925Z, Duration: 00:00:00.017
254
+ Variable Type Analysis #2: Begin: 2025-03-27T19:08:42.536924498Z, End: 2025-03-27T19:08:42.565767088Z, Duration: 00:00:00.028
255
+ Create runtime type propagation graph: Begin: 2025-03-27T19:08:42.538261382Z, End: 2025-03-27T19:08:42.559370763Z, Duration: 00:00:00.021
256
+ Run SCC (Tarjan) on 914 nodes: Begin: 2025-03-27T19:08:42.559894452Z, End: 2025-03-27T19:08:42.561842494Z, Duration: 00:00:00.001
257
+ Propagate runtime types to strongly connected components: Begin: 2025-03-27T19:08:42.562219492Z, End: 2025-03-27T19:08:42.565280983Z, Duration: 00:00:00.003
258
+ Load config: Begin: 2025-03-27T19:08:42.568031887Z, End: 2025-03-27T19:08:42.756563417Z, Duration: 00:00:00.188
259
+ Compute entry points: Begin: 2025-03-27T19:08:42.756888569Z, End: 2025-03-27T19:08:42.773131610Z, Duration: 00:00:00.016
260
+ Slice call graph: Begin: 2025-03-27T19:08:42.773539899Z, End: 2025-03-27T19:08:42.773558120Z, Duration: 00:00:00.000
261
+ Live variable analysis: Begin: 2025-03-27T19:08:42.773684857Z, End: 2025-03-27T19:08:42.813363747Z, Duration: 00:00:00.039
262
+ Taint analysis for js: Begin: 2025-03-27T19:08:42.814006314Z, End: 2025-03-27T19:08:44.171109044Z, Duration: 00:00:01.357
263
+ Report issues: Begin: 2025-03-27T19:08:44.171381510Z, End: 2025-03-27T19:08:44.176002441Z, Duration: 00:00:00.004
264
+ Store cache: Begin: 2025-03-27T19:08:44.177754946Z, End: 2025-03-27T19:08:44.179652599Z, Duration: 00:00:00.001
265
+ 19:08:44.183 INFO js security sensor peak memory: 250 MB
266
+ 19:08:44.183 INFO Sensor JsSecuritySensor [security] (done) | time=2110ms
267
+ 19:08:44.183 INFO Sensor KotlinSecuritySensor [security]
268
+ 19:08:44.183 INFO No taint analysis rules have been enabled, will not execute taint analysis.
269
+ 19:08:44.183 INFO kotlin security sensor: Time spent was 00:00:00.000
270
+ 19:08:44.183 INFO kotlin security sensor: Begin: 2025-03-27T19:08:44.182941317Z, End: 2025-03-27T19:08:44.183264156Z, Duration: 00:00:00.000
271
+ 19:08:44.184 INFO kotlin security sensor peak memory: 250 MB
272
+ 19:08:44.184 INFO Sensor KotlinSecuritySensor [security] (done) | time=1ms
273
+ 19:08:44.187 INFO ------------- Run sensors on project
274
+ 19:08:44.384 INFO Sensor TsArchitectureSensor [architecture]
275
+ 19:08:44.403 INFO Reading SonarArchitecture IR data from directory "/opt/atlassian/pipelines/agent/build/.scannerwork/architecture/ts"
276
+ 19:08:44.408 INFO * Protobuf reading complete | memory total=202 | free=72 | used=129 (MB)
277
+ 19:08:44.409 INFO * Export complete | memory total=202 | free=72 | used=129 (MB)
278
+ 19:08:44.410 INFO Sensor TsArchitectureSensor [architecture] (done) | time=24ms
279
+ 19:08:44.410 INFO Sensor Zero Coverage Sensor
280
+ 19:08:44.410 INFO Sensor Zero Coverage Sensor (done) | time=1ms
281
+ 19:08:44.433 INFO CPD Executor 7 files had no CPD blocks
282
+ 19:08:44.434 INFO CPD Executor Calculating CPD for 20 files
283
+ 19:08:44.463 INFO CPD Executor CPD calculation finished (done) | time=27ms
284
+ 19:08:44.642 INFO Analysis report generated in 174ms, dir size=420 KB
285
+ 19:08:44.718 INFO Analysis report compressed in 77ms, zip size=147 KB
286
+ 19:08:45.243 INFO Analysis report uploaded in 524ms
287
+ 19:08:45.253 INFO ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=santodigital_santoid-sdk-javascript&branch=master
288
+ 19:08:45.254 INFO Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
289
+ 19:08:45.254 INFO More about the report processing at https://sonarcloud.io/api/ce/task?id=AZXZAb6PD2m49m-wsvdA
290
+ 19:08:46.184 INFO Sensor cache published successfully
291
+ 19:08:46.197 INFO Time spent writing ucfgs 138ms
292
+ 19:08:46.314 INFO Analysis total time: 41.334 s
293
+ 19:08:46.316 INFO SonarScanner Engine completed successfully
294
+ 19:08:46.667 INFO EXECUTION SUCCESS
295
+ 19:08:46.669 INFO Total time: 51.615s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## Versão 5.2.0
4
+
5
+ ### Mudanças
6
+ - Adicionada rota assíncrona para o método **startFaceMatch** utilizado internamente no método **startFaceComparison** da função **uploadIdentificationDocument**. Após a requisição, o método aguarda internamente a finalização do processamento dos resultados antes de entregá-los.
7
+ - Alteração no retorno do campo **results** do objeto **faceMatch** do resultado da função **uploadIdentificationDocument**. O novo formato está específicado na interface **IFaceMatchResult**. Foram adicionados novos campos no retorno, porém os campos que já estavam presentes nas versões anteriores não foram alterados.
8
+
3
9
  ## Versão 5.1.0
4
10
 
5
11
  ### Mudanças
@@ -10,7 +16,7 @@
10
16
 
11
17
  ### Mudanças
12
18
  - Adicionada rota assíncrona para o método **startDocumentUpload** da função **uploadIdentificationDocument**. Após a requisição, o método aguarda internamente a finalização do processamento dos resultados antes de entregá-los.
13
- - Mudança do payload do campo **results** do objeto **typification** do resultado da função **uploadIdentificationDocument**. O novo formato está específicado na interface **ITypificationResult**.
19
+ - Mudança no retorno do campo **results** do objeto **typification** do resultado da função **uploadIdentificationDocument**. O novo formato está específicado na interface **ITypificationResult**.
14
20
 
15
21
  ## Versão 4.0.0
16
22
 
package/README.md CHANGED
@@ -424,9 +424,22 @@ interface ILivenessResults {
424
424
  }
425
425
 
426
426
  interface IFaceMatchResult {
427
+ domain: string
428
+ track: string
429
+ service: string
430
+ requestId: string
431
+ requestType: string
432
+ customerRequestId: string
433
+ executionDatetime: string
434
+ error?: {
435
+ error: string
436
+ }
437
+ status: string
427
438
  comparison_score: number
428
439
  similarity_score: number
429
440
  match: boolean
441
+ fileImage1?: string
442
+ fileImage2?: string
430
443
  }
431
444
  ```
432
445
 
@@ -1,9 +1,42 @@
1
1
  import { AbstractService } from './AbstractService';
2
2
  export declare class FaceMatchService<TFileType> extends AbstractService {
3
- faceMatch(firstImage: TFileType, secondImage: TFileType): Promise<IFaceMatchResult>;
3
+ faceMatch(imageFile1: TFileType, imageFile2: TFileType, customerRequestId: string): Promise<IFaceMatchResult>;
4
+ get(requestId: string): Promise<IFaceMatchGet>;
5
+ }
6
+ export interface IFaceMatch {
7
+ createdAt: string;
8
+ message: string;
9
+ requestId: string;
10
+ }
11
+ export interface IError {
12
+ error: string;
4
13
  }
5
14
  export interface IFaceMatchResult {
15
+ domain: string;
16
+ track: string;
17
+ service: string;
18
+ requestId: string;
19
+ requestType: string;
20
+ customerRequestId: string;
21
+ executionDatetime: string;
22
+ error?: IError;
23
+ status: string;
6
24
  comparison_score: number;
7
25
  similarity_score: number;
8
26
  match: boolean;
27
+ fileImage1?: string;
28
+ fileImage2?: string;
29
+ }
30
+ export interface IFaceMatchGet {
31
+ createdAt: string;
32
+ delivered: boolean;
33
+ domain: string;
34
+ id: string;
35
+ requestType: string;
36
+ sourceURI: string;
37
+ status: string;
38
+ track: string;
39
+ fileURL?: string;
40
+ fileImage1?: string;
41
+ fileImage2?: string;
9
42
  }
@@ -4,16 +4,23 @@ exports.FaceMatchService = void 0;
4
4
  const AbstractService_1 = require("./AbstractService");
5
5
  const index_1 = require("../utils/index");
6
6
  class FaceMatchService extends AbstractService_1.AbstractService {
7
- async faceMatch(firstImage, secondImage) {
7
+ async faceMatch(imageFile1, imageFile2, customerRequestId) {
8
8
  const requestFn = async () => {
9
9
  const formData = new this.serviceOptions.FormDataClass();
10
10
  formData.append('track', this.options.track);
11
- formData.append('firstImage', firstImage, 'firstImage.jpg');
12
- formData.append('secondImage', secondImage, 'secondImage.jpg');
13
- const response = await this.request({ contentType: 'multipart/form-data' }).post('/api/v1/facematch/pair', formData, { params: { sensitive_data_compliance: true } });
11
+ formData.append('customerRequestId', customerRequestId);
12
+ formData.append('deliveryFront', true);
13
+ formData.append('sensitive_data_compliance', true);
14
+ formData.append('imageFile1', imageFile1, 'imageFile1.jpg');
15
+ formData.append('imageFile2', imageFile2, 'imageFile2.jpg');
16
+ const response = await this.request({ contentType: 'multipart/form-data' }).post('/api/v1/face-match-async', formData);
14
17
  return response.data;
15
18
  };
16
19
  return await (0, index_1.retryAsyncFunctionXTimes)(requestFn);
17
20
  }
21
+ async get(requestId) {
22
+ const response = await this.request().get(`/api/v1/tracks/${this.options.track}/face-async/` + requestId);
23
+ return response.data;
24
+ }
18
25
  }
19
26
  exports.FaceMatchService = FaceMatchService;
package/browser/index.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("SantoiDSDK",[],e):"object"==typeof exports?exports.SantoiDSDK=e():t.SantoiDSDK=e()}(this,(()=>(()=>{var t={373:function(t,e,n){"use strict";var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractService=void 0;const r=o(n(218)),s=n(661);e.AbstractService=class{constructor(t,e){this.options=t,this.serviceOptions=e}request(t){var e,n,{contentType:o="application/json",authToken:i=this.options.token,baseUrl:a=(null!==(e=this.options.customApiUrl)&&void 0!==e?e:s.API_GATEWAY_URL)}=void 0===t?{}:t;const c={baseURL:a,headers:{"Content-Type":o,Authorization:`Bearer ${i}`}};let l=this.options.domain;if(!this.options.domain&&this.options.token){const t=this.serviceOptions.tryDecodeJwt(this.options.token);l=null===(n=null==t?void 0:t.claims)||void 0===n?void 0:n.domain}return c.headers&&(l&&(c.headers.Domain=l),this.options.useBillingAccounts&&(c.headers.clientCredentials=!0)),r.default.create(c)}}},605:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FaceMatchService=void 0;const o=n(373),r=n(951);class s extends o.AbstractService{async faceMatch(t,e){return await(0,r.retryAsyncFunctionXTimes)((async()=>{const n=new this.serviceOptions.FormDataClass;return n.append("track",this.options.track),n.append("firstImage",t,"firstImage.jpg"),n.append("secondImage",e,"secondImage.jpg"),(await this.request({contentType:"multipart/form-data"}).post("/api/v1/facematch/pair",n,{params:{sensitive_data_compliance:!0}})).data}))}}e.FaceMatchService=s},144:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypificationService=void 0;const o=n(373),r=n(951);class s extends o.AbstractService{async predict(t,e){return await(0,r.retryAsyncFunctionXTimes)((async()=>{const n=new this.serviceOptions.FormDataClass;return n.append("imageFile",t,"imageFile.jpg"),n.append("track",this.options.track),n.append("customerRequestId",e),n.append("deliveryFront",!0),(await this.request({contentType:"multipart/form-data"}).post("/api/v1/typification-async/predict",n)).data}))}async get(t){return(await this.request().get(`/api/v1/tracks/${this.options.track}/typification-async/`+t)).data}}e.TypificationService=s},122:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.insertUploadIdentificationDocument=void 0;const o=n(661);e.insertUploadIdentificationDocument=function(t,e){var n,r,s;const i=e?document.querySelector(e):document.body;if(!i)throw new Error("Cannot find target element");const a=document.createElement("iframe");a.style.overflow="hidden",a.style.border="0",a.setAttribute("width",null!==(n=t.width)&&void 0!==n?n:"100%"),a.setAttribute("height",null!==(r=t.height)&&void 0!==r?r:"550px"),a.setAttribute("scrolling","no"),a.setAttribute("allow","camera; microphone; clipboard-read; clipboard-write");let c=`${null!==(s=t.customAppUrl)&&void 0!==s?s:o.APPLICATION_URL}/share/domains/${t.domain}/tracks/${t.track}/flow/${t.flow}/embedded`;t.token&&(c+=`?accessToken=${t.token}`),a.setAttribute("src",c),i.appendChild(a)}},42:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LivenessDetectionService=void 0;const o=n(551),r=n(620),s=n(951),i=n(661);e.LivenessDetectionService=class{constructor(t,e){this.frameGetControls={},this.currentStep="front",this.pauseSendingFramesToWebSocket=!1,this.websocketClosedBySDK=!1,this.validationSuccess=!1,this.canSendNextBytes=!0,this.endCalled=!1,this.cancelSendingFramesToWebsocket=void 0,this.successFrames={front:void 0,right:void 0,left:void 0,up:void 0,bottom:void 0},this.options=t,this.abstractWebSocket=e}async onWebSocketMessage(t){var e,n,r,i,a,c,l,u;const d=t.data,p=JSON.parse(d);return(null==p?void 0:p.validation)&&this.currentStep&&(this.successFrames[this.currentStep]=this.lastSentBytes),(null==p?void 0:p.next_step)&&!p.error&&(this.currentStep=p.next_step,await(null===(n=(e=this.options).onNextStep)||void 0===n?void 0:n.call(e,p.next_step)),await(null===(i=(r=this.options)[`on${(0,s.capitalizeFirstLetter)(p.next_step)}Step`])||void 0===i?void 0:i.call(r))),p&&(this.canSendNextBytes=!!(null==p?void 0:p.can_send_next_bytes)),(null==p?void 0:p.success)&&(this.successFrames.bottom=this.lastSentBytes,this.validationSuccess=!0,await(null===(c=(a=this.options).onSuccess)||void 0===c?void 0:c.call(a,{livenessId:p.livenessId,successFrames:this.successFrames})),await this.stopLivenessDetection()),(null==p?void 0:p.error)&&await(null===(u=(l=this.options).onError)||void 0===u?void 0:u.call(l,new o.SDKError({message:"Wrong position",code:o.ELivenessDetectionErrorCodes.WRONG_POSITION}))),p}async stopLivenessDetection(){var t,e,n,o,r;await(0,s.waitFor)((()=>!!this.cancelSendingFramesToWebsocket)),null===(t=this.cancelSendingFramesToWebsocket)||void 0===t||t.call(this),await(null===(n=(e=this.frameGetControls).stopGettingFrames)||void 0===n?void 0:n.call(e)),this.abstractWebSocket.disconnectFromWebSocket(),this.endCalled||(await(null===(r=(o=this.options).onEnd)||void 0===r?void 0:r.call(o)),this.endCalled=!0),this.websocketClosedBySDK=!0}async sendFramesToWebSocket(){var t,e;try{if(this.canSendNextBytes&&!this.pauseSendingFramesToWebSocket){const n=await(null===(e=(t=this.frameGetControls).getNextFrame)||void 0===e?void 0:e.call(t));n&&(this.abstractWebSocket.send(n),this.lastSentBytes=n,this.canSendNextBytes=!1)}}catch(t){await this.stopLivenessDetection()}}async onConnect(){var t,e,n,o,a,c,l,u,d,p;try{if(this.options.getNextFrame)this.frameGetControls.startGettingFrames=this.options.startGettingFrames,this.frameGetControls.getNextFrame=this.options.getNextFrame,this.frameGetControls.stopGettingFrames=this.options.stopGettingFrames,this.frameGetControls.videoStream=await(null===(e=(t=this.options).startGettingFrames)||void 0===e?void 0:e.call(t));else{const t=await(0,r.getDefaultFrameControls)();this.frameGetControls.startGettingFrames=t.startGettingFrames,this.frameGetControls.getNextFrame=t.getNextFrame,this.frameGetControls.stopGettingFrames=t.stopGettingFrames,this.frameGetControls.videoStream=await(null===(o=(n=this.frameGetControls).startGettingFrames)||void 0===o?void 0:o.call(n))}await(null===(c=(a=this.options).onStart)||void 0===c?void 0:c.call(a,{videoStream:this.getVideoStream()})),await(null===(u=(l=this.options).onNextStep)||void 0===u?void 0:u.call(l,"front")),await(null===(p=(d=this.options).onFrontStep)||void 0===p?void 0:p.call(d)),this.cancelSendingFramesToWebsocket=(0,s.callAsyncFunctionEveryXSeconds)((async()=>{await this.sendFramesToWebSocket()}),i.SEND_FRAMES_INTERVAL_MS)}catch(t){await this.onError()}}async onError(){var t,e;this.validationSuccess||(await(null===(e=(t=this.options).onError)||void 0===e?void 0:e.call(t,new o.SDKError({message:"Internal Error",code:o.EDefaultErrorCodes.INTERNAL_ERROR}))),await this.stopLivenessDetection())}resumeGettingFrames(){this.pauseSendingFramesToWebSocket=!1}pauseGettingFrames(){this.pauseSendingFramesToWebSocket=!0}getVideoStream(){var t;return null===(t=this.frameGetControls)||void 0===t?void 0:t.videoStream}}},234:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.livenessDetection=void 0;const o=n(42),r=n(551),s=n(706),i=n(616);e.livenessDetection=function(t){var e;try{const n=new s.AbstractWebSocket({WebSocketClass:null!==(e=t.CustomWebSocketClass)&&void 0!==e?e:WebSocket,decodeJwt:i.decodeJwt},t);n.startConnection();const r=new o.LivenessDetectionService(t,n);return n.waitForWebSocketConnection().then((()=>{r.onConnect()})).catch((()=>{r.onError()})),n.addListener("message",(t=>{r.onWebSocketMessage(t)})),n.addListener("error",(()=>{r.onError()})),n.addListener("close",(()=>{r.onError()})),{getVideoStream:()=>r.getVideoStream(),stopLivenessDetection:async()=>{await r.stopLivenessDetection()},resumeGettingFrames:()=>{r.resumeGettingFrames()},pauseGettingFrames:()=>{r.pauseGettingFrames()}}}catch(t){throw new r.SDKError({message:"Error while starting SDK",code:r.EDefaultErrorCodes.INITIALIZATION_ERROR})}}},171:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UploadIdentificationDocumentService=void 0;const o=n(144),r=n(605),s=n(551),i=n(877),a=n(616);e.UploadIdentificationDocumentService=class{constructor(t,e){this.results={uploadedDocument:null,typification:{status:null,results:null,loading:!1,error:null},liveness:{status:null,results:null,loading:!1,error:null},faceMatch:{status:null,results:null,loading:!1,error:null}},this.options=t,this.internalOptions=e,this.typificationService=new o.TypificationService(t,{FormDataClass:FormData,tryDecodeJwt:a.tryDecodeJwt}),this.faceMatchService=new r.FaceMatchService(t,{FormDataClass:FormData,tryDecodeJwt:a.tryDecodeJwt})}getResults(){return this.results}async updateResults(t){var e,n,o,r,s,i;this.results=Object.assign(Object.assign({},this.results),t),await(null===(n=(e=this.options).onUpdate)||void 0===n?void 0:n.call(e,this.results)),t.faceMatch||this.tryStartFaceMatch(),Object.entries(this.results).every((([t,e])=>"uploadedDocument"===t||!!e.results))&&(await(null===(r=(o=this.options).onSuccess)||void 0===r?void 0:r.call(o,this.results)),await(null===(i=(s=this.options).onEnd)||void 0===i?void 0:i.call(s)))}updateUploadedDocument(t){this.results.uploadedDocument=t}async waitForResults(t){let e=!1;return await new Promise(((n,o)=>{const r=setInterval((async()=>{var s,i,a,c;try{null===(i=(s=this.options).onClearInterval)||void 0===i||i.call(s,r);const l=await this.typificationService.get(t);if("validation"!==(null==l?void 0:l.status)||e){if("error"===(null==l?void 0:l.status))clearInterval(r),o(new Error("Não foi possível processar os resultados do Upload de Documentos"));else if("processed"===(null==l?void 0:l.status)&&l.fileURL){const t=await fetch(l.fileURL),e=await t.json();e&&(clearInterval(r),n(e))}}else await(null===(c=(a=this.options).onValidationRequested)||void 0===c?void 0:c.call(a,{track:this.options.track,requestId:l.id})),e=!0}catch(t){clearInterval(r),o(new Error(t))}}),5e3)}))}async startDocumentUpload(t){var e,n;try{this.updateResults({typification:{status:null,results:null,loading:!0,error:null}}),this.updateUploadedDocument(t);const{requestId:e}=await this.typificationService.predict(t,`sdk-typification-${(0,i.v4)()}`),n=await this.waitForResults(e);this.updateResults({typification:{status:"success",results:n,loading:!1,error:null}})}catch(t){const o=new s.SDKError({message:"Error during document upload/analysis",code:s.EUploadIdentificationDocumentErrorCodes.DOCUMENT_ANALYSIS_ERROR,details:t});await(null===(n=(e=this.options).onError)||void 0===n?void 0:n.call(e,o)),this.updateResults({typification:{status:"error",results:null,loading:!1,error:o}})}}startLivenessDetection(t){var e,n;const o=Object.assign(Object.assign({},this.options.livenessDetectionOptions),t);this.updateResults({liveness:{results:null,status:null,loading:!0,error:null}});try{return this.internalOptions.livenessDetection(Object.assign(Object.assign({domain:this.options.domain,customId:this.options.customId,customWebSocketUrl:this.options.customWebSocketUrl,token:this.options.token,track:this.options.track},o),{onSuccess:async t=>{var e;await(null===(e=null==o?void 0:o.onSuccess)||void 0===e?void 0:e.call(o,t)),this.updateResults({liveness:{status:"success",results:t,loading:!1,error:null}})},onError:async t=>{var e,n,r;await(null===(e=null==o?void 0:o.onError)||void 0===e?void 0:e.call(o,t)),await(null===(r=(n=this.options).onError)||void 0===r?void 0:r.call(n,t)),this.updateResults({liveness:{status:"error",results:null,loading:"wrong-position"===(null==t?void 0:t.code),error:null!=t?t:null}})}}))}catch(t){const o=new s.SDKError({message:"Error during liveness detection",code:s.EUploadIdentificationDocumentErrorCodes.LIVENESS_DETECTION_ERROR,details:t});null===(n=(e=this.options).onError)||void 0===n||n.call(e,o),this.updateResults({liveness:{status:"error",results:null,loading:!1,error:o}})}}async startFaceMatch(t,e){var n,o;try{this.updateResults({faceMatch:{status:null,results:null,loading:!0,error:null}});const n=await this.faceMatchService.faceMatch(t,e);this.updateResults({faceMatch:{results:n,status:"success",loading:!1,error:null}})}catch(t){const e=new s.SDKError({message:"Error when comparing the face with the document",code:s.EUploadIdentificationDocumentErrorCodes.FACE_MATCH_ERROR,details:t});await(null===(o=(n=this.options).onError)||void 0===o?void 0:o.call(n,e)),this.updateResults({faceMatch:{results:null,status:"error",loading:!1,error:e}})}}async tryStartFaceMatch(){var t,e,n;!this.results.uploadedDocument||!(null===(t=this.results.liveness.results)||void 0===t?void 0:t.successFrames.front)||this.results.faceMatch.loading||this.results.liveness.loading||this.results.typification.loading?await(null===(n=(e=this.options).onError)||void 0===n?void 0:n.call(e,new s.SDKError({message:"Unavailable faces",code:s.EUploadIdentificationDocumentErrorCodes.FACE_MATCH_UNAVAILABLE_FACES_ERROR}))):await this.startFaceMatch(this.results.uploadedDocument,this.results.liveness.results.successFrames.front)}startAll(t,e){this.startDocumentUpload(t),this.startLivenessDetection(e)}}},604:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uploadIdentificationDocument=void 0;const o=n(171),r=n(234);e.uploadIdentificationDocument=function(t){const e=new o.UploadIdentificationDocumentService(t,{livenessDetection:r.livenessDetection});return{startDocumentUpload:async(...t)=>{await e.startDocumentUpload(...t)},startLivenessDetection:(...t)=>e.startLivenessDetection(...t),startFaceComparison:async(...t)=>{await e.tryStartFaceMatch(...t)},startAll:(...t)=>{e.startAll(...t)},getResults:(...t)=>e.getResults(...t)}}},620:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultFrameControls=void 0,e.getDefaultFrameControls=async function(){let t,e,n,o;return{startGettingFrames:async function(){return t&&e&&n||(t=await navigator.mediaDevices.getUserMedia({video:!0}),e=document.createElement("video"),e.setAttribute("autoplay","true"),e.style.transform="scale(-1, 1)",e.style.position="absolute",e.style.left="99999px",document.body.appendChild(e),e.srcObject=t,n=document.createElement("canvas"),o=n.getContext("2d")),t},getNextFrame:async function(){if(n&&e)return n.width=e.videoWidth,n.height=e.videoHeight,null==o||o.drawImage(e,0,0,n.width,n.height),await new Promise(((t,e)=>{n?n.toBlob((e=>{t(e)})):t(null)}));throw new Error("Cannot found video element")},stopGettingFrames:function(){e&&(document.body.removeChild(e),e=void 0),n&&(n=void 0),o&&(o=void 0),t&&(null==t||t.getTracks().forEach((t=>{t.stop()})),t=void 0)}}}},616:(t,e)=>{"use strict";function n(t){const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(window.atob(e).split("").map((t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2))).join(""));return JSON.parse(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.tryDecodeJwt=e.decodeJwt=void 0,e.decodeJwt=n,e.tryDecodeJwt=function(t){try{return n(t)}catch(t){return null}}},661:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_RETRY_TIME_STEP=e.DEFAULT_NUMBER_OF_RETRIES=e.SEND_FRAMES_INTERVAL_MS=e.APPLICATION_URL=e.API_GATEWAY_URL=e.WEBSOCKET_BASE_URL=void 0,e.WEBSOCKET_BASE_URL="wss://santoid-liveness-w4ynos5dlq-ue.a.run.app/api/v1/liveness/ws",e.API_GATEWAY_URL="https://api.santoid.com.br",e.APPLICATION_URL="https://app.santoid.com.br",e.SEND_FRAMES_INTERVAL_MS=100,e.DEFAULT_NUMBER_OF_RETRIES=5,e.DEFAULT_RETRY_TIME_STEP=1e3},551:(t,e)=>{"use strict";var n,o,r;Object.defineProperty(e,"__esModule",{value:!0}),e.SDKError=e.EUploadIdentificationDocumentErrorCodes=e.ELivenessDetectionErrorCodes=e.EDefaultErrorCodes=void 0,function(t){t.INITIALIZATION_ERROR="initialization-error",t.INTERNAL_ERROR="internal-error"}(n||(e.EDefaultErrorCodes=n={})),function(t){t.WRONG_POSITION="liveness-detection/wrong-position"}(o||(e.ELivenessDetectionErrorCodes=o={})),function(t){t.FACE_MATCH_ERROR="upload-identification-document/face-match-error",t.FACE_MATCH_UNAVAILABLE_FACES_ERROR="upload-identification-document/face-match-unavailable-faces-error",t.DOCUMENT_ANALYSIS_ERROR="upload-identification-document/document-analysis-error",t.LIVENESS_DETECTION_ERROR="upload-identification-document/liveness-detection-error"}(r||(e.EUploadIdentificationDocumentErrorCodes=r={}));class s extends Error{constructor({message:t,code:e,details:n}){super(t),this.code=e,this.details=n}}e.SDKError=s},951:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.retryAsyncFunctionXTimes=e.callAsyncFunctionEveryXSeconds=e.waitFor=e.wait=e.capitalizeFirstLetter=void 0;const o=n(218),r=n(661);async function s(t){await new Promise((e=>{t()?e():setTimeout((()=>{s(t).then(e)}),500)}))}function i(t){var e;return t instanceof o.AxiosError&&(503===(null===(e=t.response)||void 0===e?void 0:e.status)||"Network Error"===t.message)}e.capitalizeFirstLetter=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},e.wait=async t=>{await new Promise((e=>{setTimeout(e,t)}))},e.waitFor=s,e.callAsyncFunctionEveryXSeconds=function t(e,n,o={stop:!1}){const r={timerEnd:!1};return setTimeout((()=>{r.timerEnd=!0}),n),e().then((async()=>{await s((()=>r.timerEnd)),o.stop||t(e,n,o)})),function(){o.stop=!0}},e.retryAsyncFunctionXTimes=async function t(n,o=i,s=r.DEFAULT_NUMBER_OF_RETRIES,a=1e3,c=r.DEFAULT_RETRY_TIME_STEP){try{return await n()}catch(r){if(o(r)&&s>0)return await(0,e.wait)(a),await t(n,o,s-1,a+c,c);throw r}}},706:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractWebSocket=void 0;const o=n(661);e.AbstractWebSocket=class{constructor(t,e){this.classOptions=t,this.sdkOptions=e}startConnection(){var t,e;const n=this.classOptions.decodeJwt(this.sdkOptions.token),r={x_endpoint_api_userinfo:this.sdkOptions.token,domain:null!==(t=this.sdkOptions.domain)&&void 0!==t?t:n.claims.domain,track:this.sdkOptions.track};this.sdkOptions.customId&&(r.customerRequestId=this.sdkOptions.customId),this.sdkOptions.useBillingAccounts&&(r.clientCredentials=!0);const s=Object.entries(r).map((t=>t.join("="))).join("&");this.websocket=new this.classOptions.WebSocketClass(`${null!==(e=this.sdkOptions.customWebSocketUrl)&&void 0!==e?e:o.WEBSOCKET_BASE_URL}?${s}`)}async waitForWebSocketConnection(){if(await new Promise((t=>{const e=setInterval((()=>{[3,1].includes(this.websocket.readyState)&&(clearInterval(e),t())}),5)})),3===this.websocket.readyState)throw new Error("Cannot connect to server")}disconnectFromWebSocket(){var t,e;[2,3].includes(this.websocket.readyState)||null===(e=(t=this.websocket).close)||void 0===e||e.call(t)}get readyState(){return this.websocket.readyState}addListener(t,e){var n,o;this.websocket.on?this.websocket.on(t,e):null===(o=(n=this.websocket).addEventListener)||void 0===o||o.call(n,t,e)}send(t){this.websocket.send(t)}}},877:(t,e,n)=>{var o=n(570),r=n(358),s=r;s.v1=o,s.v4=r,t.exports=s},327:t=>{for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);t.exports=function(t,n){var o=n||0,r=e;return[r[t[o++]],r[t[o++]],r[t[o++]],r[t[o++]],"-",r[t[o++]],r[t[o++]],"-",r[t[o++]],r[t[o++]],"-",r[t[o++]],r[t[o++]],"-",r[t[o++]],r[t[o++]],r[t[o++]],r[t[o++]],r[t[o++]],r[t[o++]]].join("")}},217:t=>{var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var n=new Uint8Array(16);t.exports=function(){return e(n),n}}else{var o=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},570:(t,e,n)=>{var o,r,s=n(217),i=n(327),a=0,c=0;t.exports=function(t,e,n){var l=e&&n||0,u=e||[],d=(t=t||{}).node||o,p=void 0!==t.clockseq?t.clockseq:r;if(null==d||null==p){var f=s();null==d&&(d=o=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==p&&(p=r=16383&(f[6]<<8|f[7]))}var h=void 0!==t.msecs?t.msecs:(new Date).getTime(),m=void 0!==t.nsecs?t.nsecs:c+1,v=h-a+(m-c)/1e4;if(v<0&&void 0===t.clockseq&&(p=p+1&16383),(v<0||h>a)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=h,c=m,r=p;var y=(1e4*(268435455&(h+=122192928e5))+m)%4294967296;u[l++]=y>>>24&255,u[l++]=y>>>16&255,u[l++]=y>>>8&255,u[l++]=255&y;var g=h/4294967296*1e4&268435455;u[l++]=g>>>8&255,u[l++]=255&g,u[l++]=g>>>24&15|16,u[l++]=g>>>16&255,u[l++]=p>>>8|128,u[l++]=255&p;for(var E=0;E<6;++E)u[l+E]=d[E];return e||i(u)}},358:(t,e,n)=>{var o=n(217),r=n(327);t.exports=function(t,e,n){var s=e&&n||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var a=0;a<16;++a)e[s+a]=i[a];return e||r(i)}},218:(t,e,n)=>{"use strict";function o(t,e){return function(){return t.apply(e,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:s}=Object,i=(a=Object.create(null),t=>{const e=r.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const c=t=>(t=t.toLowerCase(),e=>i(e)===t),l=t=>e=>typeof e===t,{isArray:u}=Array,d=l("undefined"),p=c("ArrayBuffer"),f=l("string"),h=l("function"),m=l("number"),v=t=>null!==t&&"object"==typeof t,y=t=>{if("object"!==i(t))return!1;const e=s(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},g=c("Date"),E=c("File"),w=c("Blob"),b=c("FileList"),S=c("URLSearchParams");function O(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let o,r;if("object"!=typeof t&&(t=[t]),u(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),s=r.length;let i;for(o=0;o<s;o++)i=r[o],e.call(null,t[i],i,t)}}function R(t,e){e=e.toLowerCase();const n=Object.keys(t);let o,r=n.length;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,T=t=>!d(t)&&t!==A,_=(C="undefined"!=typeof Uint8Array&&s(Uint8Array),t=>C&&t instanceof C);var C;const D=c("HTMLFormElement"),F=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),N=c("RegExp"),k=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};O(n,((n,r)=>{let s;!1!==(s=e(n,r,t))&&(o[r]=s||n)})),Object.defineProperties(t,o)},j="abcdefghijklmnopqrstuvwxyz",U="0123456789",L={DIGIT:U,ALPHA:j,ALPHA_DIGIT:j+j.toUpperCase()+U},x=c("AsyncFunction");var I={isArray:u,isArrayBuffer:p,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&h(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||h(t.append)&&("formdata"===(e=i(t))||"object"===e&&h(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&p(t.buffer),e},isString:f,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:v,isPlainObject:y,isUndefined:d,isDate:g,isFile:E,isBlob:w,isRegExp:N,isFunction:h,isStream:t=>v(t)&&h(t.pipe),isURLSearchParams:S,isTypedArray:_,isFileList:b,forEach:O,merge:function t(){const{caseless:e}=T(this)&&this||{},n={},o=(o,r)=>{const s=e&&R(n,r)||r;y(n[s])&&y(o)?n[s]=t(n[s],o):y(o)?n[s]=t({},o):u(o)?n[s]=o.slice():n[s]=o};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&O(arguments[t],o);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(O(e,((e,r)=>{n&&h(e)?t[r]=o(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,o)=>{let r,i,a;const c={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)a=r[i],o&&!o(a,t,e)||c[a]||(e[a]=t[a],c[a]=!0);t=!1!==n&&s(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:i,kindOfTest:c,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return-1!==o&&o===n},toArray:t=>{if(!t)return null;if(u(t))return t;let e=t.length;if(!m(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=n.next())&&!o.done;){const n=o.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const o=[];for(;null!==(n=t.exec(e));)o.push(n);return o},isHTMLForm:D,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:k,freezeMethods:t=>{k(t,((e,n)=>{if(h(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=t[n];h(o)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},o=t=>{t.forEach((t=>{n[t]=!0}))};return u(t)?o(t):o(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:R,global:A,isContextDefined:T,ALPHABET:L,generateString:(t=16,e=L.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n},isSpecCompliantForm:function(t){return!!(t&&h(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,o)=>{if(v(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[o]=t;const r=u(t)?[]:{};return O(t,((t,e)=>{const s=n(t,o+1);!d(s)&&(r[e]=s)})),e[o]=void 0,r}}return t};return n(t,0)},isAsyncFn:x,isThenable:t=>t&&(v(t)||h(t))&&h(t.then)&&h(t.catch)};function P(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}I.inherits(P,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const B=P.prototype,M={};function W(t){return I.isPlainObject(t)||I.isArray(t)}function q(t){return I.endsWith(t,"[]")?t.slice(0,-2):t}function G(t,e,n){return t?t.concat(e).map((function(t,e){return t=q(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{M[t]={value:t}})),Object.defineProperties(P,M),Object.defineProperty(B,"isAxiosError",{value:!0}),P.from=(t,e,n,o,r,s)=>{const i=Object.create(B);return I.toFlatObject(t,i,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),P.call(i,t.message,e,n,o,r),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};const J=I.toFlatObject(I,{},null,(function(t){return/^is[A-Z]/.test(t)}));function K(t,e,n){if(!I.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const o=(n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!I.isUndefined(e[t])}))).metaTokens,r=n.visitor||l,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&I.isSpecCompliantForm(e);if(!I.isFunction(r))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(I.isDate(t))return t.toISOString();if(!a&&I.isBlob(t))throw new P("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(t)||I.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,n,r){let a=t;if(t&&!r&&"object"==typeof t)if(I.endsWith(n,"{}"))n=o?n:n.slice(0,-2),t=JSON.stringify(t);else if(I.isArray(t)&&function(t){return I.isArray(t)&&!t.some(W)}(t)||(I.isFileList(t)||I.endsWith(n,"[]"))&&(a=I.toArray(t)))return n=q(n),a.forEach((function(t,o){!I.isUndefined(t)&&null!==t&&e.append(!0===i?G([n],o,s):null===i?n:n+"[]",c(t))})),!1;return!!W(t)||(e.append(G(r,n,s),c(t)),!1)}const u=[],d=Object.assign(J,{defaultVisitor:l,convertValue:c,isVisitable:W});if(!I.isObject(t))throw new TypeError("data must be an object");return function t(n,o){if(!I.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+o.join("."));u.push(n),I.forEach(n,(function(n,s){!0===(!(I.isUndefined(n)||null===n)&&r.call(e,n,I.isString(s)?s.trim():s,o,d))&&t(n,o?o.concat(s):[s])})),u.pop()}}(t),e}function z(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function V(t,e){this._pairs=[],t&&K(t,this,e)}const H=V.prototype;function $(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(t,e,n){if(!e)return t;const o=n&&n.encode||$,r=n&&n.serialize;let s;if(s=r?r(e,n):I.isURLSearchParams(e)?e.toString():new V(e,n).toString(o),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}H.append=function(t,e){this._pairs.push([t,e])},H.toString=function(t){const e=t?function(e){return t.call(this,e,z)}:z;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var Y=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:V,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function tt(t){function e(t,n,o,r){let s=t[r++];const i=Number.isFinite(+s),a=r>=t.length;return s=!s&&I.isArray(o)?o.length:s,a?(I.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!i):(o[s]&&I.isObject(o[s])||(o[s]=[]),e(t,n,o[s],r)&&I.isArray(o[s])&&(o[s]=function(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}(o[s])),!i)}if(I.isFormData(t)&&I.isFunction(t.entries)){const n={};return I.forEachEntry(t,((t,o)=>{e(function(t){return I.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),o,n,0)})),n}return null}const et={transitional:Z,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",o=n.indexOf("application/json")>-1,r=I.isObject(t);if(r&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return o&&o?JSON.stringify(tt(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return K(t,new Q.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,o){return Q.isNode&&I.isBuffer(t)?(this.append(e,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((s=I.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return K(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||o?(e.setContentType("application/json",!1),function(t,e,n){if(I.isString(t))try{return(0,JSON.parse)(t),I.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||et.transitional,n=e&&e.forcedJSONParsing,o="json"===this.responseType;if(t&&I.isString(t)&&(n&&!this.responseType||o)){const n=!(e&&e.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw P.from(t,P.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],(t=>{et.headers[t]={}}));var nt=et;const ot=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),rt=Symbol("internals");function st(t){return t&&String(t).trim().toLowerCase()}function it(t){return!1===t||null==t?t:I.isArray(t)?t.map(it):String(t)}function at(t,e,n,o,r){return I.isFunction(o)?o.call(this,e,n):(r&&(e=n),I.isString(e)?I.isString(o)?-1!==e.indexOf(o):I.isRegExp(o)?o.test(e):void 0:void 0)}class ct{constructor(t){t&&this.set(t)}set(t,e,n){const o=this;function r(t,e,n){const r=st(e);if(!r)throw new Error("header name must be a non-empty string");const s=I.findKey(o,r);(!s||void 0===o[s]||!0===n||void 0===n&&!1!==o[s])&&(o[s||e]=it(t))}const s=(t,e)=>I.forEach(t,((t,n)=>r(t,n,e)));return I.isPlainObject(t)||t instanceof this.constructor?s(t,e):I.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?s((t=>{const e={};let n,o,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),o=t.substring(r+1).trim(),!n||e[n]&&ot[n]||("set-cookie"===n?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)})),e})(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=st(t)){const n=I.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}(t);if(I.isFunction(e))return e.call(this,t,n);if(I.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=st(t)){const n=I.findKey(this,t);return!(!n||void 0===this[n]||e&&!at(0,this[n],n,e))}return!1}delete(t,e){const n=this;let o=!1;function r(t){if(t=st(t)){const r=I.findKey(n,t);!r||e&&!at(0,n[r],r,e)||(delete n[r],o=!0)}}return I.isArray(t)?t.forEach(r):r(t),o}clear(t){const e=Object.keys(this);let n=e.length,o=!1;for(;n--;){const r=e[n];t&&!at(0,this[r],r,t,!0)||(delete this[r],o=!0)}return o}normalize(t){const e=this,n={};return I.forEach(this,((o,r)=>{const s=I.findKey(n,r);if(s)return e[s]=it(o),void delete e[r];const i=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();i!==r&&delete e[r],e[i]=it(o),n[i]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return I.forEach(this,((n,o)=>{null!=n&&!1!==n&&(e[o]=t&&I.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[rt]=this[rt]={accessors:{}}).accessors,n=this.prototype;function o(t){const o=st(t);e[o]||(function(t,e){const n=I.toCamelCase(" "+e);["get","set","has"].forEach((o=>{Object.defineProperty(t,o+n,{value:function(t,n,r){return this[o].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[o]=!0)}return I.isArray(t)?t.forEach(o):o(t),this}}ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),I.reduceDescriptors(ct.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),I.freezeMethods(ct);var lt=ct;function ut(t,e){const n=this||nt,o=e||n,r=lt.from(o.headers);let s=o.data;return I.forEach(t,(function(t){s=t.call(n,s,r.normalize(),e?e.status:void 0)})),r.normalize(),s}function dt(t){return!(!t||!t.__CANCEL__)}function pt(t,e,n){P.call(this,null==t?"canceled":t,P.ERR_CANCELED,e,n),this.name="CanceledError"}I.inherits(pt,P,{__CANCEL__:!0});var ft=Q.isStandardBrowserEnv?{write:function(t,e,n,o,r,s){const i=[];i.push(t+"="+encodeURIComponent(e)),I.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),I.isString(o)&&i.push("path="+o),I.isString(r)&&i.push("domain="+r),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ht(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var mt=Q.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function o(n){let o=n;return t&&(e.setAttribute("href",o),o=e.href),e.setAttribute("href",o),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=o(window.location.href),function(t){const e=I.isString(t)?o(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function vt(t,e){let n=0;const o=function(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r,s=0,i=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),l=o[i];r||(r=c),n[s]=a,o[s]=c;let u=i,d=0;for(;u!==s;)d+=n[u++],u%=t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-r<e)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}}(50,250);return r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,a=s-n,c=o(a);n=s;const l={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:r};l[e?"download":"upload"]=!0,t(l)}}const yt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let o=t.data;const r=lt.from(t.headers).normalize(),s=t.responseType;let i,a;function c(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}I.isFormData(o)&&(Q.isStandardBrowserEnv||Q.isStandardBrowserWebWorkerEnv?r.setContentType(!1):r.getContentType(/^\s*multipart\/form-data/)?I.isString(a=r.getContentType())&&r.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):r.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const u=ht(t.baseURL,t.url);function d(){if(!l)return;const o=lt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(t,e,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(new P("Request failed with status code "+n.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),c()}),(function(t){n(t),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:o,config:t,request:l}),l=null}if(l.open(t.method.toUpperCase(),X(u,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new P("Request aborted",P.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new P("Network Error",P.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const o=t.transitional||Z;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new P(e,o.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,t,l)),l=null},Q.isStandardBrowserEnv){const e=(t.withCredentials||mt(u))&&t.xsrfCookieName&&ft.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===o&&r.setContentType(null),"setRequestHeader"in l&&I.forEach(r.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),I.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&"json"!==s&&(l.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",vt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",vt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{l&&(n(!e||e.type?new pt(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const p=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);p&&-1===Q.protocols.indexOf(p)?n(new P("Unsupported protocol "+p+":",P.ERR_BAD_REQUEST,t)):l.send(o||null)}))}};I.forEach(yt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const gt=t=>`- ${t}`,Et=t=>I.isFunction(t)||null===t||!1===t;var wt=t=>{t=I.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){let e;if(n=t[s],o=n,!Et(n)&&(o=yt[(e=String(n)).toLowerCase()],void 0===o))throw new P(`Unknown adapter '${e}'`);if(o)break;r[e||"#"+s]=o}if(!o){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new P("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(gt).join("\n"):" "+gt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function bt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new pt(null,t)}function St(t){return bt(t),t.headers=lt.from(t.headers),t.data=ut.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),wt(t.adapter||nt.adapter)(t).then((function(e){return bt(t),e.data=ut.call(t,t.transformResponse,e),e.headers=lt.from(e.headers),e}),(function(e){return dt(e)||(bt(t),e&&e.response&&(e.response.data=ut.call(t,t.transformResponse,e.response),e.response.headers=lt.from(e.response.headers))),Promise.reject(e)}))}const Ot=t=>t instanceof lt?t.toJSON():t;function Rt(t,e){e=e||{};const n={};function o(t,e,n){return I.isPlainObject(t)&&I.isPlainObject(e)?I.merge.call({caseless:n},t,e):I.isPlainObject(e)?I.merge({},e):I.isArray(e)?e.slice():e}function r(t,e,n){return I.isUndefined(e)?I.isUndefined(t)?void 0:o(void 0,t,n):o(t,e,n)}function s(t,e){if(!I.isUndefined(e))return o(void 0,e)}function i(t,e){return I.isUndefined(e)?I.isUndefined(t)?void 0:o(void 0,t):o(void 0,e)}function a(n,r,s){return s in e?o(n,r):s in t?o(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(t,e)=>r(Ot(t),Ot(e),!0)};return I.forEach(Object.keys(Object.assign({},t,e)),(function(o){const s=c[o]||r,i=s(t[o],e[o],o);I.isUndefined(i)&&s!==a||(n[o]=i)})),n}const At={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{At[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Tt={};At.transitional=function(t,e,n){function o(t,e){return"[Axios v1.5.1] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,s)=>{if(!1===t)throw new P(o(r," has been removed"+(e?" in "+e:"")),P.ERR_DEPRECATED);return e&&!Tt[r]&&(Tt[r]=!0,console.warn(o(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,s)}};var _t={assertOptions:function(t,e,n){if("object"!=typeof t)throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],i=e[s];if(i){const e=t[s],n=void 0===e||i(e,s,t);if(!0!==n)throw new P("option "+s+" must be "+n,P.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new P("Unknown option "+s,P.ERR_BAD_OPTION)}},validators:At};const Ct=_t.validators;class Dt{constructor(t){this.defaults=t,this.interceptors={request:new Y,response:new Y}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Rt(this.defaults,e);const{transitional:n,paramsSerializer:o,headers:r}=e;void 0!==n&&_t.assertOptions(n,{silentJSONParsing:Ct.transitional(Ct.boolean),forcedJSONParsing:Ct.transitional(Ct.boolean),clarifyTimeoutError:Ct.transitional(Ct.boolean)},!1),null!=o&&(I.isFunction(o)?e.paramsSerializer={serialize:o}:_t.assertOptions(o,{encode:Ct.function,serialize:Ct.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=r&&I.merge(r.common,r[e.method]);r&&I.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=lt.concat(s,r);const i=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,i.unshift(t.fulfilled,t.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let u,d=0;if(!a){const t=[St.bind(this),void 0];for(t.unshift.apply(t,i),t.push.apply(t,c),u=t.length,l=Promise.resolve(e);d<u;)l=l.then(t[d++],t[d++]);return l}u=i.length;let p=e;for(d=0;d<u;){const t=i[d++],e=i[d++];try{p=t(p)}catch(t){e.call(this,t);break}}try{l=St.call(this,p)}catch(t){return Promise.reject(t)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(t){return X(ht((t=Rt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}I.forEach(["delete","get","head","options"],(function(t){Dt.prototype[t]=function(e,n){return this.request(Rt(n||{},{method:t,url:e,data:(n||{}).data}))}})),I.forEach(["post","put","patch"],(function(t){function e(e){return function(n,o,r){return this.request(Rt(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}Dt.prototype[t]=e(),Dt.prototype[t+"Form"]=e(!0)}));var Ft=Dt;class Nt{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const o=new Promise((t=>{n.subscribe(t),e=t})).then(t);return o.cancel=function(){n.unsubscribe(e)},o},t((function(t,o,r){n.reason||(n.reason=new pt(t,o,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Nt((function(e){t=e})),cancel:t}}}var kt=Nt;const jt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jt).forEach((([t,e])=>{jt[e]=t}));var Ut=jt;const Lt=function t(e){const n=new Ft(e),r=o(Ft.prototype.request,n);return I.extend(r,Ft.prototype,n,{allOwnKeys:!0}),I.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Rt(e,n))},r}(nt);Lt.Axios=Ft,Lt.CanceledError=pt,Lt.CancelToken=kt,Lt.isCancel=dt,Lt.VERSION="1.5.1",Lt.toFormData=K,Lt.AxiosError=P,Lt.Cancel=Lt.CanceledError,Lt.all=function(t){return Promise.all(t)},Lt.spread=function(t){return function(e){return t.apply(null,e)}},Lt.isAxiosError=function(t){return I.isObject(t)&&!0===t.isAxiosError},Lt.mergeConfig=Rt,Lt.AxiosHeaders=lt,Lt.formToJSON=t=>tt(I.isHTMLForm(t)?new FormData(t):t),Lt.getAdapter=wt,Lt.HttpStatusCode=Ut,Lt.default=Lt,t.exports=Lt}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var s=e[o]={exports:{}};return t[o].call(s.exports,s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var o={};return(()=>{"use strict";var t=o;const e=n(234),r=n(604),s=n(122);class i{}i.livenessDetection=e.livenessDetection,i.uploadIdentificationDocument=r.uploadIdentificationDocument,i.insertUploadIdentificationDocument=s.insertUploadIdentificationDocument,t.default=i})(),o.default})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("SantoiDSDK",[],t):"object"==typeof exports?exports.SantoiDSDK=t():e.SantoiDSDK=t()}(this,(()=>(()=>{var e={373:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractService=void 0;const r=o(n(218)),s=n(661);t.AbstractService=class{constructor(e,t){this.options=e,this.serviceOptions=t}request(e){var t,n,{contentType:o="application/json",authToken:i=this.options.token,baseUrl:a=(null!==(t=this.options.customApiUrl)&&void 0!==t?t:s.API_GATEWAY_URL)}=void 0===e?{}:e;const c={baseURL:a,headers:{"Content-Type":o,Authorization:`Bearer ${i}`}};let l=this.options.domain;if(!this.options.domain&&this.options.token){const e=this.serviceOptions.tryDecodeJwt(this.options.token);l=null===(n=null==e?void 0:e.claims)||void 0===n?void 0:n.domain}return c.headers&&(l&&(c.headers.Domain=l),this.options.useBillingAccounts&&(c.headers.clientCredentials=!0)),r.default.create(c)}}},605:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FaceMatchService=void 0;const o=n(373),r=n(951);class s extends o.AbstractService{async faceMatch(e,t,n){return await(0,r.retryAsyncFunctionXTimes)((async()=>{const o=new this.serviceOptions.FormDataClass;return o.append("track",this.options.track),o.append("customerRequestId",n),o.append("deliveryFront",!0),o.append("sensitive_data_compliance",!0),o.append("imageFile1",e,"imageFile1.jpg"),o.append("imageFile2",t,"imageFile2.jpg"),(await this.request({contentType:"multipart/form-data"}).post("/api/v1/face-match-async",o)).data}))}async get(e){return(await this.request().get(`/api/v1/tracks/${this.options.track}/face-async/`+e)).data}}t.FaceMatchService=s},144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypificationService=void 0;const o=n(373),r=n(951);class s extends o.AbstractService{async predict(e,t){return await(0,r.retryAsyncFunctionXTimes)((async()=>{const n=new this.serviceOptions.FormDataClass;return n.append("imageFile",e,"imageFile.jpg"),n.append("track",this.options.track),n.append("customerRequestId",t),n.append("deliveryFront",!0),(await this.request({contentType:"multipart/form-data"}).post("/api/v1/typification-async/predict",n)).data}))}async get(e){return(await this.request().get(`/api/v1/tracks/${this.options.track}/typification-async/`+e)).data}}t.TypificationService=s},122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertUploadIdentificationDocument=void 0;const o=n(661);t.insertUploadIdentificationDocument=function(e,t){var n,r,s;const i=t?document.querySelector(t):document.body;if(!i)throw new Error("Cannot find target element");const a=document.createElement("iframe");a.style.overflow="hidden",a.style.border="0",a.setAttribute("width",null!==(n=e.width)&&void 0!==n?n:"100%"),a.setAttribute("height",null!==(r=e.height)&&void 0!==r?r:"550px"),a.setAttribute("scrolling","no"),a.setAttribute("allow","camera; microphone; clipboard-read; clipboard-write");let c=`${null!==(s=e.customAppUrl)&&void 0!==s?s:o.APPLICATION_URL}/share/domains/${e.domain}/tracks/${e.track}/flow/${e.flow}/embedded`;e.token&&(c+=`?accessToken=${e.token}`),a.setAttribute("src",c),i.appendChild(a)}},42:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LivenessDetectionService=void 0;const o=n(551),r=n(620),s=n(951),i=n(661);t.LivenessDetectionService=class{constructor(e,t){this.frameGetControls={},this.currentStep="front",this.pauseSendingFramesToWebSocket=!1,this.websocketClosedBySDK=!1,this.validationSuccess=!1,this.canSendNextBytes=!0,this.endCalled=!1,this.cancelSendingFramesToWebsocket=void 0,this.successFrames={front:void 0,right:void 0,left:void 0,up:void 0,bottom:void 0},this.options=e,this.abstractWebSocket=t}async onWebSocketMessage(e){var t,n,r,i,a,c,l,u;const d=e.data,p=JSON.parse(d);return(null==p?void 0:p.validation)&&this.currentStep&&(this.successFrames[this.currentStep]=this.lastSentBytes),(null==p?void 0:p.next_step)&&!p.error&&(this.currentStep=p.next_step,await(null===(n=(t=this.options).onNextStep)||void 0===n?void 0:n.call(t,p.next_step)),await(null===(i=(r=this.options)[`on${(0,s.capitalizeFirstLetter)(p.next_step)}Step`])||void 0===i?void 0:i.call(r))),p&&(this.canSendNextBytes=!!(null==p?void 0:p.can_send_next_bytes)),(null==p?void 0:p.success)&&(this.successFrames.bottom=this.lastSentBytes,this.validationSuccess=!0,await(null===(c=(a=this.options).onSuccess)||void 0===c?void 0:c.call(a,{livenessId:p.livenessId,successFrames:this.successFrames})),await this.stopLivenessDetection()),(null==p?void 0:p.error)&&await(null===(u=(l=this.options).onError)||void 0===u?void 0:u.call(l,new o.SDKError({message:"Wrong position",code:o.ELivenessDetectionErrorCodes.WRONG_POSITION}))),p}async stopLivenessDetection(){var e,t,n,o,r;await(0,s.waitFor)((()=>!!this.cancelSendingFramesToWebsocket)),null===(e=this.cancelSendingFramesToWebsocket)||void 0===e||e.call(this),await(null===(n=(t=this.frameGetControls).stopGettingFrames)||void 0===n?void 0:n.call(t)),this.abstractWebSocket.disconnectFromWebSocket(),this.endCalled||(await(null===(r=(o=this.options).onEnd)||void 0===r?void 0:r.call(o)),this.endCalled=!0),this.websocketClosedBySDK=!0}async sendFramesToWebSocket(){var e,t;try{if(this.canSendNextBytes&&!this.pauseSendingFramesToWebSocket){const n=await(null===(t=(e=this.frameGetControls).getNextFrame)||void 0===t?void 0:t.call(e));n&&(this.abstractWebSocket.send(n),this.lastSentBytes=n,this.canSendNextBytes=!1)}}catch(e){await this.stopLivenessDetection()}}async onConnect(){var e,t,n,o,a,c,l,u,d,p;try{if(this.options.getNextFrame)this.frameGetControls.startGettingFrames=this.options.startGettingFrames,this.frameGetControls.getNextFrame=this.options.getNextFrame,this.frameGetControls.stopGettingFrames=this.options.stopGettingFrames,this.frameGetControls.videoStream=await(null===(t=(e=this.options).startGettingFrames)||void 0===t?void 0:t.call(e));else{const e=await(0,r.getDefaultFrameControls)();this.frameGetControls.startGettingFrames=e.startGettingFrames,this.frameGetControls.getNextFrame=e.getNextFrame,this.frameGetControls.stopGettingFrames=e.stopGettingFrames,this.frameGetControls.videoStream=await(null===(o=(n=this.frameGetControls).startGettingFrames)||void 0===o?void 0:o.call(n))}await(null===(c=(a=this.options).onStart)||void 0===c?void 0:c.call(a,{videoStream:this.getVideoStream()})),await(null===(u=(l=this.options).onNextStep)||void 0===u?void 0:u.call(l,"front")),await(null===(p=(d=this.options).onFrontStep)||void 0===p?void 0:p.call(d)),this.cancelSendingFramesToWebsocket=(0,s.callAsyncFunctionEveryXSeconds)((async()=>{await this.sendFramesToWebSocket()}),i.SEND_FRAMES_INTERVAL_MS)}catch(e){await this.onError()}}async onError(){var e,t;this.validationSuccess||(await(null===(t=(e=this.options).onError)||void 0===t?void 0:t.call(e,new o.SDKError({message:"Internal Error",code:o.EDefaultErrorCodes.INTERNAL_ERROR}))),await this.stopLivenessDetection())}resumeGettingFrames(){this.pauseSendingFramesToWebSocket=!1}pauseGettingFrames(){this.pauseSendingFramesToWebSocket=!0}getVideoStream(){var e;return null===(e=this.frameGetControls)||void 0===e?void 0:e.videoStream}}},234:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.livenessDetection=void 0;const o=n(42),r=n(551),s=n(706),i=n(616);t.livenessDetection=function(e){var t;try{const n=new s.AbstractWebSocket({WebSocketClass:null!==(t=e.CustomWebSocketClass)&&void 0!==t?t:WebSocket,decodeJwt:i.decodeJwt},e);n.startConnection();const r=new o.LivenessDetectionService(e,n);return n.waitForWebSocketConnection().then((()=>{r.onConnect()})).catch((()=>{r.onError()})),n.addListener("message",(e=>{r.onWebSocketMessage(e)})),n.addListener("error",(()=>{r.onError()})),n.addListener("close",(()=>{r.onError()})),{getVideoStream:()=>r.getVideoStream(),stopLivenessDetection:async()=>{await r.stopLivenessDetection()},resumeGettingFrames:()=>{r.resumeGettingFrames()},pauseGettingFrames:()=>{r.pauseGettingFrames()}}}catch(e){throw new r.SDKError({message:"Error while starting SDK",code:r.EDefaultErrorCodes.INITIALIZATION_ERROR})}}},171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UploadIdentificationDocumentService=void 0;const o=n(144),r=n(605),s=n(551),i=n(877),a=n(616);t.UploadIdentificationDocumentService=class{constructor(e,t){this.results={uploadedDocument:null,typification:{status:null,results:null,loading:!1,error:null},liveness:{status:null,results:null,loading:!1,error:null},faceMatch:{status:null,results:null,loading:!1,error:null}},this.options=e,this.internalOptions=t,this.typificationService=new o.TypificationService(e,{FormDataClass:FormData,tryDecodeJwt:a.tryDecodeJwt}),this.faceMatchService=new r.FaceMatchService(e,{FormDataClass:FormData,tryDecodeJwt:a.tryDecodeJwt})}getResults(){return this.results}async updateResults(e){var t,n,o,r,s,i;this.results=Object.assign(Object.assign({},this.results),e),await(null===(n=(t=this.options).onUpdate)||void 0===n?void 0:n.call(t,this.results)),e.faceMatch||this.tryStartFaceMatch(),Object.entries(this.results).every((([e,t])=>"uploadedDocument"===e||!!t.results))&&(await(null===(r=(o=this.options).onSuccess)||void 0===r?void 0:r.call(o,this.results)),await(null===(i=(s=this.options).onEnd)||void 0===i?void 0:i.call(s)))}updateUploadedDocument(e){this.results.uploadedDocument=e}async waitForResults(e){let t=!1;return await new Promise(((n,o)=>{const r=setInterval((async()=>{var s,i,a,c;try{null===(i=(s=this.options).onClearInterval)||void 0===i||i.call(s,r);const l=await this.typificationService.get(e);if("validation"!==(null==l?void 0:l.status)||t){if("error"===(null==l?void 0:l.status))clearInterval(r),o(new Error("Não foi possível processar os resultados do Upload de Documentos"));else if("processed"===(null==l?void 0:l.status)&&l.fileURL){const e=await fetch(l.fileURL),t=await e.json();t&&(clearInterval(r),n(t))}}else await(null===(c=(a=this.options).onValidationRequested)||void 0===c?void 0:c.call(a,{track:this.options.track,requestId:l.id})),t=!0}catch(e){clearInterval(r),o(new Error(e))}}),5e3)}))}async waitForResultsFaceMatch(e){return await new Promise(((t,n)=>{const o=setInterval((async()=>{var r,s,i,a;try{null===(s=(r=this.options).onClearInterval)||void 0===s||s.call(r,o);const c=await this.faceMatchService.get(e);if("error"===(null==c?void 0:c.status)||"error_connector"===(null==c?void 0:c.status))clearInterval(o),n(new Error("Não foi possível processar os resultados do FaceMatch"));else if("processed"===(null==c?void 0:c.status)&&c.fileURL){const e=await fetch(c.fileURL);let n=await e.json();n=Object.assign(Object.assign({},n),{fileImage1:null!==(i=c.fileImage1)&&void 0!==i?i:"",fileImage2:null!==(a=c.fileImage2)&&void 0!==a?a:""}),n&&(clearInterval(o),t(n))}}catch(e){clearInterval(o),n(new Error(e))}}),5e3)}))}async startDocumentUpload(e){var t,n;try{this.updateResults({typification:{status:null,results:null,loading:!0,error:null}}),this.updateUploadedDocument(e);const{requestId:t}=await this.typificationService.predict(e,`sdk-typification-${(0,i.v4)()}`),n=await this.waitForResults(t);this.updateResults({typification:{status:"success",results:n,loading:!1,error:null}})}catch(e){const o=new s.SDKError({message:"Error during document upload/analysis",code:s.EUploadIdentificationDocumentErrorCodes.DOCUMENT_ANALYSIS_ERROR,details:e});await(null===(n=(t=this.options).onError)||void 0===n?void 0:n.call(t,o)),this.updateResults({typification:{status:"error",results:null,loading:!1,error:o}})}}startLivenessDetection(e){var t,n;const o=Object.assign(Object.assign({},this.options.livenessDetectionOptions),e);this.updateResults({liveness:{results:null,status:null,loading:!0,error:null}});try{return this.internalOptions.livenessDetection(Object.assign(Object.assign({domain:this.options.domain,customId:this.options.customId,customWebSocketUrl:this.options.customWebSocketUrl,token:this.options.token,track:this.options.track},o),{onSuccess:async e=>{var t;await(null===(t=null==o?void 0:o.onSuccess)||void 0===t?void 0:t.call(o,e)),this.updateResults({liveness:{status:"success",results:e,loading:!1,error:null}})},onError:async e=>{var t,n,r;await(null===(t=null==o?void 0:o.onError)||void 0===t?void 0:t.call(o,e)),await(null===(r=(n=this.options).onError)||void 0===r?void 0:r.call(n,e)),this.updateResults({liveness:{status:"error",results:null,loading:"wrong-position"===(null==e?void 0:e.code),error:null!=e?e:null}})}}))}catch(e){const o=new s.SDKError({message:"Error during liveness detection",code:s.EUploadIdentificationDocumentErrorCodes.LIVENESS_DETECTION_ERROR,details:e});null===(n=(t=this.options).onError)||void 0===n||n.call(t,o),this.updateResults({liveness:{status:"error",results:null,loading:!1,error:o}})}}async startFaceMatch(e,t){var n,o;try{this.updateResults({faceMatch:{status:null,results:null,loading:!0,error:null}});const{requestId:n}=await this.faceMatchService.faceMatch(e,t,`sdk-facematch-${(0,i.v4)()}`),o=await this.waitForResultsFaceMatch(n);this.updateResults({faceMatch:{results:o,status:"success",loading:!1,error:null}})}catch(e){const t=new s.SDKError({message:"Error when comparing the face with the document",code:s.EUploadIdentificationDocumentErrorCodes.FACE_MATCH_ERROR,details:e});await(null===(o=(n=this.options).onError)||void 0===o?void 0:o.call(n,t)),this.updateResults({faceMatch:{results:null,status:"error",loading:!1,error:t}})}}async tryStartFaceMatch(){var e,t,n;!this.results.uploadedDocument||!(null===(e=this.results.liveness.results)||void 0===e?void 0:e.successFrames.front)||this.results.faceMatch.loading||this.results.liveness.loading||this.results.typification.loading?await(null===(n=(t=this.options).onError)||void 0===n?void 0:n.call(t,new s.SDKError({message:"Unavailable faces",code:s.EUploadIdentificationDocumentErrorCodes.FACE_MATCH_UNAVAILABLE_FACES_ERROR}))):await this.startFaceMatch(this.results.uploadedDocument,this.results.liveness.results.successFrames.front)}startAll(e,t){this.startDocumentUpload(e),this.startLivenessDetection(t)}}},604:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uploadIdentificationDocument=void 0;const o=n(171),r=n(234);t.uploadIdentificationDocument=function(e){const t=new o.UploadIdentificationDocumentService(e,{livenessDetection:r.livenessDetection});return{startDocumentUpload:async(...e)=>{await t.startDocumentUpload(...e)},startLivenessDetection:(...e)=>t.startLivenessDetection(...e),startFaceComparison:async(...e)=>{await t.tryStartFaceMatch(...e)},startAll:(...e)=>{t.startAll(...e)},getResults:(...e)=>t.getResults(...e)}}},620:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultFrameControls=void 0,t.getDefaultFrameControls=async function(){let e,t,n,o;return{startGettingFrames:async function(){return e&&t&&n||(e=await navigator.mediaDevices.getUserMedia({video:!0}),t=document.createElement("video"),t.setAttribute("autoplay","true"),t.style.transform="scale(-1, 1)",t.style.position="absolute",t.style.left="99999px",document.body.appendChild(t),t.srcObject=e,n=document.createElement("canvas"),o=n.getContext("2d")),e},getNextFrame:async function(){if(n&&t)return n.width=t.videoWidth,n.height=t.videoHeight,null==o||o.drawImage(t,0,0,n.width,n.height),await new Promise(((e,t)=>{n?n.toBlob((t=>{e(t)})):e(null)}));throw new Error("Cannot found video element")},stopGettingFrames:function(){t&&(document.body.removeChild(t),t=void 0),n&&(n=void 0),o&&(o=void 0),e&&(null==e||e.getTracks().forEach((e=>{e.stop()})),e=void 0)}}}},616:(e,t)=>{"use strict";function n(e){const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(window.atob(t).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join(""));return JSON.parse(n)}Object.defineProperty(t,"__esModule",{value:!0}),t.tryDecodeJwt=t.decodeJwt=void 0,t.decodeJwt=n,t.tryDecodeJwt=function(e){try{return n(e)}catch(e){return null}}},661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_RETRY_TIME_STEP=t.DEFAULT_NUMBER_OF_RETRIES=t.SEND_FRAMES_INTERVAL_MS=t.APPLICATION_URL=t.API_GATEWAY_URL=t.WEBSOCKET_BASE_URL=void 0,t.WEBSOCKET_BASE_URL="wss://santoid-liveness-w4ynos5dlq-ue.a.run.app/api/v1/liveness/ws",t.API_GATEWAY_URL="https://api.santoid.com.br",t.APPLICATION_URL="https://app.santoid.com.br",t.SEND_FRAMES_INTERVAL_MS=100,t.DEFAULT_NUMBER_OF_RETRIES=5,t.DEFAULT_RETRY_TIME_STEP=1e3},551:(e,t)=>{"use strict";var n,o,r;Object.defineProperty(t,"__esModule",{value:!0}),t.SDKError=t.EUploadIdentificationDocumentErrorCodes=t.ELivenessDetectionErrorCodes=t.EDefaultErrorCodes=void 0,function(e){e.INITIALIZATION_ERROR="initialization-error",e.INTERNAL_ERROR="internal-error"}(n||(t.EDefaultErrorCodes=n={})),function(e){e.WRONG_POSITION="liveness-detection/wrong-position"}(o||(t.ELivenessDetectionErrorCodes=o={})),function(e){e.FACE_MATCH_ERROR="upload-identification-document/face-match-error",e.FACE_MATCH_UNAVAILABLE_FACES_ERROR="upload-identification-document/face-match-unavailable-faces-error",e.DOCUMENT_ANALYSIS_ERROR="upload-identification-document/document-analysis-error",e.LIVENESS_DETECTION_ERROR="upload-identification-document/liveness-detection-error"}(r||(t.EUploadIdentificationDocumentErrorCodes=r={}));class s extends Error{constructor({message:e,code:t,details:n}){super(e),this.code=t,this.details=n}}t.SDKError=s},951:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryAsyncFunctionXTimes=t.callAsyncFunctionEveryXSeconds=t.waitFor=t.wait=t.capitalizeFirstLetter=void 0;const o=n(218),r=n(661);async function s(e){await new Promise((t=>{e()?t():setTimeout((()=>{s(e).then(t)}),500)}))}function i(e){var t;return e instanceof o.AxiosError&&(503===(null===(t=e.response)||void 0===t?void 0:t.status)||"Network Error"===e.message)}t.capitalizeFirstLetter=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},t.wait=async e=>{await new Promise((t=>{setTimeout(t,e)}))},t.waitFor=s,t.callAsyncFunctionEveryXSeconds=function e(t,n,o={stop:!1}){const r={timerEnd:!1};return setTimeout((()=>{r.timerEnd=!0}),n),t().then((async()=>{await s((()=>r.timerEnd)),o.stop||e(t,n,o)})),function(){o.stop=!0}},t.retryAsyncFunctionXTimes=async function e(n,o=i,s=r.DEFAULT_NUMBER_OF_RETRIES,a=1e3,c=r.DEFAULT_RETRY_TIME_STEP){try{return await n()}catch(r){if(o(r)&&s>0)return await(0,t.wait)(a),await e(n,o,s-1,a+c,c);throw r}}},706:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractWebSocket=void 0;const o=n(661);t.AbstractWebSocket=class{constructor(e,t){this.classOptions=e,this.sdkOptions=t}startConnection(){var e,t;const n=this.classOptions.decodeJwt(this.sdkOptions.token),r={x_endpoint_api_userinfo:this.sdkOptions.token,domain:null!==(e=this.sdkOptions.domain)&&void 0!==e?e:n.claims.domain,track:this.sdkOptions.track};this.sdkOptions.customId&&(r.customerRequestId=this.sdkOptions.customId),this.sdkOptions.useBillingAccounts&&(r.clientCredentials=!0);const s=Object.entries(r).map((e=>e.join("="))).join("&");this.websocket=new this.classOptions.WebSocketClass(`${null!==(t=this.sdkOptions.customWebSocketUrl)&&void 0!==t?t:o.WEBSOCKET_BASE_URL}?${s}`)}async waitForWebSocketConnection(){if(await new Promise((e=>{const t=setInterval((()=>{[3,1].includes(this.websocket.readyState)&&(clearInterval(t),e())}),5)})),3===this.websocket.readyState)throw new Error("Cannot connect to server")}disconnectFromWebSocket(){var e,t;[2,3].includes(this.websocket.readyState)||null===(t=(e=this.websocket).close)||void 0===t||t.call(e)}get readyState(){return this.websocket.readyState}addListener(e,t){var n,o;this.websocket.on?this.websocket.on(e,t):null===(o=(n=this.websocket).addEventListener)||void 0===o||o.call(n,e,t)}send(e){this.websocket.send(e)}}},877:(e,t,n)=>{var o=n(570),r=n(358),s=r;s.v1=o,s.v4=r,e.exports=s},327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var o=n||0,r=t;return[r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],"-",r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]],r[e[o++]]].join("")}},217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},570:(e,t,n)=>{var o,r,s=n(217),i=n(327),a=0,c=0;e.exports=function(e,t,n){var l=t&&n||0,u=t||[],d=(e=e||{}).node||o,p=void 0!==e.clockseq?e.clockseq:r;if(null==d||null==p){var f=s();null==d&&(d=o=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==p&&(p=r=16383&(f[6]<<8|f[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,v=h-a+(m-c)/1e4;if(v<0&&void 0===e.clockseq&&(p=p+1&16383),(v<0||h>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=h,c=m,r=p;var y=(1e4*(268435455&(h+=122192928e5))+m)%4294967296;u[l++]=y>>>24&255,u[l++]=y>>>16&255,u[l++]=y>>>8&255,u[l++]=255&y;var g=h/4294967296*1e4&268435455;u[l++]=g>>>8&255,u[l++]=255&g,u[l++]=g>>>24&15|16,u[l++]=g>>>16&255,u[l++]=p>>>8|128,u[l++]=255&p;for(var w=0;w<6;++w)u[l+w]=d[w];return t||i(u)}},358:(e,t,n)=>{var o=n(217),r=n(327);e.exports=function(e,t,n){var s=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var a=0;a<16;++a)t[s+a]=i[a];return t||r(i)}},218:(e,t,n)=>{"use strict";function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:s}=Object,i=(a=Object.create(null),e=>{const t=r.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const c=e=>(e=e.toLowerCase(),t=>i(t)===e),l=e=>t=>typeof t===e,{isArray:u}=Array,d=l("undefined"),p=c("ArrayBuffer"),f=l("string"),h=l("function"),m=l("number"),v=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==i(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=c("Date"),w=c("File"),E=c("Blob"),b=c("FileList"),S=c("URLSearchParams");function O(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,r;if("object"!=typeof e&&(e=[e]),u(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const r=n?Object.getOwnPropertyNames(e):Object.keys(e),s=r.length;let i;for(o=0;o<s;o++)i=r[o],t.call(null,e[i],i,e)}}function R(e,t){t=t.toLowerCase();const n=Object.keys(e);let o,r=n.length;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,T=e=>!d(e)&&e!==A,_=(F="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>F&&e instanceof F);var F;const C=c("HTMLFormElement"),D=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),N=c("RegExp"),k=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};O(n,((n,r)=>{let s;!1!==(s=t(n,r,e))&&(o[r]=s||n)})),Object.defineProperties(e,o)},j="abcdefghijklmnopqrstuvwxyz",U="0123456789",L={DIGIT:U,ALPHA:j,ALPHA_DIGIT:j+j.toUpperCase()+U},x=c("AsyncFunction");var I={isArray:u,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!d(e)&&null!==e.constructor&&!d(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||h(e.append)&&("formdata"===(t=i(e))||"object"===t&&h(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:f,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:y,isUndefined:d,isDate:g,isFile:w,isBlob:E,isRegExp:N,isFunction:h,isStream:e=>v(e)&&h(e.pipe),isURLSearchParams:S,isTypedArray:_,isFileList:b,forEach:O,merge:function e(){const{caseless:t}=T(this)&&this||{},n={},o=(o,r)=>{const s=t&&R(n,r)||r;y(n[s])&&y(o)?n[s]=e(n[s],o):y(o)?n[s]=e({},o):u(o)?n[s]=o.slice():n[s]=o};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O(arguments[e],o);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(O(t,((t,r)=>{n&&h(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let r,i,a;const c={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)a=r[i],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:C,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:k,freezeMethods:e=>{k(e,((t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];h(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},o=e=>{e.forEach((e=>{n[e]=!0}))};return u(e)?o(e):o(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:R,global:A,isContextDefined:T,ALPHABET:L,generateString:(e=16,t=L.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[o]=e;const r=u(e)?[]:{};return O(e,((e,t)=>{const s=n(e,o+1);!d(s)&&(r[t]=s)})),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:x,isThenable:e=>e&&(v(e)||h(e))&&h(e.then)&&h(e.catch)};function P(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}I.inherits(P,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const M=P.prototype,B={};function W(e){return I.isPlainObject(e)||I.isArray(e)}function q(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function G(e,t,n){return e?e.concat(t).map((function(e,t){return e=q(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{B[e]={value:e}})),Object.defineProperties(P,B),Object.defineProperty(M,"isAxiosError",{value:!0}),P.from=(e,t,n,o,r,s)=>{const i=Object.create(M);return I.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),P.call(i,e.message,t,n,o,r),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const J=I.toFlatObject(I,{},null,(function(e){return/^is[A-Z]/.test(e)}));function K(e,t,n){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=I.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!I.isUndefined(t[e])}))).metaTokens,r=n.visitor||l,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(r))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(I.isDate(e))return e.toISOString();if(!a&&I.isBlob(e))throw new P("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(e)||I.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,r){let a=e;if(e&&!r&&"object"==typeof e)if(I.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(I.isArray(e)&&function(e){return I.isArray(e)&&!e.some(W)}(e)||(I.isFileList(e)||I.endsWith(n,"[]"))&&(a=I.toArray(e)))return n=q(n),a.forEach((function(e,o){!I.isUndefined(e)&&null!==e&&t.append(!0===i?G([n],o,s):null===i?n:n+"[]",c(e))})),!1;return!!W(e)||(t.append(G(r,n,s),c(e)),!1)}const u=[],d=Object.assign(J,{defaultVisitor:l,convertValue:c,isVisitable:W});if(!I.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!I.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+o.join("."));u.push(n),I.forEach(n,(function(n,s){!0===(!(I.isUndefined(n)||null===n)&&r.call(t,n,I.isString(s)?s.trim():s,o,d))&&e(n,o?o.concat(s):[s])})),u.pop()}}(e),t}function z(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function V(e,t){this._pairs=[],e&&K(e,this,t)}const H=V.prototype;function $(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(e,t,n){if(!t)return e;const o=n&&n.encode||$,r=n&&n.serialize;let s;if(s=r?r(t,n):I.isURLSearchParams(t)?t.toString():new V(t,n).toString(o),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}H.append=function(e,t){this._pairs.push([e,t])},H.toString=function(e){const t=e?function(t){return e.call(this,t,z)}:z;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Y=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){I.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:V,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function ee(e){function t(e,n,o,r){let s=e[r++];const i=Number.isFinite(+s),a=r>=e.length;return s=!s&&I.isArray(o)?o.length:s,a?(I.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!i):(o[s]&&I.isObject(o[s])||(o[s]=[]),t(e,n,o[s],r)&&I.isArray(o[s])&&(o[s]=function(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}(o[s])),!i)}if(I.isFormData(e)&&I.isFunction(e.entries)){const n={};return I.forEachEntry(e,((e,o)=>{t(function(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),o,n,0)})),n}return null}const te={transitional:Z,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=I.isObject(e);if(r&&I.isHTMLForm(e)&&(e=new FormData(e)),I.isFormData(e))return o&&o?JSON.stringify(ee(e)):e;if(I.isArrayBuffer(e)||I.isBuffer(e)||I.isStream(e)||I.isFile(e)||I.isBlob(e))return e;if(I.isArrayBufferView(e))return e.buffer;if(I.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return K(e,new Q.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,o){return Q.isNode&&I.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=I.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return K(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),function(e,t,n){if(I.isString(e))try{return(0,JSON.parse)(e),I.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||te.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(e&&I.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw P.from(e,P.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],(e=>{te.headers[e]={}}));var ne=te;const oe=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),re=Symbol("internals");function se(e){return e&&String(e).trim().toLowerCase()}function ie(e){return!1===e||null==e?e:I.isArray(e)?e.map(ie):String(e)}function ae(e,t,n,o,r){return I.isFunction(o)?o.call(this,t,n):(r&&(t=n),I.isString(t)?I.isString(o)?-1!==t.indexOf(o):I.isRegExp(o)?o.test(t):void 0:void 0)}class ce{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=se(t);if(!r)throw new Error("header name must be a non-empty string");const s=I.findKey(o,r);(!s||void 0===o[s]||!0===n||void 0===n&&!1!==o[s])&&(o[s||t]=ie(e))}const s=(e,t)=>I.forEach(e,((e,n)=>r(e,n,t)));return I.isPlainObject(e)||e instanceof this.constructor?s(e,t):I.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let n,o,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),o=e.substring(r+1).trim(),!n||t[n]&&oe[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)})),t})(e),t):null!=e&&r(t,e,n),this}get(e,t){if(e=se(e)){const n=I.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}(e);if(I.isFunction(t))return t.call(this,e,n);if(I.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=se(e)){const n=I.findKey(this,e);return!(!n||void 0===this[n]||t&&!ae(0,this[n],n,t))}return!1}delete(e,t){const n=this;let o=!1;function r(e){if(e=se(e)){const r=I.findKey(n,e);!r||t&&!ae(0,n[r],r,t)||(delete n[r],o=!0)}}return I.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];e&&!ae(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return I.forEach(this,((o,r)=>{const s=I.findKey(n,r);if(s)return t[s]=ie(o),void delete t[r];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();i!==r&&delete t[r],t[i]=ie(o),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return I.forEach(this,((n,o)=>{null!=n&&!1!==n&&(t[o]=e&&I.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[re]=this[re]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=se(e);t[o]||(function(e,t){const n=I.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[o]=!0)}return I.isArray(e)?e.forEach(o):o(e),this}}ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),I.reduceDescriptors(ce.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),I.freezeMethods(ce);var le=ce;function ue(e,t){const n=this||ne,o=t||n,r=le.from(o.headers);let s=o.data;return I.forEach(e,(function(e){s=e.call(n,s,r.normalize(),t?t.status:void 0)})),r.normalize(),s}function de(e){return!(!e||!e.__CANCEL__)}function pe(e,t,n){P.call(this,null==e?"canceled":e,P.ERR_CANCELED,t,n),this.name="CanceledError"}I.inherits(pe,P,{__CANCEL__:!0});var fe=Q.isStandardBrowserEnv?{write:function(e,t,n,o,r,s){const i=[];i.push(e+"="+encodeURIComponent(t)),I.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),I.isString(o)&&i.push("path="+o),I.isString(r)&&i.push("domain="+r),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function he(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var me=Q.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function o(n){let o=n;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=o(window.location.href),function(e){const t=I.isString(e)?o(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function ve(e,t){let n=0;const o=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=o[i];r||(r=c),n[s]=a,o[s]=c;let u=i,d=0;for(;u!==s;)d+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-r<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}}(50,250);return r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,a=s-n,c=o(a);n=s;const l={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:r};l[t?"download":"upload"]=!0,e(l)}}const ye={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let o=e.data;const r=le.from(e.headers).normalize(),s=e.responseType;let i,a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}I.isFormData(o)&&(Q.isStandardBrowserEnv||Q.isStandardBrowserWebWorkerEnv?r.setContentType(!1):r.getContentType(/^\s*multipart\/form-data/)?I.isString(a=r.getContentType())&&r.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):r.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";r.set("Authorization","Basic "+btoa(t+":"+n))}const u=he(e.baseURL,e.url);function d(){if(!l)return;const o=le.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new P("Request failed with status code "+n.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:o,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),X(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new P("Request aborted",P.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new P("Network Error",P.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const o=e.transitional||Z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new P(t,o.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,e,l)),l=null},Q.isStandardBrowserEnv){const t=(e.withCredentials||me(u))&&e.xsrfCookieName&&fe.read(e.xsrfCookieName);t&&r.set(e.xsrfHeaderName,t)}void 0===o&&r.setContentType(null),"setRequestHeader"in l&&I.forEach(r.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),I.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",ve(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",ve(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new pe(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);p&&-1===Q.protocols.indexOf(p)?n(new P("Unsupported protocol "+p+":",P.ERR_BAD_REQUEST,e)):l.send(o||null)}))}};I.forEach(ye,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ge=e=>`- ${e}`,we=e=>I.isFunction(e)||null===e||!1===e;var Ee=e=>{e=I.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){let t;if(n=e[s],o=n,!we(n)&&(o=ye[(t=String(n)).toLowerCase()],void 0===o))throw new P(`Unknown adapter '${t}'`);if(o)break;r[t||"#"+s]=o}if(!o){const e=Object.entries(r).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new P("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(ge).join("\n"):" "+ge(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function be(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function Se(e){return be(e),e.headers=le.from(e.headers),e.data=ue.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ee(e.adapter||ne.adapter)(e).then((function(t){return be(e),t.data=ue.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t}),(function(t){return de(t)||(be(e),t&&t.response&&(t.response.data=ue.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)}))}const Oe=e=>e instanceof le?e.toJSON():e;function Re(e,t){t=t||{};const n={};function o(e,t,n){return I.isPlainObject(e)&&I.isPlainObject(t)?I.merge.call({caseless:n},e,t):I.isPlainObject(t)?I.merge({},t):I.isArray(t)?t.slice():t}function r(e,t,n){return I.isUndefined(t)?I.isUndefined(e)?void 0:o(void 0,e,n):o(e,t,n)}function s(e,t){if(!I.isUndefined(t))return o(void 0,t)}function i(e,t){return I.isUndefined(t)?I.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(n,r,s){return s in t?o(n,r):s in e?o(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>r(Oe(e),Oe(t),!0)};return I.forEach(Object.keys(Object.assign({},e,t)),(function(o){const s=c[o]||r,i=s(e[o],t[o],o);I.isUndefined(i)&&s!==a||(n[o]=i)})),n}const Ae={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ae[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Te={};Ae.transitional=function(e,t,n){function o(e,t){return"[Axios v1.5.1] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,s)=>{if(!1===e)throw new P(o(r," has been removed"+(t?" in "+t:"")),P.ERR_DEPRECATED);return t&&!Te[r]&&(Te[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}};var _e={assertOptions:function(e,t,n){if("object"!=typeof e)throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const s=o[r],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new P("option "+s+" must be "+n,P.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new P("Unknown option "+s,P.ERR_BAD_OPTION)}},validators:Ae};const Fe=_e.validators;class Ce{constructor(e){this.defaults=e,this.interceptors={request:new Y,response:new Y}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Re(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;void 0!==n&&_e.assertOptions(n,{silentJSONParsing:Fe.transitional(Fe.boolean),forcedJSONParsing:Fe.transitional(Fe.boolean),clarifyTimeoutError:Fe.transitional(Fe.boolean)},!1),null!=o&&(I.isFunction(o)?t.paramsSerializer={serialize:o}:_e.assertOptions(o,{encode:Fe.function,serialize:Fe.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=r&&I.merge(r.common,r[t.method]);r&&I.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=le.concat(s,r);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[Se.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=i.length;let p=t;for(d=0;d<u;){const e=i[d++],t=i[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Se.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return X(he((e=Re(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}I.forEach(["delete","get","head","options"],(function(e){Ce.prototype[e]=function(t,n){return this.request(Re(n||{},{method:e,url:t,data:(n||{}).data}))}})),I.forEach(["post","put","patch"],(function(e){function t(t){return function(n,o,r){return this.request(Re(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}Ce.prototype[e]=t(),Ce.prototype[e+"Form"]=t(!0)}));var De=Ce;class Ne{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const o=new Promise((e=>{n.subscribe(e),t=e})).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e((function(e,o,r){n.reason||(n.reason=new pe(e,o,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Ne((function(t){e=t})),cancel:e}}}var ke=Ne;const je={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(je).forEach((([e,t])=>{je[t]=e}));var Ue=je;const Le=function e(t){const n=new De(t),r=o(De.prototype.request,n);return I.extend(r,De.prototype,n,{allOwnKeys:!0}),I.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Re(t,n))},r}(ne);Le.Axios=De,Le.CanceledError=pe,Le.CancelToken=ke,Le.isCancel=de,Le.VERSION="1.5.1",Le.toFormData=K,Le.AxiosError=P,Le.Cancel=Le.CanceledError,Le.all=function(e){return Promise.all(e)},Le.spread=function(e){return function(t){return e.apply(null,t)}},Le.isAxiosError=function(e){return I.isObject(e)&&!0===e.isAxiosError},Le.mergeConfig=Re,Le.AxiosHeaders=le,Le.formToJSON=e=>ee(I.isHTMLForm(e)?new FormData(e):e),Le.getAdapter=Ee,Le.HttpStatusCode=Ue,Le.default=Le,e.exports=Le}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={exports:{}};return e[o].call(s.exports,s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var o={};return(()=>{"use strict";var e=o;const t=n(234),r=n(604),s=n(122);class i{}i.livenessDetection=t.livenessDetection,i.uploadIdentificationDocument=r.uploadIdentificationDocument,i.insertUploadIdentificationDocument=s.insertUploadIdentificationDocument,e.default=i})(),o.default})()));
@@ -14,6 +14,7 @@ export declare class UploadIdentificationDocumentService<TFrameType, TMediaType,
14
14
  updateResults(updatedResults: Partial<IUploadIdentificationDocumentResults<TFileType>>): Promise<void>;
15
15
  updateUploadedDocument(file: TFileType): void;
16
16
  waitForResults(requestId: string): Promise<ITypificationResult>;
17
+ waitForResultsFaceMatch(requestId: string): Promise<IFaceMatchResult>;
17
18
  startDocumentUpload(file: TFileType): Promise<void>;
18
19
  startLivenessDetection(startLivenessDetectionOptions?: ICustomLivenessOptions<TFrameType, TMediaType>): TLivenessDetectionReturn<TMediaType> | undefined;
19
20
  startFaceMatch(firstImage: TFileType, secondImage: TFileType): Promise<void>;
@@ -73,6 +73,34 @@ class UploadIdentificationDocumentService {
73
73
  }, 5000);
74
74
  });
75
75
  }
76
+ async waitForResultsFaceMatch(requestId) {
77
+ return await new Promise((resolve, reject) => {
78
+ const interval = setInterval(async () => {
79
+ var _a, _b, _c, _d;
80
+ try {
81
+ (_b = (_a = this.options).onClearInterval) === null || _b === void 0 ? void 0 : _b.call(_a, interval);
82
+ const data = await this.faceMatchService.get(requestId);
83
+ if ((data === null || data === void 0 ? void 0 : data.status) === 'error' || (data === null || data === void 0 ? void 0 : data.status) === 'error_connector') {
84
+ clearInterval(interval);
85
+ reject(new Error('Não foi possível processar os resultados do FaceMatch'));
86
+ }
87
+ else if ((data === null || data === void 0 ? void 0 : data.status) === 'processed' && data.fileURL) {
88
+ const response = await fetch(data.fileURL);
89
+ let faceMatchResults = await response.json();
90
+ faceMatchResults = Object.assign(Object.assign({}, faceMatchResults), { fileImage1: (_c = data.fileImage1) !== null && _c !== void 0 ? _c : '', fileImage2: (_d = data.fileImage2) !== null && _d !== void 0 ? _d : '' });
91
+ if (faceMatchResults) {
92
+ clearInterval(interval);
93
+ resolve(faceMatchResults);
94
+ }
95
+ }
96
+ }
97
+ catch (error) {
98
+ clearInterval(interval);
99
+ reject(new Error(error));
100
+ }
101
+ }, 5000);
102
+ });
103
+ }
76
104
  async startDocumentUpload(file) {
77
105
  var _a, _b;
78
106
  try {
@@ -136,7 +164,8 @@ class UploadIdentificationDocumentService {
136
164
  var _a, _b;
137
165
  try {
138
166
  this.updateResults({ faceMatch: { status: null, results: null, loading: true, error: null } });
139
- const faceMatchResults = await this.faceMatchService.faceMatch(firstImage, secondImage);
167
+ const { requestId } = await this.faceMatchService.faceMatch(firstImage, secondImage, `sdk-facematch-${(0, uuid_1.v4)()}`);
168
+ const faceMatchResults = await this.waitForResultsFaceMatch(requestId);
140
169
  this.updateResults({ faceMatch: { results: faceMatchResults, status: 'success', loading: false, error: null } });
141
170
  }
142
171
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "santoid-sdk",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "",
5
5
  "main": "client/index.js",
6
6
  "types": "client/index.d.ts",